@flipdish/ui-library 0.70.0 → 0.72.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/components/__internal__/controlFill/controlFill.context.cjs +13 -0
- package/dist/components/__internal__/controlFill/controlFill.context.cjs.map +1 -0
- package/dist/components/__internal__/controlFill/controlFill.context.d.ts +7 -0
- package/dist/components/__internal__/controlFill/controlFill.context.d.ts.map +1 -0
- package/dist/components/__internal__/controlFill/controlFill.context.js +11 -0
- package/dist/components/__internal__/controlFill/controlFill.context.js.map +1 -0
- package/dist/components/__internal__/focusHandOff/focusHandOff.context.cjs +13 -0
- package/dist/components/__internal__/focusHandOff/focusHandOff.context.cjs.map +1 -0
- package/dist/components/__internal__/focusHandOff/focusHandOff.context.d.ts +8 -0
- package/dist/components/__internal__/focusHandOff/focusHandOff.context.d.ts.map +1 -0
- package/dist/components/__internal__/focusHandOff/focusHandOff.context.js +11 -0
- package/dist/components/__internal__/focusHandOff/focusHandOff.context.js.map +1 -0
- package/dist/components/atoms/Buttons/IconButton/IconButton.cjs +1 -1
- package/dist/components/atoms/Buttons/IconButton/IconButton.cjs.map +1 -1
- package/dist/components/atoms/Buttons/IconButton/IconButton.d.ts.map +1 -1
- package/dist/components/atoms/Buttons/IconButton/IconButton.js +1 -1
- package/dist/components/atoms/Buttons/IconButton/IconButton.js.map +1 -1
- package/dist/components/molecules/EmptyState/index.cjs +9 -1
- package/dist/components/molecules/EmptyState/index.cjs.map +1 -1
- package/dist/components/molecules/EmptyState/index.d.ts.map +1 -1
- package/dist/components/molecules/EmptyState/index.js +11 -3
- package/dist/components/molecules/EmptyState/index.js.map +1 -1
- package/dist/components/molecules/EmptyState/utilities/emptyState.utils.cjs +13 -0
- package/dist/components/molecules/EmptyState/utilities/emptyState.utils.cjs.map +1 -1
- package/dist/components/molecules/EmptyState/utilities/emptyState.utils.d.ts +8 -0
- package/dist/components/molecules/EmptyState/utilities/emptyState.utils.d.ts.map +1 -1
- package/dist/components/molecules/EmptyState/utilities/emptyState.utils.js +13 -1
- package/dist/components/molecules/EmptyState/utilities/emptyState.utils.js.map +1 -1
- package/dist/components/molecules/Modals/Modal/Modal.cjs +6 -5
- package/dist/components/molecules/Modals/Modal/Modal.cjs.map +1 -1
- package/dist/components/molecules/Modals/Modal/Modal.d.ts.map +1 -1
- package/dist/components/molecules/Modals/Modal/Modal.js +6 -5
- package/dist/components/molecules/Modals/Modal/Modal.js.map +1 -1
- package/dist/components/molecules/Paginations/utilities/paginationScroll.utils.cjs +1 -1
- package/dist/components/molecules/Paginations/utilities/paginationScroll.utils.d.ts +1 -1
- package/dist/components/molecules/Paginations/utilities/paginationScroll.utils.d.ts.map +1 -1
- package/dist/components/molecules/Paginations/utilities/paginationScroll.utils.js +1 -1
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.cjs +4 -1
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.cjs.map +1 -1
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.js +5 -2
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.js.map +1 -1
- package/dist/components/organisms/FilterBar/components/FilterDropdownMenu.cjs +11 -6
- package/dist/components/organisms/FilterBar/components/FilterDropdownMenu.cjs.map +1 -1
- package/dist/components/organisms/FilterBar/components/FilterDropdownMenu.d.ts +4 -2
- package/dist/components/organisms/FilterBar/components/FilterDropdownMenu.d.ts.map +1 -1
- package/dist/components/organisms/FilterBar/components/FilterDropdownMenu.js +12 -7
- package/dist/components/organisms/FilterBar/components/FilterDropdownMenu.js.map +1 -1
- package/dist/components/organisms/FilterBar/hooks/useFilterDraft.cjs +53 -0
- package/dist/components/organisms/FilterBar/hooks/useFilterDraft.cjs.map +1 -0
- package/dist/components/organisms/FilterBar/hooks/useFilterDraft.d.ts +41 -0
- package/dist/components/organisms/FilterBar/hooks/useFilterDraft.d.ts.map +1 -0
- package/dist/components/organisms/FilterBar/hooks/useFilterDraft.js +51 -0
- package/dist/components/organisms/FilterBar/hooks/useFilterDraft.js.map +1 -0
- package/dist/components/organisms/FilterBar/index.cjs +19 -7
- package/dist/components/organisms/FilterBar/index.cjs.map +1 -1
- package/dist/components/organisms/FilterBar/index.d.ts +1 -0
- package/dist/components/organisms/FilterBar/index.d.ts.map +1 -1
- package/dist/components/organisms/FilterBar/index.js +18 -7
- package/dist/components/organisms/FilterBar/index.js.map +1 -1
- package/dist/components/organisms/SlideoutMenu/index.cjs +3 -1
- package/dist/components/organisms/SlideoutMenu/index.cjs.map +1 -1
- package/dist/components/organisms/SlideoutMenu/index.d.ts.map +1 -1
- package/dist/components/organisms/SlideoutMenu/index.js +3 -1
- package/dist/components/organisms/SlideoutMenu/index.js.map +1 -1
- package/dist/components/organisms/Table/index.cjs +14 -285
- package/dist/components/organisms/Table/index.cjs.map +1 -1
- package/dist/components/organisms/Table/index.d.ts +29 -138
- package/dist/components/organisms/Table/index.d.ts.map +1 -1
- package/dist/components/organisms/Table/index.js +13 -284
- package/dist/components/organisms/Table/index.js.map +1 -1
- package/dist/components/organisms/Tables/Table/Table.cjs +305 -0
- package/dist/components/organisms/Tables/Table/Table.cjs.map +1 -0
- package/dist/components/organisms/Tables/Table/Table.d.ts +146 -0
- package/dist/components/organisms/Tables/Table/Table.d.ts.map +1 -0
- package/dist/components/organisms/Tables/Table/Table.js +301 -0
- package/dist/components/organisms/Tables/Table/Table.js.map +1 -0
- package/dist/components/organisms/Tables/Table/Table.styles.cjs.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/Table.styles.d.ts +1 -1
- package/dist/components/organisms/Tables/Table/Table.styles.d.ts.map +1 -0
- package/dist/components/organisms/Tables/Table/Table.styles.js.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/components/TableCardList.cjs +2 -2
- package/dist/components/organisms/Tables/Table/components/TableCardList.cjs.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/components/TableCardList.d.ts +1 -1
- package/dist/components/organisms/Tables/Table/components/TableCardList.d.ts.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/components/TableCardList.js +2 -2
- package/dist/components/organisms/Tables/Table/components/TableCardList.js.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/components/TableCardRow.cjs +8 -4
- package/dist/components/organisms/Tables/Table/components/TableCardRow.cjs.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/components/TableCardRow.d.ts +1 -1
- package/dist/components/organisms/Tables/Table/components/TableCardRow.d.ts.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/components/TableCardRow.js +9 -5
- package/dist/components/organisms/Tables/Table/components/TableCardRow.js.map +1 -0
- package/dist/components/organisms/Tables/Table/components/TableCardsSelectAll.cjs.map +1 -0
- package/dist/components/organisms/Tables/Table/components/TableCardsSelectAll.d.ts.map +1 -0
- package/dist/components/organisms/Tables/Table/components/TableCardsSelectAll.js.map +1 -0
- package/dist/components/organisms/Tables/Table/components/TableEmptyState.cjs +17 -0
- package/dist/components/organisms/Tables/Table/components/TableEmptyState.cjs.map +1 -0
- package/dist/components/organisms/Tables/Table/components/TableEmptyState.d.ts +5 -0
- package/dist/components/organisms/Tables/Table/components/TableEmptyState.d.ts.map +1 -0
- package/dist/components/organisms/Tables/Table/components/TableEmptyState.js +15 -0
- package/dist/components/organisms/Tables/Table/components/TableEmptyState.js.map +1 -0
- package/dist/components/organisms/Tables/Table/components/TableFallbackCard.cjs.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/components/TableFallbackCard.d.ts +1 -1
- package/dist/components/organisms/Tables/Table/components/TableFallbackCard.d.ts.map +1 -0
- package/dist/components/organisms/Tables/Table/components/TableFallbackCard.js.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/components/TableRowCard.cjs +3 -3
- package/dist/components/organisms/Tables/Table/components/TableRowCard.cjs.map +1 -0
- package/dist/components/organisms/Tables/Table/components/TableRowCard.d.ts.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/components/TableRowCard.js +3 -3
- package/dist/components/organisms/Tables/Table/components/TableRowCard.js.map +1 -0
- package/dist/components/organisms/Tables/Table/components/TableSortIcon.cjs.map +1 -0
- package/dist/components/organisms/Tables/Table/components/TableSortIcon.d.ts.map +1 -0
- package/dist/components/organisms/Tables/Table/components/TableSortIcon.js.map +1 -0
- package/dist/components/organisms/Tables/Table/hooks/useBusyCount.cjs.map +1 -0
- package/dist/components/organisms/Tables/Table/hooks/useBusyCount.d.ts.map +1 -0
- package/dist/components/organisms/Tables/Table/hooks/useBusyCount.js.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/hooks/useFirstSortDirection.cjs +1 -1
- package/dist/components/organisms/Tables/Table/hooks/useFirstSortDirection.cjs.map +1 -0
- package/dist/components/organisms/Tables/Table/hooks/useFirstSortDirection.d.ts.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/hooks/useFirstSortDirection.js +1 -1
- package/dist/components/organisms/Tables/Table/hooks/useFirstSortDirection.js.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/hooks/useIsPlaceholderPage.cjs +1 -1
- package/dist/components/organisms/Tables/Table/hooks/useIsPlaceholderPage.cjs.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/hooks/useIsPlaceholderPage.d.ts +1 -1
- package/dist/components/organisms/Tables/Table/hooks/useIsPlaceholderPage.d.ts.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/hooks/useIsPlaceholderPage.js +1 -1
- package/dist/components/organisms/Tables/Table/hooks/useIsPlaceholderPage.js.map +1 -0
- package/dist/components/organisms/Tables/Table/hooks/usePlaceholderRows.cjs.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/hooks/usePlaceholderRows.d.ts +1 -1
- package/dist/components/organisms/Tables/Table/hooks/usePlaceholderRows.d.ts.map +1 -0
- package/dist/components/organisms/Tables/Table/hooks/usePlaceholderRows.js.map +1 -0
- package/dist/components/organisms/Tables/Table/hooks/useSelectableRowRegistry.cjs.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/hooks/useSelectableRowRegistry.d.ts +1 -1
- package/dist/components/organisms/Tables/Table/hooks/useSelectableRowRegistry.d.ts.map +1 -0
- package/dist/components/organisms/Tables/Table/hooks/useSelectableRowRegistry.js.map +1 -0
- package/dist/components/organisms/Tables/Table/hooks/useTableFocusHandOff.cjs +83 -0
- package/dist/components/organisms/Tables/Table/hooks/useTableFocusHandOff.cjs.map +1 -0
- package/dist/components/organisms/Tables/Table/hooks/useTableFocusHandOff.d.ts +23 -0
- package/dist/components/organisms/Tables/Table/hooks/useTableFocusHandOff.d.ts.map +1 -0
- package/dist/components/organisms/Tables/Table/hooks/useTableFocusHandOff.js +81 -0
- package/dist/components/organisms/Tables/Table/hooks/useTableFocusHandOff.js.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/hooks/useTableSelection.cjs +1 -1
- package/dist/components/organisms/Tables/Table/hooks/useTableSelection.cjs.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/hooks/useTableSelection.d.ts +1 -1
- package/dist/components/organisms/Tables/Table/hooks/useTableSelection.d.ts.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/hooks/useTableSelection.js +1 -1
- package/dist/components/organisms/Tables/Table/hooks/useTableSelection.js.map +1 -0
- package/dist/components/organisms/Tables/Table/providers/Table.context.cjs.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/providers/Table.context.d.ts +4 -1
- package/dist/components/organisms/Tables/Table/providers/Table.context.d.ts.map +1 -0
- package/dist/components/organisms/Tables/Table/providers/Table.context.js.map +1 -0
- package/dist/components/organisms/Tables/Table/utilities/tableFocusHandOff.utils.cjs +55 -0
- package/dist/components/organisms/Tables/Table/utilities/tableFocusHandOff.utils.cjs.map +1 -0
- package/dist/components/organisms/Tables/Table/utilities/tableFocusHandOff.utils.d.ts +25 -0
- package/dist/components/organisms/Tables/Table/utilities/tableFocusHandOff.utils.d.ts.map +1 -0
- package/dist/components/organisms/Tables/Table/utilities/tableFocusHandOff.utils.js +51 -0
- package/dist/components/organisms/Tables/Table/utilities/tableFocusHandOff.utils.js.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/utilities/tableLoading.utils.cjs +1 -1
- package/dist/components/organisms/Tables/Table/utilities/tableLoading.utils.cjs.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/utilities/tableLoading.utils.d.ts +1 -1
- package/dist/components/organisms/Tables/Table/utilities/tableLoading.utils.d.ts.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/utilities/tableLoading.utils.js +1 -1
- package/dist/components/organisms/Tables/Table/utilities/tableLoading.utils.js.map +1 -0
- package/dist/components/organisms/Tables/Table/utilities/tableSelection.utils.cjs.map +1 -0
- package/dist/components/organisms/Tables/Table/utilities/tableSelection.utils.d.ts.map +1 -0
- package/dist/components/organisms/Tables/Table/utilities/tableSelection.utils.js.map +1 -0
- package/dist/components/organisms/Tables/TableLayoutToggle/TableLayoutToggle.cjs +34 -0
- package/dist/components/organisms/Tables/TableLayoutToggle/TableLayoutToggle.cjs.map +1 -0
- package/dist/components/organisms/Tables/TableLayoutToggle/TableLayoutToggle.d.ts +37 -0
- package/dist/components/organisms/Tables/TableLayoutToggle/TableLayoutToggle.d.ts.map +1 -0
- package/dist/components/organisms/Tables/TableLayoutToggle/TableLayoutToggle.js +32 -0
- package/dist/components/organisms/Tables/TableLayoutToggle/TableLayoutToggle.js.map +1 -0
- package/dist/components/organisms/Tables/TableLayoutToggle/hooks/useTableLayoutToggle.cjs +32 -0
- package/dist/components/organisms/Tables/TableLayoutToggle/hooks/useTableLayoutToggle.cjs.map +1 -0
- package/dist/components/organisms/Tables/TableLayoutToggle/hooks/useTableLayoutToggle.d.ts +21 -0
- package/dist/components/organisms/Tables/TableLayoutToggle/hooks/useTableLayoutToggle.d.ts.map +1 -0
- package/dist/components/organisms/Tables/TableLayoutToggle/hooks/useTableLayoutToggle.js +30 -0
- package/dist/components/organisms/Tables/TableLayoutToggle/hooks/useTableLayoutToggle.js.map +1 -0
- package/dist/components/organisms/{Table/components → Tables/TableSortMenu}/TableSortMenu.cjs +9 -2
- package/dist/components/organisms/Tables/TableSortMenu/TableSortMenu.cjs.map +1 -0
- package/dist/components/organisms/{Table/components → Tables/TableSortMenu}/TableSortMenu.d.ts +18 -6
- package/dist/components/organisms/Tables/TableSortMenu/TableSortMenu.d.ts.map +1 -0
- package/dist/components/organisms/{Table/components → Tables/TableSortMenu}/TableSortMenu.js +9 -2
- package/dist/components/organisms/Tables/TableSortMenu/TableSortMenu.js.map +1 -0
- package/dist/components/organisms/Tables/hooks/useIsAtLeastMd.cjs.map +1 -0
- package/dist/components/organisms/Tables/hooks/useIsAtLeastMd.d.ts.map +1 -0
- package/dist/components/organisms/Tables/hooks/useIsAtLeastMd.js.map +1 -0
- package/dist/components/organisms/Tables/hooks/useStoredTableLayout.cjs +84 -0
- package/dist/components/organisms/Tables/hooks/useStoredTableLayout.cjs.map +1 -0
- package/dist/components/organisms/Tables/hooks/useStoredTableLayout.d.ts +20 -0
- package/dist/components/organisms/Tables/hooks/useStoredTableLayout.d.ts.map +1 -0
- package/dist/components/organisms/Tables/hooks/useStoredTableLayout.js +81 -0
- package/dist/components/organisms/Tables/hooks/useStoredTableLayout.js.map +1 -0
- package/dist/components/organisms/Tables/index.cjs +14 -0
- package/dist/components/organisms/Tables/index.cjs.map +1 -0
- package/dist/components/organisms/Tables/index.d.ts +19 -0
- package/dist/components/organisms/Tables/index.d.ts.map +1 -0
- package/dist/components/organisms/Tables/index.js +4 -0
- package/dist/components/organisms/Tables/index.js.map +1 -0
- package/dist/components/organisms/{Table/table.types.d.ts → Tables/tables.types.d.ts} +4 -2
- package/dist/components/organisms/Tables/tables.types.d.ts.map +1 -0
- package/dist/components/organisms/Tables/utilities/tableCard.utils.cjs.map +1 -0
- package/dist/components/organisms/{Table → Tables}/utilities/tableCard.utils.d.ts +1 -1
- package/dist/components/organisms/Tables/utilities/tableCard.utils.d.ts.map +1 -0
- package/dist/components/organisms/Tables/utilities/tableCard.utils.js.map +1 -0
- package/dist/components/organisms/Tables/utilities/tableChildren.utils.cjs.map +1 -0
- package/dist/components/organisms/{Table → Tables}/utilities/tableChildren.utils.d.ts +1 -1
- package/dist/components/organisms/Tables/utilities/tableChildren.utils.d.ts.map +1 -0
- package/dist/components/organisms/Tables/utilities/tableChildren.utils.js.map +1 -0
- package/dist/components/organisms/Tables/utilities/tableIterable.utils.cjs.map +1 -0
- package/dist/components/organisms/Tables/utilities/tableIterable.utils.d.ts.map +1 -0
- package/dist/components/organisms/Tables/utilities/tableIterable.utils.js.map +1 -0
- package/dist/components/organisms/Tables/utilities/tableSort.utils.cjs.map +1 -0
- package/dist/components/organisms/Tables/utilities/tableSort.utils.d.ts.map +1 -0
- package/dist/components/organisms/Tables/utilities/tableSort.utils.js.map +1 -0
- package/dist/hooks/{useFocusHandOff/index.cjs → __internal__/useFocusHandOff/useFocusHandOff.cjs} +2 -2
- package/dist/hooks/__internal__/useFocusHandOff/useFocusHandOff.cjs.map +1 -0
- package/dist/hooks/{useFocusHandOff/index.d.ts → __internal__/useFocusHandOff/useFocusHandOff.d.ts} +1 -1
- package/dist/hooks/__internal__/useFocusHandOff/useFocusHandOff.d.ts.map +1 -0
- package/dist/hooks/{useFocusHandOff/index.js → __internal__/useFocusHandOff/useFocusHandOff.js} +2 -2
- package/dist/hooks/__internal__/useFocusHandOff/useFocusHandOff.js.map +1 -0
- package/dist/hooks/useFocusAfterRetry/index.cjs +2 -2
- package/dist/hooks/useFocusAfterRetry/index.d.ts +1 -1
- package/dist/hooks/useFocusAfterRetry/index.js +2 -2
- package/dist/hooks/useListQueryParams/index.cjs +238 -0
- package/dist/hooks/useListQueryParams/index.cjs.map +1 -0
- package/dist/hooks/useListQueryParams/index.d.ts +77 -0
- package/dist/hooks/useListQueryParams/index.d.ts.map +1 -0
- package/dist/hooks/useListQueryParams/index.js +236 -0
- package/dist/hooks/useListQueryParams/index.js.map +1 -0
- package/dist/hooks/useLoadState/index.cjs +69 -0
- package/dist/hooks/useLoadState/index.cjs.map +1 -0
- package/dist/hooks/useLoadState/index.d.ts +44 -0
- package/dist/hooks/useLoadState/index.d.ts.map +1 -0
- package/dist/hooks/useLoadState/index.js +67 -0
- package/dist/hooks/useLoadState/index.js.map +1 -0
- package/dist/hooks/usePagedList/index.cjs +61 -0
- package/dist/hooks/usePagedList/index.cjs.map +1 -0
- package/dist/hooks/usePagedList/index.d.ts +56 -0
- package/dist/hooks/usePagedList/index.d.ts.map +1 -0
- package/dist/hooks/usePagedList/index.js +59 -0
- package/dist/hooks/usePagedList/index.js.map +1 -0
- package/dist/native/{hooks/useFocusHandOff → components/organisms/Tables}/index.d.ts +3 -3
- package/dist/native/hooks/useListQueryParams/index.d.ts +12 -0
- package/dist/native/hooks/useLoadState/index.d.ts +12 -0
- package/dist/native/hooks/usePagedList/index.d.ts +12 -0
- package/dist/native/utilities/listQueryUtils/index.d.ts +12 -0
- package/dist/styles.css +3 -3
- package/dist/utilities/__internal__/listStateUtils/listState.utils.cjs +47 -0
- package/dist/utilities/__internal__/listStateUtils/listState.utils.cjs.map +1 -0
- package/dist/utilities/__internal__/listStateUtils/listState.utils.d.ts +51 -0
- package/dist/utilities/__internal__/listStateUtils/listState.utils.d.ts.map +1 -0
- package/dist/utilities/__internal__/listStateUtils/listState.utils.js +43 -0
- package/dist/utilities/__internal__/listStateUtils/listState.utils.js.map +1 -0
- package/dist/utilities/__internal__/stableKeyUtils/stableKey.utils.cjs +67 -0
- package/dist/utilities/__internal__/stableKeyUtils/stableKey.utils.cjs.map +1 -0
- package/dist/utilities/__internal__/stableKeyUtils/stableKey.utils.d.ts +27 -0
- package/dist/utilities/__internal__/stableKeyUtils/stableKey.utils.d.ts.map +1 -0
- package/dist/utilities/__internal__/stableKeyUtils/stableKey.utils.js +64 -0
- package/dist/utilities/__internal__/stableKeyUtils/stableKey.utils.js.map +1 -0
- package/dist/utilities/__internal__/webStorageUtils/webStorage.utils.cjs +28 -0
- package/dist/utilities/__internal__/webStorageUtils/webStorage.utils.cjs.map +1 -1
- package/dist/utilities/__internal__/webStorageUtils/webStorage.utils.d.ts +10 -0
- package/dist/utilities/__internal__/webStorageUtils/webStorage.utils.d.ts.map +1 -1
- package/dist/utilities/__internal__/webStorageUtils/webStorage.utils.js +28 -1
- package/dist/utilities/__internal__/webStorageUtils/webStorage.utils.js.map +1 -1
- package/dist/utilities/listQueryUtils/index.cjs +59 -0
- package/dist/utilities/listQueryUtils/index.cjs.map +1 -0
- package/dist/utilities/listQueryUtils/index.d.ts +46 -0
- package/dist/utilities/listQueryUtils/index.d.ts.map +1 -0
- package/dist/utilities/listQueryUtils/index.js +55 -0
- package/dist/utilities/listQueryUtils/index.js.map +1 -0
- package/dist/utilities/localStorageUtils/localStorageUtils.constants.cjs +2 -0
- package/dist/utilities/localStorageUtils/localStorageUtils.constants.cjs.map +1 -1
- package/dist/utilities/localStorageUtils/localStorageUtils.constants.d.ts +2 -0
- package/dist/utilities/localStorageUtils/localStorageUtils.constants.d.ts.map +1 -1
- package/dist/utilities/localStorageUtils/localStorageUtils.constants.js +2 -0
- package/dist/utilities/localStorageUtils/localStorageUtils.constants.js.map +1 -1
- package/package.json +3 -3
- package/dist/components/organisms/Table/Table.styles.cjs.map +0 -1
- package/dist/components/organisms/Table/Table.styles.d.ts.map +0 -1
- package/dist/components/organisms/Table/Table.styles.js.map +0 -1
- package/dist/components/organisms/Table/components/TableCardList.cjs.map +0 -1
- package/dist/components/organisms/Table/components/TableCardList.d.ts.map +0 -1
- package/dist/components/organisms/Table/components/TableCardList.js.map +0 -1
- package/dist/components/organisms/Table/components/TableCardRow.cjs.map +0 -1
- package/dist/components/organisms/Table/components/TableCardRow.d.ts.map +0 -1
- package/dist/components/organisms/Table/components/TableCardRow.js.map +0 -1
- package/dist/components/organisms/Table/components/TableCardsSelectAll.cjs.map +0 -1
- package/dist/components/organisms/Table/components/TableCardsSelectAll.d.ts.map +0 -1
- package/dist/components/organisms/Table/components/TableCardsSelectAll.js.map +0 -1
- package/dist/components/organisms/Table/components/TableFallbackCard.cjs.map +0 -1
- package/dist/components/organisms/Table/components/TableFallbackCard.d.ts.map +0 -1
- package/dist/components/organisms/Table/components/TableFallbackCard.js.map +0 -1
- package/dist/components/organisms/Table/components/TableLayoutToggle.cjs +0 -27
- package/dist/components/organisms/Table/components/TableLayoutToggle.cjs.map +0 -1
- package/dist/components/organisms/Table/components/TableLayoutToggle.d.ts +0 -17
- package/dist/components/organisms/Table/components/TableLayoutToggle.d.ts.map +0 -1
- package/dist/components/organisms/Table/components/TableLayoutToggle.js +0 -25
- package/dist/components/organisms/Table/components/TableLayoutToggle.js.map +0 -1
- package/dist/components/organisms/Table/components/TableRowCard.cjs.map +0 -1
- package/dist/components/organisms/Table/components/TableRowCard.d.ts.map +0 -1
- package/dist/components/organisms/Table/components/TableRowCard.js.map +0 -1
- package/dist/components/organisms/Table/components/TableSortIcon.cjs.map +0 -1
- package/dist/components/organisms/Table/components/TableSortIcon.d.ts.map +0 -1
- package/dist/components/organisms/Table/components/TableSortIcon.js.map +0 -1
- package/dist/components/organisms/Table/components/TableSortMenu.cjs.map +0 -1
- package/dist/components/organisms/Table/components/TableSortMenu.d.ts.map +0 -1
- package/dist/components/organisms/Table/components/TableSortMenu.js.map +0 -1
- package/dist/components/organisms/Table/hooks/useBusyCount.cjs.map +0 -1
- package/dist/components/organisms/Table/hooks/useBusyCount.d.ts.map +0 -1
- package/dist/components/organisms/Table/hooks/useBusyCount.js.map +0 -1
- package/dist/components/organisms/Table/hooks/useFirstSortDirection.cjs.map +0 -1
- package/dist/components/organisms/Table/hooks/useFirstSortDirection.d.ts.map +0 -1
- package/dist/components/organisms/Table/hooks/useFirstSortDirection.js.map +0 -1
- package/dist/components/organisms/Table/hooks/useIsAtLeastMd.cjs.map +0 -1
- package/dist/components/organisms/Table/hooks/useIsAtLeastMd.d.ts.map +0 -1
- package/dist/components/organisms/Table/hooks/useIsAtLeastMd.js.map +0 -1
- package/dist/components/organisms/Table/hooks/useIsPlaceholderPage.cjs.map +0 -1
- package/dist/components/organisms/Table/hooks/useIsPlaceholderPage.d.ts.map +0 -1
- package/dist/components/organisms/Table/hooks/useIsPlaceholderPage.js.map +0 -1
- package/dist/components/organisms/Table/hooks/usePlaceholderRows.cjs.map +0 -1
- package/dist/components/organisms/Table/hooks/usePlaceholderRows.d.ts.map +0 -1
- package/dist/components/organisms/Table/hooks/usePlaceholderRows.js.map +0 -1
- package/dist/components/organisms/Table/hooks/useSelectableRowRegistry.cjs.map +0 -1
- package/dist/components/organisms/Table/hooks/useSelectableRowRegistry.d.ts.map +0 -1
- package/dist/components/organisms/Table/hooks/useSelectableRowRegistry.js.map +0 -1
- package/dist/components/organisms/Table/hooks/useTableSelection.cjs.map +0 -1
- package/dist/components/organisms/Table/hooks/useTableSelection.d.ts.map +0 -1
- package/dist/components/organisms/Table/hooks/useTableSelection.js.map +0 -1
- package/dist/components/organisms/Table/providers/Table.context.cjs.map +0 -1
- package/dist/components/organisms/Table/providers/Table.context.d.ts.map +0 -1
- package/dist/components/organisms/Table/providers/Table.context.js.map +0 -1
- package/dist/components/organisms/Table/table.types.d.ts.map +0 -1
- package/dist/components/organisms/Table/utilities/tableCard.utils.cjs.map +0 -1
- package/dist/components/organisms/Table/utilities/tableCard.utils.d.ts.map +0 -1
- package/dist/components/organisms/Table/utilities/tableCard.utils.js.map +0 -1
- package/dist/components/organisms/Table/utilities/tableChildren.utils.cjs.map +0 -1
- package/dist/components/organisms/Table/utilities/tableChildren.utils.d.ts.map +0 -1
- package/dist/components/organisms/Table/utilities/tableChildren.utils.js.map +0 -1
- package/dist/components/organisms/Table/utilities/tableIterable.utils.cjs.map +0 -1
- package/dist/components/organisms/Table/utilities/tableIterable.utils.d.ts.map +0 -1
- package/dist/components/organisms/Table/utilities/tableIterable.utils.js.map +0 -1
- package/dist/components/organisms/Table/utilities/tableLoading.utils.cjs.map +0 -1
- package/dist/components/organisms/Table/utilities/tableLoading.utils.d.ts.map +0 -1
- package/dist/components/organisms/Table/utilities/tableLoading.utils.js.map +0 -1
- package/dist/components/organisms/Table/utilities/tableSelection.utils.cjs.map +0 -1
- package/dist/components/organisms/Table/utilities/tableSelection.utils.d.ts.map +0 -1
- package/dist/components/organisms/Table/utilities/tableSelection.utils.js.map +0 -1
- package/dist/components/organisms/Table/utilities/tableSort.utils.cjs.map +0 -1
- package/dist/components/organisms/Table/utilities/tableSort.utils.d.ts.map +0 -1
- package/dist/components/organisms/Table/utilities/tableSort.utils.js.map +0 -1
- package/dist/hooks/useFocusHandOff/index.cjs.map +0 -1
- package/dist/hooks/useFocusHandOff/index.d.ts.map +0 -1
- package/dist/hooks/useFocusHandOff/index.js.map +0 -1
- /package/dist/components/organisms/{Table → Tables/Table}/Table.styles.cjs +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/Table.styles.js +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/components/TableCardsSelectAll.cjs +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/components/TableCardsSelectAll.d.ts +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/components/TableCardsSelectAll.js +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/components/TableFallbackCard.cjs +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/components/TableFallbackCard.js +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/components/TableRowCard.d.ts +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/components/TableSortIcon.cjs +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/components/TableSortIcon.d.ts +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/components/TableSortIcon.js +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/hooks/useBusyCount.cjs +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/hooks/useBusyCount.d.ts +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/hooks/useBusyCount.js +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/hooks/useFirstSortDirection.d.ts +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/hooks/usePlaceholderRows.cjs +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/hooks/usePlaceholderRows.js +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/hooks/useSelectableRowRegistry.cjs +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/hooks/useSelectableRowRegistry.js +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/providers/Table.context.cjs +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/providers/Table.context.js +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/utilities/tableSelection.utils.cjs +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/utilities/tableSelection.utils.d.ts +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/utilities/tableSelection.utils.js +0 -0
- /package/dist/components/organisms/{Table → Tables}/hooks/useIsAtLeastMd.cjs +0 -0
- /package/dist/components/organisms/{Table → Tables}/hooks/useIsAtLeastMd.d.ts +0 -0
- /package/dist/components/organisms/{Table → Tables}/hooks/useIsAtLeastMd.js +0 -0
- /package/dist/components/organisms/{Table → Tables}/utilities/tableCard.utils.cjs +0 -0
- /package/dist/components/organisms/{Table → Tables}/utilities/tableCard.utils.js +0 -0
- /package/dist/components/organisms/{Table → Tables}/utilities/tableChildren.utils.cjs +0 -0
- /package/dist/components/organisms/{Table → Tables}/utilities/tableChildren.utils.js +0 -0
- /package/dist/components/organisms/{Table → Tables}/utilities/tableIterable.utils.cjs +0 -0
- /package/dist/components/organisms/{Table → Tables}/utilities/tableIterable.utils.d.ts +0 -0
- /package/dist/components/organisms/{Table → Tables}/utilities/tableIterable.utils.js +0 -0
- /package/dist/components/organisms/{Table → Tables}/utilities/tableSort.utils.cjs +0 -0
- /package/dist/components/organisms/{Table → Tables}/utilities/tableSort.utils.d.ts +0 -0
- /package/dist/components/organisms/{Table → Tables}/utilities/tableSort.utils.js +0 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var localStorageUtils = require('@flipdish/ui-library/utilities/localStorageUtils');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var webStorage_utils = require('../../../../utilities/__internal__/webStorageUtils/webStorage.utils.cjs');
|
|
6
|
+
|
|
7
|
+
const DEFAULT_LAYOUT = 'table';
|
|
8
|
+
const isTableLayout = (value) => value === 'table' || value === 'cards';
|
|
9
|
+
// The bare layout name, as `sidePanelStorage` keeps its id; `validate` turns anything else into nothing stored.
|
|
10
|
+
const storageOf = (layoutKey) => localStorageUtils.createLocalStorageItem(`${localStorageUtils.LOCAL_STORAGE_KEYS.tableLayout}:${layoutKey}`, {
|
|
11
|
+
serialize: String,
|
|
12
|
+
deserialize: (raw) => raw,
|
|
13
|
+
validate: isTableLayout,
|
|
14
|
+
});
|
|
15
|
+
// A choice storage would not keep, held for the page's lifetime; with storage working, storage alone is the truth.
|
|
16
|
+
const unstoredChoices = new Map();
|
|
17
|
+
const listenersByKey = new Map();
|
|
18
|
+
// One `storage` listener per key in use, so a pick in another tab reaches every component with the key at once.
|
|
19
|
+
const otherTabWatchersByKey = new Map();
|
|
20
|
+
const notify = (layoutKey) => {
|
|
21
|
+
for (const onChange of listenersByKey.get(layoutKey) ?? [])
|
|
22
|
+
onChange();
|
|
23
|
+
};
|
|
24
|
+
const storedLayoutOf = (layoutKey) => unstoredChoices.get(layoutKey) ?? storageOf(layoutKey).get() ?? DEFAULT_LAYOUT;
|
|
25
|
+
const subscribeTo = (layoutKey, onChange) => {
|
|
26
|
+
const listeners = listenersByKey.get(layoutKey) ?? new Set();
|
|
27
|
+
listeners.add(onChange);
|
|
28
|
+
listenersByKey.set(layoutKey, listeners);
|
|
29
|
+
if (!otherTabWatchersByKey.has(layoutKey)) {
|
|
30
|
+
const stopWatching = webStorage_utils.subscribeToOtherDocumentWrites('localStorage', `${localStorageUtils.LOCAL_STORAGE_KEYS.tableLayout}:${layoutKey}`, () => {
|
|
31
|
+
// The other tab wrote storage, so it holds the choice now.
|
|
32
|
+
unstoredChoices.delete(layoutKey);
|
|
33
|
+
notify(layoutKey);
|
|
34
|
+
});
|
|
35
|
+
otherTabWatchersByKey.set(layoutKey, stopWatching);
|
|
36
|
+
}
|
|
37
|
+
return () => {
|
|
38
|
+
listeners.delete(onChange);
|
|
39
|
+
if (listeners.size > 0)
|
|
40
|
+
return;
|
|
41
|
+
listenersByKey.delete(layoutKey);
|
|
42
|
+
otherTabWatchersByKey.get(layoutKey)?.();
|
|
43
|
+
otherTabWatchersByKey.delete(layoutKey);
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
const subscribeToNothing = () => () => { };
|
|
47
|
+
/**
|
|
48
|
+
* Stores the layout chosen for every `Table`, `TableSortMenu` and `TableLayoutToggle` given `layoutKey`, and tells each of
|
|
49
|
+
* them, so they all switch together. Never throws.
|
|
50
|
+
* @param layoutKey - The key the components share.
|
|
51
|
+
* @param layout - The layout the user picked.
|
|
52
|
+
* @returns Nothing; the choice is in `localStorage` under `fd-table-layout:<layoutKey>`, or held for the page's lifetime
|
|
53
|
+
* where storage cannot keep it.
|
|
54
|
+
*/
|
|
55
|
+
const storeTableLayout = (layoutKey, layout) => {
|
|
56
|
+
const storage = storageOf(layoutKey);
|
|
57
|
+
storage.set(layout);
|
|
58
|
+
if (storage.get() === layout)
|
|
59
|
+
unstoredChoices.delete(layoutKey);
|
|
60
|
+
else
|
|
61
|
+
unstoredChoices.set(layoutKey, layout);
|
|
62
|
+
notify(layoutKey);
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* The layout a `Table`, `TableSortMenu` or `TableLayoutToggle` shows from `md` up: its own prop when the page passes one,
|
|
66
|
+
* else the one chosen for its `layoutKey`, kept in step across every component with that key, in every tab of the page's origin.
|
|
67
|
+
* @param layoutKey - The component's `layoutKey`; without one, nothing is read from storage.
|
|
68
|
+
* @param controlledLayout - The component's own layout prop, which wins over anything stored.
|
|
69
|
+
* @returns `controlledLayout` when given; else, for a key, `'table'` on the server and while hydrating, then the stored
|
|
70
|
+
* layout, or `'table'` when none is stored or it is not a layout; else `'table'`.
|
|
71
|
+
*/
|
|
72
|
+
const useStoredTableLayout = (layoutKey, controlledLayout) => {
|
|
73
|
+
// Only a key with nothing controlling it is read, so a controlled component never re-renders for another's choice.
|
|
74
|
+
const readKey = controlledLayout === undefined ? layoutKey : undefined;
|
|
75
|
+
const subscribe = React.useCallback((onChange) => (readKey === undefined ? subscribeToNothing() : subscribeTo(readKey, onChange)), [readKey]);
|
|
76
|
+
const storedLayout = React.useSyncExternalStore(subscribe, () => (readKey === undefined ? DEFAULT_LAYOUT : storedLayoutOf(readKey)),
|
|
77
|
+
// The server cannot read storage, so it and the hydrating render agree on the default.
|
|
78
|
+
() => DEFAULT_LAYOUT);
|
|
79
|
+
return controlledLayout ?? storedLayout;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
exports.storeTableLayout = storeTableLayout;
|
|
83
|
+
exports.useStoredTableLayout = useStoredTableLayout;
|
|
84
|
+
//# sourceMappingURL=useStoredTableLayout.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStoredTableLayout.cjs","sources":["../../../../../src/components/organisms/Tables/hooks/useStoredTableLayout.ts"],"sourcesContent":[null],"names":["createLocalStorageItem","LOCAL_STORAGE_KEYS","subscribeToOtherDocumentWrites","useCallback","useSyncExternalStore"],"mappings":";;;;;;AAOA,MAAM,cAAc,GAAgB,OAAO;AAE3C,MAAM,aAAa,GAAG,CAAC,KAAc,KAA2B,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,OAAO;AAEtG;AACA,MAAM,SAAS,GAAG,CAAC,SAAiB,KAClCA,wCAAsB,CAAc,CAAA,EAAGC,oCAAkB,CAAC,WAAW,CAAA,CAAA,EAAI,SAAS,EAAE,EAAE;AACpF,IAAA,SAAS,EAAE,MAAM;AACjB,IAAA,WAAW,EAAE,CAAC,GAAG,KAAK,GAAkB;AACxC,IAA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|
3
|
+
* Stores the layout chosen for every `Table`, `TableSortMenu` and `TableLayoutToggle` given `layoutKey`, and tells each of
|
|
4
|
+
* them, so they all switch together. Never throws.
|
|
5
|
+
* @param layoutKey - The key the components share.
|
|
6
|
+
* @param layout - The layout the user picked.
|
|
7
|
+
* @returns Nothing; the choice is in `localStorage` under `fd-table-layout:<layoutKey>`, or held for the page's lifetime
|
|
8
|
+
* where storage cannot keep it.
|
|
9
|
+
*/
|
|
10
|
+
export declare const storeTableLayout: (layoutKey: string, layout: TableLayout) => void;
|
|
11
|
+
/**
|
|
12
|
+
* The layout a `Table`, `TableSortMenu` or `TableLayoutToggle` shows from `md` up: its own prop when the page passes one,
|
|
13
|
+
* else the one chosen for its `layoutKey`, kept in step across every component with that key, in every tab of the page's origin.
|
|
14
|
+
* @param layoutKey - The component's `layoutKey`; without one, nothing is read from storage.
|
|
15
|
+
* @param controlledLayout - The component's own layout prop, which wins over anything stored.
|
|
16
|
+
* @returns `controlledLayout` when given; else, for a key, `'table'` on the server and while hydrating, then the stored
|
|
17
|
+
* layout, or `'table'` when none is stored or it is not a layout; else `'table'`.
|
|
18
|
+
*/
|
|
19
|
+
export declare const useStoredTableLayout: (layoutKey: string | undefined, controlledLayout: TableLayout | undefined) => TableLayout;
|
|
20
|
+
//# sourceMappingURL=useStoredTableLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStoredTableLayout.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/Tables/hooks/useStoredTableLayout.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAiDnD;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,GAAI,WAAW,MAAM,EAAE,QAAQ,WAAW,KAAG,IAMzE,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,GAAI,WAAW,MAAM,GAAG,SAAS,EAAE,kBAAkB,WAAW,GAAG,SAAS,KAAG,WAW/G,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { LOCAL_STORAGE_KEYS, createLocalStorageItem } from '@flipdish/ui-library/utilities/localStorageUtils';
|
|
2
|
+
import { useCallback, useSyncExternalStore } from 'react';
|
|
3
|
+
import { subscribeToOtherDocumentWrites } from '../../../../utilities/__internal__/webStorageUtils/webStorage.utils.js';
|
|
4
|
+
|
|
5
|
+
const DEFAULT_LAYOUT = 'table';
|
|
6
|
+
const isTableLayout = (value) => value === 'table' || value === 'cards';
|
|
7
|
+
// The bare layout name, as `sidePanelStorage` keeps its id; `validate` turns anything else into nothing stored.
|
|
8
|
+
const storageOf = (layoutKey) => createLocalStorageItem(`${LOCAL_STORAGE_KEYS.tableLayout}:${layoutKey}`, {
|
|
9
|
+
serialize: String,
|
|
10
|
+
deserialize: (raw) => raw,
|
|
11
|
+
validate: isTableLayout,
|
|
12
|
+
});
|
|
13
|
+
// A choice storage would not keep, held for the page's lifetime; with storage working, storage alone is the truth.
|
|
14
|
+
const unstoredChoices = new Map();
|
|
15
|
+
const listenersByKey = new Map();
|
|
16
|
+
// One `storage` listener per key in use, so a pick in another tab reaches every component with the key at once.
|
|
17
|
+
const otherTabWatchersByKey = new Map();
|
|
18
|
+
const notify = (layoutKey) => {
|
|
19
|
+
for (const onChange of listenersByKey.get(layoutKey) ?? [])
|
|
20
|
+
onChange();
|
|
21
|
+
};
|
|
22
|
+
const storedLayoutOf = (layoutKey) => unstoredChoices.get(layoutKey) ?? storageOf(layoutKey).get() ?? DEFAULT_LAYOUT;
|
|
23
|
+
const subscribeTo = (layoutKey, onChange) => {
|
|
24
|
+
const listeners = listenersByKey.get(layoutKey) ?? new Set();
|
|
25
|
+
listeners.add(onChange);
|
|
26
|
+
listenersByKey.set(layoutKey, listeners);
|
|
27
|
+
if (!otherTabWatchersByKey.has(layoutKey)) {
|
|
28
|
+
const stopWatching = subscribeToOtherDocumentWrites('localStorage', `${LOCAL_STORAGE_KEYS.tableLayout}:${layoutKey}`, () => {
|
|
29
|
+
// The other tab wrote storage, so it holds the choice now.
|
|
30
|
+
unstoredChoices.delete(layoutKey);
|
|
31
|
+
notify(layoutKey);
|
|
32
|
+
});
|
|
33
|
+
otherTabWatchersByKey.set(layoutKey, stopWatching);
|
|
34
|
+
}
|
|
35
|
+
return () => {
|
|
36
|
+
listeners.delete(onChange);
|
|
37
|
+
if (listeners.size > 0)
|
|
38
|
+
return;
|
|
39
|
+
listenersByKey.delete(layoutKey);
|
|
40
|
+
otherTabWatchersByKey.get(layoutKey)?.();
|
|
41
|
+
otherTabWatchersByKey.delete(layoutKey);
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
const subscribeToNothing = () => () => { };
|
|
45
|
+
/**
|
|
46
|
+
* Stores the layout chosen for every `Table`, `TableSortMenu` and `TableLayoutToggle` given `layoutKey`, and tells each of
|
|
47
|
+
* them, so they all switch together. Never throws.
|
|
48
|
+
* @param layoutKey - The key the components share.
|
|
49
|
+
* @param layout - The layout the user picked.
|
|
50
|
+
* @returns Nothing; the choice is in `localStorage` under `fd-table-layout:<layoutKey>`, or held for the page's lifetime
|
|
51
|
+
* where storage cannot keep it.
|
|
52
|
+
*/
|
|
53
|
+
const storeTableLayout = (layoutKey, layout) => {
|
|
54
|
+
const storage = storageOf(layoutKey);
|
|
55
|
+
storage.set(layout);
|
|
56
|
+
if (storage.get() === layout)
|
|
57
|
+
unstoredChoices.delete(layoutKey);
|
|
58
|
+
else
|
|
59
|
+
unstoredChoices.set(layoutKey, layout);
|
|
60
|
+
notify(layoutKey);
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* The layout a `Table`, `TableSortMenu` or `TableLayoutToggle` shows from `md` up: its own prop when the page passes one,
|
|
64
|
+
* else the one chosen for its `layoutKey`, kept in step across every component with that key, in every tab of the page's origin.
|
|
65
|
+
* @param layoutKey - The component's `layoutKey`; without one, nothing is read from storage.
|
|
66
|
+
* @param controlledLayout - The component's own layout prop, which wins over anything stored.
|
|
67
|
+
* @returns `controlledLayout` when given; else, for a key, `'table'` on the server and while hydrating, then the stored
|
|
68
|
+
* layout, or `'table'` when none is stored or it is not a layout; else `'table'`.
|
|
69
|
+
*/
|
|
70
|
+
const useStoredTableLayout = (layoutKey, controlledLayout) => {
|
|
71
|
+
// Only a key with nothing controlling it is read, so a controlled component never re-renders for another's choice.
|
|
72
|
+
const readKey = controlledLayout === undefined ? layoutKey : undefined;
|
|
73
|
+
const subscribe = useCallback((onChange) => (readKey === undefined ? subscribeToNothing() : subscribeTo(readKey, onChange)), [readKey]);
|
|
74
|
+
const storedLayout = useSyncExternalStore(subscribe, () => (readKey === undefined ? DEFAULT_LAYOUT : storedLayoutOf(readKey)),
|
|
75
|
+
// The server cannot read storage, so it and the hydrating render agree on the default.
|
|
76
|
+
() => DEFAULT_LAYOUT);
|
|
77
|
+
return controlledLayout ?? storedLayout;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export { storeTableLayout, useStoredTableLayout };
|
|
81
|
+
//# sourceMappingURL=useStoredTableLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStoredTableLayout.js","sources":["../../../../../src/components/organisms/Tables/hooks/useStoredTableLayout.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAOA,MAAM,cAAc,GAAgB,OAAO;AAE3C,MAAM,aAAa,GAAG,CAAC,KAAc,KAA2B,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,OAAO;AAEtG;AACA,MAAM,SAAS,GAAG,CAAC,SAAiB,KAClC,sBAAsB,CAAc,CAAA,EAAG,kBAAkB,CAAC,WAAW,CAAA,CAAA,EAAI,SAAS,EAAE,EAAE;AACpF,IAAA,SAAS,EAAE,MAAM;AACjB,IAAA,WAAW,EAAE,CAAC,GAAG,KAAK,GAAkB;AACxC,IAAA,QAAQ,EAAE,aAAa;AACxB,CAAA,CAAC;AAEJ;AACA,MAAM,eAAe,GAAG,IAAI,GAAG,EAAuB;AACtD,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,SAAS,CAAC,IAAI;AACxC,QAAA,qBAAqB,CAAC,MAAM,CAAC,SAAS,CAAC;AACzC,IAAA,CAAC;AACH,CAAC;AAED,MAAM,kBAAkB,GAAG,MAAM,MAAK,EAAE,CAAC;AAEzC;;;;;;;AAOG;MACU,gBAAgB,GAAG,CAAC,SAAiB,EAAE,MAAmB,KAAU;AAC/E,IAAA,MAAM,OAAO,GAAG,SAAS,CAAC,SAAS,CAAC;AACpC,IAAA,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC;AACnB,IAAA,IAAI,OAAO,CAAC,GAAG,EAAE,KAAK,MAAM;AAAE,QAAA,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC;;AAC1D,QAAA,eAAe,CAAC,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3C,MAAM,CAAC,SAAS,CAAC;AACnB;AAEA;;;;;;;AAOG;MACU,oBAAoB,GAAG,CAAC,SAA6B,EAAE,gBAAyC,KAAiB;;AAE5H,IAAA,MAAM,OAAO,GAAG,gBAAgB,KAAK,SAAS,GAAG,SAAS,GAAG,SAAS;AACtE,IAAA,MAAM,SAAS,GAAG,WAAW,CAAC,CAAC,QAAoB,MAAM,OAAO,KAAK,SAAS,GAAG,kBAAkB,EAAE,GAAG,WAAW,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;IACnJ,MAAM,YAAY,GAAG,oBAAoB,CACvC,SAAS,EACT,OAAO,OAAO,KAAK,SAAS,GAAG,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;;AAExE,IAAA,MAAM,cAAc,CACrB;IACD,OAAO,gBAAgB,IAAI,YAAY;AACzC;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var Table = require('./Table/Table.cjs');
|
|
4
|
+
var TableLayoutToggle = require('./TableLayoutToggle/TableLayoutToggle.cjs');
|
|
5
|
+
var TableSortMenu = require('./TableSortMenu/TableSortMenu.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
exports.Table = Table.Table;
|
|
10
|
+
exports.TableCard = Table.TableCard;
|
|
11
|
+
exports.TableRowActionsDropdown = Table.TableRowActionsDropdown;
|
|
12
|
+
exports.TableLayoutToggle = TableLayoutToggle.TableLayoutToggle;
|
|
13
|
+
exports.TableSortMenu = TableSortMenu.TableSortMenu;
|
|
14
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Records in rows and columns, or as one card per row: `Table` with `TableCard` around it and
|
|
3
|
+
* `TableRowActionsDropdown` in its last column, `TableSortMenu` to sort its cards and `TableLayoutToggle` to switch between
|
|
4
|
+
* the two.
|
|
5
|
+
*
|
|
6
|
+
* Explicit named re-exports on purpose: `export *` would publish every symbol of every member and private file (import
|
|
7
|
+
* paths are the public API here), so this list is the single source of truth for what Tables exposes. Each member's
|
|
8
|
+
* implementation, stories and docs live in its own folder (`TableSortMenu/TableSortMenu.tsx`), never as `index.tsx`: the
|
|
9
|
+
* `exports` wildcard would make that folder a public path. `TableCard` and `TableRowActionsDropdown` share `Table`'s folder,
|
|
10
|
+
* as they share its docs page.
|
|
11
|
+
*/
|
|
12
|
+
export type { TableRowCardContentProps, TableRowCardFooterProps, TableRowCardHeaderProps, TableRowCardSkeletonProps, } from './Table/Table';
|
|
13
|
+
export { Table, TableCard, TableRowActionsDropdown } from './Table/Table';
|
|
14
|
+
export type { TableLayoutToggleProps } from './TableLayoutToggle/TableLayoutToggle';
|
|
15
|
+
export { TableLayoutToggle } from './TableLayoutToggle/TableLayoutToggle';
|
|
16
|
+
export type { TableSortMenuProps } from './TableSortMenu/TableSortMenu';
|
|
17
|
+
export { TableSortMenu } from './TableSortMenu/TableSortMenu';
|
|
18
|
+
export type { TableLayout, TableRowColor } from './tables.types';
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/Tables/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,YAAY,EACV,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAC1E,YAAY,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,YAAY,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -32,7 +32,9 @@ export interface TableRowProps<T extends object> extends AriaRowProps<T>, Omit<C
|
|
|
32
32
|
/**
|
|
33
33
|
* Tints the row and its card with a status colour; the highlight still wins. Never the only signal: pair it with a badge
|
|
34
34
|
* or text that says the same, for anyone who cannot tell the colours apart. A placeholder row, one carrying
|
|
35
|
-
* `Table.RowCard.Skeleton` or drawn by `isLoading`, ignores it.
|
|
35
|
+
* `Table.RowCard.Skeleton` or drawn by `isLoading`, ignores it. `warning` for a row that needs attention soon, such as an
|
|
36
|
+
* order running late; `error` for one that failed, such as a payment; `success` for one just done, such as an order ready;
|
|
37
|
+
* `orange` for one awaiting action, such as a request to approve.
|
|
36
38
|
*/
|
|
37
39
|
color?: TableRowColor;
|
|
38
40
|
/** Row height and cell padding; inherits from the table unless set. */
|
|
@@ -40,4 +42,4 @@ export interface TableRowProps<T extends object> extends AriaRowProps<T>, Omit<C
|
|
|
40
42
|
/** Overrides the derived `data-testid` for the row (defaults to `<root>--row-<id>`). */
|
|
41
43
|
'data-testid'?: string;
|
|
42
44
|
}
|
|
43
|
-
//# sourceMappingURL=
|
|
45
|
+
//# sourceMappingURL=tables.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tables.types.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/Tables/tables.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,IAAI,YAAY,EAAE,cAAc,IAAI,kBAAkB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3H,0FAA0F;AAC1F,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAEpC,sEAAsE;AACtE,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,OAAO,CAAC;AAE5C,2IAA2I;AAC3I,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEvE,8EAA8E;AAC9E,MAAM,WAAW,eAAe;IAC9B,kGAAkG;IAClG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qDAAqD;IACrD,WAAW,EAAE,OAAO,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,aAAa,CAAC,MAAM,CAAC,EACrB,UAAU,GAAG,OAAO,GAAG,cAAc,GAAG,kBAAkB,GAAG,WAAW,GAAG,OAAO,GAAG,kBAAkB,CACxG,GAAG;IAAE,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/B,MAAM,WAAW,cAAc,CAAC,CAAC,CAAE,SAAQ,kBAAkB,CAAC,CAAC,CAAC;IAC9D,kHAAkH;IAClH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,MAAM,CAC7C,SAAQ,YAAY,CAAC,CAAC,CAAC,EACrB,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;IAChH,yGAAyG;IACzG,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,4GAA4G;IAC5G,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,uEAAuE;IACvE,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,wFAAwF;IACxF,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tableCard.utils.cjs","sources":["../../../../../src/components/organisms/Tables/utilities/tableCard.utils.ts"],"sourcesContent":[null],"names":["filterDOMProps","joinTestId","slugifyTestId","isValidElement","findElement"],"mappings":";;;;;;;AAOA;;;;;;;AAOG;AACI,MAAM,aAAa,GAAG,CAAC,WAAoB,EAAE,YAAyB,EAAE,aAA0B,EAAE,aAAa,GAAG,KAAK,KAAiB;AAC/I,IAAA,IAAI,aAAa;AAAE,QAAA,OAAO,OAAO;IACjC,OAAO,WAAW,GAAG,aAAa,GAAG,YAAY;AACnD;AAKA;;;;;AAKG;AACI,MAAM,eAAe,GAAG,CAAmB,KAA2C,KAC3F;AAKF;;;;;AAKG;AACI,MAAM,eAAe,GAAG,CAAmB,KAA+C,KAC/F;AAEF;;;;;AAKG;AACI,MAAM,mBAAmB,GAAG,CAAC,EAClC,MAAM,EAAE,eAAe,EACvB,SAAS,EAAE,kBAAkB,EAC7B,KAAK,EAAE,cAAc,EACrB,GAAG,KAAK,EACe,KAAgC;AAgBzD;;;;;AAKG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import type { GridListItemProps, GridListLoadMoreItemProps, Key, TableLoadMoreItemProps } from 'react-aria-components';
|
|
3
|
-
import type { TableCardColumn, TableCardListProps, TableLayout } from '../
|
|
3
|
+
import type { TableCardColumn, TableCardListProps, TableLayout } from '../tables.types';
|
|
4
4
|
/**
|
|
5
5
|
* Picks the layout a table renders from the viewport, the two layout props, and whether react-aria virtualizes it.
|
|
6
6
|
* @param isAtLeastMd - Whether the viewport is `md` or wider; `false` where `matchMedia` is missing or never matches.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tableCard.utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/Tables/utilities/tableCard.utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,GAAG,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACvH,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAGxF;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,GAAI,aAAa,OAAO,EAAE,cAAc,WAAW,EAAE,eAAe,WAAW,EAAE,uBAAqB,KAAG,WAGlI,CAAC;AAEF,0EAA0E;AAC1E,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,GAAG,kBAAkB,GAAG,gBAAgB,GAAG,cAAc,GAAG,aAAa,CAAC;AAEnJ;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS,MAAM,EAAE,OAAO,CAAC,GAAG,GAAG,CAAC,IAAI,aAAa,CAAC,CAAC,EAAE,KAAK,GAAE,KAAG,kBACxD,CAAC;AAEzC,8HAA8H;AAC9H,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,GAA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CAC9B;AAED;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,MAAM,SAAS,KAAG,MAG5C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,OAAO,SAAS,SAAS,EAAE,KAAG,MAA4E,CAAC;AAEhJ;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,GAAI,CAAC,EACjC,SAAS,SAAS,eAAe,EAAE,EACnC,OAAO,SAAS,CAAC,EAAE,EACnB,SAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,MAAgB,KACpC,iBAAiB,CAAC,CAAC,CAqBrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tableCard.utils.js","sources":["../../../../../src/components/organisms/Tables/utilities/tableCard.utils.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAOA;;;;;;;AAOG;AACI,MAAM,aAAa,GAAG,CAAC,WAAoB,EAAE,YAAyB,EAAE,aAA0B,EAAE,aAAa,GAAG,KAAK,KAAiB;AAC/I,IAAA,IAAI,aAAa;AAAE,QAAA,OAAO,OAAO;IACjC,OAAO,WAAW,GAAG,aAAa,GAAG,YAAY;AACnD;AAKA;;;;;AAKG;AACI,MAAM,eAAe,GAAG,CAAmB,KAA2C,KAC3F;AAKF;;;;;AAKG;AACI,MAAM,eAAe,GAAG,CAAmB,KAA+C,KAC/F;AAEF;;;;;AAKG;AACI,MAAM,mBAAmB,GAAG,CAAC,EAClC,MAAM,EAAE,eAAe,EACvB,SAAS,EAAE,kBAAkB,EAC7B,KAAK,EAAE,cAAc,EACrB,GAAG,KAAK,EACe,KAAgC;AAgBzD;;;;;AAKG;AACI,MAAM,cAAc,GAAG,CAAmB,KAA8C,KAC7F;AAKF;;;;;;AAMG;AACI,MAAM,eAAe,GAAG,CAAmB,KAA+C;AAC/F;AACA,cAAc,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;AAExC;;;;;;AAMG;AACI,MAAM,WAAW,GAA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AAiB,GAAG,CAC/B,OAAmC,EACnC,KAAmB,EACnB,SAA8B,MAAM,CAAC,KACb;IACxB,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,CAC1B,OAAO,CAAC,SAAS,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,WAAW,CAAC,EACjD,CAAC,CACF;IACD,MAAM,KAAK,GAAyB,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;IAE/D,IAAI,UAAU,GAAG,CAAC;IAClB,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,KAAI;QAC5B,MAAM,WAAW,GAAG,UAAU;AAC9B,QAAA,UAAU,IAAI,MAAM,CAAC,IAAI,CAAC;AAC1B,QAAA,IAAI,WAAW,KAAK,WAAW,EAAE;AAC/B,YAAA,KAAK,CAAC,KAAK,GAAG,IAAI;YAClB;QACF;AACA,QAAA,MAAM,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;AACnC,QAAA,IAAI,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK;AAAE,YAAA,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;;YACjD,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC1E,IAAA,CAAC,CAAC;AAEF,IAAA,OAAO,KAAK;AACd;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tableChildren.utils.cjs","sources":["../../../../../src/components/organisms/Tables/utilities/tableChildren.utils.ts"],"sourcesContent":[null],"names":["flattenChildren","isValidElement","Children","reusableIterableOf"],"mappings":";;;;;;AAQA;;;;;AAKG;AACI,MAAM,WAAW,GAAG,CAAI,QAAmB,EAAE,IAAa,KAC/DA,8BAAe,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,KAA+BC,oBA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,KAAK,CAAC,QAAQ,GAAG,SAAS,CAAC;AACvF,QAAA,WAAW,EAAE,KAAK,CAAC,WAAW,KAAK,IAAI;AACxC,KAAA,CAAC,CAAC;AACL;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactElement, type ReactNode } from 'react';
|
|
2
|
-
import type { TableCardColumn } from '../
|
|
2
|
+
import type { TableCardColumn } from '../tables.types';
|
|
3
3
|
/** Children as a row or header may take them: nodes, or a function called once per column. */
|
|
4
4
|
type CollectionChildren<T> = ReactNode | ((column: T) => ReactElement);
|
|
5
5
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tableChildren.utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/Tables/utilities/tableChildren.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEpF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGvD,8FAA8F;AAC9F,KAAK,kBAAkB,CAAC,CAAC,IAAI,SAAS,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,YAAY,CAAC,CAAC;AAEvE;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,EAAE,UAAU,SAAS,EAAE,MAAM,OAAO,KAAG,YAAY,CAAC,CAAC,CAAC,GAAG,SAC6B,CAAC;AAEpH,wFAAwF;AACxF,MAAM,WAAW,WAAW;IAC1B,wDAAwD;IACxD,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,6EAA6E;IAC7E,SAAS,EAAE,MAAM,CAAC;IAClB,uDAAuD;IACvD,KAAK,EAAE,SAAS,EAAE,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,GAAI,CAAC,EAChC,UAAU,kBAAkB,CAAC,CAAC,CAAC,EAC/B,SAAS,QAAQ,CAAC,CAAC,CAAC,GAAG,SAAS,EAChC,QAAQ,CAAC,OAAO,EAAE,YAAY,KAAK,OAAO,KACzC,WAMF,CAAC;AAQF;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,GAAI,CAAC,EAAE,UAAU,kBAAkB,CAAC,CAAC,CAAC,EAAE,UAAU,QAAQ,CAAC,CAAC,CAAC,KAAG,eAAe,EAM1G,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tableChildren.utils.js","sources":["../../../../../src/components/organisms/Tables/utilities/tableChildren.utils.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAQA;;;;;AAKG;AACI,MAAM,WAAW,GAAG,CAAI,QAAmB,EAAE,IAAa,KAC/D,eAAe,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,KAA+B,cAAc,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI;AAYlH;;;;;;;;;AASG;AACI,MAAM,gBAAgB,GAAG,CAC9B,QAA+B,EAC/B,OAAgC,EAChC,MAA0C,KAC3B;IACf,IAAI,OAAO,QAAQ,KAAK,UAAU;QAAE,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,QAAQ,CAAC,CAAC,EAAE;AAC7I,IAAA,MAAM,IAAI,GAAG,eAAe,CAAC,QAAQ,CAAC;AACtC,IAAA,MAAM,WAAW,GAAG,CAAC,KAAgB,KAA4B,cAAc,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC;IACvG,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;AACtC,IAAA,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE;AACxG;AAQA;;;;;;AAMG;MACU,eAAe,GAAG,CAAI,QAA+B,EAAE,OAAqB,KAAuB;AAC9G,IAAA,MAAM,KAAK,GAAG,OAAO,QAAQ,KAAK,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,QAAQ,CAAC,GAAG,eAAe,CAAC,QAAQ,CAAC;AAClI,IAAA,OAAO,KAAK,CAAC,MAAM,EAAC,cAAyB,EAAC,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM;QACjE,KAAK,EAAE,KAAK,CAAC,KAAK,KAAK,OAAO,KAAK,CAAC,QAAQ,KAAK,QAAQ,GAAG,KAAK,CAAC,QAAQ,GAAG,SAAS,CAAC;AACvF,QAAA,WAAW,EAAE,KAAK,CAAC,WAAW,KAAK,IAAI;AACxC,KAAA,CAAC,CAAC;AACL;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tableIterable.utils.cjs","sources":["../../../../../src/components/organisms/Tables/utilities/tableIterable.utils.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA,MAAM,QAAQ,GAAG,IAAI,OAAO,EAAqB;AAEjD;;;;;AAKG;AACI,MAAM,kBAAkB,GAAG,CAAI,KAA8B,KAA6B;IAC/F,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ;AAAE,QAAA,OAAO,KAAK;;AAEpF,IAAA,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;AAAE,QAAA,OAAO,KAAK;AAC7D,IAAA,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;AACrD,IAAA,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC;AACzB,IAAA,OAAO,IAAW;AACpB;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tableIterable.utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/Tables/utilities/tableIterable.utils.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,CAAC,EAAE,OAAO,QAAQ,CAAC,CAAC,CAAC,GAAG,SAAS,KAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,SAOpF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tableIterable.utils.js","sources":["../../../../../src/components/organisms/Tables/utilities/tableIterable.utils.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA,MAAM,QAAQ,GAAG,IAAI,OAAO,EAAqB;AAEjD;;;;;AAKG;AACI,MAAM,kBAAkB,GAAG,CAAI,KAA8B,KAA6B;IAC/F,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ;AAAE,QAAA,OAAO,KAAK;;AAEpF,IAAA,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;AAAE,QAAA,OAAO,KAAK;AAC7D,IAAA,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;AACrD,IAAA,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC;AACzB,IAAA,OAAO,IAAW;AACpB;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tableSort.utils.cjs","sources":["../../../../../src/components/organisms/Tables/utilities/tableSort.utils.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAEA;;;;;AAKG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,EAAE,SAAwB,KACjG,OAAO,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,SAAS;AAEhD;;;;;AAKG;AACI,MAAM,mBAAmB,GAAG,CAAC,EAAO,MAAc,OAAO,EAAE,KAAK,QAAQ,GAAG,CAAA,OAAA,EAAU,EAAE,CAAA,CAAE,GAAG,CAAA,IAAA,EAAO,EAAE,CAAA,CAAE;AAE9G;;;;;AAKG;AACI,MAAM,mBAAmB,GAAG,CAAwB,OAAqB,EAAE,GAAoB,KACpG,GAAG,KAAK,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,mBAAmB,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,GAAG;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tableSort.utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/Tables/utilities/tableSort.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEhF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI,SAAS,cAAc,GAAG,SAAS,EAAE,OAAO,cAAc,GAAG,SAAS,KAAG,OACtB,CAAC;AAE/E,gGAAgG;AAChG,MAAM,WAAW,SAAS;IACxB,8BAA8B;IAC9B,MAAM,EAAE,GAAG,CAAC;IACZ,0GAA0G;IAC1G,SAAS,EAAE,aAAa,CAAC;CAC1B;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,GACtB,UAAU,SAAS,GAAG,SAAS,EAC/B,gBAAgB,cAAc,GAAG,SAAS,EAC1C,UAAU,cAAc,KACvB,SAAS,GAAG,SAOd,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,GAAI,SAAS,cAAc,GAAG,SAAS,EAAE,MAAM,cAAc,EAAE,iBAAiB,aAAa,KAAG,QAAQ,GAAG,OAKjI,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,SAAS,cAAc,GAAG,SAAS,EAAE,QAAQ,GAAG,KAAG,cAGpF,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAAI,SAAS,cAAc,GAAG,SAAS,EAAE,WAAW,aAAa,KAAG,cAAc,GAAG,SACrE,CAAC;AAEnD;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAAI,IAAI,GAAG,KAAG,MAAiE,CAAC;AAEhH;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS;IAAE,EAAE,EAAE,GAAG,CAAA;CAAE,EAAE,SAAS,SAAS,CAAC,EAAE,EAAE,KAAK,GAAG,GAAG,SAAS,KAAG,CAAC,GAAG,SACX,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tableSort.utils.js","sources":["../../../../../src/components/organisms/Tables/utilities/tableSort.utils.ts"],"sourcesContent":[null],"names":[],"mappings":"AAEA;;;;;AAKG;AACI,MAAM,UAAU,GAAG,CAAC,OAAmC,EAAE,KAAiC,KAC/F,OAAO,EAAE,MAAM,KAAK,KAAK,EAAE,MAAM,IAAI,OAAO,EAAE,SAAS,KAAK,KAAK,EAAE;AAUrE;;;;;;;;AAQG;AACI,MAAM,WAAW,GAAG,CACzB,QAA+B,EAC/B,cAA0C,EAC1C,OAAwB,KACC;AACzB,IAAA,IAAI,CAAC,cAAc;AAAE,QAAA,OAAO,SAAS;IACrC,MAAM,YAAY,GAAG,QAAQ,EAAE,MAAM,KAAK,cAAc,CAAC,MAAM;IAC/D,IAAI,YAAY,IAAI,CAAC,UAAU,CAAC,cAAc,EAAE,OAAO,CAAC;AAAE,QAAA,OAAO,QAAQ;;IAEzE,IAAI,YAAY,IAAI,QAAQ,EAAE,SAAS,KAAK,cAAc,CAAC,SAAS;AAAE,QAAA,OAAO,QAAQ;AACrF,IAAA,OAAO,EAAE,MAAM,EAAE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
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
-
var focusFromCode_utils = require('
|
|
4
|
+
var focusFromCode_utils = require('../../../utilities/__internal__/focusUtils/focusFromCode.utils.cjs');
|
|
5
5
|
|
|
6
6
|
// What `styles.css` draws the keyboard-only focus ring from; also spelled there.
|
|
7
7
|
const FOCUS_TARGET_ATTRIBUTE = 'data-focus-hand-off-target';
|
|
@@ -64,4 +64,4 @@ const useFocusHandOff = () => {
|
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
exports.useFocusHandOff = useFocusHandOff;
|
|
67
|
-
//# sourceMappingURL=
|
|
67
|
+
//# sourceMappingURL=useFocusHandOff.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFocusHandOff.cjs","sources":["../../../../src/hooks/__internal__/useFocusHandOff/useFocusHandOff.ts"],"sourcesContent":[null],"names":["isFocusableFromCodeOnly","takeFocusFromCodeOnly","useRef","useCallback"],"mappings":";;;;;AAKA;AACA,MAAM,sBAAsB,GAAG,4BAA4B;AAE3D;AACA;AACA,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC;AAEnE,MAAM,aAAa,GAAG,CAAC,OAAoB,KAAI;IAC7C,MAAM,KAAK,GAAG,OAAO,CAAC,YAAY,CAAC,iBAAiB,CAAC;AACrD,IAAA,OAAO,KAAK,KAAK,IAAI,IAAI,mBAAmB,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;AACvE,CAAC;AAED;AACA;AACA;AACA,MAAM,eAAe,GAAG,CAAC,OAAoB,KAAI;IAC/C,IAAI,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,OAAO,CAAC,QAAQ,IAAI,CAAC,IAAI,aAAa,CAAC,OAAO,CAAC,IAAIA,2CAAuB,CAAC,OAAO,CAAC;QAAE;IAC7HC,yCAAqB,CAAC,OAAO,CAAC;AAC9B,IAAA,OAAO,CAAC,YAAY,CAAC,sBAAsB,EAAE,EAAE,CAAC;AAClD,CAAC;AAED;;;;;;;;;;;AAWG;AACI,MAAM,eAAe,GAAG,MAAK;AAClC,IAAA,MAAM,SAAS,GAAGC,YAAM,CAAC,KAAK,CAAC;AAE/B,IAAA,MAAM,OAAO,GAAGC,iBAAW,CACzB,CAAiC,MAAiC,KAChE,CAAC,GAAG,IAAU,KAAY;AACxB,QAAA,SAAS,CAAC,OAAO,GAAG,IAAI;AACxB,QAAA,IAAI;AACF,YAAA,OAAO,MAAM,CAAC,GAAG,IAAI,CAAC;QACxB;QAAE,OAAO,KAAK,EAAE;;AAEd,YAAA,SAAS,CAAC,OAAO,GAAG,KAAK;AACzB,YAAA,MAAM,KAAK;QACb;IACF,CAAC,EACH,EAAE,CACH;AAED,IAAA,MAAM,SAAS,GAAGA,iBAAW,CAAC,CAAC,MAA0B,KAAI;AAC3D,QAAA,IAAI,CAAC,MAAM;YAAE;QACb,eAAe,CAAC,MAAM,CAAC;QACvB,IAAI,CAAC,SAAS,CAAC,OAAO;YAAE;AACxB,QAAA,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM;;AAEhC,QAAA,IAAI,aAAa,CAAC,aAAa,KAAK,aAAa,CAAC,IAAI;YAAE,MAAM,CAAC,KAAK,EAAE;;AAEtE,QAAA,IAAI,aAAa,CAAC,aAAa,KAAK,aAAa,CAAC,IAAI;AAAE,YAAA,SAAS,CAAC,OAAO,GAAG,KAAK;IACnF,CAAC,EAAE,EAAE,CAAC;AAEN,IAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE;AAC/B;;"}
|
package/dist/hooks/{useFocusHandOff/index.d.ts → __internal__/useFocusHandOff/useFocusHandOff.d.ts}
RENAMED
|
@@ -14,4 +14,4 @@ export declare const useFocusHandOff: () => {
|
|
|
14
14
|
handOff: <Args extends unknown[], Result>(action: (...args: Args) => Result) => (...args: Args) => Result;
|
|
15
15
|
targetRef: (target: HTMLElement | null) => void;
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=
|
|
17
|
+
//# sourceMappingURL=useFocusHandOff.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFocusHandOff.d.ts","sourceRoot":"","sources":["../../../../src/hooks/__internal__/useFocusHandOff/useFocusHandOff.ts"],"names":[],"mappings":"AA0BA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe;cAIvB,IAAI,SAAS,OAAO,EAAE,EAAE,MAAM,UAAU,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,MAAM,eACtD,IAAI,KAAG,MAAM;wBAaY,WAAW,GAAG,IAAI;CAY1D,CAAC"}
|
package/dist/hooks/{useFocusHandOff/index.js → __internal__/useFocusHandOff/useFocusHandOff.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useRef, useCallback } from 'react';
|
|
2
|
-
import { isFocusableFromCodeOnly, takeFocusFromCodeOnly } from '
|
|
2
|
+
import { isFocusableFromCodeOnly, takeFocusFromCodeOnly } from '../../../utilities/__internal__/focusUtils/focusFromCode.utils.js';
|
|
3
3
|
|
|
4
4
|
// What `styles.css` draws the keyboard-only focus ring from; also spelled there.
|
|
5
5
|
const FOCUS_TARGET_ATTRIBUTE = 'data-focus-hand-off-target';
|
|
@@ -62,4 +62,4 @@ const useFocusHandOff = () => {
|
|
|
62
62
|
};
|
|
63
63
|
|
|
64
64
|
export { useFocusHandOff };
|
|
65
|
-
//# sourceMappingURL=
|
|
65
|
+
//# sourceMappingURL=useFocusHandOff.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFocusHandOff.js","sources":["../../../../src/hooks/__internal__/useFocusHandOff/useFocusHandOff.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAKA;AACA,MAAM,sBAAsB,GAAG,4BAA4B;AAE3D;AACA;AACA,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC,CAAC,EAAE,EAAE,MAAM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I,aAAa,CAAC,aAAa,KAAK,aAAa,CAAC,IAAI;YAAE,MAAM,CAAC,KAAK,EAAE;;AAEtE,QAAA,IAAI,aAAa,CAAC,aAAa,KAAK,aAAa,CAAC,IAAI;AAAE,YAAA,SAAS,CAAC,OAAO,GAAG,KAAK;IACnF,CAAC,EAAE,EAAE,CAAC;AAEN,IAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE;AAC/B;;"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var useFocusHandOff = require('
|
|
3
|
+
var useFocusHandOff = require('../__internal__/useFocusHandOff/useFocusHandOff.cjs');
|
|
4
4
|
|
|
5
5
|
// The ring `contentProps` spreads, for the callers still on it.
|
|
6
6
|
const FOCUS_TARGET_CLASSES = 'outline-focus-ring focus-visible:outline-2 focus-visible:outline-offset-2';
|
|
7
7
|
/**
|
|
8
8
|
* Keeps keyboard focus in place across a retry. A "Try again" button unmounts once the data arrives, and focus would
|
|
9
9
|
* otherwise fall back to the top of the page; use it wherever a load error is replaced by the content it failed to load.
|
|
10
|
-
*
|
|
10
|
+
* Inside a `Table`'s `renderEmptyState` the table hands focus to its rows or cards and to an `EmptyState.Title` itself; any other heading takes it through this hook.
|
|
11
11
|
*
|
|
12
12
|
* @param retry Starts the failed request again.
|
|
13
13
|
* @returns `retryLoad` for the retry button, and `contentRef` for the element that replaces the error. That element takes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Keeps keyboard focus in place across a retry. A "Try again" button unmounts once the data arrives, and focus would
|
|
3
3
|
* otherwise fall back to the top of the page; use it wherever a load error is replaced by the content it failed to load.
|
|
4
|
-
*
|
|
4
|
+
* Inside a `Table`'s `renderEmptyState` the table hands focus to its rows or cards and to an `EmptyState.Title` itself; any other heading takes it through this hook.
|
|
5
5
|
*
|
|
6
6
|
* @param retry Starts the failed request again.
|
|
7
7
|
* @returns `retryLoad` for the retry button, and `contentRef` for the element that replaces the error. That element takes
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { useFocusHandOff } from '
|
|
1
|
+
import { useFocusHandOff } from '../__internal__/useFocusHandOff/useFocusHandOff.js';
|
|
2
2
|
|
|
3
3
|
// The ring `contentProps` spreads, for the callers still on it.
|
|
4
4
|
const FOCUS_TARGET_CLASSES = 'outline-focus-ring focus-visible:outline-2 focus-visible:outline-offset-2';
|
|
5
5
|
/**
|
|
6
6
|
* Keeps keyboard focus in place across a retry. A "Try again" button unmounts once the data arrives, and focus would
|
|
7
7
|
* otherwise fall back to the top of the page; use it wherever a load error is replaced by the content it failed to load.
|
|
8
|
-
*
|
|
8
|
+
* Inside a `Table`'s `renderEmptyState` the table hands focus to its rows or cards and to an `EmptyState.Title` itself; any other heading takes it through this hook.
|
|
9
9
|
*
|
|
10
10
|
* @param retry Starts the failed request again.
|
|
11
11
|
* @returns `retryLoad` for the retry button, and `contentRef` for the element that replaces the error. That element takes
|