@cloudscape-design/components 3.0.870 → 3.0.872
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/app-layout/drawer/resizable-drawer.d.ts.map +1 -1
- package/app-layout/drawer/resizable-drawer.js +2 -3
- package/app-layout/drawer/resizable-drawer.js.map +1 -1
- package/app-layout/utils/use-focus-control.d.ts +1 -2
- package/app-layout/utils/use-focus-control.d.ts.map +1 -1
- package/app-layout/utils/use-focus-control.js +0 -2
- package/app-layout/utils/use-focus-control.js.map +1 -1
- package/app-layout/utils/use-resize.d.ts.map +1 -1
- package/app-layout/utils/use-resize.js +2 -3
- package/app-layout/utils/use-resize.js.map +1 -1
- package/app-layout/utils/use-split-panel-focus-control.d.ts +1 -2
- package/app-layout/utils/use-split-panel-focus-control.d.ts.map +1 -1
- package/app-layout/utils/use-split-panel-focus-control.js +0 -1
- package/app-layout/utils/use-split-panel-focus-control.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/global-drawer.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/global-drawer.js +2 -3
- package/app-layout/visual-refresh-toolbar/drawer/global-drawer.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/local-drawer.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/local-drawer.js +2 -3
- package/app-layout/visual-refresh-toolbar/drawer/local-drawer.js.map +1 -1
- package/button-group/index.d.ts.map +1 -1
- package/button-group/index.js +22 -1
- package/button-group/index.js.map +1 -1
- package/button-group/interfaces.d.ts +2 -1
- package/button-group/interfaces.d.ts.map +1 -1
- package/button-group/interfaces.js.map +1 -1
- package/collection-preferences/content-display/index.d.ts.map +1 -1
- package/collection-preferences/content-display/index.js +8 -5
- package/collection-preferences/content-display/index.js.map +1 -1
- package/container/styles.css.js +32 -31
- package/container/styles.scoped.css +57 -54
- package/container/styles.selectors.js +32 -31
- package/flashbar/internal/analytics.d.ts.map +1 -1
- package/flashbar/internal/analytics.js +1 -3
- package/flashbar/internal/analytics.js.map +1 -1
- package/internal/components/autosuggest-input/index.d.ts.map +1 -1
- package/internal/components/autosuggest-input/index.js +6 -0
- package/internal/components/autosuggest-input/index.js.map +1 -1
- package/internal/components/drag-handle/index.d.ts +2 -2
- package/internal/components/drag-handle/index.d.ts.map +1 -1
- package/internal/components/drag-handle/index.js +7 -3
- package/internal/components/drag-handle/index.js.map +1 -1
- package/internal/components/drag-handle/interfaces.d.ts +1 -1
- package/internal/components/drag-handle/interfaces.d.ts.map +1 -1
- package/internal/components/drag-handle/interfaces.js.map +1 -1
- package/internal/components/panel-resize-handle/icon.d.ts +5 -0
- package/internal/components/panel-resize-handle/icon.d.ts.map +1 -0
- package/internal/components/panel-resize-handle/icon.js +9 -0
- package/internal/components/panel-resize-handle/icon.js.map +1 -0
- package/internal/components/panel-resize-handle/index.d.ts +2 -4
- package/internal/components/panel-resize-handle/index.d.ts.map +1 -1
- package/internal/components/panel-resize-handle/index.js +5 -8
- package/internal/components/panel-resize-handle/index.js.map +1 -1
- package/internal/components/panel-resize-handle/styles.css.js +5 -2
- package/internal/components/panel-resize-handle/styles.scoped.css +191 -3
- package/internal/components/panel-resize-handle/styles.selectors.js +5 -2
- package/internal/components/sortable-area/index.d.ts +6 -0
- package/internal/components/sortable-area/index.d.ts.map +1 -0
- package/internal/components/{dnd-area → sortable-area}/index.js +34 -25
- package/internal/components/sortable-area/index.js.map +1 -0
- package/internal/components/sortable-area/interfaces.d.ts +42 -0
- package/internal/components/sortable-area/interfaces.d.ts.map +1 -0
- package/internal/components/sortable-area/interfaces.js.map +1 -0
- package/internal/components/sortable-area/keyboard-sensor/defaults.d.ts.map +1 -0
- package/internal/components/sortable-area/keyboard-sensor/defaults.js.map +1 -0
- package/internal/components/sortable-area/keyboard-sensor/index.d.ts.map +1 -0
- package/internal/components/sortable-area/keyboard-sensor/index.js.map +1 -0
- package/internal/components/sortable-area/keyboard-sensor/utilities/events.d.ts.map +1 -0
- package/internal/components/sortable-area/keyboard-sensor/utilities/events.js.map +1 -0
- package/internal/components/sortable-area/keyboard-sensor/utilities/listeners.d.ts.map +1 -0
- package/internal/components/sortable-area/keyboard-sensor/utilities/listeners.js.map +1 -0
- package/internal/components/sortable-area/keyboard-sensor/utilities/scroll.d.ts.map +1 -0
- package/internal/components/sortable-area/keyboard-sensor/utilities/scroll.js.map +1 -0
- package/internal/components/sortable-area/styles.css.js +13 -0
- package/internal/components/{dnd-area → sortable-area}/styles.scoped.css +17 -17
- package/internal/components/sortable-area/styles.selectors.js +14 -0
- package/internal/components/{dnd-area → sortable-area}/use-drag-and-drop-reorder.d.ts +4 -3
- package/internal/components/sortable-area/use-drag-and-drop-reorder.d.ts.map +1 -0
- package/internal/components/{dnd-area → sortable-area}/use-drag-and-drop-reorder.js +4 -4
- package/internal/components/sortable-area/use-drag-and-drop-reorder.js.map +1 -0
- package/internal/components/sortable-area/use-live-announcements.d.ts +13 -0
- package/internal/components/sortable-area/use-live-announcements.d.ts.map +1 -0
- package/internal/components/{dnd-area → sortable-area}/use-live-announcements.js +6 -6
- package/internal/components/sortable-area/use-live-announcements.js.map +1 -0
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/manifest.json +1 -1
- package/internal/metrics.d.ts +3 -0
- package/internal/metrics.d.ts.map +1 -0
- package/internal/metrics.js +6 -0
- package/internal/metrics.js.map +1 -0
- package/internal/plugins/api.d.ts.map +1 -1
- package/internal/plugins/api.js +4 -0
- package/internal/plugins/api.js.map +1 -1
- package/internal/plugins/controllers/alert-flash-content.d.ts.map +1 -1
- package/internal/plugins/controllers/alert-flash-content.js +2 -1
- package/internal/plugins/controllers/alert-flash-content.js.map +1 -1
- package/internal/plugins/controllers/drawers.d.ts.map +1 -1
- package/internal/plugins/controllers/drawers.js +7 -3
- package/internal/plugins/controllers/drawers.js.map +1 -1
- package/internal/plugins/helpers/metrics.d.ts +3 -0
- package/internal/plugins/helpers/metrics.d.ts.map +1 -0
- package/internal/plugins/helpers/metrics.js +15 -0
- package/internal/plugins/helpers/metrics.js.map +1 -0
- package/internal/plugins/helpers/use-discovered-content.d.ts.map +1 -1
- package/internal/plugins/helpers/use-discovered-content.js +2 -1
- package/internal/plugins/helpers/use-discovered-content.js.map +1 -1
- package/internal/utils/dom.d.ts +1 -0
- package/internal/utils/dom.d.ts.map +1 -1
- package/internal/utils/dom.js +8 -0
- package/internal/utils/dom.js.map +1 -1
- package/package.json +1 -1
- package/split-panel/implementation.d.ts.map +1 -1
- package/split-panel/implementation.js +6 -7
- package/split-panel/implementation.js.map +1 -1
- package/table/header-cell/styles.css.js +28 -26
- package/table/header-cell/styles.scoped.css +68 -65
- package/table/header-cell/styles.selectors.js +28 -26
- package/table/table-role/utils.d.ts.map +1 -1
- package/table/table-role/utils.js +4 -5
- package/table/table-role/utils.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/exports.d.ts +0 -6
- package/app-layout/visual-refresh-toolbar/exports.d.ts.map +0 -1
- package/app-layout/visual-refresh-toolbar/exports.js +0 -8
- package/app-layout/visual-refresh-toolbar/exports.js.map +0 -1
- package/internal/components/dnd-area/index.d.ts +0 -4
- package/internal/components/dnd-area/index.d.ts.map +0 -1
- package/internal/components/dnd-area/index.js.map +0 -1
- package/internal/components/dnd-area/interfaces.d.ts +0 -39
- package/internal/components/dnd-area/interfaces.d.ts.map +0 -1
- package/internal/components/dnd-area/interfaces.js.map +0 -1
- package/internal/components/dnd-area/keyboard-sensor/defaults.d.ts.map +0 -1
- package/internal/components/dnd-area/keyboard-sensor/defaults.js.map +0 -1
- package/internal/components/dnd-area/keyboard-sensor/index.d.ts.map +0 -1
- package/internal/components/dnd-area/keyboard-sensor/index.js.map +0 -1
- package/internal/components/dnd-area/keyboard-sensor/utilities/events.d.ts.map +0 -1
- package/internal/components/dnd-area/keyboard-sensor/utilities/events.js.map +0 -1
- package/internal/components/dnd-area/keyboard-sensor/utilities/listeners.d.ts.map +0 -1
- package/internal/components/dnd-area/keyboard-sensor/utilities/listeners.js.map +0 -1
- package/internal/components/dnd-area/keyboard-sensor/utilities/scroll.d.ts.map +0 -1
- package/internal/components/dnd-area/keyboard-sensor/utilities/scroll.js.map +0 -1
- package/internal/components/dnd-area/styles.css.js +0 -13
- package/internal/components/dnd-area/styles.selectors.js +0 -14
- package/internal/components/dnd-area/use-drag-and-drop-reorder.d.ts.map +0 -1
- package/internal/components/dnd-area/use-drag-and-drop-reorder.js.map +0 -1
- package/internal/components/dnd-area/use-live-announcements.d.ts +0 -12
- package/internal/components/dnd-area/use-live-announcements.d.ts.map +0 -1
- package/internal/components/dnd-area/use-live-announcements.js.map +0 -1
- /package/internal/components/{dnd-area → sortable-area}/interfaces.js +0 -0
- /package/internal/components/{dnd-area → sortable-area}/keyboard-sensor/defaults.d.ts +0 -0
- /package/internal/components/{dnd-area → sortable-area}/keyboard-sensor/defaults.js +0 -0
- /package/internal/components/{dnd-area → sortable-area}/keyboard-sensor/index.d.ts +0 -0
- /package/internal/components/{dnd-area → sortable-area}/keyboard-sensor/index.js +0 -0
- /package/internal/components/{dnd-area → sortable-area}/keyboard-sensor/utilities/events.d.ts +0 -0
- /package/internal/components/{dnd-area → sortable-area}/keyboard-sensor/utilities/events.js +0 -0
- /package/internal/components/{dnd-area → sortable-area}/keyboard-sensor/utilities/listeners.d.ts +0 -0
- /package/internal/components/{dnd-area → sortable-area}/keyboard-sensor/utilities/listeners.js +0 -0
- /package/internal/components/{dnd-area → sortable-area}/keyboard-sensor/utilities/scroll.d.ts +0 -0
- /package/internal/components/{dnd-area → sortable-area}/keyboard-sensor/utilities/scroll.js +0 -0
|
@@ -5,7 +5,7 @@ import clsx from 'clsx';
|
|
|
5
5
|
import InternalBox from '../../box/internal';
|
|
6
6
|
import InternalButton from '../../button/internal';
|
|
7
7
|
import { useInternalI18n } from '../../i18n/context';
|
|
8
|
-
import
|
|
8
|
+
import SortableArea from '../../internal/components/sortable-area';
|
|
9
9
|
import { useUniqueId } from '../../internal/hooks/use-unique-id';
|
|
10
10
|
import InternalSpaceBetween from '../../space-between/internal';
|
|
11
11
|
import InternalTextFilter from '../../text-filter/internal';
|
|
@@ -46,10 +46,13 @@ export default function ContentDisplayPreference({ title, description, options,
|
|
|
46
46
|
React.createElement(InternalBox, { margin: { top: 'm' } }, i18n('contentDisplayPreference.i18nStrings.columnFilteringNoMatchText', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.columnFilteringNoMatchText)),
|
|
47
47
|
React.createElement(InternalButton, { onClick: () => setColumnFilteringText('') }, i18n('contentDisplayPreference.i18nStrings.columnFilteringClearFilterText', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.columnFilteringClearFilterText))))),
|
|
48
48
|
React.createElement("ul", { className: getClassName('option-list'), "aria-describedby": descriptionId, "aria-labelledby": titleId, role: "list" },
|
|
49
|
-
React.createElement(
|
|
50
|
-
className = clsx(className, getOptionClassName()
|
|
51
|
-
const content = (React.createElement(ContentDisplayOption, { ref: ref, option: item
|
|
52
|
-
|
|
49
|
+
React.createElement(SortableArea, { items: sortedAndFilteredOptions, itemDefinition: { id: item => item.id, label: item => item.label }, onItemsChange: ({ detail }) => onChange(detail.items), disableReorder: columnFilteringText.trim().length > 0, renderItem: ({ ref, item, style, className, dragHandleProps, isDragGhost }) => {
|
|
50
|
+
className = clsx(className, getOptionClassName());
|
|
51
|
+
const content = (React.createElement(ContentDisplayOption, { ref: ref, option: item, onToggle: onToggle, dragHandleProps: dragHandleProps }));
|
|
52
|
+
if (isDragGhost) {
|
|
53
|
+
return content;
|
|
54
|
+
}
|
|
55
|
+
return (React.createElement("li", { className: className, style: style }, content));
|
|
53
56
|
}, i18nStrings: {
|
|
54
57
|
liveAnnouncementDndStarted: i18n('contentDisplayPreference.liveAnnouncementDndStarted', liveAnnouncementDndStarted, format => (position, total) => format({ position, total })),
|
|
55
58
|
liveAnnouncementDndItemReordered: i18n('contentDisplayPreference.liveAnnouncementDndItemReordered', liveAnnouncementDndItemReordered, format => (initialPosition, currentPosition, total) => format({ currentPosition, total, isInitialPosition: `${initialPosition === currentPosition}` })),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/collection-preferences/content-display/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAC7C,OAAO,cAAc,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,oBAAoB,MAAM,8BAA8B,CAAC;AAChE,OAAO,kBAAkB,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,iCAAiC,EAAE,MAAM,6BAA6B,CAAC;AAEhF,OAAO,oBAAoB,EAAE,EAAE,YAAY,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACpG,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAwB,MAAM,SAAS,CAAC;AAErF,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAEtC,MAAM,eAAe,GAAG,iBAAiB,CAAC;AAE1C,MAAM,YAAY,GAAG,CAAC,MAAc,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,eAAe,IAAI,MAAM,EAAE,CAAC,CAAC;AAOhF,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,EAC/C,KAAK,EACL,WAAW,EACX,OAAO,EACP,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IAC/B,EAAE;IACF,OAAO,EAAE,IAAI;CACd,CAAC,CAAC,EACH,QAAQ,EACR,0BAA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J,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useMemo, useState } from 'react';\nimport clsx from 'clsx';\n\nimport InternalBox from '../../box/internal';\nimport InternalButton from '../../button/internal';\nimport { useInternalI18n } from '../../i18n/context';\nimport { DndArea } from '../../internal/components/dnd-area';\nimport { useUniqueId } from '../../internal/hooks/use-unique-id';\nimport InternalSpaceBetween from '../../space-between/internal';\nimport InternalTextFilter from '../../text-filter/internal';\nimport { getAnalyticsInnerContextAttribute } from '../analytics-metadata/utils';\nimport { CollectionPreferencesProps } from '../interfaces';\nimport ContentDisplayOption, { getClassName as getOptionClassName } from './content-display-option';\nimport { getFilteredOptions, getSortedOptions, OptionWithVisibility } from './utils';\n\nimport styles from '../styles.css.js';\n\nconst componentPrefix = 'content-display';\n\nconst getClassName = (suffix: string) => styles[`${componentPrefix}-${suffix}`];\n\ninterface ContentDisplayPreferenceProps extends CollectionPreferencesProps.ContentDisplayPreference {\n onChange: (value: ReadonlyArray<CollectionPreferencesProps.ContentDisplayItem>) => void;\n value?: ReadonlyArray<CollectionPreferencesProps.ContentDisplayItem>;\n}\n\nexport default function ContentDisplayPreference({\n title,\n description,\n options,\n value = options.map(({ id }) => ({\n id,\n visible: true,\n })),\n onChange,\n liveAnnouncementDndStarted,\n liveAnnouncementDndItemReordered,\n liveAnnouncementDndItemCommitted,\n liveAnnouncementDndDiscarded,\n dragHandleAriaDescription,\n dragHandleAriaLabel,\n enableColumnFiltering = false,\n i18nStrings,\n}: ContentDisplayPreferenceProps) {\n const idPrefix = useUniqueId(componentPrefix);\n const i18n = useInternalI18n('collection-preferences');\n const [columnFilteringText, setColumnFilteringText] = useState('');\n\n const titleId = `${idPrefix}-title`;\n const descriptionId = `${idPrefix}-description`;\n\n const [sortedOptions, sortedAndFilteredOptions] = useMemo(() => {\n const sorted = getSortedOptions({ options, contentDisplay: value });\n const filtered = getFilteredOptions(sorted, columnFilteringText);\n return [sorted, filtered];\n }, [columnFilteringText, options, value]);\n\n const onToggle = (option: OptionWithVisibility) => {\n // We use sortedOptions as base and not value because there might be options that\n // are not in the value yet, so they're added as non-visible after the known ones.\n onChange(sortedOptions.map(({ id, visible }) => ({ id, visible: id === option.id ? !option.visible : visible })));\n };\n\n return (\n <div className={styles[componentPrefix]} {...getAnalyticsInnerContextAttribute('contentDisplay')}>\n <h3 className={getClassName('title')} id={titleId}>\n {i18n('contentDisplayPreference.title', title)}\n </h3>\n <p className={getClassName('description')} id={descriptionId}>\n {i18n('contentDisplayPreference.description', description)}\n </p>\n\n {/* Filter input */}\n {enableColumnFiltering && (\n <div className={getClassName('text-filter')}>\n <InternalTextFilter\n filteringText={columnFilteringText}\n filteringPlaceholder={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringPlaceholder',\n i18nStrings?.columnFilteringPlaceholder\n )}\n filteringAriaLabel={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringAriaLabel',\n i18nStrings?.columnFilteringAriaLabel\n )}\n filteringClearAriaLabel={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringClearFilterText',\n i18nStrings?.columnFilteringClearFilterText\n )}\n onChange={({ detail }) => setColumnFilteringText(detail.filteringText)}\n countText={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringCountText',\n i18nStrings?.columnFilteringCountText\n ? i18nStrings?.columnFilteringCountText(sortedAndFilteredOptions.length)\n : undefined,\n format => format({ count: sortedAndFilteredOptions.length })\n )}\n />\n </div>\n )}\n\n {/* No match */}\n {sortedAndFilteredOptions.length === 0 && (\n <div className={getClassName('no-match')}>\n <InternalSpaceBetween size=\"s\" alignItems=\"center\">\n <InternalBox margin={{ top: 'm' }}>\n {i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringNoMatchText',\n i18nStrings?.columnFilteringNoMatchText\n )}\n </InternalBox>\n <InternalButton onClick={() => setColumnFilteringText('')}>\n {i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringClearFilterText',\n i18nStrings?.columnFilteringClearFilterText\n )}\n </InternalButton>\n </InternalSpaceBetween>\n </div>\n )}\n\n {/* Use explicit list role to work around Safari not announcing lists as such when list-style is set to none.\n See https://bugs.webkit.org/show_bug.cgi?id=170179 */}\n <ul\n className={getClassName('option-list')}\n aria-describedby={descriptionId}\n aria-labelledby={titleId}\n role=\"list\"\n >\n <DndArea\n items={sortedAndFilteredOptions.map(data => ({ id: data.id, label: data.label, data }))}\n onItemsChange={items => onChange(items.map(({ id, data }) => ({ id, visible: data.visible })))}\n disableReorder={columnFilteringText.trim().length > 0}\n renderItem={({ ref, item, isSorting, isActive, style, className, dragHandleProps }) => {\n className = clsx(className, getOptionClassName(), isSorting && styles.sorting);\n const content = (\n <ContentDisplayOption\n ref={ref}\n option={item.data}\n onToggle={onToggle}\n dragHandleProps={dragHandleProps}\n />\n );\n return isActive ? (\n content\n ) : (\n <li className={className} style={style}>\n {content}\n </li>\n );\n }}\n i18nStrings={{\n liveAnnouncementDndStarted: i18n(\n 'contentDisplayPreference.liveAnnouncementDndStarted',\n liveAnnouncementDndStarted,\n format => (position, total) => format({ position, total })\n ),\n liveAnnouncementDndItemReordered: i18n(\n 'contentDisplayPreference.liveAnnouncementDndItemReordered',\n liveAnnouncementDndItemReordered,\n format => (initialPosition, currentPosition, total) =>\n format({ currentPosition, total, isInitialPosition: `${initialPosition === currentPosition}` })\n ),\n liveAnnouncementDndItemCommitted: i18n(\n 'contentDisplayPreference.liveAnnouncementDndItemCommitted',\n liveAnnouncementDndItemCommitted,\n format => (initialPosition, finalPosition, total) =>\n format({\n initialPosition,\n finalPosition,\n total,\n isInitialPosition: `${initialPosition === finalPosition}`,\n })\n ),\n liveAnnouncementDndDiscarded: i18n(\n 'contentDisplayPreference.liveAnnouncementDndDiscarded',\n liveAnnouncementDndDiscarded\n ),\n dragHandleAriaLabel: i18n('contentDisplayPreference.dragHandleAriaLabel', dragHandleAriaLabel),\n dragHandleAriaDescription: i18n(\n 'contentDisplayPreference.dragHandleAriaDescription',\n dragHandleAriaDescription\n ),\n }}\n />\n </ul>\n </div>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/collection-preferences/content-display/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAC7C,OAAO,cAAc,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,YAAY,MAAM,yCAAyC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,oBAAoB,MAAM,8BAA8B,CAAC;AAChE,OAAO,kBAAkB,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,iCAAiC,EAAE,MAAM,6BAA6B,CAAC;AAEhF,OAAO,oBAAoB,EAAE,EAAE,YAAY,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACpG,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAwB,MAAM,SAAS,CAAC;AAErF,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAEtC,MAAM,eAAe,GAAG,iBAAiB,CAAC;AAE1C,MAAM,YAAY,GAAG,CAAC,MAAc,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,eAAe,IAAI,MAAM,EAAE,CAAC,CAAC;AAOhF,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,EAC/C,KAAK,EACL,WAAW,EACX,OAAO,EACP,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IAC/B,EAAE;IACF,OAAO,EAAE,IAAI;CACd,CAAC,CAAC,EACH,QAAQ,EACR,0BAA0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qBAChB;oBACD,OAAO,CACL,4BAAI,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,IACnC,OAAO,CACL,CACN,CAAC;gBACJ,CAAC,EACD,WAAW,EAAE;oBACX,0BAA0B,EAAE,IAAI,CAC9B,qDAAqD,EACrD,0BAA0B,EAC1B,MAAM,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAC3D;oBACD,gCAAgC,EAAE,IAAI,CACpC,2DAA2D,EAC3D,gCAAgC,EAChC,MAAM,CAAC,EAAE,CAAC,CAAC,eAAe,EAAE,eAAe,EAAE,KAAK,EAAE,EAAE,CACpD,MAAM,CAAC,EAAE,eAAe,EAAE,KAAK,EAAE,iBAAiB,EAAE,GAAG,eAAe,KAAK,eAAe,EAAE,EAAE,CAAC,CAClG;oBACD,gCAAgC,EAAE,IAAI,CACpC,2DAA2D,EAC3D,gCAAgC,EAChC,MAAM,CAAC,EAAE,CAAC,CAAC,eAAe,EAAE,aAAa,EAAE,KAAK,EAAE,EAAE,CAClD,MAAM,CAAC;wBACL,eAAe;wBACf,aAAa;wBACb,KAAK;wBACL,iBAAiB,EAAE,GAAG,eAAe,KAAK,aAAa,EAAE;qBAC1D,CAAC,CACL;oBACD,4BAA4B,EAAE,IAAI,CAChC,uDAAuD,EACvD,4BAA4B,CAC7B;oBACD,mBAAmB,EAAE,IAAI,CAAC,8CAA8C,EAAE,mBAAmB,CAAC;oBAC9F,yBAAyB,EAAE,IAAI,CAC7B,oDAAoD,EACpD,yBAAyB,CAC1B;iBACF,GACD,CACC,CACD,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useMemo, useState } from 'react';\nimport clsx from 'clsx';\n\nimport InternalBox from '../../box/internal';\nimport InternalButton from '../../button/internal';\nimport { useInternalI18n } from '../../i18n/context';\nimport SortableArea from '../../internal/components/sortable-area';\nimport { useUniqueId } from '../../internal/hooks/use-unique-id';\nimport InternalSpaceBetween from '../../space-between/internal';\nimport InternalTextFilter from '../../text-filter/internal';\nimport { getAnalyticsInnerContextAttribute } from '../analytics-metadata/utils';\nimport { CollectionPreferencesProps } from '../interfaces';\nimport ContentDisplayOption, { getClassName as getOptionClassName } from './content-display-option';\nimport { getFilteredOptions, getSortedOptions, OptionWithVisibility } from './utils';\n\nimport styles from '../styles.css.js';\n\nconst componentPrefix = 'content-display';\n\nconst getClassName = (suffix: string) => styles[`${componentPrefix}-${suffix}`];\n\ninterface ContentDisplayPreferenceProps extends CollectionPreferencesProps.ContentDisplayPreference {\n onChange: (value: ReadonlyArray<CollectionPreferencesProps.ContentDisplayItem>) => void;\n value?: ReadonlyArray<CollectionPreferencesProps.ContentDisplayItem>;\n}\n\nexport default function ContentDisplayPreference({\n title,\n description,\n options,\n value = options.map(({ id }) => ({\n id,\n visible: true,\n })),\n onChange,\n liveAnnouncementDndStarted,\n liveAnnouncementDndItemReordered,\n liveAnnouncementDndItemCommitted,\n liveAnnouncementDndDiscarded,\n dragHandleAriaDescription,\n dragHandleAriaLabel,\n enableColumnFiltering = false,\n i18nStrings,\n}: ContentDisplayPreferenceProps) {\n const idPrefix = useUniqueId(componentPrefix);\n const i18n = useInternalI18n('collection-preferences');\n const [columnFilteringText, setColumnFilteringText] = useState('');\n\n const titleId = `${idPrefix}-title`;\n const descriptionId = `${idPrefix}-description`;\n\n const [sortedOptions, sortedAndFilteredOptions] = useMemo(() => {\n const sorted = getSortedOptions({ options, contentDisplay: value });\n const filtered = getFilteredOptions(sorted, columnFilteringText);\n return [sorted, filtered];\n }, [columnFilteringText, options, value]);\n\n const onToggle = (option: OptionWithVisibility) => {\n // We use sortedOptions as base and not value because there might be options that\n // are not in the value yet, so they're added as non-visible after the known ones.\n onChange(sortedOptions.map(({ id, visible }) => ({ id, visible: id === option.id ? !option.visible : visible })));\n };\n\n return (\n <div className={styles[componentPrefix]} {...getAnalyticsInnerContextAttribute('contentDisplay')}>\n <h3 className={getClassName('title')} id={titleId}>\n {i18n('contentDisplayPreference.title', title)}\n </h3>\n <p className={getClassName('description')} id={descriptionId}>\n {i18n('contentDisplayPreference.description', description)}\n </p>\n\n {/* Filter input */}\n {enableColumnFiltering && (\n <div className={getClassName('text-filter')}>\n <InternalTextFilter\n filteringText={columnFilteringText}\n filteringPlaceholder={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringPlaceholder',\n i18nStrings?.columnFilteringPlaceholder\n )}\n filteringAriaLabel={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringAriaLabel',\n i18nStrings?.columnFilteringAriaLabel\n )}\n filteringClearAriaLabel={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringClearFilterText',\n i18nStrings?.columnFilteringClearFilterText\n )}\n onChange={({ detail }) => setColumnFilteringText(detail.filteringText)}\n countText={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringCountText',\n i18nStrings?.columnFilteringCountText\n ? i18nStrings?.columnFilteringCountText(sortedAndFilteredOptions.length)\n : undefined,\n format => format({ count: sortedAndFilteredOptions.length })\n )}\n />\n </div>\n )}\n\n {/* No match */}\n {sortedAndFilteredOptions.length === 0 && (\n <div className={getClassName('no-match')}>\n <InternalSpaceBetween size=\"s\" alignItems=\"center\">\n <InternalBox margin={{ top: 'm' }}>\n {i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringNoMatchText',\n i18nStrings?.columnFilteringNoMatchText\n )}\n </InternalBox>\n <InternalButton onClick={() => setColumnFilteringText('')}>\n {i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringClearFilterText',\n i18nStrings?.columnFilteringClearFilterText\n )}\n </InternalButton>\n </InternalSpaceBetween>\n </div>\n )}\n\n {/* Use explicit list role to work around Safari not announcing lists as such when list-style is set to none.\n See https://bugs.webkit.org/show_bug.cgi?id=170179 */}\n <ul\n className={getClassName('option-list')}\n aria-describedby={descriptionId}\n aria-labelledby={titleId}\n role=\"list\"\n >\n <SortableArea\n items={sortedAndFilteredOptions}\n itemDefinition={{ id: item => item.id, label: item => item.label }}\n onItemsChange={({ detail }) => onChange(detail.items)}\n disableReorder={columnFilteringText.trim().length > 0}\n renderItem={({ ref, item, style, className, dragHandleProps, isDragGhost }) => {\n className = clsx(className, getOptionClassName());\n const content = (\n <ContentDisplayOption ref={ref} option={item} onToggle={onToggle} dragHandleProps={dragHandleProps} />\n );\n if (isDragGhost) {\n return content;\n }\n return (\n <li className={className} style={style}>\n {content}\n </li>\n );\n }}\n i18nStrings={{\n liveAnnouncementDndStarted: i18n(\n 'contentDisplayPreference.liveAnnouncementDndStarted',\n liveAnnouncementDndStarted,\n format => (position, total) => format({ position, total })\n ),\n liveAnnouncementDndItemReordered: i18n(\n 'contentDisplayPreference.liveAnnouncementDndItemReordered',\n liveAnnouncementDndItemReordered,\n format => (initialPosition, currentPosition, total) =>\n format({ currentPosition, total, isInitialPosition: `${initialPosition === currentPosition}` })\n ),\n liveAnnouncementDndItemCommitted: i18n(\n 'contentDisplayPreference.liveAnnouncementDndItemCommitted',\n liveAnnouncementDndItemCommitted,\n format => (initialPosition, finalPosition, total) =>\n format({\n initialPosition,\n finalPosition,\n total,\n isInitialPosition: `${initialPosition === finalPosition}`,\n })\n ),\n liveAnnouncementDndDiscarded: i18n(\n 'contentDisplayPreference.liveAnnouncementDndDiscarded',\n liveAnnouncementDndDiscarded\n ),\n dragHandleAriaLabel: i18n('contentDisplayPreference.dragHandleAriaLabel', dragHandleAriaLabel),\n dragHandleAriaDescription: i18n(\n 'contentDisplayPreference.dragHandleAriaDescription',\n dragHandleAriaDescription\n ),\n }}\n />\n </ul>\n </div>\n );\n}\n"]}
|
package/container/styles.css.js
CHANGED
|
@@ -1,36 +1,37 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"fit-height": "awsui_fit-
|
|
6
|
-
"with-side-media": "awsui_with-side-
|
|
7
|
-
"variant-default": "awsui_variant-
|
|
8
|
-
"variant-stacked": "awsui_variant-
|
|
9
|
-
"refresh": "
|
|
10
|
-
"sticky-enabled": "awsui_sticky-
|
|
11
|
-
"with-top-media": "awsui_with-top-
|
|
12
|
-
"content-wrapper": "awsui_content-
|
|
13
|
-
"content-wrapper-fit-height": "awsui_content-wrapper-fit-
|
|
14
|
-
"media": "
|
|
15
|
-
"media-top": "awsui_media-
|
|
16
|
-
"media-side": "awsui_media-
|
|
17
|
-
"header": "
|
|
18
|
-
"header-full-page": "awsui_header-full-
|
|
19
|
-
"header-
|
|
20
|
-
"header-sticky-
|
|
21
|
-
"header-
|
|
22
|
-
"header-
|
|
23
|
-
"header-
|
|
24
|
-
"header-
|
|
25
|
-
"
|
|
26
|
-
"with-
|
|
27
|
-
"
|
|
28
|
-
"header-
|
|
29
|
-
"
|
|
30
|
-
"content
|
|
31
|
-
"content-
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
4
|
+
"root": "awsui_root_14iqq_96qba_189",
|
|
5
|
+
"fit-height": "awsui_fit-height_14iqq_96qba_222",
|
|
6
|
+
"with-side-media": "awsui_with-side-media_14iqq_96qba_227",
|
|
7
|
+
"variant-default": "awsui_variant-default_14iqq_96qba_230",
|
|
8
|
+
"variant-stacked": "awsui_variant-stacked_14iqq_96qba_230",
|
|
9
|
+
"refresh": "awsui_refresh_14iqq_96qba_238",
|
|
10
|
+
"sticky-enabled": "awsui_sticky-enabled_14iqq_96qba_288",
|
|
11
|
+
"with-top-media": "awsui_with-top-media_14iqq_96qba_300",
|
|
12
|
+
"content-wrapper": "awsui_content-wrapper_14iqq_96qba_305",
|
|
13
|
+
"content-wrapper-fit-height": "awsui_content-wrapper-fit-height_14iqq_96qba_310",
|
|
14
|
+
"media": "awsui_media_14iqq_96qba_317",
|
|
15
|
+
"media-top": "awsui_media-top_14iqq_96qba_335",
|
|
16
|
+
"media-side": "awsui_media-side_14iqq_96qba_340",
|
|
17
|
+
"header": "awsui_header_14iqq_96qba_346",
|
|
18
|
+
"header-full-page": "awsui_header-full-page_14iqq_96qba_351",
|
|
19
|
+
"header-variant-embedded": "awsui_header-variant-embedded_14iqq_96qba_354",
|
|
20
|
+
"header-sticky-enabled": "awsui_header-sticky-enabled_14iqq_96qba_354",
|
|
21
|
+
"header-with-media": "awsui_header-with-media_14iqq_96qba_357",
|
|
22
|
+
"header-sticky-disabled": "awsui_header-sticky-disabled_14iqq_96qba_363",
|
|
23
|
+
"header-stuck": "awsui_header-stuck_14iqq_96qba_373",
|
|
24
|
+
"header-variant-cards": "awsui_header-variant-cards_14iqq_96qba_383",
|
|
25
|
+
"header-dynamic-height": "awsui_header-dynamic-height_14iqq_96qba_386",
|
|
26
|
+
"with-paddings": "awsui_with-paddings_14iqq_96qba_392",
|
|
27
|
+
"with-hidden-content": "awsui_with-hidden-content_14iqq_96qba_401",
|
|
28
|
+
"header-variant-full-page": "awsui_header-variant-full-page_14iqq_96qba_459",
|
|
29
|
+
"header-cover": "awsui_header-cover_14iqq_96qba_462",
|
|
30
|
+
"content": "awsui_content_14iqq_96qba_305",
|
|
31
|
+
"content-fit-height": "awsui_content-fit-height_14iqq_96qba_490",
|
|
32
|
+
"content-inner": "awsui_content-inner_14iqq_96qba_496",
|
|
33
|
+
"with-header": "awsui_with-header_14iqq_96qba_503",
|
|
34
|
+
"footer": "awsui_footer_14iqq_96qba_507",
|
|
35
|
+
"with-divider": "awsui_with-divider_14iqq_96qba_511"
|
|
35
36
|
};
|
|
36
37
|
|
|
@@ -186,7 +186,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
186
186
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
187
187
|
SPDX-License-Identifier: Apache-2.0
|
|
188
188
|
*/
|
|
189
|
-
.
|
|
189
|
+
.awsui_root_14iqq_96qba_189:not(#\9) {
|
|
190
190
|
border-collapse: separate;
|
|
191
191
|
border-spacing: 0;
|
|
192
192
|
box-sizing: border-box;
|
|
@@ -220,15 +220,15 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
220
220
|
word-wrap: break-word;
|
|
221
221
|
position: relative;
|
|
222
222
|
}
|
|
223
|
-
.
|
|
223
|
+
.awsui_root_14iqq_96qba_189.awsui_fit-height_14iqq_96qba_222:not(#\9) {
|
|
224
224
|
display: flex;
|
|
225
225
|
flex-direction: column;
|
|
226
226
|
block-size: 100%;
|
|
227
227
|
}
|
|
228
|
-
.
|
|
228
|
+
.awsui_root_14iqq_96qba_189.awsui_fit-height_14iqq_96qba_222.awsui_with-side-media_14iqq_96qba_227:not(#\9) {
|
|
229
229
|
flex-direction: row;
|
|
230
230
|
}
|
|
231
|
-
.
|
|
231
|
+
.awsui_root_14iqq_96qba_189.awsui_variant-default_14iqq_96qba_230:not(#\9), .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230:not(#\9) {
|
|
232
232
|
background-color: var(--color-background-container-content-z79u4u, #ffffff);
|
|
233
233
|
border-start-start-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
234
234
|
border-start-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
@@ -236,11 +236,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
236
236
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
237
237
|
box-sizing: border-box;
|
|
238
238
|
}
|
|
239
|
-
.
|
|
239
|
+
.awsui_root_14iqq_96qba_189.awsui_variant-default_14iqq_96qba_230.awsui_refresh_14iqq_96qba_238:not(#\9), .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230.awsui_refresh_14iqq_96qba_238:not(#\9) {
|
|
240
240
|
border-block: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-cx07f2, #c6c6cd);
|
|
241
241
|
border-inline: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-cx07f2, #c6c6cd);
|
|
242
242
|
}
|
|
243
|
-
.
|
|
243
|
+
.awsui_root_14iqq_96qba_189.awsui_variant-default_14iqq_96qba_230:not(#\9):not(.awsui_refresh_14iqq_96qba_238)::before, .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230:not(#\9):not(.awsui_refresh_14iqq_96qba_238)::before {
|
|
244
244
|
content: "";
|
|
245
245
|
position: absolute;
|
|
246
246
|
inset-inline-start: 0px;
|
|
@@ -258,7 +258,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
258
258
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
259
259
|
z-index: 1;
|
|
260
260
|
}
|
|
261
|
-
.
|
|
261
|
+
.awsui_root_14iqq_96qba_189.awsui_variant-default_14iqq_96qba_230:not(#\9):not(.awsui_refresh_14iqq_96qba_238)::after, .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230:not(#\9):not(.awsui_refresh_14iqq_96qba_238)::after {
|
|
262
262
|
content: "";
|
|
263
263
|
position: absolute;
|
|
264
264
|
inset-inline-start: 0px;
|
|
@@ -274,144 +274,147 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
274
274
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
275
275
|
box-shadow: var(--shadow-container-fxmdn3, 0px 0px 1px 1px #e9ebed, 0px 1px 8px 2px rgba(0, 7, 22, 0.12));
|
|
276
276
|
}
|
|
277
|
-
.
|
|
277
|
+
.awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230:not(#\9):not(:last-child), .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230:not(#\9):not(:last-child)::before, .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230:not(#\9):not(:last-child)::after {
|
|
278
278
|
border-end-end-radius: 0;
|
|
279
279
|
border-end-start-radius: 0;
|
|
280
280
|
border-block-end-width: 0;
|
|
281
281
|
}
|
|
282
|
-
.
|
|
282
|
+
.awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230 + .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230:not(#\9), .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230 + .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230:not(#\9)::before, .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230 + .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230:not(#\9)::after {
|
|
283
283
|
border-start-start-radius: 0;
|
|
284
284
|
border-start-end-radius: 0;
|
|
285
285
|
}
|
|
286
|
-
.
|
|
286
|
+
.awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230 + .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230:not(#\9):not(.awsui_refresh_14iqq_96qba_238)::before {
|
|
287
287
|
border-block-start: var(--border-divider-section-width-1061zr, 1px) solid var(--color-border-divider-default-cx07f2, #c6c6cd);
|
|
288
288
|
}
|
|
289
|
-
.
|
|
289
|
+
.awsui_root_14iqq_96qba_189.awsui_sticky-enabled_14iqq_96qba_288:not(#\9):not(.awsui_refresh_14iqq_96qba_238)::before {
|
|
290
290
|
inset-block-start: calc(-1 * var(--border-container-top-width-uugwwl, 0px));
|
|
291
291
|
}
|
|
292
|
-
.
|
|
292
|
+
.awsui_root_14iqq_96qba_189.awsui_sticky-enabled_14iqq_96qba_288:not(#\9):not(.awsui_refresh_14iqq_96qba_238).awsui_variant-stacked_14iqq_96qba_230::before {
|
|
293
293
|
inset-block-start: calc(-1 * var(--border-divider-section-width-1061zr, 1px));
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
-
.awsui_with-side-
|
|
296
|
+
.awsui_with-side-media_14iqq_96qba_227:not(#\9) {
|
|
297
297
|
display: flex;
|
|
298
298
|
flex-direction: row;
|
|
299
299
|
}
|
|
300
300
|
|
|
301
|
-
.awsui_with-top-
|
|
301
|
+
.awsui_with-top-media_14iqq_96qba_300:not(#\9) {
|
|
302
302
|
display: flex;
|
|
303
303
|
flex-direction: column;
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
-
.awsui_content-
|
|
306
|
+
.awsui_content-wrapper_14iqq_96qba_305:not(#\9) {
|
|
307
307
|
display: flex;
|
|
308
308
|
flex-direction: column;
|
|
309
309
|
inline-size: 100%;
|
|
310
310
|
}
|
|
311
|
-
.awsui_content-wrapper-fit-
|
|
311
|
+
.awsui_content-wrapper-fit-height_14iqq_96qba_310:not(#\9) {
|
|
312
312
|
block-size: 100%;
|
|
313
313
|
overflow: hidden;
|
|
314
314
|
border-end-start-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
315
315
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
316
316
|
}
|
|
317
317
|
|
|
318
|
-
.
|
|
318
|
+
.awsui_media_14iqq_96qba_317:not(#\9) {
|
|
319
319
|
overflow: hidden;
|
|
320
320
|
flex-shrink: 0;
|
|
321
321
|
}
|
|
322
|
-
.
|
|
323
|
-
.
|
|
324
|
-
.
|
|
322
|
+
.awsui_media_14iqq_96qba_317 img:not(#\9),
|
|
323
|
+
.awsui_media_14iqq_96qba_317 video:not(#\9),
|
|
324
|
+
.awsui_media_14iqq_96qba_317 picture:not(#\9) {
|
|
325
325
|
inline-size: 100%;
|
|
326
326
|
block-size: 100%;
|
|
327
327
|
object-fit: cover;
|
|
328
328
|
object-position: center;
|
|
329
329
|
}
|
|
330
|
-
.
|
|
330
|
+
.awsui_media_14iqq_96qba_317 iframe:not(#\9) {
|
|
331
331
|
inline-size: 100%;
|
|
332
332
|
block-size: 100%;
|
|
333
333
|
border-block: 0;
|
|
334
334
|
border-inline: 0;
|
|
335
335
|
}
|
|
336
|
-
.awsui_media-
|
|
336
|
+
.awsui_media-top_14iqq_96qba_335:not(#\9) {
|
|
337
337
|
max-block-size: 66%;
|
|
338
338
|
border-start-start-radius: calc(var(--border-radius-container-wqv1zi, 16px) - 1px);
|
|
339
339
|
border-start-end-radius: calc(var(--border-radius-container-wqv1zi, 16px) - 1px);
|
|
340
340
|
}
|
|
341
|
-
.awsui_media-
|
|
341
|
+
.awsui_media-side_14iqq_96qba_340:not(#\9) {
|
|
342
342
|
max-inline-size: 66%;
|
|
343
343
|
border-start-start-radius: calc(var(--border-radius-container-wqv1zi, 16px) - 1px);
|
|
344
344
|
border-end-start-radius: calc(var(--border-radius-container-wqv1zi, 16px) - 1px);
|
|
345
345
|
}
|
|
346
346
|
|
|
347
|
-
.
|
|
347
|
+
.awsui_header_14iqq_96qba_346:not(#\9) {
|
|
348
348
|
background-color: var(--color-background-container-header-clzg6q, #ffffff);
|
|
349
349
|
border-start-start-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
350
350
|
border-start-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
351
351
|
}
|
|
352
|
-
.
|
|
352
|
+
.awsui_header_14iqq_96qba_346.awsui_header-full-page_14iqq_96qba_351:not(#\9) {
|
|
353
353
|
background-color: var(--color-background-layout-main-nqw91u, #ffffff);
|
|
354
354
|
}
|
|
355
|
-
.
|
|
355
|
+
.awsui_header-variant-embedded_14iqq_96qba_354.awsui_refresh_14iqq_96qba_238:not(#\9):not(.awsui_header-sticky-enabled_14iqq_96qba_354) {
|
|
356
|
+
background-color: transparent;
|
|
357
|
+
}
|
|
358
|
+
.awsui_header_14iqq_96qba_346.awsui_header-with-media_14iqq_96qba_357:not(#\9) {
|
|
356
359
|
background: none;
|
|
357
360
|
}
|
|
358
|
-
.
|
|
361
|
+
.awsui_header_14iqq_96qba_346.awsui_header-with-media_14iqq_96qba_357:not(#\9):not(:empty) {
|
|
359
362
|
border-block-end: none;
|
|
360
363
|
}
|
|
361
|
-
.awsui_header-sticky-
|
|
364
|
+
.awsui_header-sticky-disabled_14iqq_96qba_363:not(#\9) {
|
|
362
365
|
position: relative;
|
|
363
366
|
z-index: 1;
|
|
364
367
|
}
|
|
365
|
-
.awsui_header-sticky-
|
|
368
|
+
.awsui_header-sticky-enabled_14iqq_96qba_354:not(#\9) {
|
|
366
369
|
inset-block-start: 0;
|
|
367
370
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
368
371
|
position: sticky;
|
|
369
372
|
z-index: 800;
|
|
370
373
|
}
|
|
371
|
-
.awsui_header-
|
|
374
|
+
.awsui_header-stuck_14iqq_96qba_373:not(#\9) {
|
|
372
375
|
border-start-start-radius: 0;
|
|
373
376
|
border-start-end-radius: 0;
|
|
374
377
|
border-end-start-radius: 0;
|
|
375
378
|
border-end-end-radius: 0;
|
|
376
379
|
}
|
|
377
|
-
.awsui_header-
|
|
380
|
+
.awsui_header-stuck_14iqq_96qba_373:not(#\9)::before {
|
|
378
381
|
border-block: 0;
|
|
379
382
|
border-inline: 0;
|
|
380
383
|
}
|
|
381
|
-
.awsui_header-
|
|
384
|
+
.awsui_header-stuck_14iqq_96qba_373:not(#\9):not(.awsui_header-variant-cards_14iqq_96qba_383) {
|
|
382
385
|
box-shadow: var(--shadow-sticky-embedded-uvh5ry, 0px 2px 0px 0px #e9ebed, 0px 16px 16px -12px rgba(0, 7, 22, 0.1));
|
|
383
386
|
}
|
|
384
|
-
.awsui_header-dynamic-
|
|
387
|
+
.awsui_header-dynamic-height_14iqq_96qba_386.awsui_header-stuck_14iqq_96qba_373:not(#\9) {
|
|
385
388
|
margin-block-end: calc(var(--line-height-heading-xl-avbttk, 30px) - var(--line-height-heading-l-mmm3my, 24px));
|
|
386
389
|
}
|
|
387
|
-
.
|
|
390
|
+
.awsui_header_14iqq_96qba_346:not(#\9):not(:empty) {
|
|
388
391
|
border-block-end: var(--border-container-sticky-width-6asz33, 0px) solid var(--color-border-container-divider-p2uygo, transparent);
|
|
389
392
|
}
|
|
390
|
-
.
|
|
393
|
+
.awsui_header_14iqq_96qba_346.awsui_with-paddings_14iqq_96qba_392:not(#\9) {
|
|
391
394
|
padding-block-start: var(--space-container-header-top-5qav00, 12px);
|
|
392
395
|
padding-block-end: var(--space-container-header-bottom-vj01hn, 8px);
|
|
393
396
|
padding-inline: var(--space-container-horizontal-wfukh3, 20px);
|
|
394
397
|
}
|
|
395
|
-
.
|
|
398
|
+
.awsui_header_14iqq_96qba_346.awsui_with-paddings_14iqq_96qba_392.awsui_header-variant-cards_14iqq_96qba_383:not(#\9) {
|
|
396
399
|
padding-block: var(--space-container-header-top-5qav00, 12px);
|
|
397
400
|
padding-inline: var(--space-container-horizontal-wfukh3, 20px);
|
|
398
401
|
}
|
|
399
|
-
.
|
|
402
|
+
.awsui_header_14iqq_96qba_346.awsui_with-hidden-content_14iqq_96qba_401:not(#\9) {
|
|
400
403
|
border-end-start-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
401
404
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
402
405
|
}
|
|
403
|
-
.awsui_header-variant-
|
|
406
|
+
.awsui_header-variant-cards_14iqq_96qba_383:not(#\9) {
|
|
404
407
|
border-start-start-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
405
408
|
border-start-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
406
409
|
border-end-start-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
407
410
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
408
411
|
box-sizing: border-box;
|
|
409
412
|
}
|
|
410
|
-
.awsui_header-variant-
|
|
413
|
+
.awsui_header-variant-cards_14iqq_96qba_383.awsui_refresh_14iqq_96qba_238:not(#\9) {
|
|
411
414
|
border-block: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-cx07f2, #c6c6cd);
|
|
412
415
|
border-inline: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-cx07f2, #c6c6cd);
|
|
413
416
|
}
|
|
414
|
-
.awsui_header-variant-
|
|
417
|
+
.awsui_header-variant-cards_14iqq_96qba_383:not(#\9):not(.awsui_refresh_14iqq_96qba_238)::before {
|
|
415
418
|
content: "";
|
|
416
419
|
position: absolute;
|
|
417
420
|
inset-inline-start: 0px;
|
|
@@ -429,7 +432,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
429
432
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
430
433
|
z-index: 1;
|
|
431
434
|
}
|
|
432
|
-
.awsui_header-variant-
|
|
435
|
+
.awsui_header-variant-cards_14iqq_96qba_383:not(#\9):not(.awsui_refresh_14iqq_96qba_238)::after {
|
|
433
436
|
content: "";
|
|
434
437
|
position: absolute;
|
|
435
438
|
inset-inline-start: 0px;
|
|
@@ -445,26 +448,26 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
445
448
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
446
449
|
box-shadow: var(--shadow-container-fxmdn3, 0px 0px 1px 1px #e9ebed, 0px 1px 8px 2px rgba(0, 7, 22, 0.12));
|
|
447
450
|
}
|
|
448
|
-
.awsui_header-variant-
|
|
451
|
+
.awsui_header-variant-cards_14iqq_96qba_383:not(#\9):not(.awsui_header-sticky-enabled_14iqq_96qba_354) {
|
|
449
452
|
position: relative;
|
|
450
453
|
}
|
|
451
|
-
.awsui_header-variant-
|
|
454
|
+
.awsui_header-variant-cards_14iqq_96qba_383.awsui_header-stuck_14iqq_96qba_373:not(#\9)::after, .awsui_header-variant-cards_14iqq_96qba_383.awsui_header-stuck_14iqq_96qba_373:not(#\9)::before {
|
|
452
455
|
border-block: 0;
|
|
453
456
|
border-inline: 0;
|
|
454
457
|
border-start-start-radius: 0;
|
|
455
458
|
border-start-end-radius: 0;
|
|
456
459
|
}
|
|
457
|
-
.awsui_header-variant-full-
|
|
460
|
+
.awsui_header-variant-full-page_14iqq_96qba_459.awsui_header-stuck_14iqq_96qba_373:not(#\9) {
|
|
458
461
|
box-shadow: none;
|
|
459
462
|
}
|
|
460
|
-
.awsui_header-variant-full-
|
|
463
|
+
.awsui_header-variant-full-page_14iqq_96qba_459.awsui_header-stuck_14iqq_96qba_373 > .awsui_header-cover_14iqq_96qba_462:not(#\9) {
|
|
461
464
|
background-color: var(--color-background-layout-main-nqw91u, #ffffff);
|
|
462
465
|
inline-size: 100%;
|
|
463
466
|
position: absolute;
|
|
464
467
|
block-size: var(--space-scaled-s-aqzyko, 12px);
|
|
465
468
|
inset-block-start: calc(-1 * var(--space-scaled-s-aqzyko, 12px));
|
|
466
469
|
}
|
|
467
|
-
.awsui_header-variant-full-
|
|
470
|
+
.awsui_header-variant-full-page_14iqq_96qba_459.awsui_header-stuck_14iqq_96qba_373:not(#\9)::before {
|
|
468
471
|
content: "";
|
|
469
472
|
position: absolute;
|
|
470
473
|
pointer-events: none;
|
|
@@ -474,7 +477,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
474
477
|
inset-block-start: 0;
|
|
475
478
|
border-block-end: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-cx07f2, #c6c6cd);
|
|
476
479
|
}
|
|
477
|
-
.awsui_header-variant-full-
|
|
480
|
+
.awsui_header-variant-full-page_14iqq_96qba_459.awsui_header-stuck_14iqq_96qba_373:not(#\9)::after {
|
|
478
481
|
content: "";
|
|
479
482
|
position: absolute;
|
|
480
483
|
inset: 0;
|
|
@@ -482,30 +485,30 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
482
485
|
clip-path: polygon(-999% 100%, 999% 100%, 999% 999%, -999% 999%);
|
|
483
486
|
}
|
|
484
487
|
|
|
485
|
-
.
|
|
488
|
+
.awsui_content_14iqq_96qba_305:not(#\9) {
|
|
486
489
|
flex: 1;
|
|
487
490
|
}
|
|
488
|
-
.awsui_content-fit-
|
|
491
|
+
.awsui_content-fit-height_14iqq_96qba_490:not(#\9) {
|
|
489
492
|
overflow: auto;
|
|
490
493
|
display: flex;
|
|
491
494
|
flex-direction: column;
|
|
492
495
|
}
|
|
493
496
|
|
|
494
|
-
.awsui_content-
|
|
497
|
+
.awsui_content-inner_14iqq_96qba_496:not(#\9) {
|
|
495
498
|
flex: 1;
|
|
496
499
|
}
|
|
497
|
-
.awsui_content-
|
|
500
|
+
.awsui_content-inner_14iqq_96qba_496.awsui_with-paddings_14iqq_96qba_392:not(#\9) {
|
|
498
501
|
padding-block: var(--space-scaled-l-0hpmd7, 20px);
|
|
499
502
|
padding-inline: var(--space-container-horizontal-wfukh3, 20px);
|
|
500
503
|
}
|
|
501
|
-
.awsui_content-
|
|
504
|
+
.awsui_content-inner_14iqq_96qba_496.awsui_with-paddings_14iqq_96qba_392.awsui_with-header_14iqq_96qba_503:not(#\9) {
|
|
502
505
|
padding-block-start: var(--space-container-content-top-1ae0r3, 4px);
|
|
503
506
|
}
|
|
504
507
|
|
|
505
|
-
.
|
|
508
|
+
.awsui_footer_14iqq_96qba_507.awsui_with-paddings_14iqq_96qba_392:not(#\9) {
|
|
506
509
|
padding-block: var(--space-scaled-s-aqzyko, 12px);
|
|
507
510
|
padding-inline: var(--space-container-horizontal-wfukh3, 20px);
|
|
508
511
|
}
|
|
509
|
-
.
|
|
512
|
+
.awsui_footer_14iqq_96qba_507.awsui_with-divider_14iqq_96qba_511:not(#\9) {
|
|
510
513
|
border-block-start: var(--border-divider-section-width-1061zr, 1px) solid var(--color-border-divider-default-cx07f2, #c6c6cd);
|
|
511
514
|
}
|
|
@@ -2,36 +2,37 @@
|
|
|
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
|
-
"fit-height": "awsui_fit-
|
|
7
|
-
"with-side-media": "awsui_with-side-
|
|
8
|
-
"variant-default": "awsui_variant-
|
|
9
|
-
"variant-stacked": "awsui_variant-
|
|
10
|
-
"refresh": "
|
|
11
|
-
"sticky-enabled": "awsui_sticky-
|
|
12
|
-
"with-top-media": "awsui_with-top-
|
|
13
|
-
"content-wrapper": "awsui_content-
|
|
14
|
-
"content-wrapper-fit-height": "awsui_content-wrapper-fit-
|
|
15
|
-
"media": "
|
|
16
|
-
"media-top": "awsui_media-
|
|
17
|
-
"media-side": "awsui_media-
|
|
18
|
-
"header": "
|
|
19
|
-
"header-full-page": "awsui_header-full-
|
|
20
|
-
"header-
|
|
21
|
-
"header-sticky-
|
|
22
|
-
"header-
|
|
23
|
-
"header-
|
|
24
|
-
"header-
|
|
25
|
-
"header-
|
|
26
|
-
"
|
|
27
|
-
"with-
|
|
28
|
-
"
|
|
29
|
-
"header-
|
|
30
|
-
"
|
|
31
|
-
"content
|
|
32
|
-
"content-
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
5
|
+
"root": "awsui_root_14iqq_96qba_189",
|
|
6
|
+
"fit-height": "awsui_fit-height_14iqq_96qba_222",
|
|
7
|
+
"with-side-media": "awsui_with-side-media_14iqq_96qba_227",
|
|
8
|
+
"variant-default": "awsui_variant-default_14iqq_96qba_230",
|
|
9
|
+
"variant-stacked": "awsui_variant-stacked_14iqq_96qba_230",
|
|
10
|
+
"refresh": "awsui_refresh_14iqq_96qba_238",
|
|
11
|
+
"sticky-enabled": "awsui_sticky-enabled_14iqq_96qba_288",
|
|
12
|
+
"with-top-media": "awsui_with-top-media_14iqq_96qba_300",
|
|
13
|
+
"content-wrapper": "awsui_content-wrapper_14iqq_96qba_305",
|
|
14
|
+
"content-wrapper-fit-height": "awsui_content-wrapper-fit-height_14iqq_96qba_310",
|
|
15
|
+
"media": "awsui_media_14iqq_96qba_317",
|
|
16
|
+
"media-top": "awsui_media-top_14iqq_96qba_335",
|
|
17
|
+
"media-side": "awsui_media-side_14iqq_96qba_340",
|
|
18
|
+
"header": "awsui_header_14iqq_96qba_346",
|
|
19
|
+
"header-full-page": "awsui_header-full-page_14iqq_96qba_351",
|
|
20
|
+
"header-variant-embedded": "awsui_header-variant-embedded_14iqq_96qba_354",
|
|
21
|
+
"header-sticky-enabled": "awsui_header-sticky-enabled_14iqq_96qba_354",
|
|
22
|
+
"header-with-media": "awsui_header-with-media_14iqq_96qba_357",
|
|
23
|
+
"header-sticky-disabled": "awsui_header-sticky-disabled_14iqq_96qba_363",
|
|
24
|
+
"header-stuck": "awsui_header-stuck_14iqq_96qba_373",
|
|
25
|
+
"header-variant-cards": "awsui_header-variant-cards_14iqq_96qba_383",
|
|
26
|
+
"header-dynamic-height": "awsui_header-dynamic-height_14iqq_96qba_386",
|
|
27
|
+
"with-paddings": "awsui_with-paddings_14iqq_96qba_392",
|
|
28
|
+
"with-hidden-content": "awsui_with-hidden-content_14iqq_96qba_401",
|
|
29
|
+
"header-variant-full-page": "awsui_header-variant-full-page_14iqq_96qba_459",
|
|
30
|
+
"header-cover": "awsui_header-cover_14iqq_96qba_462",
|
|
31
|
+
"content": "awsui_content_14iqq_96qba_305",
|
|
32
|
+
"content-fit-height": "awsui_content-fit-height_14iqq_96qba_490",
|
|
33
|
+
"content-inner": "awsui_content-inner_14iqq_96qba_496",
|
|
34
|
+
"with-header": "awsui_with-header_14iqq_96qba_503",
|
|
35
|
+
"footer": "awsui_footer_14iqq_96qba_507",
|
|
36
|
+
"with-divider": "awsui_with-divider_14iqq_96qba_511"
|
|
36
37
|
};
|
|
37
38
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../../../src/flashbar/internal/analytics.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../../../src/flashbar/internal/analytics.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAK9C,eAAO,MAAM,gBAAgB,UAAW,aAAa,CAAC,OAAO,CAAC,SAS7D,CAAC;AAEF,eAAO,MAAM,gBAAgB,eAAgB,MAAM,YAAY,OAAO,SAMrE,CAAC;AAEF,eAAO,MAAM,iBAAiB,aAAc,MAAM,SAMjD,CAAC"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import {
|
|
4
|
-
import { PACKAGE_SOURCE, PACKAGE_VERSION } from '../../internal/environment';
|
|
3
|
+
import { metrics } from '../../internal/metrics';
|
|
5
4
|
import { getFlashTypeCount } from '../utils';
|
|
6
|
-
const metrics = new Metrics(PACKAGE_SOURCE, PACKAGE_VERSION);
|
|
7
5
|
const eventContext = 'csa_flashbar';
|
|
8
6
|
export const sendRenderMetric = (items) => {
|
|
9
7
|
const countByType = getFlashTypeCount(items);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analytics.js","sourceRoot":"","sources":["../../../../src/flashbar/internal/analytics.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,OAAO,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"analytics.js","sourceRoot":"","sources":["../../../../src/flashbar/internal/analytics.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,MAAM,YAAY,GAAG,cAAc,CAAC;AAEpC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAA6B,EAAE,EAAE;IAChE,MAAM,WAAW,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAE7C,OAAO,CAAC,kBAAkB,CAAC;QACzB,YAAY;QACZ,SAAS,EAAE,QAAQ;QACnB,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE;QACnC,WAAW,EAAE,WAAW;KACzB,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,UAAkB,EAAE,QAAiB,EAAE,EAAE;IACxE,OAAO,CAAC,kBAAkB,CAAC;QACzB,YAAY;QACZ,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU;QAC3C,UAAU,EAAE,UAAU,CAAC,QAAQ,EAAE;KAClC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,QAAgB,EAAE,EAAE;IACpD,OAAO,CAAC,kBAAkB,CAAC;QACzB,YAAY;QACZ,SAAS,EAAE,SAAS;QACpB,UAAU,EAAE,QAAQ;KACrB,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { metrics } from '../../internal/metrics';\nimport { FlashbarProps } from '../interfaces';\nimport { getFlashTypeCount } from '../utils';\n\nconst eventContext = 'csa_flashbar';\n\nexport const sendRenderMetric = (items: FlashbarProps['items']) => {\n const countByType = getFlashTypeCount(items);\n\n metrics.sendPanoramaMetric({\n eventContext,\n eventType: 'render',\n eventValue: items.length.toString(),\n eventDetail: countByType,\n });\n};\n\nexport const sendToggleMetric = (itemsCount: number, expanded: boolean) => {\n metrics.sendPanoramaMetric({\n eventContext,\n eventType: expanded ? 'expand' : 'collapse',\n eventValue: itemsCount.toString(),\n });\n};\n\nexport const sendDismissMetric = (itemType: string) => {\n metrics.sendPanoramaMetric({\n eventContext,\n eventType: 'dismiss',\n eventValue: itemType,\n });\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/autosuggest-input/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAgE,MAAM,OAAO,CAAC;AAGrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,cAAc,EACf,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,kBAAkB,EAAgB,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,+BAA+B,EAAuB,MAAM,kCAAkC,CAAC;AACxG,OAAO,EAA8D,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACrH,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/autosuggest-input/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAgE,MAAM,OAAO,CAAC;AAGrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,cAAc,EACf,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,kBAAkB,EAAgB,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,+BAA+B,EAAuB,MAAM,kCAAkC,CAAC;AACxG,OAAO,EAA8D,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACrH,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAK5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAI1D,UAAU,qBACR,SAAQ,kBAAkB,EACxB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,+BAA+B,EAC/B,gBAAgB,EAChB,0BAA0B;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC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