@cloudscape-design/components 3.0.229 → 3.0.231
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/index.d.ts +1 -0
- package/alert/index.d.ts.map +1 -1
- package/alert/internal.d.ts +1 -0
- package/alert/internal.d.ts.map +1 -1
- package/alert/internal.js +3 -1
- package/alert/internal.js.map +1 -1
- package/annotation-context/annotation/annotation-icon.d.ts +1 -0
- package/annotation-context/annotation/annotation-icon.d.ts.map +1 -1
- package/annotation-context/annotation/closed-annotation.d.ts +1 -0
- package/annotation-context/annotation/closed-annotation.d.ts.map +1 -1
- package/annotation-context/index.d.ts +1 -11
- package/annotation-context/index.d.ts.map +1 -1
- package/annotation-context/index.js +1 -14
- package/annotation-context/index.js.map +1 -1
- package/annotation-context/interfaces.d.ts +1 -0
- package/annotation-context/interfaces.d.ts.map +1 -1
- package/annotation-context/utils.d.ts +13 -0
- package/annotation-context/utils.d.ts.map +1 -0
- package/annotation-context/utils.js +17 -0
- package/annotation-context/utils.js.map +1 -0
- package/app-layout/index.d.ts.map +1 -1
- package/app-layout/index.js +13 -1
- package/app-layout/index.js.map +1 -1
- package/app-layout/visual-refresh/app-bar.d.ts +1 -0
- package/app-layout/visual-refresh/app-bar.d.ts.map +1 -1
- package/app-layout/visual-refresh/background.d.ts +1 -0
- package/app-layout/visual-refresh/background.d.ts.map +1 -1
- package/app-layout/visual-refresh/header.d.ts +1 -0
- package/app-layout/visual-refresh/header.d.ts.map +1 -1
- package/app-layout/visual-refresh/main.d.ts +1 -0
- package/app-layout/visual-refresh/main.d.ts.map +1 -1
- package/app-layout/visual-refresh/navigation.d.ts +1 -0
- package/app-layout/visual-refresh/navigation.d.ts.map +1 -1
- package/app-layout/visual-refresh/notifications.d.ts +1 -0
- package/app-layout/visual-refresh/notifications.d.ts.map +1 -1
- package/app-layout/visual-refresh/styles.css.js +61 -61
- package/app-layout/visual-refresh/styles.scoped.css +187 -151
- package/app-layout/visual-refresh/styles.selectors.js +61 -61
- package/app-layout/visual-refresh/tools.d.ts.map +1 -1
- package/app-layout/visual-refresh/tools.js +1 -1
- package/app-layout/visual-refresh/tools.js.map +1 -1
- package/area-chart/chart-container.d.ts +1 -0
- package/area-chart/chart-container.d.ts.map +1 -1
- package/area-chart/elements/area-chart-filter.d.ts +1 -0
- package/area-chart/elements/area-chart-filter.d.ts.map +1 -1
- package/area-chart/elements/area-series.d.ts +1 -0
- package/area-chart/elements/area-series.d.ts.map +1 -1
- package/area-chart/elements/chart-popover.d.ts +1 -0
- package/area-chart/elements/chart-popover.d.ts.map +1 -1
- package/area-chart/elements/data-series.d.ts +1 -0
- package/area-chart/elements/data-series.d.ts.map +1 -1
- package/area-chart/elements/threshold-series.d.ts +1 -0
- package/area-chart/elements/threshold-series.d.ts.map +1 -1
- package/area-chart/elements/vertical-marker.d.ts +1 -0
- package/area-chart/elements/vertical-marker.d.ts.map +1 -1
- package/area-chart/index.d.ts +1 -0
- package/area-chart/index.d.ts.map +1 -1
- package/area-chart/internal.d.ts +1 -0
- package/area-chart/internal.d.ts.map +1 -1
- package/autosuggest/virtual-list.d.ts +1 -0
- package/autosuggest/virtual-list.d.ts.map +1 -1
- package/badge/index.d.ts +1 -0
- package/badge/index.d.ts.map +1 -1
- package/bar-chart/index.d.ts +1 -0
- package/bar-chart/index.d.ts.map +1 -1
- package/box/index.d.ts +1 -0
- package/box/index.d.ts.map +1 -1
- package/box/interfaces.d.ts +1 -0
- package/box/interfaces.d.ts.map +1 -1
- package/box/internal.d.ts +1 -0
- package/box/internal.d.ts.map +1 -1
- package/breadcrumb-group/index.d.ts +1 -0
- package/breadcrumb-group/index.d.ts.map +1 -1
- package/breadcrumb-group/internal.d.ts +1 -0
- package/breadcrumb-group/internal.d.ts.map +1 -1
- package/breadcrumb-group/item/item.d.ts +1 -0
- package/breadcrumb-group/item/item.d.ts.map +1 -1
- package/button-dropdown/category-elements/category-element.d.ts +1 -0
- package/button-dropdown/category-elements/category-element.d.ts.map +1 -1
- package/button-dropdown/category-elements/expandable-category-element.d.ts +1 -0
- package/button-dropdown/category-elements/expandable-category-element.d.ts.map +1 -1
- package/button-dropdown/category-elements/mobile-expandable-category-element.d.ts +1 -0
- package/button-dropdown/category-elements/mobile-expandable-category-element.d.ts.map +1 -1
- package/button-dropdown/item-element/index.d.ts +1 -0
- package/button-dropdown/item-element/index.d.ts.map +1 -1
- package/button-dropdown/items-list.d.ts +1 -0
- package/button-dropdown/items-list.d.ts.map +1 -1
- package/button-dropdown/utils/use-hidden-description.d.ts +1 -0
- package/button-dropdown/utils/use-hidden-description.d.ts.map +1 -1
- package/calendar/grid/index.d.ts +1 -0
- package/calendar/grid/index.d.ts.map +1 -1
- package/calendar/header/header-button.d.ts +1 -0
- package/calendar/header/header-button.d.ts.map +1 -1
- package/calendar/header/index.d.ts +1 -0
- package/calendar/header/index.d.ts.map +1 -1
- package/calendar/index.d.ts +1 -0
- package/calendar/index.d.ts.map +1 -1
- package/calendar/internal.d.ts +1 -0
- package/calendar/internal.d.ts.map +1 -1
- package/code-editor/pane.d.ts +1 -0
- package/code-editor/pane.d.ts.map +1 -1
- package/code-editor/preferences-modal.d.ts +1 -0
- package/code-editor/preferences-modal.d.ts.map +1 -1
- package/code-editor/preferences-modal.js +10 -12
- package/code-editor/preferences-modal.js.map +1 -1
- package/collection-preferences/index.d.ts +1 -0
- package/collection-preferences/index.d.ts.map +1 -1
- package/collection-preferences/interfaces.d.ts +1 -0
- package/collection-preferences/interfaces.d.ts.map +1 -1
- package/collection-preferences/visible-content.d.ts +1 -0
- package/collection-preferences/visible-content.d.ts.map +1 -1
- package/column-layout/index.d.ts +1 -0
- package/column-layout/index.d.ts.map +1 -1
- package/container/index.d.ts +1 -0
- package/container/index.d.ts.map +1 -1
- package/content-layout/index.d.ts +1 -0
- package/content-layout/index.d.ts.map +1 -1
- package/content-layout/interfaces.d.ts +1 -0
- package/content-layout/interfaces.d.ts.map +1 -1
- package/content-layout/internal.d.ts +1 -0
- package/content-layout/internal.d.ts.map +1 -1
- package/date-range-picker/calendar/header/header-button.d.ts +1 -0
- package/date-range-picker/calendar/header/header-button.d.ts.map +1 -1
- package/date-range-picker/calendar/header/index.d.ts +1 -0
- package/date-range-picker/calendar/header/index.d.ts.map +1 -1
- package/date-range-picker/calendar/range-inputs.d.ts +1 -0
- package/date-range-picker/calendar/range-inputs.d.ts.map +1 -1
- package/date-range-picker/dropdown.d.ts +1 -0
- package/date-range-picker/dropdown.d.ts.map +1 -1
- package/date-range-picker/dropdown.js +4 -4
- package/date-range-picker/dropdown.js.map +1 -1
- package/date-range-picker/mode-switcher.d.ts +1 -0
- package/date-range-picker/mode-switcher.d.ts.map +1 -1
- package/date-range-picker/relative-range/index.d.ts +1 -0
- package/date-range-picker/relative-range/index.d.ts.map +1 -1
- package/expandable-section/index.d.ts +1 -0
- package/expandable-section/index.d.ts.map +1 -1
- package/expandable-section/internal.d.ts +1 -0
- package/expandable-section/internal.d.ts.map +1 -1
- package/flashbar/collapsible-flashbar.d.ts +1 -0
- package/flashbar/collapsible-flashbar.d.ts.map +1 -1
- package/flashbar/collapsible-flashbar.js +15 -4
- package/flashbar/collapsible-flashbar.js.map +1 -1
- package/flashbar/common.d.ts +2 -2
- package/flashbar/common.d.ts.map +1 -1
- package/flashbar/common.js +1 -2
- package/flashbar/common.js.map +1 -1
- package/flashbar/index.d.ts +1 -0
- package/flashbar/index.d.ts.map +1 -1
- package/flashbar/interfaces.d.ts +1 -1
- package/flashbar/interfaces.d.ts.map +1 -1
- package/flashbar/interfaces.js.map +1 -1
- package/flashbar/internal/analytics.js +1 -1
- package/flashbar/internal/analytics.js.map +1 -1
- package/flashbar/non-collapsible-flashbar.d.ts +2 -1
- package/flashbar/non-collapsible-flashbar.d.ts.map +1 -1
- package/flashbar/non-collapsible-flashbar.js +5 -2
- package/flashbar/non-collapsible-flashbar.js.map +1 -1
- package/form/index.d.ts +1 -0
- package/form/index.d.ts.map +1 -1
- package/form/internal.d.ts +2 -1
- package/form/internal.d.ts.map +1 -1
- package/form/internal.js +4 -1
- package/form/internal.js.map +1 -1
- package/form-field/index.d.ts +1 -0
- package/form-field/index.d.ts.map +1 -1
- package/form-field/internal.d.ts.map +1 -1
- package/form-field/internal.js +9 -5
- package/form-field/internal.js.map +1 -1
- package/form-field/util.d.ts +1 -0
- package/form-field/util.d.ts.map +1 -1
- package/grid/index.d.ts +1 -0
- package/grid/index.d.ts.map +1 -1
- package/header/index.d.ts +1 -0
- package/header/index.d.ts.map +1 -1
- package/header/internal.d.ts +1 -0
- package/header/internal.d.ts.map +1 -1
- package/help-panel/index.d.ts +1 -0
- package/help-panel/index.d.ts.map +1 -1
- package/hotspot/index.d.ts +1 -0
- package/hotspot/index.d.ts.map +1 -1
- package/hotspot/interfaces.d.ts +1 -0
- package/hotspot/interfaces.d.ts.map +1 -1
- package/icon/index.d.ts +1 -0
- package/icon/index.d.ts.map +1 -1
- package/icon/internal.d.ts +1 -0
- package/icon/internal.d.ts.map +1 -1
- package/input/internal.d.ts.map +1 -1
- package/input/internal.js +4 -2
- package/input/internal.js.map +1 -1
- package/internal/base-component/index.d.ts.map +1 -1
- package/internal/base-component/index.js +2 -2
- package/internal/base-component/index.js.map +1 -1
- package/internal/components/cartesian-chart/axis-label.d.ts +1 -0
- package/internal/components/cartesian-chart/axis-label.d.ts.map +1 -1
- package/internal/components/cartesian-chart/bottom-labels.d.ts +1 -0
- package/internal/components/cartesian-chart/bottom-labels.d.ts.map +1 -1
- package/internal/components/cartesian-chart/emphasized-baseline.d.ts +1 -0
- package/internal/components/cartesian-chart/emphasized-baseline.d.ts.map +1 -1
- package/internal/components/cartesian-chart/interfaces.d.ts +1 -0
- package/internal/components/cartesian-chart/interfaces.d.ts.map +1 -1
- package/internal/components/cartesian-chart/labels-measure.d.ts +1 -0
- package/internal/components/cartesian-chart/labels-measure.d.ts.map +1 -1
- package/internal/components/cartesian-chart/left-labels.d.ts +1 -0
- package/internal/components/cartesian-chart/left-labels.d.ts.map +1 -1
- package/internal/components/cartesian-chart/vertical-grid-lines.d.ts +1 -0
- package/internal/components/cartesian-chart/vertical-grid-lines.d.ts.map +1 -1
- package/internal/components/chart-filter/index.d.ts +1 -0
- package/internal/components/chart-filter/index.d.ts.map +1 -1
- package/internal/components/checkbox-icon/index.d.ts +1 -0
- package/internal/components/checkbox-icon/index.d.ts.map +1 -1
- package/internal/components/dropdown/index.d.ts +1 -0
- package/internal/components/dropdown/index.d.ts.map +1 -1
- package/internal/components/menu-dropdown/interfaces.d.ts +1 -0
- package/internal/components/menu-dropdown/interfaces.d.ts.map +1 -1
- package/internal/components/option/highlight-match.d.ts +1 -0
- package/internal/components/option/highlight-match.d.ts.map +1 -1
- package/internal/components/option/index.d.ts +1 -0
- package/internal/components/option/index.d.ts.map +1 -1
- package/internal/components/option/option-parts.d.ts +1 -0
- package/internal/components/option/option-parts.d.ts.map +1 -1
- package/internal/context/app-layout-context.d.ts +1 -0
- package/internal/context/app-layout-context.d.ts.map +1 -1
- package/internal/context/form-field-context.d.ts +1 -0
- package/internal/context/form-field-context.d.ts.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/hooks/use-base-component/index.js +1 -1
- package/internal/hooks/use-base-component/index.js.map +1 -1
- package/internal/hooks/use-dynamic-overlap/index.d.ts +1 -0
- package/internal/hooks/use-dynamic-overlap/index.d.ts.map +1 -1
- package/internal/hooks/use-telemetry/index.js +2 -2
- package/internal/hooks/use-telemetry/index.js.map +1 -1
- package/internal/i18n/context.d.ts +15 -0
- package/internal/i18n/context.d.ts.map +1 -0
- package/internal/i18n/context.js +17 -0
- package/internal/i18n/context.js.map +1 -0
- package/internal/i18n/index.d.ts +2 -0
- package/internal/i18n/index.d.ts.map +1 -0
- package/internal/i18n/index.js +4 -0
- package/internal/i18n/index.js.map +1 -0
- package/internal/i18n/messages/all.all.d.ts +3 -0
- package/internal/i18n/messages/all.all.js +1953 -0
- package/internal/i18n/messages/all.all.json +1971 -0
- package/internal/i18n/messages/all.de.d.ts +3 -0
- package/internal/i18n/messages/all.de.js +167 -0
- package/internal/i18n/messages/all.de.json +167 -0
- package/internal/i18n/messages/all.en-GB.d.ts +3 -0
- package/internal/i18n/messages/all.en-GB.js +167 -0
- package/internal/i18n/messages/all.en-GB.json +167 -0
- package/internal/i18n/messages/all.en.d.ts +3 -0
- package/internal/i18n/messages/all.en.js +167 -0
- package/internal/i18n/messages/all.en.json +167 -0
- package/internal/i18n/messages/all.es.d.ts +3 -0
- package/internal/i18n/messages/all.es.js +167 -0
- package/internal/i18n/messages/all.es.json +167 -0
- package/internal/i18n/messages/all.fr.d.ts +3 -0
- package/internal/i18n/messages/all.fr.js +167 -0
- package/internal/i18n/messages/all.fr.json +167 -0
- package/internal/i18n/messages/all.id.d.ts +3 -0
- package/internal/i18n/messages/all.id.js +167 -0
- package/internal/i18n/messages/all.id.json +167 -0
- package/internal/i18n/messages/all.it.d.ts +3 -0
- package/internal/i18n/messages/all.it.js +167 -0
- package/internal/i18n/messages/all.it.json +167 -0
- package/internal/i18n/messages/all.ja.d.ts +3 -0
- package/internal/i18n/messages/all.ja.js +175 -0
- package/internal/i18n/messages/all.ja.json +175 -0
- package/internal/i18n/messages/all.ko.d.ts +3 -0
- package/internal/i18n/messages/all.ko.js +161 -0
- package/internal/i18n/messages/all.ko.json +167 -0
- package/internal/i18n/messages/all.pt-BR.d.ts +3 -0
- package/internal/i18n/messages/all.pt-BR.js +167 -0
- package/internal/i18n/messages/all.pt-BR.json +167 -0
- package/internal/i18n/messages/all.zh-CN.d.ts +3 -0
- package/internal/i18n/messages/all.zh-CN.js +163 -0
- package/internal/i18n/messages/all.zh-CN.json +169 -0
- package/internal/i18n/messages/all.zh-TW.d.ts +3 -0
- package/internal/i18n/messages/all.zh-TW.js +162 -0
- package/internal/i18n/messages/all.zh-TW.json +168 -0
- package/internal/i18n/provider.d.ts +20 -0
- package/internal/i18n/provider.d.ts.map +1 -0
- package/internal/i18n/provider.js +90 -0
- package/internal/i18n/provider.js.map +1 -0
- package/internal/manifest.json +1 -1
- package/line-chart/index.d.ts +1 -0
- package/line-chart/index.d.ts.map +1 -1
- package/mixed-line-bar-chart/bar-series.d.ts +1 -0
- package/mixed-line-bar-chart/bar-series.d.ts.map +1 -1
- package/mixed-line-bar-chart/data-series.d.ts +1 -0
- package/mixed-line-bar-chart/data-series.d.ts.map +1 -1
- package/mixed-line-bar-chart/hooks/use-mouse-hover.d.ts +1 -0
- package/mixed-line-bar-chart/hooks/use-mouse-hover.d.ts.map +1 -1
- package/mixed-line-bar-chart/index.d.ts +1 -0
- package/mixed-line-bar-chart/index.d.ts.map +1 -1
- package/mixed-line-bar-chart/internal.d.ts +1 -0
- package/mixed-line-bar-chart/internal.d.ts.map +1 -1
- package/mixed-line-bar-chart/line-series.d.ts +1 -0
- package/mixed-line-bar-chart/line-series.d.ts.map +1 -1
- package/modal/index.d.ts +1 -0
- package/modal/index.d.ts.map +1 -1
- package/modal/internal.d.ts +2 -1
- package/modal/internal.d.ts.map +1 -1
- package/modal/internal.js +15 -10
- package/modal/internal.js.map +1 -1
- package/multiselect/internal.d.ts.map +1 -1
- package/multiselect/internal.js +2 -2
- package/multiselect/internal.js.map +1 -1
- package/package.json +31 -2
- package/pagination/index.d.ts +1 -0
- package/pagination/index.d.ts.map +1 -1
- package/pagination/internal.d.ts +1 -0
- package/pagination/internal.d.ts.map +1 -1
- package/pagination/internal.js +10 -5
- package/pagination/internal.js.map +1 -1
- package/pie-chart/index.d.ts +1 -0
- package/pie-chart/index.d.ts.map +1 -1
- package/pie-chart/interfaces.d.ts +1 -0
- package/pie-chart/interfaces.d.ts.map +1 -1
- package/popover/index.d.ts +1 -0
- package/popover/index.d.ts.map +1 -1
- package/popover/interfaces.d.ts +1 -0
- package/popover/interfaces.d.ts.map +1 -1
- package/popover/internal.d.ts.map +1 -1
- package/popover/internal.js +15 -10
- package/popover/internal.js.map +1 -1
- package/progress-bar/index.d.ts +1 -0
- package/progress-bar/index.d.ts.map +1 -1
- package/progress-bar/interfaces.d.ts +1 -0
- package/progress-bar/interfaces.d.ts.map +1 -1
- package/property-filter/controller.d.ts +16 -1
- package/property-filter/controller.d.ts.map +1 -1
- package/property-filter/controller.js +4 -2
- package/property-filter/controller.js.map +1 -1
- package/property-filter/index.d.ts.map +1 -1
- package/property-filter/index.js +23 -3
- package/property-filter/index.js.map +1 -1
- package/property-filter/interfaces.d.ts +24 -24
- package/property-filter/interfaces.d.ts.map +1 -1
- package/property-filter/interfaces.js.map +1 -1
- package/property-filter/property-editor.d.ts +1 -0
- package/property-filter/property-editor.d.ts.map +1 -1
- package/property-filter/token-editor.js +2 -2
- package/property-filter/token-editor.js.map +1 -1
- package/property-filter/token.d.ts +1 -0
- package/property-filter/token.d.ts.map +1 -1
- package/property-filter/token.js +2 -2
- package/property-filter/token.js.map +1 -1
- package/segmented-control/index.d.ts +1 -0
- package/segmented-control/index.d.ts.map +1 -1
- package/segmented-control/internal-segmented-control.d.ts +1 -0
- package/segmented-control/internal-segmented-control.d.ts.map +1 -1
- package/segmented-control/internal.d.ts +1 -0
- package/segmented-control/internal.d.ts.map +1 -1
- package/select/internal.d.ts.map +1 -1
- package/select/internal.js +6 -2
- package/select/internal.js.map +1 -1
- package/select/utils/render-options.d.ts +1 -0
- package/select/utils/render-options.d.ts.map +1 -1
- package/side-navigation/index.d.ts +1 -0
- package/side-navigation/index.d.ts.map +1 -1
- package/space-between/index.d.ts +1 -0
- package/space-between/index.d.ts.map +1 -1
- package/space-between/interfaces.d.ts +1 -0
- package/space-between/interfaces.d.ts.map +1 -1
- package/space-between/internal.d.ts +1 -0
- package/space-between/internal.d.ts.map +1 -1
- package/spinner/index.d.ts +1 -0
- package/spinner/index.d.ts.map +1 -1
- package/spinner/internal.d.ts +1 -0
- package/spinner/internal.d.ts.map +1 -1
- package/split-panel/icons/bottom-icon-refresh.d.ts +1 -0
- package/split-panel/icons/bottom-icon-refresh.d.ts.map +1 -1
- package/split-panel/icons/bottom-icon.d.ts +1 -0
- package/split-panel/icons/bottom-icon.d.ts.map +1 -1
- package/split-panel/icons/resize-handler.d.ts +1 -0
- package/split-panel/icons/resize-handler.d.ts.map +1 -1
- package/split-panel/icons/side-position-refresh.d.ts +1 -0
- package/split-panel/icons/side-position-refresh.d.ts.map +1 -1
- package/split-panel/icons/side-position.d.ts +1 -0
- package/split-panel/icons/side-position.d.ts.map +1 -1
- package/split-panel/index.d.ts +1 -0
- package/split-panel/index.d.ts.map +1 -1
- package/split-panel/preferences-modal.d.ts +1 -0
- package/split-panel/preferences-modal.d.ts.map +1 -1
- package/status-indicator/index.d.ts +1 -0
- package/status-indicator/index.d.ts.map +1 -1
- package/table/body-cell/index.d.ts +1 -0
- package/table/body-cell/index.d.ts.map +1 -1
- package/table/body-cell/inline-editor.d.ts +1 -0
- package/table/body-cell/inline-editor.d.ts.map +1 -1
- package/table/resizer/index.d.ts +1 -0
- package/table/resizer/index.d.ts.map +1 -1
- package/table/sticky-scrolling.d.ts +1 -0
- package/table/sticky-scrolling.d.ts.map +1 -1
- package/tabs/index.d.ts +1 -0
- package/tabs/index.d.ts.map +1 -1
- package/tabs/interfaces.d.ts +1 -0
- package/tabs/interfaces.d.ts.map +1 -1
- package/tabs/tab-header-bar.d.ts +1 -0
- package/tabs/tab-header-bar.d.ts.map +1 -1
- package/test-utils/dom/split-panel/index.js +2 -1
- package/test-utils/dom/split-panel/index.js.map +1 -1
- package/test-utils/selectors/split-panel/index.js +2 -1
- package/test-utils/selectors/split-panel/index.js.map +1 -1
- package/test-utils/tsconfig.tsbuildinfo +1 -1
- package/text-content/index.d.ts +1 -0
- package/text-content/index.d.ts.map +1 -1
- package/token-group/dismiss-button.d.ts +1 -0
- package/token-group/dismiss-button.d.ts.map +1 -1
- package/token-group/index.d.ts +1 -0
- package/token-group/index.d.ts.map +1 -1
- package/token-group/internal.d.ts +1 -0
- package/token-group/internal.d.ts.map +1 -1
- package/token-group/toggle.d.ts +1 -0
- package/token-group/toggle.d.ts.map +1 -1
- package/top-navigation/1.0-beta/index.d.ts +1 -0
- package/top-navigation/1.0-beta/index.d.ts.map +1 -1
- package/top-navigation/1.0-beta/interfaces.d.ts +1 -0
- package/top-navigation/1.0-beta/interfaces.d.ts.map +1 -1
- package/top-navigation/1.0-beta/internal.d.ts +1 -0
- package/top-navigation/1.0-beta/internal.d.ts.map +1 -1
- package/top-navigation/1.0-beta/parts/utility.d.ts +1 -0
- package/top-navigation/1.0-beta/parts/utility.d.ts.map +1 -1
- package/top-navigation/index.d.ts +1 -0
- package/top-navigation/index.d.ts.map +1 -1
- package/top-navigation/interfaces.d.ts +1 -0
- package/top-navigation/interfaces.d.ts.map +1 -1
- package/top-navigation/internal.d.ts +1 -0
- package/top-navigation/internal.d.ts.map +1 -1
- package/top-navigation/parts/overflow-menu/index.d.ts +1 -0
- package/top-navigation/parts/overflow-menu/index.d.ts.map +1 -1
- package/top-navigation/parts/overflow-menu/views/submenu.d.ts +1 -0
- package/top-navigation/parts/overflow-menu/views/submenu.d.ts.map +1 -1
- package/top-navigation/parts/overflow-menu/views/utilities.d.ts +1 -0
- package/top-navigation/parts/overflow-menu/views/utilities.d.ts.map +1 -1
- package/top-navigation/parts/utility.d.ts +1 -0
- package/top-navigation/parts/utility.d.ts.map +1 -1
- package/tutorial-panel/components/tutorial-detail-view/index.d.ts +1 -0
- package/tutorial-panel/components/tutorial-detail-view/index.d.ts.map +1 -1
- package/tutorial-panel/components/tutorial-detail-view/task-list.d.ts +1 -0
- package/tutorial-panel/components/tutorial-detail-view/task-list.d.ts.map +1 -1
- package/tutorial-panel/components/tutorial-detail-view/task-list.js +1 -1
- package/tutorial-panel/components/tutorial-detail-view/task-list.js.map +1 -1
- package/tutorial-panel/components/tutorial-detail-view/task.d.ts +1 -0
- package/tutorial-panel/components/tutorial-detail-view/task.d.ts.map +1 -1
- package/tutorial-panel/components/tutorial-list/index.d.ts +1 -0
- package/tutorial-panel/components/tutorial-list/index.d.ts.map +1 -1
- package/tutorial-panel/index.d.ts +1 -0
- package/tutorial-panel/index.d.ts.map +1 -1
- package/wizard/index.d.ts +1 -0
- package/wizard/index.d.ts.map +1 -1
- package/wizard/internal/analytics.js +1 -1
- package/wizard/internal/analytics.js.map +1 -1
- package/wizard/wizard-actions.d.ts +1 -0
- package/wizard/wizard-actions.d.ts.map +1 -1
- package/wizard/wizard-navigation.d.ts +1 -0
- package/wizard/wizard-navigation.d.ts.map +1 -1
- package/internal/base-component/init-awsui-versions.d.ts +0 -2
- package/internal/base-component/init-awsui-versions.d.ts.map +0 -1
- package/internal/base-component/init-awsui-versions.js +0 -15
- package/internal/base-component/init-awsui-versions.js.map +0 -1
- package/internal/hooks/use-base-component/component-metadata.d.ts +0 -3
- package/internal/hooks/use-base-component/component-metadata.d.ts.map +0 -1
- package/internal/hooks/use-base-component/component-metadata.js +0 -21
- package/internal/hooks/use-base-component/component-metadata.js.map +0 -1
- package/internal/hooks/use-telemetry/telemetry.d.ts +0 -8
- package/internal/hooks/use-telemetry/telemetry.d.ts.map +0 -1
- package/internal/hooks/use-telemetry/telemetry.js +0 -19
- package/internal/hooks/use-telemetry/telemetry.js.map +0 -1
- package/internal/metrics/index.d.ts +0 -3
- package/internal/metrics/index.d.ts.map +0 -1
- package/internal/metrics/index.js +0 -5
- package/internal/metrics/index.js.map +0 -1
- package/internal/metrics/log-clients.d.ts +0 -39
- package/internal/metrics/log-clients.d.ts.map +0 -1
- package/internal/metrics/log-clients.js +0 -81
- package/internal/metrics/log-clients.js.map +0 -1
- package/internal/metrics/metrics-formatters.d.ts +0 -7
- package/internal/metrics/metrics-formatters.d.ts.map +0 -1
- package/internal/metrics/metrics-formatters.js +0 -33
- package/internal/metrics/metrics-formatters.js.map +0 -1
- package/internal/metrics/metrics.d.ts +0 -28
- package/internal/metrics/metrics.d.ts.map +0 -1
- package/internal/metrics/metrics.js +0 -89
- package/internal/metrics/metrics.js.map +0 -1
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@cloudscape-design/components": {
|
|
3
|
+
"zh-CN": {
|
|
4
|
+
"alert": { "dismissAriaLabel": [{ "type": 0, "value": "退出提示" }] },
|
|
5
|
+
"autosuggest": {
|
|
6
|
+
"stepNumberLabel": [
|
|
7
|
+
{ "type": 0, "value": "第 " },
|
|
8
|
+
{ "type": 1, "value": "stepNumber" },
|
|
9
|
+
{ "type": 0, "value": " 步" }
|
|
10
|
+
],
|
|
11
|
+
"collapsedStepsLabel": [
|
|
12
|
+
{ "type": 0, "value": "第 " },
|
|
13
|
+
{ "type": 1, "value": "stepNumber" },
|
|
14
|
+
{ "type": 0, "value": " 步,共 " },
|
|
15
|
+
{ "type": 1, "value": "stepsCount" },
|
|
16
|
+
{ "type": 0, "value": " 步" }
|
|
17
|
+
],
|
|
18
|
+
"cancelButton": [{ "type": 0, "value": "取消" }],
|
|
19
|
+
"previousButton": [{ "type": 0, "value": "上一步" }],
|
|
20
|
+
"nextButton": [{ "type": 0, "value": "下一步" }],
|
|
21
|
+
"optional": [{ "type": 0, "value": "可选" }]
|
|
22
|
+
},
|
|
23
|
+
"app-layout": {
|
|
24
|
+
"ariaLabels.navigation": [{ "type": 0, "value": "侧导航" }],
|
|
25
|
+
"ariaLabels.navigationClose": [{ "type": 0, "value": "关闭侧导航" }],
|
|
26
|
+
"ariaLabels.navigationToggle": [{ "type": 0, "value": "打开侧导航" }],
|
|
27
|
+
"ariaLabels.notifications": [{ "type": 0, "value": "通知" }],
|
|
28
|
+
"ariaLabels.tools": [{ "type": 0, "value": "帮助面板" }],
|
|
29
|
+
"ariaLabels.toolsClose": [{ "type": 0, "value": "打开帮助面板" }],
|
|
30
|
+
"ariaLabels.toolsToggle": [{ "type": 0, "value": "关闭帮助面板" }]
|
|
31
|
+
},
|
|
32
|
+
"date-picker": {
|
|
33
|
+
"nextMonthAriaLabel": [{ "type": 0, "value": "下个月" }],
|
|
34
|
+
"previousMonthAriaLabel": [{ "type": 0, "value": "上个月" }],
|
|
35
|
+
"todayAriaLabel": [{ "type": 0, "value": "今天" }]
|
|
36
|
+
},
|
|
37
|
+
"flashbar": {
|
|
38
|
+
"i18nStrings.ariaLabel": [{ "type": 0, "value": "通知" }],
|
|
39
|
+
"i18nStrings.errorIconAriaLabel": [{ "type": 0, "value": "错误" }],
|
|
40
|
+
"i18nStrings.inProgressIconAriaLabel": [{ "type": 0, "value": "进行中" }],
|
|
41
|
+
"i18nStrings.infoIconAriaLabel": [{ "type": 0, "value": "信息" }],
|
|
42
|
+
"i18nStrings.notificationBarAriaLabel": [{ "type": 0, "value": "所有通知" }],
|
|
43
|
+
"i18nStrings.notificationBarText": [{ "type": 0, "value": "通知" }],
|
|
44
|
+
"i18nStrings.successIconAriaLabel": [{ "type": 0, "value": "成功" }],
|
|
45
|
+
"i18nStrings.warningIconAriaLabel": [{ "type": 0, "value": "警告" }]
|
|
46
|
+
},
|
|
47
|
+
"form": { "errorIconAriaLabel": [{ "type": 0, "value": "错误" }] },
|
|
48
|
+
"form-field": { "i18nStrings.errorIconAriaLabel": [{ "type": 0, "value": "错误" }] },
|
|
49
|
+
"input": { "clearAriaLabel": [{ "type": 0, "value": "清除" }] },
|
|
50
|
+
"modal": { "closeAriaLabel": [{ "type": 0, "value": "关闭模态" }] },
|
|
51
|
+
"pagination": {
|
|
52
|
+
"ariaLabels.nextPageLabel": [{ "type": 0, "value": "下一页" }],
|
|
53
|
+
"ariaLabels.pageLabel": [
|
|
54
|
+
{ "type": 0, "value": "第 " },
|
|
55
|
+
{ "type": 1, "value": "pageNumber" },
|
|
56
|
+
{ "type": 0, "value": " 页" }
|
|
57
|
+
],
|
|
58
|
+
"ariaLabels.previousPageLabel": [{ "type": 0, "value": "上一页" }]
|
|
59
|
+
},
|
|
60
|
+
"popover": { "dismissAriaLabel": [{ "type": 0, "value": "关闭弹出框" }] },
|
|
61
|
+
"property-filter": {
|
|
62
|
+
"i18nStrings.allPropertiesLabel": [{ "type": 0, "value": "所有属性" }],
|
|
63
|
+
"i18nStrings.applyActionText": [{ "type": 0, "value": "应用" }],
|
|
64
|
+
"i18nStrings.cancelActionText": [{ "type": 0, "value": "取消" }],
|
|
65
|
+
"i18nStrings.clearFiltersText": [{ "type": 0, "value": "清除筛选条件" }],
|
|
66
|
+
"i18nStrings.editTokenHeader": [{ "type": 0, "value": "编辑筛选条件" }],
|
|
67
|
+
"i18nStrings.groupPropertiesText": [{ "type": 0, "value": "属性" }],
|
|
68
|
+
"i18nStrings.groupValuesText": [{ "type": 0, "value": "值" }],
|
|
69
|
+
"i18nStrings.operationAndText": [{ "type": 0, "value": "和" }],
|
|
70
|
+
"i18nStrings.operationOrText": [{ "type": 0, "value": "或" }],
|
|
71
|
+
"i18nStrings.operatorContainsText": [{ "type": 0, "value": "包含" }],
|
|
72
|
+
"i18nStrings.operatorDoesNotContainText": [{ "type": 0, "value": "不包含" }],
|
|
73
|
+
"i18nStrings.operatorDoesNotEqualText": [{ "type": 0, "value": "不等于" }],
|
|
74
|
+
"i18nStrings.operatorEqualsText": [{ "type": 0, "value": "等于" }],
|
|
75
|
+
"i18nStrings.operatorGreaterOrEqualText": [{ "type": 0, "value": "大于或等于" }],
|
|
76
|
+
"i18nStrings.operatorGreaterText": [{ "type": 0, "value": "大于" }],
|
|
77
|
+
"i18nStrings.operatorLessOrEqualText": [{ "type": 0, "value": "小于或等于" }],
|
|
78
|
+
"i18nStrings.operatorLessText": [{ "type": 0, "value": "小于" }],
|
|
79
|
+
"i18nStrings.operatorText": [{ "type": 0, "value": "运算符" }],
|
|
80
|
+
"i18nStrings.operatorsText": [{ "type": 0, "value": "运算符" }],
|
|
81
|
+
"i18nStrings.propertyText": [{ "type": 0, "value": "属性" }],
|
|
82
|
+
"i18nStrings.tokenLimitShowFewer": [{ "type": 0, "value": "显示更少" }],
|
|
83
|
+
"i18nStrings.tokenLimitShowMore": [{ "type": 0, "value": "显示更多" }],
|
|
84
|
+
"i18nStrings.valueText": [{ "type": 0, "value": "值" }],
|
|
85
|
+
"i18nStrings.removeTokenButtonAriaLabel": [
|
|
86
|
+
{
|
|
87
|
+
"type": 5,
|
|
88
|
+
"value": "token__operator",
|
|
89
|
+
"options": {
|
|
90
|
+
"equals": {
|
|
91
|
+
"value": [
|
|
92
|
+
{ "type": 0, "value": "删除筛选条件," },
|
|
93
|
+
{ "type": 1, "value": "token__propertyKey" },
|
|
94
|
+
{ "type": 0, "value": "等于" },
|
|
95
|
+
{ "type": 1, "value": "token__value" }
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
"not_equals": {
|
|
99
|
+
"value": [
|
|
100
|
+
{ "type": 0, "value": "删除筛选条件," },
|
|
101
|
+
{ "type": 1, "value": "token__propertyKey" },
|
|
102
|
+
{ "type": 0, "value": "不等于" },
|
|
103
|
+
{ "type": 1, "value": "token__value" }
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
"greater_than": {
|
|
107
|
+
"value": [
|
|
108
|
+
{ "type": 0, "value": "删除筛选条件," },
|
|
109
|
+
{ "type": 1, "value": "token__propertyKey" },
|
|
110
|
+
{ "type": 0, "value": "大于" },
|
|
111
|
+
{ "type": 1, "value": "token__value" }
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
"greater_than_equal": {
|
|
115
|
+
"value": [
|
|
116
|
+
{ "type": 0, "value": "删除筛选条件," },
|
|
117
|
+
{ "type": 1, "value": "token__propertyKey" },
|
|
118
|
+
{ "type": 0, "value": "大于或等于" },
|
|
119
|
+
{ "type": 1, "value": "token__value" }
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
"less_than": {
|
|
123
|
+
"value": [
|
|
124
|
+
{ "type": 0, "value": "删除筛选条件," },
|
|
125
|
+
{ "type": 1, "value": "token__propertyKey" },
|
|
126
|
+
{ "type": 0, "value": "小于" },
|
|
127
|
+
{ "type": 1, "value": "token__value" }
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
"less_than_equal": {
|
|
131
|
+
"value": [
|
|
132
|
+
{ "type": 0, "value": "删除筛选条件," },
|
|
133
|
+
{ "type": 1, "value": "token__propertyKey" },
|
|
134
|
+
{ "type": 0, "value": "小于或等于" },
|
|
135
|
+
{ "type": 1, "value": "token__value" }
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
"contains": {
|
|
139
|
+
"value": [
|
|
140
|
+
{ "type": 0, "value": "删除筛选条件," },
|
|
141
|
+
{ "type": 1, "value": "token__propertyKey" },
|
|
142
|
+
{ "type": 0, "value": "包含" },
|
|
143
|
+
{ "type": 1, "value": "token__value" }
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
"not_contains": {
|
|
147
|
+
"value": [
|
|
148
|
+
{ "type": 0, "value": "删除筛选条件," },
|
|
149
|
+
{ "type": 1, "value": "token__propertyKey" },
|
|
150
|
+
{ "type": 0, "value": "不包含" },
|
|
151
|
+
{ "type": 1, "value": "token__value" }
|
|
152
|
+
]
|
|
153
|
+
},
|
|
154
|
+
"other": { "value": [] }
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
"select": {
|
|
160
|
+
"errorIconAriaLabel": [{ "type": 0, "value": "错误" }],
|
|
161
|
+
"selectedAriaLabel": [{ "type": 0, "value": "已选定" }]
|
|
162
|
+
},
|
|
163
|
+
"wizard": {
|
|
164
|
+
"errorIconAriaLabel": [{ "type": 0, "value": "错误" }],
|
|
165
|
+
"selectedAriaLabel": [{ "type": 0, "value": "已选定" }]
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
'@cloudscape-design/components': {
|
|
3
|
+
'zh-TW': {
|
|
4
|
+
alert: { dismissAriaLabel: [{ type: 0, value: '關閉提醒' }] },
|
|
5
|
+
autosuggest: {
|
|
6
|
+
stepNumberLabel: [
|
|
7
|
+
{ type: 0, value: '步驟 ' },
|
|
8
|
+
{ type: 1, value: 'stepNumber' },
|
|
9
|
+
],
|
|
10
|
+
collapsedStepsLabel: [
|
|
11
|
+
{ type: 0, value: '步驟 ' },
|
|
12
|
+
{ type: 1, value: 'stepNumber' },
|
|
13
|
+
{ type: 0, value: ',共 ' },
|
|
14
|
+
{ type: 1, value: 'stepsCount' },
|
|
15
|
+
{ type: 0, value: ' 步' },
|
|
16
|
+
],
|
|
17
|
+
cancelButton: [{ type: 0, value: '取消' }],
|
|
18
|
+
previousButton: [{ type: 0, value: '上一步' }],
|
|
19
|
+
nextButton: [{ type: 0, value: '下一步' }],
|
|
20
|
+
optional: [{ type: 0, value: '選用' }],
|
|
21
|
+
},
|
|
22
|
+
'app-layout': {
|
|
23
|
+
'ariaLabels.navigation': [{ type: 0, value: '側邊導覽' }],
|
|
24
|
+
'ariaLabels.navigationClose': [{ type: 0, value: '關閉側邊導覽' }],
|
|
25
|
+
'ariaLabels.navigationToggle': [{ type: 0, value: '開啟側邊導覽' }],
|
|
26
|
+
'ariaLabels.notifications': [{ type: 0, value: '通知' }],
|
|
27
|
+
'ariaLabels.tools': [{ type: 0, value: '說明面板' }],
|
|
28
|
+
'ariaLabels.toolsClose': [{ type: 0, value: '開啟說明面板' }],
|
|
29
|
+
'ariaLabels.toolsToggle': [{ type: 0, value: '關閉說明面板' }],
|
|
30
|
+
},
|
|
31
|
+
'date-picker': {
|
|
32
|
+
nextMonthAriaLabel: [{ type: 0, value: '下個月' }],
|
|
33
|
+
previousMonthAriaLabel: [{ type: 0, value: '上個月' }],
|
|
34
|
+
todayAriaLabel: [{ type: 0, value: '今天' }],
|
|
35
|
+
},
|
|
36
|
+
flashbar: {
|
|
37
|
+
'i18nStrings.ariaLabel': [{ type: 0, value: '通知' }],
|
|
38
|
+
'i18nStrings.errorIconAriaLabel': [{ type: 0, value: '錯誤' }],
|
|
39
|
+
'i18nStrings.inProgressIconAriaLabel': [{ type: 0, value: '進行中' }],
|
|
40
|
+
'i18nStrings.infoIconAriaLabel': [{ type: 0, value: '資訊' }],
|
|
41
|
+
'i18nStrings.notificationBarAriaLabel': [{ type: 0, value: '所有通知' }],
|
|
42
|
+
'i18nStrings.notificationBarText': [{ type: 0, value: '通知' }],
|
|
43
|
+
'i18nStrings.successIconAriaLabel': [{ type: 0, value: '成功' }],
|
|
44
|
+
'i18nStrings.warningIconAriaLabel': [{ type: 0, value: '警告' }],
|
|
45
|
+
},
|
|
46
|
+
form: { errorIconAriaLabel: [{ type: 0, value: '錯誤' }] },
|
|
47
|
+
'form-field': { 'i18nStrings.errorIconAriaLabel': [{ type: 0, value: '錯誤' }] },
|
|
48
|
+
input: { clearAriaLabel: [{ type: 0, value: '清除' }] },
|
|
49
|
+
modal: { closeAriaLabel: [{ type: 0, value: '關閉強制回應' }] },
|
|
50
|
+
pagination: {
|
|
51
|
+
'ariaLabels.nextPageLabel': [{ type: 0, value: '下一頁' }],
|
|
52
|
+
'ariaLabels.pageLabel': [
|
|
53
|
+
{ type: 0, value: '所有頁面中的第 ' },
|
|
54
|
+
{ type: 1, value: 'pageNumber' },
|
|
55
|
+
{ type: 0, value: ' 頁' },
|
|
56
|
+
],
|
|
57
|
+
'ariaLabels.previousPageLabel': [{ type: 0, value: '上一頁' }],
|
|
58
|
+
},
|
|
59
|
+
popover: { dismissAriaLabel: [{ type: 0, value: '關閉彈出視窗' }] },
|
|
60
|
+
'property-filter': {
|
|
61
|
+
'i18nStrings.allPropertiesLabel': [{ type: 0, value: '所有屬性' }],
|
|
62
|
+
'i18nStrings.applyActionText': [{ type: 0, value: '套用' }],
|
|
63
|
+
'i18nStrings.cancelActionText': [{ type: 0, value: '取消' }],
|
|
64
|
+
'i18nStrings.clearFiltersText': [{ type: 0, value: '清除篩選條件' }],
|
|
65
|
+
'i18nStrings.editTokenHeader': [{ type: 0, value: '編輯篩選條件' }],
|
|
66
|
+
'i18nStrings.groupPropertiesText': [{ type: 0, value: '屬性' }],
|
|
67
|
+
'i18nStrings.groupValuesText': [{ type: 0, value: '值' }],
|
|
68
|
+
'i18nStrings.operationAndText': [{ type: 0, value: '和' }],
|
|
69
|
+
'i18nStrings.operationOrText': [{ type: 0, value: '或' }],
|
|
70
|
+
'i18nStrings.operatorContainsText': [{ type: 0, value: '包含' }],
|
|
71
|
+
'i18nStrings.operatorDoesNotContainText': [{ type: 0, value: '不包含' }],
|
|
72
|
+
'i18nStrings.operatorDoesNotEqualText': [{ type: 0, value: '不等於' }],
|
|
73
|
+
'i18nStrings.operatorEqualsText': [{ type: 0, value: '等於' }],
|
|
74
|
+
'i18nStrings.operatorGreaterOrEqualText': [{ type: 0, value: '大於或等於' }],
|
|
75
|
+
'i18nStrings.operatorGreaterText': [{ type: 0, value: '大於' }],
|
|
76
|
+
'i18nStrings.operatorLessOrEqualText': [{ type: 0, value: '小於或等於' }],
|
|
77
|
+
'i18nStrings.operatorLessText': [{ type: 0, value: '小於' }],
|
|
78
|
+
'i18nStrings.operatorText': [{ type: 0, value: '運算子' }],
|
|
79
|
+
'i18nStrings.operatorsText': [{ type: 0, value: '運算子' }],
|
|
80
|
+
'i18nStrings.propertyText': [{ type: 0, value: '屬性' }],
|
|
81
|
+
'i18nStrings.tokenLimitShowFewer': [{ type: 0, value: '顯示較少' }],
|
|
82
|
+
'i18nStrings.tokenLimitShowMore': [{ type: 0, value: '顯示更多' }],
|
|
83
|
+
'i18nStrings.valueText': [{ type: 0, value: '值' }],
|
|
84
|
+
'i18nStrings.removeTokenButtonAriaLabel': [
|
|
85
|
+
{
|
|
86
|
+
type: 5,
|
|
87
|
+
value: 'token__operator',
|
|
88
|
+
options: {
|
|
89
|
+
equals: {
|
|
90
|
+
value: [
|
|
91
|
+
{ type: 0, value: '移除篩選條件,' },
|
|
92
|
+
{ type: 1, value: 'token__propertyKey' },
|
|
93
|
+
{ type: 0, value: ' 等於 ' },
|
|
94
|
+
{ type: 1, value: 'token__value' },
|
|
95
|
+
],
|
|
96
|
+
},
|
|
97
|
+
not_equals: {
|
|
98
|
+
value: [
|
|
99
|
+
{ type: 0, value: '移除篩選條件,' },
|
|
100
|
+
{ type: 1, value: 'token__propertyKey' },
|
|
101
|
+
{ type: 0, value: ' 不等於 ' },
|
|
102
|
+
{ type: 1, value: 'token__value' },
|
|
103
|
+
],
|
|
104
|
+
},
|
|
105
|
+
greater_than: {
|
|
106
|
+
value: [
|
|
107
|
+
{ type: 0, value: '移除篩選條件,' },
|
|
108
|
+
{ type: 1, value: 'token__propertyKey' },
|
|
109
|
+
{ type: 0, value: ' 大於 ' },
|
|
110
|
+
{ type: 1, value: 'token__value' },
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
greater_than_equal: {
|
|
114
|
+
value: [
|
|
115
|
+
{ type: 0, value: '移除篩選條件,' },
|
|
116
|
+
{ type: 1, value: 'token__propertyKey' },
|
|
117
|
+
{ type: 0, value: ' 大於或等於 ' },
|
|
118
|
+
{ type: 1, value: 'token__value' },
|
|
119
|
+
],
|
|
120
|
+
},
|
|
121
|
+
less_than: {
|
|
122
|
+
value: [
|
|
123
|
+
{ type: 0, value: '移除篩選條件,' },
|
|
124
|
+
{ type: 1, value: 'token__propertyKey' },
|
|
125
|
+
{ type: 0, value: ' 小於 ' },
|
|
126
|
+
{ type: 1, value: 'token__value' },
|
|
127
|
+
],
|
|
128
|
+
},
|
|
129
|
+
less_than_equal: {
|
|
130
|
+
value: [
|
|
131
|
+
{ type: 0, value: '移除篩選條件,' },
|
|
132
|
+
{ type: 1, value: 'token__propertyKey' },
|
|
133
|
+
{ type: 0, value: ' 小於或等於 ' },
|
|
134
|
+
{ type: 1, value: 'token__value' },
|
|
135
|
+
],
|
|
136
|
+
},
|
|
137
|
+
contains: {
|
|
138
|
+
value: [
|
|
139
|
+
{ type: 0, value: '移除篩選條件,' },
|
|
140
|
+
{ type: 1, value: 'token__propertyKey' },
|
|
141
|
+
{ type: 0, value: ' 包含 ' },
|
|
142
|
+
{ type: 1, value: 'token__value' },
|
|
143
|
+
],
|
|
144
|
+
},
|
|
145
|
+
not_contains: {
|
|
146
|
+
value: [
|
|
147
|
+
{ type: 0, value: '移除篩選條件,' },
|
|
148
|
+
{ type: 1, value: 'token__propertyKey' },
|
|
149
|
+
{ type: 0, value: ' 不包含 ' },
|
|
150
|
+
{ type: 1, value: 'token__value' },
|
|
151
|
+
],
|
|
152
|
+
},
|
|
153
|
+
other: { value: [] },
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
],
|
|
157
|
+
},
|
|
158
|
+
select: { errorIconAriaLabel: [{ type: 0, value: '錯誤' }], selectedAriaLabel: [{ type: 0, value: '已選取' }] },
|
|
159
|
+
wizard: { errorIconAriaLabel: [{ type: 0, value: '錯誤' }], selectedAriaLabel: [{ type: 0, value: '已選取' }] },
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
};
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@cloudscape-design/components": {
|
|
3
|
+
"zh-TW": {
|
|
4
|
+
"alert": { "dismissAriaLabel": [{ "type": 0, "value": "關閉提醒" }] },
|
|
5
|
+
"autosuggest": {
|
|
6
|
+
"stepNumberLabel": [
|
|
7
|
+
{ "type": 0, "value": "步驟 " },
|
|
8
|
+
{ "type": 1, "value": "stepNumber" }
|
|
9
|
+
],
|
|
10
|
+
"collapsedStepsLabel": [
|
|
11
|
+
{ "type": 0, "value": "步驟 " },
|
|
12
|
+
{ "type": 1, "value": "stepNumber" },
|
|
13
|
+
{ "type": 0, "value": ",共 " },
|
|
14
|
+
{ "type": 1, "value": "stepsCount" },
|
|
15
|
+
{ "type": 0, "value": " 步" }
|
|
16
|
+
],
|
|
17
|
+
"cancelButton": [{ "type": 0, "value": "取消" }],
|
|
18
|
+
"previousButton": [{ "type": 0, "value": "上一步" }],
|
|
19
|
+
"nextButton": [{ "type": 0, "value": "下一步" }],
|
|
20
|
+
"optional": [{ "type": 0, "value": "選用" }]
|
|
21
|
+
},
|
|
22
|
+
"app-layout": {
|
|
23
|
+
"ariaLabels.navigation": [{ "type": 0, "value": "側邊導覽" }],
|
|
24
|
+
"ariaLabels.navigationClose": [{ "type": 0, "value": "關閉側邊導覽" }],
|
|
25
|
+
"ariaLabels.navigationToggle": [{ "type": 0, "value": "開啟側邊導覽" }],
|
|
26
|
+
"ariaLabels.notifications": [{ "type": 0, "value": "通知" }],
|
|
27
|
+
"ariaLabels.tools": [{ "type": 0, "value": "說明面板" }],
|
|
28
|
+
"ariaLabels.toolsClose": [{ "type": 0, "value": "開啟說明面板" }],
|
|
29
|
+
"ariaLabels.toolsToggle": [{ "type": 0, "value": "關閉說明面板" }]
|
|
30
|
+
},
|
|
31
|
+
"date-picker": {
|
|
32
|
+
"nextMonthAriaLabel": [{ "type": 0, "value": "下個月" }],
|
|
33
|
+
"previousMonthAriaLabel": [{ "type": 0, "value": "上個月" }],
|
|
34
|
+
"todayAriaLabel": [{ "type": 0, "value": "今天" }]
|
|
35
|
+
},
|
|
36
|
+
"flashbar": {
|
|
37
|
+
"i18nStrings.ariaLabel": [{ "type": 0, "value": "通知" }],
|
|
38
|
+
"i18nStrings.errorIconAriaLabel": [{ "type": 0, "value": "錯誤" }],
|
|
39
|
+
"i18nStrings.inProgressIconAriaLabel": [{ "type": 0, "value": "進行中" }],
|
|
40
|
+
"i18nStrings.infoIconAriaLabel": [{ "type": 0, "value": "資訊" }],
|
|
41
|
+
"i18nStrings.notificationBarAriaLabel": [{ "type": 0, "value": "所有通知" }],
|
|
42
|
+
"i18nStrings.notificationBarText": [{ "type": 0, "value": "通知" }],
|
|
43
|
+
"i18nStrings.successIconAriaLabel": [{ "type": 0, "value": "成功" }],
|
|
44
|
+
"i18nStrings.warningIconAriaLabel": [{ "type": 0, "value": "警告" }]
|
|
45
|
+
},
|
|
46
|
+
"form": { "errorIconAriaLabel": [{ "type": 0, "value": "錯誤" }] },
|
|
47
|
+
"form-field": { "i18nStrings.errorIconAriaLabel": [{ "type": 0, "value": "錯誤" }] },
|
|
48
|
+
"input": { "clearAriaLabel": [{ "type": 0, "value": "清除" }] },
|
|
49
|
+
"modal": { "closeAriaLabel": [{ "type": 0, "value": "關閉強制回應" }] },
|
|
50
|
+
"pagination": {
|
|
51
|
+
"ariaLabels.nextPageLabel": [{ "type": 0, "value": "下一頁" }],
|
|
52
|
+
"ariaLabels.pageLabel": [
|
|
53
|
+
{ "type": 0, "value": "所有頁面中的第 " },
|
|
54
|
+
{ "type": 1, "value": "pageNumber" },
|
|
55
|
+
{ "type": 0, "value": " 頁" }
|
|
56
|
+
],
|
|
57
|
+
"ariaLabels.previousPageLabel": [{ "type": 0, "value": "上一頁" }]
|
|
58
|
+
},
|
|
59
|
+
"popover": { "dismissAriaLabel": [{ "type": 0, "value": "關閉彈出視窗" }] },
|
|
60
|
+
"property-filter": {
|
|
61
|
+
"i18nStrings.allPropertiesLabel": [{ "type": 0, "value": "所有屬性" }],
|
|
62
|
+
"i18nStrings.applyActionText": [{ "type": 0, "value": "套用" }],
|
|
63
|
+
"i18nStrings.cancelActionText": [{ "type": 0, "value": "取消" }],
|
|
64
|
+
"i18nStrings.clearFiltersText": [{ "type": 0, "value": "清除篩選條件" }],
|
|
65
|
+
"i18nStrings.editTokenHeader": [{ "type": 0, "value": "編輯篩選條件" }],
|
|
66
|
+
"i18nStrings.groupPropertiesText": [{ "type": 0, "value": "屬性" }],
|
|
67
|
+
"i18nStrings.groupValuesText": [{ "type": 0, "value": "值" }],
|
|
68
|
+
"i18nStrings.operationAndText": [{ "type": 0, "value": "和" }],
|
|
69
|
+
"i18nStrings.operationOrText": [{ "type": 0, "value": "或" }],
|
|
70
|
+
"i18nStrings.operatorContainsText": [{ "type": 0, "value": "包含" }],
|
|
71
|
+
"i18nStrings.operatorDoesNotContainText": [{ "type": 0, "value": "不包含" }],
|
|
72
|
+
"i18nStrings.operatorDoesNotEqualText": [{ "type": 0, "value": "不等於" }],
|
|
73
|
+
"i18nStrings.operatorEqualsText": [{ "type": 0, "value": "等於" }],
|
|
74
|
+
"i18nStrings.operatorGreaterOrEqualText": [{ "type": 0, "value": "大於或等於" }],
|
|
75
|
+
"i18nStrings.operatorGreaterText": [{ "type": 0, "value": "大於" }],
|
|
76
|
+
"i18nStrings.operatorLessOrEqualText": [{ "type": 0, "value": "小於或等於" }],
|
|
77
|
+
"i18nStrings.operatorLessText": [{ "type": 0, "value": "小於" }],
|
|
78
|
+
"i18nStrings.operatorText": [{ "type": 0, "value": "運算子" }],
|
|
79
|
+
"i18nStrings.operatorsText": [{ "type": 0, "value": "運算子" }],
|
|
80
|
+
"i18nStrings.propertyText": [{ "type": 0, "value": "屬性" }],
|
|
81
|
+
"i18nStrings.tokenLimitShowFewer": [{ "type": 0, "value": "顯示較少" }],
|
|
82
|
+
"i18nStrings.tokenLimitShowMore": [{ "type": 0, "value": "顯示更多" }],
|
|
83
|
+
"i18nStrings.valueText": [{ "type": 0, "value": "值" }],
|
|
84
|
+
"i18nStrings.removeTokenButtonAriaLabel": [
|
|
85
|
+
{
|
|
86
|
+
"type": 5,
|
|
87
|
+
"value": "token__operator",
|
|
88
|
+
"options": {
|
|
89
|
+
"equals": {
|
|
90
|
+
"value": [
|
|
91
|
+
{ "type": 0, "value": "移除篩選條件," },
|
|
92
|
+
{ "type": 1, "value": "token__propertyKey" },
|
|
93
|
+
{ "type": 0, "value": " 等於 " },
|
|
94
|
+
{ "type": 1, "value": "token__value" }
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
"not_equals": {
|
|
98
|
+
"value": [
|
|
99
|
+
{ "type": 0, "value": "移除篩選條件," },
|
|
100
|
+
{ "type": 1, "value": "token__propertyKey" },
|
|
101
|
+
{ "type": 0, "value": " 不等於 " },
|
|
102
|
+
{ "type": 1, "value": "token__value" }
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
"greater_than": {
|
|
106
|
+
"value": [
|
|
107
|
+
{ "type": 0, "value": "移除篩選條件," },
|
|
108
|
+
{ "type": 1, "value": "token__propertyKey" },
|
|
109
|
+
{ "type": 0, "value": " 大於 " },
|
|
110
|
+
{ "type": 1, "value": "token__value" }
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
"greater_than_equal": {
|
|
114
|
+
"value": [
|
|
115
|
+
{ "type": 0, "value": "移除篩選條件," },
|
|
116
|
+
{ "type": 1, "value": "token__propertyKey" },
|
|
117
|
+
{ "type": 0, "value": " 大於或等於 " },
|
|
118
|
+
{ "type": 1, "value": "token__value" }
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
"less_than": {
|
|
122
|
+
"value": [
|
|
123
|
+
{ "type": 0, "value": "移除篩選條件," },
|
|
124
|
+
{ "type": 1, "value": "token__propertyKey" },
|
|
125
|
+
{ "type": 0, "value": " 小於 " },
|
|
126
|
+
{ "type": 1, "value": "token__value" }
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
"less_than_equal": {
|
|
130
|
+
"value": [
|
|
131
|
+
{ "type": 0, "value": "移除篩選條件," },
|
|
132
|
+
{ "type": 1, "value": "token__propertyKey" },
|
|
133
|
+
{ "type": 0, "value": " 小於或等於 " },
|
|
134
|
+
{ "type": 1, "value": "token__value" }
|
|
135
|
+
]
|
|
136
|
+
},
|
|
137
|
+
"contains": {
|
|
138
|
+
"value": [
|
|
139
|
+
{ "type": 0, "value": "移除篩選條件," },
|
|
140
|
+
{ "type": 1, "value": "token__propertyKey" },
|
|
141
|
+
{ "type": 0, "value": " 包含 " },
|
|
142
|
+
{ "type": 1, "value": "token__value" }
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
"not_contains": {
|
|
146
|
+
"value": [
|
|
147
|
+
{ "type": 0, "value": "移除篩選條件," },
|
|
148
|
+
{ "type": 1, "value": "token__propertyKey" },
|
|
149
|
+
{ "type": 0, "value": " 不包含 " },
|
|
150
|
+
{ "type": 1, "value": "token__value" }
|
|
151
|
+
]
|
|
152
|
+
},
|
|
153
|
+
"other": { "value": [] }
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
},
|
|
158
|
+
"select": {
|
|
159
|
+
"errorIconAriaLabel": [{ "type": 0, "value": "錯誤" }],
|
|
160
|
+
"selectedAriaLabel": [{ "type": 0, "value": "已選取" }]
|
|
161
|
+
},
|
|
162
|
+
"wizard": {
|
|
163
|
+
"errorIconAriaLabel": [{ "type": 0, "value": "錯誤" }],
|
|
164
|
+
"selectedAriaLabel": [{ "type": 0, "value": "已選取" }]
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
@@ -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":"","sources":["../../../../src/internal/i18n/provider.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAI1E,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,eAuD5G"}
|
|
@@ -0,0 +1,90 @@
|
|
|
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
|
+
/**
|
|
7
|
+
* Context to send parent messages down to child I18nProviders. This isn't
|
|
8
|
+
* included in the InternalI18nContext to avoid components from depending on
|
|
9
|
+
* MessageFormatElement types.
|
|
10
|
+
*/
|
|
11
|
+
const I18nMessagesContext = React.createContext({});
|
|
12
|
+
export function I18nProvider({ messages: messagesArray, locale: providedLocale, children }) {
|
|
13
|
+
// The provider accepts an array of configs. We merge parent messages and
|
|
14
|
+
// flatten the tree early on so that accesses by key are simpler and faster.
|
|
15
|
+
const parentMessages = useContext(I18nMessagesContext);
|
|
16
|
+
const messages = mergeMessages([parentMessages, ...messagesArray]);
|
|
17
|
+
// If a locale isn't provided, we can try and guess from the html lang,
|
|
18
|
+
// and lastly default to English. Locales have a recommended case, but are
|
|
19
|
+
// matched case-insensitively, so we lowercase it internally.
|
|
20
|
+
const locale = (providedLocale || (document === null || document === void 0 ? void 0 : document.documentElement.lang) || 'en').toLowerCase();
|
|
21
|
+
const format = (namespace, component, key, provided, customHandler) => {
|
|
22
|
+
var _a, _b, _c;
|
|
23
|
+
// A general rule in the library is that undefined is basically
|
|
24
|
+
// treated as "not provided". So even if a user explicitly provides an
|
|
25
|
+
// undefined value, it will default to i18n values.
|
|
26
|
+
if (provided !== undefined) {
|
|
27
|
+
return provided;
|
|
28
|
+
}
|
|
29
|
+
// Widen the locale string (e.g. en-GB -> en) until we find a locale
|
|
30
|
+
// that contains the message we need.
|
|
31
|
+
let message;
|
|
32
|
+
const matchableLocales = getMatchableLocales(locale);
|
|
33
|
+
for (const matchableLocale of matchableLocales) {
|
|
34
|
+
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];
|
|
35
|
+
if (localeMessage !== undefined) {
|
|
36
|
+
message = localeMessage;
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
// If a message wasn't found, exit early.
|
|
41
|
+
if (message === undefined) {
|
|
42
|
+
return provided;
|
|
43
|
+
}
|
|
44
|
+
const intlMessageFormat = new IntlMessageFormat(message, locale);
|
|
45
|
+
if (customHandler) {
|
|
46
|
+
return customHandler(args => intlMessageFormat.format(args));
|
|
47
|
+
}
|
|
48
|
+
// Assuming `T extends string` since a customHandler wasn't provided.
|
|
49
|
+
return intlMessageFormat.format();
|
|
50
|
+
};
|
|
51
|
+
return (React.createElement(InternalI18nContext.Provider, { value: format },
|
|
52
|
+
React.createElement(I18nMessagesContext.Provider, { value: messages }, children)));
|
|
53
|
+
}
|
|
54
|
+
function mergeMessages(sources) {
|
|
55
|
+
const result = {};
|
|
56
|
+
for (const messages of sources) {
|
|
57
|
+
for (const namespace in messages) {
|
|
58
|
+
if (!(namespace in result)) {
|
|
59
|
+
result[namespace] = {};
|
|
60
|
+
}
|
|
61
|
+
for (const casedLocale in messages[namespace]) {
|
|
62
|
+
const locale = casedLocale.toLowerCase();
|
|
63
|
+
if (!(locale in result[namespace])) {
|
|
64
|
+
result[namespace][locale] = {};
|
|
65
|
+
}
|
|
66
|
+
for (const component in messages[namespace][casedLocale]) {
|
|
67
|
+
if (!(component in result[namespace][locale])) {
|
|
68
|
+
result[namespace][locale][component] = {};
|
|
69
|
+
}
|
|
70
|
+
for (const key in messages[namespace][casedLocale][component]) {
|
|
71
|
+
result[namespace][locale][component][key] = messages[namespace][casedLocale][component][key];
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return result;
|
|
78
|
+
}
|
|
79
|
+
function getMatchableLocales(ietfLanguageTag) {
|
|
80
|
+
const parts = ietfLanguageTag.split('-');
|
|
81
|
+
if (parts.length === 1) {
|
|
82
|
+
return [ietfLanguageTag];
|
|
83
|
+
}
|
|
84
|
+
const localeStrings = [];
|
|
85
|
+
for (let i = parts.length; i > 0; i--) {
|
|
86
|
+
localeStrings.push(parts.slice(0, i).join('-'));
|
|
87
|
+
}
|
|
88
|
+
return localeStrings;
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../../../src/internal/i18n/provider.tsx"],"names":[],"mappings":"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","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';\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 // 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 // If a locale isn't provided, we can try and guess from the html lang,\n // and lastly default to English. Locales have a recommended case, but are\n // matched case-insensitively, so we lowercase it internally.\n const locale = (providedLocale || document?.documentElement.lang || 'en').toLowerCase();\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={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"]}
|
package/internal/manifest.json
CHANGED