@cloudscape-design/components 3.0.358 → 3.0.359

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 (96) hide show
  1. package/alert/actions-wrapper/index.d.ts +16 -0
  2. package/alert/actions-wrapper/index.d.ts.map +1 -0
  3. package/alert/actions-wrapper/index.js +22 -0
  4. package/alert/actions-wrapper/index.js.map +1 -0
  5. package/alert/actions-wrapper/styles.css.js +6 -0
  6. package/alert/actions-wrapper/styles.scoped.css +17 -0
  7. package/alert/actions-wrapper/styles.selectors.js +7 -0
  8. package/alert/internal.d.ts.map +1 -1
  9. package/alert/internal.js +11 -5
  10. package/alert/internal.js.map +1 -1
  11. package/alert/styles.css.js +25 -24
  12. package/alert/styles.scoped.css +40 -39
  13. package/alert/styles.selectors.js +25 -24
  14. package/app-layout/runtime-api.d.ts +1 -1
  15. package/app-layout/runtime-api.d.ts.map +1 -1
  16. package/app-layout/runtime-api.js +6 -20
  17. package/app-layout/runtime-api.js.map +1 -1
  18. package/cards/index.d.ts.map +1 -1
  19. package/cards/index.js +10 -7
  20. package/cards/index.js.map +1 -1
  21. package/container/internal.d.ts +1 -2
  22. package/container/internal.d.ts.map +1 -1
  23. package/container/internal.js +2 -3
  24. package/container/internal.js.map +1 -1
  25. package/flashbar/flash.d.ts.map +1 -1
  26. package/flashbar/flash.js +11 -7
  27. package/flashbar/flash.js.map +1 -1
  28. package/flashbar/styles.css.js +47 -46
  29. package/flashbar/styles.scoped.css +146 -145
  30. package/flashbar/styles.selectors.js +47 -46
  31. package/header/internal.d.ts.map +1 -1
  32. package/header/internal.js +5 -0
  33. package/header/internal.js.map +1 -1
  34. package/internal/context/collection-label-context.d.ts +7 -0
  35. package/internal/context/collection-label-context.d.ts.map +1 -0
  36. package/internal/context/collection-label-context.js +5 -0
  37. package/internal/context/collection-label-context.js.map +1 -0
  38. package/internal/environment.js +1 -1
  39. package/internal/environment.json +1 -1
  40. package/internal/manifest.json +1 -1
  41. package/internal/plugins/api.d.ts +16 -1
  42. package/internal/plugins/api.d.ts.map +1 -1
  43. package/internal/plugins/api.js +22 -5
  44. package/internal/plugins/api.js.map +1 -1
  45. package/internal/plugins/controllers/action-buttons.d.ts +25 -0
  46. package/internal/plugins/controllers/action-buttons.d.ts.map +1 -0
  47. package/internal/plugins/controllers/action-buttons.js +29 -0
  48. package/internal/plugins/controllers/action-buttons.js.map +1 -0
  49. package/internal/plugins/{drawers-controller.d.ts → controllers/drawers.d.ts} +3 -4
  50. package/internal/plugins/controllers/drawers.d.ts.map +1 -0
  51. package/internal/plugins/{drawers-controller.js → controllers/drawers.js} +7 -12
  52. package/internal/plugins/controllers/drawers.js.map +1 -0
  53. package/internal/plugins/helpers/index.d.ts +3 -0
  54. package/internal/plugins/helpers/index.d.ts.map +1 -0
  55. package/internal/plugins/helpers/index.js +5 -0
  56. package/internal/plugins/helpers/index.js.map +1 -0
  57. package/internal/plugins/helpers/runtime-content-wrapper.d.ts +8 -0
  58. package/internal/plugins/helpers/runtime-content-wrapper.d.ts.map +1 -0
  59. package/internal/plugins/helpers/runtime-content-wrapper.js +14 -0
  60. package/internal/plugins/helpers/runtime-content-wrapper.js.map +1 -0
  61. package/internal/plugins/helpers/use-discovered-action.d.ts +8 -0
  62. package/internal/plugins/helpers/use-discovered-action.d.ts.map +1 -0
  63. package/internal/plugins/helpers/use-discovered-action.js +24 -0
  64. package/internal/plugins/helpers/use-discovered-action.js.map +1 -0
  65. package/internal/plugins/helpers/utils.d.ts +5 -0
  66. package/internal/plugins/helpers/utils.d.ts.map +1 -0
  67. package/internal/plugins/helpers/utils.js +12 -0
  68. package/internal/plugins/helpers/utils.js.map +1 -0
  69. package/package.json +1 -1
  70. package/split-panel/styles.css.js +56 -56
  71. package/split-panel/styles.scoped.css +80 -78
  72. package/split-panel/styles.selectors.js +56 -56
  73. package/table/interfaces.d.ts +2 -3
  74. package/table/interfaces.d.ts.map +1 -1
  75. package/table/interfaces.js.map +1 -1
  76. package/table/internal.d.ts.map +1 -1
  77. package/table/internal.js +15 -3
  78. package/table/internal.js.map +1 -1
  79. package/table/table-role/table-role-helper.d.ts +1 -0
  80. package/table/table-role/table-role-helper.d.ts.map +1 -1
  81. package/table/table-role/table-role-helper.js +1 -0
  82. package/table/table-role/table-role-helper.js.map +1 -1
  83. package/table/tools-header.d.ts.map +1 -1
  84. package/table/tools-header.js +10 -2
  85. package/table/tools-header.js.map +1 -1
  86. package/test-utils/dom/alert/index.js +1 -1
  87. package/test-utils/dom/alert/index.js.map +1 -1
  88. package/test-utils/dom/flashbar/flash.js +1 -1
  89. package/test-utils/dom/flashbar/flash.js.map +1 -1
  90. package/test-utils/selectors/alert/index.js +1 -1
  91. package/test-utils/selectors/alert/index.js.map +1 -1
  92. package/test-utils/selectors/flashbar/flash.js +1 -1
  93. package/test-utils/selectors/flashbar/flash.js.map +1 -1
  94. package/test-utils/tsconfig.tsbuildinfo +1 -1
  95. package/internal/plugins/drawers-controller.d.ts.map +0 -1
  96. package/internal/plugins/drawers-controller.js.map +0 -1
@@ -2,61 +2,61 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "drawer": "awsui_drawer_1r9lg_icpbs_189",
6
- "refresh": "awsui_refresh_1r9lg_icpbs_189",
7
- "animating": "awsui_animating_1r9lg_icpbs_203",
8
- "preference-icon--layout-border": "awsui_preference-icon--layout-border_1r9lg_icpbs_226",
9
- "preference-icon--layout-background": "awsui_preference-icon--layout-background_1r9lg_icpbs_230",
10
- "preference-icon--layout-header": "awsui_preference-icon--layout-header_1r9lg_icpbs_233",
11
- "preference-icon--border": "awsui_preference-icon--border_1r9lg_icpbs_236",
12
- "preference-icon--primary-button": "awsui_preference-icon--primary-button_1r9lg_icpbs_240",
13
- "preference-icon--secondary": "awsui_preference-icon--secondary_1r9lg_icpbs_243",
14
- "preference-icon--disabled-element": "awsui_preference-icon--disabled-element_1r9lg_icpbs_246",
15
- "preference-icon--separator": "awsui_preference-icon--separator_1r9lg_icpbs_249",
16
- "preference-icon--focus-text": "awsui_preference-icon--focus-text_1r9lg_icpbs_252",
17
- "preference-icon-refresh--layout-top": "awsui_preference-icon-refresh--layout-top_1r9lg_icpbs_256",
18
- "preference-icon-refresh--layout-main": "awsui_preference-icon-refresh--layout-main_1r9lg_icpbs_259",
19
- "preference-icon-refresh--primary": "awsui_preference-icon-refresh--primary_1r9lg_icpbs_262",
20
- "preference-icon-refresh--disabled": "awsui_preference-icon-refresh--disabled_1r9lg_icpbs_265",
21
- "preference-icon-refresh--column-header": "awsui_preference-icon-refresh--column-header_1r9lg_icpbs_268",
22
- "preference-icon-refresh--window": "awsui_preference-icon-refresh--window_1r9lg_icpbs_271",
23
- "preference-icon-refresh--secondary": "awsui_preference-icon-refresh--secondary_1r9lg_icpbs_275",
24
- "preference-icon-refresh--default": "awsui_preference-icon-refresh--default_1r9lg_icpbs_278",
25
- "preference-icon-refresh--separator": "awsui_preference-icon-refresh--separator_1r9lg_icpbs_281",
26
- "preference-icon-refresh--input-default": "awsui_preference-icon-refresh--input-default_1r9lg_icpbs_284",
27
- "preference-icon-refresh--heading": "awsui_preference-icon-refresh--heading_1r9lg_icpbs_287",
28
- "root": "awsui_root_1r9lg_icpbs_291",
29
- "preferences-button": "awsui_preferences-button_1r9lg_icpbs_304",
30
- "close-button": "awsui_close-button_1r9lg_icpbs_308",
31
- "drawer-closed": "awsui_drawer-closed_1r9lg_icpbs_319",
32
- "drawer-content-side": "awsui_drawer-content-side_1r9lg_icpbs_324",
33
- "drawer-content-bottom": "awsui_drawer-content-bottom_1r9lg_icpbs_344",
34
- "position-bottom": "awsui_position-bottom_1r9lg_icpbs_353",
35
- "position-side": "awsui_position-side_1r9lg_icpbs_380",
36
- "slider": "awsui_slider_1r9lg_icpbs_386",
37
- "slider-side": "awsui_slider-side_1r9lg_icpbs_415",
38
- "slider-wrapper-bottom": "awsui_slider-wrapper-bottom_1r9lg_icpbs_420",
39
- "slider-wrapper-side": "awsui_slider-wrapper-side_1r9lg_icpbs_431",
40
- "open-button": "awsui_open-button_1r9lg_icpbs_442",
41
- "open-button-side": "awsui_open-button-side_1r9lg_icpbs_446",
42
- "slider-icon": "awsui_slider-icon_1r9lg_icpbs_453",
43
- "slider-icon-bottom": "awsui_slider-icon-bottom_1r9lg_icpbs_459",
44
- "slider-icon-side": "awsui_slider-icon-side_1r9lg_icpbs_462",
45
- "pane-header-wrapper-bottom": "awsui_pane-header-wrapper-bottom_1r9lg_icpbs_466",
46
- "drawer-mobile": "awsui_drawer-mobile_1r9lg_icpbs_476",
47
- "drawer-disable-content-paddings": "awsui_drawer-disable-content-paddings_1r9lg_icpbs_479",
48
- "content-bottom": "awsui_content-bottom_1r9lg_icpbs_487",
49
- "pane-bottom-center-align": "awsui_pane-bottom-center-align_1r9lg_icpbs_500",
50
- "pane-bottom-content-nav-padding": "awsui_pane-bottom-content-nav-padding_1r9lg_icpbs_505",
51
- "pane-bottom-content-tools-padding": "awsui_pane-bottom-content-tools-padding_1r9lg_icpbs_509",
52
- "content-bottom-max-width": "awsui_content-bottom-max-width_1r9lg_icpbs_513",
53
- "content-side": "awsui_content-side_1r9lg_icpbs_518",
54
- "pane-header-wrapper-side": "awsui_pane-header-wrapper-side_1r9lg_icpbs_529",
55
- "pane-content-wrapper-side": "awsui_pane-content-wrapper-side_1r9lg_icpbs_532",
56
- "header": "awsui_header_1r9lg_icpbs_537",
57
- "header-text": "awsui_header-text_1r9lg_icpbs_546",
58
- "header-divider": "awsui_header-divider_1r9lg_icpbs_556",
59
- "header-actions": "awsui_header-actions_1r9lg_icpbs_562",
60
- "divider": "awsui_divider_1r9lg_icpbs_570"
5
+ "drawer": "awsui_drawer_1r9lg_1l13g_189",
6
+ "refresh": "awsui_refresh_1r9lg_1l13g_189",
7
+ "animating": "awsui_animating_1r9lg_1l13g_203",
8
+ "preference-icon--layout-border": "awsui_preference-icon--layout-border_1r9lg_1l13g_226",
9
+ "preference-icon--layout-background": "awsui_preference-icon--layout-background_1r9lg_1l13g_230",
10
+ "preference-icon--layout-header": "awsui_preference-icon--layout-header_1r9lg_1l13g_233",
11
+ "preference-icon--border": "awsui_preference-icon--border_1r9lg_1l13g_236",
12
+ "preference-icon--primary-button": "awsui_preference-icon--primary-button_1r9lg_1l13g_240",
13
+ "preference-icon--secondary": "awsui_preference-icon--secondary_1r9lg_1l13g_243",
14
+ "preference-icon--disabled-element": "awsui_preference-icon--disabled-element_1r9lg_1l13g_246",
15
+ "preference-icon--separator": "awsui_preference-icon--separator_1r9lg_1l13g_249",
16
+ "preference-icon--focus-text": "awsui_preference-icon--focus-text_1r9lg_1l13g_252",
17
+ "preference-icon-refresh--layout-top": "awsui_preference-icon-refresh--layout-top_1r9lg_1l13g_256",
18
+ "preference-icon-refresh--layout-main": "awsui_preference-icon-refresh--layout-main_1r9lg_1l13g_259",
19
+ "preference-icon-refresh--primary": "awsui_preference-icon-refresh--primary_1r9lg_1l13g_262",
20
+ "preference-icon-refresh--disabled": "awsui_preference-icon-refresh--disabled_1r9lg_1l13g_265",
21
+ "preference-icon-refresh--column-header": "awsui_preference-icon-refresh--column-header_1r9lg_1l13g_268",
22
+ "preference-icon-refresh--window": "awsui_preference-icon-refresh--window_1r9lg_1l13g_271",
23
+ "preference-icon-refresh--secondary": "awsui_preference-icon-refresh--secondary_1r9lg_1l13g_275",
24
+ "preference-icon-refresh--default": "awsui_preference-icon-refresh--default_1r9lg_1l13g_278",
25
+ "preference-icon-refresh--separator": "awsui_preference-icon-refresh--separator_1r9lg_1l13g_281",
26
+ "preference-icon-refresh--input-default": "awsui_preference-icon-refresh--input-default_1r9lg_1l13g_284",
27
+ "preference-icon-refresh--heading": "awsui_preference-icon-refresh--heading_1r9lg_1l13g_287",
28
+ "root": "awsui_root_1r9lg_1l13g_291",
29
+ "preferences-button": "awsui_preferences-button_1r9lg_1l13g_304",
30
+ "close-button": "awsui_close-button_1r9lg_1l13g_308",
31
+ "drawer-closed": "awsui_drawer-closed_1r9lg_1l13g_321",
32
+ "drawer-content-side": "awsui_drawer-content-side_1r9lg_1l13g_326",
33
+ "drawer-content-bottom": "awsui_drawer-content-bottom_1r9lg_1l13g_346",
34
+ "position-bottom": "awsui_position-bottom_1r9lg_1l13g_355",
35
+ "position-side": "awsui_position-side_1r9lg_1l13g_382",
36
+ "slider": "awsui_slider_1r9lg_1l13g_388",
37
+ "slider-side": "awsui_slider-side_1r9lg_1l13g_417",
38
+ "slider-wrapper-bottom": "awsui_slider-wrapper-bottom_1r9lg_1l13g_422",
39
+ "slider-wrapper-side": "awsui_slider-wrapper-side_1r9lg_1l13g_433",
40
+ "open-button": "awsui_open-button_1r9lg_1l13g_444",
41
+ "open-button-side": "awsui_open-button-side_1r9lg_1l13g_448",
42
+ "slider-icon": "awsui_slider-icon_1r9lg_1l13g_455",
43
+ "slider-icon-bottom": "awsui_slider-icon-bottom_1r9lg_1l13g_461",
44
+ "slider-icon-side": "awsui_slider-icon-side_1r9lg_1l13g_464",
45
+ "pane-header-wrapper-bottom": "awsui_pane-header-wrapper-bottom_1r9lg_1l13g_468",
46
+ "drawer-mobile": "awsui_drawer-mobile_1r9lg_1l13g_478",
47
+ "drawer-disable-content-paddings": "awsui_drawer-disable-content-paddings_1r9lg_1l13g_481",
48
+ "content-bottom": "awsui_content-bottom_1r9lg_1l13g_489",
49
+ "pane-bottom-center-align": "awsui_pane-bottom-center-align_1r9lg_1l13g_502",
50
+ "pane-bottom-content-nav-padding": "awsui_pane-bottom-content-nav-padding_1r9lg_1l13g_507",
51
+ "pane-bottom-content-tools-padding": "awsui_pane-bottom-content-tools-padding_1r9lg_1l13g_511",
52
+ "content-bottom-max-width": "awsui_content-bottom-max-width_1r9lg_1l13g_515",
53
+ "content-side": "awsui_content-side_1r9lg_1l13g_520",
54
+ "pane-header-wrapper-side": "awsui_pane-header-wrapper-side_1r9lg_1l13g_531",
55
+ "pane-content-wrapper-side": "awsui_pane-content-wrapper-side_1r9lg_1l13g_534",
56
+ "header": "awsui_header_1r9lg_1l13g_539",
57
+ "header-text": "awsui_header-text_1r9lg_1l13g_548",
58
+ "header-divider": "awsui_header-divider_1r9lg_1l13g_558",
59
+ "header-actions": "awsui_header-actions_1r9lg_1l13g_564",
60
+ "divider": "awsui_divider_1r9lg_1l13g_572"
61
61
  };
62
62
 
@@ -133,13 +133,12 @@ export interface TableProps<T = any> extends BaseComponentProps {
133
133
  * * `allItemsSelectionLabel` ((SelectionState) => string) - Specifies the alternative text for multi-selection column header.
134
134
  * * `selectionGroupLabel` (string) - Specifies the alternative text for the whole selection and single-selection column header.
135
135
  * It is prefixed to `itemSelectionLabel` and `allItemsSelectionLabel` when they are set.
136
- * * `tableLabel` (string) - Provides an alternative text for the table. If you use a header for this table, you may reuse the string
137
- * to provide a caption-like description. For example, tableLabel=Instances will be announced as 'Instances table'.
138
136
  * You can use the first argument of type `SelectionState` to access the current selection
139
137
  * state of the component (for example, the `selectedItems` list). The `itemSelectionLabel` for individual
140
138
  * items also receives the corresponding `Item` object. You can use the `selectionGroupLabel` to
141
139
  * add a meaningful description to the whole selection.
142
- *
140
+ * * `tableLabel` (string) - Provides an alternative text for the table. If you use a header for this table, you may reuse the string
141
+ * to provide a caption-like description. For example, tableLabel=Instances will be announced as 'Instances table'.
143
142
  * * `activateEditLabel` (EditableColumnDefinition, Item) => string -
144
143
  * Specifies an alternative text for the edit button in editable cells.
145
144
  * * `cancelEditLabel` (EditableColumnDefinition) => string -
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["table/interfaces.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACvF,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,uBAAuB,GAAG,UAAU,CAAC,uB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jB;IAED,UAAiB,wBAAwB;QACvC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;KAC/B;IAED,UAAiB,gBAAgB;QAC/B,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;KACnB;IAED,UAAiB,GAAG;QAClB;;;WAGG;QACH,WAAW,IAAI,IAAI,CAAC;QAEpB;;WAEG;QACH,UAAU,CAAC,IAAI,IAAI,CAAC;KACrB;IAED,KAAY,kBAAkB,CAAC,QAAQ,EAAE,SAAS,GAAG,OAAO,IAAI,CAC9D,IAAI,EAAE,QAAQ,EACd,MAAM,EAAE,gBAAgB,CAAC,QAAQ,CAAC,EAClC,QAAQ,EAAE,SAAS,KAChB,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAE1B,UAAiB,uBAAuB;QACtC,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,EAAE,OAAO,CAAC;KAClB;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["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';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler, CancelableEventHandler } 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 * 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's also used to connect `items` and `selectedItems` values when they reference different objects.\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.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 */\n columnDefinitions: ReadonlyArray<TableProps.ColumnDefinition<T>>;\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 * * `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 * 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 *\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 * @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 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 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. Full page variants\n * implement the high contrast header and content behavior automatically.\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 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 * If the table has no pagination, leave this property undefined. */\n firstIndex?: number;\n /**\n * Use this function to announce page changes to screen reader users.\n * Requires the properties firstIndex and totalItemsCount to be set correctly.\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\nexport namespace TableProps {\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 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 cell(item: ItemType): React.ReactNode;\n } & SortingColumn<ItemType>;\n\n export interface StickyColumns {\n first?: number;\n last?: number;\n }\n\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 // 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 }\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 totalItemsCount?: number;\n firstIndex: number;\n lastIndex: 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"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["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';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler, CancelableEventHandler } 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 * 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's also used to connect `items` and `selectedItems` values when they reference different objects.\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.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 */\n columnDefinitions: ReadonlyArray<TableProps.ColumnDefinition<T>>;\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 * * `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 * @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 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 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. Full page variants\n * implement the high contrast header and content behavior automatically.\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 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 * If the table has no pagination, leave this property undefined. */\n firstIndex?: number;\n /**\n * Use this function to announce page changes to screen reader users.\n * Requires the properties firstIndex and totalItemsCount to be set correctly.\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\nexport namespace TableProps {\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 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 cell(item: ItemType): React.ReactNode;\n } & SortingColumn<ItemType>;\n\n export interface StickyColumns {\n first?: number;\n last?: number;\n }\n\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 // 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 }\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 totalItemsCount?: number;\n firstIndex: number;\n lastIndex: 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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["table/internal.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAc,MAAM,cAAc,CAAC;AA4C/D,QAAA,MAAM,aAAa,qBAmaK,CAAC;AAEzB,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["table/internal.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAc,MAAM,cAAc,CAAC;AA6C/D,QAAA,MAAM,aAAa,qBAqbK,CAAC;AAEzB,eAAe,aAAa,CAAC"}
package/table/internal.js CHANGED
@@ -2,7 +2,7 @@ import { __rest } from "tslib";
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  import clsx from 'clsx';
5
- import React, { useImperativeHandle, useRef } from 'react';
5
+ import React, { useCallback, useImperativeHandle, useRef } from 'react';
6
6
  import { getVisualContextClassname } from '../internal/components/visual-context';
7
7
  import InternalContainer from '../container/internal';
8
8
  import { getBaseProps } from '../internal/base-component';
@@ -37,6 +37,7 @@ import { useContainerQuery } from '@cloudscape-design/component-toolkit';
37
37
  import { getTableRoleProps, getTableRowRoleProps } from './table-role';
38
38
  import { useCellEditing } from './use-cell-editing';
39
39
  import { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';
40
+ import { CollectionLabelContext } from '../internal/context/collection-label-context';
40
41
  const SELECTION_COLUMN_WIDTH = 54;
41
42
  const selectionColumnId = Symbol('selection-column-id');
42
43
  const InternalTable = React.forwardRef((_a, ref) => {
@@ -97,6 +98,11 @@ const InternalTable = React.forwardRef((_a, ref) => {
97
98
  const hasSelection = !!selectionType;
98
99
  const hasFooterPagination = isMobile && variant === 'full-page' && !!pagination;
99
100
  const hasFooter = !!footer || hasFooterPagination;
101
+ const headerIdRef = useRef(undefined);
102
+ const isLabelledByHeader = !(ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.tableLabel) && !!header;
103
+ const setHeaderRef = useCallback((id) => {
104
+ headerIdRef.current = id;
105
+ }, []);
100
106
  const visibleColumnWidthsWithSelection = [];
101
107
  const visibleColumnIdsWithSelection = [];
102
108
  if (hasSelection) {
@@ -165,7 +171,8 @@ const InternalTable = React.forwardRef((_a, ref) => {
165
171
  React.createElement(InternalContainer, Object.assign({}, baseProps, { __internalRootRef: __internalRootRef, className: clsx(baseProps.className, styles.root), header: React.createElement(React.Fragment, null,
166
172
  hasHeader && (React.createElement("div", { ref: overlapElement, className: clsx(hasDynamicHeight && [styles['dark-header'], 'awsui-context-content-header']) },
167
173
  React.createElement("div", { ref: toolsHeaderWrapper, className: clsx(styles['header-controls'], styles[`variant-${computedVariant}`]) },
168
- React.createElement(ToolsHeader, { header: header, filter: filter, pagination: pagination, preferences: preferences })))),
174
+ React.createElement(CollectionLabelContext.Provider, { value: { assignId: setHeaderRef } },
175
+ React.createElement(ToolsHeader, { header: header, filter: filter, pagination: pagination, preferences: preferences }))))),
169
176
  stickyHeader && (React.createElement(StickyHeader, { ref: stickyHeaderRef, variant: computedVariant, theadProps: theadProps, wrapperRef: wrapperRefObject, theadRef: theadRef, secondaryWrapperRef: secondaryWrapperRef, tableRef: tableRefObject, onScroll: handleScroll, tableHasHeader: hasHeader, contentDensity: contentDensity, tableRole: tableRole }))), disableHeaderPaddings: true, disableContentPaddings: true, variant: toContainerVariant(computedVariant), __disableFooterPaddings: true, __disableFooterDivider: true, __disableStickyMobile: false, footer: hasFooter ? (React.createElement("div", { className: clsx(styles['footer-wrapper'], styles[`variant-${computedVariant}`]) },
170
177
  React.createElement("div", { className: clsx(styles.footer, hasFooterPagination && styles['footer-with-pagination']) },
171
178
  footer && React.createElement("span", null, footer),
@@ -176,7 +183,12 @@ const InternalTable = React.forwardRef((_a, ref) => {
176
183
  }), style: stickyState.style.wrapper, onScroll: handleScroll }, wrapperProps),
177
184
  !!renderAriaLive && !!firstIndex && (React.createElement(LiveRegion, null,
178
185
  React.createElement("span", null, renderAriaLive({ totalItemsCount, firstIndex, lastIndex: firstIndex + items.length - 1 })))),
179
- React.createElement("table", Object.assign({ ref: tableRef, className: clsx(styles.table, resizableColumns && styles['table-layout-fixed'], contentDensity === 'compact' && getVisualContextClassname('compact-table')) }, getTableRoleProps({ tableRole, totalItemsCount, ariaLabel: ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.tableLabel })),
186
+ React.createElement("table", Object.assign({ ref: tableRef, className: clsx(styles.table, resizableColumns && styles['table-layout-fixed'], contentDensity === 'compact' && getVisualContextClassname('compact-table')) }, getTableRoleProps({
187
+ tableRole,
188
+ totalItemsCount,
189
+ ariaLabel: ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.tableLabel,
190
+ ariaLabelledBy: isLabelledByHeader && headerIdRef.current ? headerIdRef.current : undefined,
191
+ })),
180
192
  React.createElement(Thead, Object.assign({ ref: theadRef, hidden: stickyHeader, onFocusedComponentChange: component => { var _a; return (_a = stickyHeaderRef.current) === null || _a === void 0 ? void 0 : _a.setFocus(component); } }, theadProps)),
181
193
  React.createElement("tbody", null, loading || items.length === 0 ? (React.createElement("tr", null,
182
194
  React.createElement("td", { colSpan: selectionType ? visibleColumnDefinitions.length + 1 : visibleColumnDefinitions.length, className: clsx(styles['cell-merged'], hasFooter && styles['has-footer']) },
@@ -1 +1 @@
1
- {"version":3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,CACgB,CACC,CACY,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 clsx from 'clsx';\nimport React, { useImperativeHandle, useRef } from 'react';\nimport { TableForwardRefType, TableProps } from './interfaces';\nimport { getVisualContextClassname } from '../internal/components/visual-context';\nimport InternalContainer from '../container/internal';\nimport { getBaseProps } from '../internal/base-component';\nimport ToolsHeader from './tools-header';\nimport Thead, { TheadProps } from './thead';\nimport { TableBodyCell } from './body-cell';\nimport InternalStatusIndicator from '../status-indicator/internal';\nimport { supportsStickyPosition } from '../internal/utils/dom';\nimport SelectionControl from './selection-control';\nimport { checkSortingState, getColumnKey, getItemKey, getVisibleColumnDefinitions, toContainerVariant } from './utils';\nimport { useRowEvents } from './use-row-events';\nimport { focusMarkers, useFocusMove, useSelection } from './use-selection';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { isDevelopment } from '../internal/is-development';\nimport { ColumnWidthDefinition, ColumnWidthsProvider, DEFAULT_COLUMN_WIDTH } from './use-column-widths';\nimport { useScrollSync } from '../internal/hooks/use-scroll-sync';\nimport { ResizeTracker } from './resizer';\nimport styles from './styles.css.js';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport StickyHeader, { StickyHeaderRef } from './sticky-header';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport useMouseDownTarget from '../internal/hooks/use-mouse-down-target';\nimport { useDynamicOverlap } from '../internal/hooks/use-dynamic-overlap';\nimport LiveRegion from '../internal/components/live-region';\nimport useTableFocusNavigation from './use-table-focus-navigation';\nimport { SomeRequired } from '../internal/types';\nimport { TableTdElement } from './body-cell/td-element';\nimport { useStickyColumns } from './sticky-columns';\nimport { StickyScrollbar } from './sticky-scrollbar';\nimport { checkColumnWidths } from './column-widths-utils';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport { useContainerQuery } from '@cloudscape-design/component-toolkit';\nimport { getTableRoleProps, getTableRowRoleProps } from './table-role';\nimport { useCellEditing } from './use-cell-editing';\nimport { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';\n\nconst SELECTION_COLUMN_WIDTH = 54;\nconst selectionColumnId = Symbol('selection-column-id');\n\ntype InternalTableProps<T> = SomeRequired<TableProps<T>, 'items' | 'selectedItems' | 'variant'> &\n InternalBaseComponentProps;\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 ...rest\n }: InternalTableProps<T>,\n ref: React.Ref<TableProps.Ref>\n ) => {\n const baseProps = getBaseProps(rest);\n stickyHeader = stickyHeader && supportsStickyPosition();\n const isMobile = useMobile();\n\n const [containerWidth, wrapperMeasureRef] = useContainerQuery<number>(rect => rect.contentBoxWidth);\n const wrapperRefObject = useRef(null);\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\n useImperativeHandle(\n ref,\n () => ({\n scrollToTop: stickyHeaderRef.current?.scrollToTop || (() => undefined),\n cancelEdit,\n }),\n [cancelEdit]\n );\n\n const handleScroll = useScrollSync([wrapperRefObject, scrollbarRef, secondaryWrapperRef]);\n\n const { moveFocusDown, moveFocusUp, moveFocus } = useFocusMove(selectionType, items.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, updateShiftToggle } = useSelection({\n items,\n trackBy,\n selectedItems,\n selectionType,\n isItemDisabled,\n onSelectionChange,\n ariaLabels,\n loading,\n });\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 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 isFullPageInVisualRefresh = isVisualRefresh && variant === 'full-page';\n // All Classic variants and the \"full-page\" VR variant of the table with sticky columns should offset the scrollbar\n // for it not to overlap interactive elements (such as checkboxes, radio buttons or links in cells)\n const shouldOffsetStickyScrollbar = hasStickyColumns && (isVisualRefresh ? isFullPageInVisualRefresh : true);\n\n const hasEditableCells = !!columnDefinitions.find(col => col.editConfig);\n const tableRole = hasEditableCells ? 'grid' : 'table';\n\n const theadProps: TheadProps = {\n containerWidth,\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) => newWidth[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 stripedRows,\n stickyState,\n selectionColumnId,\n tableRole,\n };\n\n const wrapperRef = useMergeRefs(wrapperMeasureRef, wrapperRefObject, stickyState.refs.wrapper);\n const tableRef = useMergeRefs(tableMeasureRef, tableRefObject, stickyState.refs.table);\n\n // Allows keyboard users to scroll horizontally with arrow keys by making the wrapper part of the tab sequence\n const isWrapperScrollable = tableWidth && containerWidth && tableWidth > containerWidth;\n const wrapperProps = isWrapperScrollable\n ? { role: 'region', tabIndex: 0, 'aria-label': ariaLabels?.tableLabel }\n : {};\n\n const getMouseDownTarget = useMouseDownTarget();\n\n const hasDynamicHeight = computedVariant === 'full-page';\n const overlapElement = useDynamicOverlap({ disabled: !hasDynamicHeight });\n useTableFocusNavigation(selectionType, tableRefObject, visibleColumnDefinitions, items?.length);\n const toolsHeaderWrapper = useRef(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 =\n (toolsHeaderWrapper?.current as HTMLDivElement | null)?.getBoundingClientRect().height ?? 0;\n\n return (\n <LinkDefaultVariantContext.Provider value={{ defaultVariant: 'primary' }}>\n <ColumnWidthsProvider visibleColumns={visibleColumnWidthsWithSelection} resizableColumns={resizableColumns}>\n <InternalContainer\n {...baseProps}\n __internalRootRef={__internalRootRef}\n className={clsx(baseProps.className, styles.root)}\n header={\n <>\n {hasHeader && (\n <div\n ref={overlapElement}\n className={clsx(hasDynamicHeight && [styles['dark-header'], 'awsui-context-content-header'])}\n >\n <div\n ref={toolsHeaderWrapper}\n className={clsx(styles['header-controls'], styles[`variant-${computedVariant}`])}\n >\n <ToolsHeader header={header} filter={filter} pagination={pagination} preferences={preferences} />\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}\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 {!!renderAriaLive && !!firstIndex && (\n <LiveRegion>\n <span>\n {renderAriaLive({ totalItemsCount, firstIndex, lastIndex: firstIndex + items.length - 1 })}\n </span>\n </LiveRegion>\n )}\n <table\n ref={tableRef}\n className={clsx(\n styles.table,\n resizableColumns && styles['table-layout-fixed'],\n contentDensity === 'compact' && getVisualContextClassname('compact-table')\n )}\n {...getTableRoleProps({ tableRole, totalItemsCount, ariaLabel: ariaLabels?.tableLabel })}\n >\n <Thead\n ref={theadRef}\n hidden={stickyHeader}\n onFocusedComponentChange={component => stickyHeaderRef.current?.setFocus(component)}\n {...theadProps}\n />\n <tbody>\n {loading || items.length === 0 ? (\n <tr>\n <td\n colSpan={selectionType ? visibleColumnDefinitions.length + 1 : visibleColumnDefinitions.length}\n className={clsx(styles['cell-merged'], hasFooter && styles['has-footer'])}\n >\n <div\n className={styles['cell-merged-content']}\n style={{\n width:\n (supportsStickyPosition() && containerWidth && Math.floor(containerWidth)) || undefined,\n }}\n >\n {loading ? (\n <InternalStatusIndicator type=\"loading\" className={styles.loading} wrapText={true}>\n <LiveRegion visible={true}>{loadingText}</LiveRegion>\n </InternalStatusIndicator>\n ) : (\n <div className={styles.empty}>{empty}</div>\n )}\n </div>\n </td>\n </tr>\n ) : (\n items.map((item, rowIndex) => {\n const firstVisible = rowIndex === 0;\n const lastVisible = rowIndex === items.length - 1;\n const isEven = rowIndex % 2 === 0;\n const isSelected = !!selectionType && isItemSelected(item);\n const isPrevSelected = !!selectionType && !firstVisible && isItemSelected(items[rowIndex - 1]);\n const isNextSelected = !!selectionType && !lastVisible && isItemSelected(items[rowIndex + 1]);\n return (\n <tr\n key={getItemKey(trackBy, item, rowIndex)}\n className={clsx(styles.row, 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, item)}\n onContextMenu={onRowContextMenuHandler && onRowContextMenuHandler.bind(null, rowIndex, item)}\n {...getTableRowRoleProps({ tableRole, firstIndex, rowIndex })}\n >\n {selectionType !== undefined && (\n <TableTdElement\n className={clsx(styles['selection-control'])}\n isVisualRefresh={isVisualRefresh}\n isFirstRow={firstVisible}\n isLastRow={lastVisible}\n isSelected={isSelected}\n isNextSelected={isNextSelected}\n isPrevSelected={isPrevSelected}\n wrapLines={false}\n isEvenRow={isEven}\n stripedRows={stripedRows}\n hasSelection={hasSelection}\n hasFooter={hasFooter}\n stickyState={stickyState}\n columnId={selectionColumnId}\n tableRole={tableRole}\n >\n <SelectionControl\n onFocusDown={moveFocusDown}\n onFocusUp={moveFocusUp}\n onShiftToggle={updateShiftToggle}\n {...getItemSelectionProps(item)}\n />\n </TableTdElement>\n )}\n {visibleColumnDefinitions.map((column, colIndex) => {\n const isEditing = cellEditing.checkEditing({ rowIndex, colIndex });\n const successfulEdit = cellEditing.checkLastSuccessfulEdit({ rowIndex, colIndex });\n const isEditable = !!column.editConfig && !cellEditing.isLoading;\n return (\n <TableBodyCell\n key={getColumnKey(column, colIndex)}\n style={\n resizableColumns\n ? {}\n : {\n width: column.width,\n minWidth: column.minWidth,\n maxWidth: column.maxWidth,\n }\n }\n ariaLabels={ariaLabels}\n column={column}\n item={item}\n wrapLines={wrapLines}\n isEditable={isEditable}\n isEditing={isEditing}\n isRowHeader={column.isRowHeader}\n isFirstRow={firstVisible}\n isLastRow={lastVisible}\n isSelected={isSelected}\n isNextSelected={isNextSelected}\n isPrevSelected={isPrevSelected}\n successfulEdit={successfulEdit}\n onEditStart={() => cellEditing.startEdit({ rowIndex, colIndex })}\n onEditEnd={editCancelled =>\n cellEditing.completeEdit({ rowIndex, colIndex }, editCancelled)\n }\n submitEdit={cellEditing.submitEdit}\n hasFooter={hasFooter}\n stripedRows={stripedRows}\n isEvenRow={isEven}\n columnId={column.id ?? colIndex}\n stickyState={stickyState}\n isVisualRefresh={isVisualRefresh}\n tableRole={tableRole}\n />\n );\n })}\n </tr>\n );\n })\n )}\n </tbody>\n </table>\n {resizableColumns && <ResizeTracker />}\n </div>\n <StickyScrollbar\n ref={scrollbarRef}\n wrapperRef={wrapperRefObject}\n tableRef={tableRefObject}\n onScroll={handleScroll}\n offsetScrollbar={shouldOffsetStickyScrollbar}\n />\n </InternalContainer>\n </ColumnWidthsProvider>\n </LinkDefaultVariantContext.Provider>\n );\n }\n) as TableForwardRefType;\n\nexport default InternalTable;\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["table/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAExE,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,iBAAiB,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAqB,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,uBAAuB,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,sBAAsB,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AY,EACtB,eAAe,EAAE,2BAA2B,GAC5C,CACgB,CACC,CACY,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 clsx from 'clsx';\nimport React, { useCallback, useImperativeHandle, useRef } from 'react';\nimport { TableForwardRefType, TableProps } from './interfaces';\nimport { getVisualContextClassname } from '../internal/components/visual-context';\nimport InternalContainer from '../container/internal';\nimport { getBaseProps } from '../internal/base-component';\nimport ToolsHeader from './tools-header';\nimport Thead, { TheadProps } from './thead';\nimport { TableBodyCell } from './body-cell';\nimport InternalStatusIndicator from '../status-indicator/internal';\nimport { supportsStickyPosition } from '../internal/utils/dom';\nimport SelectionControl from './selection-control';\nimport { checkSortingState, getColumnKey, getItemKey, getVisibleColumnDefinitions, toContainerVariant } from './utils';\nimport { useRowEvents } from './use-row-events';\nimport { focusMarkers, useFocusMove, useSelection } from './use-selection';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { isDevelopment } from '../internal/is-development';\nimport { ColumnWidthDefinition, ColumnWidthsProvider, DEFAULT_COLUMN_WIDTH } from './use-column-widths';\nimport { useScrollSync } from '../internal/hooks/use-scroll-sync';\nimport { ResizeTracker } from './resizer';\nimport styles from './styles.css.js';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport StickyHeader, { StickyHeaderRef } from './sticky-header';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport useMouseDownTarget from '../internal/hooks/use-mouse-down-target';\nimport { useDynamicOverlap } from '../internal/hooks/use-dynamic-overlap';\nimport LiveRegion from '../internal/components/live-region';\nimport useTableFocusNavigation from './use-table-focus-navigation';\nimport { SomeRequired } from '../internal/types';\nimport { TableTdElement } from './body-cell/td-element';\nimport { useStickyColumns } from './sticky-columns';\nimport { StickyScrollbar } from './sticky-scrollbar';\nimport { checkColumnWidths } from './column-widths-utils';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport { useContainerQuery } from '@cloudscape-design/component-toolkit';\nimport { getTableRoleProps, getTableRowRoleProps } from './table-role';\nimport { useCellEditing } from './use-cell-editing';\nimport { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';\nimport { CollectionLabelContext } from '../internal/context/collection-label-context';\n\nconst SELECTION_COLUMN_WIDTH = 54;\nconst selectionColumnId = Symbol('selection-column-id');\n\ntype InternalTableProps<T> = SomeRequired<TableProps<T>, 'items' | 'selectedItems' | 'variant'> &\n InternalBaseComponentProps;\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 ...rest\n }: InternalTableProps<T>,\n ref: React.Ref<TableProps.Ref>\n ) => {\n const baseProps = getBaseProps(rest);\n stickyHeader = stickyHeader && supportsStickyPosition();\n const isMobile = useMobile();\n\n const [containerWidth, wrapperMeasureRef] = useContainerQuery<number>(rect => rect.contentBoxWidth);\n const wrapperRefObject = useRef(null);\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\n useImperativeHandle(\n ref,\n () => ({\n scrollToTop: stickyHeaderRef.current?.scrollToTop || (() => undefined),\n cancelEdit,\n }),\n [cancelEdit]\n );\n\n const handleScroll = useScrollSync([wrapperRefObject, scrollbarRef, secondaryWrapperRef]);\n\n const { moveFocusDown, moveFocusUp, moveFocus } = useFocusMove(selectionType, items.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, updateShiftToggle } = useSelection({\n items,\n trackBy,\n selectedItems,\n selectionType,\n isItemDisabled,\n onSelectionChange,\n ariaLabels,\n loading,\n });\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 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 isFullPageInVisualRefresh = isVisualRefresh && variant === 'full-page';\n // All Classic variants and the \"full-page\" VR variant of the table with sticky columns should offset the scrollbar\n // for it not to overlap interactive elements (such as checkboxes, radio buttons or links in cells)\n const shouldOffsetStickyScrollbar = hasStickyColumns && (isVisualRefresh ? isFullPageInVisualRefresh : true);\n\n const hasEditableCells = !!columnDefinitions.find(col => col.editConfig);\n const tableRole = hasEditableCells ? 'grid' : 'table';\n\n const theadProps: TheadProps = {\n containerWidth,\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) => newWidth[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 stripedRows,\n stickyState,\n selectionColumnId,\n tableRole,\n };\n\n const wrapperRef = useMergeRefs(wrapperMeasureRef, wrapperRefObject, stickyState.refs.wrapper);\n const tableRef = useMergeRefs(tableMeasureRef, tableRefObject, stickyState.refs.table);\n\n // Allows keyboard users to scroll horizontally with arrow keys by making the wrapper part of the tab sequence\n const isWrapperScrollable = tableWidth && containerWidth && tableWidth > containerWidth;\n const wrapperProps = isWrapperScrollable\n ? { role: 'region', tabIndex: 0, 'aria-label': ariaLabels?.tableLabel }\n : {};\n\n const getMouseDownTarget = useMouseDownTarget();\n\n const hasDynamicHeight = computedVariant === 'full-page';\n const overlapElement = useDynamicOverlap({ disabled: !hasDynamicHeight });\n useTableFocusNavigation(selectionType, tableRefObject, visibleColumnDefinitions, items?.length);\n const toolsHeaderWrapper = useRef(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 =\n (toolsHeaderWrapper?.current as HTMLDivElement | null)?.getBoundingClientRect().height ?? 0;\n\n return (\n <LinkDefaultVariantContext.Provider value={{ defaultVariant: 'primary' }}>\n <ColumnWidthsProvider visibleColumns={visibleColumnWidthsWithSelection} resizableColumns={resizableColumns}>\n <InternalContainer\n {...baseProps}\n __internalRootRef={__internalRootRef}\n className={clsx(baseProps.className, styles.root)}\n header={\n <>\n {hasHeader && (\n <div\n ref={overlapElement}\n className={clsx(hasDynamicHeight && [styles['dark-header'], 'awsui-context-content-header'])}\n >\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 />\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}\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 {!!renderAriaLive && !!firstIndex && (\n <LiveRegion>\n <span>\n {renderAriaLive({ totalItemsCount, firstIndex, lastIndex: firstIndex + items.length - 1 })}\n </span>\n </LiveRegion>\n )}\n <table\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 ariaLabel: ariaLabels?.tableLabel,\n ariaLabelledBy: isLabelledByHeader && headerIdRef.current ? headerIdRef.current : undefined,\n })}\n >\n <Thead\n ref={theadRef}\n hidden={stickyHeader}\n onFocusedComponentChange={component => stickyHeaderRef.current?.setFocus(component)}\n {...theadProps}\n />\n <tbody>\n {loading || items.length === 0 ? (\n <tr>\n <td\n colSpan={selectionType ? visibleColumnDefinitions.length + 1 : visibleColumnDefinitions.length}\n className={clsx(styles['cell-merged'], hasFooter && styles['has-footer'])}\n >\n <div\n className={styles['cell-merged-content']}\n style={{\n width:\n (supportsStickyPosition() && containerWidth && Math.floor(containerWidth)) || undefined,\n }}\n >\n {loading ? (\n <InternalStatusIndicator type=\"loading\" className={styles.loading} wrapText={true}>\n <LiveRegion visible={true}>{loadingText}</LiveRegion>\n </InternalStatusIndicator>\n ) : (\n <div className={styles.empty}>{empty}</div>\n )}\n </div>\n </td>\n </tr>\n ) : (\n items.map((item, rowIndex) => {\n const firstVisible = rowIndex === 0;\n const lastVisible = rowIndex === items.length - 1;\n const isEven = rowIndex % 2 === 0;\n const isSelected = !!selectionType && isItemSelected(item);\n const isPrevSelected = !!selectionType && !firstVisible && isItemSelected(items[rowIndex - 1]);\n const isNextSelected = !!selectionType && !lastVisible && isItemSelected(items[rowIndex + 1]);\n return (\n <tr\n key={getItemKey(trackBy, item, rowIndex)}\n className={clsx(styles.row, 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, item)}\n onContextMenu={onRowContextMenuHandler && onRowContextMenuHandler.bind(null, rowIndex, item)}\n {...getTableRowRoleProps({ tableRole, firstIndex, rowIndex })}\n >\n {selectionType !== undefined && (\n <TableTdElement\n className={clsx(styles['selection-control'])}\n isVisualRefresh={isVisualRefresh}\n isFirstRow={firstVisible}\n isLastRow={lastVisible}\n isSelected={isSelected}\n isNextSelected={isNextSelected}\n isPrevSelected={isPrevSelected}\n wrapLines={false}\n isEvenRow={isEven}\n stripedRows={stripedRows}\n hasSelection={hasSelection}\n hasFooter={hasFooter}\n stickyState={stickyState}\n columnId={selectionColumnId}\n tableRole={tableRole}\n >\n <SelectionControl\n onFocusDown={moveFocusDown}\n onFocusUp={moveFocusUp}\n onShiftToggle={updateShiftToggle}\n {...getItemSelectionProps(item)}\n />\n </TableTdElement>\n )}\n {visibleColumnDefinitions.map((column, colIndex) => {\n const isEditing = cellEditing.checkEditing({ rowIndex, colIndex });\n const successfulEdit = cellEditing.checkLastSuccessfulEdit({ rowIndex, colIndex });\n const isEditable = !!column.editConfig && !cellEditing.isLoading;\n return (\n <TableBodyCell\n key={getColumnKey(column, colIndex)}\n style={\n resizableColumns\n ? {}\n : {\n width: column.width,\n minWidth: column.minWidth,\n maxWidth: column.maxWidth,\n }\n }\n ariaLabels={ariaLabels}\n column={column}\n item={item}\n wrapLines={wrapLines}\n isEditable={isEditable}\n isEditing={isEditing}\n isRowHeader={column.isRowHeader}\n isFirstRow={firstVisible}\n isLastRow={lastVisible}\n isSelected={isSelected}\n isNextSelected={isNextSelected}\n isPrevSelected={isPrevSelected}\n successfulEdit={successfulEdit}\n onEditStart={() => cellEditing.startEdit({ rowIndex, colIndex })}\n onEditEnd={editCancelled =>\n cellEditing.completeEdit({ rowIndex, colIndex }, editCancelled)\n }\n submitEdit={cellEditing.submitEdit}\n hasFooter={hasFooter}\n stripedRows={stripedRows}\n isEvenRow={isEven}\n columnId={column.id ?? colIndex}\n stickyState={stickyState}\n isVisualRefresh={isVisualRefresh}\n tableRole={tableRole}\n />\n );\n })}\n </tr>\n );\n })\n )}\n </tbody>\n </table>\n {resizableColumns && <ResizeTracker />}\n </div>\n <StickyScrollbar\n ref={scrollbarRef}\n wrapperRef={wrapperRefObject}\n tableRef={tableRefObject}\n onScroll={handleScroll}\n offsetScrollbar={shouldOffsetStickyScrollbar}\n />\n </InternalContainer>\n </ColumnWidthsProvider>\n </LinkDefaultVariantContext.Provider>\n );\n }\n) as TableForwardRefType;\n\nexport default InternalTable;\n"]}
@@ -4,6 +4,7 @@ export type TableRole = 'table' | 'grid';
4
4
  export declare function getTableRoleProps(options: {
5
5
  tableRole: TableRole;
6
6
  ariaLabel?: string;
7
+ ariaLabelledBy?: string;
7
8
  totalItemsCount?: number;
8
9
  }): React.TableHTMLAttributes<HTMLTableElement>;
9
10
  export declare function getTableRowRoleProps(options: {
@@ -1 +1 @@
1
- {"version":3,"file":"table-role-helper.d.ts","sourceRoot":"lib/default/","sources":["table/table-role/table-role-helper.ts"],"names":[],"mappings":";AAGA,KAAK,aAAa,GAAG,UAAU,GAAG,WAAW,GAAG,YAAY,CAAC;AAa7D,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAEzC,wBAAgB,iBAAiB,CAAC,OAAO,EAAE;IACzC,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GAAG,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAa9C;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE;IAC5C,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,KAAK,CAAC,cAAc,CAAC,mBAAmB,CAAC,CAY5C;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE;IAClD,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B,GAAG,KAAK,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,CAU/C;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE;IAC7C,SAAS,EAAE,SAAS,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,GAAG,KAAK,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,CAY/C"}
1
+ {"version":3,"file":"table-role-helper.d.ts","sourceRoot":"lib/default/","sources":["table/table-role/table-role-helper.ts"],"names":[],"mappings":";AAGA,KAAK,aAAa,GAAG,UAAU,GAAG,WAAW,GAAG,YAAY,CAAC;AAa7D,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAEzC,wBAAgB,iBAAiB,CAAC,OAAO,EAAE;IACzC,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GAAG,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAc9C;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE;IAC5C,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,KAAK,CAAC,cAAc,CAAC,mBAAmB,CAAC,CAY5C;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE;IAClD,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B,GAAG,KAAK,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,CAU/C;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE;IAC7C,SAAS,EAAE,SAAS,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,GAAG,KAAK,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,CAY/C"}
@@ -12,6 +12,7 @@ export function getTableRoleProps(options) {
12
12
  // If we state explicitly, they get it always correctly even with low number of rows.
13
13
  nativeProps.role = options.tableRole;
14
14
  nativeProps['aria-label'] = options.ariaLabel;
15
+ nativeProps['aria-labelledby'] = options.ariaLabelledBy;
15
16
  // Incrementing the total count by one to account for the header row.
16
17
  nativeProps['aria-rowcount'] = options.totalItemsCount ? options.totalItemsCount + 1 : -1;
17
18
  return nativeProps;
@@ -1 +1 @@
1
- {"version":3,"file":"table-role-helper.js","sourceRoot":"lib/default/","sources":["table/table-role/table-role-helper.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAItC,MAAM,eAAe,GAAG;IACtB,QAAQ,EAAE,MAAM;IAChB,SAAS,EAAE,WAAW;IACtB,UAAU,EAAE,YAAY;CAChB,CAAC;AACX,MAAM,WAAW,GAAG,CAAC,YAA2B,EAAE,EAAE,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;AAQnF,M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WAAW,EAAE;QACvB,WAAW,CAAC,KAAK,GAAG,KAAK,CAAC;KAC3B;IAED,OAAO,WAAW,CAAC;AACrB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\ntype SortingStatus = 'sortable' | 'ascending' | 'descending';\n\nconst stateToAriaSort = {\n sortable: 'none',\n ascending: 'ascending',\n descending: 'descending',\n} as const;\nconst getAriaSort = (sortingState: SortingStatus) => stateToAriaSort[sortingState];\n\n// Depending on its content the table can have different semantic representation which includes the\n// ARIA role of the table component (\"table\", \"grid\", \"treegrid\") but also roles and other semantic attributes\n// of the child elements. The TableRole helper encapsulates table's semantic structure.\n\nexport type TableRole = 'table' | 'grid';\n\nexport function getTableRoleProps(options: {\n tableRole: TableRole;\n ariaLabel?: string;\n totalItemsCount?: number;\n}): React.TableHTMLAttributes<HTMLTableElement> {\n const nativeProps: React.TableHTMLAttributes<HTMLTableElement> = {};\n\n // Browsers have weird mechanism to guess whether it's a data table or a layout table.\n // If we state explicitly, they get it always correctly even with low number of rows.\n nativeProps.role = options.tableRole;\n\n nativeProps['aria-label'] = options.ariaLabel;\n\n // Incrementing the total count by one to account for the header row.\n nativeProps['aria-rowcount'] = options.totalItemsCount ? options.totalItemsCount + 1 : -1;\n\n return nativeProps;\n}\n\nexport function getTableRowRoleProps(options: {\n tableRole: TableRole;\n rowIndex: number;\n firstIndex?: number;\n}): React.HTMLAttributes<HTMLTableRowElement> {\n const nativeProps: React.HTMLAttributes<HTMLTableRowElement> = {};\n\n if (options.tableRole === 'grid') {\n nativeProps.role = 'row';\n }\n\n if (options.firstIndex !== undefined) {\n nativeProps['aria-rowindex'] = options.firstIndex + options.rowIndex + 1;\n }\n\n return nativeProps;\n}\n\nexport function getTableColHeaderRoleProps(options: {\n sortingStatus?: SortingStatus;\n}): React.ThHTMLAttributes<HTMLTableCellElement> {\n const nativeProps: React.ThHTMLAttributes<HTMLTableCellElement> = {};\n\n nativeProps.scope = 'col';\n\n if (options.sortingStatus) {\n nativeProps['aria-sort'] = getAriaSort(options.sortingStatus);\n }\n\n return nativeProps;\n}\n\nexport function getTableCellRoleProps(options: {\n tableRole: TableRole;\n isRowHeader?: boolean;\n}): React.TdHTMLAttributes<HTMLTableCellElement> {\n const nativeProps: React.TdHTMLAttributes<HTMLTableCellElement> = {};\n\n if (options.tableRole === 'grid') {\n nativeProps.role = 'gridcell';\n }\n\n if (options.isRowHeader) {\n nativeProps.scope = 'row';\n }\n\n return nativeProps;\n}\n"]}
1
+ {"version":3,"file":"table-role-helper.js","sourceRoot":"lib/default/","sources":["table/table-role/table-role-helper.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAItC,MAAM,eAAe,GAAG;IACtB,QAAQ,EAAE,MAAM;IAChB,SAAS,EAAE,WAAW;IACtB,UAAU,EAAE,YAAY;CAChB,CAAC;AACX,MAAM,WAAW,GAAG,CAAC,YAA2B,EAAE,EAAE,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;AAQnF,MAAM,UAAU,iBAAiB,CAAC,OAKjC;IACC,MAAM,WAAW,GAAgD,EAAE,CAAC;IAEpE,sFAAsF;IACtF,qFAAqF;IACrF,WAAW,CAAC,IAAI,GAAG,OAAO,CAAC,SAAS,CAAC;IAErC,WAAW,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC;IAC9C,WAAW,CAAC,iBAAiB,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC;IAExD,qEAAqE;IACrE,WAAW,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,OAAO,CAAC,eAAe,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAE1F,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,OAIpC;IACC,MAAM,WAAW,GAA8C,EAAE,CAAC;IAElE,IAAI,OAAO,CAAC,SAAS,KAAK,MAAM,EAAE;QAChC,WAAW,CAAC,IAAI,GAAG,KAAK,CAAC;KAC1B;IAED,IAAI,OAAO,CAAC,UAAU,KAAK,SAAS,EAAE;QACpC,WAAW,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;KAC1E;IAED,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,OAE1C;IACC,MAAM,WAAW,GAAiD,EAAE,CAAC;IAErE,WAAW,CAAC,KAAK,GAAG,KAAK,CAAC;IAE1B,IAAI,OAAO,CAAC,aAAa,EAAE;QACzB,WAAW,CAAC,WAAW,CAAC,GAAG,WAAW,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;KAC/D;IAED,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,OAGrC;IACC,MAAM,WAAW,GAAiD,EAAE,CAAC;IAErE,IAAI,OAAO,CAAC,SAAS,KAAK,MAAM,EAAE;QAChC,WAAW,CAAC,IAAI,GAAG,UAAU,CAAC;KAC/B;IAED,IAAI,OAAO,CAAC,WAAW,EAAE;QACvB,WAAW,CAAC,KAAK,GAAG,KAAK,CAAC;KAC3B;IAED,OAAO,WAAW,CAAC;AACrB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\ntype SortingStatus = 'sortable' | 'ascending' | 'descending';\n\nconst stateToAriaSort = {\n sortable: 'none',\n ascending: 'ascending',\n descending: 'descending',\n} as const;\nconst getAriaSort = (sortingState: SortingStatus) => stateToAriaSort[sortingState];\n\n// Depending on its content the table can have different semantic representation which includes the\n// ARIA role of the table component (\"table\", \"grid\", \"treegrid\") but also roles and other semantic attributes\n// of the child elements. The TableRole helper encapsulates table's semantic structure.\n\nexport type TableRole = 'table' | 'grid';\n\nexport function getTableRoleProps(options: {\n tableRole: TableRole;\n ariaLabel?: string;\n ariaLabelledBy?: string;\n totalItemsCount?: number;\n}): React.TableHTMLAttributes<HTMLTableElement> {\n const nativeProps: React.TableHTMLAttributes<HTMLTableElement> = {};\n\n // Browsers have weird mechanism to guess whether it's a data table or a layout table.\n // If we state explicitly, they get it always correctly even with low number of rows.\n nativeProps.role = options.tableRole;\n\n nativeProps['aria-label'] = options.ariaLabel;\n nativeProps['aria-labelledby'] = options.ariaLabelledBy;\n\n // Incrementing the total count by one to account for the header row.\n nativeProps['aria-rowcount'] = options.totalItemsCount ? options.totalItemsCount + 1 : -1;\n\n return nativeProps;\n}\n\nexport function getTableRowRoleProps(options: {\n tableRole: TableRole;\n rowIndex: number;\n firstIndex?: number;\n}): React.HTMLAttributes<HTMLTableRowElement> {\n const nativeProps: React.HTMLAttributes<HTMLTableRowElement> = {};\n\n if (options.tableRole === 'grid') {\n nativeProps.role = 'row';\n }\n\n if (options.firstIndex !== undefined) {\n nativeProps['aria-rowindex'] = options.firstIndex + options.rowIndex + 1;\n }\n\n return nativeProps;\n}\n\nexport function getTableColHeaderRoleProps(options: {\n sortingStatus?: SortingStatus;\n}): React.ThHTMLAttributes<HTMLTableCellElement> {\n const nativeProps: React.ThHTMLAttributes<HTMLTableCellElement> = {};\n\n nativeProps.scope = 'col';\n\n if (options.sortingStatus) {\n nativeProps['aria-sort'] = getAriaSort(options.sortingStatus);\n }\n\n return nativeProps;\n}\n\nexport function getTableCellRoleProps(options: {\n tableRole: TableRole;\n isRowHeader?: boolean;\n}): React.TdHTMLAttributes<HTMLTableCellElement> {\n const nativeProps: React.TdHTMLAttributes<HTMLTableCellElement> = {};\n\n if (options.tableRole === 'grid') {\n nativeProps.role = 'gridcell';\n }\n\n if (options.isRowHeader) {\n nativeProps.scope = 'row';\n }\n\n return nativeProps;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"tools-header.d.ts","sourceRoot":"lib/default/","sources":["table/tools-header.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,gBAAgB;IACxB,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC/B;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,EAAE,gBAAgB,eAkBhG"}
1
+ {"version":3,"file":"tools-header.d.ts","sourceRoot":"lib/default/","sources":["table/tools-header.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAM1C,UAAU,gBAAgB;IACxB,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC/B;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,EAAE,gBAAgB,eAwBhG"}