Upgrade EUI to v60.3.0 (#136405)

* Upgrade EUI to version 60.3.0

* Updated i18n translation mappings

* Updated snapshot for i18n test file

* Updated the regex pattern responsible for checking datagrid row and column names to match the updated pattern in the latest version of EUI

* update regex catpure group order

* update regex capture groups to ignore categorical info for text

Co-authored-by: Greg Thompson <thompson.glowe@gmail.com>
This commit is contained in:
Bree Hall 2022-07-21 08:28:37 -04:00 committed by GitHub
parent f7d9705115
commit 44f7338f76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 19 additions and 14 deletions

View file

@ -107,7 +107,7 @@
"@elastic/datemath": "5.0.3",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@8.3.0-canary.1",
"@elastic/ems-client": "8.3.3",
"@elastic/eui": "60.1.2",
"@elastic/eui": "60.3.0",
"@elastic/filesaver": "1.1.2",
"@elastic/node-crypto": "1.2.1",
"@elastic/numeral": "^2.5.1",

View file

@ -87,6 +87,7 @@ exports[`#start() returns \`Context\` component 1`] = `
"euiDataGrid.screenReaderNotice": "Cell contains interactive content.",
"euiDataGridCell.position": [Function],
"euiDataGridCellActions.expandButtonTitle": "Click or hit enter to interact with cell content",
"euiDataGridHeaderCell.actionsPopoverScreenReaderText": "To navigate through the list of column actions, press the Tab or Up and Down arrow keys.",
"euiDataGridHeaderCell.headerActions": "Header actions",
"euiDataGridPagination.detailedPaginationLabel": [Function],
"euiDataGridPagination.paginationLabel": "Pagination for preceding grid",

View file

@ -401,10 +401,10 @@ export const getEuiContextMapping = (): EuiTokensObject => {
values: { page, pageCount },
description: 'Screen reader text to describe the size of the data grid',
}),
'euiDataGridCell.position': ({ row, col }: EuiValues) =>
'euiDataGridCell.position': ({ columnId, row, col }: EuiValues) =>
i18n.translate('core.euiDataGridCell.position', {
defaultMessage: 'Row: {row}; Column: {col}',
values: { row, col },
defaultMessage: '{columnId}, column {col}, row {row}',
values: { columnId, row, col },
}),
'euiDataGridCellActions.expandButtonTitle': i18n.translate(
'core.euiDataGridCellActions.expandButtonTitle',
@ -418,6 +418,13 @@ export const getEuiContextMapping = (): EuiTokensObject => {
defaultMessage: 'Header actions',
}
),
'euiDataGridHeaderCell.actionsPopoverScreenReaderText': i18n.translate(
'core.euiDataGridHeaderCell.actionsPopoverScreenReaderText',
{
defaultMessage:
'To navigate through the list of column actions, press the Tab or Up and Down arrow keys.',
}
),
'euiDataGridPagination.detailedPaginationLabel': ({ label }: EuiValues) =>
i18n.translate('core.euiDataGridPagination.detailedPaginationLabel', {
defaultMessage: 'Pagination for preceding grid: {label}',

View file

@ -83,6 +83,6 @@ export const LICENSE_OVERRIDES = {
'jsts@1.6.2': ['Eclipse Distribution License - v 1.0'], // cf. https://github.com/bjornharrtell/jsts
'@mapbox/jsonlint-lines-primitives@2.0.2': ['MIT'], // license in readme https://github.com/tmcw/jsonlint
'@elastic/ems-client@8.3.3': ['Elastic License 2.0'],
'@elastic/eui@60.1.2': ['SSPL-1.0 OR Elastic License 2.0'],
'@elastic/eui@60.3.0': ['SSPL-1.0 OR Elastic License 2.0'],
'language-subtag-registry@0.3.21': ['CC-BY-4.0'], // retired ODCBy license https://github.com/mattcg/language-subtag-registry
};

View file

@ -1463,7 +1463,6 @@
"core.euiDataGrid.ariaLabel": "{label} ; page {page} sur {pageCount}.",
"core.euiDataGrid.ariaLabelledBy": "Page {page} sur {pageCount}.",
"core.euiDataGrid.screenReaderNotice": "Cette cellule contient du contenu interactif.",
"core.euiDataGridCell.position": "Ligne : {row} ; colonne : {col}",
"core.euiDataGridCellActions.expandButtonTitle": "Cliquez ou appuyez sur Entrée pour interagir avec le contenu de la cellule.",
"core.euiDataGridHeaderCell.headerActions": "Actions d'en-tête",
"core.euiDataGridPagination.detailedPaginationLabel": "Pagination pour la grille précédente : {label}",

View file

@ -1465,7 +1465,6 @@
"core.euiDataGrid.ariaLabel": "{label}; {page}/{pageCount}ページ。",
"core.euiDataGrid.ariaLabelledBy": "{page}/{pageCount}ページ。",
"core.euiDataGrid.screenReaderNotice": "セルにはインタラクティブコンテンツが含まれます。",
"core.euiDataGridCell.position": "行:{row}、列:{col}",
"core.euiDataGridCellActions.expandButtonTitle": "クリックするか enter を押すと、セルのコンテンツとインタラクトできます。",
"core.euiDataGridHeaderCell.headerActions": "ヘッダーアクション",
"core.euiDataGridPagination.detailedPaginationLabel": "前のグリッドのページネーション:{label}",

View file

@ -1465,7 +1465,6 @@
"core.euiDataGrid.ariaLabel": "{label};第 {page} 页,共 {pageCount} 页。",
"core.euiDataGrid.ariaLabelledBy": "第 {page} 页,共 {pageCount} 页。",
"core.euiDataGrid.screenReaderNotice": "单元格包含交互内容。",
"core.euiDataGridCell.position": "行:{row};列:{col}",
"core.euiDataGridCellActions.expandButtonTitle": "单击或按 Enter 键以便与单元格内容进行交互",
"core.euiDataGridHeaderCell.headerActions": "标题操作",
"core.euiDataGridPagination.detailedPaginationLabel": "前面网格的分页:{label}",

View file

@ -43,10 +43,10 @@ export function MachineLearningCommonDataGridProvider({ getService }: FtrProvide
.toArray()
.map((cell) => {
const cellText = $(cell).text();
const pattern = /^(.*)Row: (\d+); Column: (\d+)$/;
const pattern = /^(.*)-(?:.*), column (\d+), row (\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]) };
return { text: matches![1], column: Number(matches![2]), row: Number(matches![3]) };
})
.filter((cell) =>
maxColumnsToParse !== undefined ? cell?.column <= maxColumnsToParse : false

View file

@ -1518,10 +1518,10 @@
resolved "https://registry.yarnpkg.com/@elastic/eslint-plugin-eui/-/eslint-plugin-eui-0.0.2.tgz#56b9ef03984a05cc213772ae3713ea8ef47b0314"
integrity sha512-IoxURM5zraoQ7C8f+mJb9HYSENiZGgRVcG4tLQxE61yHNNRDXtGDWTZh8N1KIHcsqN1CEPETjuzBXkJYF/fDiQ==
"@elastic/eui@60.1.2":
version "60.1.2"
resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-60.1.2.tgz#9a07aab77743866f6df40468a2acf4f39ea38152"
integrity sha512-99RZpuFLbButUUS3JTGyHSsiSkkm4bdraDV0K4hDrbQJ7Wss0l9aUdx2FhUgI4pNQ1v41EHRQYykP37J9nolxg==
"@elastic/eui@60.3.0":
version "60.3.0"
resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-60.3.0.tgz#4f37da941c70ede09801cd855e157aeb8a1d60bd"
integrity sha512-0cZUwhZzJ+NRkQv8Clw239GIQYs5/r//P4ocOK48cgGXAs4ZzS+EQq8Csc/ZY0FNsIyRHo9zlnIfmhS2Ck+/5w==
dependencies:
"@types/chroma-js" "^2.0.0"
"@types/lodash" "^4.14.160"