@economic/taco 2.25.1 → 2.26.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/Provider/Localization.d.ts +47 -55
- package/dist/components/Report/Report.d.ts +5 -19
- package/dist/components/Report/useReport.d.ts +3 -7
- package/dist/components/Select2/hooks/useChildren.d.ts +2 -1
- package/dist/components/Table/Table.d.ts +2 -2
- package/dist/components/Table3/Table3.d.ts +14 -14
- package/dist/components/Table3/components/Columns/Cell/Cell.d.ts +3 -0
- package/dist/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.d.ts +9 -0
- package/dist/components/Table3/components/Columns/Cell/Editing/TextareaWithAutosizing.d.ts +10 -0
- package/dist/components/Table3/components/Columns/Cell/EditingControlCell.d.ts +3 -0
- package/dist/components/Table3/components/Columns/Cell/EditingDisplayCell.d.ts +3 -0
- package/dist/components/Table3/components/Columns/Cell/util.d.ts +3 -0
- package/dist/components/Table3/components/Columns/Internal/EditingActionsMenu.d.ts +10 -0
- package/dist/components/Table3/components/Editing/Alert.d.ts +12 -0
- package/dist/components/Table3/components/Row/Editing/SaveStatus.d.ts +8 -0
- package/dist/components/Table3/components/Row/Row.d.ts +3 -0
- package/dist/components/Table3/components/Toolbar/Editing/Editing.d.ts +8 -0
- package/dist/components/Table3/features/useTableEditing.d.ts +46 -0
- package/dist/components/Table3/listeners/useTableEditingListener.d.ts +2 -0
- package/dist/components/Table3/types.d.ts +28 -351
- package/dist/components/Table3/useTable3.d.ts +11 -0
- package/dist/components/Table3/util/editing.d.ts +2 -10
- package/dist/esm/index.css +216 -515
- package/dist/esm/packages/taco/src/components/Field/Field.js +1 -0
- package/dist/esm/packages/taco/src/components/Field/Field.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Menu/components/Trigger.js +5 -6
- package/dist/esm/packages/taco/src/components/Menu/components/Trigger.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Provider/Localization.js +48 -59
- package/dist/esm/packages/taco/src/components/Provider/Localization.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Report/Report.js +8 -51
- package/dist/esm/packages/taco/src/components/Report/Report.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Report/useReport.js +8 -45
- package/dist/esm/packages/taco/src/components/Report/useReport.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/Select2.js +1 -1
- package/dist/esm/packages/taco/src/components/Select2/Select2.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js +1 -1
- 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/Table3/Table3.js +30 -218
- package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Cell.js +39 -0
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Cell.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js +85 -0
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/TextareaWithAutosizing.js +71 -0
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/TextareaWithAutosizing.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js +216 -0
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingDisplayCell.js +14 -0
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingDisplayCell.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/util.js +45 -0
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/util.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js +62 -0
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js +134 -0
- package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js +54 -0
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js +41 -0
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Table3/components/Toolbar/Editing/Editing.js +49 -0
- package/dist/esm/packages/taco/src/components/Table3/components/Toolbar/Editing/Editing.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js +349 -0
- package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js +49 -0
- package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Table3/useTable3.js +36 -0
- package/dist/esm/packages/taco/src/components/Table3/useTable3.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Table3/util/editing.js +46 -38
- package/dist/esm/packages/taco/src/components/Table3/util/editing.js.map +1 -1
- package/dist/esm/packages/taco/src/index.js +1 -1
- package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js +2 -0
- package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js +52 -0
- package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Body/Body.js +21 -12
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/Body.js.map +1 -0
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/EmptyStateBody.js.map +1 -0
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/util.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report/components/Cell → primitives/Table/Core/components/Columns/Cell/BuiltIns}/DisplayCell.js +6 -4
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report/components/Cell → primitives/Table/Core/components/Columns/Cell/BuiltIns}/GroupedCell.js +8 -6
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report/components → primitives/Table/Core/components/Columns}/Cell/Cell.js +6 -5
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/Cell.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report/components → primitives/Table/Core/components/Columns}/Cell/util.js +5 -4
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/util.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report/components → primitives/Table/Core/components/Columns}/Internal/Actions.js +28 -17
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js.map +1 -0
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Drag.js +73 -0
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Drag.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report/components → primitives/Table/Core/components/Columns}/Internal/Expansion.js +18 -6
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report/components → primitives/Table/Core/components/Columns}/Internal/Selection.js +23 -10
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Selection.js.map +1 -0
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Footer.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Footer/Summary.js +7 -7
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Summary.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Header/Header.js +12 -7
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Table3/components/columns/header → primitives/Table/Core/components/Header/components}/Goto.js +5 -5
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Goto.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Header/components/Menu.js +15 -16
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Header/components/Resizer.js +3 -3
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Resizer.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Header/components/SortIndicator.js +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/SortIndicator.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Header/util.js +4 -4
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/util.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report/components/Row → primitives/Table/Core/components/Row/BuiltIns}/DisplayRow.js +30 -12
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js.map +1 -0
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/SkeletonRow.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Row/Row.js +13 -7
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/Row.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Row/RowContext.js +0 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/RowContext.js.map +1 -0
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/Toolbar.js +54 -0
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/Toolbar.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Toolbar/components/Filters/Filters.js +9 -9
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/Filters.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Toolbar/components/Filters/ManageFiltersPopover.js +9 -9
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Toolbar/components/Filters/components/Filter.js +4 -4
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Toolbar/components/Filters/components/FilterColumn.js +7 -7
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Toolbar/components/Filters/components/FilterComparator.js +17 -17
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Toolbar/components/Filters/components/FilterValue.js +7 -7
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js.map +1 -0
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/util.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Toolbar/components/Print/Print.js +11 -11
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/Print.js.map +1 -0
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.js +88 -0
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Toolbar/components/Search/Search.js +26 -7
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Search/Search.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Toolbar/components/Settings/HideOrOrderPopover.js +27 -13
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Toolbar/components/Settings/Settings.js +17 -17
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/Settings.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report/styles/util.js → primitives/Table/Core/features/useStylesheet.js} +18 -2
- package/dist/esm/packages/taco/src/primitives/Table/Core/features/useStylesheet.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report/styles/useColumnPinningStylesheet.js → primitives/Table/Core/features/useStylesheetColumnFreezing.js} +12 -12
- package/dist/esm/packages/taco/src/primitives/Table/Core/features/useStylesheetColumnFreezing.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report/styles/useCssGridStylesheet.js → primitives/Table/Core/features/useStylesheetCssGrid.js} +9 -9
- package/dist/esm/packages/taco/src/primitives/Table/Core/features/useStylesheetCssGrid.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report/util → primitives/Table/Core/features}/useTableGlobalShortcuts.js +3 -5
- package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableGlobalShortcuts.js.map +1 -0
- package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRef.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report/util → primitives/Table/Core/features}/useTableRenderer.js +5 -3
- package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js.map +1 -0
- package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/listeners/useTableRowActiveListener.js +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/listeners/useTableRowActiveListener.js.map +1 -0
- package/dist/esm/packages/taco/src/primitives/Table/Core/useTable.js +50 -0
- package/dist/esm/packages/taco/src/primitives/Table/Core/useTable.js.map +1 -0
- package/dist/esm/packages/taco/src/primitives/Table/Core/util/rows.js.map +1 -0
- package/dist/esm/packages/taco/src/primitives/Table/types.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActive.js +5 -15
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActive.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrag.js +14 -0
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrag.js.map +1 -0
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrop.js +9 -0
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrop.js.map +1 -0
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSettingsListener.js +1 -3
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSettingsListener.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js +13 -9
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js +58 -24
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/settings.js +1 -2
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/settings.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js +5 -2
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/dom.js +19 -3
- package/dist/esm/packages/taco/src/utils/dom.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/input.js +1 -14
- package/dist/esm/packages/taco/src/utils/input.js.map +1 -1
- package/dist/index.css +216 -515
- package/dist/index.d.ts +1 -0
- package/dist/primitives/Table/Core/Table.d.ts +19 -0
- package/dist/{components/Report → primitives/Table/Core}/components/Body/Body.d.ts +1 -1
- package/dist/{components/Report → primitives/Table/Core}/components/Body/EmptyStateBody.d.ts +2 -2
- package/dist/primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.d.ts +3 -0
- package/dist/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.d.ts +3 -0
- package/dist/{components/Report/components → primitives/Table/Core/components/Columns}/Cell/Cell.d.ts +4 -2
- package/dist/{components/Report/components → primitives/Table/Core/components/Columns}/Cell/util.d.ts +2 -1
- package/dist/{components/Report/components → primitives/Table/Core/components/Columns}/Internal/Actions.d.ts +4 -4
- package/dist/primitives/Table/Core/components/Columns/Internal/Drag.d.ts +2 -0
- package/dist/primitives/Table/Core/components/Columns/Internal/Expansion.d.ts +2 -0
- package/dist/primitives/Table/Core/components/Columns/Internal/Selection.d.ts +2 -0
- package/dist/{components/Report → primitives/Table/Core}/components/Header/Header.d.ts +7 -2
- package/dist/{components/Table3/components/columns/header → primitives/Table/Core/components/Header/components}/Goto.d.ts +1 -1
- package/dist/{components/Report → primitives/Table/Core}/components/Header/components/Menu.d.ts +2 -1
- package/dist/{components/Report → primitives/Table/Core}/components/Header/components/Resizer.d.ts +1 -1
- package/dist/{components/Report → primitives/Table/Core}/components/Header/components/SortIndicator.d.ts +1 -1
- package/dist/primitives/Table/Core/components/Header/util.d.ts +4 -0
- package/dist/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.d.ts +4 -0
- package/dist/primitives/Table/Core/components/Row/Row.d.ts +6 -0
- package/dist/{components/Report → primitives/Table/Core}/components/Row/RowContext.d.ts +0 -1
- package/dist/primitives/Table/Core/components/Toolbar/Toolbar.d.ts +7 -0
- package/dist/{components/Report → primitives/Table/Core}/components/Toolbar/components/Filters/components/Filter.d.ts +1 -1
- package/dist/{components/Report → primitives/Table/Core}/components/Toolbar/components/Filters/components/FilterColumn.d.ts +2 -2
- package/dist/{components/Report → primitives/Table/Core}/components/Toolbar/components/Filters/components/FilterComparator.d.ts +1 -1
- package/dist/{components/Report → primitives/Table/Core}/components/Toolbar/components/Filters/components/FilterValue.d.ts +1 -1
- package/dist/{components/Report → primitives/Table/Core}/components/Toolbar/components/Filters/util.d.ts +1 -1
- package/dist/{components/Report → primitives/Table/Core}/components/Toolbar/components/Print/Print.d.ts +1 -1
- package/dist/{components/Report → primitives/Table/Core}/components/Toolbar/components/Print/PrintDialog.d.ts +2 -2
- package/dist/{components/Report → primitives/Table/Core}/components/Toolbar/components/Search/Search.d.ts +3 -1
- package/dist/{components/Report → primitives/Table/Core}/components/Toolbar/components/Settings/HideOrOrderPopover.d.ts +1 -1
- package/dist/{components/Report → primitives/Table/Core}/components/Toolbar/components/Settings/Settings.d.ts +2 -2
- package/dist/primitives/Table/Core/features/useStylesheetColumnFreezing.d.ts +2 -0
- package/dist/{components/Report/styles/useCssGridStylesheet.d.ts → primitives/Table/Core/features/useStylesheetCssGrid.d.ts} +2 -2
- package/dist/{components/Report/util → primitives/Table/Core/features}/useTableGlobalShortcuts.d.ts +1 -1
- package/dist/{components/Report/util → primitives/Table/Core/features}/useTableRenderer.d.ts +3 -2
- package/dist/primitives/Table/Core/types.d.ts +21 -0
- package/dist/primitives/Table/Core/useTable.d.ts +27 -0
- package/dist/primitives/Table/types.d.ts +168 -3
- package/dist/primitives/Table/useTableManager/features/useTableRowActive.d.ts +4 -2
- package/dist/primitives/Table/useTableManager/features/useTableRowDrag.d.ts +8 -0
- package/dist/primitives/Table/useTableManager/features/useTableRowDrop.d.ts +5 -0
- package/dist/primitives/Table/useTableManager/types.d.ts +1 -0
- package/dist/primitives/Table/useTableManager/useTableManager.d.ts +9 -3
- package/dist/primitives/Table/useTableManager/util/settings.d.ts +1 -1
- package/dist/taco.cjs.development.js +7134 -11743
- 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/utils/dom.d.ts +2 -1
- package/package.json +3 -5
- package/dist/components/Report/components/Cell/DisplayCell.d.ts +0 -8
- package/dist/components/Report/components/Cell/GroupedCell.d.ts +0 -8
- package/dist/components/Report/components/Header/components/Goto.d.ts +0 -6
- package/dist/components/Report/components/Header/util.d.ts +0 -4
- package/dist/components/Report/components/Internal/Expansion.d.ts +0 -4
- package/dist/components/Report/components/Internal/Selection.d.ts +0 -4
- package/dist/components/Report/components/Row/DisplayRow.d.ts +0 -9
- package/dist/components/Report/components/Row/Row.d.ts +0 -9
- package/dist/components/Report/components/Toolbar/Toolbar.d.ts +0 -15
- package/dist/components/Report/styles/useColumnPinningStylesheet.d.ts +0 -2
- package/dist/components/Report/styles/util.d.ts +0 -3
- package/dist/components/Report/types.d.ts +0 -20
- package/dist/components/Table3/components/alert/ErrorAlert.d.ts +0 -10
- package/dist/components/Table3/components/columns/cell/Cell.d.ts +0 -6
- package/dist/components/Table3/components/columns/cell/DisplayCell.d.ts +0 -25
- package/dist/components/Table3/components/columns/cell/EditingCell.d.ts +0 -14
- package/dist/components/Table3/components/columns/cell/EditingControl.d.ts +0 -21
- package/dist/components/Table3/components/columns/cell/Highlight.d.ts +0 -2
- package/dist/components/Table3/components/columns/cell/Indicator.d.ts +0 -22
- package/dist/components/Table3/components/columns/cell/controls/TextareaControl.d.ts +0 -2
- package/dist/components/Table3/components/columns/footer/Footer.d.ts +0 -14
- package/dist/components/Table3/components/columns/footer/Summary.d.ts +0 -8
- package/dist/components/Table3/components/columns/header/Group.d.ts +0 -15
- package/dist/components/Table3/components/columns/header/Header.d.ts +0 -37
- package/dist/components/Table3/components/columns/header/Menu.d.ts +0 -20
- package/dist/components/Table3/components/columns/header/Resizer.d.ts +0 -7
- package/dist/components/Table3/components/columns/header/SortIndicator.d.ts +0 -12
- package/dist/components/Table3/components/columns/internal/Actions.d.ts +0 -3
- package/dist/components/Table3/components/columns/internal/Drag.d.ts +0 -4
- package/dist/components/Table3/components/columns/internal/EditingActions.d.ts +0 -8
- package/dist/components/Table3/components/columns/internal/Expansion.d.ts +0 -4
- package/dist/components/Table3/components/columns/internal/Selection.d.ts +0 -3
- package/dist/components/Table3/components/columns/styles.d.ts +0 -5
- package/dist/components/Table3/components/rows/ExpandedRow.d.ts +0 -8
- package/dist/components/Table3/components/rows/Row.d.ts +0 -26
- package/dist/components/Table3/components/rows/RowContext.d.ts +0 -10
- package/dist/components/Table3/components/rows/SkeletonRow.d.ts +0 -10
- package/dist/components/Table3/components/rows/styles.d.ts +0 -6
- package/dist/components/Table3/components/toolbar/ColumnSettings.d.ts +0 -7
- package/dist/components/Table3/components/toolbar/EditButton.d.ts +0 -7
- package/dist/components/Table3/components/toolbar/Filter/filters/Filters.d.ts +0 -7
- package/dist/components/Table3/components/toolbar/Filter/filters/components/Filter.d.ts +0 -12
- package/dist/components/Table3/components/toolbar/Filter/filters/components/FilterColumn.d.ts +0 -12
- package/dist/components/Table3/components/toolbar/Filter/filters/components/FilterComparator.d.ts +0 -7
- package/dist/components/Table3/components/toolbar/Filter/filters/components/FilterValue.d.ts +0 -10
- package/dist/components/Table3/components/toolbar/FontSize.d.ts +0 -7
- package/dist/components/Table3/components/toolbar/PrintButton/PrintButton.d.ts +0 -8
- package/dist/components/Table3/components/toolbar/PrintButton/PrintIFrame.d.ts +0 -8
- package/dist/components/Table3/components/toolbar/PrintButton/WarningDialog.d.ts +0 -9
- package/dist/components/Table3/components/toolbar/PrintButton/hooks/useParentStylesheets.d.ts +0 -1
- package/dist/components/Table3/components/toolbar/RowHeight.d.ts +0 -7
- package/dist/components/Table3/components/toolbar/Search.d.ts +0 -8
- package/dist/components/Table3/components/toolbar/Settings.d.ts +0 -8
- package/dist/components/Table3/components/toolbar/Toolbar.d.ts +0 -13
- package/dist/components/Table3/hooks/features/useColumnFreezing.d.ts +0 -13
- package/dist/components/Table3/hooks/features/useEditing.d.ts +0 -31
- package/dist/components/Table3/hooks/features/useHeaderOffsetStyle.d.ts +0 -3
- package/dist/components/Table3/hooks/features/usePauseShortcuts.d.ts +0 -5
- package/dist/components/Table3/hooks/features/usePrinting.d.ts +0 -7
- package/dist/components/Table3/hooks/features/useRowActions.d.ts +0 -5
- package/dist/components/Table3/hooks/features/useRowDrag.d.ts +0 -6
- package/dist/components/Table3/hooks/features/useRowDrop.d.ts +0 -5
- package/dist/components/Table3/hooks/features/useSearch.d.ts +0 -16
- package/dist/components/Table3/hooks/features/useSettings.d.ts +0 -3
- package/dist/components/Table3/hooks/features/useValidation.d.ts +0 -13
- package/dist/components/Table3/hooks/listeners/useEditingStateListener.d.ts +0 -2
- package/dist/components/Table3/hooks/listeners/useSettingsStateListener.d.ts +0 -3
- package/dist/components/Table3/hooks/useConvertChildrenToColumns.d.ts +0 -9
- package/dist/components/Table3/hooks/useCssGrid.d.ts +0 -6
- package/dist/components/Table3/hooks/useCssVars.d.ts +0 -8
- package/dist/components/Table3/hooks/useTable.d.ts +0 -74
- package/dist/components/Table3/hooks/useTableDataLoader.d.ts +0 -22
- package/dist/components/Table3/hooks/useTablePreset.d.ts +0 -2
- package/dist/components/Table3/hooks/useTableRefInstanceSetup.d.ts +0 -4
- package/dist/components/Table3/strategies/index.d.ts +0 -4
- package/dist/components/Table3/strategies/virtualised.d.ts +0 -4
- package/dist/components/Table3/util/columns.d.ts +0 -8
- package/dist/components/Table3/util/filtering.d.ts +0 -3
- package/dist/components/Table3/util/scrolling.d.ts +0 -2
- package/dist/esm/packages/taco/src/components/Report/components/Body/Body.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Body/EmptyStateBody.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Body/util.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Cell/Cell.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Cell/DisplayCell.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Cell/GroupedCell.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Cell/util.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Footer/Footer.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Footer/Summary.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Header/Header.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Header/components/Goto.js +0 -28
- package/dist/esm/packages/taco/src/components/Report/components/Header/components/Goto.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Header/components/Menu.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Header/components/Resizer.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Header/components/SortIndicator.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Header/util.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Internal/Actions.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Internal/Expansion.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Internal/Selection.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Row/DisplayRow.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Row/Row.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Row/RowContext.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Row/SkeletonRow.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Toolbar/Toolbar.js +0 -63
- package/dist/esm/packages/taco/src/components/Report/components/Toolbar/Toolbar.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Filters/Filters.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Filters/ManageFiltersPopover.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Filters/components/Filter.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Filters/components/FilterColumn.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Filters/components/FilterComparator.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Filters/components/FilterValue.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Filters/util.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Print/Print.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Print/PrintDialog.js +0 -88
- package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Print/PrintDialog.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Search/Search.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Settings/HideOrOrderPopover.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Settings/Settings.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/listeners/useTableRowActiveListener.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/styles/useColumnPinningStylesheet.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/styles/useCssGridStylesheet.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/styles/useStylesheet.js +0 -20
- package/dist/esm/packages/taco/src/components/Report/styles/useStylesheet.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/styles/util.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/util/rows.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/util/useTableGlobalShortcuts.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Report/util/useTableRenderer.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/alert/ErrorAlert.js +0 -154
- package/dist/esm/packages/taco/src/components/Table3/components/alert/ErrorAlert.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Cell.js +0 -84
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Cell.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/DisplayCell.js +0 -84
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/DisplayCell.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingCell.js +0 -212
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingCell.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingControl.js +0 -194
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingControl.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Highlight.js +0 -41
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Highlight.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Indicator.js +0 -88
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Indicator.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/controls/TextareaControl.js +0 -144
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/controls/TextareaControl.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/footer/Footer.js +0 -50
- package/dist/esm/packages/taco/src/components/Table3/components/columns/footer/Footer.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/footer/Summary.js +0 -41
- package/dist/esm/packages/taco/src/components/Table3/components/columns/footer/Summary.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Goto.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Group.js +0 -74
- package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Group.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Header.js +0 -186
- package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Header.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Menu.js +0 -206
- package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Menu.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Resizer.js +0 -42
- package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Resizer.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/header/SortIndicator.js +0 -38
- package/dist/esm/packages/taco/src/components/Table3/components/columns/header/SortIndicator.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Actions.js +0 -129
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Actions.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Drag.js +0 -86
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Drag.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/EditingActions.js +0 -174
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/EditingActions.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Expansion.js +0 -104
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Expansion.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Selection.js +0 -187
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Selection.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/styles.js +0 -19
- package/dist/esm/packages/taco/src/components/Table3/components/columns/styles.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/rows/ExpandedRow.js +0 -27
- package/dist/esm/packages/taco/src/components/Table3/components/rows/ExpandedRow.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/rows/Row.js +0 -327
- package/dist/esm/packages/taco/src/components/Table3/components/rows/Row.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/rows/RowContext.js +0 -14
- package/dist/esm/packages/taco/src/components/Table3/components/rows/RowContext.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/rows/SkeletonRow.js +0 -43
- package/dist/esm/packages/taco/src/components/Table3/components/rows/SkeletonRow.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/rows/styles.js +0 -9
- package/dist/esm/packages/taco/src/components/Table3/components/rows/styles.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/ColumnSettings.js +0 -109
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/ColumnSettings.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/EditButton.js +0 -29
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/EditButton.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/Filters.js +0 -164
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/Filters.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/Filter.js +0 -102
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/Filter.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterColumn.js +0 -50
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterColumn.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterComparator.js +0 -111
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterComparator.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterValue.js +0 -118
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterValue.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/FontSize.js +0 -26
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/FontSize.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintButton.js +0 -211
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintButton.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintIFrame.js +0 -224
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintIFrame.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/WarningDialog.js +0 -60
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/WarningDialog.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/hooks/useParentStylesheets.js +0 -97
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/hooks/useParentStylesheets.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/RowHeight.js +0 -33
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/RowHeight.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Search.js +0 -238
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Search.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Settings.js +0 -65
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Settings.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Toolbar.js +0 -64
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Toolbar.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useColumnFreezing.js +0 -95
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useColumnFreezing.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useEditing.js +0 -299
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useEditing.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useHeaderOffsetStyle.js +0 -24
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useHeaderOffsetStyle.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePauseShortcuts.js +0 -12
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePauseShortcuts.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/useRowActions.js +0 -10
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowActions.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowDrag.js +0 -13
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowDrag.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowDrop.js +0 -9
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowDrop.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useSearch.js +0 -29
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useSearch.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useSettings.js +0 -23
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useSettings.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useValidation.js +0 -178
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useValidation.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useEditingStateListener.js +0 -28
- package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useEditingStateListener.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useSettingsStateListener.js +0 -24
- package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useSettingsStateListener.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/useConvertChildrenToColumns.js +0 -143
- package/dist/esm/packages/taco/src/components/Table3/hooks/useConvertChildrenToColumns.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/useCssGrid.js +0 -66
- package/dist/esm/packages/taco/src/components/Table3/hooks/useCssGrid.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/useCssVars.js +0 -74
- package/dist/esm/packages/taco/src/components/Table3/hooks/useCssVars.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/useTable.js +0 -234
- package/dist/esm/packages/taco/src/components/Table3/hooks/useTable.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/useTableDataLoader.js +0 -130
- package/dist/esm/packages/taco/src/components/Table3/hooks/useTableDataLoader.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/useTablePreset.js +0 -122
- package/dist/esm/packages/taco/src/components/Table3/hooks/useTablePreset.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/useTableRefInstanceSetup.js +0 -19
- package/dist/esm/packages/taco/src/components/Table3/hooks/useTableRefInstanceSetup.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/strategies/index.js +0 -8
- package/dist/esm/packages/taco/src/components/Table3/strategies/index.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/strategies/virtualised.js +0 -117
- package/dist/esm/packages/taco/src/components/Table3/strategies/virtualised.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/types.js +0 -20
- package/dist/esm/packages/taco/src/components/Table3/types.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/util/columns.js +0 -60
- package/dist/esm/packages/taco/src/components/Table3/util/columns.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/util/filtering.js +0 -120
- package/dist/esm/packages/taco/src/components/Table3/util/filtering.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/util/scrolling.js +0 -53
- package/dist/esm/packages/taco/src/components/Table3/util/scrolling.js.map +0 -1
- package/dist/esm/packages/taco/src/hooks/useDebouncedEffect.js +0 -15
- package/dist/esm/packages/taco/src/hooks/useDebouncedEffect.js.map +0 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRef.js.map +0 -1
- package/types.json +0 -588211
- /package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Body/EmptyStateBody.js +0 -0
- /package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Body/util.js +0 -0
- /package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Footer/Footer.js +0 -0
- /package/dist/esm/packages/taco/src/{components/Report/components/Row → primitives/Table/Core/components/Row/BuiltIns}/SkeletonRow.js +0 -0
- /package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Toolbar/components/Filters/util.js +0 -0
- /package/dist/esm/packages/taco/src/primitives/Table/{useTableManager → Core}/features/useTableRef.js +0 -0
- /package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/util/rows.js +0 -0
- /package/dist/{components/Report → primitives/Table/Core}/components/Body/util.d.ts +0 -0
- /package/dist/{components/Report → primitives/Table/Core}/components/Footer/Footer.d.ts +0 -0
- /package/dist/{components/Report → primitives/Table/Core}/components/Footer/Summary.d.ts +0 -0
- /package/dist/{components/Report/components/Row → primitives/Table/Core/components/Row/BuiltIns}/SkeletonRow.d.ts +0 -0
- /package/dist/{components/Report → primitives/Table/Core}/components/Toolbar/components/Filters/Filters.d.ts +0 -0
- /package/dist/{components/Report → primitives/Table/Core}/components/Toolbar/components/Filters/ManageFiltersPopover.d.ts +0 -0
- /package/dist/{components/Report/styles → primitives/Table/Core/features}/useStylesheet.d.ts +0 -0
- /package/dist/primitives/Table/{useTableManager → Core}/features/useTableRef.d.ts +0 -0
- /package/dist/{components/Report → primitives/Table/Core}/listeners/useTableRowActiveListener.d.ts +0 -0
- /package/dist/{components/Report → primitives/Table/Core}/util/rows.d.ts +0 -0
@@ -1,95 +0,0 @@
|
|
1
|
-
import React__default from 'react';
|
2
|
-
import { isInternalColumn } from '../../util/columns.js';
|
3
|
-
|
4
|
-
function getFrozenInternalColumnCount(options) {
|
5
|
-
let index = 0;
|
6
|
-
if (options.enableRowDrag) {
|
7
|
-
index++;
|
8
|
-
}
|
9
|
-
if (options.enableRowSelection) {
|
10
|
-
index++;
|
11
|
-
}
|
12
|
-
if (options.enableRowExpansion) {
|
13
|
-
index++;
|
14
|
-
}
|
15
|
-
return index;
|
16
|
-
}
|
17
|
-
/*
|
18
|
-
Because of the desired behaviour of column freezing we use custom state and just an index.
|
19
|
-
If a frozen column is, for example, hidden, then the desired behaviour is that the next available column gets frozen.
|
20
|
-
If this behaviour were different we would just use the native column pinning functionality
|
21
|
-
*/
|
22
|
-
function useColumnFreezing(defaultFrozenIndex, options) {
|
23
|
-
const [frozenColumnIndex, _setFrozenColumnIndex] = React__default.useState(() => defaultFrozenIndex);
|
24
|
-
const [horizontallyScrolled, setHorizontallyScrolled] = React__default.useState(false);
|
25
|
-
const onScroll = event => {
|
26
|
-
if (event.currentTarget.scrollLeft > 0 && !horizontallyScrolled) {
|
27
|
-
setHorizontallyScrolled(true);
|
28
|
-
} else if (event.currentTarget.scrollLeft === 0 && horizontallyScrolled) {
|
29
|
-
setHorizontallyScrolled(false);
|
30
|
-
}
|
31
|
-
};
|
32
|
-
const frozenInternalColumnCount = React__default.useMemo(() => getFrozenInternalColumnCount(options), []);
|
33
|
-
// we must set a value when undefined is explicitly set, otherwise nothing is saved to settings
|
34
|
-
// and the next time the table loads it will fall back to the initial value even though the user changed it
|
35
|
-
const setFrozenColumnIndex = index => _setFrozenColumnIndex(index !== null && index !== void 0 ? index : -1);
|
36
|
-
return {
|
37
|
-
isEnabled: options.enableColumnFreezing,
|
38
|
-
frozenInternalColumnCount,
|
39
|
-
frozenColumnIndex,
|
40
|
-
setFrozenColumnIndex,
|
41
|
-
horizontallyScrolled,
|
42
|
-
handleScroll: onScroll
|
43
|
-
};
|
44
|
-
}
|
45
|
-
function useColumnFreezingStyle(tableId, table) {
|
46
|
-
var _tableMeta$columnFree;
|
47
|
-
const {
|
48
|
-
columnOrder,
|
49
|
-
columnSizing,
|
50
|
-
columnSizingInfo,
|
51
|
-
columnVisibility
|
52
|
-
} = table.getState();
|
53
|
-
const tableMeta = table.options.meta;
|
54
|
-
const frozenColumnIndex =
|
55
|
-
// If column freezing is not enabled then only internal frozen column should be frozen.
|
56
|
-
// @ts-expect-error: fixing type issue while report and table3 TableMeta definitions live in parallel
|
57
|
-
(tableMeta.columnFreezing.isEnabled ? (_tableMeta$columnFree = tableMeta.columnFreezing.frozenColumnIndex) !== null && _tableMeta$columnFree !== void 0 ? _tableMeta$columnFree : -1 : -1) +
|
58
|
-
// @ts-expect-error: fixing type issue while report and table3 TableMeta definitions live in parallel
|
59
|
-
tableMeta.columnFreezing.frozenInternalColumnCount;
|
60
|
-
const style = React__default.useMemo(() => {
|
61
|
-
if (
|
62
|
-
// @ts-expect-error: fixing type issue while report and table3 TableMeta definitions live in parallel
|
63
|
-
tableMeta.columnFreezing.frozenInternalColumnCount > 0 || tableMeta.columnFreezing.isEnabled && frozenColumnIndex !== undefined) {
|
64
|
-
var _visibleFrozenColumns;
|
65
|
-
const visibleFrozenColumns = table.getVisibleLeafColumns().slice(0, frozenColumnIndex + 1);
|
66
|
-
const visibleExternalFrozenColumns = visibleFrozenColumns.filter(column => !isInternalColumn(column.id));
|
67
|
-
// if all external frozen columns haven't had their size set yet, then abort
|
68
|
-
if (visibleExternalFrozenColumns.length && visibleExternalFrozenColumns.every(column => columnSizing[column.id] === undefined)) {
|
69
|
-
return undefined;
|
70
|
-
}
|
71
|
-
const styles = [visibleFrozenColumns.map((column, index) => `#${tableId} [role="row"] > :nth-child(${index + 1}) { left: ${column.getStart()}px }`).join('\n'), `#${tableId} [role="row"] > :not(:nth-child(n+${frozenColumnIndex + 2})) {
|
72
|
-
position: sticky;
|
73
|
-
z-index: 20;
|
74
|
-
}`, `#${tableId}[data-horizontally-scrolled="true"] [role="row"] > :nth-child(${frozenColumnIndex + 1}) {
|
75
|
-
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), 6px 0px 6px rgb(0 0 0/8%), 1px 0px 0px #DDDDDD;
|
76
|
-
}`];
|
77
|
-
const columnId = (_visibleFrozenColumns = visibleFrozenColumns[frozenColumnIndex]) === null || _visibleFrozenColumns === void 0 ? void 0 : _visibleFrozenColumns.id;
|
78
|
-
// frozenColumnIndex could not be in the visible frozen column so it is important to check if columnId
|
79
|
-
// exists before checking if it is internal.
|
80
|
-
//
|
81
|
-
// only add a border to the edge column if it isn't an internal column
|
82
|
-
if (columnId && !isInternalColumn(columnId)) {
|
83
|
-
styles.push(`#${tableId}[data-horizontally-scrolled="false"] [role="row"] > :nth-child(${frozenColumnIndex + 1}) {
|
84
|
-
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), 1px 0px 0px #DDDDDD;
|
85
|
-
}`);
|
86
|
-
}
|
87
|
-
return styles.join('\n');
|
88
|
-
}
|
89
|
-
return undefined;
|
90
|
-
}, [columnOrder, columnSizing, columnSizingInfo, columnVisibility, tableMeta.columnFreezing.isEnabled, frozenColumnIndex]);
|
91
|
-
return style;
|
92
|
-
}
|
93
|
-
|
94
|
-
export { getFrozenInternalColumnCount, useColumnFreezing, useColumnFreezingStyle };
|
95
|
-
//# sourceMappingURL=useColumnFreezing.js.map
|
package/dist/esm/packages/taco/src/components/Table3/hooks/features/useColumnFreezing.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useColumnFreezing.js","sources":["../../../../../../../../../src/components/Table3/hooks/features/useColumnFreezing.ts"],"sourcesContent":["import { Table, TableMeta } from '@tanstack/react-table';\nimport React from 'react';\nimport { Table3Options } from '../../types';\nimport { isInternalColumn } from '../../util/columns';\n\nexport function getFrozenInternalColumnCount(options: Table3Options) {\n let index = 0;\n\n if (options.enableRowDrag) {\n index++;\n }\n\n if (options.enableRowSelection) {\n index++;\n }\n\n if (options.enableRowExpansion) {\n index++;\n }\n\n return index;\n}\n\n/*\nBecause of the desired behaviour of column freezing we use custom state and just an index.\nIf a frozen column is, for example, hidden, then the desired behaviour is that the next available column gets frozen.\nIf this behaviour were different we would just use the native column pinning functionality\n*/\nexport function useColumnFreezing(defaultFrozenIndex: number | undefined, options: Table3Options) {\n const [frozenColumnIndex, _setFrozenColumnIndex] = React.useState<number | undefined>(() => defaultFrozenIndex);\n const [horizontallyScrolled, setHorizontallyScrolled] = React.useState(false);\n\n const onScroll = (event: React.MouseEvent<HTMLDivElement>) => {\n if (event.currentTarget.scrollLeft > 0 && !horizontallyScrolled) {\n setHorizontallyScrolled(true);\n } else if (event.currentTarget.scrollLeft === 0 && horizontallyScrolled) {\n setHorizontallyScrolled(false);\n }\n };\n\n const frozenInternalColumnCount = React.useMemo(() => getFrozenInternalColumnCount(options), []);\n\n // we must set a value when undefined is explicitly set, otherwise nothing is saved to settings\n // and the next time the table loads it will fall back to the initial value even though the user changed it\n const setFrozenColumnIndex = (index: number | undefined) => _setFrozenColumnIndex(index ?? -1);\n\n return {\n isEnabled: options.enableColumnFreezing,\n frozenInternalColumnCount,\n frozenColumnIndex,\n setFrozenColumnIndex,\n horizontallyScrolled,\n handleScroll: onScroll,\n };\n}\n\nexport function useColumnFreezingStyle<TType = unknown>(tableId: string, table: Table<TType>) {\n const { columnOrder, columnSizing, columnSizingInfo, columnVisibility } = table.getState();\n const tableMeta = table.options.meta as TableMeta<TType>;\n const frozenColumnIndex =\n // If column freezing is not enabled then only internal frozen column should be frozen.\n // @ts-expect-error: fixing type issue while report and table3 TableMeta definitions live in parallel\n (tableMeta.columnFreezing.isEnabled ? tableMeta.columnFreezing.frozenColumnIndex ?? -1 : -1) +\n // @ts-expect-error: fixing type issue while report and table3 TableMeta definitions live in parallel\n tableMeta.columnFreezing.frozenInternalColumnCount;\n\n const style = React.useMemo(() => {\n if (\n // @ts-expect-error: fixing type issue while report and table3 TableMeta definitions live in parallel\n tableMeta.columnFreezing.frozenInternalColumnCount > 0 ||\n (tableMeta.columnFreezing.isEnabled && frozenColumnIndex !== undefined)\n ) {\n const visibleFrozenColumns = table.getVisibleLeafColumns().slice(0, frozenColumnIndex + 1);\n\n const visibleExternalFrozenColumns = visibleFrozenColumns.filter(column => !isInternalColumn(column.id));\n\n // if all external frozen columns haven't had their size set yet, then abort\n if (\n visibleExternalFrozenColumns.length &&\n visibleExternalFrozenColumns.every(column => columnSizing[column.id] === undefined)\n ) {\n return undefined;\n }\n\n const styles = [\n visibleFrozenColumns\n .map(\n (column, index) => `#${tableId} [role=\"row\"] > :nth-child(${index + 1}) { left: ${column.getStart()}px }`\n )\n .join('\\n'),\n `#${tableId} [role=\"row\"] > :not(:nth-child(n+${frozenColumnIndex + 2})) {\n position: sticky;\n z-index: 20;\n }`,\n `#${tableId}[data-horizontally-scrolled=\"true\"] [role=\"row\"] > :nth-child(${frozenColumnIndex + 1}) {\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), 6px 0px 6px rgb(0 0 0/8%), 1px 0px 0px #DDDDDD;\n }`,\n ];\n\n const columnId = visibleFrozenColumns[frozenColumnIndex]?.id;\n\n // frozenColumnIndex could not be in the visible frozen column so it is important to check if columnId\n // exists before checking if it is internal.\n //\n // only add a border to the edge column if it isn't an internal column\n if (columnId && !isInternalColumn(columnId)) {\n styles.push(`#${tableId}[data-horizontally-scrolled=\"false\"] [role=\"row\"] > :nth-child(${frozenColumnIndex + 1}) {\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), 1px 0px 0px #DDDDDD;\n }`);\n }\n\n return styles.join('\\n');\n }\n\n return undefined;\n }, [columnOrder, columnSizing, columnSizingInfo, columnVisibility, tableMeta.columnFreezing.isEnabled, frozenColumnIndex]);\n\n return style;\n}\n"],"names":["getFrozenInternalColumnCount","options","index","enableRowDrag","enableRowSelection","enableRowExpansion","useColumnFreezing","defaultFrozenIndex","frozenColumnIndex","_setFrozenColumnIndex","React","useState","horizontallyScrolled","setHorizontallyScrolled","onScroll","event","currentTarget","scrollLeft","frozenInternalColumnCount","useMemo","setFrozenColumnIndex","isEnabled","enableColumnFreezing","handleScroll","useColumnFreezingStyle","tableId","table","columnOrder","columnSizing","columnSizingInfo","columnVisibility","getState","tableMeta","meta","columnFreezing","_tableMeta$columnFree","style","undefined","_visibleFrozenColumns","visibleFrozenColumns","getVisibleLeafColumns","slice","visibleExternalFrozenColumns","filter","column","isInternalColumn","id","length","every","styles","map","getStart","join","columnId","push"],"mappings":";;;SAKgBA,4BAA4BA,CAACC,OAAsB;EAC/D,IAAIC,KAAK,GAAG,CAAC;EAEb,IAAID,OAAO,CAACE,aAAa,EAAE;IACvBD,KAAK,EAAE;;EAGX,IAAID,OAAO,CAACG,kBAAkB,EAAE;IAC5BF,KAAK,EAAE;;EAGX,IAAID,OAAO,CAACI,kBAAkB,EAAE;IAC5BH,KAAK,EAAE;;EAGX,OAAOA,KAAK;AAChB;AAEA;;;;;SAKgBI,iBAAiBA,CAACC,kBAAsC,EAAEN,OAAsB;EAC5F,MAAM,CAACO,iBAAiB,EAAEC,qBAAqB,CAAC,GAAGC,cAAK,CAACC,QAAQ,CAAqB,MAAMJ,kBAAkB,CAAC;EAC/G,MAAM,CAACK,oBAAoB,EAAEC,uBAAuB,CAAC,GAAGH,cAAK,CAACC,QAAQ,CAAC,KAAK,CAAC;EAE7E,MAAMG,QAAQ,GAAIC,KAAuC;IACrD,IAAIA,KAAK,CAACC,aAAa,CAACC,UAAU,GAAG,CAAC,IAAI,CAACL,oBAAoB,EAAE;MAC7DC,uBAAuB,CAAC,IAAI,CAAC;KAChC,MAAM,IAAIE,KAAK,CAACC,aAAa,CAACC,UAAU,KAAK,CAAC,IAAIL,oBAAoB,EAAE;MACrEC,uBAAuB,CAAC,KAAK,CAAC;;GAErC;EAED,MAAMK,yBAAyB,GAAGR,cAAK,CAACS,OAAO,CAAC,MAAMnB,4BAA4B,CAACC,OAAO,CAAC,EAAE,EAAE,CAAC;;;EAIhG,MAAMmB,oBAAoB,GAAIlB,KAAyB,IAAKO,qBAAqB,CAACP,KAAK,aAALA,KAAK,cAALA,KAAK,GAAI,CAAC,CAAC,CAAC;EA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ACXV,oBAAoB,CACfW,GAAG,CACA,CAACN,MAAM,EAAE1C,KAAK,SAASuB,qCAAqCvB,KAAK,GAAG,cAAc0C,MAAM,CAACO,QAAQ,QAAQ,CAC5G,CACAC,IAAI,CAAC,IAAI,CAAC,MACX3B,4CAA4CjB,iBAAiB,GAAG;;;kBAGlE,MACEiB,wEAAwEjB,iBAAiB,GAAG;;kBAE9F,CACL;MAED,MAAM6C,QAAQ,IAAAf,qBAAA,GAAGC,oBAAoB,CAAC/B,iBAAiB,CAAC,cAAA8B,qBAAA,uBAAvCA,qBAAA,CAAyCQ,EAAE;;;;;MAM5D,IAAIO,QAAQ,IAAI,CAACR,gBAAgB,CAACQ,QAAQ,CAAC,EAAE;QACzCJ,MAAM,CAACK,IAAI,KAAK7B,yEAAyEjB,iBAAiB,GAAG;;kBAE3G,CAAC;;MAGP,OAAOyC,MAAM,CAACG,IAAI,CAAC,IAAI,CAAC;;IAG5B,OAAOf,SAAS;GACnB,EAAE,CAACV,WAAW,EAAEC,YAAY,EAAEC,gBAAgB,EAAEC,gBAAgB,EAAEE,SAAS,CAACE,cAAc,CAACb,SAAS,EAAEb,iBAAiB,CAAC,CAAC;EAE1H,OAAO4B,KAAK;AAChB;;;;"}
|
@@ -1,299 +0,0 @@
|
|
1
|
-
import React__default from 'react';
|
2
|
-
import { isElementInsideOrTriggeredFromContainer } from '../../../../utils/dom.js';
|
3
|
-
import { shouldTriggerShortcut } from '../../../../utils/keyboard.js';
|
4
|
-
import _ from 'lodash-es';
|
5
|
-
import { lastCellIndex } from '../../components/rows/Row.js';
|
6
|
-
|
7
|
-
var SavingStatusValue;
|
8
|
-
(function (SavingStatusValue) {
|
9
|
-
SavingStatusValue["Saving"] = "saving";
|
10
|
-
SavingStatusValue["Saved"] = "saved";
|
11
|
-
SavingStatusValue["Error"] = "error";
|
12
|
-
})(SavingStatusValue || (SavingStatusValue = {}));
|
13
|
-
function useEditing(isEnabled, tableRef, validation, onSave) {
|
14
|
-
// used to switch the table into editing mode
|
15
|
-
const [isEditing, setIsEditing] = React__default.useState(false);
|
16
|
-
// Saving indicator need to show saving status per row, saving status can have at least two states 'saving', 'saved',
|
17
|
-
// 'saved' should remain for a few seconds to show tick icon after row has been saved.
|
18
|
-
const [savingStatuses, dispatchSavingStatusAction] = React__default.useReducer(savingStatusesReducer, null);
|
19
|
-
// sets of row changes pending save, either they have not saved yet or they have errors
|
20
|
-
const [editingState, dispatchEditingAction] = React__default.useReducer((state, action) => editingReducer(state, action), null);
|
21
|
-
const [detailModeEditing, setDetailModeEditing] = React__default.useState(false);
|
22
|
-
function getCellValue(cell) {
|
23
|
-
var _editingState$cell$ro;
|
24
|
-
return editingState ? (_editingState$cell$ro = editingState[cell.row.id]) === null || _editingState$cell$ro === void 0 ? void 0 : _editingState$cell$ro[cell.column.id] : undefined;
|
25
|
-
}
|
26
|
-
// Saves editing cell value into editing state.
|
27
|
-
function setCellValue(cell, value) {
|
28
|
-
dispatchEditingAction({
|
29
|
-
type: EditingActionType.SET_CELL_VALUE,
|
30
|
-
payload: {
|
31
|
-
rowId: cell.row.id,
|
32
|
-
cellId: cell.column.id,
|
33
|
-
value,
|
34
|
-
originalValues: cell.row.original
|
35
|
-
}
|
36
|
-
});
|
37
|
-
}
|
38
|
-
// Removes changes from editing state by row id
|
39
|
-
function resetChange(rowId) {
|
40
|
-
dispatchEditingAction({
|
41
|
-
type: EditingActionType.RESET_CHANGE,
|
42
|
-
payload: {
|
43
|
-
rowId
|
44
|
-
}
|
45
|
-
});
|
46
|
-
validation.resetErrors(rowId);
|
47
|
-
}
|
48
|
-
const handleKeyDown = React__default.useCallback(event => {
|
49
|
-
if (event.defaultPrevented) {
|
50
|
-
return;
|
51
|
-
}
|
52
|
-
if (shouldTriggerShortcut(event, {
|
53
|
-
key: 'e',
|
54
|
-
meta: true,
|
55
|
-
shift: false
|
56
|
-
})) {
|
57
|
-
setIsEditing(editing => !editing);
|
58
|
-
} else if (shouldTriggerShortcut(event, {
|
59
|
-
key: 's',
|
60
|
-
meta: true,
|
61
|
-
shift: false
|
62
|
-
})) {
|
63
|
-
// Prevent default browser save
|
64
|
-
event.preventDefault();
|
65
|
-
saveChangesIfNeeded();
|
66
|
-
}
|
67
|
-
}, [isEditing]);
|
68
|
-
const handleBlur = React__default.useCallback(event => {
|
69
|
-
if (event.target === event.currentTarget) {
|
70
|
-
saveChangesIfNeeded();
|
71
|
-
}
|
72
|
-
}, []);
|
73
|
-
// Creates initial saving statuses from changes object
|
74
|
-
const addSavingStatuses = () => {
|
75
|
-
const changeset = Object.keys(editingState || {});
|
76
|
-
const additionalSavingStatuses = _.reduce(changeset, (result, rowId) => {
|
77
|
-
return {
|
78
|
-
...result,
|
79
|
-
[rowId]: SavingStatusValue.Saving
|
80
|
-
};
|
81
|
-
}, {});
|
82
|
-
dispatchSavingStatusAction({
|
83
|
-
type: SavingStatusActionType.SET_SAVING_STATUSES,
|
84
|
-
payload: {
|
85
|
-
states: additionalSavingStatuses
|
86
|
-
}
|
87
|
-
});
|
88
|
-
};
|
89
|
-
// Resets/removes saving status by row id. Used in delayed saving indicator.
|
90
|
-
const resetSavingStatus = rowId => {
|
91
|
-
dispatchSavingStatusAction({
|
92
|
-
type: SavingStatusActionType.RESET_SAVING_STATUS,
|
93
|
-
payload: {
|
94
|
-
rowId
|
95
|
-
}
|
96
|
-
});
|
97
|
-
};
|
98
|
-
// Checks if we have changes, then saves them
|
99
|
-
const saveChangesIfNeeded = function () {
|
100
|
-
try {
|
101
|
-
if (!editingState) {
|
102
|
-
return Promise.resolve();
|
103
|
-
}
|
104
|
-
const changeset = Object.keys(editingState);
|
105
|
-
const _temp = function () {
|
106
|
-
if (onSave && changeset.length) {
|
107
|
-
addSavingStatuses();
|
108
|
-
return Promise.resolve(Promise.allSettled(changeset.map(rowId => {
|
109
|
-
const validationSavePromise = new Promise((resolve, reject) => {
|
110
|
-
const changedRow = editingState === null || editingState === void 0 ? void 0 : editingState[rowId];
|
111
|
-
if (changedRow) {
|
112
|
-
var _validation$validate;
|
113
|
-
(_validation$validate = validation.validate(rowId, changedRow)) === null || _validation$validate === void 0 ? void 0 : _validation$validate.then(() => {
|
114
|
-
const savePromise = onSave(changedRow);
|
115
|
-
savePromise.then(() => {
|
116
|
-
resolve();
|
117
|
-
}).catch(reason => {
|
118
|
-
if (reason.errors) {
|
119
|
-
validation.setRowErrors(rowId, reason.errors);
|
120
|
-
}
|
121
|
-
reject(reason);
|
122
|
-
});
|
123
|
-
}).catch(() => {
|
124
|
-
validation.confirmErrors(rowId);
|
125
|
-
dispatchSavingStatusAction({
|
126
|
-
type: SavingStatusActionType.SET_SAVING_STATUS,
|
127
|
-
payload: {
|
128
|
-
rowId,
|
129
|
-
state: SavingStatusValue.Error
|
130
|
-
}
|
131
|
-
});
|
132
|
-
reject();
|
133
|
-
});
|
134
|
-
} else {
|
135
|
-
reject();
|
136
|
-
}
|
137
|
-
});
|
138
|
-
return validationSavePromise;
|
139
|
-
}))).then(function (responses) {
|
140
|
-
responses.forEach((response, index) => {
|
141
|
-
const rowId = changeset[index];
|
142
|
-
if (response.status === 'fulfilled') {
|
143
|
-
resetChange(rowId);
|
144
|
-
dispatchSavingStatusAction({
|
145
|
-
type: SavingStatusActionType.SET_SAVING_STATUS,
|
146
|
-
payload: {
|
147
|
-
rowId,
|
148
|
-
state: SavingStatusValue.Saved
|
149
|
-
}
|
150
|
-
});
|
151
|
-
} else {
|
152
|
-
dispatchSavingStatusAction({
|
153
|
-
type: SavingStatusActionType.SET_SAVING_STATUS,
|
154
|
-
payload: {
|
155
|
-
rowId,
|
156
|
-
state: SavingStatusValue.Error
|
157
|
-
}
|
158
|
-
});
|
159
|
-
}
|
160
|
-
});
|
161
|
-
});
|
162
|
-
}
|
163
|
-
}();
|
164
|
-
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
165
|
-
} catch (e) {
|
166
|
-
return Promise.reject(e);
|
167
|
-
}
|
168
|
-
};
|
169
|
-
const [rowMoveReason, setRowMoveReason] = React__default.useState(null);
|
170
|
-
const removeRowMoveReason = () => {
|
171
|
-
setRowMoveReason(null);
|
172
|
-
};
|
173
|
-
const showWarning = React__default.useCallback(event => {
|
174
|
-
if (isEditing && editingState && Object.keys(editingState).length > 0) {
|
175
|
-
event.returnValue = true;
|
176
|
-
return true;
|
177
|
-
}
|
178
|
-
return false;
|
179
|
-
}, [isEditing, editingState]);
|
180
|
-
React__default.useEffect(() => {
|
181
|
-
const handleClickOutside = event => {
|
182
|
-
const target = event.target;
|
183
|
-
const closestPopup = target.closest('[role="dialog"], [role="menu"]');
|
184
|
-
// Need to check that neither target itself nor closest popup is inside or triggetred from the table.
|
185
|
-
if (!isElementInsideOrTriggeredFromContainer(target, tableRef.current) && !isElementInsideOrTriggeredFromContainer(closestPopup, tableRef.current)) {
|
186
|
-
saveChangesIfNeeded();
|
187
|
-
}
|
188
|
-
};
|
189
|
-
document.addEventListener('click', handleClickOutside);
|
190
|
-
return () => {
|
191
|
-
document.removeEventListener('click', handleClickOutside);
|
192
|
-
};
|
193
|
-
}, [saveChangesIfNeeded]);
|
194
|
-
function getSavingStatus(rowId) {
|
195
|
-
return savingStatuses && savingStatuses[rowId];
|
196
|
-
}
|
197
|
-
React__default.useEffect(() => {
|
198
|
-
window.addEventListener('beforeunload', showWarning);
|
199
|
-
return () => {
|
200
|
-
window.removeEventListener('beforeunload', showWarning);
|
201
|
-
};
|
202
|
-
}, [showWarning]);
|
203
|
-
React__default.useEffect(() => {
|
204
|
-
if (!isEditing) {
|
205
|
-
setDetailModeEditing(false);
|
206
|
-
lastCellIndex.value = null;
|
207
|
-
}
|
208
|
-
}, [isEditing]);
|
209
|
-
return {
|
210
|
-
isEnabled,
|
211
|
-
isEditing,
|
212
|
-
toggleEditing: setIsEditing,
|
213
|
-
changes: editingState,
|
214
|
-
getCellValue,
|
215
|
-
setCellValue,
|
216
|
-
saveChangesIfNeeded,
|
217
|
-
detailModeEditing,
|
218
|
-
setDetailModeEditing,
|
219
|
-
rowMoveReason,
|
220
|
-
setRowMoveReason,
|
221
|
-
removeRowMoveReason,
|
222
|
-
handleKeyDown,
|
223
|
-
handleBlur,
|
224
|
-
resetChange,
|
225
|
-
getSavingStatus,
|
226
|
-
resetSavingStatus
|
227
|
-
};
|
228
|
-
}
|
229
|
-
var EditingActionType;
|
230
|
-
(function (EditingActionType) {
|
231
|
-
EditingActionType[EditingActionType["SET_CELL_VALUE"] = 0] = "SET_CELL_VALUE";
|
232
|
-
EditingActionType[EditingActionType["RESET_CHANGE"] = 1] = "RESET_CHANGE";
|
233
|
-
})(EditingActionType || (EditingActionType = {}));
|
234
|
-
function editingReducer(state, action) {
|
235
|
-
switch (action.type) {
|
236
|
-
// Set cell value of the row
|
237
|
-
case EditingActionType.SET_CELL_VALUE:
|
238
|
-
return {
|
239
|
-
...state,
|
240
|
-
[action.payload.rowId]: {
|
241
|
-
...((state === null || state === void 0 ? void 0 : state[action.payload.rowId]) || action.payload.originalValues),
|
242
|
-
[action.payload.cellId]: action.payload.value
|
243
|
-
}
|
244
|
-
};
|
245
|
-
// Reset changes for the row
|
246
|
-
case EditingActionType.RESET_CHANGE:
|
247
|
-
{
|
248
|
-
let currentChanges = {
|
249
|
-
...state
|
250
|
-
};
|
251
|
-
if (currentChanges) {
|
252
|
-
delete currentChanges[action.payload.rowId];
|
253
|
-
}
|
254
|
-
const changeset = Object.keys(currentChanges);
|
255
|
-
if (changeset.length === 0) {
|
256
|
-
currentChanges = null;
|
257
|
-
}
|
258
|
-
return currentChanges;
|
259
|
-
}
|
260
|
-
default:
|
261
|
-
return state;
|
262
|
-
}
|
263
|
-
}
|
264
|
-
var SavingStatusActionType;
|
265
|
-
(function (SavingStatusActionType) {
|
266
|
-
SavingStatusActionType[SavingStatusActionType["SET_SAVING_STATUS"] = 0] = "SET_SAVING_STATUS";
|
267
|
-
SavingStatusActionType[SavingStatusActionType["SET_SAVING_STATUSES"] = 1] = "SET_SAVING_STATUSES";
|
268
|
-
SavingStatusActionType[SavingStatusActionType["RESET_SAVING_STATUS"] = 2] = "RESET_SAVING_STATUS";
|
269
|
-
})(SavingStatusActionType || (SavingStatusActionType = {}));
|
270
|
-
function savingStatusesReducer(state, action) {
|
271
|
-
switch (action.type) {
|
272
|
-
// Set single saving status for the row
|
273
|
-
case SavingStatusActionType.SET_SAVING_STATUS:
|
274
|
-
return {
|
275
|
-
...state,
|
276
|
-
[action.payload.rowId]: action.payload.state
|
277
|
-
};
|
278
|
-
// Set multiple saving statuses for multiple rows at the same time
|
279
|
-
case SavingStatusActionType.SET_SAVING_STATUSES:
|
280
|
-
return {
|
281
|
-
...state,
|
282
|
-
...action.payload.states
|
283
|
-
};
|
284
|
-
// Reset/remove saving status for particular row
|
285
|
-
case SavingStatusActionType.RESET_SAVING_STATUS:
|
286
|
-
{
|
287
|
-
const newSavingStatus = {
|
288
|
-
...state
|
289
|
-
};
|
290
|
-
newSavingStatus === null || newSavingStatus === void 0 ? true : delete newSavingStatus[action.payload.rowId];
|
291
|
-
return newSavingStatus;
|
292
|
-
}
|
293
|
-
default:
|
294
|
-
return state;
|
295
|
-
}
|
296
|
-
}
|
297
|
-
|
298
|
-
export { SavingStatusValue, useEditing };
|
299
|
-
//# sourceMappingURL=useEditing.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useEditing.js","sources":["../../../../../../../../../src/components/Table3/hooks/features/useEditing.tsx"],"sourcesContent":["import React from 'react';\nimport _ from 'lodash';\nimport { Cell as RTCell } from '@tanstack/react-table';\n\nimport { Table3Ref, Table3SaveHandler } from '../../types';\nimport { IndicatorReason } from '../../components/columns/cell/Indicator';\nimport { shouldTriggerShortcut } from '../../../../utils/keyboard';\nimport { Table3Validation } from './useValidation';\nimport { lastCellIndex } from '../../components/rows/Row';\nimport { isElementInsideOrTriggeredFromContainer } from '../../../../utils/dom';\n\nexport enum SavingStatusValue {\n Saving = 'saving',\n Saved = 'saved',\n Error = 'error',\n}\n\nexport function useEditing<TType = unknown>(\n isEnabled: boolean,\n tableRef: React.RefObject<Table3Ref>,\n validation: Table3Validation<TType>,\n onSave?: Table3SaveHandler<TType>\n) {\n // used to switch the table into editing mode\n const [isEditing, setIsEditing] = React.useState(false);\n // Saving indicator need to show saving status per row, saving status can have at least two states 'saving', 'saved',\n // 'saved' should remain for a few seconds to show tick icon after row has been saved.\n const [savingStatuses, dispatchSavingStatusAction] = React.useReducer(savingStatusesReducer, null);\n\n // sets of row changes pending save, either they have not saved yet or they have errors\n const [editingState, dispatchEditingAction] = React.useReducer(\n (state: EditingState<TType>, action) => editingReducer<TType>(state, action),\n null\n );\n\n const [detailModeEditing, setDetailModeEditing] = React.useState(false);\n\n function getCellValue<T extends TType>(cell: RTCell<T, unknown>) {\n return editingState ? editingState[cell.row.id]?.[cell.column.id] : undefined;\n }\n\n // Saves editing cell value into editing state.\n function setCellValue<T extends TType>(cell: RTCell<T, unknown>, value: unknown) {\n dispatchEditingAction({\n type: EditingActionType.SET_CELL_VALUE,\n payload: { rowId: cell.row.id, cellId: cell.column.id, value, originalValues: cell.row.original },\n });\n }\n\n // Removes changes from editing state by row id\n function resetChange(rowId: string) {\n dispatchEditingAction({\n type: EditingActionType.RESET_CHANGE,\n payload: { rowId },\n });\n validation.resetErrors(rowId);\n }\n\n const handleKeyDown = React.useCallback(\n (event: KeyboardEvent) => {\n if (event.defaultPrevented) {\n return;\n }\n\n if (shouldTriggerShortcut(event, { key: 'e', meta: true, shift: false })) {\n setIsEditing(editing => !editing);\n } else if (shouldTriggerShortcut(event, { key: 's', meta: true, shift: false })) {\n // Prevent default browser save\n event.preventDefault();\n saveChangesIfNeeded();\n }\n },\n [isEditing]\n );\n\n const handleBlur = React.useCallback((event: React.FocusEvent) => {\n if (event.target === event.currentTarget) {\n saveChangesIfNeeded();\n }\n }, []);\n\n // Creates initial saving statuses from changes object\n const addSavingStatuses = () => {\n const changeset = Object.keys(editingState || {});\n const additionalSavingStatuses = _.reduce(\n changeset,\n (result, rowId) => {\n return { ...result, [rowId]: SavingStatusValue.Saving };\n },\n {}\n );\n dispatchSavingStatusAction({\n type: SavingStatusActionType.SET_SAVING_STATUSES,\n payload: { states: additionalSavingStatuses },\n });\n };\n\n // Resets/removes saving status by row id. Used in delayed saving indicator.\n const resetSavingStatus = (rowId: string) => {\n dispatchSavingStatusAction({\n type: SavingStatusActionType.RESET_SAVING_STATUS,\n payload: { rowId },\n });\n };\n\n // Checks if we have changes, then saves them\n const saveChangesIfNeeded = async () => {\n if (!editingState) {\n return;\n }\n\n const changeset = Object.keys(editingState);\n if (onSave && changeset.length) {\n addSavingStatuses();\n\n const responses = await Promise.allSettled(\n changeset.map(rowId => {\n const validationSavePromise = new Promise<void>((resolve, reject) => {\n const changedRow = editingState?.[rowId];\n if (changedRow) {\n validation\n .validate(rowId, changedRow)\n ?.then(() => {\n const savePromise = onSave(changedRow);\n savePromise\n .then(() => {\n resolve();\n })\n .catch(reason => {\n if (reason.errors) {\n validation.setRowErrors(rowId, reason.errors);\n }\n\n reject(reason);\n });\n })\n .catch(() => {\n validation.confirmErrors(rowId);\n dispatchSavingStatusAction({\n type: SavingStatusActionType.SET_SAVING_STATUS,\n payload: { rowId, state: SavingStatusValue.Error },\n });\n reject();\n });\n } else {\n reject();\n }\n });\n return validationSavePromise;\n })\n );\n\n responses.forEach((response, index) => {\n const rowId = changeset[index];\n\n if (response.status === 'fulfilled') {\n resetChange(rowId);\n dispatchSavingStatusAction({\n type: SavingStatusActionType.SET_SAVING_STATUS,\n payload: { rowId, state: SavingStatusValue.Saved },\n });\n } else {\n dispatchSavingStatusAction({\n type: SavingStatusActionType.SET_SAVING_STATUS,\n payload: { rowId, state: SavingStatusValue.Error },\n });\n }\n });\n }\n };\n\n const [rowMoveReason, setRowMoveReason] = React.useState<Record<string, IndicatorReason | null> | null>(null);\n\n const removeRowMoveReason = () => {\n setRowMoveReason(null);\n };\n\n const showWarning = React.useCallback(\n event => {\n if (isEditing && editingState && Object.keys(editingState).length > 0) {\n event.returnValue = true;\n return true;\n }\n\n return false;\n },\n [isEditing, editingState]\n );\n\n React.useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n const target = event.target as HTMLElement;\n const closestPopup = target.closest('[role=\"dialog\"], [role=\"menu\"]');\n\n // Need to check that neither target itself nor closest popup is inside or triggetred from the table.\n if (\n !isElementInsideOrTriggeredFromContainer(target, tableRef.current) &&\n !isElementInsideOrTriggeredFromContainer(closestPopup, tableRef.current)\n ) {\n saveChangesIfNeeded();\n }\n };\n\n document.addEventListener('click', handleClickOutside);\n\n return () => {\n document.removeEventListener('click', handleClickOutside);\n };\n }, [saveChangesIfNeeded]);\n\n function getSavingStatus(rowId: string) {\n return savingStatuses && savingStatuses[rowId];\n }\n\n React.useEffect(() => {\n window.addEventListener('beforeunload', showWarning);\n\n return () => {\n window.removeEventListener('beforeunload', showWarning);\n };\n }, [showWarning]);\n\n React.useEffect(() => {\n if (!isEditing) {\n setDetailModeEditing(false);\n lastCellIndex.value = null;\n }\n }, [isEditing]);\n\n return {\n isEnabled,\n isEditing,\n toggleEditing: setIsEditing,\n changes: editingState,\n getCellValue,\n setCellValue,\n saveChangesIfNeeded,\n detailModeEditing,\n setDetailModeEditing,\n rowMoveReason,\n setRowMoveReason,\n removeRowMoveReason,\n handleKeyDown,\n handleBlur,\n resetChange,\n getSavingStatus,\n resetSavingStatus,\n };\n}\n\nenum EditingActionType {\n SET_CELL_VALUE,\n RESET_CHANGE,\n}\n\ntype EditingState<TType = unknown> = Record<string, TType> | null;\n\ntype EditingAction =\n | { type: EditingActionType.SET_CELL_VALUE; payload: { rowId: string; cellId: string; value: unknown; originalValues } }\n | {\n type: EditingActionType.RESET_CHANGE;\n payload: { rowId: string };\n };\n\nfunction editingReducer<TType = unknown>(state: EditingState<TType>, action: EditingAction): EditingState<TType> {\n switch (action.type) {\n // Set cell value of the row\n case EditingActionType.SET_CELL_VALUE:\n return {\n ...state,\n [action.payload.rowId]: {\n ...(state?.[action.payload.rowId] || action.payload.originalValues),\n [action.payload.cellId]: action.payload.value,\n },\n };\n\n // Reset changes for the row\n case EditingActionType.RESET_CHANGE: {\n let currentChanges: Record<string, TType> | null = { ...state };\n if (currentChanges) {\n delete currentChanges[action.payload.rowId];\n }\n const changeset = Object.keys(currentChanges);\n if (changeset.length === 0) {\n currentChanges = null;\n }\n return currentChanges;\n }\n\n default:\n return state;\n }\n}\n\nenum SavingStatusActionType {\n SET_SAVING_STATUS,\n SET_SAVING_STATUSES,\n RESET_SAVING_STATUS,\n}\n\ntype SavingStatus = Record<string, SavingStatusValue> | null;\n\ntype SavingStatusAction =\n | { type: SavingStatusActionType.SET_SAVING_STATUS; payload: { rowId: string; state: SavingStatusValue } }\n | { type: SavingStatusActionType.SET_SAVING_STATUSES; payload: { states: Record<string, SavingStatusValue> } }\n | { type: SavingStatusActionType.RESET_SAVING_STATUS; payload: { rowId: string } };\n\nfunction savingStatusesReducer(state: SavingStatus, action: SavingStatusAction): SavingStatus {\n switch (action.type) {\n // Set single saving status for the row\n case SavingStatusActionType.SET_SAVING_STATUS:\n return {\n ...state,\n [action.payload.rowId]: action.payload.state,\n };\n // Set multiple saving statuses for multiple rows at the same time\n case SavingStatusActionType.SET_SAVING_STATUSES:\n return {\n ...state,\n ...action.payload.states,\n };\n // Reset/remove saving status for particular row\n case SavingStatusActionType.RESET_SAVING_STATUS: {\n const newSavingStatus = { ...state };\n delete newSavingStatus?.[action.payload.rowId];\n return newSavingStatus;\n }\n\n default:\n return state;\n }\n}\n"],"names":["SavingStatusValue","useEditing","isEnabled","tableRef","validation","onSave","isEditing","setIsEditing","React","useState","savingStatuses","dispatchSavingStatusAction","useReducer","savingStatusesReducer","editingState","dispatchEditingAction","state","action","editingReducer","detailModeEditing","setDetailModeEditing","getCellValue","cell","_editingState$cell$ro","row","id","column","undefined","setCellValue","value","type","EditingActionType","SET_CELL_VALUE","payload","rowId","cellId","originalValues","original","resetChange","RESET_CHANGE","resetErrors","handleKeyDown","useCallback","event","defaultPrevented","shouldTriggerShortcut","key","meta","shift","editing","preventDefault","saveChangesIfNeeded","handleBlur","target","currentTarget","addSavingStatuses","changeset","Object","keys","additionalSavingStatuses","_","reduce","result","Saving","SavingStatusActionType","SET_SAVING_STATUSES","states","resetSavingStatus","RESET_SAVING_STATUS","Promise","resolve","_temp","length","allSettled","map","validationSavePromise","reject","changedRow","_validation$validate","validate","then","savePromise","catch","reason","errors","setRowErrors","confirmErrors","SET_SAVING_STATUS","Error","responses","forEach","response","index","status","Saved","e","rowMoveReason","setRowMoveReason","removeRowMoveReason","showWarning","returnValue","useEffect","handleClickOutside","closestPopup","closest","isElementInsideOrTriggeredFromContainer","current","document","addEventListener","removeEventListener","getSavingStatus","window","lastCellIndex","toggleEditing","changes","currentChanges","newSavingStatus"],"mappings":";;;;;;IAWYA;AAAZ,WAAYA,iBAAiB;EACzBA,sCAAiB;EACjBA,oCAAe;EACfA,oCAAe;AACnB,CAAC,EAJWA,iBAAiB,KAAjBA,iBAAiB;SAMbC,UAAUA,CACtBC,SAAkB,EAClBC,QAAoC,EACpCC,UAAmC,EACnCC,MAAiC;;EAGjC,MAAM,CAACC,SAAS,EAAEC,YAAY,CAAC,GAAGC,cAAK,CAACC,QAAQ,CAAC,KAAK,CAAC;;;EAGvD,MAAM,CAACC,cAAc,EAAEC,0BAA0B,CAAC,GAAGH,cAAK,CAACI,UAAU,CAACC,qBAAqB,EAAE,IAAI,CAAC;;EAGlG,MAAM,CAACC,YAAY,EAAEC,qBAAqB,CAAC,GAAGP,cAAK,CAACI,UAAU,CAC1D,CAACI,KAA0B,EAAEC,MAAM,KAAKC,cAAc,CAAQF,KAAK,EAAEC,MAAM,CAAC,EAC5E,IAAI,CACP;EAED,MAAM,CAACE,iBAAiB,EAAEC,oBAAoB,CAAC,GAAGZ,cAAK,CAACC,QAAQ,CAAC,KAAK,CAAC;EAEvE,SAASY,YAAYA,CAAkBC,IAAwB;;IAC3D,OAAOR,YAAY,IAAAS,qBAAA,GAAGT,YAAY,CAACQ,IAAI,CAACE,GAAG,CAACC,EAAE,CAAC,cAAAF,qBAA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,24 +0,0 @@
|
|
1
|
-
import React__default from 'react';
|
2
|
-
|
3
|
-
// header height: 40px, border bottom height: 2px;
|
4
|
-
const HEADER_COLUMN_HEIGHT = 42;
|
5
|
-
function getHeaderTopOffset(depth) {
|
6
|
-
return HEADER_COLUMN_HEIGHT * (depth - 1);
|
7
|
-
}
|
8
|
-
function useHeaderOffsetStyle(tableId, table) {
|
9
|
-
const headers = table.getFlatHeaders();
|
10
|
-
const style = React__default.useMemo(() => {
|
11
|
-
// 'new Set' will remove all duplicates and leave only unique values,
|
12
|
-
// in the end we should get only one depht value per array item, example: [1, 2, 3], which we will iterate through later.
|
13
|
-
const headerDepths = [...new Set(headers.map(header => header.depth))];
|
14
|
-
return headerDepths.map(depth => {
|
15
|
-
return `#${tableId} [data-taco="table2-header"] [role="row"]:nth-child(${depth}) [role="columnheader"],
|
16
|
-
#${tableId} [data-taco="table2-header"] [role="row"]:nth-child(${depth}) [data-taco="table3-column-group"]
|
17
|
-
{ top: ${getHeaderTopOffset(depth)}px }`;
|
18
|
-
}).join('\r\n');
|
19
|
-
}, [headers, tableId]);
|
20
|
-
return style;
|
21
|
-
}
|
22
|
-
|
23
|
-
export { getHeaderTopOffset, useHeaderOffsetStyle };
|
24
|
-
//# sourceMappingURL=useHeaderOffsetStyle.js.map
|
package/dist/esm/packages/taco/src/components/Table3/hooks/features/useHeaderOffsetStyle.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useHeaderOffsetStyle.js","sources":["../../../../../../../../../src/components/Table3/hooks/features/useHeaderOffsetStyle.ts"],"sourcesContent":["import { Table } from '@tanstack/react-table';\nimport React from 'react';\n\n// header height: 40px, border bottom height: 2px;\nconst HEADER_COLUMN_HEIGHT = 42;\nexport function getHeaderTopOffset(depth: number) {\n return HEADER_COLUMN_HEIGHT * (depth - 1);\n}\n\nexport function useHeaderOffsetStyle<TType = unknown>(tableId: string, table: Table<TType>) {\n const headers = table.getFlatHeaders();\n\n const style = React.useMemo(() => {\n // 'new Set' will remove all duplicates and leave only unique values,\n // in the end we should get only one depht value per array item, example: [1, 2, 3], which we will iterate through later.\n const headerDepths = [...new Set(headers.map(header => header.depth))];\n return headerDepths\n .map(depth => {\n return `#${tableId} [data-taco=\"table2-header\"] [role=\"row\"]:nth-child(${depth}) [role=\"columnheader\"],\n #${tableId} [data-taco=\"table2-header\"] [role=\"row\"]:nth-child(${depth}) [data-taco=\"table3-column-group\"]\n { top: ${getHeaderTopOffset(depth)}px }`;\n })\n .join('\\r\\n');\n }, [headers, tableId]);\n\n return style;\n}\n"],"names":["HEADER_COLUMN_HEIGHT","getHeaderTopOffset","depth","useHeaderOffsetStyle","tableId","table","headers","getFlatHeaders","style","React","useMemo","headerDepths","Set","map","header","join"],"mappings":";;AAGA;AACA,MAAMA,oBAAoB,GAAG,EAAE;SACfC,kBAAkBA,CAACC,KAAa;EAC5C,OAAOF,oBAAoB,IAAIE,KAAK,GAAG,CAAC,CAAC;AAC7C;SAEgBC,oBAAoBA,CAAkBC,OAAe,EAAEC,KAAmB;EACtF,MAAMC,OAAO,GAAGD,KAAK,CAACE,cAAc,EAAE;EAEtC,MAAMC,KAAK,GAAGC,cAAK,CAACC,OAAO,CAAC;;;IAGxB,MAAMC,YAAY,GAAG,CAAC,GAAG,IAAIC,GAAG,CAACN,OAAO,CAACO,GAAG,CAACC,MAAM,IAAIA,MAAM,CAACZ,KAAK,CAAC,CAAC,CAAC;IACtE,OAAOS,YAAY,CACdE,GAAG,CAACX,KAAK;MACN,WAAWE,8DAA8DF;mBACtEE,8DAA8DF;6BACpDD,kBAAkB,CAACC,KAAK,OAAO;KAC/C,CAAC,CACDa,IAAI,CAAC,MAAM,CAAC;GACpB,EAAE,CAACT,OAAO,EAAEF,OAAO,CAAC,CAAC;EAEtB,OAAOI,KAAK;AAChB;;;;"}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import React__default from 'react';
|
2
|
-
|
3
|
-
function usePauseShortcuts() {
|
4
|
-
const [isShortcutsPaused, setIsShortcutsPaused] = React__default.useState(false);
|
5
|
-
return {
|
6
|
-
isPaused: isShortcutsPaused,
|
7
|
-
pause: setIsShortcutsPaused
|
8
|
-
};
|
9
|
-
}
|
10
|
-
|
11
|
-
export { usePauseShortcuts };
|
12
|
-
//# sourceMappingURL=usePauseShortcuts.js.map
|
package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePauseShortcuts.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"usePauseShortcuts.js","sources":["../../../../../../../../../src/components/Table3/hooks/features/usePauseShortcuts.ts"],"sourcesContent":["import React from 'react';\n\nexport function usePauseShortcuts() {\n const [isShortcutsPaused, setIsShortcutsPaused] = React.useState(false);\n\n return {\n isPaused: isShortcutsPaused,\n pause: setIsShortcutsPaused,\n };\n}\n"],"names":["usePauseShortcuts","isShortcutsPaused","setIsShortcutsPaused","React","useState","isPaused","pause"],"mappings":";;SAEgBA,iBAAiBA;EAC7B,MAAM,CAACC,iBAAiB,EAAEC,oBAAoB,CAAC,GAAGC,cAAK,CAACC,QAAQ,CAAC,KAAK,CAAC;EAEvE,OAAO;IACHC,QAAQ,EAAEJ,iBAAiB;IAC3BK,KAAK,EAAEJ;GACV;AACL;;;;"}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import React__default from 'react';
|
2
|
-
|
3
|
-
function usePrinting(isEnabled = false, defaultIsWarningVisible = true, id) {
|
4
|
-
const [isWarningVisibleForLargeDatasets, setIsWarningVisibleForLargeDatasets] = React__default.useState(defaultIsWarningVisible);
|
5
|
-
return {
|
6
|
-
isEnabled,
|
7
|
-
isPrinting: id.endsWith('_print'),
|
8
|
-
isWarningVisibleForLargeDatasets,
|
9
|
-
setIsWarningVisibleForLargeDatasets: isEnabled ? setIsWarningVisibleForLargeDatasets : () => undefined
|
10
|
-
};
|
11
|
-
}
|
12
|
-
|
13
|
-
export { usePrinting };
|
14
|
-
//# sourceMappingURL=usePrinting.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"usePrinting.js","sources":["../../../../../../../../../src/components/Table3/hooks/features/usePrinting.ts"],"sourcesContent":["import React from 'react';\n\nexport function usePrinting(isEnabled = false, defaultIsWarningVisible = true, id: string) {\n const [isWarningVisibleForLargeDatasets, setIsWarningVisibleForLargeDatasets] = React.useState(defaultIsWarningVisible);\n\n return {\n isEnabled,\n isPrinting: id.endsWith('_print'), // this is a very naive implementation\n isWarningVisibleForLargeDatasets,\n setIsWarningVisibleForLargeDatasets: isEnabled ? setIsWarningVisibleForLargeDatasets : () => undefined,\n };\n}\n"],"names":["usePrinting","isEnabled","defaultIsWarningVisible","id","isWarningVisibleForLargeDatasets","setIsWarningVisibleForLargeDatasets","React","useState","isPrinting","endsWith","undefined"],"mappings":";;SAEgBA,WAAWA,CAACC,SAAS,GAAG,KAAK,EAAEC,uBAAuB,GAAG,IAAI,EAAEC,EAAU;EACrF,MAAM,CAACC,gCAAgC,EAAEC,mCAAmC,CAAC,GAAGC,cAAK,CAACC,QAAQ,CAACL,uBAAuB,CAAC;EAEvH,OAAO;IACHD,SAAS;IACTO,UAAU,EAAEL,EAAE,CAACM,QAAQ,CAAC,QAAQ,CAAC;IACjCL,gCAAgC;IAChCC,mCAAmC,EAAEJ,SAAS,GAAGI,mCAAmC,GAAG,MAAMK;GAChG;AACL;;;;"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useRowActions.js","sources":["../../../../../../../../../src/components/Table3/hooks/features/useRowActions.ts"],"sourcesContent":["import { Table3RowActionRenderer } from '../../types';\n\nconst ACTIONS_ON_ROW_LENGTH = 4;\n\nexport function useRowActions<TType = unknown>(\n actionsForRow?: Table3RowActionRenderer<TType>[],\n actionsForRowLength = ACTIONS_ON_ROW_LENGTH\n) {\n return {\n actionsForRow,\n actionsForRowLength,\n };\n}\n"],"names":["ACTIONS_ON_ROW_LENGTH","useRowActions","actionsForRow","actionsForRowLength"],"mappings":"AAEA,MAAMA,qBAAqB,GAAG,CAAC;SAEfC,aAAaA,CACzBC,aAAgD,EAChDC,mBAAmB,GAAGH,qBAAqB;EAE3C,OAAO;IACHE,aAAa;IACbC;GACH;AACL;;;;"}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import React__default from 'react';
|
2
|
-
|
3
|
-
function useRowDrag(isEnabled) {
|
4
|
-
const [dragging, setDragging] = React__default.useState({});
|
5
|
-
return {
|
6
|
-
isEnabled,
|
7
|
-
dragging,
|
8
|
-
setDragging: isEnabled ? setDragging : () => undefined
|
9
|
-
};
|
10
|
-
}
|
11
|
-
|
12
|
-
export { useRowDrag };
|
13
|
-
//# sourceMappingURL=useRowDrag.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useRowDrag.js","sources":["../../../../../../../../../src/components/Table3/hooks/features/useRowDrag.ts"],"sourcesContent":["import React from 'react';\n\nexport function useRowDrag(isEnabled: boolean) {\n const [dragging, setDragging] = React.useState<Record<string, boolean>>({});\n\n return {\n isEnabled,\n dragging,\n setDragging: isEnabled ? setDragging : () => undefined,\n };\n}\n"],"names":["useRowDrag","isEnabled","dragging","setDragging","React","useState","undefined"],"mappings":";;SAEgBA,UAAUA,CAACC,SAAkB;EACzC,MAAM,CAACC,QAAQ,EAAEC,WAAW,CAAC,GAAGC,cAAK,CAACC,QAAQ,CAA0B,EAAE,CAAC;EAE3E,OAAO;IACHJ,SAAS;IACTC,QAAQ;IACRC,WAAW,EAAEF,SAAS,GAAGE,WAAW,GAAG,MAAMG;GAChD;AACL;;;;"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useRowDrop.js","sources":["../../../../../../../../../src/components/Table3/hooks/features/useRowDrop.ts"],"sourcesContent":["import { Table3RowDropHandler } from '../../types';\n\nexport function useRowDrop(isEnabled: boolean, handler: Table3RowDropHandler | undefined) {\n return {\n isEnabled,\n handleDrop: isEnabled && handler ? handler : () => undefined,\n };\n}\n"],"names":["useRowDrop","isEnabled","handler","handleDrop","undefined"],"mappings":"SAEgBA,UAAUA,CAACC,SAAkB,EAAEC,OAAyC;EACpF,OAAO;IACHD,SAAS;IACTE,UAAU,EAAEF,SAAS,IAAIC,OAAO,GAAGA,OAAO,GAAG,MAAME;GACtD;AACL;;;;"}
|
@@ -1,29 +0,0 @@
|
|
1
|
-
import React__default from 'react';
|
2
|
-
|
3
|
-
function useSearch(isEnabled, excludeUnmatchedResultsInSearch = false) {
|
4
|
-
const [isSearching, setIsSearching] = React__default.useState(false);
|
5
|
-
const [query, setQuery] = React__default.useState();
|
6
|
-
const [enableHighlighting, setEnableHighlighting] = React__default.useState(true);
|
7
|
-
const [excludeUnmatchedResults, setExcludeUnmatchedResults] = React__default.useState(excludeUnmatchedResultsInSearch);
|
8
|
-
// highlighting
|
9
|
-
const [highlightedColumnIndexes, setHighlightedColumnIndexes] = React__default.useState([]);
|
10
|
-
const [currentHighlightColumnIndex, setCurrentHighlightColumnIndex] = React__default.useState(undefined);
|
11
|
-
return {
|
12
|
-
isEnabled,
|
13
|
-
isHighlightingEnabled: enableHighlighting,
|
14
|
-
toggleHighlighting: setEnableHighlighting,
|
15
|
-
excludeUnmatchedResults,
|
16
|
-
toggleExcludeUnmatchedResults: setExcludeUnmatchedResults,
|
17
|
-
query,
|
18
|
-
setQuery: isEnabled ? setQuery : () => undefined,
|
19
|
-
highlightedColumnIndexes,
|
20
|
-
setHighlightedColumnIndexes,
|
21
|
-
currentHighlightColumnIndex,
|
22
|
-
setCurrentHighlightColumnIndex,
|
23
|
-
isSearching,
|
24
|
-
setIsSearching
|
25
|
-
};
|
26
|
-
}
|
27
|
-
|
28
|
-
export { useSearch };
|
29
|
-
//# sourceMappingURL=useSearch.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useSearch.js","sources":["../../../../../../../../../src/components/Table3/hooks/features/useSearch.ts"],"sourcesContent":["import React from 'react';\n\nexport function useSearch(isEnabled: boolean, excludeUnmatchedResultsInSearch = false) {\n const [isSearching, setIsSearching] = React.useState(false);\n const [query, setQuery] = React.useState<string | undefined>();\n const [enableHighlighting, setEnableHighlighting] = React.useState<boolean>(true);\n const [excludeUnmatchedResults, setExcludeUnmatchedResults] = React.useState<boolean>(excludeUnmatchedResultsInSearch);\n\n // highlighting\n const [highlightedColumnIndexes, setHighlightedColumnIndexes] = React.useState<number[][]>([]);\n const [currentHighlightColumnIndex, setCurrentHighlightColumnIndex] = React.useState<number | undefined>(undefined);\n\n return {\n isEnabled,\n isHighlightingEnabled: enableHighlighting,\n toggleHighlighting: setEnableHighlighting,\n excludeUnmatchedResults,\n toggleExcludeUnmatchedResults: setExcludeUnmatchedResults,\n query,\n setQuery: isEnabled ? setQuery : () => undefined,\n highlightedColumnIndexes,\n setHighlightedColumnIndexes,\n currentHighlightColumnIndex,\n setCurrentHighlightColumnIndex,\n isSearching,\n setIsSearching,\n };\n}\n"],"names":["useSearch","isEnabled","excludeUnmatchedResultsInSearch","isSearching","setIsSearching","React","useState","query","setQuery","enableHighlighting","setEnableHighlighting","excludeUnmatchedResults","setExcludeUnmatchedResults","highlightedColumnIndexes","setHighlightedColumnIndexes","currentHighlightColumnIndex","setCurrentHighlightColumnIndex","undefined","isHighlightingEnabled","toggleHighlighting","toggleExcludeUnmatchedResults"],"mappings":";;SAEgBA,SAASA,CAACC,SAAkB,EAAEC,+BAA+B,GAAG,KAAK;EACjF,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAGC,cAAK,CAACC,QAAQ,CAAC,KAAK,CAAC;EAC3D,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGH,cAAK,CAACC,QAAQ,EAAsB;EAC9D,MAAM,CAACG,kBAAkB,EAAEC,qBAAqB,CAAC,GAAGL,cAAK,CAACC,QAAQ,CAAU,IAAI,CAAC;EACjF,MAAM,CAACK,uBAAuB,EAAEC,0BAA0B,CAAC,GAAGP,cAAK,CAACC,QAAQ,CAAUJ,+BAA+B,CAAC;;EAGtH,MAAM,CAACW,wBAAwB,EAAEC,2BAA2B,CAAC,GAAGT,cAAK,CAACC,QAAQ,CAAa,EAAE,CAAC;EAC9F,MAAM,CAACS,2BAA2B,EAAEC,8BAA8B,CAAC,GAAGX,cAAK,CAACC,QAAQ,CAAqBW,SAAS,CAAC;EAEnH,OAAO;IACHhB,SAAS;IACTiB,qBAAqB,EAAET,kBAAkB;IACzCU,kBAAkB,EAAET,qBAAqB;IACzCC,uBAAuB;IACvBS,6BAA6B,EAAER,0BAA0B;IACzDL,KAAK;IACLC,QAAQ,EAAEP,SAAS,GAAGO,QAAQ,GAAG,MAAMS,SAAS;IAChDJ,wBAAwB;IACxBC,2BAA2B;IAC3BC,2BAA2B;IAC3BC,8BAA8B;IAC9Bb,WAAW;IACXC;GACH;AACL;;;;"}
|