@cloudscape-design/components 3.0.443 → 3.0.444
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/collection-preferences/interfaces.d.ts +5 -1
- package/collection-preferences/interfaces.d.ts.map +1 -1
- package/collection-preferences/interfaces.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/manifest.json +1 -1
- package/package.json +1 -149
- package/table/header-cell/index.d.ts.map +1 -1
- package/table/header-cell/index.js +3 -3
- package/table/header-cell/index.js.map +1 -1
- package/table/header-cell/styles.css.js +24 -24
- package/table/header-cell/styles.scoped.css +38 -53
- package/table/header-cell/styles.selectors.js +24 -24
- package/table/header-cell/th-element.d.ts +1 -2
- package/table/header-cell/th-element.d.ts.map +1 -1
- package/table/header-cell/th-element.js +1 -2
- package/table/header-cell/th-element.js.map +1 -1
- package/table/interfaces.d.ts +3 -1
- package/table/interfaces.d.ts.map +1 -1
- package/table/interfaces.js.map +1 -1
- package/table/resizer/index.d.ts +3 -0
- package/table/resizer/index.d.ts.map +1 -1
- package/table/resizer/index.js +5 -2
- package/table/resizer/index.js.map +1 -1
- package/table/resizer/styles.css.js +8 -6
- package/table/resizer/styles.scoped.css +36 -28
- package/table/resizer/styles.selectors.js +8 -6
- package/table/thead.d.ts.map +1 -1
- package/table/thead.js +6 -3
- package/table/thead.js.map +1 -1
|
@@ -92,6 +92,7 @@ export interface CollectionPreferencesProps<CustomPreferenceType = any> extends
|
|
|
92
92
|
* Configures the built-in content display preference for order and visibility of columns in a table.
|
|
93
93
|
*
|
|
94
94
|
* Once set, the component displays this preference in the modal.
|
|
95
|
+
* Cannot be used together with `visibleContentPreference`.
|
|
95
96
|
*
|
|
96
97
|
* It contains the following:
|
|
97
98
|
* - `title` (string) - Specifies the text displayed at the top of the preference.
|
|
@@ -114,9 +115,10 @@ export interface CollectionPreferencesProps<CustomPreferenceType = any> extends
|
|
|
114
115
|
*/
|
|
115
116
|
contentDisplayPreference?: CollectionPreferencesProps.ContentDisplayPreference;
|
|
116
117
|
/**
|
|
117
|
-
* Configures the built-in "visible content selection" preference (for example, visible
|
|
118
|
+
* Configures the built-in "visible content selection" preference (for example, visible sections in cards).
|
|
118
119
|
*
|
|
119
120
|
* If you set it, the component displays this preference in the modal.
|
|
121
|
+
* Cannot be used together with `contentDisplayPreference`.
|
|
120
122
|
*
|
|
121
123
|
* It contains the following:
|
|
122
124
|
* - `title` (string) - Specifies the text displayed at the top of the preference.
|
|
@@ -130,6 +132,8 @@ export interface CollectionPreferencesProps<CustomPreferenceType = any> extends
|
|
|
130
132
|
* - `editable` (boolean) - (Optional) Determines whether the user is able to toggle its visibility. This is `true` by default.
|
|
131
133
|
*
|
|
132
134
|
* You must set the current list of visible content `id`s in the `preferences.visibleContent` property.
|
|
135
|
+
*
|
|
136
|
+
* **Deprecated** in table, replaced by `contentDisplayPreference`.
|
|
133
137
|
*/
|
|
134
138
|
visibleContentPreference?: CollectionPreferencesProps.VisibleContentPreference;
|
|
135
139
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["collection-preferences/interfaces.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,WAAW,0BAA0B,CAAC,oBAAoB,GAAG,GAAG,CAAE,SAAQ,kBAAkB;IAChG;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;;;;;;;;OAaG;IACH,kBAAkB,CAAC,EAAE,0BAA0B,CAAC,kBAAkB,CAAC;IACnE;;;;;;;;;;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MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB;IAED,MAAM,WAAW,qBAAqB;QACpC,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB;IAED,MAAM,WAAW,wBAAwB;QACvC,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB;IAED,UAAU,aAAa;QACrB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;KACf;IAED,UAAU,sBAAsB;QAC9B,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;QACpB,OAAO,EAAE,aAAa,CAAC;YACrB,KAAK,EAAE,MAAM,CAAC;YACd,KAAK,EAAE,MAAM,CAAC;SACf,CAAC,CAAC;KACJ;IACD,MAAM,WAAW,uBAAuB;QACtC,YAAY,CAAC,EAAE,sBAAsB,CAAC;QACtC,WAAW,CAAC,EAAE,sBAAsB,CAAC;KACtC;;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["collection-preferences/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface CollectionPreferencesProps<CustomPreferenceType = any> extends BaseComponentProps {\n /**\n * Specifies the title of the preferences modal dialog. It is also used as an `aria-label` for the trigger button.\n * @i18n\n */\n title?: string;\n /**\n * Label of the confirm button in the modal footer.\n * @i18n\n */\n confirmLabel?: string;\n /**\n * Label of the cancel button in the modal footer.\n * @i18n\n */\n cancelLabel?: string;\n /**\n * Determines whether the preferences trigger button is disabled.\n */\n disabled?: boolean;\n /**\n * Configures the built-in \"page size selection\" preference.\n *\n * If you set it, the component displays this preference in the modal.\n *\n * It contains the following:\n * - `title` (string) - Specifies the text displayed at the top of the preference.\n * - `options` - Specifies an array of options for page size selection. Each entry contains:\n * - `value` (number) - The value for the radio button (that is, the number of items per page).\n * - `label` (string) - A label for the radio button (for example, \"10 resources\").\n *\n * You must set the current value in the `preferences.pageSize` property.\n * @i18n\n */\n pageSizePreference?: CollectionPreferencesProps.PageSizePreference;\n /**\n * Configures the built-in \"wrap lines\" preference.\n *\n * If you set it, the component displays this preference in the modal.\n *\n * It contains the following:\n * - `label` (string) - Specifies the label for the option checkbox.\n * - `description` (string) - Specifies the text displayed below the checkbox label.\n *\n * You must set the current value in the `preferences.wrapLines` property.\n * @i18n\n */\n wrapLinesPreference?: CollectionPreferencesProps.WrapLinesPreference;\n /**\n * Configures the built-in \"striped rows\" preference.\n *\n * If you set it, the component displays this preference in the modal.\n *\n * It contains the following:\n * - `label` (string) - Specifies the label for the option checkbox.\n * - `description` (string) - Specifies the text displayed below the checkbox label.\n *\n * You must set the current value in the `preferences.stripedRows` property.\n * @i18n\n */\n stripedRowsPreference?: CollectionPreferencesProps.StripedRowsPreference;\n /**\n * Configures the content density preference (Comfortable / Compact).\n *\n * If you set it, the component displays this preference in the modal.\n *\n * It contains the following:\n * - `label` (string) - Specifies the label for the option checkbox.\n * - `description` (string) - Specifies the text displayed below the checkbox label.\n *\n * You must set the current value in the `preferences.contentDensity` property.\n * @i18n\n */\n contentDensityPreference?: CollectionPreferencesProps.ContentDensityPreference;\n /**\n * Configures the sticky columns preference.\n *\n * You can set it for both left and right columns.\n *\n * It contains the following:\n * - `label` (string) - Specifies the label for each radio group.\n * - `description` (string) - Specifies the text displayed below each radio group label.\n *\n * You must set the current value in the `preferences.stickyColumns` property.\n * @i18n\n */\n stickyColumnsPreference?: CollectionPreferencesProps.StickyColumnsPreference;\n /**\n * Configures the built-in content display preference for order and visibility of columns in a table.\n *\n * Once set, the component displays this preference in the modal.\n *\n * It contains the following:\n * - `title` (string) - Specifies the text displayed at the top of the preference.\n * - `description` (string) - Specifies the description displayed below the title.\n * - `liveAnnouncementDndStarted` ((position: number, total: number) => string) - (Optional) Adds a message to be announced by screen readers when an option is picked.\n * - `liveAnnouncementDndDiscarded` (string) - (Optional) Adds a message to be announced by screen readers when a reordering action is canceled.\n * - `liveAnnouncementDndItemReordered` ((initialPosition: number, currentPosition: number, total: number) => string) - (Optional) Adds a message to be announced by screen readers when an item is being moved.\n * - `liveAnnouncementDndItemCommitted` ((initialPosition: number, finalPosition: number, total: number) => string) - (Optional) Adds a message to be announced by screen readers when a reordering action is committed.\n * - `dragHandleAriaDescription` (string) - (Optional) Adds an ARIA description for the drag handle.\n * - `dragHandleAriaLabel` (string) - (Optional) Adds an ARIA label for the drag handle.\n * - `options` - Specifies an array of options for reordering and visible content selection.\n *\n * Each option contains the following:\n * - `id` (string) - Corresponds to a table column `id`.\n * - `label` (string) - Specifies a short description of the content.\n * - `alwaysVisible` (boolean) - (Optional) Determines whether the visibility is always on and therefore cannot be toggled. This is set to `false` by default.\n *\n * You must provide an ordered list of the items to display in the `preferences.contentDisplay` property.\n * @i18n\n */\n contentDisplayPreference?: CollectionPreferencesProps.ContentDisplayPreference;\n /**\n * Configures the built-in \"visible content selection\" preference (for example, visible columns in a table).\n *\n * If you set it, the component displays this preference in the modal.\n *\n * It contains the following:\n * - `title` (string) - Specifies the text displayed at the top of the preference.\n * - `options` - Specifies an array of groups of options for visible content selection.\n *\n * Each group of options contains the following:\n * - `label` (string) - The text to display as a title for the options group.\n * - `options` - Specifies an aray of options in the group. Each option contains the following:\n * - `id` (string) - Corresponds to a column `id` for tables or to a section `id` for cards.\n * - `label` (string) - Specifies a short description of the content.\n * - `editable` (boolean) - (Optional) Determines whether the user is able to toggle its visibility. This is `true` by default.\n *\n * You must set the current list of visible content `id`s in the `preferences.visibleContent` property.\n */\n visibleContentPreference?: CollectionPreferencesProps.VisibleContentPreference;\n /**\n * Specifies the current preference values. This includes both built-in and custom preferences.\n *\n * It contains the following:\n * - `pageSize` (number) - (Optional)\n * - `wrapLines` (boolean) - (Optional)\n * - `contentDisplay` (ReadonlyArray<ContentDisplayItem>) - (Optional) Specifies the list of content and their visibility. The order of the elements influences the display.\n * - `visibleContent` (ReadonlyArray<string>) - Specifies the list of visible content `id`s. The order of the `id`s does not influence the display. If the `contentDisplay` property is set, this property is ignored.\n * - `custom` (CustomPreferenceType) - Specifies the value for your custom preference.\n */\n preferences?: CollectionPreferencesProps.Preferences<CustomPreferenceType>;\n /**\n * Configures custom preferences. The function receives two parameters:\n *\n * - `customValue` (CustomPreferenceType) - Current value for your custom preference. It is initialized using the value you provide in `preferences.custom`.\n * - `setCustomValue` - A function that is called to notify a state update.\n *\n * It should return the content of your custom preference, for example:\n * ```\n * (customValue, setCustomValue) => (\n * <Checkbox checked={customValue} onChange={({ detail }) => setCustomValue(detail.checked)} />\n * )\n * ```\n *\n * When the user confirms the changes, the new value is passed in the `detail.custom` property of the `onConfirm` listener.\n * When the user cancels the changes, the `customValue` is reset to the one present in `preferences.custom` property.\n *\n * **Display**\n * - If any of the built-in preferences (`pageSizePreference`, `wrapLinesPreference`, or `visibleContentPreference`) are displayed,\n * the custom content is displayed at the bottom of the left column within the modal.\n * - If no built-in preference is displayed, the custom content occupies the whole modal.\n */\n customPreference?: (\n customValue: CustomPreferenceType,\n setCustomValue: React.Dispatch<CustomPreferenceType>\n ) => React.ReactNode;\n /**\n * Called when the user cancels a preference change using the cancel button in the modal footer or by dismissing the modal.\n */\n onCancel?: NonCancelableEventHandler;\n /**\n * Called when the user confirms a preference change using the confirm button in the modal footer.\n *\n * The event `detail` contains the following:\n * - `contentDensity` (boolean) - (Optional) The current content density preference value. Available only if you specify the `contentDensityPreference` property.\n * - `contentDisplay` (ReadonlyArray<ContentDisplayItem>) - (Optional) The ordered list of table columns and their visibility. Available only if you specify the `contentDisplayPreference` property.\n * - `custom` (CustomPreferenceType) - (Optional) The selected value for your custom preference.\n * - `pageSize` (number) - (Optional) The selected page size value. Available only if you specify the `pageSizePreference` property.\n * - `stickyColumns` (CollectionPreferencesProps.StickyColumns) - (Optional) The current sticky columns preference value. Available only if you specify the `stickyColumnsPreference` property.\n * - `stripedRows` (boolean) - (Optional) The current striped rows preference value. Available only if you specify the `stripedRowsPreference` property.\n * - `visibleContent` (ReadonlyArray<string>) - (Optional) The list of selected content `id`s. Available only if you specify the `visibleContentPreference` property.\n * - `wrapLines` (boolean) - (Optional) The current line wrapping preference value. Available only if you specify the `wrapLinesPreference` property.\n *\n * The values for all configured preferences are present even if the user didn't change their values.\n */\n onConfirm?: NonCancelableEventHandler<CollectionPreferencesProps.Preferences<CustomPreferenceType>>;\n}\n\nexport namespace CollectionPreferencesProps {\n export interface Preferences<CustomPreferenceType = any> {\n pageSize?: number;\n wrapLines?: boolean;\n stripedRows?: boolean;\n contentDensity?: 'comfortable' | 'compact';\n visibleContent?: ReadonlyArray<string>;\n stickyColumns?: StickyColumns;\n contentDisplay?: ReadonlyArray<ContentDisplayItem>;\n custom?: CustomPreferenceType;\n }\n\n export interface ContentDisplayPreference {\n title?: string;\n description?: string;\n options: ReadonlyArray<CollectionPreferencesProps.ContentDisplayOption>;\n liveAnnouncementDndStarted?: (position: number, total: number) => string;\n liveAnnouncementDndItemReordered?: (initialPosition: number, currentPosition: number, total: number) => string;\n liveAnnouncementDndItemCommitted?: (initialPosition: number, finalPosition: number, total: number) => string;\n liveAnnouncementDndDiscarded?: string;\n dragHandleAriaLabel?: string;\n dragHandleAriaDescription?: string;\n }\n\n export interface ContentDisplayOption {\n id: string;\n label: string;\n alwaysVisible?: boolean;\n }\n\n export interface ContentDisplayItem {\n id: string;\n visible: boolean;\n }\n\n export interface VisibleContentPreference {\n title: string;\n options: ReadonlyArray<CollectionPreferencesProps.VisibleContentOptionsGroup>;\n }\n\n export interface VisibleContentOptionsGroup {\n label: string;\n options: ReadonlyArray<CollectionPreferencesProps.VisibleContentOption>;\n }\n\n export interface VisibleContentOption {\n id: string;\n label: string;\n editable?: boolean;\n }\n\n export interface PageSizePreference {\n title?: string;\n options: ReadonlyArray<PageSizeOption>;\n }\n\n export interface PageSizeOption {\n value: number;\n label?: string;\n }\n\n export interface WrapLinesPreference {\n label?: string;\n description?: string;\n }\n\n export interface StripedRowsPreference {\n label?: string;\n description?: string;\n }\n\n export interface ContentDensityPreference {\n label?: string;\n description?: string;\n }\n\n interface StickyColumns {\n first?: number;\n last?: number;\n }\n\n interface StickyColumnPreference {\n title: string;\n description: string;\n options: ReadonlyArray<{\n label: string;\n value: number;\n }>;\n }\n export interface StickyColumnsPreference {\n firstColumns?: StickyColumnPreference;\n lastColumns?: StickyColumnPreference;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["collection-preferences/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface CollectionPreferencesProps<CustomPreferenceType = any> extends BaseComponentProps {\n /**\n * Specifies the title of the preferences modal dialog. It is also used as an `aria-label` for the trigger button.\n * @i18n\n */\n title?: string;\n /**\n * Label of the confirm button in the modal footer.\n * @i18n\n */\n confirmLabel?: string;\n /**\n * Label of the cancel button in the modal footer.\n * @i18n\n */\n cancelLabel?: string;\n /**\n * Determines whether the preferences trigger button is disabled.\n */\n disabled?: boolean;\n /**\n * Configures the built-in \"page size selection\" preference.\n *\n * If you set it, the component displays this preference in the modal.\n *\n * It contains the following:\n * - `title` (string) - Specifies the text displayed at the top of the preference.\n * - `options` - Specifies an array of options for page size selection. Each entry contains:\n * - `value` (number) - The value for the radio button (that is, the number of items per page).\n * - `label` (string) - A label for the radio button (for example, \"10 resources\").\n *\n * You must set the current value in the `preferences.pageSize` property.\n * @i18n\n */\n pageSizePreference?: CollectionPreferencesProps.PageSizePreference;\n /**\n * Configures the built-in \"wrap lines\" preference.\n *\n * If you set it, the component displays this preference in the modal.\n *\n * It contains the following:\n * - `label` (string) - Specifies the label for the option checkbox.\n * - `description` (string) - Specifies the text displayed below the checkbox label.\n *\n * You must set the current value in the `preferences.wrapLines` property.\n * @i18n\n */\n wrapLinesPreference?: CollectionPreferencesProps.WrapLinesPreference;\n /**\n * Configures the built-in \"striped rows\" preference.\n *\n * If you set it, the component displays this preference in the modal.\n *\n * It contains the following:\n * - `label` (string) - Specifies the label for the option checkbox.\n * - `description` (string) - Specifies the text displayed below the checkbox label.\n *\n * You must set the current value in the `preferences.stripedRows` property.\n * @i18n\n */\n stripedRowsPreference?: CollectionPreferencesProps.StripedRowsPreference;\n /**\n * Configures the content density preference (Comfortable / Compact).\n *\n * If you set it, the component displays this preference in the modal.\n *\n * It contains the following:\n * - `label` (string) - Specifies the label for the option checkbox.\n * - `description` (string) - Specifies the text displayed below the checkbox label.\n *\n * You must set the current value in the `preferences.contentDensity` property.\n * @i18n\n */\n contentDensityPreference?: CollectionPreferencesProps.ContentDensityPreference;\n /**\n * Configures the sticky columns preference.\n *\n * You can set it for both left and right columns.\n *\n * It contains the following:\n * - `label` (string) - Specifies the label for each radio group.\n * - `description` (string) - Specifies the text displayed below each radio group label.\n *\n * You must set the current value in the `preferences.stickyColumns` property.\n * @i18n\n */\n stickyColumnsPreference?: CollectionPreferencesProps.StickyColumnsPreference;\n /**\n * Configures the built-in content display preference for order and visibility of columns in a table.\n *\n * Once set, the component displays this preference in the modal.\n * Cannot be used together with `visibleContentPreference`.\n *\n * It contains the following:\n * - `title` (string) - Specifies the text displayed at the top of the preference.\n * - `description` (string) - Specifies the description displayed below the title.\n * - `liveAnnouncementDndStarted` ((position: number, total: number) => string) - (Optional) Adds a message to be announced by screen readers when an option is picked.\n * - `liveAnnouncementDndDiscarded` (string) - (Optional) Adds a message to be announced by screen readers when a reordering action is canceled.\n * - `liveAnnouncementDndItemReordered` ((initialPosition: number, currentPosition: number, total: number) => string) - (Optional) Adds a message to be announced by screen readers when an item is being moved.\n * - `liveAnnouncementDndItemCommitted` ((initialPosition: number, finalPosition: number, total: number) => string) - (Optional) Adds a message to be announced by screen readers when a reordering action is committed.\n * - `dragHandleAriaDescription` (string) - (Optional) Adds an ARIA description for the drag handle.\n * - `dragHandleAriaLabel` (string) - (Optional) Adds an ARIA label for the drag handle.\n * - `options` - Specifies an array of options for reordering and visible content selection.\n *\n * Each option contains the following:\n * - `id` (string) - Corresponds to a table column `id`.\n * - `label` (string) - Specifies a short description of the content.\n * - `alwaysVisible` (boolean) - (Optional) Determines whether the visibility is always on and therefore cannot be toggled. This is set to `false` by default.\n *\n * You must provide an ordered list of the items to display in the `preferences.contentDisplay` property.\n * @i18n\n */\n contentDisplayPreference?: CollectionPreferencesProps.ContentDisplayPreference;\n /**\n * Configures the built-in \"visible content selection\" preference (for example, visible sections in cards).\n *\n * If you set it, the component displays this preference in the modal.\n * Cannot be used together with `contentDisplayPreference`.\n *\n * It contains the following:\n * - `title` (string) - Specifies the text displayed at the top of the preference.\n * - `options` - Specifies an array of groups of options for visible content selection.\n *\n * Each group of options contains the following:\n * - `label` (string) - The text to display as a title for the options group.\n * - `options` - Specifies an aray of options in the group. Each option contains the following:\n * - `id` (string) - Corresponds to a column `id` for tables or to a section `id` for cards.\n * - `label` (string) - Specifies a short description of the content.\n * - `editable` (boolean) - (Optional) Determines whether the user is able to toggle its visibility. This is `true` by default.\n *\n * You must set the current list of visible content `id`s in the `preferences.visibleContent` property.\n *\n * **Deprecated** in table, replaced by `contentDisplayPreference`.\n */\n visibleContentPreference?: CollectionPreferencesProps.VisibleContentPreference;\n /**\n * Specifies the current preference values. This includes both built-in and custom preferences.\n *\n * It contains the following:\n * - `pageSize` (number) - (Optional)\n * - `wrapLines` (boolean) - (Optional)\n * - `contentDisplay` (ReadonlyArray<ContentDisplayItem>) - (Optional) Specifies the list of content and their visibility. The order of the elements influences the display.\n * - `visibleContent` (ReadonlyArray<string>) - Specifies the list of visible content `id`s. The order of the `id`s does not influence the display. If the `contentDisplay` property is set, this property is ignored.\n * - `custom` (CustomPreferenceType) - Specifies the value for your custom preference.\n */\n preferences?: CollectionPreferencesProps.Preferences<CustomPreferenceType>;\n /**\n * Configures custom preferences. The function receives two parameters:\n *\n * - `customValue` (CustomPreferenceType) - Current value for your custom preference. It is initialized using the value you provide in `preferences.custom`.\n * - `setCustomValue` - A function that is called to notify a state update.\n *\n * It should return the content of your custom preference, for example:\n * ```\n * (customValue, setCustomValue) => (\n * <Checkbox checked={customValue} onChange={({ detail }) => setCustomValue(detail.checked)} />\n * )\n * ```\n *\n * When the user confirms the changes, the new value is passed in the `detail.custom` property of the `onConfirm` listener.\n * When the user cancels the changes, the `customValue` is reset to the one present in `preferences.custom` property.\n *\n * **Display**\n * - If any of the built-in preferences (`pageSizePreference`, `wrapLinesPreference`, or `visibleContentPreference`) are displayed,\n * the custom content is displayed at the bottom of the left column within the modal.\n * - If no built-in preference is displayed, the custom content occupies the whole modal.\n */\n customPreference?: (\n customValue: CustomPreferenceType,\n setCustomValue: React.Dispatch<CustomPreferenceType>\n ) => React.ReactNode;\n /**\n * Called when the user cancels a preference change using the cancel button in the modal footer or by dismissing the modal.\n */\n onCancel?: NonCancelableEventHandler;\n /**\n * Called when the user confirms a preference change using the confirm button in the modal footer.\n *\n * The event `detail` contains the following:\n * - `contentDensity` (boolean) - (Optional) The current content density preference value. Available only if you specify the `contentDensityPreference` property.\n * - `contentDisplay` (ReadonlyArray<ContentDisplayItem>) - (Optional) The ordered list of table columns and their visibility. Available only if you specify the `contentDisplayPreference` property.\n * - `custom` (CustomPreferenceType) - (Optional) The selected value for your custom preference.\n * - `pageSize` (number) - (Optional) The selected page size value. Available only if you specify the `pageSizePreference` property.\n * - `stickyColumns` (CollectionPreferencesProps.StickyColumns) - (Optional) The current sticky columns preference value. Available only if you specify the `stickyColumnsPreference` property.\n * - `stripedRows` (boolean) - (Optional) The current striped rows preference value. Available only if you specify the `stripedRowsPreference` property.\n * - `visibleContent` (ReadonlyArray<string>) - (Optional) The list of selected content `id`s. Available only if you specify the `visibleContentPreference` property.\n * - `wrapLines` (boolean) - (Optional) The current line wrapping preference value. Available only if you specify the `wrapLinesPreference` property.\n *\n * The values for all configured preferences are present even if the user didn't change their values.\n */\n onConfirm?: NonCancelableEventHandler<CollectionPreferencesProps.Preferences<CustomPreferenceType>>;\n}\n\nexport namespace CollectionPreferencesProps {\n export interface Preferences<CustomPreferenceType = any> {\n pageSize?: number;\n wrapLines?: boolean;\n stripedRows?: boolean;\n contentDensity?: 'comfortable' | 'compact';\n visibleContent?: ReadonlyArray<string>;\n stickyColumns?: StickyColumns;\n contentDisplay?: ReadonlyArray<ContentDisplayItem>;\n custom?: CustomPreferenceType;\n }\n\n export interface ContentDisplayPreference {\n title?: string;\n description?: string;\n options: ReadonlyArray<CollectionPreferencesProps.ContentDisplayOption>;\n liveAnnouncementDndStarted?: (position: number, total: number) => string;\n liveAnnouncementDndItemReordered?: (initialPosition: number, currentPosition: number, total: number) => string;\n liveAnnouncementDndItemCommitted?: (initialPosition: number, finalPosition: number, total: number) => string;\n liveAnnouncementDndDiscarded?: string;\n dragHandleAriaLabel?: string;\n dragHandleAriaDescription?: string;\n }\n\n export interface ContentDisplayOption {\n id: string;\n label: string;\n alwaysVisible?: boolean;\n }\n\n export interface ContentDisplayItem {\n id: string;\n visible: boolean;\n }\n\n export interface VisibleContentPreference {\n title: string;\n options: ReadonlyArray<CollectionPreferencesProps.VisibleContentOptionsGroup>;\n }\n\n export interface VisibleContentOptionsGroup {\n label: string;\n options: ReadonlyArray<CollectionPreferencesProps.VisibleContentOption>;\n }\n\n export interface VisibleContentOption {\n id: string;\n label: string;\n editable?: boolean;\n }\n\n export interface PageSizePreference {\n title?: string;\n options: ReadonlyArray<PageSizeOption>;\n }\n\n export interface PageSizeOption {\n value: number;\n label?: string;\n }\n\n export interface WrapLinesPreference {\n label?: string;\n description?: string;\n }\n\n export interface StripedRowsPreference {\n label?: string;\n description?: string;\n }\n\n export interface ContentDensityPreference {\n label?: string;\n description?: string;\n }\n\n interface StickyColumns {\n first?: number;\n last?: number;\n }\n\n interface StickyColumnPreference {\n title: string;\n description: string;\n options: ReadonlyArray<{\n label: string;\n value: number;\n }>;\n }\n export interface StickyColumnsPreference {\n firstColumns?: StickyColumnPreference;\n lastColumns?: StickyColumnPreference;\n }\n}\n"]}
|
package/internal/environment.js
CHANGED
package/internal/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,149 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@cloudscape-design/components",
|
|
3
|
-
"main": "./index.js",
|
|
4
|
-
"exports": {
|
|
5
|
-
".": "./index.js",
|
|
6
|
-
"./package.json": "./package.json",
|
|
7
|
-
"./theming": "./theming/index.js",
|
|
8
|
-
"./test-utils/dom": "./test-utils/dom/index.js",
|
|
9
|
-
"./test-utils/selectors": "./test-utils/selectors/index.js",
|
|
10
|
-
"./interfaces": "./interfaces.js",
|
|
11
|
-
"./contexts/form-field": "./contexts/form-field.js",
|
|
12
|
-
"./alert": "./alert/index.js",
|
|
13
|
-
"./anchor-navigation": "./anchor-navigation/index.js",
|
|
14
|
-
"./annotation-context": "./annotation-context/index.js",
|
|
15
|
-
"./app-layout": "./app-layout/index.js",
|
|
16
|
-
"./area-chart": "./area-chart/index.js",
|
|
17
|
-
"./attribute-editor": "./attribute-editor/index.js",
|
|
18
|
-
"./autosuggest": "./autosuggest/index.js",
|
|
19
|
-
"./badge": "./badge/index.js",
|
|
20
|
-
"./bar-chart": "./bar-chart/index.js",
|
|
21
|
-
"./box": "./box/index.js",
|
|
22
|
-
"./breadcrumb-group": "./breadcrumb-group/index.js",
|
|
23
|
-
"./button": "./button/index.js",
|
|
24
|
-
"./button-dropdown": "./button-dropdown/index.js",
|
|
25
|
-
"./calendar": "./calendar/index.js",
|
|
26
|
-
"./cards": "./cards/index.js",
|
|
27
|
-
"./checkbox": "./checkbox/index.js",
|
|
28
|
-
"./code-editor": "./code-editor/index.js",
|
|
29
|
-
"./collection-preferences": "./collection-preferences/index.js",
|
|
30
|
-
"./column-layout": "./column-layout/index.js",
|
|
31
|
-
"./container": "./container/index.js",
|
|
32
|
-
"./content-layout": "./content-layout/index.js",
|
|
33
|
-
"./date-input": "./date-input/index.js",
|
|
34
|
-
"./date-picker": "./date-picker/index.js",
|
|
35
|
-
"./date-range-picker": "./date-range-picker/index.js",
|
|
36
|
-
"./drawer": "./drawer/index.js",
|
|
37
|
-
"./expandable-section": "./expandable-section/index.js",
|
|
38
|
-
"./file-upload": "./file-upload/index.js",
|
|
39
|
-
"./flashbar": "./flashbar/index.js",
|
|
40
|
-
"./form": "./form/index.js",
|
|
41
|
-
"./form-field": "./form-field/index.js",
|
|
42
|
-
"./grid": "./grid/index.js",
|
|
43
|
-
"./header": "./header/index.js",
|
|
44
|
-
"./help-panel": "./help-panel/index.js",
|
|
45
|
-
"./hotspot": "./hotspot/index.js",
|
|
46
|
-
"./icon": "./icon/index.js",
|
|
47
|
-
"./input": "./input/index.js",
|
|
48
|
-
"./line-chart": "./line-chart/index.js",
|
|
49
|
-
"./link": "./link/index.js",
|
|
50
|
-
"./mixed-line-bar-chart": "./mixed-line-bar-chart/index.js",
|
|
51
|
-
"./modal": "./modal/index.js",
|
|
52
|
-
"./multiselect": "./multiselect/index.js",
|
|
53
|
-
"./pagination": "./pagination/index.js",
|
|
54
|
-
"./pie-chart": "./pie-chart/index.js",
|
|
55
|
-
"./popover": "./popover/index.js",
|
|
56
|
-
"./progress-bar": "./progress-bar/index.js",
|
|
57
|
-
"./property-filter": "./property-filter/index.js",
|
|
58
|
-
"./radio-group": "./radio-group/index.js",
|
|
59
|
-
"./s3-resource-selector": "./s3-resource-selector/index.js",
|
|
60
|
-
"./segmented-control": "./segmented-control/index.js",
|
|
61
|
-
"./select": "./select/index.js",
|
|
62
|
-
"./side-navigation": "./side-navigation/index.js",
|
|
63
|
-
"./space-between": "./space-between/index.js",
|
|
64
|
-
"./spinner": "./spinner/index.js",
|
|
65
|
-
"./split-panel": "./split-panel/index.js",
|
|
66
|
-
"./status-indicator": "./status-indicator/index.js",
|
|
67
|
-
"./table": "./table/index.js",
|
|
68
|
-
"./tabs": "./tabs/index.js",
|
|
69
|
-
"./tag-editor": "./tag-editor/index.js",
|
|
70
|
-
"./text-content": "./text-content/index.js",
|
|
71
|
-
"./text-filter": "./text-filter/index.js",
|
|
72
|
-
"./textarea": "./textarea/index.js",
|
|
73
|
-
"./tiles": "./tiles/index.js",
|
|
74
|
-
"./time-input": "./time-input/index.js",
|
|
75
|
-
"./toggle": "./toggle/index.js",
|
|
76
|
-
"./token-group": "./token-group/index.js",
|
|
77
|
-
"./top-navigation": "./top-navigation/index.js",
|
|
78
|
-
"./tutorial-panel": "./tutorial-panel/index.js",
|
|
79
|
-
"./wizard": "./wizard/index.js",
|
|
80
|
-
"./top-navigation/1.0-beta": "./top-navigation/1.0-beta/index.js",
|
|
81
|
-
"./i18n": "./i18n/index.js",
|
|
82
|
-
"./i18n/messages/all.all": "./i18n/messages/all.all.js",
|
|
83
|
-
"./i18n/messages/all.all.json": "./i18n/messages/all.all.json",
|
|
84
|
-
"./i18n/messages/all.de": "./i18n/messages/all.de.js",
|
|
85
|
-
"./i18n/messages/all.de.json": "./i18n/messages/all.de.json",
|
|
86
|
-
"./i18n/messages/all.en-GB": "./i18n/messages/all.en-GB.js",
|
|
87
|
-
"./i18n/messages/all.en-GB.json": "./i18n/messages/all.en-GB.json",
|
|
88
|
-
"./i18n/messages/all.en": "./i18n/messages/all.en.js",
|
|
89
|
-
"./i18n/messages/all.en.json": "./i18n/messages/all.en.json",
|
|
90
|
-
"./i18n/messages/all.es": "./i18n/messages/all.es.js",
|
|
91
|
-
"./i18n/messages/all.es.json": "./i18n/messages/all.es.json",
|
|
92
|
-
"./i18n/messages/all.fr": "./i18n/messages/all.fr.js",
|
|
93
|
-
"./i18n/messages/all.fr.json": "./i18n/messages/all.fr.json",
|
|
94
|
-
"./i18n/messages/all.id": "./i18n/messages/all.id.js",
|
|
95
|
-
"./i18n/messages/all.id.json": "./i18n/messages/all.id.json",
|
|
96
|
-
"./i18n/messages/all.it": "./i18n/messages/all.it.js",
|
|
97
|
-
"./i18n/messages/all.it.json": "./i18n/messages/all.it.json",
|
|
98
|
-
"./i18n/messages/all.ja": "./i18n/messages/all.ja.js",
|
|
99
|
-
"./i18n/messages/all.ja.json": "./i18n/messages/all.ja.json",
|
|
100
|
-
"./i18n/messages/all.ko": "./i18n/messages/all.ko.js",
|
|
101
|
-
"./i18n/messages/all.ko.json": "./i18n/messages/all.ko.json",
|
|
102
|
-
"./i18n/messages/all.pt-BR": "./i18n/messages/all.pt-BR.js",
|
|
103
|
-
"./i18n/messages/all.pt-BR.json": "./i18n/messages/all.pt-BR.json",
|
|
104
|
-
"./i18n/messages/all.tr": "./i18n/messages/all.tr.js",
|
|
105
|
-
"./i18n/messages/all.tr.json": "./i18n/messages/all.tr.json",
|
|
106
|
-
"./i18n/messages/all.zh-CN": "./i18n/messages/all.zh-CN.js",
|
|
107
|
-
"./i18n/messages/all.zh-CN.json": "./i18n/messages/all.zh-CN.json",
|
|
108
|
-
"./i18n/messages/all.zh-TW": "./i18n/messages/all.zh-TW.js",
|
|
109
|
-
"./i18n/messages/all.zh-TW.json": "./i18n/messages/all.zh-TW.json"
|
|
110
|
-
},
|
|
111
|
-
"sideEffects": [
|
|
112
|
-
"*.css",
|
|
113
|
-
"./internal/base-component/index.js",
|
|
114
|
-
"./internal/base-component/styles.css.js"
|
|
115
|
-
],
|
|
116
|
-
"version": "3.0.443",
|
|
117
|
-
"repository": {
|
|
118
|
-
"type": "git",
|
|
119
|
-
"url": "https://github.com/cloudscape-design/components.git"
|
|
120
|
-
},
|
|
121
|
-
"homepage": "https://cloudscape.design",
|
|
122
|
-
"dependencies": {
|
|
123
|
-
"@cloudscape-design/collection-hooks": "^1.0.0",
|
|
124
|
-
"@cloudscape-design/component-toolkit": "^1.0.0-beta",
|
|
125
|
-
"@cloudscape-design/test-utils-core": "^1.0.0",
|
|
126
|
-
"@cloudscape-design/theming-runtime": "^1.0.0",
|
|
127
|
-
"@dnd-kit/core": "^6.0.8",
|
|
128
|
-
"@dnd-kit/sortable": "^7.0.2",
|
|
129
|
-
"@dnd-kit/utilities": "^3.2.1",
|
|
130
|
-
"@juggle/resize-observer": "^3.3.1",
|
|
131
|
-
"ace-builds": "^1.23.0",
|
|
132
|
-
"balanced-match": "^1.0.2",
|
|
133
|
-
"clsx": "^1.1.0",
|
|
134
|
-
"d3-shape": "^1.3.7",
|
|
135
|
-
"date-fns": "^2.25.0",
|
|
136
|
-
"intl-messageformat": "^10.3.1",
|
|
137
|
-
"mnth": "^2.0.0",
|
|
138
|
-
"react-keyed-flatten-children": "^1.3.0",
|
|
139
|
-
"react-transition-group": "^4.4.2",
|
|
140
|
-
"react-virtual": "^2.8.2",
|
|
141
|
-
"tslib": "^2.4.0",
|
|
142
|
-
"weekstart": "^1.1.0"
|
|
143
|
-
},
|
|
144
|
-
"peerDependencies": {
|
|
145
|
-
"react": "^16.8 || ^17 || ^18",
|
|
146
|
-
"react-dom": "^16.8 || ^17 || ^18"
|
|
147
|
-
},
|
|
148
|
-
"license": "Apache-2.0"
|
|
149
|
-
}
|
|
1
|
+
{"name":"@cloudscape-design/components","main":"./index.js","exports":{".":"./index.js","./package.json":"./package.json","./theming":"./theming/index.js","./test-utils/dom":"./test-utils/dom/index.js","./test-utils/selectors":"./test-utils/selectors/index.js","./interfaces":"./interfaces.js","./contexts/form-field":"./contexts/form-field.js","./alert":"./alert/index.js","./anchor-navigation":"./anchor-navigation/index.js","./annotation-context":"./annotation-context/index.js","./app-layout":"./app-layout/index.js","./area-chart":"./area-chart/index.js","./attribute-editor":"./attribute-editor/index.js","./autosuggest":"./autosuggest/index.js","./badge":"./badge/index.js","./bar-chart":"./bar-chart/index.js","./box":"./box/index.js","./breadcrumb-group":"./breadcrumb-group/index.js","./button":"./button/index.js","./button-dropdown":"./button-dropdown/index.js","./calendar":"./calendar/index.js","./cards":"./cards/index.js","./checkbox":"./checkbox/index.js","./code-editor":"./code-editor/index.js","./collection-preferences":"./collection-preferences/index.js","./column-layout":"./column-layout/index.js","./container":"./container/index.js","./content-layout":"./content-layout/index.js","./date-input":"./date-input/index.js","./date-picker":"./date-picker/index.js","./date-range-picker":"./date-range-picker/index.js","./drawer":"./drawer/index.js","./expandable-section":"./expandable-section/index.js","./file-upload":"./file-upload/index.js","./flashbar":"./flashbar/index.js","./form":"./form/index.js","./form-field":"./form-field/index.js","./grid":"./grid/index.js","./header":"./header/index.js","./help-panel":"./help-panel/index.js","./hotspot":"./hotspot/index.js","./icon":"./icon/index.js","./input":"./input/index.js","./line-chart":"./line-chart/index.js","./link":"./link/index.js","./mixed-line-bar-chart":"./mixed-line-bar-chart/index.js","./modal":"./modal/index.js","./multiselect":"./multiselect/index.js","./pagination":"./pagination/index.js","./pie-chart":"./pie-chart/index.js","./popover":"./popover/index.js","./progress-bar":"./progress-bar/index.js","./property-filter":"./property-filter/index.js","./radio-group":"./radio-group/index.js","./s3-resource-selector":"./s3-resource-selector/index.js","./segmented-control":"./segmented-control/index.js","./select":"./select/index.js","./side-navigation":"./side-navigation/index.js","./space-between":"./space-between/index.js","./spinner":"./spinner/index.js","./split-panel":"./split-panel/index.js","./status-indicator":"./status-indicator/index.js","./table":"./table/index.js","./tabs":"./tabs/index.js","./tag-editor":"./tag-editor/index.js","./text-content":"./text-content/index.js","./text-filter":"./text-filter/index.js","./textarea":"./textarea/index.js","./tiles":"./tiles/index.js","./time-input":"./time-input/index.js","./toggle":"./toggle/index.js","./token-group":"./token-group/index.js","./top-navigation":"./top-navigation/index.js","./tutorial-panel":"./tutorial-panel/index.js","./wizard":"./wizard/index.js","./top-navigation/1.0-beta":"./top-navigation/1.0-beta/index.js","./i18n":"./i18n/index.js","./i18n/messages/all.all":"./i18n/messages/all.all.js","./i18n/messages/all.all.json":"./i18n/messages/all.all.json","./i18n/messages/all.de":"./i18n/messages/all.de.js","./i18n/messages/all.de.json":"./i18n/messages/all.de.json","./i18n/messages/all.en-GB":"./i18n/messages/all.en-GB.js","./i18n/messages/all.en-GB.json":"./i18n/messages/all.en-GB.json","./i18n/messages/all.en":"./i18n/messages/all.en.js","./i18n/messages/all.en.json":"./i18n/messages/all.en.json","./i18n/messages/all.es":"./i18n/messages/all.es.js","./i18n/messages/all.es.json":"./i18n/messages/all.es.json","./i18n/messages/all.fr":"./i18n/messages/all.fr.js","./i18n/messages/all.fr.json":"./i18n/messages/all.fr.json","./i18n/messages/all.id":"./i18n/messages/all.id.js","./i18n/messages/all.id.json":"./i18n/messages/all.id.json","./i18n/messages/all.it":"./i18n/messages/all.it.js","./i18n/messages/all.it.json":"./i18n/messages/all.it.json","./i18n/messages/all.ja":"./i18n/messages/all.ja.js","./i18n/messages/all.ja.json":"./i18n/messages/all.ja.json","./i18n/messages/all.ko":"./i18n/messages/all.ko.js","./i18n/messages/all.ko.json":"./i18n/messages/all.ko.json","./i18n/messages/all.pt-BR":"./i18n/messages/all.pt-BR.js","./i18n/messages/all.pt-BR.json":"./i18n/messages/all.pt-BR.json","./i18n/messages/all.tr":"./i18n/messages/all.tr.js","./i18n/messages/all.tr.json":"./i18n/messages/all.tr.json","./i18n/messages/all.zh-CN":"./i18n/messages/all.zh-CN.js","./i18n/messages/all.zh-CN.json":"./i18n/messages/all.zh-CN.json","./i18n/messages/all.zh-TW":"./i18n/messages/all.zh-TW.js","./i18n/messages/all.zh-TW.json":"./i18n/messages/all.zh-TW.json"},"sideEffects":["*.css","./internal/base-component/index.js","./internal/base-component/styles.css.js"],"version":"3.0.444","repository":{"type":"git","url":"https://github.com/cloudscape-design/components.git"},"homepage":"https://cloudscape.design","dependencies":{"@cloudscape-design/collection-hooks":"^1.0.0","@cloudscape-design/component-toolkit":"^1.0.0-beta","@cloudscape-design/test-utils-core":"^1.0.0","@cloudscape-design/theming-runtime":"^1.0.0","@dnd-kit/core":"^6.0.8","@dnd-kit/sortable":"^7.0.2","@dnd-kit/utilities":"^3.2.1","@juggle/resize-observer":"^3.3.1","ace-builds":"^1.23.0","balanced-match":"^1.0.2","clsx":"^1.1.0","d3-shape":"^1.3.7","date-fns":"^2.25.0","intl-messageformat":"^10.3.1","mnth":"^2.0.0","react-keyed-flatten-children":"^1.3.0","react-transition-group":"^4.4.2","react-virtual":"^2.8.2","tslib":"^2.4.0","weekstart":"^1.1.0"},"peerDependencies":{"react":"^16.8 || ^17 || ^18","react-dom":"^16.8 || ^17 || ^18"},"license":"Apache-2.0"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["table/header-cell/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAM3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1C,UAAU,oBAAoB,CAAC,QAAQ;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,UAAU,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC9C,mBAAmB,CAAC,EAAE,UAAU,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACzD,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,MAAM,EAAE,UAAU,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IACpD,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAChE,g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OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,MAAM,EAAE,UAAU,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IACpD,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAChE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,WAAW,CAAC;IACtB,WAAW,EAAE,kBAAkB,CAAC;IAChC,OAAO,EAAE,KAAK,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IACxC,gBAAgB,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACjC,SAAS,EAAE,SAAS,CAAC;IACrB,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,EACxC,SAAS,EACT,KAAK,EACL,QAAQ,EACR,MAAM,EACN,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,SAAS,EACT,gBAAgB,EAChB,MAAM,EACN,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,QAAQ,EACR,WAAW,EACX,OAAO,EACP,SAAS,EACT,sBAAsB,GACvB,EAAE,oBAAoB,CAAC,QAAQ,CAAC,eA8FhC"}
|
|
@@ -6,7 +6,7 @@ import InternalIcon from '../../icon/internal';
|
|
|
6
6
|
import { KeyCode } from '../../internal/keycode';
|
|
7
7
|
import { getSortingIconName, getSortingStatus, isSorted } from './utils';
|
|
8
8
|
import styles from './styles.css.js';
|
|
9
|
-
import { Resizer } from '../resizer';
|
|
9
|
+
import { Divider, Resizer } from '../resizer';
|
|
10
10
|
import { useUniqueId } from '../../internal/hooks/use-unique-id';
|
|
11
11
|
import { useInternalI18n } from '../../i18n/context';
|
|
12
12
|
import { TableThElement } from './th-element';
|
|
@@ -31,7 +31,7 @@ export function TableHeaderCell({ className, style, tabIndex, column, activeSort
|
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
const headerId = useUniqueId('table-header-');
|
|
34
|
-
return (React.createElement(TableThElement, { className: className, style: style, cellRef: cellRef, sortingStatus: sortingStatus, sortingDisabled: sortingDisabled, hidden: hidden, colIndex: colIndex,
|
|
34
|
+
return (React.createElement(TableThElement, { className: className, style: style, cellRef: cellRef, sortingStatus: sortingStatus, sortingDisabled: sortingDisabled, hidden: hidden, colIndex: colIndex, columnId: columnId, stickyState: stickyState, tableRole: tableRole },
|
|
35
35
|
React.createElement("div", Object.assign({ "data-focus-id": `sorting-control-${String(columnId)}`, className: clsx(styles['header-cell-content'], {
|
|
36
36
|
[styles['header-cell-fake-focus']]: focusedComponent === `sorting-control-${String(columnId)}`,
|
|
37
37
|
}), "aria-label": column.ariaLabel
|
|
@@ -54,6 +54,6 @@ export function TableHeaderCell({ className, style, tabIndex, column, activeSort
|
|
|
54
54
|
React.createElement(InternalIcon, { name: "edit" }))) : null),
|
|
55
55
|
sortingStatus && (React.createElement("span", { className: styles['sorting-icon'] },
|
|
56
56
|
React.createElement(InternalIcon, { name: getSortingIconName(sortingStatus) })))),
|
|
57
|
-
resizableColumns
|
|
57
|
+
resizableColumns ? (React.createElement(Resizer, { tabIndex: tabIndex, focusId: `resize-control-${String(columnId)}`, showFocusRing: focusedComponent === `resize-control-${String(columnId)}`, onWidthUpdate: newWidth => updateColumn(columnId, newWidth), onWidthUpdateCommit: onResizeFinish, ariaLabelledby: headerId, minWidth: typeof column.minWidth === 'string' ? parseInt(column.minWidth) : column.minWidth, roleDescription: i18n('ariaLabels.resizerRoleDescription', resizerRoleDescription) })) : (React.createElement(Divider, { className: styles['resize-divider'] }))));
|
|
58
58
|
}
|
|
59
59
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["table/header-cell/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACzE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["table/header-cell/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACzE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AA0B9C,MAAM,UAAU,eAAe,CAAW,EACxC,SAAS,EACT,KAAK,EACL,QAAQ,EACR,MAAM,EACN,mBAAmB,EACnB,iBAAiB,EACjB,eAA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;YACL,aAAa,IAAI,CAChB,8BAAM,SAAS,EAAE,MAAM,CAAC,cAAc,CAAC;gBACrC,oBAAC,YAAY,IAAC,IAAI,EAAE,kBAAkB,CAAC,aAAa,CAAC,GAAI,CACpD,CACR,CACG;QACL,gBAAgB,CAAC,CAAC,CAAC,CAClB,oBAAC,OAAO,IACN,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,kBAAkB,MAAM,CAAC,QAAQ,CAAC,EAAE,EAC7C,aAAa,EAAE,gBAAgB,KAAK,kBAAkB,MAAM,CAAC,QAAQ,CAAC,EAAE,EACxE,aAAa,EAAE,QAAQ,CAAC,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAC3D,mBAAmB,EAAE,cAAc,EACnC,cAAc,EAAE,QAAQ,EACxB,QAAQ,EAAE,OAAO,MAAM,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,EAC3F,eAAe,EAAE,IAAI,CAAC,mCAAmC,EAAE,sBAAsB,CAAC,GAClF,CACH,CAAC,CAAC,CAAC,CACF,oBAAC,OAAO,IAAC,SAAS,EAAE,MAAM,CAAC,gBAAgB,CAAC,GAAI,CACjD,CACc,CAClB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React from 'react';\nimport InternalIcon from '../../icon/internal';\nimport { KeyCode } from '../../internal/keycode';\nimport { TableProps } from '../interfaces';\nimport { getSortingIconName, getSortingStatus, isSorted } from './utils';\nimport styles from './styles.css.js';\nimport { Divider, Resizer } from '../resizer';\nimport { useUniqueId } from '../../internal/hooks/use-unique-id';\nimport { useInternalI18n } from '../../i18n/context';\nimport { StickyColumnsModel } from '../sticky-columns';\nimport { TableRole } from '../table-role';\nimport { TableThElement } from './th-element';\n\ninterface TableHeaderCellProps<ItemType> {\n className?: string;\n style?: React.CSSProperties;\n tabIndex: number;\n column: TableProps.ColumnDefinition<ItemType>;\n activeSortingColumn?: TableProps.SortingColumn<ItemType>;\n sortingDescending?: boolean;\n sortingDisabled?: boolean;\n wrapLines?: boolean;\n hidden?: boolean;\n onClick(detail: TableProps.SortingState<any>): void;\n onResizeFinish: () => void;\n colIndex: number;\n updateColumn: (columnId: PropertyKey, newWidth: number) => void;\n resizableColumns?: boolean;\n isEditable?: boolean;\n columnId: PropertyKey;\n stickyState: StickyColumnsModel;\n cellRef: React.RefCallback<HTMLElement>;\n focusedComponent?: null | string;\n tableRole: TableRole;\n resizerRoleDescription?: string;\n}\n\nexport function TableHeaderCell<ItemType>({\n className,\n style,\n tabIndex,\n column,\n activeSortingColumn,\n sortingDescending,\n sortingDisabled,\n wrapLines,\n focusedComponent,\n hidden,\n onClick,\n colIndex,\n updateColumn,\n resizableColumns,\n onResizeFinish,\n isEditable,\n columnId,\n stickyState,\n cellRef,\n tableRole,\n resizerRoleDescription,\n}: TableHeaderCellProps<ItemType>) {\n const i18n = useInternalI18n('table');\n const sortable = !!column.sortingComparator || !!column.sortingField;\n const sorted = !!activeSortingColumn && isSorted(column, activeSortingColumn);\n const sortingStatus = getSortingStatus(sortable, sorted, !!sortingDescending, !!sortingDisabled);\n const handleClick = () =>\n onClick({\n sortingColumn: column,\n isDescending: sorted ? !sortingDescending : false,\n });\n\n // Elements with role=\"button\" do not have the default behavior of <button>, where pressing\n // Enter or Space will trigger a click event. Therefore we need to add this ourselves.\n // The native <button> element cannot be used due to a misaligned implementation in Firefox:\n // https://bugzilla.mozilla.org/show_bug.cgi?id=843003\n const handleKeyPress = ({ nativeEvent: e }: React.KeyboardEvent) => {\n if (e.keyCode === KeyCode.enter || e.keyCode === KeyCode.space) {\n e.preventDefault();\n handleClick();\n }\n };\n\n const headerId = useUniqueId('table-header-');\n\n return (\n <TableThElement\n className={className}\n style={style}\n cellRef={cellRef}\n sortingStatus={sortingStatus}\n sortingDisabled={sortingDisabled}\n hidden={hidden}\n colIndex={colIndex}\n columnId={columnId}\n stickyState={stickyState}\n tableRole={tableRole}\n >\n <div\n data-focus-id={`sorting-control-${String(columnId)}`}\n className={clsx(styles['header-cell-content'], {\n [styles['header-cell-fake-focus']]: focusedComponent === `sorting-control-${String(columnId)}`,\n })}\n aria-label={\n column.ariaLabel\n ? column.ariaLabel({\n sorted: sorted,\n descending: sorted && !!sortingDescending,\n disabled: !!sortingDisabled,\n })\n : undefined\n }\n {...(sortingStatus && !sortingDisabled\n ? {\n onKeyPress: handleKeyPress,\n tabIndex: tabIndex,\n role: 'button',\n onClick: handleClick,\n }\n : {})}\n >\n <div className={clsx(styles['header-cell-text'], wrapLines && styles['header-cell-text-wrap'])} id={headerId}>\n {column.header}\n {isEditable ? (\n <span\n className={styles['edit-icon']}\n role=\"img\"\n aria-label={i18n('columnDefinitions.editConfig.editIconAriaLabel', column.editConfig?.editIconAriaLabel)}\n >\n <InternalIcon name=\"edit\" />\n </span>\n ) : null}\n </div>\n {sortingStatus && (\n <span className={styles['sorting-icon']}>\n <InternalIcon name={getSortingIconName(sortingStatus)} />\n </span>\n )}\n </div>\n {resizableColumns ? (\n <Resizer\n tabIndex={tabIndex}\n focusId={`resize-control-${String(columnId)}`}\n showFocusRing={focusedComponent === `resize-control-${String(columnId)}`}\n onWidthUpdate={newWidth => updateColumn(columnId, newWidth)}\n onWidthUpdateCommit={onResizeFinish}\n ariaLabelledby={headerId}\n minWidth={typeof column.minWidth === 'string' ? parseInt(column.minWidth) : column.minWidth}\n roleDescription={i18n('ariaLabels.resizerRoleDescription', resizerRoleDescription)}\n />\n ) : (\n <Divider className={styles['resize-divider']} />\n )}\n </TableThElement>\n );\n}\n"]}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"header-cell": "awsui_header-
|
|
5
|
-
"header-cell-sticky": "awsui_header-cell-
|
|
6
|
-
"header-cell-stuck": "awsui_header-cell-
|
|
7
|
-
"header-cell-variant-full-page": "awsui_header-cell-variant-full-
|
|
8
|
-
"header-cell-hidden": "awsui_header-cell-
|
|
9
|
-
"header-cell-sortable": "awsui_header-cell-
|
|
10
|
-
"sticky-cell": "awsui_sticky-
|
|
11
|
-
"sticky-cell-pad-left": "awsui_sticky-cell-pad-
|
|
12
|
-
"has-selection": "awsui_has-
|
|
13
|
-
"sticky-cell-last-left": "awsui_sticky-cell-last-
|
|
14
|
-
"
|
|
15
|
-
"sticky-cell-last-right": "awsui_sticky-cell-last-
|
|
16
|
-
"sorting-icon": "awsui_sorting-
|
|
17
|
-
"edit-icon": "awsui_edit-
|
|
18
|
-
"header-cell-content": "awsui_header-cell-
|
|
19
|
-
"header-cell-fake-focus": "awsui_header-cell-fake-
|
|
20
|
-
"header-cell-disabled": "awsui_header-cell-
|
|
21
|
-
"header-cell-sorted": "awsui_header-cell-
|
|
22
|
-
"header-cell-text": "awsui_header-cell-
|
|
23
|
-
"header-cell-text-wrap": "awsui_header-cell-text-
|
|
24
|
-
"header-cell-ascending": "awsui_header-cell-
|
|
25
|
-
"header-cell-descending": "awsui_header-cell-
|
|
26
|
-
"is-visual-refresh": "awsui_is-visual-
|
|
27
|
-
"has-striped-rows": "awsui_has-striped-
|
|
4
|
+
"header-cell": "awsui_header-cell_1spae_1hunm_93",
|
|
5
|
+
"header-cell-sticky": "awsui_header-cell-sticky_1spae_1hunm_105",
|
|
6
|
+
"header-cell-stuck": "awsui_header-cell-stuck_1spae_1hunm_108",
|
|
7
|
+
"header-cell-variant-full-page": "awsui_header-cell-variant-full-page_1spae_1hunm_108",
|
|
8
|
+
"header-cell-hidden": "awsui_header-cell-hidden_1spae_1hunm_111",
|
|
9
|
+
"header-cell-sortable": "awsui_header-cell-sortable_1spae_1hunm_114",
|
|
10
|
+
"sticky-cell": "awsui_sticky-cell_1spae_1hunm_117",
|
|
11
|
+
"sticky-cell-pad-left": "awsui_sticky-cell-pad-left_1spae_1hunm_125",
|
|
12
|
+
"has-selection": "awsui_has-selection_1spae_1hunm_125",
|
|
13
|
+
"sticky-cell-last-left": "awsui_sticky-cell-last-left_1spae_1hunm_128",
|
|
14
|
+
"resize-divider": "awsui_resize-divider_1spae_1hunm_132",
|
|
15
|
+
"sticky-cell-last-right": "awsui_sticky-cell-last-right_1spae_1hunm_135",
|
|
16
|
+
"sorting-icon": "awsui_sorting-icon_1spae_1hunm_150",
|
|
17
|
+
"edit-icon": "awsui_edit-icon_1spae_1hunm_158",
|
|
18
|
+
"header-cell-content": "awsui_header-cell-content_1spae_1hunm_164",
|
|
19
|
+
"header-cell-fake-focus": "awsui_header-cell-fake-focus_1spae_1hunm_193",
|
|
20
|
+
"header-cell-disabled": "awsui_header-cell-disabled_1spae_1hunm_211",
|
|
21
|
+
"header-cell-sorted": "awsui_header-cell-sorted_1spae_1hunm_211",
|
|
22
|
+
"header-cell-text": "awsui_header-cell-text_1spae_1hunm_225",
|
|
23
|
+
"header-cell-text-wrap": "awsui_header-cell-text-wrap_1spae_1hunm_230",
|
|
24
|
+
"header-cell-ascending": "awsui_header-cell-ascending_1spae_1hunm_236",
|
|
25
|
+
"header-cell-descending": "awsui_header-cell-descending_1spae_1hunm_237",
|
|
26
|
+
"is-visual-refresh": "awsui_is-visual-refresh_1spae_1hunm_247",
|
|
27
|
+
"has-striped-rows": "awsui_has-striped-rows_1spae_1hunm_258"
|
|
28
28
|
};
|
|
29
29
|
|