@cloudscape-design/components 3.0.1129 → 3.0.1130
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/actions-wrapper/index.js +3 -3
- package/alert/actions-wrapper/index.js.map +1 -1
- package/alert/internal-do-not-use-core.js +2 -4
- package/alert/internal-do-not-use-core.js.map +1 -1
- package/alert/internal.js +8 -10
- package/alert/internal.js.map +1 -1
- package/alert/style.js +12 -5
- package/alert/style.js.map +1 -1
- package/alert/styles.css.js +27 -27
- package/alert/styles.scoped.css +50 -50
- package/alert/styles.selectors.js +27 -27
- package/anchor-navigation/anchor-item/index.js +1 -1
- package/anchor-navigation/anchor-item/index.js.map +1 -1
- package/anchor-navigation/index.js +2 -4
- package/anchor-navigation/index.js.map +1 -1
- package/anchor-navigation/internal.js +2 -4
- package/anchor-navigation/internal.js.map +1 -1
- package/annotation-context/annotation/styles.css.js +24 -24
- package/annotation-context/annotation/styles.scoped.css +32 -32
- package/annotation-context/annotation/styles.selectors.js +24 -24
- package/annotation-context/index.js +3 -4
- package/annotation-context/index.js.map +1 -1
- package/app-layout/classic.js +20 -17
- package/app-layout/classic.js.map +1 -1
- package/app-layout/defaults.js +8 -3
- package/app-layout/defaults.js.map +1 -1
- package/app-layout/drawer/resizable-drawer.js +8 -10
- package/app-layout/drawer/resizable-drawer.js.map +1 -1
- package/app-layout/index.js +24 -21
- package/app-layout/index.js.map +1 -1
- package/app-layout/internal.js +3 -3
- package/app-layout/internal.js.map +1 -1
- package/app-layout/notifications/index.js +3 -5
- package/app-layout/notifications/index.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/runtime-drawer/index.js +36 -18
- package/app-layout/runtime-drawer/index.js.map +1 -1
- package/app-layout/split-panel/provider.js +2 -4
- package/app-layout/split-panel/provider.js.map +1 -1
- package/app-layout/utils/use-app-layout-placement.js +1 -1
- package/app-layout/utils/use-app-layout-placement.js.map +1 -1
- package/app-layout/utils/use-drawers.js +9 -3
- package/app-layout/utils/use-drawers.js.map +1 -1
- package/app-layout/visual-refresh/context.js +28 -11
- package/app-layout/visual-refresh/context.js.map +1 -1
- package/app-layout/visual-refresh/drawers.js +3 -1
- package/app-layout/visual-refresh/drawers.js.map +1 -1
- package/app-layout/visual-refresh/index.js +1 -1
- package/app-layout/visual-refresh/index.js.map +1 -1
- package/app-layout/visual-refresh/layout.js +9 -1
- package/app-layout/visual-refresh/layout.js.map +1 -1
- package/app-layout/visual-refresh/main.js +4 -1
- package/app-layout/visual-refresh/main.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 +86 -86
- package/app-layout/visual-refresh/styles.scoped.css +258 -258
- package/app-layout/visual-refresh/styles.selectors.js +86 -86
- package/app-layout/visual-refresh/trigger-button.js +6 -3
- package/app-layout/visual-refresh/trigger-button.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/compute-layout.js +5 -2
- package/app-layout/visual-refresh-toolbar/compute-layout.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/global-ai-drawer.js +8 -4
- package/app-layout/visual-refresh-toolbar/drawer/global-ai-drawer.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/global-bottom-drawer.js +9 -6
- package/app-layout/visual-refresh-toolbar/drawer/global-bottom-drawer.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/global-drawer.js +7 -3
- package/app-layout/visual-refresh-toolbar/drawer/global-drawer.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/local-drawer.js +8 -4
- package/app-layout/visual-refresh-toolbar/drawer/local-drawer.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/styles.css.js +30 -30
- package/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +87 -87
- package/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +30 -30
- package/app-layout/visual-refresh-toolbar/navigation/styles.css.js +4 -4
- package/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +7 -7
- package/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +4 -4
- package/app-layout/visual-refresh-toolbar/skeleton/index.js +10 -10
- package/app-layout/visual-refresh-toolbar/skeleton/index.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/skeleton/slots.js +5 -2
- package/app-layout/visual-refresh-toolbar/skeleton/slots.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +27 -27
- package/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +54 -54
- package/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +27 -27
- package/app-layout/visual-refresh-toolbar/split-panel/index.js +2 -2
- package/app-layout/visual-refresh-toolbar/split-panel/index.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/state/props-merger.js +7 -2
- package/app-layout/visual-refresh-toolbar/state/props-merger.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/state/use-ai-drawer.js +1 -1
- package/app-layout/visual-refresh-toolbar/state/use-ai-drawer.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/state/use-app-layout.js +19 -12
- package/app-layout/visual-refresh-toolbar/state/use-app-layout.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/state/use-bottom-drawers.js +5 -2
- package/app-layout/visual-refresh-toolbar/state/use-bottom-drawers.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/state/use-skeleton-slots-attributes.js +10 -6
- package/app-layout/visual-refresh-toolbar/state/use-skeleton-slots-attributes.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js +4 -1
- package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/toolbar/index.js +1 -1
- package/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/index.js +8 -8
- package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/index.js.map +1 -1
- package/app-layout-toolbar/index.js +24 -21
- package/app-layout-toolbar/index.js.map +1 -1
- package/area-chart/chart-container.js +1 -1
- package/area-chart/chart-container.js.map +1 -1
- package/area-chart/elements/chart-popover.js +1 -1
- package/area-chart/elements/chart-popover.js.map +1 -1
- package/area-chart/elements/threshold-series.js +1 -1
- package/area-chart/elements/threshold-series.js.map +1 -1
- package/area-chart/index.js +2 -4
- package/area-chart/index.js.map +1 -1
- package/area-chart/internal.js +2 -4
- package/area-chart/internal.js.map +1 -1
- package/area-chart/model/interactions-store.js +39 -9
- package/area-chart/model/interactions-store.js.map +1 -1
- package/attribute-editor/index.js +4 -6
- package/attribute-editor/index.js.map +1 -1
- package/attribute-editor/internal.js +6 -5
- package/attribute-editor/internal.js.map +1 -1
- package/attribute-editor/row.js +1 -1
- package/attribute-editor/row.js.map +1 -1
- package/attribute-editor/styles.css.js +15 -15
- package/attribute-editor/styles.scoped.css +28 -28
- package/attribute-editor/styles.selectors.js +15 -15
- package/autosuggest/autosuggest-option.js +3 -5
- package/autosuggest/autosuggest-option.js.map +1 -1
- package/autosuggest/internal-do-not-use-core.js +2 -4
- package/autosuggest/internal-do-not-use-core.js.map +1 -1
- package/autosuggest/internal.js +10 -5
- package/autosuggest/internal.js.map +1 -1
- package/autosuggest/options-controller.js +15 -8
- package/autosuggest/options-controller.js.map +1 -1
- package/autosuggest/plain-list.js +3 -3
- package/autosuggest/plain-list.js.map +1 -1
- package/autosuggest/virtual-list.js +2 -2
- package/autosuggest/virtual-list.js.map +1 -1
- package/badge/internal-do-not-use-core.js +2 -4
- package/badge/internal-do-not-use-core.js.map +1 -1
- package/bar-chart/index.js +2 -4
- package/bar-chart/index.js.map +1 -1
- package/box/internal-do-not-use-core.js +2 -4
- package/box/internal-do-not-use-core.js.map +1 -1
- package/box/internal.js +2 -4
- package/box/internal.js.map +1 -1
- package/breadcrumb-group/all-items-dropdown.js +3 -3
- package/breadcrumb-group/all-items-dropdown.js.map +1 -1
- package/breadcrumb-group/implementation.js +9 -8
- package/breadcrumb-group/implementation.js.map +1 -1
- package/breadcrumb-group/index.js +3 -5
- package/breadcrumb-group/index.js.map +1 -1
- package/breadcrumb-group/item/funnel.js +1 -1
- package/breadcrumb-group/item/funnel.js.map +1 -1
- package/breadcrumb-group/item/item.js +5 -7
- package/breadcrumb-group/item/item.js.map +1 -1
- package/breadcrumb-group/item/styles.css.js +7 -7
- package/breadcrumb-group/item/styles.scoped.css +28 -28
- package/breadcrumb-group/item/styles.selectors.js +7 -7
- package/button/icon-helper.js +3 -5
- package/button/icon-helper.js.map +1 -1
- package/button/internal-do-not-use-core.js +2 -4
- package/button/internal-do-not-use-core.js.map +1 -1
- package/button/internal.js +31 -14
- package/button/internal.js.map +1 -1
- package/button/style.js +38 -27
- package/button/style.js.map +1 -1
- package/button/styles.css.js +22 -22
- package/button/styles.scoped.css +256 -256
- package/button/styles.selectors.js +22 -22
- package/button-dropdown/category-elements/expandable-category-element.js +11 -11
- package/button-dropdown/category-elements/expandable-category-element.js.map +1 -1
- package/button-dropdown/category-elements/mobile-expandable-category-element.js +12 -12
- package/button-dropdown/category-elements/mobile-expandable-category-element.js.map +1 -1
- package/button-dropdown/internal-do-not-use-core.js +4 -6
- package/button-dropdown/internal-do-not-use-core.js.map +1 -1
- package/button-dropdown/internal.js +36 -25
- package/button-dropdown/internal.js.map +1 -1
- package/button-dropdown/item-element/index.js +25 -17
- package/button-dropdown/item-element/index.js.map +1 -1
- package/button-dropdown/item-element/styles.css.js +16 -16
- package/button-dropdown/item-element/styles.scoped.css +27 -27
- package/button-dropdown/item-element/styles.selectors.js +16 -16
- package/button-dropdown/tooltip.js +1 -1
- package/button-dropdown/tooltip.js.map +1 -1
- package/button-dropdown/utils/use-button-dropdown.js +1 -2
- package/button-dropdown/utils/use-button-dropdown.js.map +1 -1
- package/button-group/internal-do-not-use-core.js +2 -4
- package/button-group/internal-do-not-use-core.js.map +1 -1
- package/button-group/internal.js +2 -4
- package/button-group/internal.js.map +1 -1
- package/button-group/item-element.js +4 -4
- package/button-group/item-element.js.map +1 -1
- package/button-group/menu-dropdown-item.js +1 -1
- package/button-group/menu-dropdown-item.js.map +1 -1
- package/button-group/style.js +34 -20
- package/button-group/style.js.map +1 -1
- package/calendar/grid/index.js +2 -3
- package/calendar/grid/index.js.map +1 -1
- package/calendar/index.js +2 -4
- package/calendar/index.js.map +1 -1
- package/calendar/internal.js +2 -4
- package/calendar/internal.js.map +1 -1
- package/cards/index.js +17 -19
- package/cards/index.js.map +1 -1
- package/checkbox/internal-do-not-use-core.js +2 -4
- package/checkbox/internal-do-not-use-core.js.map +1 -1
- package/checkbox/internal.js +4 -6
- package/checkbox/internal.js.map +1 -1
- package/checkbox/styles.css.js +3 -3
- package/checkbox/styles.scoped.css +11 -11
- package/checkbox/styles.selectors.js +3 -3
- package/code-editor/index.js +2 -3
- package/code-editor/index.js.map +1 -1
- package/code-editor/use-editor.js +4 -1
- package/code-editor/use-editor.js.map +1 -1
- package/code-editor/util.js +4 -1
- package/code-editor/util.js.map +1 -1
- package/collection-preferences/content-display/index.js +1 -1
- package/collection-preferences/content-display/index.js.map +1 -1
- package/collection-preferences/content-display/utils.js +1 -1
- package/collection-preferences/content-display/utils.js.map +1 -1
- package/collection-preferences/index.js +20 -13
- package/collection-preferences/index.js.map +1 -1
- package/collection-preferences/utils.js +9 -9
- package/collection-preferences/utils.js.map +1 -1
- package/collection-preferences/visible-content.js +8 -8
- package/collection-preferences/visible-content.js.map +1 -1
- package/column-layout/index.js +2 -4
- package/column-layout/index.js.map +1 -1
- package/column-layout/internal.js +2 -4
- package/column-layout/internal.js.map +1 -1
- package/container/internal-do-not-use-core.js +2 -4
- package/container/internal-do-not-use-core.js.map +1 -1
- package/container/internal.js +11 -9
- package/container/internal.js.map +1 -1
- package/container/style.js +11 -2
- package/container/style.js.map +1 -1
- package/content-layout/index.js +1 -1
- package/content-layout/index.js.map +1 -1
- package/content-layout/internal.js +3 -5
- package/content-layout/internal.js.map +1 -1
- package/content-layout/styles.css.js +14 -14
- package/content-layout/styles.scoped.css +27 -27
- package/content-layout/styles.selectors.js +14 -14
- package/copy-to-clipboard/index.js +2 -4
- package/copy-to-clipboard/index.js.map +1 -1
- package/copy-to-clipboard/internal.js +2 -4
- package/copy-to-clipboard/internal.js.map +1 -1
- package/date-input/internal-do-not-use-core.js +1 -1
- package/date-input/internal-do-not-use-core.js.map +1 -1
- package/date-input/internal.js +6 -8
- package/date-input/internal.js.map +1 -1
- package/date-picker/index.js +9 -6
- package/date-picker/index.js.map +1 -1
- package/date-range-picker/calendar/grids/grid-cell.js +3 -4
- package/date-range-picker/calendar/grids/grid-cell.js.map +1 -1
- package/date-range-picker/calendar/grids/grid.js +8 -8
- package/date-range-picker/calendar/grids/grid.js.map +1 -1
- package/date-range-picker/calendar/grids/index.js +2 -2
- package/date-range-picker/calendar/grids/index.js.map +1 -1
- package/date-range-picker/calendar/index.js +5 -2
- package/date-range-picker/calendar/index.js.map +1 -1
- package/date-range-picker/index.js +8 -6
- package/date-range-picker/index.js.map +1 -1
- package/date-range-picker/utils.js +8 -2
- package/date-range-picker/utils.js.map +1 -1
- package/drawer/implementation.js +7 -6
- package/drawer/implementation.js.map +1 -1
- package/drawer/index.js +1 -1
- package/drawer/index.js.map +1 -1
- package/expandable-section/expandable-section-container.js +3 -5
- package/expandable-section/expandable-section-container.js.map +1 -1
- package/expandable-section/expandable-section-header.js +8 -8
- package/expandable-section/expandable-section-header.js.map +1 -1
- package/expandable-section/index.js +2 -4
- package/expandable-section/index.js.map +1 -1
- package/expandable-section/internal.js +2 -4
- package/expandable-section/internal.js.map +1 -1
- package/file-dropzone/index.js +1 -1
- package/file-dropzone/index.js.map +1 -1
- package/file-dropzone/internal.js +3 -5
- package/file-dropzone/internal.js.map +1 -1
- package/file-input/index.js +2 -4
- package/file-input/index.js.map +1 -1
- package/file-input/internal.js +11 -8
- package/file-input/internal.js.map +1 -1
- package/file-token-group/default-formatters.js +3 -3
- package/file-token-group/default-formatters.js.map +1 -1
- package/file-token-group/index.js +2 -4
- package/file-token-group/index.js.map +1 -1
- package/file-token-group/internal.js +2 -4
- package/file-token-group/internal.js.map +1 -1
- package/file-upload/index.js +2 -4
- package/file-upload/index.js.map +1 -1
- package/file-upload/internal.js +5 -7
- package/file-upload/internal.js.map +1 -1
- package/flashbar/collapsible-flashbar.js +33 -23
- package/flashbar/collapsible-flashbar.js.map +1 -1
- package/flashbar/common.js +1 -3
- package/flashbar/common.js.map +1 -1
- package/flashbar/flash.js +4 -6
- package/flashbar/flash.js.map +1 -1
- package/flashbar/implementation.js +2 -2
- package/flashbar/implementation.js.map +1 -1
- package/flashbar/internal-do-not-use-core.js +1 -1
- package/flashbar/internal-do-not-use-core.js.map +1 -1
- package/flashbar/non-collapsible-flashbar.js +10 -9
- package/flashbar/non-collapsible-flashbar.js.map +1 -1
- package/flashbar/style.js +50 -32
- package/flashbar/style.js.map +1 -1
- package/flashbar/styles.css.js +50 -50
- package/flashbar/styles.scoped.css +187 -187
- package/flashbar/styles.selectors.js +50 -50
- package/flashbar/utils.js +2 -2
- package/flashbar/utils.js.map +1 -1
- package/form/index.js +4 -7
- package/form/index.js.map +1 -1
- package/form/internal.js +2 -4
- package/form/internal.js.map +1 -1
- package/form-field/index.js +7 -9
- package/form-field/index.js.map +1 -1
- package/form-field/internal.js +6 -5
- package/form-field/internal.js.map +1 -1
- package/grid/index.js +2 -4
- package/grid/index.js.map +1 -1
- package/grid/internal.js +2 -4
- package/grid/internal.js.map +1 -1
- package/header/index.js +2 -4
- package/header/index.js.map +1 -1
- package/header/internal.js +4 -6
- package/header/internal.js.map +1 -1
- package/help-panel/implementation.js +7 -6
- package/help-panel/implementation.js.map +1 -1
- package/help-panel/index.js +1 -1
- package/help-panel/index.js.map +1 -1
- package/help-panel/styles.css.js +6 -6
- package/help-panel/styles.scoped.css +73 -73
- package/help-panel/styles.selectors.js +6 -6
- package/hotspot/index.js +3 -5
- package/hotspot/index.js.map +1 -1
- package/icon/internal-do-not-use-core.js +2 -4
- package/icon/internal-do-not-use-core.js.map +1 -1
- package/icon/internal.js +4 -6
- package/icon/internal.js.map +1 -1
- package/icon-provider/index.js.map +1 -1
- package/icon-provider/internal.js +2 -2
- package/icon-provider/internal.js.map +1 -1
- package/input/internal-do-not-use-core.js +5 -5
- package/input/internal-do-not-use-core.js.map +1 -1
- package/input/internal.js +10 -12
- package/input/internal.js.map +1 -1
- package/input/styles.css.js +13 -13
- package/input/styles.js +42 -30
- package/input/styles.js.map +1 -1
- package/input/styles.scoped.css +65 -65
- package/input/styles.selectors.js +13 -13
- package/internal/analytics/components/analytics-funnel.js +9 -12
- package/internal/analytics/components/analytics-funnel.js.map +1 -1
- package/internal/analytics/hooks/use-funnel.js +5 -6
- package/internal/analytics/hooks/use-funnel.js.map +1 -1
- package/internal/animate.js +1 -1
- package/internal/animate.js.map +1 -1
- package/internal/base-component/index.js +1 -1
- package/internal/base-component/index.js.map +1 -1
- package/internal/base-component/styles.scoped.css +1 -1
- package/internal/components/abstract-switch/index.js +21 -20
- package/internal/components/abstract-switch/index.js.map +1 -1
- package/internal/components/autosuggest-input/index.js +3 -5
- package/internal/components/autosuggest-input/index.js.map +1 -1
- package/internal/components/button-trigger/index.js +25 -6
- package/internal/components/button-trigger/index.js.map +1 -1
- package/internal/components/cartesian-chart/inline-start-labels.js +1 -1
- package/internal/components/cartesian-chart/inline-start-labels.js.map +1 -1
- package/internal/components/chart-filter/index.js +2 -4
- package/internal/components/chart-filter/index.js.map +1 -1
- package/internal/components/chart-plot/index.js +2 -2
- package/internal/components/chart-plot/index.js.map +1 -1
- package/internal/components/chart-popover/index.js +3 -5
- package/internal/components/chart-popover/index.js.map +1 -1
- package/internal/components/chart-series-details/index.js +2 -4
- package/internal/components/chart-series-details/index.js.map +1 -1
- package/internal/components/chart-wrapper/index.js +3 -5
- package/internal/components/chart-wrapper/index.js.map +1 -1
- package/internal/components/checkbox-icon/index.js +5 -7
- package/internal/components/checkbox-icon/index.js.map +1 -1
- package/internal/components/drag-handle/button.js +5 -5
- package/internal/components/drag-handle/button.js.map +1 -1
- package/internal/components/drag-handle/hooks/use-drag-handle-interaction-state.js +17 -4
- package/internal/components/drag-handle/hooks/use-drag-handle-interaction-state.js.map +1 -1
- package/internal/components/drag-handle/index.js +1 -3
- package/internal/components/drag-handle/index.js.map +1 -1
- package/internal/components/drag-handle-wrapper/styles.css.js +20 -20
- package/internal/components/drag-handle-wrapper/styles.scoped.css +48 -48
- package/internal/components/drag-handle-wrapper/styles.selectors.js +20 -20
- package/internal/components/dropdown/styles.css.js +20 -20
- package/internal/components/dropdown/styles.scoped.css +38 -38
- package/internal/components/dropdown/styles.selectors.js +20 -20
- package/internal/components/masked-input/index.js +12 -8
- package/internal/components/masked-input/index.js.map +1 -1
- package/internal/components/masked-input/utils/mask-format.js +6 -1
- package/internal/components/masked-input/utils/mask-format.js.map +1 -1
- package/internal/components/menu-dropdown/index.js +2 -4
- package/internal/components/menu-dropdown/index.js.map +1 -1
- package/internal/components/option/index.js +6 -8
- package/internal/components/option/index.js.map +1 -1
- package/internal/components/option/option-parts.js +1 -1
- package/internal/components/option/option-parts.js.map +1 -1
- package/internal/components/option/utils/flatten-options.js +1 -2
- package/internal/components/option/utils/flatten-options.js.map +1 -1
- package/internal/components/options-list/index.js +2 -4
- package/internal/components/options-list/index.js.map +1 -1
- package/internal/components/screenreader-only/index.js +1 -1
- package/internal/components/screenreader-only/index.js.map +1 -1
- package/internal/components/selectable-item/analytics-metadata/utils.js +1 -3
- package/internal/components/selectable-item/analytics-metadata/utils.js.map +1 -1
- package/internal/components/selectable-item/index.js +5 -7
- package/internal/components/selectable-item/index.js.map +1 -1
- package/internal/components/sortable-area/index.js +19 -6
- package/internal/components/sortable-area/index.js.map +1 -1
- package/internal/components/token-list/styles.css.js +10 -10
- package/internal/components/token-list/styles.scoped.css +25 -25
- package/internal/components/token-list/styles.selectors.js +10 -10
- package/internal/components/token-list/token-limit-toggle.js +1 -1
- package/internal/components/token-list/token-limit-toggle.js.map +1 -1
- package/internal/components/tooltip/index.js +1 -1
- package/internal/components/tooltip/index.js.map +1 -1
- package/internal/components/transition/index.js +3 -5
- package/internal/components/transition/index.js.map +1 -1
- package/internal/environment.js +2 -2
- package/internal/environment.json +2 -2
- package/internal/generated/custom-css-properties/index.d.ts +24 -0
- package/internal/generated/custom-css-properties/index.d.ts.map +1 -1
- package/internal/generated/custom-css-properties/index.js +126 -102
- package/internal/generated/custom-css-properties/index.js.map +1 -1
- package/internal/hooks/use-intersection-observer/index.js +1 -1
- package/internal/hooks/use-intersection-observer/index.js.map +1 -1
- package/internal/hooks/use-performance-marks/index.js +12 -2
- package/internal/hooks/use-performance-marks/index.js.map +1 -1
- package/internal/hooks/use-virtual/index.js +5 -2
- package/internal/hooks/use-virtual/index.js.map +1 -1
- package/internal/manifest.json +1 -1
- package/internal/plugins/controllers/drawers.js +4 -6
- package/internal/plugins/controllers/drawers.js.map +1 -1
- package/internal/plugins/helpers/use-global-breadcrumbs.js +4 -6
- package/internal/plugins/helpers/use-global-breadcrumbs.js.map +1 -1
- package/internal/plugins/widget/index.js +1 -1
- package/internal/plugins/widget/index.js.map +1 -1
- package/internal/utils/with-native-attributes.js +4 -6
- package/internal/utils/with-native-attributes.js.map +1 -1
- package/internal/widgets/index.js +2 -2
- package/internal/widgets/index.js.map +1 -1
- package/internal/widgets/loader-mock.js +2 -2
- package/internal/widgets/loader-mock.js.map +1 -1
- package/key-value-pairs/index.js +2 -4
- package/key-value-pairs/index.js.map +1 -1
- package/key-value-pairs/internal.js +4 -6
- package/key-value-pairs/internal.js.map +1 -1
- package/line-chart/index.js +2 -4
- package/line-chart/index.js.map +1 -1
- package/link/internal-do-not-use-core.js +2 -4
- package/link/internal-do-not-use-core.js.map +1 -1
- package/link/internal.js +13 -6
- package/link/internal.js.map +1 -1
- package/link/style.js +12 -9
- package/link/style.js.map +1 -1
- package/link/styles.css.js +20 -20
- package/link/styles.scoped.css +103 -103
- package/link/styles.selectors.js +20 -20
- package/list/index.js +1 -1
- package/list/index.js.map +1 -1
- package/list/internal.js +6 -8
- package/list/internal.js.map +1 -1
- package/live-region/index.js +2 -4
- package/live-region/index.js.map +1 -1
- package/live-region/internal.js +2 -4
- package/live-region/internal.js.map +1 -1
- package/mixed-line-bar-chart/bar-series.js +3 -3
- package/mixed-line-bar-chart/bar-series.js.map +1 -1
- package/mixed-line-bar-chart/chart-container.js +7 -9
- package/mixed-line-bar-chart/chart-container.js.map +1 -1
- package/mixed-line-bar-chart/chart-popover.js +4 -1
- package/mixed-line-bar-chart/chart-popover.js.map +1 -1
- package/mixed-line-bar-chart/hooks/use-navigation.js +1 -1
- package/mixed-line-bar-chart/hooks/use-navigation.js.map +1 -1
- package/mixed-line-bar-chart/index.js +2 -4
- package/mixed-line-bar-chart/index.js.map +1 -1
- package/mixed-line-bar-chart/internal.js +2 -4
- package/mixed-line-bar-chart/internal.js.map +1 -1
- package/mixed-line-bar-chart/line-series.js +3 -3
- package/mixed-line-bar-chart/line-series.js.map +1 -1
- package/modal/index.js +5 -8
- package/modal/index.js.map +1 -1
- package/modal/internal.js +11 -14
- package/modal/internal.js.map +1 -1
- package/multiselect/embedded.js +15 -6
- package/multiselect/embedded.js.map +1 -1
- package/multiselect/index.js +2 -4
- package/multiselect/index.js.map +1 -1
- package/multiselect/internal.js +13 -12
- package/multiselect/internal.js.map +1 -1
- package/multiselect/use-multiselect.js +9 -5
- package/multiselect/use-multiselect.js.map +1 -1
- package/navigable-group/index.js +2 -4
- package/navigable-group/index.js.map +1 -1
- package/navigable-group/internal.js +2 -4
- package/navigable-group/internal.js.map +1 -1
- package/package.json +1 -1
- package/pagination/index.js +10 -10
- package/pagination/index.js.map +1 -1
- package/pagination/internal.js +36 -40
- package/pagination/internal.js.map +1 -1
- package/pie-chart/index.js +4 -6
- package/pie-chart/index.js.map +1 -1
- package/pie-chart/labels.js +2 -2
- package/pie-chart/labels.js.map +1 -1
- package/pie-chart/segments.js +1 -1
- package/pie-chart/segments.js.map +1 -1
- package/pie-chart/utils.js +17 -5
- package/pie-chart/utils.js.map +1 -1
- package/popover/body.js +3 -3
- package/popover/body.js.map +1 -1
- package/popover/container.js +1 -1
- package/popover/container.js.map +1 -1
- package/popover/index.js +2 -4
- package/popover/index.js.map +1 -1
- package/popover/internal.js +4 -6
- package/popover/internal.js.map +1 -1
- package/progress-bar/internal-do-not-use-core.js +2 -4
- package/progress-bar/internal-do-not-use-core.js.map +1 -1
- package/progress-bar/internal.js +4 -1
- package/progress-bar/internal.js.map +1 -1
- package/progress-bar/styles.css.js +19 -19
- package/progress-bar/styles.scoped.css +56 -56
- package/progress-bar/styles.selectors.js +19 -19
- package/prompt-input/index.js +1 -1
- package/prompt-input/interfaces.d.ts +48 -0
- package/prompt-input/interfaces.d.ts.map +1 -1
- package/prompt-input/interfaces.js.map +1 -1
- package/prompt-input/internal-do-not-use-core.js +2 -4
- package/prompt-input/internal-do-not-use-core.js.map +1 -1
- package/prompt-input/internal.d.ts.map +1 -1
- package/prompt-input/internal.js +5 -6
- package/prompt-input/internal.js.map +1 -1
- package/prompt-input/styles.css.js +17 -17
- package/prompt-input/styles.d.ts +4 -0
- package/prompt-input/styles.d.ts.map +1 -0
- package/prompt-input/styles.js +44 -0
- package/prompt-input/styles.js.map +1 -0
- package/prompt-input/styles.scoped.css +73 -61
- package/prompt-input/styles.selectors.js +17 -17
- package/property-filter/controller.js +6 -6
- package/property-filter/controller.js.map +1 -1
- package/property-filter/filter-options.js +1 -1
- package/property-filter/filter-options.js.map +1 -1
- package/property-filter/filtering-token/index.js +11 -14
- package/property-filter/filtering-token/index.js.map +1 -1
- package/property-filter/i18n-utils.js +48 -11
- package/property-filter/i18n-utils.js.map +1 -1
- package/property-filter/index.js +4 -6
- package/property-filter/index.js.map +1 -1
- package/property-filter/internal.js +15 -13
- package/property-filter/internal.js.map +1 -1
- package/property-filter/property-editor.js +1 -1
- package/property-filter/property-editor.js.map +1 -1
- package/property-filter/property-filter-autosuggest.js +8 -4
- package/property-filter/property-filter-autosuggest.js.map +1 -1
- package/property-filter/token-editor-inputs.js +10 -9
- package/property-filter/token-editor-inputs.js.map +1 -1
- package/property-filter/token-editor.js +10 -10
- package/property-filter/token-editor.js.map +1 -1
- package/property-filter/token.js +8 -8
- package/property-filter/token.js.map +1 -1
- package/property-filter/use-load-items.js +6 -1
- package/property-filter/use-load-items.js.map +1 -1
- package/radio-group/internal-do-not-use-core.js +9 -9
- package/radio-group/internal-do-not-use-core.js.map +1 -1
- package/radio-group/internal.js +10 -12
- package/radio-group/internal.js.map +1 -1
- package/radio-group/radio-button.js +4 -6
- package/radio-group/radio-button.js.map +1 -1
- package/radio-group/styles.css.js +10 -10
- package/radio-group/styles.scoped.css +22 -22
- package/radio-group/styles.selectors.js +10 -10
- package/s3-resource-selector/index.js +3 -5
- package/s3-resource-selector/index.js.map +1 -1
- package/s3-resource-selector/s3-in-context/index.js +1 -1
- package/s3-resource-selector/s3-in-context/index.js.map +1 -1
- package/s3-resource-selector/s3-in-context/search-input.js +1 -1
- package/s3-resource-selector/s3-in-context/search-input.js.map +1 -1
- package/s3-resource-selector/s3-modal/basic-table.js +4 -7
- package/s3-resource-selector/s3-modal/basic-table.js.map +1 -1
- package/s3-resource-selector/s3-modal/buckets-table.js +13 -1
- package/s3-resource-selector/s3-modal/buckets-table.js.map +1 -1
- package/s3-resource-selector/s3-modal/index.js +4 -1
- package/s3-resource-selector/s3-modal/index.js.map +1 -1
- package/s3-resource-selector/s3-modal/objects-table.js +14 -2
- package/s3-resource-selector/s3-modal/objects-table.js.map +1 -1
- package/s3-resource-selector/s3-modal/versions-table.js +13 -1
- package/s3-resource-selector/s3-modal/versions-table.js.map +1 -1
- package/segmented-control/index.js +1 -1
- package/segmented-control/index.js.map +1 -1
- package/segmented-control/internal.js +6 -8
- package/segmented-control/internal.js.map +1 -1
- package/segmented-control/segment.js +1 -1
- package/segmented-control/segment.js.map +1 -1
- package/select/index.js +2 -4
- package/select/index.js.map +1 -1
- package/select/internal.js +13 -10
- package/select/internal.js.map +1 -1
- package/select/parts/filter.js +9 -4
- package/select/parts/filter.js.map +1 -1
- package/select/parts/item.js +3 -5
- package/select/parts/item.js.map +1 -1
- package/select/parts/multiselect-item.js +3 -5
- package/select/parts/multiselect-item.js.map +1 -1
- package/select/parts/plain-list.js +1 -1
- package/select/parts/plain-list.js.map +1 -1
- package/select/parts/trigger.js +2 -2
- package/select/parts/trigger.js.map +1 -1
- package/select/parts/virtual-list.js +3 -3
- package/select/parts/virtual-list.js.map +1 -1
- package/select/utils/get-item-props.js +7 -1
- package/select/utils/get-item-props.js.map +1 -1
- package/select/utils/render-options.js +1 -1
- package/select/utils/render-options.js.map +1 -1
- package/side-navigation/implementation.js +2 -4
- package/side-navigation/implementation.js.map +1 -1
- package/side-navigation/index.js +2 -4
- package/side-navigation/index.js.map +1 -1
- package/side-navigation/parts.js +4 -4
- package/side-navigation/parts.js.map +1 -1
- package/slider/index.js +2 -4
- package/slider/index.js.map +1 -1
- package/slider/internal.js +2 -4
- package/slider/internal.js.map +1 -1
- package/slider/styles.css.js +26 -26
- package/slider/styles.scoped.css +86 -86
- package/slider/styles.selectors.js +26 -26
- package/slider/tick-marks.js +3 -3
- package/slider/tick-marks.js.map +1 -1
- package/space-between/internal-do-not-use-core.js +2 -4
- package/space-between/internal-do-not-use-core.js.map +1 -1
- package/space-between/internal.js +2 -4
- package/space-between/internal.js.map +1 -1
- package/spinner/internal-do-not-use-core.js +2 -4
- package/spinner/internal-do-not-use-core.js.map +1 -1
- package/spinner/internal.js +2 -4
- package/spinner/internal.js.map +1 -1
- package/spinner/styles.css.js +13 -13
- package/spinner/styles.scoped.css +39 -39
- package/spinner/styles.selectors.js +13 -13
- package/split-panel/bottom.js +2 -2
- package/split-panel/bottom.js.map +1 -1
- package/split-panel/implementation.js +2 -4
- package/split-panel/implementation.js.map +1 -1
- package/split-panel/index.js +16 -4
- package/split-panel/index.js.map +1 -1
- package/split-panel/side.js +6 -2
- package/split-panel/side.js.map +1 -1
- package/status-indicator/internal-do-not-use-core.js +2 -4
- package/status-indicator/internal-do-not-use-core.js.map +1 -1
- package/status-indicator/internal.js +3 -5
- package/status-indicator/internal.js.map +1 -1
- package/steps/internal-do-not-use-core.js +2 -4
- package/steps/internal-do-not-use-core.js.map +1 -1
- package/steps/internal.js +2 -4
- package/steps/internal.js.map +1 -1
- package/table/body-cell/disabled-inline-editor.js +4 -6
- package/table/body-cell/disabled-inline-editor.js.map +1 -1
- package/table/body-cell/index.js +9 -11
- package/table/body-cell/index.js.map +1 -1
- package/table/body-cell/inline-editor.js +18 -21
- package/table/body-cell/inline-editor.js.map +1 -1
- package/table/body-cell/td-element.js +3 -5
- package/table/body-cell/td-element.js.map +1 -1
- package/table/expandable-rows/expandable-rows-utils.js +1 -1
- package/table/expandable-rows/expandable-rows-utils.js.map +1 -1
- package/table/header-cell/index.js +20 -20
- package/table/header-cell/index.js.map +1 -1
- package/table/header-cell/th-element.js +3 -5
- package/table/header-cell/th-element.js.map +1 -1
- package/table/index.js +14 -10
- package/table/index.js.map +1 -1
- package/table/internal.js +47 -34
- package/table/internal.js.map +1 -1
- package/table/progressive-loading/loader-cell.js +2 -4
- package/table/progressive-loading/loader-cell.js.map +1 -1
- package/table/selection/selection-cell.js +8 -11
- package/table/selection/selection-cell.js.map +1 -1
- package/table/selection/selection-control.js +10 -12
- package/table/selection/selection-control.js.map +1 -1
- package/table/sticky-columns/use-sticky-columns.js +1 -1
- package/table/sticky-columns/use-sticky-columns.js.map +1 -1
- package/table/sticky-header.js +2 -2
- package/table/sticky-header.js.map +1 -1
- package/table/thead.js +5 -5
- package/table/thead.js.map +1 -1
- package/table/use-cell-editing.js +3 -4
- package/table/use-cell-editing.js.map +1 -1
- package/table/utils.js +1 -1
- package/table/utils.js.map +1 -1
- package/tabs/index.js +6 -8
- package/tabs/index.js.map +1 -1
- package/tabs/tab-header-bar.js +12 -5
- package/tabs/tab-header-bar.js.map +1 -1
- package/tag-editor/index.js +7 -9
- package/tag-editor/index.js.map +1 -1
- package/tag-editor/styles.css.js +3 -3
- package/tag-editor/styles.scoped.css +13 -13
- package/tag-editor/styles.selectors.js +3 -3
- package/text-content/index.js +2 -4
- package/text-content/index.js.map +1 -1
- package/text-content/styles.css.js +1 -1
- package/text-content/styles.scoped.css +66 -66
- package/text-content/styles.selectors.js +1 -1
- package/text-filter/index.js +1 -1
- package/text-filter/index.js.map +1 -1
- package/text-filter/internal.js +2 -4
- package/text-filter/internal.js.map +1 -1
- package/textarea/internal-do-not-use-core.js +3 -5
- package/textarea/internal-do-not-use-core.js.map +1 -1
- package/textarea/styles.css.js +5 -5
- package/textarea/styles.js +42 -30
- package/textarea/styles.js.map +1 -1
- package/textarea/styles.scoped.css +41 -41
- package/textarea/styles.selectors.js +5 -5
- package/tiles/index.js +3 -3
- package/tiles/index.js.map +1 -1
- package/tiles/internal.js +12 -14
- package/tiles/internal.js.map +1 -1
- package/tiles/tile.js +3 -5
- package/tiles/tile.js.map +1 -1
- package/time-input/internal-do-not-use-core.js +2 -4
- package/time-input/internal-do-not-use-core.js.map +1 -1
- package/time-input/internal.js +2 -4
- package/time-input/internal.js.map +1 -1
- package/toggle/internal-do-not-use-core.js +1 -1
- package/toggle/internal-do-not-use-core.js.map +1 -1
- package/toggle/internal.js +5 -7
- package/toggle/internal.js.map +1 -1
- package/toggle/styles.css.js +10 -10
- package/toggle/styles.scoped.css +23 -23
- package/toggle/styles.selectors.js +10 -10
- package/toggle-button/internal-do-not-use-core.js +2 -4
- package/toggle-button/internal-do-not-use-core.js.map +1 -1
- package/toggle-button/internal.js +3 -5
- package/toggle-button/internal.js.map +1 -1
- package/token/dismiss-button.js +2 -2
- package/token/dismiss-button.js.map +1 -1
- package/token/index.js +1 -1
- package/token/index.js.map +1 -1
- package/token/internal.js +20 -14
- package/token/internal.js.map +1 -1
- package/token-group/index.js +2 -4
- package/token-group/index.js.map +1 -1
- package/token-group/internal.js +6 -8
- package/token-group/internal.js.map +1 -1
- package/top-navigation/index.js +2 -4
- package/top-navigation/index.js.map +1 -1
- package/top-navigation/internal.js +2 -4
- package/top-navigation/internal.js.map +1 -1
- package/top-navigation/parts/overflow-menu/menu-item.js +7 -11
- package/top-navigation/parts/overflow-menu/menu-item.js.map +1 -1
- package/top-navigation/parts/overflow-menu/views/submenu.js +2 -2
- package/top-navigation/parts/overflow-menu/views/submenu.js.map +1 -1
- package/top-navigation/parts/overflow-menu/views/utilities.js +1 -1
- package/top-navigation/parts/overflow-menu/views/utilities.js.map +1 -1
- package/top-navigation/parts/utility.js +1 -1
- package/top-navigation/parts/utility.js.map +1 -1
- package/tree-view/index.js +1 -1
- package/tree-view/index.js.map +1 -1
- package/tree-view/internal.js +2 -4
- package/tree-view/internal.js.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/index.js +2 -4
- package/tutorial-panel/index.js.map +1 -1
- package/wizard/internal-do-not-use-core.js +2 -4
- package/wizard/internal-do-not-use-core.js.map +1 -1
- package/wizard/internal.js +23 -10
- package/wizard/internal.js.map +1 -1
- package/wizard/wizard-actions.js +3 -3
- package/wizard/wizard-actions.js.map +1 -1
- package/wizard/wizard-form.js +2 -2
- package/wizard/wizard-form.js.map +1 -1
- package/wizard/wizard-navigation.js +7 -7
- package/wizard/wizard-navigation.js.map +1 -1
package/input/styles.scoped.css
CHANGED
|
@@ -142,11 +142,11 @@
|
|
|
142
142
|
*/
|
|
143
143
|
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
144
144
|
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
145
|
-
.
|
|
145
|
+
.awsui_root_2rhyz_qs0t8_145:not(#\9) {
|
|
146
146
|
/* used in test-utils for component to distinguish input from other input-like components, for example autosuggest */
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
.
|
|
149
|
+
.awsui_input_2rhyz_qs0t8_149:not(#\9) {
|
|
150
150
|
border-collapse: separate;
|
|
151
151
|
border-spacing: 0;
|
|
152
152
|
box-sizing: border-box;
|
|
@@ -178,158 +178,158 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
178
178
|
-moz-osx-font-smoothing: auto;
|
|
179
179
|
padding-block: var(--space-scaled-xxs-pfm1nx, 4px);
|
|
180
180
|
padding-inline: var(--space-field-horizontal-0aq2ch, 12px);
|
|
181
|
-
color: var(--awsui-style-color-default-
|
|
181
|
+
color: var(--awsui-style-color-default-d43v8n, var(--color-text-body-default-vvtq8u, #0f141a));
|
|
182
182
|
inline-size: 100%;
|
|
183
183
|
cursor: text;
|
|
184
184
|
box-sizing: border-box;
|
|
185
|
-
background-color: var(--awsui-style-background-default-
|
|
185
|
+
background-color: var(--awsui-style-background-default-d43v8n, var(--color-background-input-default-ifz5bb, #ffffff));
|
|
186
186
|
border-start-start-radius: var(--border-radius-input-7q0str, 8px);
|
|
187
187
|
border-start-end-radius: var(--border-radius-input-7q0str, 8px);
|
|
188
188
|
border-end-start-radius: var(--border-radius-input-7q0str, 8px);
|
|
189
189
|
border-end-end-radius: var(--border-radius-input-7q0str, 8px);
|
|
190
|
-
border-block: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-default-
|
|
191
|
-
border-inline: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-default-
|
|
192
|
-
box-shadow: var(--awsui-style-box-shadow-default-
|
|
190
|
+
border-block: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-default-d43v8n, var(--color-border-input-default-317xk5, #8c8c94));
|
|
191
|
+
border-inline: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-default-d43v8n, var(--color-border-input-default-317xk5, #8c8c94));
|
|
192
|
+
box-shadow: var(--awsui-style-box-shadow-default-d43v8n);
|
|
193
193
|
font-size: var(--font-size-body-m-a7nh2n, 14px);
|
|
194
194
|
line-height: var(--line-height-body-m-2mh3ke, 20px);
|
|
195
195
|
block-size: var(--size-vertical-input-p1d7xx, 32px);
|
|
196
196
|
}
|
|
197
|
-
.
|
|
198
|
-
border-color: var(--awsui-style-border-color-hover-
|
|
199
|
-
color: var(--awsui-style-color-hover-
|
|
200
|
-
background-color: var(--awsui-style-background-hover-
|
|
201
|
-
box-shadow: var(--awsui-style-box-shadow-hover-
|
|
197
|
+
.awsui_input_2rhyz_qs0t8_149:not(#\9):hover {
|
|
198
|
+
border-color: var(--awsui-style-border-color-hover-d43v8n, var(--awsui-style-border-color-default-d43v8n, var(--color-border-input-default-317xk5, #8c8c94)));
|
|
199
|
+
color: var(--awsui-style-color-hover-d43v8n, var(--awsui-style-border-color-default-d43v8n, var(--color-text-body-default-vvtq8u, #0f141a)));
|
|
200
|
+
background-color: var(--awsui-style-background-hover-d43v8n, var(--awsui-style-background-default-d43v8n, var(--color-background-input-default-ifz5bb, #ffffff)));
|
|
201
|
+
box-shadow: var(--awsui-style-box-shadow-hover-d43v8n, --awsui-style-box-shadow-default-d43v8n);
|
|
202
202
|
}
|
|
203
|
-
.
|
|
204
|
-
background-color: var(--awsui-style-background-readonly-
|
|
205
|
-
border-block: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-readonly-
|
|
206
|
-
border-inline: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-readonly-
|
|
207
|
-
color: var(--awsui-style-color-readonly-
|
|
208
|
-
box-shadow: var(--awsui-style-box-shadow-readonly-
|
|
203
|
+
.awsui_input_2rhyz_qs0t8_149.awsui_input-readonly_2rhyz_qs0t8_203:not(#\9) {
|
|
204
|
+
background-color: var(--awsui-style-background-readonly-d43v8n, var(--awsui-style-background-default-d43v8n, var(--color-background-input-default-ifz5bb, #ffffff)));
|
|
205
|
+
border-block: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-readonly-d43v8n, var(--awsui-style-border-color-default-d43v8n, var(--color-border-input-disabled-zgnzvk, #ebebf0)));
|
|
206
|
+
border-inline: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-readonly-d43v8n, var(--awsui-style-border-color-default-d43v8n, var(--color-border-input-disabled-zgnzvk, #ebebf0)));
|
|
207
|
+
color: var(--awsui-style-color-readonly-d43v8n, var(--awsui-style-color-default-d43v8n, var(--color-text-body-default-vvtq8u, #0f141a)));
|
|
208
|
+
box-shadow: var(--awsui-style-box-shadow-readonly-d43v8n);
|
|
209
209
|
}
|
|
210
|
-
.
|
|
211
|
-
color: var(--awsui-style-placeholder-color-
|
|
212
|
-
font-size: var(--awsui-style-placeholder-font-size-
|
|
213
|
-
font-style: var(--awsui-style-placeholder-font-style-
|
|
214
|
-
font-weight: var(--awsui-style-placeholder-font-weight-
|
|
210
|
+
.awsui_input_2rhyz_qs0t8_149:not(#\9)::-webkit-input-placeholder {
|
|
211
|
+
color: var(--awsui-style-placeholder-color-d43v8n, var(--color-text-input-placeholder-dclg8u, #656871));
|
|
212
|
+
font-size: var(--awsui-style-placeholder-font-size-d43v8n);
|
|
213
|
+
font-style: var(--awsui-style-placeholder-font-style-d43v8n, italic);
|
|
214
|
+
font-weight: var(--awsui-style-placeholder-font-weight-d43v8n);
|
|
215
215
|
-webkit-user-select: none;
|
|
216
216
|
user-select: none;
|
|
217
217
|
}
|
|
218
|
-
.
|
|
219
|
-
color: var(--awsui-style-placeholder-color-
|
|
220
|
-
font-size: var(--awsui-style-placeholder-font-size-
|
|
221
|
-
font-style: var(--awsui-style-placeholder-font-style-
|
|
222
|
-
font-weight: var(--awsui-style-placeholder-font-weight-
|
|
218
|
+
.awsui_input_2rhyz_qs0t8_149:not(#\9)::-moz-placeholder {
|
|
219
|
+
color: var(--awsui-style-placeholder-color-d43v8n, var(--color-text-input-placeholder-dclg8u, #656871));
|
|
220
|
+
font-size: var(--awsui-style-placeholder-font-size-d43v8n);
|
|
221
|
+
font-style: var(--awsui-style-placeholder-font-style-d43v8n, italic);
|
|
222
|
+
font-weight: var(--awsui-style-placeholder-font-weight-d43v8n);
|
|
223
223
|
opacity: 1;
|
|
224
224
|
}
|
|
225
|
-
.
|
|
226
|
-
color: var(--awsui-style-placeholder-color-
|
|
227
|
-
font-size: var(--awsui-style-placeholder-font-size-
|
|
228
|
-
font-style: var(--awsui-style-placeholder-font-style-
|
|
229
|
-
font-weight: var(--awsui-style-placeholder-font-weight-
|
|
225
|
+
.awsui_input_2rhyz_qs0t8_149:not(#\9):-moz-placeholder {
|
|
226
|
+
color: var(--awsui-style-placeholder-color-d43v8n, var(--color-text-input-placeholder-dclg8u, #656871));
|
|
227
|
+
font-size: var(--awsui-style-placeholder-font-size-d43v8n);
|
|
228
|
+
font-style: var(--awsui-style-placeholder-font-style-d43v8n, italic);
|
|
229
|
+
font-weight: var(--awsui-style-placeholder-font-weight-d43v8n);
|
|
230
230
|
opacity: 1;
|
|
231
231
|
}
|
|
232
|
-
.
|
|
232
|
+
.awsui_input_2rhyz_qs0t8_149:not(#\9):focus {
|
|
233
233
|
outline: 2px dotted transparent;
|
|
234
|
-
border-block: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-focus-
|
|
235
|
-
border-inline: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-focus-
|
|
234
|
+
border-block: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-focus-d43v8n, var(--color-border-input-focused-4z0pgn, #006ce0));
|
|
235
|
+
border-inline: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-focus-d43v8n, var(--color-border-input-focused-4z0pgn, #006ce0));
|
|
236
236
|
border-start-start-radius: var(--border-radius-input-7q0str, 8px);
|
|
237
237
|
border-start-end-radius: var(--border-radius-input-7q0str, 8px);
|
|
238
238
|
border-end-start-radius: var(--border-radius-input-7q0str, 8px);
|
|
239
239
|
border-end-end-radius: var(--border-radius-input-7q0str, 8px);
|
|
240
|
-
box-shadow: var(--awsui-style-box-shadow-focus-
|
|
241
|
-
color: var(--awsui-style-color-focus-
|
|
242
|
-
background-color: var(--awsui-style-background-focus-
|
|
240
|
+
box-shadow: var(--awsui-style-box-shadow-focus-d43v8n, 0 0 0 var(--border-control-focus-ring-shadow-spread-9mjajk, 1px) var(--color-border-item-focused-uk47pl, #006ce0));
|
|
241
|
+
color: var(--awsui-style-color-focus-d43v8n, var(--color-text-body-default-vvtq8u, #0f141a));
|
|
242
|
+
background-color: var(--awsui-style-background-focus-d43v8n, var(--color-background-input-default-ifz5bb, #ffffff));
|
|
243
243
|
}
|
|
244
|
-
.
|
|
245
|
-
background-color: var(--awsui-style-background-disabled-
|
|
246
|
-
border-block: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-disabled-
|
|
247
|
-
border-inline: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-disabled-
|
|
248
|
-
color: var(--awsui-style-color-disabled-
|
|
244
|
+
.awsui_input_2rhyz_qs0t8_149:not(#\9):disabled {
|
|
245
|
+
background-color: var(--awsui-style-background-disabled-d43v8n, var(--color-background-input-disabled-dihaja, #ebebf0));
|
|
246
|
+
border-block: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-disabled-d43v8n, var(--color-border-input-disabled-zgnzvk, #ebebf0));
|
|
247
|
+
border-inline: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-disabled-d43v8n, var(--color-border-input-disabled-zgnzvk, #ebebf0));
|
|
248
|
+
color: var(--awsui-style-color-disabled-d43v8n, var(--color-text-input-disabled-wh1f3y, #b4b4bb));
|
|
249
249
|
cursor: default;
|
|
250
|
-
box-shadow: var(--awsui-style-box-shadow-disabled-
|
|
250
|
+
box-shadow: var(--awsui-style-box-shadow-disabled-d43v8n);
|
|
251
251
|
}
|
|
252
|
-
.
|
|
252
|
+
.awsui_input_2rhyz_qs0t8_149:not(#\9):disabled::-webkit-input-placeholder {
|
|
253
253
|
color: var(--color-text-input-placeholder-disabled-wg87og, #b4b4bb);
|
|
254
254
|
-webkit-user-select: none;
|
|
255
255
|
user-select: none;
|
|
256
256
|
}
|
|
257
|
-
.
|
|
257
|
+
.awsui_input_2rhyz_qs0t8_149:not(#\9):disabled::-moz-placeholder {
|
|
258
258
|
color: var(--color-text-input-placeholder-disabled-wg87og, #b4b4bb);
|
|
259
259
|
opacity: 1;
|
|
260
260
|
}
|
|
261
|
-
.
|
|
261
|
+
.awsui_input_2rhyz_qs0t8_149:not(#\9):disabled:-moz-placeholder {
|
|
262
262
|
color: var(--color-text-input-placeholder-disabled-wg87og, #b4b4bb);
|
|
263
263
|
opacity: 1;
|
|
264
264
|
}
|
|
265
|
-
.
|
|
265
|
+
.awsui_input_2rhyz_qs0t8_149:not(#\9):invalid {
|
|
266
266
|
box-shadow: none;
|
|
267
267
|
}
|
|
268
|
-
.
|
|
268
|
+
.awsui_input_2rhyz_qs0t8_149.awsui_input-invalid_2rhyz_qs0t8_266:not(#\9) {
|
|
269
269
|
color: var(--color-text-status-error-ksqavh, #db0000);
|
|
270
270
|
border-color: var(--color-text-status-error-ksqavh, #db0000);
|
|
271
271
|
padding-inline-start: calc(var(--space-field-horizontal-0aq2ch, 12px) - (var(--border-invalid-width-3xd6e1, 8px) - var(--border-width-field-2xc78x, 1px)));
|
|
272
272
|
border-inline-start-width: var(--border-invalid-width-3xd6e1, 8px);
|
|
273
273
|
}
|
|
274
|
-
.
|
|
274
|
+
.awsui_input_2rhyz_qs0t8_149.awsui_input-invalid_2rhyz_qs0t8_266:not(#\9):focus {
|
|
275
275
|
box-shadow: 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-9jjf96, 2px) var(--color-border-item-focused-uk47pl, #006ce0);
|
|
276
276
|
}
|
|
277
|
-
.
|
|
277
|
+
.awsui_input_2rhyz_qs0t8_149.awsui_input-invalid_2rhyz_qs0t8_266.awsui_input-has-icon-left_2rhyz_qs0t8_275:not(#\9) {
|
|
278
278
|
padding-inline-start: calc(var(--space-field-icon-offset-ikwzwx, 36px) - (var(--border-invalid-width-3xd6e1, 8px) - var(--border-width-field-2xc78x, 1px)));
|
|
279
279
|
}
|
|
280
|
-
.
|
|
280
|
+
.awsui_input_2rhyz_qs0t8_149.awsui_input-warning_2rhyz_qs0t8_278:not(#\9) {
|
|
281
281
|
color: var(--color-text-status-warning-6meo06, #855900);
|
|
282
282
|
border-color: var(--color-text-status-warning-6meo06, #855900);
|
|
283
283
|
padding-inline-start: calc(var(--space-field-horizontal-0aq2ch, 12px) - (var(--border-invalid-width-3xd6e1, 8px) - var(--border-width-field-2xc78x, 1px)));
|
|
284
284
|
border-inline-start-width: var(--border-invalid-width-3xd6e1, 8px);
|
|
285
285
|
}
|
|
286
|
-
.
|
|
286
|
+
.awsui_input_2rhyz_qs0t8_149.awsui_input-warning_2rhyz_qs0t8_278:not(#\9):focus {
|
|
287
287
|
box-shadow: 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-9jjf96, 2px) var(--color-border-item-focused-uk47pl, #006ce0);
|
|
288
288
|
}
|
|
289
|
-
.
|
|
289
|
+
.awsui_input_2rhyz_qs0t8_149.awsui_input-warning_2rhyz_qs0t8_278.awsui_input-has-icon-left_2rhyz_qs0t8_275:not(#\9) {
|
|
290
290
|
padding-inline-start: calc(var(--space-field-icon-offset-ikwzwx, 36px) - (var(--border-invalid-width-3xd6e1, 8px) - var(--border-width-field-2xc78x, 1px)));
|
|
291
291
|
}
|
|
292
|
-
.
|
|
292
|
+
.awsui_input_2rhyz_qs0t8_149.awsui_input-type-search_2rhyz_qs0t8_290:not(#\9) {
|
|
293
293
|
box-sizing: border-box;
|
|
294
294
|
-webkit-appearance: none;
|
|
295
295
|
}
|
|
296
|
-
.
|
|
296
|
+
.awsui_input_2rhyz_qs0t8_149.awsui_input-type-search_2rhyz_qs0t8_290:not(#\9)::-webkit-search-decoration {
|
|
297
297
|
-webkit-appearance: none;
|
|
298
298
|
}
|
|
299
|
-
.
|
|
299
|
+
.awsui_input_2rhyz_qs0t8_149.awsui_input-type-search_2rhyz_qs0t8_290:not(#\9)::-webkit-search-cancel-button {
|
|
300
300
|
display: none;
|
|
301
301
|
}
|
|
302
|
-
.
|
|
302
|
+
.awsui_input_2rhyz_qs0t8_149.awsui_input-has-icon-left_2rhyz_qs0t8_275:not(#\9) {
|
|
303
303
|
padding-inline-start: var(--space-field-icon-offset-ikwzwx, 36px);
|
|
304
304
|
}
|
|
305
|
-
.
|
|
305
|
+
.awsui_input_2rhyz_qs0t8_149.awsui_input-has-icon-right_2rhyz_qs0t8_303:not(#\9) {
|
|
306
306
|
padding-inline-end: var(--space-field-icon-offset-ikwzwx, 36px);
|
|
307
307
|
}
|
|
308
|
-
.
|
|
308
|
+
.awsui_input_2rhyz_qs0t8_149.awsui_input-has-no-border-radius_2rhyz_qs0t8_306:not(#\9) {
|
|
309
309
|
border-start-start-radius: var(--border-radius-dropdown-fgc2a1, 8px);
|
|
310
310
|
border-start-end-radius: var(--border-radius-dropdown-fgc2a1, 8px);
|
|
311
311
|
border-end-start-radius: var(--border-radius-dropdown-fgc2a1, 8px);
|
|
312
312
|
border-end-end-radius: var(--border-radius-dropdown-fgc2a1, 8px);
|
|
313
313
|
}
|
|
314
314
|
|
|
315
|
-
.awsui_input-
|
|
315
|
+
.awsui_input-container_2rhyz_qs0t8_313:not(#\9) {
|
|
316
316
|
display: flex;
|
|
317
317
|
position: relative;
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
-
.awsui_input-icon-
|
|
320
|
+
.awsui_input-icon-left_2rhyz_qs0t8_318:not(#\9) {
|
|
321
321
|
position: absolute;
|
|
322
322
|
pointer-events: none;
|
|
323
323
|
inset-inline-start: var(--space-field-horizontal-0aq2ch, 12px);
|
|
324
324
|
inset-block-start: calc(50% - var(--line-height-body-m-2mh3ke, 20px) / 2);
|
|
325
325
|
}
|
|
326
326
|
|
|
327
|
-
.awsui_input-icon-
|
|
327
|
+
.awsui_input-icon-right_2rhyz_qs0t8_325:not(#\9) {
|
|
328
328
|
position: absolute;
|
|
329
329
|
inset-block-start: calc(calc(50% - var(--line-height-body-m-2mh3ke, 20px) / 2) - var(--space-xxxs-pajhad, 2px));
|
|
330
330
|
inset-inline-end: calc(var(--space-field-horizontal-0aq2ch, 12px) - var(--space-xxs-hwfkai, 4px));
|
|
331
331
|
}
|
|
332
332
|
|
|
333
|
-
.awsui_input-button-
|
|
333
|
+
.awsui_input-button-right_2rhyz_qs0t8_331:not(#\9) {
|
|
334
334
|
/* used in test-utils */
|
|
335
335
|
}
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"root": "
|
|
6
|
-
"input": "
|
|
7
|
-
"input-readonly": "awsui_input-
|
|
8
|
-
"input-invalid": "awsui_input-
|
|
9
|
-
"input-has-icon-left": "awsui_input-has-icon-
|
|
10
|
-
"input-warning": "awsui_input-
|
|
11
|
-
"input-type-search": "awsui_input-type-
|
|
12
|
-
"input-has-icon-right": "awsui_input-has-icon-
|
|
13
|
-
"input-has-no-border-radius": "awsui_input-has-no-border-
|
|
14
|
-
"input-container": "awsui_input-
|
|
15
|
-
"input-icon-left": "awsui_input-icon-
|
|
16
|
-
"input-icon-right": "awsui_input-icon-
|
|
17
|
-
"input-button-right": "awsui_input-button-
|
|
5
|
+
"root": "awsui_root_2rhyz_qs0t8_145",
|
|
6
|
+
"input": "awsui_input_2rhyz_qs0t8_149",
|
|
7
|
+
"input-readonly": "awsui_input-readonly_2rhyz_qs0t8_203",
|
|
8
|
+
"input-invalid": "awsui_input-invalid_2rhyz_qs0t8_266",
|
|
9
|
+
"input-has-icon-left": "awsui_input-has-icon-left_2rhyz_qs0t8_275",
|
|
10
|
+
"input-warning": "awsui_input-warning_2rhyz_qs0t8_278",
|
|
11
|
+
"input-type-search": "awsui_input-type-search_2rhyz_qs0t8_290",
|
|
12
|
+
"input-has-icon-right": "awsui_input-has-icon-right_2rhyz_qs0t8_303",
|
|
13
|
+
"input-has-no-border-radius": "awsui_input-has-no-border-radius_2rhyz_qs0t8_306",
|
|
14
|
+
"input-container": "awsui_input-container_2rhyz_qs0t8_313",
|
|
15
|
+
"input-icon-left": "awsui_input-icon-left_2rhyz_qs0t8_318",
|
|
16
|
+
"input-icon-right": "awsui_input-icon-right_2rhyz_qs0t8_325",
|
|
17
|
+
"input-button-right": "awsui_input-button-right_2rhyz_qs0t8_331"
|
|
18
18
|
};
|
|
19
19
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __awaiter, __rest } from "tslib";
|
|
2
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
3
|
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
@@ -23,7 +22,7 @@ export const AnalyticsFunnel = (props) => {
|
|
|
23
22
|
if (isInFunnel && props.funnelType === 'single-page') {
|
|
24
23
|
return React.createElement(React.Fragment, null, props.children);
|
|
25
24
|
}
|
|
26
|
-
return React.createElement(InnerAnalyticsFunnel,
|
|
25
|
+
return React.createElement(InnerAnalyticsFunnel, { ...props });
|
|
27
26
|
};
|
|
28
27
|
export const CREATION_EDIT_FLOW_DONE_EVENT_NAME = 'awsui-creation-edit-flow-done';
|
|
29
28
|
const dispatchCreateEditFlowDoneEvent = () => {
|
|
@@ -31,7 +30,7 @@ const dispatchCreateEditFlowDoneEvent = () => {
|
|
|
31
30
|
try {
|
|
32
31
|
(_a = window.top) === null || _a === void 0 ? void 0 : _a.document.dispatchEvent(new Event(CREATION_EDIT_FLOW_DONE_EVENT_NAME));
|
|
33
32
|
}
|
|
34
|
-
catch
|
|
33
|
+
catch {
|
|
35
34
|
// probably because of cross-origin error, then do not dispatch the event
|
|
36
35
|
}
|
|
37
36
|
};
|
|
@@ -55,8 +54,7 @@ function evaluateSelectors(selectors, defaultSelector) {
|
|
|
55
54
|
}
|
|
56
55
|
return defaultSelector;
|
|
57
56
|
}
|
|
58
|
-
const InnerAnalyticsFunnel = (
|
|
59
|
-
var { mounted = true, children, stepConfiguration } = _a, props = __rest(_a, ["mounted", "children", "stepConfiguration"]);
|
|
57
|
+
const InnerAnalyticsFunnel = ({ mounted = true, children, stepConfiguration, ...props }) => {
|
|
60
58
|
const [funnelInteractionId, setFunnelInteractionId] = useState('');
|
|
61
59
|
const [submissionAttempt, setSubmissionAttempt] = useState(0);
|
|
62
60
|
const isVisualRefresh = useVisualRefresh();
|
|
@@ -233,7 +231,7 @@ export const AnalyticsFunnelStep = (props) => {
|
|
|
233
231
|
This wrapper is used to apply a `key` property to the actual (inner) AnalyticsFunnelStep
|
|
234
232
|
element. This allows us to keep the state and effects separate per step.
|
|
235
233
|
*/
|
|
236
|
-
return React.createElement(InnerAnalyticsFunnelStep,
|
|
234
|
+
return React.createElement(InnerAnalyticsFunnelStep, { ...props, key: props.stepNumber });
|
|
237
235
|
};
|
|
238
236
|
function getSubStepConfiguration() {
|
|
239
237
|
const subSteps = Array.from(document.querySelectorAll(getSubStepAllSelector()));
|
|
@@ -283,8 +281,7 @@ function useStepChangeListener(stepNumber, handler) {
|
|
|
283
281
|
}, SUBSTEP_CHANGE_DEBOUNCE);
|
|
284
282
|
return { onStepChange: stepChangeCallback, subStepConfiguration };
|
|
285
283
|
}
|
|
286
|
-
const InnerAnalyticsFunnelStep = (
|
|
287
|
-
var { mounted = true, children, stepNumber, stepIdentifier, stepErrorContext } = _a, rest = __rest(_a, ["mounted", "children", "stepNumber", "stepIdentifier", "stepErrorContext"]);
|
|
284
|
+
const InnerAnalyticsFunnelStep = ({ mounted = true, children, stepNumber, stepIdentifier, stepErrorContext, ...rest }) => {
|
|
288
285
|
const { funnelInteractionId, funnelIdentifier, funnelNameSelector, funnelState, funnelType } = useFunnel();
|
|
289
286
|
const parentStep = useFunnelStep();
|
|
290
287
|
const parentStepExists = parentStep.isInStep;
|
|
@@ -446,7 +443,7 @@ export const AnalyticsFunnelSubStep = ({ children, subStepIdentifier, subStepErr
|
|
|
446
443
|
focusCleanupFunction,
|
|
447
444
|
isNestedSubStep: false,
|
|
448
445
|
};
|
|
449
|
-
const inheritedContext =
|
|
446
|
+
const inheritedContext = { ...useContext(FunnelSubStepContext), isNestedSubStep: true };
|
|
450
447
|
const isNested = Boolean(inheritedContext.subStepId);
|
|
451
448
|
useEffect(() => {
|
|
452
449
|
if (!isNested) {
|
|
@@ -465,7 +462,7 @@ export const AnalyticsFunnelSubStep = ({ children, subStepIdentifier, subStepErr
|
|
|
465
462
|
return;
|
|
466
463
|
}
|
|
467
464
|
const onMouseDown = () => (mousePressed.current = true);
|
|
468
|
-
const onMouseUp = () =>
|
|
465
|
+
const onMouseUp = async () => {
|
|
469
466
|
var _a;
|
|
470
467
|
mousePressed.current = false;
|
|
471
468
|
if (!isFocusedSubStep.current) {
|
|
@@ -477,7 +474,7 @@ export const AnalyticsFunnelSubStep = ({ children, subStepIdentifier, subStepErr
|
|
|
477
474
|
event loop here, so that `document.activeElement` has the
|
|
478
475
|
correct new value.
|
|
479
476
|
*/
|
|
480
|
-
|
|
477
|
+
await new Promise(r => setTimeout(r, 1));
|
|
481
478
|
if (!subStepRef.current || !document.activeElement || !nodeBelongs(subStepRef.current, document.activeElement)) {
|
|
482
479
|
isFocusedSubStep.current = false;
|
|
483
480
|
/*
|
|
@@ -486,7 +483,7 @@ export const AnalyticsFunnelSubStep = ({ children, subStepIdentifier, subStepErr
|
|
|
486
483
|
*/
|
|
487
484
|
(_a = focusCleanupFunction.current) === null || _a === void 0 ? void 0 : _a.call(focusCleanupFunction);
|
|
488
485
|
}
|
|
489
|
-
}
|
|
486
|
+
};
|
|
490
487
|
const controller = new AbortController();
|
|
491
488
|
window.addEventListener('mousedown', onMouseDown, { signal: controller.signal });
|
|
492
489
|
window.addEventListener('mouseup', onMouseUp, { signal: controller.signal });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analytics-funnel.js","sourceRoot":"","sources":["../../../../../src/internal/analytics/components/analytics-funnel.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;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ACnB,eAAe;QACf,oBAAoB;QACpB,QAAQ;QACR,UAAU;KACX,CAAC,CAAC;IAEH,OAAO,CACL,oBAAC,oBAAoB,CAAC,QAAQ,IAAC,KAAK,EAAE,OAAO,IAC1C,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAChC,CACjC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useContext, useEffect, useRef, useState } from 'react';\n\nimport { useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport { PACKAGE_VERSION, THEME } from '../../environment';\nimport { useDebounceCallback } from '../../hooks/use-debounce-callback';\nimport { useVisualRefresh } from '../../hooks/use-visual-mode';\nimport { nodeBelongs } from '../../utils/node-belongs';\nimport {\n FunnelContext,\n FunnelContextValue,\n FunnelState,\n FunnelStepContext,\n FunnelStepContextValue,\n FunnelSubStepContext,\n FunnelSubStepContextValue,\n} from '../context/analytics-context';\nimport { useFunnel, useFunnelStep } from '../hooks/use-funnel';\nimport { FunnelMetrics, PerformanceMetrics } from '../index';\nimport {\n AnalyticsMetadata,\n FunnelStartProps,\n FunnelStepProps,\n StepConfiguration,\n SubStepConfiguration,\n TaskCompletionDataProps,\n} from '../interfaces';\nimport {\n DATA_ATTR_FUNNEL_STEP,\n DATA_ATTR_RESOURCE_TYPE,\n getFunnelNameSelector,\n getSubStepAllSelector,\n getSubStepNameSelector,\n getSubStepSelector,\n getTextFromSelector,\n} from '../selectors';\n\nconst FUNNEL_VERSION = '1.4';\n\ninterface AnalyticsFunnelProps {\n mounted?: boolean;\n children?: React.ReactNode;\n stepConfiguration?: StepConfiguration[];\n funnelNameSelectors?: () => string[];\n componentSelectors?: () => string[];\n funnelType: FunnelStartProps['funnelType'];\n optionalStepNumbers: FunnelStartProps['optionalStepNumbers'];\n totalFunnelSteps: FunnelStartProps['totalFunnelSteps'];\n funnelIdentifier?: AnalyticsMetadata['instanceIdentifier'];\n funnelFlowType?: AnalyticsMetadata['flowType'];\n funnelErrorContext?: AnalyticsMetadata['errorContext'];\n funnelResourceType?: AnalyticsMetadata['resourceType'];\n}\n\nexport const AnalyticsFunnel = (props: AnalyticsFunnelProps) => {\n const { isInFunnel } = useFunnel();\n /*\n If the current funnel component is a Form (i.e. single-page funnel), it should\n defer its funnel-handling to a parent Form element, if present.\n Wizards (i.e. multi-page funnels) always take highest precedence for handling funnels,\n and do not defer to any other element.\n */\n if (isInFunnel && props.funnelType === 'single-page') {\n return <>{props.children}</>;\n }\n\n return <InnerAnalyticsFunnel {...props} />;\n};\n\nexport const CREATION_EDIT_FLOW_DONE_EVENT_NAME = 'awsui-creation-edit-flow-done';\nconst dispatchCreateEditFlowDoneEvent = () => {\n try {\n window.top?.document.dispatchEvent(new Event(CREATION_EDIT_FLOW_DONE_EVENT_NAME));\n } catch {\n // probably because of cross-origin error, then do not dispatch the event\n }\n};\n\nconst onFunnelCancelled = ({\n funnelInteractionId,\n funnelIdentifier,\n}: {\n funnelInteractionId: string;\n funnelIdentifier?: string;\n}) => {\n FunnelMetrics.funnelCancelled({ funnelInteractionId, funnelIdentifier });\n};\n\nconst onFunnelComplete = (taskCompletionDataProps: TaskCompletionDataProps) => {\n FunnelMetrics.funnelComplete({\n funnelInteractionId: taskCompletionDataProps.taskInteractionId,\n funnelIdentifier: taskCompletionDataProps.taskIdentifier,\n });\n PerformanceMetrics.taskCompletionData(taskCompletionDataProps);\n dispatchCreateEditFlowDoneEvent();\n};\n\nfunction evaluateSelectors(selectors: string[], defaultSelector: string) {\n for (const selector of selectors) {\n const element = document.querySelector(selector);\n if (element) {\n return selector;\n }\n }\n\n return defaultSelector;\n}\n\nconst InnerAnalyticsFunnel = ({ mounted = true, children, stepConfiguration, ...props }: AnalyticsFunnelProps) => {\n const [funnelInteractionId, setFunnelInteractionId] = useState<string>('');\n const [submissionAttempt, setSubmissionAttempt] = useState(0);\n const isVisualRefresh = useVisualRefresh();\n const funnelState = useRef<FunnelState>('default');\n const funnelNameSelector = useRef<string>(getFunnelNameSelector());\n const componentSelector = useRef<string>();\n const errorCount = useRef<number>(0);\n const loadingButtonCount = useRef<number>(0);\n const wizardCount = useRef<number>(0);\n const latestFocusCleanupFunction = useRef<undefined | (() => void)>(undefined);\n const formSubmitStartTime = useRef<number>(0);\n // This useEffect hook is run once on component mount to initiate the funnel analytics.\n // It first calls the 'funnelStart' method from FunnelMetrics, providing all necessary details\n // about the funnel, and receives a unique interaction id.\n // This unique interaction id is then stored in the state for further use.\n //\n // On component unmount, it checks whether the funnel was successfully completed.\n // Based on this, it either calls 'funnelComplete' or 'funnelCancelled' method from FunnelMetrics.\n //\n // The eslint-disable is required as we deliberately want this effect to run only once on mount and unmount,\n // hence we do not provide any dependencies.\n useEffect(() => {\n if (!mounted) {\n return;\n }\n\n /*\n We run this effect with a delay, in order to detect whether this funnel contains a Wizard.\n If it does contain a Wizard, that Wizard should take precedence for handling the funnel, and\n this current funnel component should do nothing.\n */\n let funnelInteractionId: string;\n const handle = setTimeout(() => {\n funnelNameSelector.current = evaluateSelectors(props.funnelNameSelectors?.() || [], getFunnelNameSelector());\n componentSelector.current = evaluateSelectors(props.componentSelectors?.() || [], '');\n if (props.funnelType === 'single-page' && wizardCount.current > 0) {\n return;\n }\n\n // Reset the state, in case the component was re-mounted.\n funnelState.current = 'default';\n const funnelName = getTextFromSelector(funnelNameSelector.current) ?? '';\n\n const singleStepFlowStepConfiguration = [\n {\n number: 1,\n isOptional: false,\n name: funnelName,\n stepIdentifier: props.funnelIdentifier,\n },\n ];\n\n let componentTheme = THEME;\n if (THEME === 'polaris') {\n // This is the only place we specify the theme as classic so we cannot reuse the getVisualTheme function :(\n componentTheme = isVisualRefresh ? 'vr' : 'classic';\n }\n\n funnelInteractionId = FunnelMetrics.funnelStart({\n funnelName,\n funnelIdentifier: props.funnelIdentifier,\n flowType: props.funnelFlowType,\n funnelNameSelector: funnelNameSelector.current,\n componentSelector: componentSelector.current,\n optionalStepNumbers: props.optionalStepNumbers,\n funnelType: props.funnelType,\n totalFunnelSteps: props.totalFunnelSteps,\n componentVersion: PACKAGE_VERSION,\n componentTheme: componentTheme,\n funnelVersion: FUNNEL_VERSION,\n stepConfiguration: stepConfiguration ?? singleStepFlowStepConfiguration,\n resourceType: props.funnelResourceType || getTextFromSelector(`[${DATA_ATTR_RESOURCE_TYPE}]`),\n });\n\n setFunnelInteractionId(funnelInteractionId);\n }, 1);\n\n // A funnel counts as \"successful\" if it is unmounted after being \"complete\".\n /* eslint-disable react-hooks/exhaustive-deps */\n return () => {\n clearTimeout(handle);\n\n // There is no need in cleanup if the funnel was not started.\n if (!funnelInteractionId) {\n return;\n }\n\n if (props.funnelType === 'single-page' && wizardCount.current > 0) {\n return;\n }\n\n if (funnelState.current === 'validating') {\n // Finish the validation phase early.\n const taskCompletionDataProps: TaskCompletionDataProps = {\n taskIdentifier: props.funnelIdentifier,\n taskType: props.funnelType,\n timeToRespondAfterFormSubmit: performance.now() - formSubmitStartTime.current,\n taskInteractionId: funnelInteractionId,\n taskFlowType: props.funnelFlowType,\n };\n onFunnelComplete(taskCompletionDataProps);\n funnelState.current = 'complete';\n }\n\n if (funnelState.current === 'complete') {\n FunnelMetrics.funnelSuccessful({ funnelInteractionId, funnelIdentifier: props.funnelIdentifier });\n } else {\n funnelState.current = 'cancelled';\n onFunnelCancelled({ funnelInteractionId, funnelIdentifier: props.funnelIdentifier });\n }\n };\n }, [mounted]);\n /* eslint-enable react-hooks/exhaustive-deps */\n\n const funnelSubmit = () => {\n funnelState.current = 'validating';\n formSubmitStartTime.current = performance.now();\n /*\n When the user attempts to submit the form, we wait for 50 milliseconds before checking\n if any form validation errors are present. This value was chosen to give enough time\n for validation and rerendering to occur, but be low enough that the user will not\n be able to take further action in the meantime.\n */\n const VALIDATION_WAIT_DELAY = 50;\n /*\n Loading is expected to take longer than validation, so we can keep the pressure on the CPU low.\n */\n const LOADING_WAIT_DELAY = 100;\n\n const checkForCompleteness = () => {\n if (funnelState.current === 'complete') {\n return;\n }\n\n if (loadingButtonCount.current > 0) {\n setTimeout(checkForCompleteness, LOADING_WAIT_DELAY);\n return;\n }\n\n if (errorCount.current === 0) {\n /*\n If no validation errors are rendered, we treat the funnel as complete.\n */\n const taskCompletionDataProps: TaskCompletionDataProps = {\n taskIdentifier: props.funnelIdentifier,\n taskType: props.funnelType,\n timeToRespondAfterFormSubmit: performance.now() - formSubmitStartTime.current,\n taskInteractionId: funnelInteractionId,\n taskFlowType: props.funnelFlowType,\n };\n onFunnelComplete(taskCompletionDataProps);\n funnelState.current = 'complete';\n } else {\n funnelState.current = 'default';\n }\n };\n setTimeout(checkForCompleteness, VALIDATION_WAIT_DELAY);\n };\n\n const funnelNextOrSubmitAttempt = () => setSubmissionAttempt(i => i + 1);\n\n const funnelCancel = () => {};\n\n const funnelContextValue: FunnelContextValue = {\n funnelInteractionId,\n funnelIdentifier: props.funnelIdentifier,\n funnelFlowType: props.funnelFlowType,\n funnelErrorContext: props.funnelErrorContext,\n setFunnelInteractionId,\n funnelType: props.funnelType,\n optionalStepNumbers: props.optionalStepNumbers,\n totalFunnelSteps: props.totalFunnelSteps,\n funnelNameSelector: funnelNameSelector.current,\n funnelSubmit,\n funnelCancel,\n submissionAttempt,\n funnelNextOrSubmitAttempt,\n funnelState,\n errorCount,\n loadingButtonCount,\n latestFocusCleanupFunction,\n isInFunnel: true,\n wizardCount,\n };\n\n return <FunnelContext.Provider value={funnelContextValue}>{children}</FunnelContext.Provider>;\n};\n\ninterface AnalyticsFunnelStepProps {\n mounted?: boolean;\n stepIdentifier?: AnalyticsMetadata['instanceIdentifier'];\n stepErrorContext?: AnalyticsMetadata['errorContext'];\n children?: React.ReactNode | ((props: FunnelStepContextValue) => React.ReactNode);\n stepNameSelector?: FunnelStepProps['stepNameSelector'];\n stepNumber: FunnelStepProps['stepNumber'];\n}\n\nexport const AnalyticsFunnelStep = (props: AnalyticsFunnelStepProps) => {\n /*\n This wrapper is used to apply a `key` property to the actual (inner) AnalyticsFunnelStep\n element. This allows us to keep the state and effects separate per step.\n */\n return <InnerAnalyticsFunnelStep {...props} key={props.stepNumber} />;\n};\n\nfunction getSubStepConfiguration(): SubStepConfiguration[] {\n const subSteps = Array.from(document.querySelectorAll<HTMLElement>(getSubStepAllSelector()));\n\n const subStepConfiguration = subSteps.map((substep, index) => {\n const subStepIdentifier = (substep as any)?.__awsuiMetadata__?.analytics?.instanceIdentifier;\n const name = substep.querySelector<HTMLElement>(getSubStepNameSelector())?.innerText?.trim() ?? '';\n\n return {\n name,\n number: index + 1,\n subStepIdentifier,\n };\n });\n return subStepConfiguration;\n}\n\nfunction useStepChangeListener(stepNumber: number, handler: (stepConfiguration: SubStepConfiguration[]) => void) {\n const subStepConfiguration = useRef(new Map<number, SubStepConfiguration[] | undefined>());\n /*\n Chosen so that it's hopefully shorter than a user interaction, but gives enough time for the\n amount of containers to stabilise.\n */\n const SUBSTEP_CHANGE_DEBOUNCE = 50;\n\n const listenForSubStepChanges = useRef(false);\n useEffect(() => {\n // We prevent emitting the event on the first render.\n const handle = setTimeout(() => (listenForSubStepChanges.current = true), SUBSTEP_CHANGE_DEBOUNCE);\n\n return () => {\n clearTimeout(handle);\n listenForSubStepChanges.current = false;\n };\n }, []);\n\n useEffect(() => {\n const handle = setTimeout(\n () => subStepConfiguration.current.set(stepNumber, getSubStepConfiguration()),\n SUBSTEP_CHANGE_DEBOUNCE\n );\n return () => {\n clearTimeout(handle);\n };\n }, [stepNumber]);\n\n /* We debounce this handler, so that multiple containers can change at once without causing\n too many events. */\n const stepChangeCallback = useDebounceCallback(() => {\n // We don't want to emit the event after the component has been unmounted.\n if (!listenForSubStepChanges.current) {\n return;\n }\n\n subStepConfiguration.current.set(stepNumber, getSubStepConfiguration());\n handler(subStepConfiguration.current.get(stepNumber)!);\n }, SUBSTEP_CHANGE_DEBOUNCE);\n\n return { onStepChange: stepChangeCallback, subStepConfiguration };\n}\n\nconst InnerAnalyticsFunnelStep = ({\n mounted = true,\n children,\n stepNumber,\n stepIdentifier,\n stepErrorContext,\n ...rest\n}: AnalyticsFunnelStepProps) => {\n const { funnelInteractionId, funnelIdentifier, funnelNameSelector, funnelState, funnelType } = useFunnel();\n const parentStep = useFunnelStep();\n const parentStepExists = parentStep.isInStep;\n const parentStepFunnelInteractionId = parentStep.funnelInteractionId;\n\n const funnelStepProps = { [DATA_ATTR_FUNNEL_STEP]: stepNumber };\n\n const subStepCount = useRef<number>(0);\n\n const stepNameSelector = rest.stepNameSelector || funnelNameSelector;\n const { onStepChange, subStepConfiguration } = useStepChangeListener(stepNumber, subStepConfiguration => {\n if (!funnelInteractionId) {\n return;\n }\n\n FunnelMetrics.funnelStepChange({\n stepIdentifier,\n funnelIdentifier,\n funnelInteractionId,\n stepNumber,\n stepNameSelector,\n subStepAllSelector: getSubStepAllSelector(),\n totalSubSteps: subStepCount.current,\n subStepConfiguration,\n });\n });\n\n useEffect(() => {\n if (!funnelInteractionId) {\n // This step is not inside an active funnel.\n return;\n }\n\n if (mounted) {\n return;\n }\n\n const stepName = getTextFromSelector(stepNameSelector);\n const handler = setTimeout(() => {\n if (funnelState.current !== 'cancelled') {\n FunnelMetrics.funnelStepComplete({\n funnelIdentifier,\n funnelInteractionId,\n stepIdentifier,\n stepNumber,\n stepName,\n stepNameSelector,\n subStepAllSelector: getSubStepAllSelector(),\n totalSubSteps: subStepCount.current,\n });\n }\n }, 0);\n\n return () => {\n clearTimeout(handler);\n };\n }, [\n stepIdentifier,\n funnelIdentifier,\n funnelInteractionId,\n stepNumber,\n stepNameSelector,\n funnelState,\n parentStepExists,\n funnelType,\n parentStepFunnelInteractionId,\n mounted,\n ]);\n\n // This useEffect hook is used to track the start and completion of interaction with the step.\n // On mount, if there is a valid funnel interaction id, it calls the 'funnelStepStart' method from FunnelMetrics\n // to record the beginning of the interaction with the current step.\n // On unmount, it does a similar thing but this time calling 'funnelStepComplete' to record the completion of the interaction.\n useEffect(() => {\n if (!funnelInteractionId) {\n // This step is not inside an active funnel.\n return;\n }\n\n if (parentStepExists && parentStepFunnelInteractionId) {\n /*\n This step is inside another step, which already reports events as\n part of an active funnel (i.e. that step is not a parent of a Wizard).\n Thus, this current step does not need to report any events.\n */\n return;\n }\n\n const stepName = getTextFromSelector(stepNameSelector);\n\n if (funnelState.current === 'default') {\n FunnelMetrics.funnelStepStart({\n stepIdentifier,\n funnelIdentifier,\n funnelInteractionId,\n stepNumber,\n stepName,\n stepNameSelector,\n subStepAllSelector: getSubStepAllSelector(),\n totalSubSteps: subStepCount.current,\n subStepConfiguration: getSubStepConfiguration(),\n });\n }\n\n return () => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n if (funnelState.current !== 'cancelled') {\n FunnelMetrics.funnelStepComplete({\n funnelIdentifier,\n funnelInteractionId,\n stepIdentifier,\n stepNumber,\n stepName,\n stepNameSelector,\n subStepAllSelector: getSubStepAllSelector(),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n totalSubSteps: subStepCount.current,\n });\n }\n };\n }, [\n stepIdentifier,\n funnelIdentifier,\n funnelInteractionId,\n stepNumber,\n stepNameSelector,\n funnelState,\n parentStepExists,\n funnelType,\n parentStepFunnelInteractionId,\n ]);\n\n const contextValue: FunnelStepContextValue = {\n stepIdentifier,\n stepNumber,\n stepNameSelector,\n funnelStepProps,\n subStepCount,\n isInStep: true,\n funnelInteractionId,\n onStepChange,\n subStepConfiguration,\n stepErrorContext,\n };\n\n /*\n If this step is inside another step which already reports events as part of an active\n funnel (i.e. that step is not a parent of a Wizard), the current step becomes invisible\n in the hierarchy by passing the context of its parent through.\n */\n const effectiveContextValue = parentStepExists && parentStepFunnelInteractionId ? parentStep : contextValue;\n\n return (\n <FunnelStepContext.Provider value={effectiveContextValue}>\n {typeof children === 'function' ? children(effectiveContextValue) : children}\n </FunnelStepContext.Provider>\n );\n};\ninterface AnalyticsFunnelSubStepProps {\n subStepIdentifier?: AnalyticsMetadata['instanceIdentifier'];\n subStepErrorContext?: AnalyticsMetadata['errorContext'];\n children?: React.ReactNode | ((props: FunnelSubStepContextValue) => React.ReactNode);\n}\n\nexport const AnalyticsFunnelSubStep = ({\n children,\n subStepIdentifier,\n subStepErrorContext,\n}: AnalyticsFunnelSubStepProps) => {\n const subStepId = useUniqueId('substep');\n const subStepSelector = getSubStepSelector(subStepId);\n const subStepNameSelector = getSubStepNameSelector(subStepId);\n const subStepRef = useRef<HTMLDivElement | null>(null);\n const { subStepCount, onStepChange } = useFunnelStep();\n const mousePressed = useRef<boolean>(false);\n const isFocusedSubStep = useRef<boolean>(false);\n const focusCleanupFunction = useRef<undefined | (() => void)>(undefined);\n const { funnelState, funnelInteractionId } = useFunnel();\n const { stepNumber, stepNameSelector } = useFunnelStep();\n\n const newContext: FunnelSubStepContextValue = {\n subStepIdentifier,\n subStepErrorContext,\n subStepSelector,\n subStepNameSelector,\n subStepId,\n subStepRef,\n mousePressed,\n isFocusedSubStep,\n focusCleanupFunction,\n isNestedSubStep: false,\n };\n\n const inheritedContext = { ...useContext(FunnelSubStepContext), isNestedSubStep: true };\n\n const isNested = Boolean(inheritedContext.subStepId);\n\n useEffect(() => {\n if (!isNested) {\n subStepCount.current++;\n onStepChange();\n\n return () => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n subStepCount.current--;\n onStepChange();\n };\n }\n }, [isNested, subStepCount, onStepChange]);\n\n const context = isNested ? inheritedContext : newContext;\n\n useEffect(() => {\n if (isNested || !subStepRef.current) {\n return;\n }\n\n const onMouseDown = () => (mousePressed.current = true);\n\n const onMouseUp = async () => {\n mousePressed.current = false;\n\n if (!isFocusedSubStep.current) {\n return;\n }\n\n /*\n Some mouse events result in an element being focused. However,\n this happens only _after_ the onMouseUp event. We yield the\n event loop here, so that `document.activeElement` has the\n correct new value.\n */\n await new Promise(r => setTimeout(r, 1));\n\n if (!subStepRef.current || !document.activeElement || !nodeBelongs(subStepRef.current, document.activeElement)) {\n isFocusedSubStep.current = false;\n\n /*\n Run this substep's own focus cleanup function if another substep\n hasn't already done it for us.\n */\n focusCleanupFunction.current?.();\n }\n };\n const controller = new AbortController();\n window.addEventListener('mousedown', onMouseDown, { signal: controller.signal });\n window.addEventListener('mouseup', onMouseUp, { signal: controller.signal });\n return () => {\n controller.abort();\n };\n }, [\n funnelInteractionId,\n funnelState,\n stepNameSelector,\n stepNumber,\n subStepNameSelector,\n subStepSelector,\n focusCleanupFunction,\n isNested,\n subStepRef,\n ]);\n\n return (\n <FunnelSubStepContext.Provider value={context}>\n {typeof children === 'function' ? children(context) : children}\n </FunnelSubStepContext.Provider>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"analytics-funnel.js","sourceRoot":"","sources":["../../../../../src/internal/analytics/components/analytics-funnel.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE5E,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EACL,aAAa,EAGb,iBAAiB,EAEjB,oBAAoB,GAErB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAS7D,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,cAAc,CAA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,oEAAI,CAAC;YACnC,CAAC;QACH,CAAC,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;QACzC,MAAM,CAAC,gBAAgB,CAAC,WAAW,EAAE,WAAW,EAAE,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;QACjF,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7E,OAAO,GAAG,EAAE;YACV,UAAU,CAAC,KAAK,EAAE,CAAC;QACrB,CAAC,CAAC;IACJ,CAAC,EAAE;QACD,mBAAmB;QACnB,WAAW;QACX,gBAAgB;QAChB,UAAU;QACV,mBAAmB;QACnB,eAAe;QACf,oBAAoB;QACpB,QAAQ;QACR,UAAU;KACX,CAAC,CAAC;IAEH,OAAO,CACL,oBAAC,oBAAoB,CAAC,QAAQ,IAAC,KAAK,EAAE,OAAO,IAC1C,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAChC,CACjC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useContext, useEffect, useRef, useState } from 'react';\n\nimport { useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport { PACKAGE_VERSION, THEME } from '../../environment';\nimport { useDebounceCallback } from '../../hooks/use-debounce-callback';\nimport { useVisualRefresh } from '../../hooks/use-visual-mode';\nimport { nodeBelongs } from '../../utils/node-belongs';\nimport {\n FunnelContext,\n FunnelContextValue,\n FunnelState,\n FunnelStepContext,\n FunnelStepContextValue,\n FunnelSubStepContext,\n FunnelSubStepContextValue,\n} from '../context/analytics-context';\nimport { useFunnel, useFunnelStep } from '../hooks/use-funnel';\nimport { FunnelMetrics, PerformanceMetrics } from '../index';\nimport {\n AnalyticsMetadata,\n FunnelStartProps,\n FunnelStepProps,\n StepConfiguration,\n SubStepConfiguration,\n TaskCompletionDataProps,\n} from '../interfaces';\nimport {\n DATA_ATTR_FUNNEL_STEP,\n DATA_ATTR_RESOURCE_TYPE,\n getFunnelNameSelector,\n getSubStepAllSelector,\n getSubStepNameSelector,\n getSubStepSelector,\n getTextFromSelector,\n} from '../selectors';\n\nconst FUNNEL_VERSION = '1.4';\n\ninterface AnalyticsFunnelProps {\n mounted?: boolean;\n children?: React.ReactNode;\n stepConfiguration?: StepConfiguration[];\n funnelNameSelectors?: () => string[];\n componentSelectors?: () => string[];\n funnelType: FunnelStartProps['funnelType'];\n optionalStepNumbers: FunnelStartProps['optionalStepNumbers'];\n totalFunnelSteps: FunnelStartProps['totalFunnelSteps'];\n funnelIdentifier?: AnalyticsMetadata['instanceIdentifier'];\n funnelFlowType?: AnalyticsMetadata['flowType'];\n funnelErrorContext?: AnalyticsMetadata['errorContext'];\n funnelResourceType?: AnalyticsMetadata['resourceType'];\n}\n\nexport const AnalyticsFunnel = (props: AnalyticsFunnelProps) => {\n const { isInFunnel } = useFunnel();\n /*\n If the current funnel component is a Form (i.e. single-page funnel), it should\n defer its funnel-handling to a parent Form element, if present.\n Wizards (i.e. multi-page funnels) always take highest precedence for handling funnels,\n and do not defer to any other element.\n */\n if (isInFunnel && props.funnelType === 'single-page') {\n return <>{props.children}</>;\n }\n\n return <InnerAnalyticsFunnel {...props} />;\n};\n\nexport const CREATION_EDIT_FLOW_DONE_EVENT_NAME = 'awsui-creation-edit-flow-done';\nconst dispatchCreateEditFlowDoneEvent = () => {\n try {\n window.top?.document.dispatchEvent(new Event(CREATION_EDIT_FLOW_DONE_EVENT_NAME));\n } catch {\n // probably because of cross-origin error, then do not dispatch the event\n }\n};\n\nconst onFunnelCancelled = ({\n funnelInteractionId,\n funnelIdentifier,\n}: {\n funnelInteractionId: string;\n funnelIdentifier?: string;\n}) => {\n FunnelMetrics.funnelCancelled({ funnelInteractionId, funnelIdentifier });\n};\n\nconst onFunnelComplete = (taskCompletionDataProps: TaskCompletionDataProps) => {\n FunnelMetrics.funnelComplete({\n funnelInteractionId: taskCompletionDataProps.taskInteractionId,\n funnelIdentifier: taskCompletionDataProps.taskIdentifier,\n });\n PerformanceMetrics.taskCompletionData(taskCompletionDataProps);\n dispatchCreateEditFlowDoneEvent();\n};\n\nfunction evaluateSelectors(selectors: string[], defaultSelector: string) {\n for (const selector of selectors) {\n const element = document.querySelector(selector);\n if (element) {\n return selector;\n }\n }\n\n return defaultSelector;\n}\n\nconst InnerAnalyticsFunnel = ({ mounted = true, children, stepConfiguration, ...props }: AnalyticsFunnelProps) => {\n const [funnelInteractionId, setFunnelInteractionId] = useState<string>('');\n const [submissionAttempt, setSubmissionAttempt] = useState(0);\n const isVisualRefresh = useVisualRefresh();\n const funnelState = useRef<FunnelState>('default');\n const funnelNameSelector = useRef<string>(getFunnelNameSelector());\n const componentSelector = useRef<string>();\n const errorCount = useRef<number>(0);\n const loadingButtonCount = useRef<number>(0);\n const wizardCount = useRef<number>(0);\n const latestFocusCleanupFunction = useRef<undefined | (() => void)>(undefined);\n const formSubmitStartTime = useRef<number>(0);\n // This useEffect hook is run once on component mount to initiate the funnel analytics.\n // It first calls the 'funnelStart' method from FunnelMetrics, providing all necessary details\n // about the funnel, and receives a unique interaction id.\n // This unique interaction id is then stored in the state for further use.\n //\n // On component unmount, it checks whether the funnel was successfully completed.\n // Based on this, it either calls 'funnelComplete' or 'funnelCancelled' method from FunnelMetrics.\n //\n // The eslint-disable is required as we deliberately want this effect to run only once on mount and unmount,\n // hence we do not provide any dependencies.\n useEffect(() => {\n if (!mounted) {\n return;\n }\n\n /*\n We run this effect with a delay, in order to detect whether this funnel contains a Wizard.\n If it does contain a Wizard, that Wizard should take precedence for handling the funnel, and\n this current funnel component should do nothing.\n */\n let funnelInteractionId: string;\n const handle = setTimeout(() => {\n funnelNameSelector.current = evaluateSelectors(props.funnelNameSelectors?.() || [], getFunnelNameSelector());\n componentSelector.current = evaluateSelectors(props.componentSelectors?.() || [], '');\n if (props.funnelType === 'single-page' && wizardCount.current > 0) {\n return;\n }\n\n // Reset the state, in case the component was re-mounted.\n funnelState.current = 'default';\n const funnelName = getTextFromSelector(funnelNameSelector.current) ?? '';\n\n const singleStepFlowStepConfiguration = [\n {\n number: 1,\n isOptional: false,\n name: funnelName,\n stepIdentifier: props.funnelIdentifier,\n },\n ];\n\n let componentTheme = THEME;\n if (THEME === 'polaris') {\n // This is the only place we specify the theme as classic so we cannot reuse the getVisualTheme function :(\n componentTheme = isVisualRefresh ? 'vr' : 'classic';\n }\n\n funnelInteractionId = FunnelMetrics.funnelStart({\n funnelName,\n funnelIdentifier: props.funnelIdentifier,\n flowType: props.funnelFlowType,\n funnelNameSelector: funnelNameSelector.current,\n componentSelector: componentSelector.current,\n optionalStepNumbers: props.optionalStepNumbers,\n funnelType: props.funnelType,\n totalFunnelSteps: props.totalFunnelSteps,\n componentVersion: PACKAGE_VERSION,\n componentTheme: componentTheme,\n funnelVersion: FUNNEL_VERSION,\n stepConfiguration: stepConfiguration ?? singleStepFlowStepConfiguration,\n resourceType: props.funnelResourceType || getTextFromSelector(`[${DATA_ATTR_RESOURCE_TYPE}]`),\n });\n\n setFunnelInteractionId(funnelInteractionId);\n }, 1);\n\n // A funnel counts as \"successful\" if it is unmounted after being \"complete\".\n /* eslint-disable react-hooks/exhaustive-deps */\n return () => {\n clearTimeout(handle);\n\n // There is no need in cleanup if the funnel was not started.\n if (!funnelInteractionId) {\n return;\n }\n\n if (props.funnelType === 'single-page' && wizardCount.current > 0) {\n return;\n }\n\n if (funnelState.current === 'validating') {\n // Finish the validation phase early.\n const taskCompletionDataProps: TaskCompletionDataProps = {\n taskIdentifier: props.funnelIdentifier,\n taskType: props.funnelType,\n timeToRespondAfterFormSubmit: performance.now() - formSubmitStartTime.current,\n taskInteractionId: funnelInteractionId,\n taskFlowType: props.funnelFlowType,\n };\n onFunnelComplete(taskCompletionDataProps);\n funnelState.current = 'complete';\n }\n\n if (funnelState.current === 'complete') {\n FunnelMetrics.funnelSuccessful({ funnelInteractionId, funnelIdentifier: props.funnelIdentifier });\n } else {\n funnelState.current = 'cancelled';\n onFunnelCancelled({ funnelInteractionId, funnelIdentifier: props.funnelIdentifier });\n }\n };\n }, [mounted]);\n /* eslint-enable react-hooks/exhaustive-deps */\n\n const funnelSubmit = () => {\n funnelState.current = 'validating';\n formSubmitStartTime.current = performance.now();\n /*\n When the user attempts to submit the form, we wait for 50 milliseconds before checking\n if any form validation errors are present. This value was chosen to give enough time\n for validation and rerendering to occur, but be low enough that the user will not\n be able to take further action in the meantime.\n */\n const VALIDATION_WAIT_DELAY = 50;\n /*\n Loading is expected to take longer than validation, so we can keep the pressure on the CPU low.\n */\n const LOADING_WAIT_DELAY = 100;\n\n const checkForCompleteness = () => {\n if (funnelState.current === 'complete') {\n return;\n }\n\n if (loadingButtonCount.current > 0) {\n setTimeout(checkForCompleteness, LOADING_WAIT_DELAY);\n return;\n }\n\n if (errorCount.current === 0) {\n /*\n If no validation errors are rendered, we treat the funnel as complete.\n */\n const taskCompletionDataProps: TaskCompletionDataProps = {\n taskIdentifier: props.funnelIdentifier,\n taskType: props.funnelType,\n timeToRespondAfterFormSubmit: performance.now() - formSubmitStartTime.current,\n taskInteractionId: funnelInteractionId,\n taskFlowType: props.funnelFlowType,\n };\n onFunnelComplete(taskCompletionDataProps);\n funnelState.current = 'complete';\n } else {\n funnelState.current = 'default';\n }\n };\n setTimeout(checkForCompleteness, VALIDATION_WAIT_DELAY);\n };\n\n const funnelNextOrSubmitAttempt = () => setSubmissionAttempt(i => i + 1);\n\n const funnelCancel = () => {};\n\n const funnelContextValue: FunnelContextValue = {\n funnelInteractionId,\n funnelIdentifier: props.funnelIdentifier,\n funnelFlowType: props.funnelFlowType,\n funnelErrorContext: props.funnelErrorContext,\n setFunnelInteractionId,\n funnelType: props.funnelType,\n optionalStepNumbers: props.optionalStepNumbers,\n totalFunnelSteps: props.totalFunnelSteps,\n funnelNameSelector: funnelNameSelector.current,\n funnelSubmit,\n funnelCancel,\n submissionAttempt,\n funnelNextOrSubmitAttempt,\n funnelState,\n errorCount,\n loadingButtonCount,\n latestFocusCleanupFunction,\n isInFunnel: true,\n wizardCount,\n };\n\n return <FunnelContext.Provider value={funnelContextValue}>{children}</FunnelContext.Provider>;\n};\n\ninterface AnalyticsFunnelStepProps {\n mounted?: boolean;\n stepIdentifier?: AnalyticsMetadata['instanceIdentifier'];\n stepErrorContext?: AnalyticsMetadata['errorContext'];\n children?: React.ReactNode | ((props: FunnelStepContextValue) => React.ReactNode);\n stepNameSelector?: FunnelStepProps['stepNameSelector'];\n stepNumber: FunnelStepProps['stepNumber'];\n}\n\nexport const AnalyticsFunnelStep = (props: AnalyticsFunnelStepProps) => {\n /*\n This wrapper is used to apply a `key` property to the actual (inner) AnalyticsFunnelStep\n element. This allows us to keep the state and effects separate per step.\n */\n return <InnerAnalyticsFunnelStep {...props} key={props.stepNumber} />;\n};\n\nfunction getSubStepConfiguration(): SubStepConfiguration[] {\n const subSteps = Array.from(document.querySelectorAll<HTMLElement>(getSubStepAllSelector()));\n\n const subStepConfiguration = subSteps.map((substep, index) => {\n const subStepIdentifier = (substep as any)?.__awsuiMetadata__?.analytics?.instanceIdentifier;\n const name = substep.querySelector<HTMLElement>(getSubStepNameSelector())?.innerText?.trim() ?? '';\n\n return {\n name,\n number: index + 1,\n subStepIdentifier,\n };\n });\n return subStepConfiguration;\n}\n\nfunction useStepChangeListener(stepNumber: number, handler: (stepConfiguration: SubStepConfiguration[]) => void) {\n const subStepConfiguration = useRef(new Map<number, SubStepConfiguration[] | undefined>());\n /*\n Chosen so that it's hopefully shorter than a user interaction, but gives enough time for the\n amount of containers to stabilise.\n */\n const SUBSTEP_CHANGE_DEBOUNCE = 50;\n\n const listenForSubStepChanges = useRef(false);\n useEffect(() => {\n // We prevent emitting the event on the first render.\n const handle = setTimeout(() => (listenForSubStepChanges.current = true), SUBSTEP_CHANGE_DEBOUNCE);\n\n return () => {\n clearTimeout(handle);\n listenForSubStepChanges.current = false;\n };\n }, []);\n\n useEffect(() => {\n const handle = setTimeout(\n () => subStepConfiguration.current.set(stepNumber, getSubStepConfiguration()),\n SUBSTEP_CHANGE_DEBOUNCE\n );\n return () => {\n clearTimeout(handle);\n };\n }, [stepNumber]);\n\n /* We debounce this handler, so that multiple containers can change at once without causing\n too many events. */\n const stepChangeCallback = useDebounceCallback(() => {\n // We don't want to emit the event after the component has been unmounted.\n if (!listenForSubStepChanges.current) {\n return;\n }\n\n subStepConfiguration.current.set(stepNumber, getSubStepConfiguration());\n handler(subStepConfiguration.current.get(stepNumber)!);\n }, SUBSTEP_CHANGE_DEBOUNCE);\n\n return { onStepChange: stepChangeCallback, subStepConfiguration };\n}\n\nconst InnerAnalyticsFunnelStep = ({\n mounted = true,\n children,\n stepNumber,\n stepIdentifier,\n stepErrorContext,\n ...rest\n}: AnalyticsFunnelStepProps) => {\n const { funnelInteractionId, funnelIdentifier, funnelNameSelector, funnelState, funnelType } = useFunnel();\n const parentStep = useFunnelStep();\n const parentStepExists = parentStep.isInStep;\n const parentStepFunnelInteractionId = parentStep.funnelInteractionId;\n\n const funnelStepProps = { [DATA_ATTR_FUNNEL_STEP]: stepNumber };\n\n const subStepCount = useRef<number>(0);\n\n const stepNameSelector = rest.stepNameSelector || funnelNameSelector;\n const { onStepChange, subStepConfiguration } = useStepChangeListener(stepNumber, subStepConfiguration => {\n if (!funnelInteractionId) {\n return;\n }\n\n FunnelMetrics.funnelStepChange({\n stepIdentifier,\n funnelIdentifier,\n funnelInteractionId,\n stepNumber,\n stepNameSelector,\n subStepAllSelector: getSubStepAllSelector(),\n totalSubSteps: subStepCount.current,\n subStepConfiguration,\n });\n });\n\n useEffect(() => {\n if (!funnelInteractionId) {\n // This step is not inside an active funnel.\n return;\n }\n\n if (mounted) {\n return;\n }\n\n const stepName = getTextFromSelector(stepNameSelector);\n const handler = setTimeout(() => {\n if (funnelState.current !== 'cancelled') {\n FunnelMetrics.funnelStepComplete({\n funnelIdentifier,\n funnelInteractionId,\n stepIdentifier,\n stepNumber,\n stepName,\n stepNameSelector,\n subStepAllSelector: getSubStepAllSelector(),\n totalSubSteps: subStepCount.current,\n });\n }\n }, 0);\n\n return () => {\n clearTimeout(handler);\n };\n }, [\n stepIdentifier,\n funnelIdentifier,\n funnelInteractionId,\n stepNumber,\n stepNameSelector,\n funnelState,\n parentStepExists,\n funnelType,\n parentStepFunnelInteractionId,\n mounted,\n ]);\n\n // This useEffect hook is used to track the start and completion of interaction with the step.\n // On mount, if there is a valid funnel interaction id, it calls the 'funnelStepStart' method from FunnelMetrics\n // to record the beginning of the interaction with the current step.\n // On unmount, it does a similar thing but this time calling 'funnelStepComplete' to record the completion of the interaction.\n useEffect(() => {\n if (!funnelInteractionId) {\n // This step is not inside an active funnel.\n return;\n }\n\n if (parentStepExists && parentStepFunnelInteractionId) {\n /*\n This step is inside another step, which already reports events as\n part of an active funnel (i.e. that step is not a parent of a Wizard).\n Thus, this current step does not need to report any events.\n */\n return;\n }\n\n const stepName = getTextFromSelector(stepNameSelector);\n\n if (funnelState.current === 'default') {\n FunnelMetrics.funnelStepStart({\n stepIdentifier,\n funnelIdentifier,\n funnelInteractionId,\n stepNumber,\n stepName,\n stepNameSelector,\n subStepAllSelector: getSubStepAllSelector(),\n totalSubSteps: subStepCount.current,\n subStepConfiguration: getSubStepConfiguration(),\n });\n }\n\n return () => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n if (funnelState.current !== 'cancelled') {\n FunnelMetrics.funnelStepComplete({\n funnelIdentifier,\n funnelInteractionId,\n stepIdentifier,\n stepNumber,\n stepName,\n stepNameSelector,\n subStepAllSelector: getSubStepAllSelector(),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n totalSubSteps: subStepCount.current,\n });\n }\n };\n }, [\n stepIdentifier,\n funnelIdentifier,\n funnelInteractionId,\n stepNumber,\n stepNameSelector,\n funnelState,\n parentStepExists,\n funnelType,\n parentStepFunnelInteractionId,\n ]);\n\n const contextValue: FunnelStepContextValue = {\n stepIdentifier,\n stepNumber,\n stepNameSelector,\n funnelStepProps,\n subStepCount,\n isInStep: true,\n funnelInteractionId,\n onStepChange,\n subStepConfiguration,\n stepErrorContext,\n };\n\n /*\n If this step is inside another step which already reports events as part of an active\n funnel (i.e. that step is not a parent of a Wizard), the current step becomes invisible\n in the hierarchy by passing the context of its parent through.\n */\n const effectiveContextValue = parentStepExists && parentStepFunnelInteractionId ? parentStep : contextValue;\n\n return (\n <FunnelStepContext.Provider value={effectiveContextValue}>\n {typeof children === 'function' ? children(effectiveContextValue) : children}\n </FunnelStepContext.Provider>\n );\n};\ninterface AnalyticsFunnelSubStepProps {\n subStepIdentifier?: AnalyticsMetadata['instanceIdentifier'];\n subStepErrorContext?: AnalyticsMetadata['errorContext'];\n children?: React.ReactNode | ((props: FunnelSubStepContextValue) => React.ReactNode);\n}\n\nexport const AnalyticsFunnelSubStep = ({\n children,\n subStepIdentifier,\n subStepErrorContext,\n}: AnalyticsFunnelSubStepProps) => {\n const subStepId = useUniqueId('substep');\n const subStepSelector = getSubStepSelector(subStepId);\n const subStepNameSelector = getSubStepNameSelector(subStepId);\n const subStepRef = useRef<HTMLDivElement | null>(null);\n const { subStepCount, onStepChange } = useFunnelStep();\n const mousePressed = useRef<boolean>(false);\n const isFocusedSubStep = useRef<boolean>(false);\n const focusCleanupFunction = useRef<undefined | (() => void)>(undefined);\n const { funnelState, funnelInteractionId } = useFunnel();\n const { stepNumber, stepNameSelector } = useFunnelStep();\n\n const newContext: FunnelSubStepContextValue = {\n subStepIdentifier,\n subStepErrorContext,\n subStepSelector,\n subStepNameSelector,\n subStepId,\n subStepRef,\n mousePressed,\n isFocusedSubStep,\n focusCleanupFunction,\n isNestedSubStep: false,\n };\n\n const inheritedContext = { ...useContext(FunnelSubStepContext), isNestedSubStep: true };\n\n const isNested = Boolean(inheritedContext.subStepId);\n\n useEffect(() => {\n if (!isNested) {\n subStepCount.current++;\n onStepChange();\n\n return () => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n subStepCount.current--;\n onStepChange();\n };\n }\n }, [isNested, subStepCount, onStepChange]);\n\n const context = isNested ? inheritedContext : newContext;\n\n useEffect(() => {\n if (isNested || !subStepRef.current) {\n return;\n }\n\n const onMouseDown = () => (mousePressed.current = true);\n\n const onMouseUp = async () => {\n mousePressed.current = false;\n\n if (!isFocusedSubStep.current) {\n return;\n }\n\n /*\n Some mouse events result in an element being focused. However,\n this happens only _after_ the onMouseUp event. We yield the\n event loop here, so that `document.activeElement` has the\n correct new value.\n */\n await new Promise(r => setTimeout(r, 1));\n\n if (!subStepRef.current || !document.activeElement || !nodeBelongs(subStepRef.current, document.activeElement)) {\n isFocusedSubStep.current = false;\n\n /*\n Run this substep's own focus cleanup function if another substep\n hasn't already done it for us.\n */\n focusCleanupFunction.current?.();\n }\n };\n const controller = new AbortController();\n window.addEventListener('mousedown', onMouseDown, { signal: controller.signal });\n window.addEventListener('mouseup', onMouseUp, { signal: controller.signal });\n return () => {\n controller.abort();\n };\n }, [\n funnelInteractionId,\n funnelState,\n stepNameSelector,\n stepNumber,\n subStepNameSelector,\n subStepSelector,\n focusCleanupFunction,\n isNested,\n subStepRef,\n ]);\n\n return (\n <FunnelSubStepContext.Provider value={context}>\n {typeof children === 'function' ? children(context) : children}\n </FunnelSubStepContext.Provider>\n );\n};\n"]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import { __awaiter } from "tslib";
|
|
4
3
|
import { useContext, useRef } from 'react';
|
|
5
4
|
import { nodeBelongs } from '../../utils/node-belongs';
|
|
6
5
|
import { FunnelMetrics } from '../';
|
|
@@ -24,11 +23,11 @@ export const useFunnelSubStep = () => {
|
|
|
24
23
|
if (isNestedSubStep) {
|
|
25
24
|
return context;
|
|
26
25
|
}
|
|
27
|
-
const onFocus = (event) =>
|
|
26
|
+
const onFocus = async (event) => {
|
|
28
27
|
var _a, _b, _c, _d;
|
|
29
28
|
const element = event.target;
|
|
30
29
|
// Ignore spurious focus events, such as when the browser window is focused again.
|
|
31
|
-
|
|
30
|
+
await new Promise(r => setTimeout(r, 1));
|
|
32
31
|
if (document.activeElement !== element) {
|
|
33
32
|
return;
|
|
34
33
|
}
|
|
@@ -96,7 +95,7 @@ export const useFunnelSubStep = () => {
|
|
|
96
95
|
};
|
|
97
96
|
latestFocusCleanupFunction.current = focusCleanupFunction.current;
|
|
98
97
|
}
|
|
99
|
-
}
|
|
98
|
+
};
|
|
100
99
|
const onBlur = (event) => {
|
|
101
100
|
var _a;
|
|
102
101
|
if (mousePressed.current) {
|
|
@@ -127,7 +126,7 @@ export const useFunnelSubStep = () => {
|
|
|
127
126
|
onBlur,
|
|
128
127
|
}
|
|
129
128
|
: {};
|
|
130
|
-
return
|
|
129
|
+
return { funnelSubStepProps, ...context };
|
|
131
130
|
};
|
|
132
131
|
/**
|
|
133
132
|
* Custom React Hook to manage and interact with FunnelStep.
|
|
@@ -157,7 +156,7 @@ export const useFunnel = () => {
|
|
|
157
156
|
[DATA_ATTR_FUNNEL_INTERACTION_ID]: context.funnelInteractionId,
|
|
158
157
|
}
|
|
159
158
|
: {};
|
|
160
|
-
return
|
|
159
|
+
return { funnelProps, ...context };
|
|
161
160
|
};
|
|
162
161
|
export const useFunnelNameSelector = () => {
|
|
163
162
|
const context = useContext(FunnelNameSelectorContext);
|