@cloudscape-design/components-themeable 3.0.1326 → 3.0.1328
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/lib/internal/manifest.json +1 -1
- package/lib/internal/scss/action-card/styles.scss +4 -2
- package/lib/internal/scss/box/styles.scss +1 -0
- package/lib/internal/scss/box/visual-accent.scss +117 -0
- package/lib/internal/scss/button-dropdown/styles.scss +6 -0
- package/lib/internal/scss/help-panel/styles.scss +6 -6
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
- package/lib/internal/template/action-card/interfaces.d.ts +40 -1
- package/lib/internal/template/action-card/interfaces.d.ts.map +1 -1
- package/lib/internal/template/action-card/interfaces.js.map +1 -1
- package/lib/internal/template/action-card/internal.d.ts.map +1 -1
- package/lib/internal/template/action-card/internal.js +32 -9
- package/lib/internal/template/action-card/internal.js.map +1 -1
- package/lib/internal/template/action-card/styles.css.js +17 -17
- package/lib/internal/template/action-card/styles.scoped.css +96 -92
- package/lib/internal/template/action-card/styles.selectors.js +17 -17
- package/lib/internal/template/box/interfaces.d.ts +59 -0
- package/lib/internal/template/box/interfaces.d.ts.map +1 -1
- package/lib/internal/template/box/interfaces.js.map +1 -1
- package/lib/internal/template/box/internal.d.ts +1 -1
- package/lib/internal/template/box/internal.d.ts.map +1 -1
- package/lib/internal/template/box/internal.js +4 -2
- package/lib/internal/template/box/internal.js.map +1 -1
- package/lib/internal/template/box/styles.css.js +224 -193
- package/lib/internal/template/box/styles.scoped.css +424 -238
- package/lib/internal/template/box/styles.selectors.js +224 -193
- package/lib/internal/template/button-dropdown/category-elements/category-element.d.ts +1 -1
- package/lib/internal/template/button-dropdown/category-elements/category-element.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/category-elements/category-element.js +3 -3
- package/lib/internal/template/button-dropdown/category-elements/category-element.js.map +1 -1
- package/lib/internal/template/button-dropdown/category-elements/expandable-category-element.d.ts +1 -1
- package/lib/internal/template/button-dropdown/category-elements/expandable-category-element.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/category-elements/expandable-category-element.js +22 -12
- package/lib/internal/template/button-dropdown/category-elements/expandable-category-element.js.map +1 -1
- package/lib/internal/template/button-dropdown/category-elements/mobile-expandable-category-element.d.ts +1 -1
- package/lib/internal/template/button-dropdown/category-elements/mobile-expandable-category-element.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/category-elements/mobile-expandable-category-element.js +12 -10
- package/lib/internal/template/button-dropdown/category-elements/mobile-expandable-category-element.js.map +1 -1
- package/lib/internal/template/button-dropdown/filter.d.ts +8 -0
- package/lib/internal/template/button-dropdown/filter.d.ts.map +1 -0
- package/lib/internal/template/button-dropdown/filter.js +18 -0
- package/lib/internal/template/button-dropdown/filter.js.map +1 -0
- package/lib/internal/template/button-dropdown/index.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/index.js +3 -3
- package/lib/internal/template/button-dropdown/index.js.map +1 -1
- package/lib/internal/template/button-dropdown/interfaces.d.ts +41 -0
- package/lib/internal/template/button-dropdown/interfaces.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/interfaces.js.map +1 -1
- package/lib/internal/template/button-dropdown/internal-interfaces.d.ts +12 -0
- package/lib/internal/template/button-dropdown/internal-interfaces.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/internal-interfaces.js.map +1 -1
- package/lib/internal/template/button-dropdown/internal.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/internal.js +46 -7
- package/lib/internal/template/button-dropdown/internal.js.map +1 -1
- package/lib/internal/template/button-dropdown/item-element/index.d.ts +1 -1
- package/lib/internal/template/button-dropdown/item-element/index.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/item-element/index.js +35 -16
- package/lib/internal/template/button-dropdown/item-element/index.js.map +1 -1
- package/lib/internal/template/button-dropdown/items-list.d.ts +1 -1
- package/lib/internal/template/button-dropdown/items-list.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/items-list.js +4 -4
- package/lib/internal/template/button-dropdown/items-list.js.map +1 -1
- package/lib/internal/template/button-dropdown/styles.css.js +23 -22
- package/lib/internal/template/button-dropdown/styles.scoped.css +38 -32
- package/lib/internal/template/button-dropdown/styles.selectors.js +23 -22
- package/lib/internal/template/button-dropdown/tooltip.d.ts +2 -1
- package/lib/internal/template/button-dropdown/tooltip.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/tooltip.js +22 -14
- package/lib/internal/template/button-dropdown/tooltip.js.map +1 -1
- package/lib/internal/template/button-dropdown/utils/filter-items.d.ts +4 -0
- package/lib/internal/template/button-dropdown/utils/filter-items.d.ts.map +1 -0
- package/lib/internal/template/button-dropdown/utils/filter-items.js +55 -0
- package/lib/internal/template/button-dropdown/utils/filter-items.js.map +1 -0
- package/lib/internal/template/button-dropdown/utils/use-button-dropdown.d.ts +7 -1
- package/lib/internal/template/button-dropdown/utils/use-button-dropdown.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/utils/use-button-dropdown.js +77 -13
- package/lib/internal/template/button-dropdown/utils/use-button-dropdown.js.map +1 -1
- package/lib/internal/template/error-boundary/internal.d.ts.map +1 -1
- package/lib/internal/template/error-boundary/internal.js +1 -0
- package/lib/internal/template/error-boundary/internal.js.map +1 -1
- package/lib/internal/template/help-panel/styles.css.js +6 -6
- package/lib/internal/template/help-panel/styles.scoped.css +67 -70
- package/lib/internal/template/help-panel/styles.selectors.js +6 -6
- package/lib/internal/template/internal/base-component/index.js +3 -3
- package/lib/internal/template/internal/base-component/index.js.map +1 -1
- package/lib/internal/template/internal/base-component/styles.scoped.css +17 -1
- package/lib/internal/template/internal/components/option/utils/filter-options.d.ts.map +1 -1
- package/lib/internal/template/internal/components/option/utils/filter-options.js +7 -8
- package/lib/internal/template/internal/components/option/utils/filter-options.js.map +1 -1
- package/lib/internal/template/internal/environment.js +2 -2
- package/lib/internal/template/internal/environment.json +2 -2
- package/lib/internal/template/internal/generated/styles/tokens.d.ts +132 -0
- package/lib/internal/template/internal/generated/styles/tokens.js +132 -0
- package/lib/internal/template/internal/generated/theming/index.cjs +1884 -0
- package/lib/internal/template/internal/generated/theming/index.js +1884 -0
- package/lib/internal/template/item-card/internal.js +1 -1
- package/lib/internal/template/item-card/internal.js.map +1 -1
- package/lib/internal/template/multiselect/embedded.d.ts +2 -2
- package/lib/internal/template/multiselect/internal.d.ts +1 -1
- package/lib/internal/template/select/parts/filter.d.ts +1 -1
- package/lib/internal/template/table/index.d.ts.map +1 -1
- package/lib/internal/template/table/index.js +5 -3
- package/lib/internal/template/table/index.js.map +1 -1
- package/lib/internal/template/table/thead.d.ts.map +1 -1
- package/lib/internal/template/table/thead.js +8 -4
- package/lib/internal/template/table/thead.js.map +1 -1
- package/lib/internal/template/test-utils/dom/action-card/index.d.ts +4 -2
- package/lib/internal/template/test-utils/dom/action-card/index.js +5 -3
- package/lib/internal/template/test-utils/dom/action-card/index.js.map +1 -1
- package/lib/internal/template/test-utils/dom/button-dropdown/index.d.ts +16 -0
- package/lib/internal/template/test-utils/dom/button-dropdown/index.js +24 -0
- package/lib/internal/template/test-utils/dom/button-dropdown/index.js.map +1 -1
- package/lib/internal/template/test-utils/selectors/button-dropdown/index.d.ts +16 -0
- package/lib/internal/template/test-utils/selectors/button-dropdown/index.js +24 -0
- package/lib/internal/template/test-utils/selectors/button-dropdown/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -22,7 +22,7 @@ export default function InternalItemCard({ actions, highlighted, children, class
|
|
|
22
22
|
return (React.createElement("div", { ref: __internalRootRef, ...baseProps, ...rootAttributes },
|
|
23
23
|
React.createElement("div", { className: styles['inner-card'] },
|
|
24
24
|
!headerRowEmpty && (React.createElement("div", { className: clsx(styles.header, disableHeaderPaddings && styles['no-padding'], !!actions && styles['with-actions']), style: getHeaderStyles(style) },
|
|
25
|
-
React.createElement(InternalStructuredItem, { content: header && React.createElement("div", { className: clsx(styles['header-inner'], testStyles.header) }, header), secondaryContent: description && React.createElement("div", { className: clsx(styles.description, testStyles.description) }, description), icon: icon && React.createElement("div", { className: testStyles.icon }, icon), actions: actions, disablePaddings: disableHeaderPaddings, wrapActions:
|
|
25
|
+
React.createElement(InternalStructuredItem, { content: header && React.createElement("div", { className: clsx(styles['header-inner'], testStyles.header) }, header), secondaryContent: description && React.createElement("div", { className: clsx(styles.description, testStyles.description) }, description), icon: icon && React.createElement("div", { className: testStyles.icon }, icon), actions: actions, disablePaddings: disableHeaderPaddings, wrapActions: true }))),
|
|
26
26
|
children && (React.createElement("div", { className: clsx(styles.body, testStyles.body, disableContentPaddings && styles['no-padding']), style: getContentStyles(style) }, children)),
|
|
27
27
|
footer && (React.createElement("div", { className: clsx(styles.footer, testStyles.footer, disableFooterPaddings && styles['no-padding']), style: getFooterStyles(style) }, footer)))));
|
|
28
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/item-card/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,sBAAsB,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAE7E,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE5F,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,UAAU,MAAM,8BAA8B,CAAC;AAEtD,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,OAAO,EACP,WAAW,EACX,QAAQ,EACR,SAAS,EACT,MAAM,EACN,WAAW,EACX,MAAM,EACN,IAAI,EACJ,KAAK,EACL,kBAAkB,EAClB,gBAAgB,EAChB,OAAO,EACP,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,QAAQ,IAAI,CACX,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,sBAAsB,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC,EAC7F,KAAK,EAAE,gBAAgB,CAAC,KAAK,CAAC,IAE7B,QAAQ,CACL,CACP;YACA,MAAM,IAAI,CACT,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,qBAAqB,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC,EAChG,KAAK,EAAE,eAAe,CAAC,KAAK,CAAC,IAE5B,MAAM,CACH,CACP,CACG,CACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { getBaseProps } from '../internal/base-component';\nimport InternalStructuredItem from '../internal/components/structured-item';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { processAttributes } from '../internal/utils/with-native-attributes';\nimport { InternalItemCardProps } from './internal-interfaces';\nimport { getContentStyles, getFooterStyles, getHeaderStyles, getRootStyles } from './style';\n\nimport styles from './styles.css.js';\nimport testStyles from './test-classes/styles.css.js';\n\nexport default function InternalItemCard({\n actions,\n highlighted,\n children,\n className,\n header,\n description,\n footer,\n icon,\n style,\n metadataAttributes,\n nativeAttributes,\n onClick,\n disableHeaderPaddings,\n disableContentPaddings,\n disableFooterPaddings,\n fullHeight,\n variant = 'default',\n __internalRootRef,\n ...restProps\n}: InternalItemCardProps) {\n const baseProps = getBaseProps(restProps);\n const isRefresh = useVisualRefresh();\n\n const headerRowEmpty = !header && !description && !icon && !actions;\n\n const rootAttributes = processAttributes<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n {\n className: clsx(\n className,\n styles.root,\n highlighted && styles.highlighted,\n fullHeight && styles['full-height'],\n isRefresh && styles.refresh,\n styles[`variant-${variant}`]\n ),\n ...metadataAttributes,\n onClick,\n style: getRootStyles(style),\n },\n nativeAttributes,\n 'Card'\n );\n\n return (\n <div ref={__internalRootRef} {...baseProps} {...rootAttributes}>\n <div className={styles['inner-card']}>\n {!headerRowEmpty && (\n <div\n className={clsx(\n styles.header,\n disableHeaderPaddings && styles['no-padding'],\n !!actions && styles['with-actions']\n )}\n style={getHeaderStyles(style)}\n >\n <InternalStructuredItem\n content={header && <div className={clsx(styles['header-inner'], testStyles.header)}>{header}</div>}\n secondaryContent={\n description && <div className={clsx(styles.description, testStyles.description)}>{description}</div>\n }\n icon={icon && <div className={testStyles.icon}>{icon}</div>}\n actions={actions}\n disablePaddings={disableHeaderPaddings}\n wrapActions={true}\n />\n </div>\n )}\n {children && (\n <div\n className={clsx(styles.body, testStyles.body, disableContentPaddings && styles['no-padding'])}\n style={getContentStyles(style)}\n >\n {children}\n </div>\n )}\n {footer && (\n <div\n className={clsx(styles.footer, testStyles.footer, disableFooterPaddings && styles['no-padding'])}\n style={getFooterStyles(style)}\n >\n {footer}\n </div>\n )}\n </div>\n </div>\n );\n}\n"]}
|
|
@@ -4,10 +4,10 @@ import { MultiselectProps } from './interfaces';
|
|
|
4
4
|
export type EmbeddedMultiselectProps = SomeRequired<Pick<MultiselectProps, 'options' | 'selectedOptions' | 'ariaLabel' | 'filteringType' | 'deselectAriaLabel' | 'virtualScroll' | 'statusType' | 'controlId' | 'onChange' | 'onLoadItems' | 'loadingText' | 'finishedText' | 'errorText' | 'recoveryText' | 'empty' | 'noMatch'>, 'options' | 'selectedOptions' | 'filteringType' | 'statusType'> & {
|
|
5
5
|
filteringText?: string;
|
|
6
6
|
};
|
|
7
|
-
declare const EmbeddedMultiselect: React.ForwardRefExoticComponent<Pick<MultiselectProps, "onChange" | "ariaLabel" | "virtualScroll" | "onLoadItems" | "loadingText" | "
|
|
7
|
+
declare const EmbeddedMultiselect: React.ForwardRefExoticComponent<Pick<MultiselectProps, "onChange" | "ariaLabel" | "virtualScroll" | "onLoadItems" | "loadingText" | "filteringType" | "noMatch" | "errorText" | "recoveryText" | "deselectAriaLabel" | "statusType" | "empty" | "finishedText" | "controlId" | "options" | "selectedOptions"> & {
|
|
8
|
+
filteringType: import("../dropdown/interfaces").OptionsFilteringType;
|
|
8
9
|
statusType: import("../types/dropdown-status").DropdownStatusProps.StatusType;
|
|
9
10
|
options: import("..").SelectProps.Options;
|
|
10
|
-
filteringType: import("../dropdown/interfaces").OptionsFilteringType;
|
|
11
11
|
selectedOptions: ReadonlyArray<MultiselectProps.Option>;
|
|
12
12
|
} & {
|
|
13
13
|
filteringText?: string;
|
|
@@ -2,9 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import { InternalBaseComponentProps } from '../internal/hooks/use-base-component/index.js';
|
|
3
3
|
import { MultiselectProps } from './interfaces';
|
|
4
4
|
declare const InternalMultiselect: React.ForwardRefExoticComponent<MultiselectProps & {
|
|
5
|
+
filteringType: import("../dropdown/interfaces").OptionsFilteringType;
|
|
5
6
|
statusType: import("../types/dropdown-status").DropdownStatusProps.StatusType;
|
|
6
7
|
options: import("..").SelectProps.Options;
|
|
7
|
-
filteringType: import("../dropdown/interfaces").OptionsFilteringType;
|
|
8
8
|
selectedOptions: ReadonlyArray<MultiselectProps.Option>;
|
|
9
9
|
keepOpen: boolean;
|
|
10
10
|
hideTokens: boolean;
|
|
@@ -5,6 +5,6 @@ export interface FilterProps extends InternalInputProps {
|
|
|
5
5
|
ref?: React.Ref<HTMLInputElement>;
|
|
6
6
|
filteringType: SelectProps.FilteringType;
|
|
7
7
|
}
|
|
8
|
-
declare const Filter: React.ForwardRefExoticComponent<Pick<FilterProps, "style" | "disabled" | "className" | "id" | "name" | "type" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "onKeyUp" | "placeholder" | "inputMode" | "autoFocus" | "value" | "autoComplete" | "readOnly" | "step" | "invalid" | "ariaLabel" | "ariaDescribedby" | "__internalRootRef" | "warning" | "ariaLabelledby" | "clearAriaLabel" | "__injectAnalyticsComponentMetadata" | "__skipNativeAttributesWarnings" | "ariaRequired" | "controlId" | "nativeInputAttributes" | "disableBrowserAutocorrect" | "spellcheck" | "
|
|
8
|
+
declare const Filter: React.ForwardRefExoticComponent<Pick<FilterProps, "style" | "disabled" | "className" | "id" | "name" | "type" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "onKeyUp" | "placeholder" | "inputMode" | "autoFocus" | "value" | "autoComplete" | "readOnly" | "step" | "invalid" | "ariaLabel" | "ariaDescribedby" | "__internalRootRef" | "warning" | "ariaLabelledby" | "filteringType" | "clearAriaLabel" | "__injectAnalyticsComponentMetadata" | "__skipNativeAttributesWarnings" | "ariaRequired" | "controlId" | "nativeInputAttributes" | "disableBrowserAutocorrect" | "spellcheck" | "__leftIcon" | "__leftIconVariant" | "__onLeftIconClick" | "__rightIcon" | "__onRightIconClick" | "__noBorderRadius" | "__onDelayedInput" | "__onBlurWithDetail" | "__inheritFormFieldProps" | "__inlineLabelText" | "__fullWidth"> & React.RefAttributes<HTMLInputElement>>;
|
|
9
9
|
export default Filter;
|
|
10
10
|
//# sourceMappingURL=filter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/table/index.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/D,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,QAAA,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/table/index.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/D,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,QAAA,MAAM,KAAK,EAqHN,mBAAmB,CAAC;AAGzB,eAAe,KAAK,CAAC"}
|
|
@@ -12,7 +12,7 @@ import { getColumnGroupsDepth } from './column-groups/utils';
|
|
|
12
12
|
import { getSortingColumnId } from './header-cell/utils';
|
|
13
13
|
import InternalTable, { InternalTableAsSubstep } from './internal';
|
|
14
14
|
const Table = React.forwardRef(({ items = [], selectedItems = [], variant = 'container', contentDensity = 'comfortable', cellVerticalAlign = 'middle', firstIndex = 1, ...props }, ref) => {
|
|
15
|
-
var _a, _b, _c, _d, _e;
|
|
15
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
16
16
|
const analyticsMetadata = getAnalyticsMetadataProps(props);
|
|
17
17
|
const hasHiddenColumns = (props.visibleColumns && props.visibleColumns.length < props.columnDefinitions.length) ||
|
|
18
18
|
((_a = props.columnDisplay) === null || _a === void 0 ? void 0 : _a.some(col => col.type !== 'group' && !col.visible));
|
|
@@ -34,8 +34,10 @@ const Table = React.forwardRef(({ items = [], selectedItems = [], variant = 'con
|
|
|
34
34
|
metadata: {
|
|
35
35
|
expandableRows: !!props.expandableRows,
|
|
36
36
|
progressiveLoading: !!props.getLoadingStatus,
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
hasSkeleton: !!props.skeleton,
|
|
38
|
+
skeletonTotalRows: (_e = (_d = props.skeleton) === null || _d === void 0 ? void 0 : _d.totalRows) !== null && _e !== void 0 ? _e : null,
|
|
39
|
+
groupSelection: !!((_f = props.expandableRows) === null || _f === void 0 ? void 0 : _f.groupSelection),
|
|
40
|
+
columnGroups: !!((_g = props.groupDefinitions) === null || _g === void 0 ? void 0 : _g.length),
|
|
39
41
|
columnGroupsDepth: getColumnGroupsDepth(props.columnDisplay),
|
|
40
42
|
cellCounters: props.columnDefinitions.filter(dev => !!dev.counter).length,
|
|
41
43
|
loaderCounters: !!props.renderLoaderCounter,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/table/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YAAY,CAAC;AACb,OAAO,KAAK,MAAM,OAAO,CAAC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,CAAC,UAAU,CAAC,iBAAiB,GAAG,GAAG,KAAK,CAAC,iBAAiB,IAAI,KAAK,EAAE,CAAC;IAClG,CAAC;IAED,MAAM,UAAU,GAA2C;QACzD,KAAK;QACL,aAAa;QACb,OAAO;QACP,cAAc;QACd,UAAU;QACV,iBAAiB;QACjB,GAAG,KAAK;QACR,GAAG,kBAAkB;QACrB,GAAG;QACH,GAAG,6BAA6B,CAAC,EAAE,SAAS,EAAE,0BAA0B,EAAE,CAAC;KAC5E,CAAC;IAEF,MAAM,6BAA6B,GAAG;QACpC,mBAAmB,EAAE,cAAc;QACnC,mBAAmB,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW;QACxC,qBAAqB,EAAE,gBAAgB;QACvC,qBAAqB,EAAE,gBAAgB;KACxC,CAAC;IAEF,IAAI,OAAO,KAAK,YAAY,IAAI,OAAO,KAAK,UAAU,EAAE,CAAC;QACvD,OAAO,CACL,oBAAC,6BAA6B,CAAC,QAAQ,IAAC,KAAK,EAAE,6BAA6B;YAC1E,oBAAC,aAAa,OAAK,UAAU,GAAI,CACM,CAC1C,CAAC;IACJ,CAAC;IAED,OAAO,CACL,oBAAC,6BAA6B,CAAC,QAAQ,IAAC,KAAK,EAAE,6BAA6B;QAC1E,oBAAC,sBAAsB;YACrB,oBAAC,sBAAsB,OAAK,UAAU,GAAI,CACnB,CACc,CAC1C,CAAC;AACJ,CAAC,CACqB,CAAC;AAEzB,gBAAgB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AACjC,eAAe,KAAK,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n'use client';\nimport React from 'react';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { AnalyticsFunnelSubStep } from '../internal/analytics/components/analytics-funnel';\nimport { BasePropsWithAnalyticsMetadata, getAnalyticsMetadataProps } from '../internal/base-component';\nimport { CollectionPreferencesMetadata } from '../internal/context/collection-preferences-metadata-context';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { GeneratedAnalyticsMetadataTableComponent } from './analytics-metadata/interfaces';\nimport { getColumnGroupsDepth } from './column-groups/utils';\nimport { getSortingColumnId } from './header-cell/utils';\nimport { TableForwardRefType, TableProps } from './interfaces';\nimport InternalTable, { InternalTableAsSubstep } from './internal';\n\nexport { TableProps };\nconst Table = React.forwardRef(\n <T,>(\n {\n items = [],\n selectedItems = [],\n variant = 'container',\n contentDensity = 'comfortable',\n cellVerticalAlign = 'middle',\n firstIndex = 1,\n ...props\n }: TableProps<T>,\n ref: React.Ref<TableProps.Ref>\n ) => {\n const analyticsMetadata = getAnalyticsMetadataProps(props as BasePropsWithAnalyticsMetadata);\n const hasHiddenColumns =\n (props.visibleColumns && props.visibleColumns.length < props.columnDefinitions.length) ||\n props.columnDisplay?.some(col => col.type !== 'group' && !col.visible);\n const hasStickyColumns = !!props.stickyColumns?.first || !!props.stickyColumns?.last;\n const baseComponentProps = useBaseComponent(\n 'Table',\n {\n props: {\n contentDensity,\n resizableColumns: props.resizableColumns,\n selectionType: props.selectionType,\n stickyHeader: props.stickyHeader,\n stripedRows: props.stripedRows,\n variant,\n wrapLines: props.wrapLines,\n enableKeyboardNavigation: props.enableKeyboardNavigation,\n totalItemsCount: props.totalItemsCount,\n flowType: analyticsMetadata.flowType,\n cellVerticalAlign,\n },\n metadata: {\n expandableRows: !!props.expandableRows,\n progressiveLoading: !!props.getLoadingStatus,\n groupSelection: !!props.expandableRows?.groupSelection,\n columnGroups: !!props.groupDefinitions?.length,\n columnGroupsDepth: getColumnGroupsDepth(props.columnDisplay),\n cellCounters: props.columnDefinitions.filter(dev => !!dev.counter).length,\n loaderCounters: !!props.renderLoaderCounter,\n inlineEdit: props.columnDefinitions.some(def => !!def.editConfig),\n disabledInlineEdit: props.columnDefinitions.some(def => !!def.editConfig?.disabledReason),\n hasSortableColumns: props.columnDefinitions.some(def => def.sortingField || def.sortingComparator),\n hasHiddenColumns,\n hasStickyColumns,\n hasFilterSlot: !!props.filter,\n hasPaginationSlot: !!props.pagination,\n itemsCount: items.length,\n hasInstanceIdentifier: Boolean(analyticsMetadata?.instanceIdentifier),\n hasResourceType: Boolean(analyticsMetadata?.resourceType),\n usesVisibleColumns: !!props.visibleColumns,\n usesColumnDisplay: !!props.columnDisplay,\n usesColumnDefinitionsVerticalAlign: props.columnDefinitions.some(\n def => def.verticalAlign !== cellVerticalAlign\n ),\n },\n },\n analyticsMetadata\n );\n\n const analyticsComponentMetadata: GeneratedAnalyticsMetadataTableComponent = {\n name: 'awsui.Table',\n label: { root: 'self' },\n properties: {\n selectionType: props.selectionType || 'none',\n itemsCount: `${items.length}`,\n selectedItemsCount: `${selectedItems.length}`,\n variant,\n },\n };\n\n const sortingColumnId = getSortingColumnId(props.columnDefinitions, props.sortingColumn);\n if (sortingColumnId) {\n analyticsComponentMetadata.properties.sortingColumnId = sortingColumnId;\n analyticsComponentMetadata.properties.sortingDescending = `${props.sortingDescending || false}`;\n }\n\n const tableProps: Parameters<typeof InternalTable<T>>[0] = {\n items,\n selectedItems,\n variant,\n contentDensity,\n firstIndex,\n cellVerticalAlign,\n ...props,\n ...baseComponentProps,\n ref,\n ...getAnalyticsMetadataAttribute({ component: analyticsComponentMetadata }),\n };\n\n const collectionPreferencesMetadata = {\n tableContentDensity: contentDensity,\n tableHasStripedRows: !!props.stripedRows,\n tableHasHiddenColumns: hasHiddenColumns,\n tableHasStickyColumns: hasStickyColumns,\n };\n\n if (variant === 'borderless' || variant === 'embedded') {\n return (\n <CollectionPreferencesMetadata.Provider value={collectionPreferencesMetadata}>\n <InternalTable {...tableProps} />\n </CollectionPreferencesMetadata.Provider>\n );\n }\n\n return (\n <CollectionPreferencesMetadata.Provider value={collectionPreferencesMetadata}>\n <AnalyticsFunnelSubStep>\n <InternalTableAsSubstep {...tableProps} />\n </AnalyticsFunnelSubStep>\n </CollectionPreferencesMetadata.Provider>\n );\n }\n) as TableForwardRefType;\n\napplyDisplayName(Table, 'Table');\nexport default Table;\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/table/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YAAY,CAAC;AACb,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,EAAE,sBAAsB,EAAE,MAAM,mDAAmD,CAAC;AAC3F,OAAO,EAAkC,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvG,OAAO,EAAE,6BAA6B,EAAE,MAAM,6DAA6D,CAAC;AAC5G,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAExE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,aAAa,EAAE,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAGnE,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAC5B,CACE,EACE,KAAK,GAAG,EAAE,EACV,aAAa,GAAG,EAAE,EAClB,OAAO,GAAG,WAAW,EACrB,cAAc,GAAG,aAAa,EAC9B,iBAAiB,GAAG,QAAQ,EAC5B,UAAU,GAAG,CAAC,EACd,GAAG,KAAK,EACM,EAChB,GAA8B,EAC9B,EAAE;;IACF,MAAM,iBAAiB,GAAG,yBAAyB,CAAC,KAAuC,CAAC,CAAC;IAC7F,MAAM,gBAAgB,GACpB,CAAC,KAAK,CAAC,cAAc,IAAI,KAAK,CAAC,cAAc,CAAC,MAAM,GAAG,KAAK,CAAC,iBAAiB,CAAC,MAAM,CAAC;SACtF,MAAA,KAAK,CAAC,aAAa,0CAAE,IAAI,CAAC,GAAG,CAAC,EAAE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CACqB,CAAC;AAEzB,gBAAgB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AACjC,eAAe,KAAK,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n'use client';\nimport React from 'react';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { AnalyticsFunnelSubStep } from '../internal/analytics/components/analytics-funnel';\nimport { BasePropsWithAnalyticsMetadata, getAnalyticsMetadataProps } from '../internal/base-component';\nimport { CollectionPreferencesMetadata } from '../internal/context/collection-preferences-metadata-context';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { GeneratedAnalyticsMetadataTableComponent } from './analytics-metadata/interfaces';\nimport { getColumnGroupsDepth } from './column-groups/utils';\nimport { getSortingColumnId } from './header-cell/utils';\nimport { TableForwardRefType, TableProps } from './interfaces';\nimport InternalTable, { InternalTableAsSubstep } from './internal';\n\nexport { TableProps };\nconst Table = React.forwardRef(\n <T,>(\n {\n items = [],\n selectedItems = [],\n variant = 'container',\n contentDensity = 'comfortable',\n cellVerticalAlign = 'middle',\n firstIndex = 1,\n ...props\n }: TableProps<T>,\n ref: React.Ref<TableProps.Ref>\n ) => {\n const analyticsMetadata = getAnalyticsMetadataProps(props as BasePropsWithAnalyticsMetadata);\n const hasHiddenColumns =\n (props.visibleColumns && props.visibleColumns.length < props.columnDefinitions.length) ||\n props.columnDisplay?.some(col => col.type !== 'group' && !col.visible);\n const hasStickyColumns = !!props.stickyColumns?.first || !!props.stickyColumns?.last;\n const baseComponentProps = useBaseComponent(\n 'Table',\n {\n props: {\n contentDensity,\n resizableColumns: props.resizableColumns,\n selectionType: props.selectionType,\n stickyHeader: props.stickyHeader,\n stripedRows: props.stripedRows,\n variant,\n wrapLines: props.wrapLines,\n enableKeyboardNavigation: props.enableKeyboardNavigation,\n totalItemsCount: props.totalItemsCount,\n flowType: analyticsMetadata.flowType,\n cellVerticalAlign,\n },\n metadata: {\n expandableRows: !!props.expandableRows,\n progressiveLoading: !!props.getLoadingStatus,\n hasSkeleton: !!props.skeleton,\n skeletonTotalRows: props.skeleton?.totalRows ?? null,\n groupSelection: !!props.expandableRows?.groupSelection,\n columnGroups: !!props.groupDefinitions?.length,\n columnGroupsDepth: getColumnGroupsDepth(props.columnDisplay),\n cellCounters: props.columnDefinitions.filter(dev => !!dev.counter).length,\n loaderCounters: !!props.renderLoaderCounter,\n inlineEdit: props.columnDefinitions.some(def => !!def.editConfig),\n disabledInlineEdit: props.columnDefinitions.some(def => !!def.editConfig?.disabledReason),\n hasSortableColumns: props.columnDefinitions.some(def => def.sortingField || def.sortingComparator),\n hasHiddenColumns,\n hasStickyColumns,\n hasFilterSlot: !!props.filter,\n hasPaginationSlot: !!props.pagination,\n itemsCount: items.length,\n hasInstanceIdentifier: Boolean(analyticsMetadata?.instanceIdentifier),\n hasResourceType: Boolean(analyticsMetadata?.resourceType),\n usesVisibleColumns: !!props.visibleColumns,\n usesColumnDisplay: !!props.columnDisplay,\n usesColumnDefinitionsVerticalAlign: props.columnDefinitions.some(\n def => def.verticalAlign !== cellVerticalAlign\n ),\n },\n },\n analyticsMetadata\n );\n\n const analyticsComponentMetadata: GeneratedAnalyticsMetadataTableComponent = {\n name: 'awsui.Table',\n label: { root: 'self' },\n properties: {\n selectionType: props.selectionType || 'none',\n itemsCount: `${items.length}`,\n selectedItemsCount: `${selectedItems.length}`,\n variant,\n },\n };\n\n const sortingColumnId = getSortingColumnId(props.columnDefinitions, props.sortingColumn);\n if (sortingColumnId) {\n analyticsComponentMetadata.properties.sortingColumnId = sortingColumnId;\n analyticsComponentMetadata.properties.sortingDescending = `${props.sortingDescending || false}`;\n }\n\n const tableProps: Parameters<typeof InternalTable<T>>[0] = {\n items,\n selectedItems,\n variant,\n contentDensity,\n firstIndex,\n cellVerticalAlign,\n ...props,\n ...baseComponentProps,\n ref,\n ...getAnalyticsMetadataAttribute({ component: analyticsComponentMetadata }),\n };\n\n const collectionPreferencesMetadata = {\n tableContentDensity: contentDensity,\n tableHasStripedRows: !!props.stripedRows,\n tableHasHiddenColumns: hasHiddenColumns,\n tableHasStickyColumns: hasStickyColumns,\n };\n\n if (variant === 'borderless' || variant === 'embedded') {\n return (\n <CollectionPreferencesMetadata.Provider value={collectionPreferencesMetadata}>\n <InternalTable {...tableProps} />\n </CollectionPreferencesMetadata.Provider>\n );\n }\n\n return (\n <CollectionPreferencesMetadata.Provider value={collectionPreferencesMetadata}>\n <AnalyticsFunnelSubStep>\n <InternalTableAsSubstep {...tableProps} />\n </AnalyticsFunnelSubStep>\n </CollectionPreferencesMetadata.Provider>\n );\n }\n) as TableForwardRefType;\n\napplyDisplayName(Table, 'Table');\nexport default Table;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thead.d.ts","sourceRoot":"","sources":["../../../src/table/thead.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"thead.d.ts","sourceRoot":"","sources":["../../../src/table/thead.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAMtC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAG3D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAgB,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAE/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAA8B,SAAS,EAAE,MAAM,cAAc,CAAC;AAMrE,MAAM,WAAW,UAAU;IACzB,aAAa,EAAE,SAAS,GAAG,qBAAqB,CAAC;IACjD,iBAAiB,EAAE,aAAa,CAAC,UAAU,CAAC,gBAAgB,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M,CAAC;IAC1B,iBAAiB,EAAE,WAAW,CAAC;IAC/B,gBAAgB,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACjC,wBAAwB,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,GAAG,MAAM,KAAK,IAAI,CAAC;IAC5D,SAAS,EAAE,SAAS,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3C;AAED,QAAA,MAAM,KAAK,wFAkYV,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import React from 'react';
|
|
3
|
+
import React, { useRef } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { findUpUntil } from '@cloudscape-design/component-toolkit/dom';
|
|
6
6
|
import { fireNonCancelableEvent } from '../internal/events';
|
|
@@ -15,6 +15,10 @@ import { getColumnKey } from './utils';
|
|
|
15
15
|
import styles from './styles.css.js';
|
|
16
16
|
const Thead = React.forwardRef(({ selectionType, getSelectAllProps, columnDefinitions, columnGroupsLayout, sortingColumn, sortingDisabled, sortingDescending, resizableColumns, variant, tableVariant, wrapLines, onFocusMove, onSortingChange, onResizeFinish, singleSelectionHeaderAriaLabel, stripedRows, sticky = false, hidden = false, stuck = false, stickyState, stickyColumnsFirst, stickyColumnsLast, selectionColumnId, focusedComponent, onFocusedComponentChange, tableRole, resizerRoleDescription, resizerTooltipText, isExpandable, setLastUserAction, }, outerRef) => {
|
|
17
17
|
const { getColumnStyles, columnWidths, updateColumn, updateGroup, setCell } = useColumnWidths();
|
|
18
|
+
// This guarantees the width reported via `onColumnWidthsChange` matches the final rendered width instead of a stale one.
|
|
19
|
+
// Without this, resetting/remounting a table right after a resize can restore an outdated width.
|
|
20
|
+
const columnWidthsRef = useRef(columnWidths);
|
|
21
|
+
columnWidthsRef.current = columnWidths;
|
|
18
22
|
const handleSplitGroupResize = (columnIds, newWidth) => {
|
|
19
23
|
const lastColumn = columnIds[columnIds.length - 1];
|
|
20
24
|
if (lastColumn) {
|
|
@@ -51,7 +55,7 @@ const Thead = React.forwardRef(({ selectionType, getSelectAllProps, columnDefini
|
|
|
51
55
|
selectionType ? (React.createElement(TableHeaderSelectionCell, { ...commonCellProps, focusedComponent: focusedComponent, columnId: selectionColumnId, cellRef: node => setCell(sticky, selectionColumnId, node), getSelectAllProps: getSelectAllProps, onFocusMove: onFocusMove, singleSelectionHeaderAriaLabel: singleSelectionHeaderAriaLabel })) : null,
|
|
52
56
|
columnDefinitions.map((column, colIndex) => {
|
|
53
57
|
const columnId = getColumnKey(column, colIndex);
|
|
54
|
-
return (React.createElement(TableHeaderCell, { ...commonCellProps, key: columnId, tabIndex: sticky ? -1 : 0, focusedComponent: focusedComponent, column: column, activeSortingColumn: sortingColumn, sortingDescending: sortingDescending, sortingDisabled: sortingDisabled, wrapLines: wrapLines, colIndex: selectionType ? colIndex + 1 : colIndex, columnId: columnId, updateColumn: updateColumn, onResizeFinish: () => onResizeFinish(
|
|
58
|
+
return (React.createElement(TableHeaderCell, { ...commonCellProps, key: columnId, tabIndex: sticky ? -1 : 0, focusedComponent: focusedComponent, column: column, activeSortingColumn: sortingColumn, sortingDescending: sortingDescending, sortingDisabled: sortingDisabled, wrapLines: wrapLines, colIndex: selectionType ? colIndex + 1 : colIndex, columnId: columnId, updateColumn: updateColumn, onResizeFinish: () => onResizeFinish(columnWidthsRef.current), resizableColumns: resizableColumns, resizableStyle: getColumnStyles(sticky, columnId), onClick: detail => {
|
|
55
59
|
setLastUserAction('sorting');
|
|
56
60
|
fireNonCancelableEvent(onSortingChange, detail);
|
|
57
61
|
}, isEditable: !!column.editConfig, cellRef: node => setCell(sticky, columnId, node), tableRole: tableRole, resizerRoleDescription: resizerRoleDescription, resizerTooltipText: resizerTooltipText, isExpandable: colIndex === 0 && isExpandable, hasDynamicContent: hidden && !resizableColumns && column.hasDynamicContent, isLast: colIndex === columnDefinitions.length - 1 }));
|
|
@@ -95,7 +99,7 @@ const Thead = React.forwardRef(({ selectionType, getSelectAllProps, columnDefini
|
|
|
95
99
|
group: groupDefinition,
|
|
96
100
|
rowspan: col.rowSpan,
|
|
97
101
|
resizableColumns,
|
|
98
|
-
onResizeFinish: () => onResizeFinish(
|
|
102
|
+
onResizeFinish: () => onResizeFinish(columnWidthsRef.current),
|
|
99
103
|
columnGroupId: col.parentGroupIds.length > 0 ? col.parentGroupIds[col.parentGroupIds.length - 1] : undefined,
|
|
100
104
|
};
|
|
101
105
|
const splitFirst = getGroupSplit({
|
|
@@ -160,7 +164,7 @@ const Thead = React.forwardRef(({ selectionType, getSelectAllProps, columnDefini
|
|
|
160
164
|
const column = col.columnDefinition;
|
|
161
165
|
const columnId = col.id;
|
|
162
166
|
const colIndex = col.colIndex;
|
|
163
|
-
return (React.createElement(TableHeaderCell, { ...commonCellProps, key: columnId, tabIndex: sticky ? -1 : 0, focusedComponent: focusedComponent, column: column, activeSortingColumn: sortingColumn, sortingDescending: sortingDescending, sortingDisabled: sortingDisabled, wrapLines: wrapLines, colIndex: selectionType ? colIndex + 1 : colIndex, columnId: columnId, updateColumn: updateColumn, onResizeFinish: () => onResizeFinish(
|
|
167
|
+
return (React.createElement(TableHeaderCell, { ...commonCellProps, key: columnId, tabIndex: sticky ? -1 : 0, focusedComponent: focusedComponent, column: column, activeSortingColumn: sortingColumn, sortingDescending: sortingDescending, sortingDisabled: sortingDisabled, wrapLines: wrapLines, colIndex: selectionType ? colIndex + 1 : colIndex, columnId: columnId, updateColumn: updateColumn, onResizeFinish: () => onResizeFinish(columnWidthsRef.current), resizableColumns: resizableColumns, resizableStyle: getColumnStyles(sticky, columnId), onClick: detail => {
|
|
164
168
|
setLastUserAction('sorting');
|
|
165
169
|
fireNonCancelableEvent(onSortingChange, detail);
|
|
166
170
|
}, isEditable: !!column.editConfig, cellRef: node => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thead.js","sourceRoot":"","sources":["../../../src/table/thead.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAEvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE/E,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAGvE,OAAO,EAAE,YAAY,EAAsB,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,EAAE,0BAA0B,EAAa,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAoCrC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAC5B,CACE,EACE,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,OAAO,EACP,YAAY,EACZ,SAAS,EACT,WAAW,EACX,eAAe,EACf,cAAc,EACd,8BAA8B,EAC9B,WAAW,EACX,MAAM,GAAG,KAAK,EACd,MAAM,GAAG,KAAK,EACd,KAAK,GAAG,KAAK,EACb,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,wBAAwB,EACxB,SAAS,EACT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AAC,EAAE;wBACd,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;oBAClC,CAAC,EACD,SAAS,EAAE,SAAS,EACpB,sBAAsB,EAAE,sBAAsB,EAC9C,kBAAkB,EAAE,kBAAkB,EACtC,YAAY,EAAE,QAAQ,KAAK,CAAC,IAAI,YAAY,EAC5C,iBAAiB,EAAE,MAAM,IAAI,CAAC,gBAAgB,IAAI,MAAM,CAAC,iBAAiB,EAC1E,OAAO,EAAE,GAAG,CAAC,OAAO,EACpB,OAAO,EAAE,GAAG,CAAC,OAAO,EACpB,kBAAkB,EAAE,kBAAkB,EACtC,MAAM,EAAE,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,OAAO,KAAK,YAAY,EACnD,aAAa,EACX,GAAG,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,GAE/F,CACH,CAAC;YACJ,CAAC;QACH,CAAC,CAAC,CACC,CACN,CAAC,CACI,CACT,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,KAAK,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { findUpUntil } from '@cloudscape-design/component-toolkit/dom';\n\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { NonCancelableEventHandler } from '../types/events';\nimport { getGroupColumnIds, getGroupSplit } from './column-groups/split-utils';\nimport { ColumnGroupsLayout } from './column-groups/utils';\nimport { TableHeaderCell } from './header-cell';\nimport { TableGroupHeaderCell } from './header-cell/group-header-cell';\nimport { TableProps } from './interfaces';\nimport { InternalSelectionType } from './internal-interfaces';\nimport { focusMarkers, ItemSelectionProps } from './selection';\nimport { TableHeaderSelectionCell } from './selection/selection-cell';\nimport { StickyColumnsModel } from './sticky-columns';\nimport { getTableHeaderRowRoleProps, TableRole } from './table-role';\nimport { DEFAULT_COLUMN_WIDTH, useColumnWidths } from './use-column-widths';\nimport { getColumnKey } from './utils';\n\nimport styles from './styles.css.js';\n\nexport interface TheadProps {\n selectionType: undefined | InternalSelectionType;\n columnDefinitions: ReadonlyArray<TableProps.ColumnDefinition<any>>;\n groupDefinitions?: ReadonlyArray<TableProps.GroupDefinition>;\n columnGroupsLayout?: ColumnGroupsLayout<any>;\n sortingColumn: TableProps.SortingColumn<any> | undefined;\n sortingDescending: boolean | undefined;\n sortingDisabled: boolean | undefined;\n variant: TableProps.Variant;\n tableVariant?: TableProps.Variant;\n wrapLines: boolean | undefined;\n resizableColumns: boolean | undefined;\n getSelectAllProps?: () => ItemSelectionProps;\n onFocusMove: ((sourceElement: HTMLElement, fromIndex: number, direction: -1 | 1) => void) | undefined;\n onResizeFinish: (newWidths: Map<PropertyKey, number>) => void;\n onSortingChange: NonCancelableEventHandler<TableProps.SortingState<any>> | undefined;\n sticky?: boolean;\n hidden?: boolean;\n stuck?: boolean;\n singleSelectionHeaderAriaLabel?: string;\n resizerRoleDescription?: string;\n resizerTooltipText?: string;\n stripedRows?: boolean;\n stickyState: StickyColumnsModel;\n stickyColumnsFirst: number;\n stickyColumnsLast: number;\n selectionColumnId: PropertyKey;\n focusedComponent?: null | string;\n onFocusedComponentChange?: (focusId: null | string) => void;\n tableRole: TableRole;\n isExpandable?: boolean;\n setLastUserAction: (name: string) => void;\n}\n\nconst Thead = React.forwardRef(\n (\n {\n selectionType,\n getSelectAllProps,\n columnDefinitions,\n columnGroupsLayout,\n sortingColumn,\n sortingDisabled,\n sortingDescending,\n resizableColumns,\n variant,\n tableVariant,\n wrapLines,\n onFocusMove,\n onSortingChange,\n onResizeFinish,\n singleSelectionHeaderAriaLabel,\n stripedRows,\n sticky = false,\n hidden = false,\n stuck = false,\n stickyState,\n stickyColumnsFirst,\n stickyColumnsLast,\n selectionColumnId,\n focusedComponent,\n onFocusedComponentChange,\n tableRole,\n resizerRoleDescription,\n resizerTooltipText,\n isExpandable,\n setLastUserAction,\n }: TheadProps,\n outerRef: React.Ref<HTMLTableRowElement>\n ) => {\n const { getColumnStyles, columnWidths, updateColumn, updateGroup, setCell } = useColumnWidths();\n\n const handleSplitGroupResize = (columnIds: string[], newWidth: number) => {\n const lastColumn = columnIds[columnIds.length - 1];\n if (lastColumn) {\n const currentGroupWidth = columnIds.reduce(\n (sum, id) => sum + (columnWidths.get(id) || DEFAULT_COLUMN_WIDTH),\n 0\n );\n const delta = newWidth - currentGroupWidth;\n const currentColumnWidth = columnWidths.get(lastColumn) || DEFAULT_COLUMN_WIDTH;\n updateColumn(lastColumn, currentColumnWidth + delta);\n }\n };\n\n const commonCellProps = {\n stuck,\n sticky,\n hidden,\n stripedRows,\n tableRole,\n variant,\n tableVariant,\n stickyState,\n wrapLines,\n };\n\n const sharedTrProps = {\n onFocus: (event: React.FocusEvent) => {\n const focusControlElement = findUpUntil(\n event.target as HTMLElement,\n element => !!element.getAttribute('data-focus-id')\n );\n const focusId = focusControlElement?.getAttribute('data-focus-id') ?? null;\n onFocusedComponentChange?.(focusId);\n },\n onBlur: () => onFocusedComponentChange?.(null),\n };\n\n // No grouping - render single row\n if (!columnGroupsLayout || columnGroupsLayout.rows.length <= 1) {\n return (\n <thead className={clsx(!hidden && styles['thead-active'])}>\n <tr\n {...focusMarkers.all}\n ref={outerRef}\n aria-rowindex={1}\n {...getTableHeaderRowRoleProps({ tableRole })}\n {...sharedTrProps}\n >\n {selectionType ? (\n <TableHeaderSelectionCell\n {...commonCellProps}\n focusedComponent={focusedComponent}\n columnId={selectionColumnId}\n cellRef={node => setCell(sticky, selectionColumnId, node)}\n getSelectAllProps={getSelectAllProps}\n onFocusMove={onFocusMove}\n singleSelectionHeaderAriaLabel={singleSelectionHeaderAriaLabel}\n />\n ) : null}\n\n {columnDefinitions.map((column, colIndex) => {\n const columnId = getColumnKey(column, colIndex);\n return (\n <TableHeaderCell\n {...commonCellProps}\n key={columnId}\n tabIndex={sticky ? -1 : 0}\n focusedComponent={focusedComponent}\n column={column}\n activeSortingColumn={sortingColumn}\n sortingDescending={sortingDescending}\n sortingDisabled={sortingDisabled}\n wrapLines={wrapLines}\n colIndex={selectionType ? colIndex + 1 : colIndex}\n columnId={columnId}\n updateColumn={updateColumn}\n onResizeFinish={() => onResizeFinish(columnWidths)}\n resizableColumns={resizableColumns}\n resizableStyle={getColumnStyles(sticky, columnId)}\n onClick={detail => {\n setLastUserAction('sorting');\n fireNonCancelableEvent(onSortingChange, detail);\n }}\n isEditable={!!column.editConfig}\n cellRef={node => setCell(sticky, columnId, node)}\n tableRole={tableRole}\n resizerRoleDescription={resizerRoleDescription}\n resizerTooltipText={resizerTooltipText}\n isExpandable={colIndex === 0 && isExpandable}\n hasDynamicContent={hidden && !resizableColumns && column.hasDynamicContent}\n isLast={colIndex === columnDefinitions.length - 1}\n />\n );\n })}\n </tr>\n </thead>\n );\n }\n\n // Grouped columns\n const totalColumns = columnDefinitions.length;\n return (\n <thead className={clsx(!hidden && styles['thead-active'])}>\n {columnGroupsLayout.rows.map((row, rowIndex) => (\n <tr\n key={rowIndex}\n {...(rowIndex === 0 ? focusMarkers.all : {})}\n ref={rowIndex === 0 ? outerRef : undefined}\n aria-rowindex={rowIndex + 1}\n data-group-level={rowIndex}\n {...getTableHeaderRowRoleProps({ tableRole, rowIndex })}\n {...sharedTrProps}\n >\n {/* Selection column — render once in the first row with rowSpan covering all header rows */}\n {selectionType && rowIndex === 0 ? (\n <TableHeaderSelectionCell\n {...commonCellProps}\n focusedComponent={focusedComponent}\n columnId={selectionColumnId}\n cellRef={node => setCell(sticky, selectionColumnId, node)}\n getSelectAllProps={getSelectAllProps}\n onFocusMove={onFocusMove}\n singleSelectionHeaderAriaLabel={singleSelectionHeaderAriaLabel}\n rowSpan={columnGroupsLayout.rows.length}\n isGrouped={true}\n />\n ) : null}\n\n {row.columns.map((col, colIndexInRow) => {\n // A cell is the last child of its parent group when the next rendered cell\n // in the same row belongs to a different top-level parent, i.e. they don't\n // share the same immediate parent group.\n const nextCol = row.columns[colIndexInRow + 1];\n const thisParent = col.parentGroupIds[col.parentGroupIds.length - 1] ?? null;\n const nextParent = nextCol ? (nextCol.parentGroupIds[nextCol.parentGroupIds.length - 1] ?? null) : null;\n // A column is also considered last-child-of-group when the sticky boundary\n // bisects its parent group just after this column — visually it's the rightmost\n // column of the sticky half, so its resizer should span full-height like a\n // normal last-child-of-group.\n const isColumnAtStickyFirstBoundary =\n !col.isGroup &&\n thisParent !== null &&\n stickyColumnsFirst > 0 &&\n col.colIndex === stickyColumnsFirst - 1;\n const isColumnAtStickyLastBoundary =\n !col.isGroup &&\n thisParent !== null &&\n stickyColumnsLast > 0 &&\n col.colIndex === columnDefinitions.length - stickyColumnsLast - 1;\n const isLastChildOfGroup =\n (thisParent !== null && thisParent !== nextParent) ||\n isColumnAtStickyFirstBoundary ||\n isColumnAtStickyLastBoundary;\n\n if (col.isGroup) {\n // Group header cell\n const groupDefinition = col.groupDefinition!;\n const childIds = getGroupColumnIds(columnGroupsLayout!, col.id);\n const sharedGroupCellProps = {\n ...commonCellProps,\n tabIndex: sticky ? -1 : 0,\n focusedComponent,\n group: groupDefinition,\n rowspan: col.rowSpan,\n resizableColumns,\n onResizeFinish: () => onResizeFinish(columnWidths),\n columnGroupId:\n col.parentGroupIds.length > 0 ? col.parentGroupIds[col.parentGroupIds.length - 1] : undefined,\n };\n const splitFirst = getGroupSplit({\n col,\n stickyCount: stickyColumnsFirst,\n side: 'first',\n totalColumns,\n });\n const splitLast = getGroupSplit({\n col,\n stickyCount: stickyColumnsLast,\n side: 'last',\n totalColumns,\n });\n const split = splitFirst.stickyColspan > 0 ? splitFirst : splitLast;\n const isSplit = split.stickyColspan > 0;\n\n if (isSplit) {\n // Group is bisected by the sticky boundary — render two <th> elements.\n // Both halves get resizers. Each resizes its own rightmost column child.\n const isSplitFirst = splitFirst.stickyColspan > 0;\n\n // Left half is sticky for 'first', non-sticky for 'last'\n const leftColspan = isSplitFirst ? split.stickyColspan : split.staticColspan;\n const leftColIndex = col.colIndex;\n const leftGroupId = isSplitFirst ? col.id : `${col.id}__split`;\n const leftChildIds = childIds.slice(0, leftColspan);\n\n // Right half is non-sticky for 'first', sticky for 'last'\n const rightColspan = isSplitFirst ? split.staticColspan : split.stickyColspan;\n const rightColIndex = col.colIndex + leftColspan;\n const rightGroupId = isSplitFirst ? `${col.id}__split` : col.id;\n const rightChildIds = childIds.slice(leftColspan);\n\n return (\n <React.Fragment key={col.id}>\n {/* Left half */}\n <TableGroupHeaderCell\n {...sharedGroupCellProps}\n colspan={leftColspan}\n colIndex={selectionType ? leftColIndex + 1 : leftColIndex}\n groupId={leftGroupId}\n resizableStyle={undefined}\n updateGroupWidth={(_, newWidth) => {\n handleSplitGroupResize(leftChildIds, newWidth);\n }}\n childColumnIds={leftChildIds}\n firstChildColumnId={leftChildIds[0]}\n lastChildColumnId={leftChildIds[leftChildIds.length - 1]}\n cellRef={isSplitFirst ? node => setCell(sticky, col.id, node) : () => {}}\n isLast={false}\n stickyColumnId={isSplitFirst ? childIds[0] : undefined}\n stickyBoundaryColumnId={isSplitFirst ? leftChildIds[leftChildIds.length - 1] : undefined}\n />\n\n {/* Right half */}\n <TableGroupHeaderCell\n {...sharedGroupCellProps}\n colspan={rightColspan}\n colIndex={selectionType ? rightColIndex + 1 : rightColIndex}\n groupId={rightGroupId}\n resizableStyle={getColumnStyles(sticky, col.id)}\n updateGroupWidth={(_, newWidth) => {\n handleSplitGroupResize(rightChildIds, newWidth);\n }}\n childColumnIds={rightChildIds}\n firstChildColumnId={rightChildIds[0]}\n lastChildColumnId={rightChildIds[rightChildIds.length - 1]}\n cellRef={!isSplitFirst ? node => setCell(sticky, col.id, node) : () => {}}\n resizerRoleDescription={resizerRoleDescription}\n resizerTooltipText={resizerTooltipText}\n isLast={rightColIndex + rightColspan === totalColumns}\n stickyColumnId={!isSplitFirst ? childIds[childIds.length - 1] : undefined}\n stickyBoundaryColumnId={!isSplitFirst ? rightChildIds[0] : undefined}\n />\n </React.Fragment>\n );\n }\n\n // Determine if the entire group is sticky (all children on one side)\n const isFullyStickyFirst =\n stickyColumnsFirst > 0 && col.colIndex + col.colSpan - 1 < stickyColumnsFirst;\n const isFullyStickyLast =\n stickyColumnsLast > 0 && col.colIndex >= columnDefinitions.length - stickyColumnsLast;\n const fullyStickyColumnId = isFullyStickyFirst\n ? childIds[0]\n : isFullyStickyLast\n ? childIds[childIds.length - 1]\n : undefined;\n\n // When the group's last child is the sticky-first boundary, the group\n // needs the shadow from that child (but offset from the first child).\n const isAtStickyFirstBoundary =\n isFullyStickyFirst && col.colIndex + col.colSpan - 1 === stickyColumnsFirst - 1;\n const isAtStickyLastBoundary =\n isFullyStickyLast && col.colIndex === columnDefinitions.length - stickyColumnsLast;\n const fullyStickyBoundaryColumnId = isAtStickyFirstBoundary\n ? childIds[childIds.length - 1]\n : isAtStickyLastBoundary\n ? childIds[0]\n : undefined;\n\n return (\n <TableGroupHeaderCell\n {...sharedGroupCellProps}\n key={col.id}\n colspan={col.colSpan}\n colIndex={selectionType ? col.colIndex + 1 : col.colIndex}\n groupId={col.id}\n resizableStyle={getColumnStyles(sticky, col.id)}\n updateGroupWidth={(groupId, newWidth) => {\n updateGroup(groupId, newWidth);\n }}\n childColumnIds={childIds}\n firstChildColumnId={childIds[0]}\n lastChildColumnId={childIds[childIds.length - 1]}\n cellRef={node => setCell(sticky, col.id, node)}\n resizerRoleDescription={resizerRoleDescription}\n resizerTooltipText={resizerTooltipText}\n isLast={col.colIndex + col.colSpan === totalColumns}\n stickyColumnId={fullyStickyColumnId}\n stickyBoundaryColumnId={fullyStickyBoundaryColumnId}\n />\n );\n } else {\n // Regular column cell\n const column = col.columnDefinition!;\n const columnId = col.id;\n const colIndex = col.colIndex;\n\n return (\n <TableHeaderCell\n {...commonCellProps}\n key={columnId}\n tabIndex={sticky ? -1 : 0}\n focusedComponent={focusedComponent}\n column={column}\n activeSortingColumn={sortingColumn}\n sortingDescending={sortingDescending}\n sortingDisabled={sortingDisabled}\n wrapLines={wrapLines}\n colIndex={selectionType ? colIndex + 1 : colIndex}\n columnId={columnId}\n updateColumn={updateColumn}\n onResizeFinish={() => onResizeFinish(columnWidths)}\n resizableColumns={resizableColumns}\n resizableStyle={getColumnStyles(sticky, columnId)}\n onClick={detail => {\n setLastUserAction('sorting');\n fireNonCancelableEvent(onSortingChange, detail);\n }}\n isEditable={!!column.editConfig}\n cellRef={node => {\n setCell(sticky, columnId, node);\n }}\n tableRole={tableRole}\n resizerRoleDescription={resizerRoleDescription}\n resizerTooltipText={resizerTooltipText}\n isExpandable={colIndex === 0 && isExpandable}\n hasDynamicContent={hidden && !resizableColumns && column.hasDynamicContent}\n colSpan={col.colSpan}\n rowSpan={col.rowSpan}\n isLastChildOfGroup={isLastChildOfGroup}\n isLast={col.colIndex + col.colSpan === totalColumns}\n columnGroupId={\n col.parentGroupIds.length > 0 ? col.parentGroupIds[col.parentGroupIds.length - 1] : undefined\n }\n />\n );\n }\n })}\n </tr>\n ))}\n </thead>\n );\n }\n);\n\nexport default Thead;\n"]}
|
|
1
|
+
{"version":3,"file":"thead.js","sourceRoot":"","sources":["../../../src/table/thead.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAEvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE/E,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAGvE,OAAO,EAAE,YAAY,EAAsB,MAAM,aAAa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,EAAE,kBAAkB,EACtC,MAAM,EAAE,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,OAAO,KAAK,YAAY,EACnD,aAAa,EACX,GAAG,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,GAE/F,CACH,CAAC;YACJ,CAAC;QACH,CAAC,CAAC,CACC,CACN,CAAC,CACI,CACT,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,KAAK,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { findUpUntil } from '@cloudscape-design/component-toolkit/dom';\n\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { NonCancelableEventHandler } from '../types/events';\nimport { getGroupColumnIds, getGroupSplit } from './column-groups/split-utils';\nimport { ColumnGroupsLayout } from './column-groups/utils';\nimport { TableHeaderCell } from './header-cell';\nimport { TableGroupHeaderCell } from './header-cell/group-header-cell';\nimport { TableProps } from './interfaces';\nimport { InternalSelectionType } from './internal-interfaces';\nimport { focusMarkers, ItemSelectionProps } from './selection';\nimport { TableHeaderSelectionCell } from './selection/selection-cell';\nimport { StickyColumnsModel } from './sticky-columns';\nimport { getTableHeaderRowRoleProps, TableRole } from './table-role';\nimport { DEFAULT_COLUMN_WIDTH, useColumnWidths } from './use-column-widths';\nimport { getColumnKey } from './utils';\n\nimport styles from './styles.css.js';\n\nexport interface TheadProps {\n selectionType: undefined | InternalSelectionType;\n columnDefinitions: ReadonlyArray<TableProps.ColumnDefinition<any>>;\n groupDefinitions?: ReadonlyArray<TableProps.GroupDefinition>;\n columnGroupsLayout?: ColumnGroupsLayout<any>;\n sortingColumn: TableProps.SortingColumn<any> | undefined;\n sortingDescending: boolean | undefined;\n sortingDisabled: boolean | undefined;\n variant: TableProps.Variant;\n tableVariant?: TableProps.Variant;\n wrapLines: boolean | undefined;\n resizableColumns: boolean | undefined;\n getSelectAllProps?: () => ItemSelectionProps;\n onFocusMove: ((sourceElement: HTMLElement, fromIndex: number, direction: -1 | 1) => void) | undefined;\n onResizeFinish: (newWidths: Map<PropertyKey, number>) => void;\n onSortingChange: NonCancelableEventHandler<TableProps.SortingState<any>> | undefined;\n sticky?: boolean;\n hidden?: boolean;\n stuck?: boolean;\n singleSelectionHeaderAriaLabel?: string;\n resizerRoleDescription?: string;\n resizerTooltipText?: string;\n stripedRows?: boolean;\n stickyState: StickyColumnsModel;\n stickyColumnsFirst: number;\n stickyColumnsLast: number;\n selectionColumnId: PropertyKey;\n focusedComponent?: null | string;\n onFocusedComponentChange?: (focusId: null | string) => void;\n tableRole: TableRole;\n isExpandable?: boolean;\n setLastUserAction: (name: string) => void;\n}\n\nconst Thead = React.forwardRef(\n (\n {\n selectionType,\n getSelectAllProps,\n columnDefinitions,\n columnGroupsLayout,\n sortingColumn,\n sortingDisabled,\n sortingDescending,\n resizableColumns,\n variant,\n tableVariant,\n wrapLines,\n onFocusMove,\n onSortingChange,\n onResizeFinish,\n singleSelectionHeaderAriaLabel,\n stripedRows,\n sticky = false,\n hidden = false,\n stuck = false,\n stickyState,\n stickyColumnsFirst,\n stickyColumnsLast,\n selectionColumnId,\n focusedComponent,\n onFocusedComponentChange,\n tableRole,\n resizerRoleDescription,\n resizerTooltipText,\n isExpandable,\n setLastUserAction,\n }: TheadProps,\n outerRef: React.Ref<HTMLTableRowElement>\n ) => {\n const { getColumnStyles, columnWidths, updateColumn, updateGroup, setCell } = useColumnWidths();\n\n // This guarantees the width reported via `onColumnWidthsChange` matches the final rendered width instead of a stale one.\n // Without this, resetting/remounting a table right after a resize can restore an outdated width.\n const columnWidthsRef = useRef(columnWidths);\n columnWidthsRef.current = columnWidths;\n\n const handleSplitGroupResize = (columnIds: string[], newWidth: number) => {\n const lastColumn = columnIds[columnIds.length - 1];\n if (lastColumn) {\n const currentGroupWidth = columnIds.reduce(\n (sum, id) => sum + (columnWidths.get(id) || DEFAULT_COLUMN_WIDTH),\n 0\n );\n const delta = newWidth - currentGroupWidth;\n const currentColumnWidth = columnWidths.get(lastColumn) || DEFAULT_COLUMN_WIDTH;\n updateColumn(lastColumn, currentColumnWidth + delta);\n }\n };\n\n const commonCellProps = {\n stuck,\n sticky,\n hidden,\n stripedRows,\n tableRole,\n variant,\n tableVariant,\n stickyState,\n wrapLines,\n };\n\n const sharedTrProps = {\n onFocus: (event: React.FocusEvent) => {\n const focusControlElement = findUpUntil(\n event.target as HTMLElement,\n element => !!element.getAttribute('data-focus-id')\n );\n const focusId = focusControlElement?.getAttribute('data-focus-id') ?? null;\n onFocusedComponentChange?.(focusId);\n },\n onBlur: () => onFocusedComponentChange?.(null),\n };\n\n // No grouping - render single row\n if (!columnGroupsLayout || columnGroupsLayout.rows.length <= 1) {\n return (\n <thead className={clsx(!hidden && styles['thead-active'])}>\n <tr\n {...focusMarkers.all}\n ref={outerRef}\n aria-rowindex={1}\n {...getTableHeaderRowRoleProps({ tableRole })}\n {...sharedTrProps}\n >\n {selectionType ? (\n <TableHeaderSelectionCell\n {...commonCellProps}\n focusedComponent={focusedComponent}\n columnId={selectionColumnId}\n cellRef={node => setCell(sticky, selectionColumnId, node)}\n getSelectAllProps={getSelectAllProps}\n onFocusMove={onFocusMove}\n singleSelectionHeaderAriaLabel={singleSelectionHeaderAriaLabel}\n />\n ) : null}\n\n {columnDefinitions.map((column, colIndex) => {\n const columnId = getColumnKey(column, colIndex);\n return (\n <TableHeaderCell\n {...commonCellProps}\n key={columnId}\n tabIndex={sticky ? -1 : 0}\n focusedComponent={focusedComponent}\n column={column}\n activeSortingColumn={sortingColumn}\n sortingDescending={sortingDescending}\n sortingDisabled={sortingDisabled}\n wrapLines={wrapLines}\n colIndex={selectionType ? colIndex + 1 : colIndex}\n columnId={columnId}\n updateColumn={updateColumn}\n onResizeFinish={() => onResizeFinish(columnWidthsRef.current)}\n resizableColumns={resizableColumns}\n resizableStyle={getColumnStyles(sticky, columnId)}\n onClick={detail => {\n setLastUserAction('sorting');\n fireNonCancelableEvent(onSortingChange, detail);\n }}\n isEditable={!!column.editConfig}\n cellRef={node => setCell(sticky, columnId, node)}\n tableRole={tableRole}\n resizerRoleDescription={resizerRoleDescription}\n resizerTooltipText={resizerTooltipText}\n isExpandable={colIndex === 0 && isExpandable}\n hasDynamicContent={hidden && !resizableColumns && column.hasDynamicContent}\n isLast={colIndex === columnDefinitions.length - 1}\n />\n );\n })}\n </tr>\n </thead>\n );\n }\n\n // Grouped columns\n const totalColumns = columnDefinitions.length;\n return (\n <thead className={clsx(!hidden && styles['thead-active'])}>\n {columnGroupsLayout.rows.map((row, rowIndex) => (\n <tr\n key={rowIndex}\n {...(rowIndex === 0 ? focusMarkers.all : {})}\n ref={rowIndex === 0 ? outerRef : undefined}\n aria-rowindex={rowIndex + 1}\n data-group-level={rowIndex}\n {...getTableHeaderRowRoleProps({ tableRole, rowIndex })}\n {...sharedTrProps}\n >\n {/* Selection column — render once in the first row with rowSpan covering all header rows */}\n {selectionType && rowIndex === 0 ? (\n <TableHeaderSelectionCell\n {...commonCellProps}\n focusedComponent={focusedComponent}\n columnId={selectionColumnId}\n cellRef={node => setCell(sticky, selectionColumnId, node)}\n getSelectAllProps={getSelectAllProps}\n onFocusMove={onFocusMove}\n singleSelectionHeaderAriaLabel={singleSelectionHeaderAriaLabel}\n rowSpan={columnGroupsLayout.rows.length}\n isGrouped={true}\n />\n ) : null}\n\n {row.columns.map((col, colIndexInRow) => {\n // A cell is the last child of its parent group when the next rendered cell\n // in the same row belongs to a different top-level parent, i.e. they don't\n // share the same immediate parent group.\n const nextCol = row.columns[colIndexInRow + 1];\n const thisParent = col.parentGroupIds[col.parentGroupIds.length - 1] ?? null;\n const nextParent = nextCol ? (nextCol.parentGroupIds[nextCol.parentGroupIds.length - 1] ?? null) : null;\n // A column is also considered last-child-of-group when the sticky boundary\n // bisects its parent group just after this column — visually it's the rightmost\n // column of the sticky half, so its resizer should span full-height like a\n // normal last-child-of-group.\n const isColumnAtStickyFirstBoundary =\n !col.isGroup &&\n thisParent !== null &&\n stickyColumnsFirst > 0 &&\n col.colIndex === stickyColumnsFirst - 1;\n const isColumnAtStickyLastBoundary =\n !col.isGroup &&\n thisParent !== null &&\n stickyColumnsLast > 0 &&\n col.colIndex === columnDefinitions.length - stickyColumnsLast - 1;\n const isLastChildOfGroup =\n (thisParent !== null && thisParent !== nextParent) ||\n isColumnAtStickyFirstBoundary ||\n isColumnAtStickyLastBoundary;\n\n if (col.isGroup) {\n // Group header cell\n const groupDefinition = col.groupDefinition!;\n const childIds = getGroupColumnIds(columnGroupsLayout!, col.id);\n const sharedGroupCellProps = {\n ...commonCellProps,\n tabIndex: sticky ? -1 : 0,\n focusedComponent,\n group: groupDefinition,\n rowspan: col.rowSpan,\n resizableColumns,\n onResizeFinish: () => onResizeFinish(columnWidthsRef.current),\n columnGroupId:\n col.parentGroupIds.length > 0 ? col.parentGroupIds[col.parentGroupIds.length - 1] : undefined,\n };\n const splitFirst = getGroupSplit({\n col,\n stickyCount: stickyColumnsFirst,\n side: 'first',\n totalColumns,\n });\n const splitLast = getGroupSplit({\n col,\n stickyCount: stickyColumnsLast,\n side: 'last',\n totalColumns,\n });\n const split = splitFirst.stickyColspan > 0 ? splitFirst : splitLast;\n const isSplit = split.stickyColspan > 0;\n\n if (isSplit) {\n // Group is bisected by the sticky boundary — render two <th> elements.\n // Both halves get resizers. Each resizes its own rightmost column child.\n const isSplitFirst = splitFirst.stickyColspan > 0;\n\n // Left half is sticky for 'first', non-sticky for 'last'\n const leftColspan = isSplitFirst ? split.stickyColspan : split.staticColspan;\n const leftColIndex = col.colIndex;\n const leftGroupId = isSplitFirst ? col.id : `${col.id}__split`;\n const leftChildIds = childIds.slice(0, leftColspan);\n\n // Right half is non-sticky for 'first', sticky for 'last'\n const rightColspan = isSplitFirst ? split.staticColspan : split.stickyColspan;\n const rightColIndex = col.colIndex + leftColspan;\n const rightGroupId = isSplitFirst ? `${col.id}__split` : col.id;\n const rightChildIds = childIds.slice(leftColspan);\n\n return (\n <React.Fragment key={col.id}>\n {/* Left half */}\n <TableGroupHeaderCell\n {...sharedGroupCellProps}\n colspan={leftColspan}\n colIndex={selectionType ? leftColIndex + 1 : leftColIndex}\n groupId={leftGroupId}\n resizableStyle={undefined}\n updateGroupWidth={(_, newWidth) => {\n handleSplitGroupResize(leftChildIds, newWidth);\n }}\n childColumnIds={leftChildIds}\n firstChildColumnId={leftChildIds[0]}\n lastChildColumnId={leftChildIds[leftChildIds.length - 1]}\n cellRef={isSplitFirst ? node => setCell(sticky, col.id, node) : () => {}}\n isLast={false}\n stickyColumnId={isSplitFirst ? childIds[0] : undefined}\n stickyBoundaryColumnId={isSplitFirst ? leftChildIds[leftChildIds.length - 1] : undefined}\n />\n\n {/* Right half */}\n <TableGroupHeaderCell\n {...sharedGroupCellProps}\n colspan={rightColspan}\n colIndex={selectionType ? rightColIndex + 1 : rightColIndex}\n groupId={rightGroupId}\n resizableStyle={getColumnStyles(sticky, col.id)}\n updateGroupWidth={(_, newWidth) => {\n handleSplitGroupResize(rightChildIds, newWidth);\n }}\n childColumnIds={rightChildIds}\n firstChildColumnId={rightChildIds[0]}\n lastChildColumnId={rightChildIds[rightChildIds.length - 1]}\n cellRef={!isSplitFirst ? node => setCell(sticky, col.id, node) : () => {}}\n resizerRoleDescription={resizerRoleDescription}\n resizerTooltipText={resizerTooltipText}\n isLast={rightColIndex + rightColspan === totalColumns}\n stickyColumnId={!isSplitFirst ? childIds[childIds.length - 1] : undefined}\n stickyBoundaryColumnId={!isSplitFirst ? rightChildIds[0] : undefined}\n />\n </React.Fragment>\n );\n }\n\n // Determine if the entire group is sticky (all children on one side)\n const isFullyStickyFirst =\n stickyColumnsFirst > 0 && col.colIndex + col.colSpan - 1 < stickyColumnsFirst;\n const isFullyStickyLast =\n stickyColumnsLast > 0 && col.colIndex >= columnDefinitions.length - stickyColumnsLast;\n const fullyStickyColumnId = isFullyStickyFirst\n ? childIds[0]\n : isFullyStickyLast\n ? childIds[childIds.length - 1]\n : undefined;\n\n // When the group's last child is the sticky-first boundary, the group\n // needs the shadow from that child (but offset from the first child).\n const isAtStickyFirstBoundary =\n isFullyStickyFirst && col.colIndex + col.colSpan - 1 === stickyColumnsFirst - 1;\n const isAtStickyLastBoundary =\n isFullyStickyLast && col.colIndex === columnDefinitions.length - stickyColumnsLast;\n const fullyStickyBoundaryColumnId = isAtStickyFirstBoundary\n ? childIds[childIds.length - 1]\n : isAtStickyLastBoundary\n ? childIds[0]\n : undefined;\n\n return (\n <TableGroupHeaderCell\n {...sharedGroupCellProps}\n key={col.id}\n colspan={col.colSpan}\n colIndex={selectionType ? col.colIndex + 1 : col.colIndex}\n groupId={col.id}\n resizableStyle={getColumnStyles(sticky, col.id)}\n updateGroupWidth={(groupId, newWidth) => {\n updateGroup(groupId, newWidth);\n }}\n childColumnIds={childIds}\n firstChildColumnId={childIds[0]}\n lastChildColumnId={childIds[childIds.length - 1]}\n cellRef={node => setCell(sticky, col.id, node)}\n resizerRoleDescription={resizerRoleDescription}\n resizerTooltipText={resizerTooltipText}\n isLast={col.colIndex + col.colSpan === totalColumns}\n stickyColumnId={fullyStickyColumnId}\n stickyBoundaryColumnId={fullyStickyBoundaryColumnId}\n />\n );\n } else {\n // Regular column cell\n const column = col.columnDefinition!;\n const columnId = col.id;\n const colIndex = col.colIndex;\n\n return (\n <TableHeaderCell\n {...commonCellProps}\n key={columnId}\n tabIndex={sticky ? -1 : 0}\n focusedComponent={focusedComponent}\n column={column}\n activeSortingColumn={sortingColumn}\n sortingDescending={sortingDescending}\n sortingDisabled={sortingDisabled}\n wrapLines={wrapLines}\n colIndex={selectionType ? colIndex + 1 : colIndex}\n columnId={columnId}\n updateColumn={updateColumn}\n onResizeFinish={() => onResizeFinish(columnWidthsRef.current)}\n resizableColumns={resizableColumns}\n resizableStyle={getColumnStyles(sticky, columnId)}\n onClick={detail => {\n setLastUserAction('sorting');\n fireNonCancelableEvent(onSortingChange, detail);\n }}\n isEditable={!!column.editConfig}\n cellRef={node => {\n setCell(sticky, columnId, node);\n }}\n tableRole={tableRole}\n resizerRoleDescription={resizerRoleDescription}\n resizerTooltipText={resizerTooltipText}\n isExpandable={colIndex === 0 && isExpandable}\n hasDynamicContent={hidden && !resizableColumns && column.hasDynamicContent}\n colSpan={col.colSpan}\n rowSpan={col.rowSpan}\n isLastChildOfGroup={isLastChildOfGroup}\n isLast={col.colIndex + col.colSpan === totalColumns}\n columnGroupId={\n col.parentGroupIds.length > 0 ? col.parentGroupIds[col.parentGroupIds.length - 1] : undefined\n }\n />\n );\n }\n })}\n </tr>\n ))}\n </thead>\n );\n }\n);\n\nexport default Thead;\n"]}
|
|
@@ -22,8 +22,10 @@ export default class ActionCardWrapper extends ComponentWrapper<HTMLDivElement>
|
|
|
22
22
|
*/
|
|
23
23
|
isDisabled(): boolean;
|
|
24
24
|
/**
|
|
25
|
-
* Performs a click by triggering a mouse event on the internal button.
|
|
25
|
+
* Performs a click by triggering a mouse event on the internal button or link.
|
|
26
26
|
* Note that programmatic events ignore disabled attribute and will trigger listeners even if the element is disabled.
|
|
27
|
+
*
|
|
28
|
+
* @param params optional mouse event properties, for example modifier keys (`ctrlKey`, `metaKey`) or the mouse `button`.
|
|
27
29
|
*/
|
|
28
|
-
click(): void;
|
|
30
|
+
click(params?: MouseEventInit): void;
|
|
29
31
|
}
|
|
@@ -43,13 +43,15 @@ class ActionCardWrapper extends dom_1.ComponentWrapper {
|
|
|
43
43
|
return this.element.classList.contains(styles_selectors_js_2.default.disabled);
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
|
-
* Performs a click by triggering a mouse event on the internal button.
|
|
46
|
+
* Performs a click by triggering a mouse event on the internal button or link.
|
|
47
47
|
* Note that programmatic events ignore disabled attribute and will trigger listeners even if the element is disabled.
|
|
48
|
+
*
|
|
49
|
+
* @param params optional mouse event properties, for example modifier keys (`ctrlKey`, `metaKey`) or the mouse `button`.
|
|
48
50
|
*/
|
|
49
|
-
click() {
|
|
51
|
+
click(params) {
|
|
50
52
|
const button = this.findByClassName(styles_selectors_js_2.default.button);
|
|
51
53
|
if (button) {
|
|
52
|
-
button.click();
|
|
54
|
+
button.click(params);
|
|
53
55
|
}
|
|
54
56
|
}
|
|
55
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/action-card/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,gEAAmG;AAEnG,kFAA8D;AAC9D,+FAA+E;AAE/E,MAAqB,iBAAkB,SAAQ,sBAAgC;IAG7E;;OAEG;IACH,UAAU;QACR,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAU,CAAC,MAAM,CAAC,CAAC;IACjD,CAAC;IAED;;OAEG;IACH,eAAe;QACb,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAU,CAAC,WAAW,CAAC,CAAC;IACtD,CAAC;IAED;;OAEG;IACH,WAAW;QACT,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAU,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;IAED;;OAEG;IACH,QAAQ;QACN,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAU,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;IACD;;OAEG;IAEH,UAAU;QACR,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,6BAAU,CAAC,QAAQ,CAAC,CAAC;IAC9D,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/action-card/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,gEAAmG;AAEnG,kFAA8D;AAC9D,+FAA+E;AAE/E,MAAqB,iBAAkB,SAAQ,sBAAgC;IAG7E;;OAEG;IACH,UAAU;QACR,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAU,CAAC,MAAM,CAAC,CAAC;IACjD,CAAC;IAED;;OAEG;IACH,eAAe;QACb,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAU,CAAC,WAAW,CAAC,CAAC;IACtD,CAAC;IAED;;OAEG;IACH,WAAW;QACT,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAU,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;IAED;;OAEG;IACH,QAAQ;QACN,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAU,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;IACD;;OAEG;IAEH,UAAU;QACR,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,6BAAU,CAAC,QAAQ,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;OAKG;IAEH,KAAK,CAAC,MAAuB;QAC3B,MAAM,MAAM,GAAG,IAAI,CAAC,eAAe,CAAC,6BAAU,CAAC,MAAM,CAAC,CAAC;QACvD,IAAI,MAAM,EAAE,CAAC;YACX,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;;AAjDM,8BAAY,GAAW,6BAAM,CAAC,IAAI,CAAC;kBADvB,iBAAiB;AAkCpC;IADC,aAAO;mDAGP;AASD;IADC,aAAO;8CAMP"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ComponentWrapper, ElementWrapper } from '@cloudscape-design/test-utils-core/dom';
|
|
2
2
|
import ButtonWrapper from '../button/index.js';
|
|
3
|
+
import InputWrapper from '../input/index.js';
|
|
3
4
|
export default class ButtonDropdownWrapper extends ComponentWrapper {
|
|
4
5
|
static rootSelector: string;
|
|
5
6
|
findNativeButton(): ElementWrapper<HTMLButtonElement>;
|
|
@@ -50,5 +51,20 @@ export default class ButtonDropdownWrapper extends ComponentWrapper {
|
|
|
50
51
|
* Finds the disabled reason tooltip for a dropdown item. Returns null if no disabled item with `disabledReason` is highlighted.
|
|
51
52
|
*/
|
|
52
53
|
findDisabledReason(): ElementWrapper | null;
|
|
54
|
+
/**
|
|
55
|
+
* Finds the filtering input rendered inside the open dropdown when filtering is enabled.
|
|
56
|
+
* Returns null if there is no open dropdown or filtering is not enabled.
|
|
57
|
+
*
|
|
58
|
+
* This utility does not open the dropdown. To find the filtering input, call `openDropdown()` first.
|
|
59
|
+
*/
|
|
60
|
+
findFilteringInput(): InputWrapper | null;
|
|
61
|
+
/**
|
|
62
|
+
* Finds the footer region rendered at the bottom of the open dropdown. When filtering is enabled and text is
|
|
63
|
+
* entered, this contains content rendered by filteringResultsText if there are matching items and the `noMatch`
|
|
64
|
+
* content if there are none. Returns null if there is no open dropdown or the footer is not displayed.
|
|
65
|
+
*
|
|
66
|
+
* This utility does not open the dropdown. To find the footer region, call `openDropdown()` first.
|
|
67
|
+
*/
|
|
68
|
+
findFooterRegion(): ElementWrapper | null;
|
|
53
69
|
openDropdown(): void;
|
|
54
70
|
}
|
|
@@ -11,11 +11,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
11
11
|
const dom_1 = require("@cloudscape-design/test-utils-core/dom");
|
|
12
12
|
const utils_dom_1 = require("@cloudscape-design/test-utils-core/utils-dom");
|
|
13
13
|
const index_js_1 = require("../button/index.js");
|
|
14
|
+
const index_js_2 = require("../input/index.js");
|
|
14
15
|
const styles_selectors_js_1 = require("../../../button/styles.selectors.js");
|
|
15
16
|
const styles_selectors_js_2 = require("../../../button-dropdown/category-elements/styles.selectors.js");
|
|
16
17
|
const styles_selectors_js_3 = require("../../../button-dropdown/item-element/styles.selectors.js");
|
|
17
18
|
const styles_selectors_js_4 = require("../../../button-dropdown/styles.selectors.js");
|
|
18
19
|
const styles_selectors_js_5 = require("../../../dropdown/styles.selectors.js");
|
|
20
|
+
const styles_selectors_js_6 = require("../../../input/styles.selectors.js");
|
|
21
|
+
const styles_selectors_js_7 = require("../../../internal/components/dropdown-status/styles.selectors.js");
|
|
19
22
|
function getItemSelector({ disabled }) {
|
|
20
23
|
let selector = `.${styles_selectors_js_3.default['item-element']}`;
|
|
21
24
|
if (disabled === true) {
|
|
@@ -111,6 +114,27 @@ class ButtonDropdownWrapper extends dom_1.ComponentWrapper {
|
|
|
111
114
|
findDisabledReason() {
|
|
112
115
|
return (0, dom_1.createWrapper)().find(`[data-testid="button-dropdown-disabled-reason"]`);
|
|
113
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* Finds the filtering input rendered inside the open dropdown when filtering is enabled.
|
|
119
|
+
* Returns null if there is no open dropdown or filtering is not enabled.
|
|
120
|
+
*
|
|
121
|
+
* This utility does not open the dropdown. To find the filtering input, call `openDropdown()` first.
|
|
122
|
+
*/
|
|
123
|
+
findFilteringInput() {
|
|
124
|
+
var _a, _b;
|
|
125
|
+
return (_b = (_a = this.findOpenDropdown()) === null || _a === void 0 ? void 0 : _a.findComponent(`.${styles_selectors_js_6.default['input-container']}`, index_js_2.default)) !== null && _b !== void 0 ? _b : null;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Finds the footer region rendered at the bottom of the open dropdown. When filtering is enabled and text is
|
|
129
|
+
* entered, this contains content rendered by filteringResultsText if there are matching items and the `noMatch`
|
|
130
|
+
* content if there are none. Returns null if there is no open dropdown or the footer is not displayed.
|
|
131
|
+
*
|
|
132
|
+
* This utility does not open the dropdown. To find the footer region, call `openDropdown()` first.
|
|
133
|
+
*/
|
|
134
|
+
findFooterRegion() {
|
|
135
|
+
var _a, _b;
|
|
136
|
+
return (_b = (_a = this.findOpenDropdown()) === null || _a === void 0 ? void 0 : _a.findByClassName(styles_selectors_js_7.default.root)) !== null && _b !== void 0 ? _b : null;
|
|
137
|
+
}
|
|
114
138
|
openDropdown() {
|
|
115
139
|
(0, utils_dom_1.act)(() => {
|
|
116
140
|
this.findNativeButton().click();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/button-dropdown/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,gEAAkH;AAClH,4EAAmE;AAEnE,iDAA+C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/button-dropdown/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,gEAAkH;AAClH,4EAAmE;AAEnE,iDAA+C;AAC/C,gDAA6C;AAE7C,6EAA+D;AAC/D,wGAA4F;AAC5F,mGAAmF;AACnF,sFAAkE;AAClE,+EAAmE;AACnE,4EAA6D;AAC7D,0GAA4F;AAE5F,SAAS,eAAe,CAAC,EAAE,QAAQ,EAA0B;IAC3D,IAAI,QAAQ,GAAG,IAAI,6BAAU,CAAC,cAAc,CAAC,EAAE,CAAC;IAEhD,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;QACtB,QAAQ,IAAI,IAAI,6BAAU,CAAC,QAAQ,EAAE,CAAC;IACxC,CAAC;SAAM,IAAI,QAAQ,KAAK,KAAK,EAAE,CAAC;QAC9B,QAAQ,IAAI,SAAS,6BAAU,CAAC,QAAQ,GAAG,CAAC;IAC9C,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,MAAqB,qBAAsB,SAAQ,sBAAgB;IAGjE,gBAAgB;QACd,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,kBAAkB,CAAC,CAAE,CAAC,eAAe,CACtE,6BAAM,CAAC,2BAA2B,CAAC,CACnC,CAAC;IACL,CAAC;IAED,iBAAiB;;QACf,OAAO,CACL,MAAA,MAAA,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,kBAAkB,CAAC,CAAC,0CAAE,aAAa,CAAC,IAAI,6BAAY,CAAC,MAAM,EAAE,EAAE,kBAAa,CAAC,mCAAI,IAAI,CAClH,CAAC;IACJ,CAAC;IAED,cAAc;;QACZ,OAAO,CACL,MAAA,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AC,CAAC,CAAC;IACL,CAAC;;AAzHM,kCAAY,GAAW,6BAAM,CAAC,iBAAiB,CAAC,CAAC;kBADrC,qBAAqB;AA2C/B;IAAR,aAAO;gEAWP;AAgED;IADC,aAAO;yDAKP"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ComponentWrapper, ElementWrapper } from "@cloudscape-design/test-utils-core/selectors";
|
|
2
2
|
import ButtonWrapper from '../button/index.js';
|
|
3
|
+
import InputWrapper from '../input/index.js';
|
|
3
4
|
export default class ButtonDropdownWrapper extends ComponentWrapper {
|
|
4
5
|
static rootSelector: string;
|
|
5
6
|
findNativeButton(): ElementWrapper;
|
|
@@ -49,4 +50,19 @@ export default class ButtonDropdownWrapper extends ComponentWrapper {
|
|
|
49
50
|
* Finds the disabled reason tooltip for a dropdown item. Returns null if no disabled item with `disabledReason` is highlighted.
|
|
50
51
|
*/
|
|
51
52
|
findDisabledReason(): ElementWrapper;
|
|
53
|
+
/**
|
|
54
|
+
* Finds the filtering input rendered inside the open dropdown when filtering is enabled.
|
|
55
|
+
* Returns null if there is no open dropdown or filtering is not enabled.
|
|
56
|
+
*
|
|
57
|
+
* This utility does not open the dropdown. To find the filtering input, call `openDropdown()` first.
|
|
58
|
+
*/
|
|
59
|
+
findFilteringInput(): InputWrapper;
|
|
60
|
+
/**
|
|
61
|
+
* Finds the footer region rendered at the bottom of the open dropdown. When filtering is enabled and text is
|
|
62
|
+
* entered, this contains content rendered by filteringResultsText if there are matching items and the `noMatch`
|
|
63
|
+
* content if there are none. Returns null if there is no open dropdown or the footer is not displayed.
|
|
64
|
+
*
|
|
65
|
+
* This utility does not open the dropdown. To find the footer region, call `openDropdown()` first.
|
|
66
|
+
*/
|
|
67
|
+
findFooterRegion(): ElementWrapper;
|
|
52
68
|
}
|
|
@@ -4,11 +4,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
const selectors_1 = require("@cloudscape-design/test-utils-core/selectors");
|
|
6
6
|
const index_js_1 = require("../button/index.js");
|
|
7
|
+
const index_js_2 = require("../input/index.js");
|
|
7
8
|
const styles_selectors_js_1 = require("../../../button/styles.selectors.js");
|
|
8
9
|
const styles_selectors_js_2 = require("../../../button-dropdown/category-elements/styles.selectors.js");
|
|
9
10
|
const styles_selectors_js_3 = require("../../../button-dropdown/item-element/styles.selectors.js");
|
|
10
11
|
const styles_selectors_js_4 = require("../../../button-dropdown/styles.selectors.js");
|
|
11
12
|
const styles_selectors_js_5 = require("../../../dropdown/styles.selectors.js");
|
|
13
|
+
const styles_selectors_js_6 = require("../../../input/styles.selectors.js");
|
|
14
|
+
const styles_selectors_js_7 = require("../../../internal/components/dropdown-status/styles.selectors.js");
|
|
12
15
|
function getItemSelector({ disabled }) {
|
|
13
16
|
let selector = `.${styles_selectors_js_3.default['item-element']}`;
|
|
14
17
|
if (disabled === true) {
|
|
@@ -91,6 +94,27 @@ class ButtonDropdownWrapper extends selectors_1.ComponentWrapper {
|
|
|
91
94
|
findDisabledReason() {
|
|
92
95
|
return (0, selectors_1.createWrapper)().find(`[data-testid="button-dropdown-disabled-reason"]`);
|
|
93
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* Finds the filtering input rendered inside the open dropdown when filtering is enabled.
|
|
99
|
+
* Returns null if there is no open dropdown or filtering is not enabled.
|
|
100
|
+
*
|
|
101
|
+
* This utility does not open the dropdown. To find the filtering input, call `openDropdown()` first.
|
|
102
|
+
*/
|
|
103
|
+
findFilteringInput() {
|
|
104
|
+
var _a, _b;
|
|
105
|
+
return (_b = (_a = this.findOpenDropdown()) === null || _a === void 0 ? void 0 : _a.findComponent(`.${styles_selectors_js_6.default['input-container']}`, index_js_2.default)) !== null && _b !== void 0 ? _b : null;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Finds the footer region rendered at the bottom of the open dropdown. When filtering is enabled and text is
|
|
109
|
+
* entered, this contains content rendered by filteringResultsText if there are matching items and the `noMatch`
|
|
110
|
+
* content if there are none. Returns null if there is no open dropdown or the footer is not displayed.
|
|
111
|
+
*
|
|
112
|
+
* This utility does not open the dropdown. To find the footer region, call `openDropdown()` first.
|
|
113
|
+
*/
|
|
114
|
+
findFooterRegion() {
|
|
115
|
+
var _a, _b;
|
|
116
|
+
return (_b = (_a = this.findOpenDropdown()) === null || _a === void 0 ? void 0 : _a.findByClassName(styles_selectors_js_7.default.root)) !== null && _b !== void 0 ? _b : null;
|
|
117
|
+
}
|
|
94
118
|
}
|
|
95
119
|
ButtonDropdownWrapper.rootSelector = styles_selectors_js_4.default['button-dropdown'];
|
|
96
120
|
exports.default = ButtonDropdownWrapper;
|