@simple-table/react 4.0.0 → 4.0.2
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/index.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/types/{react/src/PortalBridge.d.ts → PortalBridge.d.ts} +96 -96
- package/dist/types/{react/src/SimpleTable.d.ts → SimpleTable.d.ts} +27 -27
- package/dist/types/buildVanillaConfig.d.ts +6 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/{react/src/types.d.ts → types.d.ts} +111 -103
- package/dist/types/{react/src/utils → utils}/ImperativeDomSlot.d.ts +46 -46
- package/dist/types/{react/src/utils → utils}/headersEqual.d.ts +6 -6
- package/dist/types/{react/src/utils → utils}/rowsEqual.d.ts +6 -6
- package/dist/types/{react/src/utils → utils}/wrapReactRenderer.d.ts +95 -95
- package/package.json +12 -7
- package/styles.css.d.ts +1 -0
- package/dist/types/core/src/consts/column-constraints.d.ts +0 -58
- package/dist/types/core/src/consts/general-consts.d.ts +0 -32
- package/dist/types/core/src/core/SimpleTableVanilla.d.ts +0 -369
- package/dist/types/core/src/core/api/TableAPIImpl.d.ts +0 -78
- package/dist/types/core/src/core/dom/DOMManager.d.ts +0 -52
- package/dist/types/core/src/core/initialization/TableInitializer.d.ts +0 -34
- package/dist/types/core/src/core/rendering/RenderOrchestrator.d.ts +0 -172
- package/dist/types/core/src/core/rendering/SectionRenderer.d.ts +0 -119
- package/dist/types/core/src/core/rendering/TableRenderer.d.ts +0 -120
- package/dist/types/core/src/hooks/ariaAnnouncements.d.ts +0 -37
- package/dist/types/core/src/hooks/contentHeight.d.ts +0 -29
- package/dist/types/core/src/hooks/expandedDepths.d.ts +0 -69
- package/dist/types/core/src/hooks/handleOutsideClick.d.ts +0 -50
- package/dist/types/core/src/hooks/previousValue.d.ts +0 -30
- package/dist/types/core/src/hooks/scrollbarVisibility.d.ts +0 -65
- package/dist/types/core/src/hooks/scrollbarWidth.d.ts +0 -52
- package/dist/types/core/src/hooks/useAggregatedRows.d.ts +0 -14
- package/dist/types/core/src/hooks/useQuickFilter.d.ts +0 -14
- package/dist/types/core/src/hooks/windowResize.d.ts +0 -31
- package/dist/types/core/src/icons/AngleDownIcon.d.ts +0 -1
- package/dist/types/core/src/icons/AngleLeftIcon.d.ts +0 -1
- package/dist/types/core/src/icons/AngleRightIcon.d.ts +0 -1
- package/dist/types/core/src/icons/AngleUpIcon.d.ts +0 -1
- package/dist/types/core/src/icons/AscIcon.d.ts +0 -1
- package/dist/types/core/src/icons/CheckIcon.d.ts +0 -1
- package/dist/types/core/src/icons/DescIcon.d.ts +0 -1
- package/dist/types/core/src/icons/DragIcon.d.ts +0 -1
- package/dist/types/core/src/icons/FilterIcon.d.ts +0 -1
- package/dist/types/core/src/icons/SelectIcon.d.ts +0 -1
- package/dist/types/core/src/icons/index.d.ts +0 -14
- package/dist/types/core/src/index.d.ts +0 -58
- package/dist/types/core/src/managers/AnimationCoordinator.d.ts +0 -356
- package/dist/types/core/src/managers/AutoScaleManager.d.ts +0 -33
- package/dist/types/core/src/managers/DimensionManager.d.ts +0 -84
- package/dist/types/core/src/managers/DragHandlerManager.d.ts +0 -44
- package/dist/types/core/src/managers/FilterManager.d.ts +0 -36
- package/dist/types/core/src/managers/PivotManager.d.ts +0 -35
- package/dist/types/core/src/managers/RowManager.d.ts +0 -56
- package/dist/types/core/src/managers/RowSelectionManager.d.ts +0 -72
- package/dist/types/core/src/managers/ScrollManager.d.ts +0 -38
- package/dist/types/core/src/managers/SectionScrollController.d.ts +0 -74
- package/dist/types/core/src/managers/SelectionManager/SelectionManager.d.ts +0 -251
- package/dist/types/core/src/managers/SelectionManager/index.d.ts +0 -2
- package/dist/types/core/src/managers/SelectionManager/keyboardUtils.d.ts +0 -7
- package/dist/types/core/src/managers/SelectionManager/mouseUtils.d.ts +0 -16
- package/dist/types/core/src/managers/SelectionManager/selectionRangeUtils.d.ts +0 -7
- package/dist/types/core/src/managers/SelectionManager/types.d.ts +0 -28
- package/dist/types/core/src/managers/SortManager.d.ts +0 -42
- package/dist/types/core/src/types/AggregationTypes.d.ts +0 -8
- package/dist/types/core/src/types/AnimationsConfig.d.ts +0 -16
- package/dist/types/core/src/types/BoundingBox.d.ts +0 -11
- package/dist/types/core/src/types/Cell.d.ts +0 -7
- package/dist/types/core/src/types/CellChangeProps.d.ts +0 -9
- package/dist/types/core/src/types/CellClickProps.d.ts +0 -11
- package/dist/types/core/src/types/CellRendererProps.d.ts +0 -32
- package/dist/types/core/src/types/CellValue.d.ts +0 -2
- package/dist/types/core/src/types/ColumnEditorConfig.d.ts +0 -42
- package/dist/types/core/src/types/ColumnEditorCustomRendererProps.d.ts +0 -14
- package/dist/types/core/src/types/ColumnEditorRowRendererProps.d.ts +0 -39
- package/dist/types/core/src/types/ColumnVisibilityTypes.d.ts +0 -4
- package/dist/types/core/src/types/CustomTheme.d.ts +0 -28
- package/dist/types/core/src/types/DragHandlerProps.d.ts +0 -14
- package/dist/types/core/src/types/EnumOption.d.ts +0 -5
- package/dist/types/core/src/types/FilterTypes.d.ts +0 -31
- package/dist/types/core/src/types/FlattenedHeader.d.ts +0 -10
- package/dist/types/core/src/types/FooterPosition.d.ts +0 -3
- package/dist/types/core/src/types/FooterRendererProps.d.ts +0 -17
- package/dist/types/core/src/types/GenerateRowIdParams.d.ts +0 -11
- package/dist/types/core/src/types/GetRowId.d.ts +0 -16
- package/dist/types/core/src/types/HandleResizeStartProps.d.ts +0 -25
- package/dist/types/core/src/types/HeaderDropdownProps.d.ts +0 -14
- package/dist/types/core/src/types/HeaderObject.d.ts +0 -133
- package/dist/types/core/src/types/HeaderRendererProps.d.ts +0 -17
- package/dist/types/core/src/types/IconsConfig.d.ts +0 -19
- package/dist/types/core/src/types/OnNextPage.d.ts +0 -2
- package/dist/types/core/src/types/OnRowGroupExpandProps.d.ts +0 -16
- package/dist/types/core/src/types/OnSortProps.d.ts +0 -3
- package/dist/types/core/src/types/PanelSection.d.ts +0 -1
- package/dist/types/core/src/types/Pinned.d.ts +0 -1
- package/dist/types/core/src/types/PinnedSectionsState.d.ts +0 -6
- package/dist/types/core/src/types/PivotTypes.d.ts +0 -37
- package/dist/types/core/src/types/QuickFilterTypes.d.ts +0 -21
- package/dist/types/core/src/types/Row.d.ts +0 -3
- package/dist/types/core/src/types/RowButton.d.ts +0 -6
- package/dist/types/core/src/types/RowId.d.ts +0 -1
- package/dist/types/core/src/types/RowSelectionChangeProps.d.ts +0 -7
- package/dist/types/core/src/types/RowSelectionMode.d.ts +0 -8
- package/dist/types/core/src/types/RowState.d.ts +0 -12
- package/dist/types/core/src/types/RowStateRendererProps.d.ts +0 -18
- package/dist/types/core/src/types/SharedTableProps.d.ts +0 -24
- package/dist/types/core/src/types/SimpleTableConfig.d.ts +0 -124
- package/dist/types/core/src/types/SimpleTableProps.d.ts +0 -125
- package/dist/types/core/src/types/SortColumn.d.ts +0 -8
- package/dist/types/core/src/types/TableAPI.d.ts +0 -82
- package/dist/types/core/src/types/TableHeaderProps.d.ts +0 -17
- package/dist/types/core/src/types/TableRow.d.ts +0 -39
- package/dist/types/core/src/types/TableRowProps.d.ts +0 -29
- package/dist/types/core/src/types/Theme.d.ts +0 -2
- package/dist/types/core/src/types/UpdateCellProps.d.ts +0 -8
- package/dist/types/core/src/utils/accordionAnimation.d.ts +0 -25
- package/dist/types/core/src/utils/aggregationUtils.d.ts +0 -7
- package/dist/types/core/src/utils/ariaRowOwnership.d.ts +0 -37
- package/dist/types/core/src/utils/asRows.d.ts +0 -7
- package/dist/types/core/src/utils/bodyCell/cellLiveRef.d.ts +0 -9
- package/dist/types/core/src/utils/bodyCell/content.d.ts +0 -5
- package/dist/types/core/src/utils/bodyCell/editing.d.ts +0 -4
- package/dist/types/core/src/utils/bodyCell/editors/booleanDropdown.d.ts +0 -2
- package/dist/types/core/src/utils/bodyCell/editors/datePicker.d.ts +0 -2
- package/dist/types/core/src/utils/bodyCell/editors/dropdown.d.ts +0 -18
- package/dist/types/core/src/utils/bodyCell/editors/enumDropdown.d.ts +0 -2
- package/dist/types/core/src/utils/bodyCell/eventTracking.d.ts +0 -3
- package/dist/types/core/src/utils/bodyCell/expansion.d.ts +0 -12
- package/dist/types/core/src/utils/bodyCell/selection.d.ts +0 -7
- package/dist/types/core/src/utils/bodyCell/styling.d.ts +0 -11
- package/dist/types/core/src/utils/bodyCell/types.d.ts +0 -170
- package/dist/types/core/src/utils/bodyCellRenderer.d.ts +0 -6
- package/dist/types/core/src/utils/cellClipboardUtils.d.ts +0 -25
- package/dist/types/core/src/utils/cellScrollUtils.d.ts +0 -10
- package/dist/types/core/src/utils/cellUtils.d.ts +0 -18
- package/dist/types/core/src/utils/charts/createBarChart.d.ts +0 -20
- package/dist/types/core/src/utils/charts/createLineAreaChart.d.ts +0 -25
- package/dist/types/core/src/utils/collapseUtils.d.ts +0 -31
- package/dist/types/core/src/utils/columnEditor/columnEditorUtils.d.ts +0 -27
- package/dist/types/core/src/utils/columnEditor/createCheckbox.d.ts +0 -21
- package/dist/types/core/src/utils/columnEditor/createColumnEditor.d.ts +0 -26
- package/dist/types/core/src/utils/columnEditor/createColumnEditorPopout.d.ts +0 -23
- package/dist/types/core/src/utils/columnEditor/createColumnEditorRow.d.ts +0 -41
- package/dist/types/core/src/utils/csvExportUtils.d.ts +0 -14
- package/dist/types/core/src/utils/dateUtils.d.ts +0 -18
- package/dist/types/core/src/utils/externalScroll.d.ts +0 -58
- package/dist/types/core/src/utils/filterUtils.d.ts +0 -5
- package/dist/types/core/src/utils/filters/createBooleanFilter.d.ts +0 -15
- package/dist/types/core/src/utils/filters/createCustomSelect.d.ts +0 -20
- package/dist/types/core/src/utils/filters/createDateFilter.d.ts +0 -15
- package/dist/types/core/src/utils/filters/createDatePicker.d.ts +0 -10
- package/dist/types/core/src/utils/filters/createDropdown.d.ts +0 -33
- package/dist/types/core/src/utils/filters/createEnumFilter.d.ts +0 -15
- package/dist/types/core/src/utils/filters/createFilterActions.d.ts +0 -12
- package/dist/types/core/src/utils/filters/createFilterDropdown.d.ts +0 -15
- package/dist/types/core/src/utils/filters/createFilterInput.d.ts +0 -16
- package/dist/types/core/src/utils/filters/createNumberFilter.d.ts +0 -15
- package/dist/types/core/src/utils/filters/createStringFilter.d.ts +0 -15
- package/dist/types/core/src/utils/footer/createTableFooter.d.ts +0 -21
- package/dist/types/core/src/utils/formatters.d.ts +0 -3
- package/dist/types/core/src/utils/generalUtils.d.ts +0 -4
- package/dist/types/core/src/utils/headerCell/collapsing.d.ts +0 -6
- package/dist/types/core/src/utils/headerCell/dragging.d.ts +0 -5
- package/dist/types/core/src/utils/headerCell/editing.d.ts +0 -4
- package/dist/types/core/src/utils/headerCell/eventTracking.d.ts +0 -28
- package/dist/types/core/src/utils/headerCell/filtering.d.ts +0 -3
- package/dist/types/core/src/utils/headerCell/resizing.d.ts +0 -3
- package/dist/types/core/src/utils/headerCell/selection.d.ts +0 -10
- package/dist/types/core/src/utils/headerCell/sorting.d.ts +0 -3
- package/dist/types/core/src/utils/headerCell/styling.d.ts +0 -7
- package/dist/types/core/src/utils/headerCell/types.d.ts +0 -110
- package/dist/types/core/src/utils/headerCellRenderer.d.ts +0 -4
- package/dist/types/core/src/utils/headerUtils.d.ts +0 -41
- package/dist/types/core/src/utils/headerWidthUtils.d.ts +0 -121
- package/dist/types/core/src/utils/horizontalScrollbarRenderer.d.ts +0 -27
- package/dist/types/core/src/utils/infiniteScrollUtils.d.ts +0 -145
- package/dist/types/core/src/utils/nestedGridRowRenderer.d.ts +0 -50
- package/dist/types/core/src/utils/pinnedColumnUtils.d.ts +0 -29
- package/dist/types/core/src/utils/pivot/pivotRows.d.ts +0 -16
- package/dist/types/core/src/utils/propSyncEqual.d.ts +0 -60
- package/dist/types/core/src/utils/quickFilterUtils.d.ts +0 -14
- package/dist/types/core/src/utils/resizeUtils/autoExpandResize.d.ts +0 -32
- package/dist/types/core/src/utils/resizeUtils/compensation.d.ts +0 -17
- package/dist/types/core/src/utils/resizeUtils/domUpdates.d.ts +0 -15
- package/dist/types/core/src/utils/resizeUtils/index.d.ts +0 -26
- package/dist/types/core/src/utils/resizeUtils/maxWidth.d.ts +0 -9
- package/dist/types/core/src/utils/resizeUtils/parentHeaderResize.d.ts +0 -11
- package/dist/types/core/src/utils/resizeUtils/sectionWidths.d.ts +0 -36
- package/dist/types/core/src/utils/rowFlattening.d.ts +0 -30
- package/dist/types/core/src/utils/rowProcessing.d.ts +0 -65
- package/dist/types/core/src/utils/rowSelectionUtils.d.ts +0 -62
- package/dist/types/core/src/utils/rowSeparatorRenderer.d.ts +0 -16
- package/dist/types/core/src/utils/rowUtils.d.ts +0 -187
- package/dist/types/core/src/utils/sortUtils.d.ts +0 -8
- package/dist/types/core/src/utils/stateRowRenderer.d.ts +0 -15
- package/dist/types/core/src/utils/stickyParentsRenderer.d.ts +0 -53
- package/dist/types/react/src/buildVanillaConfig.d.ts +0 -4
- package/dist/types/react/src/index.d.ts +0 -5
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import { SimpleTableConfig } from "../../types/SimpleTableConfig";
|
|
2
|
-
import { CustomTheme } from "../../types/CustomTheme";
|
|
3
|
-
import HeaderObject, { Accessor } from "../../types/HeaderObject";
|
|
4
|
-
import Row from "../../types/Row";
|
|
5
|
-
import RowState from "../../types/RowState";
|
|
6
|
-
import { DimensionManager } from "../../managers/DimensionManager";
|
|
7
|
-
import { ScrollManager } from "../../managers/ScrollManager";
|
|
8
|
-
import type { SectionScrollController } from "../../managers/SectionScrollController";
|
|
9
|
-
import { SortManager } from "../../managers/SortManager";
|
|
10
|
-
import { FilterManager } from "../../managers/FilterManager";
|
|
11
|
-
import { SelectionManager } from "../../managers/SelectionManager";
|
|
12
|
-
import { RowSelectionManager } from "../../managers/RowSelectionManager";
|
|
13
|
-
import type { AnimationCoordinator, CellPosition } from "../../managers/AnimationCoordinator";
|
|
14
|
-
import type { AccordionAxis } from "../../utils/accordionAnimation";
|
|
15
|
-
import type { NestedTableFactory } from "../../utils/nestedGridRowRenderer";
|
|
16
|
-
import { FlattenRowsResult } from "../../utils/rowFlattening";
|
|
17
|
-
import { ProcessRowsResult } from "../../utils/rowProcessing";
|
|
18
|
-
import { MergedColumnEditorConfig, ResolvedIcons } from "../initialization/TableInitializer";
|
|
19
|
-
export interface RenderContext {
|
|
20
|
-
/**
|
|
21
|
-
* Active accordion animation axis for this render. Set on row-grouping or
|
|
22
|
-
* nested-column collapse/expand toggles (see
|
|
23
|
-
* {@link SimpleTableVanilla.beginAccordionAnimation}). Cell renderers use it
|
|
24
|
-
* to initialize incoming cells at zero size in the named axis so the CSS
|
|
25
|
-
* size transition can grow them while sibling cells FLIP into place.
|
|
26
|
-
*/
|
|
27
|
-
accordionAxis?: AccordionAxis;
|
|
28
|
-
animationCoordinator?: AnimationCoordinator;
|
|
29
|
-
cellRegistry: Map<string, any>;
|
|
30
|
-
collapsedHeaders: Set<Accessor>;
|
|
31
|
-
collapsedRows: Map<string, number>;
|
|
32
|
-
config: SimpleTableConfig;
|
|
33
|
-
customTheme: CustomTheme;
|
|
34
|
-
dimensionManager: DimensionManager | null;
|
|
35
|
-
draggedHeaderRef: {
|
|
36
|
-
current: HeaderObject | null;
|
|
37
|
-
};
|
|
38
|
-
effectiveHeaders: HeaderObject[];
|
|
39
|
-
essentialAccessors: Set<string>;
|
|
40
|
-
expandedDepths: Set<number>;
|
|
41
|
-
expandedRows: Map<string, number>;
|
|
42
|
-
filterManager: FilterManager | null;
|
|
43
|
-
getCollapsedRows: () => Map<string, number>;
|
|
44
|
-
getCollapsedHeaders?: () => Set<Accessor>;
|
|
45
|
-
getExpandedRows: () => Map<string, number>;
|
|
46
|
-
getHeaders: () => HeaderObject[];
|
|
47
|
-
/** Pristine snapshot of the configured column definitions — the reset target for the column editor's reset button. */
|
|
48
|
-
getPristineDefaultHeaders: () => HeaderObject[];
|
|
49
|
-
getRowStateMap: () => Map<string | number, RowState>;
|
|
50
|
-
headerRegistry: Map<string, any>;
|
|
51
|
-
headers: HeaderObject[];
|
|
52
|
-
/**
|
|
53
|
-
* Unique id for this table instance. Scopes row-hover cell tracking so
|
|
54
|
-
* multiple tables on one page with overlapping rowIds don't cross-hover.
|
|
55
|
-
*/
|
|
56
|
-
hoverScopeId: string;
|
|
57
|
-
hoveredHeaderRef: {
|
|
58
|
-
current: HeaderObject | null;
|
|
59
|
-
};
|
|
60
|
-
internalIsLoading: boolean;
|
|
61
|
-
isResizing: boolean;
|
|
62
|
-
localRows: Row[];
|
|
63
|
-
/** Injected factory for nested grid tables (breaks the SimpleTableVanilla import cycle). */
|
|
64
|
-
createNestedTable?: NestedTableFactory;
|
|
65
|
-
mainBodyRef: {
|
|
66
|
-
current: HTMLDivElement | null;
|
|
67
|
-
};
|
|
68
|
-
mainHeaderRef: {
|
|
69
|
-
current: HTMLDivElement | null;
|
|
70
|
-
};
|
|
71
|
-
onRender: () => void;
|
|
72
|
-
/** Natural-width shrink floors (accessor -> px) for auto-expand column resize. */
|
|
73
|
-
getShrinkFloors?: () => Map<string, number>;
|
|
74
|
-
/** Persist user-set widths (drag / double-click auto-fit) as natural widths. */
|
|
75
|
-
onAutoExpandNaturalWidths?: (widths: Map<string, number>) => void;
|
|
76
|
-
pinnedLeftHeaderRef: {
|
|
77
|
-
current: HTMLDivElement | null;
|
|
78
|
-
};
|
|
79
|
-
pinnedLeftRef: {
|
|
80
|
-
current: HTMLDivElement | null;
|
|
81
|
-
};
|
|
82
|
-
pinnedRightHeaderRef: {
|
|
83
|
-
current: HTMLDivElement | null;
|
|
84
|
-
};
|
|
85
|
-
pinnedRightRef: {
|
|
86
|
-
current: HTMLDivElement | null;
|
|
87
|
-
};
|
|
88
|
-
resolvedIcons: ResolvedIcons;
|
|
89
|
-
rowSelectionManager: RowSelectionManager | null;
|
|
90
|
-
rowStateMap: Map<string | number, RowState>;
|
|
91
|
-
scrollManager: ScrollManager | null;
|
|
92
|
-
sectionScrollController: SectionScrollController | null;
|
|
93
|
-
selectionManager: SelectionManager | null;
|
|
94
|
-
setCollapsedHeaders: (headers: Set<Accessor>) => void;
|
|
95
|
-
setCollapsedRows: (rows: Map<string, number>) => void;
|
|
96
|
-
setColumnEditorOpen: (open: boolean) => void;
|
|
97
|
-
setCurrentPage: (page: number) => void;
|
|
98
|
-
setExpandedRows: (rows: Map<string, number>) => void;
|
|
99
|
-
setHeaders: (headers: HeaderObject[]) => void;
|
|
100
|
-
setIsResizing: (value: boolean) => void;
|
|
101
|
-
setRowStateMap: (map: Map<string | number, any>) => void;
|
|
102
|
-
sortManager: SortManager | null;
|
|
103
|
-
/** When true, body cells that stay visible get only position updates (no content/selection recalc). Used during vertical scroll for performance. */
|
|
104
|
-
positionOnlyBody?: boolean;
|
|
105
|
-
/**
|
|
106
|
-
* Visible portion of the table inside an external scroll parent (in pixels).
|
|
107
|
-
* Set by {@link SimpleTableVanilla} per render when `config.scrollParent` is
|
|
108
|
-
* active and no explicit `height`/`maxHeight` is set. Drives virtualization
|
|
109
|
-
* the same way an explicit `height` does, but the scroll source is external.
|
|
110
|
-
*/
|
|
111
|
-
externalViewportHeight?: number;
|
|
112
|
-
}
|
|
113
|
-
export interface RenderState {
|
|
114
|
-
currentPage: number;
|
|
115
|
-
scrollTop: number;
|
|
116
|
-
scrollDirection: "up" | "down" | "none";
|
|
117
|
-
scrollbarWidth: number;
|
|
118
|
-
isMainSectionScrollable: boolean;
|
|
119
|
-
columnEditorOpen: boolean;
|
|
120
|
-
}
|
|
121
|
-
export declare class RenderOrchestrator {
|
|
122
|
-
private tableRenderer;
|
|
123
|
-
private lastHeadersRef;
|
|
124
|
-
private lastRowsRef;
|
|
125
|
-
private flattenedRowsCache;
|
|
126
|
-
private lastProcessedResult;
|
|
127
|
-
/** Fingerprint for skipping pagination + height-map work on vertical scroll frames. */
|
|
128
|
-
private processRowsScrollReuseKey;
|
|
129
|
-
private processRowsScrollReuseBase;
|
|
130
|
-
/** Last painted virtual row range on scroll-raf; when unchanged, DOM work is redundant (native scroll moves content). */
|
|
131
|
-
private lastScrollRafPaintedRange;
|
|
132
|
-
/** Reuse normalized headers across scroll frames when layout inputs are unchanged. */
|
|
133
|
-
private scrollRafHeadersMemo;
|
|
134
|
-
constructor();
|
|
135
|
-
getCachedFlattenResult(): FlattenRowsResult | null;
|
|
136
|
-
getLastProcessedResult(): ProcessRowsResult | null;
|
|
137
|
-
/** See {@link TableRenderer.getCurrentBodyLayouts}. */
|
|
138
|
-
getCurrentBodyLayouts(): Map<HTMLElement, Map<string, CellPosition>>;
|
|
139
|
-
setOnRendererHostDiscard(cb: ((host: HTMLElement) => void) | undefined): void;
|
|
140
|
-
invalidateCache(type?: "body" | "header" | "context" | "all"): void;
|
|
141
|
-
computeEffectiveHeaders(headers: HeaderObject[], config: SimpleTableConfig, customTheme: CustomTheme, containerWidth?: number): HeaderObject[];
|
|
142
|
-
/**
|
|
143
|
-
* Warms flattened/processed row caches so imperative APIs (e.g. getVisibleRows) are
|
|
144
|
-
* correct before the first ResizeObserver-driven render, without mutating the DOM.
|
|
145
|
-
*/
|
|
146
|
-
primeLastProcessedResult(context: RenderContext, state: RenderState): void;
|
|
147
|
-
private buildRowModelSnapshot;
|
|
148
|
-
render(elements: {
|
|
149
|
-
bodyContainer: HTMLElement;
|
|
150
|
-
content: HTMLElement;
|
|
151
|
-
contentWrapper: HTMLElement;
|
|
152
|
-
footerContainer: HTMLElement;
|
|
153
|
-
headerContainer: HTMLElement;
|
|
154
|
-
rootElement: HTMLElement;
|
|
155
|
-
wrapperContainer: HTMLElement;
|
|
156
|
-
}, refs: {
|
|
157
|
-
mainBodyRef: {
|
|
158
|
-
current: HTMLDivElement | null;
|
|
159
|
-
};
|
|
160
|
-
tableBodyContainerRef: {
|
|
161
|
-
current: HTMLDivElement | null;
|
|
162
|
-
};
|
|
163
|
-
}, context: RenderContext, state: RenderState, mergedColumnEditorConfig: MergedColumnEditorConfig): void;
|
|
164
|
-
private renderHeader;
|
|
165
|
-
private renderBody;
|
|
166
|
-
private renderFooter;
|
|
167
|
-
private renderColumnEditor;
|
|
168
|
-
private renderHorizontalScrollbar;
|
|
169
|
-
private registerSectionPanes;
|
|
170
|
-
private buildRendererDeps;
|
|
171
|
-
cleanup(): void;
|
|
172
|
-
}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import HeaderObject, { Accessor } from "../../types/HeaderObject";
|
|
2
|
-
import { HeaderRenderContext } from "../../utils/headerCellRenderer";
|
|
3
|
-
import { CellRenderContext } from "../../utils/bodyCellRenderer";
|
|
4
|
-
import TableRow from "../../types/TableRow";
|
|
5
|
-
import type { AnimationCoordinator, CellPosition } from "../../managers/AnimationCoordinator";
|
|
6
|
-
export interface HeaderSectionParams {
|
|
7
|
-
headers: HeaderObject[];
|
|
8
|
-
collapsedHeaders: Set<Accessor>;
|
|
9
|
-
pinned?: "left" | "right";
|
|
10
|
-
maxHeaderDepth: number;
|
|
11
|
-
headerHeight: number;
|
|
12
|
-
context: HeaderRenderContext;
|
|
13
|
-
sectionWidth?: number;
|
|
14
|
-
startColIndex?: number;
|
|
15
|
-
}
|
|
16
|
-
export interface BodySectionParams {
|
|
17
|
-
headers: HeaderObject[];
|
|
18
|
-
rows: TableRow[];
|
|
19
|
-
collapsedHeaders: Set<Accessor>;
|
|
20
|
-
pinned?: "left" | "right";
|
|
21
|
-
context: CellRenderContext;
|
|
22
|
-
sectionWidth?: number;
|
|
23
|
-
rowHeight: number;
|
|
24
|
-
heightOffsets?: Array<[number, number]>;
|
|
25
|
-
totalRowCount?: number;
|
|
26
|
-
startColIndex?: number;
|
|
27
|
-
/** When true, only update cell positions for existing cells (scroll performance). */
|
|
28
|
-
positionOnly?: boolean;
|
|
29
|
-
/** Full table rows ref + range for range-based body cell cache (avoids cache miss on every scroll). */
|
|
30
|
-
fullTableRows?: TableRow[];
|
|
31
|
-
renderedStartIndex?: number;
|
|
32
|
-
renderedEndIndex?: number;
|
|
33
|
-
/** Full pre-pagination flattened rows (used by animation snapshot to include
|
|
34
|
-
* off-page rows so cross-page sort can FLIP cells in/out from off-screen). */
|
|
35
|
-
allFlattenedRows?: TableRow[];
|
|
36
|
-
/** Global flattened-list index where the current page starts. Used to offset
|
|
37
|
-
* absolute positions in {@link allFlattenedRows} so on-page rows align with
|
|
38
|
-
* the page-relative DOM positions while off-page rows fall above/below. */
|
|
39
|
-
pageStartIndex?: number;
|
|
40
|
-
/** When provided, body cell renderer hands outgoing cells to the coordinator
|
|
41
|
-
* for FLIP-style out-animation instead of removing them immediately. */
|
|
42
|
-
animationCoordinator?: AnimationCoordinator;
|
|
43
|
-
}
|
|
44
|
-
export declare class SectionRenderer {
|
|
45
|
-
private headerSections;
|
|
46
|
-
private bodySections;
|
|
47
|
-
/**
|
|
48
|
-
* Callback fired before a body cell host element is permanently removed in
|
|
49
|
-
* the {@link invalidateCache} "all" path (which wipes every rendered cell).
|
|
50
|
-
* Threaded down from the table config so framework adapters can tear down
|
|
51
|
-
* renderer subtrees (React portals, etc.) before the nodes are discarded.
|
|
52
|
-
*/
|
|
53
|
-
private onRendererHostDiscard?;
|
|
54
|
-
private bodyCellsCache;
|
|
55
|
-
private headerCellsCache;
|
|
56
|
-
private contextCache;
|
|
57
|
-
private bodySectionSnapshots;
|
|
58
|
-
private nextColIndexMap;
|
|
59
|
-
private stateRowsMap;
|
|
60
|
-
private nestedGridRowsMap;
|
|
61
|
-
renderHeaderSection(params: HeaderSectionParams): HTMLElement;
|
|
62
|
-
renderBodySection(params: BodySectionParams): HTMLElement;
|
|
63
|
-
private renderNestedGridRows;
|
|
64
|
-
private renderStateRows;
|
|
65
|
-
private calculateAbsoluteHeaderCells;
|
|
66
|
-
private calculateAbsoluteBodyCells;
|
|
67
|
-
private getLeafHeaders;
|
|
68
|
-
private createHeadersHash;
|
|
69
|
-
private createHeightOffsetsHash;
|
|
70
|
-
private createContextHash;
|
|
71
|
-
private getCachedBodyCells;
|
|
72
|
-
private getCachedHeaderCells;
|
|
73
|
-
private getCachedContext;
|
|
74
|
-
setOnRendererHostDiscard(cb: ((host: HTMLElement) => void) | undefined): void;
|
|
75
|
-
invalidateCache(type?: "body" | "header" | "context" | "all"): void;
|
|
76
|
-
/**
|
|
77
|
-
* Get the next colIndex after rendering a section
|
|
78
|
-
*/
|
|
79
|
-
getNextColIndex(sectionKey: string): number;
|
|
80
|
-
/**
|
|
81
|
-
* Build a per-section layout map covering every cell in the dataset (every
|
|
82
|
-
* row × every leaf header), not just the cells in the current virtualization
|
|
83
|
-
* band. Used by the animation coordinator: it needs positions for off-screen
|
|
84
|
-
* rows so that:
|
|
85
|
-
*
|
|
86
|
-
* - Cells that newly enter the visible band (e.g. row sorted from bottom
|
|
87
|
-
* to top) can FLIP in from their actual pre-change off-screen `top`.
|
|
88
|
-
* - Cells that leave the visible band (e.g. row sorted from top to
|
|
89
|
-
* bottom) can be retained and slid to their actual post-change
|
|
90
|
-
* off-screen `top` before being removed.
|
|
91
|
-
*
|
|
92
|
-
* The body container clips overflow so cells whose interpolated position
|
|
93
|
-
* falls outside the viewport simply aren't painted — the animation looks
|
|
94
|
-
* like a slide in from / out to the viewport edge.
|
|
95
|
-
*/
|
|
96
|
-
getCurrentBodyLayouts(): Map<HTMLElement, Map<string, CellPosition>>;
|
|
97
|
-
/**
|
|
98
|
-
* Compute every cell position the section currently knows about (every row
|
|
99
|
-
* × every leaf header), including positions for off-screen rows, by using
|
|
100
|
-
* the most recent snapshot config for `sectionKey`. Returns null if no
|
|
101
|
-
* snapshot has been captured for this section yet.
|
|
102
|
-
*/
|
|
103
|
-
getFullSectionLayout(sectionKey: string): Map<string, CellPosition> | null;
|
|
104
|
-
/**
|
|
105
|
-
* Refresh the per-section snapshot config so getCurrentBodyLayouts can
|
|
106
|
-
* recompute positions for any row × column combination the section
|
|
107
|
-
* currently knows about.
|
|
108
|
-
*/
|
|
109
|
-
private captureSnapshotConfig;
|
|
110
|
-
/**
|
|
111
|
-
* Tear down all body sections and forget them so a subsequent
|
|
112
|
-
* `renderBodySection` creates fresh nodes. Used when the empty-state path
|
|
113
|
-
* takes over the body container: clearing `innerHTML` alone leaves
|
|
114
|
-
* `renderedCells` pointing at detached nodes, so rows never remount when
|
|
115
|
-
* data returns (e.g. typing `-E` mid-filter briefly matches every row).
|
|
116
|
-
*/
|
|
117
|
-
releaseBodySections(): void;
|
|
118
|
-
cleanup(): void;
|
|
119
|
-
}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import HeaderObject, { Accessor } from "../../types/HeaderObject";
|
|
2
|
-
import { SimpleTableConfig } from "../../types/SimpleTableConfig";
|
|
3
|
-
import { CustomTheme } from "../../types/CustomTheme";
|
|
4
|
-
import { DimensionManager } from "../../managers/DimensionManager";
|
|
5
|
-
import type { SectionScrollController } from "../../managers/SectionScrollController";
|
|
6
|
-
import { SortManager } from "../../managers/SortManager";
|
|
7
|
-
import { FilterManager } from "../../managers/FilterManager";
|
|
8
|
-
import { SelectionManager } from "../../managers/SelectionManager";
|
|
9
|
-
import { RowSelectionManager } from "../../managers/RowSelectionManager";
|
|
10
|
-
import type { AnimationCoordinator, CellPosition } from "../../managers/AnimationCoordinator";
|
|
11
|
-
import type { AccordionAxis } from "../../utils/accordionAnimation";
|
|
12
|
-
import type { NestedTableFactory } from "../../utils/nestedGridRowRenderer";
|
|
13
|
-
export interface TableRendererDeps {
|
|
14
|
-
/** Accordion animation axis for the in-flight collapse/expand. See {@link RenderContext.accordionAxis}. */
|
|
15
|
-
accordionAxis?: AccordionAxis;
|
|
16
|
-
animationCoordinator?: AnimationCoordinator;
|
|
17
|
-
/**
|
|
18
|
-
* True when the table is using an external `scrollParent` (no `height`/`maxHeight`).
|
|
19
|
-
* In this mode the main body container does not scroll — the parent does — so
|
|
20
|
-
* the sticky-parents container reads its scrollTop from `stickyParentsScrollTop`
|
|
21
|
-
* (sourced from the table's external-aware state) instead of `mainBodyRef.scrollTop`.
|
|
22
|
-
*/
|
|
23
|
-
externalScrollActive?: boolean;
|
|
24
|
-
/** Externally-tracked scrollTop (already translated into table coordinates). */
|
|
25
|
-
stickyParentsScrollTop?: number;
|
|
26
|
-
cellRegistry: Map<string, any>;
|
|
27
|
-
collapsedHeaders: Set<Accessor>;
|
|
28
|
-
collapsedRows: Map<string, number>;
|
|
29
|
-
config: SimpleTableConfig;
|
|
30
|
-
customTheme: CustomTheme;
|
|
31
|
-
dimensionManager: DimensionManager | null;
|
|
32
|
-
draggedHeaderRef: {
|
|
33
|
-
current: HeaderObject | null;
|
|
34
|
-
};
|
|
35
|
-
effectiveHeaders: HeaderObject[];
|
|
36
|
-
essentialAccessors: Set<string>;
|
|
37
|
-
expandedDepths: Set<number>;
|
|
38
|
-
expandedRows: Map<string, number>;
|
|
39
|
-
filterManager: FilterManager | null;
|
|
40
|
-
getCollapsedHeaders?: () => Set<Accessor>;
|
|
41
|
-
getCollapsedRows: () => Map<string, number>;
|
|
42
|
-
getExpandedRows: () => Map<string, number>;
|
|
43
|
-
getHeaders: () => HeaderObject[];
|
|
44
|
-
/** Pristine snapshot of the configured column definitions — the reset target for the column editor's reset button. */
|
|
45
|
-
getPristineDefaultHeaders: () => HeaderObject[];
|
|
46
|
-
getRowStateMap: () => Map<string | number, any>;
|
|
47
|
-
headerRegistry: Map<string, any>;
|
|
48
|
-
headers: HeaderObject[];
|
|
49
|
-
/** Unique id for this table instance — scopes row-hover cell tracking. */
|
|
50
|
-
hoverScopeId: string;
|
|
51
|
-
hoveredHeaderRef: {
|
|
52
|
-
current: HeaderObject | null;
|
|
53
|
-
};
|
|
54
|
-
internalIsLoading: boolean;
|
|
55
|
-
isResizing: boolean;
|
|
56
|
-
localRows: any[];
|
|
57
|
-
mainBodyRef: {
|
|
58
|
-
current: HTMLDivElement | null;
|
|
59
|
-
};
|
|
60
|
-
mainHeaderRef: {
|
|
61
|
-
current: HTMLDivElement | null;
|
|
62
|
-
};
|
|
63
|
-
onRender: () => void;
|
|
64
|
-
/** Natural-width shrink floors (accessor -> px) for auto-expand column resize. */
|
|
65
|
-
getShrinkFloors?: () => Map<string, number>;
|
|
66
|
-
/** Persist user-set widths (drag / double-click auto-fit) as natural widths. */
|
|
67
|
-
onAutoExpandNaturalWidths?: (widths: Map<string, number>) => void;
|
|
68
|
-
pinnedLeftHeaderRef: {
|
|
69
|
-
current: HTMLDivElement | null;
|
|
70
|
-
};
|
|
71
|
-
pinnedLeftRef: {
|
|
72
|
-
current: HTMLDivElement | null;
|
|
73
|
-
};
|
|
74
|
-
pinnedRightHeaderRef: {
|
|
75
|
-
current: HTMLDivElement | null;
|
|
76
|
-
};
|
|
77
|
-
pinnedRightRef: {
|
|
78
|
-
current: HTMLDivElement | null;
|
|
79
|
-
};
|
|
80
|
-
positionOnlyBody?: boolean; /** When true, scroll path updates cell geometry only (no full content/selection refresh); row separators still sync. */
|
|
81
|
-
resolvedIcons: any;
|
|
82
|
-
rowSelectionManager: RowSelectionManager | null;
|
|
83
|
-
rowStateMap: Map<string | number, any>;
|
|
84
|
-
sectionScrollController: SectionScrollController | null;
|
|
85
|
-
selectionManager: SelectionManager | null;
|
|
86
|
-
setCollapsedHeaders: (headers: Set<Accessor>) => void;
|
|
87
|
-
setCollapsedRows: (rows: Map<string, number>) => void;
|
|
88
|
-
setExpandedRows: (rows: Map<string, number>) => void;
|
|
89
|
-
setHeaders: (headers: HeaderObject[]) => void;
|
|
90
|
-
setIsResizing: (value: boolean) => void;
|
|
91
|
-
setRowStateMap: (map: Map<string | number, any>) => void;
|
|
92
|
-
sortManager: SortManager | null;
|
|
93
|
-
/** Injected factory for nested grid tables (breaks the SimpleTableVanilla import cycle). */
|
|
94
|
-
createNestedTable?: NestedTableFactory;
|
|
95
|
-
}
|
|
96
|
-
export declare class TableRenderer {
|
|
97
|
-
private sectionRenderer;
|
|
98
|
-
private footerInstance;
|
|
99
|
-
private lastCustomFooterRenderer;
|
|
100
|
-
private lastCustomFooterKey;
|
|
101
|
-
private columnEditorInstance;
|
|
102
|
-
private horizontalScrollbarRef;
|
|
103
|
-
private scrollbarTimeoutId;
|
|
104
|
-
private stickyParentsContainer;
|
|
105
|
-
private sectionScrollController;
|
|
106
|
-
private renderScheduled;
|
|
107
|
-
private pendingRenderCallback;
|
|
108
|
-
constructor();
|
|
109
|
-
private scheduleRender;
|
|
110
|
-
setOnRendererHostDiscard(cb: ((host: HTMLElement) => void) | undefined): void;
|
|
111
|
-
invalidateCache(type?: "body" | "header" | "context" | "all"): void;
|
|
112
|
-
/** See {@link SectionRenderer.getCurrentBodyLayouts}. */
|
|
113
|
-
getCurrentBodyLayouts(): Map<HTMLElement, Map<string, CellPosition>>;
|
|
114
|
-
renderHeader(container: HTMLElement, calculatedHeaderHeight: number, maxHeaderDepth: number, deps: TableRendererDeps): void;
|
|
115
|
-
renderBody(container: HTMLElement, processedResult: any, deps: TableRendererDeps): void;
|
|
116
|
-
renderFooter(container: HTMLElement, totalRows: number, currentPage: number, onPageChange: (page: number) => void, deps: TableRendererDeps): void;
|
|
117
|
-
renderColumnEditor(contentWrapper: HTMLElement, columnEditorOpen: boolean, setColumnEditorOpen: (open: boolean) => void, mergedColumnEditorConfig: any, deps: TableRendererDeps): void;
|
|
118
|
-
renderHorizontalScrollbar(wrapperContainer: HTMLElement, mainBodyWidth: number, pinnedLeftWidth: number, pinnedRightWidth: number, pinnedLeftContentWidth: number, pinnedRightContentWidth: number, tableBodyContainerRef: HTMLDivElement, deps: TableRendererDeps): void;
|
|
119
|
-
cleanup(): void;
|
|
120
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Manages aria-live announcements for screen readers.
|
|
3
|
-
* This is a vanilla JS alternative to the useAriaAnnouncements hook.
|
|
4
|
-
*
|
|
5
|
-
* Provides a way to announce dynamic content changes to assistive technologies.
|
|
6
|
-
*/
|
|
7
|
-
export declare class AriaAnnouncementManager {
|
|
8
|
-
private announcement;
|
|
9
|
-
private timeoutId;
|
|
10
|
-
private observers;
|
|
11
|
-
/**
|
|
12
|
-
* Announces a message to screen readers
|
|
13
|
-
* The message will be cleared after 1 second to allow for new announcements
|
|
14
|
-
* @param message - The message to announce
|
|
15
|
-
*/
|
|
16
|
-
announce(message: string): void;
|
|
17
|
-
/**
|
|
18
|
-
* Gets the current announcement message
|
|
19
|
-
* @returns The current announcement string
|
|
20
|
-
*/
|
|
21
|
-
getAnnouncement(): string;
|
|
22
|
-
/**
|
|
23
|
-
* Subscribes to announcement changes
|
|
24
|
-
* @param callback - Function to call when announcement changes
|
|
25
|
-
* @returns Unsubscribe function
|
|
26
|
-
*/
|
|
27
|
-
subscribe(callback: (message: string) => void): () => void;
|
|
28
|
-
/**
|
|
29
|
-
* Notifies all observers of announcement changes
|
|
30
|
-
*/
|
|
31
|
-
private notifyObservers;
|
|
32
|
-
/**
|
|
33
|
-
* Cleans up the manager and clears any pending timeouts
|
|
34
|
-
*/
|
|
35
|
-
destroy(): void;
|
|
36
|
-
}
|
|
37
|
-
export default AriaAnnouncementManager;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export interface ContentHeightConfig {
|
|
2
|
-
height?: string | number;
|
|
3
|
-
maxHeight?: string | number;
|
|
4
|
-
rowHeight: number;
|
|
5
|
-
shouldPaginate?: boolean;
|
|
6
|
-
rowsPerPage?: number;
|
|
7
|
-
totalRowCount: number;
|
|
8
|
-
headerHeight?: number;
|
|
9
|
-
footerHeight?: number;
|
|
10
|
-
/**
|
|
11
|
-
* Visible portion of the table inside an external scroll parent (in pixels).
|
|
12
|
-
* Only consulted when neither `height` nor `maxHeight` is set; enables
|
|
13
|
-
* virtualization driven by a window- or element-level scroller.
|
|
14
|
-
*/
|
|
15
|
-
externalViewportHeight?: number;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Converts a height value (string or number) to pixels
|
|
19
|
-
*/
|
|
20
|
-
export declare const convertHeightToPixels: (heightValue: string | number, container?: Element | null) => number;
|
|
21
|
-
/**
|
|
22
|
-
* Calculates the content height for the table.
|
|
23
|
-
* This is a pure function alternative to the useContentHeight hook.
|
|
24
|
-
*
|
|
25
|
-
* @param config - Configuration for content height calculation
|
|
26
|
-
* @returns The calculated content height in pixels, or undefined to disable virtualization
|
|
27
|
-
*/
|
|
28
|
-
export declare const calculateContentHeight: ({ height, maxHeight, rowHeight, shouldPaginate, rowsPerPage, totalRowCount, headerHeight, footerHeight, externalViewportHeight, }: ContentHeightConfig) => number | undefined;
|
|
29
|
-
export default calculateContentHeight;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { Accessor } from "../types/HeaderObject";
|
|
2
|
-
/**
|
|
3
|
-
* Initialize expandedDepths based on expandAll prop and rowGrouping
|
|
4
|
-
*/
|
|
5
|
-
export declare const initializeExpandedDepths: (expandAll: boolean, rowGrouping?: Accessor[]) => Set<number>;
|
|
6
|
-
/**
|
|
7
|
-
* Manages expanded depths state for row grouping.
|
|
8
|
-
* This is a vanilla JS alternative to the useExpandedDepths hook.
|
|
9
|
-
*/
|
|
10
|
-
export declare class ExpandedDepthsManager {
|
|
11
|
-
private expandedDepths;
|
|
12
|
-
private observers;
|
|
13
|
-
/** Coalesce sync collapseAll→expandDepth into a single observer notification. */
|
|
14
|
-
private notifyMicrotaskScheduled;
|
|
15
|
-
constructor(expandAll: boolean, rowGrouping?: Accessor[]);
|
|
16
|
-
/**
|
|
17
|
-
* Updates the expanded depths when rowGrouping changes
|
|
18
|
-
* Filters out depths that are now out of range
|
|
19
|
-
* @param rowGrouping - The current row grouping configuration
|
|
20
|
-
*/
|
|
21
|
-
updateRowGrouping(rowGrouping?: Accessor[]): void;
|
|
22
|
-
/**
|
|
23
|
-
* Gets the current expanded depths
|
|
24
|
-
* @returns Set of expanded depth numbers
|
|
25
|
-
*/
|
|
26
|
-
getExpandedDepths(): Set<number>;
|
|
27
|
-
/**
|
|
28
|
-
* Sets the expanded depths
|
|
29
|
-
* @param depths - New set of expanded depths
|
|
30
|
-
*/
|
|
31
|
-
setExpandedDepths(depths: Set<number>): void;
|
|
32
|
-
/**
|
|
33
|
-
* Subscribes to expanded depths changes
|
|
34
|
-
* @param callback - Function to call when depths change
|
|
35
|
-
* @returns Unsubscribe function
|
|
36
|
-
*/
|
|
37
|
-
subscribe(callback: (depths: Set<number>) => void): () => void;
|
|
38
|
-
/**
|
|
39
|
-
* Notifies all observers of depth changes.
|
|
40
|
-
* Batched to a microtask so collapseAll() + expandDepth(0) in one turn
|
|
41
|
-
* (marketing "Only Divisions") triggers a single render with the final depths.
|
|
42
|
-
*/
|
|
43
|
-
private notifyObservers;
|
|
44
|
-
/**
|
|
45
|
-
* Expands all depths
|
|
46
|
-
*/
|
|
47
|
-
expandAll(): void;
|
|
48
|
-
/**
|
|
49
|
-
* Collapses all depths
|
|
50
|
-
*/
|
|
51
|
-
collapseAll(): void;
|
|
52
|
-
/**
|
|
53
|
-
* Expands a specific depth
|
|
54
|
-
*/
|
|
55
|
-
expandDepth(depth: number): void;
|
|
56
|
-
/**
|
|
57
|
-
* Collapses a specific depth
|
|
58
|
-
*/
|
|
59
|
-
collapseDepth(depth: number): void;
|
|
60
|
-
/**
|
|
61
|
-
* Toggles a specific depth
|
|
62
|
-
*/
|
|
63
|
-
toggleDepth(depth: number): void;
|
|
64
|
-
/**
|
|
65
|
-
* Cleans up the manager
|
|
66
|
-
*/
|
|
67
|
-
destroy(): void;
|
|
68
|
-
}
|
|
69
|
-
export default ExpandedDepthsManager;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import HeaderObject from "../types/HeaderObject";
|
|
2
|
-
import Cell from "../types/Cell";
|
|
3
|
-
export interface HandleOutsideClickConfig {
|
|
4
|
-
selectableColumns: boolean;
|
|
5
|
-
selectedCells: Set<string>;
|
|
6
|
-
selectedColumns: Set<number>;
|
|
7
|
-
setSelectedCells: (cells: Set<string>) => void;
|
|
8
|
-
setSelectedColumns: (columns: Set<number>) => void;
|
|
9
|
-
activeHeaderDropdown?: HeaderObject | null;
|
|
10
|
-
setActiveHeaderDropdown?: (header: HeaderObject | null) => void;
|
|
11
|
-
startCell?: {
|
|
12
|
-
current: Cell | null;
|
|
13
|
-
};
|
|
14
|
-
/** When provided, used to read current selection (avoids stale refs). */
|
|
15
|
-
getSelectedCells?: () => Set<string>;
|
|
16
|
-
getSelectedColumns?: () => Set<number>;
|
|
17
|
-
/** When provided, called to clear both cell/column selection and startCell in one go. */
|
|
18
|
-
onClearSelection?: () => void;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Manages outside click detection for cells, columns, and header dropdowns.
|
|
22
|
-
* This is a vanilla JS alternative to the useHandleOutsideClick hook.
|
|
23
|
-
*/
|
|
24
|
-
export declare class HandleOutsideClickManager {
|
|
25
|
-
private config;
|
|
26
|
-
private isListening;
|
|
27
|
-
constructor(config: HandleOutsideClickConfig);
|
|
28
|
-
/**
|
|
29
|
-
* Updates the configuration
|
|
30
|
-
* @param config - New configuration
|
|
31
|
-
*/
|
|
32
|
-
updateConfig(config: Partial<HandleOutsideClickConfig>): void;
|
|
33
|
-
/**
|
|
34
|
-
* Handles the mousedown event
|
|
35
|
-
*/
|
|
36
|
-
private handleClickOutside;
|
|
37
|
-
/**
|
|
38
|
-
* Starts listening to mousedown events
|
|
39
|
-
*/
|
|
40
|
-
startListening(): void;
|
|
41
|
-
/**
|
|
42
|
-
* Stops listening to mousedown events
|
|
43
|
-
*/
|
|
44
|
-
stopListening(): void;
|
|
45
|
-
/**
|
|
46
|
-
* Cleans up the manager and removes all event listeners
|
|
47
|
-
*/
|
|
48
|
-
destroy(): void;
|
|
49
|
-
}
|
|
50
|
-
export default HandleOutsideClickManager;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A class to track previous values of a variable.
|
|
3
|
-
* This replaces the usePrevious hook for non-React code.
|
|
4
|
-
*
|
|
5
|
-
* @example
|
|
6
|
-
* const tracker = new PreviousValueTracker(initialValue);
|
|
7
|
-
* const previous = tracker.get();
|
|
8
|
-
* tracker.update(newValue);
|
|
9
|
-
*/
|
|
10
|
-
export declare class PreviousValueTracker<T> {
|
|
11
|
-
private previousValue;
|
|
12
|
-
constructor(initialValue: T);
|
|
13
|
-
/**
|
|
14
|
-
* Updates the tracked value and returns the previous value
|
|
15
|
-
* @param newValue - The new value to track
|
|
16
|
-
* @returns The previous value before update
|
|
17
|
-
*/
|
|
18
|
-
update(newValue: T): T;
|
|
19
|
-
/**
|
|
20
|
-
* Gets the current previous value without updating
|
|
21
|
-
* @returns The currently stored previous value
|
|
22
|
-
*/
|
|
23
|
-
get(): T;
|
|
24
|
-
/**
|
|
25
|
-
* Sets the previous value directly (useful for initialization)
|
|
26
|
-
* @param value - The value to set
|
|
27
|
-
*/
|
|
28
|
-
set(value: T): void;
|
|
29
|
-
}
|
|
30
|
-
export default PreviousValueTracker;
|