From 7213048bb9d5e10337cc5fccfe83799a3885d421 Mon Sep 17 00:00:00 2001 From: Cee Chen Date: Fri, 12 Apr 2024 13:05:55 -0700 Subject: [PATCH] Update EUI to grab backport with latest table fixes + more i18n updates from a11y improvements --- package.json | 2 +- .../src/__snapshots__/i18n_service.test.tsx.snap | 2 +- .../src/i18n_eui_mapping.tsx | 10 ++++++---- src/dev/license_checker/config.ts | 2 +- x-pack/plugins/translations/translations/fr-FR.json | 1 - x-pack/plugins/translations/translations/ja-JP.json | 1 - x-pack/plugins/translations/translations/zh-CN.json | 1 - yarn.lock | 8 ++++---- 8 files changed, 13 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index 346bd231bc1f2..13fbbfe8eedda 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "@elastic/ecs": "^8.11.1", "@elastic/elasticsearch": "^8.13.0", "@elastic/ems-client": "8.5.1", - "@elastic/eui": "94.1.0", + "@elastic/eui": "94.1.0-backport.0", "@elastic/filesaver": "1.1.2", "@elastic/node-crypto": "1.2.1", "@elastic/numeral": "^2.5.1", diff --git a/packages/core/i18n/core-i18n-browser-internal/src/__snapshots__/i18n_service.test.tsx.snap b/packages/core/i18n/core-i18n-browser-internal/src/__snapshots__/i18n_service.test.tsx.snap index 44170ebcfb06e..d9fc8ecec8050 100644 --- a/packages/core/i18n/core-i18n-browser-internal/src/__snapshots__/i18n_service.test.tsx.snap +++ b/packages/core/i18n/core-i18n-browser-internal/src/__snapshots__/i18n_service.test.tsx.snap @@ -14,7 +14,7 @@ exports[`#start() returns \`Context\` component 1`] = ` "euiAutoRefresh.buttonLabelOn": [Function], "euiBasicTable.noItemsMessage": "No items found", "euiBasicTable.selectAllRows": "Select all rows", - "euiBasicTable.selectThisRow": "Select this row", + "euiBasicTable.selectThisRow": [Function], "euiBasicTable.tableAutoCaptionWithPagination": [Function], "euiBasicTable.tableAutoCaptionWithoutPagination": [Function], "euiBasicTable.tableCaptionWithPagination": [Function], diff --git a/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx b/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx index e4f769c8779c7..3ea767bc5b6bc 100644 --- a/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx +++ b/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx @@ -38,10 +38,12 @@ export const getEuiContextMapping = (): EuiTokensObject => { defaultMessage: 'Select all rows', description: 'ARIA and displayed label on a checkbox to select all table rows', }), - 'euiBasicTable.selectThisRow': i18n.translate('core.euiBasicTable.selectThisRow', { - defaultMessage: 'Select this row', - description: 'ARIA and displayed label on a checkbox to select a single table row', - }), + 'euiBasicTable.selectThisRow': ({ index }: EuiValues) => + i18n.translate('core.euiBasicTable.selectThisRow', { + defaultMessage: 'Select row {index}', + values: { index }, + description: 'ARIA and displayed label on a checkbox to select a single table row', + }), 'euiBasicTable.tableCaptionWithPagination': ({ tableCaption, page, pageCount }: EuiValues) => i18n.translate('core.euiBasicTable.tableCaptionWithPagination', { defaultMessage: '{tableCaption}; Page {page} of {pageCount}.', diff --git a/src/dev/license_checker/config.ts b/src/dev/license_checker/config.ts index a0c6e784aa61c..c708ab543476d 100644 --- a/src/dev/license_checker/config.ts +++ b/src/dev/license_checker/config.ts @@ -86,7 +86,7 @@ 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.5.1': ['Elastic License 2.0'], - '@elastic/eui@94.1.0': ['SSPL-1.0 OR Elastic License 2.0'], + '@elastic/eui@94.1.0-backport.0': ['SSPL-1.0 OR Elastic License 2.0'], 'language-subtag-registry@0.3.21': ['CC-BY-4.0'], // retired ODC‑By license https://github.com/mattcg/language-subtag-registry 'buffers@0.1.1': ['MIT'], // license in importing module https://www.npmjs.com/package/binary '@bufbuild/protobuf@1.2.1': ['Apache-2.0'], // license (Apache-2.0 AND BSD-3-Clause) diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index c4e6e574983ec..d4a03e72d5d6b 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -692,7 +692,6 @@ "core.euiAutoRefresh.buttonLabelOff": "L'actualisation automatique est désactivée", "core.euiBasicTable.noItemsMessage": "Aucun élément n'a été trouvé", "core.euiBasicTable.selectAllRows": "Sélectionner toutes les lignes", - "core.euiBasicTable.selectThisRow": "Sélectionner cette ligne", "core.euiBottomBar.screenReaderAnnouncement": "Il y a un nouveau repère de région avec des commandes de niveau de page à la fin du document.", "core.euiBottomBar.screenReaderHeading": "Commandes de niveau de page", "core.euiBreadcrumb.collapsedBadge.ariaLabel": "Voir le fil d’Ariane réduit", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index c0315dade2da4..509fd6b9b3775 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -692,7 +692,6 @@ "core.euiAutoRefresh.buttonLabelOff": "自動更新はオフです", "core.euiBasicTable.noItemsMessage": "項目が見つかりません", "core.euiBasicTable.selectAllRows": "すべての行を選択", - "core.euiBasicTable.selectThisRow": "この行を選択", "core.euiBottomBar.screenReaderAnnouncement": "ドキュメントの最後には、新しいリージョンランドマークとページレベルのコントロールがあります。", "core.euiBottomBar.screenReaderHeading": "ページレベルのコントロール", "core.euiBreadcrumb.collapsedBadge.ariaLabel": "折りたたまれたブレッドクラムを表示", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index b63dca733bba9..7b2391408aaa6 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -694,7 +694,6 @@ "core.euiAutoRefresh.buttonLabelOff": "自动刷新已关闭", "core.euiBasicTable.noItemsMessage": "找不到项目", "core.euiBasicTable.selectAllRows": "选择所有行", - "core.euiBasicTable.selectThisRow": "选择此行", "core.euiBottomBar.screenReaderAnnouncement": "有页面级别控件位于文档结尾的新地区地标。", "core.euiBottomBar.screenReaderHeading": "页面级别控件", "core.euiBreadcrumb.collapsedBadge.ariaLabel": "查看折叠的痕迹导航", diff --git a/yarn.lock b/yarn.lock index eb7a42a0f0f8f..736c44d9474d0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1752,10 +1752,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@94.1.0": - version "94.1.0" - resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-94.1.0.tgz#39fea7dc983206ccc9917fc912631b8947ca68ca" - integrity sha512-93OujrKqgK5UvzRjy/+7cVx6s4Xq8SjDqCsqZvct4aQAkVLrFZhO8tVoYJrTds5bvz6Pb2LCe2HR90U1LlHHGw== +"@elastic/eui@94.1.0-backport.0": + version "94.1.0-backport.0" + resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-94.1.0-backport.0.tgz#93ad707b12785a7e0198af333cdee8d1acdcf35e" + integrity sha512-WFUpYBUgbJfcJInjhyQpOYGFs7JGpBMwpgmbRbKmyf3bJb0yqZeaiL5Qwyk6hOl8j1CSRvcaWOT/P33JxdrV3w== dependencies: "@hello-pangea/dnd" "^16.3.0" "@types/lodash" "^4.14.202"