@gridsheet/preact-core 2.2.0 → 3.0.0-rc.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/components/RowMenu.d.ts +3 -0
- package/dist/constants.d.ts +9 -0
- package/dist/formula/evaluator.d.ts +2 -0
- package/dist/formula/functions/__async.d.ts +59 -0
- package/dist/formula/functions/__base.d.ts +5 -0
- package/dist/index.d.ts +5 -4
- package/dist/index.js +1358 -570
- package/dist/index.js.map +1 -1
- package/dist/lib/cell.d.ts +3 -0
- package/dist/lib/{converters.d.ts → coords.d.ts} +1 -1
- package/dist/lib/hub.d.ts +4 -7
- package/dist/lib/operation.d.ts +1 -0
- package/dist/lib/{structs.d.ts → spatial.d.ts} +17 -1
- package/dist/lib/table.d.ts +112 -65
- package/dist/renderers/core.d.ts +1 -0
- package/dist/store/actions.d.ts +17 -37
- package/dist/styles/minified.d.ts +2 -2
- package/dist/types.d.ts +23 -12
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -45,10 +45,18 @@ export type FeedbackType = (args: {
|
|
|
45
45
|
}) => void;
|
|
46
46
|
export type ModeType = 'light' | 'dark';
|
|
47
47
|
export type HeadersType = 'both' | 'vertical' | 'horizontal' | 'none';
|
|
48
|
+
export type AsyncCache = {
|
|
49
|
+
/** Cached result value from the async computation. */
|
|
50
|
+
value: any;
|
|
51
|
+
/** Cache key derived from function name + arguments. Used to detect when inputs change. */
|
|
52
|
+
key: string;
|
|
53
|
+
/** Absolute timestamp (ms since epoch) at which the cache expires. undefined means cache never expires. */
|
|
54
|
+
expireTime?: number;
|
|
55
|
+
};
|
|
48
56
|
export type System = {
|
|
49
57
|
id: string;
|
|
50
58
|
sheetId: number;
|
|
51
|
-
|
|
59
|
+
changedTime: number;
|
|
52
60
|
dependents: Set<string>;
|
|
53
61
|
/** Cumulative top offset (px) from table origin. Set on row-header cells (x=0). */
|
|
54
62
|
offsetTop?: number;
|
|
@@ -79,7 +87,9 @@ export type CellType<T = any, Custom = any> = {
|
|
|
79
87
|
custom?: Custom;
|
|
80
88
|
disableFormula?: boolean;
|
|
81
89
|
prevention?: OperationType;
|
|
82
|
-
|
|
90
|
+
_sys?: System;
|
|
91
|
+
/** Cached result from an async formula. Stored directly on the cell for serializability. */
|
|
92
|
+
asyncCache?: AsyncCache;
|
|
83
93
|
/** Filter configuration. Set on col-header cells (y=0). */
|
|
84
94
|
filter?: FilterConfig;
|
|
85
95
|
/** Whether this row is hidden by a filter. Set on row-header cells (x=0). */
|
|
@@ -184,6 +194,10 @@ export type StoreType = {
|
|
|
184
194
|
x: number;
|
|
185
195
|
position: PositionType;
|
|
186
196
|
} | null;
|
|
197
|
+
rowMenuState: {
|
|
198
|
+
y: number;
|
|
199
|
+
position: PositionType;
|
|
200
|
+
} | null;
|
|
187
201
|
};
|
|
188
202
|
export type Manager<T> = {
|
|
189
203
|
instance: T;
|
|
@@ -235,6 +249,8 @@ export type HistoryUpdateType = {
|
|
|
235
249
|
diffAfter: CellsByIdType;
|
|
236
250
|
partial: boolean;
|
|
237
251
|
};
|
|
252
|
+
export type MoveRelationKind = 'vacate' | 'overflow' | 'displace' | null;
|
|
253
|
+
export type MoveRelations = [string, string, MoveRelationKind][];
|
|
238
254
|
export type HistoryMoveType = {
|
|
239
255
|
operation: 'MOVE';
|
|
240
256
|
srcSheetId: number;
|
|
@@ -244,12 +260,7 @@ export type HistoryMoveType = {
|
|
|
244
260
|
redoReflection?: StorePatchType;
|
|
245
261
|
diffBefore: CellsByIdType;
|
|
246
262
|
diffAfter: CellsByIdType;
|
|
247
|
-
|
|
248
|
-
dst: AreaType;
|
|
249
|
-
matrixFrom: IdMatrix;
|
|
250
|
-
matrixTo: IdMatrix;
|
|
251
|
-
matrixNew: IdMatrix;
|
|
252
|
-
lostRows: MatricesByAddress<Id>;
|
|
263
|
+
moveRelations: MoveRelations;
|
|
253
264
|
};
|
|
254
265
|
export type HistoryInsertRowsType = {
|
|
255
266
|
operation: 'INSERT_ROWS';
|
|
@@ -308,10 +319,10 @@ export type HistorySortRowsType = {
|
|
|
308
319
|
applyed: boolean;
|
|
309
320
|
undoReflection?: StorePatchType;
|
|
310
321
|
redoReflection?: StorePatchType;
|
|
311
|
-
/**
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
322
|
+
/** Mapping from original row index to new row index after sort */
|
|
323
|
+
sortedRowMapping: {
|
|
324
|
+
[beforeY: number]: number;
|
|
325
|
+
};
|
|
315
326
|
};
|
|
316
327
|
export type HistoryType = HistoryUpdateType | HistoryMoveType | HistoryInsertRowsType | HistoryRemoveRowsType | HistoryInsertColsType | HistoryRemoveColsType | HistorySortRowsType;
|
|
317
328
|
export type Virtualization = {
|