@cloudscape-design/components-themeable 3.0.1201 → 3.0.1202

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.
Files changed (77) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
  3. package/lib/internal/scss/table/body-cell/styles.scss +8 -0
  4. package/lib/internal/scss/table/test-classes/styles.scss +8 -0
  5. package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
  6. package/lib/internal/template/internal/environment.js +2 -2
  7. package/lib/internal/template/internal/environment.json +2 -2
  8. package/lib/internal/template/table/body-cell/styles.css.js +48 -47
  9. package/lib/internal/template/table/body-cell/styles.scoped.css +380 -374
  10. package/lib/internal/template/table/body-cell/styles.selectors.js +48 -47
  11. package/lib/internal/template/table/body-cell/td-element.d.ts +1 -0
  12. package/lib/internal/template/table/body-cell/td-element.d.ts.map +1 -1
  13. package/lib/internal/template/table/body-cell/td-element.js +7 -2
  14. package/lib/internal/template/table/body-cell/td-element.js.map +1 -1
  15. package/lib/internal/template/table/expandable-rows/expandable-rows-utils.d.ts +13 -5
  16. package/lib/internal/template/table/expandable-rows/expandable-rows-utils.d.ts.map +1 -1
  17. package/lib/internal/template/table/expandable-rows/expandable-rows-utils.js +19 -8
  18. package/lib/internal/template/table/expandable-rows/expandable-rows-utils.js.map +1 -1
  19. package/lib/internal/template/table/index.d.ts.map +1 -1
  20. package/lib/internal/template/table/index.js +4 -1
  21. package/lib/internal/template/table/index.js.map +1 -1
  22. package/lib/internal/template/table/interfaces.d.ts +75 -17
  23. package/lib/internal/template/table/interfaces.d.ts.map +1 -1
  24. package/lib/internal/template/table/interfaces.js.map +1 -1
  25. package/lib/internal/template/table/internal.d.ts.map +1 -1
  26. package/lib/internal/template/table/internal.js +50 -23
  27. package/lib/internal/template/table/internal.js.map +1 -1
  28. package/lib/internal/template/table/progressive-loading/loader-cell.d.ts +1 -1
  29. package/lib/internal/template/table/progressive-loading/loader-cell.d.ts.map +1 -1
  30. package/lib/internal/template/table/progressive-loading/loader-cell.js +3 -2
  31. package/lib/internal/template/table/progressive-loading/loader-cell.js.map +1 -1
  32. package/lib/internal/template/table/progressive-loading/progressive-loading-utils.d.ts +3 -8
  33. package/lib/internal/template/table/progressive-loading/progressive-loading-utils.d.ts.map +1 -1
  34. package/lib/internal/template/table/progressive-loading/progressive-loading-utils.js +6 -5
  35. package/lib/internal/template/table/progressive-loading/progressive-loading-utils.js.map +1 -1
  36. package/lib/internal/template/table/selection/index.d.ts +1 -1
  37. package/lib/internal/template/table/selection/index.d.ts.map +1 -1
  38. package/lib/internal/template/table/selection/index.js.map +1 -1
  39. package/lib/internal/template/table/selection/interfaces.d.ts +7 -1
  40. package/lib/internal/template/table/selection/interfaces.d.ts.map +1 -1
  41. package/lib/internal/template/table/selection/interfaces.js.map +1 -1
  42. package/lib/internal/template/table/selection/selection-cell.d.ts +2 -2
  43. package/lib/internal/template/table/selection/selection-cell.d.ts.map +1 -1
  44. package/lib/internal/template/table/selection/selection-cell.js.map +1 -1
  45. package/lib/internal/template/table/selection/selection-control.d.ts +2 -2
  46. package/lib/internal/template/table/selection/selection-control.d.ts.map +1 -1
  47. package/lib/internal/template/table/selection/selection-control.js.map +1 -1
  48. package/lib/internal/template/table/selection/use-group-selection.d.ts +12 -0
  49. package/lib/internal/template/table/selection/use-group-selection.d.ts.map +1 -0
  50. package/lib/internal/template/table/selection/use-group-selection.js +103 -0
  51. package/lib/internal/template/table/selection/use-group-selection.js.map +1 -0
  52. package/lib/internal/template/table/selection/use-selection-focus-move.d.ts +2 -2
  53. package/lib/internal/template/table/selection/use-selection-focus-move.d.ts.map +1 -1
  54. package/lib/internal/template/table/selection/use-selection-focus-move.js.map +1 -1
  55. package/lib/internal/template/table/selection/use-selection.d.ts +4 -8
  56. package/lib/internal/template/table/selection/use-selection.d.ts.map +1 -1
  57. package/lib/internal/template/table/selection/use-selection.js +17 -6
  58. package/lib/internal/template/table/selection/use-selection.js.map +1 -1
  59. package/lib/internal/template/table/selection/utils.d.ts +1 -1
  60. package/lib/internal/template/table/selection/utils.d.ts.map +1 -1
  61. package/lib/internal/template/table/selection/utils.js.map +1 -1
  62. package/lib/internal/template/table/test-classes/styles.css.js +6 -0
  63. package/lib/internal/template/table/test-classes/styles.scoped.css +7 -0
  64. package/lib/internal/template/table/test-classes/styles.selectors.js +7 -0
  65. package/lib/internal/template/table/thead.d.ts +4 -4
  66. package/lib/internal/template/table/thead.d.ts.map +1 -1
  67. package/lib/internal/template/table/thead.js.map +1 -1
  68. package/lib/internal/template/table/use-table-focus-navigation.d.ts +2 -2
  69. package/lib/internal/template/table/use-table-focus-navigation.d.ts.map +1 -1
  70. package/lib/internal/template/table/use-table-focus-navigation.js.map +1 -1
  71. package/lib/internal/template/test-utils/dom/table/index.d.ts +7 -0
  72. package/lib/internal/template/test-utils/dom/table/index.js +11 -0
  73. package/lib/internal/template/test-utils/dom/table/index.js.map +1 -1
  74. package/lib/internal/template/test-utils/selectors/table/index.d.ts +7 -0
  75. package/lib/internal/template/test-utils/selectors/table/index.js +11 -0
  76. package/lib/internal/template/test-utils/selectors/table/index.js.map +1 -1
  77. package/package.json +1 -1
@@ -82,6 +82,8 @@ export interface TableProps<T = any> extends BaseComponentProps {
82
82
  * to reorder the items. This property accepts a custom comparator that is used to compare two items.
83
83
  * The comparator must implement ascending ordering, and the output is inverted automatically in case of descending order.
84
84
  * If present, the `sortingField` property is ignored.
85
+ * * `counter` ((ItemCounterData) => string) - Specifies secondary cell content, displayed next to the primary. Use it to display
86
+ * resource counters in the first column of expandable tables with data grouping.
85
87
  * * `editConfig` (EditConfig) - Enables inline editing in column when present. The value is used to configure the editing behavior.
86
88
  * * `editConfig.ariaLabel` (string) - Specifies a label for the edit control. Visually hidden but read by screen readers.
87
89
  * * `editConfig.errorIconAriaLabel` (string) - Specifies an ariaLabel for the error icon that is displayed when the validation fails.
@@ -154,11 +156,19 @@ export interface TableProps<T = any> extends BaseComponentProps {
154
156
  resizableColumns?: boolean;
155
157
  /**
156
158
  * Specifies alternative text for the selection components (checkboxes and radio buttons) as follows:
157
- * * `itemSelectionLabel` ((SelectionState, Item) => string) - Specifies the alternative text for an item.
158
- * You can use the first argument of type `SelectionState` to access the current selection state of the component
159
- * (for example, the `selectedItems` list). The second argument is the corresponding `Item` object.
160
- * * `allItemsSelectionLabel` ((SelectionState) => string) - Specifies the alternative text for multi-selection column header.
161
159
  * * `selectionGroupLabel` (string) - Specifies the alternative text for the whole selection and single-selection column header.
160
+ * * `itemSelectionLabel` ((SelectionState, Item) => string) - Specifies the alternative text for item selection controls.
161
+ * The selection state includes:
162
+ * * `selectedItems` (Item[]) - corresponds to table's `selectedItems`.
163
+ * * `itemsCount` (optional, number) - corresponds to table's `expandableRows.getItemsCount(item)`.
164
+ * * `selectedItemsCount` (optional, number) - corresponds to table's `expandableRows.getItemsCount(item)`.
165
+ * * `allItemsSelectionLabel` ((SelectionState) => string) - Specifies the alternative text for all items selection control.
166
+ * The selection state includes:
167
+ * * `selectedItems` (Item[]) - corresponds to table's `selectedItems`.
168
+ * * `itemsCount` (optional, number) - corresponds to `expandableRows.totalItemsCount` or `totalItemsCount`.
169
+ * * `selectedItemsCount` (optional, number) - corresponds to `expandableRows.totalSelectedItemsCount` or `selectedItems.length`.
170
+ * * `itemLoaderSelectionLabel`: ((SelectionState, Item) => string) - Specifies the alternative text for resource loader selector
171
+ * in tables with data grouping.
162
172
  * * `tableLabel` (string) - Provides an alternative text for the table. If you use a header for this table, you may reuse the string
163
173
  * to provide a caption-like description. For example, tableLabel=Instances will be announced as 'Instances table'.
164
174
  * * `resizerRoleDescription` (string) - Provides role description for table column resizer buttons.
@@ -232,7 +242,7 @@ export interface TableProps<T = any> extends BaseComponentProps {
232
242
  onSortingChange?: NonCancelableEventHandler<TableProps.SortingState<T>>;
233
243
  /**
234
244
  * Fired when a user interaction triggers a change in the list of selected items.
235
- * The event `detail` contains the current list of `selectedItems`.
245
+ * The event `detail` contains the new state for `selectedItems`.
236
246
  */
237
247
  onSelectionChange?: NonCancelableEventHandler<TableProps.SelectionChangeDetail<T>>;
238
248
  /**
@@ -284,8 +294,8 @@ export interface TableProps<T = any> extends BaseComponentProps {
284
294
  */
285
295
  totalItemsCount?: number;
286
296
  /**
287
- * Use this property to inform screen readers which range of items is currently displayed in the table.
288
- * It specifies the index (1-based) of the first item in the table.
297
+ * Use this property to inform screen readers which range of items is currently displayed in the table.
298
+ * It specifies the index (1-based) of the first item in the table.
289
299
  */
290
300
  firstIndex?: number;
291
301
  /**
@@ -320,7 +330,22 @@ export interface TableProps<T = any> extends BaseComponentProps {
320
330
  * * `getItemChildren` ((Item) => Item[]) - Use it to define nested data that are shown when an item gets expanded.
321
331
  * * `isItemExpandable` ((Item) => boolean) - Use it for items that can be expanded to show nested data.
322
332
  * * `expandedItems` (Item[]) - Use it to represent the expanded state of items.
323
- * * `onExpandableItemToggle` (TableProps.OnExpandableItemToggle<T>) - Called when an item's expand toggle is clicked.
333
+ * * `onExpandableItemToggle` (TableProps.OnExpandableItemToggle<Item>) - Called when an item's expand toggle is clicked.
334
+ * * `groupSelection` (optional, GroupSelectionState<Item>) - Tree-like selection state for tables with grouped data. When defined, the
335
+ * properties `selectionType` and `selectedItems` no longer apply. It reads as (assuming item "a.1" is nested under "a"):
336
+ * * `{ inverted: false, toggledItems: [] }` - no items are selected;
337
+ * * `{ inverted: true, toggledItems: [] }` - all items are selected;
338
+ * * `{ inverted: false, toggledItems: ["a", "a.1"] }` - all items nested under "a", unless also nested under "a.1", are selected.
339
+ * * `{ inverted: true, toggledItems: ["a", "a.1"] }` - the opposite of above.
340
+ * * `onGroupSelectionChange` (optional, TableProps.OnGroupSelectionChange<Item>) - Called when group selection changes.
341
+ * * `getItemsCount` (optional, (Item) => number) - Use it to indicate the number of resources nested under the given item.
342
+ * The value is passed as `itemsCount` property to the `columnDefinitions[index].counter` and `ariaLabels.itemSelectionLabel` functions.
343
+ * * `totalItemsCount` (optional, number) - Use it to indicate the total number of resources in the table.
344
+ * The value is passed as `itemsCount` property to the `ariaLabels.allItemsSelectionLabel`.
345
+ * * `getSelectedItemsCount` (optional, (Item) => number) - Use it to indicate the number of selected resources nested under the given item.
346
+ * The value is passed as `selectedItemsCount` property to the `columnDefinitions[index].counter` and `ariaLabels.itemSelectionLabel` functions.
347
+ * * `totalSelectedItemsCount` (optional, number) - Use it to indicate the total number of selected resources in the table.
348
+ * The value is passed as `selectedItemsCount` property to the `ariaLabels.allItemsSelectionLabel`.
324
349
  */
325
350
  expandableRows?: TableProps.ExpandableRows<T>;
326
351
  /**
@@ -352,6 +377,10 @@ export interface TableProps<T = any> extends BaseComponentProps {
352
377
  * the table items array is empty.
353
378
  */
354
379
  renderLoaderEmpty?: (detail: TableProps.RenderLoaderEmptyDetail<T>) => React.ReactNode;
380
+ /**
381
+ * Renders loader counter that is appended to the loader content in all loader states.
382
+ */
383
+ renderLoaderCounter?: (detail: TableProps.RenderLoaderCounterDetail<T>) => React.ReactNode;
355
384
  }
356
385
  export declare namespace TableProps {
357
386
  interface AnalyticsMetadata {
@@ -407,19 +436,25 @@ export declare namespace TableProps {
407
436
  */
408
437
  disableNativeForm?: boolean;
409
438
  }
410
- type ColumnDefinition<ItemType> = {
439
+ type ColumnDefinition<T> = {
411
440
  id?: string;
412
441
  header: React.ReactNode;
413
442
  ariaLabel?(data: LabelData): string;
414
443
  width?: number | string;
415
444
  minWidth?: number | string;
416
445
  maxWidth?: number | string;
417
- editConfig?: EditConfig<ItemType>;
446
+ counter?(props: ItemCounterData<T>): React.ReactNode;
447
+ editConfig?: EditConfig<T>;
418
448
  isRowHeader?: boolean;
419
449
  verticalAlign?: VerticalAlign;
420
450
  hasDynamicContent?: boolean;
421
- cell(item: ItemType): React.ReactNode;
422
- } & SortingColumn<ItemType>;
451
+ cell(item: T): React.ReactNode;
452
+ } & SortingColumn<T>;
453
+ interface ItemCounterData<T> {
454
+ item: T;
455
+ itemsCount?: number;
456
+ selectedItemsCount?: number;
457
+ }
423
458
  interface StickyColumns {
424
459
  first?: number;
425
460
  last?: number;
@@ -429,14 +464,17 @@ export declare namespace TableProps {
429
464
  type Variant = 'container' | 'embedded' | 'borderless' | 'stacked' | 'full-page';
430
465
  interface SelectionState<T> {
431
466
  selectedItems: ReadonlyArray<T>;
467
+ itemsCount?: number;
468
+ selectedItemsCount?: number;
432
469
  }
433
470
  interface SelectionChangeDetail<T> {
434
471
  selectedItems: T[];
435
472
  }
436
473
  type IsItemDisabled<T> = (item: T) => boolean;
437
474
  interface AriaLabels<T> {
438
- allItemsSelectionLabel?: (data: TableProps.SelectionState<T>) => string;
439
- itemSelectionLabel?: (data: TableProps.SelectionState<T>, row: T) => string;
475
+ allItemsSelectionLabel?: (data: SelectionState<T>) => string;
476
+ itemSelectionLabel?: (data: SelectionState<T>, row: T) => string;
477
+ itemLoaderSelectionLabel?: (data: SelectionState<T>, row: null | T) => string;
440
478
  selectionGroupLabel?: string;
441
479
  tableLabel?: string;
442
480
  resizerRoleDescription?: string;
@@ -501,18 +539,37 @@ export declare namespace TableProps {
501
539
  getItemChildren: (item: T) => readonly T[];
502
540
  isItemExpandable: (item: T) => boolean;
503
541
  expandedItems: ReadonlyArray<T>;
504
- onExpandableItemToggle: TableProps.OnExpandableItemToggle<T>;
542
+ onExpandableItemToggle: OnExpandableItemToggle<T>;
543
+ groupSelection?: GroupSelectionState<T>;
544
+ onGroupSelectionChange?: OnGroupSelectionChange<T>;
545
+ getItemsCount?: (item: T) => number;
546
+ totalItemsCount?: number;
547
+ getSelectedItemsCount?: (item: T) => number;
548
+ totalSelectedItemsCount?: number;
505
549
  }
506
- type OnExpandableItemToggle<T> = NonCancelableEventHandler<TableProps.ExpandableItemToggleDetail<T>>;
550
+ type OnExpandableItemToggle<T> = NonCancelableEventHandler<ExpandableItemToggleDetail<T>>;
507
551
  interface ExpandableItemToggleDetail<T> {
508
552
  item: T;
509
553
  expanded: boolean;
510
554
  }
511
- type GetLoadingStatus<T> = (item: null | T) => TableProps.LoadingStatus;
555
+ type OnGroupSelectionChange<T> = NonCancelableEventHandler<GroupSelectionChangeDetail<T>>;
556
+ interface GroupSelectionChangeDetail<T> {
557
+ groupSelection: GroupSelectionState<T>;
558
+ }
559
+ interface GroupSelectionState<T> {
560
+ inverted: boolean;
561
+ toggledItems: readonly T[];
562
+ }
563
+ type GetLoadingStatus<T> = (item: null | T) => LoadingStatus;
512
564
  type LoadingStatus = 'pending' | 'loading' | 'error' | 'finished';
513
565
  interface RenderLoaderDetail<T> {
514
566
  item: null | T;
515
567
  }
568
+ interface RenderLoaderCounterDetail<T> {
569
+ loadingStatus: LoadingStatus;
570
+ selected: boolean;
571
+ item: null | T;
572
+ }
516
573
  interface RenderLoaderEmptyDetail<T> {
517
574
  item: T;
518
575
  }
@@ -529,5 +586,6 @@ interface TableLoaderRow<T> {
529
586
  status: TableProps.LoadingStatus;
530
587
  from: number;
531
588
  }
589
+ export type InternalSelectionType = TableProps.SelectionType | 'group';
532
590
  export {};
533
591
  //# sourceMappingURL=interfaces.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/table/interfaces.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AACvF,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,uBAAuB,GAAG,UAAU,CAAC,uBAAuB,CAAC;AAYpE,MAAM,WAAW,mBAAmB;IAClC,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG;QAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;KAAE,GAAG,GAAG,CAAC,OAAO,CAAC;CAC9E;AAED,MAAM,W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faces.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 * * `cellContext.submitValue` - Function to submit the `currentValue`.\n * * `editConfig.disableNativeForm` (boolean) - Disables the use of a `<form>` element to capture submissions inside the inline editor.\n * If enabled, ensure that any text inputs in the editing cell submit the cell value when the Enter key is pressed, using `cellContext.submitValue`.\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 * You can use the first argument of type `SelectionState` to access the current selection state of the component\n * (for example, the `selectedItems` list). The second argument is the corresponding `Item` object.\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 * * `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 * * `resizerTooltipText` (string) - Provides text for the table column resizer tooltip.\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 submitValue: () => 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 * Disables the use of a `<form>` element to capture submissions inside the inline editor.\n * If enabled, ensure that any text inputs in the editing cell submit the cell value when\n * the Enter key is pressed, using `cellContext.submitValue`.\n */\n disableNativeForm?: boolean;\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 resizerTooltipText?: 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 * * `counter` ((ItemCounterData) => string) - Specifies secondary cell content, displayed next to the primary. Use it to display\n * resource counters in the first column of expandable tables with data grouping.\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 * * `cellContext.submitValue` - Function to submit the `currentValue`.\n * * `editConfig.disableNativeForm` (boolean) - Disables the use of a `<form>` element to capture submissions inside the inline editor.\n * If enabled, ensure that any text inputs in the editing cell submit the cell value when the Enter key is pressed, using `cellContext.submitValue`.\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 * * `selectionGroupLabel` (string) - Specifies the alternative text for the whole selection and single-selection column header.\n * * `itemSelectionLabel` ((SelectionState, Item) => string) - Specifies the alternative text for item selection controls.\n * The selection state includes:\n * * `selectedItems` (Item[]) - corresponds to table's `selectedItems`.\n * * `itemsCount` (optional, number) - corresponds to table's `expandableRows.getItemsCount(item)`.\n * * `selectedItemsCount` (optional, number) - corresponds to table's `expandableRows.getItemsCount(item)`.\n * * `allItemsSelectionLabel` ((SelectionState) => string) - Specifies the alternative text for all items selection control.\n * The selection state includes:\n * * `selectedItems` (Item[]) - corresponds to table's `selectedItems`.\n * * `itemsCount` (optional, number) - corresponds to `expandableRows.totalItemsCount` or `totalItemsCount`.\n * * `selectedItemsCount` (optional, number) - corresponds to `expandableRows.totalSelectedItemsCount` or `selectedItems.length`.\n * * `itemLoaderSelectionLabel`: ((SelectionState, Item) => string) - Specifies the alternative text for resource loader selector\n * in tables with data grouping.\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 * * `resizerTooltipText` (string) - Provides text for the table column resizer tooltip.\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 new state for `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<Item>) - Called when an item's expand toggle is clicked.\n * * `groupSelection` (optional, GroupSelectionState<Item>) - Tree-like selection state for tables with grouped data. When defined, the\n * properties `selectionType` and `selectedItems` no longer apply. It reads as (assuming item \"a.1\" is nested under \"a\"):\n * * `{ inverted: false, toggledItems: [] }` - no items are selected;\n * * `{ inverted: true, toggledItems: [] }` - all items are selected;\n * * `{ inverted: false, toggledItems: [\"a\", \"a.1\"] }` - all items nested under \"a\", unless also nested under \"a.1\", are selected.\n * * `{ inverted: true, toggledItems: [\"a\", \"a.1\"] }` - the opposite of above.\n * * `onGroupSelectionChange` (optional, TableProps.OnGroupSelectionChange<Item>) - Called when group selection changes.\n * * `getItemsCount` (optional, (Item) => number) - Use it to indicate the number of resources nested under the given item.\n * The value is passed as `itemsCount` property to the `columnDefinitions[index].counter` and `ariaLabels.itemSelectionLabel` functions.\n * * `totalItemsCount` (optional, number) - Use it to indicate the total number of resources in the table.\n * The value is passed as `itemsCount` property to the `ariaLabels.allItemsSelectionLabel`.\n * * `getSelectedItemsCount` (optional, (Item) => number) - Use it to indicate the number of selected resources nested under the given item.\n * The value is passed as `selectedItemsCount` property to the `columnDefinitions[index].counter` and `ariaLabels.itemSelectionLabel` functions.\n * * `totalSelectedItemsCount` (optional, number) - Use it to indicate the total number of selected resources in the table.\n * The value is passed as `selectedItemsCount` property to the `ariaLabels.allItemsSelectionLabel`.\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 * Renders loader counter that is appended to the loader content in all loader states.\n */\n renderLoaderCounter?: (detail: TableProps.RenderLoaderCounterDetail<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 submitValue: () => 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 * Disables the use of a `<form>` element to capture submissions inside the inline editor.\n * If enabled, ensure that any text inputs in the editing cell submit the cell value when\n * the Enter key is pressed, using `cellContext.submitValue`.\n */\n disableNativeForm?: boolean;\n }\n\n export type ColumnDefinition<T> = {\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 counter?(props: ItemCounterData<T>): React.ReactNode;\n editConfig?: EditConfig<T>;\n isRowHeader?: boolean;\n verticalAlign?: VerticalAlign;\n hasDynamicContent?: boolean;\n cell(item: T): React.ReactNode;\n } & SortingColumn<T>;\n\n export interface ItemCounterData<T> {\n item: T;\n itemsCount?: number;\n selectedItemsCount?: number;\n }\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 itemsCount?: number;\n selectedItemsCount?: number;\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: SelectionState<T>) => string;\n itemSelectionLabel?: (data: SelectionState<T>, row: T) => string;\n itemLoaderSelectionLabel?: (data: SelectionState<T>, row: null | T) => string;\n selectionGroupLabel?: string;\n tableLabel?: string;\n resizerRoleDescription?: string;\n resizerTooltipText?: 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: OnExpandableItemToggle<T>;\n groupSelection?: GroupSelectionState<T>;\n onGroupSelectionChange?: OnGroupSelectionChange<T>;\n getItemsCount?: (item: T) => number;\n totalItemsCount?: number;\n getSelectedItemsCount?: (item: T) => number;\n totalSelectedItemsCount?: number;\n }\n\n export type OnExpandableItemToggle<T> = NonCancelableEventHandler<ExpandableItemToggleDetail<T>>;\n\n export interface ExpandableItemToggleDetail<T> {\n item: T;\n expanded: boolean;\n }\n\n export type OnGroupSelectionChange<T> = NonCancelableEventHandler<GroupSelectionChangeDetail<T>>;\n\n export interface GroupSelectionChangeDetail<T> {\n groupSelection: GroupSelectionState<T>;\n }\n\n export interface GroupSelectionState<T> {\n inverted: boolean;\n toggledItems: readonly T[];\n }\n\n export type GetLoadingStatus<T> = (item: null | T) => 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 RenderLoaderCounterDetail<T> {\n loadingStatus: LoadingStatus;\n selected: boolean;\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\nexport type InternalSelectionType = TableProps.SelectionType | 'group';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/table/internal.tsx"],"names":[],"mappings":"AAyCA,OAAO,EAAE,mBAAmB,EAAwB,MAAM,cAAc,CAAC;AA2CzE,eAAO,MAAM,sBAAsB,EAW9B,mBAAmB,CAAC;AAEzB,QAAA,MAAM,aAAa,EAqpBd,mBAAmB,CAAC;AAEzB,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/table/internal.tsx"],"names":[],"mappings":"AAyCA,OAAO,EAAE,mBAAmB,EAAwB,MAAM,cAAc,CAAC;AA4CzE,eAAO,MAAM,sBAAsB,EAW9B,mBAAmB,CAAC;AAEzB,QAAA,MAAM,aAAa,EAsrBd,mBAAmB,CAAC;AAEzB,eAAe,aAAa,CAAC"}
@@ -32,6 +32,7 @@ import { useProgressiveLoadingProps } from './progressive-loading/progressive-lo
32
32
  import { ResizeTracker } from './resizer';
33
33
  import { focusMarkers, useSelection, useSelectionFocusMove } from './selection';
34
34
  import { TableBodySelectionCell } from './selection/selection-cell';
35
+ import { useGroupSelection } from './selection/use-group-selection';
35
36
  import { useStickyColumns } from './sticky-columns';
36
37
  import StickyHeader from './sticky-header';
37
38
  import { StickyScrollbar } from './sticky-scrollbar';
@@ -58,10 +59,10 @@ export const InternalTableAsSubstep = React.forwardRef((props, ref) => {
58
59
  };
59
60
  return React.createElement(InternalTable, { ...tableProps, ref: ref });
60
61
  });
61
- const InternalTable = React.forwardRef(({ header, footer, empty, filter, pagination, preferences, items, columnDefinitions, trackBy, loading, loadingText, selectionType, selectedItems, isItemDisabled, ariaLabels, onSelectionChange, onSortingChange, sortingColumn, sortingDescending, sortingDisabled, visibleColumns, stickyHeader, stickyHeaderVerticalOffset, onRowClick, onRowContextMenu, wrapLines, stripedRows, contentDensity, submitEdit, onEditCancel, resizableColumns, onColumnWidthsChange, variant, __internalRootRef, totalItemsCount, firstIndex, renderAriaLive, stickyColumns, columnDisplay, enableKeyboardNavigation, expandableRows, getLoadingStatus, renderLoaderPending, renderLoaderLoading, renderLoaderError, renderLoaderEmpty, cellVerticalAlign, __funnelSubStepProps, ...rest }, ref) => {
62
+ const InternalTable = React.forwardRef(({ header, footer, empty, filter, pagination, preferences, items, columnDefinitions, trackBy, loading, loadingText, selectionType: externalSelectionType, selectedItems, isItemDisabled, ariaLabels, onSelectionChange, onSortingChange, sortingColumn, sortingDescending, sortingDisabled, visibleColumns, stickyHeader, stickyHeaderVerticalOffset, onRowClick, onRowContextMenu, wrapLines, stripedRows, contentDensity, submitEdit, onEditCancel, resizableColumns, onColumnWidthsChange, variant, __internalRootRef, totalItemsCount, firstIndex, renderAriaLive, stickyColumns, columnDisplay, enableKeyboardNavigation, expandableRows: externalExpandableRows, getLoadingStatus, renderLoaderPending, renderLoaderLoading, renderLoaderError, renderLoaderEmpty, renderLoaderCounter, cellVerticalAlign, __funnelSubStepProps, ...rest }, ref) => {
62
63
  var _a, _b, _c;
63
64
  // Keyboard navigation defaults to `true` for tables with expandable rows.
64
- if (expandableRows && enableKeyboardNavigation === undefined) {
65
+ if (externalExpandableRows && enableKeyboardNavigation === undefined) {
65
66
  enableKeyboardNavigation = true;
66
67
  }
67
68
  const baseProps = getBaseProps(rest);
@@ -70,17 +71,15 @@ const InternalTable = React.forwardRef(({ header, footer, empty, filter, paginat
70
71
  warnOnce('Table', `\`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.`);
71
72
  }
72
73
  const isMobile = useMobile();
73
- const { isExpandable, allItems, getExpandableItemProps } = useExpandableTableProps({
74
+ const expandableRows = useExpandableTableProps({
74
75
  items,
75
- expandableRows,
76
+ expandableRows: externalExpandableRows,
76
77
  trackBy,
77
78
  ariaLabels,
78
79
  });
79
- const { allRows } = useProgressiveLoadingProps({
80
- items: allItems,
81
- getLoadingStatus,
82
- getExpandableItemProps,
83
- });
80
+ const { allItems, isExpandable } = expandableRows;
81
+ const { allRows } = useProgressiveLoadingProps({ getLoadingStatus, expandableRows });
82
+ const selectionType = expandableRows.hasGroupSelection ? 'group' : externalSelectionType;
84
83
  const [containerWidth, wrapperMeasureRef] = useContainerQuery(rect => rect.borderBoxWidth);
85
84
  const wrapperMeasureRefObject = useRef(null);
86
85
  const wrapperMeasureMergedRef = useMergeRefs(wrapperMeasureRef, wrapperMeasureRefObject);
@@ -183,10 +182,12 @@ const InternalTable = React.forwardRef(({ header, footer, empty, filter, paginat
183
182
  columnDisplay,
184
183
  visibleColumns,
185
184
  });
186
- const { isItemSelected, getSelectAllProps, getItemSelectionProps } = useSelection({
185
+ const selectionProps = {
187
186
  items: allItems,
187
+ rootItems: items,
188
188
  trackBy,
189
189
  selectedItems,
190
+ totalItemsCount,
190
191
  selectionType,
191
192
  isItemDisabled,
192
193
  onSelectionChange,
@@ -196,9 +197,23 @@ const InternalTable = React.forwardRef(({ header, footer, empty, filter, paginat
196
197
  selectionGroupLabel: undefined,
197
198
  },
198
199
  loading,
200
+ expandableRows,
201
+ getLoadingStatus,
199
202
  setLastUserAction,
200
- });
201
- const isRowSelected = (row) => row.type === 'data' && isItemSelected(row.item);
203
+ };
204
+ const normalSelection = useSelection(selectionProps);
205
+ const groupSelection = useGroupSelection(selectionProps);
206
+ const selection = selectionType === 'group' ? groupSelection : normalSelection;
207
+ const isRowSelected = (row) => {
208
+ if (row.type === 'data') {
209
+ return selection.isItemSelected(row.item);
210
+ }
211
+ if (selectionType !== 'group') {
212
+ return false;
213
+ }
214
+ // Group loader is selected when its parent is selected.
215
+ return !row.item ? expandableRows.groupSelection.inverted : selection.isItemSelected(row.item);
216
+ };
202
217
  if (isDevelopment) {
203
218
  if (resizableColumns) {
204
219
  checkColumnWidths(columnDefinitions);
@@ -253,7 +268,7 @@ const InternalTable = React.forwardRef(({ header, footer, empty, filter, paginat
253
268
  }
254
269
  const theadProps = {
255
270
  selectionType,
256
- getSelectAllProps,
271
+ getSelectAllProps: selection.getSelectAllProps,
257
272
  columnDefinitions: visibleColumnDefinitions,
258
273
  variant: computedVariant,
259
274
  tableVariant: computedVariant,
@@ -341,13 +356,13 @@ const InternalTable = React.forwardRef(({ header, footer, empty, filter, paginat
341
356
  React.createElement(NoDataCell, { totalColumnsCount: totalColumnsCount, hasFooter: hasFooter, loading: loading, loadingText: loadingText, empty: empty, tableRef: tableRefObject, containerRef: wrapperMeasureRefObject }))) : (allRows.map((row, rowIndex) => {
342
357
  const isFirstRow = rowIndex === 0;
343
358
  const isLastRow = rowIndex === allRows.length - 1;
344
- const expandableProps = row.type === 'data' ? getExpandableItemProps(row.item) : undefined;
359
+ const rowExpandableProps = row.type === 'data' ? expandableRows.getExpandableItemProps(row.item) : undefined;
345
360
  const rowRoleProps = getTableRowRoleProps({
346
361
  tableRole,
347
362
  firstIndex,
348
363
  rowIndex,
349
364
  level: row.type === 'loader' ? row.level : undefined,
350
- ...expandableProps,
365
+ ...rowExpandableProps,
351
366
  });
352
367
  const getTableItemKey = (item) => getItemKey(trackBy, item, rowIndex);
353
368
  const sharedCellProps = {
@@ -368,27 +383,32 @@ const InternalTable = React.forwardRef(({ header, footer, empty, filter, paginat
368
383
  return (React.createElement("tr", { key: rowId, className: clsx(styles.row, sharedCellProps.isSelected && styles['row-selected']), onFocus: ({ currentTarget }) => {
369
384
  var _a;
370
385
  // When an element inside table row receives focus we want to adjust the scroll.
371
- // However, that behaviour is unwanted when the focus is received as result of a click
386
+ // However, that behavior is unwanted when the focus is received as result of a click
372
387
  // as it causes the click to never reach the target element.
373
388
  if (!currentTarget.contains(getMouseDownTarget())) {
374
389
  (_a = stickyHeaderRef.current) === null || _a === void 0 ? void 0 : _a.scrollToRow(currentTarget);
375
390
  }
376
391
  }, ...focusMarkers.item, onClick: onRowClickHandler && onRowClickHandler.bind(null, rowIndex, row.item), onContextMenu: onRowContextMenuHandler && onRowContextMenuHandler.bind(null, rowIndex, row.item), ...rowRoleProps },
377
- getItemSelectionProps && (React.createElement(TableBodySelectionCell, { ...sharedCellProps, columnId: selectionColumnId, selectionControlProps: {
378
- ...getItemSelectionProps(row.item),
392
+ selection.getItemSelectionProps && (React.createElement(TableBodySelectionCell, { ...sharedCellProps, columnId: selectionColumnId, selectionControlProps: {
393
+ ...selection.getItemSelectionProps(row.item),
379
394
  onFocusDown: moveFocusDown,
380
395
  onFocusUp: moveFocusUp,
381
396
  rowIndex,
382
397
  itemKey: rowId,
383
398
  }, verticalAlign: cellVerticalAlign, tableVariant: computedVariant })),
384
399
  visibleColumnDefinitions.map((column, colIndex) => {
385
- var _a, _b;
400
+ var _a, _b, _c;
386
401
  const colId = `${getColumnKey(column, colIndex)}`;
387
402
  const cellId = { row: rowId, col: colId };
388
403
  const isEditing = cellEditing.checkEditing(cellId);
389
404
  const successfulEdit = cellEditing.checkLastSuccessfulEdit(cellId);
390
405
  const isEditable = !!column.editConfig && !cellEditing.isLoading;
391
- const cellExpandableProps = isExpandable && colIndex === 0 ? expandableProps : undefined;
406
+ const cellExpandableProps = isExpandable && colIndex === 0 ? rowExpandableProps : undefined;
407
+ const counter = (_a = column.counter) === null || _a === void 0 ? void 0 : _a.call(column, {
408
+ item: row.item,
409
+ itemsCount: rowExpandableProps === null || rowExpandableProps === void 0 ? void 0 : rowExpandableProps.itemsCount,
410
+ selectedItemsCount: rowExpandableProps === null || rowExpandableProps === void 0 ? void 0 : rowExpandableProps.selectedItemsCount,
411
+ });
392
412
  const analyticsMetadata = {
393
413
  component: {
394
414
  innerContext: {
@@ -406,9 +426,11 @@ const InternalTable = React.forwardRef(({ header, footer, empty, filter, paginat
406
426
  width: column.width,
407
427
  minWidth: column.minWidth,
408
428
  maxWidth: column.maxWidth,
409
- }, ariaLabels: ariaLabels, column: column, item: row.item, wrapLines: wrapLines, isEditable: isEditable, isEditing: isEditing, isRowHeader: column.isRowHeader, successfulEdit: successfulEdit, resizableColumns: resizableColumns, onEditStart: () => cellEditing.startEdit(cellId), onEditEnd: editCancelled => cellEditing.completeEdit(cellId, editCancelled), submitEdit: cellEditing.submitEdit, columnId: (_a = column.id) !== null && _a !== void 0 ? _a : colIndex, colIndex: colIndex + colIndexOffset, verticalAlign: (_b = column.verticalAlign) !== null && _b !== void 0 ? _b : cellVerticalAlign, tableVariant: computedVariant, ...cellExpandableProps, ...getAnalyticsMetadataAttribute(analyticsMetadata) }));
429
+ }, ariaLabels: ariaLabels, column: column, item: row.item, wrapLines: wrapLines, isEditable: isEditable, isEditing: isEditing, isRowHeader: column.isRowHeader, successfulEdit: successfulEdit, resizableColumns: resizableColumns, onEditStart: () => cellEditing.startEdit(cellId), onEditEnd: editCancelled => cellEditing.completeEdit(cellId, editCancelled), submitEdit: cellEditing.submitEdit, columnId: (_b = column.id) !== null && _b !== void 0 ? _b : colIndex, colIndex: colIndex + colIndexOffset, verticalAlign: (_c = column.verticalAlign) !== null && _c !== void 0 ? _c : cellVerticalAlign, tableVariant: computedVariant, counter: counter, ...cellExpandableProps, ...getAnalyticsMetadataAttribute(analyticsMetadata) }));
410
430
  })));
411
431
  }
432
+ const loaderSelectionProps = selection.getLoaderSelectionProps && selection.getLoaderSelectionProps(row.item);
433
+ const rowSelection = selectionType === 'group' ? loaderSelectionProps : undefined;
412
434
  const loaderContent = getLoaderContent({
413
435
  item: row.item,
414
436
  loadingStatus: row.status,
@@ -417,11 +439,16 @@ const InternalTable = React.forwardRef(({ header, footer, empty, filter, paginat
417
439
  renderLoaderError,
418
440
  renderLoaderEmpty,
419
441
  });
442
+ const loaderCounter = renderLoaderCounter === null || renderLoaderCounter === void 0 ? void 0 : renderLoaderCounter({
443
+ item: row.item,
444
+ loadingStatus: row.status,
445
+ selected: !!(rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.checked),
446
+ });
420
447
  return (loaderContent && (React.createElement("tr", { key: (row.item ? getTableItemKey(row.item) : 'root-' + rowIndex) + '-' + row.from, className: styles.row, ...rowRoleProps },
421
- getItemSelectionProps && (React.createElement(TableBodySelectionCell, { ...sharedCellProps, columnId: selectionColumnId, verticalAlign: cellVerticalAlign, tableVariant: computedVariant })),
448
+ selectionType ? (React.createElement(TableBodySelectionCell, { ...sharedCellProps, columnId: selectionColumnId, verticalAlign: cellVerticalAlign, tableVariant: computedVariant, selectionControlProps: selectionType === 'group' ? loaderSelectionProps : undefined, isSelected: selectionType === 'group' && !!(loaderSelectionProps === null || loaderSelectionProps === void 0 ? void 0 : loaderSelectionProps.checked) })) : null,
422
449
  visibleColumnDefinitions.map((column, colIndex) => {
423
450
  var _a;
424
- return (React.createElement(TableLoaderCell, { key: getColumnKey(column, colIndex), ...sharedCellProps, wrapLines: false, columnId: (_a = column.id) !== null && _a !== void 0 ? _a : colIndex, colIndex: colIndex + colIndexOffset, isRowHeader: colIndex === 0, level: row.level, item: row.item, trackBy: trackBy }, loaderContent));
451
+ return (React.createElement(TableLoaderCell, { key: getColumnKey(column, colIndex), ...sharedCellProps, wrapLines: false, columnId: (_a = column.id) !== null && _a !== void 0 ? _a : colIndex, colIndex: colIndex + colIndexOffset, isSelected: selectionType === 'group' && !!(loaderSelectionProps === null || loaderSelectionProps === void 0 ? void 0 : loaderSelectionProps.checked), isRowHeader: colIndex === 0, level: row.level, item: row.item, trackBy: trackBy, counter: loaderCounter }, loaderContent));
425
452
  }))));
426
453
  }))))),
427
454
  resizableColumns && React.createElement(ResizeTracker, null)),