@flipdish/ui-library 0.70.0 → 0.71.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/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/components/organisms/Tables/index.d.ts +12 -0
- 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/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/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,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Finds the control a press inside a table's empty state landed on, which a hand-off waits on to leave the page.
|
|
3
|
+
* @param target - The event's target. React passes on an event from a modal or popover the empty state opened, but its
|
|
4
|
+
* target sits in a portal, outside `scope`.
|
|
5
|
+
* @param scope - The element around the empty state.
|
|
6
|
+
* @returns The nearest enabled button or link around the target, when it sits inside `scope`; `null` for a press on text,
|
|
7
|
+
* on a disabled control, or outside `scope`.
|
|
8
|
+
*/
|
|
9
|
+
export declare const pressedControlOf: (target: EventTarget | null, scope: Element) => Element | null;
|
|
10
|
+
/**
|
|
11
|
+
* Whether a key pressed on a control presses it, so a hand-off should wait on it.
|
|
12
|
+
* @param control - The control the key landed on, from `pressedControlOf`.
|
|
13
|
+
* @param key - The event's `key`.
|
|
14
|
+
* @returns `true` for `Enter` on any control and `Space` on any but a link; `false` for every other key.
|
|
15
|
+
*/
|
|
16
|
+
export declare const isPressKey: (control: Element, key: string) => boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Watches for the user moving on from a pressed control that is still on the page: a pointer press, or focus, anywhere
|
|
19
|
+
* outside it, such as a click on blank space or a modal the control opened taking focus.
|
|
20
|
+
* @param control - The pressed control; a press on it again, or focus returning to it, is not moving on.
|
|
21
|
+
* @param onLeave - Called on each such press or focus, until the watch stops.
|
|
22
|
+
* @returns Stops the watch.
|
|
23
|
+
*/
|
|
24
|
+
export declare const watchForLeaving: (control: Element, onLeave: () => void) => (() => void);
|
|
25
|
+
//# sourceMappingURL=tableFocusHandOff.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tableFocusHandOff.utils.d.ts","sourceRoot":"","sources":["../../../../../../src/components/organisms/Tables/Table/utilities/tableFocusHandOff.utils.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,WAAW,GAAG,IAAI,EAAE,OAAO,OAAO,KAAG,OAAO,GAAG,IAKvF,CAAC;AAKF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI,SAAS,OAAO,EAAE,KAAK,MAAM,KAAG,OAA8E,CAAC;AAE1I;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,GAAI,SAAS,OAAO,EAAE,SAAS,MAAM,IAAI,KAAG,CAAC,MAAM,IAAI,CAYlF,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// What react-aria renders for something a press acts on: a button, a link, or a link with no `href` as `role="link"`; and a native input button.
|
|
2
|
+
const CONTROL_SELECTOR = 'button, a[href], [role="button"], [role="link"], input[type="submit"], input[type="button"], input[type="reset"], input[type="image"]';
|
|
3
|
+
/**
|
|
4
|
+
* Finds the control a press inside a table's empty state landed on, which a hand-off waits on to leave the page.
|
|
5
|
+
* @param target - The event's target. React passes on an event from a modal or popover the empty state opened, but its
|
|
6
|
+
* target sits in a portal, outside `scope`.
|
|
7
|
+
* @param scope - The element around the empty state.
|
|
8
|
+
* @returns The nearest enabled button or link around the target, when it sits inside `scope`; `null` for a press on text,
|
|
9
|
+
* on a disabled control, or outside `scope`.
|
|
10
|
+
*/
|
|
11
|
+
const pressedControlOf = (target, scope) => {
|
|
12
|
+
if (!(target instanceof Element))
|
|
13
|
+
return null;
|
|
14
|
+
const control = target.closest(CONTROL_SELECTOR);
|
|
15
|
+
if (!control || !scope.contains(control) || control.matches(':disabled, [aria-disabled="true"]'))
|
|
16
|
+
return null;
|
|
17
|
+
return control;
|
|
18
|
+
};
|
|
19
|
+
// A link as react-aria reads one: `Space` scrolls past it, and only `Enter` presses it; `role="button"` on an anchor makes it a button.
|
|
20
|
+
const LINK_SELECTOR = '[role="link"], a[href]:not([role])';
|
|
21
|
+
/**
|
|
22
|
+
* Whether a key pressed on a control presses it, so a hand-off should wait on it.
|
|
23
|
+
* @param control - The control the key landed on, from `pressedControlOf`.
|
|
24
|
+
* @param key - The event's `key`.
|
|
25
|
+
* @returns `true` for `Enter` on any control and `Space` on any but a link; `false` for every other key.
|
|
26
|
+
*/
|
|
27
|
+
const isPressKey = (control, key) => key === 'Enter' || (key === ' ' && !control.matches(LINK_SELECTOR));
|
|
28
|
+
/**
|
|
29
|
+
* Watches for the user moving on from a pressed control that is still on the page: a pointer press, or focus, anywhere
|
|
30
|
+
* outside it, such as a click on blank space or a modal the control opened taking focus.
|
|
31
|
+
* @param control - The pressed control; a press on it again, or focus returning to it, is not moving on.
|
|
32
|
+
* @param onLeave - Called on each such press or focus, until the watch stops.
|
|
33
|
+
* @returns Stops the watch.
|
|
34
|
+
*/
|
|
35
|
+
const watchForLeaving = (control, onLeave) => {
|
|
36
|
+
const { ownerDocument } = control;
|
|
37
|
+
const leaveIfOutside = (event) => {
|
|
38
|
+
if (!(event.target instanceof Node) || !control.contains(event.target))
|
|
39
|
+
onLeave();
|
|
40
|
+
};
|
|
41
|
+
// In capture, so an element that stops a press or focus event from propagating still ends the watch.
|
|
42
|
+
ownerDocument.addEventListener('pointerdown', leaveIfOutside, true);
|
|
43
|
+
ownerDocument.addEventListener('focusin', leaveIfOutside, true);
|
|
44
|
+
return () => {
|
|
45
|
+
ownerDocument.removeEventListener('pointerdown', leaveIfOutside, true);
|
|
46
|
+
ownerDocument.removeEventListener('focusin', leaveIfOutside, true);
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export { isPressKey, pressedControlOf, watchForLeaving };
|
|
51
|
+
//# sourceMappingURL=tableFocusHandOff.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tableFocusHandOff.utils.js","sources":["../../../../../../src/components/organisms/Tables/Table/utilities/tableFocusHandOff.utils.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA,MAAM,gBAAgB,GACpB,uIAAuI;AAEzI;;;;;;;AAOG;MACU,gBAAgB,GAAG,CAAC,MAA0B,EAAE,KAAc,KAAoB;AAC7F,IAAA,IAAI,EAAE,MAAM,YAAY,OAAO,CAAC;AAAE,QAAA,OAAO,IAAI;IAC7C,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC;AAChD,IAAA,IAAI,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,mCAAmC,CAAC;AAAE,QAAA,OAAO,IAAI;AAC7G,IAAA,OAAO,OAAO;AAChB;AAEA;AACA,MAAM,aAAa,GAAG,oCAAoC;AAE1D;;;;;AAKG;AACI,MAAM,UAAU,GAAG,CAAC,OAAgB,EAAE,GAAW,KAAc,GAAG,KAAK,OAAO,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC;AAExI;;;;;;AAMG;MACU,eAAe,GAAG,CAAC,OAAgB,EAAE,OAAmB,KAAkB;AACrF,IAAA,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO;AACjC,IAAA,MAAM,cAAc,GAAG,CAAC,KAAY,KAAI;AACtC,QAAA,IAAI,EAAE,KAAK,CAAC,MAAM,YAAY,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC;AAAE,YAAA,OAAO,EAAE;AACnF,IAAA,CAAC;;IAED,aAAa,CAAC,gBAAgB,CAAC,aAAa,EAAE,cAAc,EAAE,IAAI,CAAC;IACnE,aAAa,CAAC,gBAAgB,CAAC,SAAS,EAAE,cAAc,EAAE,IAAI,CAAC;AAC/D,IAAA,OAAO,MAAK;QACV,aAAa,CAAC,mBAAmB,CAAC,aAAa,EAAE,cAAc,EAAE,IAAI,CAAC;QACtE,aAAa,CAAC,mBAAmB,CAAC,SAAS,EAAE,cAAc,EAAE,IAAI,CAAC;AACpE,IAAA,CAAC;AACH;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
-
var children_utils = require('
|
|
4
|
+
var children_utils = require('../../../../../utilities/__internal__/childrenUtils/children.utils.cjs');
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Names the rows a `Table` draws while `isLoading`, so each keeps its id, and with it its test id, from render to render.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tableLoading.utils.cjs","sources":["../../../../../../src/components/organisms/Tables/Table/utilities/tableLoading.utils.ts"],"sourcesContent":[null],"names":["flattenChildren","isValidElement"],"mappings":";;;;;AAIA;;;;AAIG;AACI,MAAM,eAAe,GAAG,CAAC,KAAa,KAAc;AACzD,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC;IAC5E,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,KAAK,CAAA,QAAA,EAAW,KAAK,CAAA,CAAE,CA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|
-
import type { TableCardColumn, TableLayout } from '
|
|
2
|
+
import type { TableCardColumn, TableLayout } from '../../tables.types';
|
|
3
3
|
/**
|
|
4
4
|
* Names the rows a `Table` draws while `isLoading`, so each keeps its id, and with it its test id, from render to render.
|
|
5
5
|
* @param count - The table's `loadingRowCount`; a fraction rounds down, and a negative or non-finite count draws none.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tableLoading.utils.d.ts","sourceRoot":"","sources":["../../../../../../src/components/organisms/Tables/Table/utilities/tableLoading.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE1E,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEvE;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAI,OAAO,MAAM,KAAG,MAAM,EAGrD,CAAC;AAEF,8FAA8F;AAC9F,MAAM,WAAW,kBAAkB;IACjC,+EAA+E;IAC/E,MAAM,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,OAAO,CAAC;IAC3C,qEAAqE;IACrE,cAAc,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,OAAO,CAAC;IACnD;;;OAGG;IACH,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,KAAK,SAAS,CAAC;IAC5D,kEAAkE;IAClE,IAAI,EAAE,YAAY,CAAC;CACpB;AAED,wDAAwD;AACxD,MAAM,WAAW,eAAe;IAC9B,uFAAuF;IACvF,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,uFAAuF;IACvF,IAAI,EAAE,YAAY,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,GAAI,YAAY,SAAS,EAAE,SAAS,SAAS,eAAe,EAAE,EAAE,UAAU,kBAAkB,KAAG,eAS5H,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,GAAI,QAAQ,WAAW,EAAE,WAAW,MAAM,KAAG,OAA8C,CAAC;AAE3H,+DAA+D;AAC/D,UAAU,gBAAgB;IACxB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAAI,CAAC,SAAS,gBAAgB,EAAE,OAAO,CAAC,EAAE,aAAa,SAAS,GAAG,SAAS,KAAG,CACmC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isValidElement } from 'react';
|
|
2
|
-
import { flattenChildren } from '
|
|
2
|
+
import { flattenChildren } from '../../../../../utilities/__internal__/childrenUtils/children.utils.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Names the rows a `Table` draws while `isLoading`, so each keeps its id, and with it its test id, from render to render.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tableLoading.utils.js","sources":["../../../../../../src/components/organisms/Tables/Table/utilities/tableLoading.utils.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAIA;;;;AAIG;AACI,MAAM,eAAe,GAAG,CAAC,KAAa,KAAc;AACzD,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC;IAC5E,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,KAAK,CAAA,QAAA,EAAW,KAAK,CAAA,CAAE,CAAC;AAC3E;AAyBA;;;;;;;;;AASG;AACI,MAAM,iBAAiB,GAAG,CAAC,UAAqB,EAAE,OAAmC,EAAE,QAA4B,KAAqB;AAC7I,IAAA,MAAM,KAAK,GAAG,eAAe,CAAC,UAAU,CAAC;AACzC,IAAA,MAAM,UAAU,GAAG,CAAC,IAAe,KAA2B,cAAc,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;AAC3G,IAAA,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACvD,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,KAA2B,UAAU,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IAC1G,OAAO;AACL,QAAA,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,GAAG,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,KAAK,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;AAC5G,QAAA,IAAI,EAAE,IAAI,IAAI,QAAQ,CAAC,IAAI;KAC5B;AACH;AAEA;;;;;;;AAOG;AACI,MAAM,kBAAkB,GAAG,CAAC,MAAmB,EAAE,SAAiB,KAAc,MAAM,KAAK,OAAO,IAAI,SAAS,GAAG;AAUzH;;;;;;AAMG;AACI,MAAM,kBAAkB,GAAG,CAA6B,KAAQ,EAAE,WAAkC,KACzG,WAAW,KAAK,SAAS,GAAG,KAAK,GAAG,EAAE,GAAG,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tableSelection.utils.cjs","sources":["../../../../../../src/components/organisms/Tables/Table/utilities/tableSelection.utils.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAEA;;;;AAIG;AACI,MAAM,cAAc,GAAG,C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ableSelection.utils.d.ts","sourceRoot":"","sources":["../../../../../../src/components/organisms/Tables/Table/utilities/tableSelection.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,KAAK,GAAG,GAAG,IAAI,KAAG,SAA+C,CAAC;AAEjG;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,WAAW,SAAS,KAAG,GAAG,GAAG,IAI3D,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,GAAI,WAAW,SAAS,EAAE,SAAS,QAAQ,CAAC,GAAG,CAAC,EAAE,eAAc,QAAQ,CAAC,GAAG,CAAM,KAAG,GAAG,EAInH,CAAC;AAEF,MAAM,WAAW,wBAAwB;IACvC,gEAAgE;IAChE,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;IACnD,sGAAsG;IACtG,mBAAmB,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,KAAK,IAAI,CAAC;IAChD,qGAAqG;IACrG,oBAAoB,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;CAC9C;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,GAChC,WAAW,SAAS,EACpB,SAAS,QAAQ,CAAC,GAAG,CAAC,EACtB,cAAc,QAAQ,CAAC,GAAG,CAAC,GAAG,SAAS,EACvC,WAAW,wBAAwB,KAClC,IAIF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,SAAS,QAAQ,CAAC,GAAG,CAAC,EAAE,eAAe,QAAQ,CAAC,GAAG,CAAC,KAAG,OAC9B,CAAC;AAE3D,qGAAqG;AACrG,MAAM,WAAW,eAAe;IAC9B,mGAAmG;IACnG,SAAS,EAAE,OAAO,CAAC;IACnB,yCAAyC;IACzC,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;IACvB,0HAA0H;IAC1H,eAAe,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC/B,+BAA+B;IAC/B,YAAY,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;CAC9B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAAI,uDAAuD,eAAe,KAAG,OACR,CAAC;AAEpG,sDAAsD;AACtD,MAAM,WAAW,cAAc;IAC7B,wCAAwC;IACxC,UAAU,EAAE,OAAO,CAAC;IACpB,gGAAgG;IAChG,eAAe,EAAE,OAAO,CAAC;IACzB,gEAAgE;IAChE,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,GAC3B,WAAW,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,EAChC,SAAS,QAAQ,CAAC,GAAG,CAAC,EACtB,eAAe,QAAQ,CAAC,GAAG,CAAC,EAC5B,6BAA2B,KAC1B,cAaF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAAI,YAAY,OAAO,EAAE,gCAA8B,KAAG,SAAS,GAAG,SAGnG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tableSelection.utils.js","sources":["../../../../../../src/components/organisms/Tables/Table/utilities/tableSelection.utils.ts"],"sourcesContent":[null],"names":[],"mappings":"AAEA;;;;AAIG;AACI,MAAM,cAAc,GAAG,CAAC,GAAe,KAAgB,IAAI,GAAG,CAAC,GAAG,KAAK,IAAI,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC;AAE/F;;;;AAIG;AACI,MAAM,cAAc,GAAG,CAAC,SAAoB,KAAgB;IACjE,IAAI,SAAS,KAAK,KAAK;AAAE,QAAA,OAAO,IAAI;AACpC,IAAA,MAAM,CAAC,KAAK,CAAC,GAAG,SAAS;IACzB,OAAO,KAAK,IAAI,IAAI;AACtB;AAEA;;;;;;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,IAAA,IAAI,mBAAmB,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;AAAE,QAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE;IAC1H,IAAI,SAAS,KAAK,KAAK;AAAE,QAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;AAE/F,IAAA,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC;IACnC,MAAM,aAAa,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM;IAC1E,OAAO;AACL,QAAA,UAAU,EAAE,aAAa,KAAK,UAAU,CAAC,MAAM;;QAE/C,eAAe,EAAE,QAAQ,CAAC,IAAI,GAAG,CAAC,IAAI,aAAa,GAAG,UAAU,CAAC,MAAM;AACvE,QAAA,UAAU,EAAE,KAAK;KAClB;AACH;AAEA;;;;;AAKG;AACI,MAAM,iBAAiB,GAAG,CAAC,UAAmB,EAAE,sBAAsB,GAAG,KAAK,KAA2B;AAC9G,IAAA,IAAI,CAAC,UAAU;AAAE,QAAA,OAAO,KAAK;IAC7B,OAAO,sBAAsB,GAAG,SAAS,GAAG,IAAI,GAAG,EAAE;AACvD;;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var uiIcons = require('@flipdish/ui-icons');
|
|
5
|
+
var ButtonGroup = require('@flipdish/ui-library/components/molecules/ButtonGroup');
|
|
6
|
+
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
7
|
+
var useIsAtLeastMd = require('../hooks/useIsAtLeastMd.cjs');
|
|
8
|
+
var useTableLayoutToggle = require('./hooks/useTableLayoutToggle.cjs');
|
|
9
|
+
|
|
10
|
+
const isTableLayout = (key) => key === 'table' || key === 'cards';
|
|
11
|
+
/**
|
|
12
|
+
* Two icon buttons, Table view and Card view, that switch a `Table`'s `desktopLayout`; renders nothing below `md`, where
|
|
13
|
+
* `mobileLayout` decides. Give it and the table one `layoutKey` to remember the choice, or pass `value` and `onChange`.
|
|
14
|
+
*
|
|
15
|
+
* @summary switch a table between rows and cards from md up
|
|
16
|
+
*/
|
|
17
|
+
const TableLayoutToggle = ({ value, onChange, layoutKey, className, 'data-testid': dataTestId }) => {
|
|
18
|
+
// Nothing on the server and while hydrating, as the table's own layout waits for the viewport there too.
|
|
19
|
+
const isAtLeastMd = useIsAtLeastMd.useIsAtLeastMd();
|
|
20
|
+
const rootTestId = testIdUtils.useResolvedTestId({ testId: dataTestId, segment: 'table-layout-toggle', rootName: 'table-layout-toggle' });
|
|
21
|
+
const { layout, choose } = useTableLayoutToggle.useTableLayoutToggle({ value, onChange, layoutKey });
|
|
22
|
+
const chooseLayout = (keys) => {
|
|
23
|
+
const [chosen] = keys;
|
|
24
|
+
if (isTableLayout(chosen))
|
|
25
|
+
choose(chosen);
|
|
26
|
+
};
|
|
27
|
+
if (!isAtLeastMd)
|
|
28
|
+
return null;
|
|
29
|
+
return (jsxRuntime.jsxs(ButtonGroup.ButtonGroup, { "aria-label": "Table layout", size: "sm", selectedKeys: [layout], onSelectionChange: chooseLayout, disallowEmptySelection: true, className: className, "data-testid": rootTestId, children: [jsxRuntime.jsx(ButtonGroup.ButtonGroupItem, { id: "table", "aria-label": "Table view", iconLeading: uiIcons.Table }), jsxRuntime.jsx(ButtonGroup.ButtonGroupItem, { id: "cards", "aria-label": "Card view", iconLeading: uiIcons.Grid01 })] }));
|
|
30
|
+
};
|
|
31
|
+
TableLayoutToggle.displayName = 'TableLayoutToggle';
|
|
32
|
+
|
|
33
|
+
exports.TableLayoutToggle = TableLayoutToggle;
|
|
34
|
+
//# sourceMappingURL=TableLayoutToggle.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableLayoutToggle.cjs","sources":["../../../../../src/components/organisms/Tables/TableLayoutToggle/TableLayoutToggle.tsx"],"sourcesContent":[null],"names":["useIsAtLeastMd","useResolvedTestId","useTableLayoutToggle","_jsxs","ButtonGroup","_jsx","ButtonGroupItem","TableIcon","Grid01"],"mappings":";;;;;;;;;AAsCA,MAAM,aAAa,GAAG,CAAC,GAAoB,KAAyB,GAAG,KAAK,OAAO,IAAI,GAAG,KAAK,OAAO;AAEtG;;;;;AAKG;AACI,MAAM,iBAAiB,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAA0B,KAAI;;AAEhI,IAAA,MAAM,WAAW,GAAGA,6BAAc,EAAE;AACpC,IAAA,MAAM,UAAU,GAAGC,6BAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,qBAAqB,EAAE,CAAC;AAC7H,IAAA,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAGC,yCAAoB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;AAE/E,IAAA,MAAM,YAAY,GAAG,CAAC,IAAc,KAAI;AACtC,QAAA,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI;QACrB,IAAI,aAAa,CAAC,MAAM,CAAC;YAAE,MAAM,CAAC,MAAM,CAAC;AAC3C,IAAA,CAAC;AAED,IAAA,IAAI,CAAC,WAAW;AAAE,QAAA,OAAO,IAAI;IAE7B,QACEC,eAAA,CAACC,uBAAW,EAAA,EAAA,YAAA,EACC,cAAc,EACzB,IAAI,EAAC,IAAI,EACT,YAAY,EAAE,CAAC,MAAM,CAAC,EACtB,iBAAiB,EAAE,YAAY,EAC/B,sBAAsB,EAAA,IAAA,EACtB,SAAS,EAAE,SAAS,EAAA,aAAA,EACP,UAAU,EAAA,QAAA,EAAA,CAEvBC,eAACC,2BAAe,EAAA,EAAC,EAAE,EAAC,OAAO,EAAA,YAAA,EAAY,YAAY,EAAC,WAAW,EAAEC,aAAS,EAAA,CAAI,EAC9EF,cAAA,CAACC,2BAAe,EAAA,EAAC,EAAE,EAAC,OAAO,EAAA,YAAA,EAAY,WAAW,EAAC,WAAW,EAAEE,cAAM,EAAA,CAAI,CAAA,EAAA,CAC9D;AAElB;AACA,iBAAiB,CAAC,WAAW,GAAG,mBAAmB;;"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { TableLayout } from '../tables.types';
|
|
2
|
+
interface TableLayoutToggleBaseProps {
|
|
3
|
+
/** Classes for the group of two buttons. */
|
|
4
|
+
className?: string;
|
|
5
|
+
/** Overrides the root `data-testid` (defaults to `fd-table-layout-toggle`); the options derive `<root>--item-table` and `<root>--item-cards`. */
|
|
6
|
+
'data-testid'?: string;
|
|
7
|
+
}
|
|
8
|
+
interface StoredTableLayoutToggleProps extends TableLayoutToggleBaseProps {
|
|
9
|
+
/** Shows and stores the layout for every `Table` and `TableSortMenu` with the same key, remembered across visits; `value` wins. */
|
|
10
|
+
layoutKey: string;
|
|
11
|
+
/** The layout it shows, from the page; pass the same value to the table's `desktopLayout`. Unset, the one stored for `layoutKey` shows. */
|
|
12
|
+
value?: undefined;
|
|
13
|
+
/** Called with the layout the user picks, after it is stored for `layoutKey`. */
|
|
14
|
+
onChange?: (value: TableLayout) => void;
|
|
15
|
+
}
|
|
16
|
+
interface ControlledTableLayoutToggleProps extends TableLayoutToggleBaseProps {
|
|
17
|
+
/** Shows and stores the layout for every `Table` and `TableSortMenu` with the same key, remembered across visits; `value` wins. */
|
|
18
|
+
layoutKey?: string;
|
|
19
|
+
/** The layout it shows, from the page; pass the same value to the table's `desktopLayout`. Unset, the one stored for `layoutKey` shows. */
|
|
20
|
+
value: TableLayout;
|
|
21
|
+
/** Called with the layout the user picks, after it is stored for `layoutKey`. */
|
|
22
|
+
onChange: (value: TableLayout) => void;
|
|
23
|
+
}
|
|
24
|
+
/** A `layoutKey` the table and sort menu share, or `value` with `onChange` from the page; `value` never comes alone, as a pick would never show. */
|
|
25
|
+
export type TableLayoutToggleProps = StoredTableLayoutToggleProps | ControlledTableLayoutToggleProps;
|
|
26
|
+
/**
|
|
27
|
+
* Two icon buttons, Table view and Card view, that switch a `Table`'s `desktopLayout`; renders nothing below `md`, where
|
|
28
|
+
* `mobileLayout` decides. Give it and the table one `layoutKey` to remember the choice, or pass `value` and `onChange`.
|
|
29
|
+
*
|
|
30
|
+
* @summary switch a table between rows and cards from md up
|
|
31
|
+
*/
|
|
32
|
+
export declare const TableLayoutToggle: {
|
|
33
|
+
({ value, onChange, layoutKey, className, "data-testid": dataTestId }: TableLayoutToggleProps): import("react").JSX.Element | null;
|
|
34
|
+
displayName: string;
|
|
35
|
+
};
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=TableLayoutToggle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableLayoutToggle.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/Tables/TableLayoutToggle/TableLayoutToggle.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAGnD,UAAU,0BAA0B;IAClC,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iJAAiJ;IACjJ,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,4BAA6B,SAAQ,0BAA0B;IACvE,mIAAmI;IACnI,SAAS,EAAE,MAAM,CAAC;IAClB,2IAA2I;IAC3I,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;CACzC;AAED,UAAU,gCAAiC,SAAQ,0BAA0B;IAC3E,mIAAmI;IACnI,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2IAA2I;IAC3I,KAAK,EAAE,WAAW,CAAC;IACnB,iFAAiF;IACjF,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;CACxC;AAED,oJAAoJ;AACpJ,MAAM,MAAM,sBAAsB,GAAG,4BAA4B,GAAG,gCAAgC,CAAC;AAIrG;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;2EAA0E,sBAAsB;;CA2B7H,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Table, Grid01 } from '@flipdish/ui-icons';
|
|
3
|
+
import { ButtonGroup, ButtonGroupItem } from '@flipdish/ui-library/components/molecules/ButtonGroup';
|
|
4
|
+
import { useResolvedTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
5
|
+
import { useIsAtLeastMd } from '../hooks/useIsAtLeastMd.js';
|
|
6
|
+
import { useTableLayoutToggle } from './hooks/useTableLayoutToggle.js';
|
|
7
|
+
|
|
8
|
+
const isTableLayout = (key) => key === 'table' || key === 'cards';
|
|
9
|
+
/**
|
|
10
|
+
* Two icon buttons, Table view and Card view, that switch a `Table`'s `desktopLayout`; renders nothing below `md`, where
|
|
11
|
+
* `mobileLayout` decides. Give it and the table one `layoutKey` to remember the choice, or pass `value` and `onChange`.
|
|
12
|
+
*
|
|
13
|
+
* @summary switch a table between rows and cards from md up
|
|
14
|
+
*/
|
|
15
|
+
const TableLayoutToggle = ({ value, onChange, layoutKey, className, 'data-testid': dataTestId }) => {
|
|
16
|
+
// Nothing on the server and while hydrating, as the table's own layout waits for the viewport there too.
|
|
17
|
+
const isAtLeastMd = useIsAtLeastMd();
|
|
18
|
+
const rootTestId = useResolvedTestId({ testId: dataTestId, segment: 'table-layout-toggle', rootName: 'table-layout-toggle' });
|
|
19
|
+
const { layout, choose } = useTableLayoutToggle({ value, onChange, layoutKey });
|
|
20
|
+
const chooseLayout = (keys) => {
|
|
21
|
+
const [chosen] = keys;
|
|
22
|
+
if (isTableLayout(chosen))
|
|
23
|
+
choose(chosen);
|
|
24
|
+
};
|
|
25
|
+
if (!isAtLeastMd)
|
|
26
|
+
return null;
|
|
27
|
+
return (jsxs(ButtonGroup, { "aria-label": "Table layout", size: "sm", selectedKeys: [layout], onSelectionChange: chooseLayout, disallowEmptySelection: true, className: className, "data-testid": rootTestId, children: [jsx(ButtonGroupItem, { id: "table", "aria-label": "Table view", iconLeading: Table }), jsx(ButtonGroupItem, { id: "cards", "aria-label": "Card view", iconLeading: Grid01 })] }));
|
|
28
|
+
};
|
|
29
|
+
TableLayoutToggle.displayName = 'TableLayoutToggle';
|
|
30
|
+
|
|
31
|
+
export { TableLayoutToggle };
|
|
32
|
+
//# sourceMappingURL=TableLayoutToggle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableLayoutToggle.js","sources":["../../../../../src/components/organisms/Tables/TableLayoutToggle/TableLayoutToggle.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx","TableIcon"],"mappings":";;;;;;;AAsCA,MAAM,aAAa,GAAG,CAAC,GAAoB,KAAyB,GAAG,KAAK,OAAO,IAAI,GAAG,KAAK,OAAO;AAEtG;;;;;AAKG;AACI,MAAM,iBAAiB,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAA0B,KAAI;;AAEhI,IAAA,MAAM,WAAW,GAAG,cAAc,EAAE;AACpC,IAAA,MAAM,UAAU,GAAG,iBAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,qBAAqB,EAAE,CAAC;AAC7H,IAAA,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,oBAAoB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;AAE/E,IAAA,MAAM,YAAY,GAAG,CAAC,IAAc,KAAI;AACtC,QAAA,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI;QACrB,IAAI,aAAa,CAAC,MAAM,CAAC;YAAE,MAAM,CAAC,MAAM,CAAC;AAC3C,IAAA,CAAC;AAED,IAAA,IAAI,CAAC,WAAW;AAAE,QAAA,OAAO,IAAI;IAE7B,QACEA,IAAA,CAAC,WAAW,EAAA,EAAA,YAAA,EACC,cAAc,EACzB,IAAI,EAAC,IAAI,EACT,YAAY,EAAE,CAAC,MAAM,CAAC,EACtB,iBAAiB,EAAE,YAAY,EAC/B,sBAAsB,EAAA,IAAA,EACtB,SAAS,EAAE,SAAS,EAAA,aAAA,EACP,UAAU,EAAA,QAAA,EAAA,CAEvBC,IAAC,eAAe,EAAA,EAAC,EAAE,EAAC,OAAO,EAAA,YAAA,EAAY,YAAY,EAAC,WAAW,EAAEC,KAAS,EAAA,CAAI,EAC9ED,GAAA,CAAC,eAAe,EAAA,EAAC,EAAE,EAAC,OAAO,EAAA,YAAA,EAAY,WAAW,EAAC,WAAW,EAAE,MAAM,EAAA,CAAI,CAAA,EAAA,CAC9D;AAElB;AACA,iBAAiB,CAAC,WAAW,GAAG,mBAAmB;;"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var renderUtils = require('@flipdish/ui-library/utilities/renderUtils');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var log_utils = require('../../../../../utilities/__internal__/logUtils/log.utils.cjs');
|
|
6
|
+
var useStoredTableLayout = require('../../hooks/useStoredTableLayout.cjs');
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* What a `TableLayoutToggle` shows and does with a pick: `value` from the page, else the layout stored for `layoutKey`, with
|
|
10
|
+
* a development warning when a `value` comes with no `onChange`, so a pick can never show.
|
|
11
|
+
*
|
|
12
|
+
* @param source The toggle's `value`, `onChange` and `layoutKey`; see `TableLayoutToggleSource`.
|
|
13
|
+
* @returns `layout`, the option to check, and `choose`, which takes a pick: it stores it for `layoutKey`, then calls `onChange`.
|
|
14
|
+
*/
|
|
15
|
+
const useTableLayoutToggle = ({ value, onChange, layoutKey }) => {
|
|
16
|
+
const layout = useStoredTableLayout.useStoredTableLayout(layoutKey, value);
|
|
17
|
+
const isReadOnly = value !== undefined && onChange === undefined;
|
|
18
|
+
React.useEffect(() => {
|
|
19
|
+
if (!isReadOnly || renderUtils.isProductionBuild())
|
|
20
|
+
return;
|
|
21
|
+
log_utils.warnOnce('TableLayoutToggle:value-without-onChange', 'TableLayoutToggle: it has `value` but no `onChange`, so a pick never shows on it. Pass `onChange`, or leave `value` unset to show the layout stored for its `layoutKey`.');
|
|
22
|
+
}, [isReadOnly]);
|
|
23
|
+
const choose = (next) => {
|
|
24
|
+
if (layoutKey !== undefined)
|
|
25
|
+
useStoredTableLayout.storeTableLayout(layoutKey, next);
|
|
26
|
+
onChange?.(next);
|
|
27
|
+
};
|
|
28
|
+
return { layout, choose };
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
exports.useTableLayoutToggle = useTableLayoutToggle;
|
|
32
|
+
//# sourceMappingURL=useTableLayoutToggle.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTableLayoutToggle.cjs","sources":["../../../../../../src/components/organisms/Tables/TableLayoutToggle/hooks/useTableLayoutToggle.ts"],"sourcesContent":[null],"names":["useStoredTableLayout","useEffect","isProductionBuild","warnOnce","storeTableLayout"],"mappings":";;;;;;;AAiBA;;;;;;AAMG;AACI,MAAM,oBAAoB,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAA2B,KAAI;IAC9F,MAAM,MAAM,GAAGA,yCAAoB,CAAC,SAAS,EAAE,KAAK,CAAC;IACrD,MAAM,UAAU,GAAG,KAAK,KAAK,SAAS,IAAI,QAAQ,KAAK,SAAS;IAEhEC,eAAS,CAAC,MAAK;AACb,QAAA,IAAI,CAAC,UAAU,IAAIC,6BAAiB,EAAE;YAAE;AACxC,QAAAC,kBAAQ,CACN,0CAA0C,EAC1C,0KAA0K,CAC3K;AACH,IAAA,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC;AAEhB,IAAA,MAAM,MAAM,GAAG,CAAC,IAAiB,KAAI;QACnC,IAAI,SAAS,KAAK,SAAS;AAAE,YAAAC,qCAAgB,CAAC,SAAS,EAAE,IAAI,CAAC;AAC9D,QAAA,QAAQ,GAAG,IAAI,CAAC;AAClB,IAAA,CAAC;AAED,IAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE;AAC3B;;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { TableLayout } from '../../tables.types';
|
|
2
|
+
export interface TableLayoutToggleSource {
|
|
3
|
+
/** The toggle's `value`, which wins over the stored layout. */
|
|
4
|
+
value?: TableLayout;
|
|
5
|
+
/** The toggle's `onChange`. */
|
|
6
|
+
onChange?: (value: TableLayout) => void;
|
|
7
|
+
/** The toggle's `layoutKey`, under which each pick is stored. */
|
|
8
|
+
layoutKey?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* What a `TableLayoutToggle` shows and does with a pick: `value` from the page, else the layout stored for `layoutKey`, with
|
|
12
|
+
* a development warning when a `value` comes with no `onChange`, so a pick can never show.
|
|
13
|
+
*
|
|
14
|
+
* @param source The toggle's `value`, `onChange` and `layoutKey`; see `TableLayoutToggleSource`.
|
|
15
|
+
* @returns `layout`, the option to check, and `choose`, which takes a pick: it stores it for `layoutKey`, then calls `onChange`.
|
|
16
|
+
*/
|
|
17
|
+
export declare const useTableLayoutToggle: ({ value, onChange, layoutKey }: TableLayoutToggleSource) => {
|
|
18
|
+
layout: TableLayout;
|
|
19
|
+
choose: (next: TableLayout) => void;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=useTableLayoutToggle.d.ts.map
|
package/dist/components/organisms/Tables/TableLayoutToggle/hooks/useTableLayoutToggle.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTableLayoutToggle.d.ts","sourceRoot":"","sources":["../../../../../../src/components/organisms/Tables/TableLayoutToggle/hooks/useTableLayoutToggle.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,MAAM,WAAW,uBAAuB;IACtC,+DAA+D;IAC/D,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;IACxC,iEAAiE;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,GAAI,gCAAgC,uBAAuB;;mBAYpE,WAAW;CAMlC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { isProductionBuild } from '@flipdish/ui-library/utilities/renderUtils';
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
|
+
import { warnOnce } from '../../../../../utilities/__internal__/logUtils/log.utils.js';
|
|
4
|
+
import { useStoredTableLayout, storeTableLayout } from '../../hooks/useStoredTableLayout.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* What a `TableLayoutToggle` shows and does with a pick: `value` from the page, else the layout stored for `layoutKey`, with
|
|
8
|
+
* a development warning when a `value` comes with no `onChange`, so a pick can never show.
|
|
9
|
+
*
|
|
10
|
+
* @param source The toggle's `value`, `onChange` and `layoutKey`; see `TableLayoutToggleSource`.
|
|
11
|
+
* @returns `layout`, the option to check, and `choose`, which takes a pick: it stores it for `layoutKey`, then calls `onChange`.
|
|
12
|
+
*/
|
|
13
|
+
const useTableLayoutToggle = ({ value, onChange, layoutKey }) => {
|
|
14
|
+
const layout = useStoredTableLayout(layoutKey, value);
|
|
15
|
+
const isReadOnly = value !== undefined && onChange === undefined;
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
if (!isReadOnly || isProductionBuild())
|
|
18
|
+
return;
|
|
19
|
+
warnOnce('TableLayoutToggle:value-without-onChange', 'TableLayoutToggle: it has `value` but no `onChange`, so a pick never shows on it. Pass `onChange`, or leave `value` unset to show the layout stored for its `layoutKey`.');
|
|
20
|
+
}, [isReadOnly]);
|
|
21
|
+
const choose = (next) => {
|
|
22
|
+
if (layoutKey !== undefined)
|
|
23
|
+
storeTableLayout(layoutKey, next);
|
|
24
|
+
onChange?.(next);
|
|
25
|
+
};
|
|
26
|
+
return { layout, choose };
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export { useTableLayoutToggle };
|
|
30
|
+
//# sourceMappingURL=useTableLayoutToggle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTableLayoutToggle.js","sources":["../../../../../../src/components/organisms/Tables/TableLayoutToggle/hooks/useTableLayoutToggle.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAiBA;;;;;;AAMG;AACI,MAAM,oBAAoB,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAA2B,KAAI;IAC9F,MAAM,MAAM,GAAG,oBAAoB,CAAC,SAAS,EAAE,KAAK,CAAC;IACrD,MAAM,UAAU,GAAG,KAAK,KAAK,SAAS,IAAI,QAAQ,KAAK,SAAS;IAEhE,SAAS,CAAC,MAAK;AACb,QAAA,IAAI,CAAC,UAAU,IAAI,iBAAiB,EAAE;YAAE;AACxC,QAAA,QAAQ,CACN,0CAA0C,EAC1C,0KAA0K,CAC3K;AACH,IAAA,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC;AAEhB,IAAA,MAAM,MAAM,GAAG,CAAC,IAAiB,KAAI;QACnC,IAAI,SAAS,KAAK,SAAS;AAAE,YAAA,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC;AAC9D,QAAA,QAAQ,GAAG,IAAI,CAAC;AAClB,IAAA,CAAC;AAED,IAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE;AAC3B;;"}
|
package/dist/components/organisms/{Table/components → Tables/TableSortMenu}/TableSortMenu.cjs
RENAMED
|
@@ -7,15 +7,22 @@ var Dropdown = require('@flipdish/ui-library/components/molecules/Dropdown');
|
|
|
7
7
|
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
8
8
|
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
9
9
|
var useIsAtLeastMd = require('../hooks/useIsAtLeastMd.cjs');
|
|
10
|
+
var useStoredTableLayout = require('../hooks/useStoredTableLayout.cjs');
|
|
10
11
|
var tableCard_utils = require('../utilities/tableCard.utils.cjs');
|
|
11
12
|
var tableSort_utils = require('../utilities/tableSort.utils.cjs');
|
|
12
13
|
|
|
13
14
|
const firstKeyOf = (selection) => (selection === 'all' ? undefined : [...selection][0]);
|
|
14
|
-
/**
|
|
15
|
-
|
|
15
|
+
/**
|
|
16
|
+
* A "Sort by" menu of a table's sortable columns, both directions and "Reset sort", shown while the table shows cards; icon-only
|
|
17
|
+
* below `md`. Put it beside `TableLayoutToggle` with the table's sort props and layouts, as cards have no column headers to press.
|
|
18
|
+
*
|
|
19
|
+
* @summary sort a table's cards by column and direction
|
|
20
|
+
*/
|
|
21
|
+
const TableSortMenu = ({ columns, sortDescriptor, defaultSortDescriptor, onSortChange, mobileLayout = 'cards', desktopLayout: desktopLayoutProp, layoutKey, size = 'md', className, 'data-testid': dataTestId, }) => {
|
|
16
22
|
const rootTestId = testIdUtils.useResolvedTestId({ testId: dataTestId, segment: 'table-sort-menu', rootName: 'table-sort-menu' });
|
|
17
23
|
// Icon-only on the server and while hydrating too, so the two renders agree; the label comes once the viewport is known.
|
|
18
24
|
const isAtLeastMd = useIsAtLeastMd.useIsAtLeastMd();
|
|
25
|
+
const desktopLayout = useStoredTableLayout.useStoredTableLayout(layoutKey, desktopLayoutProp);
|
|
19
26
|
const isIconOnly = !isAtLeastMd;
|
|
20
27
|
const sortedColumn = sortDescriptor ? columns.find((column) => column.id === sortDescriptor.column) : undefined;
|
|
21
28
|
const sortName = sortedColumn && sortDescriptor ? `Sort by ${sortedColumn.label}, ${sortDescriptor.direction}` : undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableSortMenu.cjs","sources":["../../../../../src/components/organisms/Tables/TableSortMenu/TableSortMenu.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","useIsAtLeastMd","useStoredTableLayout","isSameSort","columnOfSortMenuKey","sortOfColumnChoice","sortOfDirectionChoice","_jsx","Dropdown","sortMenuColumnKeyOf","tableLayoutOf","_jsxs","Button","SwitchVertical01","cx","joinTestId","_Fragment"],"mappings":";;;;;;;;;;;;;AA8CA,MAAM,UAAU,GAAG,CAAC,SAAoB,MAAuB,SAAS,KAAK,KAAK,GAAG,SAAS,GAAG,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AAEnH;;;;;AAKG;AACI,MAAM,aAAa,GAAG,CAAC,EAC5B,OAAO,EACP,cAAc,EACd,qBAAqB,EACrB,YAAY,EACZ,YAAY,GAAG,OAAO,EACtB,aAAa,EAAE,iBAAiB,EAChC,SAAS,EACT,IAAI,GAAG,IAAI,EACX,SAAS,EACT,aAAa,EAAE,UAAU,GACN,KAAI;AACvB,IAAA,MAAM,UAAU,GAAGA,6BAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC;;AAErH,IAAA,MAAM,WAAW,GAAGC,6BAAc,EAAE;IACpC,MAAM,aAAa,GAAGC,yCAAoB,CAAC,SAAS,EAAE,iBAAiB,CAAC;AACxE,IAAA,MAAM,UAAU,GAAG,CAAC,WAAW;IAC/B,MAAM,YAAY,GAAG,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,EAAE,KAAK,cAAc,CAAC,MAAM,CAAC,GAAG,SAAS;IAC/G,MAAM,QAAQ,GAAG,YAAY,IAAI,cAAc,GAAG,CAAA,QAAA,EAAW,YAAY,CAAC,KAAK,CAAA,EAAA,EAAK,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,EAAC,QAAQ,EACtB,sBAAsB,EAAA,IAAA,EACtB,YAAY,EAAE,YAAY,IAAI,cAAc,GAAG,CAAC,cAAc,CAAC,SAAS,CAAC,GAAG,EAAE,EAC9E,iBAAiB,EAAE,eAAe,EAAA,QAAA,EAAA,CAGlCD,eAACC,iBAAQ,CAAC,IAAI,EAAA,EAAC,EAAE,EAAC,WAAW,EAAC,KAAK,EAAC,WAAW,EAAC,UAAU,EAAE,CAAC,YAAY,EAAA,CAAI,EAC7ED,cAAA,CAACC,iBAAQ,CAAC,IAAI,IAAC,EAAE,EAAC,YAAY,EAAC,KAAK,EAAC,YAAY,EAAC,UAAU,EAAE,CAAC,YAAY,GAAI,CAAA,EAAA,CAC9D,EAClB,cAAc,IAAID,cAAA,CAACC,iBAAQ,CAAC,SAAS,EAAA,EAAA,CAAG,EAExC,cAAc,IAAID,eAACC,iBAAQ,CAAC,IAAI,EAAA,EAAC,EAAE,EAAC,OAAO,EAAC,KAAK,EAAC,YAAY,EAAC,QAAQ,EAAE,SAAS,GAAI,CAAA,EAAA,CACzE,EAAA,CACC,CAAA,EAAA,CACL;AAEpB;AACA,aAAa,CAAC,WAAW,GAAG,eAAe;;"}
|
package/dist/components/organisms/{Table/components → Tables/TableSortMenu}/TableSortMenu.d.ts
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Key, SortDescriptor } from 'react-aria-components';
|
|
2
|
-
import type { TableLayout } from '../
|
|
2
|
+
import type { TableLayout } from '../tables.types';
|
|
3
3
|
export interface TableSortMenuProps {
|
|
4
4
|
/** The columns a user can sort by, in menu order: each `id` is its `Table.Head`'s `id`, and `label` names it in the menu. */
|
|
5
5
|
columns: readonly {
|
|
@@ -14,22 +14,34 @@ export interface TableSortMenuProps {
|
|
|
14
14
|
* a reset reports `undefined`.
|
|
15
15
|
*/
|
|
16
16
|
defaultSortDescriptor?: SortDescriptor;
|
|
17
|
-
/** Called with the sort
|
|
17
|
+
/** Called with the sort picked: a first column ascending, another keeping the direction, or "Reset sort"'s `defaultSortDescriptor`; pass the table's handler. */
|
|
18
18
|
onSortChange: (descriptor: SortDescriptor | undefined) => void;
|
|
19
19
|
/** The table's `mobileLayout`: the menu renders nothing below `md` while that is the table, which its headers sort. */
|
|
20
20
|
mobileLayout?: TableLayout;
|
|
21
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* The table's `desktopLayout`: the menu renders nothing from `md` up while that is the table. Unset, the layout chosen for
|
|
23
|
+
* `layoutKey`, or the table, so with neither the menu shows below `md` only: pass one for cards from `md`.
|
|
24
|
+
*
|
|
25
|
+
* @default 'table'
|
|
26
|
+
*/
|
|
22
27
|
desktopLayout?: TableLayout;
|
|
28
|
+
/** The table's `layoutKey`, so the menu shows while the layout chosen for that key is cards; `desktopLayout` wins. */
|
|
29
|
+
layoutKey?: string;
|
|
23
30
|
/** The trigger's size, as a `Button`'s. */
|
|
24
31
|
size?: 'sm' | 'md';
|
|
25
|
-
/** Classes for the trigger
|
|
32
|
+
/** Classes for the trigger in both its forms, such as `w-full` to fill a row; from `md` its label truncates to fit. */
|
|
26
33
|
className?: string;
|
|
27
34
|
/** Overrides the root `data-testid` (defaults to `fd-table-sort-menu`); the trigger derives `<root>--trigger` and each item `<root>--item-<key>`. */
|
|
28
35
|
'data-testid'?: string;
|
|
29
36
|
}
|
|
30
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* A "Sort by" menu of a table's sortable columns, both directions and "Reset sort", shown while the table shows cards; icon-only
|
|
39
|
+
* below `md`. Put it beside `TableLayoutToggle` with the table's sort props and layouts, as cards have no column headers to press.
|
|
40
|
+
*
|
|
41
|
+
* @summary sort a table's cards by column and direction
|
|
42
|
+
*/
|
|
31
43
|
export declare const TableSortMenu: {
|
|
32
|
-
({ columns, sortDescriptor, defaultSortDescriptor, onSortChange, mobileLayout, desktopLayout, size, className, "data-testid": dataTestId, }: TableSortMenuProps): import("react").JSX.Element | null;
|
|
44
|
+
({ columns, sortDescriptor, defaultSortDescriptor, onSortChange, mobileLayout, desktopLayout: desktopLayoutProp, layoutKey, size, className, "data-testid": dataTestId, }: TableSortMenuProps): import("react").JSX.Element | null;
|
|
33
45
|
displayName: string;
|
|
34
46
|
};
|
|
35
47
|
//# sourceMappingURL=TableSortMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableSortMenu.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/Tables/TableSortMenu/TableSortMenu.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,GAAG,EAAa,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAInD,MAAM,WAAW,kBAAkB;IACjC,6HAA6H;IAC7H,OAAO,EAAE,SAAS;QAAE,EAAE,EAAE,GAAG,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC/C,+DAA+D;IAC/D,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,cAAc,CAAC;IACvC,iKAAiK;IACjK,YAAY,EAAE,CAAC,UAAU,EAAE,cAAc,GAAG,SAAS,KAAK,IAAI,CAAC;IAC/D,uHAAuH;IACvH,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,WAAW,CAAC;IAC5B,sHAAsH;IACtH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,uHAAuH;IACvH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qJAAqJ;IACrJ,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAID;;;;;GAKG;AACH,eAAO,MAAM,aAAa;+KAWvB,kBAAkB;;CA6FpB,CAAC"}
|
package/dist/components/organisms/{Table/components → Tables/TableSortMenu}/TableSortMenu.js
RENAMED
|
@@ -5,15 +5,22 @@ import { Dropdown } from '@flipdish/ui-library/components/molecules/Dropdown';
|
|
|
5
5
|
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
6
6
|
import { useResolvedTestId, joinTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
7
7
|
import { useIsAtLeastMd } from '../hooks/useIsAtLeastMd.js';
|
|
8
|
+
import { useStoredTableLayout } from '../hooks/useStoredTableLayout.js';
|
|
8
9
|
import { tableLayoutOf } from '../utilities/tableCard.utils.js';
|
|
9
10
|
import { isSameSort, sortMenuColumnKeyOf, columnOfSortMenuKey, sortOfColumnChoice, sortOfDirectionChoice } from '../utilities/tableSort.utils.js';
|
|
10
11
|
|
|
11
12
|
const firstKeyOf = (selection) => (selection === 'all' ? undefined : [...selection][0]);
|
|
12
|
-
/**
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
|
+
* A "Sort by" menu of a table's sortable columns, both directions and "Reset sort", shown while the table shows cards; icon-only
|
|
15
|
+
* below `md`. Put it beside `TableLayoutToggle` with the table's sort props and layouts, as cards have no column headers to press.
|
|
16
|
+
*
|
|
17
|
+
* @summary sort a table's cards by column and direction
|
|
18
|
+
*/
|
|
19
|
+
const TableSortMenu = ({ columns, sortDescriptor, defaultSortDescriptor, onSortChange, mobileLayout = 'cards', desktopLayout: desktopLayoutProp, layoutKey, size = 'md', className, 'data-testid': dataTestId, }) => {
|
|
14
20
|
const rootTestId = useResolvedTestId({ testId: dataTestId, segment: 'table-sort-menu', rootName: 'table-sort-menu' });
|
|
15
21
|
// Icon-only on the server and while hydrating too, so the two renders agree; the label comes once the viewport is known.
|
|
16
22
|
const isAtLeastMd = useIsAtLeastMd();
|
|
23
|
+
const desktopLayout = useStoredTableLayout(layoutKey, desktopLayoutProp);
|
|
17
24
|
const isIconOnly = !isAtLeastMd;
|
|
18
25
|
const sortedColumn = sortDescriptor ? columns.find((column) => column.id === sortDescriptor.column) : undefined;
|
|
19
26
|
const sortName = sortedColumn && sortDescriptor ? `Sort by ${sortedColumn.label}, ${sortDescriptor.direction}` : undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableSortMenu.js","sources":["../../../../../src/components/organisms/Tables/TableSortMenu/TableSortMenu.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs","_Fragment"],"mappings":";;;;;;;;;;;AA8CA,MAAM,UAAU,GAAG,CAAC,SAAoB,MAAuB,SAAS,KAAK,KAAK,GAAG,SAAS,GAAG,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AAEnH;;;;;AAKG;AACI,MAAM,aAAa,GAAG,CAAC,EAC5B,OAAO,EACP,cAAc,EACd,qBAAqB,EACrB,YAAY,EACZ,YAAY,GAAG,OAAO,EACtB,aAAa,EAAE,iBAAiB,EAChC,SAAS,EACT,IAAI,GAAG,IAAI,EACX,SAAS,EACT,aAAa,EAAE,UAAU,GACN,KAAI;AACvB,IAAA,MAAM,UAAU,GAAG,iBAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC;;AAErH,IAAA,MAAM,WAAW,GAAG,cAAc,EAAE;IACpC,MAAM,aAAa,GAAG,oBAAoB,CAAC,SAAS,EAAE,iBAAiB,CAAC;AACxE,IAAA,MAAM,UAAU,GAAG,CAAC,WAAW;IAC/B,MAAM,YAAY,GAAG,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,EAAE,KAAK,cAAc,CAAC,MAAM,CAAC,GAAG,SAAS;IAC/G,MAAM,QAAQ,GAAG,YAAY,IAAI,cAAc,GAAG,CAAA,QAAA,EAAW,YAAY,CAAC,KAAK,CAAA,EAAA,EAAK,cAAc,CAAC,SAAS,EAAE,GAAG,SAAS;;IAE1H,MAAM,cAAc,GAAG,CAAC,UAAU,CAAC,cAAc,EAAE,qBAAqB,CAAC;AAEzE,IAAA,MAAM,YAAY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AAA,EAAA,CAGlCD,IAAC,QAAQ,CAAC,IAAI,EAAA,EAAC,EAAE,EAAC,WAAW,EAAC,KAAK,EAAC,WAAW,EAAC,UAAU,EAAE,CAAC,YAAY,EAAA,CAAI,EAC7EA,GAAA,CAAC,QAAQ,CAAC,IAAI,IAAC,EAAE,EAAC,YAAY,EAAC,KAAK,EAAC,YAAY,EAAC,UAAU,EAAE,CAAC,YAAY,GAAI,CAAA,EAAA,CAC9D,EAClB,cAAc,IAAIA,GAAA,CAAC,QAAQ,CAAC,SAAS,EAAA,EAAA,CAAG,EAExC,cAAc,IAAIA,IAAC,QAAQ,CAAC,IAAI,EAAA,EAAC,EAAE,EAAC,OAAO,EAAC,KAAK,EAAC,YAAY,EAAC,QAAQ,EAAE,SAAS,GAAI,CAAA,EAAA,CACzE,EAAA,CACC,CAAA,EAAA,CACL;AAEpB;AACA,aAAa,CAAC,WAAW,GAAG,eAAe;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIsAtLeastMd.cjs","sources":["../../../../../src/components/organisms/Tables/hooks/useIsAtLeastMd.ts"],"sourcesContent":[null],"names":["useSyncExternalStore","useBreakpoints"],"mappings":";;;;;AAKA,MAAM,kBAAkB,GAAG,MAAM,MAAK,EAAE,CAAC;AAEzC;;;;;;AAMG;AACI,MAAM,cAAc,GAAG,MAAK;AACjC,IAAA,MAAM,kBAAkB,GAAGA,0BAAoB,CAC7C,kBAAkB,EAClB,MAAM,IAAI,EACV,MAAM,KAAK,CACZ;AACD,IAAA,MAAM,WAAW,GAAGC,6BAAc,CAAC,IAAI,CAAC;IACxC,OAAO,kBAAkB,IAAI,WAAW;AAC1C;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIsAtLeastMd.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/Tables/hooks/useIsAtLeastMd.ts"],"names":[],"mappings":"AAOA;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,eAQ1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIsAtLeastMd.js","sources":["../../../../../src/components/organisms/Tables/hooks/useIsAtLeastMd.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAKA,MAAM,kBAAkB,GAAG,MAAM,MAAK,EAAE,CAAC;AAEzC;;;;;;AAMG;AACI,MAAM,cAAc,GAAG,MAAK;AACjC,IAAA,MAAM,kBAAkB,GAAG,oBAAoB,CAC7C,kBAAkB,EAClB,MAAM,IAAI,EACV,MAAM,KAAK,CACZ;AACD,IAAA,MAAM,WAAW,GAAG,cAAc,CAAC,IAAI,CAAC;IACxC,OAAO,kBAAkB,IAAI,WAAW;AAC1C;;"}
|