@ishibashi0112/spreadsheet-grid 0.38.0 → 0.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/SpreadsheetGrid.d.ts +1 -2
- package/dist/hooks/useCellContextMenuController.d.ts +4 -4
- package/dist/hooks/useColumnAutosizeRunner.d.ts +2 -2
- package/dist/hooks/useColumnHeaderDragController.d.ts +2 -2
- package/dist/hooks/useColumnMenuController.d.ts +5 -5
- package/dist/hooks/useColumnSelectOptionsCollector.d.ts +2 -2
- package/dist/hooks/useFilterPopoverController.d.ts +8 -8
- package/dist/hooks/useGlobalFilteredOrder.d.ts +3 -3
- package/dist/hooks/useGridBarContext.d.ts +3 -2
- package/dist/hooks/useGridClipboardController.d.ts +1 -1
- package/dist/hooks/useGridEditController.d.ts +4 -4
- package/dist/hooks/useGridHistoryController.d.ts +1 -1
- package/dist/hooks/useGridKeyboardInteractions.d.ts +1 -1
- package/dist/hooks/useGridPointerInteractions.d.ts +8 -8
- package/dist/hooks/useGridStore.d.ts +1 -1
- package/dist/hooks/useGridViewportSync.d.ts +1 -1
- package/dist/hooks/useResolvedGridTheme.d.ts +1 -1
- package/dist/hooks/useRowDragController.d.ts +2 -2
- package/dist/hooks/useServerSideRowModel.d.ts +3 -3
- package/dist/hooks/useToolPanelController.d.ts +2 -2
- package/dist/index.cjs +1 -10
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2841 -8666
- package/dist/model/gridTypes.d.ts +3 -2
- package/dist/style.css +1 -1
- package/dist/testing/index.d.ts +1 -5
- package/dist/testing.cjs +1 -1
- package/dist/testing.js +1 -51
- package/dist/view/ColumnChooserPanel.d.ts +1 -1
- package/dist/view/ColumnFilterPopover.d.ts +5 -5
- package/dist/view/GridBodyLabelRow.d.ts +24 -0
- package/dist/view/GridBodyLayer.d.ts +13 -4
- package/dist/view/GridDetailLayer.d.ts +1 -1
- package/dist/view/GridHeaderRow.d.ts +2 -2
- package/dist/view/GridScrollHint.d.ts +2 -2
- package/dist/view/GridStickyLabelLayer.d.ts +28 -0
- package/dist/view/gridBarHelpers.d.ts +2 -2
- package/package.json +8 -28
- package/README.md +0 -582
- package/dist/controllers/autoHeightMeasurer.d.ts +0 -30
- package/dist/controllers/clipboardController.d.ts +0 -31
- package/dist/controllers/columnAutosizeRunner.d.ts +0 -31
- package/dist/controllers/columnHeaderDragController.d.ts +0 -44
- package/dist/controllers/columnMenuController.d.ts +0 -49
- package/dist/controllers/contextMenuController.d.ts +0 -30
- package/dist/controllers/debouncedValueStore.d.ts +0 -11
- package/dist/controllers/editController.d.ts +0 -27
- package/dist/controllers/filterPopoverController.d.ts +0 -53
- package/dist/controllers/globalFilteredOrder.d.ts +0 -38
- package/dist/controllers/historyController.d.ts +0 -28
- package/dist/controllers/keyboardController.d.ts +0 -36
- package/dist/controllers/panelHeaderDragController.d.ts +0 -21
- package/dist/controllers/pointerInteractionsController.d.ts +0 -74
- package/dist/controllers/popoverSupport.d.ts +0 -18
- package/dist/controllers/rowDragController.d.ts +0 -40
- package/dist/controllers/scrollSyncController.d.ts +0 -17
- package/dist/controllers/selectOptionsCollector.d.ts +0 -31
- package/dist/controllers/serverSideRowModel.d.ts +0 -36
- package/dist/controllers/systemColorSchemeStore.d.ts +0 -5
- package/dist/controllers/toolPanelController.d.ts +0 -36
- package/dist/controllers/tooltipController.d.ts +0 -6
- package/dist/controllers/viewportSyncController.d.ts +0 -30
- package/dist/engine/columnCommands.d.ts +0 -56
- package/dist/engine/columnLayout.d.ts +0 -43
- package/dist/engine/createGridEngine.d.ts +0 -46
- package/dist/engine/filterPopoverCommands.d.ts +0 -56
- package/dist/engine/gridApi.d.ts +0 -61
- package/dist/engine/memo.d.ts +0 -2
- package/dist/engine/notifiers.d.ts +0 -35
- package/dist/engine/rowPipeline.d.ts +0 -50
- package/dist/engine/rowSelectionCommands.d.ts +0 -21
- package/dist/engine/verticalLayout.d.ts +0 -52
- package/dist/logic/aggregation.d.ts +0 -13
- package/dist/logic/autoScrollGeometry.d.ts +0 -27
- package/dist/logic/autoSizeOnData.d.ts +0 -10
- package/dist/logic/cellOverflowTooltip.d.ts +0 -5
- package/dist/logic/checkboxEditor.d.ts +0 -12
- package/dist/logic/chunkedLoop.d.ts +0 -8
- package/dist/logic/clearCells.d.ts +0 -31
- package/dist/logic/columnAutosize.d.ts +0 -18
- package/dist/logic/columnFlex.d.ts +0 -4
- package/dist/logic/columnReset.d.ts +0 -7
- package/dist/logic/contextMenuTarget.d.ts +0 -4
- package/dist/logic/cx.d.ts +0 -1
- package/dist/logic/dateFilterCondition.d.ts +0 -26
- package/dist/logic/dateFilterPresets.d.ts +0 -13
- package/dist/logic/dateFilterTree.d.ts +0 -17
- package/dist/logic/datePickerCalendar.d.ts +0 -12
- package/dist/logic/detailRow.d.ts +0 -38
- package/dist/logic/domGuards.d.ts +0 -7
- package/dist/logic/editorValues.d.ts +0 -5
- package/dist/logic/exportCsv.d.ts +0 -12
- package/dist/logic/exportData.d.ts +0 -9
- package/dist/logic/exportScope.d.ts +0 -3
- package/dist/logic/filterPopoverLayout.d.ts +0 -17
- package/dist/logic/filterPopoverOutsideClick.d.ts +0 -2
- package/dist/logic/filterSummary.d.ts +0 -3
- package/dist/logic/filtering.d.ts +0 -33
- package/dist/logic/geometry.d.ts +0 -72
- package/dist/logic/gridState.d.ts +0 -13
- package/dist/logic/grouping.d.ts +0 -34
- package/dist/logic/history.d.ts +0 -16
- package/dist/logic/inferFilterType.d.ts +0 -19
- package/dist/logic/numberFilterCondition.d.ts +0 -21
- package/dist/logic/panelDragGeometry.d.ts +0 -13
- package/dist/logic/rowHeightStore.d.ts +0 -13
- package/dist/logic/rowReorder.d.ts +0 -18
- package/dist/logic/rowSelection.d.ts +0 -16
- package/dist/logic/scrollHint.d.ts +0 -41
- package/dist/logic/scrollTargets.d.ts +0 -22
- package/dist/logic/selectEditorState.d.ts +0 -28
- package/dist/logic/selectOptions.d.ts +0 -9
- package/dist/logic/serverSideBlocks.d.ts +0 -2
- package/dist/logic/serverSideCache.d.ts +0 -14
- package/dist/logic/serverSideEdits.d.ts +0 -16
- package/dist/logic/serverSideQuery.d.ts +0 -7
- package/dist/logic/setFilterSearch.d.ts +0 -14
- package/dist/logic/setFilterSelection.d.ts +0 -5
- package/dist/logic/slotDom.d.ts +0 -8
- package/dist/logic/slotProps.d.ts +0 -18
- package/dist/logic/sorting.d.ts +0 -11
- package/dist/logic/textFilterCondition.d.ts +0 -18
- package/dist/logic/theme.d.ts +0 -3
- package/dist/logic/tooltipGeometry.d.ts +0 -19
- package/dist/logic/validation.d.ts +0 -14
- package/dist/logic/valueFormatters.d.ts +0 -9
- package/dist/logic/valueStore.d.ts +0 -6
- package/dist/logic/verticalGeometry.d.ts +0 -58
- package/dist/model/gridActions.d.ts +0 -125
- package/dist/model/gridReducer.d.ts +0 -4
- package/dist/model/gridSelectors.d.ts +0 -40
- package/dist/model/gridStore.d.ts +0 -24
- package/dist/model/gridTypes.core.d.ts +0 -796
- package/dist/utils/clipboard.d.ts +0 -29
- package/dist/utils/excelColumnName.d.ts +0 -1
- package/dist/utils/permissions.d.ts +0 -4
- package/dist/utils/scheduler.d.ts +0 -1
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ColumnFilterValue, GridSortState, ServerSideQuery } from '../model/gridTypes';
|
|
2
|
-
export declare const buildServerSideQuery: (input: {
|
|
3
|
-
globalText: string;
|
|
4
|
-
columnFilters: Record<string, ColumnFilterValue>;
|
|
5
|
-
sort: GridSortState;
|
|
6
|
-
}) => ServerSideQuery;
|
|
7
|
-
export declare const serializeServerSideQuery: (query: ServerSideQuery) => string;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export type SetFilterSearchOption = {
|
|
2
|
-
label: string;
|
|
3
|
-
value: string;
|
|
4
|
-
};
|
|
5
|
-
export declare const filterSetOptionsBySearch: <O extends SetFilterSearchOption>(options: O[], searchText: string) => O[];
|
|
6
|
-
export type SetFilterEnterAction = {
|
|
7
|
-
kind: 'close';
|
|
8
|
-
} | {
|
|
9
|
-
kind: 'none';
|
|
10
|
-
} | {
|
|
11
|
-
kind: 'replace';
|
|
12
|
-
values: string[];
|
|
13
|
-
};
|
|
14
|
-
export declare const resolveSetFilterEnterAction: (options: SetFilterSearchOption[], searchText: string) => SetFilterEnterAction;
|
package/dist/logic/slotDom.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export type SlotPropsLike<S> = string | {
|
|
2
|
-
className?: string;
|
|
3
|
-
style?: S;
|
|
4
|
-
};
|
|
5
|
-
export type ResolvedSlotProps<S> = {
|
|
6
|
-
className?: string;
|
|
7
|
-
style?: S;
|
|
8
|
-
};
|
|
9
|
-
export declare function resolveSlotProps<S>(slot: SlotPropsLike<S> | null | undefined | false): ResolvedSlotProps<S>;
|
|
10
|
-
export declare function slotClassName<S>(slot: SlotPropsLike<S> | null | undefined | false): string | undefined;
|
|
11
|
-
export declare function slotStyle<S>(slot: SlotPropsLike<S> | null | undefined | false): S | undefined;
|
|
12
|
-
export declare function mergeStyles<S extends object>(...styles: Array<S | undefined | null | false>): S | undefined;
|
|
13
|
-
export declare function shallowEqualStyle<S extends object>(a: S | undefined, b: S | undefined): boolean;
|
|
14
|
-
export declare function arePropsEqualWithStyleKeys<P extends object>(prev: P, next: P, styleKeys: ReadonlySet<keyof P>): boolean;
|
|
15
|
-
export declare function resolveSlotMap<K extends string, S>(map: Partial<Record<K, SlotPropsLike<S> | undefined>> | null | undefined): Partial<Record<K, ResolvedSlotProps<S>>>;
|
|
16
|
-
export declare function serializeSlotValue(value: unknown): string;
|
|
17
|
-
export declare function resolveSlotMapFromSignature<K extends string, S>(signature: string): Partial<Record<K, ResolvedSlotProps<S>>>;
|
|
18
|
-
export declare function resolveSlotFromSignature<S>(signature: string): ResolvedSlotProps<S>;
|
package/dist/logic/sorting.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { GridColumn, GridSortState } from '../model/gridTypes';
|
|
2
|
-
import type { RowOrder } from './filtering';
|
|
3
|
-
export declare const STRING_COLLATOR: Intl.Collator;
|
|
4
|
-
export declare const compareUnknownValues: (left: unknown, right: unknown) => number;
|
|
5
|
-
export declare const nextSortEntries: (current: GridSortState, columnKey: string, direction: "asc" | "desc", additive: boolean) => GridSortState;
|
|
6
|
-
export declare const addSortEntry: (current: GridSortState, columnKey: string, direction: "asc" | "desc") => GridSortState;
|
|
7
|
-
export declare const setSortEntryDirection: (current: GridSortState, index: number, direction: "asc" | "desc") => GridSortState;
|
|
8
|
-
export declare const setSortEntryColumn: (current: GridSortState, index: number, columnKey: string) => GridSortState;
|
|
9
|
-
export declare const removeSortEntryAt: (current: GridSortState, index: number) => GridSortState;
|
|
10
|
-
export declare const moveSortEntry: (current: GridSortState, from: number, to: number) => GridSortState;
|
|
11
|
-
export declare const sortOrder: <T>(rows: T[], order: RowOrder, columns: GridColumn<T>[], sort: GridSortState) => RowOrder;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { ParsedTextFilter } from '../model/gridTypes';
|
|
2
|
-
export type TextFilterOperator = 'contains' | 'equals' | 'startsWith' | 'endsWith' | 'blank' | 'notBlank';
|
|
3
|
-
export type TextFilterConditionDraft = {
|
|
4
|
-
operator: TextFilterOperator;
|
|
5
|
-
value: string;
|
|
6
|
-
};
|
|
7
|
-
export declare const DEFAULT_TEXT_FILTER_DRAFT: TextFilterConditionDraft;
|
|
8
|
-
export declare const TEXT_FILTER_OPERATOR_OPTIONS: ReadonlyArray<{
|
|
9
|
-
value: TextFilterOperator;
|
|
10
|
-
label: string;
|
|
11
|
-
}>;
|
|
12
|
-
export declare const textFilterOperandCount: (operator: TextFilterOperator) => 0 | 1;
|
|
13
|
-
export declare const buildParsedTextFilterFromDraft: (draft: TextFilterConditionDraft) => ParsedTextFilter | null;
|
|
14
|
-
export declare const formatParsedTextFilter: (parsed: ParsedTextFilter) => string;
|
|
15
|
-
export declare const parsedTextFilterToConditionDraft: (parsed: ParsedTextFilter | null | undefined) => TextFilterConditionDraft;
|
|
16
|
-
export declare const filterOptionsByTextCondition: <O extends {
|
|
17
|
-
value: string;
|
|
18
|
-
}>(options: O[], condition: ParsedTextFilter | null) => O[];
|
package/dist/logic/theme.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare const TOOLTIP_GAP_PX = 7;
|
|
2
|
-
export declare const TOOLTIP_VIEWPORT_MARGIN_PX = 8;
|
|
3
|
-
export type TooltipPlacementArgs = {
|
|
4
|
-
targetRect: {
|
|
5
|
-
top: number;
|
|
6
|
-
left: number;
|
|
7
|
-
width: number;
|
|
8
|
-
bottom: number;
|
|
9
|
-
};
|
|
10
|
-
tipWidth: number;
|
|
11
|
-
tipHeight: number;
|
|
12
|
-
viewportWidth: number;
|
|
13
|
-
};
|
|
14
|
-
export type TooltipPlacement = {
|
|
15
|
-
top: number;
|
|
16
|
-
left: number;
|
|
17
|
-
below: boolean;
|
|
18
|
-
};
|
|
19
|
-
export declare function computeTooltipPlacement(args: TooltipPlacementArgs): TooltipPlacement;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { CellValidationResult, GridColumn, GridInvalidCell, GridRowKey } from '../model/gridTypes';
|
|
2
|
-
export declare const DEFAULT_INVALID_MESSAGE = "\u5165\u529B\u5024\u304C\u4E0D\u6B63\u3067\u3059";
|
|
3
|
-
export declare const normalizeValidationResult: (result: CellValidationResult) => {
|
|
4
|
-
valid: boolean;
|
|
5
|
-
message: string;
|
|
6
|
-
};
|
|
7
|
-
export declare const getInvalidMessage: <T>(column: GridColumn<T>, row: T, value: unknown) => string | null;
|
|
8
|
-
export declare const decideCellWrite: <T>(column: GridColumn<T>, row: T, value: unknown) => {
|
|
9
|
-
action: "write";
|
|
10
|
-
} | {
|
|
11
|
-
action: "reject";
|
|
12
|
-
message: string;
|
|
13
|
-
};
|
|
14
|
-
export declare const scanInvalidCells: <T>(rows: T[], columns: GridColumn<T>[], getRowKey: (row: T, sourceRowIndex: number) => GridRowKey | undefined) => GridInvalidCell[];
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { CellValueFormatter } from '../model/gridTypes';
|
|
2
|
-
export type NumberFormatterOptions = {
|
|
3
|
-
locale?: string;
|
|
4
|
-
useGrouping?: boolean;
|
|
5
|
-
minimumFractionDigits?: number;
|
|
6
|
-
maximumFractionDigits?: number;
|
|
7
|
-
emptyText?: string;
|
|
8
|
-
};
|
|
9
|
-
export declare function numberFormatter<T>(options?: NumberFormatterOptions): CellValueFormatter<T>;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
export declare const MAX_BODY_PX = 15000000;
|
|
2
|
-
export declare const AUTO_HEIGHT_MAX_ROWS = 50000;
|
|
3
|
-
export declare const shouldUseAutoHeight: (autoHeightEnabled: boolean, hasAutoHeightColumn: boolean, viewRowCount: number, maxRows: number) => boolean;
|
|
4
|
-
export declare const WINDOW_BASE_CHUNK_PX: number;
|
|
5
|
-
export type VerticalRow = {
|
|
6
|
-
index: number;
|
|
7
|
-
start: number;
|
|
8
|
-
size?: number;
|
|
9
|
-
detailSize?: number;
|
|
10
|
-
};
|
|
11
|
-
export type VerticalGeometry = {
|
|
12
|
-
physicalBodyHeight: number;
|
|
13
|
-
logicalBodyHeight: number;
|
|
14
|
-
scaleFactor: number;
|
|
15
|
-
translateY: number;
|
|
16
|
-
windowBaseOffsetPx: number;
|
|
17
|
-
rows: VerticalRow[];
|
|
18
|
-
rowIndexSet: Set<number>;
|
|
19
|
-
};
|
|
20
|
-
export type ComputeVerticalGeometryArgs = {
|
|
21
|
-
rowCount: number;
|
|
22
|
-
rowHeight: number;
|
|
23
|
-
headerHeight: number;
|
|
24
|
-
viewportHeight: number;
|
|
25
|
-
scrollTop: number;
|
|
26
|
-
overscan: number;
|
|
27
|
-
maxBodyPx: number;
|
|
28
|
-
};
|
|
29
|
-
export type RowMetrics = {
|
|
30
|
-
rowCount: number;
|
|
31
|
-
rowTop(index: number): number;
|
|
32
|
-
rowsHeight(startInclusive: number, endInclusive: number): number;
|
|
33
|
-
totalBodyHeight: number;
|
|
34
|
-
rowAtContentY(y: number): number;
|
|
35
|
-
cellHeight(index: number): number;
|
|
36
|
-
detailHeight(index: number): number;
|
|
37
|
-
};
|
|
38
|
-
export declare const createUniformRowMetrics: (rowCount: number, rowHeight: number) => RowMetrics;
|
|
39
|
-
export type DetailRowExtra = {
|
|
40
|
-
index: number;
|
|
41
|
-
height: number;
|
|
42
|
-
};
|
|
43
|
-
export declare const createDetailRowMetrics: (base: RowMetrics, extras: readonly DetailRowExtra[]) => RowMetrics;
|
|
44
|
-
export declare const clipRowRangeToWindow: (selStartRow: number, selEndRow: number, windowFirstRow: number, windowLastRow: number) => {
|
|
45
|
-
start: number;
|
|
46
|
-
end: number;
|
|
47
|
-
} | null;
|
|
48
|
-
export declare const physicalToLogicalScrollTop: (physical: number, scaleFactor: number) => number;
|
|
49
|
-
export declare const logicalToPhysicalScrollTop: (logical: number, scaleFactor: number) => number;
|
|
50
|
-
export declare const clientYToRowIndex: (yRelativeToBodyTop: number, scrollTop: number, scaleFactor: number, rowMetrics: RowMetrics) => number;
|
|
51
|
-
export declare const computeVerticalGeometry: ({ rowCount, rowHeight, headerHeight, viewportHeight, scrollTop, overscan, maxBodyPx, }: ComputeVerticalGeometryArgs) => VerticalGeometry;
|
|
52
|
-
export type ComputeAutoHeightVerticalGeometryArgs = {
|
|
53
|
-
headerHeight: number;
|
|
54
|
-
viewportHeight: number;
|
|
55
|
-
scrollTop: number;
|
|
56
|
-
overscan: number;
|
|
57
|
-
};
|
|
58
|
-
export declare const computeAutoHeightVerticalGeometry: ({ headerHeight, viewportHeight, scrollTop, overscan, }: ComputeAutoHeightVerticalGeometryArgs, rowMetrics: RowMetrics) => VerticalGeometry;
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import type { CellCoord, ColumnFilterValue, GridFilterState, GridRowKey, GridSortEntry, RowSelectionState } from './gridTypes';
|
|
2
|
-
export type GridUiAction = {
|
|
3
|
-
type: 'cell/activate';
|
|
4
|
-
cell: CellCoord | null;
|
|
5
|
-
} | {
|
|
6
|
-
type: 'selection/start';
|
|
7
|
-
cell: CellCoord;
|
|
8
|
-
} | {
|
|
9
|
-
type: 'selection/update';
|
|
10
|
-
cell: CellCoord;
|
|
11
|
-
} | {
|
|
12
|
-
type: 'rowSelection/start';
|
|
13
|
-
row: number;
|
|
14
|
-
} | {
|
|
15
|
-
type: 'rowSelection/update';
|
|
16
|
-
row: number;
|
|
17
|
-
} | {
|
|
18
|
-
type: 'columnSelection/start';
|
|
19
|
-
col: number;
|
|
20
|
-
} | {
|
|
21
|
-
type: 'columnSelection/update';
|
|
22
|
-
col: number;
|
|
23
|
-
} | {
|
|
24
|
-
type: 'selection/end';
|
|
25
|
-
} | {
|
|
26
|
-
type: 'selection/clear';
|
|
27
|
-
} | {
|
|
28
|
-
type: 'edit/start';
|
|
29
|
-
cell: CellCoord;
|
|
30
|
-
} | {
|
|
31
|
-
type: 'edit/stop';
|
|
32
|
-
} | {
|
|
33
|
-
type: 'column/resizeStart';
|
|
34
|
-
columnKey: string;
|
|
35
|
-
startX: number;
|
|
36
|
-
startWidth: number;
|
|
37
|
-
minWidth: number;
|
|
38
|
-
maxWidth?: number;
|
|
39
|
-
} | {
|
|
40
|
-
type: 'column/resizeUpdate';
|
|
41
|
-
clientX: number;
|
|
42
|
-
} | {
|
|
43
|
-
type: 'column/resizeEnd';
|
|
44
|
-
} | {
|
|
45
|
-
type: 'columnWidths/sync';
|
|
46
|
-
widths: Record<string, number>;
|
|
47
|
-
} | {
|
|
48
|
-
type: 'columnWidths/reset';
|
|
49
|
-
widths: Record<string, number>;
|
|
50
|
-
} | {
|
|
51
|
-
type: 'filter/setGlobal';
|
|
52
|
-
value: string;
|
|
53
|
-
} | {
|
|
54
|
-
type: 'filter/setColumn';
|
|
55
|
-
columnKey: string;
|
|
56
|
-
value: ColumnFilterValue;
|
|
57
|
-
} | {
|
|
58
|
-
type: 'filter/clearColumn';
|
|
59
|
-
columnKey: string;
|
|
60
|
-
} | {
|
|
61
|
-
type: 'filter/resetAll';
|
|
62
|
-
} | {
|
|
63
|
-
type: 'filter/setAll';
|
|
64
|
-
filters: GridFilterState;
|
|
65
|
-
} | {
|
|
66
|
-
type: 'sort/set';
|
|
67
|
-
entries: GridSortEntry[];
|
|
68
|
-
} | {
|
|
69
|
-
type: 'sort/clear';
|
|
70
|
-
} | {
|
|
71
|
-
type: 'rowSelect/set';
|
|
72
|
-
state: RowSelectionState;
|
|
73
|
-
} | {
|
|
74
|
-
type: 'group/toggleCollapsed';
|
|
75
|
-
groupKey: string;
|
|
76
|
-
} | {
|
|
77
|
-
type: 'group/setCollapsed';
|
|
78
|
-
groupKey: string;
|
|
79
|
-
collapsed: boolean;
|
|
80
|
-
} | {
|
|
81
|
-
type: 'group/setCollapsedKeys';
|
|
82
|
-
keys: ReadonlySet<string>;
|
|
83
|
-
} | {
|
|
84
|
-
type: 'detail/toggle';
|
|
85
|
-
rowKey: GridRowKey;
|
|
86
|
-
} | {
|
|
87
|
-
type: 'detail/setExpanded';
|
|
88
|
-
rowKey: GridRowKey;
|
|
89
|
-
expanded: boolean;
|
|
90
|
-
} | {
|
|
91
|
-
type: 'detail/setKeys';
|
|
92
|
-
keys: ReadonlySet<GridRowKey>;
|
|
93
|
-
};
|
|
94
|
-
export declare const gridActions: {
|
|
95
|
-
activateCell: (cell: CellCoord | null) => GridUiAction;
|
|
96
|
-
startSelection: (cell: CellCoord) => GridUiAction;
|
|
97
|
-
updateSelection: (cell: CellCoord) => GridUiAction;
|
|
98
|
-
startRowSelection: (row: number) => GridUiAction;
|
|
99
|
-
updateRowSelection: (row: number) => GridUiAction;
|
|
100
|
-
startColumnSelection: (col: number) => GridUiAction;
|
|
101
|
-
updateColumnSelection: (col: number) => GridUiAction;
|
|
102
|
-
endSelection: () => GridUiAction;
|
|
103
|
-
clearSelection: () => GridUiAction;
|
|
104
|
-
startEdit: (cell: CellCoord) => GridUiAction;
|
|
105
|
-
stopEdit: () => GridUiAction;
|
|
106
|
-
startColumnResize: (columnKey: string, startX: number, startWidth: number, minWidth: number, maxWidth?: number) => GridUiAction;
|
|
107
|
-
updateColumnResize: (clientX: number) => GridUiAction;
|
|
108
|
-
endColumnResize: () => GridUiAction;
|
|
109
|
-
syncColumnWidths: (widths: Record<string, number>) => GridUiAction;
|
|
110
|
-
resetColumnWidths: (widths: Record<string, number>) => GridUiAction;
|
|
111
|
-
setGlobalFilter: (value: string) => GridUiAction;
|
|
112
|
-
setColumnFilter: (columnKey: string, value: ColumnFilterValue) => GridUiAction;
|
|
113
|
-
clearColumnFilter: (columnKey: string) => GridUiAction;
|
|
114
|
-
resetAllFilters: () => GridUiAction;
|
|
115
|
-
setAllFilters: (filters: GridFilterState) => GridUiAction;
|
|
116
|
-
setSort: (entries: GridSortEntry[]) => GridUiAction;
|
|
117
|
-
clearSort: () => GridUiAction;
|
|
118
|
-
setRowSelectionState: (state: RowSelectionState) => GridUiAction;
|
|
119
|
-
toggleGroupCollapsed: (groupKey: string) => GridUiAction;
|
|
120
|
-
setGroupCollapsed: (groupKey: string, collapsed: boolean) => GridUiAction;
|
|
121
|
-
setCollapsedGroupKeys: (keys: ReadonlySet<string>) => GridUiAction;
|
|
122
|
-
toggleDetailRow: (rowKey: GridRowKey) => GridUiAction;
|
|
123
|
-
setDetailRowExpanded: (rowKey: GridRowKey, expanded: boolean) => GridUiAction;
|
|
124
|
-
setExpandedDetailRowKeys: (keys: ReadonlySet<GridRowKey>) => GridUiAction;
|
|
125
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { GridUiAction } from './gridActions';
|
|
2
|
-
import type { GridColumn, GridUiState } from './gridTypes';
|
|
3
|
-
export declare const createInitialGridUiState: <T>(columns: GridColumn<T>[]) => GridUiState;
|
|
4
|
-
export declare const gridUiReducer: (state: GridUiState, action: GridUiAction) => GridUiState;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { CellCoord, CellRange, GridUiState } from './gridTypes';
|
|
2
|
-
export declare const normalizeCellRange: (range: CellRange) => CellRange;
|
|
3
|
-
export declare const normalizeRowRange: (startRow: number, endRow: number) => {
|
|
4
|
-
startRow: number;
|
|
5
|
-
endRow: number;
|
|
6
|
-
};
|
|
7
|
-
export declare const normalizeColumnRange: (startCol: number, endCol: number) => {
|
|
8
|
-
startCol: number;
|
|
9
|
-
endCol: number;
|
|
10
|
-
};
|
|
11
|
-
export declare const selectActiveCell: (state: GridUiState) => CellCoord | null;
|
|
12
|
-
export declare const selectSelection: (state: GridUiState) => import("./gridTypes.core").GridSelection;
|
|
13
|
-
export declare const selectEditingCell: (state: GridUiState) => CellCoord | null;
|
|
14
|
-
export declare const selectColumnWidth: (state: GridUiState, columnKey: string) => number;
|
|
15
|
-
export declare const selectGlobalFilter: (state: GridUiState) => string;
|
|
16
|
-
export declare const selectColumnFilter: (state: GridUiState, columnKey: string) => import("./gridTypes.core").ColumnFilterValue;
|
|
17
|
-
export declare const selectIsActiveCell: (state: GridUiState, rowIndex: number, colIndex: number) => boolean;
|
|
18
|
-
export declare const selectIsEditingCell: (state: GridUiState, rowIndex: number, colIndex: number) => boolean;
|
|
19
|
-
export declare const selectIsCellSelected: (state: GridUiState, rowIndex: number, colIndex: number) => boolean;
|
|
20
|
-
export declare const selectIsRowSelected: (state: GridUiState, rowIndex: number) => boolean;
|
|
21
|
-
export declare const selectIsColumnSelected: (state: GridUiState, colIndex: number) => boolean;
|
|
22
|
-
export type SelectionSnapshot = {
|
|
23
|
-
kind: 'none';
|
|
24
|
-
} | {
|
|
25
|
-
kind: 'cell';
|
|
26
|
-
startRow: number;
|
|
27
|
-
endRow: number;
|
|
28
|
-
startCol: number;
|
|
29
|
-
endCol: number;
|
|
30
|
-
} | {
|
|
31
|
-
kind: 'row';
|
|
32
|
-
startRow: number;
|
|
33
|
-
endRow: number;
|
|
34
|
-
} | {
|
|
35
|
-
kind: 'col';
|
|
36
|
-
startCol: number;
|
|
37
|
-
endCol: number;
|
|
38
|
-
};
|
|
39
|
-
export declare const buildSelectionSnapshot: (selection: GridUiState["selection"]) => SelectionSnapshot;
|
|
40
|
-
export declare const isSameCellCoord: (left: CellCoord | null, right: CellCoord | null) => boolean;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { GridUiAction } from './gridActions';
|
|
2
|
-
import type { GridUiState } from './gridTypes.core';
|
|
3
|
-
export type GridStoreListener = () => void;
|
|
4
|
-
export type GridViewState = {
|
|
5
|
-
scrollTop: number;
|
|
6
|
-
viewportWidth: number;
|
|
7
|
-
viewportHeight: number;
|
|
8
|
-
hoveredRowIndex: number | null;
|
|
9
|
-
hoveredColumnIndex: number | null;
|
|
10
|
-
isCornerHovered: boolean;
|
|
11
|
-
};
|
|
12
|
-
export declare const createInitialGridViewState: () => GridViewState;
|
|
13
|
-
export type Updater<T> = T | ((prev: T) => T);
|
|
14
|
-
export declare const resolveUpdater: <T>(updater: Updater<T>, prev: T) => T;
|
|
15
|
-
export type GridViewStatePatch = Partial<GridViewState> | ((prev: GridViewState) => Partial<GridViewState>);
|
|
16
|
-
export type GridStore = {
|
|
17
|
-
getState: () => GridUiState;
|
|
18
|
-
dispatch: (action: GridUiAction) => void;
|
|
19
|
-
getViewState: () => GridViewState;
|
|
20
|
-
setViewState: (patch: GridViewStatePatch) => void;
|
|
21
|
-
subscribe: (listener: GridStoreListener) => () => void;
|
|
22
|
-
};
|
|
23
|
-
export type GridUiReducer = (state: GridUiState, action: GridUiAction) => GridUiState;
|
|
24
|
-
export declare const createGridStore: (initialState: GridUiState, reducer?: GridUiReducer, initialViewState?: GridViewState) => GridStore;
|