@odoo/o-spreadsheet 19.5.0-alpha.6 → 19.5.0-alpha.7
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/o_spreadsheet.cjs +2116 -1475
- package/dist/o_spreadsheet.css +21 -18
- package/dist/o_spreadsheet.esm.js +2116 -1475
- package/dist/o_spreadsheet.iife.js +2118 -1477
- package/dist/o_spreadsheet.min.iife.js +386 -386
- package/dist/o_spreadsheet.xml +95 -51
- package/dist/types/actions/action.d.ts +1 -7
- package/dist/types/actions/data_actions.d.ts +1 -0
- package/dist/types/actions/menu_items_actions.d.ts +2 -0
- package/dist/types/components/helpers/dom_helpers.d.ts +2 -0
- package/dist/types/components/side_panel/carousel_panel/carousel_panel.d.ts +14 -1
- package/dist/types/components/side_panel/chart/chart_type_picker/chart_type_picker.d.ts +4 -17
- package/dist/types/components/side_panel/chart/chart_type_picker_popover/chart_type_picker_popover.d.ts +64 -0
- package/dist/types/components/side_panel/data_sources_cleanup/data_sources_cleanup.d.ts +28 -0
- package/dist/types/components/side_panel/data_sources_cleanup/data_sources_cleanup_store.d.ts +13 -0
- package/dist/types/components/side_panel/pivot/pivot_layout_configurator/pivot_layout_configurator.d.ts +0 -2
- package/dist/types/components/side_panel/split_to_columns_panel/split_to_columns_panel.d.ts +4 -11
- package/dist/types/components/side_panel/split_to_columns_panel/split_to_columns_store.d.ts +33 -0
- package/dist/types/formulas/code_builder.d.ts +2 -1
- package/dist/types/formulas/compiler.d.ts +6 -0
- package/dist/types/functions/create_compute_function.d.ts +4 -3
- package/dist/types/functions/function_registry.d.ts +1 -5
- package/dist/types/functions/helper_matrices.d.ts +1 -0
- package/dist/types/functions/helper_statistical.d.ts +6 -0
- package/dist/types/functions/module_array.d.ts +41 -23
- package/dist/types/functions/module_database.d.ts +18 -6
- package/dist/types/functions/module_date.d.ts +70 -22
- package/dist/types/functions/module_engineering.d.ts +3 -1
- package/dist/types/functions/module_filter.d.ts +2 -2
- package/dist/types/functions/module_financial.d.ts +105 -35
- package/dist/types/functions/module_info.d.ts +33 -11
- package/dist/types/functions/module_logical.d.ts +16 -8
- package/dist/types/functions/module_lookup.d.ts +23 -15
- package/dist/types/functions/module_math.d.ts +125 -43
- package/dist/types/functions/module_operators.d.ts +7 -3
- package/dist/types/functions/module_statistical.d.ts +78 -22
- package/dist/types/functions/module_text.d.ts +70 -24
- package/dist/types/functions/module_web.d.ts +3 -1
- package/dist/types/helpers/carousel_helpers.d.ts +0 -2
- package/dist/types/helpers/figures/chart.d.ts +2 -0
- package/dist/types/helpers/ui/split_to_columns_interactive.d.ts +1 -1
- package/dist/types/index.d.ts +3 -0
- package/dist/types/model.d.ts +1 -0
- package/dist/types/plugins/core/cell.d.ts +1 -0
- package/dist/types/plugins/core/chart.d.ts +2 -0
- package/dist/types/plugins/core/conditional_format.d.ts +2 -0
- package/dist/types/plugins/core/data_validation.d.ts +2 -0
- package/dist/types/plugins/core/formulas_provider.d.ts +8 -0
- package/dist/types/plugins/core/pivot.d.ts +1 -0
- package/dist/types/plugins/core_plugin.d.ts +7 -3
- package/dist/types/plugins/ui_core_views/cell_evaluation/evaluation_plugin.d.ts +10 -3
- package/dist/types/plugins/ui_feature/ui_options.d.ts +1 -7
- package/dist/types/plugins/ui_stateful/filter_evaluation.d.ts +2 -3
- package/dist/types/registries/chart_registry.d.ts +3 -0
- package/dist/types/registries/data_source_registry.d.ts +15 -0
- package/dist/types/stores/table_resize_store.d.ts +6 -0
- package/dist/types/types/commands.d.ts +20 -12
- package/dist/types/types/core_getters.d.ts +3 -1
- package/dist/types/types/functions.d.ts +14 -4
- package/dist/types/types/getters.d.ts +5 -6
- package/dist/types/types/misc.d.ts +5 -1
- package/package.json +1 -1
- package/dist/types/plugins/ui_feature/split_to_columns.d.ts +0 -21
- package/dist/types/plugins/ui_feature/table_resize_ui.d.ts +0 -6
- /package/dist/types/plugins/{ui_feature → ui_stateful}/cell_computed_style.d.ts +0 -0
- /package/dist/types/plugins/{ui_feature → ui_stateful}/figure.d.ts +0 -0
- /package/dist/types/plugins/{ui_feature → ui_stateful}/header_visibility_ui.d.ts +0 -0
- /package/dist/types/plugins/{ui_feature → ui_stateful}/table_computed_style.d.ts +0 -0
|
@@ -3,31 +3,41 @@ import { Arg, FunctionResultNumber, FunctionResultObject, Maybe } from "../types
|
|
|
3
3
|
export declare const CHAR: {
|
|
4
4
|
description: string;
|
|
5
5
|
args: import("..").ArgDefinition[];
|
|
6
|
-
compute: (this: import("..").EvalContext, tableNumber: Maybe<FunctionResultObject>) =>
|
|
6
|
+
compute: (this: import("..").EvalContext, tableNumber: Maybe<FunctionResultObject>) => EvaluationError | {
|
|
7
|
+
value: string;
|
|
8
|
+
};
|
|
7
9
|
isExported: true;
|
|
8
10
|
};
|
|
9
11
|
export declare const CLEAN: {
|
|
10
12
|
description: string;
|
|
11
13
|
args: import("..").ArgDefinition[];
|
|
12
|
-
compute: (text: Maybe<FunctionResultObject>) =>
|
|
14
|
+
compute: (text: Maybe<FunctionResultObject>) => {
|
|
15
|
+
value: string;
|
|
16
|
+
};
|
|
13
17
|
isExported: true;
|
|
14
18
|
};
|
|
15
19
|
export declare const CONCATENATE: {
|
|
16
20
|
description: string;
|
|
17
21
|
args: import("..").ArgDefinition[];
|
|
18
|
-
compute: (...datas: Arg[]) =>
|
|
22
|
+
compute: (...datas: Arg[]) => {
|
|
23
|
+
value: string;
|
|
24
|
+
};
|
|
19
25
|
isExported: true;
|
|
20
26
|
};
|
|
21
27
|
export declare const EXACT: {
|
|
22
28
|
description: string;
|
|
23
29
|
args: import("..").ArgDefinition[];
|
|
24
|
-
compute: (string1: Maybe<FunctionResultObject>, string2: Maybe<FunctionResultObject>) =>
|
|
30
|
+
compute: (string1: Maybe<FunctionResultObject>, string2: Maybe<FunctionResultObject>) => {
|
|
31
|
+
value: boolean;
|
|
32
|
+
};
|
|
25
33
|
isExported: true;
|
|
26
34
|
};
|
|
27
35
|
export declare const FIND: {
|
|
28
36
|
description: string;
|
|
29
37
|
args: import("..").ArgDefinition[];
|
|
30
|
-
compute: (this: import("..").EvalContext, searchFor: Maybe<FunctionResultObject>, textToSearch: Maybe<FunctionResultObject>, startingAt?: Maybe<FunctionResultObject>) =>
|
|
38
|
+
compute: (this: import("..").EvalContext, searchFor: Maybe<FunctionResultObject>, textToSearch: Maybe<FunctionResultObject>, startingAt?: Maybe<FunctionResultObject>) => EvaluationError | {
|
|
39
|
+
value: number;
|
|
40
|
+
};
|
|
31
41
|
isExported: true;
|
|
32
42
|
};
|
|
33
43
|
export declare const FORMAT_LARGE_NUMBER: {
|
|
@@ -38,48 +48,64 @@ export declare const FORMAT_LARGE_NUMBER: {
|
|
|
38
48
|
export declare const JOIN: {
|
|
39
49
|
description: string;
|
|
40
50
|
args: import("..").ArgDefinition[];
|
|
41
|
-
compute: (delimiter: Maybe<FunctionResultObject>, ...valuesOrArrays: Arg[]) =>
|
|
51
|
+
compute: (delimiter: Maybe<FunctionResultObject>, ...valuesOrArrays: Arg[]) => {
|
|
52
|
+
value: string;
|
|
53
|
+
};
|
|
42
54
|
};
|
|
43
55
|
export declare const LEFT: {
|
|
44
56
|
description: string;
|
|
45
57
|
args: import("..").ArgDefinition[];
|
|
46
|
-
compute: (this: import("..").EvalContext, text: Maybe<FunctionResultObject>, ...args: Maybe<FunctionResultObject>[]) =>
|
|
58
|
+
compute: (this: import("..").EvalContext, text: Maybe<FunctionResultObject>, ...args: Maybe<FunctionResultObject>[]) => EvaluationError | {
|
|
59
|
+
value: string;
|
|
60
|
+
};
|
|
47
61
|
isExported: true;
|
|
48
62
|
};
|
|
49
63
|
export declare const LEN: {
|
|
50
64
|
description: string;
|
|
51
65
|
args: import("..").ArgDefinition[];
|
|
52
|
-
compute: (text: Maybe<FunctionResultObject>) =>
|
|
66
|
+
compute: (text: Maybe<FunctionResultObject>) => {
|
|
67
|
+
value: number;
|
|
68
|
+
};
|
|
53
69
|
isExported: true;
|
|
54
70
|
};
|
|
55
71
|
export declare const LOWER: {
|
|
56
72
|
description: string;
|
|
57
73
|
args: import("..").ArgDefinition[];
|
|
58
|
-
compute: (text: Maybe<FunctionResultObject>) =>
|
|
74
|
+
compute: (text: Maybe<FunctionResultObject>) => {
|
|
75
|
+
value: string;
|
|
76
|
+
};
|
|
59
77
|
isExported: true;
|
|
60
78
|
};
|
|
61
79
|
export declare const MID: {
|
|
62
80
|
description: string;
|
|
63
81
|
args: import("..").ArgDefinition[];
|
|
64
|
-
compute: (this: import("..").EvalContext, text: Maybe<FunctionResultObject>, starting_at: Maybe<FunctionResultObject>, extract_length: Maybe<FunctionResultObject>) =>
|
|
82
|
+
compute: (this: import("..").EvalContext, text: Maybe<FunctionResultObject>, starting_at: Maybe<FunctionResultObject>, extract_length: Maybe<FunctionResultObject>) => EvaluationError | {
|
|
83
|
+
value: string;
|
|
84
|
+
};
|
|
65
85
|
isExported: true;
|
|
66
86
|
};
|
|
67
87
|
export declare const PROPER: {
|
|
68
88
|
description: string;
|
|
69
89
|
args: import("..").ArgDefinition[];
|
|
70
|
-
compute: (text: Maybe<FunctionResultObject>) =>
|
|
90
|
+
compute: (text: Maybe<FunctionResultObject>) => {
|
|
91
|
+
value: string;
|
|
92
|
+
};
|
|
71
93
|
isExported: true;
|
|
72
94
|
};
|
|
73
95
|
export declare const REGEXTEST: {
|
|
74
96
|
description: string;
|
|
75
97
|
args: import("..").ArgDefinition[];
|
|
76
|
-
compute: (this: import("..").EvalContext, text: Maybe<FunctionResultObject>, pattern: Maybe<FunctionResultObject>, newText?: Maybe<FunctionResultObject>) =>
|
|
98
|
+
compute: (this: import("..").EvalContext, text: Maybe<FunctionResultObject>, pattern: Maybe<FunctionResultObject>, newText?: Maybe<FunctionResultObject>) => EvaluationError | {
|
|
99
|
+
value: boolean;
|
|
100
|
+
};
|
|
77
101
|
isExported: true;
|
|
78
102
|
};
|
|
79
103
|
export declare const REGEXEXTRACT: {
|
|
80
104
|
description: string;
|
|
81
105
|
args: import("..").ArgDefinition[];
|
|
82
|
-
|
|
106
|
+
computeArray: (this: import("..").EvalContext, text: Maybe<FunctionResultObject>, pattern: Maybe<FunctionResultObject>, return_mode?: Maybe<FunctionResultObject>, newText?: Maybe<FunctionResultObject>) => EvaluationError | {
|
|
107
|
+
value: string;
|
|
108
|
+
}[][] | {
|
|
83
109
|
value: string;
|
|
84
110
|
};
|
|
85
111
|
isExported: true;
|
|
@@ -87,19 +113,25 @@ export declare const REGEXEXTRACT: {
|
|
|
87
113
|
export declare const REGEXREPLACE: {
|
|
88
114
|
description: string;
|
|
89
115
|
args: import("..").ArgDefinition[];
|
|
90
|
-
compute: (this: import("..").EvalContext, text: Maybe<FunctionResultObject>, pattern: Maybe<FunctionResultObject>, replacement: Maybe<FunctionResultObject>, occurence?: Maybe<FunctionResultObject>, newText?: Maybe<FunctionResultObject>) =>
|
|
116
|
+
compute: (this: import("..").EvalContext, text: Maybe<FunctionResultObject>, pattern: Maybe<FunctionResultObject>, replacement: Maybe<FunctionResultObject>, occurence?: Maybe<FunctionResultObject>, newText?: Maybe<FunctionResultObject>) => EvaluationError | {
|
|
117
|
+
value: string;
|
|
118
|
+
};
|
|
91
119
|
isExported: true;
|
|
92
120
|
};
|
|
93
121
|
export declare const REPLACE: {
|
|
94
122
|
description: string;
|
|
95
123
|
args: import("..").ArgDefinition[];
|
|
96
|
-
compute: (this: import("..").EvalContext, text: Maybe<FunctionResultObject>, position: Maybe<FunctionResultObject>, length: Maybe<FunctionResultObject>, newText: Maybe<FunctionResultObject>) =>
|
|
124
|
+
compute: (this: import("..").EvalContext, text: Maybe<FunctionResultObject>, position: Maybe<FunctionResultObject>, length: Maybe<FunctionResultObject>, newText: Maybe<FunctionResultObject>) => EvaluationError | {
|
|
125
|
+
value: string;
|
|
126
|
+
};
|
|
97
127
|
isExported: true;
|
|
98
128
|
};
|
|
99
129
|
export declare const RIGHT: {
|
|
100
130
|
description: string;
|
|
101
131
|
args: import("..").ArgDefinition[];
|
|
102
|
-
compute: (this: import("..").EvalContext, text: Maybe<FunctionResultObject>, ...args: Maybe<FunctionResultObject>[]) =>
|
|
132
|
+
compute: (this: import("..").EvalContext, text: Maybe<FunctionResultObject>, ...args: Maybe<FunctionResultObject>[]) => EvaluationError | {
|
|
133
|
+
value: string;
|
|
134
|
+
};
|
|
103
135
|
isExported: true;
|
|
104
136
|
};
|
|
105
137
|
export declare const SEARCH: {
|
|
@@ -117,49 +149,63 @@ export declare const SEARCH: {
|
|
|
117
149
|
export declare const SPLIT: {
|
|
118
150
|
description: string;
|
|
119
151
|
args: import("..").ArgDefinition[];
|
|
120
|
-
|
|
152
|
+
computeArray: (text: Maybe<FunctionResultObject>, delimiter: Maybe<FunctionResultObject>, splitByEach?: Maybe<FunctionResultObject>, removeEmptyText?: Maybe<FunctionResultObject>) => EvaluationError | import("..").Matrix<{
|
|
153
|
+
value: string;
|
|
154
|
+
}>;
|
|
121
155
|
isExported: false;
|
|
122
156
|
};
|
|
123
157
|
export declare const SUBSTITUTE: {
|
|
124
158
|
description: string;
|
|
125
159
|
args: import("..").ArgDefinition[];
|
|
126
|
-
compute: (this: import("..").EvalContext, textToSearch: Maybe<FunctionResultObject>, searchFor: Maybe<FunctionResultObject>, replaceWith: Maybe<FunctionResultObject>, occurrenceNumber: Maybe<FunctionResultObject>) =>
|
|
160
|
+
compute: (this: import("..").EvalContext, textToSearch: Maybe<FunctionResultObject>, searchFor: Maybe<FunctionResultObject>, replaceWith: Maybe<FunctionResultObject>, occurrenceNumber: Maybe<FunctionResultObject>) => EvaluationError | {
|
|
161
|
+
value: string;
|
|
162
|
+
};
|
|
127
163
|
isExported: true;
|
|
128
164
|
};
|
|
129
165
|
export declare const TEXTJOIN: {
|
|
130
166
|
description: string;
|
|
131
167
|
args: import("..").ArgDefinition[];
|
|
132
|
-
compute: (delimiter: Maybe<FunctionResultObject>, ignoreEmpty?: Maybe<FunctionResultObject>, ...textsOrArrays: Arg[]) =>
|
|
168
|
+
compute: (delimiter: Maybe<FunctionResultObject>, ignoreEmpty?: Maybe<FunctionResultObject>, ...textsOrArrays: Arg[]) => {
|
|
169
|
+
value: string;
|
|
170
|
+
};
|
|
133
171
|
isExported: true;
|
|
134
172
|
};
|
|
135
173
|
export declare const TEXTSPLIT: {
|
|
136
174
|
description: string;
|
|
137
175
|
args: import("..").ArgDefinition[];
|
|
138
|
-
|
|
176
|
+
computeArray: (this: import("..").EvalContext, text: FunctionResultObject, colDelimiter: Arg, rowDelimiter: Arg, ignoreEmpty?: Maybe<FunctionResultObject>, matchMode?: Maybe<FunctionResultObject>, padWith?: Maybe<FunctionResultObject>) => EvaluationError | import("..").Matrix<FunctionResultObject>;
|
|
139
177
|
isExported: true;
|
|
140
178
|
};
|
|
141
179
|
export declare const TRIM: {
|
|
142
180
|
description: string;
|
|
143
181
|
args: import("..").ArgDefinition[];
|
|
144
|
-
compute: (text: Maybe<FunctionResultObject>) =>
|
|
182
|
+
compute: (text: Maybe<FunctionResultObject>) => {
|
|
183
|
+
value: string;
|
|
184
|
+
};
|
|
145
185
|
isExported: true;
|
|
146
186
|
};
|
|
147
187
|
export declare const UPPER: {
|
|
148
188
|
description: string;
|
|
149
189
|
args: import("..").ArgDefinition[];
|
|
150
|
-
compute: (text: Maybe<FunctionResultObject>) =>
|
|
190
|
+
compute: (text: Maybe<FunctionResultObject>) => {
|
|
191
|
+
value: string;
|
|
192
|
+
};
|
|
151
193
|
isExported: true;
|
|
152
194
|
};
|
|
153
195
|
export declare const TEXT: {
|
|
154
196
|
description: string;
|
|
155
197
|
args: import("..").ArgDefinition[];
|
|
156
|
-
compute: (this: import("..").EvalContext, number: Maybe<FunctionResultObject>, format: Maybe<FunctionResultObject>) =>
|
|
198
|
+
compute: (this: import("..").EvalContext, number: Maybe<FunctionResultObject>, format: Maybe<FunctionResultObject>) => {
|
|
199
|
+
value: import("..").FormattedValue;
|
|
200
|
+
};
|
|
157
201
|
isExported: true;
|
|
158
202
|
};
|
|
159
203
|
export declare const VALUE: {
|
|
160
204
|
description: string;
|
|
161
205
|
args: import("..").ArgDefinition[];
|
|
162
|
-
compute: (this: import("..").EvalContext, value: Maybe<FunctionResultObject>) =>
|
|
206
|
+
compute: (this: import("..").EvalContext, value: Maybe<FunctionResultObject>) => {
|
|
207
|
+
value: number;
|
|
208
|
+
};
|
|
163
209
|
isExported: true;
|
|
164
210
|
};
|
|
165
211
|
export declare const TEXTAFTER: {
|
|
@@ -2,6 +2,8 @@ import { FunctionResultObject, Maybe } from "../types/misc";
|
|
|
2
2
|
export declare const HYPERLINK: {
|
|
3
3
|
description: string;
|
|
4
4
|
args: import("..").ArgDefinition[];
|
|
5
|
-
compute: (url: Maybe<FunctionResultObject>, linkLabel: Maybe<FunctionResultObject>) =>
|
|
5
|
+
compute: (url: Maybe<FunctionResultObject>, linkLabel: Maybe<FunctionResultObject>) => {
|
|
6
|
+
value: string;
|
|
7
|
+
};
|
|
6
8
|
isExported: true;
|
|
7
9
|
};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { ChartDefinition } from "../types/chart/chart";
|
|
2
1
|
import { AnchorOffset, CarouselItem } from "../types/figure";
|
|
3
2
|
import { Getters } from "../types/getters";
|
|
4
3
|
import { UID } from "../types/misc";
|
|
5
4
|
import { SpreadsheetChildEnv } from "../types/spreadsheet_env";
|
|
6
|
-
export declare const CAROUSEL_DEFAULT_CHART_DEFINITION: ChartDefinition;
|
|
7
5
|
/**
|
|
8
6
|
* Compute the anchor of a chart popped out of a carousel: slightly offset from the
|
|
9
7
|
* carousel figure so the new chart does not perfectly overlap it.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CompiledFormula } from "../../formulas/compiler";
|
|
1
2
|
import { ChartCreationContext, ChartData, ChartDefinition } from "../../types/chart/chart";
|
|
2
3
|
import { CoreGetters } from "../../types/core_getters";
|
|
3
4
|
import { Getters } from "../../types/getters";
|
|
@@ -24,6 +25,7 @@ export declare class SpreadsheetChart {
|
|
|
24
25
|
getContextCreation(): ChartCreationContext;
|
|
25
26
|
getDefinitionForExcel(getters: Getters): import("../..").ExcelChartDefinition | undefined;
|
|
26
27
|
getData(getters: Getters, chartId: UID): ChartData;
|
|
28
|
+
getFormulas(getters: CoreGetters): CompiledFormula[];
|
|
27
29
|
getRuntime(getters: Getters, chartId: UID): import("../..").ChartRuntime;
|
|
28
30
|
static deleteInvalidKeys(definition: ChartDefinition<any>): ChartDefinition<any>;
|
|
29
31
|
}
|
|
@@ -3,4 +3,4 @@ import { SpreadsheetChildEnv } from "../../types/spreadsheet_env";
|
|
|
3
3
|
export declare const SplitToColumnsInteractiveContent: {
|
|
4
4
|
SplitIsDestructive: string;
|
|
5
5
|
};
|
|
6
|
-
export declare function interactiveSplitToColumns(env: SpreadsheetChildEnv
|
|
6
|
+
export declare function interactiveSplitToColumns(env: SpreadsheetChildEnv): DispatchResult;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -219,6 +219,7 @@ export declare const registries: {
|
|
|
219
219
|
getKeys(): string[];
|
|
220
220
|
remove(key: string): void;
|
|
221
221
|
};
|
|
222
|
+
unusedDataSourceRegistry: import(".").Registry<import("./registries/data_source_registry").DataSourceType>;
|
|
222
223
|
};
|
|
223
224
|
/** Registries Population */
|
|
224
225
|
import "./clipboard_handlers/clipboard_handler_registrations";
|
|
@@ -236,6 +237,7 @@ import { Select } from "./components/select/select";
|
|
|
236
237
|
import { ChartRangeDataSourceComponent } from "./components/side_panel/chart/building_blocks/range_data_source/range_data_source";
|
|
237
238
|
import { CalendarButton } from "./components/side_panel/criterion_form/calendar_button/calendar_button";
|
|
238
239
|
import { TopBar } from "./components/top_bar/top_bar";
|
|
240
|
+
import { createComputeFunction } from "./functions/create_compute_function";
|
|
239
241
|
import { PositionMap } from "./helpers/cells/position_map";
|
|
240
242
|
import { parseFormat } from "./helpers/format/format_parser";
|
|
241
243
|
import { replaceSymbolInFormula } from "./helpers/formulas";
|
|
@@ -321,6 +323,7 @@ export declare const helpers: {
|
|
|
321
323
|
replaceSymbolInFormula: typeof replaceSymbolInFormula;
|
|
322
324
|
isSingleCellReference: typeof isSingleCellReference;
|
|
323
325
|
computeCachedTextDimension: typeof computeCachedTextDimension;
|
|
326
|
+
createComputeFunction: typeof createComputeFunction;
|
|
324
327
|
};
|
|
325
328
|
export declare const links: {
|
|
326
329
|
isMarkdownLink: typeof isMarkdownLink;
|
package/dist/types/model.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ export declare class Model extends EventBus<any> implements CommandDispatcher {
|
|
|
35
35
|
private corePlugins;
|
|
36
36
|
private statefulUIPlugins;
|
|
37
37
|
private range;
|
|
38
|
+
private formulasPlugin;
|
|
38
39
|
private session;
|
|
39
40
|
/**
|
|
40
41
|
* In a collaborative context, some commands can be replayed, we have to ensure
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CompiledFormula } from "../../formulas/compiler";
|
|
1
2
|
import { SpreadsheetChart } from "../../helpers/figures/chart";
|
|
2
3
|
import { ChartCreationContext, ChartDefinition, ChartType } from "../../types/chart/chart";
|
|
3
4
|
import { Command, CommandResult, CoreCommand } from "../../types/commands";
|
|
@@ -41,5 +42,6 @@ export declare class ChartPlugin extends CorePlugin<ChartState> implements Chart
|
|
|
41
42
|
private checkChartChanged;
|
|
42
43
|
/** If the command is meant to create a new figure, the position & offset argument need to be defined in the command */
|
|
43
44
|
private checkFigureArguments;
|
|
45
|
+
getFormulas(): CompiledFormula[];
|
|
44
46
|
}
|
|
45
47
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CompiledFormula } from "../../formulas/compiler";
|
|
1
2
|
import { Command, CommandResult, CoreCommand } from "../../types/commands";
|
|
2
3
|
import { ConditionalFormat, ConditionalFormatInternal } from "../../types/conditional_formatting";
|
|
3
4
|
import { RangeAdapterFunctions, UID, Zone } from "../../types/misc";
|
|
@@ -55,5 +56,6 @@ export declare class ConditionalFormatPlugin extends CorePlugin<ConditionalForma
|
|
|
55
56
|
private checkCFValues;
|
|
56
57
|
private removeConditionalFormatting;
|
|
57
58
|
private changeCFPriority;
|
|
59
|
+
getFormulas(): CompiledFormula[];
|
|
58
60
|
}
|
|
59
61
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CompiledFormula } from "../../formulas/compiler";
|
|
1
2
|
import { Command, CommandResult, CoreCommand } from "../../types/commands";
|
|
2
3
|
import { DataValidationRule } from "../../types/data_validation";
|
|
3
4
|
import { CellPosition, RangeAdapterFunctions, UID } from "../../types/misc";
|
|
@@ -34,5 +35,6 @@ export declare class DataValidationPlugin extends CorePlugin<DataValidationState
|
|
|
34
35
|
private checkCriterionHasValidNumberOfValues;
|
|
35
36
|
private checkCriterionValuesAreValid;
|
|
36
37
|
private checkValidRange;
|
|
38
|
+
getFormulas(): CompiledFormula[];
|
|
37
39
|
}
|
|
38
40
|
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CompiledFormula } from "../../formulas/compiler";
|
|
2
|
+
import { FormulaProvider } from "../../types/misc";
|
|
3
|
+
export declare class FormulaProviderAggregator {
|
|
4
|
+
private providers;
|
|
5
|
+
static getters: readonly ["getAllFormulas"];
|
|
6
|
+
addFormulaProvider(provider: FormulaProvider["getFormulas"]): void;
|
|
7
|
+
getAllFormulas(): CompiledFormula[];
|
|
8
|
+
}
|
|
@@ -59,6 +59,7 @@ export declare class PivotCorePlugin extends CorePlugin<CoreState> implements Co
|
|
|
59
59
|
private checkSortedColumnInMeasures;
|
|
60
60
|
private checkDuplicatedMeasureIds;
|
|
61
61
|
private checkCustomFieldsAreValid;
|
|
62
|
+
getFormulas(): CompiledFormula[];
|
|
62
63
|
/**
|
|
63
64
|
* Import the pivots
|
|
64
65
|
*/
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
+
import { CompiledFormula } from "../formulas/compiler";
|
|
1
2
|
import { StateObserver } from "../state_observer";
|
|
2
3
|
import { CoreCommand, CoreCommandDispatcher } from "../types/commands";
|
|
3
4
|
import { CoreGetters } from "../types/core_getters";
|
|
4
|
-
import { RangeAdapterFunctions, RangeProvider } from "../types/misc";
|
|
5
|
+
import { FormulaProvider, RangeAdapterFunctions, RangeProvider } from "../types/misc";
|
|
5
6
|
import { ModelConfig } from "../types/model";
|
|
6
7
|
import { WorkbookData } from "../types/workbook_data";
|
|
7
8
|
import { BasePlugin } from "./base_plugin";
|
|
9
|
+
import { FormulaProviderAggregator } from "./core/formulas_provider";
|
|
8
10
|
import { RangeAdapterPlugin } from "./core/range";
|
|
9
11
|
export interface CorePluginConfig {
|
|
10
12
|
readonly getters: CoreGetters;
|
|
11
13
|
readonly stateObserver: StateObserver;
|
|
12
14
|
readonly range: RangeAdapterPlugin;
|
|
15
|
+
readonly formulasPlugin: FormulaProviderAggregator;
|
|
13
16
|
readonly dispatch: CoreCommandDispatcher["dispatch"];
|
|
14
17
|
readonly canDispatch: CoreCommandDispatcher["dispatch"];
|
|
15
18
|
readonly custom: ModelConfig["custom"];
|
|
@@ -25,11 +28,11 @@ export interface CorePluginConstructor {
|
|
|
25
28
|
* persisted state.
|
|
26
29
|
* They should not be concerned about UI parts or transient state.
|
|
27
30
|
*/
|
|
28
|
-
export declare class CorePlugin<State = any> extends BasePlugin<State, CoreCommand> implements RangeProvider {
|
|
31
|
+
export declare class CorePlugin<State = any> extends BasePlugin<State, CoreCommand> implements RangeProvider, FormulaProvider {
|
|
29
32
|
protected getters: CoreGetters;
|
|
30
33
|
protected dispatch: CoreCommandDispatcher["dispatch"];
|
|
31
34
|
protected canDispatch: CoreCommandDispatcher["dispatch"];
|
|
32
|
-
constructor({ getters, stateObserver, range, dispatch, canDispatch }: CorePluginConfig);
|
|
35
|
+
constructor({ getters, stateObserver, range, dispatch, canDispatch, formulasPlugin, }: CorePluginConfig);
|
|
33
36
|
import(data: WorkbookData): void;
|
|
34
37
|
export(data: WorkbookData, shouldSquish: boolean): void;
|
|
35
38
|
/**
|
|
@@ -44,4 +47,5 @@ export declare class CorePlugin<State = any> extends BasePlugin<State, CoreComma
|
|
|
44
47
|
* @param sheetName couple of old and new sheet names to adapt ranges pointing to that sheet
|
|
45
48
|
*/
|
|
46
49
|
adaptRanges(rangeAdapterFunctions: RangeAdapterFunctions): void;
|
|
50
|
+
getFormulas(): CompiledFormula[];
|
|
47
51
|
}
|
|
@@ -1,21 +1,28 @@
|
|
|
1
1
|
import { CompiledFormula } from "../../../formulas/compiler";
|
|
2
2
|
import { CellValue, EvaluatedCell, FormulaCell } from "../../../types/cells";
|
|
3
|
-
import { Command,
|
|
3
|
+
import { Command, CommandResult } from "../../../types/commands";
|
|
4
4
|
import { PerfProfile } from "../../../types/functions";
|
|
5
5
|
import { CellPosition, FunctionResultObject, GetSymbolValue, Matrix, UID, Zone } from "../../../types/misc";
|
|
6
6
|
import { Range } from "../../../types/range";
|
|
7
7
|
import { ExcelWorkbookData } from "../../../types/workbook_data";
|
|
8
8
|
import { CoreViewPlugin, CoreViewPluginConfig } from "../../core_view_plugin";
|
|
9
9
|
export declare class EvaluationPlugin extends CoreViewPlugin {
|
|
10
|
-
static getters: readonly ["evaluateFormula", "evaluateFormulaResult", "evaluateCompiledFormula", "getCorrespondingFormulaCell", "getVisibleRangeValues", "getEvaluatedCell", "getEvaluatedCells", "getEvaluatedCellsInZone", "getEvaluatedCellsPositions", "getSpreadZone", "getArrayFormulaSpreadingOn", "isArrayFormulaSpillBlocked", "isEmpty", "getPerfProfile"];
|
|
10
|
+
static getters: readonly ["evaluateFormula", "evaluateFormulaResult", "evaluateCompiledFormula", "getCorrespondingFormulaCell", "getVisibleRangeValues", "getEvaluatedCell", "getEvaluatedCells", "getEvaluatedCellsInZone", "getEvaluatedCellsPositions", "getSpreadZone", "getArrayFormulaSpreadingOn", "isArrayFormulaSpillBlocked", "isEmpty", "getPerfProfile", "isAutomaticEvaluationEnabled"];
|
|
11
11
|
private shouldRebuildDependenciesGraph;
|
|
12
12
|
private forceEvaluation;
|
|
13
|
+
private automaticEvaluation;
|
|
13
14
|
private evaluator;
|
|
14
15
|
private positionsToUpdate;
|
|
15
16
|
constructor(config: CoreViewPluginConfig);
|
|
17
|
+
allowDispatch(cmd: Command): CommandResult.Success | CommandResult.NoChangeInAutomaticEvaluation;
|
|
16
18
|
beforeHandle(cmd: Command): void;
|
|
17
|
-
handle(cmd:
|
|
19
|
+
handle(cmd: Command): void;
|
|
18
20
|
finalize(): void;
|
|
21
|
+
/**
|
|
22
|
+
* Returns whether automatic evaluation is enabled.
|
|
23
|
+
* When disabled, cells are only re-evaluated on explicit EVALUATE_CELLS commands (F9).
|
|
24
|
+
*/
|
|
25
|
+
isAutomaticEvaluationEnabled(): boolean;
|
|
19
26
|
evaluateFormula(sheetId: UID, formulaString: string, cellPosition?: CellPosition): CellValue | Matrix<CellValue>;
|
|
20
27
|
evaluateFormulaResult(sheetId: UID, formulaString: string, cellPosition?: CellPosition): Matrix<FunctionResultObject> | FunctionResultObject;
|
|
21
28
|
evaluateCompiledFormula(sheetId: UID, compiledFormula: CompiledFormula, getSymbolValue?: GetSymbolValue): FunctionResultObject | Matrix<FunctionResultObject>;
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import { Command } from "../../types/commands";
|
|
2
2
|
import { UIPlugin } from "../ui_plugin";
|
|
3
3
|
export declare class UIOptionsPlugin extends UIPlugin {
|
|
4
|
-
static getters: readonly ["shouldShowFormulas"
|
|
4
|
+
static getters: readonly ["shouldShowFormulas"];
|
|
5
5
|
private showFormulas;
|
|
6
|
-
private automaticEvaluation;
|
|
7
6
|
handle(cmd: Command): void;
|
|
8
7
|
shouldShowFormulas(): boolean;
|
|
9
|
-
/**
|
|
10
|
-
* Returns whether automatic evaluation is enabled.
|
|
11
|
-
* When disabled, cells are only re-evaluated on explicit EVALUATE_CELLS commands (F9).
|
|
12
|
-
*/
|
|
13
|
-
isAutomaticEvaluationEnabled(): boolean;
|
|
14
8
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Command, CommandResult, LocalCommand } from "../../types/commands";
|
|
2
2
|
import { CellPosition, UID } from "../../types/misc";
|
|
3
|
-
import { CriterionFilter, DataFilterValue
|
|
3
|
+
import { CriterionFilter, DataFilterValue } from "../../types/table";
|
|
4
4
|
import { ExcelWorkbookData } from "../../types/workbook_data";
|
|
5
5
|
import { UIPlugin } from "../ui_plugin";
|
|
6
6
|
export declare class FilterEvaluationPlugin extends UIPlugin {
|
|
7
|
-
static getters: readonly ["getFilterValue", "getFilterHiddenValues", "getFilterCriterionValue", "
|
|
7
|
+
static getters: readonly ["getFilterValue", "getFilterHiddenValues", "getFilterCriterionValue", "isRowFiltered", "isFilterActive"];
|
|
8
8
|
private filterValues;
|
|
9
9
|
hiddenRows: Record<UID, Set<number> | undefined>;
|
|
10
10
|
isEvaluationDirty: boolean;
|
|
@@ -16,7 +16,6 @@ export declare class FilterEvaluationPlugin extends UIPlugin {
|
|
|
16
16
|
getFilterHiddenValues(position: CellPosition): string[];
|
|
17
17
|
getFilterCriterionValue(position: CellPosition): CriterionFilter;
|
|
18
18
|
isFilterActive(position: CellPosition): boolean;
|
|
19
|
-
getFirstTableInSelection(): Table | undefined;
|
|
20
19
|
private updateFilter;
|
|
21
20
|
private updateHiddenRows;
|
|
22
21
|
exportForExcel(data: ExcelWorkbookData): void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CoreChartOptions } from "chart.js";
|
|
2
|
+
import { CompiledFormula } from "..";
|
|
2
3
|
import { ChartCreationContext, ChartData, ChartRuntime, ChartType, ChartTypeDefinition, ExcelChartDefinition } from "../types/chart/chart";
|
|
3
4
|
import { CommandResult } from "../types/commands";
|
|
4
5
|
import { CoreGetters } from "../types/core_getters";
|
|
@@ -47,6 +48,8 @@ export interface ChartTypeBuilder<T extends ChartType> {
|
|
|
47
48
|
*/
|
|
48
49
|
getDefinitionForExcel(getters: Getters, definition: ChartTypeDefinition<T, Range>, params: Pick<ExcelChartDefinition, "dataSets" | "labelRange">): ExcelChartDefinition | undefined;
|
|
49
50
|
getRuntime(getters: Getters, definition: ChartTypeDefinition<T, Range>, chartDataExtractors: ChartDataExtractors, sheetId: UID, eventHandlers: ChartJsEventHandlers): ChartRuntime;
|
|
51
|
+
/** Get all the formulas used in the chart */
|
|
52
|
+
getFormulas(getters: CoreGetters, sheetId: UID, definition: ChartTypeDefinition<T, Range>): CompiledFormula[];
|
|
50
53
|
allowedDefinitionKeys: readonly string[];
|
|
51
54
|
sequence: number;
|
|
52
55
|
dataSeriesLimit?: number;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Model } from "../model";
|
|
2
|
+
import { Getters } from "../types/getters";
|
|
3
|
+
import { UID } from "../types/misc";
|
|
4
|
+
import { Registry } from "./registry";
|
|
5
|
+
export interface UnusedDataSource {
|
|
6
|
+
label: string;
|
|
7
|
+
id: UID;
|
|
8
|
+
}
|
|
9
|
+
export interface DataSourceType {
|
|
10
|
+
type: string;
|
|
11
|
+
unusedLabel: string;
|
|
12
|
+
getUnusedInstances: (getters: Getters) => UnusedDataSource[];
|
|
13
|
+
deleteDataSource: (dispatch: Model["dispatch"], id: UID) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const unusedDataSourceRegistry: Registry<DataSourceType>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Command, DispatchResult, ResizeTableCommand } from "../types/commands";
|
|
2
|
+
import { SpreadsheetStore } from "./spreadsheet_store";
|
|
3
|
+
export declare class TableResizeStore extends SpreadsheetStore {
|
|
4
|
+
canResizeTable(cmd: ResizeTableCommand): DispatchResult;
|
|
5
|
+
handle(cmd: Command): void;
|
|
6
|
+
}
|