@gridsheet/react-core 0.12.3 → 0.12.4-alpha.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/Cell.d.ts.map +1 -1
- package/dist/components/Emitter.d.ts.map +1 -1
- package/dist/components/GridSheet.d.ts.map +1 -1
- package/dist/components/HeaderLeftCell.d.ts.map +1 -1
- package/dist/components/HeaderTopCell.d.ts.map +1 -1
- package/dist/components/Resizer.d.ts.map +1 -1
- package/dist/components/SearchBox.d.ts.map +1 -1
- package/dist/components/Tabular.d.ts.map +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/formula/evaluator.d.ts.map +1 -1
- package/dist/formula/functions/__base.d.ts.map +1 -1
- package/dist/formula/solver.d.ts.map +1 -1
- package/dist/index.d.ts +1824 -1
- package/dist/index.js +5205 -11
- package/dist/lib/structs.d.ts.map +1 -1
- package/dist/lib/table.d.ts.map +1 -1
- package/dist/lib/time.d.ts.map +1 -1
- package/dist/lib/virtualization.d.ts.map +1 -1
- package/dist/parsers/core.d.ts.map +1 -1
- package/dist/renderers/core.d.ts.map +1 -1
- package/dist/store/actions.d.ts.map +1 -1
- package/dist/store/index.d.ts.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +13 -3
- package/dist/components/Cell.d.ts +0 -8
- package/dist/components/Cell.js +0 -199
- package/dist/components/Cell.js.map +0 -1
- package/dist/components/ContextMenu.d.ts +0 -3
- package/dist/components/ContextMenu.js +0 -207
- package/dist/components/ContextMenu.js.map +0 -1
- package/dist/components/Editor.d.ts +0 -3
- package/dist/components/Editor.js +0 -304
- package/dist/components/Editor.js.map +0 -1
- package/dist/components/Emitter.d.ts +0 -9
- package/dist/components/Emitter.js +0 -26
- package/dist/components/Emitter.js.map +0 -1
- package/dist/components/GridSheet.d.ts +0 -4
- package/dist/components/GridSheet.js +0 -110
- package/dist/components/GridSheet.js.map +0 -1
- package/dist/components/HeaderLeftCell.d.ts +0 -7
- package/dist/components/HeaderLeftCell.js +0 -67
- package/dist/components/HeaderLeftCell.js.map +0 -1
- package/dist/components/HeaderTopCell.d.ts +0 -7
- package/dist/components/HeaderTopCell.js +0 -68
- package/dist/components/HeaderTopCell.js.map +0 -1
- package/dist/components/Resizer.d.ts +0 -3
- package/dist/components/Resizer.js +0 -83
- package/dist/components/Resizer.js.map +0 -1
- package/dist/components/SearchBox.d.ts +0 -3
- package/dist/components/SearchBox.js +0 -52
- package/dist/components/SearchBox.js.map +0 -1
- package/dist/components/StoreInitializer.d.ts +0 -4
- package/dist/components/StoreInitializer.js +0 -68
- package/dist/components/StoreInitializer.js.map +0 -1
- package/dist/components/Tabular.d.ts +0 -9
- package/dist/components/Tabular.js +0 -84
- package/dist/components/Tabular.js.map +0 -1
- package/dist/constants.d.ts +0 -18
- package/dist/constants.js +0 -21
- package/dist/constants.js.map +0 -1
- package/dist/formula/evaluator.d.ts +0 -91
- package/dist/formula/evaluator.js +0 -541
- package/dist/formula/evaluator.js.map +0 -1
- package/dist/formula/functions/__base.d.ts +0 -23
- package/dist/formula/functions/__base.js +0 -16
- package/dist/formula/functions/__base.js.map +0 -1
- package/dist/formula/functions/__utils.d.ts +0 -6
- package/dist/formula/functions/__utils.js +0 -102
- package/dist/formula/functions/__utils.js.map +0 -1
- package/dist/formula/functions/abs.d.ts +0 -12
- package/dist/formula/functions/abs.js +0 -21
- package/dist/formula/functions/abs.js.map +0 -1
- package/dist/formula/functions/abs.spec.d.ts +0 -2
- package/dist/formula/functions/abs.spec.js +0 -29
- package/dist/formula/functions/abs.spec.js.map +0 -1
- package/dist/formula/functions/acos.d.ts +0 -12
- package/dist/formula/functions/acos.js +0 -29
- package/dist/formula/functions/acos.js.map +0 -1
- package/dist/formula/functions/add.d.ts +0 -13
- package/dist/formula/functions/add.js +0 -50
- package/dist/formula/functions/add.js.map +0 -1
- package/dist/formula/functions/and.d.ts +0 -19
- package/dist/formula/functions/and.js +0 -28
- package/dist/formula/functions/and.js.map +0 -1
- package/dist/formula/functions/asin.d.ts +0 -12
- package/dist/formula/functions/asin.js +0 -29
- package/dist/formula/functions/asin.js.map +0 -1
- package/dist/formula/functions/atan.d.ts +0 -12
- package/dist/formula/functions/atan.js +0 -26
- package/dist/formula/functions/atan.js.map +0 -1
- package/dist/formula/functions/atan2.d.ts +0 -12
- package/dist/formula/functions/atan2.js +0 -32
- package/dist/formula/functions/atan2.js.map +0 -1
- package/dist/formula/functions/average.d.ts +0 -19
- package/dist/formula/functions/average.js +0 -41
- package/dist/formula/functions/average.js.map +0 -1
- package/dist/formula/functions/col.d.ts +0 -14
- package/dist/formula/functions/col.js +0 -30
- package/dist/formula/functions/col.js.map +0 -1
- package/dist/formula/functions/concat.d.ts +0 -12
- package/dist/formula/functions/concat.js +0 -27
- package/dist/formula/functions/concat.js.map +0 -1
- package/dist/formula/functions/concatenate.d.ts +0 -19
- package/dist/formula/functions/concatenate.js +0 -25
- package/dist/formula/functions/concatenate.js.map +0 -1
- package/dist/formula/functions/cos.d.ts +0 -12
- package/dist/formula/functions/cos.js +0 -26
- package/dist/formula/functions/cos.js.map +0 -1
- package/dist/formula/functions/count.d.ts +0 -19
- package/dist/formula/functions/count.js +0 -35
- package/dist/formula/functions/count.js.map +0 -1
- package/dist/formula/functions/counta.d.ts +0 -19
- package/dist/formula/functions/counta.js +0 -35
- package/dist/formula/functions/counta.js.map +0 -1
- package/dist/formula/functions/countif.d.ts +0 -13
- package/dist/formula/functions/countif.js +0 -30
- package/dist/formula/functions/countif.js.map +0 -1
- package/dist/formula/functions/divide.d.ts +0 -12
- package/dist/formula/functions/divide.js +0 -33
- package/dist/formula/functions/divide.js.map +0 -1
- package/dist/formula/functions/eq.d.ts +0 -12
- package/dist/formula/functions/eq.js +0 -25
- package/dist/formula/functions/eq.js.map +0 -1
- package/dist/formula/functions/exp.d.ts +0 -12
- package/dist/formula/functions/exp.js +0 -28
- package/dist/formula/functions/exp.js.map +0 -1
- package/dist/formula/functions/gt.d.ts +0 -12
- package/dist/formula/functions/gt.js +0 -27
- package/dist/formula/functions/gt.js.map +0 -1
- package/dist/formula/functions/gte.d.ts +0 -12
- package/dist/formula/functions/gte.js +0 -27
- package/dist/formula/functions/gte.js.map +0 -1
- package/dist/formula/functions/hlookup.d.ts +0 -18
- package/dist/formula/functions/hlookup.js +0 -74
- package/dist/formula/functions/hlookup.js.map +0 -1
- package/dist/formula/functions/if.d.ts +0 -17
- package/dist/formula/functions/if.js +0 -36
- package/dist/formula/functions/if.js.map +0 -1
- package/dist/formula/functions/iferror.d.ts +0 -20
- package/dist/formula/functions/iferror.js +0 -41
- package/dist/formula/functions/iferror.js.map +0 -1
- package/dist/formula/functions/iferror.spec.d.ts +0 -2
- package/dist/formula/functions/iferror.spec.js +0 -61
- package/dist/formula/functions/iferror.spec.js.map +0 -1
- package/dist/formula/functions/len.d.ts +0 -12
- package/dist/formula/functions/len.js +0 -26
- package/dist/formula/functions/len.js.map +0 -1
- package/dist/formula/functions/lenb.d.ts +0 -12
- package/dist/formula/functions/lenb.js +0 -26
- package/dist/formula/functions/lenb.js.map +0 -1
- package/dist/formula/functions/ln.d.ts +0 -12
- package/dist/formula/functions/ln.js +0 -29
- package/dist/formula/functions/ln.js.map +0 -1
- package/dist/formula/functions/log.d.ts +0 -12
- package/dist/formula/functions/log.js +0 -35
- package/dist/formula/functions/log.js.map +0 -1
- package/dist/formula/functions/log10.d.ts +0 -12
- package/dist/formula/functions/log10.js +0 -29
- package/dist/formula/functions/log10.js.map +0 -1
- package/dist/formula/functions/lt.d.ts +0 -12
- package/dist/formula/functions/lt.js +0 -27
- package/dist/formula/functions/lt.js.map +0 -1
- package/dist/formula/functions/lte.d.ts +0 -12
- package/dist/formula/functions/lte.js +0 -27
- package/dist/formula/functions/lte.js.map +0 -1
- package/dist/formula/functions/max.d.ts +0 -19
- package/dist/formula/functions/max.js +0 -44
- package/dist/formula/functions/max.js.map +0 -1
- package/dist/formula/functions/min.d.ts +0 -19
- package/dist/formula/functions/min.js +0 -44
- package/dist/formula/functions/min.js.map +0 -1
- package/dist/formula/functions/minus.d.ts +0 -13
- package/dist/formula/functions/minus.js +0 -50
- package/dist/formula/functions/minus.js.map +0 -1
- package/dist/formula/functions/mod.d.ts +0 -12
- package/dist/formula/functions/mod.js +0 -31
- package/dist/formula/functions/mod.js.map +0 -1
- package/dist/formula/functions/mod.spec.d.ts +0 -2
- package/dist/formula/functions/mod.spec.js +0 -52
- package/dist/formula/functions/mod.spec.js.map +0 -1
- package/dist/formula/functions/multiply.d.ts +0 -12
- package/dist/formula/functions/multiply.js +0 -27
- package/dist/formula/functions/multiply.js.map +0 -1
- package/dist/formula/functions/ne.d.ts +0 -12
- package/dist/formula/functions/ne.js +0 -25
- package/dist/formula/functions/ne.js.map +0 -1
- package/dist/formula/functions/not.d.ts +0 -12
- package/dist/formula/functions/not.js +0 -30
- package/dist/formula/functions/not.js.map +0 -1
- package/dist/formula/functions/now.d.ts +0 -9
- package/dist/formula/functions/now.js +0 -21
- package/dist/formula/functions/now.js.map +0 -1
- package/dist/formula/functions/or.d.ts +0 -19
- package/dist/formula/functions/or.js +0 -28
- package/dist/formula/functions/or.js.map +0 -1
- package/dist/formula/functions/pi.d.ts +0 -9
- package/dist/formula/functions/pi.js +0 -19
- package/dist/formula/functions/pi.js.map +0 -1
- package/dist/formula/functions/power.d.ts +0 -12
- package/dist/formula/functions/power.js +0 -24
- package/dist/formula/functions/power.js.map +0 -1
- package/dist/formula/functions/product.d.ts +0 -19
- package/dist/formula/functions/product.js +0 -37
- package/dist/formula/functions/product.js.map +0 -1
- package/dist/formula/functions/radians.d.ts +0 -12
- package/dist/formula/functions/radians.js +0 -26
- package/dist/formula/functions/radians.js.map +0 -1
- package/dist/formula/functions/rand.d.ts +0 -9
- package/dist/formula/functions/rand.js +0 -19
- package/dist/formula/functions/rand.js.map +0 -1
- package/dist/formula/functions/round.d.ts +0 -17
- package/dist/formula/functions/round.js +0 -34
- package/dist/formula/functions/round.js.map +0 -1
- package/dist/formula/functions/rounddown.d.ts +0 -17
- package/dist/formula/functions/rounddown.js +0 -34
- package/dist/formula/functions/rounddown.js.map +0 -1
- package/dist/formula/functions/roundup.d.ts +0 -17
- package/dist/formula/functions/roundup.js +0 -34
- package/dist/formula/functions/roundup.js.map +0 -1
- package/dist/formula/functions/row.d.ts +0 -14
- package/dist/formula/functions/row.js +0 -30
- package/dist/formula/functions/row.js.map +0 -1
- package/dist/formula/functions/sin.d.ts +0 -12
- package/dist/formula/functions/sin.js +0 -26
- package/dist/formula/functions/sin.js.map +0 -1
- package/dist/formula/functions/sqrt.d.ts +0 -12
- package/dist/formula/functions/sqrt.js +0 -29
- package/dist/formula/functions/sqrt.js.map +0 -1
- package/dist/formula/functions/sum.d.ts +0 -19
- package/dist/formula/functions/sum.js +0 -44
- package/dist/formula/functions/sum.js.map +0 -1
- package/dist/formula/functions/sum.spec.d.ts +0 -2
- package/dist/formula/functions/sum.spec.js +0 -40
- package/dist/formula/functions/sum.spec.js.map +0 -1
- package/dist/formula/functions/sumif.d.ts +0 -18
- package/dist/formula/functions/sumif.js +0 -59
- package/dist/formula/functions/sumif.js.map +0 -1
- package/dist/formula/functions/tan.d.ts +0 -12
- package/dist/formula/functions/tan.js +0 -26
- package/dist/formula/functions/tan.js.map +0 -1
- package/dist/formula/functions/uminus.d.ts +0 -12
- package/dist/formula/functions/uminus.js +0 -23
- package/dist/formula/functions/uminus.js.map +0 -1
- package/dist/formula/functions/vlookup.d.ts +0 -18
- package/dist/formula/functions/vlookup.js +0 -74
- package/dist/formula/functions/vlookup.js.map +0 -1
- package/dist/formula/mapping.d.ts +0 -114
- package/dist/formula/mapping.js +0 -114
- package/dist/formula/mapping.js.map +0 -1
- package/dist/formula/solver.d.ts +0 -12
- package/dist/formula/solver.js +0 -64
- package/dist/formula/solver.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/autofill.d.ts +0 -17
- package/dist/lib/autofill.js +0 -389
- package/dist/lib/autofill.js.map +0 -1
- package/dist/lib/clipboard.d.ts +0 -3
- package/dist/lib/clipboard.js +0 -45
- package/dist/lib/clipboard.js.map +0 -1
- package/dist/lib/converters.d.ts +0 -10
- package/dist/lib/converters.js +0 -127
- package/dist/lib/converters.js.map +0 -1
- package/dist/lib/structs.d.ts +0 -60
- package/dist/lib/structs.js +0 -251
- package/dist/lib/structs.js.map +0 -1
- package/dist/lib/table.d.ts +0 -299
- package/dist/lib/table.js +0 -989
- package/dist/lib/table.js.map +0 -1
- package/dist/lib/time.d.ts +0 -14
- package/dist/lib/time.js +0 -60
- package/dist/lib/time.js.map +0 -1
- package/dist/lib/virtualization.d.ts +0 -30
- package/dist/lib/virtualization.js +0 -114
- package/dist/lib/virtualization.js.map +0 -1
- package/dist/parsers/core.d.ts +0 -36
- package/dist/parsers/core.js +0 -123
- package/dist/parsers/core.js.map +0 -1
- package/dist/renderers/checkbox.d.ts +0 -5
- package/dist/renderers/checkbox.js +0 -10
- package/dist/renderers/checkbox.js.map +0 -1
- package/dist/renderers/core.d.ts +0 -48
- package/dist/renderers/core.js +0 -143
- package/dist/renderers/core.js.map +0 -1
- package/dist/renderers/thousand_separator.d.ts +0 -5
- package/dist/renderers/thousand_separator.js +0 -14
- package/dist/renderers/thousand_separator.js.map +0 -1
- package/dist/store/actions.d.ts +0 -198
- package/dist/store/actions.js +0 -519
- package/dist/store/actions.js.map +0 -1
- package/dist/store/helpers.d.ts +0 -28
- package/dist/store/helpers.js +0 -78
- package/dist/store/helpers.js.map +0 -1
- package/dist/store/index.d.ts +0 -11
- package/dist/store/index.js +0 -3
- package/dist/store/index.js.map +0 -1
- package/dist/styles/embedder.d.ts +0 -2
- package/dist/styles/embedder.js +0 -16
- package/dist/styles/embedder.js.map +0 -1
- package/dist/styles/minified.d.ts +0 -3
- package/dist/styles/minified.js +0 -4
- package/dist/styles/minified.js.map +0 -1
- package/dist/types.d.ts +0 -213
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- package/dist/utils.d.ts +0 -2
- package/dist/utils.js +0 -7
- package/dist/utils.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export declare const DUMMY_IMG: HTMLImageElement;
|
|
3
|
+
export declare const HISTORY_LIMIT = 10;
|
|
4
|
+
export declare const DEFAULT_HEIGHT = 24;
|
|
5
|
+
export declare const DEFAULT_WIDTH = 90;
|
|
6
|
+
export declare const SHEET_HEIGHT = 500;
|
|
7
|
+
export declare const SHEET_WIDTH = 1000;
|
|
8
|
+
export declare const HEADER_HEIGHT = 24;
|
|
9
|
+
export declare const HEADER_WIDTH = 50;
|
|
10
|
+
export declare const MIN_WIDTH = 5;
|
|
11
|
+
export declare const MIN_HEIGHT = 5;
|
|
12
|
+
export declare const OVERSCAN_X = 5;
|
|
13
|
+
export declare const OVERSCAN_Y = 10;
|
|
14
|
+
export declare const DEFAULT_ALPHABET_CACHE_SIZE = 1000;
|
|
15
|
+
export declare class Special {
|
|
16
|
+
name: string;
|
|
17
|
+
constructor(name: string);
|
|
18
|
+
}
|
|
1
19
|
export { GridSheet } from "./components/GridSheet";
|
|
2
20
|
export { createTableRef } from "./components/Tabular";
|
|
3
21
|
export { Renderer, RendererMixinType } from "./renderers/core";
|
|
@@ -9,4 +27,1809 @@ export { ThousandSeparatorRendererMixin } from "./renderers/thousand_separator";
|
|
|
9
27
|
export { CheckboxRendererMixin } from "./renderers/checkbox";
|
|
10
28
|
export { BaseFunction } from "./formula/functions/__base";
|
|
11
29
|
export { Table } from "./lib/table";
|
|
12
|
-
|
|
30
|
+
export type Y = number;
|
|
31
|
+
export type X = number;
|
|
32
|
+
export type Height = number;
|
|
33
|
+
export type Width = number;
|
|
34
|
+
export type ShapeType = {
|
|
35
|
+
height: Height;
|
|
36
|
+
width: Width;
|
|
37
|
+
};
|
|
38
|
+
export type RectType = {
|
|
39
|
+
y: Y;
|
|
40
|
+
x: X;
|
|
41
|
+
height: Height;
|
|
42
|
+
width: Width;
|
|
43
|
+
};
|
|
44
|
+
export type MatrixType<T = any> = T[][];
|
|
45
|
+
export type Labeler = (n: number) => string;
|
|
46
|
+
export type Renderers = {
|
|
47
|
+
[s: string]: RendererType;
|
|
48
|
+
};
|
|
49
|
+
export type Parsers = {
|
|
50
|
+
[s: string]: ParserType;
|
|
51
|
+
};
|
|
52
|
+
export type Labelers = {
|
|
53
|
+
[s: string]: Labeler;
|
|
54
|
+
};
|
|
55
|
+
export type TableRef = {
|
|
56
|
+
table: UserTable;
|
|
57
|
+
dispatch: (table: UserTable) => void;
|
|
58
|
+
};
|
|
59
|
+
export type FeedbackType = (table: UserTable, points?: {
|
|
60
|
+
pointing: PointType;
|
|
61
|
+
selectingFrom: PointType;
|
|
62
|
+
selectingTo: PointType;
|
|
63
|
+
}) => void;
|
|
64
|
+
export type Mode = "light" | "dark";
|
|
65
|
+
export type Headers = "both" | "vertical" | "horizontal" | "none";
|
|
66
|
+
export type CellType<Custom = any> = {
|
|
67
|
+
value?: any;
|
|
68
|
+
style?: React.CSSProperties;
|
|
69
|
+
justifyContent?: React.CSSProperties['justifyContent'];
|
|
70
|
+
alignItems?: React.CSSProperties['alignItems'];
|
|
71
|
+
labeler?: string;
|
|
72
|
+
width?: Width;
|
|
73
|
+
height?: Height;
|
|
74
|
+
renderer?: string;
|
|
75
|
+
parser?: string;
|
|
76
|
+
custom?: Custom;
|
|
77
|
+
changedAt?: Date;
|
|
78
|
+
};
|
|
79
|
+
export type CellFilter = (cell: CellType) => boolean;
|
|
80
|
+
export type CellsByAddressType = {
|
|
81
|
+
[address: string]: CellType;
|
|
82
|
+
};
|
|
83
|
+
export type CellsByIdType = {
|
|
84
|
+
[id: Id]: CellType | undefined;
|
|
85
|
+
};
|
|
86
|
+
export type OptionsType = {
|
|
87
|
+
sheetHeight?: number;
|
|
88
|
+
sheetWidth?: number;
|
|
89
|
+
sheetResize?: "both" | "vertical" | "horizontal" | "none";
|
|
90
|
+
historyLimit?: number;
|
|
91
|
+
headerHeight?: number;
|
|
92
|
+
headerWidth?: number;
|
|
93
|
+
editingOnEnter?: boolean;
|
|
94
|
+
showAddress?: boolean;
|
|
95
|
+
minNumRows?: number;
|
|
96
|
+
maxNumRows?: number;
|
|
97
|
+
minNumCols?: number;
|
|
98
|
+
maxNumCols?: number;
|
|
99
|
+
mode?: Mode;
|
|
100
|
+
renderers?: Renderers;
|
|
101
|
+
parsers?: Parsers;
|
|
102
|
+
labelers?: Labelers;
|
|
103
|
+
onSave?: FeedbackType;
|
|
104
|
+
onChange?: FeedbackType;
|
|
105
|
+
onSelect?: FeedbackType;
|
|
106
|
+
};
|
|
107
|
+
export type RangeType = {
|
|
108
|
+
start: number;
|
|
109
|
+
end: number;
|
|
110
|
+
};
|
|
111
|
+
export type PointType = {
|
|
112
|
+
y: Y;
|
|
113
|
+
x: X;
|
|
114
|
+
};
|
|
115
|
+
export type PositionType = {
|
|
116
|
+
y: Y;
|
|
117
|
+
x: X;
|
|
118
|
+
};
|
|
119
|
+
export type ZoneType = {
|
|
120
|
+
startY: Y;
|
|
121
|
+
startX: X;
|
|
122
|
+
endY: Y;
|
|
123
|
+
endX: X;
|
|
124
|
+
};
|
|
125
|
+
export type AreaType = {
|
|
126
|
+
top: Y;
|
|
127
|
+
left: X;
|
|
128
|
+
bottom: Y;
|
|
129
|
+
right: X;
|
|
130
|
+
};
|
|
131
|
+
export type WriterType = (value: string) => void;
|
|
132
|
+
export type StoreType = {
|
|
133
|
+
table: Table;
|
|
134
|
+
tableInitialized: boolean;
|
|
135
|
+
sheetRef: React.MutableRefObject<HTMLDivElement | null>;
|
|
136
|
+
editorRef: React.MutableRefObject<HTMLTextAreaElement | null>;
|
|
137
|
+
gridOuterRef: React.MutableRefObject<HTMLDivElement | null>;
|
|
138
|
+
searchInputRef: React.MutableRefObject<HTMLInputElement | null>;
|
|
139
|
+
entering: boolean;
|
|
140
|
+
choosing: PointType;
|
|
141
|
+
cutting: boolean;
|
|
142
|
+
copyingZone: ZoneType;
|
|
143
|
+
selectingZone: ZoneType;
|
|
144
|
+
autofillDraggingTo: PointType | null;
|
|
145
|
+
headerTopSelecting: boolean;
|
|
146
|
+
headerLeftSelecting: boolean;
|
|
147
|
+
editingCell: string;
|
|
148
|
+
editorRect: RectType;
|
|
149
|
+
resizingRect: RectType;
|
|
150
|
+
sheetHeight: number;
|
|
151
|
+
sheetWidth: number;
|
|
152
|
+
headerHeight: number;
|
|
153
|
+
headerWidth: number;
|
|
154
|
+
minNumRows: number;
|
|
155
|
+
maxNumRows: number;
|
|
156
|
+
minNumCols: number;
|
|
157
|
+
maxNumCols: number;
|
|
158
|
+
searchQuery?: string;
|
|
159
|
+
matchingCells: string[];
|
|
160
|
+
matchingCellIndex: number;
|
|
161
|
+
editingOnEnter: boolean;
|
|
162
|
+
showAddress: boolean;
|
|
163
|
+
contextMenuPosition: PositionType;
|
|
164
|
+
resizingPositionY: [Y, Y, Y];
|
|
165
|
+
resizingPositionX: [X, X, X];
|
|
166
|
+
onSave?: FeedbackType;
|
|
167
|
+
};
|
|
168
|
+
export type Props = {
|
|
169
|
+
initial: CellsByAddressType;
|
|
170
|
+
tableRef?: React.MutableRefObject<TableRef | null>;
|
|
171
|
+
options?: OptionsType;
|
|
172
|
+
className?: string;
|
|
173
|
+
style?: React.CSSProperties;
|
|
174
|
+
additionalFunctions?: FunctionMapping;
|
|
175
|
+
};
|
|
176
|
+
export type Id = string;
|
|
177
|
+
export type Ids = Id[];
|
|
178
|
+
export type IdMatrix = Ids[];
|
|
179
|
+
export type Address = string;
|
|
180
|
+
export type MatricesByAddress<T> = {
|
|
181
|
+
[origin: Address]: MatrixType<T>;
|
|
182
|
+
};
|
|
183
|
+
export type StoreReflectionType = {
|
|
184
|
+
choosing?: PointType;
|
|
185
|
+
cutting?: boolean;
|
|
186
|
+
copyingZone?: ZoneType;
|
|
187
|
+
selectingZone?: ZoneType | undefined;
|
|
188
|
+
};
|
|
189
|
+
export type HistoryUpdateType = {
|
|
190
|
+
operation: "UPDATE";
|
|
191
|
+
reflection?: StoreReflectionType;
|
|
192
|
+
diffBefore: CellsByIdType;
|
|
193
|
+
diffAfter: CellsByIdType;
|
|
194
|
+
partial: boolean;
|
|
195
|
+
};
|
|
196
|
+
export type HistoryMoveType = {
|
|
197
|
+
operation: "MOVE";
|
|
198
|
+
reflection?: StoreReflectionType;
|
|
199
|
+
matrixFrom: IdMatrix;
|
|
200
|
+
matrixTo: IdMatrix;
|
|
201
|
+
matrixNew: IdMatrix;
|
|
202
|
+
pointFrom: PointType;
|
|
203
|
+
pointTo: PointType;
|
|
204
|
+
lostRows: MatricesByAddress<Id>;
|
|
205
|
+
};
|
|
206
|
+
export type HistoryAddRowsType = {
|
|
207
|
+
operation: "ADD_ROWS";
|
|
208
|
+
reflection?: StoreReflectionType;
|
|
209
|
+
y: number;
|
|
210
|
+
idMatrix: IdMatrix;
|
|
211
|
+
diffBefore?: CellsByIdType;
|
|
212
|
+
diffAfter?: CellsByIdType;
|
|
213
|
+
partial?: true;
|
|
214
|
+
};
|
|
215
|
+
export type HistoryRemoveRowsType = {
|
|
216
|
+
operation: "REMOVE_ROWS";
|
|
217
|
+
reflection?: StoreReflectionType;
|
|
218
|
+
y: number;
|
|
219
|
+
idMatrix: IdMatrix;
|
|
220
|
+
};
|
|
221
|
+
export type HistoryAddColsType = {
|
|
222
|
+
operation: "ADD_COLS";
|
|
223
|
+
reflection?: StoreReflectionType;
|
|
224
|
+
x: number;
|
|
225
|
+
idMatrix: IdMatrix;
|
|
226
|
+
diffBefore?: CellsByIdType;
|
|
227
|
+
diffAfter?: CellsByIdType;
|
|
228
|
+
partial?: true;
|
|
229
|
+
};
|
|
230
|
+
export type HistoryRemoveColsType = {
|
|
231
|
+
operation: "REMOVE_COLS";
|
|
232
|
+
reflection?: StoreReflectionType;
|
|
233
|
+
x: number;
|
|
234
|
+
idMatrix: IdMatrix;
|
|
235
|
+
};
|
|
236
|
+
export type HistoryType = HistoryUpdateType | HistoryMoveType | HistoryAddRowsType | HistoryRemoveRowsType | HistoryAddColsType | HistoryRemoveColsType;
|
|
237
|
+
export declare const setDefault: <K = PropertyKey, D = any>(target: any, key: K, defaultValue: D) => D;
|
|
238
|
+
type EvaluateProps = {
|
|
239
|
+
table: Table;
|
|
240
|
+
};
|
|
241
|
+
export declare class FormulaError {
|
|
242
|
+
code: string;
|
|
243
|
+
message: string;
|
|
244
|
+
error?: Error;
|
|
245
|
+
constructor(code: string, message: string, error?: Error);
|
|
246
|
+
}
|
|
247
|
+
export declare class Entity<T = any> {
|
|
248
|
+
value: T;
|
|
249
|
+
constructor(value: T);
|
|
250
|
+
}
|
|
251
|
+
export declare class Value extends Entity {
|
|
252
|
+
evaluate({}: EvaluateProps): any;
|
|
253
|
+
}
|
|
254
|
+
export declare class Unreferenced extends Entity {
|
|
255
|
+
evaluate({}: EvaluateProps): void;
|
|
256
|
+
}
|
|
257
|
+
export declare class InvalidRef extends Entity {
|
|
258
|
+
evaluate({}: EvaluateProps): void;
|
|
259
|
+
}
|
|
260
|
+
export declare class Ref extends Entity {
|
|
261
|
+
constructor(value: string);
|
|
262
|
+
evaluate({ table }: EvaluateProps): Table;
|
|
263
|
+
id(table: Table): any;
|
|
264
|
+
}
|
|
265
|
+
export declare class Range extends Entity<string> {
|
|
266
|
+
constructor(value: string);
|
|
267
|
+
evaluate({ table }: EvaluateProps): Table;
|
|
268
|
+
idRange(table: Table): string;
|
|
269
|
+
private complementRange;
|
|
270
|
+
}
|
|
271
|
+
export declare class Id extends Entity {
|
|
272
|
+
evaluate({ table }: EvaluateProps): import("../lib/table").ReadonlyTable;
|
|
273
|
+
ref(table: Table, slideY?: number, slideX?: number): string | undefined;
|
|
274
|
+
slide(table: Table, slideY?: number, slideX?: number): string | undefined;
|
|
275
|
+
}
|
|
276
|
+
export declare class IdRange extends Entity<string> {
|
|
277
|
+
evaluate({ table }: EvaluateProps): Table;
|
|
278
|
+
range(table: Table, slideY?: number, slideX?: number): string;
|
|
279
|
+
slide(table: Table, slideY?: number, slideX?: number): string;
|
|
280
|
+
}
|
|
281
|
+
export declare class Function {
|
|
282
|
+
args: Expression[];
|
|
283
|
+
name: string;
|
|
284
|
+
precedence: number;
|
|
285
|
+
constructor(name: string, precedence?: number, args?: Expression[]);
|
|
286
|
+
evaluate({ table }: EvaluateProps): any;
|
|
287
|
+
}
|
|
288
|
+
export type Expression = Value | Ref | Range | Id | IdRange | Function | Unreferenced | InvalidRef;
|
|
289
|
+
export type TokenType = "VALUE" | "REF" | "RANGE" | "ID" | "ID_RANGE" | "FUNCTION" | "PREFIX_OPERATOR" | "INFIX_OPERATOR" | "OPEN" | "CLOSE" | "COMMA" | "SPACE" | "UNREFERENCED" | "INVALID_REF";
|
|
290
|
+
export declare class Token {
|
|
291
|
+
type: TokenType;
|
|
292
|
+
entity: any;
|
|
293
|
+
precedence: number;
|
|
294
|
+
constructor(type: TokenType, entity: any, precedence?: number);
|
|
295
|
+
convert(): Id | IdRange | Range | Ref | Value | Function | Unreferenced | InvalidRef | undefined;
|
|
296
|
+
}
|
|
297
|
+
export declare class Lexer {
|
|
298
|
+
private index;
|
|
299
|
+
tokens: Token[];
|
|
300
|
+
private formula;
|
|
301
|
+
constructor(formula: string);
|
|
302
|
+
private isWhiteSpace;
|
|
303
|
+
private next;
|
|
304
|
+
private get;
|
|
305
|
+
private getToken;
|
|
306
|
+
stringifyToId(table: Table, slideY?: number, slideX?: number): string;
|
|
307
|
+
stringifyToRef(table: Table): string;
|
|
308
|
+
tokenize(): void;
|
|
309
|
+
private skipSpaces;
|
|
310
|
+
private getString;
|
|
311
|
+
}
|
|
312
|
+
export declare class Parser {
|
|
313
|
+
index: number;
|
|
314
|
+
depth: number;
|
|
315
|
+
tokens: Token[];
|
|
316
|
+
constructor(tokens: Token[]);
|
|
317
|
+
build(): Expression | undefined;
|
|
318
|
+
private parse;
|
|
319
|
+
}
|
|
320
|
+
export declare const convertFormulaAbsolute: ({ value, table, slideY, slideX, }: {
|
|
321
|
+
value: any;
|
|
322
|
+
table: Table;
|
|
323
|
+
slideY?: number | undefined;
|
|
324
|
+
slideX?: number | undefined;
|
|
325
|
+
}) => any;
|
|
326
|
+
export declare const functions: {
|
|
327
|
+
abs: typeof AbsFunction;
|
|
328
|
+
add: typeof AddFunction;
|
|
329
|
+
divide: typeof DivideFunction;
|
|
330
|
+
mod: typeof ModFunction;
|
|
331
|
+
minus: typeof MinusFunction;
|
|
332
|
+
uminus: typeof UminusFunction;
|
|
333
|
+
multiply: typeof MultiplyFunction;
|
|
334
|
+
pow: typeof PowerFunction;
|
|
335
|
+
power: typeof PowerFunction;
|
|
336
|
+
sqrt: typeof SqrtFunction;
|
|
337
|
+
sum: typeof SumFunction;
|
|
338
|
+
sumif: typeof SumifFunction;
|
|
339
|
+
max: typeof MaxFunction;
|
|
340
|
+
min: typeof MinFunction;
|
|
341
|
+
average: typeof AverageFunction;
|
|
342
|
+
count: typeof CountFunction;
|
|
343
|
+
counta: typeof CountaFunction;
|
|
344
|
+
countif: typeof CountifFunction;
|
|
345
|
+
product: typeof ProductFunction;
|
|
346
|
+
concat: typeof ConcatFunction;
|
|
347
|
+
concatenate: typeof ConcatenateFunction;
|
|
348
|
+
eq: typeof EqFunction;
|
|
349
|
+
ne: typeof NeFunction;
|
|
350
|
+
gt: typeof GtFunction;
|
|
351
|
+
gte: typeof GteFunction;
|
|
352
|
+
lt: typeof LtFunction;
|
|
353
|
+
lte: typeof LteFunction;
|
|
354
|
+
and: typeof AndFunction;
|
|
355
|
+
or: typeof OrFunction;
|
|
356
|
+
round: typeof RoundFunction;
|
|
357
|
+
rounddown: typeof RounddownFunction;
|
|
358
|
+
roundup: typeof RoundupFunction;
|
|
359
|
+
if: typeof IfFunction;
|
|
360
|
+
iferror: typeof IfErrorFunction;
|
|
361
|
+
not: typeof NotFunction;
|
|
362
|
+
vlookup: typeof VlookupFunction;
|
|
363
|
+
hlookup: typeof HlookupFunction;
|
|
364
|
+
row: typeof RowFunction;
|
|
365
|
+
col: typeof ColFunction;
|
|
366
|
+
now: typeof NowFunction;
|
|
367
|
+
rand: typeof RandFunction;
|
|
368
|
+
log: typeof LogFunction;
|
|
369
|
+
log10: typeof Log10Function;
|
|
370
|
+
ln: typeof LnFunction;
|
|
371
|
+
exp: typeof ExpFunction;
|
|
372
|
+
pi: typeof PiFunction;
|
|
373
|
+
radians: typeof RadiansFunction;
|
|
374
|
+
sin: typeof SinFunction;
|
|
375
|
+
cos: typeof CosFunction;
|
|
376
|
+
tan: typeof TanFunction;
|
|
377
|
+
asin: typeof AsinFunction;
|
|
378
|
+
acos: typeof AcosFunction;
|
|
379
|
+
atan: typeof AtanFunction;
|
|
380
|
+
atan2: typeof Atan2Function;
|
|
381
|
+
len: typeof LenFunction;
|
|
382
|
+
lenb: typeof LenbFunction;
|
|
383
|
+
};
|
|
384
|
+
export declare const solveFormula: ({ value, table, raise, }: {
|
|
385
|
+
value: any;
|
|
386
|
+
table: Table;
|
|
387
|
+
raise?: boolean | undefined;
|
|
388
|
+
}) => any;
|
|
389
|
+
export declare const solveTable: ({ table, raise, }: {
|
|
390
|
+
table: Table;
|
|
391
|
+
raise?: boolean | undefined;
|
|
392
|
+
}) => MatrixType;
|
|
393
|
+
export type FunctionProps = {
|
|
394
|
+
args: Expression[];
|
|
395
|
+
table: Table;
|
|
396
|
+
};
|
|
397
|
+
export declare class BaseFunction {
|
|
398
|
+
example: string;
|
|
399
|
+
helpTexts: string[];
|
|
400
|
+
helpArgs: {
|
|
401
|
+
name: string;
|
|
402
|
+
description: string;
|
|
403
|
+
}[];
|
|
404
|
+
protected bareArgs: any[];
|
|
405
|
+
protected table: Table;
|
|
406
|
+
constructor({ args, table }: FunctionProps);
|
|
407
|
+
protected validate(): void;
|
|
408
|
+
call(): any;
|
|
409
|
+
}
|
|
410
|
+
export type FunctionMapping = {
|
|
411
|
+
[functionName: string]: any;
|
|
412
|
+
};
|
|
413
|
+
export declare const ensureNumber: (value: any, alternative?: number) => number;
|
|
414
|
+
export declare const ensureString: (value: any) => string;
|
|
415
|
+
export declare const ensureBoolean: (value: any, alternative?: boolean) => boolean;
|
|
416
|
+
export declare const stripTable: (value: any, y?: number, x?: number) => any;
|
|
417
|
+
export declare const check: (value: any, condition: string) => boolean;
|
|
418
|
+
export declare class AbsFunction extends BaseFunction {
|
|
419
|
+
example: string;
|
|
420
|
+
helpText: string[];
|
|
421
|
+
helpArgs: {
|
|
422
|
+
name: string;
|
|
423
|
+
description: string;
|
|
424
|
+
}[];
|
|
425
|
+
protected validate(): void;
|
|
426
|
+
protected main(value: number): number;
|
|
427
|
+
}
|
|
428
|
+
export declare class AcosFunction extends BaseFunction {
|
|
429
|
+
example: string;
|
|
430
|
+
helpText: string[];
|
|
431
|
+
helpArgs: {
|
|
432
|
+
name: string;
|
|
433
|
+
description: string;
|
|
434
|
+
}[];
|
|
435
|
+
protected validate(): void;
|
|
436
|
+
protected main(value: number): number;
|
|
437
|
+
}
|
|
438
|
+
export declare class AddFunction extends BaseFunction {
|
|
439
|
+
example: string;
|
|
440
|
+
helpText: string[];
|
|
441
|
+
helpArgs: {
|
|
442
|
+
name: string;
|
|
443
|
+
description: string;
|
|
444
|
+
}[];
|
|
445
|
+
protected validate(): void;
|
|
446
|
+
protected main(v1: number | Date | TimeDelta, v2: number | Date | TimeDelta): number | Date;
|
|
447
|
+
}
|
|
448
|
+
export declare class AndFunction extends BaseFunction {
|
|
449
|
+
example: string;
|
|
450
|
+
helpText: string[];
|
|
451
|
+
helpArgs: ({
|
|
452
|
+
name: string;
|
|
453
|
+
description: string;
|
|
454
|
+
optional?: undefined;
|
|
455
|
+
iterable?: undefined;
|
|
456
|
+
} | {
|
|
457
|
+
name: string;
|
|
458
|
+
description: string;
|
|
459
|
+
optional: boolean;
|
|
460
|
+
iterable: boolean;
|
|
461
|
+
})[];
|
|
462
|
+
protected validate(): void;
|
|
463
|
+
protected main(...values: boolean[]): boolean;
|
|
464
|
+
}
|
|
465
|
+
export declare class AsinFunction extends BaseFunction {
|
|
466
|
+
example: string;
|
|
467
|
+
helpText: string[];
|
|
468
|
+
helpArgs: {
|
|
469
|
+
name: string;
|
|
470
|
+
description: string;
|
|
471
|
+
}[];
|
|
472
|
+
protected validate(): void;
|
|
473
|
+
protected main(value: number): number;
|
|
474
|
+
}
|
|
475
|
+
export declare class AtanFunction extends BaseFunction {
|
|
476
|
+
example: string;
|
|
477
|
+
helpText: string[];
|
|
478
|
+
helpArgs: {
|
|
479
|
+
name: string;
|
|
480
|
+
description: string;
|
|
481
|
+
}[];
|
|
482
|
+
protected validate(): void;
|
|
483
|
+
protected main(value: number): number;
|
|
484
|
+
}
|
|
485
|
+
export declare class Atan2Function extends BaseFunction {
|
|
486
|
+
example: string;
|
|
487
|
+
helpText: string[];
|
|
488
|
+
helpArgs: {
|
|
489
|
+
name: string;
|
|
490
|
+
description: string;
|
|
491
|
+
}[];
|
|
492
|
+
protected validate(): void;
|
|
493
|
+
protected main(x: number, y: number): number;
|
|
494
|
+
}
|
|
495
|
+
export declare class AverageFunction extends BaseFunction {
|
|
496
|
+
example: string;
|
|
497
|
+
helpText: string[];
|
|
498
|
+
helpArgs: ({
|
|
499
|
+
name: string;
|
|
500
|
+
description: string;
|
|
501
|
+
optional?: undefined;
|
|
502
|
+
iterable?: undefined;
|
|
503
|
+
} | {
|
|
504
|
+
name: string;
|
|
505
|
+
description: string;
|
|
506
|
+
optional: boolean;
|
|
507
|
+
iterable: boolean;
|
|
508
|
+
})[];
|
|
509
|
+
protected validate(): void;
|
|
510
|
+
protected main(...values: number[]): number;
|
|
511
|
+
}
|
|
512
|
+
export declare class ColFunction extends BaseFunction {
|
|
513
|
+
example: string;
|
|
514
|
+
helpText: string[];
|
|
515
|
+
helpArgs: {
|
|
516
|
+
name: string;
|
|
517
|
+
description: string;
|
|
518
|
+
option: boolean;
|
|
519
|
+
}[];
|
|
520
|
+
protected validate(): void;
|
|
521
|
+
protected main(trimmed: Table): number;
|
|
522
|
+
}
|
|
523
|
+
export declare class ConcatFunction extends BaseFunction {
|
|
524
|
+
example: string;
|
|
525
|
+
helpText: string[];
|
|
526
|
+
helpArgs: {
|
|
527
|
+
name: string;
|
|
528
|
+
description: string;
|
|
529
|
+
}[];
|
|
530
|
+
protected validate(): void;
|
|
531
|
+
protected main(v1: string, v2: string): string;
|
|
532
|
+
}
|
|
533
|
+
export declare class ConcatenateFunction extends BaseFunction {
|
|
534
|
+
example: string;
|
|
535
|
+
helpText: string[];
|
|
536
|
+
helpArgs: ({
|
|
537
|
+
name: string;
|
|
538
|
+
description: string;
|
|
539
|
+
optional?: undefined;
|
|
540
|
+
iterable?: undefined;
|
|
541
|
+
} | {
|
|
542
|
+
name: string;
|
|
543
|
+
description: string;
|
|
544
|
+
optional: boolean;
|
|
545
|
+
iterable: boolean;
|
|
546
|
+
})[];
|
|
547
|
+
protected validate(): void;
|
|
548
|
+
protected main(...values: string[]): string;
|
|
549
|
+
}
|
|
550
|
+
export declare class CosFunction extends BaseFunction {
|
|
551
|
+
example: string;
|
|
552
|
+
helpText: string[];
|
|
553
|
+
helpArgs: {
|
|
554
|
+
name: string;
|
|
555
|
+
description: string;
|
|
556
|
+
}[];
|
|
557
|
+
protected validate(): void;
|
|
558
|
+
protected main(angle: number): number;
|
|
559
|
+
}
|
|
560
|
+
export declare class CountFunction extends BaseFunction {
|
|
561
|
+
example: string;
|
|
562
|
+
helpText: string[];
|
|
563
|
+
helpArgs: ({
|
|
564
|
+
name: string;
|
|
565
|
+
description: string;
|
|
566
|
+
optional?: undefined;
|
|
567
|
+
iterable?: undefined;
|
|
568
|
+
} | {
|
|
569
|
+
name: string;
|
|
570
|
+
description: string;
|
|
571
|
+
optional: boolean;
|
|
572
|
+
iterable: boolean;
|
|
573
|
+
})[];
|
|
574
|
+
protected validate(): void;
|
|
575
|
+
protected main(...values: any[]): number;
|
|
576
|
+
}
|
|
577
|
+
export declare class CountaFunction extends BaseFunction {
|
|
578
|
+
example: string;
|
|
579
|
+
helpText: string[];
|
|
580
|
+
helpArgs: ({
|
|
581
|
+
name: string;
|
|
582
|
+
description: string;
|
|
583
|
+
optional?: undefined;
|
|
584
|
+
iterable?: undefined;
|
|
585
|
+
} | {
|
|
586
|
+
name: string;
|
|
587
|
+
description: string;
|
|
588
|
+
optional: boolean;
|
|
589
|
+
iterable: boolean;
|
|
590
|
+
})[];
|
|
591
|
+
protected validate(): void;
|
|
592
|
+
protected main(...values: any[]): number;
|
|
593
|
+
}
|
|
594
|
+
export declare class CountifFunction extends BaseFunction {
|
|
595
|
+
example: string;
|
|
596
|
+
helpText: string[];
|
|
597
|
+
helpArgs: {
|
|
598
|
+
name: string;
|
|
599
|
+
description: string;
|
|
600
|
+
}[];
|
|
601
|
+
protected validate(): void;
|
|
602
|
+
protected main(table: Table, condition: string): number;
|
|
603
|
+
}
|
|
604
|
+
export declare class DivideFunction extends BaseFunction {
|
|
605
|
+
example: string;
|
|
606
|
+
helpText: string[];
|
|
607
|
+
helpArgs: {
|
|
608
|
+
name: string;
|
|
609
|
+
description: string;
|
|
610
|
+
}[];
|
|
611
|
+
protected validate(): void;
|
|
612
|
+
protected main(divided: number, divisor: number): number;
|
|
613
|
+
}
|
|
614
|
+
export declare class EqFunction extends BaseFunction {
|
|
615
|
+
example: string;
|
|
616
|
+
helpText: string[];
|
|
617
|
+
helpArgs: {
|
|
618
|
+
name: string;
|
|
619
|
+
description: string;
|
|
620
|
+
}[];
|
|
621
|
+
protected validate(): void;
|
|
622
|
+
protected main(v1: number, v2: number): boolean;
|
|
623
|
+
}
|
|
624
|
+
export declare class ExpFunction extends BaseFunction {
|
|
625
|
+
example: string;
|
|
626
|
+
helpText: string[];
|
|
627
|
+
helpArgs: {
|
|
628
|
+
name: string;
|
|
629
|
+
description: string;
|
|
630
|
+
}[];
|
|
631
|
+
protected validate(): void;
|
|
632
|
+
protected main(exponent: number): number;
|
|
633
|
+
}
|
|
634
|
+
export declare class GtFunction extends BaseFunction {
|
|
635
|
+
example: string;
|
|
636
|
+
helpText: string[];
|
|
637
|
+
helpArgs: {
|
|
638
|
+
name: string;
|
|
639
|
+
description: string;
|
|
640
|
+
}[];
|
|
641
|
+
protected validate(): void;
|
|
642
|
+
protected main(v1: number, v2: number): boolean;
|
|
643
|
+
}
|
|
644
|
+
export declare class GteFunction extends BaseFunction {
|
|
645
|
+
example: string;
|
|
646
|
+
helpText: string[];
|
|
647
|
+
helpArgs: {
|
|
648
|
+
name: string;
|
|
649
|
+
description: string;
|
|
650
|
+
}[];
|
|
651
|
+
protected validate(): void;
|
|
652
|
+
protected main(v1: number, v2: number): boolean;
|
|
653
|
+
}
|
|
654
|
+
export declare class HlookupFunction extends BaseFunction {
|
|
655
|
+
example: string;
|
|
656
|
+
helpText: string[];
|
|
657
|
+
helpArgs: ({
|
|
658
|
+
name: string;
|
|
659
|
+
description: string;
|
|
660
|
+
option?: undefined;
|
|
661
|
+
} | {
|
|
662
|
+
name: string;
|
|
663
|
+
description: string;
|
|
664
|
+
option: boolean;
|
|
665
|
+
})[];
|
|
666
|
+
protected validate(): void;
|
|
667
|
+
protected main(key: any, range: Table, index: number, isSorted: boolean): any;
|
|
668
|
+
}
|
|
669
|
+
export declare class IfFunction extends BaseFunction {
|
|
670
|
+
example: string;
|
|
671
|
+
helpText: string[];
|
|
672
|
+
helpArgs: ({
|
|
673
|
+
name: string;
|
|
674
|
+
description: string;
|
|
675
|
+
optional?: undefined;
|
|
676
|
+
} | {
|
|
677
|
+
name: string;
|
|
678
|
+
description: string;
|
|
679
|
+
optional: boolean;
|
|
680
|
+
})[];
|
|
681
|
+
protected validate(): void;
|
|
682
|
+
protected main(condition: boolean, v1: any, v2?: any): any;
|
|
683
|
+
}
|
|
684
|
+
export declare class IfErrorFunction {
|
|
685
|
+
example: string;
|
|
686
|
+
helpText: string[];
|
|
687
|
+
helpArgs: ({
|
|
688
|
+
name: string;
|
|
689
|
+
description: string;
|
|
690
|
+
optional?: undefined;
|
|
691
|
+
} | {
|
|
692
|
+
name: string;
|
|
693
|
+
description: string;
|
|
694
|
+
optional: boolean;
|
|
695
|
+
})[];
|
|
696
|
+
private args;
|
|
697
|
+
private table;
|
|
698
|
+
constructor({ args, table }: FunctionProps);
|
|
699
|
+
protected validate(): void;
|
|
700
|
+
call(): any;
|
|
701
|
+
}
|
|
702
|
+
export declare class LenFunction extends BaseFunction {
|
|
703
|
+
example: string;
|
|
704
|
+
helpText: string[];
|
|
705
|
+
helpArgs: {
|
|
706
|
+
name: string;
|
|
707
|
+
description: string;
|
|
708
|
+
}[];
|
|
709
|
+
protected validate(): void;
|
|
710
|
+
protected main(text: string): number;
|
|
711
|
+
}
|
|
712
|
+
export declare class LenbFunction extends BaseFunction {
|
|
713
|
+
example: string;
|
|
714
|
+
helpText: string[];
|
|
715
|
+
helpArgs: {
|
|
716
|
+
name: string;
|
|
717
|
+
description: string;
|
|
718
|
+
}[];
|
|
719
|
+
protected validate(): void;
|
|
720
|
+
protected main(text: string): number;
|
|
721
|
+
}
|
|
722
|
+
export declare class LnFunction extends BaseFunction {
|
|
723
|
+
example: string;
|
|
724
|
+
helpText: string[];
|
|
725
|
+
helpArgs: {
|
|
726
|
+
name: string;
|
|
727
|
+
description: string;
|
|
728
|
+
}[];
|
|
729
|
+
protected validate(): void;
|
|
730
|
+
protected main(value: number): number;
|
|
731
|
+
}
|
|
732
|
+
export declare class LogFunction extends BaseFunction {
|
|
733
|
+
example: string;
|
|
734
|
+
helpText: string[];
|
|
735
|
+
helpArgs: {
|
|
736
|
+
name: string;
|
|
737
|
+
description: string;
|
|
738
|
+
}[];
|
|
739
|
+
protected validate(): void;
|
|
740
|
+
protected main(value: number, base: number): number;
|
|
741
|
+
}
|
|
742
|
+
export declare class Log10Function extends BaseFunction {
|
|
743
|
+
example: string;
|
|
744
|
+
helpText: string[];
|
|
745
|
+
helpArgs: {
|
|
746
|
+
name: string;
|
|
747
|
+
description: string;
|
|
748
|
+
}[];
|
|
749
|
+
protected validate(): void;
|
|
750
|
+
protected main(value: number): number;
|
|
751
|
+
}
|
|
752
|
+
export declare class LtFunction extends BaseFunction {
|
|
753
|
+
example: string;
|
|
754
|
+
helpText: string[];
|
|
755
|
+
helpArgs: {
|
|
756
|
+
name: string;
|
|
757
|
+
description: string;
|
|
758
|
+
}[];
|
|
759
|
+
protected validate(): void;
|
|
760
|
+
protected main(v1: number, v2: number): boolean;
|
|
761
|
+
}
|
|
762
|
+
export declare class LteFunction extends BaseFunction {
|
|
763
|
+
example: string;
|
|
764
|
+
helpText: string[];
|
|
765
|
+
helpArgs: {
|
|
766
|
+
name: string;
|
|
767
|
+
description: string;
|
|
768
|
+
}[];
|
|
769
|
+
protected validate(): void;
|
|
770
|
+
protected main(v1: number, v2: number): boolean;
|
|
771
|
+
}
|
|
772
|
+
export declare class MaxFunction extends BaseFunction {
|
|
773
|
+
example: string;
|
|
774
|
+
helpText: string[];
|
|
775
|
+
helpArgs: ({
|
|
776
|
+
name: string;
|
|
777
|
+
description: string;
|
|
778
|
+
optional?: undefined;
|
|
779
|
+
iterable?: undefined;
|
|
780
|
+
} | {
|
|
781
|
+
name: string;
|
|
782
|
+
description: string;
|
|
783
|
+
optional: boolean;
|
|
784
|
+
iterable: boolean;
|
|
785
|
+
})[];
|
|
786
|
+
protected validate(): void;
|
|
787
|
+
protected main(...values: number[]): number;
|
|
788
|
+
}
|
|
789
|
+
export declare class MinFunction extends BaseFunction {
|
|
790
|
+
example: string;
|
|
791
|
+
helpText: string[];
|
|
792
|
+
helpArgs: ({
|
|
793
|
+
name: string;
|
|
794
|
+
description: string;
|
|
795
|
+
optional?: undefined;
|
|
796
|
+
iterable?: undefined;
|
|
797
|
+
} | {
|
|
798
|
+
name: string;
|
|
799
|
+
description: string;
|
|
800
|
+
optional: boolean;
|
|
801
|
+
iterable: boolean;
|
|
802
|
+
})[];
|
|
803
|
+
protected validate(): void;
|
|
804
|
+
protected main(...values: number[]): number;
|
|
805
|
+
}
|
|
806
|
+
export declare class MinusFunction extends BaseFunction {
|
|
807
|
+
example: string;
|
|
808
|
+
helpText: string[];
|
|
809
|
+
helpArgs: {
|
|
810
|
+
name: string;
|
|
811
|
+
description: string;
|
|
812
|
+
}[];
|
|
813
|
+
protected validate(): void;
|
|
814
|
+
protected main(v1: number | Date | TimeDelta, v2: number | Date | TimeDelta): number | Date | TimeDelta;
|
|
815
|
+
}
|
|
816
|
+
export declare class ModFunction extends BaseFunction {
|
|
817
|
+
example: string;
|
|
818
|
+
helpText: string[];
|
|
819
|
+
helpArgs: {
|
|
820
|
+
name: string;
|
|
821
|
+
description: string;
|
|
822
|
+
}[];
|
|
823
|
+
protected validate(): void;
|
|
824
|
+
protected main(v1: number, v2: number): number;
|
|
825
|
+
}
|
|
826
|
+
export declare class MultiplyFunction extends BaseFunction {
|
|
827
|
+
example: string;
|
|
828
|
+
helpText: string[];
|
|
829
|
+
helpArgs: {
|
|
830
|
+
name: string;
|
|
831
|
+
description: string;
|
|
832
|
+
}[];
|
|
833
|
+
protected validate(): void;
|
|
834
|
+
protected main(v1: number, v2: number): number;
|
|
835
|
+
}
|
|
836
|
+
export declare class NeFunction extends BaseFunction {
|
|
837
|
+
example: string;
|
|
838
|
+
helpText: string[];
|
|
839
|
+
helpArgs: {
|
|
840
|
+
name: string;
|
|
841
|
+
description: string;
|
|
842
|
+
}[];
|
|
843
|
+
protected validate(): void;
|
|
844
|
+
protected main(v1: number, v2: number): boolean;
|
|
845
|
+
}
|
|
846
|
+
export declare class NotFunction extends BaseFunction {
|
|
847
|
+
example: string;
|
|
848
|
+
helpText: string[];
|
|
849
|
+
helpArgs: {
|
|
850
|
+
name: string;
|
|
851
|
+
description: string;
|
|
852
|
+
}[];
|
|
853
|
+
protected validate(): void;
|
|
854
|
+
protected main(v1: boolean): boolean;
|
|
855
|
+
}
|
|
856
|
+
export declare class NowFunction extends BaseFunction {
|
|
857
|
+
example: string;
|
|
858
|
+
helpText: string[];
|
|
859
|
+
helpArgs: never[];
|
|
860
|
+
protected validate(): void;
|
|
861
|
+
protected main(): Date;
|
|
862
|
+
}
|
|
863
|
+
export declare class OrFunction extends BaseFunction {
|
|
864
|
+
example: string;
|
|
865
|
+
helpText: string[];
|
|
866
|
+
helpArgs: ({
|
|
867
|
+
name: string;
|
|
868
|
+
description: string;
|
|
869
|
+
optional?: undefined;
|
|
870
|
+
iterable?: undefined;
|
|
871
|
+
} | {
|
|
872
|
+
name: string;
|
|
873
|
+
description: string;
|
|
874
|
+
optional: boolean;
|
|
875
|
+
iterable: boolean;
|
|
876
|
+
})[];
|
|
877
|
+
protected validate(): void;
|
|
878
|
+
protected main(...values: boolean[]): boolean;
|
|
879
|
+
}
|
|
880
|
+
export declare class PiFunction extends BaseFunction {
|
|
881
|
+
example: string;
|
|
882
|
+
helpText: string[];
|
|
883
|
+
helpArgs: never[];
|
|
884
|
+
protected validate(): void;
|
|
885
|
+
protected main(): number;
|
|
886
|
+
}
|
|
887
|
+
export declare class PowerFunction extends BaseFunction {
|
|
888
|
+
example: string;
|
|
889
|
+
helpText: string[];
|
|
890
|
+
helpArgs: {
|
|
891
|
+
name: string;
|
|
892
|
+
description: string;
|
|
893
|
+
}[];
|
|
894
|
+
protected validate(): void;
|
|
895
|
+
protected main(base: number, exponent: number): number;
|
|
896
|
+
}
|
|
897
|
+
export declare class ProductFunction extends BaseFunction {
|
|
898
|
+
example: string;
|
|
899
|
+
helpText: string[];
|
|
900
|
+
helpArgs: ({
|
|
901
|
+
name: string;
|
|
902
|
+
description: string;
|
|
903
|
+
optional?: undefined;
|
|
904
|
+
iterable?: undefined;
|
|
905
|
+
} | {
|
|
906
|
+
name: string;
|
|
907
|
+
description: string;
|
|
908
|
+
optional: boolean;
|
|
909
|
+
iterable: boolean;
|
|
910
|
+
})[];
|
|
911
|
+
protected validate(): void;
|
|
912
|
+
protected main(...values: number[]): number;
|
|
913
|
+
}
|
|
914
|
+
export declare class RadiansFunction extends BaseFunction {
|
|
915
|
+
example: string;
|
|
916
|
+
helpText: string[];
|
|
917
|
+
helpArgs: {
|
|
918
|
+
name: string;
|
|
919
|
+
description: string;
|
|
920
|
+
}[];
|
|
921
|
+
protected validate(): void;
|
|
922
|
+
protected main(angle: number): number;
|
|
923
|
+
}
|
|
924
|
+
export declare class RandFunction extends BaseFunction {
|
|
925
|
+
example: string;
|
|
926
|
+
helpText: string[];
|
|
927
|
+
helpArgs: never[];
|
|
928
|
+
protected validate(): void;
|
|
929
|
+
protected main(): number;
|
|
930
|
+
}
|
|
931
|
+
export declare class RoundFunction extends BaseFunction {
|
|
932
|
+
example: string;
|
|
933
|
+
helpText: string[];
|
|
934
|
+
helpArgs: ({
|
|
935
|
+
name: string;
|
|
936
|
+
description: string;
|
|
937
|
+
optional?: undefined;
|
|
938
|
+
} | {
|
|
939
|
+
name: string;
|
|
940
|
+
description: string;
|
|
941
|
+
optional: boolean;
|
|
942
|
+
})[];
|
|
943
|
+
protected validate(): void;
|
|
944
|
+
protected main(value: number, digit?: number): number;
|
|
945
|
+
}
|
|
946
|
+
export declare class RounddownFunction extends BaseFunction {
|
|
947
|
+
example: string;
|
|
948
|
+
helpText: string[];
|
|
949
|
+
helpArgs: ({
|
|
950
|
+
name: string;
|
|
951
|
+
description: string;
|
|
952
|
+
optional?: undefined;
|
|
953
|
+
} | {
|
|
954
|
+
name: string;
|
|
955
|
+
description: string;
|
|
956
|
+
optional: boolean;
|
|
957
|
+
})[];
|
|
958
|
+
protected validate(): void;
|
|
959
|
+
protected main(value: number, digit?: number): number;
|
|
960
|
+
}
|
|
961
|
+
export declare class RoundupFunction extends BaseFunction {
|
|
962
|
+
example: string;
|
|
963
|
+
helpText: string[];
|
|
964
|
+
helpArgs: ({
|
|
965
|
+
name: string;
|
|
966
|
+
description: string;
|
|
967
|
+
optional?: undefined;
|
|
968
|
+
} | {
|
|
969
|
+
name: string;
|
|
970
|
+
description: string;
|
|
971
|
+
optional: boolean;
|
|
972
|
+
})[];
|
|
973
|
+
protected validate(): void;
|
|
974
|
+
protected main(value: number, digit?: number): number;
|
|
975
|
+
}
|
|
976
|
+
export declare class RowFunction extends BaseFunction {
|
|
977
|
+
example: string;
|
|
978
|
+
helpText: string[];
|
|
979
|
+
helpArgs: {
|
|
980
|
+
name: string;
|
|
981
|
+
description: string;
|
|
982
|
+
option: boolean;
|
|
983
|
+
}[];
|
|
984
|
+
protected validate(): void;
|
|
985
|
+
protected main(trimmed: Table): number;
|
|
986
|
+
}
|
|
987
|
+
export declare class SinFunction extends BaseFunction {
|
|
988
|
+
example: string;
|
|
989
|
+
helpText: string[];
|
|
990
|
+
helpArgs: {
|
|
991
|
+
name: string;
|
|
992
|
+
description: string;
|
|
993
|
+
}[];
|
|
994
|
+
protected validate(): void;
|
|
995
|
+
protected main(angle: number): number;
|
|
996
|
+
}
|
|
997
|
+
export declare class SqrtFunction extends BaseFunction {
|
|
998
|
+
example: string;
|
|
999
|
+
helpText: string[];
|
|
1000
|
+
helpArgs: {
|
|
1001
|
+
name: string;
|
|
1002
|
+
description: string;
|
|
1003
|
+
}[];
|
|
1004
|
+
protected validate(): void;
|
|
1005
|
+
protected main(value: number): number;
|
|
1006
|
+
}
|
|
1007
|
+
export declare class SumFunction extends BaseFunction {
|
|
1008
|
+
example: string;
|
|
1009
|
+
helpText: string[];
|
|
1010
|
+
helpArgs: ({
|
|
1011
|
+
name: string;
|
|
1012
|
+
description: string;
|
|
1013
|
+
optional?: undefined;
|
|
1014
|
+
iterable?: undefined;
|
|
1015
|
+
} | {
|
|
1016
|
+
name: string;
|
|
1017
|
+
description: string;
|
|
1018
|
+
optional: boolean;
|
|
1019
|
+
iterable: boolean;
|
|
1020
|
+
})[];
|
|
1021
|
+
protected validate(): void;
|
|
1022
|
+
protected main(...values: number[]): number;
|
|
1023
|
+
}
|
|
1024
|
+
export declare class SumifFunction extends BaseFunction {
|
|
1025
|
+
example: string;
|
|
1026
|
+
helpText: string[];
|
|
1027
|
+
helpArgs: ({
|
|
1028
|
+
name: string;
|
|
1029
|
+
description: string;
|
|
1030
|
+
optional?: undefined;
|
|
1031
|
+
} | {
|
|
1032
|
+
name: string;
|
|
1033
|
+
description: string;
|
|
1034
|
+
optional: boolean;
|
|
1035
|
+
})[];
|
|
1036
|
+
protected validate(): void;
|
|
1037
|
+
protected main(range: Table, condition: string, sumRange: Table): number;
|
|
1038
|
+
}
|
|
1039
|
+
export declare class TanFunction extends BaseFunction {
|
|
1040
|
+
example: string;
|
|
1041
|
+
helpText: string[];
|
|
1042
|
+
helpArgs: {
|
|
1043
|
+
name: string;
|
|
1044
|
+
description: string;
|
|
1045
|
+
}[];
|
|
1046
|
+
protected validate(): void;
|
|
1047
|
+
protected main(angle: number): number;
|
|
1048
|
+
}
|
|
1049
|
+
export declare class UminusFunction extends BaseFunction {
|
|
1050
|
+
example: string;
|
|
1051
|
+
helpText: string[];
|
|
1052
|
+
helpArgs: {
|
|
1053
|
+
name: string;
|
|
1054
|
+
description: string;
|
|
1055
|
+
}[];
|
|
1056
|
+
protected validate(): void;
|
|
1057
|
+
protected main(v1: number): number;
|
|
1058
|
+
}
|
|
1059
|
+
export declare class VlookupFunction extends BaseFunction {
|
|
1060
|
+
example: string;
|
|
1061
|
+
helpText: string[];
|
|
1062
|
+
helpArgs: ({
|
|
1063
|
+
name: string;
|
|
1064
|
+
description: string;
|
|
1065
|
+
option?: undefined;
|
|
1066
|
+
} | {
|
|
1067
|
+
name: string;
|
|
1068
|
+
description: string;
|
|
1069
|
+
option: boolean;
|
|
1070
|
+
})[];
|
|
1071
|
+
protected validate(): void;
|
|
1072
|
+
protected main(key: any, range: Table, index: number, isSorted: boolean): any;
|
|
1073
|
+
}
|
|
1074
|
+
export declare class Autofill {
|
|
1075
|
+
private readonly src;
|
|
1076
|
+
private readonly dst;
|
|
1077
|
+
private readonly direction;
|
|
1078
|
+
private readonly table;
|
|
1079
|
+
constructor(store: StoreType, draggingTo: PointType);
|
|
1080
|
+
get applied(): Table;
|
|
1081
|
+
get wholeArea(): AreaType;
|
|
1082
|
+
getCellStyle(target: PointType): React.CSSProperties;
|
|
1083
|
+
private getDestinationArea;
|
|
1084
|
+
private suggestDirection;
|
|
1085
|
+
private getChangePatterns;
|
|
1086
|
+
}
|
|
1087
|
+
export declare const clip: (store: StoreType) => AreaType;
|
|
1088
|
+
export declare const x2c: (x: number) => string;
|
|
1089
|
+
export declare const c2x: (col: string, absolute?: boolean) => number;
|
|
1090
|
+
export declare const y2r: (y: number) => string;
|
|
1091
|
+
export declare const r2y: (row: number | string, absolute?: boolean) => number;
|
|
1092
|
+
export declare const p2a: ({ y, x }: PointType) => string;
|
|
1093
|
+
export declare const tsv2matrix: (tsv: string) => string[][];
|
|
1094
|
+
export declare const a2p: (address: Address) => PointType;
|
|
1095
|
+
export declare const grantAddressAbsolute: (address: Address, absCol: boolean, absRow: boolean) => string | undefined;
|
|
1096
|
+
export declare const slideArea: (area: AreaType, y: Y, x: X) => AreaType;
|
|
1097
|
+
export declare const superposeArea: (srcArea: AreaType, dstArea: AreaType) => ShapeType;
|
|
1098
|
+
export declare const concatAreas: (area1: AreaType, area2: AreaType) => AreaType;
|
|
1099
|
+
export declare const zoneToArea: (zone: ZoneType) => AreaType;
|
|
1100
|
+
export declare const areaToZone: (area: AreaType) => ZoneType;
|
|
1101
|
+
export declare const areaToRange: (area: AreaType) => string;
|
|
1102
|
+
export declare const rangeToArea: (range: string) => AreaType;
|
|
1103
|
+
export declare const between: (range: RangeType, index: number) => boolean;
|
|
1104
|
+
export declare const among: (area: AreaType, point: PointType) => boolean;
|
|
1105
|
+
type ShapeExtension = {
|
|
1106
|
+
base?: number;
|
|
1107
|
+
};
|
|
1108
|
+
export declare const zoneShape: ({ base, ...zone }: ZoneType & ShapeExtension) => ShapeType;
|
|
1109
|
+
export declare const areaShape: ({ base, ...area }: AreaType & ShapeExtension) => ShapeType;
|
|
1110
|
+
export declare const matrixShape: ({ base, matrix, }: {
|
|
1111
|
+
matrix: MatrixType;
|
|
1112
|
+
} & ShapeExtension) => ShapeType;
|
|
1113
|
+
export declare const makeSequence: (start: number, stop: number, step?: number) => number[];
|
|
1114
|
+
export declare const oa2aa: (oa: {
|
|
1115
|
+
[s: string]: any;
|
|
1116
|
+
}[], fields: string[]) => MatrixType;
|
|
1117
|
+
export declare const aa2oa: (aa: MatrixType, fields: string[]) => {
|
|
1118
|
+
[s: string]: any;
|
|
1119
|
+
};
|
|
1120
|
+
export declare const putMatrix: <T = any>(dst: T[][], src: T[][], dstArea: AreaType) => MatricesByAddress<T>;
|
|
1121
|
+
export declare const createMatrix: <T = any>(numRows: number, numCols: number, fill?: T | undefined) => T[][];
|
|
1122
|
+
export declare const cropMatrix: <T = any>(matrix: T[][], area: AreaType) => T[][];
|
|
1123
|
+
export declare const generateInitialSimple: <T>({ cells, ensured, matrix, flattenAs, }: {
|
|
1124
|
+
cells?: CellsByAddressType | undefined;
|
|
1125
|
+
ensured?: {
|
|
1126
|
+
numRows?: number | undefined;
|
|
1127
|
+
numCols?: number | undefined;
|
|
1128
|
+
} | undefined;
|
|
1129
|
+
flattenAs?: keyof CellType | undefined;
|
|
1130
|
+
matrix?: MatrixType | undefined;
|
|
1131
|
+
}) => CellsByAddressType;
|
|
1132
|
+
export declare const generateInitial: ({ cells, ensured, matrices, flattenAs, }?: {
|
|
1133
|
+
cells?: CellsByAddressType | undefined;
|
|
1134
|
+
ensured?: {
|
|
1135
|
+
numRows?: number | undefined;
|
|
1136
|
+
numCols?: number | undefined;
|
|
1137
|
+
} | undefined;
|
|
1138
|
+
flattenAs?: keyof CellType | undefined;
|
|
1139
|
+
matrices?: MatricesByAddress<any> | undefined;
|
|
1140
|
+
}) => CellsByAddressType;
|
|
1141
|
+
export declare const upsert: <T>({ cells, matrices, flattenAs, }: {
|
|
1142
|
+
cells?: CellsByAddressType | undefined;
|
|
1143
|
+
flattenAs?: keyof CellType | undefined;
|
|
1144
|
+
matrices?: MatricesByAddress<T> | undefined;
|
|
1145
|
+
}) => CellsByAddressType;
|
|
1146
|
+
export declare const getMaxSizesFromCells: (cells?: CellsByAddressType) => {
|
|
1147
|
+
numRows: number;
|
|
1148
|
+
numCols: number;
|
|
1149
|
+
};
|
|
1150
|
+
export declare const range: (start: number, end: number) => number[];
|
|
1151
|
+
export declare const complementSelectingArea: (selectingArea: AreaType, choosing: PointType) => AreaType;
|
|
1152
|
+
export declare const isSameArea: (area1: AreaType, area2: AreaType) => boolean;
|
|
1153
|
+
type Props = {
|
|
1154
|
+
numRows?: number;
|
|
1155
|
+
numCols?: number;
|
|
1156
|
+
cells?: CellsByAddressType;
|
|
1157
|
+
parsers?: Parsers;
|
|
1158
|
+
renderers?: Renderers;
|
|
1159
|
+
labelers?: Labelers;
|
|
1160
|
+
useBigInt?: boolean;
|
|
1161
|
+
historyLimit?: number;
|
|
1162
|
+
minNumRows?: number;
|
|
1163
|
+
maxNumRows?: number;
|
|
1164
|
+
minNumCols?: number;
|
|
1165
|
+
maxNumCols?: number;
|
|
1166
|
+
headerHeight?: number;
|
|
1167
|
+
headerWidth?: number;
|
|
1168
|
+
functions?: typeof functionsDefault;
|
|
1169
|
+
};
|
|
1170
|
+
type GetProps = {
|
|
1171
|
+
evaluates?: boolean;
|
|
1172
|
+
raise?: boolean;
|
|
1173
|
+
filter?: CellFilter;
|
|
1174
|
+
};
|
|
1175
|
+
type MoveProps = {
|
|
1176
|
+
src: AreaType;
|
|
1177
|
+
dst: AreaType;
|
|
1178
|
+
reflection?: StoreReflectionType;
|
|
1179
|
+
};
|
|
1180
|
+
type GetFlattenProps = GetProps & {
|
|
1181
|
+
key?: keyof CellType;
|
|
1182
|
+
};
|
|
1183
|
+
type GetPropsWithArea = GetProps & {
|
|
1184
|
+
area?: AreaType;
|
|
1185
|
+
};
|
|
1186
|
+
type GetFlattenPropsWithArea = GetFlattenProps & {
|
|
1187
|
+
area?: AreaType;
|
|
1188
|
+
};
|
|
1189
|
+
export interface UserTable {
|
|
1190
|
+
changedAt: Date;
|
|
1191
|
+
lastChangedAt?: Date;
|
|
1192
|
+
top: number;
|
|
1193
|
+
left: number;
|
|
1194
|
+
bottom: number;
|
|
1195
|
+
right: number;
|
|
1196
|
+
minNumRows: number;
|
|
1197
|
+
maxNumRows: number;
|
|
1198
|
+
minNumCols: number;
|
|
1199
|
+
maxNumCols: number;
|
|
1200
|
+
totalWidth: number;
|
|
1201
|
+
totalHeight: number;
|
|
1202
|
+
headerWidth: number;
|
|
1203
|
+
headerHeight: number;
|
|
1204
|
+
getRectSize(area: AreaType): ShapeType;
|
|
1205
|
+
getAddressById(id: Id, slideY: number, slideX: number): string | undefined;
|
|
1206
|
+
getAddressesByIds(ids: CellsByIdType): CellsByAddressType;
|
|
1207
|
+
getPointById(id: Id): PointType;
|
|
1208
|
+
getByPoint(point: PointType): CellType | undefined;
|
|
1209
|
+
getById(id: Id): CellType | undefined;
|
|
1210
|
+
getNumRows(base?: number): number;
|
|
1211
|
+
getNumCols(base?: number): number;
|
|
1212
|
+
getMatrixFlatten(args?: GetFlattenPropsWithArea): any[][];
|
|
1213
|
+
getObjectFlatten(args?: GetFlattenProps): CellsByAddressType;
|
|
1214
|
+
getRowsFlatten(args?: GetFlattenProps): CellsByAddressType[];
|
|
1215
|
+
getColsFlatten(args?: GetFlattenProps): CellsByAddressType[];
|
|
1216
|
+
getMatrix(args?: GetPropsWithArea): (CellType | null)[][];
|
|
1217
|
+
getObject(args?: GetProps): CellsByAddressType;
|
|
1218
|
+
getRows(args?: GetProps): CellsByAddressType[];
|
|
1219
|
+
getCols(args?: GetProps): CellsByAddressType[];
|
|
1220
|
+
move(args: MoveProps): UserTable;
|
|
1221
|
+
copy(args: MoveProps): UserTable;
|
|
1222
|
+
update(args: {
|
|
1223
|
+
diff: CellsByAddressType;
|
|
1224
|
+
partial?: boolean;
|
|
1225
|
+
updateChangedAt?: boolean;
|
|
1226
|
+
reflection?: StoreReflectionType;
|
|
1227
|
+
}): UserTable;
|
|
1228
|
+
writeMatrix(args: {
|
|
1229
|
+
point: PointType;
|
|
1230
|
+
matrix: MatrixType<string>;
|
|
1231
|
+
updateChangedAt?: boolean;
|
|
1232
|
+
reflection?: StoreReflectionType;
|
|
1233
|
+
}): UserTable;
|
|
1234
|
+
write(args: {
|
|
1235
|
+
point: PointType;
|
|
1236
|
+
value: string;
|
|
1237
|
+
updateChangedAt?: boolean;
|
|
1238
|
+
reflection?: StoreReflectionType;
|
|
1239
|
+
}): UserTable;
|
|
1240
|
+
addRowsAndUpdate(args: {
|
|
1241
|
+
y: number;
|
|
1242
|
+
numRows: number;
|
|
1243
|
+
baseY: number;
|
|
1244
|
+
diff: CellsByAddressType;
|
|
1245
|
+
partial?: boolean;
|
|
1246
|
+
updateChangedAt?: boolean;
|
|
1247
|
+
reflection?: StoreReflectionType;
|
|
1248
|
+
}): UserTable;
|
|
1249
|
+
addRows(args: {
|
|
1250
|
+
y: number;
|
|
1251
|
+
numRows: number;
|
|
1252
|
+
baseY: number;
|
|
1253
|
+
reflection?: StoreReflectionType;
|
|
1254
|
+
}): UserTable;
|
|
1255
|
+
removeRows(args: {
|
|
1256
|
+
y: number;
|
|
1257
|
+
numRows: number;
|
|
1258
|
+
reflection?: StoreReflectionType;
|
|
1259
|
+
}): UserTable;
|
|
1260
|
+
addColsAndUpdate(args: {
|
|
1261
|
+
x: number;
|
|
1262
|
+
numCols: number;
|
|
1263
|
+
baseX: number;
|
|
1264
|
+
diff: CellsByAddressType;
|
|
1265
|
+
partial?: boolean;
|
|
1266
|
+
updateChangedAt?: boolean;
|
|
1267
|
+
reflection?: StoreReflectionType;
|
|
1268
|
+
}): UserTable;
|
|
1269
|
+
addCols(args: {
|
|
1270
|
+
x: number;
|
|
1271
|
+
numCols: number;
|
|
1272
|
+
baseX: number;
|
|
1273
|
+
reflection?: StoreReflectionType;
|
|
1274
|
+
}): UserTable;
|
|
1275
|
+
removeCols(args: {
|
|
1276
|
+
x: number;
|
|
1277
|
+
numCols: number;
|
|
1278
|
+
reflection?: StoreReflectionType;
|
|
1279
|
+
}): UserTable;
|
|
1280
|
+
undo(): {
|
|
1281
|
+
history: HistoryType | null;
|
|
1282
|
+
newTable: UserTable;
|
|
1283
|
+
};
|
|
1284
|
+
redo(): {
|
|
1285
|
+
history: HistoryType | null;
|
|
1286
|
+
newTable: UserTable;
|
|
1287
|
+
};
|
|
1288
|
+
getHistories(): HistoryType[];
|
|
1289
|
+
getHistoryIndex(): number;
|
|
1290
|
+
getHistorySize(): number;
|
|
1291
|
+
}
|
|
1292
|
+
export declare class Table implements UserTable {
|
|
1293
|
+
changedAt: Date;
|
|
1294
|
+
lastChangedAt?: Date;
|
|
1295
|
+
minNumRows: number;
|
|
1296
|
+
maxNumRows: number;
|
|
1297
|
+
minNumCols: number;
|
|
1298
|
+
maxNumCols: number;
|
|
1299
|
+
totalWidth: number;
|
|
1300
|
+
totalHeight: number;
|
|
1301
|
+
headerWidth: number;
|
|
1302
|
+
headerHeight: number;
|
|
1303
|
+
private head;
|
|
1304
|
+
private idMatrix;
|
|
1305
|
+
private data;
|
|
1306
|
+
private area;
|
|
1307
|
+
private parsers;
|
|
1308
|
+
private renderers;
|
|
1309
|
+
private labelers;
|
|
1310
|
+
private functions;
|
|
1311
|
+
private lastHistory?;
|
|
1312
|
+
private histories;
|
|
1313
|
+
private historyIndex;
|
|
1314
|
+
private addressesById;
|
|
1315
|
+
private historyLimit;
|
|
1316
|
+
private solvedCaches;
|
|
1317
|
+
constructor({ numRows, numCols, cells, parsers, renderers, labelers, useBigInt, historyLimit: historyLimit, minNumRows, maxNumRows, minNumCols, maxNumCols, headerWidth, headerHeight, functions, }: Props);
|
|
1318
|
+
private generateId;
|
|
1319
|
+
getRectSize({ top, left, bottom, right }: AreaType): {
|
|
1320
|
+
width: number;
|
|
1321
|
+
height: number;
|
|
1322
|
+
};
|
|
1323
|
+
private setTotalSize;
|
|
1324
|
+
private shallowCopy;
|
|
1325
|
+
getAddressById(id: Id, slideY?: number, slideX?: number): string | undefined;
|
|
1326
|
+
getAddressesByIds(ids: CellsByIdType): CellsByAddressType;
|
|
1327
|
+
getPointById(id: Id): PointType;
|
|
1328
|
+
private getId;
|
|
1329
|
+
getByPoint(point: PointType): CellType<any> | undefined;
|
|
1330
|
+
getById(id: Id): CellType<any> | undefined;
|
|
1331
|
+
getNumRows(base?: number): number;
|
|
1332
|
+
getNumCols(base?: number): number;
|
|
1333
|
+
get top(): number;
|
|
1334
|
+
get left(): number;
|
|
1335
|
+
get bottom(): number;
|
|
1336
|
+
get right(): number;
|
|
1337
|
+
getMatrixFlatten({ area, key, evaluates, raise, filter, }?: GetFlattenPropsWithArea): any[][];
|
|
1338
|
+
getObjectFlatten({ key, evaluates, raise, filter, }?: GetFlattenProps): CellsByAddressType;
|
|
1339
|
+
getRowsFlatten({ key, evaluates, raise, filter, }?: GetFlattenProps): CellsByAddressType[];
|
|
1340
|
+
getColsFlatten({ key, evaluates, raise, filter, }?: GetFlattenProps): CellsByAddressType[];
|
|
1341
|
+
getMatrix({ area, evaluates, raise, filter, }?: GetPropsWithArea): (CellType | null)[][];
|
|
1342
|
+
getObject({ evaluates, raise, filter, }?: GetProps): CellsByAddressType;
|
|
1343
|
+
getRows({ evaluates, raise, filter, }?: GetProps): CellsByAddressType[];
|
|
1344
|
+
getCols({ evaluates, raise, filter, }?: GetProps): CellsByAddressType[];
|
|
1345
|
+
private pushHistory;
|
|
1346
|
+
private cleanObsolete;
|
|
1347
|
+
private cleanStrayed;
|
|
1348
|
+
private getNewIdMatrix;
|
|
1349
|
+
private getIdMatrixFromArea;
|
|
1350
|
+
private setChangedAt;
|
|
1351
|
+
private copyCellLayout;
|
|
1352
|
+
move({ src, dst, reflection, }: MoveProps): Table;
|
|
1353
|
+
copy({ src, dst, reflection, }: MoveProps): Table;
|
|
1354
|
+
private _update;
|
|
1355
|
+
update({ diff, partial, updateChangedAt, reflection, }: {
|
|
1356
|
+
diff: CellsByAddressType;
|
|
1357
|
+
partial?: boolean;
|
|
1358
|
+
updateChangedAt?: boolean;
|
|
1359
|
+
reflection?: StoreReflectionType;
|
|
1360
|
+
}): Table;
|
|
1361
|
+
writeMatrix({ point, matrix, updateChangedAt, reflection, }: {
|
|
1362
|
+
point: PointType;
|
|
1363
|
+
matrix: MatrixType<string>;
|
|
1364
|
+
updateChangedAt?: boolean;
|
|
1365
|
+
reflection?: StoreReflectionType;
|
|
1366
|
+
}): Table;
|
|
1367
|
+
write({ point, value, updateChangedAt, reflection, }: {
|
|
1368
|
+
point: PointType;
|
|
1369
|
+
value: string;
|
|
1370
|
+
updateChangedAt?: boolean;
|
|
1371
|
+
reflection?: StoreReflectionType;
|
|
1372
|
+
}): Table;
|
|
1373
|
+
addRowsAndUpdate({ y, numRows, baseY, diff, partial, updateChangedAt, reflection, }: {
|
|
1374
|
+
y: number;
|
|
1375
|
+
numRows: number;
|
|
1376
|
+
baseY: number;
|
|
1377
|
+
diff: CellsByAddressType;
|
|
1378
|
+
partial?: boolean;
|
|
1379
|
+
updateChangedAt?: boolean;
|
|
1380
|
+
reflection?: StoreReflectionType;
|
|
1381
|
+
}): Table;
|
|
1382
|
+
addRows({ y, numRows, baseY, reflection, }: {
|
|
1383
|
+
y: number;
|
|
1384
|
+
numRows: number;
|
|
1385
|
+
baseY: number;
|
|
1386
|
+
reflection?: StoreReflectionType;
|
|
1387
|
+
}): Table;
|
|
1388
|
+
removeRows({ y, numRows, reflection, }: {
|
|
1389
|
+
y: number;
|
|
1390
|
+
numRows: number;
|
|
1391
|
+
reflection?: StoreReflectionType;
|
|
1392
|
+
}): Table;
|
|
1393
|
+
addColsAndUpdate({ x, numCols, baseX, diff, partial, updateChangedAt, reflection, }: {
|
|
1394
|
+
x: number;
|
|
1395
|
+
numCols: number;
|
|
1396
|
+
baseX: number;
|
|
1397
|
+
diff: CellsByAddressType;
|
|
1398
|
+
partial?: boolean;
|
|
1399
|
+
updateChangedAt?: boolean;
|
|
1400
|
+
reflection?: StoreReflectionType;
|
|
1401
|
+
}): Table;
|
|
1402
|
+
addCols({ x, numCols, baseX, reflection, }: {
|
|
1403
|
+
x: number;
|
|
1404
|
+
numCols: number;
|
|
1405
|
+
baseX: number;
|
|
1406
|
+
reflection?: StoreReflectionType;
|
|
1407
|
+
}): Table;
|
|
1408
|
+
removeCols({ x, numCols, reflection, }: {
|
|
1409
|
+
x: number;
|
|
1410
|
+
numCols: number;
|
|
1411
|
+
reflection?: StoreReflectionType;
|
|
1412
|
+
}): Table;
|
|
1413
|
+
getHistories(): HistoryType[];
|
|
1414
|
+
getHistoryIndex(): number;
|
|
1415
|
+
getHistorySize(): number;
|
|
1416
|
+
getHistoryLimit(): number;
|
|
1417
|
+
setFunctions(additionalFunctions: FunctionMapping): void;
|
|
1418
|
+
getArea(): AreaType;
|
|
1419
|
+
parse(point: PointType, value: string): CellType;
|
|
1420
|
+
render(point: PointType, writer?: WriterType): any;
|
|
1421
|
+
stringify(point: PointType, value?: any, evaluates?: boolean): string;
|
|
1422
|
+
trim(area: AreaType): ReadonlyTable;
|
|
1423
|
+
getIdByAddress(address: Address): string | undefined;
|
|
1424
|
+
private applyDiff;
|
|
1425
|
+
undo(): {
|
|
1426
|
+
history: null;
|
|
1427
|
+
newTable: Table;
|
|
1428
|
+
} | {
|
|
1429
|
+
history: HistoryType;
|
|
1430
|
+
newTable: Table;
|
|
1431
|
+
};
|
|
1432
|
+
redo(): {
|
|
1433
|
+
history: null;
|
|
1434
|
+
newTable: Table;
|
|
1435
|
+
} | {
|
|
1436
|
+
history: HistoryType;
|
|
1437
|
+
newTable: Table;
|
|
1438
|
+
};
|
|
1439
|
+
getFunction(name: string): any;
|
|
1440
|
+
getLabel(key: string, n: number): string;
|
|
1441
|
+
getBase(): this;
|
|
1442
|
+
getSolvedCache(key: string): any;
|
|
1443
|
+
setSolvedCache(key: string, value: any): void;
|
|
1444
|
+
}
|
|
1445
|
+
export declare class ReadonlyTable extends Table {
|
|
1446
|
+
}
|
|
1447
|
+
export declare const BASE_DATE: Date;
|
|
1448
|
+
type Diff = [number, number, number, number, number, number, number];
|
|
1449
|
+
export declare class TimeDelta {
|
|
1450
|
+
protected diff: Diff;
|
|
1451
|
+
private date1;
|
|
1452
|
+
private date2;
|
|
1453
|
+
constructor(date1: Date, date2: Date);
|
|
1454
|
+
add(date: Date): Date;
|
|
1455
|
+
sub(date: Date): Date;
|
|
1456
|
+
stringify(format?: string): string;
|
|
1457
|
+
static create(hours?: number, minutes?: number, seconds?: number, milliseconds?: number): TimeDelta;
|
|
1458
|
+
}
|
|
1459
|
+
export declare const getCellRectPositions: (table: Table, e: HTMLDivElement, { y, x }: PointType) => {
|
|
1460
|
+
top: number;
|
|
1461
|
+
left: number;
|
|
1462
|
+
bottom: number;
|
|
1463
|
+
right: number;
|
|
1464
|
+
width: number;
|
|
1465
|
+
height: number;
|
|
1466
|
+
};
|
|
1467
|
+
export declare const getScreenRect: (e: HTMLDivElement) => {
|
|
1468
|
+
top: number;
|
|
1469
|
+
left: number;
|
|
1470
|
+
bottom: number;
|
|
1471
|
+
right: number;
|
|
1472
|
+
height: number;
|
|
1473
|
+
width: number;
|
|
1474
|
+
};
|
|
1475
|
+
export declare const virtualize: (table: Table, e: HTMLDivElement | null) => {
|
|
1476
|
+
xs: never[];
|
|
1477
|
+
ys: never[];
|
|
1478
|
+
adjuster: {
|
|
1479
|
+
top?: undefined;
|
|
1480
|
+
left?: undefined;
|
|
1481
|
+
bottom?: undefined;
|
|
1482
|
+
right?: undefined;
|
|
1483
|
+
};
|
|
1484
|
+
} | {
|
|
1485
|
+
ys: number[];
|
|
1486
|
+
xs: number[];
|
|
1487
|
+
adjuster: {
|
|
1488
|
+
top: number;
|
|
1489
|
+
left: number;
|
|
1490
|
+
bottom: number;
|
|
1491
|
+
right: number;
|
|
1492
|
+
};
|
|
1493
|
+
};
|
|
1494
|
+
export declare const smartScroll: (table: Table, e: HTMLDivElement, targetPoint: PointType, behavior?: ScrollBehavior) => void;
|
|
1495
|
+
type Condition = (value: string) => boolean;
|
|
1496
|
+
type Stringify = (value: string) => any;
|
|
1497
|
+
type Props = {
|
|
1498
|
+
condition?: Condition;
|
|
1499
|
+
complement?: Stringify;
|
|
1500
|
+
mixins?: ParserMixinType[];
|
|
1501
|
+
};
|
|
1502
|
+
export interface ParserMixinType {
|
|
1503
|
+
functions?: ((value: string, cell?: CellType) => any)[];
|
|
1504
|
+
callback?(parsed: any, cell?: CellType): CellType;
|
|
1505
|
+
parse?(value: string, cell: CellType): any;
|
|
1506
|
+
bool?(value: string, cell?: CellType): boolean | undefined;
|
|
1507
|
+
number?(value: string, cell?: CellType): number | undefined;
|
|
1508
|
+
timedelta?(value: string, cell?: CellType): TimeDelta | undefined;
|
|
1509
|
+
date?(value: string, cell?: CellType): Date | undefined;
|
|
1510
|
+
}
|
|
1511
|
+
export declare class Parser implements ParserMixinType {
|
|
1512
|
+
functions: ((value: string, cell?: CellType) => any)[];
|
|
1513
|
+
private condition?;
|
|
1514
|
+
private complement?;
|
|
1515
|
+
constructor(props?: Props);
|
|
1516
|
+
private applyMixins;
|
|
1517
|
+
call(value: string, cell: CellType): CellType;
|
|
1518
|
+
callback(parsed: any, cell?: CellType): CellType;
|
|
1519
|
+
parse(value: string, cell?: CellType): any;
|
|
1520
|
+
bool(value: string, cell?: CellType): boolean | undefined;
|
|
1521
|
+
number(value: string, cell?: CellType): number | undefined;
|
|
1522
|
+
timedelta(value: string, cell?: CellType): TimeDelta | undefined;
|
|
1523
|
+
date(value: string, cell?: CellType): Date | undefined;
|
|
1524
|
+
}
|
|
1525
|
+
export type ParserType = Parser;
|
|
1526
|
+
export declare const defaultParser: Parser;
|
|
1527
|
+
type Condition = (value: any) => boolean;
|
|
1528
|
+
type Stringify = (value: any) => string;
|
|
1529
|
+
type Props = {
|
|
1530
|
+
condition?: Condition;
|
|
1531
|
+
complement?: Stringify;
|
|
1532
|
+
mixins?: RendererMixinType[];
|
|
1533
|
+
};
|
|
1534
|
+
export interface RendererMixinType {
|
|
1535
|
+
render?(value: any, table: UserTable, writer?: WriterType): any;
|
|
1536
|
+
stringify?(cell: CellType): string;
|
|
1537
|
+
string?(value: string, table: UserTable, writer?: WriterType): any;
|
|
1538
|
+
bool?(value: boolean, writer?: WriterType): any;
|
|
1539
|
+
number?(value: number, writer?: WriterType): any;
|
|
1540
|
+
date?(value: Date, writer?: WriterType): any;
|
|
1541
|
+
timedelta?(value: TimeDelta, writer?: WriterType): any;
|
|
1542
|
+
array?(value: any[], writer?: WriterType): any;
|
|
1543
|
+
object?(value: any, writer?: WriterType): any;
|
|
1544
|
+
null?(value: null, writer?: WriterType): any;
|
|
1545
|
+
undefined?(value: undefined, writer?: WriterType): any;
|
|
1546
|
+
}
|
|
1547
|
+
export declare class Renderer implements RendererMixinType {
|
|
1548
|
+
datetimeFormat: string;
|
|
1549
|
+
dateFormat: string;
|
|
1550
|
+
timeDeltaFormat: string;
|
|
1551
|
+
private condition?;
|
|
1552
|
+
private complement?;
|
|
1553
|
+
constructor(props?: Props);
|
|
1554
|
+
private applyMixins;
|
|
1555
|
+
call(table: Table, point: PointType, writer?: WriterType): any;
|
|
1556
|
+
render(value: any, table: Table, writer?: WriterType): any;
|
|
1557
|
+
stringify(cell: CellType): string;
|
|
1558
|
+
string(value: string, table: Table, writer?: WriterType): any;
|
|
1559
|
+
bool(value: boolean, writer?: WriterType): any;
|
|
1560
|
+
number(value: number, writer?: WriterType): any;
|
|
1561
|
+
date(value: Date, writer?: WriterType): any;
|
|
1562
|
+
timedelta(value: TimeDelta, writer?: WriterType): any;
|
|
1563
|
+
array(value: any[], writer?: WriterType): any;
|
|
1564
|
+
object(value: any, writer?: WriterType): any;
|
|
1565
|
+
null(value: null, writer?: WriterType): any;
|
|
1566
|
+
undefined(value: undefined, writer?: WriterType): any;
|
|
1567
|
+
}
|
|
1568
|
+
export type RendererType = Renderer;
|
|
1569
|
+
export declare const defaultRenderer: Renderer;
|
|
1570
|
+
export declare const ThousandSeparatorRendererMixin: {
|
|
1571
|
+
number(value: number, writer?: WriterType): any;
|
|
1572
|
+
};
|
|
1573
|
+
export declare const reducer: <T>(store: StoreType, action: {
|
|
1574
|
+
type: number;
|
|
1575
|
+
value: T;
|
|
1576
|
+
}) => StoreType;
|
|
1577
|
+
export declare class CoreAction<T> {
|
|
1578
|
+
static head: number;
|
|
1579
|
+
private actionId;
|
|
1580
|
+
reduce(store: StoreType, payload: T): StoreType;
|
|
1581
|
+
call(payload: T): {
|
|
1582
|
+
type: number;
|
|
1583
|
+
value: T;
|
|
1584
|
+
};
|
|
1585
|
+
bind(): (payload: T) => {
|
|
1586
|
+
type: number;
|
|
1587
|
+
value: T;
|
|
1588
|
+
};
|
|
1589
|
+
}
|
|
1590
|
+
export declare const setSearchQuery: (payload: string | undefined) => {
|
|
1591
|
+
type: number;
|
|
1592
|
+
value: string | undefined;
|
|
1593
|
+
};
|
|
1594
|
+
export declare const setEditingCell: (payload: string) => {
|
|
1595
|
+
type: number;
|
|
1596
|
+
value: string;
|
|
1597
|
+
};
|
|
1598
|
+
export declare const setEditingOnEnter: (payload: boolean) => {
|
|
1599
|
+
type: number;
|
|
1600
|
+
value: boolean;
|
|
1601
|
+
};
|
|
1602
|
+
export declare const setAutofillDraggingTo: (payload: PointType | null) => {
|
|
1603
|
+
type: number;
|
|
1604
|
+
value: PointType | null;
|
|
1605
|
+
};
|
|
1606
|
+
export declare const setShowAddress: (payload: boolean) => {
|
|
1607
|
+
type: number;
|
|
1608
|
+
value: boolean;
|
|
1609
|
+
};
|
|
1610
|
+
export declare const setContextMenuPosition: (payload: PositionType) => {
|
|
1611
|
+
type: number;
|
|
1612
|
+
value: PositionType;
|
|
1613
|
+
};
|
|
1614
|
+
export declare const setResizingPositionY: (payload: [number, number, number]) => {
|
|
1615
|
+
type: number;
|
|
1616
|
+
value: [number, number, number];
|
|
1617
|
+
};
|
|
1618
|
+
export declare const setResizingPositionX: (payload: [number, number, number]) => {
|
|
1619
|
+
type: number;
|
|
1620
|
+
value: [number, number, number];
|
|
1621
|
+
};
|
|
1622
|
+
export declare const setOnSave: (payload: FeedbackType) => {
|
|
1623
|
+
type: number;
|
|
1624
|
+
value: FeedbackType;
|
|
1625
|
+
};
|
|
1626
|
+
export declare const setEntering: (payload: boolean) => {
|
|
1627
|
+
type: number;
|
|
1628
|
+
value: boolean;
|
|
1629
|
+
};
|
|
1630
|
+
export declare const setHeaderHeight: (payload: number) => {
|
|
1631
|
+
type: number;
|
|
1632
|
+
value: number;
|
|
1633
|
+
};
|
|
1634
|
+
export declare const setHeaderWidth: (payload: number) => {
|
|
1635
|
+
type: number;
|
|
1636
|
+
value: number;
|
|
1637
|
+
};
|
|
1638
|
+
export declare const setSheetHeight: (payload: number) => {
|
|
1639
|
+
type: number;
|
|
1640
|
+
value: number;
|
|
1641
|
+
};
|
|
1642
|
+
export declare const setSheetWidth: (payload: number) => {
|
|
1643
|
+
type: number;
|
|
1644
|
+
value: number;
|
|
1645
|
+
};
|
|
1646
|
+
export declare const initializeTable: (payload: Table) => {
|
|
1647
|
+
type: number;
|
|
1648
|
+
value: Table;
|
|
1649
|
+
};
|
|
1650
|
+
export declare const updateTable: (payload: Table) => {
|
|
1651
|
+
type: number;
|
|
1652
|
+
value: Table;
|
|
1653
|
+
};
|
|
1654
|
+
export declare const setEditorRect: (payload: RectType) => {
|
|
1655
|
+
type: number;
|
|
1656
|
+
value: RectType;
|
|
1657
|
+
};
|
|
1658
|
+
export declare const setResizingRect: (payload: RectType) => {
|
|
1659
|
+
type: number;
|
|
1660
|
+
value: RectType;
|
|
1661
|
+
};
|
|
1662
|
+
export declare const blur: (payload: null) => {
|
|
1663
|
+
type: number;
|
|
1664
|
+
value: null;
|
|
1665
|
+
};
|
|
1666
|
+
export declare const copy: (payload: ZoneType) => {
|
|
1667
|
+
type: number;
|
|
1668
|
+
value: ZoneType;
|
|
1669
|
+
};
|
|
1670
|
+
export declare const cut: (payload: ZoneType) => {
|
|
1671
|
+
type: number;
|
|
1672
|
+
value: ZoneType;
|
|
1673
|
+
};
|
|
1674
|
+
export declare const paste: (payload: {
|
|
1675
|
+
text: string;
|
|
1676
|
+
}) => {
|
|
1677
|
+
type: number;
|
|
1678
|
+
value: {
|
|
1679
|
+
text: string;
|
|
1680
|
+
};
|
|
1681
|
+
};
|
|
1682
|
+
export declare const escape: (payload: null) => {
|
|
1683
|
+
type: number;
|
|
1684
|
+
value: null;
|
|
1685
|
+
};
|
|
1686
|
+
export declare const choose: (payload: PointType) => {
|
|
1687
|
+
type: number;
|
|
1688
|
+
value: PointType;
|
|
1689
|
+
};
|
|
1690
|
+
export declare const select: (payload: ZoneType) => {
|
|
1691
|
+
type: number;
|
|
1692
|
+
value: ZoneType;
|
|
1693
|
+
};
|
|
1694
|
+
export declare const selectRows: (payload: {
|
|
1695
|
+
range: RangeType;
|
|
1696
|
+
numCols: number;
|
|
1697
|
+
}) => {
|
|
1698
|
+
type: number;
|
|
1699
|
+
value: {
|
|
1700
|
+
range: RangeType;
|
|
1701
|
+
numCols: number;
|
|
1702
|
+
};
|
|
1703
|
+
};
|
|
1704
|
+
export declare const selectCols: (payload: {
|
|
1705
|
+
range: RangeType;
|
|
1706
|
+
numRows: number;
|
|
1707
|
+
}) => {
|
|
1708
|
+
type: number;
|
|
1709
|
+
value: {
|
|
1710
|
+
range: RangeType;
|
|
1711
|
+
numRows: number;
|
|
1712
|
+
};
|
|
1713
|
+
};
|
|
1714
|
+
export declare const drag: (payload: PointType) => {
|
|
1715
|
+
type: number;
|
|
1716
|
+
value: PointType;
|
|
1717
|
+
};
|
|
1718
|
+
export declare const search: (payload: number) => {
|
|
1719
|
+
type: number;
|
|
1720
|
+
value: number;
|
|
1721
|
+
};
|
|
1722
|
+
export declare const write: (payload: string) => {
|
|
1723
|
+
type: number;
|
|
1724
|
+
value: string;
|
|
1725
|
+
};
|
|
1726
|
+
export declare const clear: (payload: null) => {
|
|
1727
|
+
type: number;
|
|
1728
|
+
value: null;
|
|
1729
|
+
};
|
|
1730
|
+
export declare const undo: (payload: null) => {
|
|
1731
|
+
type: number;
|
|
1732
|
+
value: null;
|
|
1733
|
+
};
|
|
1734
|
+
export declare const redo: (payload: null) => {
|
|
1735
|
+
type: number;
|
|
1736
|
+
value: null;
|
|
1737
|
+
};
|
|
1738
|
+
export declare const arrow: (payload: {
|
|
1739
|
+
shiftKey: boolean;
|
|
1740
|
+
deltaY: number;
|
|
1741
|
+
deltaX: number;
|
|
1742
|
+
numRows: number;
|
|
1743
|
+
numCols: number;
|
|
1744
|
+
}) => {
|
|
1745
|
+
type: number;
|
|
1746
|
+
value: {
|
|
1747
|
+
shiftKey: boolean;
|
|
1748
|
+
deltaY: number;
|
|
1749
|
+
deltaX: number;
|
|
1750
|
+
numRows: number;
|
|
1751
|
+
numCols: number;
|
|
1752
|
+
};
|
|
1753
|
+
};
|
|
1754
|
+
export declare const walk: (payload: {
|
|
1755
|
+
deltaY: number;
|
|
1756
|
+
deltaX: number;
|
|
1757
|
+
numRows: number;
|
|
1758
|
+
numCols: number;
|
|
1759
|
+
}) => {
|
|
1760
|
+
type: number;
|
|
1761
|
+
value: {
|
|
1762
|
+
deltaY: number;
|
|
1763
|
+
deltaX: number;
|
|
1764
|
+
numRows: number;
|
|
1765
|
+
numCols: number;
|
|
1766
|
+
};
|
|
1767
|
+
};
|
|
1768
|
+
export declare const restrictPoints: (store: StoreType, table: Table) => {
|
|
1769
|
+
choosing: PointType;
|
|
1770
|
+
selectingZone: {
|
|
1771
|
+
startY: number;
|
|
1772
|
+
startX: number;
|
|
1773
|
+
endY: number;
|
|
1774
|
+
endX: number;
|
|
1775
|
+
};
|
|
1776
|
+
copyingZone: {
|
|
1777
|
+
startY: number;
|
|
1778
|
+
startX: number;
|
|
1779
|
+
endY: number;
|
|
1780
|
+
endX: number;
|
|
1781
|
+
};
|
|
1782
|
+
};
|
|
1783
|
+
export declare const shouldTracking: (operation: string) => boolean;
|
|
1784
|
+
export declare const initSearchStatement: (table: Table, store: StoreType) => {
|
|
1785
|
+
matchingCells: never[];
|
|
1786
|
+
searchQuery?: undefined;
|
|
1787
|
+
matchingCellIndex?: undefined;
|
|
1788
|
+
} | {
|
|
1789
|
+
matchingCells: string[];
|
|
1790
|
+
searchQuery: string;
|
|
1791
|
+
matchingCellIndex: number;
|
|
1792
|
+
};
|
|
1793
|
+
export type Dispatcher = React.Dispatch<{
|
|
1794
|
+
type: number;
|
|
1795
|
+
value: any;
|
|
1796
|
+
}>;
|
|
1797
|
+
export declare const Context: React.Context<{
|
|
1798
|
+
store: StoreType;
|
|
1799
|
+
dispatch: Dispatcher;
|
|
1800
|
+
}>;
|
|
1801
|
+
export declare const embedStyle: () => void;
|
|
1802
|
+
export declare const LAST_MODIFIED = 1685203022;
|
|
1803
|
+
export declare const CSS = ".gridsheet-1{overflow:hidden;position:relative;box-sizing:content-box;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;font-family:\"SF Pro Text\",\"SF Pro Icons\",\"Helvetica Neue\",Helvetica,Arial,Meiryo,sans-serif}.gridsheet-1.light{background-color:#f7f7f7;color:#000}.gridsheet-1.light .gs-editor.gs-editing textarea{background-color:#f5f5f5;color:#111;caret-color:#000}.gridsheet-1.light .gs-header{background-color:#eee;color:#666}.gridsheet-1.light .gs-header.gs-selecting{background-color:#ddd}.gridsheet-1.light .gs-header.gs-choosing{background-color:#bbb}.gridsheet-1.light .gs-header.gs-header-selecting{background-color:#555;color:#fff}.gridsheet-1.dark{background-color:#323232;color:#eee}.gridsheet-1.dark .gs-editor.gs-editing textarea{background-color:#353535;color:#ddd;caret-color:#ddd}.gridsheet-1.dark .gs-header{background-color:#474747;color:#eee}.gridsheet-1.dark .gs-header.gs-selecting{background-color:#777}.gridsheet-1.dark .gs-header.gs-choosing{background-color:#999}.gridsheet-1.dark .gs-header.gs-header-selecting{background-color:#bbb;color:#444}.gridsheet-1 .gs-cell.gs-copying textarea:focus{outline:solid 1px #07f}.gridsheet-1 .gs-cell .gs-cell-rendered-wrapper-outer.gs-selected{background-color:rgba(0,128,255,.2)}.gridsheet-1 .gs-resizing{width:100%;height:100%;position:absolute;background-color:rgba(0,127,255,.08);top:0;left:0;z-index:2}.gridsheet-1 .gs-line{position:relative;top:0;left:0;border:dotted 1px #07f;box-sizing:border-box}.gridsheet-1 .gs-line span{font-size:10px;padding:3px;background-color:#07f;color:#fff;margin:0;position:absolute;top:0;left:0}.gridsheet-1.gs-table-width-larger{border-right:solid 1px rgba(128,128,128,.5)}.gridsheet-1.gs-table-height-larger{border-bottom:solid 1px rgba(128,128,128,.5)}.gridsheet-1 .gs-cell{background-clip:padding-box;border-top:solid 1px rgba(128,128,128,.3);border-left:solid 1px rgba(128,128,128,.3);padding:0;margin:0;box-sizing:border-box;position:relative}.gridsheet-1 .gs-cell.gs-copying textarea:focus{outline:solid 1px #07f}.gridsheet-1 .gs-cell.gs-selected .gs-cell-rendered-wrapper-inner{background-color:rgba(0,128,255,.2)}.gridsheet-1 .gs-cell.gs-selected .gs-cell-label{display:block}.gridsheet-1 .gs-cell.gs-pointed{margin-top:-1px;margin-left:-1px;z-index:1}.gridsheet-1 .gs-cell.gs-pointed.gs-editing{color:transparent}.gridsheet-1 .gs-cell.gs-pointed .gs-cell-label{display:block}.gridsheet-1 .gs-cell.gs-matching{background-color:rgba(0,200,100,.2)}.gridsheet-1 .gs-cell.gs-searching{border:solid 2px #00aa78}.gridsheet-1 .gs-cell .formula-error-triangle{position:absolute;top:0;right:0;border-top:3px solid rgba(200,0,0,.9);border-right:3px solid rgba(200,0,0,.9);border-bottom:3px solid transparent;border-left:3px solid transparent;z-index:1}.gridsheet-1 .gs-cell .gs-cell-label{font-family:monospace,serif;position:absolute;top:0;right:0;font-size:8px;font-weight:400;font-style:normal;background-color:rgba(0,128,255,.2);color:rgba(255,255,255,.6);padding:0 2px;display:none;opacity:.7}.gridsheet-1 .gs-cell .gs-cell-rendered-wrapper-outer{width:100%;height:100%}.gridsheet-1 .gs-cell .gs-cell-rendered-wrapper-inner{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;display:flex;box-sizing:border-box}.gridsheet-1 .gs-cell .gs-cell-rendered{overflow:hidden;font-size:13px;letter-spacing:1px;white-space:pre-wrap;line-height:24px;cursor:auto;word-wrap:break-word;word-break:break-all;padding:0 2px}.gridsheet-1 .gs-cell .gs-cell-rendered>*{position:relative}.gridsheet-1 .gs-cell .gs-cell-rendered>.backface{z-index:0}.gridsheet-1 .gs-cell .gs-autofill-drag{background-color:#07f;position:absolute;width:7px;height:7px;bottom:0;right:0;margin-right:-3.5px;margin-bottom:-3.5px;cursor:crosshair;z-index:1}.gridsheet-1 .gs-contextmenu-modal{position:fixed;top:0;left:0;width:100%;height:100vh;z-index:3}.gridsheet-1 .gs-contextmenu{z-index:3;position:fixed;background-color:#fff;padding:5px 0;border-radius:5px;box-shadow:rgba(60,64,67,.3) 0 1px 2px 0,rgba(60,64,67,.15) 0 1px 3px 1px}.gridsheet-1 .gs-contextmenu ul{min-width:250px;color:#555;margin:0;padding:0}.gridsheet-1 .gs-contextmenu ul li{padding:5px 10px;list-style-type:none;display:flex}.gridsheet-1 .gs-contextmenu ul li.enabled{cursor:pointer}.gridsheet-1 .gs-contextmenu ul li.enabled:hover{background-color:#eee}.gridsheet-1 .gs-contextmenu ul li.disabled{opacity:.5;cursor:not-allowed}.gridsheet-1 .gs-contextmenu ul li.gs-menu-divider{background-color:#aaa;margin:10px 0;padding:0;height:1px}.gridsheet-1 .gs-contextmenu ul li .gs-menu-name{flex:1;font-size:15px;letter-spacing:1px}.gridsheet-1 .gs-contextmenu ul li .gs-menu-shortcut{font-size:10px;line-height:15px;color:#999;width:15px}.gridsheet-1 .gs-contextmenu ul li .gs-menu-shortcut:before{content:\"(\"}.gridsheet-1 .gs-contextmenu ul li .gs-menu-shortcut:after{content:\")\"}.gridsheet-1 .gs-contextmenu ul li .gs-menu-shortcut .gs-menu-underline{text-decoration:underline}.gridsheet-1 .gs-editor{position:fixed;opacity:0;z-index:-1;background-color:#aaa}.gridsheet-1 .gs-editor textarea{width:100%;padding:0 2px;position:absolute;font-size:13px;line-height:24px;letter-spacing:1px;top:0;left:0;border:none;outline:0;background-color:transparent;resize:none;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;overflow:hidden;caret-color:transparent;cursor:default}.gridsheet-1 .gs-editor.gs-editing{z-index:3;opacity:1}.gridsheet-1 .gs-editor.gs-editing textarea{cursor:text;min-width:100%;white-space:pre;outline:solid 2px #07f;border:none!important;height:auto}.gridsheet-1 .gs-editor.gs-editing .gs-cell-label{font-family:monospace,serif;position:absolute;top:0;right:0;margin-top:-20px;margin-right:-2px;padding:3px 5px;font-size:10px;background-color:#07f;color:#fff;z-index:1}.gridsheet-1 .gs-tabular{overflow:auto;display:block;box-sizing:border-box}.gridsheet-1 .gs-tabular-inner>table{table-layout:fixed;border-collapse:collapse}.gridsheet-1 .gs-table{border:solid 1px rgba(128,128,128,.5)}.gridsheet-1 .gs-adjuster{padding:0;visibility:hidden}.gridsheet-1 .gs-header-top{top:0;overflow:hidden}.gridsheet-1 .gs-header-left{left:0}.gridsheet-1 .gs-header-top.gs-header-left{z-index:3}.gridsheet-1 .gs-header{z-index:2;padding:0;position:sticky;font-size:13px;font-weight:400;box-sizing:border-box;vertical-align:top}.gridsheet-1 .gs-header .gs-resizer{position:absolute;border-color:transparent;box-sizing:border-box;z-index:2}.gridsheet-1 .gs-header .gs-resizer:hover{background-color:#07f}.gridsheet-1 .gs-header .gs-header-outer{height:100%;box-sizing:border-box}.gridsheet-1 .gs-header .gs-header-inner{height:100%;box-sizing:border-box;vertical-align:middle;overflow:hidden;display:flex;align-items:center;justify-content:center}.gridsheet-1 .gs-header-left-top{border-right:solid .5px rgba(128,128,128,.3);border-bottom:solid .5px rgba(128,128,128,.3)}.gridsheet-1 .gs-header-horizontal{min-height:20px}.gridsheet-1 .gs-header-horizontal .gs-resizer{top:0;right:0;width:3px;cursor:e-resize}.gridsheet-1 .gs-header-horizontal .gs-resizer.gs-dragging{border-right-style:dotted;height:1000000px!important;cursor:e-resize}.gridsheet-1 .gs-header-horizontal .gs-header-outer{border-left:solid .5px rgba(128,128,128,.3);border-right:solid .5px rgba(128,128,128,.3)}.gridsheet-1 .gs-header-horizontal.gs-header-top-end .gs-header-outer{border-right:none}.gridsheet-1 .gs-header-vertical{overflow:hidden;min-width:30px}.gridsheet-1 .gs-header-vertical .gs-resizer{left:0;bottom:0;height:3px;cursor:n-resize}.gridsheet-1 .gs-header-vertical .gs-resizer.gs-dragging{border-bottom-style:dotted;width:1000000px!important;cursor:n-resize}.gridsheet-1 .gs-header-vertical .gs-header-outer{border-top:solid .5px rgba(128,128,128,.3);border-bottom:solid .5px rgba(128,128,128,.3)}.gridsheet-1 .gs-header-vertical.gs-header-left-end .gs-header-outer{border-bottom:none}.gridsheet-1 .gs-search{width:300px;box-shadow:rgba(60,64,67,.3) 0 1px 2px 0,rgba(60,64,67,.15) 0 1px 3px 1px;display:flex;background-color:#fdfdfd;border:solid 2px #eee;border-radius:5px;padding:10px;position:fixed;top:10px;right:10px;z-index:5}.gridsheet-1 .gs-search .gs-searchbox{display:flex;position:relative;border:solid 2px #07f;border-radius:5px;flex:1}.gridsheet-1 .gs-search .gs-searchbox input[type=text]{padding:5px;background-color:transparent;border:none;outline:0;z-index:1;flex:1}.gridsheet-1 .gs-search .gs-searchbox .gs-search-progress{color:#999;padding:6px 3px;font-size:13px;text-align:right}.gridsheet-1 .gs-search .gs-search-close{margin:6px 5px;cursor:pointer;color:#ddd;width:50px;text-align:center}";
|
|
1804
|
+
type Props = {
|
|
1805
|
+
y: number;
|
|
1806
|
+
x: number;
|
|
1807
|
+
};
|
|
1808
|
+
export declare const Cell: React.FC<Props>;
|
|
1809
|
+
export declare const ContextMenu: React.FC;
|
|
1810
|
+
export declare const Editor: React.FC;
|
|
1811
|
+
type Props = {
|
|
1812
|
+
onChange?: FeedbackType;
|
|
1813
|
+
onSelect?: FeedbackType;
|
|
1814
|
+
};
|
|
1815
|
+
export declare const Emitter: React.FC<Props>;
|
|
1816
|
+
export declare const GridSheet: React.FC<Props>;
|
|
1817
|
+
type Props = {
|
|
1818
|
+
y: number;
|
|
1819
|
+
};
|
|
1820
|
+
export declare const HeaderLeftCell: React.FC<Props>;
|
|
1821
|
+
type Props = {
|
|
1822
|
+
x: number;
|
|
1823
|
+
};
|
|
1824
|
+
export declare const HeaderTopCell: React.FC<Props>;
|
|
1825
|
+
export declare const Resizer: React.FC;
|
|
1826
|
+
export declare const SearchBox: React.FC;
|
|
1827
|
+
export declare const StoreInitializer: React.FC<Props>;
|
|
1828
|
+
type Props = {
|
|
1829
|
+
tableRef?: React.MutableRefObject<TableRef | null>;
|
|
1830
|
+
};
|
|
1831
|
+
export declare const createTableRef: () => React.RefObject<TableRef>;
|
|
1832
|
+
export declare const Tabular: ({ tableRef }: Props) => JSX.Element;
|
|
1833
|
+
export declare const CheckboxRendererMixin: {
|
|
1834
|
+
bool(value: boolean, writer?: WriterType): any;
|
|
1835
|
+
};
|