@simple-table/solid 3.0.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/core/src/consts/column-constraints.d.ts +58 -0
- package/dist/cjs/core/src/consts/general-consts.d.ts +13 -0
- package/dist/cjs/core/src/core/SimpleTableVanilla.d.ts +71 -0
- package/dist/cjs/core/src/core/api/TableAPIImpl.d.ts +44 -0
- package/dist/cjs/core/src/core/dom/DOMManager.d.ts +50 -0
- package/dist/cjs/core/src/core/initialization/TableInitializer.d.ts +30 -0
- package/dist/cjs/core/src/core/rendering/RenderOrchestrator.d.ts +123 -0
- package/dist/cjs/core/src/core/rendering/SectionRenderer.d.ts +61 -0
- package/dist/cjs/core/src/core/rendering/TableRenderer.d.ts +89 -0
- package/dist/cjs/core/src/hooks/ariaAnnouncements.d.ts +37 -0
- package/dist/cjs/core/src/hooks/contentHeight.d.ts +23 -0
- package/dist/cjs/core/src/hooks/expandedDepths.d.ts +65 -0
- package/dist/cjs/core/src/hooks/handleOutsideClick.d.ts +50 -0
- package/dist/cjs/core/src/hooks/previousValue.d.ts +30 -0
- package/dist/cjs/core/src/hooks/scrollbarVisibility.d.ts +65 -0
- package/dist/cjs/core/src/hooks/scrollbarWidth.d.ts +52 -0
- package/dist/cjs/core/src/hooks/useAggregatedRows.d.ts +14 -0
- package/dist/cjs/core/src/hooks/useQuickFilter.d.ts +14 -0
- package/dist/cjs/core/src/hooks/windowResize.d.ts +31 -0
- package/dist/cjs/core/src/icons/AngleDownIcon.d.ts +1 -0
- package/dist/cjs/core/src/icons/AngleLeftIcon.d.ts +1 -0
- package/dist/cjs/core/src/icons/AngleRightIcon.d.ts +1 -0
- package/dist/cjs/core/src/icons/AngleUpIcon.d.ts +1 -0
- package/dist/cjs/core/src/icons/AscIcon.d.ts +1 -0
- package/dist/cjs/core/src/icons/CheckIcon.d.ts +1 -0
- package/dist/cjs/core/src/icons/DescIcon.d.ts +1 -0
- package/dist/cjs/core/src/icons/DragIcon.d.ts +1 -0
- package/dist/cjs/core/src/icons/FilterIcon.d.ts +1 -0
- package/dist/cjs/core/src/icons/SelectIcon.d.ts +1 -0
- package/dist/cjs/core/src/icons/index.d.ts +14 -0
- package/dist/cjs/core/src/index.d.ts +48 -0
- package/dist/cjs/core/src/managers/AutoScaleManager.d.ts +26 -0
- package/dist/cjs/core/src/managers/DimensionManager.d.ts +42 -0
- package/dist/cjs/core/src/managers/DragHandlerManager.d.ts +44 -0
- package/dist/cjs/core/src/managers/FilterManager.d.ts +36 -0
- package/dist/cjs/core/src/managers/RowManager.d.ts +56 -0
- package/dist/cjs/core/src/managers/RowSelectionManager.d.ts +36 -0
- package/dist/cjs/core/src/managers/ScrollManager.d.ts +35 -0
- package/dist/cjs/core/src/managers/SectionScrollController.d.ts +50 -0
- package/dist/cjs/core/src/managers/SelectionManager/SelectionManager.d.ts +246 -0
- package/dist/cjs/core/src/managers/SelectionManager/index.d.ts +2 -0
- package/dist/cjs/core/src/managers/SelectionManager/keyboardUtils.d.ts +7 -0
- package/dist/cjs/core/src/managers/SelectionManager/mouseUtils.d.ts +15 -0
- package/dist/cjs/core/src/managers/SelectionManager/selectionRangeUtils.d.ts +7 -0
- package/dist/cjs/core/src/managers/SelectionManager/types.d.ts +22 -0
- package/dist/cjs/core/src/managers/SortManager.d.ts +42 -0
- package/dist/cjs/core/src/types/AggregationTypes.d.ts +8 -0
- package/dist/cjs/core/src/types/BoundingBox.d.ts +11 -0
- package/dist/cjs/core/src/types/Cell.d.ts +7 -0
- package/dist/cjs/core/src/types/CellChangeProps.d.ts +9 -0
- package/dist/cjs/core/src/types/CellClickProps.d.ts +11 -0
- package/dist/cjs/core/src/types/CellRendererProps.d.ts +32 -0
- package/dist/cjs/core/src/types/CellValue.d.ts +2 -0
- package/dist/cjs/core/src/types/ColumnEditorConfig.d.ts +32 -0
- package/dist/cjs/core/src/types/ColumnEditorRowRendererProps.d.ts +39 -0
- package/dist/cjs/core/src/types/ColumnVisibilityTypes.d.ts +4 -0
- package/dist/cjs/core/src/types/CustomTheme.d.ts +26 -0
- package/dist/cjs/core/src/types/DragHandlerProps.d.ts +14 -0
- package/dist/cjs/core/src/types/EnumOption.d.ts +5 -0
- package/dist/cjs/core/src/types/FilterTypes.d.ts +22 -0
- package/dist/cjs/core/src/types/FlattenedHeader.d.ts +10 -0
- package/dist/cjs/core/src/types/FooterRendererProps.d.ts +17 -0
- package/dist/cjs/core/src/types/GenerateRowIdParams.d.ts +11 -0
- package/dist/cjs/core/src/types/GetRowId.d.ts +10 -0
- package/dist/cjs/core/src/types/HandleResizeStartProps.d.ts +21 -0
- package/dist/cjs/core/src/types/HeaderDropdownProps.d.ts +14 -0
- package/dist/cjs/core/src/types/HeaderObject.d.ts +98 -0
- package/dist/cjs/core/src/types/HeaderRendererProps.d.ts +17 -0
- package/dist/cjs/core/src/types/IconsConfig.d.ts +19 -0
- package/dist/cjs/core/src/types/OnNextPage.d.ts +2 -0
- package/dist/cjs/core/src/types/OnRowGroupExpandProps.d.ts +16 -0
- package/dist/cjs/core/src/types/OnSortProps.d.ts +3 -0
- package/dist/cjs/core/src/types/PanelSection.d.ts +1 -0
- package/dist/cjs/core/src/types/Pinned.d.ts +1 -0
- package/dist/cjs/core/src/types/PinnedSectionsState.d.ts +6 -0
- package/dist/cjs/core/src/types/QuickFilterTypes.d.ts +21 -0
- package/dist/cjs/core/src/types/Row.d.ts +3 -0
- package/dist/cjs/core/src/types/RowButton.d.ts +6 -0
- package/dist/cjs/core/src/types/RowId.d.ts +1 -0
- package/dist/cjs/core/src/types/RowSelectionChangeProps.d.ts +7 -0
- package/dist/cjs/core/src/types/RowState.d.ts +12 -0
- package/dist/cjs/core/src/types/RowStateRendererProps.d.ts +18 -0
- package/dist/cjs/core/src/types/SharedTableProps.d.ts +24 -0
- package/dist/cjs/core/src/types/SimpleTableConfig.d.ts +88 -0
- package/dist/cjs/core/src/types/SimpleTableProps.d.ts +99 -0
- package/dist/cjs/core/src/types/SortColumn.d.ts +8 -0
- package/dist/cjs/core/src/types/TableAPI.d.ts +57 -0
- package/dist/cjs/core/src/types/TableHeaderProps.d.ts +17 -0
- package/dist/cjs/core/src/types/TableRefType.d.ts +78 -0
- package/dist/cjs/core/src/types/TableRow.d.ts +29 -0
- package/dist/cjs/core/src/types/TableRowProps.d.ts +29 -0
- package/dist/cjs/core/src/types/Theme.d.ts +2 -0
- package/dist/cjs/core/src/types/UpdateCellProps.d.ts +8 -0
- package/dist/cjs/core/src/utils/bodyCell/content.d.ts +5 -0
- package/dist/cjs/core/src/utils/bodyCell/editing.d.ts +4 -0
- package/dist/cjs/core/src/utils/bodyCell/editors/booleanDropdown.d.ts +2 -0
- package/dist/cjs/core/src/utils/bodyCell/editors/datePicker.d.ts +2 -0
- package/dist/cjs/core/src/utils/bodyCell/editors/dropdown.d.ts +18 -0
- package/dist/cjs/core/src/utils/bodyCell/editors/enumDropdown.d.ts +2 -0
- package/dist/cjs/core/src/utils/bodyCell/eventTracking.d.ts +3 -0
- package/dist/cjs/core/src/utils/bodyCell/expansion.d.ts +4 -0
- package/dist/cjs/core/src/utils/bodyCell/selection.d.ts +7 -0
- package/dist/cjs/core/src/utils/bodyCell/styling.d.ts +5 -0
- package/dist/cjs/core/src/utils/bodyCell/types.d.ts +103 -0
- package/dist/cjs/core/src/utils/bodyCellRenderer.d.ts +5 -0
- package/dist/cjs/core/src/utils/cellClipboardUtils.d.ts +25 -0
- package/dist/cjs/core/src/utils/cellScrollUtils.d.ts +10 -0
- package/dist/cjs/core/src/utils/cellUtils.d.ts +18 -0
- package/dist/cjs/core/src/utils/charts/createBarChart.d.ts +15 -0
- package/dist/cjs/core/src/utils/charts/createLineAreaChart.d.ts +17 -0
- package/dist/cjs/core/src/utils/collapseUtils.d.ts +24 -0
- package/dist/cjs/core/src/utils/columnEditor/columnEditorUtils.d.ts +14 -0
- package/dist/cjs/core/src/utils/columnEditor/createCheckbox.d.ts +21 -0
- package/dist/cjs/core/src/utils/columnEditor/createColumnEditor.d.ts +25 -0
- package/dist/cjs/core/src/utils/columnEditor/createColumnEditorPopout.d.ts +22 -0
- package/dist/cjs/core/src/utils/columnEditor/createColumnEditorRow.d.ts +31 -0
- package/dist/cjs/core/src/utils/csvExportUtils.d.ts +14 -0
- package/dist/cjs/core/src/utils/dateUtils.d.ts +18 -0
- package/dist/cjs/core/src/utils/deprecatedPropsWarnings.d.ts +10 -0
- package/dist/cjs/core/src/utils/filterUtils.d.ts +5 -0
- package/dist/cjs/core/src/utils/filters/createBooleanFilter.d.ts +15 -0
- package/dist/cjs/core/src/utils/filters/createCustomSelect.d.ts +20 -0
- package/dist/cjs/core/src/utils/filters/createDateFilter.d.ts +15 -0
- package/dist/cjs/core/src/utils/filters/createDatePicker.d.ts +10 -0
- package/dist/cjs/core/src/utils/filters/createDropdown.d.ts +16 -0
- package/dist/cjs/core/src/utils/filters/createEnumFilter.d.ts +15 -0
- package/dist/cjs/core/src/utils/filters/createFilterActions.d.ts +11 -0
- package/dist/cjs/core/src/utils/filters/createFilterDropdown.d.ts +15 -0
- package/dist/cjs/core/src/utils/filters/createFilterInput.d.ts +16 -0
- package/dist/cjs/core/src/utils/filters/createNumberFilter.d.ts +15 -0
- package/dist/cjs/core/src/utils/filters/createStringFilter.d.ts +15 -0
- package/dist/cjs/core/src/utils/footer/createTableFooter.d.ts +21 -0
- package/dist/cjs/core/src/utils/formatters.d.ts +3 -0
- package/dist/cjs/core/src/utils/generalUtils.d.ts +4 -0
- package/dist/cjs/core/src/utils/headerCell/collapsing.d.ts +6 -0
- package/dist/cjs/core/src/utils/headerCell/dragging.d.ts +5 -0
- package/dist/cjs/core/src/utils/headerCell/editing.d.ts +4 -0
- package/dist/cjs/core/src/utils/headerCell/eventTracking.d.ts +25 -0
- package/dist/cjs/core/src/utils/headerCell/filtering.d.ts +3 -0
- package/dist/cjs/core/src/utils/headerCell/resizing.d.ts +3 -0
- package/dist/cjs/core/src/utils/headerCell/selection.d.ts +10 -0
- package/dist/cjs/core/src/utils/headerCell/sorting.d.ts +3 -0
- package/dist/cjs/core/src/utils/headerCell/styling.d.ts +5 -0
- package/dist/cjs/core/src/utils/headerCell/types.d.ts +75 -0
- package/dist/cjs/core/src/utils/headerCellRenderer.d.ts +4 -0
- package/dist/cjs/core/src/utils/headerUtils.d.ts +41 -0
- package/dist/cjs/core/src/utils/headerWidthUtils.d.ts +56 -0
- package/dist/cjs/core/src/utils/horizontalScrollbarRenderer.d.ts +14 -0
- package/dist/cjs/core/src/utils/infiniteScrollUtils.d.ts +145 -0
- package/dist/cjs/core/src/utils/nestedGridRowRenderer.d.ts +34 -0
- package/dist/cjs/core/src/utils/pinnedColumnUtils.d.ts +25 -0
- package/dist/cjs/core/src/utils/quickFilterUtils.d.ts +14 -0
- package/dist/cjs/core/src/utils/resizeUtils/autoExpandResize.d.ts +21 -0
- package/dist/cjs/core/src/utils/resizeUtils/compensation.d.ts +11 -0
- package/dist/cjs/core/src/utils/resizeUtils/domUpdates.d.ts +15 -0
- package/dist/cjs/core/src/utils/resizeUtils/index.d.ts +5 -0
- package/dist/cjs/core/src/utils/resizeUtils/maxWidth.d.ts +9 -0
- package/dist/cjs/core/src/utils/resizeUtils/parentHeaderResize.d.ts +11 -0
- package/dist/cjs/core/src/utils/resizeUtils/sectionWidths.d.ts +16 -0
- package/dist/cjs/core/src/utils/rowFlattening.d.ts +30 -0
- package/dist/cjs/core/src/utils/rowProcessing.d.ts +36 -0
- package/dist/cjs/core/src/utils/rowSelectionUtils.d.ts +39 -0
- package/dist/cjs/core/src/utils/rowSeparatorRenderer.d.ts +12 -0
- package/dist/cjs/core/src/utils/rowUtils.d.ts +136 -0
- package/dist/cjs/core/src/utils/sortUtils.d.ts +8 -0
- package/dist/cjs/core/src/utils/stateRowRenderer.d.ts +15 -0
- package/dist/cjs/core/src/utils/stickyParentsRenderer.d.ts +30 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/solid/src/SimpleTable.d.ts +19 -0
- package/dist/cjs/solid/src/buildVanillaConfig.d.ts +3 -0
- package/dist/cjs/solid/src/index.d.ts +3 -0
- package/dist/cjs/solid/src/types.d.ts +53 -0
- package/dist/cjs/solid/src/utils/wrapSolidRenderer.d.ts +20 -0
- package/dist/core/src/consts/column-constraints.d.ts +58 -0
- package/dist/core/src/consts/general-consts.d.ts +13 -0
- package/dist/core/src/core/SimpleTableVanilla.d.ts +71 -0
- package/dist/core/src/core/api/TableAPIImpl.d.ts +44 -0
- package/dist/core/src/core/dom/DOMManager.d.ts +50 -0
- package/dist/core/src/core/initialization/TableInitializer.d.ts +30 -0
- package/dist/core/src/core/rendering/RenderOrchestrator.d.ts +123 -0
- package/dist/core/src/core/rendering/SectionRenderer.d.ts +61 -0
- package/dist/core/src/core/rendering/TableRenderer.d.ts +89 -0
- package/dist/core/src/hooks/ariaAnnouncements.d.ts +37 -0
- package/dist/core/src/hooks/contentHeight.d.ts +23 -0
- package/dist/core/src/hooks/expandedDepths.d.ts +65 -0
- package/dist/core/src/hooks/handleOutsideClick.d.ts +50 -0
- package/dist/core/src/hooks/previousValue.d.ts +30 -0
- package/dist/core/src/hooks/scrollbarVisibility.d.ts +65 -0
- package/dist/core/src/hooks/scrollbarWidth.d.ts +52 -0
- package/dist/core/src/hooks/useAggregatedRows.d.ts +14 -0
- package/dist/core/src/hooks/useQuickFilter.d.ts +14 -0
- package/dist/core/src/hooks/windowResize.d.ts +31 -0
- package/dist/core/src/icons/AngleDownIcon.d.ts +1 -0
- package/dist/core/src/icons/AngleLeftIcon.d.ts +1 -0
- package/dist/core/src/icons/AngleRightIcon.d.ts +1 -0
- package/dist/core/src/icons/AngleUpIcon.d.ts +1 -0
- package/dist/core/src/icons/AscIcon.d.ts +1 -0
- package/dist/core/src/icons/CheckIcon.d.ts +1 -0
- package/dist/core/src/icons/DescIcon.d.ts +1 -0
- package/dist/core/src/icons/DragIcon.d.ts +1 -0
- package/dist/core/src/icons/FilterIcon.d.ts +1 -0
- package/dist/core/src/icons/SelectIcon.d.ts +1 -0
- package/dist/core/src/icons/index.d.ts +14 -0
- package/dist/core/src/index.d.ts +48 -0
- package/dist/core/src/managers/AutoScaleManager.d.ts +26 -0
- package/dist/core/src/managers/DimensionManager.d.ts +42 -0
- package/dist/core/src/managers/DragHandlerManager.d.ts +44 -0
- package/dist/core/src/managers/FilterManager.d.ts +36 -0
- package/dist/core/src/managers/RowManager.d.ts +56 -0
- package/dist/core/src/managers/RowSelectionManager.d.ts +36 -0
- package/dist/core/src/managers/ScrollManager.d.ts +35 -0
- package/dist/core/src/managers/SectionScrollController.d.ts +50 -0
- package/dist/core/src/managers/SelectionManager/SelectionManager.d.ts +246 -0
- package/dist/core/src/managers/SelectionManager/index.d.ts +2 -0
- package/dist/core/src/managers/SelectionManager/keyboardUtils.d.ts +7 -0
- package/dist/core/src/managers/SelectionManager/mouseUtils.d.ts +15 -0
- package/dist/core/src/managers/SelectionManager/selectionRangeUtils.d.ts +7 -0
- package/dist/core/src/managers/SelectionManager/types.d.ts +22 -0
- package/dist/core/src/managers/SortManager.d.ts +42 -0
- package/dist/core/src/types/AggregationTypes.d.ts +8 -0
- package/dist/core/src/types/BoundingBox.d.ts +11 -0
- package/dist/core/src/types/Cell.d.ts +7 -0
- package/dist/core/src/types/CellChangeProps.d.ts +9 -0
- package/dist/core/src/types/CellClickProps.d.ts +11 -0
- package/dist/core/src/types/CellRendererProps.d.ts +32 -0
- package/dist/core/src/types/CellValue.d.ts +2 -0
- package/dist/core/src/types/ColumnEditorConfig.d.ts +32 -0
- package/dist/core/src/types/ColumnEditorRowRendererProps.d.ts +39 -0
- package/dist/core/src/types/ColumnVisibilityTypes.d.ts +4 -0
- package/dist/core/src/types/CustomTheme.d.ts +26 -0
- package/dist/core/src/types/DragHandlerProps.d.ts +14 -0
- package/dist/core/src/types/EnumOption.d.ts +5 -0
- package/dist/core/src/types/FilterTypes.d.ts +22 -0
- package/dist/core/src/types/FlattenedHeader.d.ts +10 -0
- package/dist/core/src/types/FooterRendererProps.d.ts +17 -0
- package/dist/core/src/types/GenerateRowIdParams.d.ts +11 -0
- package/dist/core/src/types/GetRowId.d.ts +10 -0
- package/dist/core/src/types/HandleResizeStartProps.d.ts +21 -0
- package/dist/core/src/types/HeaderDropdownProps.d.ts +14 -0
- package/dist/core/src/types/HeaderObject.d.ts +98 -0
- package/dist/core/src/types/HeaderRendererProps.d.ts +17 -0
- package/dist/core/src/types/IconsConfig.d.ts +19 -0
- package/dist/core/src/types/OnNextPage.d.ts +2 -0
- package/dist/core/src/types/OnRowGroupExpandProps.d.ts +16 -0
- package/dist/core/src/types/OnSortProps.d.ts +3 -0
- package/dist/core/src/types/PanelSection.d.ts +1 -0
- package/dist/core/src/types/Pinned.d.ts +1 -0
- package/dist/core/src/types/PinnedSectionsState.d.ts +6 -0
- package/dist/core/src/types/QuickFilterTypes.d.ts +21 -0
- package/dist/core/src/types/Row.d.ts +3 -0
- package/dist/core/src/types/RowButton.d.ts +6 -0
- package/dist/core/src/types/RowId.d.ts +1 -0
- package/dist/core/src/types/RowSelectionChangeProps.d.ts +7 -0
- package/dist/core/src/types/RowState.d.ts +12 -0
- package/dist/core/src/types/RowStateRendererProps.d.ts +18 -0
- package/dist/core/src/types/SharedTableProps.d.ts +24 -0
- package/dist/core/src/types/SimpleTableConfig.d.ts +88 -0
- package/dist/core/src/types/SimpleTableProps.d.ts +99 -0
- package/dist/core/src/types/SortColumn.d.ts +8 -0
- package/dist/core/src/types/TableAPI.d.ts +57 -0
- package/dist/core/src/types/TableHeaderProps.d.ts +17 -0
- package/dist/core/src/types/TableRefType.d.ts +78 -0
- package/dist/core/src/types/TableRow.d.ts +29 -0
- package/dist/core/src/types/TableRowProps.d.ts +29 -0
- package/dist/core/src/types/Theme.d.ts +2 -0
- package/dist/core/src/types/UpdateCellProps.d.ts +8 -0
- package/dist/core/src/utils/bodyCell/content.d.ts +5 -0
- package/dist/core/src/utils/bodyCell/editing.d.ts +4 -0
- package/dist/core/src/utils/bodyCell/editors/booleanDropdown.d.ts +2 -0
- package/dist/core/src/utils/bodyCell/editors/datePicker.d.ts +2 -0
- package/dist/core/src/utils/bodyCell/editors/dropdown.d.ts +18 -0
- package/dist/core/src/utils/bodyCell/editors/enumDropdown.d.ts +2 -0
- package/dist/core/src/utils/bodyCell/eventTracking.d.ts +3 -0
- package/dist/core/src/utils/bodyCell/expansion.d.ts +4 -0
- package/dist/core/src/utils/bodyCell/selection.d.ts +7 -0
- package/dist/core/src/utils/bodyCell/styling.d.ts +5 -0
- package/dist/core/src/utils/bodyCell/types.d.ts +103 -0
- package/dist/core/src/utils/bodyCellRenderer.d.ts +5 -0
- package/dist/core/src/utils/cellClipboardUtils.d.ts +25 -0
- package/dist/core/src/utils/cellScrollUtils.d.ts +10 -0
- package/dist/core/src/utils/cellUtils.d.ts +18 -0
- package/dist/core/src/utils/charts/createBarChart.d.ts +15 -0
- package/dist/core/src/utils/charts/createLineAreaChart.d.ts +17 -0
- package/dist/core/src/utils/collapseUtils.d.ts +24 -0
- package/dist/core/src/utils/columnEditor/columnEditorUtils.d.ts +14 -0
- package/dist/core/src/utils/columnEditor/createCheckbox.d.ts +21 -0
- package/dist/core/src/utils/columnEditor/createColumnEditor.d.ts +25 -0
- package/dist/core/src/utils/columnEditor/createColumnEditorPopout.d.ts +22 -0
- package/dist/core/src/utils/columnEditor/createColumnEditorRow.d.ts +31 -0
- package/dist/core/src/utils/csvExportUtils.d.ts +14 -0
- package/dist/core/src/utils/dateUtils.d.ts +18 -0
- package/dist/core/src/utils/deprecatedPropsWarnings.d.ts +10 -0
- package/dist/core/src/utils/filterUtils.d.ts +5 -0
- package/dist/core/src/utils/filters/createBooleanFilter.d.ts +15 -0
- package/dist/core/src/utils/filters/createCustomSelect.d.ts +20 -0
- package/dist/core/src/utils/filters/createDateFilter.d.ts +15 -0
- package/dist/core/src/utils/filters/createDatePicker.d.ts +10 -0
- package/dist/core/src/utils/filters/createDropdown.d.ts +16 -0
- package/dist/core/src/utils/filters/createEnumFilter.d.ts +15 -0
- package/dist/core/src/utils/filters/createFilterActions.d.ts +11 -0
- package/dist/core/src/utils/filters/createFilterDropdown.d.ts +15 -0
- package/dist/core/src/utils/filters/createFilterInput.d.ts +16 -0
- package/dist/core/src/utils/filters/createNumberFilter.d.ts +15 -0
- package/dist/core/src/utils/filters/createStringFilter.d.ts +15 -0
- package/dist/core/src/utils/footer/createTableFooter.d.ts +21 -0
- package/dist/core/src/utils/formatters.d.ts +3 -0
- package/dist/core/src/utils/generalUtils.d.ts +4 -0
- package/dist/core/src/utils/headerCell/collapsing.d.ts +6 -0
- package/dist/core/src/utils/headerCell/dragging.d.ts +5 -0
- package/dist/core/src/utils/headerCell/editing.d.ts +4 -0
- package/dist/core/src/utils/headerCell/eventTracking.d.ts +25 -0
- package/dist/core/src/utils/headerCell/filtering.d.ts +3 -0
- package/dist/core/src/utils/headerCell/resizing.d.ts +3 -0
- package/dist/core/src/utils/headerCell/selection.d.ts +10 -0
- package/dist/core/src/utils/headerCell/sorting.d.ts +3 -0
- package/dist/core/src/utils/headerCell/styling.d.ts +5 -0
- package/dist/core/src/utils/headerCell/types.d.ts +75 -0
- package/dist/core/src/utils/headerCellRenderer.d.ts +4 -0
- package/dist/core/src/utils/headerUtils.d.ts +41 -0
- package/dist/core/src/utils/headerWidthUtils.d.ts +56 -0
- package/dist/core/src/utils/horizontalScrollbarRenderer.d.ts +14 -0
- package/dist/core/src/utils/infiniteScrollUtils.d.ts +145 -0
- package/dist/core/src/utils/nestedGridRowRenderer.d.ts +34 -0
- package/dist/core/src/utils/pinnedColumnUtils.d.ts +25 -0
- package/dist/core/src/utils/quickFilterUtils.d.ts +14 -0
- package/dist/core/src/utils/resizeUtils/autoExpandResize.d.ts +21 -0
- package/dist/core/src/utils/resizeUtils/compensation.d.ts +11 -0
- package/dist/core/src/utils/resizeUtils/domUpdates.d.ts +15 -0
- package/dist/core/src/utils/resizeUtils/index.d.ts +5 -0
- package/dist/core/src/utils/resizeUtils/maxWidth.d.ts +9 -0
- package/dist/core/src/utils/resizeUtils/parentHeaderResize.d.ts +11 -0
- package/dist/core/src/utils/resizeUtils/sectionWidths.d.ts +16 -0
- package/dist/core/src/utils/rowFlattening.d.ts +30 -0
- package/dist/core/src/utils/rowProcessing.d.ts +36 -0
- package/dist/core/src/utils/rowSelectionUtils.d.ts +39 -0
- package/dist/core/src/utils/rowSeparatorRenderer.d.ts +12 -0
- package/dist/core/src/utils/rowUtils.d.ts +136 -0
- package/dist/core/src/utils/sortUtils.d.ts +8 -0
- package/dist/core/src/utils/stateRowRenderer.d.ts +15 -0
- package/dist/core/src/utils/stickyParentsRenderer.d.ts +30 -0
- package/dist/index.es.js +2 -0
- package/dist/index.es.js.map +1 -0
- package/dist/solid/src/SimpleTable.d.ts +19 -0
- package/dist/solid/src/buildVanillaConfig.d.ts +3 -0
- package/dist/solid/src/index.d.ts +3 -0
- package/dist/solid/src/types.d.ts +53 -0
- package/dist/solid/src/utils/wrapSolidRenderer.d.ts +20 -0
- package/package.json +69 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export type SectionId = "pinned-left" | "main" | "pinned-right";
|
|
2
|
+
export type SectionPaneRole = "sticky" | "scrollbar" | "header" | "body";
|
|
3
|
+
export interface SectionScrollControllerConfig {
|
|
4
|
+
onMainSectionScrollLeft?: (scrollLeft: number) => void;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Single controller for horizontal scroll sync across all four panes per section:
|
|
8
|
+
* sticky parent, horizontal scrollbar segment, header, and body.
|
|
9
|
+
* Scrolling any one pane updates the other three in that section.
|
|
10
|
+
* All four panes must have the same scroll width (enforced by renderers).
|
|
11
|
+
*/
|
|
12
|
+
export declare class SectionScrollController {
|
|
13
|
+
private scrollLeftBySection;
|
|
14
|
+
private panesBySection;
|
|
15
|
+
private scrollHandlers;
|
|
16
|
+
private config;
|
|
17
|
+
/** Guard to avoid re-entrancy when we programmatically set scrollLeft on other panes */
|
|
18
|
+
private isSyncing;
|
|
19
|
+
/** Last scrollLeft at which we ran main-section virtualization; used to run heavy ops only every N px. */
|
|
20
|
+
private lastMainVirtualizationScrollLeft;
|
|
21
|
+
constructor(config?: SectionScrollControllerConfig);
|
|
22
|
+
updateConfig(config: Partial<SectionScrollControllerConfig>): void;
|
|
23
|
+
/**
|
|
24
|
+
* Register a pane (sticky, scrollbar, header, or body) for a section.
|
|
25
|
+
* When any registered pane scrolls, the others in the same section are updated.
|
|
26
|
+
* If a pane with the same role was already registered (e.g. after re-render), it is replaced.
|
|
27
|
+
*/
|
|
28
|
+
registerPane(sectionId: SectionId, element: HTMLElement, role: SectionPaneRole): void;
|
|
29
|
+
/**
|
|
30
|
+
* Unregister a pane (e.g. when section is removed or re-created).
|
|
31
|
+
*/
|
|
32
|
+
unregisterPane(sectionId: SectionId, element: HTMLElement): void;
|
|
33
|
+
/**
|
|
34
|
+
* Unregister all panes for a section (e.g. on cleanup).
|
|
35
|
+
*/
|
|
36
|
+
unregisterSection(sectionId: SectionId): void;
|
|
37
|
+
/**
|
|
38
|
+
* Set scroll position for a section. Updates state and all registered panes.
|
|
39
|
+
* Used when a pane fires scroll and when restoring after render.
|
|
40
|
+
*/
|
|
41
|
+
setSectionScrollLeft(sectionId: SectionId, value: number): void;
|
|
42
|
+
getSectionScrollLeft(sectionId: SectionId): number;
|
|
43
|
+
/**
|
|
44
|
+
* Restore scroll position to all registered panes from stored state (e.g. after render).
|
|
45
|
+
*/
|
|
46
|
+
restoreAll(): void;
|
|
47
|
+
private addScrollListener;
|
|
48
|
+
private removeScrollListener;
|
|
49
|
+
destroy(): void;
|
|
50
|
+
}
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import type Cell from "../../types/Cell";
|
|
2
|
+
import { type SelectionManagerConfig } from "./types";
|
|
3
|
+
export type { SelectionManagerConfig } from "./types";
|
|
4
|
+
export { createSetString } from "./types";
|
|
5
|
+
export declare class SelectionManager {
|
|
6
|
+
private config;
|
|
7
|
+
private selectedCells;
|
|
8
|
+
private selectedColumns;
|
|
9
|
+
private lastSelectedColumnIndex;
|
|
10
|
+
private initialFocusedCell;
|
|
11
|
+
private copyFlashCells;
|
|
12
|
+
private warningFlashCells;
|
|
13
|
+
private isSelecting;
|
|
14
|
+
private startCell;
|
|
15
|
+
private keydownHandler;
|
|
16
|
+
private currentMouseX;
|
|
17
|
+
private currentMouseY;
|
|
18
|
+
private scrollAnimationFrame;
|
|
19
|
+
private lastSelectionUpdate;
|
|
20
|
+
private selectionThrottleMs;
|
|
21
|
+
private globalMouseMoveHandler;
|
|
22
|
+
private globalMouseUpHandler;
|
|
23
|
+
private columnsWithSelectedCells;
|
|
24
|
+
private rowsWithSelectedCells;
|
|
25
|
+
private leafHeaders;
|
|
26
|
+
/** rowId -> table row index; avoids O(tableRows) findIndex per cell in getBorderClass */
|
|
27
|
+
private rowIdToTableIndex;
|
|
28
|
+
/** Set of "rowId\tcolIndex" for O(1) selected membership in syncAllCellClasses */
|
|
29
|
+
private selectedByRowIdColIndex;
|
|
30
|
+
/** When true, all cells are selected without storing R×C cell IDs (fast path for Cmd+A). */
|
|
31
|
+
private fullTableSelected;
|
|
32
|
+
constructor(config: SelectionManagerConfig);
|
|
33
|
+
/**
|
|
34
|
+
* Update configuration when props change.
|
|
35
|
+
* When options.positionOnlyBody is true (e.g. scroll-only render), only updates rowIdToTableIndex and
|
|
36
|
+
* selectedByRowIdColIndex so lookups work for new cells; skips columnsWithSelectedCells/rowsWithSelectedCells.
|
|
37
|
+
*/
|
|
38
|
+
updateConfig(config: Partial<SelectionManagerConfig>, options?: {
|
|
39
|
+
positionOnlyBody?: boolean;
|
|
40
|
+
}): void;
|
|
41
|
+
/**
|
|
42
|
+
* Update derived state based on current selections.
|
|
43
|
+
* When fullTableSelected, derives columns/rows from table shape (O(R+C)) instead of iterating selectedCells (O(R×C)).
|
|
44
|
+
* Otherwise, single pass over selectedCells to build selectedByRowIdColIndex, columnsWithSelectedCells, rowsWithSelectedCells.
|
|
45
|
+
*/
|
|
46
|
+
private updateDerivedState;
|
|
47
|
+
/**
|
|
48
|
+
* Minimal update for scroll-only renders: only rowIdToTableIndex and selectedByRowIdColIndex
|
|
49
|
+
* so isSelected/getBorderClass work for new cells; skips columnsWithSelectedCells and rowsWithSelectedCells.
|
|
50
|
+
* When fullTableSelected, selectedByRowIdColIndex is left empty (isSelected uses the flag).
|
|
51
|
+
*/
|
|
52
|
+
private updateRowIdAndSelectionLookupOnly;
|
|
53
|
+
/**
|
|
54
|
+
* Setup keyboard navigation event listener
|
|
55
|
+
*/
|
|
56
|
+
private setupKeyboardNavigation;
|
|
57
|
+
/**
|
|
58
|
+
* Clean up event listeners and resources
|
|
59
|
+
*/
|
|
60
|
+
destroy(): void;
|
|
61
|
+
/**
|
|
62
|
+
* Handle keyboard events for navigation and clipboard operations
|
|
63
|
+
*/
|
|
64
|
+
private handleKeyDown;
|
|
65
|
+
/**
|
|
66
|
+
* Handle navigation keys (arrows, home, end, page up/down)
|
|
67
|
+
*/
|
|
68
|
+
private handleNavigationKeys;
|
|
69
|
+
/**
|
|
70
|
+
* Helper function to find the edge of data in a direction
|
|
71
|
+
*/
|
|
72
|
+
private findEdgeInDirection;
|
|
73
|
+
/**
|
|
74
|
+
* Handle arrow up key
|
|
75
|
+
*/
|
|
76
|
+
private handleArrowUp;
|
|
77
|
+
/**
|
|
78
|
+
* Handle arrow down key
|
|
79
|
+
*/
|
|
80
|
+
private handleArrowDown;
|
|
81
|
+
/**
|
|
82
|
+
* Handle arrow left key
|
|
83
|
+
*/
|
|
84
|
+
private handleArrowLeft;
|
|
85
|
+
/**
|
|
86
|
+
* Handle arrow right key
|
|
87
|
+
*/
|
|
88
|
+
private handleArrowRight;
|
|
89
|
+
/**
|
|
90
|
+
* Handle home key
|
|
91
|
+
*/
|
|
92
|
+
private handleHome;
|
|
93
|
+
/**
|
|
94
|
+
* Handle end key
|
|
95
|
+
*/
|
|
96
|
+
private handleEnd;
|
|
97
|
+
/**
|
|
98
|
+
* Handle page up key
|
|
99
|
+
*/
|
|
100
|
+
private handlePageUp;
|
|
101
|
+
/**
|
|
102
|
+
* Handle page down key
|
|
103
|
+
*/
|
|
104
|
+
private handlePageDown;
|
|
105
|
+
/**
|
|
106
|
+
* Copy selected cells to clipboard
|
|
107
|
+
*/
|
|
108
|
+
private copyToClipboard;
|
|
109
|
+
/**
|
|
110
|
+
* Paste from clipboard to cells
|
|
111
|
+
*/
|
|
112
|
+
private pasteFromClipboard;
|
|
113
|
+
/**
|
|
114
|
+
* Delete content from selected cells
|
|
115
|
+
*/
|
|
116
|
+
private deleteSelectedCells;
|
|
117
|
+
/**
|
|
118
|
+
* Select all cells in the table. Uses fullTableSelected flag instead of storing R×C cell IDs for O(1) update.
|
|
119
|
+
*/
|
|
120
|
+
private selectAll;
|
|
121
|
+
/**
|
|
122
|
+
* Build the full set of cell IDs when fullTableSelected. Used for copy/delete/getSelectedCells.
|
|
123
|
+
*/
|
|
124
|
+
private buildFullTableSelectedSet;
|
|
125
|
+
/**
|
|
126
|
+
* Clear all selections
|
|
127
|
+
*/
|
|
128
|
+
clearSelection(): void;
|
|
129
|
+
/**
|
|
130
|
+
* Set selected cells (for external control)
|
|
131
|
+
*/
|
|
132
|
+
setSelectedCells(cells: Set<string>): void;
|
|
133
|
+
/**
|
|
134
|
+
* Set selected columns (for external control)
|
|
135
|
+
*/
|
|
136
|
+
setSelectedColumns(columns: Set<number>): void;
|
|
137
|
+
/**
|
|
138
|
+
* Update flash classes on cells (copy/warning animations)
|
|
139
|
+
*/
|
|
140
|
+
private updateCellFlashClasses;
|
|
141
|
+
private static readonly SELECTION_CLASSES;
|
|
142
|
+
/**
|
|
143
|
+
* Apply selection classes to all currently rendered cells. Used after drag ends
|
|
144
|
+
* so that the DOM (which may have been replaced during scroll) reflects selection.
|
|
145
|
+
* Only adds/removes classes that changed to reduce DOM writes.
|
|
146
|
+
* Fast path when there is no selection: one pass to clear all selection classes.
|
|
147
|
+
*/
|
|
148
|
+
private syncAllCellClasses;
|
|
149
|
+
/**
|
|
150
|
+
* Update all cell classes based on current selection state
|
|
151
|
+
* Directly manipulates the DOM without triggering React re-renders.
|
|
152
|
+
* When isSelecting (drag) or fullTableSelected (Cmd+A), run synchronously so classes are applied
|
|
153
|
+
* before any scroll-triggered render or next frame.
|
|
154
|
+
*/
|
|
155
|
+
private updateAllCellClasses;
|
|
156
|
+
/**
|
|
157
|
+
* Check if a cell is selected. Uses selectedByRowIdColIndex for O(1) membership.
|
|
158
|
+
* When fullTableSelected, returns true for any cell without lookup.
|
|
159
|
+
*/
|
|
160
|
+
isSelected({ colIndex, rowIndex, rowId }: Cell): boolean;
|
|
161
|
+
/**
|
|
162
|
+
* Get border class for a cell based on its selection state. Uses rowIdToTableIndex for O(1) lookups.
|
|
163
|
+
* When fullTableSelected, short-circuits with border classes for the full grid (no neighbor lookups).
|
|
164
|
+
*/
|
|
165
|
+
getBorderClass({ colIndex, rowIndex, rowId }: Cell): string;
|
|
166
|
+
/**
|
|
167
|
+
* Check if a cell is the initial focused cell
|
|
168
|
+
*/
|
|
169
|
+
isInitialFocusedCell({ rowIndex, colIndex, rowId }: Cell): boolean;
|
|
170
|
+
/**
|
|
171
|
+
* Check if a cell is currently showing copy flash animation
|
|
172
|
+
*/
|
|
173
|
+
isCopyFlashing({ colIndex, rowIndex, rowId }: Cell): boolean;
|
|
174
|
+
/**
|
|
175
|
+
* Check if a cell is currently showing warning flash animation
|
|
176
|
+
*/
|
|
177
|
+
isWarningFlashing({ colIndex, rowIndex, rowId }: Cell): boolean;
|
|
178
|
+
/**
|
|
179
|
+
* Get columns that have selected cells
|
|
180
|
+
*/
|
|
181
|
+
getColumnsWithSelectedCells(): Set<number>;
|
|
182
|
+
/**
|
|
183
|
+
* Get rows that have selected cells
|
|
184
|
+
*/
|
|
185
|
+
getRowsWithSelectedCells(): Set<string>;
|
|
186
|
+
/**
|
|
187
|
+
* Get selected cells. When fullTableSelected, builds and returns the full set on demand.
|
|
188
|
+
*/
|
|
189
|
+
getSelectedCells(): Set<string>;
|
|
190
|
+
/**
|
|
191
|
+
* Get selected columns
|
|
192
|
+
*/
|
|
193
|
+
getSelectedColumns(): Set<number>;
|
|
194
|
+
/**
|
|
195
|
+
* Get last selected column index
|
|
196
|
+
*/
|
|
197
|
+
getLastSelectedColumnIndex(): number | null;
|
|
198
|
+
/**
|
|
199
|
+
* Get start cell for range selection
|
|
200
|
+
*/
|
|
201
|
+
getStartCell(): Cell | null;
|
|
202
|
+
/**
|
|
203
|
+
* Set the initial focused cell (e.g. when clearing selection from header drag).
|
|
204
|
+
*/
|
|
205
|
+
setInitialFocusedCell(cell: Cell | null): void;
|
|
206
|
+
/**
|
|
207
|
+
* Select a single cell
|
|
208
|
+
*/
|
|
209
|
+
selectSingleCell(cell: Cell): void;
|
|
210
|
+
/**
|
|
211
|
+
* Select a range of cells from startCell to endCell
|
|
212
|
+
*/
|
|
213
|
+
selectCellRange(startCell: Cell, endCell: Cell): void;
|
|
214
|
+
/**
|
|
215
|
+
* Select one or more columns
|
|
216
|
+
*/
|
|
217
|
+
selectColumns(columnIndices: number[], isShiftKey?: boolean): void;
|
|
218
|
+
/**
|
|
219
|
+
* Update selection range during mouse drag. Skips derived state and class sync when selection unchanged.
|
|
220
|
+
*/
|
|
221
|
+
private updateSelectionRange;
|
|
222
|
+
/**
|
|
223
|
+
* Calculate the nearest cell to a given mouse position
|
|
224
|
+
*/
|
|
225
|
+
private calculateNearestCell;
|
|
226
|
+
/**
|
|
227
|
+
* Get cell from mouse position
|
|
228
|
+
*/
|
|
229
|
+
private getCellFromMousePosition;
|
|
230
|
+
/**
|
|
231
|
+
* Handle auto-scrolling when dragging near edges
|
|
232
|
+
*/
|
|
233
|
+
private handleAutoScroll;
|
|
234
|
+
/**
|
|
235
|
+
* Continuous scroll loop during mouse drag
|
|
236
|
+
*/
|
|
237
|
+
private continuousScroll;
|
|
238
|
+
/**
|
|
239
|
+
* Handle mouse down on a cell to start selection
|
|
240
|
+
*/
|
|
241
|
+
handleMouseDown({ colIndex, rowIndex, rowId }: Cell): void;
|
|
242
|
+
/**
|
|
243
|
+
* Handle mouse over a cell during selection drag
|
|
244
|
+
*/
|
|
245
|
+
handleMouseOver({ colIndex, rowIndex, rowId }: Cell): void;
|
|
246
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Find the edge of data in a direction (pure helper for keyboard navigation).
|
|
3
|
+
*/
|
|
4
|
+
export declare function findEdgeInDirection(tableRowsLength: number, leafHeadersLength: number, enableRowSelection: boolean, startRow: number, startCol: number, direction: "up" | "down" | "left" | "right"): {
|
|
5
|
+
rowIndex: number;
|
|
6
|
+
colIndex: number;
|
|
7
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type Cell from "../../types/Cell";
|
|
2
|
+
/**
|
|
3
|
+
* Calculate the nearest cell to a given mouse position.
|
|
4
|
+
* Uses row buckets: one getBoundingClientRect per row to find the row, then only
|
|
5
|
+
* measures cells in that row (O(rows + cols) instead of O(rows * cols)).
|
|
6
|
+
*/
|
|
7
|
+
export declare function calculateNearestCell(clientX: number, clientY: number): Cell | null;
|
|
8
|
+
/**
|
|
9
|
+
* Get cell from mouse position (element under point, or nearest cell).
|
|
10
|
+
*/
|
|
11
|
+
export declare function getCellFromMousePosition(clientX: number, clientY: number): Cell | null;
|
|
12
|
+
/**
|
|
13
|
+
* Handle auto-scrolling when dragging near table edges.
|
|
14
|
+
*/
|
|
15
|
+
export declare function handleAutoScroll(clientX: number, clientY: number): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type Cell from "../../types/Cell";
|
|
2
|
+
import type TableRowType from "../../types/TableRow";
|
|
3
|
+
/**
|
|
4
|
+
* Compute the set of cell IDs for a selection range.
|
|
5
|
+
* Resolves rowId to current row index (for virtualized/sorted tables) then fills the rectangle.
|
|
6
|
+
*/
|
|
7
|
+
export declare function computeSelectionRange(startCell: Cell, endCell: Cell, tableRows: TableRowType[], enableRowSelection: boolean): Set<string>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type HeaderObject from "../../types/HeaderObject";
|
|
2
|
+
import type { Accessor } from "../../types/HeaderObject";
|
|
3
|
+
import type TableRowType from "../../types/TableRow";
|
|
4
|
+
import type Cell from "../../types/Cell";
|
|
5
|
+
import type { CustomTheme } from "../../types/CustomTheme";
|
|
6
|
+
export declare const createSetString: ({ rowIndex, colIndex, rowId }: Cell) => string;
|
|
7
|
+
export interface SelectionManagerConfig {
|
|
8
|
+
selectableCells: boolean;
|
|
9
|
+
headers: HeaderObject[];
|
|
10
|
+
tableRows: TableRowType[];
|
|
11
|
+
onCellEdit?: (props: any) => void;
|
|
12
|
+
cellRegistry?: Map<string, any>;
|
|
13
|
+
collapsedHeaders?: Set<Accessor>;
|
|
14
|
+
rowHeight: number;
|
|
15
|
+
enableRowSelection?: boolean;
|
|
16
|
+
copyHeadersToClipboard?: boolean;
|
|
17
|
+
customTheme: CustomTheme;
|
|
18
|
+
/** Called when a selection drag ends so the table can re-render and apply selection classes. */
|
|
19
|
+
onSelectionDragEnd?: () => void;
|
|
20
|
+
/** Root element of the table; sync scopes cell queries to this so only this table's cells are updated. */
|
|
21
|
+
tableRoot?: HTMLElement;
|
|
22
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import HeaderObject, { Accessor } from "../types/HeaderObject";
|
|
2
|
+
import Row from "../types/Row";
|
|
3
|
+
import SortColumn, { SortDirection } from "../types/SortColumn";
|
|
4
|
+
export interface SortManagerConfig {
|
|
5
|
+
headers: HeaderObject[];
|
|
6
|
+
tableRows: Row[];
|
|
7
|
+
externalSortHandling: boolean;
|
|
8
|
+
onSortChange?: (sort: SortColumn | null) => void;
|
|
9
|
+
rowGrouping?: string[];
|
|
10
|
+
initialSortColumn?: string;
|
|
11
|
+
initialSortDirection?: SortDirection;
|
|
12
|
+
announce?: (message: string) => void;
|
|
13
|
+
}
|
|
14
|
+
export interface SortManagerState {
|
|
15
|
+
sort: SortColumn | null;
|
|
16
|
+
sortedRows: Row[];
|
|
17
|
+
}
|
|
18
|
+
type StateChangeCallback = (state: SortManagerState) => void;
|
|
19
|
+
export declare class SortManager {
|
|
20
|
+
private config;
|
|
21
|
+
private state;
|
|
22
|
+
private subscribers;
|
|
23
|
+
private headerLookup;
|
|
24
|
+
constructor(config: SortManagerConfig);
|
|
25
|
+
private updateHeaderLookup;
|
|
26
|
+
private getInitialSort;
|
|
27
|
+
private sortNestedRows;
|
|
28
|
+
private computeSortedRows;
|
|
29
|
+
updateConfig(config: Partial<SortManagerConfig>): void;
|
|
30
|
+
subscribe(callback: StateChangeCallback): () => void;
|
|
31
|
+
private notifySubscribers;
|
|
32
|
+
updateSort(props?: {
|
|
33
|
+
accessor: Accessor;
|
|
34
|
+
direction?: SortDirection;
|
|
35
|
+
}): void;
|
|
36
|
+
computeSortedRowsPreview(accessor: Accessor): Row[];
|
|
37
|
+
getState(): SortManagerState;
|
|
38
|
+
getSortColumn(): SortColumn | null;
|
|
39
|
+
getSortedRows(): Row[];
|
|
40
|
+
destroy(): void;
|
|
41
|
+
}
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type CellValue from "./CellValue";
|
|
2
|
+
export type AggregationType = "sum" | "average" | "count" | "min" | "max" | "custom";
|
|
3
|
+
export type AggregationConfig = {
|
|
4
|
+
type: AggregationType;
|
|
5
|
+
parseValue?: (value: CellValue) => number;
|
|
6
|
+
formatResult?: (value: number) => string;
|
|
7
|
+
customFn?: (values: CellValue[]) => number;
|
|
8
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import CellValue from "./CellValue";
|
|
2
|
+
import { Accessor } from "./HeaderObject";
|
|
3
|
+
import Row from "./Row";
|
|
4
|
+
type CellClickProps = {
|
|
5
|
+
accessor: Accessor;
|
|
6
|
+
colIndex: number;
|
|
7
|
+
row: Row;
|
|
8
|
+
rowIndex: number;
|
|
9
|
+
value: CellValue;
|
|
10
|
+
};
|
|
11
|
+
export default CellClickProps;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Accessor } from "./HeaderObject";
|
|
2
|
+
import type Row from "./Row";
|
|
3
|
+
import type Theme from "./Theme";
|
|
4
|
+
import type CellValue from "./CellValue";
|
|
5
|
+
interface CellRendererProps {
|
|
6
|
+
accessor: Accessor;
|
|
7
|
+
colIndex: number;
|
|
8
|
+
row: Row;
|
|
9
|
+
rowIndex: number;
|
|
10
|
+
rowPath?: (string | number)[];
|
|
11
|
+
theme: Theme;
|
|
12
|
+
value: CellValue;
|
|
13
|
+
formattedValue?: string | number | string[] | number[] | null | undefined | boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* CellRenderer return type:
|
|
17
|
+
* - string | number | null: rendered as text in the cell
|
|
18
|
+
* - Node (HTMLElement, DocumentFragment, etc.): appended directly into the cell for full DOM control
|
|
19
|
+
*
|
|
20
|
+
* Example (text):
|
|
21
|
+
* cellRenderer: ({ value, row }) => `${value} (${row.status})`
|
|
22
|
+
*
|
|
23
|
+
* Example (custom HTML):
|
|
24
|
+
* cellRenderer: ({ row }) => {
|
|
25
|
+
* const span = document.createElement('span');
|
|
26
|
+
* span.className = 'badge';
|
|
27
|
+
* span.textContent = String(row.status);
|
|
28
|
+
* return span;
|
|
29
|
+
* }
|
|
30
|
+
*/
|
|
31
|
+
export type CellRenderer = (props: CellRendererProps) => string | number | null | Node;
|
|
32
|
+
export default CellRendererProps;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import HeaderObject from "./HeaderObject";
|
|
2
|
+
import { ColumnEditorRowRenderer } from "./ColumnEditorRowRendererProps";
|
|
3
|
+
/**
|
|
4
|
+
* Custom search function for filtering columns in the column editor
|
|
5
|
+
* @param header - The header object to check
|
|
6
|
+
* @param searchTerm - The current search term
|
|
7
|
+
* @returns true if the header matches the search term, false otherwise
|
|
8
|
+
*/
|
|
9
|
+
export type ColumnEditorSearchFunction = (header: HeaderObject, searchTerm: string) => boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Configuration options for the column editor/visibility drawer
|
|
12
|
+
*/
|
|
13
|
+
export interface ColumnEditorConfig {
|
|
14
|
+
/** Text displayed on the column editor button (default: "Columns") */
|
|
15
|
+
text?: string;
|
|
16
|
+
/** Enable search functionality in the column editor (default: true) */
|
|
17
|
+
searchEnabled?: boolean;
|
|
18
|
+
/** Placeholder text for the search input (default: "Search columns...") */
|
|
19
|
+
searchPlaceholder?: string;
|
|
20
|
+
/** Custom search function to override default search behavior. Receives header and searchTerm, returns true if header matches. */
|
|
21
|
+
searchFunction?: ColumnEditorSearchFunction;
|
|
22
|
+
/**
|
|
23
|
+
* When false, hides pin/unpin controls (L/R) in the column editor. Pinned sections still appear if columns are pinned.
|
|
24
|
+
* Default: true.
|
|
25
|
+
*/
|
|
26
|
+
allowColumnPinning?: boolean;
|
|
27
|
+
/** Custom renderer for column editor row layout to reposition icons and labels */
|
|
28
|
+
rowRenderer?: ColumnEditorRowRenderer;
|
|
29
|
+
}
|
|
30
|
+
export declare const DEFAULT_COLUMN_EDITOR_CONFIG: Required<Omit<ColumnEditorConfig, "searchFunction" | "rowRenderer">>;
|
|
31
|
+
/** Column editor config with defaults applied (text, searchEnabled, searchPlaceholder are required) */
|
|
32
|
+
export type MergedColumnEditorConfig = Required<Pick<ColumnEditorConfig, "text" | "searchEnabled" | "searchPlaceholder" | "allowColumnPinning">> & Pick<ColumnEditorConfig, "searchFunction" | "rowRenderer">;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Accessor } from "./HeaderObject";
|
|
2
|
+
import type HeaderObject from "./HeaderObject";
|
|
3
|
+
import type { IconElement } from "./IconsConfig";
|
|
4
|
+
import type { PanelSection } from "./PanelSection";
|
|
5
|
+
export interface ColumnEditorRowRendererComponents {
|
|
6
|
+
expandIcon?: IconElement;
|
|
7
|
+
checkbox?: HTMLElement | string;
|
|
8
|
+
dragIcon?: IconElement;
|
|
9
|
+
labelContent?: string | HTMLElement;
|
|
10
|
+
/** Default pin column (outline / filled); omit when building a fully custom row */
|
|
11
|
+
pinIcon?: IconElement;
|
|
12
|
+
}
|
|
13
|
+
/** Pin / unpin actions for column editor rows (also use for lock/tooltip UX via HeaderObject.isEssential). */
|
|
14
|
+
export interface ColumnEditorPinControl {
|
|
15
|
+
pinnedSide: "left" | "right" | null;
|
|
16
|
+
canPinLeft: boolean;
|
|
17
|
+
canPinRight: boolean;
|
|
18
|
+
canUnpin: boolean;
|
|
19
|
+
pinLeft: () => void;
|
|
20
|
+
pinRight: () => void;
|
|
21
|
+
unpin: () => void;
|
|
22
|
+
}
|
|
23
|
+
interface ColumnEditorRowRendererProps {
|
|
24
|
+
accessor: Accessor;
|
|
25
|
+
header: HeaderObject;
|
|
26
|
+
components: ColumnEditorRowRendererComponents;
|
|
27
|
+
/** Which panel section this row is rendered in */
|
|
28
|
+
panelSection?: PanelSection;
|
|
29
|
+
/** Resolved from HeaderObject.isEssential / essentialAccessors */
|
|
30
|
+
isEssential?: boolean;
|
|
31
|
+
/** False when visibility cannot be toggled (essential columns) */
|
|
32
|
+
canToggleVisibility?: boolean;
|
|
33
|
+
/** Mirrors `columnEditorConfig.allowColumnPinning` (default true) */
|
|
34
|
+
allowColumnPinning?: boolean;
|
|
35
|
+
pinControl?: ColumnEditorPinControl;
|
|
36
|
+
}
|
|
37
|
+
export type ColumnEditorRowRenderer = (props: ColumnEditorRowRendererProps) => HTMLElement | string | null;
|
|
38
|
+
export default ColumnEditorRowRendererProps;
|
|
39
|
+
export type { PanelSection };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom theme configuration for SimpleTable
|
|
3
|
+
* Contains all customizable dimensions and spacing values used in calculations and styling
|
|
4
|
+
* All properties are optional - missing values will be filled with defaults
|
|
5
|
+
*/
|
|
6
|
+
export interface CustomThemeProps {
|
|
7
|
+
rowHeight?: number;
|
|
8
|
+
headerHeight?: number;
|
|
9
|
+
footerHeight?: number;
|
|
10
|
+
rowSeparatorWidth?: number;
|
|
11
|
+
borderWidth?: number;
|
|
12
|
+
pinnedBorderWidth?: number;
|
|
13
|
+
nestedGridBorderWidth?: number;
|
|
14
|
+
nestedGridPaddingTop?: number;
|
|
15
|
+
nestedGridPaddingBottom?: number;
|
|
16
|
+
nestedGridPaddingLeft?: number;
|
|
17
|
+
nestedGridPaddingRight?: number;
|
|
18
|
+
nestedGridMaxHeight?: number;
|
|
19
|
+
selectionColumnWidth?: number;
|
|
20
|
+
}
|
|
21
|
+
export type CustomTheme = Required<CustomThemeProps>;
|
|
22
|
+
/**
|
|
23
|
+
* Default theme values
|
|
24
|
+
* These match the original hardcoded constants throughout the codebase
|
|
25
|
+
*/
|
|
26
|
+
export declare const DEFAULT_CUSTOM_THEME: CustomTheme;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import HeaderObject, { Accessor } from "./HeaderObject";
|
|
2
|
+
type useDragHandlerProps = {
|
|
3
|
+
draggedHeaderRef: {
|
|
4
|
+
current: HeaderObject | null;
|
|
5
|
+
};
|
|
6
|
+
essentialAccessors?: ReadonlySet<Accessor | string>;
|
|
7
|
+
headers: HeaderObject[];
|
|
8
|
+
hoveredHeaderRef: {
|
|
9
|
+
current: HeaderObject | null;
|
|
10
|
+
};
|
|
11
|
+
onColumnOrderChange?: (newHeaders: HeaderObject[]) => void;
|
|
12
|
+
onTableHeaderDragEnd: (newHeaders: HeaderObject[]) => void;
|
|
13
|
+
};
|
|
14
|
+
export default useDragHandlerProps;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import CellValue from "./CellValue";
|
|
2
|
+
import { Accessor } from "./HeaderObject";
|
|
3
|
+
export type StringFilterOperator = "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "isEmpty" | "isNotEmpty";
|
|
4
|
+
export type NumberFilterOperator = "equals" | "notEquals" | "greaterThan" | "lessThan" | "greaterThanOrEqual" | "lessThanOrEqual" | "between" | "notBetween" | "isEmpty" | "isNotEmpty";
|
|
5
|
+
export type BooleanFilterOperator = "equals" | "isEmpty" | "isNotEmpty";
|
|
6
|
+
export type DateFilterOperator = "equals" | "notEquals" | "before" | "after" | "between" | "notBetween" | "isEmpty" | "isNotEmpty";
|
|
7
|
+
export type EnumFilterOperator = "in" | "notIn" | "isEmpty" | "isNotEmpty";
|
|
8
|
+
export type FilterOperator = StringFilterOperator | NumberFilterOperator | BooleanFilterOperator | DateFilterOperator | EnumFilterOperator;
|
|
9
|
+
export interface FilterCondition {
|
|
10
|
+
accessor: Accessor;
|
|
11
|
+
operator: FilterOperator;
|
|
12
|
+
value?: CellValue;
|
|
13
|
+
values?: CellValue[];
|
|
14
|
+
}
|
|
15
|
+
export interface TableFilterState {
|
|
16
|
+
[accessor: Accessor]: FilterCondition;
|
|
17
|
+
}
|
|
18
|
+
export declare const FILTER_OPERATOR_LABELS: Record<FilterOperator, string>;
|
|
19
|
+
export declare const getAvailableOperators: (columnType: "string" | "number" | "boolean" | "date" | "enum") => FilterOperator[];
|
|
20
|
+
export declare const requiresSingleValue: (operator: FilterOperator) => boolean;
|
|
21
|
+
export declare const requiresMultipleValues: (operator: FilterOperator) => boolean;
|
|
22
|
+
export declare const requiresNoValue: (operator: FilterOperator) => boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import HeaderObject from "./HeaderObject";
|
|
2
|
+
import type { PanelSection } from "./PanelSection";
|
|
3
|
+
export type FlattenedHeader = {
|
|
4
|
+
header: HeaderObject;
|
|
5
|
+
visualIndex: number;
|
|
6
|
+
depth: number;
|
|
7
|
+
parent: HeaderObject | null;
|
|
8
|
+
indexPath: number[];
|
|
9
|
+
panelSection?: PanelSection;
|
|
10
|
+
};
|