@cloudscape-design/components-themeable 3.0.976 → 3.0.978
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/drawer/styles.scss +1 -1
- package/lib/internal/scss/internal/components/selectable-item/styles.scss +21 -8
- package/lib/internal/template/alert/index.js +3 -3
- package/lib/internal/template/alert/index.js.map +1 -1
- package/lib/internal/template/alert/interfaces.d.ts +10 -0
- package/lib/internal/template/alert/interfaces.d.ts.map +1 -1
- package/lib/internal/template/alert/interfaces.js.map +1 -1
- package/lib/internal/template/drawer/styles.css.js +6 -6
- package/lib/internal/template/drawer/styles.scoped.css +12 -12
- package/lib/internal/template/drawer/styles.selectors.js +6 -6
- package/lib/internal/template/flashbar/flash.js +3 -5
- package/lib/internal/template/flashbar/flash.js.map +1 -1
- package/lib/internal/template/flashbar/interfaces.d.ts +2 -0
- package/lib/internal/template/flashbar/interfaces.d.ts.map +1 -1
- package/lib/internal/template/flashbar/interfaces.js.map +1 -1
- package/lib/internal/template/form/index.js +1 -1
- package/lib/internal/template/form/index.js.map +1 -1
- package/lib/internal/template/form/interfaces.d.ts +3 -1
- package/lib/internal/template/form/interfaces.d.ts.map +1 -1
- package/lib/internal/template/form/interfaces.js.map +1 -1
- package/lib/internal/template/form-field/index.d.ts.map +1 -1
- package/lib/internal/template/form-field/index.js +1 -0
- package/lib/internal/template/form-field/index.js.map +1 -1
- package/lib/internal/template/form-field/interfaces.d.ts +3 -1
- package/lib/internal/template/form-field/interfaces.d.ts.map +1 -1
- package/lib/internal/template/form-field/interfaces.js.map +1 -1
- package/lib/internal/template/form-field/internal.d.ts.map +1 -1
- package/lib/internal/template/form-field/internal.js +2 -3
- package/lib/internal/template/form-field/internal.js.map +1 -1
- package/lib/internal/template/internal/analytics/hooks/use-funnel.d.ts +1 -1
- package/lib/internal/template/internal/analytics/interfaces.d.ts +12 -5
- package/lib/internal/template/internal/analytics/interfaces.d.ts.map +1 -1
- package/lib/internal/template/internal/analytics/interfaces.js.map +1 -1
- package/lib/internal/template/internal/components/drag-handle/hooks/interfaces.d.ts +66 -0
- package/lib/internal/template/internal/components/drag-handle/hooks/interfaces.d.ts.map +1 -0
- package/lib/internal/template/internal/components/drag-handle/hooks/interfaces.js +4 -0
- package/lib/internal/template/internal/components/drag-handle/hooks/interfaces.js.map +1 -0
- package/lib/internal/template/internal/components/drag-handle/hooks/use-drag-handle-interaction-state.d.ts +35 -0
- package/lib/internal/template/internal/components/drag-handle/hooks/use-drag-handle-interaction-state.d.ts.map +1 -0
- package/lib/internal/template/internal/components/drag-handle/hooks/use-drag-handle-interaction-state.js +259 -0
- package/lib/internal/template/internal/components/drag-handle/hooks/use-drag-handle-interaction-state.js.map +1 -0
- package/lib/internal/template/internal/components/drag-handle/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/drag-handle/index.js +2 -2
- package/lib/internal/template/internal/components/drag-handle/index.js.map +1 -1
- package/lib/internal/template/internal/components/drag-handle/interfaces.d.ts +1 -0
- package/lib/internal/template/internal/components/drag-handle/interfaces.d.ts.map +1 -1
- package/lib/internal/template/internal/components/drag-handle/interfaces.js.map +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/index.d.ts +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/index.js +4 -4
- package/lib/internal/template/internal/components/drag-handle-wrapper/index.js.map +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/interfaces.d.ts +1 -0
- package/lib/internal/template/internal/components/drag-handle-wrapper/interfaces.d.ts.map +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/interfaces.js.map +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/portal-overlay.d.ts +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/portal-overlay.d.ts.map +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/portal-overlay.js +3 -3
- package/lib/internal/template/internal/components/drag-handle-wrapper/portal-overlay.js.map +1 -1
- package/lib/internal/template/internal/components/selectable-item/styles.css.js +21 -21
- package/lib/internal/template/internal/components/selectable-item/styles.scoped.css +56 -43
- package/lib/internal/template/internal/components/selectable-item/styles.selectors.js +21 -21
- package/lib/internal/template/internal/do-not-use/drag-handle.d.ts +5 -0
- package/lib/internal/template/internal/do-not-use/drag-handle.d.ts.map +1 -0
- package/lib/internal/template/internal/do-not-use/drag-handle.js +6 -0
- package/lib/internal/template/internal/do-not-use/drag-handle.js.map +1 -0
- package/lib/internal/template/internal/environment.js +1 -1
- package/lib/internal/template/internal/environment.json +1 -1
- package/lib/internal/template/package.json +1 -0
- package/lib/internal/template/table/index.d.ts.map +1 -1
- package/lib/internal/template/table/index.js +1 -0
- package/lib/internal/template/table/index.js.map +1 -1
- package/lib/internal/template/table/interfaces.d.ts +3 -0
- package/lib/internal/template/table/interfaces.d.ts.map +1 -1
- package/lib/internal/template/table/interfaces.js.map +1 -1
- package/lib/internal/template/table/internal.d.ts.map +1 -1
- package/lib/internal/template/table/internal.js +3 -2
- package/lib/internal/template/table/internal.js.map +1 -1
- package/lib/internal/template/wizard/interfaces.d.ts +3 -1
- package/lib/internal/template/wizard/interfaces.d.ts.map +1 -1
- package/lib/internal/template/wizard/interfaces.js.map +1 -1
- package/lib/internal/template/wizard/wizard-form.d.ts.map +1 -1
- package/lib/internal/template/wizard/wizard-form.js +2 -2
- package/lib/internal/template/wizard/wizard-form.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/table/interfaces.tsx"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseComponentProps } from '../internal/base-component';\nimport { CancelableEventHandler, NonCancelableEventHandler } from '../internal/events';\nimport { Optional } from '../internal/types';\nimport ColumnDisplayProperties = TableProps.ColumnDisplayProperties;\n\n/*\n * HACK: Cast the component to a named parametrized interface.\n *\n * This lets us use React.forwardRef and still let the component have type\n * parameters, and the naming convention lets the documenter know that this is\n * a forwardRef-wrapped component.\n *\n * We don't need to expose this type to customers because it's just a simple\n * function type.\n */\nexport interface TableForwardRefType {\n <T>(props: TableProps<T> & { ref?: React.Ref<TableProps.Ref> }): JSX.Element;\n}\n\nexport interface TableProps<T = any> extends BaseComponentProps {\n /**\n * Specifies additional analytics-related metadata.\n * * `instanceIdentifier` - A unique string that identifies this component instance in your application.\n * @analytics\n */\n analyticsMetadata?: TableProps.AnalyticsMetadata;\n /**\n * Heading element of the table container. Use the [header component](/components/header/).\n */\n header?: React.ReactNode;\n\n /**\n * Footer of the table container.\n */\n footer?: React.ReactNode;\n\n /**\n * Displayed when the `items` property is an empty array. Use it to render an empty or no-match state.\n */\n empty?: React.ReactNode;\n\n /**\n * Specifies the data that's displayed in the table rows. Each item contains the data for one row. The display of a row is handled\n * by the `cell` property of each column definition in the `columnDefinitions` property.\n */\n items: ReadonlyArray<T>;\n\n /**\n * Renders the table in a loading state. We recommend that you also set a `loadingText`.\n */\n loading?: boolean;\n\n /**\n * Specifies the text that's displayed when the table is in a loading state.\n */\n loadingText?: string;\n\n /**\n * Specifies a property that uniquely identifies an individual item.\n * When it's set, it's used to provide [keys for React](https://reactjs.org/docs/lists-and-keys.html#keys)\n * for performance optimizations.\n *\n * It is also used in the following situations:\n * - to connect `items` and `selectedItems` values when they reference different objects.\n * - to connect `items` and `expandableRows.expandedItems` values when they reference different objects.\n * - to attach successful edit state to the correct item if its row index changes after editing.\n */\n trackBy?: TableProps.TrackBy<T>;\n\n /**\n * The columns configuration object\n * * `id` (string) - Specifies a unique column identifier. The property is used 1) as a [keys](https://reactjs.org/docs/lists-and-keys.html#keys) source for React rendering,\n * and 2) to match entries in the `columnDisplay` property, if defined.\n * * `header` (ReactNode) - Determines the display of the column header.\n * * `cell` ((item) => ReactNode) - Determines the display of a cell's content. You receive the current table row\n * item as an argument.\n * * `width` (string | number) - Specifies the column width. Corresponds to the `width` css-property. If the width is not set,\n * the browser automatically adjusts the column width based on the content. When `resizableColumns` property is\n * set to `true`, additional constraints apply: 1) string values are not allowed, and 2) the last visible column always\n * fills the remaining space of the table so the specified width is ignored.\n * * `minWidth` (string | number) - Specifies the minimum column width. Corresponds to the `min-width` css-property. When\n * `resizableColumns` property is set to `true`, additional constraints apply: 1) string values are not allowed,\n * and 2) the column can't resize below than the specified width (defaults to \"120px\"). We recommend that you set a minimum width\n * of at least 176px for columns that are editable.\n * * `maxWidth` (string | number) - Specifies the maximum column width. Corresponds to the `max-width` css-property.\n * Note that when the `resizableColumns` property is set to `true` this property is ignored.\n * * `ariaLabel` (LabelData => string) - An optional function that's called to provide an `aria-label` for the cell header.\n * It receives the current sorting state of this column, the direction it's sorted in, and an indication of\n * whether the sorting is disabled, as three Boolean values: `sorted`, `descending` and `disabled`.\n * We recommend that you use this for sortable columns to provide more meaningful labels based on the\n * current sorting direction.\n * * `sortingField` (string) - Enables default column sorting. The value is used in [collection hooks](/get-started/dev-guides/collection-hooks/)\n * to reorder the items. Provide the name of the property within each item that should be used for sorting by this column.\n * For more complex sorting use `sortingComparator` instead.\n * * `sortingComparator` ((T, T) => number) - Enables custom column sorting. The value is used in [collection hooks](/get-started/dev-guides/collection-hooks/)\n * to reorder the items. This property accepts a custom comparator that is used to compare two items.\n * The comparator must implement ascending ordering, and the output is inverted automatically in case of descending order.\n * If present, the `sortingField` property is ignored.\n * * `editConfig` (EditConfig) - Enables inline editing in column when present. The value is used to configure the editing behavior.\n * * `editConfig.ariaLabel` (string) - Specifies a label for the edit control. Visually hidden but read by screen readers.\n * * `editConfig.errorIconAriaLabel` (string) - Specifies an ariaLabel for the error icon that is displayed when the validation fails.\n * * `editConfig.editIconAriaLabel` (string) - Specifies an alternate text for the edit icon used in column header.\n * * `editConfig.constraintText` (string) - Constraint text that is displayed below the edit control.\n * * `editConfig.disabledReason` ((item) => string | undefined) - A function that determines whether inline edit for certain items is disabled, and provides a reason why.\n * Return a string from the function to disable inline edit with a reason. Return `undefined` (or no return) from the function allow inline edit.\n * * `editConfig.validation` ((item, value) => string) - A function that allows you to validate the value of the edit control.\n * Return a string from the function to display an error message. Return `undefined` (or no return) from the function to indicate that the value is valid.\n * * `editConfig.editingCell` ((item, cellContext) => ReactNode) - Determines the display of a cell's content when inline editing is active on a cell;\n * You receive the current table row `item` and a `cellContext` object as arguments.\n * The `cellContext` object contains the following properties:\n * * `cellContext.currentValue` - State to keep track of a value in input fields while editing.\n * * `cellContext.setValue` - Function to update `currentValue`. This should be called when the value in input field changes.\n * * `isRowHeader` (boolean) - Specifies that cells in this column should be used as row headers.\n * * `hasDynamicContent` (boolean) - Specifies that cells in this column may have dynamic content. The contents will then be observed to update calculated column widths.\n * This may have a negative performance impact, so should be used only if necessary. It has no effect if `resizableColumns` is set to `true`.\n * * `verticalAlign` ('middle' | 'top') - Determines the alignment of the content in the table cell.\n */\n columnDefinitions: ReadonlyArray<TableProps.ColumnDefinition<T>>;\n\n /**\n * Determines the alignment of the content inside table cells.\n * This property affects all cells, including the ones in the selection column.\n * To target individual cells use `columnDefinitions.verticalAlign`, that takes precedence over `cellVerticalAlign`.\n */\n cellVerticalAlign?: 'middle' | 'top';\n\n /**\n * Specifies the selection type (`'single' | 'multi'`).\n */\n selectionType?: TableProps.SelectionType;\n /**\n * List of selected items.\n */\n selectedItems?: ReadonlyArray<T>;\n\n /**\n * Use this slot to add filtering controls to the table.\n */\n filter?: React.ReactNode;\n\n /**\n * Use this slot to add the [pagination component](/components/pagination/) to the table.\n */\n pagination?: React.ReactNode;\n\n /**\n * Use this slot to add [collection preferences](/components/collection-preferences/) to the table.\n */\n preferences?: React.ReactNode;\n\n /**\n * Determines whether a given item is disabled. If an item is disabled, the user can't select it.\n */\n isItemDisabled?: TableProps.IsItemDisabled<T>;\n\n /**\n * Specifies if text wraps within table cells. If set to `true`, long text within cells may wrap onto\n * multiple lines instead of being truncated with an ellipsis.\n */\n wrapLines?: boolean;\n\n /**\n * Specifies if table rows alternate being shaded and unshaded. If set to `true`, every other row will be shaded.\n */\n stripedRows?: boolean;\n\n /**\n * Toggles the content density of the table. Defaults to `'comfortable'`.\n */\n contentDensity?: 'comfortable' | 'compact';\n\n /**\n * Specifies if columns can be resized. If set to `true`, users can resize the columns in the table.\n */\n resizableColumns?: boolean;\n\n /**\n * Specifies alternative text for the selection components (checkboxes and radio buttons) as follows:\n * * `itemSelectionLabel` ((SelectionState, Item) => string) - Specifies the alternative text for an item.\n * * `allItemsSelectionLabel` ((SelectionState) => string) - Specifies the alternative text for multi-selection column header.\n * * `selectionGroupLabel` (string) - Specifies the alternative text for the whole selection and single-selection column header.\n * It is prefixed to `itemSelectionLabel` and `allItemsSelectionLabel` when they are set.\n * You can use the first argument of type `SelectionState` to access the current selection\n * state of the component (for example, the `selectedItems` list). The `itemSelectionLabel` for individual\n * items also receives the corresponding `Item` object. You can use the `selectionGroupLabel` to\n * add a meaningful description to the whole selection.\n * * `tableLabel` (string) - Provides an alternative text for the table. If you use a header for this table, you may reuse the string\n * to provide a caption-like description. For example, tableLabel=Instances will be announced as 'Instances table'.\n * * `resizerRoleDescription` (string) - Provides role description for table column resizer buttons.\n * * `activateEditLabel` (EditableColumnDefinition, Item) => string -\n * Specifies an alternative text for the edit button in editable cells.\n * * `cancelEditLabel` (EditableColumnDefinition) => string -\n * Specifies an alternative text for the cancel button in editable cells.\n * * `submitEditLabel` (EditableColumnDefinition) => string -\n * Specifies an alternative text for the submit button in editable cells.\n * * `successfulEditLabel` (EditableColumnDefinition) => string -\n * Specifies an alternative text for the success icon in editable cells. This text is also announced to screen readers.\n * * `submittingEditText` (EditableColumnDefinition) => string -\n * Specifies a text that is announced to screen readers when a cell edit operation is submitted.\n * * `expandButtonLabel` (Item) => string - Specifies an alternative text for row expand button.\n * * `collapseButtonLabel` (Item) => string - Specifies an alternative text for row collapse button.\n * @i18n\n */\n ariaLabels?: TableProps.AriaLabels<T>;\n\n /**\n * Specifies the definition object of the currently sorted column. Make sure you pass an object that's\n * present in the `columnDefinitions` array.\n */\n sortingColumn?: TableProps.SortingColumn<T>;\n /**\n * Specifies whether to use a descending sort order.\n */\n sortingDescending?: boolean;\n /**\n * Specifies if sorting buttons are disabled. For example, use this property\n * to prevent the user from sorting before items are fully loaded.\n */\n sortingDisabled?: boolean;\n\n /**\n * Specifies the number of first and/or last columns that should be sticky.\n *\n * If the available scrollable space is less than a certain threshold, the feature is deactivated.\n *\n * Use it in conjunction with the sticky columns preference of the\n * [collection preferences](/components/collection-preferences/) component.\n *\n */\n stickyColumns?: TableProps.StickyColumns;\n\n /**\n * Specifies an array that represents the table columns in the order in which they will be displayed, together with their visibility.\n *\n * If not set, all columns are displayed and the order is dictated by the `columnDefinitions` property.\n *\n * Use it in conjunction with the content display preference of the [collection preferences](/components/collection-preferences/) component.\n */\n columnDisplay?: ReadonlyArray<ColumnDisplayProperties>;\n\n /**\n * Specifies an array containing the `id`s of visible columns. If not set, all columns are displayed.\n *\n * Use it in conjunction with the visible content preference of the [collection preferences](/components/collection-preferences/) component.\n *\n * The order of ids doesn't influence the order in which columns are displayed - this is dictated by the `columnDefinitions` property.\n *\n * @deprecated Replaced by `columnDisplay`.\n */\n visibleColumns?: ReadonlyArray<string>;\n\n /**\n * Fired when the user resizes a table column. The event detail contains an array of column widths in pixels,\n * including the hidden via preferences columns. Use this event to persist the column widths.\n */\n onColumnWidthsChange?: NonCancelableEventHandler<TableProps.ColumnWidthsChangeDetail>;\n\n /**\n * Called when either the column to sort by or the direction of sorting changes upon user interaction.\n * The event detail contains the current sortingColumn and isDescending.\n */\n onSortingChange?: NonCancelableEventHandler<TableProps.SortingState<T>>;\n\n /**\n * Fired when a user interaction triggers a change in the list of selected items.\n * The event `detail` contains the current list of `selectedItems`.\n */\n onSelectionChange?: NonCancelableEventHandler<TableProps.SelectionChangeDetail<T>>;\n\n /**\n * Note: This feature is provided for backwards compatibility. Its use is not recommended,\n * and it may be deprecated in the future.\n *\n * Called when the user clicked at a table row. The event detail contains the index of the\n * clicked row and the row object itself. Use this event to define a row click behavior.\n */\n onRowClick?: NonCancelableEventHandler<TableProps.OnRowClickDetail<T>>;\n\n /**\n * Note: This feature is provided for backwards compatibility. Its use is not recommended,\n * and it may be deprecated in the future.\n *\n * Called when the user clicked at a table row with the right mouse click. The event detail\n * contains the index of the clicked row and the row object itself. Use this event to override\n * the default browser context menu behavior.\n */\n onRowContextMenu?: CancelableEventHandler<TableProps.OnRowContextMenuDetail<T>>;\n\n /**\n * If set to `true`, the table header remains visible when the user scrolls down.\n *\n * Do not use `stickyHeader` conditionally. Instead, keep its value constant during the component lifecycle.\n */\n stickyHeader?: boolean;\n\n /**\n * Specifies a vertical offset (in pixels) for the sticky header. For example, use this if you\n * need to position the sticky header below other fixed position elements on the page.\n */\n stickyHeaderVerticalOffset?: number;\n\n /**\n * Specify a table variant with one of the following:\n * * `container` - Use this variant to have the table displayed within a container.\n * * `borderless` - Use this variant when the table should have no outer borders or shadow\n * (such as in a dashboard item container).\n * * `embedded` - Use this variant within a parent container (such as a modal, expandable\n * section, container or split panel).\n * **Deprecated**, replaced by `borderless` and `container`.\n * * `stacked` - Use this variant adjacent to other stacked containers (such as a container,\n * table).\n * * `full-page` – Use this variant when the table is the entire content of a page.\n * @visualrefresh `embedded`, `stacked`, and `full-page` variants\n */\n variant?: TableProps.Variant;\n\n /**\n * Use this property to inform screen readers how many items there are in a table.\n * It specifies the total count of all items in a table.\n * If there is an unknown total of items in a table, leave this property undefined.\n */\n totalItemsCount?: number;\n /**\n * Use this property to inform screen readers which range of items is currently displayed in the table.\n * It specifies the index (1-based) of the first item in the table.\n */\n firstIndex?: number;\n /**\n * Use this function to announce page changes to screen reader users.\n * The function argument takes the following properties:\n * * `firstIndex` (number) - The provided `firstIndex` property which defaults to 1 when not defined.\n * * `lastIndex` (number) - The index of the last visible item of the table.\n * * `visibleItemsCount` (number) - The number of rendered table items.\n * * `totalItemsCount` (optional, number) - The provided `totalItemsCount` property.\n * Important: in tables with expandable rows the `firstIndex`, `lastIndex`, and `totalItemsCount` reflect the top-level items only.\n */\n renderAriaLive?: (data: TableProps.LiveAnnouncement) => string;\n /**\n * Specifies a function that will be called after user submits an inline edit.\n * Return a promise to keep loading state while the submit request is in progress.\n */\n submitEdit?: TableProps.SubmitEditFunction<T>;\n\n /**\n * Called whenever user cancels an inline edit. Use this function to reset any\n * validation states, or show warning for unsaved changes.\n */\n onEditCancel?: CancelableEventHandler;\n\n /**\n * Use this property to activate advanced keyboard navigation and focusing behaviors.\n * When set to `true`, table cells become navigable with arrow keys, and the entire table has a single tab stop.\n *\n * By default, the keyboard navigation is active for tables with expandable rows.\n */\n enableKeyboardNavigation?: boolean;\n\n /**\n * Use this property to define expandable table rows. The expandableRows configuration object consists of:\n * * `getItemChildren` ((Item) => Item[]) - Use it to define nested data that are shown when an item gets expanded.\n * * `isItemExpandable` ((Item) => boolean) - Use it for items that can be expanded to show nested data.\n * * `expandedItems` (Item[]) - Use it to represent the expanded state of items.\n * * `onExpandableItemToggle` (TableProps.OnExpandableItemToggle<T>) - Called when an item's expand toggle is clicked.\n */\n expandableRows?: TableProps.ExpandableRows<T>;\n\n /**\n * A function that specifies the current status of loading more items. It is called once for the entire\n * table with `item=null` and then for each expanded item. The function result is one of the four possible states:\n * * `pending` - Indicates that no request in progress, but more options may be loaded.\n * * `loading` - Indicates that data fetching is in progress.\n * * `finished` - Indicates that loading has finished and no more requests are expected.\n * * `error` - Indicates that an error occurred during fetch.\n **/\n getLoadingStatus?: TableProps.GetLoadingStatus<T>;\n /**\n * Renders loader row content for pending state.\n */\n renderLoaderPending?: (detail: TableProps.RenderLoaderDetail<T>) => React.ReactNode;\n /**\n * Renders loader row content for loading state.\n */\n renderLoaderLoading?: (detail: TableProps.RenderLoaderDetail<T>) => React.ReactNode;\n /**\n * Renders loader row content for error state.\n */\n renderLoaderError?: (detail: TableProps.RenderLoaderDetail<T>) => React.ReactNode;\n /**\n * Renders loader row content for empty row state: the loading status is \"finished\",\n * and the row is expanded but has empty children array.\n *\n * The empty loader state is only supported for expandable rows. Use `empty` slot if\n * the table items array is empty.\n */\n renderLoaderEmpty?: (detail: TableProps.RenderLoaderEmptyDetail<T>) => React.ReactNode;\n}\n\nexport namespace TableProps {\n export interface AnalyticsMetadata {\n instanceIdentifier?: string;\n flowType?: 'view-resource';\n }\n\n export type TrackBy<T> = string | ((item: T) => string);\n\n export interface CellContext<V> {\n currentValue: Optional<V>;\n setValue: (value: V | undefined) => void;\n }\n\n export interface EditConfig<T, V = any> {\n /**\n * Specifies a label for the edit control. Visually hidden but read\n * by screen readers.\n */\n ariaLabel?: string;\n /**\n * Specifies an ariaLabel for the error icon that is displayed when\n * the validation fails.\n */\n errorIconAriaLabel?: string;\n /**\n * Specifies an alternate text for the edit icon used in column header.\n */\n editIconAriaLabel?: string;\n /**\n * Constraint text that is displayed below the edit control.\n */\n constraintText?: string;\n /**\n * A function that allows you to validate the value of the edit control. Return\n * a string from the function to display an error message. Return\n * `undefined` (or no return) from the function to indicate that the value is valid.\n * @param item - The item that is being edited.\n * @param value - The current value of the edit control.\n */\n validation?: (item: T, value: Optional<V>) => Optional<string>;\n\n /**\n * Determines the display of a cell's content when inline edit is active.\n */\n editingCell(item: T, ctx: TableProps.CellContext<any>): React.ReactNode;\n\n /**\n * Determines whether inline edit for certain items is disabled, and provides a reason why.\n */\n disabledReason?: (item: T) => string | undefined;\n }\n\n export type ColumnDefinition<ItemType> = {\n id?: string;\n header: React.ReactNode;\n ariaLabel?(data: LabelData): string;\n width?: number | string;\n minWidth?: number | string;\n maxWidth?: number | string;\n editConfig?: EditConfig<ItemType>;\n isRowHeader?: boolean;\n verticalAlign?: VerticalAlign;\n hasDynamicContent?: boolean;\n cell(item: ItemType): React.ReactNode;\n } & SortingColumn<ItemType>;\n\n export interface StickyColumns {\n first?: number;\n last?: number;\n }\n\n export type VerticalAlign = 'middle' | 'top';\n export type SelectionType = 'single' | 'multi';\n export type Variant = 'container' | 'embedded' | 'borderless' | 'stacked' | 'full-page';\n export interface SelectionState<T> {\n selectedItems: ReadonlyArray<T>;\n }\n export interface SelectionChangeDetail<T> {\n selectedItems: T[];\n }\n export type IsItemDisabled<T> = (item: T) => boolean;\n export interface AriaLabels<T> {\n allItemsSelectionLabel?: (data: TableProps.SelectionState<T>) => string;\n itemSelectionLabel?: (data: TableProps.SelectionState<T>, row: T) => string;\n selectionGroupLabel?: string;\n tableLabel?: string;\n resizerRoleDescription?: string;\n // do not use <T> to prevent overly strict validation on consumer end\n // it works, practically, we are only interested in `id` and `header` properties only\n activateEditLabel?: (column: ColumnDefinition<any>, item: T) => string;\n cancelEditLabel?: (column: ColumnDefinition<any>) => string;\n submitEditLabel?: (column: ColumnDefinition<any>) => string;\n submittingEditText?: (column: ColumnDefinition<any>) => string;\n successfulEditLabel?: (column: ColumnDefinition<any>) => string;\n expandButtonLabel?: (item: T) => string;\n collapseButtonLabel?: (item: T) => string;\n }\n export interface SortingState<T> {\n isDescending?: boolean;\n sortingColumn: SortingColumn<T>;\n }\n export interface SortingColumn<T> {\n sortingField?: string;\n sortingComparator?: (a: T, b: T) => number;\n }\n export interface LabelData {\n sorted: boolean;\n descending: boolean;\n disabled: boolean;\n }\n export interface OnRowClickDetail<T> {\n rowIndex: number;\n item: T;\n }\n export interface OnRowContextMenuDetail<T> {\n rowIndex: number;\n item: T;\n clientX: number;\n clientY: number;\n }\n\n export interface ColumnWidthsChangeDetail {\n widths: ReadonlyArray<number>;\n }\n\n export interface LiveAnnouncement {\n firstIndex: number;\n lastIndex: number;\n visibleItemsCount: number;\n totalItemsCount?: number;\n }\n\n export interface Ref {\n /**\n * When the sticky header is enabled and you call this function, the table\n * scroll parent scrolls to reveal the first row of the table.\n */\n scrollToTop(): void;\n\n /**\n * Dismiss an inline edit if currently active.\n */\n cancelEdit?(): void;\n }\n\n export type SubmitEditFunction<ItemType, ValueType = unknown> = (\n item: ItemType,\n column: ColumnDefinition<ItemType>,\n newValue: ValueType\n ) => Promise<void> | void;\n\n export interface ColumnDisplayProperties {\n id: string;\n visible: boolean;\n }\n\n export interface ExpandableRows<T> {\n getItemChildren: (item: T) => readonly T[];\n isItemExpandable: (item: T) => boolean;\n expandedItems: ReadonlyArray<T>;\n onExpandableItemToggle: TableProps.OnExpandableItemToggle<T>;\n }\n\n export type OnExpandableItemToggle<T> = NonCancelableEventHandler<TableProps.ExpandableItemToggleDetail<T>>;\n\n export interface ExpandableItemToggleDetail<T> {\n item: T;\n expanded: boolean;\n }\n\n export type GetLoadingStatus<T> = (item: null | T) => TableProps.LoadingStatus;\n\n export type LoadingStatus = 'pending' | 'loading' | 'error' | 'finished';\n\n export interface RenderLoaderDetail<T> {\n item: null | T;\n }\n\n export interface RenderLoaderEmptyDetail<T> {\n item: T;\n }\n}\n\nexport type TableRow<T> = TableDataRow<T> | TableLoaderRow<T>;\n\ninterface TableDataRow<T> {\n type: 'data';\n item: T;\n}\n\ninterface TableLoaderRow<T> {\n type: 'loader';\n item: null | T;\n level: number;\n status: TableProps.LoadingStatus;\n from: number;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/table/interfaces.tsx"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseComponentProps } from '../internal/base-component';\nimport { CancelableEventHandler, NonCancelableEventHandler } from '../internal/events';\nimport { Optional } from '../internal/types';\nimport ColumnDisplayProperties = TableProps.ColumnDisplayProperties;\n\n/*\n * HACK: Cast the component to a named parametrized interface.\n *\n * This lets us use React.forwardRef and still let the component have type\n * parameters, and the naming convention lets the documenter know that this is\n * a forwardRef-wrapped component.\n *\n * We don't need to expose this type to customers because it's just a simple\n * function type.\n */\nexport interface TableForwardRefType {\n <T>(props: TableProps<T> & { ref?: React.Ref<TableProps.Ref> }): JSX.Element;\n}\n\nexport interface TableProps<T = any> extends BaseComponentProps {\n /**\n * Specifies additional analytics-related metadata.\n * * `instanceIdentifier` - A unique string that identifies this component instance in your application.\n * * `flowType` - Identifies the type of flow represented by the component.\n * * `resourceType` - Identifies the type of resource represented by the flow. **Note:** This API is currently experimental.\n * @analytics\n */\n analyticsMetadata?: TableProps.AnalyticsMetadata;\n /**\n * Heading element of the table container. Use the [header component](/components/header/).\n */\n header?: React.ReactNode;\n\n /**\n * Footer of the table container.\n */\n footer?: React.ReactNode;\n\n /**\n * Displayed when the `items` property is an empty array. Use it to render an empty or no-match state.\n */\n empty?: React.ReactNode;\n\n /**\n * Specifies the data that's displayed in the table rows. Each item contains the data for one row. The display of a row is handled\n * by the `cell` property of each column definition in the `columnDefinitions` property.\n */\n items: ReadonlyArray<T>;\n\n /**\n * Renders the table in a loading state. We recommend that you also set a `loadingText`.\n */\n loading?: boolean;\n\n /**\n * Specifies the text that's displayed when the table is in a loading state.\n */\n loadingText?: string;\n\n /**\n * Specifies a property that uniquely identifies an individual item.\n * When it's set, it's used to provide [keys for React](https://reactjs.org/docs/lists-and-keys.html#keys)\n * for performance optimizations.\n *\n * It is also used in the following situations:\n * - to connect `items` and `selectedItems` values when they reference different objects.\n * - to connect `items` and `expandableRows.expandedItems` values when they reference different objects.\n * - to attach successful edit state to the correct item if its row index changes after editing.\n */\n trackBy?: TableProps.TrackBy<T>;\n\n /**\n * The columns configuration object\n * * `id` (string) - Specifies a unique column identifier. The property is used 1) as a [keys](https://reactjs.org/docs/lists-and-keys.html#keys) source for React rendering,\n * and 2) to match entries in the `columnDisplay` property, if defined.\n * * `header` (ReactNode) - Determines the display of the column header.\n * * `cell` ((item) => ReactNode) - Determines the display of a cell's content. You receive the current table row\n * item as an argument.\n * * `width` (string | number) - Specifies the column width. Corresponds to the `width` css-property. If the width is not set,\n * the browser automatically adjusts the column width based on the content. When `resizableColumns` property is\n * set to `true`, additional constraints apply: 1) string values are not allowed, and 2) the last visible column always\n * fills the remaining space of the table so the specified width is ignored.\n * * `minWidth` (string | number) - Specifies the minimum column width. Corresponds to the `min-width` css-property. When\n * `resizableColumns` property is set to `true`, additional constraints apply: 1) string values are not allowed,\n * and 2) the column can't resize below than the specified width (defaults to \"120px\"). We recommend that you set a minimum width\n * of at least 176px for columns that are editable.\n * * `maxWidth` (string | number) - Specifies the maximum column width. Corresponds to the `max-width` css-property.\n * Note that when the `resizableColumns` property is set to `true` this property is ignored.\n * * `ariaLabel` (LabelData => string) - An optional function that's called to provide an `aria-label` for the cell header.\n * It receives the current sorting state of this column, the direction it's sorted in, and an indication of\n * whether the sorting is disabled, as three Boolean values: `sorted`, `descending` and `disabled`.\n * We recommend that you use this for sortable columns to provide more meaningful labels based on the\n * current sorting direction.\n * * `sortingField` (string) - Enables default column sorting. The value is used in [collection hooks](/get-started/dev-guides/collection-hooks/)\n * to reorder the items. Provide the name of the property within each item that should be used for sorting by this column.\n * For more complex sorting use `sortingComparator` instead.\n * * `sortingComparator` ((T, T) => number) - Enables custom column sorting. The value is used in [collection hooks](/get-started/dev-guides/collection-hooks/)\n * to reorder the items. This property accepts a custom comparator that is used to compare two items.\n * The comparator must implement ascending ordering, and the output is inverted automatically in case of descending order.\n * If present, the `sortingField` property is ignored.\n * * `editConfig` (EditConfig) - Enables inline editing in column when present. The value is used to configure the editing behavior.\n * * `editConfig.ariaLabel` (string) - Specifies a label for the edit control. Visually hidden but read by screen readers.\n * * `editConfig.errorIconAriaLabel` (string) - Specifies an ariaLabel for the error icon that is displayed when the validation fails.\n * * `editConfig.editIconAriaLabel` (string) - Specifies an alternate text for the edit icon used in column header.\n * * `editConfig.constraintText` (string) - Constraint text that is displayed below the edit control.\n * * `editConfig.disabledReason` ((item) => string | undefined) - A function that determines whether inline edit for certain items is disabled, and provides a reason why.\n * Return a string from the function to disable inline edit with a reason. Return `undefined` (or no return) from the function allow inline edit.\n * * `editConfig.validation` ((item, value) => string) - A function that allows you to validate the value of the edit control.\n * Return a string from the function to display an error message. Return `undefined` (or no return) from the function to indicate that the value is valid.\n * * `editConfig.editingCell` ((item, cellContext) => ReactNode) - Determines the display of a cell's content when inline editing is active on a cell;\n * You receive the current table row `item` and a `cellContext` object as arguments.\n * The `cellContext` object contains the following properties:\n * * `cellContext.currentValue` - State to keep track of a value in input fields while editing.\n * * `cellContext.setValue` - Function to update `currentValue`. This should be called when the value in input field changes.\n * * `isRowHeader` (boolean) - Specifies that cells in this column should be used as row headers.\n * * `hasDynamicContent` (boolean) - Specifies that cells in this column may have dynamic content. The contents will then be observed to update calculated column widths.\n * This may have a negative performance impact, so should be used only if necessary. It has no effect if `resizableColumns` is set to `true`.\n * * `verticalAlign` ('middle' | 'top') - Determines the alignment of the content in the table cell.\n */\n columnDefinitions: ReadonlyArray<TableProps.ColumnDefinition<T>>;\n\n /**\n * Determines the alignment of the content inside table cells.\n * This property affects all cells, including the ones in the selection column.\n * To target individual cells use `columnDefinitions.verticalAlign`, that takes precedence over `cellVerticalAlign`.\n */\n cellVerticalAlign?: 'middle' | 'top';\n\n /**\n * Specifies the selection type (`'single' | 'multi'`).\n */\n selectionType?: TableProps.SelectionType;\n /**\n * List of selected items.\n */\n selectedItems?: ReadonlyArray<T>;\n\n /**\n * Use this slot to add filtering controls to the table.\n */\n filter?: React.ReactNode;\n\n /**\n * Use this slot to add the [pagination component](/components/pagination/) to the table.\n */\n pagination?: React.ReactNode;\n\n /**\n * Use this slot to add [collection preferences](/components/collection-preferences/) to the table.\n */\n preferences?: React.ReactNode;\n\n /**\n * Determines whether a given item is disabled. If an item is disabled, the user can't select it.\n */\n isItemDisabled?: TableProps.IsItemDisabled<T>;\n\n /**\n * Specifies if text wraps within table cells. If set to `true`, long text within cells may wrap onto\n * multiple lines instead of being truncated with an ellipsis.\n */\n wrapLines?: boolean;\n\n /**\n * Specifies if table rows alternate being shaded and unshaded. If set to `true`, every other row will be shaded.\n */\n stripedRows?: boolean;\n\n /**\n * Toggles the content density of the table. Defaults to `'comfortable'`.\n */\n contentDensity?: 'comfortable' | 'compact';\n\n /**\n * Specifies if columns can be resized. If set to `true`, users can resize the columns in the table.\n */\n resizableColumns?: boolean;\n\n /**\n * Specifies alternative text for the selection components (checkboxes and radio buttons) as follows:\n * * `itemSelectionLabel` ((SelectionState, Item) => string) - Specifies the alternative text for an item.\n * * `allItemsSelectionLabel` ((SelectionState) => string) - Specifies the alternative text for multi-selection column header.\n * * `selectionGroupLabel` (string) - Specifies the alternative text for the whole selection and single-selection column header.\n * It is prefixed to `itemSelectionLabel` and `allItemsSelectionLabel` when they are set.\n * You can use the first argument of type `SelectionState` to access the current selection\n * state of the component (for example, the `selectedItems` list). The `itemSelectionLabel` for individual\n * items also receives the corresponding `Item` object. You can use the `selectionGroupLabel` to\n * add a meaningful description to the whole selection.\n * * `tableLabel` (string) - Provides an alternative text for the table. If you use a header for this table, you may reuse the string\n * to provide a caption-like description. For example, tableLabel=Instances will be announced as 'Instances table'.\n * * `resizerRoleDescription` (string) - Provides role description for table column resizer buttons.\n * * `activateEditLabel` (EditableColumnDefinition, Item) => string -\n * Specifies an alternative text for the edit button in editable cells.\n * * `cancelEditLabel` (EditableColumnDefinition) => string -\n * Specifies an alternative text for the cancel button in editable cells.\n * * `submitEditLabel` (EditableColumnDefinition) => string -\n * Specifies an alternative text for the submit button in editable cells.\n * * `successfulEditLabel` (EditableColumnDefinition) => string -\n * Specifies an alternative text for the success icon in editable cells. This text is also announced to screen readers.\n * * `submittingEditText` (EditableColumnDefinition) => string -\n * Specifies a text that is announced to screen readers when a cell edit operation is submitted.\n * * `expandButtonLabel` (Item) => string - Specifies an alternative text for row expand button.\n * * `collapseButtonLabel` (Item) => string - Specifies an alternative text for row collapse button.\n * @i18n\n */\n ariaLabels?: TableProps.AriaLabels<T>;\n\n /**\n * Specifies the definition object of the currently sorted column. Make sure you pass an object that's\n * present in the `columnDefinitions` array.\n */\n sortingColumn?: TableProps.SortingColumn<T>;\n /**\n * Specifies whether to use a descending sort order.\n */\n sortingDescending?: boolean;\n /**\n * Specifies if sorting buttons are disabled. For example, use this property\n * to prevent the user from sorting before items are fully loaded.\n */\n sortingDisabled?: boolean;\n\n /**\n * Specifies the number of first and/or last columns that should be sticky.\n *\n * If the available scrollable space is less than a certain threshold, the feature is deactivated.\n *\n * Use it in conjunction with the sticky columns preference of the\n * [collection preferences](/components/collection-preferences/) component.\n *\n */\n stickyColumns?: TableProps.StickyColumns;\n\n /**\n * Specifies an array that represents the table columns in the order in which they will be displayed, together with their visibility.\n *\n * If not set, all columns are displayed and the order is dictated by the `columnDefinitions` property.\n *\n * Use it in conjunction with the content display preference of the [collection preferences](/components/collection-preferences/) component.\n */\n columnDisplay?: ReadonlyArray<ColumnDisplayProperties>;\n\n /**\n * Specifies an array containing the `id`s of visible columns. If not set, all columns are displayed.\n *\n * Use it in conjunction with the visible content preference of the [collection preferences](/components/collection-preferences/) component.\n *\n * The order of ids doesn't influence the order in which columns are displayed - this is dictated by the `columnDefinitions` property.\n *\n * @deprecated Replaced by `columnDisplay`.\n */\n visibleColumns?: ReadonlyArray<string>;\n\n /**\n * Fired when the user resizes a table column. The event detail contains an array of column widths in pixels,\n * including the hidden via preferences columns. Use this event to persist the column widths.\n */\n onColumnWidthsChange?: NonCancelableEventHandler<TableProps.ColumnWidthsChangeDetail>;\n\n /**\n * Called when either the column to sort by or the direction of sorting changes upon user interaction.\n * The event detail contains the current sortingColumn and isDescending.\n */\n onSortingChange?: NonCancelableEventHandler<TableProps.SortingState<T>>;\n\n /**\n * Fired when a user interaction triggers a change in the list of selected items.\n * The event `detail` contains the current list of `selectedItems`.\n */\n onSelectionChange?: NonCancelableEventHandler<TableProps.SelectionChangeDetail<T>>;\n\n /**\n * Note: This feature is provided for backwards compatibility. Its use is not recommended,\n * and it may be deprecated in the future.\n *\n * Called when the user clicked at a table row. The event detail contains the index of the\n * clicked row and the row object itself. Use this event to define a row click behavior.\n */\n onRowClick?: NonCancelableEventHandler<TableProps.OnRowClickDetail<T>>;\n\n /**\n * Note: This feature is provided for backwards compatibility. Its use is not recommended,\n * and it may be deprecated in the future.\n *\n * Called when the user clicked at a table row with the right mouse click. The event detail\n * contains the index of the clicked row and the row object itself. Use this event to override\n * the default browser context menu behavior.\n */\n onRowContextMenu?: CancelableEventHandler<TableProps.OnRowContextMenuDetail<T>>;\n\n /**\n * If set to `true`, the table header remains visible when the user scrolls down.\n *\n * Do not use `stickyHeader` conditionally. Instead, keep its value constant during the component lifecycle.\n */\n stickyHeader?: boolean;\n\n /**\n * Specifies a vertical offset (in pixels) for the sticky header. For example, use this if you\n * need to position the sticky header below other fixed position elements on the page.\n */\n stickyHeaderVerticalOffset?: number;\n\n /**\n * Specify a table variant with one of the following:\n * * `container` - Use this variant to have the table displayed within a container.\n * * `borderless` - Use this variant when the table should have no outer borders or shadow\n * (such as in a dashboard item container).\n * * `embedded` - Use this variant within a parent container (such as a modal, expandable\n * section, container or split panel).\n * **Deprecated**, replaced by `borderless` and `container`.\n * * `stacked` - Use this variant adjacent to other stacked containers (such as a container,\n * table).\n * * `full-page` – Use this variant when the table is the entire content of a page.\n * @visualrefresh `embedded`, `stacked`, and `full-page` variants\n */\n variant?: TableProps.Variant;\n\n /**\n * Use this property to inform screen readers how many items there are in a table.\n * It specifies the total count of all items in a table.\n * If there is an unknown total of items in a table, leave this property undefined.\n */\n totalItemsCount?: number;\n /**\n * Use this property to inform screen readers which range of items is currently displayed in the table.\n * It specifies the index (1-based) of the first item in the table.\n */\n firstIndex?: number;\n /**\n * Use this function to announce page changes to screen reader users.\n * The function argument takes the following properties:\n * * `firstIndex` (number) - The provided `firstIndex` property which defaults to 1 when not defined.\n * * `lastIndex` (number) - The index of the last visible item of the table.\n * * `visibleItemsCount` (number) - The number of rendered table items.\n * * `totalItemsCount` (optional, number) - The provided `totalItemsCount` property.\n * Important: in tables with expandable rows the `firstIndex`, `lastIndex`, and `totalItemsCount` reflect the top-level items only.\n */\n renderAriaLive?: (data: TableProps.LiveAnnouncement) => string;\n /**\n * Specifies a function that will be called after user submits an inline edit.\n * Return a promise to keep loading state while the submit request is in progress.\n */\n submitEdit?: TableProps.SubmitEditFunction<T>;\n\n /**\n * Called whenever user cancels an inline edit. Use this function to reset any\n * validation states, or show warning for unsaved changes.\n */\n onEditCancel?: CancelableEventHandler;\n\n /**\n * Use this property to activate advanced keyboard navigation and focusing behaviors.\n * When set to `true`, table cells become navigable with arrow keys, and the entire table has a single tab stop.\n *\n * By default, the keyboard navigation is active for tables with expandable rows.\n */\n enableKeyboardNavigation?: boolean;\n\n /**\n * Use this property to define expandable table rows. The expandableRows configuration object consists of:\n * * `getItemChildren` ((Item) => Item[]) - Use it to define nested data that are shown when an item gets expanded.\n * * `isItemExpandable` ((Item) => boolean) - Use it for items that can be expanded to show nested data.\n * * `expandedItems` (Item[]) - Use it to represent the expanded state of items.\n * * `onExpandableItemToggle` (TableProps.OnExpandableItemToggle<T>) - Called when an item's expand toggle is clicked.\n */\n expandableRows?: TableProps.ExpandableRows<T>;\n\n /**\n * A function that specifies the current status of loading more items. It is called once for the entire\n * table with `item=null` and then for each expanded item. The function result is one of the four possible states:\n * * `pending` - Indicates that no request in progress, but more options may be loaded.\n * * `loading` - Indicates that data fetching is in progress.\n * * `finished` - Indicates that loading has finished and no more requests are expected.\n * * `error` - Indicates that an error occurred during fetch.\n **/\n getLoadingStatus?: TableProps.GetLoadingStatus<T>;\n /**\n * Renders loader row content for pending state.\n */\n renderLoaderPending?: (detail: TableProps.RenderLoaderDetail<T>) => React.ReactNode;\n /**\n * Renders loader row content for loading state.\n */\n renderLoaderLoading?: (detail: TableProps.RenderLoaderDetail<T>) => React.ReactNode;\n /**\n * Renders loader row content for error state.\n */\n renderLoaderError?: (detail: TableProps.RenderLoaderDetail<T>) => React.ReactNode;\n /**\n * Renders loader row content for empty row state: the loading status is \"finished\",\n * and the row is expanded but has empty children array.\n *\n * The empty loader state is only supported for expandable rows. Use `empty` slot if\n * the table items array is empty.\n */\n renderLoaderEmpty?: (detail: TableProps.RenderLoaderEmptyDetail<T>) => React.ReactNode;\n}\n\nexport namespace TableProps {\n export interface AnalyticsMetadata {\n instanceIdentifier?: string;\n flowType?: 'view-resource';\n resourceType?: string;\n }\n\n export type TrackBy<T> = string | ((item: T) => string);\n\n export interface CellContext<V> {\n currentValue: Optional<V>;\n setValue: (value: V | undefined) => void;\n }\n\n export interface EditConfig<T, V = any> {\n /**\n * Specifies a label for the edit control. Visually hidden but read\n * by screen readers.\n */\n ariaLabel?: string;\n /**\n * Specifies an ariaLabel for the error icon that is displayed when\n * the validation fails.\n */\n errorIconAriaLabel?: string;\n /**\n * Specifies an alternate text for the edit icon used in column header.\n */\n editIconAriaLabel?: string;\n /**\n * Constraint text that is displayed below the edit control.\n */\n constraintText?: string;\n /**\n * A function that allows you to validate the value of the edit control. Return\n * a string from the function to display an error message. Return\n * `undefined` (or no return) from the function to indicate that the value is valid.\n * @param item - The item that is being edited.\n * @param value - The current value of the edit control.\n */\n validation?: (item: T, value: Optional<V>) => Optional<string>;\n\n /**\n * Determines the display of a cell's content when inline edit is active.\n */\n editingCell(item: T, ctx: TableProps.CellContext<any>): React.ReactNode;\n\n /**\n * Determines whether inline edit for certain items is disabled, and provides a reason why.\n */\n disabledReason?: (item: T) => string | undefined;\n }\n\n export type ColumnDefinition<ItemType> = {\n id?: string;\n header: React.ReactNode;\n ariaLabel?(data: LabelData): string;\n width?: number | string;\n minWidth?: number | string;\n maxWidth?: number | string;\n editConfig?: EditConfig<ItemType>;\n isRowHeader?: boolean;\n verticalAlign?: VerticalAlign;\n hasDynamicContent?: boolean;\n cell(item: ItemType): React.ReactNode;\n } & SortingColumn<ItemType>;\n\n export interface StickyColumns {\n first?: number;\n last?: number;\n }\n\n export type VerticalAlign = 'middle' | 'top';\n export type SelectionType = 'single' | 'multi';\n export type Variant = 'container' | 'embedded' | 'borderless' | 'stacked' | 'full-page';\n export interface SelectionState<T> {\n selectedItems: ReadonlyArray<T>;\n }\n export interface SelectionChangeDetail<T> {\n selectedItems: T[];\n }\n export type IsItemDisabled<T> = (item: T) => boolean;\n export interface AriaLabels<T> {\n allItemsSelectionLabel?: (data: TableProps.SelectionState<T>) => string;\n itemSelectionLabel?: (data: TableProps.SelectionState<T>, row: T) => string;\n selectionGroupLabel?: string;\n tableLabel?: string;\n resizerRoleDescription?: string;\n // do not use <T> to prevent overly strict validation on consumer end\n // it works, practically, we are only interested in `id` and `header` properties only\n activateEditLabel?: (column: ColumnDefinition<any>, item: T) => string;\n cancelEditLabel?: (column: ColumnDefinition<any>) => string;\n submitEditLabel?: (column: ColumnDefinition<any>) => string;\n submittingEditText?: (column: ColumnDefinition<any>) => string;\n successfulEditLabel?: (column: ColumnDefinition<any>) => string;\n expandButtonLabel?: (item: T) => string;\n collapseButtonLabel?: (item: T) => string;\n }\n export interface SortingState<T> {\n isDescending?: boolean;\n sortingColumn: SortingColumn<T>;\n }\n export interface SortingColumn<T> {\n sortingField?: string;\n sortingComparator?: (a: T, b: T) => number;\n }\n export interface LabelData {\n sorted: boolean;\n descending: boolean;\n disabled: boolean;\n }\n export interface OnRowClickDetail<T> {\n rowIndex: number;\n item: T;\n }\n export interface OnRowContextMenuDetail<T> {\n rowIndex: number;\n item: T;\n clientX: number;\n clientY: number;\n }\n\n export interface ColumnWidthsChangeDetail {\n widths: ReadonlyArray<number>;\n }\n\n export interface LiveAnnouncement {\n firstIndex: number;\n lastIndex: number;\n visibleItemsCount: number;\n totalItemsCount?: number;\n }\n\n export interface Ref {\n /**\n * When the sticky header is enabled and you call this function, the table\n * scroll parent scrolls to reveal the first row of the table.\n */\n scrollToTop(): void;\n\n /**\n * Dismiss an inline edit if currently active.\n */\n cancelEdit?(): void;\n }\n\n export type SubmitEditFunction<ItemType, ValueType = unknown> = (\n item: ItemType,\n column: ColumnDefinition<ItemType>,\n newValue: ValueType\n ) => Promise<void> | void;\n\n export interface ColumnDisplayProperties {\n id: string;\n visible: boolean;\n }\n\n export interface ExpandableRows<T> {\n getItemChildren: (item: T) => readonly T[];\n isItemExpandable: (item: T) => boolean;\n expandedItems: ReadonlyArray<T>;\n onExpandableItemToggle: TableProps.OnExpandableItemToggle<T>;\n }\n\n export type OnExpandableItemToggle<T> = NonCancelableEventHandler<TableProps.ExpandableItemToggleDetail<T>>;\n\n export interface ExpandableItemToggleDetail<T> {\n item: T;\n expanded: boolean;\n }\n\n export type GetLoadingStatus<T> = (item: null | T) => TableProps.LoadingStatus;\n\n export type LoadingStatus = 'pending' | 'loading' | 'error' | 'finished';\n\n export interface RenderLoaderDetail<T> {\n item: null | T;\n }\n\n export interface RenderLoaderEmptyDetail<T> {\n item: T;\n }\n}\n\nexport type TableRow<T> = TableDataRow<T> | TableLoaderRow<T>;\n\ninterface TableDataRow<T> {\n type: 'data';\n item: T;\n}\n\ninterface TableLoaderRow<T> {\n type: 'loader';\n item: null | T;\n level: number;\n status: TableProps.LoadingStatus;\n from: number;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/table/internal.tsx"],"names":[],"mappings":"AAoCA,OAAO,EAAE,mBAAmB,EAAwB,MAAM,cAAc,CAAC;AA2CzE,eAAO,MAAM,sBAAsB,qBAWX,CAAC;AAEzB,QAAA,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/table/internal.tsx"],"names":[],"mappings":"AAoCA,OAAO,EAAE,mBAAmB,EAAwB,MAAM,cAAc,CAAC;AA2CzE,eAAO,MAAM,sBAAsB,qBAWX,CAAC;AAEzB,QAAA,MAAM,aAAa,qBA4nBK,CAAC;AAEzB,eAAe,aAAa,CAAC"}
|
|
@@ -122,14 +122,15 @@ const InternalTable = React.forwardRef((_a, ref) => {
|
|
|
122
122
|
});
|
|
123
123
|
};
|
|
124
124
|
const getComponentConfiguration = () => {
|
|
125
|
-
var _a, _b;
|
|
125
|
+
var _a, _b, _c;
|
|
126
126
|
const filterData = filterRef.current;
|
|
127
127
|
const paginationData = paginationRef.current;
|
|
128
128
|
return {
|
|
129
129
|
variant,
|
|
130
130
|
flowType: (_a = rest.analyticsMetadata) === null || _a === void 0 ? void 0 : _a.flowType,
|
|
131
|
+
resourceType: (_b = rest.analyticsMetadata) === null || _b === void 0 ? void 0 : _b.resourceType,
|
|
131
132
|
instanceIdentifier: analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.instanceIdentifier,
|
|
132
|
-
taskName: (
|
|
133
|
+
taskName: (_c = analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.instanceIdentifier) !== null && _c !== void 0 ? _c : getHeaderText(),
|
|
133
134
|
patternIdentifier: getPatternIdentifier(),
|
|
134
135
|
sortedBy: {
|
|
135
136
|
columnId: sortingColumn === null || sortingColumn === void 0 ? void 0 : sortingColumn.sortingField,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/table/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AACzE,OAAO,EAEL,6BAA6B,GAC9B,MAAM,kEAAkE,CAAC;AAE1E,OAAO,iBAA6C,MAAM,uBAAuB,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,yBAAyB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AACtF,OAAO,EAAE,yBAAyB,EAAE,MAAM,kDAAkD,CAAC;AAC7F,OAAO,EAA4B,8BAA8B,EAAE,M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AC,CAAC,CACH,CACK,CACF,CACe;wBAExB,gBAAgB,IAAI,oBAAC,aAAa,OAAG,CAClC;oBAEN,oBAAC,eAAe,IACd,GAAG,EAAE,YAAY,EACjB,UAAU,EAAE,gBAAgB,EAC5B,QAAQ,EAAE,cAAc,EACxB,QAAQ,EAAE,YAAY,EACtB,gBAAgB,EAAE,gBAAgB,GAClC,CACgB,CACC,CACQ,CACE,CACtC,CAAC;AACJ,CAAC,CACqB,CAAC;AAEzB,eAAe,aAAa,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useImperativeHandle, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useContainerQuery } from '@cloudscape-design/component-toolkit';\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\nimport {\n GeneratedAnalyticsMetadataFragment,\n getAnalyticsMetadataAttribute,\n} from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport InternalContainer, { InternalContainerProps } from '../container/internal';\nimport { useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\nimport { getAnalyticsMetadataProps, getBaseProps } from '../internal/base-component';\nimport { getVisualContextClassname } from '../internal/components/visual-context';\nimport { CollectionLabelContext } from '../internal/context/collection-label-context';\nimport { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';\nimport { FilterRef, PaginationRef, TableComponentsContextProvider } from '../internal/context/table-component-context';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport useMouseDownTarget from '../internal/hooks/use-mouse-down-target';\nimport { usePerformanceMarks } from '../internal/hooks/use-performance-marks';\nimport { usePrevious } from '../internal/hooks/use-previous';\nimport { useScrollSync } from '../internal/hooks/use-scroll-sync';\nimport { useTableInteractionMetrics } from '../internal/hooks/use-table-interaction-metrics';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { isDevelopment } from '../internal/is-development';\nimport { SomeRequired } from '../internal/types';\nimport InternalLiveRegion from '../live-region/internal';\nimport { GeneratedAnalyticsMetadataTableComponent } from './analytics-metadata/interfaces';\nimport { TableBodyCell } from './body-cell';\nimport { checkColumnWidths } from './column-widths-utils';\nimport { useExpandableTableProps } from './expandable-rows/expandable-rows-utils';\nimport { TableForwardRefType, TableProps, TableRow } from './interfaces';\nimport { NoDataCell } from './no-data-cell';\nimport { getLoaderContent } from './progressive-loading/items-loader';\nimport { TableLoaderCell } from './progressive-loading/loader-cell';\nimport { useProgressiveLoadingProps } from './progressive-loading/progressive-loading-utils';\nimport { ResizeTracker } from './resizer';\nimport { focusMarkers, useSelection, useSelectionFocusMove } from './selection';\nimport { TableBodySelectionCell } from './selection/selection-cell';\nimport { useStickyColumns } from './sticky-columns';\nimport StickyHeader, { StickyHeaderRef } from './sticky-header';\nimport { StickyScrollbar } from './sticky-scrollbar';\nimport {\n getTableRoleProps,\n getTableRowRoleProps,\n getTableWrapperRoleProps,\n GridNavigationProvider,\n TableRole,\n} from './table-role';\nimport Thead, { TheadProps } from './thead';\nimport ToolsHeader from './tools-header';\nimport { useCellEditing } from './use-cell-editing';\nimport { ColumnWidthDefinition, ColumnWidthsProvider, DEFAULT_COLUMN_WIDTH } from './use-column-widths';\nimport { usePreventStickyClickScroll } from './use-prevent-sticky-click-scroll';\nimport { useRowEvents } from './use-row-events';\nimport useTableFocusNavigation from './use-table-focus-navigation';\nimport { checkSortingState, getColumnKey, getItemKey, getVisibleColumnDefinitions, toContainerVariant } from './utils';\n\nimport buttonStyles from '../button/styles.css.js';\nimport headerStyles from '../header/styles.css.js';\nimport styles from './styles.css.js';\n\nconst GRID_NAVIGATION_PAGE_SIZE = 10;\nconst SELECTION_COLUMN_WIDTH = 54;\nconst selectionColumnId = Symbol('selection-column-id');\n\ntype InternalTableProps<T> = SomeRequired<\n TableProps<T>,\n 'items' | 'selectedItems' | 'variant' | 'firstIndex' | 'cellVerticalAlign'\n> &\n InternalBaseComponentProps & {\n __funnelSubStepProps?: InternalContainerProps['__funnelSubStepProps'];\n };\n\nexport const InternalTableAsSubstep = React.forwardRef(\n <T,>(props: InternalTableProps<T>, ref: React.Ref<TableProps.Ref>) => {\n const { funnelSubStepProps } = useFunnelSubStep();\n\n const tableProps: InternalTableProps<T> = {\n ...props,\n __funnelSubStepProps: funnelSubStepProps,\n };\n\n return <InternalTable {...tableProps} ref={ref} />;\n }\n) as TableForwardRefType;\n\nconst InternalTable = React.forwardRef(\n <T,>(\n {\n header,\n footer,\n empty,\n filter,\n pagination,\n preferences,\n items,\n columnDefinitions,\n trackBy,\n loading,\n loadingText,\n selectionType,\n selectedItems,\n isItemDisabled,\n ariaLabels,\n onSelectionChange,\n onSortingChange,\n sortingColumn,\n sortingDescending,\n sortingDisabled,\n visibleColumns,\n stickyHeader,\n stickyHeaderVerticalOffset,\n onRowClick,\n onRowContextMenu,\n wrapLines,\n stripedRows,\n contentDensity,\n submitEdit,\n onEditCancel,\n resizableColumns,\n onColumnWidthsChange,\n variant,\n __internalRootRef,\n totalItemsCount,\n firstIndex,\n renderAriaLive,\n stickyColumns,\n columnDisplay,\n enableKeyboardNavigation,\n expandableRows,\n getLoadingStatus,\n renderLoaderPending,\n renderLoaderLoading,\n renderLoaderError,\n renderLoaderEmpty,\n cellVerticalAlign,\n __funnelSubStepProps,\n ...rest\n }: InternalTableProps<T>,\n ref: React.Ref<TableProps.Ref>\n ) => {\n // Keyboard navigation defaults to `true` for tables with expandable rows.\n if (expandableRows && enableKeyboardNavigation === undefined) {\n enableKeyboardNavigation = true;\n }\n\n const baseProps = getBaseProps(rest);\n\n const prevStickyHeader = usePrevious(stickyHeader);\n if (prevStickyHeader !== undefined && !!stickyHeader !== !!prevStickyHeader) {\n warnOnce(\n 'Table',\n `\\`stickyHeader\\` has changed from \"${prevStickyHeader}\" to \"${stickyHeader}\". It is not recommended to change the value of this property during the component lifecycle. Please set it to either \"true\" or \"false\" unconditionally.`\n );\n }\n\n const isMobile = useMobile();\n\n const { isExpandable, allItems, getExpandableItemProps } = useExpandableTableProps({\n items,\n expandableRows,\n trackBy,\n ariaLabels,\n });\n const { allRows } = useProgressiveLoadingProps({\n items: allItems,\n getLoadingStatus,\n getExpandableItemProps,\n });\n\n const [containerWidth, wrapperMeasureRef] = useContainerQuery<number>(rect => rect.contentBoxWidth);\n const wrapperMeasureRefObject = useRef(null);\n const wrapperMeasureMergedRef = useMergeRefs(wrapperMeasureRef, wrapperMeasureRefObject);\n\n const [tableWidth, tableMeasureRef] = useContainerQuery<number>(rect => rect.contentBoxWidth);\n const tableRefObject = useRef(null);\n\n const secondaryWrapperRef = React.useRef<HTMLDivElement>(null);\n const theadRef = useRef<HTMLTableRowElement>(null);\n const stickyHeaderRef = React.useRef<StickyHeaderRef>(null);\n const scrollbarRef = React.useRef<HTMLDivElement>(null);\n const { cancelEdit, ...cellEditing } = useCellEditing({ onCancel: onEditCancel, onSubmit: submitEdit });\n const paginationRef = useRef<PaginationRef>({});\n const filterRef = useRef<FilterRef>({});\n /* istanbul ignore next: performance marks do not work in JSDOM */\n const getHeaderText = () =>\n toolsHeaderPerformanceMarkRef.current?.querySelector<HTMLElement>(`.${headerStyles['heading-text']}`)\n ?.innerText ?? toolsHeaderPerformanceMarkRef.current?.innerText;\n const getPatternIdentifier = () => {\n const hasActions = !!toolsHeaderPerformanceMarkRef.current?.querySelector<HTMLElement>(\n `.${headerStyles.actions} .${buttonStyles.button}`\n );\n\n if (hasActions) {\n return 'table-with-actions';\n }\n\n return '';\n };\n\n const performanceMarkAttributes = usePerformanceMarks(\n 'table',\n () => !loading,\n tableRefObject,\n () => ({\n loading: loading ?? false,\n header: getHeaderText(),\n }),\n [loading]\n );\n\n const analyticsMetadata = getAnalyticsMetadataProps(rest);\n const interactionMetadata = () => {\n const filterData = filterRef.current;\n const paginationData = paginationRef.current;\n return JSON.stringify({\n filterData,\n paginationData,\n sortingColumn: sortingColumn?.sortingField,\n sortingOrder: sortingColumn ? (sortingDescending ? 'Descending' : 'Ascending') : undefined,\n });\n };\n const getComponentConfiguration = () => {\n const filterData = filterRef.current;\n const paginationData = paginationRef.current;\n\n return {\n variant,\n flowType: rest.analyticsMetadata?.flowType,\n instanceIdentifier: analyticsMetadata?.instanceIdentifier,\n taskName: analyticsMetadata?.instanceIdentifier ?? getHeaderText(),\n patternIdentifier: getPatternIdentifier(),\n sortedBy: {\n columnId: sortingColumn?.sortingField,\n sortingOrder: sortingColumn ? (sortingDescending ? 'desc' : 'asc') : undefined,\n },\n filtered: Boolean(filterData?.filterText),\n currentPageIndex: paginationData.currentPageIndex,\n totalNumberOfResources: paginationData.totalPageCount,\n resourcesPerPage: allRows?.length || 0,\n resourcesSelected: selectedItems?.length > 0,\n };\n };\n\n const { setLastUserAction, tableInteractionAttributes } = useTableInteractionMetrics({\n elementRef: tableRefObject,\n loading,\n instanceIdentifier: analyticsMetadata?.instanceIdentifier,\n itemCount: items.length,\n getComponentIdentifier: getHeaderText,\n getComponentConfiguration,\n interactionMetadata,\n });\n\n useImperativeHandle(\n ref,\n () => ({\n scrollToTop: stickyHeaderRef.current?.scrollToTop || (() => undefined),\n cancelEdit,\n }),\n [cancelEdit]\n );\n\n const wrapperRefObject = useRef<HTMLDivElement>(null);\n const handleScroll = useScrollSync([wrapperRefObject, scrollbarRef, secondaryWrapperRef]);\n\n const { moveFocusDown, moveFocusUp, moveFocus } = useSelectionFocusMove(selectionType, allItems.length);\n const { onRowClickHandler, onRowContextMenuHandler } = useRowEvents({ onRowClick, onRowContextMenu });\n\n const visibleColumnDefinitions = getVisibleColumnDefinitions({\n columnDefinitions,\n columnDisplay,\n visibleColumns,\n });\n\n const { isItemSelected, getSelectAllProps, getItemSelectionProps } = useSelection({\n items: allItems,\n trackBy,\n selectedItems,\n selectionType,\n isItemDisabled,\n onSelectionChange,\n ariaLabels,\n loading,\n });\n const isRowSelected = (row: TableRow<T>) => row.type === 'data' && isItemSelected(row.item);\n\n if (isDevelopment) {\n if (resizableColumns) {\n checkColumnWidths(columnDefinitions);\n }\n if (sortingColumn?.sortingComparator) {\n checkSortingState(columnDefinitions, sortingColumn.sortingComparator);\n }\n }\n\n const isVisualRefresh = useVisualRefresh();\n const computedVariant = isVisualRefresh\n ? variant\n : ['embedded', 'full-page'].indexOf(variant) > -1\n ? 'container'\n : variant;\n const hasHeader = !!(header || filter || pagination || preferences);\n const hasSelection = !!selectionType;\n const hasFooterPagination = isMobile && variant === 'full-page' && !!pagination;\n const hasFooter = !!footer || hasFooterPagination;\n\n const headerIdRef = useRef<string | undefined>(undefined);\n const isLabelledByHeader = !ariaLabels?.tableLabel && !!header;\n const ariaLabelledby = isLabelledByHeader && headerIdRef.current ? headerIdRef.current : undefined;\n const setHeaderRef = useCallback((id: string) => {\n headerIdRef.current = id;\n }, []);\n\n const visibleColumnWidthsWithSelection: ColumnWidthDefinition[] = [];\n const visibleColumnIdsWithSelection: PropertyKey[] = [];\n if (hasSelection) {\n visibleColumnWidthsWithSelection.push({ id: selectionColumnId, width: SELECTION_COLUMN_WIDTH });\n visibleColumnIdsWithSelection.push(selectionColumnId);\n }\n for (let columnIndex = 0; columnIndex < visibleColumnDefinitions.length; columnIndex++) {\n const columnId = getColumnKey(visibleColumnDefinitions[columnIndex], columnIndex);\n visibleColumnWidthsWithSelection.push({ ...visibleColumnDefinitions[columnIndex], id: columnId });\n visibleColumnIdsWithSelection.push(columnId);\n }\n\n const stickyState = useStickyColumns({\n visibleColumns: visibleColumnIdsWithSelection,\n stickyColumnsFirst: (stickyColumns?.first ?? 0) + (stickyColumns?.first && hasSelection ? 1 : 0),\n stickyColumnsLast: stickyColumns?.last || 0,\n });\n\n const hasStickyColumns = !!((stickyColumns?.first ?? 0) + (stickyColumns?.last ?? 0) > 0);\n const hasEditableCells = !!columnDefinitions.find(col => col.editConfig);\n\n let tableRole: TableRole = 'table';\n if (isExpandable) {\n tableRole = 'treegrid';\n } else if (enableKeyboardNavigation) {\n tableRole = 'grid';\n } else if (hasEditableCells) {\n tableRole = 'grid-default';\n }\n\n const theadProps: TheadProps = {\n selectionType,\n getSelectAllProps,\n columnDefinitions: visibleColumnDefinitions,\n variant: computedVariant,\n wrapLines,\n resizableColumns,\n sortingColumn,\n sortingDisabled,\n sortingDescending,\n onSortingChange,\n onFocusMove: moveFocus,\n onResizeFinish(newWidth) {\n const widthsDetail = columnDefinitions.map(\n (column, index) =>\n newWidth.get(getColumnKey(column, index)) || (column.width as number) || DEFAULT_COLUMN_WIDTH\n );\n const widthsChanged = widthsDetail.some((width, index) => columnDefinitions[index].width !== width);\n if (widthsChanged) {\n fireNonCancelableEvent(onColumnWidthsChange, { widths: widthsDetail });\n }\n },\n singleSelectionHeaderAriaLabel: ariaLabels?.selectionGroupLabel,\n resizerRoleDescription: ariaLabels?.resizerRoleDescription,\n stripedRows,\n stickyState,\n selectionColumnId,\n tableRole,\n isExpandable,\n setLastUserAction,\n };\n\n usePreventStickyClickScroll(wrapperRefObject);\n\n const wrapperRef = useMergeRefs(wrapperRefObject, stickyState.refs.wrapper);\n const tableRef = useMergeRefs(tableMeasureRef, tableRefObject, stickyState.refs.table);\n\n const wrapperProps = getTableWrapperRoleProps({\n tableRole,\n isScrollable: !!(tableWidth && containerWidth && tableWidth > containerWidth),\n ariaLabel: ariaLabels?.tableLabel,\n ariaLabelledby,\n });\n\n const getMouseDownTarget = useMouseDownTarget();\n\n useTableFocusNavigation({\n enableKeyboardNavigation,\n selectionType,\n tableRoot: tableRefObject,\n columnDefinitions: visibleColumnDefinitions,\n numRows: allRows?.length,\n });\n const toolsHeaderPerformanceMarkRef = useRef<HTMLDivElement>(null);\n // If is mobile, we take into consideration the AppLayout's mobile bar and we subtract the tools wrapper height so only the table header is sticky\n const [toolsHeaderHeight, toolsHeaderWrapperMeasureRef] = useContainerQuery(rect => rect.borderBoxHeight);\n const toolsHeaderWrapper = useMergeRefs(toolsHeaderPerformanceMarkRef, toolsHeaderWrapperMeasureRef);\n\n const colIndexOffset = selectionType ? 1 : 0;\n const totalColumnsCount = visibleColumnDefinitions.length + colIndexOffset;\n\n return (\n <LinkDefaultVariantContext.Provider value={{ defaultVariant: 'primary' }}>\n <TableComponentsContextProvider value={{ paginationRef, filterRef }}>\n <ColumnWidthsProvider\n visibleColumns={visibleColumnWidthsWithSelection}\n resizableColumns={resizableColumns}\n containerRef={wrapperMeasureRefObject}\n >\n <InternalContainer\n {...baseProps}\n {...tableInteractionAttributes}\n __internalRootRef={__internalRootRef}\n className={clsx(baseProps.className, styles.root)}\n __funnelSubStepProps={__funnelSubStepProps}\n __fullPage={variant === 'full-page'}\n header={\n <>\n {hasHeader && (\n <div>\n <div\n ref={toolsHeaderWrapper}\n className={clsx(styles['header-controls'], styles[`variant-${computedVariant}`])}\n >\n <CollectionLabelContext.Provider value={{ assignId: setHeaderRef }}>\n <ToolsHeader\n header={header}\n filter={filter}\n pagination={pagination}\n preferences={preferences}\n setLastUserAction={setLastUserAction}\n />\n </CollectionLabelContext.Provider>\n </div>\n </div>\n )}\n {stickyHeader && (\n <StickyHeader\n ref={stickyHeaderRef}\n variant={computedVariant}\n theadProps={theadProps}\n wrapperRef={wrapperRefObject}\n theadRef={theadRef}\n secondaryWrapperRef={secondaryWrapperRef}\n tableRef={tableRefObject}\n onScroll={handleScroll}\n tableHasHeader={hasHeader}\n contentDensity={contentDensity}\n tableRole={tableRole}\n />\n )}\n </>\n }\n disableHeaderPaddings={true}\n disableContentPaddings={true}\n variant={toContainerVariant(computedVariant)}\n __disableFooterPaddings={true}\n __disableFooterDivider={true}\n __disableStickyMobile={false}\n footer={\n hasFooter ? (\n <div className={clsx(styles['footer-wrapper'], styles[`variant-${computedVariant}`])}>\n <div className={clsx(styles.footer, hasFooterPagination && styles['footer-with-pagination'])}>\n {footer && <span>{footer}</span>}\n {hasFooterPagination && <div className={styles['footer-pagination']}>{pagination}</div>}\n </div>\n </div>\n ) : null\n }\n __stickyHeader={stickyHeader}\n __mobileStickyOffset={toolsHeaderHeight ?? 0}\n __stickyOffset={stickyHeaderVerticalOffset}\n {...focusMarkers.root}\n >\n <div\n ref={wrapperRef}\n className={clsx(styles.wrapper, styles[`variant-${computedVariant}`], {\n [styles['has-footer']]: hasFooter,\n [styles['has-header']]: hasHeader,\n })}\n style={stickyState.style.wrapper}\n onScroll={handleScroll}\n {...wrapperProps}\n >\n <div className={styles['wrapper-content-measure']} ref={wrapperMeasureMergedRef}></div>\n {!!renderAriaLive && !!firstIndex && (\n <InternalLiveRegion hidden={true} tagName=\"span\">\n <span>\n {renderAriaLive({\n firstIndex,\n lastIndex: firstIndex + items.length - 1,\n visibleItemsCount: allItems.length,\n totalItemsCount,\n })}\n </span>\n </InternalLiveRegion>\n )}\n <GridNavigationProvider\n keyboardNavigation={!!enableKeyboardNavigation}\n pageSize={GRID_NAVIGATION_PAGE_SIZE}\n getTable={() => tableRefObject.current}\n >\n <table\n {...performanceMarkAttributes}\n ref={tableRef}\n className={clsx(\n styles.table,\n resizableColumns && styles['table-layout-fixed'],\n contentDensity === 'compact' && getVisualContextClassname('compact-table')\n )}\n {...getTableRoleProps({\n tableRole,\n totalItemsCount,\n totalColumnsCount: totalColumnsCount,\n ariaLabel: ariaLabels?.tableLabel,\n ariaLabelledby,\n })}\n >\n <Thead\n ref={theadRef}\n hidden={stickyHeader}\n onFocusedComponentChange={focusId => stickyHeaderRef.current?.setFocus(focusId)}\n {...theadProps}\n />\n <tbody>\n {loading || allItems.length === 0 ? (\n <tr>\n <NoDataCell\n totalColumnsCount={totalColumnsCount}\n hasFooter={hasFooter}\n loading={loading}\n loadingText={loadingText}\n empty={empty}\n tableRef={tableRefObject}\n containerRef={wrapperMeasureRefObject}\n />\n </tr>\n ) : (\n allRows.map((row, rowIndex) => {\n const isFirstRow = rowIndex === 0;\n const isLastRow = rowIndex === allRows.length - 1;\n const expandableProps = row.type === 'data' ? getExpandableItemProps(row.item) : undefined;\n const rowRoleProps = getTableRowRoleProps({\n tableRole,\n firstIndex,\n rowIndex,\n level: row.type === 'loader' ? row.level : undefined,\n ...expandableProps,\n });\n const getTableItemKey = (item: T) => getItemKey(trackBy, item, rowIndex);\n const sharedCellProps = {\n isFirstRow,\n isLastRow,\n isSelected: hasSelection && isRowSelected(row),\n isPrevSelected: hasSelection && !isFirstRow && isRowSelected(allRows[rowIndex - 1]),\n isNextSelected: hasSelection && !isLastRow && isRowSelected(allRows[rowIndex + 1]),\n isEvenRow: rowIndex % 2 === 0,\n stripedRows,\n hasSelection,\n hasFooter,\n stickyState,\n tableRole,\n };\n if (row.type === 'data') {\n const rowId = `${getTableItemKey(row.item)}`;\n return (\n <tr\n key={rowId}\n className={clsx(styles.row, sharedCellProps.isSelected && styles['row-selected'])}\n onFocus={({ currentTarget }) => {\n // When an element inside table row receives focus we want to adjust the scroll.\n // However, that behaviour is unwanted when the focus is received as result of a click\n // as it causes the click to never reach the target element.\n if (!currentTarget.contains(getMouseDownTarget())) {\n stickyHeaderRef.current?.scrollToRow(currentTarget);\n }\n }}\n {...focusMarkers.item}\n onClick={onRowClickHandler && onRowClickHandler.bind(null, rowIndex, row.item)}\n onContextMenu={\n onRowContextMenuHandler && onRowContextMenuHandler.bind(null, rowIndex, row.item)\n }\n {...rowRoleProps}\n >\n {getItemSelectionProps && (\n <TableBodySelectionCell\n {...sharedCellProps}\n columnId={selectionColumnId}\n selectionControlProps={{\n ...getItemSelectionProps(row.item),\n onFocusDown: moveFocusDown,\n onFocusUp: moveFocusUp,\n rowIndex,\n itemKey: rowId,\n }}\n verticalAlign={cellVerticalAlign}\n />\n )}\n\n {visibleColumnDefinitions.map((column, colIndex) => {\n const colId = `${getColumnKey(column, colIndex)}`;\n const cellId = { row: rowId, col: colId };\n const isEditing = cellEditing.checkEditing(cellId);\n const successfulEdit = cellEditing.checkLastSuccessfulEdit(cellId);\n const isEditable = !!column.editConfig && !cellEditing.isLoading;\n const cellExpandableProps =\n isExpandable && colIndex === 0 ? expandableProps : undefined;\n\n const analyticsMetadata: GeneratedAnalyticsMetadataFragment = {\n component: {\n innerContext: {\n position: `${rowIndex + 1},${colIndex + 1}`,\n columnId: column.id ? `${column.id}` : '',\n columnLabel: {\n selector: `table thead tr th:nth-child(${colIndex + (selectionType ? 2 : 1)})`,\n root: 'component',\n },\n item: rowId,\n } as GeneratedAnalyticsMetadataTableComponent['innerContext'],\n },\n };\n\n return (\n <TableBodyCell\n key={colId}\n {...sharedCellProps}\n resizableStyle={{\n width: column.width,\n minWidth: column.minWidth,\n maxWidth: column.maxWidth,\n }}\n ariaLabels={ariaLabels}\n column={column}\n item={row.item}\n wrapLines={wrapLines}\n isEditable={isEditable}\n isEditing={isEditing}\n isRowHeader={column.isRowHeader}\n successfulEdit={successfulEdit}\n resizableColumns={resizableColumns}\n onEditStart={() => cellEditing.startEdit(cellId)}\n onEditEnd={editCancelled => cellEditing.completeEdit(cellId, editCancelled)}\n submitEdit={cellEditing.submitEdit}\n columnId={column.id ?? colIndex}\n colIndex={colIndex + colIndexOffset}\n verticalAlign={column.verticalAlign ?? cellVerticalAlign}\n {...cellExpandableProps}\n {...getAnalyticsMetadataAttribute(analyticsMetadata)}\n />\n );\n })}\n </tr>\n );\n }\n\n const loaderContent = getLoaderContent({\n item: row.item,\n loadingStatus: row.status,\n renderLoaderPending,\n renderLoaderLoading,\n renderLoaderError,\n renderLoaderEmpty,\n });\n return (\n loaderContent && (\n <tr\n key={(row.item ? getTableItemKey(row.item) : 'root-' + rowIndex) + '-' + row.from}\n className={styles.row}\n {...rowRoleProps}\n >\n {getItemSelectionProps && (\n <TableBodySelectionCell\n {...sharedCellProps}\n columnId={selectionColumnId}\n verticalAlign={cellVerticalAlign}\n />\n )}\n {visibleColumnDefinitions.map((column, colIndex) => (\n <TableLoaderCell\n key={getColumnKey(column, colIndex)}\n {...sharedCellProps}\n wrapLines={false}\n columnId={column.id ?? colIndex}\n colIndex={colIndex + colIndexOffset}\n isRowHeader={colIndex === 0}\n level={row.level}\n item={row.item}\n trackBy={trackBy}\n >\n {loaderContent}\n </TableLoaderCell>\n ))}\n </tr>\n )\n );\n })\n )}\n </tbody>\n </table>\n </GridNavigationProvider>\n\n {resizableColumns && <ResizeTracker />}\n </div>\n\n <StickyScrollbar\n ref={scrollbarRef}\n wrapperRef={wrapperRefObject}\n tableRef={tableRefObject}\n onScroll={handleScroll}\n hasStickyColumns={hasStickyColumns}\n />\n </InternalContainer>\n </ColumnWidthsProvider>\n </TableComponentsContextProvider>\n </LinkDefaultVariantContext.Provider>\n );\n }\n) as TableForwardRefType;\n\nexport default InternalTable;\n"]}
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/table/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AACzE,OAAO,EAEL,6BAA6B,GAC9B,MAAM,kEAAkE,CAAC;AAE1E,OAAO,iBAA6C,MAAM,uBAAuB,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,yBAAyB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AACtF,OAAO,EAAE,yBAAyB,EAAE,MAAM,kDAAkD,CAAC;AAC7F,OAAO,EAA4B,8BAA8B,EAAE,MAAM,6CAA6C,CAAC;AACvH,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,SAAS,EA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Ae,IACd,GAAG,EAAE,YAAY,EACjB,UAAU,EAAE,gBAAgB,EAC5B,QAAQ,EAAE,cAAc,EACxB,QAAQ,EAAE,YAAY,EACtB,gBAAgB,EAAE,gBAAgB,GAClC,CACgB,CACC,CACQ,CACE,CACtC,CAAC;AACJ,CAAC,CACqB,CAAC;AAEzB,eAAe,aAAa,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useImperativeHandle, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useContainerQuery } from '@cloudscape-design/component-toolkit';\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\nimport {\n GeneratedAnalyticsMetadataFragment,\n getAnalyticsMetadataAttribute,\n} from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport InternalContainer, { InternalContainerProps } from '../container/internal';\nimport { useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\nimport { getAnalyticsMetadataProps, getBaseProps } from '../internal/base-component';\nimport { getVisualContextClassname } from '../internal/components/visual-context';\nimport { CollectionLabelContext } from '../internal/context/collection-label-context';\nimport { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';\nimport { FilterRef, PaginationRef, TableComponentsContextProvider } from '../internal/context/table-component-context';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport useMouseDownTarget from '../internal/hooks/use-mouse-down-target';\nimport { usePerformanceMarks } from '../internal/hooks/use-performance-marks';\nimport { usePrevious } from '../internal/hooks/use-previous';\nimport { useScrollSync } from '../internal/hooks/use-scroll-sync';\nimport { useTableInteractionMetrics } from '../internal/hooks/use-table-interaction-metrics';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { isDevelopment } from '../internal/is-development';\nimport { SomeRequired } from '../internal/types';\nimport InternalLiveRegion from '../live-region/internal';\nimport { GeneratedAnalyticsMetadataTableComponent } from './analytics-metadata/interfaces';\nimport { TableBodyCell } from './body-cell';\nimport { checkColumnWidths } from './column-widths-utils';\nimport { useExpandableTableProps } from './expandable-rows/expandable-rows-utils';\nimport { TableForwardRefType, TableProps, TableRow } from './interfaces';\nimport { NoDataCell } from './no-data-cell';\nimport { getLoaderContent } from './progressive-loading/items-loader';\nimport { TableLoaderCell } from './progressive-loading/loader-cell';\nimport { useProgressiveLoadingProps } from './progressive-loading/progressive-loading-utils';\nimport { ResizeTracker } from './resizer';\nimport { focusMarkers, useSelection, useSelectionFocusMove } from './selection';\nimport { TableBodySelectionCell } from './selection/selection-cell';\nimport { useStickyColumns } from './sticky-columns';\nimport StickyHeader, { StickyHeaderRef } from './sticky-header';\nimport { StickyScrollbar } from './sticky-scrollbar';\nimport {\n getTableRoleProps,\n getTableRowRoleProps,\n getTableWrapperRoleProps,\n GridNavigationProvider,\n TableRole,\n} from './table-role';\nimport Thead, { TheadProps } from './thead';\nimport ToolsHeader from './tools-header';\nimport { useCellEditing } from './use-cell-editing';\nimport { ColumnWidthDefinition, ColumnWidthsProvider, DEFAULT_COLUMN_WIDTH } from './use-column-widths';\nimport { usePreventStickyClickScroll } from './use-prevent-sticky-click-scroll';\nimport { useRowEvents } from './use-row-events';\nimport useTableFocusNavigation from './use-table-focus-navigation';\nimport { checkSortingState, getColumnKey, getItemKey, getVisibleColumnDefinitions, toContainerVariant } from './utils';\n\nimport buttonStyles from '../button/styles.css.js';\nimport headerStyles from '../header/styles.css.js';\nimport styles from './styles.css.js';\n\nconst GRID_NAVIGATION_PAGE_SIZE = 10;\nconst SELECTION_COLUMN_WIDTH = 54;\nconst selectionColumnId = Symbol('selection-column-id');\n\ntype InternalTableProps<T> = SomeRequired<\n TableProps<T>,\n 'items' | 'selectedItems' | 'variant' | 'firstIndex' | 'cellVerticalAlign'\n> &\n InternalBaseComponentProps & {\n __funnelSubStepProps?: InternalContainerProps['__funnelSubStepProps'];\n };\n\nexport const InternalTableAsSubstep = React.forwardRef(\n <T,>(props: InternalTableProps<T>, ref: React.Ref<TableProps.Ref>) => {\n const { funnelSubStepProps } = useFunnelSubStep();\n\n const tableProps: InternalTableProps<T> = {\n ...props,\n __funnelSubStepProps: funnelSubStepProps,\n };\n\n return <InternalTable {...tableProps} ref={ref} />;\n }\n) as TableForwardRefType;\n\nconst InternalTable = React.forwardRef(\n <T,>(\n {\n header,\n footer,\n empty,\n filter,\n pagination,\n preferences,\n items,\n columnDefinitions,\n trackBy,\n loading,\n loadingText,\n selectionType,\n selectedItems,\n isItemDisabled,\n ariaLabels,\n onSelectionChange,\n onSortingChange,\n sortingColumn,\n sortingDescending,\n sortingDisabled,\n visibleColumns,\n stickyHeader,\n stickyHeaderVerticalOffset,\n onRowClick,\n onRowContextMenu,\n wrapLines,\n stripedRows,\n contentDensity,\n submitEdit,\n onEditCancel,\n resizableColumns,\n onColumnWidthsChange,\n variant,\n __internalRootRef,\n totalItemsCount,\n firstIndex,\n renderAriaLive,\n stickyColumns,\n columnDisplay,\n enableKeyboardNavigation,\n expandableRows,\n getLoadingStatus,\n renderLoaderPending,\n renderLoaderLoading,\n renderLoaderError,\n renderLoaderEmpty,\n cellVerticalAlign,\n __funnelSubStepProps,\n ...rest\n }: InternalTableProps<T>,\n ref: React.Ref<TableProps.Ref>\n ) => {\n // Keyboard navigation defaults to `true` for tables with expandable rows.\n if (expandableRows && enableKeyboardNavigation === undefined) {\n enableKeyboardNavigation = true;\n }\n\n const baseProps = getBaseProps(rest);\n\n const prevStickyHeader = usePrevious(stickyHeader);\n if (prevStickyHeader !== undefined && !!stickyHeader !== !!prevStickyHeader) {\n warnOnce(\n 'Table',\n `\\`stickyHeader\\` has changed from \"${prevStickyHeader}\" to \"${stickyHeader}\". It is not recommended to change the value of this property during the component lifecycle. Please set it to either \"true\" or \"false\" unconditionally.`\n );\n }\n\n const isMobile = useMobile();\n\n const { isExpandable, allItems, getExpandableItemProps } = useExpandableTableProps({\n items,\n expandableRows,\n trackBy,\n ariaLabels,\n });\n const { allRows } = useProgressiveLoadingProps({\n items: allItems,\n getLoadingStatus,\n getExpandableItemProps,\n });\n\n const [containerWidth, wrapperMeasureRef] = useContainerQuery<number>(rect => rect.contentBoxWidth);\n const wrapperMeasureRefObject = useRef(null);\n const wrapperMeasureMergedRef = useMergeRefs(wrapperMeasureRef, wrapperMeasureRefObject);\n\n const [tableWidth, tableMeasureRef] = useContainerQuery<number>(rect => rect.contentBoxWidth);\n const tableRefObject = useRef(null);\n\n const secondaryWrapperRef = React.useRef<HTMLDivElement>(null);\n const theadRef = useRef<HTMLTableRowElement>(null);\n const stickyHeaderRef = React.useRef<StickyHeaderRef>(null);\n const scrollbarRef = React.useRef<HTMLDivElement>(null);\n const { cancelEdit, ...cellEditing } = useCellEditing({ onCancel: onEditCancel, onSubmit: submitEdit });\n const paginationRef = useRef<PaginationRef>({});\n const filterRef = useRef<FilterRef>({});\n /* istanbul ignore next: performance marks do not work in JSDOM */\n const getHeaderText = () =>\n toolsHeaderPerformanceMarkRef.current?.querySelector<HTMLElement>(`.${headerStyles['heading-text']}`)\n ?.innerText ?? toolsHeaderPerformanceMarkRef.current?.innerText;\n const getPatternIdentifier = () => {\n const hasActions = !!toolsHeaderPerformanceMarkRef.current?.querySelector<HTMLElement>(\n `.${headerStyles.actions} .${buttonStyles.button}`\n );\n\n if (hasActions) {\n return 'table-with-actions';\n }\n\n return '';\n };\n\n const performanceMarkAttributes = usePerformanceMarks(\n 'table',\n () => !loading,\n tableRefObject,\n () => ({\n loading: loading ?? false,\n header: getHeaderText(),\n }),\n [loading]\n );\n\n const analyticsMetadata = getAnalyticsMetadataProps(rest);\n const interactionMetadata = () => {\n const filterData = filterRef.current;\n const paginationData = paginationRef.current;\n return JSON.stringify({\n filterData,\n paginationData,\n sortingColumn: sortingColumn?.sortingField,\n sortingOrder: sortingColumn ? (sortingDescending ? 'Descending' : 'Ascending') : undefined,\n });\n };\n const getComponentConfiguration = () => {\n const filterData = filterRef.current;\n const paginationData = paginationRef.current;\n\n return {\n variant,\n flowType: rest.analyticsMetadata?.flowType,\n resourceType: rest.analyticsMetadata?.resourceType,\n instanceIdentifier: analyticsMetadata?.instanceIdentifier,\n taskName: analyticsMetadata?.instanceIdentifier ?? getHeaderText(),\n patternIdentifier: getPatternIdentifier(),\n sortedBy: {\n columnId: sortingColumn?.sortingField,\n sortingOrder: sortingColumn ? (sortingDescending ? 'desc' : 'asc') : undefined,\n },\n filtered: Boolean(filterData?.filterText),\n currentPageIndex: paginationData.currentPageIndex,\n totalNumberOfResources: paginationData.totalPageCount,\n resourcesPerPage: allRows?.length || 0,\n resourcesSelected: selectedItems?.length > 0,\n };\n };\n\n const { setLastUserAction, tableInteractionAttributes } = useTableInteractionMetrics({\n elementRef: tableRefObject,\n loading,\n instanceIdentifier: analyticsMetadata?.instanceIdentifier,\n itemCount: items.length,\n getComponentIdentifier: getHeaderText,\n getComponentConfiguration,\n interactionMetadata,\n });\n\n useImperativeHandle(\n ref,\n () => ({\n scrollToTop: stickyHeaderRef.current?.scrollToTop || (() => undefined),\n cancelEdit,\n }),\n [cancelEdit]\n );\n\n const wrapperRefObject = useRef<HTMLDivElement>(null);\n const handleScroll = useScrollSync([wrapperRefObject, scrollbarRef, secondaryWrapperRef]);\n\n const { moveFocusDown, moveFocusUp, moveFocus } = useSelectionFocusMove(selectionType, allItems.length);\n const { onRowClickHandler, onRowContextMenuHandler } = useRowEvents({ onRowClick, onRowContextMenu });\n\n const visibleColumnDefinitions = getVisibleColumnDefinitions({\n columnDefinitions,\n columnDisplay,\n visibleColumns,\n });\n\n const { isItemSelected, getSelectAllProps, getItemSelectionProps } = useSelection({\n items: allItems,\n trackBy,\n selectedItems,\n selectionType,\n isItemDisabled,\n onSelectionChange,\n ariaLabels,\n loading,\n });\n const isRowSelected = (row: TableRow<T>) => row.type === 'data' && isItemSelected(row.item);\n\n if (isDevelopment) {\n if (resizableColumns) {\n checkColumnWidths(columnDefinitions);\n }\n if (sortingColumn?.sortingComparator) {\n checkSortingState(columnDefinitions, sortingColumn.sortingComparator);\n }\n }\n\n const isVisualRefresh = useVisualRefresh();\n const computedVariant = isVisualRefresh\n ? variant\n : ['embedded', 'full-page'].indexOf(variant) > -1\n ? 'container'\n : variant;\n const hasHeader = !!(header || filter || pagination || preferences);\n const hasSelection = !!selectionType;\n const hasFooterPagination = isMobile && variant === 'full-page' && !!pagination;\n const hasFooter = !!footer || hasFooterPagination;\n\n const headerIdRef = useRef<string | undefined>(undefined);\n const isLabelledByHeader = !ariaLabels?.tableLabel && !!header;\n const ariaLabelledby = isLabelledByHeader && headerIdRef.current ? headerIdRef.current : undefined;\n const setHeaderRef = useCallback((id: string) => {\n headerIdRef.current = id;\n }, []);\n\n const visibleColumnWidthsWithSelection: ColumnWidthDefinition[] = [];\n const visibleColumnIdsWithSelection: PropertyKey[] = [];\n if (hasSelection) {\n visibleColumnWidthsWithSelection.push({ id: selectionColumnId, width: SELECTION_COLUMN_WIDTH });\n visibleColumnIdsWithSelection.push(selectionColumnId);\n }\n for (let columnIndex = 0; columnIndex < visibleColumnDefinitions.length; columnIndex++) {\n const columnId = getColumnKey(visibleColumnDefinitions[columnIndex], columnIndex);\n visibleColumnWidthsWithSelection.push({ ...visibleColumnDefinitions[columnIndex], id: columnId });\n visibleColumnIdsWithSelection.push(columnId);\n }\n\n const stickyState = useStickyColumns({\n visibleColumns: visibleColumnIdsWithSelection,\n stickyColumnsFirst: (stickyColumns?.first ?? 0) + (stickyColumns?.first && hasSelection ? 1 : 0),\n stickyColumnsLast: stickyColumns?.last || 0,\n });\n\n const hasStickyColumns = !!((stickyColumns?.first ?? 0) + (stickyColumns?.last ?? 0) > 0);\n const hasEditableCells = !!columnDefinitions.find(col => col.editConfig);\n\n let tableRole: TableRole = 'table';\n if (isExpandable) {\n tableRole = 'treegrid';\n } else if (enableKeyboardNavigation) {\n tableRole = 'grid';\n } else if (hasEditableCells) {\n tableRole = 'grid-default';\n }\n\n const theadProps: TheadProps = {\n selectionType,\n getSelectAllProps,\n columnDefinitions: visibleColumnDefinitions,\n variant: computedVariant,\n wrapLines,\n resizableColumns,\n sortingColumn,\n sortingDisabled,\n sortingDescending,\n onSortingChange,\n onFocusMove: moveFocus,\n onResizeFinish(newWidth) {\n const widthsDetail = columnDefinitions.map(\n (column, index) =>\n newWidth.get(getColumnKey(column, index)) || (column.width as number) || DEFAULT_COLUMN_WIDTH\n );\n const widthsChanged = widthsDetail.some((width, index) => columnDefinitions[index].width !== width);\n if (widthsChanged) {\n fireNonCancelableEvent(onColumnWidthsChange, { widths: widthsDetail });\n }\n },\n singleSelectionHeaderAriaLabel: ariaLabels?.selectionGroupLabel,\n resizerRoleDescription: ariaLabels?.resizerRoleDescription,\n stripedRows,\n stickyState,\n selectionColumnId,\n tableRole,\n isExpandable,\n setLastUserAction,\n };\n\n usePreventStickyClickScroll(wrapperRefObject);\n\n const wrapperRef = useMergeRefs(wrapperRefObject, stickyState.refs.wrapper);\n const tableRef = useMergeRefs(tableMeasureRef, tableRefObject, stickyState.refs.table);\n\n const wrapperProps = getTableWrapperRoleProps({\n tableRole,\n isScrollable: !!(tableWidth && containerWidth && tableWidth > containerWidth),\n ariaLabel: ariaLabels?.tableLabel,\n ariaLabelledby,\n });\n\n const getMouseDownTarget = useMouseDownTarget();\n\n useTableFocusNavigation({\n enableKeyboardNavigation,\n selectionType,\n tableRoot: tableRefObject,\n columnDefinitions: visibleColumnDefinitions,\n numRows: allRows?.length,\n });\n const toolsHeaderPerformanceMarkRef = useRef<HTMLDivElement>(null);\n // If is mobile, we take into consideration the AppLayout's mobile bar and we subtract the tools wrapper height so only the table header is sticky\n const [toolsHeaderHeight, toolsHeaderWrapperMeasureRef] = useContainerQuery(rect => rect.borderBoxHeight);\n const toolsHeaderWrapper = useMergeRefs(toolsHeaderPerformanceMarkRef, toolsHeaderWrapperMeasureRef);\n\n const colIndexOffset = selectionType ? 1 : 0;\n const totalColumnsCount = visibleColumnDefinitions.length + colIndexOffset;\n\n return (\n <LinkDefaultVariantContext.Provider value={{ defaultVariant: 'primary' }}>\n <TableComponentsContextProvider value={{ paginationRef, filterRef }}>\n <ColumnWidthsProvider\n visibleColumns={visibleColumnWidthsWithSelection}\n resizableColumns={resizableColumns}\n containerRef={wrapperMeasureRefObject}\n >\n <InternalContainer\n {...baseProps}\n {...tableInteractionAttributes}\n __internalRootRef={__internalRootRef}\n className={clsx(baseProps.className, styles.root)}\n __funnelSubStepProps={__funnelSubStepProps}\n __fullPage={variant === 'full-page'}\n header={\n <>\n {hasHeader && (\n <div>\n <div\n ref={toolsHeaderWrapper}\n className={clsx(styles['header-controls'], styles[`variant-${computedVariant}`])}\n >\n <CollectionLabelContext.Provider value={{ assignId: setHeaderRef }}>\n <ToolsHeader\n header={header}\n filter={filter}\n pagination={pagination}\n preferences={preferences}\n setLastUserAction={setLastUserAction}\n />\n </CollectionLabelContext.Provider>\n </div>\n </div>\n )}\n {stickyHeader && (\n <StickyHeader\n ref={stickyHeaderRef}\n variant={computedVariant}\n theadProps={theadProps}\n wrapperRef={wrapperRefObject}\n theadRef={theadRef}\n secondaryWrapperRef={secondaryWrapperRef}\n tableRef={tableRefObject}\n onScroll={handleScroll}\n tableHasHeader={hasHeader}\n contentDensity={contentDensity}\n tableRole={tableRole}\n />\n )}\n </>\n }\n disableHeaderPaddings={true}\n disableContentPaddings={true}\n variant={toContainerVariant(computedVariant)}\n __disableFooterPaddings={true}\n __disableFooterDivider={true}\n __disableStickyMobile={false}\n footer={\n hasFooter ? (\n <div className={clsx(styles['footer-wrapper'], styles[`variant-${computedVariant}`])}>\n <div className={clsx(styles.footer, hasFooterPagination && styles['footer-with-pagination'])}>\n {footer && <span>{footer}</span>}\n {hasFooterPagination && <div className={styles['footer-pagination']}>{pagination}</div>}\n </div>\n </div>\n ) : null\n }\n __stickyHeader={stickyHeader}\n __mobileStickyOffset={toolsHeaderHeight ?? 0}\n __stickyOffset={stickyHeaderVerticalOffset}\n {...focusMarkers.root}\n >\n <div\n ref={wrapperRef}\n className={clsx(styles.wrapper, styles[`variant-${computedVariant}`], {\n [styles['has-footer']]: hasFooter,\n [styles['has-header']]: hasHeader,\n })}\n style={stickyState.style.wrapper}\n onScroll={handleScroll}\n {...wrapperProps}\n >\n <div className={styles['wrapper-content-measure']} ref={wrapperMeasureMergedRef}></div>\n {!!renderAriaLive && !!firstIndex && (\n <InternalLiveRegion hidden={true} tagName=\"span\">\n <span>\n {renderAriaLive({\n firstIndex,\n lastIndex: firstIndex + items.length - 1,\n visibleItemsCount: allItems.length,\n totalItemsCount,\n })}\n </span>\n </InternalLiveRegion>\n )}\n <GridNavigationProvider\n keyboardNavigation={!!enableKeyboardNavigation}\n pageSize={GRID_NAVIGATION_PAGE_SIZE}\n getTable={() => tableRefObject.current}\n >\n <table\n {...performanceMarkAttributes}\n ref={tableRef}\n className={clsx(\n styles.table,\n resizableColumns && styles['table-layout-fixed'],\n contentDensity === 'compact' && getVisualContextClassname('compact-table')\n )}\n {...getTableRoleProps({\n tableRole,\n totalItemsCount,\n totalColumnsCount: totalColumnsCount,\n ariaLabel: ariaLabels?.tableLabel,\n ariaLabelledby,\n })}\n >\n <Thead\n ref={theadRef}\n hidden={stickyHeader}\n onFocusedComponentChange={focusId => stickyHeaderRef.current?.setFocus(focusId)}\n {...theadProps}\n />\n <tbody>\n {loading || allItems.length === 0 ? (\n <tr>\n <NoDataCell\n totalColumnsCount={totalColumnsCount}\n hasFooter={hasFooter}\n loading={loading}\n loadingText={loadingText}\n empty={empty}\n tableRef={tableRefObject}\n containerRef={wrapperMeasureRefObject}\n />\n </tr>\n ) : (\n allRows.map((row, rowIndex) => {\n const isFirstRow = rowIndex === 0;\n const isLastRow = rowIndex === allRows.length - 1;\n const expandableProps = row.type === 'data' ? getExpandableItemProps(row.item) : undefined;\n const rowRoleProps = getTableRowRoleProps({\n tableRole,\n firstIndex,\n rowIndex,\n level: row.type === 'loader' ? row.level : undefined,\n ...expandableProps,\n });\n const getTableItemKey = (item: T) => getItemKey(trackBy, item, rowIndex);\n const sharedCellProps = {\n isFirstRow,\n isLastRow,\n isSelected: hasSelection && isRowSelected(row),\n isPrevSelected: hasSelection && !isFirstRow && isRowSelected(allRows[rowIndex - 1]),\n isNextSelected: hasSelection && !isLastRow && isRowSelected(allRows[rowIndex + 1]),\n isEvenRow: rowIndex % 2 === 0,\n stripedRows,\n hasSelection,\n hasFooter,\n stickyState,\n tableRole,\n };\n if (row.type === 'data') {\n const rowId = `${getTableItemKey(row.item)}`;\n return (\n <tr\n key={rowId}\n className={clsx(styles.row, sharedCellProps.isSelected && styles['row-selected'])}\n onFocus={({ currentTarget }) => {\n // When an element inside table row receives focus we want to adjust the scroll.\n // However, that behaviour is unwanted when the focus is received as result of a click\n // as it causes the click to never reach the target element.\n if (!currentTarget.contains(getMouseDownTarget())) {\n stickyHeaderRef.current?.scrollToRow(currentTarget);\n }\n }}\n {...focusMarkers.item}\n onClick={onRowClickHandler && onRowClickHandler.bind(null, rowIndex, row.item)}\n onContextMenu={\n onRowContextMenuHandler && onRowContextMenuHandler.bind(null, rowIndex, row.item)\n }\n {...rowRoleProps}\n >\n {getItemSelectionProps && (\n <TableBodySelectionCell\n {...sharedCellProps}\n columnId={selectionColumnId}\n selectionControlProps={{\n ...getItemSelectionProps(row.item),\n onFocusDown: moveFocusDown,\n onFocusUp: moveFocusUp,\n rowIndex,\n itemKey: rowId,\n }}\n verticalAlign={cellVerticalAlign}\n />\n )}\n\n {visibleColumnDefinitions.map((column, colIndex) => {\n const colId = `${getColumnKey(column, colIndex)}`;\n const cellId = { row: rowId, col: colId };\n const isEditing = cellEditing.checkEditing(cellId);\n const successfulEdit = cellEditing.checkLastSuccessfulEdit(cellId);\n const isEditable = !!column.editConfig && !cellEditing.isLoading;\n const cellExpandableProps =\n isExpandable && colIndex === 0 ? expandableProps : undefined;\n\n const analyticsMetadata: GeneratedAnalyticsMetadataFragment = {\n component: {\n innerContext: {\n position: `${rowIndex + 1},${colIndex + 1}`,\n columnId: column.id ? `${column.id}` : '',\n columnLabel: {\n selector: `table thead tr th:nth-child(${colIndex + (selectionType ? 2 : 1)})`,\n root: 'component',\n },\n item: rowId,\n } as GeneratedAnalyticsMetadataTableComponent['innerContext'],\n },\n };\n\n return (\n <TableBodyCell\n key={colId}\n {...sharedCellProps}\n resizableStyle={{\n width: column.width,\n minWidth: column.minWidth,\n maxWidth: column.maxWidth,\n }}\n ariaLabels={ariaLabels}\n column={column}\n item={row.item}\n wrapLines={wrapLines}\n isEditable={isEditable}\n isEditing={isEditing}\n isRowHeader={column.isRowHeader}\n successfulEdit={successfulEdit}\n resizableColumns={resizableColumns}\n onEditStart={() => cellEditing.startEdit(cellId)}\n onEditEnd={editCancelled => cellEditing.completeEdit(cellId, editCancelled)}\n submitEdit={cellEditing.submitEdit}\n columnId={column.id ?? colIndex}\n colIndex={colIndex + colIndexOffset}\n verticalAlign={column.verticalAlign ?? cellVerticalAlign}\n {...cellExpandableProps}\n {...getAnalyticsMetadataAttribute(analyticsMetadata)}\n />\n );\n })}\n </tr>\n );\n }\n\n const loaderContent = getLoaderContent({\n item: row.item,\n loadingStatus: row.status,\n renderLoaderPending,\n renderLoaderLoading,\n renderLoaderError,\n renderLoaderEmpty,\n });\n return (\n loaderContent && (\n <tr\n key={(row.item ? getTableItemKey(row.item) : 'root-' + rowIndex) + '-' + row.from}\n className={styles.row}\n {...rowRoleProps}\n >\n {getItemSelectionProps && (\n <TableBodySelectionCell\n {...sharedCellProps}\n columnId={selectionColumnId}\n verticalAlign={cellVerticalAlign}\n />\n )}\n {visibleColumnDefinitions.map((column, colIndex) => (\n <TableLoaderCell\n key={getColumnKey(column, colIndex)}\n {...sharedCellProps}\n wrapLines={false}\n columnId={column.id ?? colIndex}\n colIndex={colIndex + colIndexOffset}\n isRowHeader={colIndex === 0}\n level={row.level}\n item={row.item}\n trackBy={trackBy}\n >\n {loaderContent}\n </TableLoaderCell>\n ))}\n </tr>\n )\n );\n })\n )}\n </tbody>\n </table>\n </GridNavigationProvider>\n\n {resizableColumns && <ResizeTracker />}\n </div>\n\n <StickyScrollbar\n ref={scrollbarRef}\n wrapperRef={wrapperRefObject}\n tableRef={tableRefObject}\n onScroll={handleScroll}\n hasStickyColumns={hasStickyColumns}\n />\n </InternalContainer>\n </ColumnWidthsProvider>\n </TableComponentsContextProvider>\n </LinkDefaultVariantContext.Provider>\n );\n }\n) as TableForwardRefType;\n\nexport default InternalTable;\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { FlowType } from '../internal/analytics/interfaces';
|
|
2
|
+
import { ErrorContext, FlowType } from '../internal/analytics/interfaces';
|
|
3
3
|
import { BaseComponentProps } from '../internal/base-component';
|
|
4
4
|
import { NonCancelableEventHandler } from '../internal/events';
|
|
5
5
|
export declare namespace WizardProps {
|
|
@@ -7,6 +7,7 @@ export declare namespace WizardProps {
|
|
|
7
7
|
instanceIdentifier?: string;
|
|
8
8
|
flowType?: FlowType;
|
|
9
9
|
resourceType?: string;
|
|
10
|
+
errorContext?: ErrorContext;
|
|
10
11
|
}
|
|
11
12
|
}
|
|
12
13
|
export interface WizardProps extends BaseComponentProps {
|
|
@@ -117,6 +118,7 @@ export interface WizardProps extends BaseComponentProps {
|
|
|
117
118
|
export declare namespace WizardProps {
|
|
118
119
|
interface StepAnalyticsMetadata {
|
|
119
120
|
instanceIdentifier?: string;
|
|
121
|
+
errorContext?: ErrorContext;
|
|
120
122
|
}
|
|
121
123
|
interface Step {
|
|
122
124
|
title: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/wizard/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/wizard/interfaces.ts"],"names":[],"mappings":"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1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/wizard/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { FlowType } from '../internal/analytics/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport namespace WizardProps {\n export interface AnalyticsMetadata {\n instanceIdentifier?: string;\n flowType?: FlowType;\n resourceType?: string;\n }\n}\n\nexport interface WizardProps extends BaseComponentProps {\n /**\n * Specifies additional analytics-related metadata.\n * * `instanceIdentifier` - A unique string that identifies this component instance in your application.\n * * `flowType` - Identifies the type of flow represented by the component.\n * * `resourceType` - Identifies the type of resource represented by the flow. **Note:** This API is currently experimental.\n * @analytics\n */\n analyticsMetadata?: WizardProps.AnalyticsMetadata;\n\n /**\n * Array of step objects. Each object represents a step in the wizard with the following properties:\n *\n * - `title` (string) - Text that's displayed as the title in the navigation pane and form header.\n * - `info` (ReactNode) - (Optional) Area for a page level info link that's displayed in the form header.\n * The page level info link should trigger the default help panel content for the step. Use the [link component](/components/link/) to display the link.\n * - `description` (ReactNode) - (Optional) Area below the form header for a page level description text to further explain the purpose, goal, or main actions of the step.\n * - `content` (ReactNode) - Main content area to display form sections, form fields, and controls.\n * - `errorText` (ReactNode) - (Optional) Error text that's displayed in a page level error alert.\n * Use this for rendering actionable server-side validation failure messages.\n * - `isOptional` (boolean) - Specifies whether the step is optional or required. If set to `true`, the text from `i18nStrings.optional`\n * is rendered next to the `title` in the navigation step label and the form header title.\n * - `analyticsMetadata` (WizardProps.StepAnalyticsMetadata) - (Optional) Specifies additional analytics-related metadata.\n * @analytics\n */\n steps: ReadonlyArray<WizardProps.Step>;\n\n /**\n * Index of the step that's currently displayed. The first step has an index of zero (0).\n *\n * If you don't set this property, the component starts on the first step and switches step automatically\n * when a user navigates using the buttons or an enabled step link in the navigation pane (that is, uncontrolled behavior).\n *\n * If you provide a value for this property, you must also set an `onNavigate` listener to update the property when\n * a user navigates (that is, controlled behavior).\n *\n * If you set it to a value that exceeds the maximum value (that is, the number of steps minus 1), its value is ignored and the component uses the maximum value.\n */\n activeStepIndex?: number;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n *\n * - `stepNumberLabel` ((stepNumber: number) => string) - A function that accepts a number (1-based indexing),\n * and returns a human-readable, localized string displaying the step number in the navigation pane. For example, \"Step 1\" or \"Step 2\".\n * - `collapsedStepsLabel` ((stepNumber: number, stepsCount: number) => string) - A function that accepts two number parameters (1-based indexing),\n * and returns a string responsible for the navigation summary on smaller screens. For example, \"Step 1 of 3\". The parameters are as follows:\n * - `stepNumber` (number) - The step number that the user is currently on.\n * - `stepsCount` (number) - The total number of steps in the wizard.\n * - `skipToButtonLabel`: ((targetStep: WizardProps.Step, targetStepNumber: number) => string) - An optional function that accepts the target step object\n * and the target step number (1-based indexing), and returns a string to be used as the *skip-to* button label. For example, \"Skip to Step 2\" or \"Skip to end\".\n * - `navigationAriaLabel` (string) - The aria label for the navigation pane.\n * - `cancelButton` (string) - The text of the button that enables the user to exit the flow.\n * - `previousButton` (string) - The text of the button that enables the user to return to the previous step.\n * - `nextButton` (string) - The text of the button that enables the user to move to the next step.\n * - `submitButton` (string) - The text of the button that enables the user to submit the form. **Deprecated**, replaced by the `submitButtonText` component property. `submitButton` is not supported by the I18nProvider.\n * - `optional` (string) - The text displayed next to the step title and form header title when a step is declared optional.\n * - `nextButtonLoadingAnnouncement` (string) - The text that a screen reader announces when the *next* button is in a loading state.\n * - `submitButtonLoadingAnnouncement` (string) - The text that a screen reader announces when the *submit* button is in a loading state.\n * @i18n\n */\n i18nStrings?: WizardProps.I18nStrings;\n\n /**\n * The text of the button that enables the user to submit the form.\n */\n submitButtonText?: string;\n\n /**\n * Renders the *next* or *submit* button in a loading state.\n *\n * Use this if you need to wait for a response from the server before the user can proceed to the next step, such as during server-side validation or retrieving the next step's information.\n */\n isLoadingNextStep?: boolean;\n\n /**\n * When set to `false`, the *skip-to* button is never shown.\n * When set to `true`, the *skip-to* button may appear to offer faster navigation for the user.\n *\n * The *skip-to* button only allows to skip optional steps. It is shown when there is one or more optional\n * steps ahead having no required steps in-between.\n *\n * Note: the *skip-to* button requires the function i18nStrings.skipToButtonLabel to be defined.\n *\n * Defaults to `false`.\n */\n allowSkipTo?: boolean;\n\n /**\n * Specifies left-aligned secondary actions for the wizard. Use a button dropdown if multiple actions are required.\n */\n secondaryActions?: React.ReactNode;\n\n /**\n * Called when a user clicks the *cancel* button.\n * If a user has entered data in the form, you should prompt the user with a modal before exiting the wizard flow.\n */\n onCancel?: NonCancelableEventHandler;\n\n /**\n * Called when a user clicks the *submit* button.\n */\n onSubmit?: NonCancelableEventHandler;\n\n /**\n * Called when a user clicks the *next* button, the *previous* button, or an enabled step link in the navigation pane.\n *\n * The event `detail` includes the following:\n * - `requestedStepIndex` - The index of the requested step.\n * - `reason` - The user action that triggered the navigation event. It can be `next` (when the user clicks the *next* button),\n * `previous` (when the user clicks the *previous* button), `step` (an enabled step link in the navigation pane),\n * or `skip` (when navigated using navigation pane or the *skip-to* button to the previously unvisited step).\n */\n onNavigate?: NonCancelableEventHandler<WizardProps.NavigateDetail>;\n}\n\nexport namespace WizardProps {\n export interface StepAnalyticsMetadata {\n instanceIdentifier?: string;\n }\n export interface Step {\n title: string;\n info?: React.ReactNode;\n description?: React.ReactNode;\n content: React.ReactNode;\n errorText?: React.ReactNode;\n isOptional?: boolean;\n analyticsMetadata?: StepAnalyticsMetadata;\n }\n\n export interface I18nStrings {\n /**\n * @deprecated Use `submitButtonText` on the component instead.\n */\n submitButton?: string;\n\n stepNumberLabel?(stepNumber: number): string;\n collapsedStepsLabel?(stepNumber: number, stepsCount: number): string;\n skipToButtonLabel?(targetStep: WizardProps.Step, targetStepNumber: number): string;\n navigationAriaLabel?: string;\n errorIconAriaLabel?: string;\n cancelButton?: string;\n previousButton?: string;\n nextButton?: string;\n optional?: string;\n nextButtonLoadingAnnouncement?: string;\n submitButtonLoadingAnnouncement?: string;\n }\n\n export interface NavigateDetail {\n requestedStepIndex: number;\n reason: WizardProps.NavigationReason;\n }\n\n export type NavigationReason = 'next' | 'previous' | 'step' | 'skip';\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/wizard/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { ErrorContext, FlowType } from '../internal/analytics/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport namespace WizardProps {\n export interface AnalyticsMetadata {\n instanceIdentifier?: string;\n flowType?: FlowType;\n resourceType?: string;\n errorContext?: ErrorContext;\n }\n}\n\nexport interface WizardProps extends BaseComponentProps {\n /**\n * Specifies additional analytics-related metadata.\n * * `instanceIdentifier` - A unique string that identifies this component instance in your application.\n * * `flowType` - Identifies the type of flow represented by the component.\n * * `resourceType` - Identifies the type of resource represented by the flow. **Note:** This API is currently experimental.\n * @analytics\n */\n analyticsMetadata?: WizardProps.AnalyticsMetadata;\n\n /**\n * Array of step objects. Each object represents a step in the wizard with the following properties:\n *\n * - `title` (string) - Text that's displayed as the title in the navigation pane and form header.\n * - `info` (ReactNode) - (Optional) Area for a page level info link that's displayed in the form header.\n * The page level info link should trigger the default help panel content for the step. Use the [link component](/components/link/) to display the link.\n * - `description` (ReactNode) - (Optional) Area below the form header for a page level description text to further explain the purpose, goal, or main actions of the step.\n * - `content` (ReactNode) - Main content area to display form sections, form fields, and controls.\n * - `errorText` (ReactNode) - (Optional) Error text that's displayed in a page level error alert.\n * Use this for rendering actionable server-side validation failure messages.\n * - `isOptional` (boolean) - Specifies whether the step is optional or required. If set to `true`, the text from `i18nStrings.optional`\n * is rendered next to the `title` in the navigation step label and the form header title.\n * - `analyticsMetadata` (WizardProps.StepAnalyticsMetadata) - (Optional) Specifies additional analytics-related metadata.\n * @analytics\n */\n steps: ReadonlyArray<WizardProps.Step>;\n\n /**\n * Index of the step that's currently displayed. The first step has an index of zero (0).\n *\n * If you don't set this property, the component starts on the first step and switches step automatically\n * when a user navigates using the buttons or an enabled step link in the navigation pane (that is, uncontrolled behavior).\n *\n * If you provide a value for this property, you must also set an `onNavigate` listener to update the property when\n * a user navigates (that is, controlled behavior).\n *\n * If you set it to a value that exceeds the maximum value (that is, the number of steps minus 1), its value is ignored and the component uses the maximum value.\n */\n activeStepIndex?: number;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n *\n * - `stepNumberLabel` ((stepNumber: number) => string) - A function that accepts a number (1-based indexing),\n * and returns a human-readable, localized string displaying the step number in the navigation pane. For example, \"Step 1\" or \"Step 2\".\n * - `collapsedStepsLabel` ((stepNumber: number, stepsCount: number) => string) - A function that accepts two number parameters (1-based indexing),\n * and returns a string responsible for the navigation summary on smaller screens. For example, \"Step 1 of 3\". The parameters are as follows:\n * - `stepNumber` (number) - The step number that the user is currently on.\n * - `stepsCount` (number) - The total number of steps in the wizard.\n * - `skipToButtonLabel`: ((targetStep: WizardProps.Step, targetStepNumber: number) => string) - An optional function that accepts the target step object\n * and the target step number (1-based indexing), and returns a string to be used as the *skip-to* button label. For example, \"Skip to Step 2\" or \"Skip to end\".\n * - `navigationAriaLabel` (string) - The aria label for the navigation pane.\n * - `cancelButton` (string) - The text of the button that enables the user to exit the flow.\n * - `previousButton` (string) - The text of the button that enables the user to return to the previous step.\n * - `nextButton` (string) - The text of the button that enables the user to move to the next step.\n * - `submitButton` (string) - The text of the button that enables the user to submit the form. **Deprecated**, replaced by the `submitButtonText` component property. `submitButton` is not supported by the I18nProvider.\n * - `optional` (string) - The text displayed next to the step title and form header title when a step is declared optional.\n * - `nextButtonLoadingAnnouncement` (string) - The text that a screen reader announces when the *next* button is in a loading state.\n * - `submitButtonLoadingAnnouncement` (string) - The text that a screen reader announces when the *submit* button is in a loading state.\n * @i18n\n */\n i18nStrings?: WizardProps.I18nStrings;\n\n /**\n * The text of the button that enables the user to submit the form.\n */\n submitButtonText?: string;\n\n /**\n * Renders the *next* or *submit* button in a loading state.\n *\n * Use this if you need to wait for a response from the server before the user can proceed to the next step, such as during server-side validation or retrieving the next step's information.\n */\n isLoadingNextStep?: boolean;\n\n /**\n * When set to `false`, the *skip-to* button is never shown.\n * When set to `true`, the *skip-to* button may appear to offer faster navigation for the user.\n *\n * The *skip-to* button only allows to skip optional steps. It is shown when there is one or more optional\n * steps ahead having no required steps in-between.\n *\n * Note: the *skip-to* button requires the function i18nStrings.skipToButtonLabel to be defined.\n *\n * Defaults to `false`.\n */\n allowSkipTo?: boolean;\n\n /**\n * Specifies left-aligned secondary actions for the wizard. Use a button dropdown if multiple actions are required.\n */\n secondaryActions?: React.ReactNode;\n\n /**\n * Called when a user clicks the *cancel* button.\n * If a user has entered data in the form, you should prompt the user with a modal before exiting the wizard flow.\n */\n onCancel?: NonCancelableEventHandler;\n\n /**\n * Called when a user clicks the *submit* button.\n */\n onSubmit?: NonCancelableEventHandler;\n\n /**\n * Called when a user clicks the *next* button, the *previous* button, or an enabled step link in the navigation pane.\n *\n * The event `detail` includes the following:\n * - `requestedStepIndex` - The index of the requested step.\n * - `reason` - The user action that triggered the navigation event. It can be `next` (when the user clicks the *next* button),\n * `previous` (when the user clicks the *previous* button), `step` (an enabled step link in the navigation pane),\n * or `skip` (when navigated using navigation pane or the *skip-to* button to the previously unvisited step).\n */\n onNavigate?: NonCancelableEventHandler<WizardProps.NavigateDetail>;\n}\n\nexport namespace WizardProps {\n export interface StepAnalyticsMetadata {\n instanceIdentifier?: string;\n errorContext?: ErrorContext;\n }\n export interface Step {\n title: string;\n info?: React.ReactNode;\n description?: React.ReactNode;\n content: React.ReactNode;\n errorText?: React.ReactNode;\n isOptional?: boolean;\n analyticsMetadata?: StepAnalyticsMetadata;\n }\n\n export interface I18nStrings {\n /**\n * @deprecated Use `submitButtonText` on the component instead.\n */\n submitButton?: string;\n\n stepNumberLabel?(stepNumber: number): string;\n collapsedStepsLabel?(stepNumber: number, stepsCount: number): string;\n skipToButtonLabel?(targetStep: WizardProps.Step, targetStepNumber: number): string;\n navigationAriaLabel?: string;\n errorIconAriaLabel?: string;\n cancelButton?: string;\n previousButton?: string;\n nextButton?: string;\n optional?: string;\n nextButtonLoadingAnnouncement?: string;\n submitButtonLoadingAnnouncement?: string;\n }\n\n export interface NavigateDetail {\n requestedStepIndex: number;\n reason: WizardProps.NavigationReason;\n }\n\n export type NavigationReason = 'next' | 'previous' | 'step' | 'skip';\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wizard-form.d.ts","sourceRoot":"","sources":["../../../src/wizard/wizard-form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8C,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"wizard-form.d.ts","sourceRoot":"","sources":["../../../src/wizard/wizard-form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8C,MAAM,OAAO,CAAC;AAmBnE,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAGlF,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAM3C,UAAU,eAAgB,SAAQ,0BAA0B;IAC1D,KAAK,EAAE,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IACvC,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,WAAW,EAAE,WAAW,CAAC,WAAW,CAAC;IACrC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,WAAW,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACnC,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C;AAED,eAAO,MAAM,kBAAkB,QAAwD,CAAC;AAExF,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,KAAK,EAAE,eAAe,eAwBrE"}
|
|
@@ -19,7 +19,7 @@ import styles from './styles.css.js';
|
|
|
19
19
|
export const STEP_NAME_SELECTOR = `[${DATA_ATTR_FUNNEL_KEY}="${FUNNEL_KEY_STEP_NAME}"]`;
|
|
20
20
|
export default function WizardFormWithAnalytics(props) {
|
|
21
21
|
const analyticsMetadata = getAnalyticsMetadataProps(props.steps[props.activeStepIndex]);
|
|
22
|
-
const __internalRootRef = useComponentMetadata('WizardForm', PACKAGE_VERSION,
|
|
22
|
+
const __internalRootRef = useComponentMetadata('WizardForm', PACKAGE_VERSION, analyticsMetadata);
|
|
23
23
|
const stepHeaderRef = useRef(null);
|
|
24
24
|
useEffectOnUpdate(() => {
|
|
25
25
|
var _a;
|
|
@@ -56,7 +56,7 @@ function WizardForm({ __internalRootRef, stepHeaderRef, steps, activeStepIndex,
|
|
|
56
56
|
totalSubSteps: funnelStepInfo.current.subStepCount.current,
|
|
57
57
|
funnelIdentifier,
|
|
58
58
|
subStepAllSelector: getSubStepAllSelector(),
|
|
59
|
-
|
|
59
|
+
errorContext: funnelStepInfo.current.stepErrorContext,
|
|
60
60
|
subStepConfiguration: (_b = funnelStepInfo.current.subStepConfiguration.current) === null || _b === void 0 ? void 0 : _b.get(funnelStepInfo.current.stepNumber),
|
|
61
61
|
stepErrorSelector: '#' + errorSlotId,
|
|
62
62
|
});
|