Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade EUI to v37.3.0 #109157

Merged
merged 12 commits into from
Aug 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"@elastic/datemath": "link:bazel-bin/packages/elastic-datemath",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@^8.0.0-canary.18",
"@elastic/ems-client": "7.15.0",
"@elastic/eui": "37.1.1",
"@elastic/eui": "37.3.0",
"@elastic/filesaver": "1.1.2",
"@elastic/good": "^9.0.1-kibana3",
"@elastic/maki": "6.3.0",
Expand Down
17 changes: 8 additions & 9 deletions src/core/public/i18n/__snapshots__/i18n_service.test.tsx.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

89 changes: 43 additions & 46 deletions src/core/public/i18n/i18n_eui_mapping.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,11 @@ export const getEuiContextMapping = (): EuiTokensObject => {
'euiColumnSorting.buttonActive': i18n.translate('core.euiColumnSorting.buttonActive', {
defaultMessage: 'fields sorted',
}),
'euiColumnSortingDraggable.activeSortLabel': i18n.translate(
'core.euiColumnSortingDraggable.activeSortLabel',
{
defaultMessage: 'is sorting this data grid',
}
),
'euiColumnSortingDraggable.activeSortLabel': ({ display }: EuiValues) =>
i18n.translate('core.euiColumnSortingDraggable.activeSortLabel', {
defaultMessage: '{display} is sorting this data grid',
values: { display },
}),
'euiColumnSortingDraggable.defaultSortAsc': i18n.translate(
'core.euiColumnSortingDraggable.defaultSortAsc',
{
Expand All @@ -295,18 +294,16 @@ export const getEuiContextMapping = (): EuiTokensObject => {
description: 'Descending sort label',
}
),
'euiColumnSortingDraggable.removeSortLabel': i18n.translate(
'core.euiColumnSortingDraggable.removeSortLabel',
{
defaultMessage: 'Remove from data grid sort:',
}
),
'euiColumnSortingDraggable.toggleLegend': i18n.translate(
'core.euiColumnSortingDraggable.toggleLegend',
{
defaultMessage: 'Select sorting method for field:',
}
),
'euiColumnSortingDraggable.removeSortLabel': ({ display }: EuiValues) =>
i18n.translate('core.euiColumnSortingDraggable.removeSortLabel', {
defaultMessage: 'Remove {display} from data grid sort',
values: { display },
}),
'euiColumnSortingDraggable.toggleLegend': ({ display }: EuiValues) =>
i18n.translate('core.euiColumnSortingDraggable.toggleLegend', {
defaultMessage: 'Select sorting method for {display}',
values: { display },
}),
'euiComboBoxOptionsList.allOptionsSelected': i18n.translate(
'core.euiComboBoxOptionsList.allOptionsSelected',
{
Expand Down Expand Up @@ -381,19 +378,6 @@ export const getEuiContextMapping = (): EuiTokensObject => {
'euiDataGrid.screenReaderNotice': i18n.translate('core.euiDataGrid.screenReaderNotice', {
defaultMessage: 'Cell contains interactive content.',
}),
'euiDataGrid.ariaLabelGridPagination': ({ label }: EuiValues) =>
i18n.translate('core.euiDataGrid.ariaLabelGridPagination', {
defaultMessage: 'Pagination for preceding grid: {label}',
values: { label },
description: 'Screen reader text to describe the pagination controls',
}),
'euiDataGrid.ariaLabelledByGridPagination': i18n.translate(
'core.euiDataGrid.ariaLabelledByGridPagination',
{
defaultMessage: 'Pagination for preceding grid',
description: 'Screen reader text to describe the pagination controls',
}
),
'euiDataGrid.ariaLabel': ({ label, page, pageCount }: EuiValues) =>
i18n.translate('core.euiDataGrid.ariaLabel', {
defaultMessage: '{label}; Page {page} of {pageCount}.',
Expand All @@ -406,21 +390,11 @@ export const getEuiContextMapping = (): EuiTokensObject => {
values: { page, pageCount },
description: 'Screen reader text to describe the size of the data grid',
}),
'euiDataGrid.fullScreenButton': i18n.translate('core.euiDataGrid.fullScreenButton', {
defaultMessage: 'Full screen',
}),
'euiDataGrid.fullScreenButtonActive': i18n.translate(
'core.euiDataGrid.fullScreenButtonActive',
{
defaultMessage: 'Exit full screen',
}
),
'euiDataGridCell.row': i18n.translate('core.euiDataGridCell.row', {
defaultMessage: 'Row',
}),
'euiDataGridCell.column': i18n.translate('core.euiDataGridCell.column', {
defaultMessage: 'Column',
}),
'euiDataGridCell.position': ({ row, col }: EuiValues) =>
i18n.translate('core.euiDataGridCell.position', {
defaultMessage: 'Row: {row}; Column: {col}',
values: { row, col },
}),
'euiDataGridCellButtons.expandButtonTitle': i18n.translate(
'core.euiDataGridCellButtons.expandButtonTitle',
{
Expand All @@ -433,6 +407,17 @@ export const getEuiContextMapping = (): EuiTokensObject => {
defaultMessage: 'Header actions',
}
),
'euiDataGridPagination.detailedPaginationLabel': ({ label }: EuiValues) =>
i18n.translate('core.euiDataGridPagination.detailedPaginationLabel', {
defaultMessage: 'Pagination for preceding grid: {label}',
values: { label },
}),
'euiDataGridPagination.paginationLabel': i18n.translate(
'core.euiDataGridPagination.paginationLabel',
{
defaultMessage: 'Pagination for preceding grid',
}
),
'euiDataGridSchema.booleanSortTextAsc': i18n.translate(
'core.euiDataGridSchema.booleanSortTextAsc',
{
Expand Down Expand Up @@ -497,6 +482,18 @@ export const getEuiContextMapping = (): EuiTokensObject => {
description: 'Descending size label',
}
),
'euiDataGridToolbar.fullScreenButton': i18n.translate(
'core.euiDataGridToolbar.fullScreenButton',
{
defaultMessage: 'Full screen',
}
),
'euiDataGridToolbar.fullScreenButtonActive': i18n.translate(
'core.euiDataGridToolbar.fullScreenButtonActive',
{
defaultMessage: 'Exit full screen',
}
),
'euiDatePopoverButton.invalidTitle': ({ title }: EuiValues) =>
i18n.translate('core.euiDatePopoverButton.invalidTitle', {
defaultMessage: 'Invalid date: {title}',
Expand Down
2 changes: 1 addition & 1 deletion src/dev/license_checker/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const LICENSE_OVERRIDES = {
'@mapbox/[email protected]': ['MIT'], // license in readme https://github.com/tmcw/jsonlint
'[email protected]': ['(GPL-2.0 OR MIT)'], // GPL-2.0* https://github.com/taozhi8833998/node-sql-parser
'@elastic/[email protected]': ['Elastic License 2.0'],
'@elastic/eui@37.1.1': ['SSPL-1.0 OR Elastic License 2.0'],
'@elastic/eui@37.3.0': ['SSPL-1.0 OR Elastic License 2.0'],

// TODO can be removed if the https://github.com/jindw/xmldom/issues/239 is released
'[email protected]': ['MIT'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,7 @@ describe('Discover flyout', function () {
expect(props.setExpandedDoc.mock.calls[0][0]._id).toBe('4');
});

// EuiFlyout is mocked in Jest environments.
// EUI team to reinstate `onKeyDown`: https://github.com/elastic/eui/issues/4883
it.skip('allows navigating with arrow keys through documents', () => {
it('allows navigating with arrow keys through documents', () => {
const props = getProps();
const component = mountWithIntl(<DiscoverGridFlyout {...props} />);
findTestSubject(component, 'docTableDetailsFlyout').simulate('keydown', { key: 'ArrowRight' });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ describe('isCloudEnabled is false', () => {
);
await loadTutorialPromise;
component.update();
component.find('#onPremElasticCloud').first().simulate('click');
component.find('#onPremElasticCloud').first().find('input').simulate('change');
component.update();
expect(component.state('visibleInstructions')).toBe('onPremElasticCloud');
});
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,21 @@ const toggleDeletePhase = async (testBed: TestBed) => {
const { find, component } = testBed;

let button = find('disableDeletePhaseButton');
let action = 'disable';
if (!button.length) {
button = find('enableDeletePhaseButton');
action = 'enable';
}
if (!button.length) {
throw new Error(`Button to enable/disable delete phase was not found.`);
}

await act(async () => {
button.simulate('click');
if (action === 'disable') {
button.simulate('click');
} else {
button.find('input').simulate('change');
}
});
component.update();
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

import { render } from '@testing-library/react';
import { Simulate } from 'react-dom/test-utils';
import React from 'react';
import type { AlertWorkflowStatus } from '../../../common/typings';
import { WorkflowStatusFilter } from './workflow_status_filter';
Expand All @@ -28,8 +29,9 @@ describe('StatusFilter', () => {

const { getByTestId } = render(<WorkflowStatusFilter {...props} />);
const button = getByTestId(`WorkflowStatusFilter ${status} button`);
const input = button.querySelector('input') as Element;

button.click();
Simulate.change(input);

expect(onChange).toHaveBeenCalledWith(status);
});
Expand Down
9 changes: 0 additions & 9 deletions x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,8 @@
"core.euiColumnSorting.emptySorting": "現在並び替えられているフィールドはありません",
"core.euiColumnSorting.pickFields": "並び替え基準でフィールドの選択",
"core.euiColumnSorting.sortFieldAriaLabel": "並べ替え基準:",
"core.euiColumnSortingDraggable.activeSortLabel": "このデータグリッドを並び替え中",
"core.euiColumnSortingDraggable.defaultSortAsc": "A-Z",
"core.euiColumnSortingDraggable.defaultSortDesc": "Z-A",
"core.euiColumnSortingDraggable.removeSortLabel": "データグリッドの並び替えから削除:",
"core.euiColumnSortingDraggable.toggleLegend": "フィールドの並び替え方法を選択:",
"core.euiComboBoxOptionsList.allOptionsSelected": "利用可能なオプションをすべて選択しました",
"core.euiComboBoxOptionsList.alreadyAdded": "{label} はすでに追加されています",
"core.euiComboBoxOptionsList.createCustomOption": "{searchValue}をカスタムオプションとして追加",
Expand All @@ -311,14 +308,8 @@
"core.euiComboBoxPill.removeSelection": "グループの選択項目から {children} を削除してください",
"core.euiCommonlyUsedTimeRanges.legend": "頻繁に使用",
"core.euiDataGrid.ariaLabel": "{label}; {page}/{pageCount}ページ。",
"core.euiDataGrid.ariaLabelGridPagination": "前のグリッドのページネーション:{label}",
"core.euiDataGrid.ariaLabelledBy": "{page}/{pageCount}ページ。",
"core.euiDataGrid.ariaLabelledByGridPagination": "前のグリッドのページネーション",
"core.euiDataGrid.fullScreenButton": "全画面",
"core.euiDataGrid.fullScreenButtonActive": "全画面を終了",
"core.euiDataGrid.screenReaderNotice": "セルにはインタラクティブコンテンツが含まれます。",
"core.euiDataGridCell.column": "列",
"core.euiDataGridCell.row": "行",
"core.euiDataGridCellButtons.expandButtonTitle": "クリックするか enter を押すと、セルのコンテンツとインタラクトできます。",
"core.euiDataGridHeaderCell.headerActions": "ヘッダーアクション",
"core.euiDataGridSchema.booleanSortTextAsc": "False-True",
Expand Down
9 changes: 0 additions & 9 deletions x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,8 @@
"core.euiColumnSorting.emptySorting": "当前未排序任何字段",
"core.euiColumnSorting.pickFields": "选取排序依据的字段",
"core.euiColumnSorting.sortFieldAriaLabel": "排序依据:",
"core.euiColumnSortingDraggable.activeSortLabel": "正在排序此数据网格",
"core.euiColumnSortingDraggable.defaultSortAsc": "A-Z",
"core.euiColumnSortingDraggable.defaultSortDesc": "Z-A",
"core.euiColumnSortingDraggable.removeSortLabel": "从数据网格排序中移除:",
"core.euiColumnSortingDraggable.toggleLegend": "为字段选择排序方法:",
"core.euiComboBoxOptionsList.allOptionsSelected": "您已选择所有可用选项",
"core.euiComboBoxOptionsList.alreadyAdded": "{label} 已添加",
"core.euiComboBoxOptionsList.createCustomOption": "将 {searchValue} 添加为自定义选项",
Expand All @@ -314,14 +311,8 @@
"core.euiComboBoxPill.removeSelection": "将 {children} 从此组中的选择移除",
"core.euiCommonlyUsedTimeRanges.legend": "常用",
"core.euiDataGrid.ariaLabel": "{label};第 {page} 页,共 {pageCount} 页。",
"core.euiDataGrid.ariaLabelGridPagination": "前面网格的分页:{label}",
"core.euiDataGrid.ariaLabelledBy": "第 {page} 页,共 {pageCount} 页。",
"core.euiDataGrid.ariaLabelledByGridPagination": "前面网格的分页",
"core.euiDataGrid.fullScreenButton": "全屏",
"core.euiDataGrid.fullScreenButtonActive": "退出全屏",
"core.euiDataGrid.screenReaderNotice": "单元格包含交互内容。",
"core.euiDataGridCell.column": "列",
"core.euiDataGridCell.row": "行",
"core.euiDataGridCellButtons.expandButtonTitle": "单击或按 Enter 键以便与单元格内容进行交互",
"core.euiDataGridHeaderCell.headerActions": "标题操作",
"core.euiDataGridSchema.booleanSortTextAsc": "False-True",
Expand Down
2 changes: 1 addition & 1 deletion x-pack/test/functional/services/transform/wizard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export function TransformWizardProvider({ getService, getPageObjects }: FtrProvi
.toArray()
.map((cell) => {
const cellText = $(cell).text();
const pattern = /^(.*)Row: (\d+), Column: (\d+):$/;
const pattern = /^(.*)Row: (\d+); Column: (\d+)$/;
const matches = cellText.match(pattern);
expect(matches).to.not.eql(null, `Cell text should match pattern '${pattern}'`);
return { text: matches![1], row: Number(matches![2]), column: Number(matches![3]) };
Expand Down
Loading