@salesforce/design-system-react 11.0.0-rc.0 → 11.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -1
- package/dist/cjs/components/accordion/index.cjs +1 -1
- package/dist/cjs/components/accordion/index.cjs.map +1 -1
- package/dist/cjs/components/accordion/panel.cjs.map +1 -1
- package/dist/cjs/components/alert/index.cjs +1 -1
- package/dist/cjs/components/alert/index.cjs.map +1 -1
- package/dist/cjs/components/builder-header/nav-dropdown.cjs.map +1 -1
- package/dist/cjs/components/builder-header/nav-link.cjs.map +1 -1
- package/dist/cjs/components/builder-header/toolbar.cjs.map +1 -1
- package/dist/cjs/components/button/check-props.cjs +1 -1
- package/dist/cjs/components/button/check-props.cjs.map +1 -1
- package/dist/cjs/components/button/index.cjs +1 -1
- package/dist/cjs/components/button/index.cjs.map +1 -1
- package/dist/cjs/components/button-stateful/check-props.cjs +1 -1
- package/dist/cjs/components/button-stateful/check-props.cjs.map +1 -1
- package/dist/cjs/components/button-stateful/index.cjs +1 -1
- package/dist/cjs/components/button-stateful/index.cjs.map +1 -1
- package/dist/cjs/components/carousel/index.cjs +1 -1
- package/dist/cjs/components/carousel/index.cjs.map +1 -1
- package/dist/cjs/components/carousel/private/carousel-indicators.cjs.map +1 -1
- package/dist/cjs/components/carousel/private/carousel-item.cjs +1 -1
- package/dist/cjs/components/carousel/private/carousel-item.cjs.map +1 -1
- package/dist/cjs/components/checkbox/check-props.cjs +1 -1
- package/dist/cjs/components/checkbox/check-props.cjs.map +1 -1
- package/dist/cjs/components/checkbox/index.cjs +1 -1
- package/dist/cjs/components/checkbox/index.cjs.map +1 -1
- package/dist/cjs/components/color-picker/color-picker.cjs +1 -1
- package/dist/cjs/components/color-picker/color-picker.cjs.map +1 -1
- package/dist/cjs/components/color-picker/private/custom-color.cjs.map +1 -1
- package/dist/cjs/components/color-picker/private/hsv-color.cjs +1 -1
- package/dist/cjs/components/color-picker/private/hsv-color.cjs.map +1 -1
- package/dist/cjs/components/color-picker/private/swatch-option.cjs +1 -1
- package/dist/cjs/components/color-picker/private/swatch-option.cjs.map +1 -1
- package/dist/cjs/components/color-picker/private/swatch.cjs +1 -1
- package/dist/cjs/components/color-picker/private/swatch.cjs.map +1 -1
- package/dist/cjs/components/combobox/combobox.cjs +1 -1
- package/dist/cjs/components/combobox/combobox.cjs.map +1 -1
- package/dist/cjs/components/combobox/index.cjs +1 -1
- package/dist/cjs/components/combobox/index.cjs.map +1 -1
- package/dist/cjs/components/combobox/private/menu.cjs +1 -1
- package/dist/cjs/components/combobox/private/menu.cjs.map +1 -1
- package/dist/cjs/components/date-picker/date-picker.cjs +1 -1
- package/dist/cjs/components/date-picker/date-picker.cjs.map +1 -1
- package/dist/cjs/components/date-picker/index.cjs.map +1 -1
- package/dist/cjs/components/date-picker/private/calendar.cjs.map +1 -1
- package/dist/cjs/components/date-picker/private/day.cjs +1 -1
- package/dist/cjs/components/date-picker/private/day.cjs.map +1 -1
- package/dist/cjs/components/files/file.cjs +1 -8
- package/dist/cjs/components/files/file.cjs.map +1 -1
- package/dist/cjs/components/files/private/file-actions.cjs +1 -1
- package/dist/cjs/components/files/private/file-actions.cjs.map +1 -1
- package/dist/cjs/components/files/private/file-figure.cjs +1 -1
- package/dist/cjs/components/files/private/file-figure.cjs.map +1 -1
- package/dist/cjs/components/filter/filter.cjs +1 -1
- package/dist/cjs/components/filter/filter.cjs.map +1 -1
- package/dist/cjs/components/icon/check-props.cjs +1 -1
- package/dist/cjs/components/icon/check-props.cjs.map +1 -1
- package/dist/cjs/components/icon/index.cjs +1 -1
- package/dist/cjs/components/icon/index.cjs.map +1 -1
- package/dist/cjs/components/icon/input-icon/index.cjs.map +1 -1
- package/dist/cjs/components/icon-settings/index.cjs.map +1 -1
- package/dist/cjs/components/input/check-props.cjs +1 -1
- package/dist/cjs/components/input/check-props.cjs.map +1 -1
- package/dist/cjs/components/input/index.cjs.map +1 -1
- package/dist/cjs/components/input/private/inner-input.cjs.map +1 -1
- package/dist/cjs/components/input/search.cjs.map +1 -1
- package/dist/cjs/components/menu-dropdown/button-trigger.cjs.map +1 -1
- package/dist/cjs/components/menu-dropdown/menu-dropdown.cjs +1 -1
- package/dist/cjs/components/menu-dropdown/menu-dropdown.cjs.map +1 -1
- package/dist/cjs/components/modal/index.cjs +1 -1
- package/dist/cjs/components/modal/index.cjs.map +1 -1
- package/dist/cjs/components/panel/filtering/group.cjs.map +1 -1
- package/dist/cjs/components/pill/index.cjs.map +1 -1
- package/dist/cjs/components/pill-container/index.cjs +1 -1
- package/dist/cjs/components/pill-container/index.cjs.map +1 -1
- package/dist/cjs/components/popover/edit-dialog.cjs.map +1 -1
- package/dist/cjs/components/popover/index.cjs.map +1 -1
- package/dist/cjs/components/popover/popover.cjs +1 -1
- package/dist/cjs/components/popover/popover.cjs.map +1 -1
- package/dist/cjs/components/progress-indicator/index.cjs.map +1 -1
- package/dist/cjs/components/progress-indicator/private/step.cjs.map +1 -1
- package/dist/cjs/components/progress-ring/index.cjs.map +1 -1
- package/dist/cjs/components/radio/index.cjs +1 -1
- package/dist/cjs/components/radio/index.cjs.map +1 -1
- package/dist/cjs/components/radio-group/check-props.cjs.map +1 -1
- package/dist/cjs/components/radio-group/index.cjs.map +1 -1
- package/dist/cjs/components/scoped-notification/index.cjs.map +1 -1
- package/dist/cjs/components/setup-assistant/step.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/cell.cjs +1 -1
- package/dist/cjs/components/simple-data-table/cell.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/index.cjs +1 -1
- package/dist/cjs/components/simple-data-table/index.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/interactive-element.cjs +1 -1
- package/dist/cjs/components/simple-data-table/interactive-element.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/private/cell-context.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/private/corner-style.cjs +2 -0
- package/dist/cjs/components/simple-data-table/private/corner-style.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/private/head.cjs +1 -1
- package/dist/cjs/components/simple-data-table/private/head.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/private/header-cell.cjs +1 -1
- package/dist/cjs/components/simple-data-table/private/header-cell.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/private/link.cjs +1 -1
- package/dist/cjs/components/simple-data-table/private/link.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/private/row.cjs +1 -1
- package/dist/cjs/components/simple-data-table/private/row.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/row-actions.cjs +1 -1
- package/dist/cjs/components/simple-data-table/row-actions.cjs.map +1 -1
- package/dist/cjs/components/slider/index.cjs.map +1 -1
- package/dist/cjs/components/split-view/header.cjs.map +1 -1
- package/dist/cjs/components/split-view/listbox.cjs.map +1 -1
- package/dist/cjs/components/split-view/private/list-item-with-content.cjs.map +1 -1
- package/dist/cjs/components/tabs/index.cjs.map +1 -1
- package/dist/cjs/components/tabs/panel.cjs.map +1 -1
- package/dist/cjs/components/tabs/private/tab.cjs +1 -1
- package/dist/cjs/components/tabs/private/tab.cjs.map +1 -1
- package/dist/cjs/components/textarea/check-props.cjs +1 -1
- package/dist/cjs/components/textarea/check-props.cjs.map +1 -1
- package/dist/cjs/components/textarea/index.cjs +1 -1
- package/dist/cjs/components/textarea/index.cjs.map +1 -1
- package/dist/cjs/components/toast/index.cjs.map +1 -1
- package/dist/cjs/components/tooltip/index.cjs +1 -3
- package/dist/cjs/components/tooltip/index.cjs.map +1 -1
- package/dist/cjs/components/tree/private/branch.cjs.map +1 -1
- package/dist/cjs/components/tree/private/item.cjs.map +1 -1
- package/dist/cjs/components/tree/private/render-branch.cjs +1 -1
- package/dist/cjs/components/tree/private/render-branch.cjs.map +1 -1
- package/dist/cjs/components/tree/tree.cjs.map +1 -1
- package/dist/cjs/components/trial-bar/button.cjs.map +1 -1
- package/dist/cjs/components/trial-bar/dropdown.cjs.map +1 -1
- package/dist/cjs/components/utilities/dialog/index.cjs +1 -1
- package/dist/cjs/components/utilities/dialog/index.cjs.map +1 -1
- package/dist/cjs/components/utilities/dialog/portal.cjs +1 -1
- package/dist/cjs/components/utilities/dialog/portal.cjs.map +1 -1
- package/dist/cjs/components/utilities/menu-list/index.cjs +1 -26
- package/dist/cjs/components/utilities/menu-list/index.cjs.map +1 -1
- package/dist/cjs/components/utilities/menu-list/item-label.cjs.map +1 -1
- package/dist/cjs/components/utilities/menu-list/item.cjs +1 -1
- package/dist/cjs/components/utilities/menu-list/item.cjs.map +1 -1
- package/dist/cjs/components/utilities/utility-icon/index.cjs +1 -1
- package/dist/cjs/components/utilities/utility-icon/index.cjs.map +1 -1
- package/dist/cjs/utilities/color.cjs +1 -1
- package/dist/cjs/utilities/color.cjs.map +1 -1
- package/dist/cjs/utilities/dom-element-focus.cjs.map +1 -1
- package/dist/cjs/utilities/execution-environment.cjs.map +1 -1
- package/dist/cjs/utilities/get-aria-props.cjs +1 -1
- package/dist/cjs/utilities/get-aria-props.cjs.map +1 -1
- package/dist/cjs/utilities/get-component-doc.cjs +1 -1
- package/dist/cjs/utilities/get-component-doc.cjs.map +1 -1
- package/dist/cjs/utilities/get-data-props.cjs +1 -1
- package/dist/cjs/utilities/get-data-props.cjs.map +1 -1
- package/dist/cjs/utilities/keyboard-navigable-dialog.cjs +1 -1
- package/dist/cjs/utilities/keyboard-navigable-dialog.cjs.map +1 -1
- package/dist/cjs/utilities/keyboard-navigate.cjs +1 -1
- package/dist/cjs/utilities/keyboard-navigate.cjs.map +1 -1
- package/dist/cjs/utilities/product-tokens/icon-backgrounds.cjs.map +1 -1
- package/dist/cjs/utilities/warning/children-as-trigger.cjs +1 -1
- package/dist/cjs/utilities/warning/children-as-trigger.cjs.map +1 -1
- package/dist/cjs/utilities/warning/deprecated-property-value.cjs +1 -1
- package/dist/cjs/utilities/warning/deprecated-property-value.cjs.map +1 -1
- package/dist/cjs/utilities/warning/deprecated-property.cjs +1 -1
- package/dist/cjs/utilities/warning/deprecated-property.cjs.map +1 -1
- package/dist/cjs/utilities/warning/has-children-without-display-name-of.cjs +1 -1
- package/dist/cjs/utilities/warning/has-children-without-display-name-of.cjs.map +1 -1
- package/dist/cjs/utilities/warning/if-one-then-both-required-property.cjs +1 -1
- package/dist/cjs/utilities/warning/if-one-then-both-required-property.cjs.map +1 -1
- package/dist/cjs/utilities/warning/is-trigger-tabbable.cjs +1 -1
- package/dist/cjs/utilities/warning/is-trigger-tabbable.cjs.map +1 -1
- package/dist/cjs/utilities/warning/low-priority-warning.cjs.map +1 -1
- package/dist/cjs/utilities/warning/one-of-required-property.cjs +1 -1
- package/dist/cjs/utilities/warning/one-of-required-property.cjs.map +1 -1
- package/dist/cjs/utilities/warning/only-one-of-properties.cjs +1 -1
- package/dist/cjs/utilities/warning/only-one-of-properties.cjs.map +1 -1
- package/dist/cjs/utilities/warning/removal-version.cjs +2 -0
- package/dist/cjs/utilities/warning/removal-version.cjs.map +1 -0
- package/dist/cjs/utilities/warning/render-function-return-contents-lack-display-name.cjs +1 -1
- package/dist/cjs/utilities/warning/render-function-return-contents-lack-display-name.cjs.map +1 -1
- package/dist/cjs/utilities/warning/required-property.cjs +1 -1
- package/dist/cjs/utilities/warning/required-property.cjs.map +1 -1
- package/dist/cjs/utilities/warning/sunset-property.cjs +1 -1
- package/dist/cjs/utilities/warning/sunset-property.cjs.map +1 -1
- package/dist/cjs/utilities/warning/warned-registry.cjs +2 -0
- package/dist/cjs/utilities/warning/warned-registry.cjs.map +1 -0
- package/dist/es/components/accordion/index.js +7 -3
- package/dist/es/components/accordion/index.js.map +1 -1
- package/dist/es/components/accordion/panel.js.map +1 -1
- package/dist/es/components/alert/index.js +4 -5
- package/dist/es/components/alert/index.js.map +1 -1
- package/dist/es/components/builder-header/nav-dropdown.js.map +1 -1
- package/dist/es/components/builder-header/nav-link.js.map +1 -1
- package/dist/es/components/builder-header/toolbar.js.map +1 -1
- package/dist/es/components/button/check-props.js +1 -1
- package/dist/es/components/button/check-props.js.map +1 -1
- package/dist/es/components/button/index.js +50 -50
- package/dist/es/components/button/index.js.map +1 -1
- package/dist/es/components/button-stateful/check-props.js +1 -1
- package/dist/es/components/button-stateful/check-props.js.map +1 -1
- package/dist/es/components/button-stateful/index.js +3 -2
- package/dist/es/components/button-stateful/index.js.map +1 -1
- package/dist/es/components/carousel/index.js +155 -129
- package/dist/es/components/carousel/index.js.map +1 -1
- package/dist/es/components/carousel/private/carousel-indicators.js.map +1 -1
- package/dist/es/components/carousel/private/carousel-item.js +1 -1
- package/dist/es/components/carousel/private/carousel-item.js.map +1 -1
- package/dist/es/components/checkbox/check-props.js +1 -1
- package/dist/es/components/checkbox/check-props.js.map +1 -1
- package/dist/es/components/checkbox/index.js +102 -100
- package/dist/es/components/checkbox/index.js.map +1 -1
- package/dist/es/components/color-picker/color-picker.js +150 -151
- package/dist/es/components/color-picker/color-picker.js.map +1 -1
- package/dist/es/components/color-picker/private/custom-color.js.map +1 -1
- package/dist/es/components/color-picker/private/hsv-color.js +16 -20
- package/dist/es/components/color-picker/private/hsv-color.js.map +1 -1
- package/dist/es/components/color-picker/private/swatch-option.js +2 -2
- package/dist/es/components/color-picker/private/swatch-option.js.map +1 -1
- package/dist/es/components/color-picker/private/swatch.js +1 -1
- package/dist/es/components/color-picker/private/swatch.js.map +1 -1
- package/dist/es/components/combobox/combobox.js +569 -582
- package/dist/es/components/combobox/combobox.js.map +1 -1
- package/dist/es/components/combobox/index.js +6 -19
- package/dist/es/components/combobox/index.js.map +1 -1
- package/dist/es/components/combobox/private/menu.js +3 -3
- package/dist/es/components/combobox/private/menu.js.map +1 -1
- package/dist/es/components/date-picker/date-picker.js +101 -102
- package/dist/es/components/date-picker/date-picker.js.map +1 -1
- package/dist/es/components/date-picker/index.js.map +1 -1
- package/dist/es/components/date-picker/private/calendar.js.map +1 -1
- package/dist/es/components/date-picker/private/day.js +1 -1
- package/dist/es/components/date-picker/private/day.js.map +1 -1
- package/dist/es/components/files/file.js +5 -6
- package/dist/es/components/files/file.js.map +1 -1
- package/dist/es/components/files/private/file-actions.js +2 -2
- package/dist/es/components/files/private/file-actions.js.map +1 -1
- package/dist/es/components/files/private/file-figure.js +1 -1
- package/dist/es/components/files/private/file-figure.js.map +1 -1
- package/dist/es/components/filter/filter.js +5 -1
- package/dist/es/components/filter/filter.js.map +1 -1
- package/dist/es/components/icon/check-props.js +9 -7
- package/dist/es/components/icon/check-props.js.map +1 -1
- package/dist/es/components/icon/index.js +13 -10
- package/dist/es/components/icon/index.js.map +1 -1
- package/dist/es/components/icon/input-icon/index.js.map +1 -1
- package/dist/es/components/icon-settings/index.js.map +1 -1
- package/dist/es/components/input/check-props.js +14 -13
- package/dist/es/components/input/check-props.js.map +1 -1
- package/dist/es/components/input/index.js.map +1 -1
- package/dist/es/components/input/private/inner-input.js.map +1 -1
- package/dist/es/components/input/search.js.map +1 -1
- package/dist/es/components/menu-dropdown/button-trigger.js.map +1 -1
- package/dist/es/components/menu-dropdown/menu-dropdown.js +202 -207
- package/dist/es/components/menu-dropdown/menu-dropdown.js.map +1 -1
- package/dist/es/components/modal/index.js +1 -2
- package/dist/es/components/modal/index.js.map +1 -1
- package/dist/es/components/panel/filtering/group.js.map +1 -1
- package/dist/es/components/pill/index.js.map +1 -1
- package/dist/es/components/pill-container/index.js +10 -6
- package/dist/es/components/pill-container/index.js.map +1 -1
- package/dist/es/components/popover/edit-dialog.js.map +1 -1
- package/dist/es/components/popover/index.js.map +1 -1
- package/dist/es/components/popover/popover.js +181 -177
- package/dist/es/components/popover/popover.js.map +1 -1
- package/dist/es/components/progress-indicator/index.js.map +1 -1
- package/dist/es/components/progress-indicator/private/step.js.map +1 -1
- package/dist/es/components/progress-ring/index.js.map +1 -1
- package/dist/es/components/radio/index.js +1 -1
- package/dist/es/components/radio/index.js.map +1 -1
- package/dist/es/components/radio-group/check-props.js.map +1 -1
- package/dist/es/components/radio-group/index.js.map +1 -1
- package/dist/es/components/scoped-notification/index.js.map +1 -1
- package/dist/es/components/setup-assistant/step.js.map +1 -1
- package/dist/es/components/simple-data-table/cell.js +8 -5
- package/dist/es/components/simple-data-table/cell.js.map +1 -1
- package/dist/es/components/simple-data-table/index.js +97 -91
- package/dist/es/components/simple-data-table/index.js.map +1 -1
- package/dist/es/components/simple-data-table/interactive-element.js +31 -28
- package/dist/es/components/simple-data-table/interactive-element.js.map +1 -1
- package/dist/es/components/simple-data-table/private/cell-context.js.map +1 -1
- package/dist/es/components/simple-data-table/private/corner-style.js +9 -0
- package/dist/es/components/simple-data-table/private/corner-style.js.map +1 -0
- package/dist/es/components/simple-data-table/private/head.js +65 -42
- package/dist/es/components/simple-data-table/private/head.js.map +1 -1
- package/dist/es/components/simple-data-table/private/header-cell.js +2 -1
- package/dist/es/components/simple-data-table/private/header-cell.js.map +1 -1
- package/dist/es/components/simple-data-table/private/link.js.map +1 -1
- package/dist/es/components/simple-data-table/private/row.js +96 -60
- package/dist/es/components/simple-data-table/private/row.js.map +1 -1
- package/dist/es/components/simple-data-table/row-actions.js +4 -1
- package/dist/es/components/simple-data-table/row-actions.js.map +1 -1
- package/dist/es/components/slider/index.js.map +1 -1
- package/dist/es/components/split-view/header.js.map +1 -1
- package/dist/es/components/split-view/listbox.js.map +1 -1
- package/dist/es/components/split-view/private/list-item-with-content.js.map +1 -1
- package/dist/es/components/tabs/index.js.map +1 -1
- package/dist/es/components/tabs/panel.js.map +1 -1
- package/dist/es/components/tabs/private/tab.js +1 -1
- package/dist/es/components/tabs/private/tab.js.map +1 -1
- package/dist/es/components/textarea/check-props.js +1 -1
- package/dist/es/components/textarea/check-props.js.map +1 -1
- package/dist/es/components/textarea/index.js +29 -42
- package/dist/es/components/textarea/index.js.map +1 -1
- package/dist/es/components/toast/index.js.map +1 -1
- package/dist/es/components/tooltip/index.js +107 -88
- package/dist/es/components/tooltip/index.js.map +1 -1
- package/dist/es/components/tree/private/branch.js.map +1 -1
- package/dist/es/components/tree/private/item.js.map +1 -1
- package/dist/es/components/tree/private/render-branch.js +14 -19
- package/dist/es/components/tree/private/render-branch.js.map +1 -1
- package/dist/es/components/tree/tree.js.map +1 -1
- package/dist/es/components/trial-bar/button.js.map +1 -1
- package/dist/es/components/trial-bar/dropdown.js.map +1 -1
- package/dist/es/components/utilities/dialog/index.js +2 -1
- package/dist/es/components/utilities/dialog/index.js.map +1 -1
- package/dist/es/components/utilities/dialog/portal.js +5 -3
- package/dist/es/components/utilities/dialog/portal.js.map +1 -1
- package/dist/es/components/utilities/menu-list/index.js +6 -6
- package/dist/es/components/utilities/menu-list/index.js.map +1 -1
- package/dist/es/components/utilities/menu-list/item-label.js.map +1 -1
- package/dist/es/components/utilities/menu-list/item.js +42 -18
- package/dist/es/components/utilities/menu-list/item.js.map +1 -1
- package/dist/es/components/utilities/utility-icon/index.js +32 -52
- package/dist/es/components/utilities/utility-icon/index.js.map +1 -1
- package/dist/es/utilities/color.js +1 -1
- package/dist/es/utilities/color.js.map +1 -1
- package/dist/es/utilities/dom-element-focus.js.map +1 -1
- package/dist/es/utilities/execution-environment.js.map +1 -1
- package/dist/es/utilities/get-aria-props.js +1 -1
- package/dist/es/utilities/get-aria-props.js.map +1 -1
- package/dist/es/utilities/get-component-doc.js +6 -6
- package/dist/es/utilities/get-component-doc.js.map +1 -1
- package/dist/es/utilities/get-data-props.js +1 -1
- package/dist/es/utilities/get-data-props.js.map +1 -1
- package/dist/es/utilities/keyboard-navigable-dialog.js +7 -7
- package/dist/es/utilities/keyboard-navigable-dialog.js.map +1 -1
- package/dist/es/utilities/keyboard-navigate.js +1 -1
- package/dist/es/utilities/keyboard-navigate.js.map +1 -1
- package/dist/es/utilities/product-tokens/icon-backgrounds.js.map +1 -1
- package/dist/es/utilities/warning/children-as-trigger.js +10 -8
- package/dist/es/utilities/warning/children-as-trigger.js.map +1 -1
- package/dist/es/utilities/warning/deprecated-property-value.js +12 -10
- package/dist/es/utilities/warning/deprecated-property-value.js.map +1 -1
- package/dist/es/utilities/warning/deprecated-property.js +10 -8
- package/dist/es/utilities/warning/deprecated-property.js.map +1 -1
- package/dist/es/utilities/warning/has-children-without-display-name-of.js +11 -10
- package/dist/es/utilities/warning/has-children-without-display-name-of.js.map +1 -1
- package/dist/es/utilities/warning/if-one-then-both-required-property.js +10 -9
- package/dist/es/utilities/warning/if-one-then-both-required-property.js.map +1 -1
- package/dist/es/utilities/warning/is-trigger-tabbable.js +9 -8
- package/dist/es/utilities/warning/is-trigger-tabbable.js.map +1 -1
- package/dist/es/utilities/warning/low-priority-warning.js.map +1 -1
- package/dist/es/utilities/warning/one-of-required-property.js +11 -10
- package/dist/es/utilities/warning/one-of-required-property.js.map +1 -1
- package/dist/es/utilities/warning/only-one-of-properties.js +9 -8
- package/dist/es/utilities/warning/only-one-of-properties.js.map +1 -1
- package/dist/es/utilities/warning/removal-version.js +6 -0
- package/dist/es/utilities/warning/removal-version.js.map +1 -0
- package/dist/es/utilities/warning/render-function-return-contents-lack-display-name.js +14 -13
- package/dist/es/utilities/warning/render-function-return-contents-lack-display-name.js.map +1 -1
- package/dist/es/utilities/warning/required-property.js +8 -7
- package/dist/es/utilities/warning/required-property.js.map +1 -1
- package/dist/es/utilities/warning/sunset-property.js +8 -7
- package/dist/es/utilities/warning/sunset-property.js.map +1 -1
- package/dist/es/utilities/warning/warned-registry.js +10 -0
- package/dist/es/utilities/warning/warned-registry.js.map +1 -0
- package/dist/llms/components/accordion.md +267 -0
- package/dist/llms/components/alert.md +228 -0
- package/dist/llms/components/avatar.md +167 -0
- package/dist/llms/components/badge.md +153 -0
- package/dist/llms/components/breadcrumb.md +148 -0
- package/dist/llms/components/builder-header.examples.md +239 -0
- package/dist/llms/components/builder-header.md +736 -0
- package/dist/llms/components/button-group.md +167 -0
- package/dist/llms/components/button-stateful.md +246 -0
- package/dist/llms/components/button.md +661 -0
- package/dist/llms/components/card.md +368 -0
- package/dist/llms/components/carousel.md +365 -0
- package/dist/llms/components/checkbox.md +887 -0
- package/dist/llms/components/color-picker.md +591 -0
- package/dist/llms/components/combobox.examples.md +802 -0
- package/dist/llms/components/combobox.md +929 -0
- package/dist/llms/components/date-picker.md +546 -0
- package/dist/llms/components/docked-composer.md +173 -0
- package/dist/llms/components/dynamic-icon.md +226 -0
- package/dist/llms/components/expandable-section.md +198 -0
- package/dist/llms/components/files.md +337 -0
- package/dist/llms/components/filter.md +775 -0
- package/dist/llms/components/icon-settings.md +301 -0
- package/dist/llms/components/icon.md +1040 -0
- package/dist/llms/components/input.md +746 -0
- package/dist/llms/components/media-object.md +125 -0
- package/dist/llms/components/menu-dropdown.md +732 -0
- package/dist/llms/components/modal.md +504 -0
- package/dist/llms/components/page-header.md +282 -0
- package/dist/llms/components/panel.md +256 -0
- package/dist/llms/components/pill-container.md +218 -0
- package/dist/llms/components/pill.md +266 -0
- package/dist/llms/components/popover.md +600 -0
- package/dist/llms/components/portal-settings.md +371 -0
- package/dist/llms/components/progress-bar.md +175 -0
- package/dist/llms/components/progress-indicator.md +399 -0
- package/dist/llms/components/progress-ring.md +146 -0
- package/dist/llms/components/radio-button-group.md +285 -0
- package/dist/llms/components/radio-group.md +242 -0
- package/dist/llms/components/radio.md +269 -0
- package/dist/llms/components/scoped-notification.md +156 -0
- package/dist/llms/components/setup-assistant.md +398 -0
- package/dist/llms/components/simple-data-table.examples.md +2773 -0
- package/dist/llms/components/simple-data-table.md +919 -0
- package/dist/llms/components/slider.md +217 -0
- package/dist/llms/components/spinner.md +232 -0
- package/dist/llms/components/split-view.md +350 -0
- package/dist/llms/components/tabs.md +311 -0
- package/dist/llms/components/textarea.md +331 -0
- package/dist/llms/components/toast.md +267 -0
- package/dist/llms/components/tooltip.md +470 -0
- package/dist/llms/components/tree.md +1011 -0
- package/dist/llms/components/trial-bar.md +383 -0
- package/dist/llms/components/vertical-navigation.md +196 -0
- package/dist/llms/components/visual-picker.md +362 -0
- package/dist/llms/components/welcome-mat.md +885 -0
- package/dist/llms/docs/migration-v11.md +471 -0
- package/dist/llms/llms-full.txt +6874 -0
- package/dist/llms/llms.txt +133 -0
- package/dist/llms/rules.md +36 -0
- package/dist/types/components/accordion/index.d.ts.map +1 -1
- package/dist/types/components/accordion/panel.d.ts +7 -7
- package/dist/types/components/builder-header/nav-dropdown.d.ts +1 -0
- package/dist/types/components/builder-header/nav-dropdown.d.ts.map +1 -1
- package/dist/types/components/builder-header/nav-link.d.ts +0 -1
- package/dist/types/components/builder-header/nav-link.d.ts.map +1 -1
- package/dist/types/components/builder-header/toolbar.d.ts +0 -1
- package/dist/types/components/builder-header/toolbar.d.ts.map +1 -1
- package/dist/types/components/button/index.d.ts +19 -6
- package/dist/types/components/button/index.d.ts.map +1 -1
- package/dist/types/components/button-stateful/index.d.ts +8 -2
- package/dist/types/components/button-stateful/index.d.ts.map +1 -1
- package/dist/types/components/carousel/index.d.ts +7 -1
- package/dist/types/components/carousel/index.d.ts.map +1 -1
- package/dist/types/components/checkbox/index.d.ts +22 -5
- package/dist/types/components/checkbox/index.d.ts.map +1 -1
- package/dist/types/components/color-picker/color-picker.d.ts +6 -4
- package/dist/types/components/color-picker/color-picker.d.ts.map +1 -1
- package/dist/types/components/color-picker/types.d.ts +2 -2
- package/dist/types/components/combobox/combobox.d.ts +22 -0
- package/dist/types/components/combobox/combobox.d.ts.map +1 -1
- package/dist/types/components/combobox/index.d.ts +1 -1
- package/dist/types/components/combobox/index.d.ts.map +1 -1
- package/dist/types/components/date-picker/date-picker.d.ts +16 -4
- package/dist/types/components/date-picker/date-picker.d.ts.map +1 -1
- package/dist/types/components/date-picker/index.d.ts +2 -6
- package/dist/types/components/date-picker/index.d.ts.map +1 -1
- package/dist/types/components/files/file.d.ts +5 -0
- package/dist/types/components/files/file.d.ts.map +1 -1
- package/dist/types/components/icon/index.d.ts +8 -1
- package/dist/types/components/icon/index.d.ts.map +1 -1
- package/dist/types/components/icon/input-icon/index.d.ts +3 -0
- package/dist/types/components/icon/input-icon/index.d.ts.map +1 -1
- package/dist/types/components/icon-settings/index.d.ts.map +1 -1
- package/dist/types/components/input/index.d.ts +10 -6
- package/dist/types/components/input/index.d.ts.map +1 -1
- package/dist/types/components/input/search.d.ts.map +1 -1
- package/dist/types/components/menu-dropdown/button-trigger.d.ts +5 -0
- package/dist/types/components/menu-dropdown/button-trigger.d.ts.map +1 -1
- package/dist/types/components/menu-dropdown/menu-dropdown.d.ts +13 -3
- package/dist/types/components/menu-dropdown/menu-dropdown.d.ts.map +1 -1
- package/dist/types/components/modal/index.d.ts +5 -5
- package/dist/types/components/modal/index.d.ts.map +1 -1
- package/dist/types/components/page-header/types.d.ts +3 -0
- package/dist/types/components/page-header/types.d.ts.map +1 -1
- package/dist/types/components/panel/filtering/group.d.ts +2 -0
- package/dist/types/components/panel/filtering/group.d.ts.map +1 -1
- package/dist/types/components/pill/index.d.ts +1 -0
- package/dist/types/components/pill/index.d.ts.map +1 -1
- package/dist/types/components/popover/edit-dialog.d.ts +1 -3
- package/dist/types/components/popover/edit-dialog.d.ts.map +1 -1
- package/dist/types/components/popover/index.d.ts.map +1 -1
- package/dist/types/components/popover/popover.d.ts +1 -0
- package/dist/types/components/popover/popover.d.ts.map +1 -1
- package/dist/types/components/progress-indicator/index.d.ts +1 -0
- package/dist/types/components/progress-indicator/index.d.ts.map +1 -1
- package/dist/types/components/progress-ring/index.d.ts +1 -0
- package/dist/types/components/progress-ring/index.d.ts.map +1 -1
- package/dist/types/components/radio/index.d.ts +11 -4
- package/dist/types/components/radio/index.d.ts.map +1 -1
- package/dist/types/components/radio-group/index.d.ts +5 -3
- package/dist/types/components/radio-group/index.d.ts.map +1 -1
- package/dist/types/components/scoped-notification/index.d.ts +1 -0
- package/dist/types/components/scoped-notification/index.d.ts.map +1 -1
- package/dist/types/components/setup-assistant/step.d.ts +0 -1
- package/dist/types/components/setup-assistant/step.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/cell.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/index.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/interactive-element.d.ts +8 -1
- package/dist/types/components/simple-data-table/interactive-element.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/types.d.ts +11 -2
- package/dist/types/components/simple-data-table/types.d.ts.map +1 -1
- package/dist/types/components/slider/index.d.ts +6 -4
- package/dist/types/components/slider/index.d.ts.map +1 -1
- package/dist/types/components/split-view/listbox.d.ts.map +1 -1
- package/dist/types/components/split-view/private/list-item-with-content.d.ts.map +1 -1
- package/dist/types/components/tabs/index.d.ts +1 -0
- package/dist/types/components/tabs/index.d.ts.map +1 -1
- package/dist/types/components/tabs/panel.d.ts +2 -1
- package/dist/types/components/tabs/panel.d.ts.map +1 -1
- package/dist/types/components/textarea/index.d.ts +12 -40
- package/dist/types/components/textarea/index.d.ts.map +1 -1
- package/dist/types/components/toast/index.d.ts.map +1 -1
- package/dist/types/components/tooltip/index.d.ts +5 -0
- package/dist/types/components/tooltip/index.d.ts.map +1 -1
- package/dist/types/components/tree/tree.d.ts +5 -0
- package/dist/types/components/tree/tree.d.ts.map +1 -1
- package/dist/types/components/utilities/dialog/portal.d.ts.map +1 -1
- package/dist/types/components/utilities/menu-list/index.d.ts +2 -2
- package/dist/types/components/utilities/menu-list/index.d.ts.map +1 -1
- package/dist/types/components/utilities/menu-list/item-label.d.ts +12 -0
- package/dist/types/components/utilities/menu-list/item-label.d.ts.map +1 -1
- package/dist/types/components/utilities/menu-list/item.d.ts +14 -1
- package/dist/types/components/utilities/menu-list/item.d.ts.map +1 -1
- package/dist/types/components/utilities/truncate/index.d.ts.map +1 -1
- package/dist/types/components/utilities/utility-icon/index.d.ts +1 -1
- package/dist/types/components/utilities/utility-icon/index.d.ts.map +1 -1
- package/dist/types/types/common.d.ts.map +1 -1
- package/dist/types/types/components.d.ts.map +1 -1
- package/package.json +9 -7
- package/dist/cjs/icons/action/index.cjs +0 -2
- package/dist/cjs/icons/action/index.cjs.map +0 -1
- package/dist/cjs/icons/custom/index.cjs +0 -2
- package/dist/cjs/icons/custom/index.cjs.map +0 -1
- package/dist/cjs/icons/doctype/index.cjs +0 -2
- package/dist/cjs/icons/doctype/index.cjs.map +0 -1
- package/dist/cjs/icons/standard/index.cjs +0 -2
- package/dist/cjs/icons/standard/index.cjs.map +0 -1
- package/dist/cjs/icons/utility/index.cjs +0 -2
- package/dist/cjs/icons/utility/index.cjs.map +0 -1
- package/dist/es/icons/action/index.js +0 -6
- package/dist/es/icons/action/index.js.map +0 -1
- package/dist/es/icons/custom/index.js +0 -6
- package/dist/es/icons/custom/index.js.map +0 -1
- package/dist/es/icons/doctype/index.js +0 -6
- package/dist/es/icons/doctype/index.js.map +0 -1
- package/dist/es/icons/standard/index.js +0 -6
- package/dist/es/icons/standard/index.js.map +0 -1
- package/dist/es/icons/utility/index.js +0 -6
- package/dist/es/icons/utility/index.js.map +0 -1
- package/dist/types/icons/action/index.d.ts +0 -3
- package/dist/types/icons/action/index.d.ts.map +0 -1
- package/dist/types/icons/custom/index.d.ts +0 -3
- package/dist/types/icons/custom/index.d.ts.map +0 -1
- package/dist/types/icons/doctype/index.d.ts +0 -3
- package/dist/types/icons/doctype/index.d.ts.map +0 -1
- package/dist/types/icons/standard/index.d.ts +0 -3
- package/dist/types/icons/standard/index.d.ts.map +0 -1
- package/dist/types/icons/utility/index.d.ts +0 -3
- package/dist/types/icons/utility/index.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/simple-data-table/index.tsx"],"sourcesContent":["/* eslint-disable max-lines */\n/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\n// # Data Table Component\n\n// Implements the [Data Table design pattern](https://www.lightningdesignsystem.com/components/data-tables) in React.\n\nimport React, { type ReactElement, type ReactNode } from 'react';\n\nimport classNames from 'classnames';\nimport assign from 'lodash.assign';\nimport { dequal as isEqual } from 'dequal';\nimport memoize from 'memoize-one';\n// This component's `checkProps` which issues warnings to developers about properties when in development mode (similar to React's built in development tools)\nimport checkProps from './check-props';\nimport componentDoc from './component.json';\n\nimport {\n\tcanUseDOM,\n\tcanUseEventListeners,\n} from '../../utilities/execution-environment';\n// ## Children\nimport SimpleDataTableCell from './cell';\nimport SimpleDataTableColumn from './column';\nimport SimpleDataTableHead from './private/head';\nimport SimpleDataTableRow from './private/row';\nimport SimpleDataTableRowActions from './row-actions';\nimport TableContext from './private/table-context';\nimport Mode, { type ModeType } from './private/mode';\nimport Spinner from '../spinner';\n\nimport KEYS from '../../utilities/key-code';\nimport generateId from '../../utilities/generate-id';\nimport mapKeyEventCallbacks from '../../utilities/key-callbacks';\n\nimport isElementOfType from '../../utilities/is-element-of-type';\n\nimport {\n\tSIMPLE_DATA_TABLE,\n\tSIMPLE_DATA_TABLE_HEAD,\n\tSIMPLE_DATA_TABLE_ROW,\n} from '../../utilities/constants';\n\nimport type {\n\tSimpleDataTableProps,\n\tSimpleDataTableItem,\n\tSimpleDataTableColumnConfig,\n\tSimpleDataTableColumnProps,\n\tSimpleDataTableCellProps,\n\tSimpleDataTableAssistiveText,\n\tSimpleDataTableRowActionsProps,\n\tSimpleDataTableLoadMoreData,\n} from './types';\n\n// The main SimpleDataTable component's state.\ninterface SimpleDataTableState {\n\t// Currently selected cell\n\tactiveCell: { rowIndex: number; columnIndex: number };\n\t// Interactive element within a cell that receives focus when in actionable mode\n\tactiveElement: string | null;\n\t// The table can be in navigation or actionable mode\n\tmode: ModeType;\n\t// The table currently has focus\n\ttableHasFocus: boolean;\n\t// Allows for keyboard navigation\n\tallowKeyboardNavigation?: boolean;\n}\n\n// Safely get the length of an array, returning 0 for invalid input.\nconst count = (array: unknown): number =>\n\tArray.isArray(array) ? array.length : 0;\n\nconst defaultProps = {\n\tassistiveText: {\n\t\tactionsHeader: 'Actions',\n\t\tcolumnSort: 'Sort by: ',\n\t\tcolumnSortedAscending: 'Sorted Ascending',\n\t\tcolumnSortedDescending: 'Sorted Descending',\n\t\tselectAllRows: 'Select all rows',\n\t\tselectRow: 'Select row',\n\t\tselectRowGroup: 'Choose a row to select',\n\t\tloadingMore: 'Loading more',\n\t},\n\thasMore: false,\n\tloadMoreOffset: 20,\n};\n\nconst EMPTY_ITEMS: SimpleDataTableItem[] = [];\n\nconst hasId = (item: SimpleDataTableItem) =>\n\titem.id !== undefined && item.id !== null;\n\n/**\n * Returns a predicate that tells whether an item is in `list`. Items are\n * matched by `id`, so a parent can pass fresh item objects (e.g. from a store)\n * in `selection` or `disabledSelection` and they still match the rows in\n * `items`. Items without an `id` fall back to reference identity.\n */\nconst createItemMatcher = (list: SimpleDataTableItem[]) => {\n\tconst references = new Set(list);\n\tconst ids = new Set(list.filter(hasId).map((entry) => entry.id));\n\treturn (item: SimpleDataTableItem): boolean =>\n\t\treferences.has(item) || (hasId(item) && ids.has(item.id));\n};\n\nconst getAssistiveText = memoize(\n\t(\n\t\tassistiveText: SimpleDataTableAssistiveText | undefined\n\t): SimpleDataTableAssistiveText => ({\n\t\t...defaultProps.assistiveText,\n\t\t...assistiveText,\n\t}),\n\tisEqual\n);\n\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n\tif (value === null || typeof value !== 'object') {\n\t\treturn false;\n\t}\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Deep equality for the column/row-action memo. React elements are compared\n * by `type`, `key` and `props` only: their dev-mode `_owner` is the owning\n * fiber, which is circular, so a generic deep compare (e.g. `dequal`)\n * overflows the stack as soon as a parent re-renders the table with\n * unchanged children. Anything else that isn't an array or plain object is\n * compared by reference (a miss only recomputes the columns).\n */\nconst isEqualIgnoringOwner = (a: unknown, b: unknown): boolean => {\n\tlet result = false;\n\tif (a === b) {\n\t\tresult = true;\n\t} else if (React.isValidElement(a) && React.isValidElement(b)) {\n\t\tresult =\n\t\t\ta.type === b.type &&\n\t\t\ta.key === b.key &&\n\t\t\tisEqualIgnoringOwner(a.props, b.props);\n\t} else if (Array.isArray(a) && Array.isArray(b)) {\n\t\tresult =\n\t\t\ta.length === b.length &&\n\t\t\ta.every((value, index) => isEqualIgnoringOwner(value, b[index]));\n\t} else if (isPlainObject(a) && isPlainObject(b)) {\n\t\tconst keys = Object.keys(a);\n\t\tresult =\n\t\t\tkeys.length === Object.keys(b).length &&\n\t\t\tkeys.every(\n\t\t\t\t(key) =>\n\t\t\t\t\tObject.prototype.hasOwnProperty.call(b, key) &&\n\t\t\t\t\tisEqualIgnoringOwner(a[key], b[key])\n\t\t\t);\n\t}\n\treturn result;\n};\n\nconst getColumnsAndRowActions = memoize(\n\t(\n\t\tchildren: ReactNode,\n\t\tid: string | undefined,\n\t\tfixedHeader: boolean | undefined,\n\t\tfixedLayout: boolean | undefined,\n\t\titems: SimpleDataTableItem[],\n\t\tsearch: string | undefined\n\t): {\n\t\tcolumns: SimpleDataTableColumnConfig[];\n\t\tRowActions: ReactElement | null;\n\t} => {\n\t\tconst columns: SimpleDataTableColumnConfig[] = [];\n\t\tlet RowActions: ReactElement | null = null;\n\n\t\tReact.Children.forEach(children, (child) => {\n\t\t\tif (\n\t\t\t\tisElementOfType<SimpleDataTableColumnProps>(\n\t\t\t\t\tchild,\n\t\t\t\t\tSimpleDataTableColumn\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tconst { children: columnChildren, ...columnProps } = child.props;\n\t\t\t\tconst props: Record<string, unknown> = {\n\t\t\t\t\tfixedLayout,\n\t\t\t\t\tsearch,\n\t\t\t\t\titems,\n\t\t\t\t\t...columnProps,\n\t\t\t\t};\n\t\t\t\tif (id) {\n\t\t\t\t\tprops.id = id;\n\t\t\t\t}\n\n\t\t\t\t// Any element child is the column's cell renderer, so custom cells\n\t\t\t\t// don't need to copy `SimpleDataTableCell`'s `displayName`.\n\t\t\t\tlet Cell;\n\t\t\t\tif (React.isValidElement(columnChildren)) {\n\t\t\t\t\tCell = columnChildren.type;\n\t\t\t\t\tassign(props, columnChildren.props);\n\t\t\t\t} else {\n\t\t\t\t\tCell = SimpleDataTableCell;\n\t\t\t\t}\n\n\t\t\t\tcolumns.push({\n\t\t\t\t\tCell: Cell as React.ComponentType<SimpleDataTableCellProps>,\n\t\t\t\t\tprops: props as SimpleDataTableColumnProps,\n\t\t\t\t});\n\t\t\t} else if (\n\t\t\t\tisElementOfType<SimpleDataTableRowActionsProps>(\n\t\t\t\t\tchild,\n\t\t\t\t\tSimpleDataTableRowActions\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tconst { dropdown } = child.props;\n\t\t\t\t// A fixed header scrolls the body, so the menu needs to escape it,\n\t\t\t\t// unless the dropdown sets its own `menuPosition`.\n\t\t\t\tRowActions = React.cloneElement(child, {\n\t\t\t\t\tdropdown:\n\t\t\t\t\t\tdropdown && fixedHeader && dropdown.props.menuPosition === undefined\n\t\t\t\t\t\t\t? React.cloneElement(dropdown, {\n\t\t\t\t\t\t\t\t\tmenuPosition: 'overflowBoundaryElement',\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t: dropdown,\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\treturn { columns, RowActions };\n\t},\n\tisEqualIgnoringOwner\n);\n\n/**\n * SimpleDataTables support the display of structured data in rows and columns with an HTML table. To sort, filter or paginate the table, simply update the data passed in the items to the table and it will re-render itself appropriately. The table will throw a sort event as needed, and helper components for paging and filtering are coming soon.\n *\n * NOTE: for horizontal scrolling with `fixedHeader`-enabled SimpleDataTables, see the `style` property description\n */\nclass SimpleDataTable extends React.Component<\n\tSimpleDataTableProps,\n\tSimpleDataTableState\n> {\n\t// ### Display Name\n\t// Always use the canonical component name as the React display name.\n\tstatic displayName = SIMPLE_DATA_TABLE;\n\n\tstatic defaultProps = defaultProps;\n\n\tgeneratedId: string;\n\n\theaderRefs: {\n\t\taction: (HTMLElement | null)[];\n\t\tcolumn: (HTMLElement | null)[];\n\t\tselect: (HTMLElement | null)[];\n\t};\n\n\tscrollerRef: HTMLElement | null;\n\n\tresizeObserver?: ResizeObserver;\n\n\t// Map of cells to interactive elements within that cell\n\tinteractiveElements: Record<number, Record<number, string[]>>;\n\n\ttableRef?: HTMLTableElement | null;\n\n\tconstructor(props: SimpleDataTableProps) {\n\t\tsuper(props);\n\t\tthis.generatedId = generateId();\n\t\tthis.headerRefs = {\n\t\t\taction: [],\n\t\t\tcolumn: [],\n\t\t\tselect: [],\n\t\t};\n\t\tthis.scrollerRef = null;\n\t\tthis.state = {\n\t\t\t// Currently selected cell\n\t\t\tactiveCell: {\n\t\t\t\trowIndex: 1,\n\t\t\t\tcolumnIndex: this.props.selectRows ? 1 : 0,\n\t\t\t},\n\t\t\t// Interactive element within a cell that receives focus when in actionable mode\n\t\t\tactiveElement: null,\n\t\t\t// The table can be in navigation or actionable mode\n\t\t\tmode: Mode.NAVIGATION,\n\t\t\t// The table currently has focus\n\t\t\ttableHasFocus: false,\n\t\t\t// Allows for keyboard navigation. This is useful for temporarily disabling keyboard navigation\n\t\t\t// when another component requires its own focus behavior (e.g. menu dropdown).\n\t\t\tallowKeyboardNavigation: props.keyboardNavigation,\n\t\t};\n\t\t// Map of cells to interactive elements within that cell\n\t\tthis.interactiveElements = {};\n\t\tthis.changeActiveCell = this.changeActiveCell.bind(this);\n\t\tthis.changeActiveElement = this.changeActiveElement.bind(this);\n\t\tthis.handleKeyDown = this.handleKeyDown.bind(this);\n\t\tthis.registerInteractiveElement =\n\t\t\tthis.registerInteractiveElement.bind(this);\n\n\t\t// `checkProps` issues warnings to developers about properties (similar to React's built in development tools)\n\t\t(checkProps as (name: string, props: unknown, doc?: unknown) => void)(\n\t\t\tSIMPLE_DATA_TABLE,\n\t\t\tprops,\n\t\t\tcomponentDoc\n\t\t);\n\t}\n\n\tcomponentDidMount() {\n\t\tif (this.props.fixedHeader) {\n\t\t\tthis.toggleFixedHeaderListeners(true);\n\t\t\tthis.resizeFixedHeaders();\n\t\t}\n\t}\n\n\tcomponentDidUpdate(\n\t\t_prevProps: SimpleDataTableProps,\n\t\tprevState: SimpleDataTableState\n\t) {\n\t\tif (this.props.fixedHeader) {\n\t\t\tthis.resizeFixedHeaders();\n\t\t\t// If the first page of results isn't enough to allow the user to scroll it causes\n\t\t\t// the user to get into a state where they cannot load the second page.\n\t\t\t// Simulating a scroll here will ensure that enough rows are loaded to enable scrolling\n\t\t\tthis.loadMoreIfNeeded(undefined);\n\t\t}\n\n\t\tif (\n\t\t\tthis.state.allowKeyboardNavigation &&\n\t\t\t!prevState.allowKeyboardNavigation\n\t\t) {\n\t\t\t// When re-enabling keyboard navigation (e.g. when a dropdown closes), mark that\n\t\t\t// focus has returned to the table. This must wait until after `allowKeyboardNavigation`\n\t\t\t// is set in `onClose` because the callback could focus the incorrect element (e.g. dropdown\n\t\t\t// trigger) when it executes.\n\t\t\t// eslint-disable-next-line react/no-did-update-set-state\n\t\t\tthis.setState({ tableHasFocus: true });\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.toggleFixedHeaderListeners(false);\n\t}\n\n\tgetId() {\n\t\treturn this.props.id || this.generatedId;\n\t}\n\n\tgetFirstInteractiveElement(\n\t\trowIndex: number,\n\t\tcolumnIndex: number\n\t): string | null {\n\t\tif (\n\t\t\tthis.state.mode === Mode.ACTIONABLE &&\n\t\t\tthis.interactiveElements[rowIndex] &&\n\t\t\tthis.interactiveElements[rowIndex][columnIndex]\n\t\t) {\n\t\t\treturn this.interactiveElements[rowIndex][columnIndex][0];\n\t\t}\n\t\treturn null;\n\t}\n\n\tgetTableContext = memoize(\n\t\t(\n\t\t\tstate: SimpleDataTableState,\n\t\t\tisKeyboardNavigation: boolean | undefined,\n\t\t\tisGrid: boolean\n\t\t) => ({\n\t\t\tisGrid,\n\t\t\tactiveCell: state.activeCell,\n\t\t\tactiveElement: state.activeElement,\n\t\t\tmode: state.mode,\n\t\t\ttableHasFocus: state.tableHasFocus,\n\t\t\tchangeActiveCell: this.changeActiveCell,\n\t\t\tchangeActiveElement: this.changeActiveElement,\n\t\t\thandleKeyDown: this.handleKeyDown,\n\t\t\tregisterInteractiveElement: this.registerInteractiveElement,\n\t\t\tallowKeyboardNavigation: state.allowKeyboardNavigation ?? false,\n\t\t\tsetAllowKeyboardNavigation: (allowKeyboardNavigation: boolean) => {\n\t\t\t\tif (isKeyboardNavigation) {\n\t\t\t\t\tthis.setState({ allowKeyboardNavigation });\n\t\t\t\t}\n\t\t\t},\n\t\t})\n\t);\n\n\t// Memoized per list so the `id` lookups are only rebuilt when the\n\t// `selection` or `disabledSelection` prop changes.\n\tgetSelectionMatcher = memoize(createItemMatcher);\n\n\tgetDisabledSelectionMatcher = memoize(createItemMatcher);\n\n\t// Selection is controlled: the table never stores it. Both handlers report\n\t// the requested next selection, computed from the `selection` prop, and\n\t// leave rendering to the parent's next `selection`.\n\trequestSelection = (\n\t\tevent: React.SyntheticEvent,\n\t\tselection: SimpleDataTableItem[]\n\t) => {\n\t\tif (typeof this.props.onRowChange === 'function') {\n\t\t\tthis.props.onRowChange(event, { selection });\n\t\t}\n\t};\n\n\thandleToggleAll = (\n\t\te: React.SyntheticEvent,\n\t\t{ checked }: { checked: boolean }\n\t) => {\n\t\tconst selection = this.props.selection ?? EMPTY_ITEMS;\n\t\tconst isDisabled = this.getDisabledSelectionMatcher(\n\t\t\tthis.props.disabledSelection ?? EMPTY_ITEMS\n\t\t);\n\t\t// Selected rows whose selection is disabled keep their state.\n\t\tconst selectedDisabledItems = selection.filter(isDisabled);\n\t\tconst enabledItems = this.props.items.filter((item) => !isDisabled(item));\n\n\t\tconst newSelection = (\n\t\t\tchecked\n\t\t\t\t? [...enabledItems, ...selectedDisabledItems]\n\t\t\t\t: selectedDisabledItems\n\t\t).filter((item) => item.type !== 'header-row');\n\n\t\tthis.requestSelection(e, newSelection);\n\t};\n\n\thandleRowToggle = (\n\t\titem: SimpleDataTableItem,\n\t\tselected: boolean,\n\t\te: React.SyntheticEvent\n\t) => {\n\t\tconst selection = this.props.selection ?? EMPTY_ITEMS;\n\t\tlet newSelection: SimpleDataTableItem[];\n\n\t\tif (selected) {\n\t\t\tnewSelection =\n\t\t\t\tthis.props.selectRows === 'radio' ? [item] : [...selection, item];\n\t\t} else {\n\t\t\tconst isToggledItem = createItemMatcher([item]);\n\t\t\tnewSelection = selection.filter((entry) => !isToggledItem(entry));\n\t\t}\n\n\t\tthis.requestSelection(e, newSelection);\n\t};\n\n\tresizeFixedHeaders = (event?: Event) => {\n\t\tconst headerRefs = [\n\t\t\t...this.headerRefs.select,\n\t\t\t...this.headerRefs.column,\n\t\t\t...this.headerRefs.action,\n\t\t];\n\n\t\tif (this.props.onFixedHeaderResize) {\n\t\t\tthis.props.onFixedHeaderResize(event, {\n\t\t\t\theaderRefs: headerRefs.filter(Boolean) as HTMLElement[],\n\t\t\t\tscrollerRef: this.scrollerRef,\n\t\t\t});\n\t\t} else if (headerRefs.length > 0) {\n\t\t\tlet documentScrollLeft = 0;\n\n\t\t\tif (canUseDOM) {\n\t\t\t\tdocumentScrollLeft = document.documentElement.scrollLeft;\n\t\t\t}\n\n\t\t\theaderRefs.forEach((column) => {\n\t\t\t\tif (column && canUseDOM) {\n\t\t\t\t\tconst columnLeft =\n\t\t\t\t\t\tcolumn.getBoundingClientRect().left + documentScrollLeft;\n\t\t\t\t\tlet wrapperLeft = 0;\n\n\t\t\t\t\tif (this.scrollerRef) {\n\t\t\t\t\t\twrapperLeft =\n\t\t\t\t\t\t\tthis.scrollerRef.getBoundingClientRect().left +\n\t\t\t\t\t\t\tdocumentScrollLeft;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst cellFixed = column.querySelector(\n\t\t\t\t\t\t'.slds-cell-fixed'\n\t\t\t\t\t) as HTMLElement | null;\n\n\t\t\t\t\tif (cellFixed) {\n\t\t\t\t\t\tcellFixed.style.left = `${columnLeft - wrapperLeft}px`;\n\t\t\t\t\t\tcellFixed.style.width = `${column.offsetWidth}px`;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\tloadMoreIfNeeded = (\n\t\tevent: Event | undefined,\n\t\tfallbackTrigger: SimpleDataTableLoadMoreData['trigger'] = 'update'\n\t) => {\n\t\tif (this.props.hasMore && this.props.onLoadMore && this.scrollerRef) {\n\t\t\tconst { scrollTop, offsetHeight, scrollHeight } = this.scrollerRef;\n\t\t\tif (\n\t\t\t\tscrollTop + offsetHeight >\n\t\t\t\tscrollHeight - (this.props.loadMoreOffset ?? 0)\n\t\t\t) {\n\t\t\t\tlet trigger = fallbackTrigger;\n\t\t\t\tif (event?.type === 'scroll' || event?.type === 'resize') {\n\t\t\t\t\ttrigger = event.type;\n\t\t\t\t}\n\t\t\t\tthis.props.onLoadMore(event, { trigger });\n\t\t\t}\n\t\t}\n\t};\n\n\ttoggleFixedHeaderListeners = (attach: boolean) => {\n\t\tif (this.props.onToggleFixedHeaderListeners) {\n\t\t\tthis.props.onToggleFixedHeaderListeners(\n\t\t\t\t{},\n\t\t\t\t{\n\t\t\t\t\tattach,\n\t\t\t\t\tresizeHandler: this.resizeFixedHeaders,\n\t\t\t\t\tscrollerRef: this.scrollerRef,\n\t\t\t\t}\n\t\t\t);\n\t\t} else {\n\t\t\tconst method = attach ? 'addEventListener' : 'removeEventListener';\n\t\t\tif (typeof ResizeObserver !== 'undefined') {\n\t\t\t\t// Track the scroller and table rather than the window, so headers\n\t\t\t\t// also follow container resizes that leave the window alone.\n\t\t\t\tthis.resizeObserver?.disconnect();\n\t\t\t\tthis.resizeObserver = undefined;\n\t\t\t\tif (attach) {\n\t\t\t\t\tthis.resizeObserver = new ResizeObserver(() => {\n\t\t\t\t\t\tthis.resizeFixedHeaders();\n\t\t\t\t\t\tthis.loadMoreIfNeeded(undefined, 'resize');\n\t\t\t\t\t});\n\t\t\t\t\tif (this.scrollerRef) {\n\t\t\t\t\t\tthis.resizeObserver.observe(this.scrollerRef);\n\t\t\t\t\t}\n\t\t\t\t\tif (this.tableRef) {\n\t\t\t\t\t\tthis.resizeObserver.observe(this.tableRef);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (canUseEventListeners) {\n\t\t\t\twindow[method]('resize', this.resizeFixedHeaders as EventListener);\n\t\t\t\twindow[method]('resize', this.loadMoreIfNeeded as EventListener);\n\t\t\t}\n\t\t\tif (canUseEventListeners && this.scrollerRef) {\n\t\t\t\tthis.scrollerRef[method](\n\t\t\t\t\t'scroll',\n\t\t\t\t\tthis.resizeFixedHeaders as EventListener\n\t\t\t\t);\n\t\t\t\tthis.scrollerRef[method](\n\t\t\t\t\t'scroll',\n\t\t\t\t\tthis.loadMoreIfNeeded as EventListener\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t};\n\n\t// eslint-disable-next-line camelcase\n\tUNSAFE_componentWillUpdate(nextProps: SimpleDataTableProps) {\n\t\tif (this.props.items !== nextProps.items) {\n\t\t\tthis.interactiveElements = {};\n\t\t}\n\t}\n\n\tchangeActiveCell(rowIndex: number, columnIndex: number) {\n\t\tthis.setState({\n\t\t\ttableHasFocus: true,\n\t\t\tactiveCell: { rowIndex, columnIndex },\n\t\t});\n\t}\n\n\tchangeActiveElement(activeElement: string | null) {\n\t\tthis.setState({ activeElement, mode: Mode.ACTIONABLE });\n\t}\n\n\thandleKeyDown(event: React.KeyboardEvent) {\n\t\tmapKeyEventCallbacks(event, {\n\t\t\tcallbacks: {\n\t\t\t\t[KEYS.UP]: { callback: () => this.handleKeyDownUp() },\n\t\t\t\t[KEYS.DOWN]: { callback: () => this.handleKeyDownDown() },\n\t\t\t\t[KEYS.LEFT]: { callback: () => this.handleKeyDownLeft() },\n\t\t\t\t[KEYS.RIGHT]: { callback: () => this.handleKeyDownRight() },\n\t\t\t\t[KEYS.ENTER]: { callback: () => this.handleKeyDownEnter() },\n\t\t\t\t[KEYS.ESCAPE]: { callback: () => this.handleKeyDownEscape() },\n\t\t\t\t[KEYS.TAB]:\n\t\t\t\t\tthis.state.mode === Mode.ACTIONABLE\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tcallback: (evt: React.KeyboardEvent) =>\n\t\t\t\t\t\t\t\t\tthis.handleKeyTabPress(evt),\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t: null,\n\t\t\t},\n\t\t});\n\t}\n\n\thandleKeyDownUp() {\n\t\tconst newRowIndex = Math.max(this.state.activeCell.rowIndex - 1, 0);\n\t\tconst activeElement = this.getFirstInteractiveElement(\n\t\t\tnewRowIndex,\n\t\t\tthis.state.activeCell.columnIndex\n\t\t);\n\t\tif (newRowIndex !== this.state.activeCell.rowIndex) {\n\t\t\tthis.setState((prevState) => ({\n\t\t\t\tactiveCell: {\n\t\t\t\t\trowIndex: newRowIndex,\n\t\t\t\t\tcolumnIndex: prevState.activeCell.columnIndex,\n\t\t\t\t},\n\t\t\t\tactiveElement,\n\t\t\t}));\n\t\t}\n\t}\n\n\thandleKeyDownDown() {\n\t\tconst newRowIndex = Math.min(\n\t\t\tthis.state.activeCell.rowIndex + 1,\n\t\t\tthis.props.items.length\n\t\t);\n\t\tconst activeElement = this.getFirstInteractiveElement(\n\t\t\tnewRowIndex,\n\t\t\tthis.state.activeCell.columnIndex\n\t\t);\n\t\tif (newRowIndex !== this.state.activeCell.rowIndex) {\n\t\t\tthis.setState((prevState) => ({\n\t\t\t\tactiveCell: {\n\t\t\t\t\trowIndex: newRowIndex,\n\t\t\t\t\tcolumnIndex: prevState.activeCell.columnIndex,\n\t\t\t\t},\n\t\t\t\tactiveElement,\n\t\t\t}));\n\t\t}\n\t}\n\n\thandleKeyDownLeft() {\n\t\tconst newColumnIndex = Math.max(this.state.activeCell.columnIndex - 1, 0);\n\t\tconst activeElement = this.getFirstInteractiveElement(\n\t\t\tthis.state.activeCell.rowIndex,\n\t\t\tnewColumnIndex\n\t\t);\n\t\tif (newColumnIndex !== this.state.activeCell.columnIndex) {\n\t\t\tthis.setState((prevState) => ({\n\t\t\t\tactiveCell: {\n\t\t\t\t\trowIndex: prevState.activeCell.rowIndex,\n\t\t\t\t\tcolumnIndex: newColumnIndex,\n\t\t\t\t},\n\t\t\t\tactiveElement,\n\t\t\t}));\n\t\t}\n\t}\n\n\t// Columns plus the row actions cell. Counts parsed children, so\n\t// conditional (`false`/`null`) children don't count as columns.\n\tgetCellCount() {\n\t\tconst { columns, RowActions } = getColumnsAndRowActions(\n\t\t\tthis.props.children,\n\t\t\tthis.props.id,\n\t\t\tthis.props.fixedHeader,\n\t\t\tthis.props.fixedLayout,\n\t\t\tthis.props.items,\n\t\t\tthis.props.search\n\t\t);\n\t\treturn columns.length + (RowActions ? 1 : 0);\n\t}\n\n\thandleKeyDownRight() {\n\t\tconst newColumnIndex = Math.min(\n\t\t\tthis.state.activeCell.columnIndex + 1,\n\t\t\tthis.getCellCount() - (this.props.selectRows ? 0 : 1)\n\t\t);\n\t\tconst activeElement = this.getFirstInteractiveElement(\n\t\t\tthis.state.activeCell.rowIndex,\n\t\t\tnewColumnIndex\n\t\t);\n\t\tif (newColumnIndex !== this.state.activeCell.columnIndex) {\n\t\t\tthis.setState((prevState) => ({\n\t\t\t\tactiveCell: {\n\t\t\t\t\trowIndex: prevState.activeCell.rowIndex,\n\t\t\t\t\tcolumnIndex: newColumnIndex,\n\t\t\t\t},\n\t\t\t\tactiveElement,\n\t\t\t}));\n\t\t}\n\t}\n\n\thandleKeyDownEnter() {\n\t\tif (this.state.mode === Mode.NAVIGATION) {\n\t\t\tconst { rowIndex, columnIndex } = this.state.activeCell;\n\t\t\tlet activeElement: string | null = null;\n\t\t\tif (\n\t\t\t\tthis.interactiveElements[rowIndex] &&\n\t\t\t\tthis.interactiveElements[rowIndex][columnIndex]\n\t\t\t) {\n\t\t\t\t[activeElement] = this.interactiveElements[rowIndex][columnIndex];\n\t\t\t}\n\t\t\tthis.setState({\n\t\t\t\tmode: Mode.ACTIONABLE,\n\t\t\t\tactiveElement,\n\t\t\t});\n\t\t}\n\t}\n\n\thandleKeyDownEscape() {\n\t\tif (this.state.mode === Mode.ACTIONABLE) {\n\t\t\tthis.setState({\n\t\t\t\tmode: Mode.NAVIGATION,\n\t\t\t\tactiveElement: null,\n\t\t\t});\n\t\t}\n\t}\n\n\tmoveNext(event: React.KeyboardEvent, rowIndex: number, columnIndex: number) {\n\t\tconst headers = [\n\t\t\t...this.headerRefs.select,\n\t\t\t...this.headerRefs.column,\n\t\t\t...this.headerRefs.action,\n\t\t];\n\t\tlet newRowIndex = 0;\n\t\tlet newColumnIndex = 0;\n\n\t\tif (event.shiftKey) {\n\t\t\tif (columnIndex - 1 >= 0) {\n\t\t\t\tnewColumnIndex = columnIndex - 1;\n\t\t\t\tnewRowIndex = rowIndex;\n\t\t\t} else {\n\t\t\t\tif (rowIndex > 0) newRowIndex = rowIndex - 1;\n\t\t\t\telse newRowIndex = this.props.items.length;\n\n\t\t\t\tnewColumnIndex = headers.length - 1;\n\t\t\t}\n\t\t} else if (columnIndex + 1 < headers.length) {\n\t\t\tnewColumnIndex = columnIndex + 1;\n\t\t\tnewRowIndex = rowIndex;\n\t\t} else {\n\t\t\tif (rowIndex < this.props.items.length) newRowIndex = rowIndex + 1;\n\t\t\telse newRowIndex = 0;\n\n\t\t\tnewColumnIndex = 0;\n\t\t}\n\n\t\tthis.changeActiveCell(newRowIndex, newColumnIndex);\n\t}\n\n\thandleNextActionable(event: React.KeyboardEvent): string | null {\n\t\tconst { rowIndex, columnIndex } = this.state.activeCell;\n\t\tconst currentActiveElement = this.state.activeElement;\n\t\tconst rowActiveElements =\n\t\t\tthis.interactiveElements[rowIndex] &&\n\t\t\tthis.interactiveElements[rowIndex][columnIndex]\n\t\t\t\t? this.interactiveElements[rowIndex][columnIndex]\n\t\t\t\t: null;\n\n\t\tif (rowActiveElements) {\n\t\t\tif (currentActiveElement) {\n\t\t\t\tconst index = rowActiveElements.indexOf(currentActiveElement);\n\n\t\t\t\tif (event.shiftKey) {\n\t\t\t\t\treturn index > 0 ? rowActiveElements[index - 1] : null;\n\t\t\t\t}\n\t\t\t\treturn index < rowActiveElements.length - 1\n\t\t\t\t\t? rowActiveElements[index + 1]\n\t\t\t\t\t: null;\n\t\t\t}\n\t\t\treturn !event.shiftKey\n\t\t\t\t? rowActiveElements[0]\n\t\t\t\t: rowActiveElements[rowActiveElements.length - 1];\n\t\t}\n\t\treturn null;\n\t}\n\n\thandleKeyTabPress(event: React.KeyboardEvent) {\n\t\tconst { rowIndex, columnIndex } = this.state.activeCell;\n\n\t\tif (this.state.mode === Mode.ACTIONABLE) {\n\t\t\tconst nextActionable = this.handleNextActionable(event);\n\n\t\t\tif (nextActionable) {\n\t\t\t\tthis.setState({ activeElement: nextActionable });\n\t\t\t} else if (rowIndex === 0) {\n\t\t\t\tconst headers = [\n\t\t\t\t\t...this.headerRefs.select,\n\t\t\t\t\t...this.headerRefs.column,\n\t\t\t\t\t...this.headerRefs.action,\n\t\t\t\t];\n\t\t\t\tlet newIndex = 0;\n\n\t\t\t\tif (!event.shiftKey)\n\t\t\t\t\tnewIndex = columnIndex + 1 < headers.length ? columnIndex + 1 : 0;\n\t\t\t\telse\n\t\t\t\t\tnewIndex =\n\t\t\t\t\t\tcolumnIndex - 1 >= 0 ? columnIndex - 1 : headers.length - 1;\n\t\t\t\tthis.setState({\n\t\t\t\t\tmode: Mode.ACTIONABLE,\n\t\t\t\t\tactiveElement: null,\n\t\t\t\t});\n\n\t\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\t\theaders.forEach((header, index) => {\n\t\t\t\t\tif (!header) return;\n\t\t\t\t\tif (index === newIndex) {\n\t\t\t\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\t\t\t\theader.tabIndex = 0;\n\t\t\t\t\t\theader.focus();\n\t\t\t\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\t\t\t} else header.tabIndex = -1;\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tthis.moveNext(event, rowIndex, columnIndex);\n\t\t\t\tthis.setState({\n\t\t\t\t\tmode: Mode.ACTIONABLE,\n\t\t\t\t\tactiveElement: null,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tregisterInteractiveElement(\n\t\trowIndex: number,\n\t\tcolumnIndex: number,\n\t\telementId: string\n\t) {\n\t\tif (!this.interactiveElements[rowIndex]) {\n\t\t\tthis.interactiveElements[rowIndex] = {};\n\t\t}\n\t\tconst existingElements =\n\t\t\tthis.interactiveElements[rowIndex][columnIndex] || [];\n\n\t\tif (!existingElements.includes(elementId)) {\n\t\t\tthis.interactiveElements[rowIndex][columnIndex] = [\n\t\t\t\t...existingElements,\n\t\t\t\telementId,\n\t\t\t];\n\t\t}\n\t}\n\n\t// ### Render\n\trender() {\n\t\tconst ariaProps: { 'aria-multiselectable'?: 'true' } = {};\n\t\tconst numHeaderRows = 1;\n\t\tconst isItemSelected = this.getSelectionMatcher(\n\t\t\tthis.props.selection ?? EMPTY_ITEMS\n\t\t);\n\t\tconst isItemDisabled = this.getDisabledSelectionMatcher(\n\t\t\tthis.props.disabledSelection ?? EMPTY_ITEMS\n\t\t);\n\t\tconst numRows = count(this.props.items);\n\t\t// Rows the select-all checkbox controls, and how many of them are selected\n\t\tconst selectableItems = this.props.items.filter(\n\t\t\t(item) => item.type !== 'header-row' && !isItemDisabled(item)\n\t\t);\n\t\tconst numNonHeaderRows = selectableItems.length;\n\t\tconst numSelected = selectableItems.filter(isItemSelected).length;\n\t\tconst canSelectRows =\n\t\t\tthis.props.selectRows && numNonHeaderRows > 0\n\t\t\t\t? this.props.selectRows\n\t\t\t\t: false;\n\t\tconst allSelected = canSelectRows && numNonHeaderRows === numSelected;\n\t\tconst indeterminateSelected =\n\t\t\tcanSelectRows && numNonHeaderRows !== numSelected && numSelected !== 0;\n\n\t\tconst { columns, RowActions } = getColumnsAndRowActions(\n\t\t\tthis.props.children,\n\t\t\tthis.props.id,\n\t\t\tthis.props.fixedHeader,\n\t\t\tthis.props.fixedLayout,\n\t\t\tthis.props.items,\n\t\t\tthis.props.search\n\t\t);\n\n\t\tconst assistiveText = getAssistiveText(this.props.assistiveText);\n\n\t\tif (this.props.selectRows && this.props.selectRows !== 'radio') {\n\t\t\tariaProps['aria-multiselectable'] = 'true';\n\t\t}\n\n\t\t// This guarantees there are never any old header references if props change\n\t\tthis.headerRefs = {\n\t\t\taction: RowActions ? this.headerRefs.action : [],\n\t\t\tcolumn: this.headerRefs.column.slice(0, columns.length),\n\t\t\tselect: canSelectRows ? this.headerRefs.select : [],\n\t\t};\n\n\t\t// Arrow-key cell navigation only runs with both props, so only then is\n\t\t// the table a grid.\n\t\tconst isGrid = Boolean(\n\t\t\tthis.props.fixedLayout && this.props.keyboardNavigation\n\t\t);\n\n\t\tlet component = (\n\t\t\t<React.Fragment>\n\t\t\t\t<TableContext.Provider\n\t\t\t\t\tvalue={this.getTableContext(\n\t\t\t\t\t\tthis.state,\n\t\t\t\t\t\tthis.props.keyboardNavigation,\n\t\t\t\t\t\tisGrid\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t<table\n\t\t\t\t\t\t{...ariaProps}\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-table',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-table_fixed-layout': this.props.fixedLayout,\n\t\t\t\t\t\t\t\t'slds-table_header-fixed': this.props.fixedHeader,\n\t\t\t\t\t\t\t\t// Not vestigial: SLDS uses it to zero the `thead th` padding,\n\t\t\t\t\t\t\t\t// which `.slds-th__action` then supplies.\n\t\t\t\t\t\t\t\t'slds-table_resizable-cols': this.props.fixedLayout,\n\t\t\t\t\t\t\t\t'slds-table_bordered': !this.props.unborderedRow,\n\t\t\t\t\t\t\t\t'slds-table_cell-buffer':\n\t\t\t\t\t\t\t\t\t!this.props.fixedLayout && !this.props.unbufferedCell,\n\t\t\t\t\t\t\t\t'slds-max-medium-table_stacked': this.props.stacked,\n\t\t\t\t\t\t\t\t'slds-max-medium-table_stacked-horizontal':\n\t\t\t\t\t\t\t\t\tthis.props.stackedHorizontal,\n\t\t\t\t\t\t\t\t'slds-table_striped': this.props.striped,\n\t\t\t\t\t\t\t\t'slds-table_col-bordered': this.props.columnBordered,\n\t\t\t\t\t\t\t\t'slds-no-row-hover': this.props.noRowHover,\n\t\t\t\t\t\t\t\t'slds-table_header-hidden': this.props.isHeadless,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tthis.props.className\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tid={this.getId()}\n\t\t\t\t\t\tref={(node) => {\n\t\t\t\t\t\t\tif (node) {\n\t\t\t\t\t\t\t\tthis.tableRef = node;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t\trole={isGrid ? 'grid' : undefined}\n\t\t\t\t\t\tonBlur={(event) => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tthis.tableRef &&\n\t\t\t\t\t\t\t\t!this.tableRef.contains(event.relatedTarget as Node)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\ttableHasFocus: false,\n\t\t\t\t\t\t\t\t\tmode: Mode.NAVIGATION,\n\t\t\t\t\t\t\t\t\tactiveElement: null,\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tstyle={this.props.style}\n\t\t\t\t\t>\n\t\t\t\t\t\t<SimpleDataTableHead\n\t\t\t\t\t\t\tassistiveText={assistiveText}\n\t\t\t\t\t\t\tallSelected={allSelected}\n\t\t\t\t\t\t\tfixedHeader={this.props.fixedHeader}\n\t\t\t\t\t\t\tfixedLayout={this.props.fixedLayout}\n\t\t\t\t\t\t\theaderRefs={(ref, index) => {\n\t\t\t\t\t\t\t\tif (index === 'action' || index === 'select') {\n\t\t\t\t\t\t\t\t\tif (ref) {\n\t\t\t\t\t\t\t\t\t\tthis.headerRefs[index][0] = ref;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tthis.headerRefs[index] = [];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthis.headerRefs.column[index] = ref;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tisHidden={this.props.isHeadless}\n\t\t\t\t\t\t\tindeterminateSelected={indeterminateSelected}\n\t\t\t\t\t\t\tcanSelectRows={canSelectRows}\n\t\t\t\t\t\t\tcolumns={columns}\n\t\t\t\t\t\t\tid={`${this.getId()}-${SIMPLE_DATA_TABLE_HEAD}`}\n\t\t\t\t\t\t\tonToggleAll={this.handleToggleAll}\n\t\t\t\t\t\t\tonSort={this.props.onSort}\n\t\t\t\t\t\t\tshowRowActions={!!RowActions}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t{numRows > 0\n\t\t\t\t\t\t\t\t? this.props.items.map((item, index) => {\n\t\t\t\t\t\t\t\t\t\tconst rowId =\n\t\t\t\t\t\t\t\t\t\t\tthis.getId() && item.id\n\t\t\t\t\t\t\t\t\t\t\t\t? `${this.getId()}-${SIMPLE_DATA_TABLE_ROW}-${item.id}`\n\t\t\t\t\t\t\t\t\t\t\t\t: generateId();\n\t\t\t\t\t\t\t\t\t\tif (item.type === 'header-row') {\n\t\t\t\t\t\t\t\t\t\t\tconst subHeadingRowData = {\n\t\t\t\t\t\t\t\t\t\t\t\tassistiveText,\n\t\t\t\t\t\t\t\t\t\t\t\tclassNameRow: item.classNameRow,\n\t\t\t\t\t\t\t\t\t\t\t\tcolumns,\n\t\t\t\t\t\t\t\t\t\t\t\tid: rowId,\n\t\t\t\t\t\t\t\t\t\t\t\ttableId: this.getId(),\n\t\t\t\t\t\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\t\tif (this.props.renderSubHeadingRow) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<React.Fragment key={rowId}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.props.renderSubHeadingRow(subHeadingRowData)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</React.Fragment>\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif (this.props.onRenderSubHeadingRow) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn this.props.onRenderSubHeadingRow({\n\t\t\t\t\t\t\t\t\t\t\t\t\t...subHeadingRowData,\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey: rowId,\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t<SimpleDataTableRow\n\t\t\t\t\t\t\t\t\t\t\t\tassistiveText={assistiveText}\n\t\t\t\t\t\t\t\t\t\t\t\tcanSelectRows={canSelectRows}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={item.classNameRow}\n\t\t\t\t\t\t\t\t\t\t\t\tcolumns={columns}\n\t\t\t\t\t\t\t\t\t\t\t\tfixedLayout={this.props.fixedLayout}\n\t\t\t\t\t\t\t\t\t\t\t\tid={rowId}\n\t\t\t\t\t\t\t\t\t\t\t\tindex={index}\n\t\t\t\t\t\t\t\t\t\t\t\titem={item}\n\t\t\t\t\t\t\t\t\t\t\t\tkey={rowId}\n\t\t\t\t\t\t\t\t\t\t\t\tonToggle={this.handleRowToggle}\n\t\t\t\t\t\t\t\t\t\t\t\tisSelected={isItemSelected(item)}\n\t\t\t\t\t\t\t\t\t\t\t\tisDisabled={isItemDisabled(item)}\n\t\t\t\t\t\t\t\t\t\t\t\trowActions={RowActions}\n\t\t\t\t\t\t\t\t\t\t\t\ttableId={this.getId()}\n\t\t\t\t\t\t\t\t\t\t\t\trowIndex={index + numHeaderRows}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t: // Someday this should be an element to render when the table is empty\n\t\t\t\t\t\t\t\t\tnull}\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t</table>\n\t\t\t\t</TableContext.Provider>\n\t\t\t\t{this.props.fixedHeader && this.props.hasMore && (\n\t\t\t\t\t<div className=\"slds-is-relative slds-p-around_large\">\n\t\t\t\t\t\t<Spinner\n\t\t\t\t\t\t\tassistiveText={{ label: this.props.assistiveText?.loadingMore }}\n\t\t\t\t\t\t\thasContainer={false}\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tvariant=\"brand\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</React.Fragment>\n\t\t);\n\n\t\tif (this.props.fixedHeader) {\n\t\t\tconst border = '1px solid var(--slds-g-color-border-1)';\n\t\t\tconst styles: React.CSSProperties = {\n\t\t\t\tborderTop: border,\n\t\t\t\theight: '100%',\n\t\t\t};\n\n\t\t\tif (this.props.joined) {\n\t\t\t\tstyles.borderBottom = border;\n\t\t\t\tstyles.borderLeft = border;\n\t\t\t\tstyles.borderRight = border;\n\t\t\t\tstyles.borderTop = 'none';\n\t\t\t\tstyles.borderRadius =\n\t\t\t\t\t'0 0 var(--slds-g-radius-border-2) var(--slds-g-radius-border-2)';\n\t\t\t}\n\n\t\t\tconst fixedScrollerStyle: React.CSSProperties = {\n\t\t\t\theight: '100%',\n\t\t\t\toverflow: 'auto',\n\t\t\t};\n\n\t\t\tcomponent = (\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"slds-table_header-fixed_container\"\n\t\t\t\t\tstyle={styles}\n\t\t\t\t\tonScroll={(e) => {\n\t\t\t\t\t\tconst containerScrollLeft = (e.target as HTMLElement).scrollLeft;\n\n\t\t\t\t\t\tif (containerScrollLeft > 0) {\n\t\t\t\t\t\t\t(e.target as HTMLElement).scrollLeft = 0;\n\t\t\t\t\t\t\tif (this.scrollerRef) {\n\t\t\t\t\t\t\t\tthis.scrollerRef.scrollLeft = containerScrollLeft;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName=\"slds-table_header-fixed_scroller\"\n\t\t\t\t\t\tref={(ref) => {\n\t\t\t\t\t\t\tthis.scrollerRef = ref;\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tstyle={fixedScrollerStyle}\n\t\t\t\t\t>\n\t\t\t\t\t\t{component}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\treturn component;\n\t}\n}\n\nexport default SimpleDataTable;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAsEA,IAAM,KAAS,MACd,MAAM,QAAQ,CAAK,IAAI,EAAM,SAAS,GAEjC,IAAe;CACpB,eAAe;EACd,eAAe;EACf,YAAY;EACZ,uBAAuB;EACvB,wBAAwB;EACxB,eAAe;EACf,WAAW;EACX,gBAAgB;EAChB,aAAa;CACd;CACA,SAAS;CACT,gBAAgB;AACjB,GAEM,IAAqC,CAAC,GAEtC,KAAS,MACd,EAAK,OAAO,KAAA,KAAa,EAAK,OAAO,MAQhC,KAAqB,MAAgC;CAC1D,IAAM,IAAa,IAAI,IAAI,CAAI,GACzB,IAAM,IAAI,IAAI,EAAK,OAAO,CAAK,CAAC,CAAC,KAAK,MAAU,EAAM,EAAE,CAAC;CAC/D,QAAQ,MACP,EAAW,IAAI,CAAI,KAAM,EAAM,CAAI,KAAK,EAAI,IAAI,EAAK,EAAE;AACzD,GAEM,IAAmB,GAEvB,OACmC;CACnC,GAAG,EAAa;CAChB,GAAG;AACJ,IACA,CACD,GAEM,KAAiB,MAAqD;CAC3E,IAAsB,OAAO,KAAU,aAAnC,GACH,OAAO;CAER,IAAM,IAAY,OAAO,eAAe,CAAK;CAC7C,OAAO,MAAc,OAAO,aAAa,MAAc;AACxD,GAUM,KAAwB,GAAY,MAAwB;CACjE,IAAI,IAAS;CACb,IAAI,MAAM,GACT,IAAS;MACH,IAAI,EAAM,eAAe,CAAC,KAAK,EAAM,eAAe,CAAC,GAC3D,IACC,EAAE,SAAS,EAAE,QACb,EAAE,QAAQ,EAA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A;MACf,WAAW,EAAK;MACP;MACT,aAAa,KAAK,MAAM;MACxB,IAAI;MACG;MACD;MAEN,UAAU,KAAK;MACf,YAAY,EAAe,CAAI;MAC/B,YAAY,EAAe,CAAI;MAC/B,YAAY;MACZ,SAAS,KAAK,MAAM;MACpB,UAAU,IAAQ;KAClB,GAPK,CAOL;IAEH,CAAC,IAED,KACI,CAAA,CACD;;EACe,CAAA,GACtB,KAAK,MAAM,eAAe,KAAK,MAAM,WACrC,kBAAC,OAAD;GAAK,WAAU;GACd,UAAA,kBAAC,GAAD;IACC,eAAe,EAAE,OAAO,KAAK,MAAM,eAAe,YAAY;IAC9D,cAAc;IACd,MAAK;IACL,SAAQ;GACR,CAAA;EACG,CAAA,CAES,EAAA,CAAA;EAGjB,IAAI,KAAK,MAAM,aAAa;GAC3B,IAAM,IAAS,0CACT,IAA8B;IACnC,WAAW;IACX,QAAQ;GACT;GAgBA,AAdI,KAAK,MAAM,WACd,EAAO,eAAe,GACtB,EAAO,aAAa,GACpB,EAAO,cAAc,GACrB,EAAO,YAAY,QACnB,EAAO,eACN,oEAQF,IACC,kBAAC,OAAD;IACC,WAAU;IACV,OAAO;IACP,WAAW,MAAM;KAChB,IAAM,IAAuB,EAAE,OAAuB;KAEtD,AAAI,IAAsB,MACzB,EAAG,OAAuB,aAAa,GACnC,KAAK,gBACR,KAAK,YAAY,aAAa;IAGjC;IAEA,UAAA,kBAAC,OAAD;KACC,WAAU;KACV,MAAM,MAAQ;MACb,KAAK,cAAc;KACpB;KACA,OAAO;MAxBT,QAAQ;MACR,UAAU;KAuBD;KAEN,UAAA;IACG,CAAA;GACD,CAAA;EAEP;EAEA,OAAO;CACR;AACD"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/simple-data-table/index.tsx"],"sourcesContent":["/* eslint-disable max-lines */\n/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\n// # Data Table Component\n\n// Implements the [Data Table design pattern](https://www.lightningdesignsystem.com/components/data-tables) in React.\n\nimport React, { type ReactElement, type ReactNode } from 'react';\n\nimport classNames from 'classnames';\nimport assign from 'lodash.assign';\nimport { dequal as isEqual } from 'dequal';\nimport memoize from 'memoize-one';\n// This component's `checkProps` which issues warnings to developers about properties when in development mode (similar to React's built in development tools)\nimport checkProps from './check-props';\nimport componentDoc from './component.json';\n\nimport {\n\tcanUseDOM,\n\tcanUseEventListeners,\n} from '../../utilities/execution-environment';\n// ## Children\nimport SimpleDataTableCell from './cell';\nimport SimpleDataTableColumn from './column';\nimport SimpleDataTableHead from './private/head';\nimport { inheritRadius } from './private/corner-style';\nimport SimpleDataTableRow from './private/row';\nimport SimpleDataTableRowActions from './row-actions';\nimport TableContext from './private/table-context';\nimport Mode, { type ModeType } from './private/mode';\nimport Spinner from '../spinner';\n\nimport KEYS from '../../utilities/key-code';\nimport generateId from '../../utilities/generate-id';\nimport mapKeyEventCallbacks from '../../utilities/key-callbacks';\n\nimport isElementOfType from '../../utilities/is-element-of-type';\n\nimport {\n\tSIMPLE_DATA_TABLE,\n\tSIMPLE_DATA_TABLE_HEAD,\n\tSIMPLE_DATA_TABLE_ROW,\n} from '../../utilities/constants';\n\nimport type {\n\tSimpleDataTableProps,\n\tSimpleDataTableItem,\n\tSimpleDataTableColumnConfig,\n\tSimpleDataTableColumnProps,\n\tSimpleDataTableCellProps,\n\tSimpleDataTableAssistiveText,\n\tSimpleDataTableRowActionsProps,\n\tSimpleDataTableLoadMoreData,\n} from './types';\n\n// The main SimpleDataTable component's state.\ninterface SimpleDataTableState {\n\t// Currently selected cell\n\tactiveCell: { rowIndex: number; columnIndex: number };\n\t// Interactive element within a cell that receives focus when in actionable mode\n\tactiveElement: string | null;\n\t// The table can be in navigation or actionable mode\n\tmode: ModeType;\n\t// The table currently has focus\n\ttableHasFocus: boolean;\n\t// Allows for keyboard navigation\n\tallowKeyboardNavigation?: boolean;\n}\n\n// Safely get the length of an array, returning 0 for invalid input.\nconst count = (array: unknown): number =>\n\tArray.isArray(array) ? array.length : 0;\n\nconst defaultProps = {\n\tassistiveText: {\n\t\tactionsHeader: 'Actions',\n\t\tcolumnSort: 'Sort by: ',\n\t\tcolumnSortedAscending: 'Sorted Ascending',\n\t\tcolumnSortedDescending: 'Sorted Descending',\n\t\tselectAllRows: 'Select all rows',\n\t\tselectRow: 'Select row',\n\t\tselectRowGroup: 'Choose a row to select',\n\t\tloadingMore: 'Loading more',\n\t},\n\thasMore: false,\n\tloadMoreOffset: 20,\n};\n\nconst EMPTY_ITEMS: SimpleDataTableItem[] = [];\n\nconst hasId = (item: SimpleDataTableItem) =>\n\titem.id !== undefined && item.id !== null;\n\n/**\n * Returns a predicate that tells whether an item is in `list`. Items are\n * matched by `id`, so a parent can pass fresh item objects (e.g. from a store)\n * in `selection` or `disabledSelection` and they still match the rows in\n * `items`. Items without an `id` fall back to reference identity.\n */\nconst createItemMatcher = (list: SimpleDataTableItem[]) => {\n\tconst references = new Set(list);\n\tconst ids = new Set(list.filter(hasId).map((entry) => entry.id));\n\treturn (item: SimpleDataTableItem): boolean =>\n\t\treferences.has(item) || (hasId(item) && ids.has(item.id));\n};\n\nconst getAssistiveText = memoize(\n\t(\n\t\tassistiveText: SimpleDataTableAssistiveText | undefined\n\t): SimpleDataTableAssistiveText => ({\n\t\t...defaultProps.assistiveText,\n\t\t...assistiveText,\n\t}),\n\tisEqual\n);\n\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n\tif (value === null || typeof value !== 'object') {\n\t\treturn false;\n\t}\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Deep equality for the column/row-action memo. React elements are compared\n * by `type`, `key` and `props` only: their dev-mode `_owner` is the owning\n * fiber, which is circular, so a generic deep compare (e.g. `dequal`)\n * overflows the stack as soon as a parent re-renders the table with\n * unchanged children. Anything else that isn't an array or plain object is\n * compared by reference (a miss only recomputes the columns).\n */\nconst isEqualIgnoringOwner = (a: unknown, b: unknown): boolean => {\n\tlet result = false;\n\tif (a === b) {\n\t\tresult = true;\n\t} else if (React.isValidElement(a) && React.isValidElement(b)) {\n\t\tresult =\n\t\t\ta.type === b.type &&\n\t\t\ta.key === b.key &&\n\t\t\tisEqualIgnoringOwner(a.props, b.props);\n\t} else if (Array.isArray(a) && Array.isArray(b)) {\n\t\tresult =\n\t\t\ta.length === b.length &&\n\t\t\ta.every((value, index) => isEqualIgnoringOwner(value, b[index]));\n\t} else if (isPlainObject(a) && isPlainObject(b)) {\n\t\tconst keys = Object.keys(a);\n\t\tresult =\n\t\t\tkeys.length === Object.keys(b).length &&\n\t\t\tkeys.every(\n\t\t\t\t(key) =>\n\t\t\t\t\tObject.prototype.hasOwnProperty.call(b, key) &&\n\t\t\t\t\tisEqualIgnoringOwner(a[key], b[key])\n\t\t\t);\n\t}\n\treturn result;\n};\n\nconst getColumnsAndRowActions = memoize(\n\t(\n\t\tchildren: ReactNode,\n\t\tid: string | undefined,\n\t\tfixedHeader: boolean | undefined,\n\t\tfixedLayout: boolean | undefined,\n\t\titems: SimpleDataTableItem[],\n\t\tsearch: string | undefined\n\t): {\n\t\tcolumns: SimpleDataTableColumnConfig[];\n\t\tRowActions: ReactElement | null;\n\t} => {\n\t\tconst columns: SimpleDataTableColumnConfig[] = [];\n\t\tlet RowActions: ReactElement | null = null;\n\n\t\tReact.Children.forEach(children, (child) => {\n\t\t\tif (\n\t\t\t\tisElementOfType<SimpleDataTableColumnProps>(\n\t\t\t\t\tchild,\n\t\t\t\t\tSimpleDataTableColumn\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tconst { children: columnChildren, ...columnProps } = child.props;\n\t\t\t\tconst props: Record<string, unknown> = {\n\t\t\t\t\tfixedLayout,\n\t\t\t\t\tsearch,\n\t\t\t\t\titems,\n\t\t\t\t\t...columnProps,\n\t\t\t\t};\n\t\t\t\tif (id) {\n\t\t\t\t\tprops.id = id;\n\t\t\t\t}\n\n\t\t\t\t// Any element child is the column's cell renderer, so custom cells\n\t\t\t\t// don't need to copy `SimpleDataTableCell`'s `displayName`.\n\t\t\t\tlet Cell;\n\t\t\t\tif (React.isValidElement(columnChildren)) {\n\t\t\t\t\tCell = columnChildren.type;\n\t\t\t\t\tassign(props, columnChildren.props);\n\t\t\t\t} else {\n\t\t\t\t\tCell = SimpleDataTableCell;\n\t\t\t\t}\n\n\t\t\t\tcolumns.push({\n\t\t\t\t\tCell: Cell as React.ComponentType<SimpleDataTableCellProps>,\n\t\t\t\t\tprops: props as SimpleDataTableColumnProps,\n\t\t\t\t});\n\t\t\t} else if (\n\t\t\t\tisElementOfType<SimpleDataTableRowActionsProps>(\n\t\t\t\t\tchild,\n\t\t\t\t\tSimpleDataTableRowActions\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tconst { dropdown } = child.props;\n\t\t\t\t// A fixed header scrolls the body, so the menu needs to escape it,\n\t\t\t\t// unless the dropdown sets its own `menuPosition`.\n\t\t\t\tRowActions = React.cloneElement(child, {\n\t\t\t\t\tdropdown:\n\t\t\t\t\t\tdropdown && fixedHeader && dropdown.props.menuPosition === undefined\n\t\t\t\t\t\t\t? React.cloneElement(dropdown, {\n\t\t\t\t\t\t\t\t\tmenuPosition: 'overflowBoundaryElement',\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t: dropdown,\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\treturn { columns, RowActions };\n\t},\n\tisEqualIgnoringOwner\n);\n\n/**\n * SimpleDataTables support the display of structured data in rows and columns with an HTML table. To sort, filter or paginate the table, simply update the data passed in the items to the table and it will re-render itself appropriately. The table will throw a sort event as needed, and helper components for paging and filtering are coming soon.\n *\n * NOTE: for horizontal scrolling with `fixedHeader`-enabled SimpleDataTables, see the `style` property description\n */\nclass SimpleDataTable extends React.Component<\n\tSimpleDataTableProps,\n\tSimpleDataTableState\n> {\n\t// ### Display Name\n\t// Always use the canonical component name as the React display name.\n\tstatic displayName = SIMPLE_DATA_TABLE;\n\n\tstatic defaultProps = defaultProps;\n\n\tgeneratedId: string;\n\n\theaderRefs: {\n\t\taction: (HTMLElement | null)[];\n\t\tcolumn: (HTMLElement | null)[];\n\t\tselect: (HTMLElement | null)[];\n\t};\n\n\tscrollerRef: HTMLElement | null;\n\n\tresizeObserver?: ResizeObserver;\n\n\t// Map of cells to interactive elements within that cell\n\tinteractiveElements: Record<number, Record<number, string[]>>;\n\n\ttableRef?: HTMLTableElement | null;\n\n\tconstructor(props: SimpleDataTableProps) {\n\t\tsuper(props);\n\t\tthis.generatedId = generateId();\n\t\tthis.headerRefs = {\n\t\t\taction: [],\n\t\t\tcolumn: [],\n\t\t\tselect: [],\n\t\t};\n\t\tthis.scrollerRef = null;\n\t\tthis.state = {\n\t\t\t// Currently selected cell\n\t\t\tactiveCell: {\n\t\t\t\trowIndex: 1,\n\t\t\t\tcolumnIndex: this.props.selectRows ? 1 : 0,\n\t\t\t},\n\t\t\t// Interactive element within a cell that receives focus when in actionable mode\n\t\t\tactiveElement: null,\n\t\t\t// The table can be in navigation or actionable mode\n\t\t\tmode: Mode.NAVIGATION,\n\t\t\t// The table currently has focus\n\t\t\ttableHasFocus: false,\n\t\t\t// Allows for keyboard navigation. This is useful for temporarily disabling keyboard navigation\n\t\t\t// when another component requires its own focus behavior (e.g. menu dropdown).\n\t\t\tallowKeyboardNavigation: props.keyboardNavigation,\n\t\t};\n\t\t// Map of cells to interactive elements within that cell\n\t\tthis.interactiveElements = {};\n\t\tthis.changeActiveCell = this.changeActiveCell.bind(this);\n\t\tthis.changeActiveElement = this.changeActiveElement.bind(this);\n\t\tthis.handleKeyDown = this.handleKeyDown.bind(this);\n\t\tthis.registerInteractiveElement =\n\t\t\tthis.registerInteractiveElement.bind(this);\n\n\t\t// `checkProps` issues warnings to developers about properties (similar to React's built in development tools)\n\t\t(checkProps as (name: string, props: unknown, doc?: unknown) => void)(\n\t\t\tSIMPLE_DATA_TABLE,\n\t\t\tprops,\n\t\t\tcomponentDoc\n\t\t);\n\t}\n\n\tcomponentDidMount() {\n\t\tif (this.props.fixedHeader) {\n\t\t\tthis.toggleFixedHeaderListeners(true);\n\t\t\tthis.resizeFixedHeaders();\n\t\t}\n\t}\n\n\tcomponentDidUpdate(\n\t\t_prevProps: SimpleDataTableProps,\n\t\tprevState: SimpleDataTableState\n\t) {\n\t\tif (this.props.fixedHeader) {\n\t\t\tthis.resizeFixedHeaders();\n\t\t\t// If the first page of results isn't enough to allow the user to scroll it causes\n\t\t\t// the user to get into a state where they cannot load the second page.\n\t\t\t// Simulating a scroll here will ensure that enough rows are loaded to enable scrolling\n\t\t\tthis.loadMoreIfNeeded(undefined);\n\t\t}\n\n\t\tif (\n\t\t\tthis.state.allowKeyboardNavigation &&\n\t\t\t!prevState.allowKeyboardNavigation\n\t\t) {\n\t\t\t// When re-enabling keyboard navigation (e.g. when a dropdown closes), mark that\n\t\t\t// focus has returned to the table. This must wait until after `allowKeyboardNavigation`\n\t\t\t// is set in `onClose` because the callback could focus the incorrect element (e.g. dropdown\n\t\t\t// trigger) when it executes.\n\t\t\t// eslint-disable-next-line react/no-did-update-set-state\n\t\t\tthis.setState({ tableHasFocus: true });\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.toggleFixedHeaderListeners(false);\n\t}\n\n\tgetId() {\n\t\treturn this.props.id || this.generatedId;\n\t}\n\n\tgetFirstInteractiveElement(\n\t\trowIndex: number,\n\t\tcolumnIndex: number\n\t): string | null {\n\t\tif (\n\t\t\tthis.state.mode === Mode.ACTIONABLE &&\n\t\t\tthis.interactiveElements[rowIndex] &&\n\t\t\tthis.interactiveElements[rowIndex][columnIndex]\n\t\t) {\n\t\t\treturn this.interactiveElements[rowIndex][columnIndex][0];\n\t\t}\n\t\treturn null;\n\t}\n\n\tgetTableContext = memoize(\n\t\t(\n\t\t\tstate: SimpleDataTableState,\n\t\t\tisKeyboardNavigation: boolean | undefined,\n\t\t\tisGrid: boolean\n\t\t) => ({\n\t\t\tisGrid,\n\t\t\tactiveCell: state.activeCell,\n\t\t\tactiveElement: state.activeElement,\n\t\t\tmode: state.mode,\n\t\t\ttableHasFocus: state.tableHasFocus,\n\t\t\tchangeActiveCell: this.changeActiveCell,\n\t\t\tchangeActiveElement: this.changeActiveElement,\n\t\t\thandleKeyDown: this.handleKeyDown,\n\t\t\tregisterInteractiveElement: this.registerInteractiveElement,\n\t\t\tallowKeyboardNavigation: state.allowKeyboardNavigation ?? false,\n\t\t\tsetAllowKeyboardNavigation: (allowKeyboardNavigation: boolean) => {\n\t\t\t\tif (isKeyboardNavigation) {\n\t\t\t\t\tthis.setState({ allowKeyboardNavigation });\n\t\t\t\t}\n\t\t\t},\n\t\t})\n\t);\n\n\t// Memoized per list so the `id` lookups are only rebuilt when the\n\t// `selection` or `disabledSelection` prop changes.\n\tgetSelectionMatcher = memoize(createItemMatcher);\n\n\tgetDisabledSelectionMatcher = memoize(createItemMatcher);\n\n\t// Selection is controlled: the table never stores it. Both handlers report\n\t// the requested next selection, computed from the `selection` prop, and\n\t// leave rendering to the parent's next `selection`.\n\trequestSelection = (\n\t\tevent: React.SyntheticEvent,\n\t\tselection: SimpleDataTableItem[]\n\t) => {\n\t\tif (typeof this.props.onRowChange === 'function') {\n\t\t\tthis.props.onRowChange(event, { selection });\n\t\t}\n\t};\n\n\thandleToggleAll = (\n\t\te: React.SyntheticEvent,\n\t\t{ checked }: { checked: boolean }\n\t) => {\n\t\tconst selection = this.props.selection ?? EMPTY_ITEMS;\n\t\tconst isDisabled = this.getDisabledSelectionMatcher(\n\t\t\tthis.props.disabledSelection ?? EMPTY_ITEMS\n\t\t);\n\t\t// Selected rows whose selection is disabled keep their state.\n\t\tconst selectedDisabledItems = selection.filter(isDisabled);\n\t\tconst enabledItems = this.props.items.filter((item) => !isDisabled(item));\n\n\t\tconst newSelection = (\n\t\t\tchecked\n\t\t\t\t? [...enabledItems, ...selectedDisabledItems]\n\t\t\t\t: selectedDisabledItems\n\t\t).filter((item) => item.type !== 'header-row');\n\n\t\tthis.requestSelection(e, newSelection);\n\t};\n\n\thandleRowToggle = (\n\t\titem: SimpleDataTableItem,\n\t\tselected: boolean,\n\t\te: React.SyntheticEvent\n\t) => {\n\t\tconst selection = this.props.selection ?? EMPTY_ITEMS;\n\t\tlet newSelection: SimpleDataTableItem[];\n\n\t\tif (selected) {\n\t\t\tnewSelection =\n\t\t\t\tthis.props.selectRows === 'radio' ? [item] : [...selection, item];\n\t\t} else {\n\t\t\tconst isToggledItem = createItemMatcher([item]);\n\t\t\tnewSelection = selection.filter((entry) => !isToggledItem(entry));\n\t\t}\n\n\t\tthis.requestSelection(e, newSelection);\n\t};\n\n\tresizeFixedHeaders = (event?: Event) => {\n\t\tconst headerRefs = [\n\t\t\t...this.headerRefs.select,\n\t\t\t...this.headerRefs.column,\n\t\t\t...this.headerRefs.action,\n\t\t];\n\n\t\tif (this.props.onFixedHeaderResize) {\n\t\t\tthis.props.onFixedHeaderResize(event, {\n\t\t\t\theaderRefs: headerRefs.filter(Boolean) as HTMLElement[],\n\t\t\t\tscrollerRef: this.scrollerRef,\n\t\t\t});\n\t\t} else if (headerRefs.length > 0) {\n\t\t\tlet documentScrollLeft = 0;\n\n\t\t\tif (canUseDOM) {\n\t\t\t\tdocumentScrollLeft = document.documentElement.scrollLeft;\n\t\t\t}\n\n\t\t\theaderRefs.forEach((column) => {\n\t\t\t\tif (column && canUseDOM) {\n\t\t\t\t\tconst columnLeft =\n\t\t\t\t\t\tcolumn.getBoundingClientRect().left + documentScrollLeft;\n\t\t\t\t\tlet wrapperLeft = 0;\n\n\t\t\t\t\tif (this.scrollerRef) {\n\t\t\t\t\t\twrapperLeft =\n\t\t\t\t\t\t\tthis.scrollerRef.getBoundingClientRect().left +\n\t\t\t\t\t\t\tdocumentScrollLeft;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst cellFixed = column.querySelector(\n\t\t\t\t\t\t'.slds-cell-fixed'\n\t\t\t\t\t) as HTMLElement | null;\n\n\t\t\t\t\tif (cellFixed) {\n\t\t\t\t\t\tcellFixed.style.left = `${columnLeft - wrapperLeft}px`;\n\t\t\t\t\t\tcellFixed.style.width = `${column.offsetWidth}px`;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\tloadMoreIfNeeded = (\n\t\tevent: Event | undefined,\n\t\tfallbackTrigger: SimpleDataTableLoadMoreData['trigger'] = 'update'\n\t) => {\n\t\tif (this.props.hasMore && this.props.onLoadMore && this.scrollerRef) {\n\t\t\tconst { scrollTop, offsetHeight, scrollHeight } = this.scrollerRef;\n\t\t\tif (\n\t\t\t\tscrollTop + offsetHeight >\n\t\t\t\tscrollHeight - (this.props.loadMoreOffset ?? 0)\n\t\t\t) {\n\t\t\t\tlet trigger = fallbackTrigger;\n\t\t\t\tif (event?.type === 'scroll' || event?.type === 'resize') {\n\t\t\t\t\ttrigger = event.type;\n\t\t\t\t}\n\t\t\t\tthis.props.onLoadMore(event, { trigger });\n\t\t\t}\n\t\t}\n\t};\n\n\ttoggleFixedHeaderListeners = (attach: boolean) => {\n\t\tif (this.props.onToggleFixedHeaderListeners) {\n\t\t\tthis.props.onToggleFixedHeaderListeners(\n\t\t\t\t{},\n\t\t\t\t{\n\t\t\t\t\tattach,\n\t\t\t\t\tresizeHandler: this.resizeFixedHeaders,\n\t\t\t\t\tscrollerRef: this.scrollerRef,\n\t\t\t\t}\n\t\t\t);\n\t\t} else {\n\t\t\tconst method = attach ? 'addEventListener' : 'removeEventListener';\n\t\t\tif (typeof ResizeObserver !== 'undefined') {\n\t\t\t\t// Track the scroller and table rather than the window, so headers\n\t\t\t\t// also follow container resizes that leave the window alone.\n\t\t\t\tthis.resizeObserver?.disconnect();\n\t\t\t\tthis.resizeObserver = undefined;\n\t\t\t\tif (attach) {\n\t\t\t\t\tthis.resizeObserver = new ResizeObserver(() => {\n\t\t\t\t\t\tthis.resizeFixedHeaders();\n\t\t\t\t\t\tthis.loadMoreIfNeeded(undefined, 'resize');\n\t\t\t\t\t});\n\t\t\t\t\tif (this.scrollerRef) {\n\t\t\t\t\t\tthis.resizeObserver.observe(this.scrollerRef);\n\t\t\t\t\t}\n\t\t\t\t\tif (this.tableRef) {\n\t\t\t\t\t\tthis.resizeObserver.observe(this.tableRef);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (canUseEventListeners) {\n\t\t\t\twindow[method]('resize', this.resizeFixedHeaders as EventListener);\n\t\t\t\twindow[method]('resize', this.loadMoreIfNeeded as EventListener);\n\t\t\t}\n\t\t\tif (canUseEventListeners && this.scrollerRef) {\n\t\t\t\tthis.scrollerRef[method](\n\t\t\t\t\t'scroll',\n\t\t\t\t\tthis.resizeFixedHeaders as EventListener\n\t\t\t\t);\n\t\t\t\tthis.scrollerRef[method](\n\t\t\t\t\t'scroll',\n\t\t\t\t\tthis.loadMoreIfNeeded as EventListener\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t};\n\n\t// eslint-disable-next-line camelcase\n\tUNSAFE_componentWillUpdate(nextProps: SimpleDataTableProps) {\n\t\tif (this.props.items !== nextProps.items) {\n\t\t\tthis.interactiveElements = {};\n\t\t}\n\t}\n\n\tchangeActiveCell(rowIndex: number, columnIndex: number) {\n\t\tthis.setState({\n\t\t\ttableHasFocus: true,\n\t\t\tactiveCell: { rowIndex, columnIndex },\n\t\t});\n\t}\n\n\tchangeActiveElement(activeElement: string | null) {\n\t\tthis.setState({ activeElement, mode: Mode.ACTIONABLE });\n\t}\n\n\thandleKeyDown(event: React.KeyboardEvent) {\n\t\tmapKeyEventCallbacks(event, {\n\t\t\tcallbacks: {\n\t\t\t\t[KEYS.UP]: { callback: () => this.handleKeyDownUp() },\n\t\t\t\t[KEYS.DOWN]: { callback: () => this.handleKeyDownDown() },\n\t\t\t\t[KEYS.LEFT]: { callback: () => this.handleKeyDownLeft() },\n\t\t\t\t[KEYS.RIGHT]: { callback: () => this.handleKeyDownRight() },\n\t\t\t\t[KEYS.ENTER]: { callback: () => this.handleKeyDownEnter() },\n\t\t\t\t[KEYS.ESCAPE]: { callback: () => this.handleKeyDownEscape() },\n\t\t\t\t[KEYS.TAB]:\n\t\t\t\t\tthis.state.mode === Mode.ACTIONABLE\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tcallback: (evt: React.KeyboardEvent) =>\n\t\t\t\t\t\t\t\t\tthis.handleKeyTabPress(evt),\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t: null,\n\t\t\t},\n\t\t});\n\t}\n\n\thandleKeyDownUp() {\n\t\tconst newRowIndex = Math.max(this.state.activeCell.rowIndex - 1, 0);\n\t\tconst activeElement = this.getFirstInteractiveElement(\n\t\t\tnewRowIndex,\n\t\t\tthis.state.activeCell.columnIndex\n\t\t);\n\t\tif (newRowIndex !== this.state.activeCell.rowIndex) {\n\t\t\tthis.setState((prevState) => ({\n\t\t\t\tactiveCell: {\n\t\t\t\t\trowIndex: newRowIndex,\n\t\t\t\t\tcolumnIndex: prevState.activeCell.columnIndex,\n\t\t\t\t},\n\t\t\t\tactiveElement,\n\t\t\t}));\n\t\t}\n\t}\n\n\thandleKeyDownDown() {\n\t\tconst newRowIndex = Math.min(\n\t\t\tthis.state.activeCell.rowIndex + 1,\n\t\t\tthis.props.items.length\n\t\t);\n\t\tconst activeElement = this.getFirstInteractiveElement(\n\t\t\tnewRowIndex,\n\t\t\tthis.state.activeCell.columnIndex\n\t\t);\n\t\tif (newRowIndex !== this.state.activeCell.rowIndex) {\n\t\t\tthis.setState((prevState) => ({\n\t\t\t\tactiveCell: {\n\t\t\t\t\trowIndex: newRowIndex,\n\t\t\t\t\tcolumnIndex: prevState.activeCell.columnIndex,\n\t\t\t\t},\n\t\t\t\tactiveElement,\n\t\t\t}));\n\t\t}\n\t}\n\n\thandleKeyDownLeft() {\n\t\tconst newColumnIndex = Math.max(this.state.activeCell.columnIndex - 1, 0);\n\t\tconst activeElement = this.getFirstInteractiveElement(\n\t\t\tthis.state.activeCell.rowIndex,\n\t\t\tnewColumnIndex\n\t\t);\n\t\tif (newColumnIndex !== this.state.activeCell.columnIndex) {\n\t\t\tthis.setState((prevState) => ({\n\t\t\t\tactiveCell: {\n\t\t\t\t\trowIndex: prevState.activeCell.rowIndex,\n\t\t\t\t\tcolumnIndex: newColumnIndex,\n\t\t\t\t},\n\t\t\t\tactiveElement,\n\t\t\t}));\n\t\t}\n\t}\n\n\t// Columns plus the row actions cell. Counts parsed children, so\n\t// conditional (`false`/`null`) children don't count as columns.\n\tgetCellCount() {\n\t\tconst { columns, RowActions } = getColumnsAndRowActions(\n\t\t\tthis.props.children,\n\t\t\tthis.props.id,\n\t\t\tthis.props.fixedHeader,\n\t\t\tthis.props.fixedLayout,\n\t\t\tthis.props.items,\n\t\t\tthis.props.search\n\t\t);\n\t\treturn columns.length + (RowActions ? 1 : 0);\n\t}\n\n\thandleKeyDownRight() {\n\t\tconst newColumnIndex = Math.min(\n\t\t\tthis.state.activeCell.columnIndex + 1,\n\t\t\tthis.getCellCount() - (this.props.selectRows ? 0 : 1)\n\t\t);\n\t\tconst activeElement = this.getFirstInteractiveElement(\n\t\t\tthis.state.activeCell.rowIndex,\n\t\t\tnewColumnIndex\n\t\t);\n\t\tif (newColumnIndex !== this.state.activeCell.columnIndex) {\n\t\t\tthis.setState((prevState) => ({\n\t\t\t\tactiveCell: {\n\t\t\t\t\trowIndex: prevState.activeCell.rowIndex,\n\t\t\t\t\tcolumnIndex: newColumnIndex,\n\t\t\t\t},\n\t\t\t\tactiveElement,\n\t\t\t}));\n\t\t}\n\t}\n\n\thandleKeyDownEnter() {\n\t\tif (this.state.mode === Mode.NAVIGATION) {\n\t\t\tconst { rowIndex, columnIndex } = this.state.activeCell;\n\t\t\tlet activeElement: string | null = null;\n\t\t\tif (\n\t\t\t\tthis.interactiveElements[rowIndex] &&\n\t\t\t\tthis.interactiveElements[rowIndex][columnIndex]\n\t\t\t) {\n\t\t\t\t[activeElement] = this.interactiveElements[rowIndex][columnIndex];\n\t\t\t}\n\t\t\tthis.setState({\n\t\t\t\tmode: Mode.ACTIONABLE,\n\t\t\t\tactiveElement,\n\t\t\t});\n\t\t}\n\t}\n\n\thandleKeyDownEscape() {\n\t\tif (this.state.mode === Mode.ACTIONABLE) {\n\t\t\tthis.setState({\n\t\t\t\tmode: Mode.NAVIGATION,\n\t\t\t\tactiveElement: null,\n\t\t\t});\n\t\t}\n\t}\n\n\tmoveNext(event: React.KeyboardEvent, rowIndex: number, columnIndex: number) {\n\t\tconst headers = [\n\t\t\t...this.headerRefs.select,\n\t\t\t...this.headerRefs.column,\n\t\t\t...this.headerRefs.action,\n\t\t];\n\t\tlet newRowIndex;\n\t\tlet newColumnIndex;\n\n\t\tif (event.shiftKey) {\n\t\t\tif (columnIndex - 1 >= 0) {\n\t\t\t\tnewColumnIndex = columnIndex - 1;\n\t\t\t\tnewRowIndex = rowIndex;\n\t\t\t} else {\n\t\t\t\tif (rowIndex > 0) newRowIndex = rowIndex - 1;\n\t\t\t\telse newRowIndex = this.props.items.length;\n\n\t\t\t\tnewColumnIndex = headers.length - 1;\n\t\t\t}\n\t\t} else if (columnIndex + 1 < headers.length) {\n\t\t\tnewColumnIndex = columnIndex + 1;\n\t\t\tnewRowIndex = rowIndex;\n\t\t} else {\n\t\t\tif (rowIndex < this.props.items.length) newRowIndex = rowIndex + 1;\n\t\t\telse newRowIndex = 0;\n\n\t\t\tnewColumnIndex = 0;\n\t\t}\n\n\t\tthis.changeActiveCell(newRowIndex, newColumnIndex);\n\t}\n\n\thandleNextActionable(event: React.KeyboardEvent): string | null {\n\t\tconst { rowIndex, columnIndex } = this.state.activeCell;\n\t\tconst currentActiveElement = this.state.activeElement;\n\t\tconst rowActiveElements =\n\t\t\tthis.interactiveElements[rowIndex] &&\n\t\t\tthis.interactiveElements[rowIndex][columnIndex]\n\t\t\t\t? this.interactiveElements[rowIndex][columnIndex]\n\t\t\t\t: null;\n\n\t\tif (rowActiveElements) {\n\t\t\tif (currentActiveElement) {\n\t\t\t\tconst index = rowActiveElements.indexOf(currentActiveElement);\n\n\t\t\t\tif (event.shiftKey) {\n\t\t\t\t\treturn index > 0 ? rowActiveElements[index - 1] : null;\n\t\t\t\t}\n\t\t\t\treturn index < rowActiveElements.length - 1\n\t\t\t\t\t? rowActiveElements[index + 1]\n\t\t\t\t\t: null;\n\t\t\t}\n\t\t\treturn !event.shiftKey\n\t\t\t\t? rowActiveElements[0]\n\t\t\t\t: rowActiveElements[rowActiveElements.length - 1];\n\t\t}\n\t\treturn null;\n\t}\n\n\thandleKeyTabPress(event: React.KeyboardEvent) {\n\t\tconst { rowIndex, columnIndex } = this.state.activeCell;\n\n\t\tif (this.state.mode === Mode.ACTIONABLE) {\n\t\t\tconst nextActionable = this.handleNextActionable(event);\n\n\t\t\tif (nextActionable) {\n\t\t\t\tthis.setState({ activeElement: nextActionable });\n\t\t\t} else if (rowIndex === 0) {\n\t\t\t\tconst headers = [\n\t\t\t\t\t...this.headerRefs.select,\n\t\t\t\t\t...this.headerRefs.column,\n\t\t\t\t\t...this.headerRefs.action,\n\t\t\t\t];\n\t\t\t\tlet newIndex = 0;\n\n\t\t\t\tif (!event.shiftKey)\n\t\t\t\t\tnewIndex = columnIndex + 1 < headers.length ? columnIndex + 1 : 0;\n\t\t\t\telse\n\t\t\t\t\tnewIndex =\n\t\t\t\t\t\tcolumnIndex - 1 >= 0 ? columnIndex - 1 : headers.length - 1;\n\t\t\t\tthis.setState({\n\t\t\t\t\tmode: Mode.ACTIONABLE,\n\t\t\t\t\tactiveElement: null,\n\t\t\t\t});\n\n\t\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\t\theaders.forEach((header, index) => {\n\t\t\t\t\tif (!header) return;\n\t\t\t\t\tif (index === newIndex) {\n\t\t\t\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\t\t\t\theader.tabIndex = 0;\n\t\t\t\t\t\theader.focus();\n\t\t\t\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\t\t\t} else header.tabIndex = -1;\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tthis.moveNext(event, rowIndex, columnIndex);\n\t\t\t\tthis.setState({\n\t\t\t\t\tmode: Mode.ACTIONABLE,\n\t\t\t\t\tactiveElement: null,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tregisterInteractiveElement(\n\t\trowIndex: number,\n\t\tcolumnIndex: number,\n\t\telementId: string\n\t) {\n\t\tif (!this.interactiveElements[rowIndex]) {\n\t\t\tthis.interactiveElements[rowIndex] = {};\n\t\t}\n\t\tconst existingElements =\n\t\t\tthis.interactiveElements[rowIndex][columnIndex] || [];\n\n\t\tif (!existingElements.includes(elementId)) {\n\t\t\tthis.interactiveElements[rowIndex][columnIndex] = [\n\t\t\t\t...existingElements,\n\t\t\t\telementId,\n\t\t\t];\n\t\t}\n\t}\n\n\t// ### Render\n\trender() {\n\t\tconst ariaProps: { 'aria-multiselectable'?: 'true' } = {};\n\t\tconst numHeaderRows = 1;\n\t\tconst isItemSelected = this.getSelectionMatcher(\n\t\t\tthis.props.selection ?? EMPTY_ITEMS\n\t\t);\n\t\tconst isItemDisabled = this.getDisabledSelectionMatcher(\n\t\t\tthis.props.disabledSelection ?? EMPTY_ITEMS\n\t\t);\n\t\tconst numRows = count(this.props.items);\n\t\t// Rows the select-all checkbox controls, and how many of them are selected\n\t\tconst selectableItems = this.props.items.filter(\n\t\t\t(item) => item.type !== 'header-row' && !isItemDisabled(item)\n\t\t);\n\t\tconst numNonHeaderRows = selectableItems.length;\n\t\tconst numSelected = selectableItems.filter(isItemSelected).length;\n\t\tconst canSelectRows =\n\t\t\tthis.props.selectRows && numNonHeaderRows > 0\n\t\t\t\t? this.props.selectRows\n\t\t\t\t: false;\n\t\tconst allSelected = canSelectRows && numNonHeaderRows === numSelected;\n\t\tconst indeterminateSelected =\n\t\t\tcanSelectRows && numNonHeaderRows !== numSelected && numSelected !== 0;\n\n\t\tconst { columns, RowActions } = getColumnsAndRowActions(\n\t\t\tthis.props.children,\n\t\t\tthis.props.id,\n\t\t\tthis.props.fixedHeader,\n\t\t\tthis.props.fixedLayout,\n\t\t\tthis.props.items,\n\t\t\tthis.props.search\n\t\t);\n\n\t\tconst assistiveText = getAssistiveText(this.props.assistiveText);\n\n\t\tif (this.props.selectRows && this.props.selectRows !== 'radio') {\n\t\t\tariaProps['aria-multiselectable'] = 'true';\n\t\t}\n\n\t\t// This guarantees there are never any old header references if props change\n\t\tthis.headerRefs = {\n\t\t\taction: RowActions ? this.headerRefs.action : [],\n\t\t\tcolumn: this.headerRefs.column.slice(0, columns.length),\n\t\t\tselect: canSelectRows ? this.headerRefs.select : [],\n\t\t};\n\n\t\t// Arrow-key cell navigation only runs with both props, so only then is\n\t\t// the table a grid.\n\t\tconst isGrid = Boolean(\n\t\t\tthis.props.fixedLayout && this.props.keyboardNavigation\n\t\t);\n\n\t\tlet component = (\n\t\t\t<React.Fragment>\n\t\t\t\t<TableContext.Provider\n\t\t\t\t\tvalue={this.getTableContext(\n\t\t\t\t\t\tthis.state,\n\t\t\t\t\t\tthis.props.keyboardNavigation,\n\t\t\t\t\t\tisGrid\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t<table\n\t\t\t\t\t\t{...ariaProps}\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-table',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-table_fixed-layout': this.props.fixedLayout,\n\t\t\t\t\t\t\t\t'slds-table_header-fixed': this.props.fixedHeader,\n\t\t\t\t\t\t\t\t// Not vestigial: SLDS uses it to zero the `thead th` padding,\n\t\t\t\t\t\t\t\t// which `.slds-th__action` then supplies.\n\t\t\t\t\t\t\t\t'slds-table_resizable-cols': this.props.fixedLayout,\n\t\t\t\t\t\t\t\t'slds-table_bordered': !this.props.unborderedRow,\n\t\t\t\t\t\t\t\t'slds-table_cell-buffer':\n\t\t\t\t\t\t\t\t\t!this.props.fixedLayout && !this.props.unbufferedCell,\n\t\t\t\t\t\t\t\t'slds-max-medium-table_stacked': this.props.stacked,\n\t\t\t\t\t\t\t\t'slds-max-medium-table_stacked-horizontal':\n\t\t\t\t\t\t\t\t\tthis.props.stackedHorizontal,\n\t\t\t\t\t\t\t\t'slds-table_striped': this.props.striped,\n\t\t\t\t\t\t\t\t'slds-table_col-bordered': this.props.columnBordered,\n\t\t\t\t\t\t\t\t'slds-no-row-hover': this.props.noRowHover,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tthis.props.className\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tid={this.getId()}\n\t\t\t\t\t\tref={(node) => {\n\t\t\t\t\t\t\tif (node) {\n\t\t\t\t\t\t\t\tthis.tableRef = node;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t\trole={isGrid ? 'grid' : undefined}\n\t\t\t\t\t\tonBlur={(event) => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tthis.tableRef &&\n\t\t\t\t\t\t\t\t!this.tableRef.contains(event.relatedTarget as Node)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\ttableHasFocus: false,\n\t\t\t\t\t\t\t\t\tmode: Mode.NAVIGATION,\n\t\t\t\t\t\t\t\t\tactiveElement: null,\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tstyle={this.props.style}\n\t\t\t\t\t>\n\t\t\t\t\t\t<SimpleDataTableHead\n\t\t\t\t\t\t\tassistiveText={assistiveText}\n\t\t\t\t\t\t\tallSelected={allSelected}\n\t\t\t\t\t\t\tfixedHeader={this.props.fixedHeader}\n\t\t\t\t\t\t\tfixedLayout={this.props.fixedLayout}\n\t\t\t\t\t\t\theaderRefs={(ref, index) => {\n\t\t\t\t\t\t\t\tif (index === 'action' || index === 'select') {\n\t\t\t\t\t\t\t\t\tif (ref) {\n\t\t\t\t\t\t\t\t\t\tthis.headerRefs[index][0] = ref;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tthis.headerRefs[index] = [];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthis.headerRefs.column[index] = ref;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tisHidden={this.props.isHeadless}\n\t\t\t\t\t\t\tisOnlyRow={numRows === 0}\n\t\t\t\t\t\t\tindeterminateSelected={indeterminateSelected}\n\t\t\t\t\t\t\tcanSelectRows={canSelectRows}\n\t\t\t\t\t\t\tcolumns={columns}\n\t\t\t\t\t\t\tid={`${this.getId()}-${SIMPLE_DATA_TABLE_HEAD}`}\n\t\t\t\t\t\t\tonToggleAll={this.handleToggleAll}\n\t\t\t\t\t\t\tonSort={this.props.onSort}\n\t\t\t\t\t\t\tshowRowActions={!!RowActions}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<tbody style={inheritRadius}>\n\t\t\t\t\t\t\t{numRows > 0\n\t\t\t\t\t\t\t\t? this.props.items.map((item, index) => {\n\t\t\t\t\t\t\t\t\t\tconst rowId =\n\t\t\t\t\t\t\t\t\t\t\tthis.getId() && item.id\n\t\t\t\t\t\t\t\t\t\t\t\t? `${this.getId()}-${SIMPLE_DATA_TABLE_ROW}-${item.id}`\n\t\t\t\t\t\t\t\t\t\t\t\t: generateId();\n\t\t\t\t\t\t\t\t\t\tif (item.type === 'header-row') {\n\t\t\t\t\t\t\t\t\t\t\tconst subHeadingRowData = {\n\t\t\t\t\t\t\t\t\t\t\t\tassistiveText,\n\t\t\t\t\t\t\t\t\t\t\t\tclassNameRow: item.classNameRow,\n\t\t\t\t\t\t\t\t\t\t\t\tcolumns,\n\t\t\t\t\t\t\t\t\t\t\t\tid: rowId,\n\t\t\t\t\t\t\t\t\t\t\t\ttableId: this.getId(),\n\t\t\t\t\t\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\t\tif (this.props.renderSubHeadingRow) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<React.Fragment key={rowId}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.props.renderSubHeadingRow(subHeadingRowData)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</React.Fragment>\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif (this.props.onRenderSubHeadingRow) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn this.props.onRenderSubHeadingRow({\n\t\t\t\t\t\t\t\t\t\t\t\t\t...subHeadingRowData,\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey: rowId,\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t<SimpleDataTableRow\n\t\t\t\t\t\t\t\t\t\t\t\tassistiveText={assistiveText}\n\t\t\t\t\t\t\t\t\t\t\t\tcanSelectRows={canSelectRows}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={item.classNameRow}\n\t\t\t\t\t\t\t\t\t\t\t\tcolumns={columns}\n\t\t\t\t\t\t\t\t\t\t\t\tfixedLayout={this.props.fixedLayout}\n\t\t\t\t\t\t\t\t\t\t\t\tid={rowId}\n\t\t\t\t\t\t\t\t\t\t\t\tindex={index}\n\t\t\t\t\t\t\t\t\t\t\t\titem={item}\n\t\t\t\t\t\t\t\t\t\t\t\tkey={rowId}\n\t\t\t\t\t\t\t\t\t\t\t\tonToggle={this.handleRowToggle}\n\t\t\t\t\t\t\t\t\t\t\t\tisSelected={isItemSelected(item)}\n\t\t\t\t\t\t\t\t\t\t\t\tisDisabled={isItemDisabled(item)}\n\t\t\t\t\t\t\t\t\t\t\t\trowActions={RowActions}\n\t\t\t\t\t\t\t\t\t\t\t\ttableId={this.getId()}\n\t\t\t\t\t\t\t\t\t\t\t\trowIndex={index + numHeaderRows}\n\t\t\t\t\t\t\t\t\t\t\t\tisFirstRow={this.props.isHeadless && index === 0}\n\t\t\t\t\t\t\t\t\t\t\t\tisLastRow={index === numRows - 1}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t: // Someday this should be an element to render when the table is empty\n\t\t\t\t\t\t\t\t\tnull}\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t</table>\n\t\t\t\t</TableContext.Provider>\n\t\t\t\t{this.props.fixedHeader && this.props.hasMore && (\n\t\t\t\t\t<div className=\"slds-is-relative slds-p-around_large\">\n\t\t\t\t\t\t<Spinner\n\t\t\t\t\t\t\tassistiveText={{ label: this.props.assistiveText?.loadingMore }}\n\t\t\t\t\t\t\thasContainer={false}\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tvariant=\"brand\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</React.Fragment>\n\t\t);\n\n\t\tif (this.props.fixedHeader) {\n\t\t\tconst border =\n\t\t\t\t'1px solid var(--slds-g-color-border-1, rgb(221, 219, 218))';\n\t\t\tconst styles: React.CSSProperties = {\n\t\t\t\tborderTop: border,\n\t\t\t\theight: '100%',\n\t\t\t};\n\n\t\t\tif (this.props.joined) {\n\t\t\t\tstyles.borderBottom = border;\n\t\t\t\tstyles.borderLeft = border;\n\t\t\t\tstyles.borderRight = border;\n\t\t\t\tstyles.borderTop = 'none';\n\t\t\t\tstyles.borderRadius =\n\t\t\t\t\t'0 0 var(--slds-g-radius-border-2, 0.25rem) var(--slds-g-radius-border-2, 0.25rem)';\n\t\t\t}\n\n\t\t\tconst fixedScrollerStyle: React.CSSProperties = {\n\t\t\t\theight: '100%',\n\t\t\t\toverflow: 'auto',\n\t\t\t};\n\n\t\t\tcomponent = (\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"slds-table_header-fixed_container\"\n\t\t\t\t\tstyle={styles}\n\t\t\t\t\tonScroll={(e) => {\n\t\t\t\t\t\tconst containerScrollLeft = (e.target as HTMLElement).scrollLeft;\n\n\t\t\t\t\t\tif (containerScrollLeft > 0) {\n\t\t\t\t\t\t\t(e.target as HTMLElement).scrollLeft = 0;\n\t\t\t\t\t\t\tif (this.scrollerRef) {\n\t\t\t\t\t\t\t\tthis.scrollerRef.scrollLeft = containerScrollLeft;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName=\"slds-table_header-fixed_scroller\"\n\t\t\t\t\t\tref={(ref) => {\n\t\t\t\t\t\t\tthis.scrollerRef = ref;\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tstyle={fixedScrollerStyle}\n\t\t\t\t\t>\n\t\t\t\t\t\t{component}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\treturn component;\n\t}\n}\n\nexport default SimpleDataTable;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAuEA,IAAM,KAAS,MACd,MAAM,QAAQ,CAAK,IAAI,EAAM,SAAS,GAEjC,IAAe;CACpB,eAAe;EACd,eAAe;EACf,YAAY;EACZ,uBAAuB;EACvB,wBAAwB;EACxB,eAAe;EACf,WAAW;EACX,gBAAgB;EAChB,aAAa;CACd;CACA,SAAS;CACT,gBAAgB;AACjB,GAEM,IAAqC,CAAC,GAEtC,KAAS,MACd,EAAK,OAAO,KAAA,KAAa,EAAK,OAAO,MAQhC,KAAqB,MAAgC;CAC1D,IAAM,IAAa,IAAI,IAAI,CAAI,GACzB,IAAM,IAAI,IAAI,EAAK,OAAO,CAAK,CAAC,CAAC,KAAK,MAAU,EAAM,EAAE,CAAC;CAC/D,QAAQ,MACP,EAAW,IAAI,CAAI,KAAM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B,IAAM,IAAuB,EAAE,OAAuB;KAEtD,AAAI,IAAsB,MACzB,EAAG,OAAuB,aAAa,GACnC,KAAK,gBACR,KAAK,YAAY,aAAa;IAGjC;IAEA,UAAA,kBAAC,OAAD;KACC,WAAU;KACV,MAAM,MAAQ;MACb,KAAK,cAAc;KACpB;KACA,OAAO;MAxBT,QAAQ;MACR,UAAU;KAuBD;KAEN,UAAA;IACG,CAAA;GACD,CAAA;EAEP;EAEA,OAAO;CACR;AACD"}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import e from "../../utilities/
|
|
2
|
-
import t from "
|
|
3
|
-
import n from "./private/
|
|
4
|
-
import r from "./private/
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
1
|
+
import { MENU_DROPDOWN as e } from "../../utilities/constants.js";
|
|
2
|
+
import t from "../../utilities/generate-id.js";
|
|
3
|
+
import n from "./private/cell-context.js";
|
|
4
|
+
import r from "./private/table-context.js";
|
|
5
|
+
import i from "./private/mode.js";
|
|
6
|
+
import { Component as a } from "react";
|
|
7
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
7
8
|
//#region components/simple-data-table/interactive-element.tsx
|
|
8
|
-
var
|
|
9
|
-
function
|
|
10
|
-
class
|
|
9
|
+
var s = Symbol.for("react.forward_ref"), c = (e) => typeof e == "object" && !!e && e.$$typeof === s;
|
|
10
|
+
function l(s, { tracksOpen: l = s.displayName === e } = {}) {
|
|
11
|
+
class u extends a {
|
|
11
12
|
elementId;
|
|
12
|
-
usesRef = s
|
|
13
|
-
constructor(
|
|
14
|
-
super(
|
|
13
|
+
usesRef = c(s);
|
|
14
|
+
constructor(e) {
|
|
15
|
+
super(e), this.elementId = t();
|
|
15
16
|
}
|
|
16
17
|
onFocus(e, ...t) {
|
|
17
18
|
e.activeElement !== this.elementId && e.changeActiveElement(this.elementId), this.props.onFocus && this.props.onFocus(...t);
|
|
@@ -31,29 +32,31 @@ function c(o) {
|
|
|
31
32
|
e.setAllowKeyboardNavigation(!0), this.props.onClose && this.props.onClose(...t);
|
|
32
33
|
}
|
|
33
34
|
render() {
|
|
34
|
-
let { onFocus: e, onRequestFocus:
|
|
35
|
-
return /* @__PURE__ */
|
|
36
|
-
|
|
37
|
-
let
|
|
38
|
-
onRequestFocus:
|
|
39
|
-
requestFocus:
|
|
40
|
-
},
|
|
41
|
-
onFocus: e.bind(this,
|
|
42
|
-
...
|
|
43
|
-
tabIndex:
|
|
35
|
+
let { onFocus: e, onRequestFocus: t, onOpen: a, onClose: c } = this;
|
|
36
|
+
return /* @__PURE__ */ o(r.Consumer, { children: (r) => /* @__PURE__ */ o(n.Consumer, { children: (n) => {
|
|
37
|
+
r.registerInteractiveElement(n.rowIndex, n.columnIndex, this.elementId);
|
|
38
|
+
let u = r.mode === i.ACTIONABLE && r.activeElement === this.elementId, d = r.mode === i.ACTIONABLE ? 0 : -1, f = this.usesRef ? { ref: this.getFocusRef(r, u) } : {
|
|
39
|
+
onRequestFocus: t.bind(this, r),
|
|
40
|
+
requestFocus: u
|
|
41
|
+
}, p = r.allowKeyboardNavigation ? {
|
|
42
|
+
onFocus: e.bind(this, r),
|
|
43
|
+
...f,
|
|
44
|
+
tabIndex: d
|
|
44
45
|
} : {};
|
|
45
|
-
return /* @__PURE__ */
|
|
46
|
+
return /* @__PURE__ */ o(s, {
|
|
46
47
|
...this.props,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
...l ? {
|
|
49
|
+
onOpen: a.bind(this, r),
|
|
50
|
+
onClose: c.bind(this, r)
|
|
51
|
+
} : {},
|
|
52
|
+
...p
|
|
50
53
|
});
|
|
51
54
|
} }) });
|
|
52
55
|
}
|
|
53
56
|
}
|
|
54
|
-
return
|
|
57
|
+
return u.displayName = `InteractiveElement${s.displayName || "Unknown"}`, u;
|
|
55
58
|
}
|
|
56
59
|
//#endregion
|
|
57
|
-
export {
|
|
60
|
+
export { l as default };
|
|
58
61
|
|
|
59
62
|
//# sourceMappingURL=interactive-element.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactive-element.js","names":[],"sources":["../../../../components/simple-data-table/interactive-element.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport { Component, ComponentType } from 'react';\nimport Mode from './private/mode';\nimport CellContext from './private/cell-context';\nimport TableContext, { TableContextValue } from './private/table-context';\n\nimport generateId from '../../utilities/generate-id';\n\nconst FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\n\n// `forwardRef` components take a `ref` to their DOM node instead of the `requestFocus` props\nconst forwardsRef = (component: unknown): boolean =>\n\ttypeof component === 'object' &&\n\tcomponent !== null &&\n\t(component as { $$typeof?: symbol }).$$typeof === FORWARD_REF_TYPE;\n\n/**\n * Wrapper for interactive elements in the table.\n *\n * The Advanced Data Table implements keyboard navigation as described in Data Tables.\n * This wrapper controls an element's focus and `tabIndex` behavior.\n *\n * The wrapped element must accept the props:\n * `onFocus`: Callback for when the element is focused.\n * `tabIndex`: This wrapper overrides the `tabIndex` prop and provides its own value.\n *\n * The wrapper focuses the element when it becomes the table's active element. A `forwardRef`\n * component (Button, Checkbox) is focused through its `ref`, which must point at the focusable\n * node. Any other component instead receives `requestFocus` (`true` when it should take focus)\n * and `onRequestFocus(node)`, which it calls with the node to focus. `onRequestFocus` passed to\n * the wrapper is called after the element is focused.\n */\nexport default function createInteractiveElement(\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tWrappedElement: ComponentType<any
|
|
1
|
+
{"version":3,"file":"interactive-element.js","names":[],"sources":["../../../../components/simple-data-table/interactive-element.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport { Component, ComponentType } from 'react';\nimport Mode from './private/mode';\nimport CellContext from './private/cell-context';\nimport TableContext, { TableContextValue } from './private/table-context';\nimport type { SimpleDataTableInteractiveElementOptions } from './types';\n\nimport generateId from '../../utilities/generate-id';\nimport { MENU_DROPDOWN } from '../../utilities/constants';\n\nconst FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\n\n// `forwardRef` components take a `ref` to their DOM node instead of the `requestFocus` props\nconst forwardsRef = (component: unknown): boolean =>\n\ttypeof component === 'object' &&\n\tcomponent !== null &&\n\t(component as { $$typeof?: symbol }).$$typeof === FORWARD_REF_TYPE;\n\n/**\n * Wrapper for interactive elements in the table.\n *\n * The Advanced Data Table implements keyboard navigation as described in Data Tables.\n * This wrapper controls an element's focus and `tabIndex` behavior.\n *\n * The wrapped element must accept the props:\n * `onFocus`: Callback for when the element is focused.\n * `tabIndex`: This wrapper overrides the `tabIndex` prop and provides its own value.\n *\n * The wrapper focuses the element when it becomes the table's active element. A `forwardRef`\n * component (Button, Checkbox) is focused through its `ref`, which must point at the focusable\n * node. Any other component instead receives `requestFocus` (`true` when it should take focus)\n * and `onRequestFocus(node)`, which it calls with the node to focus. `onRequestFocus` passed to\n * the wrapper is called after the element is focused.\n *\n * An element that opens a popover (MenuDropdown) also receives `onOpen` and `onClose`, which\n * turn table keyboard navigation off while it is open; `onOpen`/`onClose` passed to the wrapper\n * are still called. MenuDropdown gets them automatically. For your own popover component, pass\n * `{ tracksOpen: true }` and call `onOpen`/`onClose` when it opens and closes. Other elements\n * never receive them, so they don't reach the DOM.\n */\nexport default function createInteractiveElement(\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tWrappedElement: ComponentType<any>,\n\t{\n\t\ttracksOpen = WrappedElement.displayName === MENU_DROPDOWN,\n\t}: SimpleDataTableInteractiveElementOptions = {}\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n): any {\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tclass InteractiveElement extends Component<any> {\n\t\telementId: string;\n\n\t\tusesRef = forwardsRef(WrappedElement);\n\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\tconstructor(props: any) {\n\t\t\tsuper(props);\n\t\t\tthis.elementId = generateId();\n\t\t}\n\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\tonFocus(tableContext: TableContextValue, ...args: any[]) {\n\t\t\tif (tableContext.activeElement !== this.elementId) {\n\t\t\t\ttableContext.changeActiveElement(this.elementId);\n\t\t\t}\n\t\t\tif (this.props.onFocus) {\n\t\t\t\tthis.props.onFocus(...args);\n\t\t\t}\n\t\t}\n\n\t\tonRequestFocus(\n\t\t\ttableContext: TableContextValue,\n\t\t\tnode: HTMLElement,\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t...args: any[]\n\t\t) {\n\t\t\tif (tableContext.tableHasFocus) {\n\t\t\t\tnode.focus();\n\t\t\t\tif (this.props.onRequestFocus) {\n\t\t\t\t\tthis.props.onRequestFocus(...args);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// A new callback each render, so React calls it after every render, like the\n\t\t// `requestFocus` effect the wrapped components used to run.\n\t\tgetFocusRef(tableContext: TableContextValue, requestFocus: boolean) {\n\t\t\treturn (node: HTMLElement | null) => {\n\t\t\t\tif (node && requestFocus) {\n\t\t\t\t\tthis.onRequestFocus(tableContext, node);\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\tonOpen(tableContext: TableContextValue, ...args: any[]) {\n\t\t\ttableContext.setAllowKeyboardNavigation(false);\n\t\t\tif (this.props.onOpen) {\n\t\t\t\tthis.props.onOpen(...args);\n\t\t\t}\n\t\t}\n\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\tonClose(tableContext: TableContextValue, ...args: any[]) {\n\t\t\ttableContext.setAllowKeyboardNavigation(true);\n\t\t\tif (this.props.onClose) {\n\t\t\t\tthis.props.onClose(...args);\n\t\t\t}\n\t\t}\n\n\t\toverride render() {\n\t\t\tconst { onFocus, onRequestFocus, onOpen, onClose } = this;\n\t\t\treturn (\n\t\t\t\t<TableContext.Consumer>\n\t\t\t\t\t{(tableContext) => (\n\t\t\t\t\t\t<CellContext.Consumer>\n\t\t\t\t\t\t\t{(cellContext) => {\n\t\t\t\t\t\t\t\ttableContext.registerInteractiveElement(\n\t\t\t\t\t\t\t\t\tcellContext.rowIndex,\n\t\t\t\t\t\t\t\t\tcellContext.columnIndex,\n\t\t\t\t\t\t\t\t\tthis.elementId\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tconst requestFocus =\n\t\t\t\t\t\t\t\t\ttableContext.mode === Mode.ACTIONABLE &&\n\t\t\t\t\t\t\t\t\ttableContext.activeElement === this.elementId;\n\t\t\t\t\t\t\t\tconst tabIndex = tableContext.mode === Mode.ACTIONABLE ? 0 : -1;\n\t\t\t\t\t\t\t\tconst focusProps = this.usesRef\n\t\t\t\t\t\t\t\t\t? { ref: this.getFocusRef(tableContext, requestFocus) }\n\t\t\t\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\t\t\t\tonRequestFocus: onRequestFocus.bind(this, tableContext),\n\t\t\t\t\t\t\t\t\t\t\trequestFocus,\n\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\tconst keyboardNavProps = tableContext.allowKeyboardNavigation\n\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\tonFocus: onFocus.bind(this, tableContext),\n\t\t\t\t\t\t\t\t\t\t\t...focusProps,\n\t\t\t\t\t\t\t\t\t\t\ttabIndex,\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t: {};\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<WrappedElement\n\t\t\t\t\t\t\t\t\t\t{...{\n\t\t\t\t\t\t\t\t\t\t\t...this.props,\n\t\t\t\t\t\t\t\t\t\t\t...(tracksOpen\n\t\t\t\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonOpen: onOpen.bind(this, tableContext),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClose: onClose.bind(this, tableContext),\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t: {}),\n\t\t\t\t\t\t\t\t\t\t\t...keyboardNavProps,\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t</CellContext.Consumer>\n\t\t\t\t\t)}\n\t\t\t\t</TableContext.Consumer>\n\t\t\t);\n\t\t}\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t(InteractiveElement as any).displayName = `InteractiveElement${\n\t\tWrappedElement.displayName || 'Unknown'\n\t}`;\n\n\treturn InteractiveElement;\n}\n"],"mappings":";;;;;;;;AAYA,IAAM,IAAmB,OAAO,IAAI,mBAAmB,GAGjD,KAAe,MACpB,OAAO,KAAc,cACrB,KACC,EAAoC,aAAa;AAwBnD,SAAwB,EAEvB,GACA,EACC,gBAAa,EAAe,gBAAgB,MACC,CAAC,GAEzC;CAEN,MAAM,UAA2B,EAAe;EAC/C;EAEA,UAAU,EAAY,CAAc;EAGpC,YAAY,GAAY;GAEvB,AADA,MAAM,CAAK,GACX,KAAK,YAAY,EAAW;EAC7B;EAGA,QAAQ,GAAiC,GAAG,GAAa;GAIxD,AAHI,EAAa,kBAAkB,KAAK,aACvC,EAAa,oBAAoB,KAAK,SAAS,GAE5C,KAAK,MAAM,WACd,KAAK,MAAM,QAAQ,GAAG,CAAI;EAE5B;EAEA,eACC,GACA,GAEA,GAAG,GACF;GACD,AAAI,EAAa,kBAChB,EAAK,MAAM,GACP,KAAK,MAAM,kBACd,KAAK,MAAM,eAAe,GAAG,CAAI;EAGpC;EAIA,YAAY,GAAiC,GAAuB;GACnE,QAAQ,MAA6B;IACpC,AAAI,KAAQ,KACX,KAAK,eAAe,GAAc,CAAI;GAExC;EACD;EAGA,OAAO,GAAiC,GAAG,GAAa;GAEvD,AADA,EAAa,2BAA2B,EAAK,GACzC,KAAK,MAAM,UACd,KAAK,MAAM,OAAO,GAAG,CAAI;EAE3B;EAGA,QAAQ,GAAiC,GAAG,GAAa;GAExD,AADA,EAAa,2BAA2B,EAAI,GACxC,KAAK,MAAM,WACd,KAAK,MAAM,QAAQ,GAAG,CAAI;EAE5B;EAEA,SAAkB;GACjB,IAAM,EAAE,YAAS,mBAAgB,WAAQ,eAAY;GACrD,OACC,kBAAC,EAAa,UAAd,EAAA,WACG,MACD,kBAAC,EAAY,UAAb,EAAA,WACG,MAAgB;IACjB,EAAa,2BACZ,EAAY,UACZ,EAAY,aACZ,KAAK,SACN;IACA,IAAM,IACL,EAAa,SAAS,EAAK,cAC3B,EAAa,kBAAkB,KAAK,WAC/B,IAAW,EAAa,SAAS,EAAK,aAAa,IAAI,IACvD,IAAa,KAAK,UACrB,EAAE,KAAK,KAAK,YAAY,GAAc,CAAY,EAAE,IACpD;KACA,gBAAgB,EAAe,KAAK,MAAM,CAAY;KACtD;IACD,GACI,IAAmB,EAAa,0BACnC;KACA,SAAS,EAAQ,KAAK,MAAM,CAAY;KACxC,GAAG;KACH;IACD,IACC,CAAC;IACJ,OACC,kBAAC,GAAD;KAEE,GAAG,KAAK;KACR,GAAI,IACD;MACA,QAAQ,EAAO,KAAK,MAAM,CAAY;MACtC,SAAS,EAAQ,KAAK,MAAM,CAAY;KACzC,IACC,CAAC;KACJ,GAAG;IAEJ,CAAA;GAEH,EACqB,CAAA,EAED,CAAA;EAEzB;CACD;CAOA,OAJA,EAA4B,cAAc,qBACzC,EAAe,eAAe,aAGxB;AACR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell-context.js","names":[],"sources":["../../../../../components/simple-data-table/private/cell-context.tsx"],"sourcesContent":["import React from 'react';\n\nexport interface CellContextValue {\n\trowIndex: number;\n\tcolumnIndex: number;\n}\n\nconst CellContext = React.createContext<CellContextValue>({\n\trowIndex: 0,\n\tcolumnIndex: 0,\n});\n\nexport default CellContext;\n"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"cell-context.js","names":[],"sources":["../../../../../components/simple-data-table/private/cell-context.tsx"],"sourcesContent":["import React from 'react';\n\nexport interface CellContextValue {\n\trowIndex: number;\n\tcolumnIndex: number;\n\t/** Set on the table's corner cells so their backgrounds follow its radius */\n\tcornerStyle?: React.CSSProperties;\n}\n\nconst CellContext = React.createContext<CellContextValue>({\n\trowIndex: 0,\n\tcolumnIndex: 0,\n});\n\nexport default CellContext;\n"],"mappings":";;AASA,IAAM,IAAc,EAAM,cAAgC;CACzD,UAAU;CACV,aAAa;AACd,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region components/simple-data-table/private/corner-style.ts
|
|
2
|
+
var e = { borderRadius: "inherit" }, t = ({ isFirstRow: e, isLastRow: t, isFirstColumn: n, isLastColumn: r }) => {
|
|
3
|
+
let i = {};
|
|
4
|
+
return e && n && (i.borderStartStartRadius = "inherit"), e && r && (i.borderStartEndRadius = "inherit"), t && n && (i.borderEndStartRadius = "inherit"), t && r && (i.borderEndEndRadius = "inherit"), Object.keys(i).length > 0 ? i : void 0;
|
|
5
|
+
}, n = ({ isFirstRow: t, isLastRow: n }) => t || n ? e : void 0;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as getCornerRowStyle, t as getCornerStyle, e as inheritRadius };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=corner-style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"corner-style.js","names":[],"sources":["../../../../../components/simple-data-table/private/corner-style.ts"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport type React from 'react';\n\n/**\n * SLDS 2 draws `slds-table_bordered` as a rounded box, but the header cells and\n * selected or hovered body cells paint their own square backgrounds, which\n * poke out past the rounded corners. Clipping the table would also clip the\n * row action menus, so the four corner cells take the table's radius instead.\n *\n * `inherit` follows the theme: Cosmos rounds the table, Lightning Blue sets its\n * radius to 0. The value has to inherit through every level, so the row group\n * (`thead`/`tbody`) and the corner rows inherit it as well.\n */\nexport const inheritRadius: React.CSSProperties = { borderRadius: 'inherit' };\n\nexport interface CornerPosition {\n\tisFirstRow?: boolean;\n\tisLastRow?: boolean;\n\tisFirstColumn?: boolean;\n\tisLastColumn?: boolean;\n}\n\n/** The radius style for a cell, or `undefined` when it is not a corner. */\nexport const getCornerStyle = ({\n\tisFirstRow,\n\tisLastRow,\n\tisFirstColumn,\n\tisLastColumn,\n}: CornerPosition): React.CSSProperties | undefined => {\n\tconst style: React.CSSProperties = {};\n\n\tif (isFirstRow && isFirstColumn) style.borderStartStartRadius = 'inherit';\n\tif (isFirstRow && isLastColumn) style.borderStartEndRadius = 'inherit';\n\tif (isLastRow && isFirstColumn) style.borderEndStartRadius = 'inherit';\n\tif (isLastRow && isLastColumn) style.borderEndEndRadius = 'inherit';\n\n\treturn Object.keys(style).length > 0 ? style : undefined;\n};\n\n/** The style for a row that holds corner cells, so the radius reaches them. */\nexport const getCornerRowStyle = ({\n\tisFirstRow,\n\tisLastRow,\n}: CornerPosition): React.CSSProperties | undefined =>\n\tisFirstRow || isLastRow ? inheritRadius : undefined;\n"],"mappings":";AAeA,IAAa,IAAqC,EAAE,cAAc,UAAU,GAU/D,KAAkB,EAC9B,eACA,cACA,kBACA,sBACsD;CACtD,IAAM,IAA6B,CAAC;CAOpC,OALI,KAAc,MAAe,EAAM,yBAAyB,YAC5D,KAAc,MAAc,EAAM,uBAAuB,YACzD,KAAa,MAAe,EAAM,uBAAuB,YACzD,KAAa,MAAc,EAAM,qBAAqB,YAEnD,OAAO,KAAK,CAAK,CAAC,CAAC,SAAS,IAAI,IAAQ,KAAA;AAChD,GAGa,KAAqB,EACjC,eACA,mBAEA,KAAc,IAAY,IAAgB,KAAA"}
|
|
@@ -6,65 +6,67 @@ import i from "./context-helper.js";
|
|
|
6
6
|
import a from "./cell-fixed.js";
|
|
7
7
|
import o from "../interactive-element.js";
|
|
8
8
|
import s from "./header-cell.js";
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import
|
|
9
|
+
import { getCornerRowStyle as c, getCornerStyle as l, inheritRadius as u } from "./corner-style.js";
|
|
10
|
+
import { useContext as d } from "react";
|
|
11
|
+
import f from "classnames";
|
|
12
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
12
13
|
//#region components/simple-data-table/private/head.tsx
|
|
13
|
-
var
|
|
14
|
-
let t =
|
|
14
|
+
var h = o(t), g = (e) => {
|
|
15
|
+
let t = d(r), n = {
|
|
15
16
|
columnIndex: e.columnIndex,
|
|
16
17
|
rowIndex: 0
|
|
17
|
-
}, { tabIndex: o, hasFocus: s, handleFocus:
|
|
18
|
+
}, { tabIndex: o, hasFocus: s, handleFocus: c, handleKeyDown: l } = i(t, n, e.fixedLayout), { fixedHeader: u } = e, h = (t) => /* @__PURE__ */ p("div", {
|
|
18
19
|
className: "slds-th__action",
|
|
19
20
|
style: t,
|
|
20
|
-
children: /* @__PURE__ */
|
|
21
|
+
children: /* @__PURE__ */ p("span", {
|
|
21
22
|
className: "slds-assistive-text",
|
|
22
23
|
children: e.assistiveText
|
|
23
24
|
})
|
|
24
25
|
});
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
className:
|
|
26
|
+
return /* @__PURE__ */ m("th", {
|
|
27
|
+
className: f({ "slds-has-focus": s }),
|
|
27
28
|
ref: (t) => {
|
|
28
29
|
e.headerRefs && e.headerRefs(t, "action"), t && s && t.focus();
|
|
29
30
|
},
|
|
30
31
|
scope: "col",
|
|
31
32
|
style: {
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
...e.cornerStyle,
|
|
34
|
+
height: u ? 0 : void 0,
|
|
35
|
+
lineHeight: u ? 0 : void 0,
|
|
34
36
|
width: "3.25rem"
|
|
35
37
|
},
|
|
36
|
-
onFocus:
|
|
37
|
-
onKeyDown:
|
|
38
|
+
onFocus: c,
|
|
39
|
+
onKeyDown: l,
|
|
38
40
|
tabIndex: o,
|
|
39
|
-
children: [h(
|
|
41
|
+
children: [h(u ? {
|
|
40
42
|
height: 0,
|
|
41
43
|
overflow: "hidden",
|
|
42
44
|
paddingBottom: 0,
|
|
43
45
|
paddingTop: 0,
|
|
44
46
|
visibility: "hidden"
|
|
45
|
-
} : void 0),
|
|
47
|
+
} : void 0), u ? /* @__PURE__ */ p(a, { children: h({
|
|
46
48
|
lineHeight: 1,
|
|
47
49
|
width: "100%"
|
|
48
50
|
}) }) : null]
|
|
49
51
|
});
|
|
50
|
-
},
|
|
51
|
-
let t =
|
|
52
|
+
}, _ = (e) => {
|
|
53
|
+
let t = d(r), o = {
|
|
52
54
|
columnIndex: 0,
|
|
53
55
|
rowIndex: 0
|
|
54
|
-
}, { tabIndex: s, hasFocus:
|
|
56
|
+
}, { tabIndex: s, hasFocus: c, handleFocus: l, handleKeyDown: u } = i(t, o, e.fixedLayout), { fixedHeader: g, canSelectRows: _ } = e, v = (t, n, r) => _ === "radio" ? r ? null : /* @__PURE__ */ p("div", {
|
|
55
57
|
className: "slds-truncate slds-assistive-text",
|
|
56
58
|
id: `${e.id}-column-group-header-row-select`,
|
|
57
59
|
title: e.assistiveText?.selectRowGroup,
|
|
58
60
|
children: e.assistiveText?.selectRowGroup
|
|
59
|
-
}) : _ === !0 || _ === "checkbox" ? /* @__PURE__ */
|
|
61
|
+
}) : _ === !0 || _ === "checkbox" ? /* @__PURE__ */ m("div", {
|
|
60
62
|
className: "slds-th__action slds-th__action_form",
|
|
61
63
|
"aria-hidden": r ? !0 : void 0,
|
|
62
64
|
style: n,
|
|
63
|
-
children: [r ? null : /* @__PURE__ */
|
|
65
|
+
children: [r ? null : /* @__PURE__ */ p("span", {
|
|
64
66
|
id: `${e.id}-column-group-header-row-select`,
|
|
65
67
|
className: "slds-assistive-text",
|
|
66
68
|
children: e.assistiveText?.selectAllRows
|
|
67
|
-
}), /* @__PURE__ */
|
|
69
|
+
}), /* @__PURE__ */ p(h, {
|
|
68
70
|
assistiveText: { label: e.assistiveText?.selectAllRows },
|
|
69
71
|
checked: !!e.allSelected,
|
|
70
72
|
indeterminate: e.indeterminateSelected,
|
|
@@ -73,21 +75,22 @@ var f = o(t), p = (e) => {
|
|
|
73
75
|
onChange: e.onToggleAll
|
|
74
76
|
})]
|
|
75
77
|
}) : null;
|
|
76
|
-
return /* @__PURE__ */
|
|
77
|
-
className:
|
|
78
|
+
return /* @__PURE__ */ p("th", {
|
|
79
|
+
className: f("slds-text-align_right", { "slds-has-focus": c }),
|
|
78
80
|
ref: (t) => {
|
|
79
|
-
e.headerRefs && e.headerRefs(t, "select"), t &&
|
|
81
|
+
e.headerRefs && e.headerRefs(t, "select"), t && c && t.focus();
|
|
80
82
|
},
|
|
81
83
|
scope: "col",
|
|
82
84
|
style: {
|
|
85
|
+
...e.cornerStyle,
|
|
83
86
|
height: g ? 0 : void 0,
|
|
84
87
|
lineHeight: g ? 0 : void 0,
|
|
85
88
|
width: "3.25rem"
|
|
86
89
|
},
|
|
87
|
-
onFocus:
|
|
88
|
-
onKeyDown:
|
|
90
|
+
onFocus: l,
|
|
91
|
+
onKeyDown: u,
|
|
89
92
|
tabIndex: s,
|
|
90
|
-
children: /* @__PURE__ */
|
|
93
|
+
children: /* @__PURE__ */ m(n.Provider, {
|
|
91
94
|
value: o,
|
|
92
95
|
children: [v("SelectAll-fixed-header", g ? {
|
|
93
96
|
display: "flex",
|
|
@@ -96,7 +99,7 @@ var f = o(t), p = (e) => {
|
|
|
96
99
|
paddingBottom: 0,
|
|
97
100
|
paddingTop: 0,
|
|
98
101
|
visibility: "hidden"
|
|
99
|
-
} : void 0, g), g ? /* @__PURE__ */
|
|
102
|
+
} : void 0, g), g ? /* @__PURE__ */ p(a, { children: v("SelectAll", {
|
|
100
103
|
display: "flex",
|
|
101
104
|
justifyContent: "flex-end",
|
|
102
105
|
lineHeight: 1,
|
|
@@ -104,39 +107,59 @@ var f = o(t), p = (e) => {
|
|
|
104
107
|
}) }) : null]
|
|
105
108
|
})
|
|
106
109
|
});
|
|
107
|
-
},
|
|
108
|
-
let t =
|
|
110
|
+
}, v = (e) => {
|
|
111
|
+
let t = {
|
|
112
|
+
isFirstRow: !e.isHidden,
|
|
113
|
+
isLastRow: e.isOnlyRow
|
|
114
|
+
}, r = e.columns?.length ?? 0, i = (n) => l({
|
|
115
|
+
...t,
|
|
116
|
+
isFirstColumn: n === 0 && !e.canSelectRows,
|
|
117
|
+
isLastColumn: n === r - 1 && !e.showRowActions
|
|
118
|
+
}), a = () => e.showRowActions ? /* @__PURE__ */ p(g, {
|
|
109
119
|
assistiveText: e.assistiveText?.actionsHeader,
|
|
110
120
|
columnIndex: e.canSelectRows ? (e.columns?.length ?? 0) + 1 : e.columns?.length ?? 0,
|
|
121
|
+
cornerStyle: l({
|
|
122
|
+
...t,
|
|
123
|
+
isFirstColumn: r === 0 && !e.canSelectRows,
|
|
124
|
+
isLastColumn: !0
|
|
125
|
+
}),
|
|
111
126
|
fixedLayout: e.fixedLayout,
|
|
112
127
|
fixedHeader: e.fixedHeader,
|
|
113
128
|
headerRefs: e.headerRefs
|
|
114
|
-
}) : null,
|
|
129
|
+
}) : null, o = () => e.canSelectRows ? /* @__PURE__ */ p(_, {
|
|
115
130
|
allSelected: e.allSelected,
|
|
116
131
|
assistiveText: {
|
|
117
132
|
selectAllRows: e.assistiveText?.selectAllRows,
|
|
118
133
|
selectRowGroup: e.assistiveText?.selectRowGroup
|
|
119
134
|
},
|
|
120
135
|
canSelectRows: e.canSelectRows,
|
|
136
|
+
cornerStyle: l({
|
|
137
|
+
...t,
|
|
138
|
+
isFirstColumn: !0,
|
|
139
|
+
isLastColumn: r === 0 && !e.showRowActions
|
|
140
|
+
}),
|
|
121
141
|
fixedHeader: e.fixedHeader,
|
|
122
142
|
fixedLayout: e.fixedLayout,
|
|
123
143
|
headerRefs: e.headerRefs,
|
|
124
144
|
id: e.id,
|
|
125
145
|
indeterminateSelected: e.indeterminateSelected,
|
|
126
146
|
onToggleAll: e.onToggleAll
|
|
127
|
-
}) : null,
|
|
128
|
-
return /* @__PURE__ */
|
|
129
|
-
className:
|
|
130
|
-
|
|
147
|
+
}) : null, d = a(), h = o();
|
|
148
|
+
return /* @__PURE__ */ p("thead", {
|
|
149
|
+
className: f({ "slds-assistive-text": e.isHidden }),
|
|
150
|
+
style: e.isHidden ? void 0 : u,
|
|
151
|
+
children: /* @__PURE__ */ m("tr", {
|
|
131
152
|
className: "slds-line-height_reset",
|
|
153
|
+
style: c(t),
|
|
132
154
|
children: [
|
|
133
|
-
|
|
134
|
-
e.columns?.map((t, r) => /* @__PURE__ */
|
|
155
|
+
h,
|
|
156
|
+
e.columns?.map((t, r) => /* @__PURE__ */ p(n.Provider, {
|
|
135
157
|
value: {
|
|
136
158
|
columnIndex: e.canSelectRows ? r + 1 : r,
|
|
137
|
-
rowIndex: 0
|
|
159
|
+
rowIndex: 0,
|
|
160
|
+
cornerStyle: i(r)
|
|
138
161
|
},
|
|
139
|
-
children: /* @__PURE__ */
|
|
162
|
+
children: /* @__PURE__ */ p(s, {
|
|
140
163
|
assistiveText: e.assistiveText,
|
|
141
164
|
cellRef: (t) => {
|
|
142
165
|
e.headerRefs && e.headerRefs(t, r);
|
|
@@ -148,13 +171,13 @@ var f = o(t), p = (e) => {
|
|
|
148
171
|
...t.props
|
|
149
172
|
})
|
|
150
173
|
}, `${e.id}-${t.props.property}`)),
|
|
151
|
-
|
|
174
|
+
d
|
|
152
175
|
]
|
|
153
176
|
})
|
|
154
177
|
});
|
|
155
178
|
};
|
|
156
|
-
|
|
179
|
+
v.displayName = e;
|
|
157
180
|
//#endregion
|
|
158
|
-
export {
|
|
181
|
+
export { v as default };
|
|
159
182
|
|
|
160
183
|
//# sourceMappingURL=head.js.map
|