@economic/taco 2.15.0 → 2.17.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/Drawer/Drawer.d.ts +5 -1
- package/dist/components/Provider/Localization.d.ts +19 -0
- package/dist/components/SearchInput2/SearchInput2.d.ts +1 -0
- package/dist/components/Table3/Table3.d.ts +0 -2
- package/dist/components/Table3/components/alert/ErrorAlert.d.ts +10 -0
- package/dist/components/Table3/components/columns/cell/DisplayCell.d.ts +5 -2
- package/dist/components/Table3/components/columns/cell/EditingCell.d.ts +3 -0
- package/dist/components/Table3/components/columns/cell/EditingControl.d.ts +1 -1
- package/dist/components/Table3/components/columns/cell/Highlight.d.ts +2 -0
- package/dist/components/Table3/components/columns/header/Header.d.ts +1 -1
- package/dist/components/Table3/components/columns/internal/EditingActions.d.ts +1 -1
- package/dist/components/Table3/components/columns/styles.d.ts +2 -2
- package/dist/components/Table3/components/rows/Row.d.ts +5 -1
- package/dist/components/Table3/components/rows/RowContext.d.ts +1 -0
- package/dist/components/Table3/hooks/features/useEditing.d.ts +12 -11
- package/dist/components/Table3/hooks/features/{usePauseHoverState.d.ts → usePauseShortcuts.d.ts} +1 -2
- package/dist/components/Table3/hooks/features/useSearch.d.ts +3 -3
- package/dist/components/Table3/hooks/features/useValidation.d.ts +13 -0
- package/dist/components/Table3/hooks/useTable.d.ts +25 -20
- package/dist/components/Table3/types.d.ts +41 -19
- package/dist/components/Table3/util/editing.d.ts +6 -0
- package/dist/components/Table3/util/scrolling.d.ts +2 -0
- package/dist/esm/index.css +108 -33
- package/dist/esm/packages/taco/src/components/Banner/Banner.js +2 -2
- package/dist/esm/packages/taco/src/components/Banner/Banner.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Calendar/Calendar.js +4 -4
- package/dist/esm/packages/taco/src/components/Calendar/Calendar.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Combobox/Combobox.js +3 -3
- package/dist/esm/packages/taco/src/components/Combobox/Combobox.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js +2 -1
- package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js +6 -6
- package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Dialog/components/Content.js +3 -3
- package/dist/esm/packages/taco/src/components/Dialog/components/Content.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Drawer/Drawer.js +7 -2
- package/dist/esm/packages/taco/src/components/Drawer/Drawer.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Drawer/components/Content.js +7 -7
- package/dist/esm/packages/taco/src/components/Drawer/components/Content.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Field/Field.js +2 -2
- package/dist/esm/packages/taco/src/components/Field/Field.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Header/components/Agreement/Item.js +2 -2
- package/dist/esm/packages/taco/src/components/Header/components/Agreement/Item.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js +4 -4
- package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Header/components/Link.js +2 -2
- package/dist/esm/packages/taco/src/components/Header/components/Link.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/Icon.js +2 -2
- package/dist/esm/packages/taco/src/components/Icon/Icon.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js +2 -2
- package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js +6 -6
- package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Menu/components/Item.js +4 -4
- package/dist/esm/packages/taco/src/components/Menu/components/Item.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Navigation/Navigation.js +2 -2
- package/dist/esm/packages/taco/src/components/Navigation/Navigation.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js +3 -3
- package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js +2 -2
- package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js.map +1 -1
- package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js +1 -1
- package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Pagination/PageNumbers.js +2 -2
- package/dist/esm/packages/taco/src/components/Pagination/PageNumbers.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Pagination/Pagination.js +5 -5
- package/dist/esm/packages/taco/src/components/Pagination/Pagination.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Popover/Popover.js +2 -2
- package/dist/esm/packages/taco/src/components/Popover/Popover.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Provider/Localization.js +19 -0
- package/dist/esm/packages/taco/src/components/Provider/Localization.js.map +1 -1
- package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js +2 -2
- package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js.map +1 -1
- package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js +12 -8
- package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select/useSelect.js +2 -2
- package/dist/esm/packages/taco/src/components/Select/useSelect.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/Select2.js +7 -7
- package/dist/esm/packages/taco/src/components/Select2/Select2.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Edit.js +8 -8
- package/dist/esm/packages/taco/src/components/Select2/components/Edit.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Option.js +5 -5
- package/dist/esm/packages/taco/src/components/Select2/components/Option.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js +10 -10
- package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js +2 -2
- package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js +3 -3
- package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js +2 -2
- package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowActions.js +10 -10
- package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowActions.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js +2 -2
- package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/Table3.js +37 -30
- package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/alert/ErrorAlert.js +154 -0
- package/dist/esm/packages/taco/src/components/Table3/components/alert/ErrorAlert.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Cell.js +54 -9
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Cell.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/DisplayCell.js +9 -57
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/DisplayCell.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingCell.js +72 -41
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingCell.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingControl.js +41 -17
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingControl.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Highlight.js +41 -0
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Highlight.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/controls/TextareaControl.js +23 -14
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/controls/TextareaControl.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/footer/Footer.js +3 -3
- package/dist/esm/packages/taco/src/components/Table3/components/columns/footer/Footer.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Group.js +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Group.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Header.js +9 -9
- package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Header.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Menu.js +37 -6
- package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Menu.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Actions.js +12 -12
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Actions.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Drag.js +2 -2
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Drag.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/EditingActions.js +63 -23
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/EditingActions.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Expansion.js +3 -3
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Expansion.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Selection.js +3 -3
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Selection.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/styles.js +2 -13
- package/dist/esm/packages/taco/src/components/Table3/components/columns/styles.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/rows/Row.js +67 -57
- package/dist/esm/packages/taco/src/components/Table3/components/rows/Row.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/rows/RowContext.js +2 -1
- package/dist/esm/packages/taco/src/components/Table3/components/rows/RowContext.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/rows/SkeletonRow.js +2 -2
- package/dist/esm/packages/taco/src/components/Table3/components/rows/SkeletonRow.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/ColumnSettings.js +8 -6
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/ColumnSettings.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/Filters.js +23 -8
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/Filters.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterColumn.js +2 -2
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterColumn.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterComparator.js +2 -2
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterComparator.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintButton.js +16 -16
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintButton.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintIFrame.js +1 -0
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintIFrame.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Search.js +53 -4
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Search.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Settings.js +8 -8
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Settings.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useEditing.js +185 -101
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useEditing.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePauseShortcuts.js +12 -0
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePauseShortcuts.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useSearch.js +4 -2
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useSearch.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useValidation.js +178 -0
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useValidation.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useEditingStateListener.js +3 -3
- package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useEditingStateListener.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useSettingsStateListener.js +1 -49
- package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useSettingsStateListener.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/useConvertChildrenToColumns.js +1 -2
- package/dist/esm/packages/taco/src/components/Table3/hooks/useConvertChildrenToColumns.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/useCssVars.js +0 -2
- package/dist/esm/packages/taco/src/components/Table3/hooks/useCssVars.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/useTable.js +135 -111
- package/dist/esm/packages/taco/src/components/Table3/hooks/useTable.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/strategies/virtualised.js +4 -4
- package/dist/esm/packages/taco/src/components/Table3/strategies/virtualised.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/types.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/util/editing.js +21 -1
- package/dist/esm/packages/taco/src/components/Table3/util/editing.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/util/scrolling.js +53 -0
- package/dist/esm/packages/taco/src/components/Table3/util/scrolling.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Tag/Tag.js +4 -4
- package/dist/esm/packages/taco/src/components/Tag/Tag.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Toast/Toaster.js +2 -2
- package/dist/esm/packages/taco/src/components/Toast/Toaster.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Tour/Tour.js +4 -4
- package/dist/esm/packages/taco/src/components/Tour/Tour.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Treeview/Treeview.js +2 -2
- package/dist/esm/packages/taco/src/components/Treeview/Treeview.js.map +1 -1
- package/dist/esm/packages/taco/src/index.js +2 -1
- package/dist/esm/packages/taco/src/index.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/types.js +10 -0
- package/dist/esm/packages/taco/src/primitives/Table/types.js.map +1 -0
- package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableColumnOrdering.js +8 -0
- package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableColumnOrdering.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Table3/hooks/features/useFontSize.js → primitives/Table/useTable/features/useTableFontSize.js} +3 -3
- package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableFontSize.js.map +1 -0
- package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTablePrinting.js +14 -0
- package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTablePrinting.js.map +1 -0
- package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowActive.js +100 -0
- package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowActive.js.map +1 -0
- package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowClick.js +30 -0
- package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowClick.js.map +1 -0
- package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowGoto.js +9 -0
- package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowGoto.js.map +1 -0
- package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowHeight.js +13 -0
- package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowHeight.js.map +1 -0
- package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowSelection.js +32 -0
- package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowSelection.js.map +1 -0
- package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableServerLoading.js +11 -0
- package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableServerLoading.js.map +1 -0
- package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableDataListener.js +15 -0
- package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableDataListener.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Table3/hooks/listeners/useFilteringStateListener.js → primitives/Table/useTable/listeners/useTableFilterListener.js} +3 -3
- package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableFilterListener.js.map +1 -0
- package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableFontSizeListener.js +40 -0
- package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableFontSizeListener.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Table3/hooks/listeners/useRowSelectionListener.js → primitives/Table/useTable/listeners/useTableRowSelectionListener.js} +5 -6
- package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableRowSelectionListener.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Table3/hooks/listeners/useServerLoadingListener.js → primitives/Table/useTable/listeners/useTableServerLoadingListener.js} +3 -3
- package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableServerLoadingListener.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Table3/hooks/listeners/useShortcutsListener.js → primitives/Table/useTable/listeners/useTableShortcutsListener.js} +7 -7
- package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableShortcutsListener.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Table3/hooks/listeners/useSortingStateListener.js → primitives/Table/useTable/listeners/useTableSortingListener.js} +6 -4
- package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableSortingListener.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Table3/hooks/features/useColumnOrdering.js → primitives/Table/useTable/util/columns.js} +24 -15
- package/dist/esm/packages/taco/src/primitives/Table/useTable/util/columns.js.map +1 -0
- package/dist/esm/packages/taco/src/types.js +6 -0
- package/dist/esm/packages/taco/src/types.js.map +1 -0
- package/dist/esm/packages/taco/src/utils/date.js +0 -1
- package/dist/esm/packages/taco/src/utils/date.js.map +1 -1
- package/dist/index.css +108 -33
- package/dist/primitives/Table/types.d.ts +35 -0
- package/dist/primitives/Table/useTable/features/useTableColumnOrdering.d.ts +3 -0
- package/dist/primitives/Table/useTable/features/useTableFontSize.d.ts +7 -0
- package/dist/primitives/Table/useTable/features/useTablePrinting.d.ts +7 -0
- package/dist/primitives/Table/useTable/features/useTableRowActive.d.ts +12 -0
- package/dist/primitives/Table/useTable/features/useTableRowClick.d.ts +7 -0
- package/dist/primitives/Table/useTable/features/useTableRowGoto.d.ts +5 -0
- package/dist/primitives/Table/useTable/features/useTableRowHeight.d.ts +7 -0
- package/dist/primitives/Table/useTable/features/useTableRowSelection.d.ts +6 -0
- package/dist/primitives/Table/useTable/features/useTableServerLoading.d.ts +6 -0
- package/dist/primitives/Table/useTable/listeners/useTableDataListener.d.ts +2 -0
- package/dist/primitives/Table/useTable/listeners/useTableFilterListener.d.ts +3 -0
- package/dist/primitives/Table/useTable/listeners/useTableFontSizeListener.d.ts +2 -0
- package/dist/primitives/Table/useTable/listeners/useTableRowSelectionListener.d.ts +3 -0
- package/dist/primitives/Table/useTable/listeners/useTableServerLoadingListener.d.ts +3 -0
- package/dist/primitives/Table/useTable/listeners/useTableShortcutsListener.d.ts +3 -0
- package/dist/primitives/Table/useTable/listeners/useTableSortingListener.d.ts +3 -0
- package/dist/primitives/Table/useTable/util/columns.d.ts +4 -0
- package/dist/taco.cjs.development.js +2294 -1543
- package/dist/taco.cjs.development.js.map +1 -1
- package/dist/taco.cjs.production.min.js +1 -1
- package/dist/taco.cjs.production.min.js.map +1 -1
- package/dist/types.d.ts +5 -0
- package/package.json +3 -3
- package/types.json +13547 -12953
- package/dist/components/Table3/hooks/features/useColumnOrdering.d.ts +0 -6
- package/dist/components/Table3/hooks/features/useCurrentRow.d.ts +0 -11
- package/dist/components/Table3/hooks/features/useFontSize.d.ts +0 -7
- package/dist/components/Table3/hooks/features/usePrinting.d.ts +0 -8
- package/dist/components/Table3/hooks/features/useRowClick.d.ts +0 -6
- package/dist/components/Table3/hooks/features/useRowGoto.d.ts +0 -5
- package/dist/components/Table3/hooks/features/useRowHeight.d.ts +0 -7
- package/dist/components/Table3/hooks/features/useRowSelection.d.ts +0 -6
- package/dist/components/Table3/hooks/listeners/useCurrentRowListener.d.ts +0 -2
- package/dist/components/Table3/hooks/listeners/useFilteringStateListener.d.ts +0 -3
- package/dist/components/Table3/hooks/listeners/useRowSelectionListener.d.ts +0 -3
- package/dist/components/Table3/hooks/listeners/useServerLoadingListener.d.ts +0 -3
- package/dist/components/Table3/hooks/listeners/useShortcutsListener.d.ts +0 -3
- package/dist/components/Table3/hooks/listeners/useSortingStateListener.d.ts +0 -3
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useColumnOrdering.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useCurrentRow.js +0 -93
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useCurrentRow.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useFontSize.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePauseHoverState.js +0 -22
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePauseHoverState.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePrinting.js +0 -14
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePrinting.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowClick.js +0 -25
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowClick.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowGoto.js +0 -9
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowGoto.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowHeight.js +0 -27
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowHeight.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowSelection.js +0 -32
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowSelection.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useCurrentRowListener.js +0 -15
- package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useCurrentRowListener.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useFilteringStateListener.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useRowSelectionListener.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useServerLoadingListener.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useShortcutsListener.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useSortingStateListener.js.map +0 -1
@@ -36,8 +36,12 @@ export declare type DrawerProps = Omit<DialogProps, 'draggable' | 'size'> & {
|
|
36
36
|
focusTrap?: boolean;
|
37
37
|
/** When 'true' renders close button in topr right cornenr of drawer content */
|
38
38
|
showCloseButton?: boolean;
|
39
|
+
/** Target specific named outlet allowing you to render a drawer to a specific outlet */
|
40
|
+
outletName?: string;
|
41
|
+
};
|
42
|
+
export declare type OutletProps = React.HTMLAttributes<HTMLDivElement> & {
|
43
|
+
name?: string;
|
39
44
|
};
|
40
|
-
export declare type OutletProps = React.HTMLAttributes<HTMLDivElement>;
|
41
45
|
export declare type ForwardedDrawerWithStatics = React.ForwardRefExoticComponent<DrawerProps & React.RefAttributes<HTMLElement>> & {
|
42
46
|
Trigger: React.ForwardRefExoticComponent<DrawerTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
43
47
|
Content: React.ForwardRefExoticComponent<DrawerContentProps & React.RefAttributes<HTMLDivElement>>;
|
@@ -202,6 +202,12 @@ export declare const defaultLocalisationTexts: {
|
|
202
202
|
progress: string;
|
203
203
|
complete: string;
|
204
204
|
};
|
205
|
+
clearChangesConfirmationDialog: {
|
206
|
+
title: string;
|
207
|
+
description: string;
|
208
|
+
cancel: string;
|
209
|
+
confirm: string;
|
210
|
+
};
|
205
211
|
};
|
206
212
|
filters: {
|
207
213
|
button: string;
|
@@ -302,6 +308,19 @@ export declare const defaultLocalisationTexts: {
|
|
302
308
|
otherOptions: {
|
303
309
|
tooltip: string;
|
304
310
|
};
|
311
|
+
validation: {
|
312
|
+
index: string;
|
313
|
+
alert: {
|
314
|
+
unsavedEntries: (count?: number) => "unsaved entry:" | "unsaved entries:";
|
315
|
+
incompleteAndHavntBeenSaved: (count?: number) => "is incomplete and haven’t been saved." | "are incomplete and haven’t been saved.";
|
316
|
+
};
|
317
|
+
resetFiltersDialog: {
|
318
|
+
title: string;
|
319
|
+
description: string;
|
320
|
+
cancel: string;
|
321
|
+
confirm: string;
|
322
|
+
};
|
323
|
+
};
|
305
324
|
};
|
306
325
|
searchInput: {
|
307
326
|
button: string;
|
@@ -3,6 +3,7 @@ import { KeyDownHandlerOptions } from '../../utils/keyboard';
|
|
3
3
|
interface CommonSearchInput2Props extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'defaultValue' | 'onChange' | 'value'> {
|
4
4
|
loading?: boolean;
|
5
5
|
onChange: (value: string) => void;
|
6
|
+
onClear?: () => void;
|
6
7
|
settingsContent?: JSX.Element;
|
7
8
|
shortcut?: string | KeyDownHandlerOptions;
|
8
9
|
value?: string;
|
@@ -9,8 +9,6 @@ declare function Group(_: Table3GroupProps): null;
|
|
9
9
|
declare namespace Group {
|
10
10
|
var displayName: string;
|
11
11
|
}
|
12
|
-
declare type FixedForwardRef = <T, P = {}>(render: (props: P, ref: React.Ref<T>) => JSX.Element) => (props: P & React.RefAttributes<T>) => JSX.Element;
|
13
|
-
export declare const fixedForwardRef: FixedForwardRef;
|
14
12
|
declare type Table3WithStatics = (<TType = unknown>(props: Table3Props<TType> & React.RefAttributes<Table3Ref>) => JSX.Element) & {
|
15
13
|
Column: typeof Column;
|
16
14
|
Group: typeof Group;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { Table as RTable } from '@tanstack/react-table';
|
2
|
+
import { TableStrategy } from '../../types';
|
3
|
+
import React from 'react';
|
4
|
+
export declare type ErrorAlertProps<TType = unknown> = {
|
5
|
+
table: RTable<TType>;
|
6
|
+
tableRef: React.RefObject<HTMLDivElement>;
|
7
|
+
scrollToIndex: TableStrategy['scrollToIndex'];
|
8
|
+
rowIdentifier?: string;
|
9
|
+
};
|
10
|
+
export declare function ErrorAlert<TType = unknown>(props: ErrorAlertProps<TType>): JSX.Element;
|
@@ -2,8 +2,11 @@ import React from 'react';
|
|
2
2
|
import { CellContext } from '@tanstack/react-table';
|
3
3
|
import { Table3ColumnAlignment } from '../../../types';
|
4
4
|
export declare type DisplayCellProps<TType = unknown> = CellContext<TType, unknown> & {
|
5
|
+
highlighted?: boolean;
|
6
|
+
highlightedAsCurrent?: boolean;
|
5
7
|
children?: string | JSX.Element;
|
6
8
|
className?: string;
|
9
|
+
value?: any;
|
7
10
|
};
|
8
11
|
export declare function DisplayCell<TType = unknown>(props: DisplayCellProps<TType>): JSX.Element;
|
9
12
|
export declare type MemoedDisplayCellProps<TType = unknown> = {
|
@@ -14,8 +17,8 @@ export declare type MemoedDisplayCellProps<TType = unknown> = {
|
|
14
17
|
debug?: boolean;
|
15
18
|
enableTruncate?: boolean;
|
16
19
|
frozenColumnIndex?: number;
|
17
|
-
highlighted
|
18
|
-
highlightedAsCurrent
|
20
|
+
highlighted?: boolean;
|
21
|
+
highlightedAsCurrent?: boolean;
|
19
22
|
id: string;
|
20
23
|
index: number;
|
21
24
|
tableRef: React.RefObject<HTMLDivElement>;
|
@@ -1,10 +1,13 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { TableMeta, CellContext } from '@tanstack/react-table';
|
3
3
|
export declare type EditingCellProps<TType = unknown> = CellContext<TType, unknown> & {
|
4
|
+
highlighted?: boolean;
|
5
|
+
highlightedAsCurrent?: boolean;
|
4
6
|
children?: string | JSX.Element;
|
5
7
|
};
|
6
8
|
export declare function EditingCell<TType = unknown>(props: EditingCellProps<TType>): JSX.Element;
|
7
9
|
export declare type MemoedEditingCellProps<TType = unknown> = EditingCellProps<TType> & {
|
8
10
|
isHovered: boolean;
|
9
11
|
tableMeta: TableMeta<TType>;
|
12
|
+
error?: string;
|
10
13
|
};
|
@@ -16,6 +16,6 @@ export declare type EditingControlProps<TType = unknown> = {
|
|
16
16
|
cell: RTCell<TType, unknown>;
|
17
17
|
error?: string;
|
18
18
|
tabIndex?: number;
|
19
|
-
|
19
|
+
isActiveRow?: boolean;
|
20
20
|
};
|
21
21
|
export declare const EditingControl: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<HTMLElement>>;
|
@@ -9,7 +9,7 @@ export declare type HeaderProps<TType = unknown> = HeaderContext<TType, unknown>
|
|
9
9
|
hasSeparator?: boolean;
|
10
10
|
};
|
11
11
|
export declare function Header<TType = unknown>(props: HeaderProps<TType>): JSX.Element;
|
12
|
-
export declare type
|
12
|
+
export declare type HeaderContentProps<TType = unknown> = Omit<HeaderProps<TType>, 'column' | 'header'> & {
|
13
13
|
align?: Table3ColumnAlignment;
|
14
14
|
canFreeze: boolean;
|
15
15
|
canHide: boolean;
|
@@ -5,4 +5,4 @@ export declare type EditingActionsProps<TType = unknown> = CellContext<TType, un
|
|
5
5
|
};
|
6
6
|
export declare const COLUMN_ID = "__editing_actions";
|
7
7
|
export declare const EDITING_ACTIONS_WIDTH = 60;
|
8
|
-
export declare function createRowEditingActionsColumn<TType = unknown>(): DisplayColumnDef<TType, unknown>;
|
8
|
+
export declare function createRowEditingActionsColumn<TType = unknown>(rowIdentifier?: string): DisplayColumnDef<TType, unknown>;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { Table3ColumnAlignment
|
1
|
+
import { Table3ColumnAlignment } from '../../types';
|
2
2
|
export declare const PRINT_MIN_COLUMN_SIZE = 20;
|
3
3
|
export declare const getCellAlignmentClasses: (alignment?: Table3ColumnAlignment) => string;
|
4
|
-
export declare const getFontBasedMinColumnSize: (fontSize
|
4
|
+
export declare const getFontBasedMinColumnSize: (fontSize?: "small" | "medium" | "large") => 57 | 83 | 72;
|
5
5
|
export declare const getInputAppearanceClassnames: () => string;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { Row as RTRow, Table as RTable } from '@tanstack/react-table';
|
3
3
|
import { Table3RowClickHandler, Table3RowDropHandler } from '../../types';
|
4
|
+
import { LastCellIndex } from '../../util/editing';
|
4
5
|
declare type RowProps<TType = unknown> = Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick' | 'onDrop'> & {
|
5
6
|
index: number;
|
6
7
|
isLastRow: boolean;
|
@@ -12,11 +13,14 @@ declare type RowProps<TType = unknown> = Omit<React.HTMLAttributes<HTMLDivElemen
|
|
12
13
|
tableRef: React.RefObject<HTMLDivElement>;
|
13
14
|
};
|
14
15
|
export declare function Row<TType = unknown>(props: RowProps<TType>): JSX.Element;
|
15
|
-
export declare
|
16
|
+
export declare const lastCellIndex: LastCellIndex;
|
17
|
+
export declare type MemoedRowProps<TType = unknown> = Omit<RowProps<TType>, 'onClick'> & {
|
18
|
+
data: TType;
|
16
19
|
'aria-grabbed'?: boolean;
|
17
20
|
'data-current': boolean;
|
18
21
|
'data-selected': boolean;
|
19
22
|
draggable: boolean;
|
20
23
|
index: number;
|
24
|
+
onClick: (event: React.MouseEvent<HTMLDivElement>, data: unknown) => void;
|
21
25
|
};
|
22
26
|
export {};
|
@@ -3,6 +3,7 @@ declare type RowContextValue = {
|
|
3
3
|
isHovered: boolean;
|
4
4
|
setIsHovered: (value: boolean) => void;
|
5
5
|
rowIndex: number;
|
6
|
+
hasError: boolean;
|
6
7
|
};
|
7
8
|
export declare const RowContext: React.Context<RowContextValue>;
|
8
9
|
export declare const useRowContext: () => RowContextValue;
|
@@ -1,30 +1,31 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { Cell as RTCell } from '@tanstack/react-table';
|
3
|
+
import { Table3SaveHandler } from '../../types';
|
3
4
|
import { IndicatorReason } from '../../components/columns/cell/Indicator';
|
4
|
-
|
5
|
+
import { Table3Validation } from './useValidation';
|
6
|
+
export declare enum SavingStatusValue {
|
5
7
|
Saving = "saving",
|
6
8
|
Saved = "saved",
|
7
9
|
Error = "error"
|
8
10
|
}
|
9
|
-
export declare
|
10
|
-
state: SavingStateValue;
|
11
|
-
};
|
12
|
-
export declare function useEditing<TType = unknown>(isEnabled: boolean, onSave?: (row: TType) => void): {
|
11
|
+
export declare function useEditing<TType = unknown>(isEnabled: boolean, validation: Table3Validation<TType>, onSave?: Table3SaveHandler<TType>): {
|
13
12
|
isEnabled: boolean;
|
14
13
|
isEditing: boolean;
|
15
14
|
toggleEditing: React.Dispatch<React.SetStateAction<boolean>>;
|
16
|
-
changes:
|
15
|
+
changes: EditingState<TType>;
|
17
16
|
getCellValue: <T extends TType>(cell: RTCell<T, unknown>) => any;
|
18
17
|
setCellValue: <T_1 extends TType>(cell: RTCell<T_1, unknown>, value: unknown) => void;
|
19
18
|
saveChangesIfNeeded: () => Promise<void>;
|
20
19
|
detailModeEditing: boolean;
|
21
20
|
setDetailModeEditing: React.Dispatch<React.SetStateAction<boolean>>;
|
22
|
-
rowMoveReason: Record<string, IndicatorReason | null
|
23
|
-
setRowMoveReason: React.Dispatch<React.SetStateAction<Record<string, IndicatorReason | null
|
24
|
-
removeRowMoveReason: (
|
21
|
+
rowMoveReason: Record<string, IndicatorReason | null> | null;
|
22
|
+
setRowMoveReason: React.Dispatch<React.SetStateAction<Record<string, IndicatorReason | null> | null>>;
|
23
|
+
removeRowMoveReason: () => void;
|
25
24
|
handleKeyDown: (event: KeyboardEvent) => void;
|
26
25
|
handleBlur: (event: React.FocusEvent) => void;
|
27
26
|
resetChange: (rowId: string) => void;
|
28
|
-
|
29
|
-
|
27
|
+
getSavingStatus: (rowId: string) => SavingStatusValue | null;
|
28
|
+
resetSavingStatus: (rowId: string) => void;
|
30
29
|
};
|
30
|
+
declare type EditingState<TType = unknown> = Record<string, TType> | null;
|
31
|
+
export {};
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
|
3
|
-
export declare function useSearch(isEnabled: boolean, excludeUnmatchedResultsInSearch?: boolean, loadAll?: Table3LoadAllHandler): {
|
2
|
+
export declare function useSearch(isEnabled: boolean, excludeUnmatchedResultsInSearch?: boolean): {
|
4
3
|
isEnabled: boolean;
|
5
4
|
isHighlightingEnabled: boolean;
|
6
5
|
toggleHighlighting: React.Dispatch<React.SetStateAction<boolean>>;
|
@@ -12,5 +11,6 @@ export declare function useSearch(isEnabled: boolean, excludeUnmatchedResultsInS
|
|
12
11
|
setHighlightedColumnIndexes: React.Dispatch<React.SetStateAction<number[][]>>;
|
13
12
|
currentHighlightColumnIndex: number | undefined;
|
14
13
|
setCurrentHighlightColumnIndex: React.Dispatch<React.SetStateAction<number | undefined>>;
|
15
|
-
|
14
|
+
isSearching: boolean;
|
15
|
+
setIsSearching: React.Dispatch<React.SetStateAction<boolean>>;
|
16
16
|
};
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { Cell as RTCell } from '@tanstack/react-table';
|
2
|
+
import { RowErrors, Table3CellValidationHandler, Table3RowValidationHandler } from '../../types';
|
3
|
+
export declare type Table3Validation<TType = unknown> = {
|
4
|
+
validate: (rowId: string, row: TType, cellId?: string) => Promise<void | RowErrors>;
|
5
|
+
setCellError: (rowId: string, cellId: string, error: string) => void;
|
6
|
+
setRowErrors: (rowId: string, errors: Record<string, string>) => void;
|
7
|
+
confirmErrors: (rowId: string) => void;
|
8
|
+
getCellError: <T extends TType>(cell: RTCell<T, unknown>) => string | undefined;
|
9
|
+
resetErrors: (rowId: string, cellId?: string) => void;
|
10
|
+
errors: Record<string, RowErrors> | null;
|
11
|
+
draftErrors: Record<string, RowErrors> | null;
|
12
|
+
};
|
13
|
+
export declare function useValidation<TType = unknown>(onCellValidate?: Table3CellValidationHandler<TType>, onRowValidate?: Table3RowValidationHandler<TType>): Table3Validation<TType>;
|
@@ -1,42 +1,47 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { RowData } from '@tanstack/react-table';
|
3
|
-
import { Table3ColumnAlignment, Table3ColumnRenderer, Table3Props, Table3ColumnHeaderMenu, Table3ColumnControlRenderer, Table3ColumnDataType, Table3ColumnClassNameHandler, Table3ColumnFooterRenderer, TableStrategy, Table3FilterComparator, Table3Settings } from '../types';
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
import {
|
7
|
-
import { useFontSize } from './features/useFontSize';
|
3
|
+
import { Table3ColumnAlignment, Table3ColumnRenderer, Table3Props, Table3ColumnHeaderMenu, Table3ColumnControlRenderer, Table3ColumnDataType, Table3ColumnClassNameHandler, Table3ColumnFooterRenderer, TableStrategy, Table3FilterComparator, Table3Settings, Table3Ref } from '../types';
|
4
|
+
import { useTableRowActive } from '../../../primitives/Table/useTable/features/useTableRowActive';
|
5
|
+
import { useTableRowHeight } from '../../../primitives/Table/useTable/features/useTableRowHeight';
|
6
|
+
import { useTableFontSize } from '../../../primitives/Table/useTable/features/useTableFontSize';
|
8
7
|
import { useRowDrag } from './features/useRowDrag';
|
9
8
|
import { useColumnFreezing } from './features/useColumnFreezing';
|
10
|
-
import {
|
11
|
-
import {
|
12
|
-
import {
|
9
|
+
import { useTableRowSelection } from '../../../primitives/Table/useTable/features/useTableRowSelection';
|
10
|
+
import { useTableServerLoading } from '../../../primitives/Table/useTable/features/useTableServerLoading';
|
11
|
+
import { useTableRowClick } from '../../../primitives/Table/useTable/features/useTableRowClick';
|
12
|
+
import { useTableColumnOrdering } from '../../../primitives/Table/useTable/features/useTableColumnOrdering';
|
13
13
|
import { useRowDrop } from './features/useRowDrop';
|
14
14
|
import { useEditing } from './features/useEditing';
|
15
|
-
import {
|
16
|
-
import {
|
15
|
+
import { useTablePrinting } from '../../../primitives/Table/useTable/features/useTablePrinting';
|
16
|
+
import { useTableRowGoto } from '../../../primitives/Table/useTable/features/useTableRowGoto';
|
17
17
|
import { useSearch } from './features/useSearch';
|
18
18
|
import { useRowActions } from './features/useRowActions';
|
19
|
+
import { Table3Validation } from './features/useValidation';
|
20
|
+
import { usePauseShortcuts } from './features/usePauseShortcuts';
|
19
21
|
declare module '@tanstack/table-core' {
|
20
22
|
interface TableMeta<TData extends RowData> {
|
21
23
|
columnFreezing: ReturnType<typeof useColumnFreezing>;
|
22
|
-
columnOrdering: ReturnType<typeof
|
23
|
-
currentRow: ReturnType<typeof useCurrentRow>;
|
24
|
+
columnOrdering: ReturnType<typeof useTableColumnOrdering>;
|
24
25
|
editing: ReturnType<typeof useEditing>;
|
25
26
|
enableFooter: boolean;
|
26
|
-
fontSize: ReturnType<typeof
|
27
|
+
fontSize: ReturnType<typeof useTableFontSize>;
|
27
28
|
getSettings: () => Table3Settings;
|
28
|
-
hoverState: ReturnType<typeof usePauseHoverState>;
|
29
29
|
isPrinting: boolean;
|
30
30
|
isUsingServer: boolean;
|
31
|
-
printing: ReturnType<typeof
|
31
|
+
printing: ReturnType<typeof useTablePrinting>;
|
32
32
|
rowActions: ReturnType<typeof useRowActions>;
|
33
|
-
|
33
|
+
rowActive: ReturnType<typeof useTableRowActive>;
|
34
|
+
rowClick: ReturnType<typeof useTableRowClick>;
|
34
35
|
rowDrag: ReturnType<typeof useRowDrag>;
|
35
36
|
rowDrop: ReturnType<typeof useRowDrop>;
|
36
|
-
rowGoto: ReturnType<typeof
|
37
|
-
rowHeight: ReturnType<typeof
|
38
|
-
rowSelection: ReturnType<typeof
|
37
|
+
rowGoto: ReturnType<typeof useTableRowGoto>;
|
38
|
+
rowHeight: ReturnType<typeof useTableRowHeight>;
|
39
|
+
rowSelection: ReturnType<typeof useTableRowSelection>;
|
39
40
|
search: ReturnType<typeof useSearch>;
|
41
|
+
server: ReturnType<typeof useTableServerLoading>;
|
42
|
+
shortcutsState: ReturnType<typeof usePauseShortcuts>;
|
43
|
+
tableRef: React.RefObject<Table3Ref>;
|
44
|
+
validation: Table3Validation<TData>;
|
40
45
|
}
|
41
46
|
interface ColumnMeta<TData extends RowData, TValue> {
|
42
47
|
align?: Table3ColumnAlignment;
|
@@ -63,7 +68,7 @@ declare module '@tanstack/table-core' {
|
|
63
68
|
scrollToIndex: TableStrategy['scrollToIndex'];
|
64
69
|
}
|
65
70
|
}
|
66
|
-
export declare function useTable<TType = unknown>(props: Table3Props<TType>): {
|
71
|
+
export declare function useTable<TType = unknown>(props: Table3Props<TType>, ref: React.RefObject<Table3Ref>): {
|
67
72
|
table: any;
|
68
73
|
length: number;
|
69
74
|
};
|
@@ -1,7 +1,9 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import {
|
2
|
+
import { ColumnOrderState, ColumnSizingState, SortingState, VisibilityState, BuiltInSortingFn } from '@tanstack/react-table';
|
3
3
|
import { MenuProps } from '../Menu/Menu';
|
4
4
|
import { MenuItemProps } from '../Menu/components/Item';
|
5
|
+
import { TableColumnFilter, TableColumnSort, TableFilterHandler, TableFontSize, TableRef, TableRowClickHandler, TableRowGotoHandler, TableRowHeight, TableRowSelectHandler, TableServerLoadAllHandler, TableServerLoadPageHandler, TableSortHandler } from '../../primitives/Table/types';
|
6
|
+
import { ValueOf } from '../../types';
|
5
7
|
export declare type Table3SortDirection = 'asc' | 'desc';
|
6
8
|
export declare type Table3SortFn<TType = unknown> = ((rowA: TType, rowB: TType, columnId: string) => -1 | 0 | 1) | BuiltInSortingFn | 'auto';
|
7
9
|
export declare type Table3ColumnRenderer<TValue = unknown, TType = unknown> = (value: TValue, row: TType) => JSX.Element | string | number | null;
|
@@ -17,12 +19,11 @@ export declare type Table3ColumnControlProps = {
|
|
17
19
|
onBlur?: (value: any) => void;
|
18
20
|
onFocus?: React.FocusEventHandler;
|
19
21
|
readOnly?: boolean;
|
20
|
-
ref: React.RefObject<HTMLElement
|
22
|
+
ref: React.RefObject<HTMLElement> | ((instance: HTMLElement | null | undefined) => void);
|
21
23
|
setValue: (value: any) => void;
|
22
24
|
value: any;
|
23
25
|
};
|
24
26
|
export declare type Table3ColumnControlRenderer<TType = unknown> = ((props: Table3ColumnControlProps, row?: TType) => JSX.Element) | 'datepicker' | 'input' | 'switch' | 'textarea';
|
25
|
-
declare type ValueOf<T> = T[keyof T];
|
26
27
|
export declare type Table3ColumnProps<TType = unknown> = ValueOf<{
|
27
28
|
[K in keyof TType]: {
|
28
29
|
accessor: K;
|
@@ -60,13 +61,13 @@ export declare type Table3GroupProps = {
|
|
60
61
|
children: (JSX.Element | boolean | null | undefined)[];
|
61
62
|
};
|
62
63
|
export declare type DeprecatedRowDensity = 'compact' | 'normal' | 'comfortable' | 'spacious';
|
63
|
-
export declare type Table3RowHeight =
|
64
|
-
export declare type Table3FontSize =
|
65
|
-
export declare type Table3RowClickHandler<TType = unknown> =
|
64
|
+
export declare type Table3RowHeight = TableRowHeight;
|
65
|
+
export declare type Table3FontSize = TableFontSize;
|
66
|
+
export declare type Table3RowClickHandler<TType = unknown> = TableRowClickHandler<TType>;
|
66
67
|
export declare type Table3RowDragHandler<TType = unknown> = (rows: TType[], showPlaceholder: (string: any) => void, setDataTransfer: (data: string) => void) => void;
|
67
68
|
export declare type Table3RowDropHandler<TType = any> = (event: React.DragEvent, row: TType) => void;
|
68
69
|
export declare type Table3RowExpansionRenderer<TType = unknown> = (row: TType) => (() => JSX.Element) | null;
|
69
|
-
export declare type Table3RowSelectionHandler<TType = unknown> =
|
70
|
+
export declare type Table3RowSelectionHandler<TType = unknown> = TableRowSelectHandler<TType>;
|
70
71
|
export declare type Table3RowActionRenderer<TType = unknown> = (row: TType) => JSX.Element | null;
|
71
72
|
export declare type Table3Preset = 'display' | 'editable';
|
72
73
|
export declare type Table3Settings = {
|
@@ -105,13 +106,16 @@ export declare type Table3Filter = {
|
|
105
106
|
id: string | null;
|
106
107
|
value: Table3FilterValue;
|
107
108
|
};
|
108
|
-
export declare type ColumnFilter =
|
109
|
-
export declare type Table3FilterHandler =
|
110
|
-
export declare type Table3LoadPageHandler =
|
111
|
-
export declare type Table3LoadAllHandler =
|
112
|
-
export declare type Table3RowGotoHandler =
|
113
|
-
export declare type Table3ColumnSort =
|
114
|
-
export declare type Table3SortHandler =
|
109
|
+
export declare type ColumnFilter = TableColumnFilter;
|
110
|
+
export declare type Table3FilterHandler = TableFilterHandler;
|
111
|
+
export declare type Table3LoadPageHandler = TableServerLoadPageHandler;
|
112
|
+
export declare type Table3LoadAllHandler = TableServerLoadAllHandler;
|
113
|
+
export declare type Table3RowGotoHandler = TableRowGotoHandler;
|
114
|
+
export declare type Table3ColumnSort = TableColumnSort;
|
115
|
+
export declare type Table3SortHandler = TableSortHandler;
|
116
|
+
export declare type RowErrors = Record<string, string>;
|
117
|
+
export declare type Table3CellValidationHandler<TType = unknown> = (cellValue: any, cellId: string, row: TType) => Promise<RowErrors | undefined | void>;
|
118
|
+
export declare type Table3RowValidationHandler<TType = unknown> = (row: TType) => Promise<RowErrors | undefined | void>;
|
115
119
|
export declare type TableStrategy = {
|
116
120
|
renderBody: () => JSX.Element | JSX.Element[] | null;
|
117
121
|
scrollToIndex: (index: number, options?: {
|
@@ -169,10 +173,13 @@ export declare type Table3CommonProps<TType = unknown> = Partial<Table3Options>
|
|
169
173
|
onFilter?: Table3FilterHandler;
|
170
174
|
onSave?: Table3SaveHandler<TType>;
|
171
175
|
onSort?: Table3SortHandler;
|
176
|
+
onCellValidate?: Table3CellValidationHandler<TType>;
|
177
|
+
onRowValidate?: Table3RowValidationHandler<TType>;
|
172
178
|
preset?: Table3Preset;
|
173
179
|
shortcuts?: Table3Shortcuts<TType>;
|
174
180
|
toolbarLeft?: JSX.Element;
|
175
181
|
toolbarRight?: JSX.Element;
|
182
|
+
rowIdentifier?: string;
|
176
183
|
};
|
177
184
|
interface Table3ClientProps<TType = unknown> extends Table3CommonProps<TType> {
|
178
185
|
length?: never;
|
@@ -187,12 +194,8 @@ interface Table3ServerProps<TType = unknown> extends Table3CommonProps<TType> {
|
|
187
194
|
pageSize?: number;
|
188
195
|
}
|
189
196
|
export declare type Table3Props<TType = unknown> = Table3ClientProps<TType> | Table3ServerProps<TType>;
|
190
|
-
export declare type Table3Ref =
|
197
|
+
export declare type Table3Ref = TableRef & {
|
191
198
|
instance: {
|
192
|
-
resetFiltering: () => void;
|
193
|
-
resetRowExpansion: () => void;
|
194
|
-
resetRowSelection: () => void;
|
195
|
-
resetSorting: () => void;
|
196
199
|
toggleEditing: (enabled: boolean | undefined) => void;
|
197
200
|
};
|
198
201
|
};
|
@@ -262,6 +265,12 @@ export declare type Table3Texts = {
|
|
262
265
|
progress: string;
|
263
266
|
complete: string;
|
264
267
|
};
|
268
|
+
clearChangesConfirmationDialog: {
|
269
|
+
title: string;
|
270
|
+
description: string;
|
271
|
+
cancel: string;
|
272
|
+
confirm: string;
|
273
|
+
};
|
265
274
|
};
|
266
275
|
filters: {
|
267
276
|
button: string;
|
@@ -344,5 +353,18 @@ export declare type Table3Texts = {
|
|
344
353
|
otherOptions: {
|
345
354
|
tooltip: string;
|
346
355
|
};
|
356
|
+
validation: {
|
357
|
+
index: string;
|
358
|
+
alert: {
|
359
|
+
unsavedEntries: (count?: number) => string;
|
360
|
+
incompleteAndHavntBeenSaved: (count?: number) => string;
|
361
|
+
};
|
362
|
+
resetFiltersDialog: {
|
363
|
+
title: string;
|
364
|
+
description: string;
|
365
|
+
cancel: string;
|
366
|
+
confirm: string;
|
367
|
+
};
|
368
|
+
};
|
347
369
|
};
|
348
370
|
export {};
|
@@ -2,3 +2,9 @@ export declare const focussableNodeNames: string[];
|
|
2
2
|
export declare const focusableSelector: string;
|
3
3
|
export declare const hasChanged: (value: any, newValue: any) => boolean;
|
4
4
|
export declare const willRowMoveAfterSorting: (value: any, cell: any, rowIndex: any, rows: any, desc: any) => boolean;
|
5
|
+
export declare class LastCellIndex {
|
6
|
+
_value: string | null | undefined;
|
7
|
+
get value(): string | null | undefined;
|
8
|
+
set value(val: string | null | undefined);
|
9
|
+
}
|
10
|
+
export declare function getColumnIndex(element: Element): string | null | undefined;
|