@cloudscape-design/components 3.0.297 → 3.0.298
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/alert/interfaces.d.ts +1 -0
- package/alert/interfaces.d.ts.map +1 -1
- package/alert/interfaces.js.map +1 -1
- package/annotation-context/annotation/styles.css.js +24 -24
- package/annotation-context/annotation/styles.scoped.css +30 -30
- package/annotation-context/annotation/styles.selectors.js +24 -24
- package/app-layout/interfaces.d.ts +1 -0
- package/app-layout/interfaces.d.ts.map +1 -1
- package/app-layout/interfaces.js.map +1 -1
- package/app-layout/notifications/styles.css.js +3 -3
- package/app-layout/notifications/styles.scoped.css +7 -7
- package/app-layout/notifications/styles.selectors.js +3 -3
- package/app-layout/visual-refresh/background.d.ts +1 -5
- package/app-layout/visual-refresh/background.d.ts.map +1 -1
- package/app-layout/visual-refresh/background.js +8 -13
- package/app-layout/visual-refresh/background.js.map +1 -1
- package/app-layout/visual-refresh/breadcrumbs.d.ts +3 -0
- package/app-layout/visual-refresh/breadcrumbs.d.ts.map +1 -0
- package/app-layout/visual-refresh/breadcrumbs.js +17 -0
- package/app-layout/visual-refresh/breadcrumbs.js.map +1 -0
- package/app-layout/visual-refresh/context.js +3 -3
- package/app-layout/visual-refresh/context.js.map +1 -1
- package/app-layout/visual-refresh/header.d.ts +0 -4
- package/app-layout/visual-refresh/header.d.ts.map +1 -1
- package/app-layout/visual-refresh/header.js +0 -4
- package/app-layout/visual-refresh/header.js.map +1 -1
- package/app-layout/visual-refresh/index.d.ts +0 -8
- package/app-layout/visual-refresh/index.d.ts.map +1 -1
- package/app-layout/visual-refresh/index.js +4 -13
- package/app-layout/visual-refresh/index.js.map +1 -1
- package/app-layout/visual-refresh/layout.d.ts.map +1 -1
- package/app-layout/visual-refresh/layout.js +31 -19
- package/app-layout/visual-refresh/layout.js.map +1 -1
- package/app-layout/visual-refresh/main.d.ts.map +1 -1
- package/app-layout/visual-refresh/main.js +2 -6
- package/app-layout/visual-refresh/main.js.map +1 -1
- package/app-layout/visual-refresh/mobile-toolbar.d.ts +3 -0
- package/app-layout/visual-refresh/mobile-toolbar.d.ts.map +1 -0
- package/app-layout/visual-refresh/{app-bar.js → mobile-toolbar.js} +9 -18
- package/app-layout/visual-refresh/mobile-toolbar.js.map +1 -0
- package/app-layout/visual-refresh/navigation.js +1 -1
- package/app-layout/visual-refresh/navigation.js.map +1 -1
- package/app-layout/visual-refresh/notifications.d.ts +0 -4
- package/app-layout/visual-refresh/notifications.d.ts.map +1 -1
- package/app-layout/visual-refresh/notifications.js +4 -9
- package/app-layout/visual-refresh/notifications.js.map +1 -1
- package/app-layout/visual-refresh/split-panel.js +1 -1
- package/app-layout/visual-refresh/split-panel.js.map +1 -1
- package/app-layout/visual-refresh/styles.css.js +68 -72
- package/app-layout/visual-refresh/styles.scoped.css +400 -576
- package/app-layout/visual-refresh/styles.selectors.js +68 -72
- package/attribute-editor/interfaces.d.ts +2 -1
- package/attribute-editor/interfaces.d.ts.map +1 -1
- package/attribute-editor/interfaces.js.map +1 -1
- package/attribute-editor/row.d.ts +1 -1
- package/attribute-editor/row.d.ts.map +1 -1
- package/attribute-editor/row.js +3 -1
- package/attribute-editor/row.js.map +1 -1
- package/autosuggest/autosuggest-option.d.ts +1 -1
- package/autosuggest/autosuggest-option.d.ts.map +1 -1
- package/autosuggest/autosuggest-option.js +3 -1
- package/autosuggest/autosuggest-option.js.map +1 -1
- package/autosuggest/interfaces.d.ts +3 -1
- package/autosuggest/interfaces.d.ts.map +1 -1
- package/autosuggest/interfaces.js.map +1 -1
- package/autosuggest/internal.d.ts.map +1 -1
- package/autosuggest/internal.js +4 -0
- package/autosuggest/internal.js.map +1 -1
- package/autosuggest/plain-list.d.ts +1 -1
- package/autosuggest/plain-list.d.ts.map +1 -1
- package/autosuggest/plain-list.js.map +1 -1
- package/breadcrumb-group/interfaces.d.ts +1 -0
- package/breadcrumb-group/interfaces.d.ts.map +1 -1
- package/breadcrumb-group/interfaces.js.map +1 -1
- package/calendar/interfaces.d.ts +3 -0
- package/calendar/interfaces.d.ts.map +1 -1
- package/calendar/interfaces.js.map +1 -1
- package/cards/interfaces.d.ts +1 -0
- package/cards/interfaces.d.ts.map +1 -1
- package/cards/interfaces.js.map +1 -1
- package/cards/styles.css.js +37 -37
- package/cards/styles.scoped.css +53 -53
- package/cards/styles.selectors.js +37 -37
- package/code-editor/interfaces.d.ts +1 -0
- package/code-editor/interfaces.d.ts.map +1 -1
- package/code-editor/interfaces.js.map +1 -1
- package/collection-preferences/content-display/index.d.ts.map +1 -1
- package/collection-preferences/content-display/index.js +14 -9
- package/collection-preferences/content-display/index.js.map +1 -1
- package/collection-preferences/index.d.ts.map +1 -1
- package/collection-preferences/index.js +6 -4
- package/collection-preferences/index.js.map +1 -1
- package/collection-preferences/interfaces.d.ts +21 -12
- package/collection-preferences/interfaces.d.ts.map +1 -1
- package/collection-preferences/interfaces.js.map +1 -1
- package/collection-preferences/utils.d.ts +1 -1
- package/collection-preferences/utils.d.ts.map +1 -1
- package/collection-preferences/utils.js +19 -6
- package/collection-preferences/utils.js.map +1 -1
- package/content-layout/internal.d.ts.map +1 -1
- package/content-layout/internal.js +1 -3
- package/content-layout/internal.js.map +1 -1
- package/content-layout/styles.css.js +6 -7
- package/content-layout/styles.scoped.css +9 -19
- package/content-layout/styles.selectors.js +6 -7
- package/date-range-picker/calendar/grids/grid.d.ts +1 -1
- package/date-range-picker/calendar/grids/grid.d.ts.map +1 -1
- package/date-range-picker/calendar/grids/grid.js.map +1 -1
- package/date-range-picker/calendar/grids/index.d.ts +1 -1
- package/date-range-picker/calendar/grids/index.d.ts.map +1 -1
- package/date-range-picker/calendar/grids/index.js.map +1 -1
- package/date-range-picker/calendar/header/header-button.d.ts +1 -1
- package/date-range-picker/calendar/header/header-button.d.ts.map +1 -1
- package/date-range-picker/calendar/header/header-button.js.map +1 -1
- package/date-range-picker/calendar/header/index.d.ts +2 -2
- package/date-range-picker/calendar/header/index.d.ts.map +1 -1
- package/date-range-picker/calendar/header/index.js.map +1 -1
- package/date-range-picker/calendar/index.d.ts +1 -1
- package/date-range-picker/calendar/index.d.ts.map +1 -1
- package/date-range-picker/calendar/index.js +11 -8
- package/date-range-picker/calendar/index.js.map +1 -1
- package/date-range-picker/calendar/range-inputs.d.ts +1 -1
- package/date-range-picker/calendar/range-inputs.d.ts.map +1 -1
- package/date-range-picker/calendar/range-inputs.js +7 -5
- package/date-range-picker/calendar/range-inputs.js.map +1 -1
- package/date-range-picker/dropdown.d.ts +2 -1
- package/date-range-picker/dropdown.d.ts.map +1 -1
- package/date-range-picker/dropdown.js +7 -5
- package/date-range-picker/dropdown.js.map +1 -1
- package/date-range-picker/index.d.ts.map +1 -1
- package/date-range-picker/index.js +13 -4
- package/date-range-picker/index.js.map +1 -1
- package/date-range-picker/interfaces.d.ts +22 -21
- package/date-range-picker/interfaces.d.ts.map +1 -1
- package/date-range-picker/interfaces.js.map +1 -1
- package/date-range-picker/mode-switcher.d.ts +1 -1
- package/date-range-picker/mode-switcher.d.ts.map +1 -1
- package/date-range-picker/mode-switcher.js +4 -2
- package/date-range-picker/mode-switcher.js.map +1 -1
- package/date-range-picker/relative-range/index.d.ts +1 -1
- package/date-range-picker/relative-range/index.d.ts.map +1 -1
- package/date-range-picker/relative-range/index.js +14 -10
- package/date-range-picker/relative-range/index.js.map +1 -1
- package/flashbar/interfaces.d.ts +1 -0
- package/flashbar/interfaces.d.ts.map +1 -1
- package/flashbar/interfaces.js.map +1 -1
- package/flashbar/styles.css.js +45 -45
- package/flashbar/styles.scoped.css +169 -169
- package/flashbar/styles.selectors.js +45 -45
- package/form/interfaces.d.ts +1 -0
- package/form/interfaces.d.ts.map +1 -1
- package/form/interfaces.js.map +1 -1
- package/form-field/interfaces.d.ts +1 -0
- package/form-field/interfaces.d.ts.map +1 -1
- package/form-field/interfaces.js.map +1 -1
- package/help-panel/interfaces.d.ts +1 -0
- package/help-panel/interfaces.d.ts.map +1 -1
- package/help-panel/interfaces.js.map +1 -1
- package/i18n/context.d.ts +20 -0
- package/i18n/context.d.ts.map +1 -0
- package/i18n/context.js +17 -0
- package/i18n/context.js.map +1 -0
- package/i18n/index.d.ts +2 -0
- package/i18n/index.d.ts.map +1 -0
- package/i18n/index.js +4 -0
- package/i18n/index.js.map +1 -0
- package/i18n/messages/all.all.d.ts +3 -0
- package/i18n/messages/all.all.js +5473 -0
- package/i18n/messages/all.all.json +5518 -0
- package/i18n/messages/all.de.d.ts +3 -0
- package/i18n/messages/all.de.js +446 -0
- package/i18n/messages/all.de.json +454 -0
- package/i18n/messages/all.en-GB.d.ts +3 -0
- package/i18n/messages/all.en-GB.js +436 -0
- package/i18n/messages/all.en-GB.json +439 -0
- package/i18n/messages/all.en.d.ts +3 -0
- package/i18n/messages/all.en.js +722 -0
- package/i18n/messages/all.en.json +721 -0
- package/i18n/messages/all.es.d.ts +3 -0
- package/i18n/messages/all.es.js +437 -0
- package/i18n/messages/all.es.json +439 -0
- package/i18n/messages/all.fr.d.ts +3 -0
- package/i18n/messages/all.fr.js +451 -0
- package/i18n/messages/all.fr.json +452 -0
- package/i18n/messages/all.id.d.ts +3 -0
- package/i18n/messages/all.id.js +427 -0
- package/i18n/messages/all.id.json +435 -0
- package/i18n/messages/all.it.d.ts +3 -0
- package/i18n/messages/all.it.js +437 -0
- package/i18n/messages/all.it.json +441 -0
- package/i18n/messages/all.ja.d.ts +3 -0
- package/i18n/messages/all.ja.js +441 -0
- package/i18n/messages/all.ja.json +445 -0
- package/i18n/messages/all.ko.d.ts +3 -0
- package/i18n/messages/all.ko.js +419 -0
- package/i18n/messages/all.ko.json +426 -0
- package/i18n/messages/all.pt-BR.d.ts +3 -0
- package/i18n/messages/all.pt-BR.js +444 -0
- package/i18n/messages/all.pt-BR.json +443 -0
- package/i18n/messages/all.zh-CN.d.ts +3 -0
- package/i18n/messages/all.zh-CN.js +429 -0
- package/i18n/messages/all.zh-CN.json +434 -0
- package/i18n/messages/all.zh-TW.d.ts +3 -0
- package/i18n/messages/all.zh-TW.js +428 -0
- package/i18n/messages/all.zh-TW.json +433 -0
- package/i18n/provider.d.ts +20 -0
- package/i18n/provider.d.ts.map +1 -0
- package/i18n/provider.js +105 -0
- package/i18n/provider.js.map +1 -0
- package/i18n/testing.d.ts +8 -0
- package/i18n/testing.d.ts.map +1 -0
- package/i18n/testing.js +8 -0
- package/i18n/testing.js.map +1 -0
- package/input/interfaces.d.ts +1 -0
- package/input/interfaces.d.ts.map +1 -1
- package/input/interfaces.js.map +1 -1
- package/internal/base-component/styles.scoped.css +0 -2
- package/internal/components/dropdown-status/interfaces.d.ts +3 -0
- package/internal/components/dropdown-status/interfaces.d.ts.map +1 -1
- package/internal/components/dropdown-status/interfaces.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/generated/custom-css-properties/index.d.ts.map +1 -1
- package/internal/generated/custom-css-properties/index.js +37 -32
- package/internal/generated/custom-css-properties/index.js.map +1 -1
- package/internal/i18n/context.d.ts +1 -19
- package/internal/i18n/context.d.ts.map +1 -1
- package/internal/i18n/context.js +1 -14
- package/internal/i18n/context.js.map +1 -1
- package/internal/i18n/index.d.ts +1 -1
- package/internal/i18n/index.js +1 -1
- package/internal/i18n/index.js.map +1 -1
- package/internal/i18n/messages/all.all.js +3541 -30
- package/internal/i18n/messages/all.all.json +3599 -52
- package/internal/i18n/messages/all.de.js +280 -1
- package/internal/i18n/messages/all.de.json +290 -3
- package/internal/i18n/messages/all.en-GB.js +270 -1
- package/internal/i18n/messages/all.en-GB.json +275 -3
- package/internal/i18n/messages/all.en.js +556 -1
- package/internal/i18n/messages/all.en.json +558 -4
- package/internal/i18n/messages/all.es.js +271 -1
- package/internal/i18n/messages/all.es.json +275 -3
- package/internal/i18n/messages/all.fr.js +289 -5
- package/internal/i18n/messages/all.fr.json +292 -7
- package/internal/i18n/messages/all.id.js +261 -1
- package/internal/i18n/messages/all.id.json +271 -3
- package/internal/i18n/messages/all.it.js +271 -1
- package/internal/i18n/messages/all.it.json +277 -3
- package/internal/i18n/messages/all.ja.js +267 -1
- package/internal/i18n/messages/all.ja.json +273 -3
- package/internal/i18n/messages/all.ko.js +257 -2
- package/internal/i18n/messages/all.ko.json +263 -4
- package/internal/i18n/messages/all.pt-BR.js +280 -3
- package/internal/i18n/messages/all.pt-BR.json +281 -5
- package/internal/i18n/messages/all.zh-CN.js +272 -9
- package/internal/i18n/messages/all.zh-CN.json +276 -11
- package/internal/i18n/messages/all.zh-TW.js +264 -1
- package/internal/i18n/messages/all.zh-TW.json +268 -3
- package/internal/i18n/provider.d.ts +1 -19
- package/internal/i18n/provider.d.ts.map +1 -1
- package/internal/i18n/provider.js +1 -102
- package/internal/i18n/provider.js.map +1 -1
- package/internal/i18n/testing.d.ts +1 -7
- package/internal/i18n/testing.d.ts.map +1 -1
- package/internal/i18n/testing.js +1 -5
- package/internal/i18n/testing.js.map +1 -1
- package/internal/manifest.json +1 -1
- package/link/interfaces.d.ts +1 -0
- package/link/interfaces.d.ts.map +1 -1
- package/link/interfaces.js.map +1 -1
- package/modal/interfaces.d.ts +1 -0
- package/modal/interfaces.d.ts.map +1 -1
- package/modal/interfaces.js.map +1 -1
- package/multiselect/interfaces.d.ts +1 -0
- package/multiselect/interfaces.d.ts.map +1 -1
- package/multiselect/interfaces.js.map +1 -1
- package/package.json +28 -1
- package/pagination/interfaces.d.ts +1 -0
- package/pagination/interfaces.d.ts.map +1 -1
- package/pagination/interfaces.js.map +1 -1
- package/property-filter/interfaces.d.ts +1 -0
- package/property-filter/interfaces.d.ts.map +1 -1
- package/property-filter/interfaces.js.map +1 -1
- package/s3-resource-selector/interfaces.d.ts +48 -47
- package/s3-resource-selector/interfaces.d.ts.map +1 -1
- package/s3-resource-selector/interfaces.js.map +1 -1
- package/s3-resource-selector/s3-in-context/index.d.ts.map +1 -1
- package/s3-resource-selector/s3-in-context/index.js +11 -9
- package/s3-resource-selector/s3-in-context/index.js.map +1 -1
- package/s3-resource-selector/s3-in-context/validation.d.ts +2 -1
- package/s3-resource-selector/s3-in-context/validation.d.ts.map +1 -1
- package/s3-resource-selector/s3-in-context/validation.js +2 -2
- package/s3-resource-selector/s3-in-context/validation.js.map +1 -1
- package/s3-resource-selector/s3-modal/basic-table.d.ts +2 -1
- package/s3-resource-selector/s3-modal/basic-table.d.ts.map +1 -1
- package/s3-resource-selector/s3-modal/basic-table.js +7 -7
- package/s3-resource-selector/s3-modal/basic-table.js.map +1 -1
- package/s3-resource-selector/s3-modal/buckets-table.d.ts.map +1 -1
- package/s3-resource-selector/s3-modal/buckets-table.js +10 -7
- package/s3-resource-selector/s3-modal/buckets-table.js.map +1 -1
- package/s3-resource-selector/s3-modal/index.d.ts.map +1 -1
- package/s3-resource-selector/s3-modal/index.js +8 -6
- package/s3-resource-selector/s3-modal/index.js.map +1 -1
- package/s3-resource-selector/s3-modal/objects-table.d.ts.map +1 -1
- package/s3-resource-selector/s3-modal/objects-table.js +10 -7
- package/s3-resource-selector/s3-modal/objects-table.js.map +1 -1
- package/s3-resource-selector/s3-modal/table-utils.d.ts +2 -1
- package/s3-resource-selector/s3-modal/table-utils.d.ts.map +1 -1
- package/s3-resource-selector/s3-modal/table-utils.js +5 -9
- package/s3-resource-selector/s3-modal/table-utils.js.map +1 -1
- package/s3-resource-selector/s3-modal/versions-table.d.ts.map +1 -1
- package/s3-resource-selector/s3-modal/versions-table.js +10 -7
- package/s3-resource-selector/s3-modal/versions-table.js.map +1 -1
- package/select/interfaces.d.ts +2 -0
- package/select/interfaces.d.ts.map +1 -1
- package/select/interfaces.js.map +1 -1
- package/split-panel/index.d.ts.map +1 -1
- package/split-panel/index.js +16 -13
- package/split-panel/index.js.map +1 -1
- package/split-panel/interfaces.d.ts +4 -3
- package/split-panel/interfaces.d.ts.map +1 -1
- package/split-panel/interfaces.js.map +1 -1
- package/split-panel/side.d.ts +3 -3
- package/split-panel/side.d.ts.map +1 -1
- package/split-panel/side.js +2 -2
- package/split-panel/side.js.map +1 -1
- package/table/body-cell/index.d.ts.map +1 -1
- package/table/body-cell/index.js +3 -1
- package/table/body-cell/index.js.map +1 -1
- package/table/body-cell/inline-editor.d.ts.map +1 -1
- package/table/body-cell/inline-editor.js +5 -1
- package/table/body-cell/inline-editor.js.map +1 -1
- package/table/header-cell/index.d.ts.map +1 -1
- package/table/header-cell/index.js +3 -1
- package/table/header-cell/index.js.map +1 -1
- package/table/interfaces.d.ts +2 -0
- package/table/interfaces.d.ts.map +1 -1
- package/table/interfaces.js.map +1 -1
- package/table/styles.css.js +36 -35
- package/table/styles.scoped.css +46 -43
- package/table/styles.selectors.js +36 -35
- package/tabs/interfaces.d.ts +1 -0
- package/tabs/interfaces.d.ts.map +1 -1
- package/tabs/interfaces.js.map +1 -1
- package/tag-editor/index.d.ts.map +1 -1
- package/tag-editor/index.js +19 -16
- package/tag-editor/index.js.map +1 -1
- package/tag-editor/interfaces.d.ts +33 -32
- package/tag-editor/interfaces.d.ts.map +1 -1
- package/tag-editor/interfaces.js.map +1 -1
- package/tag-editor/internal.d.ts +6 -6
- package/tag-editor/internal.d.ts.map +1 -1
- package/tag-editor/internal.js.map +1 -1
- package/tag-editor/validation.d.ts +2 -1
- package/tag-editor/validation.d.ts.map +1 -1
- package/tag-editor/validation.js +8 -8
- package/tag-editor/validation.js.map +1 -1
- package/token-group/interfaces.d.ts +1 -0
- package/token-group/interfaces.d.ts.map +1 -1
- package/token-group/interfaces.js.map +1 -1
- package/top-navigation/interfaces.d.ts +4 -3
- package/top-navigation/interfaces.d.ts.map +1 -1
- package/top-navigation/interfaces.js.map +1 -1
- package/top-navigation/internal.d.ts.map +1 -1
- package/top-navigation/internal.js +6 -4
- package/top-navigation/internal.js.map +1 -1
- package/top-navigation/parts/overflow-menu/index.d.ts.map +1 -1
- package/top-navigation/parts/overflow-menu/index.js +6 -2
- package/top-navigation/parts/overflow-menu/index.js.map +1 -1
- package/wizard/interfaces.d.ts +1 -0
- package/wizard/interfaces.d.ts.map +1 -1
- package/wizard/interfaces.js.map +1 -1
- package/wizard/styles.css.js +31 -32
- package/wizard/styles.scoped.css +64 -67
- package/wizard/styles.selectors.js +31 -32
- package/wizard/wizard-form.d.ts.map +1 -1
- package/wizard/wizard-form.js +1 -1
- package/wizard/wizard-form.js.map +1 -1
- package/app-layout/visual-refresh/app-bar.d.ts +0 -7
- package/app-layout/visual-refresh/app-bar.d.ts.map +0 -1
- package/app-layout/visual-refresh/app-bar.js.map +0 -1
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@cloudscape-design/components": {
|
|
3
|
+
"zh-TW": {
|
|
4
|
+
"alert": { "dismissAriaLabel": [{ "type": 0, "value": "關閉提醒" }] },
|
|
5
|
+
"[charts]": {
|
|
6
|
+
"loadingText": [{ "type": 0, "value": "正在載入圖表" }],
|
|
7
|
+
"errorText": [{ "type": 0, "value": "無法擷取資料。請稍後再試一次。" }],
|
|
8
|
+
"recoveryText": [{ "type": 0, "value": "重試" }],
|
|
9
|
+
"i18nStrings.filterLabel": [{ "type": 0, "value": "篩選顯示的資料" }],
|
|
10
|
+
"i18nStrings.filterPlaceholder": [{ "type": 0, "value": "篩選資料" }],
|
|
11
|
+
"i18nStrings.legendAriaLabel": [{ "type": 0, "value": "圖例" }],
|
|
12
|
+
"i18nStrings.detailPopoverDismissAriaLabel": [{ "type": 0, "value": "關閉" }],
|
|
13
|
+
"i18nStrings.xAxisAriaRoleDescription": [{ "type": 0, "value": "X 軸" }],
|
|
14
|
+
"i18nStrings.yAxisAriaRoleDescription": [{ "type": 0, "value": "Y 軸" }]
|
|
15
|
+
},
|
|
16
|
+
"annotation-context": {
|
|
17
|
+
"i18nStrings.nextButtonText": [{ "type": 0, "value": "下一步" }],
|
|
18
|
+
"i18nStrings.previousButtonText": [{ "type": 0, "value": "上一步" }],
|
|
19
|
+
"i18nStrings.finishButtonText": [{ "type": 0, "value": "完成" }],
|
|
20
|
+
"i18nStrings.labelDismissAnnotation": [{ "type": 0, "value": "關閉註釋" }],
|
|
21
|
+
"i18nStrings.stepCounterText": [
|
|
22
|
+
{ "type": 0, "value": "步驟 " },
|
|
23
|
+
{ "type": 1, "value": "stepNumber" },
|
|
24
|
+
{ "type": 0, "value": ",共 " },
|
|
25
|
+
{ "type": 1, "value": "totalStepCount" },
|
|
26
|
+
{ "type": 0, "value": " 步" }
|
|
27
|
+
],
|
|
28
|
+
"i18nStrings.taskTitle": [
|
|
29
|
+
{ "type": 0, "value": "任務 " },
|
|
30
|
+
{ "type": 1, "value": "taskNumber" },
|
|
31
|
+
{ "type": 0, "value": ":" },
|
|
32
|
+
{ "type": 1, "value": "taskTitle" }
|
|
33
|
+
],
|
|
34
|
+
"i18nStrings.labelHotspot": [
|
|
35
|
+
{
|
|
36
|
+
"type": 5,
|
|
37
|
+
"value": "openState",
|
|
38
|
+
"options": {
|
|
39
|
+
"true": {
|
|
40
|
+
"value": [
|
|
41
|
+
{ "type": 0, "value": "關閉步驟 " },
|
|
42
|
+
{ "type": 1, "value": "totalStepCount" },
|
|
43
|
+
{ "type": 0, "value": " 之 " },
|
|
44
|
+
{ "type": 1, "value": "stepNumber" },
|
|
45
|
+
{ "type": 0, "value": " 的註釋" }
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"false": {
|
|
49
|
+
"value": [
|
|
50
|
+
{ "type": 0, "value": "開啟步驟 " },
|
|
51
|
+
{ "type": 1, "value": "totalStepCount" },
|
|
52
|
+
{ "type": 0, "value": " 之 " },
|
|
53
|
+
{ "type": 1, "value": "stepNumber" },
|
|
54
|
+
{ "type": 0, "value": " 的註釋" }
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
"other": { "value": [] }
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
"app-layout": {
|
|
63
|
+
"ariaLabels.navigation": [{ "type": 0, "value": "側邊導覽" }],
|
|
64
|
+
"ariaLabels.navigationClose": [{ "type": 0, "value": "關閉側邊導覽" }],
|
|
65
|
+
"ariaLabels.navigationToggle": [{ "type": 0, "value": "開啟側邊導覽" }],
|
|
66
|
+
"ariaLabels.notifications": [{ "type": 0, "value": "通知" }],
|
|
67
|
+
"ariaLabels.tools": [{ "type": 0, "value": "說明面板" }],
|
|
68
|
+
"ariaLabels.toolsClose": [{ "type": 0, "value": "開啟說明面板" }],
|
|
69
|
+
"ariaLabels.toolsToggle": [{ "type": 0, "value": "關閉說明面板" }]
|
|
70
|
+
},
|
|
71
|
+
"area-chart": { "i18nStrings.detailTotalLabel": [{ "type": 0, "value": "合計" }] },
|
|
72
|
+
"attribute-editor": {
|
|
73
|
+
"removeButtonText": [{ "type": 0, "value": "移除" }],
|
|
74
|
+
"i18nStrings.errorIconAriaLabel": [{ "type": 0, "value": "錯誤" }]
|
|
75
|
+
},
|
|
76
|
+
"autosuggest": {
|
|
77
|
+
"errorIconAriaLabel": [{ "type": 0, "value": "錯誤" }],
|
|
78
|
+
"selectedAriaLabel": [{ "type": 0, "value": "已選取" }],
|
|
79
|
+
"enteredTextLabel": [
|
|
80
|
+
{ "type": 0, "value": "使用 " },
|
|
81
|
+
{ "type": 1, "value": "value" }
|
|
82
|
+
],
|
|
83
|
+
"recoveryText": [{ "type": 0, "value": "重試" }]
|
|
84
|
+
},
|
|
85
|
+
"breadcrumb-group": { "expandAriaLabel": [{ "type": 0, "value": "顯示路徑" }] },
|
|
86
|
+
"calendar": {
|
|
87
|
+
"nextMonthAriaLabel": [{ "type": 0, "value": "下個月" }],
|
|
88
|
+
"previousMonthAriaLabel": [{ "type": 0, "value": "上個月" }],
|
|
89
|
+
"todayAriaLabel": [{ "type": 0, "value": "今天" }]
|
|
90
|
+
},
|
|
91
|
+
"cards": { "ariaLabels.selectionGroupLabel": [{ "type": 0, "value": "項目選擇" }] },
|
|
92
|
+
"code-editor": {
|
|
93
|
+
"i18nStrings.loadingState": [{ "type": 0, "value": "正在載入程式碼編輯器" }],
|
|
94
|
+
"i18nStrings.errorState": [{ "type": 0, "value": "載入程式碼編輯器時發生錯誤。" }],
|
|
95
|
+
"i18nStrings.errorStateRecovery": [{ "type": 0, "value": "重試" }],
|
|
96
|
+
"i18nStrings.editorGroupAriaLabel": [{ "type": 0, "value": "程式碼編輯器" }],
|
|
97
|
+
"i18nStrings.statusBarGroupAriaLabel": [{ "type": 0, "value": "狀態列" }],
|
|
98
|
+
"i18nStrings.cursorPosition": [
|
|
99
|
+
{ "type": 0, "value": "行 " },
|
|
100
|
+
{ "type": 1, "value": "row" },
|
|
101
|
+
{ "type": 0, "value": "、欄 " },
|
|
102
|
+
{ "type": 1, "value": "column" }
|
|
103
|
+
],
|
|
104
|
+
"i18nStrings.errorsTab": [{ "type": 0, "value": "錯誤" }],
|
|
105
|
+
"i18nStrings.warningsTab": [{ "type": 0, "value": "警告" }],
|
|
106
|
+
"i18nStrings.preferencesButtonAriaLabel": [{ "type": 0, "value": "偏好設定" }],
|
|
107
|
+
"i18nStrings.paneCloseButtonAriaLabel": [{ "type": 0, "value": "關閉" }],
|
|
108
|
+
"i18nStrings.preferencesModalHeader": [{ "type": 0, "value": "偏好設定" }],
|
|
109
|
+
"i18nStrings.preferencesModalCancel": [{ "type": 0, "value": "取消" }],
|
|
110
|
+
"i18nStrings.preferencesModalConfirm": [{ "type": 0, "value": "確認" }],
|
|
111
|
+
"i18nStrings.preferencesModalWrapLines": [{ "type": 0, "value": "換行" }],
|
|
112
|
+
"i18nStrings.preferencesModalTheme": [{ "type": 0, "value": "佈景主題" }],
|
|
113
|
+
"i18nStrings.preferencesModalLightThemes": [{ "type": 0, "value": "淺色佈景主題" }],
|
|
114
|
+
"i18nStrings.preferencesModalDarkThemes": [{ "type": 0, "value": "深色佈景主題" }]
|
|
115
|
+
},
|
|
116
|
+
"collection-preferences": {
|
|
117
|
+
"title": [{ "type": 0, "value": "偏好設定" }],
|
|
118
|
+
"confirmLabel": [{ "type": 0, "value": "確認" }],
|
|
119
|
+
"cancelLabel": [{ "type": 0, "value": "取消" }],
|
|
120
|
+
"pageSizePreference.title": [{ "type": 0, "value": "頁面大小" }],
|
|
121
|
+
"wrapLinesPreference.label": [{ "type": 0, "value": "換行" }],
|
|
122
|
+
"wrapLinesPreference.description": [{ "type": 0, "value": "選取以查看所有文字並換行" }],
|
|
123
|
+
"stripedRowsPreference.label": [{ "type": 0, "value": "條紋列" }],
|
|
124
|
+
"stripedRowsPreference.description": [{ "type": 0, "value": "選取以新增加網底的列" }],
|
|
125
|
+
"contentDensityPreference.label": [{ "type": 0, "value": "精簡模式" }],
|
|
126
|
+
"contentDensityPreference.description": [{ "type": 0, "value": "選擇以更密集、更精簡的模式顯示內容" }],
|
|
127
|
+
"contentDisplayPreference.title": [{ "type": 0, "value": "欄偏好設定" }],
|
|
128
|
+
"contentDisplayPreference.description": [{ "type": 0, "value": "自訂欄的可見性和順序。" }],
|
|
129
|
+
"contentDisplayPreference.dragHandleAriaLabel": [{ "type": 0, "value": "拖曳控點" }],
|
|
130
|
+
"contentDisplayPreference.dragHandleAriaDescription": [
|
|
131
|
+
{
|
|
132
|
+
"type": 0,
|
|
133
|
+
"value": "使用空白鍵或 ENTER 鍵啟用項目拖曳功能,然後使用方向鍵移動項目的位置。若要完成位置移動,請使用空白鍵或 ENTER 鍵,或者若要捨棄移動,請使用 ESC 鍵。"
|
|
134
|
+
}
|
|
135
|
+
],
|
|
136
|
+
"contentDisplayPreference.liveAnnouncementDndStarted": [
|
|
137
|
+
{ "type": 0, "value": "在第 " },
|
|
138
|
+
{ "type": 1, "value": "position" },
|
|
139
|
+
{ "type": 0, "value": " 位置 (共 " },
|
|
140
|
+
{ "type": 1, "value": "total" },
|
|
141
|
+
{ "type": 0, "value": " 個位置) 拾取了項目" }
|
|
142
|
+
],
|
|
143
|
+
"contentDisplayPreference.liveAnnouncementDndDiscarded": [{ "type": 0, "value": "重新排序已取消" }]
|
|
144
|
+
},
|
|
145
|
+
"date-range-picker": {
|
|
146
|
+
"i18nStrings.relativeModeTitle": [{ "type": 0, "value": "相對模式" }],
|
|
147
|
+
"i18nStrings.absoluteModeTitle": [{ "type": 0, "value": "絕對模式" }],
|
|
148
|
+
"i18nStrings.relativeRangeSelectionHeading": [{ "type": 0, "value": "選擇範圍" }],
|
|
149
|
+
"i18nStrings.cancelButtonLabel": [{ "type": 0, "value": "取消" }],
|
|
150
|
+
"i18nStrings.clearButtonLabel": [{ "type": 0, "value": "清除和關閉" }],
|
|
151
|
+
"i18nStrings.applyButtonLabel": [{ "type": 0, "value": "套用" }],
|
|
152
|
+
"i18nStrings.customRelativeRangeOptionLabel": [{ "type": 0, "value": "自訂範圍" }],
|
|
153
|
+
"i18nStrings.customRelativeRangeOptionDescription": [{ "type": 0, "value": "設定過去的自訂範圍" }],
|
|
154
|
+
"i18nStrings.customRelativeRangeUnitLabel": [{ "type": 0, "value": "時間單位" }],
|
|
155
|
+
"i18nStrings.customRelativeRangeDurationLabel": [{ "type": 0, "value": "持續時間" }],
|
|
156
|
+
"i18nStrings.customRelativeRangeDurationPlaceholder": [{ "type": 0, "value": "輸入持續時間" }],
|
|
157
|
+
"i18nStrings.startDateLabel": [{ "type": 0, "value": "開始日期" }],
|
|
158
|
+
"i18nStrings.startTimeLabel": [{ "type": 0, "value": "開始時間" }],
|
|
159
|
+
"i18nStrings.endDateLabel": [{ "type": 0, "value": "結束日期" }],
|
|
160
|
+
"i18nStrings.endTimeLabel": [{ "type": 0, "value": "結束時間" }],
|
|
161
|
+
"i18nStrings.dateTimeConstraintText": [
|
|
162
|
+
{ "type": 0, "value": "日期請使用 YYYY/MM/DD 格式。時間請使用 24 小時格式。" }
|
|
163
|
+
],
|
|
164
|
+
"i18nStrings.errorIconAriaLabel": [{ "type": 0, "value": "錯誤" }],
|
|
165
|
+
"i18nStrings.renderSelectedAbsoluteRangeAriaLive": [
|
|
166
|
+
{ "type": 0, "value": "已選取從 " },
|
|
167
|
+
{ "type": 1, "value": "startDate" },
|
|
168
|
+
{ "type": 0, "value": " 到 " },
|
|
169
|
+
{ "type": 1, "value": "endDate" },
|
|
170
|
+
{ "type": 0, "value": " 的範圍" }
|
|
171
|
+
],
|
|
172
|
+
"i18nStrings.formatRelativeRange": [
|
|
173
|
+
{
|
|
174
|
+
"type": 6,
|
|
175
|
+
"value": "amount",
|
|
176
|
+
"options": {
|
|
177
|
+
"one": {
|
|
178
|
+
"value": [
|
|
179
|
+
{ "type": 0, "value": "最後 " },
|
|
180
|
+
{ "type": 1, "value": "amount" },
|
|
181
|
+
{ "type": 0, "value": " " },
|
|
182
|
+
{ "type": 1, "value": "unit" }
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
"other": {
|
|
186
|
+
"value": [
|
|
187
|
+
{ "type": 0, "value": "最後 " },
|
|
188
|
+
{ "type": 1, "value": "amount" },
|
|
189
|
+
{ "type": 0, "value": " " },
|
|
190
|
+
{ "type": 1, "value": "unit" }
|
|
191
|
+
]
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"offset": 0,
|
|
195
|
+
"pluralType": "cardinal"
|
|
196
|
+
}
|
|
197
|
+
],
|
|
198
|
+
"i18nStrings.formatUnit": [
|
|
199
|
+
{
|
|
200
|
+
"type": 6,
|
|
201
|
+
"value": "amount",
|
|
202
|
+
"options": {
|
|
203
|
+
"one": { "value": [{ "type": 1, "value": "unit" }] },
|
|
204
|
+
"other": { "value": [{ "type": 1, "value": "unit" }] }
|
|
205
|
+
},
|
|
206
|
+
"offset": 0,
|
|
207
|
+
"pluralType": "cardinal"
|
|
208
|
+
}
|
|
209
|
+
]
|
|
210
|
+
},
|
|
211
|
+
"flashbar": {
|
|
212
|
+
"i18nStrings.ariaLabel": [{ "type": 0, "value": "通知" }],
|
|
213
|
+
"i18nStrings.errorIconAriaLabel": [{ "type": 0, "value": "錯誤" }],
|
|
214
|
+
"i18nStrings.inProgressIconAriaLabel": [{ "type": 0, "value": "進行中" }],
|
|
215
|
+
"i18nStrings.infoIconAriaLabel": [{ "type": 0, "value": "資訊" }],
|
|
216
|
+
"i18nStrings.notificationBarAriaLabel": [{ "type": 0, "value": "所有通知" }],
|
|
217
|
+
"i18nStrings.notificationBarText": [{ "type": 0, "value": "通知" }],
|
|
218
|
+
"i18nStrings.successIconAriaLabel": [{ "type": 0, "value": "成功" }],
|
|
219
|
+
"i18nStrings.warningIconAriaLabel": [{ "type": 0, "value": "警告" }]
|
|
220
|
+
},
|
|
221
|
+
"form": { "errorIconAriaLabel": [{ "type": 0, "value": "錯誤" }] },
|
|
222
|
+
"form-field": { "i18nStrings.errorIconAriaLabel": [{ "type": 0, "value": "錯誤" }] },
|
|
223
|
+
"help-panel": { "loadingText": [{ "type": 0, "value": "載入內容" }] },
|
|
224
|
+
"input": { "clearAriaLabel": [{ "type": 0, "value": "清除" }] },
|
|
225
|
+
"link": { "externalIconAriaLabel": [{ "type": 0, "value": "在新索引標籤中開啟" }] },
|
|
226
|
+
"modal": { "closeAriaLabel": [{ "type": 0, "value": "關閉強制回應" }] },
|
|
227
|
+
"pagination": {
|
|
228
|
+
"ariaLabels.nextPageLabel": [{ "type": 0, "value": "下一頁" }],
|
|
229
|
+
"ariaLabels.pageLabel": [
|
|
230
|
+
{ "type": 0, "value": "所有頁面中的第 " },
|
|
231
|
+
{ "type": 1, "value": "pageNumber" },
|
|
232
|
+
{ "type": 0, "value": " 頁" }
|
|
233
|
+
],
|
|
234
|
+
"ariaLabels.previousPageLabel": [{ "type": 0, "value": "上一頁" }]
|
|
235
|
+
},
|
|
236
|
+
"pie-chart": {
|
|
237
|
+
"loadingText": [{ "type": 0, "value": "正在載入圖表" }],
|
|
238
|
+
"errorText": [{ "type": 0, "value": "無法擷取資料。請稍後再試一次。" }],
|
|
239
|
+
"recoveryText": [{ "type": 0, "value": "重試" }]
|
|
240
|
+
},
|
|
241
|
+
"multiselect": {
|
|
242
|
+
"deselectAriaLabel": [
|
|
243
|
+
{ "type": 0, "value": "移除 " },
|
|
244
|
+
{ "type": 1, "value": "option__label" }
|
|
245
|
+
]
|
|
246
|
+
},
|
|
247
|
+
"popover": { "dismissAriaLabel": [{ "type": 0, "value": "關閉彈出視窗" }] },
|
|
248
|
+
"property-filter": {
|
|
249
|
+
"i18nStrings.allPropertiesLabel": [{ "type": 0, "value": "所有屬性" }],
|
|
250
|
+
"i18nStrings.applyActionText": [{ "type": 0, "value": "套用" }],
|
|
251
|
+
"i18nStrings.cancelActionText": [{ "type": 0, "value": "取消" }],
|
|
252
|
+
"i18nStrings.clearFiltersText": [{ "type": 0, "value": "清除篩選條件" }],
|
|
253
|
+
"i18nStrings.editTokenHeader": [{ "type": 0, "value": "編輯篩選條件" }],
|
|
254
|
+
"i18nStrings.groupPropertiesText": [{ "type": 0, "value": "屬性" }],
|
|
255
|
+
"i18nStrings.groupValuesText": [{ "type": 0, "value": "值" }],
|
|
256
|
+
"i18nStrings.operationAndText": [{ "type": 0, "value": "和" }],
|
|
257
|
+
"i18nStrings.operationOrText": [{ "type": 0, "value": "或" }],
|
|
258
|
+
"i18nStrings.operatorContainsText": [{ "type": 0, "value": "包含" }],
|
|
259
|
+
"i18nStrings.operatorDoesNotContainText": [{ "type": 0, "value": "不包含" }],
|
|
260
|
+
"i18nStrings.operatorDoesNotEqualText": [{ "type": 0, "value": "不等於" }],
|
|
261
|
+
"i18nStrings.operatorEqualsText": [{ "type": 0, "value": "等於" }],
|
|
262
|
+
"i18nStrings.operatorGreaterOrEqualText": [{ "type": 0, "value": "大於或等於" }],
|
|
263
|
+
"i18nStrings.operatorGreaterText": [{ "type": 0, "value": "大於" }],
|
|
264
|
+
"i18nStrings.operatorLessOrEqualText": [{ "type": 0, "value": "小於或等於" }],
|
|
265
|
+
"i18nStrings.operatorLessText": [{ "type": 0, "value": "小於" }],
|
|
266
|
+
"i18nStrings.operatorText": [{ "type": 0, "value": "運算子" }],
|
|
267
|
+
"i18nStrings.operatorsText": [{ "type": 0, "value": "運算子" }],
|
|
268
|
+
"i18nStrings.propertyText": [{ "type": 0, "value": "屬性" }],
|
|
269
|
+
"i18nStrings.tokenLimitShowFewer": [{ "type": 0, "value": "顯示較少" }],
|
|
270
|
+
"i18nStrings.tokenLimitShowMore": [{ "type": 0, "value": "顯示更多" }],
|
|
271
|
+
"i18nStrings.valueText": [{ "type": 0, "value": "值" }],
|
|
272
|
+
"i18nStrings.removeTokenButtonAriaLabel": [
|
|
273
|
+
{
|
|
274
|
+
"type": 5,
|
|
275
|
+
"value": "token__operator",
|
|
276
|
+
"options": {
|
|
277
|
+
"equals": {
|
|
278
|
+
"value": [
|
|
279
|
+
{ "type": 0, "value": "移除篩選條件," },
|
|
280
|
+
{ "type": 1, "value": "token__propertyKey" },
|
|
281
|
+
{ "type": 0, "value": " 等於 " },
|
|
282
|
+
{ "type": 1, "value": "token__value" }
|
|
283
|
+
]
|
|
284
|
+
},
|
|
285
|
+
"not_equals": {
|
|
286
|
+
"value": [
|
|
287
|
+
{ "type": 0, "value": "移除篩選條件," },
|
|
288
|
+
{ "type": 1, "value": "token__propertyKey" },
|
|
289
|
+
{ "type": 0, "value": " 不等於 " },
|
|
290
|
+
{ "type": 1, "value": "token__value" }
|
|
291
|
+
]
|
|
292
|
+
},
|
|
293
|
+
"greater_than": {
|
|
294
|
+
"value": [
|
|
295
|
+
{ "type": 0, "value": "移除篩選條件," },
|
|
296
|
+
{ "type": 1, "value": "token__propertyKey" },
|
|
297
|
+
{ "type": 0, "value": " 大於 " },
|
|
298
|
+
{ "type": 1, "value": "token__value" }
|
|
299
|
+
]
|
|
300
|
+
},
|
|
301
|
+
"greater_than_equal": {
|
|
302
|
+
"value": [
|
|
303
|
+
{ "type": 0, "value": "移除篩選條件," },
|
|
304
|
+
{ "type": 1, "value": "token__propertyKey" },
|
|
305
|
+
{ "type": 0, "value": " 大於或等於 " },
|
|
306
|
+
{ "type": 1, "value": "token__value" }
|
|
307
|
+
]
|
|
308
|
+
},
|
|
309
|
+
"less_than": {
|
|
310
|
+
"value": [
|
|
311
|
+
{ "type": 0, "value": "移除篩選條件," },
|
|
312
|
+
{ "type": 1, "value": "token__propertyKey" },
|
|
313
|
+
{ "type": 0, "value": " 小於 " },
|
|
314
|
+
{ "type": 1, "value": "token__value" }
|
|
315
|
+
]
|
|
316
|
+
},
|
|
317
|
+
"less_than_equal": {
|
|
318
|
+
"value": [
|
|
319
|
+
{ "type": 0, "value": "移除篩選條件," },
|
|
320
|
+
{ "type": 1, "value": "token__propertyKey" },
|
|
321
|
+
{ "type": 0, "value": " 小於或等於 " },
|
|
322
|
+
{ "type": 1, "value": "token__value" }
|
|
323
|
+
]
|
|
324
|
+
},
|
|
325
|
+
"contains": {
|
|
326
|
+
"value": [
|
|
327
|
+
{ "type": 0, "value": "移除篩選條件," },
|
|
328
|
+
{ "type": 1, "value": "token__propertyKey" },
|
|
329
|
+
{ "type": 0, "value": " 包含 " },
|
|
330
|
+
{ "type": 1, "value": "token__value" }
|
|
331
|
+
]
|
|
332
|
+
},
|
|
333
|
+
"not_contains": {
|
|
334
|
+
"value": [
|
|
335
|
+
{ "type": 0, "value": "移除篩選條件," },
|
|
336
|
+
{ "type": 1, "value": "token__propertyKey" },
|
|
337
|
+
{ "type": 0, "value": " 不包含 " },
|
|
338
|
+
{ "type": 1, "value": "token__value" }
|
|
339
|
+
]
|
|
340
|
+
},
|
|
341
|
+
"other": { "value": [] }
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
]
|
|
345
|
+
},
|
|
346
|
+
"s3-resource-selector": {},
|
|
347
|
+
"select": {
|
|
348
|
+
"errorIconAriaLabel": [{ "type": 0, "value": "錯誤" }],
|
|
349
|
+
"selectedAriaLabel": [{ "type": 0, "value": "已選取" }]
|
|
350
|
+
},
|
|
351
|
+
"split-panel": {},
|
|
352
|
+
"table": {
|
|
353
|
+
"ariaLabels.submittingEditText": [{ "type": 0, "value": "提交編輯" }],
|
|
354
|
+
"ariaLabels.successfulEditLabel": [{ "type": 0, "value": "編輯成功" }],
|
|
355
|
+
"columnDefinitions.editConfig.errorIconAriaLabel": [{ "type": 0, "value": "錯誤" }],
|
|
356
|
+
"columnDefinitions.editConfig.editIconAriaLabel": [{ "type": 0, "value": "dditable" }]
|
|
357
|
+
},
|
|
358
|
+
"tabs": {
|
|
359
|
+
"i18nStrings.scrollLeftAriaLabel": [{ "type": 0, "value": "向左捲動" }],
|
|
360
|
+
"i18nStrings.scrollRightAriaLabel": [{ "type": 0, "value": "向右捲動" }]
|
|
361
|
+
},
|
|
362
|
+
"token-group": {
|
|
363
|
+
"i18nStrings.limitShowFewer": [{ "type": 0, "value": "顯示較少" }],
|
|
364
|
+
"i18nStrings.limitShowMore": [{ "type": 0, "value": "顯示更多" }]
|
|
365
|
+
},
|
|
366
|
+
"top-navigation": {
|
|
367
|
+
"i18nStrings.searchIconAriaLabel": [{ "type": 0, "value": "搜尋" }],
|
|
368
|
+
"i18nStrings.searchDismissIconAriaLabel": [{ "type": 0, "value": "關閉搜尋" }],
|
|
369
|
+
"i18nStrings.overflowMenuTriggerText": [{ "type": 0, "value": "更多" }],
|
|
370
|
+
"i18nStrings.overflowMenuDismissIconAriaLabel": [{ "type": 0, "value": "關閉選單" }],
|
|
371
|
+
"i18nStrings.overflowMenuBackIconAriaLabel": [{ "type": 0, "value": "返回" }],
|
|
372
|
+
"i18nStrings.overflowMenuTitleText": [{ "type": 0, "value": "全部" }]
|
|
373
|
+
},
|
|
374
|
+
"tutorial-panel": {
|
|
375
|
+
"i18nStrings.loadingText": [{ "type": 0, "value": "正在載入" }],
|
|
376
|
+
"i18nStrings.tutorialListTitle": [{ "type": 0, "value": "選擇教學" }],
|
|
377
|
+
"i18nStrings.tutorialListDownloadLinkText": [{ "type": 0, "value": "下載 PDF 版本" }],
|
|
378
|
+
"i18nStrings.labelTutorialListDownloadLink": [{ "type": 0, "value": "下載本教學課程的 PDF 版本" }],
|
|
379
|
+
"i18nStrings.tutorialCompletedText": [{ "type": 0, "value": "教學已完成" }],
|
|
380
|
+
"i18nStrings.learnMoreLinkText": [{ "type": 0, "value": "進一步了解" }],
|
|
381
|
+
"i18nStrings.startTutorialButtonText": [{ "type": 0, "value": "開始教學" }],
|
|
382
|
+
"i18nStrings.restartTutorialButtonText": [{ "type": 0, "value": "重新啟動教學課程" }],
|
|
383
|
+
"i18nStrings.completionScreenTitle": [{ "type": 0, "value": "恭喜!您已完成了教學課程。" }],
|
|
384
|
+
"i18nStrings.feedbackLinkText": [{ "type": 0, "value": "意見回饋" }],
|
|
385
|
+
"i18nStrings.dismissTutorialButtonText": [{ "type": 0, "value": "結束教學" }],
|
|
386
|
+
"i18nStrings.taskTitle": [
|
|
387
|
+
{ "type": 0, "value": "任務 " },
|
|
388
|
+
{ "type": 1, "value": "taskNumber" },
|
|
389
|
+
{ "type": 0, "value": ":" },
|
|
390
|
+
{ "type": 1, "value": "taskTitle" }
|
|
391
|
+
],
|
|
392
|
+
"i18nStrings.stepTitle": [
|
|
393
|
+
{ "type": 0, "value": "步驟" },
|
|
394
|
+
{ "type": 1, "value": "stepNumber" },
|
|
395
|
+
{ "type": 0, "value": "︰" },
|
|
396
|
+
{ "type": 1, "value": "stepTitle" }
|
|
397
|
+
],
|
|
398
|
+
"i18nStrings.labelExitTutorial": [{ "type": 0, "value": "結束教學" }],
|
|
399
|
+
"i18nStrings.labelTotalSteps": [
|
|
400
|
+
{ "type": 0, "value": "總步驟︰" },
|
|
401
|
+
{ "type": 1, "value": "totalStepCount" }
|
|
402
|
+
],
|
|
403
|
+
"i18nStrings.labelsTaskStatus.pending": [{ "type": 0, "value": "等待中" }],
|
|
404
|
+
"i18nStrings.labelsTaskStatus.in-progress": [{ "type": 0, "value": "進行中" }],
|
|
405
|
+
"i18nStrings.labelsTaskStatus.success": [{ "type": 0, "value": "成功" }]
|
|
406
|
+
},
|
|
407
|
+
"wizard": {
|
|
408
|
+
"i18nStrings.stepNumberLabel": [
|
|
409
|
+
{ "type": 0, "value": "步驟 " },
|
|
410
|
+
{ "type": 1, "value": "stepNumber" }
|
|
411
|
+
],
|
|
412
|
+
"i18nStrings.collapsedStepsLabel": [
|
|
413
|
+
{ "type": 0, "value": "步驟 " },
|
|
414
|
+
{ "type": 1, "value": "stepNumber" },
|
|
415
|
+
{ "type": 0, "value": ",共 " },
|
|
416
|
+
{ "type": 1, "value": "stepsCount" },
|
|
417
|
+
{ "type": 0, "value": " 步" }
|
|
418
|
+
],
|
|
419
|
+
"i18nStrings.skipToButtonLabel": [
|
|
420
|
+
{ "type": 0, "value": "跳到 " },
|
|
421
|
+
{ "type": 1, "value": "task__title" }
|
|
422
|
+
],
|
|
423
|
+
"i18nStrings.navigationAriaLabel": [{ "type": 0, "value": "步驟" }],
|
|
424
|
+
"i18nStrings.cancelButton": [{ "type": 0, "value": "取消" }],
|
|
425
|
+
"i18nStrings.previousButton": [{ "type": 0, "value": "上一步" }],
|
|
426
|
+
"i18nStrings.nextButton": [{ "type": 0, "value": "下一步" }],
|
|
427
|
+
"i18nStrings.optional": [{ "type": 0, "value": "選用" }],
|
|
428
|
+
"i18nStrings.nextButtonLoadingAnnouncement": [{ "type": 0, "value": "載入下一個步驟" }],
|
|
429
|
+
"i18nStrings.submitButtonLoadingAnnouncement": [{ "type": 0, "value": "提交表單" }]
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MessageFormatElement } from '@formatjs/icu-messageformat-parser';
|
|
3
|
+
export interface I18nProviderProps {
|
|
4
|
+
messages: ReadonlyArray<I18nProviderProps.Messages>;
|
|
5
|
+
locale?: string;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare namespace I18nProviderProps {
|
|
9
|
+
interface Messages {
|
|
10
|
+
[namespace: string]: {
|
|
11
|
+
[locale: string]: {
|
|
12
|
+
[component: string]: {
|
|
13
|
+
[key: string]: string | MessageFormatElement[];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export declare function I18nProvider({ messages: messagesArray, locale: providedLocale, children }: I18nProviderProps): JSX.Element;
|
|
20
|
+
//# sourceMappingURL=provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"lib/default/","sources":["i18n/provider.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAK1E,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,aAAa,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IACpD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,yBAAiB,iBAAiB,CAAC;IACjC,UAAiB,QAAQ;QACvB,CAAC,SAAS,EAAE,MAAM,GAAG;YACnB,CAAC,MAAM,EAAE,MAAM,GAAG;gBAChB,CAAC,SAAS,EAAE,MAAM,GAAG;oBACnB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,oBAAoB,EAAE,CAAC;iBAChD,CAAC;aACH,CAAC;SACH,CAAC;KACH;CACF;AASD,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,EAAE,iBAAiB,eAuE5G"}
|
package/i18n/provider.js
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import React, { useContext } from 'react';
|
|
4
|
+
import IntlMessageFormat from 'intl-messageformat';
|
|
5
|
+
import { InternalI18nContext } from './context';
|
|
6
|
+
import { warnOnce } from '../internal/logging';
|
|
7
|
+
/**
|
|
8
|
+
* Context to send parent messages down to child I18nProviders. This isn't
|
|
9
|
+
* included in the InternalI18nContext to avoid components from depending on
|
|
10
|
+
* MessageFormatElement types.
|
|
11
|
+
*/
|
|
12
|
+
const I18nMessagesContext = React.createContext({});
|
|
13
|
+
export function I18nProvider({ messages: messagesArray, locale: providedLocale, children }) {
|
|
14
|
+
if (typeof document === 'undefined' && !providedLocale) {
|
|
15
|
+
warnOnce('I18nProvider', 'An explicit locale was not provided during server rendering. This can lead to a hydration mismatch on the client.');
|
|
16
|
+
}
|
|
17
|
+
// The provider accepts an array of configs. We merge parent messages and
|
|
18
|
+
// flatten the tree early on so that accesses by key are simpler and faster.
|
|
19
|
+
const parentMessages = useContext(I18nMessagesContext);
|
|
20
|
+
const messages = mergeMessages([parentMessages, ...messagesArray]);
|
|
21
|
+
let locale;
|
|
22
|
+
if (providedLocale) {
|
|
23
|
+
// If a locale is explicitly provided, use the string directly.
|
|
24
|
+
// Locales have a recommended case, but are matched case-insensitively,
|
|
25
|
+
// so we lowercase it internally.
|
|
26
|
+
locale = providedLocale.toLowerCase();
|
|
27
|
+
}
|
|
28
|
+
else if (typeof document !== 'undefined' && document.documentElement.lang) {
|
|
29
|
+
// Otherwise, use the value provided in the HTML tag.
|
|
30
|
+
locale = document.documentElement.lang.toLowerCase();
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
// Lastly, fall back to English.
|
|
34
|
+
locale = 'en';
|
|
35
|
+
}
|
|
36
|
+
const format = (namespace, component, key, provided, customHandler) => {
|
|
37
|
+
var _a, _b, _c;
|
|
38
|
+
// A general rule in the library is that undefined is basically
|
|
39
|
+
// treated as "not provided". So even if a user explicitly provides an
|
|
40
|
+
// undefined value, it will default to i18n values.
|
|
41
|
+
if (provided !== undefined) {
|
|
42
|
+
return provided;
|
|
43
|
+
}
|
|
44
|
+
// Widen the locale string (e.g. en-GB -> en) until we find a locale
|
|
45
|
+
// that contains the message we need.
|
|
46
|
+
let message;
|
|
47
|
+
const matchableLocales = getMatchableLocales(locale);
|
|
48
|
+
for (const matchableLocale of matchableLocales) {
|
|
49
|
+
const localeMessage = (_c = (_b = (_a = messages === null || messages === void 0 ? void 0 : messages[namespace]) === null || _a === void 0 ? void 0 : _a[matchableLocale]) === null || _b === void 0 ? void 0 : _b[component]) === null || _c === void 0 ? void 0 : _c[key];
|
|
50
|
+
if (localeMessage !== undefined) {
|
|
51
|
+
message = localeMessage;
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
// If a message wasn't found, exit early.
|
|
56
|
+
if (message === undefined) {
|
|
57
|
+
return provided;
|
|
58
|
+
}
|
|
59
|
+
const intlMessageFormat = new IntlMessageFormat(message, locale);
|
|
60
|
+
if (customHandler) {
|
|
61
|
+
return customHandler(args => intlMessageFormat.format(args));
|
|
62
|
+
}
|
|
63
|
+
// Assuming `T extends string` since a customHandler wasn't provided.
|
|
64
|
+
return intlMessageFormat.format();
|
|
65
|
+
};
|
|
66
|
+
return (React.createElement(InternalI18nContext.Provider, { value: { locale, format } },
|
|
67
|
+
React.createElement(I18nMessagesContext.Provider, { value: messages }, children)));
|
|
68
|
+
}
|
|
69
|
+
function mergeMessages(sources) {
|
|
70
|
+
const result = {};
|
|
71
|
+
for (const messages of sources) {
|
|
72
|
+
for (const namespace in messages) {
|
|
73
|
+
if (!(namespace in result)) {
|
|
74
|
+
result[namespace] = {};
|
|
75
|
+
}
|
|
76
|
+
for (const casedLocale in messages[namespace]) {
|
|
77
|
+
const locale = casedLocale.toLowerCase();
|
|
78
|
+
if (!(locale in result[namespace])) {
|
|
79
|
+
result[namespace][locale] = {};
|
|
80
|
+
}
|
|
81
|
+
for (const component in messages[namespace][casedLocale]) {
|
|
82
|
+
if (!(component in result[namespace][locale])) {
|
|
83
|
+
result[namespace][locale][component] = {};
|
|
84
|
+
}
|
|
85
|
+
for (const key in messages[namespace][casedLocale][component]) {
|
|
86
|
+
result[namespace][locale][component][key] = messages[namespace][casedLocale][component][key];
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return result;
|
|
93
|
+
}
|
|
94
|
+
function getMatchableLocales(ietfLanguageTag) {
|
|
95
|
+
const parts = ietfLanguageTag.split('-');
|
|
96
|
+
if (parts.length === 1) {
|
|
97
|
+
return [ietfLanguageTag];
|
|
98
|
+
}
|
|
99
|
+
const localeStrings = [];
|
|
100
|
+
for (let i = parts.length; i > 0; i--) {
|
|
101
|
+
localeStrings.push(parts.slice(0, i).join('-'));
|
|
102
|
+
}
|
|
103
|
+
return localeStrings;
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"lib/default/","sources":["i18n/provider.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,iBAAiB,MAAM,oBAAoB,CAAC;AAGnD,OAAO,EAAE,mBAAmB,EAAiC,MAAM,WAAW,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAoB/C;;;;GAIG;AACH,MAAM,mBAAmB,GAAG,KAAK,CAAC,aAAa,CAA6B,EAAE,CAAC,CAAC;AAEhF,MAAM,UAAU,YAAY,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAqB;IAC3G,IAAI,OAAO,QAAQ,KAAK,WAAW,IAAI,CAAC,cAAc,EAAE;QACtD,QAAQ,CACN,cAAc,EACd,mHAAmH,CACpH,CAAC;KACH;IAED,yEAAyE;IACzE,4EAA4E;IAC5E,MAAM,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC;IACvD,MAAM,QAAQ,GAAG,aAAa,CAAC,CAAC,cAAc,EAAE,GAAG,aAAa,CAAC,CAAC,CAAC;IAEnE,IAAI,MAAc,CAAC;IACnB,IAAI,cAAc,EAAE;QAClB,+DAA+D;QAC/D,uEAAuE;QACvE,iCAAiC;QACjC,MAAM,GAAG,cAAc,CAAC,WAAW,EAAE,CAAC;KACvC;SAAM,IAAI,OAAO,QAAQ,KAA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BAC9F;iBACF;aACF;SACF;KACF;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,mBAAmB,CAAC,eAAuB;IAClD,MAAM,KAAK,GAAG,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACzC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QACtB,OAAO,CAAC,eAAe,CAAC,CAAC;KAC1B;IAED,MAAM,aAAa,GAAa,EAAE,CAAC;IACnC,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;QACrC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;KACjD;IACD,OAAO,aAAa,CAAC;AACvB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { useContext } from 'react';\nimport IntlMessageFormat from 'intl-messageformat';\nimport { MessageFormatElement } from '@formatjs/icu-messageformat-parser';\n\nimport { InternalI18nContext, FormatFunction, CustomHandler } from './context';\nimport { warnOnce } from '../internal/logging';\n\nexport interface I18nProviderProps {\n messages: ReadonlyArray<I18nProviderProps.Messages>;\n locale?: string;\n children: React.ReactNode;\n}\n\nexport namespace I18nProviderProps {\n export interface Messages {\n [namespace: string]: {\n [locale: string]: {\n [component: string]: {\n [key: string]: string | MessageFormatElement[];\n };\n };\n };\n }\n}\n\n/**\n * Context to send parent messages down to child I18nProviders. This isn't\n * included in the InternalI18nContext to avoid components from depending on\n * MessageFormatElement types.\n */\nconst I18nMessagesContext = React.createContext<I18nProviderProps.Messages>({});\n\nexport function I18nProvider({ messages: messagesArray, locale: providedLocale, children }: I18nProviderProps) {\n if (typeof document === 'undefined' && !providedLocale) {\n warnOnce(\n 'I18nProvider',\n 'An explicit locale was not provided during server rendering. This can lead to a hydration mismatch on the client.'\n );\n }\n\n // The provider accepts an array of configs. We merge parent messages and\n // flatten the tree early on so that accesses by key are simpler and faster.\n const parentMessages = useContext(I18nMessagesContext);\n const messages = mergeMessages([parentMessages, ...messagesArray]);\n\n let locale: string;\n if (providedLocale) {\n // If a locale is explicitly provided, use the string directly.\n // Locales have a recommended case, but are matched case-insensitively,\n // so we lowercase it internally.\n locale = providedLocale.toLowerCase();\n } else if (typeof document !== 'undefined' && document.documentElement.lang) {\n // Otherwise, use the value provided in the HTML tag.\n locale = document.documentElement.lang.toLowerCase();\n } else {\n // Lastly, fall back to English.\n locale = 'en';\n }\n\n const format: FormatFunction = <T,>(\n namespace: string,\n component: string,\n key: string,\n provided: T,\n customHandler?: CustomHandler<T>\n ): T => {\n // A general rule in the library is that undefined is basically\n // treated as \"not provided\". So even if a user explicitly provides an\n // undefined value, it will default to i18n values.\n if (provided !== undefined) {\n return provided;\n }\n\n // Widen the locale string (e.g. en-GB -> en) until we find a locale\n // that contains the message we need.\n let message: string | MessageFormatElement[] | undefined;\n const matchableLocales = getMatchableLocales(locale);\n for (const matchableLocale of matchableLocales) {\n const localeMessage = messages?.[namespace]?.[matchableLocale]?.[component]?.[key];\n if (localeMessage !== undefined) {\n message = localeMessage;\n break;\n }\n }\n\n // If a message wasn't found, exit early.\n if (message === undefined) {\n return provided;\n }\n\n const intlMessageFormat = new IntlMessageFormat(message, locale);\n if (customHandler) {\n return customHandler(args => intlMessageFormat.format(args) as string);\n }\n // Assuming `T extends string` since a customHandler wasn't provided.\n return intlMessageFormat.format() as T;\n };\n\n return (\n <InternalI18nContext.Provider value={{ locale, format }}>\n <I18nMessagesContext.Provider value={messages}>{children}</I18nMessagesContext.Provider>\n </InternalI18nContext.Provider>\n );\n}\n\nfunction mergeMessages(sources: ReadonlyArray<I18nProviderProps.Messages>): I18nProviderProps.Messages {\n const result: I18nProviderProps.Messages = {};\n for (const messages of sources) {\n for (const namespace in messages) {\n if (!(namespace in result)) {\n result[namespace] = {};\n }\n for (const casedLocale in messages[namespace]) {\n const locale = casedLocale.toLowerCase();\n if (!(locale in result[namespace])) {\n result[namespace][locale] = {};\n }\n for (const component in messages[namespace][casedLocale]) {\n if (!(component in result[namespace][locale])) {\n result[namespace][locale][component] = {};\n }\n for (const key in messages[namespace][casedLocale][component]) {\n result[namespace][locale][component][key] = messages[namespace][casedLocale][component][key];\n }\n }\n }\n }\n }\n return result;\n}\n\nfunction getMatchableLocales(ietfLanguageTag: string): string[] {\n const parts = ietfLanguageTag.split('-');\n if (parts.length === 1) {\n return [ietfLanguageTag];\n }\n\n const localeStrings: string[] = [];\n for (let i = parts.length; i > 0; i--) {\n localeStrings.push(parts.slice(0, i).join('-'));\n }\n return localeStrings;\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface TestI18nProviderProps {
|
|
3
|
+
messages: Record<string, Record<string, string>>;
|
|
4
|
+
locale?: string;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export default function TestI18nProvider({ messages, locale, children }: TestI18nProviderProps): JSX.Element;
|
|
8
|
+
//# sourceMappingURL=testing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing.d.ts","sourceRoot":"lib/default/","sources":["i18n/testing.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EAAE,QAAa,EAAE,MAAa,EAAE,QAAQ,EAAE,EAAE,qBAAqB,eAMzG"}
|
package/i18n/testing.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { I18nProvider } from './provider';
|
|
5
|
+
export default function TestI18nProvider({ messages = {}, locale = 'en', children }) {
|
|
6
|
+
return (React.createElement(I18nProvider, { locale: locale, messages: [{ '@cloudscape-design/components': { [locale]: messages } }] }, children));
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=testing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing.js","sourceRoot":"lib/default/","sources":["i18n/testing.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAQ1C,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EAAE,QAAQ,GAAG,EAAE,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,EAAyB;IACxG,OAAO,CACL,oBAAC,YAAY,IAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE,+BAA+B,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,EAAE,CAAC,IAClG,QAAQ,CACI,CAChB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { I18nProvider } from './provider';\n\nexport interface TestI18nProviderProps {\n messages: Record<string, Record<string, string>>;\n locale?: string;\n children: React.ReactNode;\n}\n\nexport default function TestI18nProvider({ messages = {}, locale = 'en', children }: TestI18nProviderProps) {\n return (\n <I18nProvider locale={locale} messages={[{ '@cloudscape-design/components': { [locale]: messages } }]}>\n {children}\n </I18nProvider>\n );\n}\n"]}
|
package/input/interfaces.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
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