@salesforce/design-system-react 11.0.0-alpha.2 → 11.0.0-alpha.4
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/dist/cjs/components/combobox/combobox.cjs +1 -1
- package/dist/cjs/components/combobox/combobox.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 +1 -1
- package/dist/cjs/components/date-picker/index.cjs.map +1 -1
- package/dist/cjs/components/illustration/check-props.cjs +2 -0
- package/dist/cjs/components/illustration/check-props.cjs.map +1 -0
- package/dist/cjs/components/illustration/index.cjs +1 -1
- package/dist/cjs/components/illustration/index.cjs.map +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/components/modal/trigger.cjs +1 -1
- package/dist/cjs/components/page-header/index.cjs.map +1 -1
- package/dist/cjs/components/pill/index.cjs +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/pill-container/private/selected-listbox.cjs +1 -1
- package/dist/cjs/components/pill-container/private/selected-listbox.cjs.map +1 -1
- package/dist/cjs/components/{data-table → simple-data-table}/cell.cjs +1 -1
- package/dist/cjs/components/simple-data-table/cell.cjs.map +1 -0
- package/dist/cjs/components/{data-table → simple-data-table}/check-props.cjs +1 -1
- package/dist/cjs/components/simple-data-table/check-props.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/column-check-props.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/column.cjs +2 -0
- package/dist/cjs/components/simple-data-table/column.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/component.cjs +2 -0
- package/dist/cjs/components/simple-data-table/component.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/highlight-cell.cjs +2 -0
- package/dist/cjs/components/simple-data-table/highlight-cell.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/index.cjs +2 -0
- package/dist/cjs/components/simple-data-table/index.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/interactive-element.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/interactive-link.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/private/cell-context.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/private/cell-fixed.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/private/context-helper.cjs.map +1 -0
- package/dist/cjs/components/{data-table → simple-data-table}/private/head.cjs +1 -1
- package/dist/cjs/components/simple-data-table/private/head.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/private/header-cell.cjs +2 -0
- package/dist/cjs/components/simple-data-table/private/header-cell.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/private/link.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/private/mode.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/private/row.cjs +2 -0
- package/dist/cjs/components/simple-data-table/private/row.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/private/table-context.cjs.map +1 -0
- package/dist/cjs/components/{data-table → simple-data-table}/row-actions.cjs +1 -1
- package/dist/cjs/components/simple-data-table/row-actions.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table.cjs +1 -0
- package/dist/cjs/components/tree/private/item.cjs +1 -1
- package/dist/cjs/components/tree/private/render-branch.cjs +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/utilities/constants.cjs +1 -1
- package/dist/cjs/utilities/constants.cjs.map +1 -1
- package/dist/es/components/combobox/combobox.js +131 -117
- package/dist/es/components/combobox/combobox.js.map +1 -1
- package/dist/es/components/date-picker/date-picker.js +150 -145
- package/dist/es/components/date-picker/date-picker.js.map +1 -1
- package/dist/es/components/date-picker/index.js +6 -18
- package/dist/es/components/date-picker/index.js.map +1 -1
- package/dist/es/components/illustration/check-props.js +11 -0
- package/dist/es/components/illustration/check-props.js.map +1 -0
- package/dist/es/components/illustration/index.js +37 -25
- package/dist/es/components/illustration/index.js.map +1 -1
- package/dist/es/components/index.js +95 -121
- package/dist/es/components/modal/trigger.js +4 -4
- package/dist/es/components/page-header/index.js.map +1 -1
- package/dist/es/components/pill/index.js +32 -30
- package/dist/es/components/pill/index.js.map +1 -1
- package/dist/es/components/pill-container/index.js +1 -0
- package/dist/es/components/pill-container/index.js.map +1 -1
- package/dist/es/components/pill-container/private/selected-listbox.js +3 -1
- package/dist/es/components/pill-container/private/selected-listbox.js.map +1 -1
- package/dist/es/components/{data-table → simple-data-table}/cell.js +2 -2
- package/dist/es/components/simple-data-table/cell.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/check-props.js +2 -2
- package/dist/es/components/simple-data-table/check-props.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/column-check-props.js +1 -1
- package/dist/es/components/simple-data-table/column-check-props.js.map +1 -0
- package/dist/es/components/simple-data-table/column.js +8 -0
- package/dist/es/components/simple-data-table/column.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/component.js +6 -10
- package/dist/es/components/simple-data-table/component.js.map +1 -0
- package/dist/es/components/simple-data-table/highlight-cell.js +18 -0
- package/dist/es/components/simple-data-table/highlight-cell.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/index.js +78 -183
- package/dist/es/components/simple-data-table/index.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/interactive-element.js +1 -1
- package/dist/es/components/simple-data-table/interactive-element.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/interactive-link.js +1 -1
- package/dist/es/components/simple-data-table/interactive-link.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/private/cell-context.js +1 -1
- package/dist/es/components/simple-data-table/private/cell-context.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/private/cell-fixed.js +1 -1
- package/dist/es/components/simple-data-table/private/cell-fixed.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/private/context-helper.js +1 -1
- package/dist/es/components/simple-data-table/private/context-helper.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/private/head.js +2 -2
- package/dist/es/components/simple-data-table/private/head.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/private/header-cell.js +2 -2
- package/dist/es/components/simple-data-table/private/header-cell.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/private/link.js +1 -1
- package/dist/es/components/simple-data-table/private/link.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/private/mode.js +1 -1
- package/dist/es/components/simple-data-table/private/mode.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/private/row.js +6 -6
- package/dist/es/components/simple-data-table/private/row.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/private/table-context.js +1 -1
- package/dist/es/components/simple-data-table/private/table-context.js.map +1 -0
- package/dist/es/components/{data-table → simple-data-table}/row-actions.js +2 -2
- package/dist/es/components/simple-data-table/row-actions.js.map +1 -0
- package/dist/es/components/simple-data-table.js +2 -0
- package/dist/es/components/tree/private/item.js +4 -4
- package/dist/es/components/tree/private/render-branch.js +9 -9
- package/dist/es/components/utilities/dialog/index.js +2 -2
- package/dist/es/components/utilities/dialog/index.js.map +1 -1
- package/dist/es/utilities/constants.js +2 -2
- package/dist/es/utilities/constants.js.map +1 -1
- package/dist/types/components/combobox/combobox.d.ts.map +1 -1
- package/dist/types/components/date-picker/date-picker.d.ts.map +1 -1
- package/dist/types/components/date-picker/index.d.ts +6 -2
- package/dist/types/components/date-picker/index.d.ts.map +1 -1
- package/dist/types/components/illustration/index.d.ts.map +1 -1
- package/dist/types/components/index.d.ts +14 -66
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/components/page-header/index.d.ts +1 -1
- package/dist/types/components/page-header/index.d.ts.map +1 -1
- package/dist/types/components/pill/index.d.ts +4 -0
- package/dist/types/components/pill/index.d.ts.map +1 -1
- package/dist/types/components/pill-container/index.d.ts.map +1 -1
- package/dist/types/components/pill-container/private/selected-listbox.d.ts +7 -1
- package/dist/types/components/pill-container/private/selected-listbox.d.ts.map +1 -1
- package/dist/types/components/{data-table → simple-data-table}/cell.d.ts +5 -5
- package/dist/types/components/simple-data-table/cell.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/check-props.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/column-check-props.d.ts.map +1 -0
- package/dist/types/components/{data-table → simple-data-table}/column.d.ts +6 -6
- package/dist/types/components/simple-data-table/column.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/highlight-cell.d.ts +14 -0
- package/dist/types/components/simple-data-table/highlight-cell.d.ts.map +1 -0
- package/dist/types/components/{data-table → simple-data-table}/index.d.ts +13 -40
- package/dist/types/components/simple-data-table/index.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/interactive-element.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/interactive-link.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/private/cell-context.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/private/cell-fixed.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/private/context-helper.d.ts.map +1 -0
- package/dist/types/components/{data-table → simple-data-table}/private/head.d.ts +6 -6
- package/dist/types/components/simple-data-table/private/head.d.ts.map +1 -0
- package/dist/types/components/{data-table → simple-data-table}/private/header-cell.d.ts +3 -3
- package/dist/types/components/simple-data-table/private/header-cell.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/private/link.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/private/mode.d.ts.map +1 -0
- package/dist/types/components/{data-table → simple-data-table}/private/row.d.ts +11 -11
- package/dist/types/components/simple-data-table/private/row.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/private/table-context.d.ts.map +1 -0
- package/dist/types/components/{data-table → simple-data-table}/row-actions.d.ts +5 -5
- package/dist/types/components/simple-data-table/row-actions.d.ts.map +1 -0
- package/dist/types/components/simple-data-table/simple-data-table.d.ts +15 -0
- package/dist/types/components/simple-data-table/simple-data-table.d.ts.map +1 -0
- package/dist/types/components/{data-table → simple-data-table}/types.d.ts +56 -71
- package/dist/types/components/simple-data-table/types.d.ts.map +1 -0
- package/dist/types/components/simple-data-table.d.ts +2 -0
- package/dist/types/utilities/constants.d.ts +7 -7
- package/dist/types/utilities/constants.d.ts.map +1 -1
- package/package.json +6 -2
- package/dist/cjs/components/app-launcher/check-props.cjs +0 -2
- package/dist/cjs/components/app-launcher/check-props.cjs.map +0 -1
- package/dist/cjs/components/app-launcher/component.cjs +0 -2
- package/dist/cjs/components/app-launcher/component.cjs.map +0 -1
- package/dist/cjs/components/app-launcher/expandable-section.cjs +0 -2
- package/dist/cjs/components/app-launcher/expandable-section.cjs.map +0 -1
- package/dist/cjs/components/app-launcher/index.cjs +0 -2
- package/dist/cjs/components/app-launcher/index.cjs.map +0 -1
- package/dist/cjs/components/app-launcher/link.cjs +0 -2
- package/dist/cjs/components/app-launcher/link.cjs.map +0 -1
- package/dist/cjs/components/app-launcher/tile.cjs +0 -2
- package/dist/cjs/components/app-launcher/tile.cjs.map +0 -1
- package/dist/cjs/components/app-launcher.cjs +0 -1
- package/dist/cjs/components/brand-band/index.cjs +0 -2
- package/dist/cjs/components/brand-band/index.cjs.map +0 -1
- package/dist/cjs/components/brand-band.cjs +0 -1
- package/dist/cjs/components/data-table/cell.cjs.map +0 -1
- package/dist/cjs/components/data-table/check-props.cjs.map +0 -1
- package/dist/cjs/components/data-table/column-check-props.cjs.map +0 -1
- package/dist/cjs/components/data-table/column.cjs +0 -2
- package/dist/cjs/components/data-table/column.cjs.map +0 -1
- package/dist/cjs/components/data-table/component.cjs +0 -2
- package/dist/cjs/components/data-table/component.cjs.map +0 -1
- package/dist/cjs/components/data-table/highlight-cell.cjs +0 -2
- package/dist/cjs/components/data-table/highlight-cell.cjs.map +0 -1
- package/dist/cjs/components/data-table/index.cjs +0 -2
- package/dist/cjs/components/data-table/index.cjs.map +0 -1
- package/dist/cjs/components/data-table/interactive-element.cjs.map +0 -1
- package/dist/cjs/components/data-table/interactive-link.cjs.map +0 -1
- package/dist/cjs/components/data-table/private/cell-context.cjs.map +0 -1
- package/dist/cjs/components/data-table/private/cell-fixed.cjs.map +0 -1
- package/dist/cjs/components/data-table/private/context-helper.cjs.map +0 -1
- package/dist/cjs/components/data-table/private/head.cjs.map +0 -1
- package/dist/cjs/components/data-table/private/header-cell.cjs +0 -2
- package/dist/cjs/components/data-table/private/header-cell.cjs.map +0 -1
- package/dist/cjs/components/data-table/private/link.cjs.map +0 -1
- package/dist/cjs/components/data-table/private/mode.cjs.map +0 -1
- package/dist/cjs/components/data-table/private/row.cjs +0 -2
- package/dist/cjs/components/data-table/private/row.cjs.map +0 -1
- package/dist/cjs/components/data-table/private/table-context.cjs.map +0 -1
- package/dist/cjs/components/data-table/row-actions.cjs.map +0 -1
- package/dist/cjs/components/data-table.cjs +0 -1
- package/dist/cjs/components/expression/condition.cjs +0 -2
- package/dist/cjs/components/expression/condition.cjs.map +0 -1
- package/dist/cjs/components/expression/formula.cjs +0 -2
- package/dist/cjs/components/expression/formula.cjs.map +0 -1
- package/dist/cjs/components/expression/group.cjs +0 -2
- package/dist/cjs/components/expression/group.cjs.map +0 -1
- package/dist/cjs/components/expression/index.cjs +0 -2
- package/dist/cjs/components/expression/index.cjs.map +0 -1
- package/dist/cjs/components/expression.cjs +0 -1
- package/dist/cjs/components/global-header/button.cjs +0 -2
- package/dist/cjs/components/global-header/button.cjs.map +0 -1
- package/dist/cjs/components/global-header/check-props.cjs +0 -2
- package/dist/cjs/components/global-header/check-props.cjs.map +0 -1
- package/dist/cjs/components/global-header/dropdown.cjs +0 -2
- package/dist/cjs/components/global-header/dropdown.cjs.map +0 -1
- package/dist/cjs/components/global-header/favorites.cjs +0 -2
- package/dist/cjs/components/global-header/favorites.cjs.map +0 -1
- package/dist/cjs/components/global-header/help.cjs +0 -2
- package/dist/cjs/components/global-header/help.cjs.map +0 -1
- package/dist/cjs/components/global-header/index.cjs +0 -2
- package/dist/cjs/components/global-header/index.cjs.map +0 -1
- package/dist/cjs/components/global-header/notifications.cjs +0 -2
- package/dist/cjs/components/global-header/notifications.cjs.map +0 -1
- package/dist/cjs/components/global-header/private/dropdown-trigger.cjs +0 -2
- package/dist/cjs/components/global-header/private/dropdown-trigger.cjs.map +0 -1
- package/dist/cjs/components/global-header/profile.cjs +0 -2
- package/dist/cjs/components/global-header/profile.cjs.map +0 -1
- package/dist/cjs/components/global-header/search.cjs +0 -2
- package/dist/cjs/components/global-header/search.cjs.map +0 -1
- package/dist/cjs/components/global-header/setup.cjs +0 -2
- package/dist/cjs/components/global-header/setup.cjs.map +0 -1
- package/dist/cjs/components/global-header/task.cjs +0 -2
- package/dist/cjs/components/global-header/task.cjs.map +0 -1
- package/dist/cjs/components/global-header.cjs +0 -1
- package/dist/cjs/components/global-navigation-bar/button.cjs +0 -2
- package/dist/cjs/components/global-navigation-bar/button.cjs.map +0 -1
- package/dist/cjs/components/global-navigation-bar/check-props.cjs +0 -2
- package/dist/cjs/components/global-navigation-bar/check-props.cjs.map +0 -1
- package/dist/cjs/components/global-navigation-bar/component.cjs +0 -2
- package/dist/cjs/components/global-navigation-bar/component.cjs.map +0 -1
- package/dist/cjs/components/global-navigation-bar/dropdown-trigger.cjs +0 -2
- package/dist/cjs/components/global-navigation-bar/dropdown-trigger.cjs.map +0 -1
- package/dist/cjs/components/global-navigation-bar/dropdown.cjs +0 -2
- package/dist/cjs/components/global-navigation-bar/dropdown.cjs.map +0 -1
- package/dist/cjs/components/global-navigation-bar/index.cjs +0 -2
- package/dist/cjs/components/global-navigation-bar/index.cjs.map +0 -1
- package/dist/cjs/components/global-navigation-bar/label.cjs +0 -2
- package/dist/cjs/components/global-navigation-bar/label.cjs.map +0 -1
- package/dist/cjs/components/global-navigation-bar/link.cjs +0 -2
- package/dist/cjs/components/global-navigation-bar/link.cjs.map +0 -1
- package/dist/cjs/components/global-navigation-bar/region.cjs +0 -2
- package/dist/cjs/components/global-navigation-bar/region.cjs.map +0 -1
- package/dist/cjs/components/global-navigation-bar.cjs +0 -1
- package/dist/cjs/components/location-map/index.cjs +0 -2
- package/dist/cjs/components/location-map/index.cjs.map +0 -1
- package/dist/cjs/components/location-map.cjs +0 -1
- package/dist/cjs/components/utilities/truncate/index.cjs +0 -2
- package/dist/cjs/components/utilities/truncate/index.cjs.map +0 -1
- package/dist/cjs/components/utilities/truncate.cjs +0 -1
- package/dist/cjs/utilities/warning/one-of-component.cjs +0 -2
- package/dist/cjs/utilities/warning/one-of-component.cjs.map +0 -1
- package/dist/es/components/app-launcher/check-props.js +0 -17
- package/dist/es/components/app-launcher/check-props.js.map +0 -1
- package/dist/es/components/app-launcher/component.js +0 -31
- package/dist/es/components/app-launcher/component.js.map +0 -1
- package/dist/es/components/app-launcher/expandable-section.js +0 -42
- package/dist/es/components/app-launcher/expandable-section.js.map +0 -1
- package/dist/es/components/app-launcher/index.js +0 -96
- package/dist/es/components/app-launcher/index.js.map +0 -1
- package/dist/es/components/app-launcher/link.js +0 -29
- package/dist/es/components/app-launcher/link.js.map +0 -1
- package/dist/es/components/app-launcher/tile.js +0 -101
- package/dist/es/components/app-launcher/tile.js.map +0 -1
- package/dist/es/components/app-launcher.js +0 -2
- package/dist/es/components/brand-band/index.js +0 -27
- package/dist/es/components/brand-band/index.js.map +0 -1
- package/dist/es/components/brand-band.js +0 -2
- package/dist/es/components/data-table/cell.js.map +0 -1
- package/dist/es/components/data-table/check-props.js.map +0 -1
- package/dist/es/components/data-table/column-check-props.js.map +0 -1
- package/dist/es/components/data-table/column.js +0 -8
- package/dist/es/components/data-table/column.js.map +0 -1
- package/dist/es/components/data-table/component.js.map +0 -1
- package/dist/es/components/data-table/highlight-cell.js +0 -18
- package/dist/es/components/data-table/highlight-cell.js.map +0 -1
- package/dist/es/components/data-table/index.js.map +0 -1
- package/dist/es/components/data-table/interactive-element.js.map +0 -1
- package/dist/es/components/data-table/interactive-link.js.map +0 -1
- package/dist/es/components/data-table/private/cell-context.js.map +0 -1
- package/dist/es/components/data-table/private/cell-fixed.js.map +0 -1
- package/dist/es/components/data-table/private/context-helper.js.map +0 -1
- package/dist/es/components/data-table/private/head.js.map +0 -1
- package/dist/es/components/data-table/private/header-cell.js.map +0 -1
- package/dist/es/components/data-table/private/link.js.map +0 -1
- package/dist/es/components/data-table/private/mode.js.map +0 -1
- package/dist/es/components/data-table/private/row.js.map +0 -1
- package/dist/es/components/data-table/private/table-context.js.map +0 -1
- package/dist/es/components/data-table/row-actions.js.map +0 -1
- package/dist/es/components/data-table.js +0 -2
- package/dist/es/components/expression/condition.js +0 -124
- package/dist/es/components/expression/condition.js.map +0 -1
- package/dist/es/components/expression/formula.js +0 -105
- package/dist/es/components/expression/formula.js.map +0 -1
- package/dist/es/components/expression/group.js +0 -153
- package/dist/es/components/expression/group.js.map +0 -1
- package/dist/es/components/expression/index.js +0 -33
- package/dist/es/components/expression/index.js.map +0 -1
- package/dist/es/components/expression.js +0 -2
- package/dist/es/components/global-header/button.js +0 -19
- package/dist/es/components/global-header/button.js.map +0 -1
- package/dist/es/components/global-header/check-props.js +0 -20
- package/dist/es/components/global-header/check-props.js.map +0 -1
- package/dist/es/components/global-header/dropdown.js +0 -33
- package/dist/es/components/global-header/dropdown.js.map +0 -1
- package/dist/es/components/global-header/favorites.js +0 -74
- package/dist/es/components/global-header/favorites.js.map +0 -1
- package/dist/es/components/global-header/help.js +0 -39
- package/dist/es/components/global-header/help.js.map +0 -1
- package/dist/es/components/global-header/index.js +0 -90
- package/dist/es/components/global-header/index.js.map +0 -1
- package/dist/es/components/global-header/notifications.js +0 -51
- package/dist/es/components/global-header/notifications.js.map +0 -1
- package/dist/es/components/global-header/private/dropdown-trigger.js +0 -50
- package/dist/es/components/global-header/private/dropdown-trigger.js.map +0 -1
- package/dist/es/components/global-header/profile.js +0 -47
- package/dist/es/components/global-header/profile.js.map +0 -1
- package/dist/es/components/global-header/search.js +0 -12
- package/dist/es/components/global-header/search.js.map +0 -1
- package/dist/es/components/global-header/setup.js +0 -39
- package/dist/es/components/global-header/setup.js.map +0 -1
- package/dist/es/components/global-header/task.js +0 -38
- package/dist/es/components/global-header/task.js.map +0 -1
- package/dist/es/components/global-header.js +0 -2
- package/dist/es/components/global-navigation-bar/button.js +0 -22
- package/dist/es/components/global-navigation-bar/button.js.map +0 -1
- package/dist/es/components/global-navigation-bar/check-props.js +0 -13
- package/dist/es/components/global-navigation-bar/check-props.js.map +0 -1
- package/dist/es/components/global-navigation-bar/component.js +0 -43
- package/dist/es/components/global-navigation-bar/component.js.map +0 -1
- package/dist/es/components/global-navigation-bar/dropdown-trigger.js +0 -66
- package/dist/es/components/global-navigation-bar/dropdown-trigger.js.map +0 -1
- package/dist/es/components/global-navigation-bar/dropdown.js +0 -34
- package/dist/es/components/global-navigation-bar/dropdown.js.map +0 -1
- package/dist/es/components/global-navigation-bar/index.js +0 -27
- package/dist/es/components/global-navigation-bar/index.js.map +0 -1
- package/dist/es/components/global-navigation-bar/label.js +0 -25
- package/dist/es/components/global-navigation-bar/label.js.map +0 -1
- package/dist/es/components/global-navigation-bar/link.js +0 -50
- package/dist/es/components/global-navigation-bar/link.js.map +0 -1
- package/dist/es/components/global-navigation-bar/region.js +0 -50
- package/dist/es/components/global-navigation-bar/region.js.map +0 -1
- package/dist/es/components/global-navigation-bar.js +0 -2
- package/dist/es/components/location-map/index.js +0 -75
- package/dist/es/components/location-map/index.js.map +0 -1
- package/dist/es/components/location-map.js +0 -2
- package/dist/es/components/utilities/truncate/index.js +0 -91
- package/dist/es/components/utilities/truncate/index.js.map +0 -1
- package/dist/es/components/utilities/truncate.js +0 -2
- package/dist/es/utilities/warning/one-of-component.js +0 -15
- package/dist/es/utilities/warning/one-of-component.js.map +0 -1
- package/dist/types/components/app-launcher/check-props.d.ts.map +0 -1
- package/dist/types/components/app-launcher/expandable-section.d.ts +0 -62
- package/dist/types/components/app-launcher/expandable-section.d.ts.map +0 -1
- package/dist/types/components/app-launcher/index.d.ts +0 -48
- package/dist/types/components/app-launcher/index.d.ts.map +0 -1
- package/dist/types/components/app-launcher/link.d.ts +0 -39
- package/dist/types/components/app-launcher/link.d.ts.map +0 -1
- package/dist/types/components/app-launcher/section.d.ts +0 -55
- package/dist/types/components/app-launcher/section.d.ts.map +0 -1
- package/dist/types/components/app-launcher/tile.d.ts +0 -74
- package/dist/types/components/app-launcher/tile.d.ts.map +0 -1
- package/dist/types/components/app-launcher.d.ts +0 -2
- package/dist/types/components/brand-band/check-props.d.ts +0 -3
- package/dist/types/components/brand-band/check-props.d.ts.map +0 -1
- package/dist/types/components/brand-band/index.d.ts +0 -39
- package/dist/types/components/brand-band/index.d.ts.map +0 -1
- package/dist/types/components/brand-band.d.ts +0 -2
- package/dist/types/components/bread-crumb/index.d.ts +0 -3
- package/dist/types/components/bread-crumb/index.d.ts.map +0 -1
- package/dist/types/components/bread-crumb.d.ts +0 -2
- package/dist/types/components/data-table/cell.d.ts.map +0 -1
- package/dist/types/components/data-table/check-props.d.ts +0 -3
- package/dist/types/components/data-table/check-props.d.ts.map +0 -1
- package/dist/types/components/data-table/column-check-props.d.ts.map +0 -1
- package/dist/types/components/data-table/column.d.ts.map +0 -1
- package/dist/types/components/data-table/data-table.d.ts +0 -15
- package/dist/types/components/data-table/data-table.d.ts.map +0 -1
- package/dist/types/components/data-table/highlight-cell.d.ts +0 -14
- package/dist/types/components/data-table/highlight-cell.d.ts.map +0 -1
- package/dist/types/components/data-table/index.d.ts.map +0 -1
- package/dist/types/components/data-table/interactive-element.d.ts.map +0 -1
- package/dist/types/components/data-table/interactive-link.d.ts.map +0 -1
- package/dist/types/components/data-table/private/cell-context.d.ts.map +0 -1
- package/dist/types/components/data-table/private/cell-fixed.d.ts.map +0 -1
- package/dist/types/components/data-table/private/context-helper.d.ts.map +0 -1
- package/dist/types/components/data-table/private/head.d.ts.map +0 -1
- package/dist/types/components/data-table/private/header-cell.d.ts.map +0 -1
- package/dist/types/components/data-table/private/link.d.ts.map +0 -1
- package/dist/types/components/data-table/private/mode.d.ts.map +0 -1
- package/dist/types/components/data-table/private/row.d.ts.map +0 -1
- package/dist/types/components/data-table/private/table-context.d.ts.map +0 -1
- package/dist/types/components/data-table/row-actions.d.ts.map +0 -1
- package/dist/types/components/data-table/types.d.ts.map +0 -1
- package/dist/types/components/data-table.d.ts +0 -2
- package/dist/types/components/expression/condition.d.ts +0 -105
- package/dist/types/components/expression/condition.d.ts.map +0 -1
- package/dist/types/components/expression/formula.d.ts +0 -88
- package/dist/types/components/expression/formula.d.ts.map +0 -1
- package/dist/types/components/expression/group.d.ts +0 -114
- package/dist/types/components/expression/group.d.ts.map +0 -1
- package/dist/types/components/expression/index.d.ts +0 -72
- package/dist/types/components/expression/index.d.ts.map +0 -1
- package/dist/types/components/expression.d.ts +0 -2
- package/dist/types/components/forms/input/index.d.ts +0 -3
- package/dist/types/components/forms/input/index.d.ts.map +0 -1
- package/dist/types/components/forms/input/search.d.ts +0 -3
- package/dist/types/components/forms/input/search.d.ts.map +0 -1
- package/dist/types/components/forms/input.d.ts +0 -2
- package/dist/types/components/forms/radio/index.d.ts +0 -3
- package/dist/types/components/forms/radio/index.d.ts.map +0 -1
- package/dist/types/components/forms/radio.d.ts +0 -2
- package/dist/types/components/forms/textarea/index.d.ts +0 -3
- package/dist/types/components/forms/textarea/index.d.ts.map +0 -1
- package/dist/types/components/forms/textarea.d.ts +0 -2
- package/dist/types/components/global-header/button.d.ts +0 -15
- package/dist/types/components/global-header/button.d.ts.map +0 -1
- package/dist/types/components/global-header/check-props.d.ts +0 -3
- package/dist/types/components/global-header/check-props.d.ts.map +0 -1
- package/dist/types/components/global-header/dropdown.d.ts +0 -59
- package/dist/types/components/global-header/dropdown.d.ts.map +0 -1
- package/dist/types/components/global-header/favorites.d.ts +0 -42
- package/dist/types/components/global-header/favorites.d.ts.map +0 -1
- package/dist/types/components/global-header/help.d.ts +0 -25
- package/dist/types/components/global-header/help.d.ts.map +0 -1
- package/dist/types/components/global-header/index.d.ts +0 -38
- package/dist/types/components/global-header/index.d.ts.map +0 -1
- package/dist/types/components/global-header/notifications.d.ts +0 -33
- package/dist/types/components/global-header/notifications.d.ts.map +0 -1
- package/dist/types/components/global-header/private/dropdown-trigger.d.ts +0 -78
- package/dist/types/components/global-header/private/dropdown-trigger.d.ts.map +0 -1
- package/dist/types/components/global-header/profile.d.ts +0 -38
- package/dist/types/components/global-header/profile.d.ts.map +0 -1
- package/dist/types/components/global-header/search.d.ts +0 -14
- package/dist/types/components/global-header/search.d.ts.map +0 -1
- package/dist/types/components/global-header/setup.d.ts +0 -25
- package/dist/types/components/global-header/setup.d.ts.map +0 -1
- package/dist/types/components/global-header/task.d.ts +0 -25
- package/dist/types/components/global-header/task.d.ts.map +0 -1
- package/dist/types/components/global-header.d.ts +0 -2
- package/dist/types/components/global-navigation-bar/button.d.ts +0 -18
- package/dist/types/components/global-navigation-bar/button.d.ts.map +0 -1
- package/dist/types/components/global-navigation-bar/check-props.d.ts +0 -3
- package/dist/types/components/global-navigation-bar/check-props.d.ts.map +0 -1
- package/dist/types/components/global-navigation-bar/dropdown-trigger.d.ts +0 -88
- package/dist/types/components/global-navigation-bar/dropdown-trigger.d.ts.map +0 -1
- package/dist/types/components/global-navigation-bar/dropdown.d.ts +0 -64
- package/dist/types/components/global-navigation-bar/dropdown.d.ts.map +0 -1
- package/dist/types/components/global-navigation-bar/index.d.ts +0 -35
- package/dist/types/components/global-navigation-bar/index.d.ts.map +0 -1
- package/dist/types/components/global-navigation-bar/label.d.ts +0 -25
- package/dist/types/components/global-navigation-bar/label.d.ts.map +0 -1
- package/dist/types/components/global-navigation-bar/link.d.ts +0 -84
- package/dist/types/components/global-navigation-bar/link.d.ts.map +0 -1
- package/dist/types/components/global-navigation-bar/region.d.ts +0 -36
- package/dist/types/components/global-navigation-bar/region.d.ts.map +0 -1
- package/dist/types/components/global-navigation-bar.d.ts +0 -2
- package/dist/types/components/location-map/index.d.ts +0 -49
- package/dist/types/components/location-map/index.d.ts.map +0 -1
- package/dist/types/components/location-map.d.ts +0 -2
- package/dist/types/components/navigation/index.d.ts +0 -3
- package/dist/types/components/navigation/index.d.ts.map +0 -1
- package/dist/types/components/navigation.d.ts +0 -2
- package/dist/types/components/popover-tooltip/index.d.ts +0 -3
- package/dist/types/components/popover-tooltip/index.d.ts.map +0 -1
- package/dist/types/components/popover-tooltip.d.ts +0 -2
- /package/dist/cjs/components/{data-table → simple-data-table}/column-check-props.cjs +0 -0
- /package/dist/cjs/components/{data-table → simple-data-table}/interactive-element.cjs +0 -0
- /package/dist/cjs/components/{data-table → simple-data-table}/interactive-link.cjs +0 -0
- /package/dist/cjs/components/{data-table → simple-data-table}/private/cell-context.cjs +0 -0
- /package/dist/cjs/components/{data-table → simple-data-table}/private/cell-fixed.cjs +0 -0
- /package/dist/cjs/components/{data-table → simple-data-table}/private/context-helper.cjs +0 -0
- /package/dist/cjs/components/{data-table → simple-data-table}/private/link.cjs +0 -0
- /package/dist/cjs/components/{data-table → simple-data-table}/private/mode.cjs +0 -0
- /package/dist/cjs/components/{data-table → simple-data-table}/private/table-context.cjs +0 -0
- /package/dist/types/components/{app-launcher → simple-data-table}/check-props.d.ts +0 -0
- /package/dist/types/components/{data-table → simple-data-table}/column-check-props.d.ts +0 -0
- /package/dist/types/components/{data-table → simple-data-table}/interactive-element.d.ts +0 -0
- /package/dist/types/components/{data-table → simple-data-table}/interactive-link.d.ts +0 -0
- /package/dist/types/components/{data-table → simple-data-table}/private/cell-context.d.ts +0 -0
- /package/dist/types/components/{data-table → simple-data-table}/private/cell-fixed.d.ts +0 -0
- /package/dist/types/components/{data-table → simple-data-table}/private/context-helper.d.ts +0 -0
- /package/dist/types/components/{data-table → simple-data-table}/private/link.d.ts +0 -0
- /package/dist/types/components/{data-table → simple-data-table}/private/mode.d.ts +0 -0
- /package/dist/types/components/{data-table → simple-data-table}/private/table-context.d.ts +0 -0
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { APP_LAUNCHER_TILE as e } from "../../utilities/constants.js";
|
|
2
|
-
import t from "../tooltip/index.js";
|
|
3
|
-
import n from "../button/index.js";
|
|
4
|
-
import r from "./check-props.js";
|
|
5
|
-
import i from "./component.js";
|
|
6
|
-
import a from "../utilities/highlighter/index.js";
|
|
7
|
-
import o from "../utilities/truncate/index.js";
|
|
8
|
-
import s from "react";
|
|
9
|
-
import c from "classnames";
|
|
10
|
-
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
11
|
-
//#region components/app-launcher/tile.tsx
|
|
12
|
-
var d = {
|
|
13
|
-
assistiveText: { dragIconText: "Reorder" },
|
|
14
|
-
href: "#",
|
|
15
|
-
moreLabel: " More"
|
|
16
|
-
}, f = class extends s.Component {
|
|
17
|
-
static displayName = e;
|
|
18
|
-
static defaultProps = d;
|
|
19
|
-
constructor(t) {
|
|
20
|
-
super(t), r(e, t, i);
|
|
21
|
-
}
|
|
22
|
-
handleClick = (e) => {
|
|
23
|
-
this.props.onClick && (e.preventDefault(), this.props.onClick(e, { href: this.props.href }));
|
|
24
|
-
};
|
|
25
|
-
render() {
|
|
26
|
-
let e = { "aria-pressed": !1 }, r = {};
|
|
27
|
-
return this.props.iconBackgroundColor && (r.backgroundColor = this.props.iconBackgroundColor), /* @__PURE__ */ u("div", {
|
|
28
|
-
className: c("slds-app-launcher__tile slds-text-link_reset slds-is-draggable", this.props.className),
|
|
29
|
-
onClick: this.handleClick,
|
|
30
|
-
role: "button",
|
|
31
|
-
tabIndex: 0,
|
|
32
|
-
children: [/* @__PURE__ */ u("div", {
|
|
33
|
-
className: "slds-app-launcher__tile-figure",
|
|
34
|
-
children: [this.props.iconNode || /* @__PURE__ */ l("span", {
|
|
35
|
-
className: "slds-avatar slds-avatar_large",
|
|
36
|
-
children: /* @__PURE__ */ l("abbr", {
|
|
37
|
-
className: "slds-avatar__initials slds-icon-custom-27",
|
|
38
|
-
style: r,
|
|
39
|
-
title: this.props.title,
|
|
40
|
-
children: this.props.iconText
|
|
41
|
-
})
|
|
42
|
-
}), /* @__PURE__ */ l("div", {
|
|
43
|
-
className: "slds-m-top_xxx-small",
|
|
44
|
-
children: /* @__PURE__ */ l(n, {
|
|
45
|
-
assistiveText: { icon: this.props.assistiveText?.dragIconText },
|
|
46
|
-
iconCategory: "utility",
|
|
47
|
-
iconName: "rows",
|
|
48
|
-
title: this.props.assistiveText?.dragIconText,
|
|
49
|
-
variant: "icon",
|
|
50
|
-
...e
|
|
51
|
-
})
|
|
52
|
-
})]
|
|
53
|
-
}), /* @__PURE__ */ u("div", {
|
|
54
|
-
className: "slds-app-launcher__tile-body",
|
|
55
|
-
children: [/* @__PURE__ */ l("a", {
|
|
56
|
-
href: this.props.href,
|
|
57
|
-
onClick: (e) => this.props.href === "#" && e.preventDefault(),
|
|
58
|
-
children: /* @__PURE__ */ l(a, {
|
|
59
|
-
search: this.props.search,
|
|
60
|
-
children: this.props.title
|
|
61
|
-
})
|
|
62
|
-
}), /* @__PURE__ */ l(o, {
|
|
63
|
-
line: 2,
|
|
64
|
-
prefix: this.props.descriptionHeading && this.props.descriptionHeading.toUpperCase(),
|
|
65
|
-
suffix: this.props.moreLabel,
|
|
66
|
-
text: this.props.description,
|
|
67
|
-
textTruncateChild: /* @__PURE__ */ l(t, {
|
|
68
|
-
align: "bottom",
|
|
69
|
-
content: /* @__PURE__ */ l(a, {
|
|
70
|
-
search: this.props.search,
|
|
71
|
-
children: this.props.description
|
|
72
|
-
}),
|
|
73
|
-
isOpen: this.props.isOpenTooltip,
|
|
74
|
-
children: /* @__PURE__ */ l(n, {
|
|
75
|
-
className: "slds-button_reset slds-text-link",
|
|
76
|
-
variant: "base",
|
|
77
|
-
children: this.props.moreLabel
|
|
78
|
-
})
|
|
79
|
-
}),
|
|
80
|
-
wrapper: (e, t) => /* @__PURE__ */ u(s.Fragment, { children: [
|
|
81
|
-
this.props.descriptionHeading && /* @__PURE__ */ u("div", {
|
|
82
|
-
className: "slds-text-heading_label",
|
|
83
|
-
style: { letterSpacing: "0.025rem" },
|
|
84
|
-
children: [this.props.descriptionHeading, " "]
|
|
85
|
-
}),
|
|
86
|
-
/* @__PURE__ */ l(a, {
|
|
87
|
-
search: this.props.search,
|
|
88
|
-
children: e
|
|
89
|
-
}),
|
|
90
|
-
t && " ",
|
|
91
|
-
t
|
|
92
|
-
] })
|
|
93
|
-
})]
|
|
94
|
-
})]
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
//#endregion
|
|
99
|
-
export { f as default };
|
|
100
|
-
|
|
101
|
-
//# sourceMappingURL=tile.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tile.js","names":[],"sources":["../../../../components/app-launcher/tile.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\n/* eslint-disable jsx-a11y/no-noninteractive-tabindex */\n\n// # App Launcher Tile Component\n\n// ## Dependencies\n\nimport React, { type ReactNode } from 'react';\nimport classNames from 'classnames';\n\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\n// ## Children\nimport Button from '../button';\nimport Highlighter from '../utilities/highlighter';\nimport Tooltip from '../tooltip';\nimport Truncate from '../utilities/truncate';\n\nimport { APP_LAUNCHER_TILE } from '../../utilities/constants';\n\nexport interface AppLauncherTileAssistiveText {\n\t/** Text that describes the purpose of the drag handle icon. */\n\tdragIconText?: string;\n}\n\nexport interface AppLauncherTileProps {\n\t/**\n\t * **Assistive text for accessibility.**\n\t * * `dragIconText`: Text that describes the purpose of the drag handle icon.\n\t */\n\tassistiveText?: AppLauncherTileAssistiveText;\n\t/**\n\t * Class names to be added to the tile.\n\t */\n\tclassName?: unknown[] | Record<string, unknown> | string;\n\t/**\n\t * The description of the app. Not visible on small tiles.\n\t */\n\tdescription?: string;\n\t/**\n\t * Heading for app description. NOTE: this prop is DEPRECATED and use should be avoided\n\t */\n\tdescriptionHeading?: string;\n\t/**\n\t * The `href` attribute of the tile. Please pass in bookmarkable URLs from your routing library. If the `onClick` callback is specified this URL will be prevented from changing the browser's location.\n\t */\n\thref?: string;\n\t/**\n\t * Background color to be used on the icon. Only applied if iconNode is undefined\n\t */\n\ticonBackgroundColor?: string;\n\t/**\n\t * Icon node for app tile. Takes priority over `iconText`\n\t */\n\ticonNode?: ReactNode;\n\t/**\n\t * Text to be used as an icon. Only renders if iconNode is undefined\n\t */\n\ticonText?: string;\n\t/**\n\t * Open the More Tooltip\n\t */\n\tisOpenTooltip?: boolean;\n\t/**\n\t * The localized text for the \"More information\" tooltip.\n\t */\n\tmoreLabel?: string;\n\t/**\n\t * Function that will be executed when clicking on a tile\n\t */\n\tonClick?: (event: React.MouseEvent, data: { href?: string }) => void;\n\t/**\n\t * Text used to highlight content in app tiles\n\t */\n\tsearch?: string;\n\t/**\n\t * App name for the tile's title.\n\t */\n\ttitle: string;\n}\n\nconst defaultProps: Partial<AppLauncherTileProps> = {\n\tassistiveText: {\n\t\tdragIconText: 'Reorder',\n\t},\n\thref: '#',\n\tmoreLabel: ' More',\n};\n\n/**\n * App Launcher Tiles provide information and links to a user's apps\n */\nclass AppLauncherTile extends React.Component<AppLauncherTileProps> {\n\t// ### Display Name\n\t// Always use the canonical component name as the React display name.\n\tstatic displayName = APP_LAUNCHER_TILE;\n\n\t// ### Default Props\n\tstatic defaultProps = defaultProps;\n\n\tconstructor(props: AppLauncherTileProps) {\n\t\tsuper(props);\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\tAPP_LAUNCHER_TILE,\n\t\t\tprops,\n\t\t\tcomponentDoc\n\t\t);\n\t}\n\n\thandleClick = (event: React.MouseEvent) => {\n\t\tif (this.props.onClick) {\n\t\t\tevent.preventDefault();\n\t\t\tthis.props.onClick(event, { href: this.props.href });\n\t\t}\n\t};\n\n\trender() {\n\t\tconst dragButtonAriaProps = { 'aria-pressed': false };\n\t\tconst iconStyles: React.CSSProperties = {};\n\n\t\tif (this.props.iconBackgroundColor) {\n\t\t\ticonStyles.backgroundColor = this.props.iconBackgroundColor;\n\t\t}\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t'slds-app-launcher__tile slds-text-link_reset slds-is-draggable', // NOTE: while the draggable class is here for stylistic purposes, the draggable attribute is not present as draggability has not been implemented yet\n\t\t\t\t\tthis.props.className as string\n\t\t\t\t)}\n\t\t\t\tonClick={this.handleClick}\n\t\t\t\trole=\"button\"\n\t\t\t\ttabIndex={0}\n\t\t\t>\n\t\t\t\t<div className=\"slds-app-launcher__tile-figure\">\n\t\t\t\t\t{this.props.iconNode || (\n\t\t\t\t\t\t<span className=\"slds-avatar slds-avatar_large\">\n\t\t\t\t\t\t\t<abbr\n\t\t\t\t\t\t\t\tclassName=\"slds-avatar__initials slds-icon-custom-27\"\n\t\t\t\t\t\t\t\tstyle={iconStyles}\n\t\t\t\t\t\t\t\ttitle={this.props.title}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{this.props.iconText}\n\t\t\t\t\t\t\t</abbr>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t)}\n\t\t\t\t\t<div className=\"slds-m-top_xxx-small\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tassistiveText={{\n\t\t\t\t\t\t\t\ticon: this.props.assistiveText?.dragIconText,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\ticonCategory=\"utility\"\n\t\t\t\t\t\t\ticonName=\"rows\"\n\t\t\t\t\t\t\ttitle={this.props.assistiveText?.dragIconText}\n\t\t\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t\t\t\t{...dragButtonAriaProps}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"slds-app-launcher__tile-body\">\n\t\t\t\t\t<a\n\t\t\t\t\t\thref={this.props.href}\n\t\t\t\t\t\tonClick={(event) =>\n\t\t\t\t\t\t\tthis.props.href === '#' && event.preventDefault()\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Highlighter search={this.props.search}>\n\t\t\t\t\t\t\t{this.props.title}\n\t\t\t\t\t\t</Highlighter>\n\t\t\t\t\t</a>\n\t\t\t\t\t<Truncate\n\t\t\t\t\t\tline={2}\n\t\t\t\t\t\tprefix={\n\t\t\t\t\t\t\tthis.props.descriptionHeading &&\n\t\t\t\t\t\t\tthis.props.descriptionHeading.toUpperCase()\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsuffix={this.props.moreLabel}\n\t\t\t\t\t\ttext={this.props.description}\n\t\t\t\t\t\ttextTruncateChild={\n\t\t\t\t\t\t\t<Tooltip\n\t\t\t\t\t\t\t\talign=\"bottom\"\n\t\t\t\t\t\t\t\tcontent={\n\t\t\t\t\t\t\t\t\t<Highlighter search={this.props.search}>\n\t\t\t\t\t\t\t\t\t\t{this.props.description}\n\t\t\t\t\t\t\t\t\t</Highlighter>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tisOpen={this.props.isOpenTooltip}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tclassName=\"slds-button_reset slds-text-link\"\n\t\t\t\t\t\t\t\t\tvariant=\"base\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{this.props.moreLabel}\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t}\n\t\t\t\t\t\twrapper={(text: ReactNode, textTruncateChild: ReactNode) => (\n\t\t\t\t\t\t\t<React.Fragment>\n\t\t\t\t\t\t\t\t{this.props.descriptionHeading && (\n\t\t\t\t\t\t\t\t\t// inline style override\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tclassName=\"slds-text-heading_label\"\n\t\t\t\t\t\t\t\t\t\tstyle={{ letterSpacing: '0.025rem' }}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{this.props.descriptionHeading}{' '}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t<Highlighter search={this.props.search}>{text}</Highlighter>\n\t\t\t\t\t\t\t\t{textTruncateChild && ' '}\n\t\t\t\t\t\t\t\t{textTruncateChild}\n\t\t\t\t\t\t\t</React.Fragment>\n\t\t\t\t\t\t)}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport default AppLauncherTile;\n"],"mappings":";;;;;;;;;;;AAqFA,IAAM,IAA8C;CACnD,eAAe,EACd,cAAc,UACf;CACA,MAAM;CACN,WAAW;AACZ,GAKM,IAAN,cAA8B,EAAM,UAAgC;CAGnE,OAAO,cAAc;CAGrB,OAAO,eAAe;CAEtB,YAAY,GAA6B;EAIxC,AAHA,MAAM,CAAK,GAGX,EACC,GACA,GACA,CACD;CACD;CAEA,eAAe,MAA4B;EAC1C,AAAI,KAAK,MAAM,YACd,EAAM,eAAe,GACrB,KAAK,MAAM,QAAQ,GAAO,EAAE,MAAM,KAAK,MAAM,KAAK,CAAC;CAErD;CAEA,SAAS;EACR,IAAM,IAAsB,EAAE,gBAAgB,GAAM,GAC9C,IAAkC,CAAC;EAMzC,OAJI,KAAK,MAAM,wBACd,EAAW,kBAAkB,KAAK,MAAM,sBAIxC,kBAAC,OAAD;GACC,WAAW,EACV,kEACA,KAAK,MAAM,SACZ;GACA,SAAS,KAAK;GACd,MAAK;GACL,UAAU;GAPX,UAAA,CASC,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,KAAK,MAAM,YACX,kBAAC,QAAD;KAAM,WAAU;KACf,UAAA,kBAAC,QAAD;MACC,WAAU;MACV,OAAO;MACP,OAAO,KAAK,MAAM;MAEjB,UAAA,KAAK,MAAM;KACP,CAAA;IACD,CAAA,GAEP,k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2
|
-
import t from "../../utilities/class-names.js";
|
|
3
|
-
import { useId as n } from "react";
|
|
4
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
-
//#region components/brand-band/index.tsx
|
|
6
|
-
var i = ({ children: e, className: i, id: a, image: o = "default", backgroundSize: s = "contain", size: c = "medium", style: l }) => {
|
|
7
|
-
let u = n(), d = a || u;
|
|
8
|
-
return /* @__PURE__ */ r("div", {
|
|
9
|
-
className: t("slds-brand-band", {
|
|
10
|
-
"slds-brand-band_small": c === "small",
|
|
11
|
-
"slds-brand-band_medium": c === "medium",
|
|
12
|
-
"slds-brand-band_large": c === "large",
|
|
13
|
-
"slds-brand-band_cover": s === "cover",
|
|
14
|
-
"slds-brand-band_none": o === "none",
|
|
15
|
-
"slds-brand-band_group": o === "group",
|
|
16
|
-
"slds-brand-band_user": o === "user"
|
|
17
|
-
}, i),
|
|
18
|
-
id: d,
|
|
19
|
-
style: l,
|
|
20
|
-
children: e
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
i.displayName = e;
|
|
24
|
-
//#endregion
|
|
25
|
-
export { i as default };
|
|
26
|
-
|
|
27
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/brand-band/index.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 React, { useId, type ReactNode, type CSSProperties } from 'react';\nimport classNames from '../../utilities/class-names';\nimport { BRAND_BAND } from '../../utilities/constants';\n\n/**\n * Brand band image options\n */\nexport type BrandBandImage = 'default' | 'none' | 'group' | 'user';\n\n/**\n * Brand band background size options\n */\nexport type BrandBandBackgroundSize = 'contain' | 'cover';\n\n/**\n * Brand band size options\n */\nexport type BrandBandSize = 'small' | 'medium' | 'large';\n\n/**\n * Props for the BrandBand component\n */\nexport interface BrandBandProps {\n\t/** Content to display within brand band */\n\tchildren?: ReactNode;\n\t/** CSS classes */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** HTML id */\n\tid?: string;\n\t/** Image type */\n\timage?: BrandBandImage;\n\t/** Background size */\n\tbackgroundSize?: BrandBandBackgroundSize;\n\t/** Size of brand band */\n\tsize?: BrandBandSize;\n\t/** Custom styles */\n\tstyle?: CSSProperties;\n}\n\n/**\n * The brand band provides theming capability that adds personality and improves information density and contrast.\n */\nconst BrandBand = ({\n\tchildren,\n\tclassName,\n\tid: propId,\n\timage = 'default',\n\tbackgroundSize = 'contain',\n\tsize = 'medium',\n\tstyle,\n}: BrandBandProps): React.ReactElement => {\n\tconst generatedId = useId();\n\tconst id = propId || generatedId;\n\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(\n\t\t\t\t'slds-brand-band',\n\t\t\t\t{\n\t\t\t\t\t'slds-brand-band_small': size === 'small',\n\t\t\t\t\t'slds-brand-band_medium': size === 'medium',\n\t\t\t\t\t'slds-brand-band_large': size === 'large',\n\t\t\t\t\t'slds-brand-band_cover': backgroundSize === 'cover',\n\t\t\t\t\t'slds-brand-band_none': image === 'none',\n\t\t\t\t\t'slds-brand-band_group': image === 'group',\n\t\t\t\t\t'slds-brand-band_user': image === 'user',\n\t\t\t\t},\n\t\t\t\tclassName as string\n\t\t\t)}\n\t\t\tid={id}\n\t\t\tstyle={style}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n\nBrandBand.displayName = BRAND_BAND;\n\nexport default BrandBand;\n\n"],"mappings":";;;;;AA6CA,IAAM,KAAa,EAClB,aACA,cACA,IAAI,GACJ,WAAQ,WACR,oBAAiB,WACjB,UAAO,UACP,eACyC;CACzC,IAAM,IAAc,EAAM,GACpB,IAAK,KAAU;CAErB,OACC,kBAAC,OAAD;EACC,WAAW,EACV,mBACA;GACC,yBAAyB,MAAS;GAClC,0BAA0B,MAAS;GACnC,yBAAyB,MAAS;GAClC,yBAAyB,MAAmB;GAC5C,wBAAwB,MAAU;GAClC,yBAAyB,MAAU;GACnC,wBAAwB,MAAU;EACnC,GACA,CACD;EACI;EACG;EAEN;CACG,CAAA;AAEP;AAEA,EAAU,cAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cell.js","names":[],"sources":["../../../../components/data-table/cell.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 React, { useContext, ReactNode } from 'react';\nimport classNames from 'classnames';\n\nimport CellContext from './private/cell-context';\nimport TableContext from './private/table-context';\nimport useContextHelper from './private/context-helper';\n\nimport { DATA_TABLE_CELL } from '../../utilities/constants';\n\nexport interface DataTableCellProps {\n\t/** The contents of the cell */\n\tchildren?: ReactNode;\n\t/** Class names to be added to the cell */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Use this for advanced table (selectable, sortable, or resizable rows) */\n\tfixedLayout?: boolean;\n\t/** The item from the items which represents this row */\n\titem?: Record<string, unknown>;\n\t/** The primary column for a row. This is almost always the first column. */\n\tprimaryColumn?: boolean;\n\t/** The property of this item to display */\n\tproperty?: string;\n\t/** Shows on hover. Useful for truncated cells. */\n\ttitle?: string;\n\t/** Width of column. Required for advanced/fixed layout tables. */\n\twidth?: string;\n\t/** Data label for stacked layout */\n\tlabel?: string;\n\t/** Header ID for accessibility */\n\theaderId?: string;\n}\n\n/**\n * The default Cell renderer for the DataTable. Pass in any React component\n * with the same `displayName` which takes the same props to provide custom rendering.\n */\nconst DataTableCell: React.FC<DataTableCellProps> = (props) => {\n\tconst tableContext = useContext(TableContext);\n\tconst cellContext = useContext(CellContext);\n\tconst { tabIndex, hasFocus, handleFocus, handleKeyDown } = useContextHelper(\n\t\ttableContext,\n\t\tcellContext,\n\t\tprops.fixedLayout\n\t);\n\n\tconst childText = React.isValidElement(props.children)\n\t\t? (props.children.props as { children?: string }).children\n\t\t: props.children;\n\n\tconst contents = (\n\t\t<div\n\t\t\tclassName={classNames({\n\t\t\t\t'slds-truncate': props.fixedLayout,\n\t\t\t})}\n\t\t\ttitle={props.title || (typeof childText === 'string' ? childText : undefined)}\n\t\t>\n\t\t\t{props.children}\n\t\t</div>\n\t);\n\n\tconst className = classNames(props.className, {\n\t\t'slds-has-focus': hasFocus,\n\t});\n\n\tconst ref = (node: HTMLTableCellElement | null) => {\n\t\tif (node && hasFocus) {\n\t\t\tnode.focus();\n\t\t}\n\t};\n\n\tif (props.primaryColumn) {\n\t\treturn (\n\t\t\t<th\n\t\t\t\tclassName={className}\n\t\t\t\tref={ref}\n\t\t\t\tdata-label={props.label}\n\t\t\t\trole={props.fixedLayout ? 'gridcell' : undefined}\n\t\t\t\ttabIndex={tabIndex}\n\t\t\t\tstyle={props.width ? { width: props.width } : undefined}\n\t\t\t\tonFocus={handleFocus}\n\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t>\n\t\t\t\t{contents}\n\t\t\t</th>\n\t\t);\n\t}\n\n\treturn (\n\t\t<td\n\t\t\tclassName={className}\n\t\t\tdata-label={props.label}\n\t\t\tonFocus={handleFocus}\n\t\t\tonKeyDown={handleKeyDown}\n\t\t\tref={ref}\n\t\t\trole={props.fixedLayout ? 'gridcell' : undefined}\n\t\t\tstyle={props.width ? { width: props.width } : undefined}\n\t\t\ttabIndex={tabIndex}\n\t\t\theaders={props.headerId}\n\t\t>\n\t\t\t{contents}\n\t\t</td>\n\t);\n};\n\nDataTableCell.displayName = DATA_TABLE_CELL;\n\nexport default DataTableCell;\n"],"mappings":";;;;;;;;AAuCA,IAAM,KAA+C,MAAU;CAC9D,IAAM,IAAe,EAAW,CAAY,GACtC,IAAc,EAAW,CAAW,GACpC,EAAE,aAAU,aAAU,gBAAa,qBAAkB,EAC1D,GACA,GACA,EAAM,WACP,GAEM,IAAY,EAAM,eAAe,EAAM,QAAQ,IACjD,EAAM,SAAS,MAAgC,WAChD,EAAM,UAEH,IACL,kBAAC,OAAD;EACC,WAAW,EAAW,EACrB,iBAAiB,EAAM,YACxB,CAAC;EACD,OAAO,EAAM,UAAU,OAAO,KAAc,WAAW,IAAY,KAAA;EAElE,UAAA,EAAM;CACH,CAAA,GAGA,IAAY,EAAW,EAAM,WAAW,EAC7C,kBAAkB,EACnB,CAAC,GAEK,KAAO,MAAsC;EAClD,AAAI,KAAQ,KACX,EAAK,MAAM;CAEb;CAmBA,OAjBI,EAAM,gBAER,kBAAC,MAAD;EACY;EACN;EACL,cAAY,EAAM;EAClB,MAAM,EAAM,cAAc,aAAa,KAAA;EAC7B;EACV,OAAO,EAAM,QAAQ,EAAE,OAAO,EAAM,MAAM,IAAI,KAAA;EAC9C,SAAS;EACT,WAAW;EAEV,UAAA;CACE,CAAA,IAKL,kBAAC,MAAD;EACY;EACX,cAAY,EAAM;EAClB,SAAS;EACT,WAAW;EACN;EACL,MAAM,EAAM,cAAc,aAAa,KAAA;EACvC,OAAO,EAAM,QAAQ,EAAE,OAAO,EAAM,MAAM,IAAI,KAAA;EACpC;EACV,SAAS,EAAM;EAEd,UAAA;CACE,CAAA;AAEN;AAEA,EAAc,cAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"check-props.js","names":[],"sources":["../../../../components/data-table/check-props.js"],"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/* eslint-disable import/no-mutable-exports */\n\nimport deprecatedProperty from '../../utilities/warning/deprecated-property';\nimport getComponentDocFn from '../../utilities/get-component-doc';\nimport sunsetProperty from '../../utilities/warning/sunset-property';\n\nlet checkProps = function checkPropsFunction() {};\n\nif (process.env.NODE_ENV !== 'production') {\n\tcheckProps = function checkPropsFunction(COMPONENT, props, jsonDoc) {\n\t\tconst createDocUrl = getComponentDocFn(jsonDoc);\n\t\t/* eslint-disable max-len */\n\t\t// Deprecated and changed to another property\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.onChange,\n\t\t\t'onChange',\n\t\t\t'onRowChange',\n\t\t\t'The callback parameters have been changed. `onRowChange` passes in `[event, { selection }` in order to align with other components.'\n\t\t);\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.compact,\n\t\t\t'compact',\n\t\t\tundefined,\n\t\t\t`compact has been deprecated as non-compact data tables do not exist in SLDS. ${createDocUrl()}`\n\t\t);\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.collection,\n\t\t\t'collection',\n\t\t\t'items',\n\t\t\tcreateDocUrl('items')\n\t\t);\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.onSelect,\n\t\t\t'onSelect',\n\t\t\t'onChange',\n\t\t\tcreateDocUrl('onChange')\n\t\t);\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.onDeselect,\n\t\t\t'onDeselect',\n\t\t\t'onChange',\n\t\t\tcreateDocUrl('onChange')\n\t\t);\n\t\tsunsetProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.sortable,\n\t\t\t'sortable',\n\t\t\t`The table is sortable if one or more of its columns are sortable. ${createDocUrl()}`\n\t\t);\n\n\t\t// Deprecated and moved to a child\n\t\tsunsetProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.columns,\n\t\t\t'columns',\n\t\t\t`Please provide one or more children of the type <Column /> instead. ${createDocUrl()}`\n\t\t);\n\n\t\tsunsetProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.bordered,\n\t\t\t'bordered',\n\t\t\t`All SLDS DataTables have row borders by default now. If you do not want row borders, please use \\`unborderedRow\\`. ${createDocUrl(\n\t\t\t\t'unborderedRow'\n\t\t\t)}`\n\t\t);\n\t\t/* eslint-enable max-len */\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.assistiveTextForActionsHeader,\n\t\t\t'assistiveTextForActionsHeader',\n\t\t\t\"assistiveText['actionsHeader']\",\n\t\t\tcreateDocUrl('assistiveText')\n\t\t);\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.assistiveTextForColumnSort,\n\t\t\t'assistiveTextForColumnSort',\n\t\t\t\"assistiveText['columnSort']\",\n\t\t\tcreateDocUrl('assistiveText')\n\t\t);\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.assistiveTextForColumnSortedAscending,\n\t\t\t'assistiveTextForColumnSortedAscending',\n\t\t\t\"assistiveText['columnSortedAscending']\",\n\t\t\tcreateDocUrl('assistiveText')\n\t\t);\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.assistiveTextForColumnSortedDescending,\n\t\t\t'assistiveTextForColumnSortedDescending',\n\t\t\t\"assistiveText['columnSortedDescending']\",\n\t\t\tcreateDocUrl('assistiveText')\n\t\t);\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.assistiveTextForSelectAllRows,\n\t\t\t'assistiveTextForSelectAllRows',\n\t\t\t\"assistiveText['selectAllRows']\",\n\t\t\tcreateDocUrl('assistiveText')\n\t\t);\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.assistiveTextForSelectRow,\n\t\t\t'assistiveTextForSelectRow',\n\t\t\t\"assistiveText['selectRow']\",\n\t\t\tcreateDocUrl('assistiveText')\n\t\t);\n\t};\n}\n\nexport default checkProps;\n"],"mappings":";;;;AAQA,IAAI,IAAa,WAA8B,CAAC;AAEhD,QAAA,IAAA,aAA6B,iBAC5B,IAAa,SAA4B,GAAW,GAAO,GAAS;CACnE,IAAM,IAAe,EAAkB,CAAO;CAmG9C,AAhGA,EACC,GACA,EAAM,UACN,YACA,eACA,qIACD,GACA,EACC,GACA,EAAM,SACN,WACA,KAAA,GACA,gFAAgF,EAAa,GAC9F,GAEA,EACC,GACA,EAAM,YACN,cACA,SACA,EAAa,OAAO,CACrB,GACA,EACC,GACA,EAAM,UACN,YACA,YACA,EAAa,UAAU,CACxB,GACA,EACC,GACA,EAAM,YACN,cACA,YACA,EAAa,UAAU,CACxB,GACA,EACC,GACA,EAAM,UACN,YACA,qEAAqE,EAAa,GACnF,GAGA,EACC,GACA,EAAM,SACN,WACA,uEAAuE,EAAa,GACrF,GAEA,EACC,GACA,EAAM,UACN,YACA,sHAAsH,EACrH,eACD,GACD,GAGA,EACC,GACA,EAAM,+BACN,iCACA,kCACA,EAAa,eAAe,CAC7B,GACA,EACC,GACA,EAAM,4BACN,8BACA,+BACA,EAAa,eAAe,CAC7B,GACA,EACC,GACA,EAAM,uCACN,yCACA,0CACA,EAAa,eAAe,CAC7B,GACA,EACC,GACA,EAAM,wCACN,0CACA,2CACA,EAAa,eAAe,CAC7B,GACA,EACC,GACA,EAAM,+BACN,iCACA,kCACA,EAAa,eAAe,CAC7B,GACA,EACC,GACA,EAAM,2BACN,6BACA,8BACA,EAAa,eAAe,CAC7B;AACD;AAGD,IAAA,IAAe"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"column-check-props.js","names":[],"sources":["../../../../components/data-table/column-check-props.js"],"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/* eslint-disable import/no-mutable-exports */\n\nimport ifOneThenBothRequiredProperty from '../../utilities/warning/if-one-then-both-required-property';\n\nlet checkProps = function checkPropsFunction() {};\n\nif (process.env.NODE_ENV !== 'production') {\n\tcheckProps = function checkPropsFunction(COMPONENT, props) {\n\t\t/* eslint-disable max-len */\n\t\t// Deprecated and changed to another property\n\t\tifOneThenBothRequiredProperty(COMPONENT, props, {\n\t\t\tisSorted: props.isSorted,\n\t\t\tsortDirection: props.sortDirection,\n\t\t});\n\t\t/* eslint-enable max-len */\n\t};\n}\n\nexport default checkProps;\n"],"mappings":";;AAMA,IAAI,IAAa,WAA8B,CAAC;AAEhD,QAAA,IAAA,aAA6B,iBAC5B,IAAa,SAA4B,GAAW,GAAO;CAG1D,EAA8B,GAAW,GAAO;EAC/C,UAAU,EAAM;EAChB,eAAe,EAAM;CACtB,CAAC;AAEF;AAGD,IAAA,IAAe"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"column.js","names":[],"sources":["../../../../components/data-table/column.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 React, { ReactNode } from 'react';\nimport { DATA_TABLE_COLUMN } from '../../utilities/constants';\n\nexport interface DataTableColumnProps {\n\t/**\n\t * Use a _higher-order component_ to customize a data table cell that will\n\t * override the default cell rendering. `CustomDataTableCell` must have the\n\t * same `displayName` as `DataTableCell` or it will be ignored.\n\t */\n\tchildren?: ReactNode;\n\t/**\n\t * Some columns should sort descending first (e.g., \"date last viewed\").\n\t * If sortable and the parent has not defined sort order, ascending is default.\n\t */\n\tisDefaultSortDescending?: boolean;\n\t/**\n\t * Selects this column as the currently sorted column.\n\t */\n\tisSorted?: boolean;\n\t/**\n\t * The column label. If a `string` is not passed in, no `title` attribute\n\t * will be rendered.\n\t */\n\tlabel?: string | ReactNode;\n\t/**\n\t * The primary column for a row. This is almost always the first column.\n\t */\n\tprimaryColumn?: boolean;\n\t/**\n\t * The property which corresponds to this column.\n\t */\n\tproperty?: string;\n\t/**\n\t * Whether or not the column is sortable.\n\t */\n\tsortable?: boolean;\n\t/**\n\t * The current sort direction. Required if `isSorted` is true.\n\t */\n\tsortDirection?: 'desc' | 'asc';\n\t/**\n\t * Title used for truncation div within the cell.\n\t */\n\ttitle?: string;\n\t/**\n\t * Adds truncate to cell node.\n\t */\n\ttruncate?: boolean;\n\t/**\n\t * Width of column. Required for advanced/fixed layout tables.\n\t * Please provide units (`rems` are recommended).\n\t */\n\twidth?: string;\n}\n\n/**\n * Columns define the structure of the data displayed in the DataTable.\n * This component doesn't render anything - it's used for configuration.\n */\nconst DataTableColumn: React.FC<DataTableColumnProps> = () => {\n\t// This component doesn't render anything.\n\t// It's used as a configuration element parsed by DataTable.\n\treturn null;\n};\n\nDataTableColumn.displayName = DATA_TABLE_COLUMN;\n\nexport default DataTableColumn;\n"],"mappings":";;AA8DA,IAAM,UAGE;AAGR,EAAgB,cAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","names":[],"sources":["../../../../components/data-table/component.json"],"sourcesContent":["{\n\t\"component\": \"data-table\",\n\t\"status\": \"prod\",\n\t\"display-name\": \"Data Tables\",\n\t\"classKey\": \"DataTable\",\n\t\"last-accessibility-review\": {\n\t\t\"date-iso-8601\": \"2017/01/01\",\n\t\t\"deprecated-accessibility\": \"true\",\n\t\t\"commit-sha\": \"ad6b6c6523ee21cada11be5f7ea4d99abc530726\"\n\t},\n\t\"SLDS-component-path\": \"/components/data-tables\",\n\t\"dependencies\": [\n\t\t{\n\t\t\t\"component\": \"cell\",\n\t\t\t\"classKey\": \"DataTableCell\"\n\t\t},\n\t\t{\n\t\t\t\"component\": \"column\",\n\t\t\t\"classKey\": \"DataTableColumn\"\n\t\t},\n\t\t{\n\t\t\t\"component\": \"highlight-cell\",\n\t\t\t\"classKey\": \"DataTableHighlightCell\"\n\t\t},\n\t\t{\n\t\t\t\"component\": \"row-actions\",\n\t\t\t\"classKey\": \"DataTableRowActions\"\n\t\t}\n\t],\n\t\"site-stories\": [\n {\n\t\t\t\"heading\": \"Basic\",\n\t\t\t\"path\": \"/__examples__/basic-fluid.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"Basic: Fluid and Striped\",\n\t\t\t\"path\": \"/__examples__/basic-fluid-striped.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"Basic: No row hover\",\n\t\t\t\"path\": \"/__examples__/basic-fluid-no-row-hover.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"Basic: Columns bordered\",\n\t\t\t\"path\": \"/__examples__/basic-fluid-column-bordered.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"Basic: Headless\",\n\t\t\t\"path\": \"/__examples__/basic-fluid-headless.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"Fixed Layout\",\n\t\t\t\"path\": \"/__examples__/basic-fixed-layout.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"Advanced\",\n\t\t\t\"path\": \"/__examples__/advanced.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"Advanced: Single Selection\",\n\t\t\t\"path\": \"/__examples__/advanced-single-select.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"Advanced: Fixed Header\",\n\t\t\t\"path\": \"/__examples__/fixed-header.jsx\"\n\t\t},\n\t\t{\n \"heading\": \"Advanced: Joined with Page Header\",\n \"path\": \"/__examples__/joined-with-page-header.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"Infinite Scrolling\",\n\t\t\t\"path\": \"/__examples__/infinite-scrolling.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"Resizable Columns\",\n\t\t\t\"path\": \"/__examples__/resizable-columns.jsx\"\n\t\t}\n\t],\n\t\"url-slug\": \"data-tables\"\n}\n"],"mappings":""}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { DATA_TABLE_CELL as e } from "../../utilities/constants.js";
|
|
2
|
-
import t from "../utilities/highlighter/index.js";
|
|
3
|
-
import n from "./cell.js";
|
|
4
|
-
import "react";
|
|
5
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
6
|
-
//#region components/data-table/highlight-cell.tsx
|
|
7
|
-
var i = (e) => /* @__PURE__ */ r(n, {
|
|
8
|
-
...e,
|
|
9
|
-
children: /* @__PURE__ */ r(t, {
|
|
10
|
-
search: e.search,
|
|
11
|
-
children: e.children
|
|
12
|
-
})
|
|
13
|
-
});
|
|
14
|
-
i.displayName = e;
|
|
15
|
-
//#endregion
|
|
16
|
-
export { i as default };
|
|
17
|
-
|
|
18
|
-
//# sourceMappingURL=highlight-cell.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"highlight-cell.js","names":[],"sources":["../../../../components/data-table/highlight-cell.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 React, { ReactNode } from 'react';\n\nimport DataTableCell, { DataTableCellProps } from './cell';\nimport Highlighter from '../utilities/highlighter';\n\nimport { DATA_TABLE_CELL } from '../../utilities/constants';\n\nexport interface DataTableHighlightCellProps extends DataTableCellProps {\n\t/** The contents of the cell */\n\tchildren?: ReactNode;\n\t/** The string of text (or Regular Expression) to highlight */\n\tsearch?: string | RegExp;\n}\n\n/**\n * A Cell renderer for the DataTable that automatically highlights search text.\n */\nconst DataTableHighlightCell: React.FC<DataTableHighlightCellProps> = (props) => (\n\t<DataTableCell {...props}>\n\t\t<Highlighter search={props.search}>{props.children}</Highlighter>\n\t</DataTableCell>\n);\n\n// The DataTable looks for components with this name\nDataTableHighlightCell.displayName = DATA_TABLE_CELL;\n\nexport default DataTableHighlightCell;\n"],"mappings":";;;;;;AAoBA,IAAM,KAAiE,MACtE,kBAAC,GAAD;CAAe,GAAI;CAClB,UAAA,kBAAC,GAAD;EAAa,QAAQ,EAAM;EAAS,UAAA,EAAM;CAAsB,CAAA;AAClD,CAAA;AAIhB,EAAuB,cAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/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';\nimport reject from 'lodash.reject';\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 ColumnResizer from 'column-resizer';\nimport checkProps from './check-props';\nimport componentDoc from './component.json';\n\nimport {\n\tcanUseDOM,\n\tcanUseEventListeners,\n} from '../../utilities/execution-environment';\nimport { colorGray5 } from '../../utilities/design-tokens/dist/palette-colors.common';\nimport salesforceSkin from '../../utilities/design-tokens/dist/salesforce-skin.common';\n\nconst { tableBorderRadius } = salesforceSkin;\n\n// ## Children\nimport DataTableCell from './cell';\nimport DataTableColumn from './column';\nimport DataTableHead from './private/head';\nimport DataTableRow from './private/row';\nimport DataTableRowActions 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 {\n\tDATA_TABLE,\n\tDATA_TABLE_CELL,\n\tDATA_TABLE_HEAD,\n\tDATA_TABLE_ROW,\n} from '../../utilities/constants';\n\nimport type {\n\tDataTableProps,\n\tDataTableItem,\n\tDataTableColumnConfig,\n\tDataTableColumnProps,\n\tDataTableCellProps,\n\tDataTableAssistiveText,\n} from './types';\n\n// The main DataTable component's state.\ninterface DataTableState {\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\tselection: [] as DataTableItem[],\n\tdisabledSelection: [] as DataTableItem[],\n\thasMore: false,\n\tloadMoreOffset: 20,\n\tresizable: false,\n\tresizableOptions: {\n\t\tresizeMode: 'fit',\n\t\tdraggingClass: 'slds-table-column-resizer',\n\t},\n};\n\nconst getAssistiveText = memoize(\n\t(\n\t\tassistiveText: DataTableAssistiveText | undefined,\n\t\tactionsHeaderText: string | undefined,\n\t\tcolumnSortText: string | undefined,\n\t\tcolumnSortedAscendingText: string | undefined,\n\t\tcolumnSortedDescendingText: string | undefined,\n\t\tselectAllRowsText: string | undefined,\n\t\tselectRowText: string | undefined\n\t): DataTableAssistiveText => {\n\t\tconst result: DataTableAssistiveText = {\n\t\t\t...defaultProps.assistiveText,\n\t\t\t...assistiveText,\n\t\t};\n\t\tif (actionsHeaderText) {\n\t\t\tresult.actionsHeader = actionsHeaderText;\n\t\t}\n\t\tif (selectAllRowsText) {\n\t\t\tresult.selectAllRows = selectAllRowsText;\n\t\t}\n\t\tif (columnSortedAscendingText) {\n\t\t\tresult.columnSortedAscending = columnSortedAscendingText;\n\t\t}\n\t\tif (columnSortedDescendingText) {\n\t\t\tresult.columnSortedDescending = columnSortedDescendingText;\n\t\t}\n\t\tif (columnSortText) {\n\t\t\tresult.columnSort = columnSortText;\n\t\t}\n\t\tif (selectRowText) {\n\t\t\tresult.selectRow = selectRowText;\n\t\t}\n\t\treturn result;\n\t},\n\tisEqual\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: DataTableItem[],\n\t\tsearch: string | undefined\n\t): { columns: DataTableColumnConfig[]; RowActions: ReactElement | null } => {\n\t\tconst columns: DataTableColumnConfig[] = [];\n\t\tlet RowActions: ReactElement | null = null;\n\n\t\tReact.Children.forEach(children, (child) => {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\tconst element = child as ReactElement<any> | null;\n\t\t\tconst elementType = element?.type as { displayName?: string } | undefined;\n\t\t\tif (element && elementType?.displayName === DataTableColumn.displayName) {\n\t\t\t\tconst { children: columnChildren, ...columnProps } = element.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\tlet Cell;\n\t\t\t\tconst cellChild = columnChildren as ReactElement | undefined;\n\t\t\t\tconst cellChildType = cellChild?.type as\n\t\t\t\t\t| { displayName?: string }\n\t\t\t\t\t| undefined;\n\t\t\t\tif (cellChild && cellChildType?.displayName === DATA_TABLE_CELL) {\n\t\t\t\t\tCell = cellChild.type;\n\t\t\t\t\tassign(props, cellChild.props);\n\t\t\t\t} else {\n\t\t\t\t\tCell = DataTableCell;\n\t\t\t\t}\n\n\t\t\t\tcolumns.push({\n\t\t\t\t\tCell: Cell as React.ComponentType<DataTableCellProps>,\n\t\t\t\t\tprops: props as DataTableColumnProps,\n\t\t\t\t});\n\t\t\t} else if (\n\t\t\t\telement &&\n\t\t\t\telementType?.displayName === DataTableRowActions.displayName\n\t\t\t) {\n\t\t\t\tconst { dropdown } = element.props;\n\t\t\t\tconst dropdownPropOverrides: { menuPosition?: string } = {};\n\t\t\t\tif (fixedHeader) {\n\t\t\t\t\tdropdownPropOverrides.menuPosition = 'overflowBoundaryElement';\n\t\t\t\t}\n\t\t\t\tRowActions = React.cloneElement(element, {\n\t\t\t\t\tdropdown: dropdown\n\t\t\t\t\t\t? React.cloneElement(dropdown, dropdownPropOverrides)\n\t\t\t\t\t\t: null,\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\treturn { columns, RowActions };\n\t},\n\tisEqual\n);\n\n/**\n * DataTables 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 DataTables, see the `style` property description\n */\nclass DataTable extends React.Component<DataTableProps, DataTableState> {\n\t// ### Display Name\n\t// Always use the canonical component name as the React display name.\n\tstatic displayName = 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\tgripRefs: HTMLElement[];\n\n\tscrollerRef: HTMLElement | null;\n\n\tfixedHeaderContainer: HTMLElement | null;\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\tresizer?: { reset: (options: { disable: boolean }) => void };\n\n\tconstructor(props: DataTableProps) {\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.gripRefs = [];\n\t\tthis.scrollerRef = null;\n\t\tthis.fixedHeaderContainer = 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 = this.registerInteractiveElement.bind(\n\t\t\tthis\n\t\t);\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\tDATA_TABLE,\n\t\t\tprops,\n\t\t\tcomponentDoc\n\t\t);\n\t}\n\n\tcomponentDidMount() {\n\t\tif (this.getFixedHeader()) {\n\t\t\tthis.toggleFixedHeaderListeners(true);\n\t\t\tthis.resizeFixedHeaders();\n\t\t}\n\t\tif (this.isResizable()) {\n\t\t\tthis.enableResize();\n\t\t}\n\t}\n\n\tcomponentDidUpdate(_prevProps: DataTableProps, prevState: DataTableState) {\n\t\tif (this.getFixedHeader()) {\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();\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\tif (this.isResizable()) {\n\t\t\tthis.enableResize();\n\t\t} else if (this.resizer) {\n\t\t\tthis.disableResize();\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.toggleFixedHeaderListeners(false);\n\n\t\tif (this.isResizable()) {\n\t\t\tthis.disableResize();\n\t\t}\n\t}\n\n\tonResize() {\n\t\tconst table = this.tableRef;\n\t\tif (table) {\n\t\t\tconst columns = this.getFixedHeader()\n\t\t\t\t? table.getElementsByClassName('slds-cell-fixed')\n\t\t\t\t: table.getElementsByTagName('th');\n\t\t\tconst columnsWidths = Array.from(columns).map((col, index) => {\n\t\t\t\tconst { id, style } = col as HTMLElement;\n\t\t\t\treturn {\n\t\t\t\t\tid,\n\t\t\t\t\tindex,\n\t\t\t\t\twidth: parseInt(style.width, 10),\n\t\t\t\t};\n\t\t\t});\n\t\t\treturn columnsWidths;\n\t\t}\n\t\treturn [];\n\t}\n\n\tgetId() {\n\t\treturn this.props.id || this.generatedId;\n\t}\n\n\tgetFixedHeader() {\n\t\treturn this.props.fixedHeader || this.props.resizable;\n\t}\n\n\tgetKeyboardNavigation() {\n\t\treturn this.props.keyboardNavigation || this.props.resizable;\n\t}\n\n\tgetFixedLayout() {\n\t\treturn this.props.fixedLayout || this.props.resizable;\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(state: DataTableState, isKeyboardNavigation: boolean | undefined) => ({\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\thandleToggleAll = (\n\t\te: React.SyntheticEvent,\n\t\t{ checked }: { checked: boolean }\n\t) => {\n\t\tconst selection = this.props.selection ?? [];\n\t\tconst disabledSelection = this.props.disabledSelection ?? [];\n\t\tconst selectedDisabledItems = selection.filter((item) =>\n\t\t\tdisabledSelection.includes(item)\n\t\t);\n\t\tconst enabledItems = this.props.items.filter(\n\t\t\t(item) => !disabledSelection.includes(item)\n\t\t);\n\n\t\tconst newSelection = (checked\n\t\t\t? [...enabledItems, ...selectedDisabledItems]\n\t\t\t: [...selectedDisabledItems]\n\t\t).filter((item) => item.type !== 'header-row');\n\n\t\t// REMOVE AT NEXT BREAKING CHANGE\n\t\t// `onChange` is deprecated and replaced with `onRowChange`\n\t\tif (typeof this.props.onChange === 'function') {\n\t\t\tthis.props.onChange(newSelection, e);\n\t\t}\n\n\t\tif (typeof this.props.onRowChange === 'function') {\n\t\t\tthis.props.onRowChange(e, { selection: newSelection });\n\t\t}\n\t};\n\n\thandleRowToggle = (\n\t\titem: DataTableItem,\n\t\tselected: boolean,\n\t\te: React.SyntheticEvent\n\t) => {\n\t\t// REMOVE AT NEXT BREAKING CHANGE\n\t\t// `onChange` is deprecated and replaced with `onRowChange`\n\t\tif (typeof this.props.onChange === 'function') {\n\t\t\tlet selection;\n\n\t\t\tif (selected) {\n\t\t\t\tselection =\n\t\t\t\t\tthis.props.selectRows === 'radio'\n\t\t\t\t\t\t? [item]\n\t\t\t\t\t\t: [...(this.props.selection ?? []), item];\n\t\t\t} else {\n\t\t\t\tselection = reject(this.props.selection ?? [], item);\n\t\t\t}\n\n\t\t\tthis.props.onChange(selection, e);\n\t\t}\n\t\t// DEPRECATED CODE ENDS HERE\n\n\t\tif (typeof this.props.onRowChange === 'function') {\n\t\t\tlet selection;\n\n\t\t\tif (selected) {\n\t\t\t\tselection =\n\t\t\t\t\tthis.props.selectRows === 'radio'\n\t\t\t\t\t\t? [item]\n\t\t\t\t\t\t: [...(this.props.selection ?? []), item];\n\t\t\t} else {\n\t\t\t\tselection = reject(this.props.selection ?? [], item);\n\t\t\t}\n\n\t\t\tthis.props.onRowChange(e, { selection });\n\t\t}\n\t};\n\n\trepositionResizers = () => {\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\n\t\tif (this.gripRefs && this.tableRef) {\n\t\t\tconst tableOffset = this.tableRef.getBoundingClientRect();\n\t\t\tthis.gripRefs.forEach((grip, index) => {\n\t\t\t\tconst headerEl = headers[index];\n\t\t\t\tif (!headerEl) return;\n\t\t\t\tconst header = headerEl.getBoundingClientRect();\n\t\t\t\tconst relativeOffset = header.left - tableOffset.left;\n\t\t\t\tconst newPosition = relativeOffset + header.width;\n\t\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\t\tgrip.style.left = `${newPosition}px`;\n\t\t\t});\n\t\t}\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 ?? null, {\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\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\tthis.props.onLoadMore();\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 (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\tthis.scrollerRef[method](\n\t\t\t\t\t'scroll',\n\t\t\t\t\tthis.repositionResizers 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: DataTableProps) {\n\t\tif (this.props.items !== nextProps.items) {\n\t\t\tthis.interactiveElements = {};\n\t\t}\n\t}\n\n\tisResizable() {\n\t\treturn this.props.fixedLayout && this.props.resizable;\n\t}\n\n\tresizeGrips() {\n\t\tconst table = this.fixedHeaderContainer;\n\n\t\tif (table) {\n\t\t\tconst grips = Array.from(\n\t\t\t\ttable.getElementsByClassName('grip-handle')\n\t\t\t) as HTMLElement[];\n\n\t\t\tif (grips.length) {\n\t\t\t\tthis.gripRefs = grips;\n\t\t\t\tthis.gripRefs.forEach((grip) => {\n\t\t\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\t\t\tgrip.style.height = `${parseInt(grip.style.height, 10) + 33}px`;\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tenableResize() {\n\t\tif (canUseDOM) {\n\t\t\tconst remoteTable = this.tableRef;\n\t\t\tconst fixedHeader = this.getFixedHeader();\n\t\t\tconst disabledColumns: number[] = [];\n\n\t\t\tif (this.props.selectRows) {\n\t\t\t\tdisabledColumns.push(0);\n\t\t\t}\n\n\t\t\tif (!this.resizer) {\n\t\t\t\tconst options: Record<string, unknown> = {\n\t\t\t\t\t...defaultProps.resizableOptions,\n\t\t\t\t\t...{ disabledColumns },\n\t\t\t\t\t...this.props.resizableOptions,\n\t\t\t\t};\n\n\t\t\t\tconst externalFunction = this.props.resizableOptions?.onResize;\n\t\t\t\toptions.onResize = (e: Event) => {\n\t\t\t\t\tif (fixedHeader) {\n\t\t\t\t\t\tthis.resizeFixedHeaders(e);\n\t\t\t\t\t\tthis.repositionResizers();\n\t\t\t\t\t}\n\n\t\t\t\t\tconst response = this.onResize();\n\n\t\t\t\t\tif (externalFunction) externalFunction(response);\n\t\t\t\t\tthis.resizeGrips();\n\t\t\t\t};\n\n\t\t\t\tif (remoteTable) {\n\t\t\t\t\tthis.resizer = new ColumnResizer(remoteTable, options);\n\t\t\t\t\tremoteTable.classList.remove('grip-padding');\n\n\t\t\t\t\tif (fixedHeader) this.resizeFixedHeaders();\n\n\t\t\t\t\tthis.resizeGrips();\n\t\t\t\t\tthis.repositionResizers();\n\t\t\t\t}\n\t\t\t\tthis.setState({}, () => this.state);\n\t\t\t}\n\t\t}\n\t}\n\n\tdisableResize() {\n\t\tif (this.resizer) this.resizer.reset({ disable: true });\n\t\tthis.gripRefs = [];\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 }\n\t\t\t\t\t\t: null,\n\t\t\t},\n\t\t});\n\t}\n\n\thandleKeyDownUp() {\n\t\tif (\n\t\t\tthis.state.mode === Mode.NAVIGATION ||\n\t\t\tthis.state.activeCell.rowIndex > 0 ||\n\t\t\t!this.isResizable()\n\t\t) {\n\t\t\tconst newRowIndex = Math.max(this.state.activeCell.rowIndex - 1, 0);\n\t\t\tconst activeElement = this.getFirstInteractiveElement(\n\t\t\t\tnewRowIndex,\n\t\t\t\tthis.state.activeCell.columnIndex\n\t\t\t);\n\t\t\tif (newRowIndex !== this.state.activeCell.rowIndex) {\n\t\t\t\tthis.setState((prevState) => ({\n\t\t\t\t\tactiveCell: {\n\t\t\t\t\t\trowIndex: newRowIndex,\n\t\t\t\t\t\tcolumnIndex: prevState.activeCell.columnIndex,\n\t\t\t\t\t},\n\t\t\t\t\tactiveElement,\n\t\t\t\t}));\n\n\t\t\t\tif (\n\t\t\t\t\tthis.state.mode === Mode.ACTIONABLE &&\n\t\t\t\t\tnewRowIndex === 0 &&\n\t\t\t\t\t!activeElement\n\t\t\t\t) {\n\t\t\t\t\tthis.makeGripVisible(this.state.activeCell.columnIndex);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\thandleKeyDownDown() {\n\t\tif (\n\t\t\tthis.state.mode === Mode.NAVIGATION ||\n\t\t\tthis.state.activeCell.rowIndex > 0 ||\n\t\t\t!this.isResizable()\n\t\t) {\n\t\t\tconst newRowIndex = Math.min(\n\t\t\t\tthis.state.activeCell.rowIndex + 1,\n\t\t\t\tthis.props.items.length\n\t\t\t);\n\t\t\tconst activeElement = this.getFirstInteractiveElement(\n\t\t\t\tnewRowIndex,\n\t\t\t\tthis.state.activeCell.columnIndex\n\t\t\t);\n\t\t\tif (newRowIndex !== this.state.activeCell.rowIndex) {\n\t\t\t\tthis.setState((prevState) => ({\n\t\t\t\t\tactiveCell: {\n\t\t\t\t\t\trowIndex: newRowIndex,\n\t\t\t\t\t\tcolumnIndex: prevState.activeCell.columnIndex,\n\t\t\t\t\t},\n\t\t\t\t\tactiveElement,\n\t\t\t\t}));\n\t\t\t}\n\t\t}\n\t}\n\n\tdisplaceByArrowKey(factor: number) {\n\t\tif (this.state.mode === Mode.ACTIONABLE) {\n\t\t\tconst { rowIndex, columnIndex } = this.state.activeCell;\n\n\t\t\tif (rowIndex === 0 && this.tableRef) {\n\t\t\t\tconst table = this.tableRef;\n\t\t\t\tconst headers = table.getElementsByTagName('th');\n\t\t\t\theaders[columnIndex].style.width = `${\n\t\t\t\t\tparseInt(headers[columnIndex].style.width, 10) + factor\n\t\t\t\t}px`;\n\t\t\t\tthis.resizeFixedHeaders();\n\t\t\t\tthis.repositionResizers();\n\t\t\t\tthis.resizeGrips();\n\t\t\t}\n\t\t}\n\t}\n\n\tmakeGripVisible(newIndex: number | null) {\n\t\tthis.gripRefs.forEach((grip, index) => {\n\t\t\tif (index === newIndex) grip.classList.add('grip-handle-active');\n\t\t\telse grip.classList.remove('grip-handle-active');\n\t\t});\n\t}\n\n\thandleKeyDownLeft() {\n\t\tif (\n\t\t\tthis.state.mode === Mode.NAVIGATION ||\n\t\t\tthis.state.activeCell.rowIndex > 0 ||\n\t\t\t!this.isResizable()\n\t\t) {\n\t\t\tconst newColumnIndex = Math.max(this.state.activeCell.columnIndex - 1, 0);\n\t\t\tconst activeElement = this.getFirstInteractiveElement(\n\t\t\t\tthis.state.activeCell.rowIndex,\n\t\t\t\tnewColumnIndex\n\t\t\t);\n\t\t\tif (newColumnIndex !== this.state.activeCell.columnIndex) {\n\t\t\t\tthis.setState((prevState) => ({\n\t\t\t\t\tactiveCell: {\n\t\t\t\t\t\trowIndex: prevState.activeCell.rowIndex,\n\t\t\t\t\t\tcolumnIndex: newColumnIndex,\n\t\t\t\t\t},\n\t\t\t\t\tactiveElement,\n\t\t\t\t}));\n\t\t\t}\n\t\t} else {\n\t\t\tthis.displaceByArrowKey(-10);\n\t\t}\n\t}\n\n\thandleKeyDownRight() {\n\t\tif (\n\t\t\tthis.state.mode === Mode.NAVIGATION ||\n\t\t\tthis.state.activeCell.rowIndex > 0 ||\n\t\t\t!this.isResizable()\n\t\t) {\n\t\t\tconst newColumnIndex = Math.min(\n\t\t\t\tthis.state.activeCell.columnIndex + 1,\n\t\t\t\tReact.Children.count(this.props.children) -\n\t\t\t\t\t(this.props.selectRows ? 0 : 1)\n\t\t\t);\n\t\t\tconst activeElement = this.getFirstInteractiveElement(\n\t\t\t\tthis.state.activeCell.rowIndex,\n\t\t\t\tnewColumnIndex\n\t\t\t);\n\t\t\tif (newColumnIndex !== this.state.activeCell.columnIndex) {\n\t\t\t\tthis.setState((prevState) => ({\n\t\t\t\t\tactiveCell: {\n\t\t\t\t\t\trowIndex: prevState.activeCell.rowIndex,\n\t\t\t\t\t\tcolumnIndex: newColumnIndex,\n\t\t\t\t\t},\n\t\t\t\t\tactiveElement,\n\t\t\t\t}));\n\t\t\t}\n\t\t} else {\n\t\t\tthis.displaceByArrowKey(10);\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\n\t\t\tif (rowIndex === 0 && !activeElement) {\n\t\t\t\tthis.makeGripVisible(columnIndex);\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\tthis.makeGripVisible(null);\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\tif (this.isResizable()) this.makeGripVisible(null);\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\n\t\t\t\tif (this.isResizable()) this.makeGripVisible(newIndex);\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 selection = this.props.selection ?? [];\n\t\tconst disabledSelection = this.props.disabledSelection ?? [];\n\t\tconst numRows = count(this.props.items);\n\t\tconst numSelected = count(\n\t\t\tselection.filter((item) => !disabledSelection.includes(item))\n\t\t);\n\t\tconst numNonHeaderRows = count(\n\t\t\tthis.props.items.filter(\n\t\t\t\t(item) =>\n\t\t\t\t\titem.type !== 'header-row' && !disabledSelection.includes(item)\n\t\t\t)\n\t\t);\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.getFixedHeader(),\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(\n\t\t\tthis.props.assistiveText,\n\t\t\tthis.props.assistiveTextForActionsHeader,\n\t\t\tthis.props.assistiveTextForSelectAllRows,\n\t\t\tthis.props.assistiveTextForColumnSortedAscending,\n\t\t\tthis.props.assistiveTextForColumnSortedDescending,\n\t\t\tthis.props.assistiveTextForColumnSort,\n\t\t\tthis.props.assistiveTextForSelectRow\n\t\t);\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\tlet component = (\n\t\t\t<React.Fragment>\n\t\t\t\t<TableContext.Provider\n\t\t\t\t\tvalue={this.getTableContext(this.state, this.getKeyboardNavigation())}\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.getFixedLayout(),\n\t\t\t\t\t\t\t\t'slds-table_header-fixed': this.getFixedHeader(),\n\t\t\t\t\t\t\t\t'slds-table_resizable-cols': this.getFixedLayout(),\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.getFixedLayout() && !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': this.props\n\t\t\t\t\t\t\t\t\t.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={this.getFixedLayout() ? '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\tthis.makeGripVisible(null);\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<DataTableHead\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.getFixedHeader()}\n\t\t\t\t\t\t\tfixedLayout={this.getFixedLayout()}\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()}-${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()}-${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\treturn this.props.onRenderSubHeadingRow &&\n\t\t\t\t\t\t\t\t\t\t\titem.type === 'header-row' ? (\n\t\t\t\t\t\t\t\t\t\t\tthis.props.onRenderSubHeadingRow({\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\tkey: rowId,\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) : (\n\t\t\t\t\t\t\t\t\t\t\t<DataTableRow\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.getFixedLayout()}\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\tselection={this.props.selection}\n\t\t\t\t\t\t\t\t\t\t\t\tdisabledSelection={this.props.disabledSelection}\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 })\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 null}\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.getFixedHeader() && 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.getFixedHeader()) {\n\t\t\tconst border = `1px solid ${colorGray5}`;\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 = tableBorderRadius;\n\t\t\t}\n\n\t\t\tconst fixedScrollerStyle: React.CSSProperties = {\n\t\t\t\theight: '100%',\n\t\t\t};\n\n\t\t\tif (this.props.resizable) {\n\t\t\t\tfixedScrollerStyle.overflowY = 'auto';\n\t\t\t\tfixedScrollerStyle.overflowX = 'hidden';\n\t\t\t} else {\n\t\t\t\tfixedScrollerStyle.overflow = '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\tref={(ref) => {\n\t\t\t\t\t\tthis.fixedHeaderContainer = ref;\n\t\t\t\t\t}}\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 DataTable;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,IAAM,EAAE,yBAAsB,GA+CxB,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,WAAW,CAAC;CACZ,mBAAmB,CAAC;CACpB,SAAS;CACT,gBAAgB;CAChB,WAAW;CACX,kBAAkB;EACjB,YAAY;EACZ,eAAe;CAChB;AACD,GAEM,IAAmB,GAEvB,GACA,GACA,GACA,GACA,GACA,GACA,MAC4B;CAC5B,IAAM,IAAiC;EACtC,GAAG,EAAa;EAChB,GAAG;CACJ;CAmBA,OAlBI,MACH,EAAO,gBAAgB,IAEpB,MACH,EAAO,gBAAgB,IAEpB,MACH,EAAO,wBAAwB,IAE5B,MACH,EAAO,yBAAyB,IAE7B,MACH,EAAO,aAAa,IAEjB,MACH,EAAO,YAAY,IAEb;AACR,GACA,CACD,GAEM,IAA0B,GAE9B,GACA,GACA,GACA,GACA,GACA,MAC2E;CAC3E,IAAM,IAAmC,CAAC,GACtC,IAAkC;CAkDtC,OAhDA,EAAM,SAAS,QAAQ,IAAW,MAAU;EAE3C,IAAM,IAAU,GACV,IAAc,GAAS;EAC7B,IAAI,KAAW,GAAa,gBAAgB,EAAgB,aAAa;GACxE,IAAM,EAAE,UAAU,GAAgB,GAAG,MAAgB,EAAQ,OACvD,IAAiC;IACtC;IACA;IACA;IACA,GAAG;GACJ;GACA,AAAI,MACH,EAAM,KAAK;GAGZ,IAAI,GACE,IAAY,GAC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KAAK,eAAe;MACjC,IAAI;MACG;MACD;MAEN,UAAU,KAAK;MACf,WAAW,KAAK,MAAM;MACtB,mBAAmB,KAAK,MAAM;MAC9B,YAAY;MACZ,SAAS,KAAK,MAAM;MACpB,UAAU,IAAQ;KAClB,GAPK,CAOL;IAEF,CAAC,IAED,KACG,CAAA,CACD;;EACe,CAAA,GACtB,KAAK,eAAe,KAAK,KAAK,MAAM,WACpC,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,eAAe,GAAG;GAC1B,IAAM,IAAS,aAAa,KACtB,IAA8B;IACnC,WAAW;IACX,QAAQ;GACT;GAEA,AAAI,KAAK,MAAM,WACd,EAAO,eAAe,GACtB,EAAO,aAAa,GACpB,EAAO,cAAc,GACrB,EAAO,YAAY,QACnB,EAAO,eAAe;GAGvB,IAAM,IAA0C,EAC/C,QAAQ,OACT;GASA,AAPI,KAAK,MAAM,aACd,EAAmB,YAAY,QAC/B,EAAmB,YAAY,YAE/B,EAAmB,WAAW,QAG/B,IACC,kBAAC,OAAD;IACC,WAAU;IACV,MAAM,MAAQ;KACb,KAAK,uBAAuB;IAC7B;IACA,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;KAEN,UAAA;IACG,CAAA;GACD,CAAA;EAEP;EAEA,OAAO;CACR;AACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interactive-element.js","names":[],"sources":["../../../../components/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\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 * `onRequestFocus`: Trigger to indicate that this element should be focused.\n * `requestFocus`: This wrapper overrides the `requestFocus` prop and provides its own value.\n * `tabIndex`: This wrapper overrides the `tabIndex` prop and provides its own value.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport default function createInteractiveElement(WrappedElement: ComponentType<any>): 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\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\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\tonRequestFocus(tableContext: TableContextValue, node: HTMLElement, ...args: any[]) {\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// 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 =\n\t\t\t\t\t\t\t\t\ttableContext.mode === Mode.ACTIONABLE ? 0 : -1;\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\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\ttabIndex,\n\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...{\n\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\tonClose: onClose.bind(this, tableContext),\n\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":";;;;;;;AAuBA,SAAwB,EAAyB,GAAyC;CAEzF,MAAM,UAA2B,EAAe;EAC/C;EAGA,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;EAGA,eAAe,GAAiC,GAAmB,GAAG,GAAa;GAClF,AAAI,EAAa,kBAChB,EAAK,MAAM,GACP,KAAK,MAAM,kBACd,KAAK,MAAM,eAAe,GAAG,CAAI;EAGpC;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,IACL,EAAa,SAAS,EAAK,aAAa,IAAI,IACvC,IAAmB,EAAa,0BACnC;KACA,SAAS,EAAQ,KAAK,MAAM,CAAY;KACxC,gBAAgB,EAAe,KAAK,MAAM,CAAY;KACtD;KACA;IACA,IACA,CAAC;IACJ,OACC,kBAAC,GAAD;KAEE,GAAG,KAAK;KAEP,QAAQ,EAAO,KAAK,MAAM,CAAY;KACtC,SAAS,EAAQ,KAAK,MAAM,CAAY;KAEzC,GAAG;IAEJ,CAAA;GAEH,EACqB,CAAA,EAED,CAAA;EAEzB;CACD;CAOA,OAJA,EAA4B,cAAc,qBACzC,EAAe,eAAe,aAGxB;AACR"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interactive-link.js","names":[],"sources":["../../../../components/data-table/interactive-link.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 InteractiveElement from './interactive-element';\nimport Link from './private/link';\n\nexport default InteractiveElement(Link);\n"],"mappings":";;;AAMA,IAAA,IAAe,EAAmB,CAAI"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cell-context.js","names":[],"sources":["../../../../../components/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":";;AAOA,IAAM,IAAc,EAAM,cAAgC;CACzD,UAAU;CACV,aAAa;AACd,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cell-fixed.js","names":[],"sources":["../../../../../components/data-table/private/cell-fixed.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 React, { ReactNode } from 'react';\n\ninterface CellFixedProps {\n\tchildren?: ReactNode;\n}\n\n/**\n * Used internally, provides fixed cell rendering\n */\nconst CellFixed: React.FC<CellFixedProps> = ({ children }) => (\n\t<div\n\t\tclassName=\"slds-cell-fixed\"\n\t\tstyle={{\n\t\t\tdisplay: 'flex',\n\t\t\tflexDirection: 'row',\n\t\t\tflexWrap: 'nowrap',\n\t\t\tlineHeight: '2rem',\n\t\t}}\n\t>\n\t\t{children}\n\t</div>\n);\n\nexport default CellFixed;\n"],"mappings":";;;AAYA,IAAM,KAAuC,EAAE,kBAC9C,kBAAC,OAAD;CACC,WAAU;CACV,OAAO;EACN,SAAS;EACT,eAAe;EACf,UAAU;EACV,YAAY;CACb;CAEC;AACG,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context-helper.js","names":[],"sources":["../../../../../components/data-table/private/context-helper.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 { useCallback } from 'react';\nimport { TableContextValue } from './table-context';\nimport { CellContextValue } from './cell-context';\n\ninterface ContextHelperResult {\n\ttabIndex: number | undefined;\n\thasFocus: boolean;\n\thandleFocus: () => void;\n\thandleKeyDown: (event: React.KeyboardEvent) => void;\n}\n\n/**\n * Calculates data table keyboard navigation state based on currently selected cell\n */\nexport default function useTableContextHelper(\n\ttableContext: TableContextValue,\n\tcellContext: CellContextValue,\n\tfixedLayout?: boolean\n): ContextHelperResult {\n\tconst isActive =\n\t\ttableContext.activeCell.rowIndex === cellContext.rowIndex &&\n\t\ttableContext.activeCell.columnIndex === cellContext.columnIndex;\n\n\tconst hasFocus = Boolean(fixedLayout && tableContext.tableHasFocus && isActive);\n\tconst { changeActiveCell, handleKeyDown: handleTableKeyDown } = tableContext;\n\n\tconst handleFocus = useCallback(() => {\n\t\tif (fixedLayout && tableContext.allowKeyboardNavigation) {\n\t\t\tchangeActiveCell(cellContext.rowIndex, cellContext.columnIndex);\n\t\t}\n\t}, [\n\t\tfixedLayout,\n\t\ttableContext.allowKeyboardNavigation,\n\t\tchangeActiveCell,\n\t\tcellContext.rowIndex,\n\t\tcellContext.columnIndex,\n\t]);\n\n\tconst handleKeyDown = useCallback(\n\t\t(event: React.KeyboardEvent) => {\n\t\t\tif (fixedLayout && tableContext.allowKeyboardNavigation) {\n\t\t\t\thandleTableKeyDown(event);\n\t\t\t}\n\t\t},\n\t\t[fixedLayout, tableContext.allowKeyboardNavigation, handleTableKeyDown]\n\t);\n\n\tconst tabIndex =\n\t\tfixedLayout &&\n\t\tisActive &&\n\t\t!tableContext.activeElement &&\n\t\ttableContext.allowKeyboardNavigation\n\t\t\t? 0\n\t\t\t: undefined;\n\n\treturn { tabIndex, hasFocus, handleFocus, handleKeyDown };\n}\n"],"mappings":";;AAiBA,SAAwB,EACvB,GACA,GACA,GACsB;CACtB,IAAM,IACL,EAAa,WAAW,aAAa,EAAY,YACjD,EAAa,WAAW,gBAAgB,EAAY,aAE/C,IAAW,GAAQ,KAAe,EAAa,iBAAiB,IAChE,EAAE,qBAAkB,eAAe,MAAuB,GAE1D,IAAc,QAAkB;EACrC,AAAI,KAAe,EAAa,2BAC/B,EAAiB,EAAY,UAAU,EAAY,WAAW;CAEhE,GAAG;EACF;EACA,EAAa;EACb;EACA,EAAY;EACZ,EAAY;CACb,CAAC,GAEK,IAAgB,GACpB,MAA+B;EAC/B,AAAI,KAAe,EAAa,2BAC/B,EAAmB,CAAK;CAE1B,GACA;EAAC;EAAa,EAAa;EAAyB;CAAkB,CACvE;CAUA,OAAO;EAAE,UAPR,KACA,KACA,CAAC,EAAa,iBACd,EAAa,0BACV,IACA,KAAA;EAEe;EAAU;EAAa;CAAc;AACzD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"head.js","names":[],"sources":["../../../../../components/data-table/private/head.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 React, { useContext, SyntheticEvent, ReactNode } from 'react';\nimport classNames from 'classnames';\n\nimport CellFixed from './cell-fixed';\nimport Checkbox from '../../checkbox';\nimport HeaderCell from './header-cell';\nimport InteractiveElement from '../interactive-element';\nimport CellContext from './cell-context';\nimport TableContext from './table-context';\nimport useContextHelper from './context-helper';\n\nimport { DATA_TABLE_HEAD } from '../../../utilities/constants';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst InteractiveCheckbox = InteractiveElement(Checkbox as any) as React.ComponentType<any>;\n\ninterface DataTableColumnConfig {\n\tCell: React.ComponentType<Record<string, unknown>>;\n\tprops: Record<string, unknown>;\n}\n\ninterface AssistiveText {\n\tactionsHeader?: string;\n\tselectAllRows?: string;\n\tselectRowGroup?: string;\n\tcolumnSort?: string;\n\tcolumnSortedAscending?: string;\n\tcolumnSortedDescending?: string;\n}\n\ninterface ActionsHeaderProps {\n\tassistiveText?: string;\n\tcolumnIndex: number;\n\tfixedLayout?: boolean;\n\tfixedHeader?: boolean;\n\theaderRefs?: (ref: HTMLElement | null, index: 'action' | 'select' | number) => void;\n}\n\nconst ActionsHeader: React.FC<ActionsHeaderProps> = (props) => {\n\tconst tableContext = useContext(TableContext);\n\tconst cellContext = { columnIndex: props.columnIndex, rowIndex: 0 };\n\tconst { tabIndex, hasFocus, handleFocus, handleKeyDown } = useContextHelper(\n\t\ttableContext,\n\t\tcellContext,\n\t\tprops.fixedLayout\n\t);\n\tconst { fixedHeader } = props;\n\n\tconst getContent = (style?: React.CSSProperties) => (\n\t\t<div className=\"slds-th__action\" style={style}>\n\t\t\t<span className=\"slds-assistive-text\">{props.assistiveText}</span>\n\t\t</div>\n\t);\n\n\treturn (\n\t\t<th\n\t\t\tclassName={classNames({ 'slds-has-focus': hasFocus })}\n\t\t\tref={(ref) => {\n\t\t\t\tif (props.headerRefs) {\n\t\t\t\t\tprops.headerRefs(ref, 'action');\n\t\t\t\t}\n\t\t\t\tif (ref && hasFocus) {\n\t\t\t\t\tref.focus();\n\t\t\t\t}\n\t\t\t}}\n\t\t\tscope=\"col\"\n\t\t\tstyle={{\n\t\t\t\theight: fixedHeader ? 0 : undefined,\n\t\t\t\tlineHeight: fixedHeader ? 0 : undefined,\n\t\t\t\twidth: '3.25rem',\n\t\t\t}}\n\t\t\tonFocus={handleFocus}\n\t\t\tonKeyDown={handleKeyDown}\n\t\t\ttabIndex={tabIndex}\n\t\t>\n\t\t\t{getContent(\n\t\t\t\tfixedHeader\n\t\t\t\t\t? {\n\t\t\t\t\t\t\theight: 0,\n\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\tpaddingBottom: 0,\n\t\t\t\t\t\t\tpaddingTop: 0,\n\t\t\t\t\t\t\tvisibility: 'hidden',\n\t\t\t\t\t }\n\t\t\t\t\t: undefined\n\t\t\t)}\n\t\t\t{fixedHeader ? (\n\t\t\t\t<CellFixed>\n\t\t\t\t\t{getContent({\n\t\t\t\t\t\tlineHeight: 1,\n\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t})}\n\t\t\t\t</CellFixed>\n\t\t\t) : null}\n\t\t</th>\n\t);\n};\n\ninterface SelectHeaderProps {\n\tallSelected?: boolean;\n\tassistiveText?: {\n\t\tselectAllRows?: string;\n\t\tselectRowGroup?: string;\n\t};\n\tcanSelectRows?: boolean | 'checkbox' | 'radio';\n\tfixedHeader?: boolean;\n\tfixedLayout?: boolean;\n\theaderRefs?: (ref: HTMLElement | null, index: 'action' | 'select' | number) => void;\n\tid?: string;\n\tindeterminateSelected?: boolean;\n\tonToggleAll?: (event: SyntheticEvent, data: { checked: boolean }) => void;\n}\n\nconst SelectHeader: React.FC<SelectHeaderProps> = (props) => {\n\tconst tableContext = useContext(TableContext);\n\tconst cellContext = { columnIndex: 0, rowIndex: 0 };\n\tconst { tabIndex, hasFocus, handleFocus, handleKeyDown } = useContextHelper(\n\t\ttableContext,\n\t\tcellContext,\n\t\tprops.fixedLayout\n\t);\n\tconst { fixedHeader, canSelectRows } = props;\n\n\tconst getContent = (\n\t\tidSuffix: string,\n\t\tstyle?: React.CSSProperties,\n\t\tariaHidden?: boolean\n\t): ReactNode => {\n\t\tif (canSelectRows === 'radio') {\n\t\t\tif (!ariaHidden) {\n\t\t\t\treturn (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName=\"slds-truncate slds-assistive-text\"\n\t\t\t\t\t\tid={`${props.id}-column-group-header-row-select`}\n\t\t\t\t\t\ttitle={props.assistiveText?.selectRowGroup}\n\t\t\t\t\t>\n\t\t\t\t\t\t{props.assistiveText?.selectRowGroup}\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\n\t\tif (canSelectRows === true || canSelectRows === 'checkbox') {\n\t\t\treturn (\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"slds-th__action slds-th__action_form\"\n\t\t\t\t\taria-hidden={ariaHidden ? true : undefined}\n\t\t\t\t\tstyle={style}\n\t\t\t\t>\n\t\t\t\t\t{!ariaHidden ? (\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tid={`${props.id}-column-group-header-row-select`}\n\t\t\t\t\t\t\tclassName=\"slds-assistive-text\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{props.assistiveText?.selectAllRows}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) : null}\n\t\t\t\t\t<InteractiveCheckbox\n\t\t\t\t\t\tassistiveText={{\n\t\t\t\t\t\t\tlabel: props.assistiveText?.selectAllRows,\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tchecked={props.allSelected}\n\t\t\t\t\t\tindeterminate={props.indeterminateSelected}\n\t\t\t\t\t\tid={`${props.id}-${idSuffix}`}\n\t\t\t\t\t\tname={!ariaHidden ? 'SelectAll' : undefined}\n\t\t\t\t\t\tonChange={props.onToggleAll}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\treturn null;\n\t};\n\n\treturn (\n\t\t<th\n\t\t\tclassName={classNames('slds-text-align_right', {\n\t\t\t\t'slds-has-focus': hasFocus,\n\t\t\t})}\n\t\t\tref={(ref) => {\n\t\t\t\tif (props.headerRefs) {\n\t\t\t\t\tprops.headerRefs(ref, 'select');\n\t\t\t\t}\n\t\t\t\tif (ref && hasFocus) {\n\t\t\t\t\tref.focus();\n\t\t\t\t}\n\t\t\t}}\n\t\t\tscope=\"col\"\n\t\t\tstyle={{\n\t\t\t\theight: fixedHeader ? 0 : undefined,\n\t\t\t\tlineHeight: fixedHeader ? 0 : undefined,\n\t\t\t\twidth: '3.25rem',\n\t\t\t}}\n\t\t\tonFocus={handleFocus}\n\t\t\tonKeyDown={handleKeyDown}\n\t\t\ttabIndex={tabIndex}\n\t\t>\n\t\t\t<CellContext.Provider value={cellContext}>\n\t\t\t\t{getContent(\n\t\t\t\t\t'SelectAll-fixed-header',\n\t\t\t\t\tfixedHeader\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\theight: 0,\n\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\tpaddingBottom: 0,\n\t\t\t\t\t\t\t\tpaddingTop: 0,\n\t\t\t\t\t\t\t\tvisibility: 'hidden',\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: undefined,\n\t\t\t\t\tfixedHeader\n\t\t\t\t)}\n\t\t\t\t{fixedHeader ? (\n\t\t\t\t\t<CellFixed>\n\t\t\t\t\t\t{getContent('SelectAll', {\n\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\t\t\tlineHeight: 1,\n\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t})}\n\t\t\t\t\t</CellFixed>\n\t\t\t\t) : null}\n\t\t\t</CellContext.Provider>\n\t\t</th>\n\t);\n};\n\nexport interface DataTableHeadProps {\n\tassistiveText?: AssistiveText;\n\tallSelected?: boolean;\n\theaderRefs?: (ref: HTMLElement | null, index: 'action' | 'select' | number) => void;\n\tisHidden?: boolean;\n\tindeterminateSelected?: boolean;\n\tcanSelectRows?: boolean | 'checkbox' | 'radio';\n\tcolumns?: DataTableColumnConfig[];\n\tfixedHeader?: boolean;\n\tfixedLayout?: boolean;\n\tid?: string;\n\tonToggleAll?: (event: SyntheticEvent, data: { checked: boolean }) => void;\n\tonSort?: (\n\t\tdata: { property: string; sortDirection: 'asc' | 'desc' },\n\t\tevent: SyntheticEvent\n\t) => void;\n\tshowRowActions?: boolean;\n}\n\n/**\n * Used internally, provides header row rendering to the DataTable.\n */\nconst DataTableHead: React.FC<DataTableHeadProps> = (props) => {\n\tconst getActionsHeader = () => {\n\t\tif (props.showRowActions) {\n\t\t\treturn (\n\t\t\t\t<ActionsHeader\n\t\t\t\t\tassistiveText={props.assistiveText?.actionsHeader}\n\t\t\t\t\tcolumnIndex={\n\t\t\t\t\t\tprops.canSelectRows\n\t\t\t\t\t\t\t? (props.columns?.length ?? 0) + 1\n\t\t\t\t\t\t\t: props.columns?.length ?? 0\n\t\t\t\t\t}\n\t\t\t\t\tfixedLayout={props.fixedLayout}\n\t\t\t\t\tfixedHeader={props.fixedHeader}\n\t\t\t\t\theaderRefs={props.headerRefs}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t};\n\n\tconst getSelectHeader = () => {\n\t\tif (props.canSelectRows) {\n\t\t\treturn (\n\t\t\t\t<SelectHeader\n\t\t\t\t\tallSelected={props.allSelected}\n\t\t\t\t\tassistiveText={{\n\t\t\t\t\t\tselectAllRows: props.assistiveText?.selectAllRows,\n\t\t\t\t\t\tselectRowGroup: props.assistiveText?.selectRowGroup,\n\t\t\t\t\t}}\n\t\t\t\t\tcanSelectRows={props.canSelectRows}\n\t\t\t\t\tfixedHeader={props.fixedHeader}\n\t\t\t\t\tfixedLayout={props.fixedLayout}\n\t\t\t\t\theaderRefs={props.headerRefs}\n\t\t\t\t\tid={props.id}\n\t\t\t\t\tindeterminateSelected={props.indeterminateSelected}\n\t\t\t\t\tonToggleAll={props.onToggleAll}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t};\n\n\tconst actionsHeader = getActionsHeader();\n\tconst selectHeader = getSelectHeader();\n\n\treturn (\n\t\t<thead\n\t\t\tclassName={classNames({\n\t\t\t\t'slds-assistive-text': props.isHidden,\n\t\t\t})}\n\t\t>\n\t\t\t<tr className=\"slds-line-height_reset\">\n\t\t\t\t{selectHeader}\n\t\t\t\t{props.columns?.map((column, index) => (\n\t\t\t\t\t<CellContext.Provider\n\t\t\t\t\t\tkey={`${props.id}-${column.props.property}`}\n\t\t\t\t\t\tvalue={{\n\t\t\t\t\t\t\tcolumnIndex: props.canSelectRows ? index + 1 : index,\n\t\t\t\t\t\t\trowIndex: 0,\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<HeaderCell\n\t\t\t\t\t\t\tassistiveText={props.assistiveText}\n\t\t\t\t\t\t\tcellRef={(ref) => {\n\t\t\t\t\t\t\t\tif (props.headerRefs) {\n\t\t\t\t\t\t\t\t\tprops.headerRefs(ref, index);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tfixedHeader={props.fixedHeader}\n\t\t\t\t\t\t\tfixedLayout={props.fixedLayout}\n\t\t\t\t\t\t\tid={`${props.id}-${column.props.property}`}\n\t\t\t\t\t\t\tonSort={props.onSort}\n\t\t\t\t\t\t\t{...column.props}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</CellContext.Provider>\n\t\t\t\t))}\n\t\t\t\t{actionsHeader}\n\t\t\t</tr>\n\t\t</thead>\n\t);\n};\n\nDataTableHead.displayName = DATA_TABLE_HEAD;\n\nexport default DataTableHead;\n"],"mappings":";;;;;;;;;;;;AAiBA,IAAM,IAAsB,EAAmB,CAAe,GAwBxD,KAA+C,MAAU;CAC9D,IAAM,IAAe,EAAW,CAAY,GACtC,IAAc;EAAE,aAAa,EAAM;EAAa,UAAU;CAAE,GAC5D,EAAE,aAAU,aAAU,gBAAa,qBAAkB,EAC1D,GACA,GACA,EAAM,WACP,GACM,EAAE,mBAAgB,GAElB,KAAc,MACnB,kBAAC,OAAD;EAAK,WAAU;EAAyB;EACvC,UAAA,kBAAC,QAAD;GAAM,WAAU;GAAuB,UAAA,EAAM;EAAoB,CAAA;CAC7D,CAAA;CAGN,OACC,kBAAC,MAAD;EACC,WAAW,EAAW,EAAE,kBAAkB,EAAS,CAAC;EACpD,MAAM,MAAQ;GAIb,AAHI,EAAM,cACT,EAAM,WAAW,GAAK,QAAQ,GAE3B,KAAO,KACV,EAAI,MAAM;EAEZ;EACA,OAAM;EACN,OAAO;GACN,QAAQ,IAAc,IAAI,KAAA;GAC1B,YAAY,IAAc,IAAI,KAAA;GAC9B,OAAO;EACR;EACA,SAAS;EACT,WAAW;EACD;EAlBX,UAAA,CAoBE,EACA,IACG;GACA,QAAQ;GACR,UAAU;GACV,eAAe;GACf,YAAY;GACZ,YAAY;EACZ,IACA,KAAA,CACJ,GACC,IACA,kBAAC,GAAD,EAAA,UACE,EAAW;GACX,YAAY;GACZ,OAAO;EACR,CAAC,EACS,CAAA,IACR,IACD;;AAEN,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G,GAAG,EAAO,MAAM,UAmBZ,CACtB;IACA;GACE;;CACE,CAAA;AAET;AAEA,EAAc,cAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"header-cell.js","names":[],"sources":["../../../../../components/data-table/private/header-cell.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 React, {\n\tuseContext,\n\tuseEffect,\n\tuseRef,\n\tuseState,\n\tSyntheticEvent,\n\tReactNode,\n} from 'react';\nimport classNames from 'classnames';\nimport isFunction from 'lodash.isfunction';\n\nimport CellFixed from './cell-fixed';\nimport Icon from '../../icon';\n\nimport checkProps from '../column-check-props';\n\nimport Link from './link';\nimport InteractiveLink from '../interactive-link';\nimport CellContext from './cell-context';\nimport TableContext from './table-context';\nimport useContextHelper from './context-helper';\n\nimport {\n\tDATA_TABLE_HEADER_CELL,\n\tDATA_TABLE_COLUMN,\n} from '../../../utilities/constants';\n\ninterface AssistiveText {\n\tactionsHeader?: string;\n\tcolumnSort?: string;\n\tcolumnSortedAscending?: string;\n\tcolumnSortedDescending?: string;\n\tselectAllRows?: string;\n\tselectRow?: string;\n}\n\nexport interface DataTableHeaderCellProps {\n\tassistiveText?: AssistiveText;\n\tcellRef?: (ref: HTMLElement | null) => void;\n\tfixedHeader?: boolean;\n\tfixedLayout?: boolean;\n\tid: string;\n\tisDefaultSortDescending?: boolean;\n\tisSorted?: boolean;\n\tlabel?: string | ReactNode;\n\tonSort?: (\n\t\tdata: { property: string; sortDirection: 'asc' | 'desc' },\n\t\tevent: SyntheticEvent\n\t) => void;\n\tproperty?: string;\n\tsortable?: boolean;\n\tsortDirection?: 'desc' | 'asc';\n\twidth?: string;\n\t/** @deprecated */\n\tassistiveTextForColumnSort?: string;\n\t/** @deprecated */\n\tassistiveTextForColumnSortedAscending?: string;\n\t/** @deprecated */\n\tassistiveTextForColumnSortedDescending?: string;\n}\n\n/**\n * Used internally, renders each individual column heading.\n */\nconst DataTableHeaderCell: React.FC<DataTableHeaderCellProps> = (props) => {\n\tconst [sortDirection, setSortDirection] = useState<'asc' | 'desc' | null>(\n\t\tnull\n\t);\n\tconst prevIsSorted = useRef<boolean | null>(null);\n\tconst tableContext = useContext(TableContext);\n\tconst cellContext = useContext(CellContext);\n\tconst { tabIndex, hasFocus, handleFocus, handleKeyDown } = useContextHelper(\n\t\ttableContext,\n\t\tcellContext,\n\t\tprops.fixedLayout\n\t);\n\n\tuseEffect(() => {\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t(checkProps as any)(DATA_TABLE_COLUMN, props);\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, []);\n\n\tuseEffect(() => {\n\t\tif (prevIsSorted.current === true && props.isSorted === false) {\n\t\t\tsetSortDirection(null);\n\t\t}\n\t\tprevIsSorted.current = props.isSorted ?? null;\n\t}, [props.isSorted]);\n\n\tconst handleSort = (e: SyntheticEvent) => {\n\t\te.preventDefault();\n\n\t\tconst oldSortDirection = props.sortDirection || sortDirection;\n\t\tconst newSortDirection = (function sortDirectionFunction(\n\t\t\tdirection: 'asc' | 'desc' | null,\n\t\t\tisDefaultSortDescending?: boolean\n\t\t): 'asc' | 'desc' {\n\t\t\tswitch (direction) {\n\t\t\t\tcase 'asc':\n\t\t\t\t\treturn 'desc';\n\t\t\t\tcase 'desc':\n\t\t\t\t\treturn 'asc';\n\t\t\t\tcase null:\n\t\t\t\t\treturn isDefaultSortDescending ? 'desc' : 'asc';\n\t\t\t\tdefault:\n\t\t\t\t\treturn 'asc';\n\t\t\t}\n\t\t})(oldSortDirection, props.isDefaultSortDescending);\n\n\t\tconst data = {\n\t\t\tproperty: props.property || '',\n\t\t\tsortDirection: newSortDirection,\n\t\t};\n\n\t\tsetSortDirection(newSortDirection);\n\n\t\tif (isFunction(props.onSort)) {\n\t\t\tprops.onSort(data, e);\n\t\t}\n\t};\n\n\tconst { fixedHeader, isSorted, label, sortable, width, property } = props;\n\n\tconst labelType = typeof label;\n\tconst effectiveSortDirection =\n\t\tprops.sortDirection ||\n\t\tsortDirection ||\n\t\t(props.isDefaultSortDescending ? 'desc' : undefined);\n\tconst expandedSortDirection =\n\t\teffectiveSortDirection === 'desc' ? 'descending' : 'ascending';\n\tconst ariaSort = isSorted ? expandedSortDirection : 'none';\n\n\tconst getFixedLayoutSubRenders = (isHidden?: boolean) => {\n\t\tif (sortable) {\n\t\t\tconst SortLink = isHidden ? Link : InteractiveLink;\n\t\t\treturn (\n\t\t\t\t<SortLink\n\t\t\t\t\thref=\"#\"\n\t\t\t\t\tclassName=\"slds-th__action slds-text-link_reset\"\n\t\t\t\t\tonClick={handleSort}\n\t\t\t\t\trole=\"button\"\n\t\t\t\t>\n\t\t\t\t\t<span className=\"slds-assistive-text\">\n\t\t\t\t\t\t{props.assistiveTextForColumnSort || props.assistiveText?.columnSort}{' '}\n\t\t\t\t\t</span>\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName=\"slds-truncate\"\n\t\t\t\t\t\ttitle={labelType === 'string' ? (label as string) : undefined}\n\t\t\t\t\t>\n\t\t\t\t\t\t{label}\n\t\t\t\t\t</span>\n\t\t\t\t\t<Icon\n\t\t\t\t\t\tclassName=\"slds-is-sortable__icon\"\n\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\tname={effectiveSortDirection === 'desc' ? 'arrowdown' : 'arrowup'}\n\t\t\t\t\t\tsize=\"x-small\"\n\t\t\t\t\t/>\n\t\t\t\t\t{effectiveSortDirection ? (\n\t\t\t\t\t\t<span className=\"slds-assistive-text\" aria-atomic=\"true\">\n\t\t\t\t\t\t\t{effectiveSortDirection === 'asc'\n\t\t\t\t\t\t\t\t? props.assistiveTextForColumnSortedAscending ||\n\t\t\t\t\t\t\t\t props.assistiveText?.columnSortedAscending\n\t\t\t\t\t\t\t\t: props.assistiveTextForColumnSortedDescending ||\n\t\t\t\t\t\t\t\t props.assistiveText?.columnSortedDescending}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) : null}\n\t\t\t\t</SortLink>\n\t\t\t);\n\t\t}\n\t\treturn (\n\t\t\t<span\n\t\t\t\tclassName=\"slds-p-horizontal_x-small slds-th__action\"\n\t\t\t\tstyle={{ display: 'flex' }}\n\t\t\t>\n\t\t\t\t<span\n\t\t\t\t\tclassName=\"slds-truncate\"\n\t\t\t\t\ttitle={labelType === 'string' ? (label as string) : undefined}\n\t\t\t\t>\n\t\t\t\t\t{label}\n\t\t\t\t</span>\n\t\t\t</span>\n\t\t);\n\t};\n\n\t// `getFixedLayoutSubRenders` already returns a single element (a sort link or a\n\t// span), so return it directly rather than wrapping it in a Fragment. The\n\t// callers below `cloneElement` this result to inject `style`, which React only\n\t// applies to real elements — a Fragment silently drops it (and warns).\n\tconst getHeaderCellContent = (isHidden?: boolean): React.ReactElement =>\n\t\tprops.fixedLayout ? (\n\t\t\tgetFixedLayoutSubRenders(isHidden)\n\t\t) : (\n\t\t\t<div\n\t\t\t\tclassName=\"slds-truncate\"\n\t\t\t\ttitle={labelType === 'string' ? (label as string) : undefined}\n\t\t\t>\n\t\t\t\t{label}\n\t\t\t</div>\n\t\t);\n\n\treturn (\n\t\t<th\n\t\t\tid={`${props.id}-${property}-th`}\n\t\t\taria-label={labelType === 'string' ? (label as string) : undefined}\n\t\t\taria-sort={ariaSort}\n\t\t\tclassName={classNames({\n\t\t\t\t'slds-is-sortable': sortable,\n\t\t\t\t'slds-is-sorted': isSorted,\n\t\t\t\t[`slds-is-sorted_${effectiveSortDirection}`]: effectiveSortDirection,\n\t\t\t\t'slds-is-sorted_asc': isSorted && !effectiveSortDirection,\n\t\t\t\t'slds-has-focus': hasFocus,\n\t\t\t})}\n\t\t\tonFocus={handleFocus}\n\t\t\tonKeyDown={handleKeyDown}\n\t\t\tref={(ref) => {\n\t\t\t\tif (props.cellRef) {\n\t\t\t\t\tprops.cellRef(ref);\n\t\t\t\t}\n\t\t\t\tif (ref && hasFocus) {\n\t\t\t\t\tref.focus();\n\t\t\t\t}\n\t\t\t}}\n\t\t\tscope=\"col\"\n\t\t\tstyle={\n\t\t\t\tfixedHeader || width\n\t\t\t\t\t? {\n\t\t\t\t\t\t\theight: fixedHeader ? 0 : undefined,\n\t\t\t\t\t\t\tlineHeight: fixedHeader ? 0 : undefined,\n\t\t\t\t\t\t\twidth: width || undefined,\n\t\t\t\t\t }\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\ttabIndex={tabIndex}\n\t\t>\n\t\t\t{fixedHeader\n\t\t\t\t? React.cloneElement(\n\t\t\t\t\t\tgetHeaderCellContent(true) as React.ReactElement<{ style?: React.CSSProperties }>,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\theight: 0,\n\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\tpaddingBottom: 0,\n\t\t\t\t\t\t\t\tpaddingTop: 0,\n\t\t\t\t\t\t\t\tvisibility: 'hidden' as const,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}\n\t\t\t\t )\n\t\t\t\t: getHeaderCellContent()}\n\t\t\t{fixedHeader ? (\n\t\t\t\t<CellFixed>\n\t\t\t\t\t{React.cloneElement(\n\t\t\t\t\t\tgetHeaderCellContent() as React.ReactElement<{\n\t\t\t\t\t\t\tstyle?: React.CSSProperties;\n\t\t\t\t\t\t\ttabIndex?: number;\n\t\t\t\t\t\t}>,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\tflex: '1 1 auto',\n\t\t\t\t\t\t\t\tlineHeight: 1.25,\n\t\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttabIndex: sortable ? 0 : undefined,\n\t\t\t\t\t\t}\n\t\t\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A;EAChB,IACA,KAAA;EAEM;EA/BX,UAAA,CAiCE,IACE,EAAM,aACN,EAAqB,EAAI,GACzB,EACC,OAAO;GACN,SAAS;GACT,QAAQ;GACR,UAAU;GACV,eAAe;GACf,YAAY;GACZ,YAAY;EACb,EACD,CACA,IACA,EAAqB,GACvB,IACA,kBAAC,GAAD,EAAA,UACE,EAAM,aACN,EAAqB,GAIrB;GACC,OAAO;IACN,YAAY;IACZ,SAAS;IACT,MAAM;IACN,YAAY;IACZ,OAAO;GACR;GACA,UAAU,IAAW,IAAI,KAAA;EAC1B,CACD,EACU,CAAA,IACR,IACD;;AAEN;AAEA,EAAoB,cAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"link.js","names":[],"sources":["../../../../../components/data-table/private/link.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 React, { ReactNode, AnchorHTMLAttributes } from 'react';\nimport KEYS from '../../../utilities/key-code';\n\ninterface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {\n\tchildren?: ReactNode;\n\tonRequestFocus?: (node: HTMLAnchorElement) => void;\n\tonOpen?: () => void;\n\tonClose?: () => void;\n\trequestFocus?: boolean;\n}\n\nconst Link: React.FC<LinkProps> = (props) => {\n\t// Avoid passing props to <a> that it doesn't understand\n\tconst {\n\t\tonRequestFocus,\n\t\tonOpen,\n\t\tonClose,\n\t\trequestFocus,\n\t\tchildren,\n\t\tonClick,\n\t\t...passThroughProps\n\t} = props;\n\n\treturn (\n\t\t<a\n\t\t\tref={(node) => {\n\t\t\t\tif (node && requestFocus && onRequestFocus) {\n\t\t\t\t\tonRequestFocus(node);\n\t\t\t\t}\n\t\t\t}}\n\t\t\tonKeyDown={(event) => {\n\t\t\t\tif (event.keyCode === KEYS.ENTER && onClick) {\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\t\tonClick(event as any);\n\t\t\t\t}\n\t\t\t}}\n\t\t\tonClick={onClick}\n\t\t\t{...passThroughProps}\n\t\t>\n\t\t\t{children}\n\t\t</a>\n\t);\n};\n\nexport default Link;\n"],"mappings":";;;;AAcA,IAAM,KAA6B,MAAU;CAE5C,IAAM,EACL,mBACA,WACA,YACA,iBACA,aACA,YACA,GAAG,MACA;CAEJ,OACC,kBAAC,KAAD;EACC,MAAM,MAAS;GACd,AAAI,KAAQ,KAAgB,KAC3B,EAAe,CAAI;EAErB;EACA,YAAY,MAAU;GACrB,AAAI,EAAM,YAAY,EAAK,SAAS,KAEnC,EAAQ,CAAY;EAEtB;EACS;EACT,GAAI;EAEH;CACC,CAAA;AAEL"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mode.js","names":[],"sources":["../../../../../components/data-table/private/mode.ts"],"sourcesContent":["const Mode = Object.freeze({\n\tNAVIGATION: 'navigation' as const,\n\tACTIONABLE: 'actionable' as const,\n});\n\nexport type ModeType = (typeof Mode)[keyof typeof Mode];\n\nexport default Mode;\n"],"mappings":";AAAA,IAAM,IAAO,OAAO,OAAO;CAC1B,YAAY;CACZ,YAAY;AACb,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"row.js","names":[],"sources":["../../../../../components/data-table/private/row.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 React, { useCallback, useContext, useMemo, SyntheticEvent, ReactNode } from 'react';\nimport classNames from 'classnames';\nimport find from 'lodash.find';\n\nimport Checkbox from '../../checkbox';\nimport Radio from '../../radio';\n\nimport {\n\tDATA_TABLE_ROW,\n\tDATA_TABLE_ROW_ACTIONS,\n\tDATA_TABLE_CELL,\n} from '../../../utilities/constants';\n\nimport InteractiveElement from '../interactive-element';\nimport CellContext from './cell-context';\nimport TableContext from './table-context';\nimport useContextHelper from './context-helper';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst InteractiveCheckbox = InteractiveElement(Checkbox as any) as React.ComponentType<any>;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst InteractiveRadio = InteractiveElement(Radio as any) as React.ComponentType<any>;\n\ninterface DataTableItem {\n\tid: string;\n\t[key: string]: unknown;\n}\n\ninterface DataTableColumnConfig {\n\tCell: React.ComponentType<Record<string, unknown>>;\n\tprops: {\n\t\tproperty?: string;\n\t\ttruncate?: boolean;\n\t\tprimaryColumn?: boolean;\n\t\twidth?: string;\n\t\t[key: string]: unknown;\n\t};\n}\n\ninterface AssistiveText {\n\tselectRow?: string;\n\t[key: string]: unknown;\n}\n\nexport interface DataTableRowProps {\n\tassistiveText?: AssistiveText;\n\tcanSelectRows?: boolean | 'checkbox' | 'radio';\n\tclassName?: string;\n\tcolumns?: DataTableColumnConfig[];\n\tfixedLayout?: boolean;\n\tid: string;\n\tindex?: number;\n\titem: DataTableItem;\n\tonToggle?: (item: DataTableItem, selected: boolean, event: SyntheticEvent) => void;\n\trowActions?: ReactNode;\n\tselection?: DataTableItem[];\n\tdisabledSelection?: DataTableItem[];\n\ttableId?: string;\n\trowIndex?: number;\n\tstacked?: boolean;\n}\n\n/**\n * Used internally, provides row rendering to the DataTable.\n */\nconst DataTableRow: React.FC<DataTableRowProps> = (props) => {\n\tconst tableContext = useContext(TableContext);\n\tconst selectRowCellContext = useMemo(\n\t\t() => ({\n\t\t\trowIndex: props.rowIndex ?? 0,\n\t\t\tcolumnIndex: 0,\n\t\t}),\n\t\t[props.rowIndex]\n\t);\n\tconst { tabIndex, hasFocus, handleFocus, handleKeyDown } = useContextHelper(\n\t\ttableContext,\n\t\tselectRowCellContext,\n\t\tprops.fixedLayout\n\t);\n\n\tconst { item, onToggle } = props;\n\tconst handleToggle = useCallback(\n\t\t(_e: SyntheticEvent, { checked }: { checked: boolean }) => {\n\t\t\tif (onToggle) {\n\t\t\t\tonToggle(item, checked, _e);\n\t\t\t}\n\t\t},\n\t\t[item, onToggle]\n\t);\n\n\tconst isSelected = !!find(props.selection, item);\n\tconst isDisabled =\n\t\tprops.disabledSelection && !!find(props.disabledSelection, item);\n\n\tconst ariaProps = useMemo(() => {\n\t\tconst result: { 'aria-selected'?: 'true' | 'false' } = {};\n\n\t\tif (props.canSelectRows) {\n\t\t\tresult['aria-selected'] = isSelected ? 'true' : 'false';\n\t\t}\n\t\treturn result;\n\t}, [isSelected, props.canSelectRows]);\n\n\tconst radioSelection = useMemo(\n\t\t() =>\n\t\t\tisDisabled ? (\n\t\t\t\t<Radio\n\t\t\t\t\tassistiveText={{\n\t\t\t\t\t\tlabel: `${props.assistiveText?.selectRow} ${\n\t\t\t\t\t\t\tNumber(props.index) + 1\n\t\t\t\t\t\t}`,\n\t\t\t\t\t}}\n\t\t\t\t\taria-labelledby={`${props.id}-SelectRow-label ${props.tableId}-SLDSDataTableHead-column-group-header-row-select`}\n\t\t\t\t\tchecked={isSelected}\n\t\t\t\t\tclassName=\"slds-m-right_x-small\"\n\t\t\t\t\tid={`${props.id}-SelectRow`}\n\t\t\t\t\tlabelId={`${props.id}-SelectRow-label`}\n\t\t\t\t\tname={`${props.tableId}-SelectRow`}\n\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<InteractiveRadio\n\t\t\t\t\tassistiveText={{\n\t\t\t\t\t\tlabel: `${props.assistiveText?.selectRow} ${\n\t\t\t\t\t\t\tNumber(props.index) + 1\n\t\t\t\t\t\t}`,\n\t\t\t\t\t}}\n\t\t\t\t\taria-labelledby={`${props.id}-SelectRow-label ${props.tableId}-SLDSDataTableHead-column-group-header-row-select`}\n\t\t\t\t\tchecked={isSelected}\n\t\t\t\t\tclassName=\"slds-m-right_x-small\"\n\t\t\t\t\tid={`${props.id}-SelectRow`}\n\t\t\t\t\tlabelId={`${props.id}-SelectRow-label`}\n\t\t\t\t\tname={`${props.tableId}-SelectRow`}\n\t\t\t\t\tonChange={handleToggle}\n\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t/>\n\t\t\t),\n\t\t[\n\t\t\thandleToggle,\n\t\t\tisSelected,\n\t\t\tisDisabled,\n\t\t\tprops.assistiveText?.selectRow,\n\t\t\tprops.id,\n\t\t\tprops.index,\n\t\t\tprops.tableId,\n\t\t]\n\t);\n\n\tconst checkboxSelection = useMemo(\n\t\t() =>\n\t\t\tisDisabled ? (\n\t\t\t\t<Checkbox\n\t\t\t\t\tassistiveText={{\n\t\t\t\t\t\tlabel: `${props.assistiveText?.selectRow} ${\n\t\t\t\t\t\t\tNumber(props.index) + 1\n\t\t\t\t\t\t}`,\n\t\t\t\t\t}}\n\t\t\t\t\taria-labelledby={`${props.id}-SelectRow-label ${props.tableId}-SLDSDataTableHead-column-group-header-row-select`}\n\t\t\t\t\tchecked={isSelected}\n\t\t\t\t\tid={`${props.id}-SelectRow`}\n\t\t\t\t\tlabelId={`${props.id}-SelectRow-label`}\n\t\t\t\t\tname={`SelectRow${(props.index ?? 0) + 1}`}\n\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<InteractiveCheckbox\n\t\t\t\t\tassistiveText={{\n\t\t\t\t\t\tlabel: `${props.assistiveText?.selectRow} ${\n\t\t\t\t\t\t\tNumber(props.index) + 1\n\t\t\t\t\t\t}`,\n\t\t\t\t\t}}\n\t\t\t\t\taria-labelledby={`${props.id}-SelectRow-label ${props.tableId}-SLDSDataTableHead-column-group-header-row-select`}\n\t\t\t\t\tchecked={isSelected}\n\t\t\t\t\tid={`${props.id}-SelectRow`}\n\t\t\t\t\tlabelId={`${props.id}-SelectRow-label`}\n\t\t\t\t\tname={`SelectRow${(props.index ?? 0) + 1}`}\n\t\t\t\t\tonChange={handleToggle}\n\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t/>\n\t\t\t),\n\t\t[\n\t\t\thandleToggle,\n\t\t\tisSelected,\n\t\t\tisDisabled,\n\t\t\tprops.assistiveText?.selectRow,\n\t\t\tprops.id,\n\t\t\tprops.index,\n\t\t\tprops.tableId,\n\t\t]\n\t);\n\n\treturn (\n\t\t<tr\n\t\t\t{...ariaProps}\n\t\t\tclassName={classNames(props.className, {\n\t\t\t\t'slds-hint-parent': props.rowActions,\n\t\t\t\t'slds-is-selected': props.canSelectRows && isSelected,\n\t\t\t\t'slds-has-focus': hasFocus,\n\t\t\t})}\n\t\t>\n\t\t\t{useMemo(\n\t\t\t\t() => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{props.canSelectRows ? (\n\t\t\t\t\t\t\t<td\n\t\t\t\t\t\t\t\trole={props.fixedLayout ? 'gridcell' : undefined}\n\t\t\t\t\t\t\t\tclassName=\"slds-text-align_right\"\n\t\t\t\t\t\t\t\tdata-label={props.stacked ? 'Select Row' : undefined}\n\t\t\t\t\t\t\t\tstyle={{ width: '3.25rem' }}\n\t\t\t\t\t\t\t\tonFocus={handleFocus}\n\t\t\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\t\t\tref={(ref) => {\n\t\t\t\t\t\t\t\t\tif (ref && hasFocus) {\n\t\t\t\t\t\t\t\t\t\tref.focus();\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\ttabIndex={tabIndex}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<CellContext.Provider value={selectRowCellContext}>\n\t\t\t\t\t\t\t\t\t{props.canSelectRows === 'radio'\n\t\t\t\t\t\t\t\t\t\t? radioSelection\n\t\t\t\t\t\t\t\t\t\t: checkboxSelection}\n\t\t\t\t\t\t\t\t</CellContext.Provider>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t{props.columns?.map((column, index) => {\n\t\t\t\t\t\t\tconst { Cell } = column;\n\t\t\t\t\t\t\tconst cellId = `${props.id}-${DATA_TABLE_CELL}-${column.props.property}`;\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<CellContext.Provider\n\t\t\t\t\t\t\t\t\tkey={cellId}\n\t\t\t\t\t\t\t\t\tvalue={{\n\t\t\t\t\t\t\t\t\t\tcolumnIndex: props.canSelectRows ? index + 1 : index,\n\t\t\t\t\t\t\t\t\t\trowIndex: props.rowIndex ?? 0,\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\t\t<Cell\n\t\t\t\t\t\t\t\t\t\t{...column.props}\n\t\t\t\t\t\t\t\t\t\tclassName={column.props.truncate ? 'slds-truncate' : undefined}\n\t\t\t\t\t\t\t\t\t\tfixedLayout={props.fixedLayout}\n\t\t\t\t\t\t\t\t\t\trowHeader={column.props.primaryColumn}\n\t\t\t\t\t\t\t\t\t\tid={cellId}\n\t\t\t\t\t\t\t\t\t\titem={item}\n\t\t\t\t\t\t\t\t\t\twidth={column.props.width}\n\t\t\t\t\t\t\t\t\t\theaderId={item.headerId}\n\t\t\t\t\t\t\t\t\t\tcolumns={props.columns}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{item[column.props.property || '']}\n\t\t\t\t\t\t\t\t\t</Cell>\n\t\t\t\t\t\t\t\t</CellContext.Provider>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t\t<CellContext.Provider\n\t\t\t\t\t\t\tvalue={{\n\t\t\t\t\t\t\t\tcolumnIndex: props.canSelectRows\n\t\t\t\t\t\t\t\t\t? (props.columns?.length ?? 0) + 1\n\t\t\t\t\t\t\t\t\t: props.columns?.length ?? 0,\n\t\t\t\t\t\t\t\trowIndex: props.rowIndex ?? 0,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{props.rowActions\n\t\t\t\t\t\t\t\t? React.cloneElement(\n\t\t\t\t\t\t\t\t\t\tprops.rowActions as React.ReactElement<{\n\t\t\t\t\t\t\t\t\t\t\tid?: string;\n\t\t\t\t\t\t\t\t\t\t\titem?: DataTableItem;\n\t\t\t\t\t\t\t\t\t\t\tfixedLayout?: boolean;\n\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\t\tid: `${props.id}-${DATA_TABLE_ROW_ACTIONS}`,\n\t\t\t\t\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\t\t\t\t\tfixedLayout: props.fixedLayout,\n\t\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\t: null}\n\t\t\t\t\t\t</CellContext.Provider>\n\t\t\t\t\t</>\n\t\t\t\t),\n\t\t\t\t[\n\t\t\t\t\thandleFocus,\n\t\t\t\t\thandleKeyDown,\n\t\t\t\t\thasFocus,\n\t\t\t\t\titem,\n\t\t\t\t\ttabIndex,\n\t\t\t\t\tprops.canSelectRows,\n\t\t\t\t\tprops.columns,\n\t\t\t\t\tprops.fixedLayout,\n\t\t\t\t\tprops.id,\n\t\t\t\t\tprops.rowActions,\n\t\t\t\t\tprops.rowIndex,\n\t\t\t\t\tprops.stacked,\n\t\t\t\t\tselectRowCellContext,\n\t\t\t\t\tcheckboxSelection,\n\t\t\t\t\tradioSelection,\n\t\t\t\t]\n\t\t\t)}\n\t\t</tr>\n\t);\n};\n\nDataTableRow.displayName = DATA_TABLE_ROW;\n\nexport default DataTableRow;\n"],"mappings":";;;;;;;;;;;;AAsBA,IAAM,IAAsB,EAAmB,CAAe,GAExD,IAAmB,EAAmB,CAAY,GA4ClD,KAA6C,MAAU;CAC5D,IAAM,IAAe,EAAW,CAAY,GACtC,IAAuB,SACrB;EACN,UAAU,EAAM,YAAY;EAC5B,aAAa;CACd,IACA,CAAC,EAAM,QAAQ,CAChB,GACM,EAAE,aAAU,aAAU,gBAAa,qBAAkB,EAC1D,GACA,GACA,EAAM,WACP,GAEM,EAAE,SAAM,gBAAa,GACrB,IAAe,GACnB,GAAoB,EAAE,iBAAoC;EAC1D,AA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EA,UAAA,kBAAC,GAAD;MACC,GAAI,EAAO;MACX,WAAW,EAAO,MAAM,WAAW,kBAAkB,KAAA;MACrD,aAAa,EAAM;MACnB,WAAW,EAAO,MAAM;MACxB,IAAI;MACE;MACN,OAAO,EAAO,MAAM;MACpB,UAAU,EAAK;MACf,SAAS,EAAM;MAEd,UAAA,EAAK,EAAO,MAAM,YAAY;KAC1B,CAAA;IACe,GAnBhB,CAmBgB;GAExB,CAAC;GACD,kBAAC,EAAY,UAAb;IACC,OAAO;KACN,aAAa,EAAM,iBACf,EAAM,SAAS,UAAU,KAAK,IAC/B,EAAM,SAAS,UAAU;KAC5B,UAAU,EAAM,YAAY;IAC7B;IAEC,UAAA,EAAM,aACJ,EAAM,aACN,EAAM,YAKN;KACC,IAAI,GAAG,EAAM,GAAG,GAAG;KACnB;KACA,aAAa,EAAM;IACpB,CACA,IACA;GACkB,CAAA;EACrB,EAAA,CAAA,GAEH;GACC;GACA;GACA;GACA;GACA;GACA,EAAM;GACN,EAAM;GACN,EAAM;GACN,EAAM;GACN,EAAM;GACN,EAAM;GACN,EAAM;GACN;GACA;GACA;EACD,CACD;CACG,CAAA;AAEN;AAEA,EAAa,cAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"table-context.js","names":[],"sources":["../../../../../components/data-table/private/table-context.tsx"],"sourcesContent":["import React from 'react';\n\nexport interface ActiveCell {\n\trowIndex: number;\n\tcolumnIndex: number;\n}\n\nexport interface TableContextValue {\n\tactiveCell: ActiveCell;\n\tactiveElement: string | null;\n\tmode: 'navigation' | 'actionable' | null;\n\ttableHasFocus: boolean;\n\tchangeActiveCell: (rowIndex: number, columnIndex: number) => void;\n\tchangeActiveElement: (elementId: string | null) => void;\n\thandleKeyDown: (event: React.KeyboardEvent) => void;\n\tregisterInteractiveElement: (\n\t\trowIndex: number,\n\t\tcolumnIndex: number,\n\t\telementId: string\n\t) => void;\n\tallowKeyboardNavigation: boolean;\n\tsetAllowKeyboardNavigation: (allow: boolean) => void;\n}\n\nconst defaultValue: TableContextValue = {\n\tactiveCell: { rowIndex: 0, columnIndex: 0 },\n\tactiveElement: null,\n\tmode: null,\n\ttableHasFocus: false,\n\tchangeActiveCell: () => {},\n\tchangeActiveElement: () => {},\n\thandleKeyDown: () => {},\n\tregisterInteractiveElement: () => {},\n\tallowKeyboardNavigation: true,\n\tsetAllowKeyboardNavigation: () => {},\n};\n\nconst TableContext = React.createContext<TableContextValue>(defaultValue);\n\nexport default TableContext;\n"],"mappings":";;AAqCA,IAAM,IAAe,EAAM,cAAiC;CAZ3D,YAAY;EAAE,UAAU;EAAG,aAAa;CAAE;CAC1C,eAAe;CACf,MAAM;CACN,eAAe;CACf,wBAAwB,CAAC;CACzB,2BAA2B,CAAC;CAC5B,qBAAqB,CAAC;CACtB,kCAAkC,CAAC;CACnC,yBAAyB;CACzB,kCAAkC,CAAC;AAGwB,CAAY"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"row-actions.js","names":[],"sources":["../../../../components/data-table/row-actions.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 React, { useContext, ReactNode } from 'react';\nimport classNames from 'classnames';\nimport isFunction from 'lodash.isfunction';\n\nimport Dropdown from '../menu-dropdown';\n\nimport EventUtil from '../../utilities/event';\n\nimport InteractiveElement from './interactive-element';\nimport CellContext from './private/cell-context';\nimport TableContext from './private/table-context';\nimport useContextHelper from './private/context-helper';\n\nimport { DATA_TABLE_ROW_ACTIONS } from '../../utilities/constants';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst InteractiveDropdown = InteractiveElement(Dropdown as any) as React.ComponentType<any>;\n\nexport interface DataTableRowActionsProps {\n\t/** Description of the menu for screenreaders */\n\tassistiveText?: { icon?: string };\n\t/** Class names to be added to the actions menu */\n\tclassName?: string;\n\t/** HTML ID to be added to the actions menu */\n\tid?: string;\n\t/** DataTable row item */\n\titem?: Record<string, unknown>;\n\t/** Disable hint styling which changes the color of the dropdown svg on hover */\n\tnoHint?: boolean;\n\t/** Triggered when an item is selected */\n\tonAction?: (item: Record<string, unknown>, selection: unknown) => void;\n\t/** Dropdown options. See Dropdown. */\n\toptions?: unknown[];\n\t/** A Dropdown component. Props from this will be merged and override defaults. */\n\tdropdown?: ReactNode;\n\t/** Fixed layout mode */\n\tfixedLayout?: boolean;\n}\n\n/**\n * RowActions provide a mechanism for defining a menu to display alongside\n * each row in the DataTable.\n */\nconst DataTableRowActions: React.FC<DataTableRowActionsProps> = ({\n\tassistiveText = { icon: 'Actions' },\n\tnoHint = false,\n\toptions = [],\n\tclassName,\n\tid,\n\titem,\n\tonAction,\n\tdropdown,\n\tfixedLayout,\n}) => {\n\tconst tableContext = useContext(TableContext);\n\tconst cellContext = useContext(CellContext);\n\tconst { tabIndex, hasFocus, handleFocus, handleKeyDown } = useContextHelper(\n\t\ttableContext,\n\t\tcellContext,\n\t\tfixedLayout\n\t);\n\n\tconst handleClick = (e: React.MouseEvent) => {\n\t\tEventUtil.trap(e);\n\t};\n\n\tconst handleSelect = (selection: unknown) => {\n\t\tif (isFunction(onAction) && item) {\n\t\t\tonAction(item, selection);\n\t\t}\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\tif (dropdown && isFunction((dropdown as any).props?.onSelect)) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t(dropdown as any).props.onSelect(selection);\n\t\t}\n\t};\n\n\tconst defaultDropdownProps = {\n\t\talign: 'right',\n\t\tbuttonClassName: 'slds-button_icon-x-small',\n\t\tbuttonVariant: 'icon',\n\t\ticonCategory: 'utility',\n\t\ticonName: 'down',\n\t\ticonSize: 'small',\n\t\ticonVariant: 'border-filled',\n\t\tassistiveText,\n\t\tclassName,\n\t\toptions,\n\t\thint: !noHint,\n\t\tid,\n\t};\n\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tlet dropdownProps: Record<string, any> = dropdown\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t? (dropdown as any).props\n\t\t: {};\n\tdropdownProps = {\n\t\t...defaultDropdownProps,\n\t\t...dropdownProps,\n\t\tonSelect: handleSelect,\n\t};\n\n\treturn (\n\t\t<td\n\t\t\tclassName={classNames({ 'slds-has-focus': hasFocus })}\n\t\t\tdata-label=\"Actions\"\n\t\t\tonClick={handleClick}\n\t\t\tstyle={{ width: '3.25rem' }}\n\t\t\tonFocus={handleFocus}\n\t\t\tonKeyDown={handleKeyDown}\n\t\t\tref={(ref) => {\n\t\t\t\tif (ref && hasFocus) {\n\t\t\t\t\tref.focus();\n\t\t\t\t}\n\t\t\t}}\n\t\t\trole={fixedLayout ? 'gridcell' : undefined}\n\t\t\ttabIndex={tabIndex}\n\t\t>\n\t\t\t<InteractiveDropdown {...dropdownProps} />\n\t\t</td>\n\t);\n};\n\nDataTableRowActions.displayName = DATA_TABLE_ROW_ACTIONS;\n\nexport default DataTableRowActions;\n"],"mappings":";;;;;;;;;;;;AAmBA,IAAM,IAAsB,EAAmB,CAAe,GA2BxD,KAA2D,EAChE,mBAAgB,EAAE,MAAM,UAAU,GAClC,YAAS,IACT,aAAU,CAAC,GACX,cACA,OACA,SACA,aACA,aACA,qBACK;CACL,IAAM,IAAe,EAAW,CAAY,GACtC,IAAc,EAAW,CAAW,GACpC,EAAE,aAAU,aAAU,gBAAa,qBAAkB,EAC1D,GACA,GACA,CACD,GAEM,KAAe,MAAwB;EAC5C,EAAU,KAAK,CAAC;CACjB,GAEM,KAAgB,MAAuB;EAK5C,AAJI,EAAW,CAAQ,KAAK,KAC3B,EAAS,GAAM,CAAS,GAGrB,KAAY,EAAY,EAAiB,OAAO,QAAQ,KAE3D,EAAkB,MAAM,SAAS,CAAS;CAE5C,GAEM,IAAuB;EAC5B,OAAO;EACP,iBAAiB;EACjB,eAAe;EACf,cAAc;EACd,UAAU;EACV,UAAU;EACV,aAAa;EACb;EACA;EACA;EACA,MAAM,CAAC;EACP;CACD,GAGI,IAAqC,IAErC,EAAiB,QAClB,CAAC;CAOJ,OANA,IAAgB;EACf,GAAG;EACH,GAAG;EACH,UAAU;CACX,GAGC,kBAAC,MAAD;EACC,WAAW,EAAW,EAAE,kBAAkB,EAAS,CAAC;EACpD,cAAW;EACX,SAAS;EACT,OAAO,EAAE,OAAO,UAAU;EAC1B,SAAS;EACT,WAAW;EACX,MAAM,MAAQ;GACb,AAAI,KAAO,KACV,EAAI,MAAM;EAEZ;EACA,MAAM,IAAc,aAAa,KAAA;EACvB;EAEV,UAAA,kBAAC,GAAD,EAAqB,GAAI,EAAgB,CAAA;CACtC,CAAA;AAEN;AAEA,EAAoB,cAAc"}
|