From 90ad3f64bca2f6520f2d0e3904ff7c3cc112e889 Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Thu, 6 Jun 2019 08:38:08 -0500 Subject: [PATCH 01/17] eui 11.3.1 --- package.json | 2 +- .../plugins/kbn_tp_run_pipeline/package.json | 2 +- .../kbn_tp_custom_visualizations/package.json | 2 +- .../kbn_tp_sample_panel_action/package.json | 2 +- .../kbn_tp_visualize_embedding/package.json | 2 +- x-pack/package.json | 2 +- yarn.lock | 21 +++++-------------- 7 files changed, 11 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index ec6773e9b9fe91..06cdaf3f0992ea 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "@babel/register": "7.4.4", "@elastic/charts": "^4.2.6", "@elastic/datemath": "5.0.2", - "@elastic/eui": "11.0.1", + "@elastic/eui": "11.3.1", "@elastic/filesaver": "1.1.2", "@elastic/good": "8.1.1-kibana2", "@elastic/numeral": "2.3.3", diff --git a/test/interpreter_functional/plugins/kbn_tp_run_pipeline/package.json b/test/interpreter_functional/plugins/kbn_tp_run_pipeline/package.json index e0146b6904ff2d..e5855527f4987a 100644 --- a/test/interpreter_functional/plugins/kbn_tp_run_pipeline/package.json +++ b/test/interpreter_functional/plugins/kbn_tp_run_pipeline/package.json @@ -7,7 +7,7 @@ }, "license": "Apache-2.0", "dependencies": { - "@elastic/eui": "11.0.1", + "@elastic/eui": "11.3.1", "react": "^16.8.0", "react-dom": "^16.8.0" } diff --git a/test/plugin_functional/plugins/kbn_tp_custom_visualizations/package.json b/test/plugin_functional/plugins/kbn_tp_custom_visualizations/package.json index 549e2bb48f00b6..83246f52a7d57f 100644 --- a/test/plugin_functional/plugins/kbn_tp_custom_visualizations/package.json +++ b/test/plugin_functional/plugins/kbn_tp_custom_visualizations/package.json @@ -7,7 +7,7 @@ }, "license": "Apache-2.0", "dependencies": { - "@elastic/eui": "11.0.1", + "@elastic/eui": "11.3.1", "react": "^16.8.0" } } diff --git a/test/plugin_functional/plugins/kbn_tp_sample_panel_action/package.json b/test/plugin_functional/plugins/kbn_tp_sample_panel_action/package.json index 8aec51d9c7086e..d82565c9675c4e 100644 --- a/test/plugin_functional/plugins/kbn_tp_sample_panel_action/package.json +++ b/test/plugin_functional/plugins/kbn_tp_sample_panel_action/package.json @@ -8,7 +8,7 @@ }, "license": "Apache-2.0", "dependencies": { - "@elastic/eui": "11.0.1", + "@elastic/eui": "11.3.1", "react": "^16.8.0" }, "scripts": { diff --git a/test/plugin_functional/plugins/kbn_tp_visualize_embedding/package.json b/test/plugin_functional/plugins/kbn_tp_visualize_embedding/package.json index 306a768b35a462..490b8a00ca79cc 100644 --- a/test/plugin_functional/plugins/kbn_tp_visualize_embedding/package.json +++ b/test/plugin_functional/plugins/kbn_tp_visualize_embedding/package.json @@ -7,7 +7,7 @@ }, "license": "Apache-2.0", "dependencies": { - "@elastic/eui": "11.0.1", + "@elastic/eui": "11.3.1", "react": "^16.8.0", "react-dom": "^16.8.0" } diff --git a/x-pack/package.json b/x-pack/package.json index 4ff2adfc74b933..d2f1d42570c36f 100644 --- a/x-pack/package.json +++ b/x-pack/package.json @@ -168,7 +168,7 @@ "@babel/register": "7.4.4", "@babel/runtime": "7.4.5", "@elastic/datemath": "5.0.2", - "@elastic/eui": "11.0.1", + "@elastic/eui": "11.3.1", "@elastic/javascript-typescript-langserver": "^0.1.28", "@elastic/lsp-extension": "^0.1.1", "@elastic/node-crypto": "^1.0.0", diff --git a/yarn.lock b/yarn.lock index 39c98da91b1dd3..0b3b5fb1195efd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1644,10 +1644,10 @@ tabbable "^1.1.0" uuid "^3.1.0" -"@elastic/eui@11.0.1": - version "11.0.1" - resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-11.0.1.tgz#fbf8650bd766f955b611d6aa9f652bab680a8874" - integrity sha512-/RJOFPTiFu1UIqhLEzsY0n3tv5XwXxH1W3dica8YtfaTl+6GvvQhYP9MAjqzOwDd0y8E7+130ZTFszwP+cyBcQ== +"@elastic/eui@11.3.1": + version "11.3.1" + resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-11.3.1.tgz#7c011ff916d8e8bf4d9f735a3ca7bcb43eb45a59" + integrity sha512-Um+MMrfJVXiUsXhiKCroU+zmSjs+NGzW3XkdUG5AuZru6Bprm3dbJSX/O8zx/8c15N6NbPDV43y92XoZhXNz3Q== dependencies: "@types/lodash" "^4.14.116" "@types/numeral" "^0.0.25" @@ -1662,7 +1662,6 @@ prop-types "^15.6.0" react-ace "^5.5.0" react-beautiful-dnd "^10.1.0" - react-color "^2.13.8" react-focus-lock "^1.17.7" react-input-autosize "^2.2.1" react-is "~16.3.0" @@ -26639,21 +26638,11 @@ typescript-fsa@^2.0.0, typescript-fsa@^2.5.0: resolved "https://registry.yarnpkg.com/typescript-fsa/-/typescript-fsa-2.5.0.tgz#1baec01b5e8f5f34c322679d1327016e9e294faf" integrity sha1-G67AG16PXzTDImedEycBbp4pT68= -typescript@^3.3.3333, typescript@~3.3.3333: +typescript@^3.3.3333, typescript@~3.0.3, typescript@~3.3.3333, typescript@~3.4.3: version "3.3.3333" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.3.3333.tgz#171b2c5af66c59e9431199117a3bcadc66fdcfd6" integrity sha512-JjSKsAfuHBE/fB2oZ8NxtRTk5iGcg6hkYXMnZ3Wc+b2RSqejEqTaem11mHASMnFilHrax3sLK0GDzcJrekZYLw== -typescript@~3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.3.tgz#4853b3e275ecdaa27f78fda46dc273a7eb7fc1c8" - integrity sha512-kk80vLW9iGtjMnIv11qyxLqZm20UklzuR2tL0QAnDIygIUIemcZMxlMWudl9OOt76H3ntVzcTiddQ1/pAAJMYg== - -typescript@~3.4.3: - version "3.4.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.4.5.tgz#2d2618d10bb566572b8d7aad5180d84257d70a99" - integrity sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw== - typings-tester@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/typings-tester/-/typings-tester-0.3.2.tgz#04cc499d15ab1d8b2d14dd48415a13d01333bc5b" From 6f289382048b45ae112546216ee76b0afc76fbcf Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Thu, 6 Jun 2019 08:40:13 -0500 Subject: [PATCH 02/17] EuiSuperSelect TS updates --- .../MachineLearningFlyout/TransactionSelect.tsx | 1 - .../public/components/font_picker/font_picker.tsx | 11 ++++++++--- .../public/components/admin_page/project_tab.tsx | 1 - .../__snapshots__/query_bar.test.tsx.snap | 8 ++------ .../query_bar/components/scope_selector.tsx | 7 +------ .../simple_privilege_section.tsx | 1 - .../privilege_space_form.tsx | 13 ++++++++----- .../components/flow_controls/flow_target_select.tsx | 5 +---- .../body/column_headers/events_select/index.tsx | 7 +------ .../timeline/search_or_filter/helpers.tsx | 7 +------ .../timeline/search_or_filter/search_or_filter.tsx | 8 +------- x-pack/plugins/uptime/public/pages/monitor.tsx | 2 -- 12 files changed, 23 insertions(+), 48 deletions(-) diff --git a/x-pack/plugins/apm/public/components/app/ServiceDetails/ServiceIntegrations/MachineLearningFlyout/TransactionSelect.tsx b/x-pack/plugins/apm/public/components/app/ServiceDetails/ServiceIntegrations/MachineLearningFlyout/TransactionSelect.tsx index f444c6f541a4ec..de2e889ddeb51a 100644 --- a/x-pack/plugins/apm/public/components/app/ServiceDetails/ServiceIntegrations/MachineLearningFlyout/TransactionSelect.tsx +++ b/x-pack/plugins/apm/public/components/app/ServiceDetails/ServiceIntegrations/MachineLearningFlyout/TransactionSelect.tsx @@ -8,7 +8,6 @@ import { EuiFlexGroup, EuiFlexItem, EuiFormRow, - // @ts-ignore EuiSuperSelect, EuiText } from '@elastic/eui'; diff --git a/x-pack/plugins/canvas/public/components/font_picker/font_picker.tsx b/x-pack/plugins/canvas/public/components/font_picker/font_picker.tsx index ad28b9e7ff5c6a..01685cf78d5636 100644 --- a/x-pack/plugins/canvas/public/components/font_picker/font_picker.tsx +++ b/x-pack/plugins/canvas/public/components/font_picker/font_picker.tsx @@ -10,8 +10,13 @@ import PropTypes from 'prop-types'; import React, { FunctionComponent } from 'react'; import { fonts, FontValue } from '../../../common/lib/fonts'; +interface DisplayedFont { + value: string; + label: string; +} + interface Props { - onSelect?: (value: FontValue) => void; + onSelect?: (value: DisplayedFont['value']) => void; value?: FontValue; } @@ -20,7 +25,7 @@ export const FontPicker: FunctionComponent = props => { // While fonts are strongly-typed, we also support custom fonts someone might type in. // So let's cast the fonts and allow for additions. - const displayedFonts: Array<{ value: string; label: string }> = fonts; + const displayedFonts: DisplayedFont[] = fonts; if (value && !fonts.find(font => font.value === value)) { const label = (value.indexOf(',') >= 0 ? value.split(',')[0] : value).replace(/['"]/g, ''); @@ -36,7 +41,7 @@ export const FontPicker: FunctionComponent = props => { inputDisplay:
{font.label}
, }))} valueOfSelected={value} - onChange={(newValue: FontValue) => onSelect && onSelect(newValue)} + onChange={(newValue: DisplayedFont['value']) => onSelect && onSelect(newValue)} /> ); }; diff --git a/x-pack/plugins/code/public/components/admin_page/project_tab.tsx b/x-pack/plugins/code/public/components/admin_page/project_tab.tsx index 6fe868eeb8b7c5..f9391b764a8a2c 100644 --- a/x-pack/plugins/code/public/components/admin_page/project_tab.tsx +++ b/x-pack/plugins/code/public/components/admin_page/project_tab.tsx @@ -20,7 +20,6 @@ import { EuiModalHeaderTitle, EuiOverlayMask, EuiSpacer, - // @ts-ignore EuiSuperSelect, EuiText, EuiTitle, diff --git a/x-pack/plugins/code/public/components/query_bar/components/__snapshots__/query_bar.test.tsx.snap b/x-pack/plugins/code/public/components/query_bar/components/__snapshots__/query_bar.test.tsx.snap index c8e2a2317095df..5006bdb1f2b062 100644 --- a/x-pack/plugins/code/public/components/query_bar/components/__snapshots__/query_bar.test.tsx.snap +++ b/x-pack/plugins/code/public/components/query_bar/components/__snapshots__/query_bar.test.tsx.snap @@ -117,7 +117,6 @@ exports[`render correctly with empty query string 1`] = ` fullWidth={false} isInvalid={false} isLoading={false} - onChange={[Function]} onClick={[Function]} onKeyDown={[Function]} options={ @@ -212,7 +211,6 @@ exports[`render correctly with empty query string 1`] = ` fullWidth={false} isInvalid={false} isLoading={false} - onChange={[Function]} onClick={[Function]} onKeyDown={[Function]} options={ @@ -378,8 +376,8 @@ exports[`render correctly with empty query string 1`] = ` List should render with data 1`] = ` aria-relevant="text" className="euiScreenReaderOnly" role="status" - > - Below is a table of 4 items. - + /> List should render with data 1`] = ` List should render with data 1`] = ` Date: Thu, 6 Jun 2019 08:43:10 -0500 Subject: [PATCH 06/17] i18n service updates --- .../__snapshots__/i18n_service.test.tsx.snap | 26 +++++-- src/core/public/i18n/i18n_service.tsx | 68 ++++++++++++++++--- 2 files changed, 81 insertions(+), 13 deletions(-) diff --git a/src/core/public/i18n/__snapshots__/i18n_service.test.tsx.snap b/src/core/public/i18n/__snapshots__/i18n_service.test.tsx.snap index 4b77a2472fda5e..c5d3f75eaf0a51 100644 --- a/src/core/public/i18n/__snapshots__/i18n_service.test.tsx.snap +++ b/src/core/public/i18n/__snapshots__/i18n_service.test.tsx.snap @@ -10,14 +10,17 @@ exports[`#setup() returns \`Context\` component 1`] = ` "euiBasicTable.selectThisRow": "Select this row", "euiBasicTable.tableDescription": [Function], "euiBottomBar.screenReaderAnnouncement": "There is a new menu opening with page level controls at the end of the document.", + "euiCardSelect.select": "Select", + "euiCardSelect.selected": "Unavailable", + "euiCardSelect.unavailable": "Selected", "euiCodeBlock.copyButton": "Copy", "euiCodeEditor.startEditing": "Press Enter to start editing.", "euiCodeEditor.startInteracting": "Press Enter to start interacting with the code.", "euiCodeEditor.stopEditing": "When you're done, press Escape to stop editing.", "euiCodeEditor.stopInteracting": "When you're done, press Escape to stop interacting with the code.", "euiCollapsedItemActions.allActions": "All actions", - "euiColorPicker.colorSelectionLabel": [Function], - "euiColorPicker.transparentColor": "transparent", + "euiColorPicker.screenReaderAnnouncement": "A popup with a range of selectable colors opened. Tab forward to cycle through colors choices or press escape to close this popup.", + "euiColorPicker.swatchAriaLabel": [Function], "euiComboBoxOptionsList.allOptionsSelected": "You've selected all available options", "euiComboBoxOptionsList.alreadyAdded": [Function], "euiComboBoxOptionsList.createCustomOption": [Function], @@ -25,20 +28,25 @@ exports[`#setup() returns \`Context\` component 1`] = ` "euiComboBoxOptionsList.noAvailableOptions": "There aren't any options available", "euiComboBoxOptionsList.noMatchingOptions": [Function], "euiComboBoxPill.removeSelection": [Function], + "euiFilterButton.filterBadge": [Function], "euiForm.addressFormErrors": "Please address the errors in your form.", "euiFormControlLayoutClearButton.label": "Clear input", "euiHeaderAlert.dismiss": "Dismiss", "euiHeaderLinks.appNavigation": "App navigation", "euiHeaderLinks.openNavigationMenu": "Open navigation menu", + "euiHue.label": "Select the HSV color mode \\"hue\\" value", "euiModal.closeModal": "Closes this modal window", "euiPagination.jumpToLastPage": [Function], "euiPagination.nextPage": "Next page", "euiPagination.pageOfTotal": [Function], "euiPagination.previousPage": "Previous page", "euiPopover.screenReaderAnnouncement": "You are in a popup. To exit this popup, hit Escape.", + "euiSaturation.roleDescription": [Function], + "euiSaturation.screenReaderAnnouncement": "Use the arrow keys to navigate the square color gradient. The coordinates resulting from each key press will be used to calculate HSV color mode \\"saturation\\" and \\"value\\" numbers, in the range of 0 to 1. Left and right decrease and increase (respectively) the \\"saturation\\" value. Up and down decrease and increase (respectively) the \\"value\\" value.", "euiSelectable.loadingOptions": "Loading options", "euiSelectable.noAvailableOptions": "There aren't any options available", "euiSelectable.noMatchingOptions": [Function], + "euiStat.loadingText": [Function], "euiStep.completeStep": "Step", "euiStep.incompleteStep": "Incomplete Step", "euiStepHorizontal.buttonTitle": [Function], @@ -49,6 +57,7 @@ exports[`#setup() returns \`Context\` component 1`] = ` "euiSuperSelect.screenReaderAnnouncement": [Function], "euiSuperSelectControl.selectAnOption": [Function], "euiTablePagination.rowsPerPage": "Rows per page", + "euiTablePagination.rowsPerPageOption": [Function], "euiTableSortMobile.sorting": "Sorting", "euiToast.dismissToast": "Dismiss toast", "euiToast.newNotification": "A new notification appears", @@ -72,14 +81,17 @@ exports[`#start() returns \`Context\` component 1`] = ` "euiBasicTable.selectThisRow": "Select this row", "euiBasicTable.tableDescription": [Function], "euiBottomBar.screenReaderAnnouncement": "There is a new menu opening with page level controls at the end of the document.", + "euiCardSelect.select": "Select", + "euiCardSelect.selected": "Unavailable", + "euiCardSelect.unavailable": "Selected", "euiCodeBlock.copyButton": "Copy", "euiCodeEditor.startEditing": "Press Enter to start editing.", "euiCodeEditor.startInteracting": "Press Enter to start interacting with the code.", "euiCodeEditor.stopEditing": "When you're done, press Escape to stop editing.", "euiCodeEditor.stopInteracting": "When you're done, press Escape to stop interacting with the code.", "euiCollapsedItemActions.allActions": "All actions", - "euiColorPicker.colorSelectionLabel": [Function], - "euiColorPicker.transparentColor": "transparent", + "euiColorPicker.screenReaderAnnouncement": "A popup with a range of selectable colors opened. Tab forward to cycle through colors choices or press escape to close this popup.", + "euiColorPicker.swatchAriaLabel": [Function], "euiComboBoxOptionsList.allOptionsSelected": "You've selected all available options", "euiComboBoxOptionsList.alreadyAdded": [Function], "euiComboBoxOptionsList.createCustomOption": [Function], @@ -87,20 +99,25 @@ exports[`#start() returns \`Context\` component 1`] = ` "euiComboBoxOptionsList.noAvailableOptions": "There aren't any options available", "euiComboBoxOptionsList.noMatchingOptions": [Function], "euiComboBoxPill.removeSelection": [Function], + "euiFilterButton.filterBadge": [Function], "euiForm.addressFormErrors": "Please address the errors in your form.", "euiFormControlLayoutClearButton.label": "Clear input", "euiHeaderAlert.dismiss": "Dismiss", "euiHeaderLinks.appNavigation": "App navigation", "euiHeaderLinks.openNavigationMenu": "Open navigation menu", + "euiHue.label": "Select the HSV color mode \\"hue\\" value", "euiModal.closeModal": "Closes this modal window", "euiPagination.jumpToLastPage": [Function], "euiPagination.nextPage": "Next page", "euiPagination.pageOfTotal": [Function], "euiPagination.previousPage": "Previous page", "euiPopover.screenReaderAnnouncement": "You are in a popup. To exit this popup, hit Escape.", + "euiSaturation.roleDescription": [Function], + "euiSaturation.screenReaderAnnouncement": "Use the arrow keys to navigate the square color gradient. The coordinates resulting from each key press will be used to calculate HSV color mode \\"saturation\\" and \\"value\\" numbers, in the range of 0 to 1. Left and right decrease and increase (respectively) the \\"saturation\\" value. Up and down decrease and increase (respectively) the \\"value\\" value.", "euiSelectable.loadingOptions": "Loading options", "euiSelectable.noAvailableOptions": "There aren't any options available", "euiSelectable.noMatchingOptions": [Function], + "euiStat.loadingText": [Function], "euiStep.completeStep": "Step", "euiStep.incompleteStep": "Incomplete Step", "euiStepHorizontal.buttonTitle": [Function], @@ -111,6 +128,7 @@ exports[`#start() returns \`Context\` component 1`] = ` "euiSuperSelect.screenReaderAnnouncement": [Function], "euiSuperSelectControl.selectAnOption": [Function], "euiTablePagination.rowsPerPage": "Rows per page", + "euiTablePagination.rowsPerPageOption": [Function], "euiTableSortMobile.sorting": "Sorting", "euiToast.dismissToast": "Dismiss toast", "euiToast.newNotification": "A new notification appears", diff --git a/src/core/public/i18n/i18n_service.tsx b/src/core/public/i18n/i18n_service.tsx index 5f26e84064b0c6..5307f40804cea5 100644 --- a/src/core/public/i18n/i18n_service.tsx +++ b/src/core/public/i18n/i18n_service.tsx @@ -57,6 +57,18 @@ export class I18nService { 'Screen reader announcement that functionality is available in the page document', } ), + 'euiCardSelect.select': i18n.translate('core.euiCardSelect.select', { + defaultMessage: 'Select', + description: 'Displayed button text when a card option can be selected.', + }), + 'euiCardSelect.selected': i18n.translate('core.euiCardSelect.selected', { + defaultMessage: 'Unavailable', + description: 'Displayed button text when a card option is selected.', + }), + 'euiCardSelect.unavailable': i18n.translate('core.euiCardSelect.unavailable', { + defaultMessage: 'Selected', + description: 'Displayed button text when a card option is unavailable.', + }), 'euiCodeBlock.copyButton': i18n.translate('core.euiCodeBlock.copyButton', { defaultMessage: 'Copy', description: 'ARIA label for a button that copies source code text to the clipboard', @@ -81,15 +93,23 @@ export class I18nService { 'ARIA label and tooltip content describing a button that expands an actions menu', } ), - 'euiColorPicker.colorSelectionLabel': ({ colorValue }: EuiValues) => - i18n.translate('core.euiColorPicker.colorSelectionLabel', { - defaultMessage: 'Color selection is {colorValue}', - values: { colorValue }, - }), - 'euiColorPicker.transparentColor': i18n.translate('core.euiColorPicker.transparentColor', { - defaultMessage: 'transparent', - description: 'Describes a color that is fully transparent', - }), + 'euiColorPicker.screenReaderAnnouncement': i18n.translate( + 'core.euiColorPicker.screenReaderAnnouncement', + { + defaultMessage: + 'A popup with a range of selectable colors opened. Tab forward to cycle through colors choices or press escape to close this popup.', + description: + 'Message when the color picker popover is opened. Describes the interaction with the elements in the popover.', + } + ), + 'euiColorPicker.swatchAriaLabel': ({ swatch }: EuiValues) => ( + + ), 'euiComboBoxOptionsList.allOptionsSelected': i18n.translate( 'core.euiComboBoxOptionsList.allOptionsSelected', { @@ -136,6 +156,11 @@ export class I18nService { values: { children }, description: 'ARIA label, `children` is the human-friendly value of an option', }), + 'euiFilterButton.filterBadge': ({ count, hasActiveFilters }: EuiValues) => + i18n.translate('core.euiFilterButton.filterBadge', { + defaultMessage: '${count} ${filterCountLabel} filters', + values: { count, filterCountLabel: hasActiveFilters ? 'active' : 'available' }, + }), 'euiForm.addressFormErrors': i18n.translate('core.euiForm.addressFormErrors', { defaultMessage: 'Please address the errors in your form.', }), @@ -160,6 +185,9 @@ export class I18nService { defaultMessage: 'Open navigation menu', } ), + 'euiHue.label': i18n.translate('core.euiHue.label', { + defaultMessage: 'Select the HSV color mode "hue" value', + }), 'euiModal.closeModal': i18n.translate('core.euiModal.closeModal', { defaultMessage: 'Closes this modal window', }), @@ -185,6 +213,19 @@ export class I18nService { defaultMessage: 'You are in a popup. To exit this popup, hit Escape.', } ), + 'euiSaturation.roleDescription': () => ( + + ), + 'euiSaturation.screenReaderAnnouncement': i18n.translate( + 'core.euiSaturation.screenReaderAnnouncement', + { + defaultMessage: + 'Use the arrow keys to navigate the square color gradient. The coordinates resulting from each key press will be used to calculate HSV color mode "saturation" and "value" numbers, in the range of 0 to 1. Left and right decrease and increase (respectively) the "saturation" value. Up and down decrease and increase (respectively) the "value" value.', + } + ), 'euiSelectable.loadingOptions': i18n.translate('core.euiSelectable.loadingOptions', { defaultMessage: 'Loading options', description: 'Placeholder message while data is asynchronously loaded', @@ -199,6 +240,9 @@ export class I18nService { values={{ searchValue }} /> ), + 'euiStat.loadingText': () => ( + + ), 'euiStep.completeStep': i18n.translate('core.euiStep.completeStep', { defaultMessage: 'Step', description: @@ -252,6 +296,12 @@ export class I18nService { defaultMessage: 'Rows per page', description: 'Displayed in a button that toggles a table pagination menu', }), + 'euiTablePagination.rowsPerPageOption': ({ rowsPerPage }: EuiValues) => + i18n.translate('core.euiTablePagination.rowsPerPageOption', { + defaultMessage: '{rowsPerPage} rows', + description: 'Displayed in a button that toggles the number of visible rows', + values: { rowsPerPage }, + }), 'euiTableSortMobile.sorting': i18n.translate('core.euiTableSortMobile.sorting', { defaultMessage: 'Sorting', description: 'Displayed in a button that toggles a table sorting menu', From 9c05c3ee04e64912f51c7807d06cc59701ff4ed2 Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Thu, 6 Jun 2019 09:49:11 -0500 Subject: [PATCH 07/17] remove unused translations --- x-pack/plugins/translations/translations/ja-JP.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 4deda4af3610f8..1bec425c3395cd 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -781,8 +781,6 @@ "core.euiCodeEditor.stopEditing": "完了したら Esc キーで編集を終了します。", "core.euiCodeEditor.stopInteracting": "完了したら Esc キーでコードの操作を終了します。", "core.euiCollapsedItemActions.allActions": "すべてのアクション", - "core.euiColorPicker.colorSelectionLabel": "選択された色は {colorValue} です", - "core.euiColorPicker.transparentColor": "透明", "core.euiComboBoxOptionsList.allOptionsSelected": "利用可能なオプションをすべて選択しました", "core.euiComboBoxOptionsList.alreadyAdded": "{label} は既に追加されています", "core.euiComboBoxOptionsList.createCustomOption": "{searchValue} をカスタムオプションとして追加するには、{key} を押してください。", From 910996d8e469ae45c39dc8f90816d4ccb12d3fe8 Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Thu, 6 Jun 2019 10:22:57 -0500 Subject: [PATCH 08/17] move valueOfSelected logic to private method --- .../privilege_space_form.tsx | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/x-pack/plugins/security/public/views/management/edit_role/components/privileges/kibana/space_aware_privilege_section/privilege_space_form.tsx b/x-pack/plugins/security/public/views/management/edit_role/components/privileges/kibana/space_aware_privilege_section/privilege_space_form.tsx index 657f507b5ad8b3..89ad1de9a816a5 100644 --- a/x-pack/plugins/security/public/views/management/edit_role/components/privileges/kibana/space_aware_privilege_section/privilege_space_form.tsx +++ b/x-pack/plugins/security/public/views/management/edit_role/components/privileges/kibana/space_aware_privilege_section/privilege_space_form.tsx @@ -260,14 +260,7 @@ export class PrivilegeSpaceForm extends Component { }, ]} hasDividers - valueOfSelected={ - this.getDisplayedBasePrivilege(allowedPrivileges, baseExplanation) - ? `basePrivilege_${this.getDisplayedBasePrivilege( - allowedPrivileges, - baseExplanation - )}` - : undefined - } + valueOfSelected={this.getDisplayedBasePrivilege(allowedPrivileges, baseExplanation)} disabled={!hasSelectedSpaces} /> @@ -489,6 +482,8 @@ export class PrivilegeSpaceForm extends Component { allowedPrivileges: AllowedPrivilege, explanation: PrivilegeExplanation ) => { + let displayedBasePrivilege = explanation.actualPrivilege; + if (this.canCustomizeFeaturePrivileges(explanation, allowedPrivileges)) { const form = this.state.role.kibana[this.state.editingIndex]; @@ -497,11 +492,11 @@ export class PrivilegeSpaceForm extends Component { explanation.actualPrivilege === NO_PRIVILEGE_VALUE || this.state.isCustomizingFeaturePrivileges ) { - return CUSTOM_PRIVILEGE_VALUE; + displayedBasePrivilege = CUSTOM_PRIVILEGE_VALUE; } } - return explanation.actualPrivilege; + return displayedBasePrivilege ? `basePrivilege_${displayedBasePrivilege}` : undefined; }; private canCustomizeFeaturePrivileges = ( From 51cff3ab50e5bf529128027fcc70e7e8f46c3615 Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Thu, 6 Jun 2019 10:30:57 -0500 Subject: [PATCH 09/17] update EuiColorPicker class name --- .../core_plugins/metrics/public/components/_color_picker.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/legacy/core_plugins/metrics/public/components/_color_picker.scss b/src/legacy/core_plugins/metrics/public/components/_color_picker.scss index be9c7505b629d6..e486f56fe0fe8a 100644 --- a/src/legacy/core_plugins/metrics/public/components/_color_picker.scss +++ b/src/legacy/core_plugins/metrics/public/components/_color_picker.scss @@ -12,7 +12,7 @@ .tvbColorPicker__swatch { // SASSTODO: Replace with EUI component // sass-lint:disable-block placeholder-in-extend - @extend .euiColorPicker__swatch; + @extend .euiColorPickerSwatch; } .tvbColorPicker__swatch-empty { From 6878c0005021bf63db1849c5d1abf72d4b1e03b2 Mon Sep 17 00:00:00 2001 From: Catherine Liu Date: Thu, 6 Jun 2019 13:17:51 -0700 Subject: [PATCH 10/17] Updated canvas storyshots --- .../__snapshots__/asset.examples.storyshot | 60 +++++++++++-------- .../element_card.examples.storyshot | 12 ++-- .../element_grid.examples.storyshot | 10 ++-- .../font_picker.examples.storyshot | 4 +- .../__snapshots__/tag.examples.storyshot | 4 +- .../__snapshots__/tag_list.examples.storyshot | 26 ++++---- 6 files changed, 62 insertions(+), 54 deletions(-) diff --git a/x-pack/plugins/canvas/public/components/asset_manager/__examples__/__snapshots__/asset.examples.storyshot b/x-pack/plugins/canvas/public/components/asset_manager/__examples__/__snapshots__/asset.examples.storyshot index 05473f55fabe11..894ee75ab03981 100644 --- a/x-pack/plugins/canvas/public/components/asset_manager/__examples__/__snapshots__/asset.examples.storyshot +++ b/x-pack/plugins/canvas/public/components/asset_manager/__examples__/__snapshots__/asset.examples.storyshot @@ -17,20 +17,24 @@ exports[`Storyshots components/Asset airplane 1`] = `
-
- Asset thumbnail -
+
+ Asset thumbnail +
+
-
- Asset thumbnail -
+
+ Asset thumbnail +
+
, , , , , , , , , , , Date: Mon, 10 Jun 2019 11:39:52 -0500 Subject: [PATCH 11/17] i18n fixes; maps color selection position --- src/core/public/i18n/i18n_service.tsx | 24 ++++++++----------- .../kbn_tp_embeddable_explorer/package.json | 2 +- .../vector/color/_static_color_selection.scss | 6 ++--- .../vector/color/static_color_selection.js | 9 ++++--- 4 files changed, 17 insertions(+), 24 deletions(-) diff --git a/src/core/public/i18n/i18n_service.tsx b/src/core/public/i18n/i18n_service.tsx index 5307f40804cea5..84c8ddfa85facb 100644 --- a/src/core/public/i18n/i18n_service.tsx +++ b/src/core/public/i18n/i18n_service.tsx @@ -102,14 +102,13 @@ export class I18nService { 'Message when the color picker popover is opened. Describes the interaction with the elements in the popover.', } ), - 'euiColorPicker.swatchAriaLabel': ({ swatch }: EuiValues) => ( - - ), + 'euiColorPicker.swatchAriaLabel': ({ swatch }: EuiValues) => + i18n.translate('core.euiColorPicker.swatchAriaLabel', { + defaultMessage: 'Select {swatch} as the color', + values: { swatch }, + description: + 'Screen reader text to describe the action and hex value of the selectable option', + }), 'euiComboBoxOptionsList.allOptionsSelected': i18n.translate( 'core.euiComboBoxOptionsList.allOptionsSelected', { @@ -213,12 +212,9 @@ export class I18nService { defaultMessage: 'You are in a popup. To exit this popup, hit Escape.', } ), - 'euiSaturation.roleDescription': () => ( - - ), + 'euiSaturation.roleDescription': i18n.translate('core.euiSaturation.roleDescription', { + defaultMessage: 'HSV color mode saturation and value selection', + }), 'euiSaturation.screenReaderAnnouncement': i18n.translate( 'core.euiSaturation.screenReaderAnnouncement', { diff --git a/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/package.json b/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/package.json index b6e239f143dc72..4063666a8b1b00 100644 --- a/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/package.json +++ b/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/package.json @@ -8,7 +8,7 @@ }, "license": "Apache-2.0", "dependencies": { - "@elastic/eui": "11.0.1", + "@elastic/eui": "11.3.1", "react": "^16.8.0" }, "scripts": { diff --git a/x-pack/plugins/maps/public/shared/layers/styles/components/vector/color/_static_color_selection.scss b/x-pack/plugins/maps/public/shared/layers/styles/components/vector/color/_static_color_selection.scss index 97019eb2699fe3..78ee6d15f60308 100644 --- a/x-pack/plugins/maps/public/shared/layers/styles/components/vector/color/_static_color_selection.scss +++ b/x-pack/plugins/maps/public/shared/layers/styles/components/vector/color/_static_color_selection.scss @@ -1,7 +1,5 @@ .mapColorPicker { - padding-top: 9px; - - .euiColorPickerPopUp { - z-index: $euiZLevel3; + .euiColorPicker__popoverPanel { + position: fixed; } } diff --git a/x-pack/plugins/maps/public/shared/layers/styles/components/vector/color/static_color_selection.js b/x-pack/plugins/maps/public/shared/layers/styles/components/vector/color/static_color_selection.js index 6e5fe90fda9e3a..e3bb03864d4b96 100644 --- a/x-pack/plugins/maps/public/shared/layers/styles/components/vector/color/static_color_selection.js +++ b/x-pack/plugins/maps/public/shared/layers/styles/components/vector/color/static_color_selection.js @@ -7,8 +7,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { - EuiColorPicker, - EuiFormControlLayout + EuiColorPicker } from '@elastic/eui'; import { staticColorShape } from '../style_option_shapes'; @@ -18,13 +17,13 @@ export function StaticColorSelection({ onChange, styleOptions }) { }; return ( - +
- +
); } From 035985821a7a4cc004e95d0b75c48fae46beafc4 Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Tue, 11 Jun 2019 17:02:56 -0500 Subject: [PATCH 12/17] update canvas storyshots --- .../__snapshots__/asset.examples.storyshot | 396 +---- .../asset_manager.examples.storyshot | 36 - .../color_dot.examples.storyshot | 224 --- .../color_manager.examples.storyshot | 611 -------- .../color_palette.examples.storyshot | 1057 ------------- .../color_picker.examples.storyshot | 992 ------------ .../color_picker_popover.examples.storyshot | 194 --- .../custom_element_modal.examples.storyshot | 1348 ----------------- .../element_card.examples.storyshot | 315 +--- .../element_controls.examples.storyshot | 75 - .../element_grid.examples.storyshot | 792 +--------- .../sidebar_header.examples.storyshot | 214 --- .../__snapshots__/tag.examples.storyshot | 114 +- .../__snapshots__/tag_list.examples.storyshot | 362 +---- 14 files changed, 16 insertions(+), 6714 deletions(-) diff --git a/x-pack/plugins/canvas/public/components/asset_manager/__examples__/__snapshots__/asset.examples.storyshot b/x-pack/plugins/canvas/public/components/asset_manager/__examples__/__snapshots__/asset.examples.storyshot index e93b70cae256c8..6cdca7109222bc 100644 --- a/x-pack/plugins/canvas/public/components/asset_manager/__examples__/__snapshots__/asset.examples.storyshot +++ b/x-pack/plugins/canvas/public/components/asset_manager/__examples__/__snapshots__/asset.examples.storyshot @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Storyshots components/Asset airplane 1`] = ` +exports[`Storyshots components/Assets/Asset airplane 1`] = `
`; -exports[`Storyshots components/Asset marker 1`] = ` +exports[`Storyshots components/Assets/Asset marker 1`] = `
`; - -exports[`Storyshots components/Assets/Asset airplane 1`] = ` -
-
-
-
-
- Asset thumbnail -
-
-
-
-

- - airplane - -
- - - ( - 1 - kb) - - -

-
-
-
-
- - - -
-
- -
- -
-
-
-
- -
- -
-
-
-
- - - -
-
-
-
-
-`; - -exports[`Storyshots components/Assets/Asset marker 1`] = ` -
-
-
-
-
- Asset thumbnail -
-
-
-
-

- - marker - -
- - - ( - 1 - kb) - - -

-
-
-
-
- - - -
-
- -
- -
-
-
-
- -
- -
-
-
-
- - - -
-
-
-
-
-`; diff --git a/x-pack/plugins/canvas/public/components/asset_manager/__examples__/__snapshots__/asset_manager.examples.storyshot b/x-pack/plugins/canvas/public/components/asset_manager/__examples__/__snapshots__/asset_manager.examples.storyshot index 310f5030a38b9d..9f91668e602a4b 100644 --- a/x-pack/plugins/canvas/public/components/asset_manager/__examples__/__snapshots__/asset_manager.examples.storyshot +++ b/x-pack/plugins/canvas/public/components/asset_manager/__examples__/__snapshots__/asset_manager.examples.storyshot @@ -1,41 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Storyshots components/AssetManager no assets 1`] = ` - -`; - -exports[`Storyshots components/AssetManager two assets 1`] = ` - -`; - exports[`Storyshots components/Assets/AssetManager no assets 1`] = ` - -
-
-

- -

-
-`; - -exports[`Storyshots components/ColorManager invalid colors 1`] = ` -Array [ -
-
-
-
-
-
-
-
-
-
- -
-
-
-
, -
-
-
-
-
-
-
-
-
-
- -
-
-
-
, -] -`; - -exports[`Storyshots components/ColorManager with buttons 1`] = ` -Array [ -
-
-
-
-
-
-
-
-
-
- -
-
-
-
- - -
-
, -
-
-
-
-
-
-
-
-
-
- -
-
-
-
- - -
-
, -
-
-
-
-
-
-
-
-
-
- -
-
-
-
- - -
-
, -] -`; diff --git a/x-pack/plugins/canvas/public/components/color_palette/__examples__/__snapshots__/color_palette.examples.storyshot b/x-pack/plugins/canvas/public/components/color_palette/__examples__/__snapshots__/color_palette.examples.storyshot index 9586ca60fb1d6a..05dd67960db055 100644 --- a/x-pack/plugins/canvas/public/components/color_palette/__examples__/__snapshots__/color_palette.examples.storyshot +++ b/x-pack/plugins/canvas/public/components/color_palette/__examples__/__snapshots__/color_palette.examples.storyshot @@ -1056,1060 +1056,3 @@ Array [
, ] `; - -exports[`Storyshots components/ColorPalette interactive 1`] = ` -
-
- - - - - - -
-
-`; - -exports[`Storyshots components/ColorPalette six colors 1`] = ` -Array [ -
-
- - - - - - -
-
, -
-
- - - - - - -
-
, -] -`; - -exports[`Storyshots components/ColorPalette six colors, value missing 1`] = ` -
-
- - - - - - -
-
-`; - -exports[`Storyshots components/ColorPalette six colors, wrap at 4 1`] = ` -
-
- - - - -
-
- - -
-
-`; - -exports[`Storyshots components/ColorPalette three colors 1`] = ` -Array [ -
-
- - - -
-
, -
-
- - - -
-
, -] -`; diff --git a/x-pack/plugins/canvas/public/components/color_picker/__examples__/__snapshots__/color_picker.examples.storyshot b/x-pack/plugins/canvas/public/components/color_picker/__examples__/__snapshots__/color_picker.examples.storyshot index 6e085bf2b858ed..1af31bdef47fe1 100644 --- a/x-pack/plugins/canvas/public/components/color_picker/__examples__/__snapshots__/color_picker.examples.storyshot +++ b/x-pack/plugins/canvas/public/components/color_picker/__examples__/__snapshots__/color_picker.examples.storyshot @@ -991,995 +991,3 @@ exports[`Storyshots components/Color/ColorPicker three colors 1`] = `
`; - -exports[`Storyshots components/ColorPicker interactive 1`] = ` -
-
-
-
- - - - - - -
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
- - -
-
-
-

- -

-
-`; - -exports[`Storyshots components/ColorPicker six colors 1`] = ` -
-
-
- - - - - - -
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
- - -
-
-
-`; - -exports[`Storyshots components/ColorPicker six colors, value missing 1`] = ` -
-
-
- - - - - - -
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
- - -
-
-
-`; - -exports[`Storyshots components/ColorPicker three colors 1`] = ` -
-
-
- - - -
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
- - -
-
-
-`; diff --git a/x-pack/plugins/canvas/public/components/color_picker_popover/__examples__/__snapshots__/color_picker_popover.examples.storyshot b/x-pack/plugins/canvas/public/components/color_picker_popover/__examples__/__snapshots__/color_picker_popover.examples.storyshot index c4d7f615579d58..e852b46a79bc2c 100644 --- a/x-pack/plugins/canvas/public/components/color_picker_popover/__examples__/__snapshots__/color_picker_popover.examples.storyshot +++ b/x-pack/plugins/canvas/public/components/color_picker_popover/__examples__/__snapshots__/color_picker_popover.examples.storyshot @@ -193,197 +193,3 @@ exports[`Storyshots components/Color/ColorPickerPopover three colors 1`] = `
`; - -exports[`Storyshots components/ColorPickerPopover interactive 1`] = ` -
-
-
- -
-
-

- -

-
-`; - -exports[`Storyshots components/ColorPickerPopover six colors 1`] = ` -
-
- -
-
-`; - -exports[`Storyshots components/ColorPickerPopover six colors, value missing 1`] = ` -
-
- -
-
-`; - -exports[`Storyshots components/ColorPickerPopover three colors 1`] = ` -
-
- -
-
-`; diff --git a/x-pack/plugins/canvas/public/components/custom_element_modal/__examples__/__snapshots__/custom_element_modal.examples.storyshot b/x-pack/plugins/canvas/public/components/custom_element_modal/__examples__/__snapshots__/custom_element_modal.examples.storyshot index 96a12e81ee43fc..69924bda523673 100644 --- a/x-pack/plugins/canvas/public/components/custom_element_modal/__examples__/__snapshots__/custom_element_modal.examples.storyshot +++ b/x-pack/plugins/canvas/public/components/custom_element_modal/__examples__/__snapshots__/custom_element_modal.examples.storyshot @@ -1,1353 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Storyshots components/CustomElementModal with description 1`] = ` -Array [ -
, -
, -
-
- -
-
-
-

- Edit custom element -

-
-
-
-
-
-
-
-
- -
-
-
- -
-
-
- 40 characters remaining -
-
-
-
- -
-