@odoo/o-spreadsheet 19.5.0-alpha.13 → 19.5.0-alpha.15
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 +2849 -2625
- package/dist/o_spreadsheet.css +17 -6
- package/dist/o_spreadsheet.esm.js +2845 -2625
- package/dist/o_spreadsheet.iife.js +2848 -2624
- package/dist/o_spreadsheet.min.iife.js +299 -299
- package/dist/o_spreadsheet.xml +21 -13
- package/dist/types/actions/menu_items_actions.d.ts +3 -2
- package/dist/types/collaborative/command_squisher.d.ts +1 -1
- package/dist/types/collaborative/session.d.ts +3 -1
- package/dist/types/components/figures/chart/chartJs/zoomable_chart/zoomable_chartjs.d.ts +1 -0
- package/dist/types/components/figures/figure/figure.d.ts +1 -0
- package/dist/types/components/figures/figure_container/figure_container.d.ts +6 -2
- package/dist/types/components/full_screen_figure/full_screen_figure.d.ts +12 -1
- package/dist/types/components/grid_overlay/grid_overlay.d.ts +1 -0
- package/dist/types/components/headers_overlay/headers_overlay.d.ts +2 -0
- package/dist/types/components/helpers/figure_drag_helper.d.ts +3 -3
- package/dist/types/components/helpers/figure_snap_helper.d.ts +8 -3
- package/dist/types/components/helpers/zoom.d.ts +0 -10
- package/dist/types/components/link/link_editor/link_editor.d.ts +1 -0
- package/dist/types/components/side_panel/components/radio_selection/radio_selection.d.ts +1 -1
- package/dist/types/components/side_panel/find_and_replace/find_and_replace.d.ts +1 -0
- package/dist/types/components/side_panel/find_and_replace/find_and_replace_store.d.ts +2 -1
- package/dist/types/components/side_panel/table_panel/table_panel.d.ts +6 -0
- package/dist/types/components/side_panel/table_style_editor_panel/table_style_editor_panel.d.ts +2 -0
- package/dist/types/components/tables/table_resizer/table_resizer.d.ts +1 -0
- package/dist/types/components/top_bar/color_editor/color_editor.d.ts +1 -1
- package/dist/types/constants.d.ts +2 -2
- package/dist/types/formulas/compiler.d.ts +1 -1
- package/dist/types/functions/helper_lookup.d.ts +1 -1
- package/dist/types/helpers/cells/cell_evaluation.d.ts +1 -1
- package/dist/types/helpers/color_themes.d.ts +2 -0
- package/dist/types/helpers/figures/chart.d.ts +5 -5
- package/dist/types/helpers/figures/charts/chart_common.d.ts +3 -3
- package/dist/types/helpers/figures/charts/chart_data_sources.d.ts +3 -3
- package/dist/types/helpers/figures/charts/chart_ui_common.d.ts +3 -3
- package/dist/types/helpers/figures/charts/runtime/chart_data_extractor.d.ts +13 -12
- package/dist/types/helpers/figures/charts/runtime/chartjs_title.d.ts +2 -2
- package/dist/types/helpers/filter_helpers.d.ts +2 -2
- package/dist/types/helpers/links.d.ts +1 -1
- package/dist/types/helpers/owl3_helpers.d.ts +4 -0
- package/dist/types/helpers/pivot/pivot_composer_helpers.d.ts +1 -1
- package/dist/types/helpers/pivot/pivot_presentation.d.ts +2 -2
- package/dist/types/helpers/pivot/pivot_registry.d.ts +4 -5
- package/dist/types/helpers/pivot/spreadsheet_pivot/runtime_definition_spreadsheet_pivot.d.ts +2 -2
- package/dist/types/helpers/range.d.ts +1 -1
- package/dist/types/index.d.ts +7 -8
- package/dist/types/model.d.ts +17 -10
- package/dist/types/owl3_compatibility_layer.d.ts +1 -14
- package/dist/types/plugins/core/range.d.ts +1 -1
- package/dist/types/plugins/core/squisher.d.ts +4 -1
- package/dist/types/plugins/core/tables.d.ts +2 -1
- package/dist/types/plugins/core/unsquisher.d.ts +1 -1
- package/dist/types/plugins/core_plugin.d.ts +1 -1
- package/dist/types/plugins/{ui_stateful → evaluation}/cell_computed_style.d.ts +4 -4
- package/dist/types/plugins/{ui_core_views/cell_evaluation/evaluation_plugin.d.ts → evaluation/cell_evaluation/cell_evaluation_plugin.d.ts} +7 -7
- package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/compilation_parameters.d.ts +2 -2
- package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/evaluator.d.ts +2 -2
- package/dist/types/plugins/{ui_core_views → evaluation}/custom_colors.d.ts +5 -5
- package/dist/types/plugins/{ui_core_views → evaluation}/dynamic_tables.d.ts +4 -4
- package/dist/types/plugins/{ui_feature → evaluation}/dynamic_translate.d.ts +2 -2
- package/dist/types/plugins/evaluation/evaluation_chart.d.ts +27 -0
- package/dist/types/plugins/{ui_core_views → evaluation}/evaluation_conditional_format.d.ts +4 -4
- package/dist/types/plugins/{ui_core_views → evaluation}/evaluation_data_validation.d.ts +4 -4
- package/dist/types/plugins/{ui_stateful → evaluation}/filter_evaluation.d.ts +5 -5
- package/dist/types/plugins/{ui_core_views → evaluation}/fingerprint.d.ts +2 -2
- package/dist/types/plugins/evaluation/formula_tracker.d.ts +8 -0
- package/dist/types/plugins/evaluation/geo_loader.d.ts +12 -0
- package/dist/types/plugins/{ui_core_views → evaluation}/header_sizes_ui.d.ts +5 -5
- package/dist/types/plugins/{ui_stateful/header_visibility_ui.d.ts → evaluation/header_visibility_evaluation.d.ts} +2 -2
- package/dist/types/plugins/evaluation/pivot_presence_plugin.d.ts +12 -0
- package/dist/types/plugins/{ui_core_views → evaluation}/pivot_ui.d.ts +6 -6
- package/dist/types/plugins/evaluation/subtotal_evaluation.d.ts +5 -0
- package/dist/types/plugins/{ui_stateful → evaluation}/table_computed_style.d.ts +7 -7
- package/dist/types/plugins/evaluation_plugin.d.ts +31 -0
- package/dist/types/plugins/plugin_registries.d.ts +11 -5
- package/dist/types/plugins/ui_feature/chart_ui.d.ts +6 -0
- package/dist/types/plugins/ui_feature/color_theme.d.ts +0 -3
- package/dist/types/plugins/ui_feature/geo_features.d.ts +1 -6
- package/dist/types/plugins/{ui_core_views → ui_stateful}/cell_icon_plugin.d.ts +2 -2
- package/dist/types/registries/chart_data_source_registry.d.ts +4 -5
- package/dist/types/registries/chart_registry.d.ts +4 -5
- package/dist/types/registries/criterion_registry.d.ts +4 -4
- package/dist/types/registries/evaluation_registry.d.ts +2 -2
- package/dist/types/registries/figures_registry.d.ts +1 -1
- package/dist/types/stores/zoom_store.d.ts +15 -2
- package/dist/types/types/collaborative/transport_service.d.ts +1 -0
- package/dist/types/types/commands.d.ts +32 -17
- package/dist/types/types/functions.d.ts +2 -2
- package/dist/types/types/getters.d.ts +102 -20
- package/dist/types/types/model.d.ts +2 -1
- package/dist/types/types/rendering.d.ts +2 -0
- package/package.json +2 -2
- package/dist/types/plugins/core_view_plugin.d.ts +0 -29
- package/dist/types/plugins/ui_core_views/evaluation_chart.d.ts +0 -26
- package/dist/types/plugins/ui_core_views/formula_tracker.d.ts +0 -8
- package/dist/types/plugins/ui_feature/pivot_presence_plugin.d.ts +0 -11
- package/dist/types/plugins/ui_feature/subtotal_evaluation.d.ts +0 -5
- package/dist/types/types/core_getters.d.ts +0 -77
- /package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/binary_grid.d.ts +0 -0
- /package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/formula_dependency_graph.d.ts +0 -0
- /package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/interval_tree.d.ts +0 -0
- /package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/position_set.d.ts +0 -0
- /package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/r_tree.d.ts +0 -0
- /package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/range_set.d.ts +0 -0
- /package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/spreading_relation.d.ts +0 -0
- /package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/zone_set.d.ts +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { UID } from "..";
|
|
2
|
-
import {
|
|
2
|
+
import { EvaluationGetters } from "../types/getters";
|
|
3
3
|
import { DataFilterValue } from "../types/table";
|
|
4
4
|
import { FieldValue } from "./pivot/spreadsheet_pivot/data_entry_spreadsheet_pivot";
|
|
5
5
|
/**
|
|
6
6
|
*Determines whether a given value should be filtered out (hidden)
|
|
7
7
|
*/
|
|
8
|
-
export declare function isValueFiltered(getters:
|
|
8
|
+
export declare function isValueFiltered(getters: EvaluationGetters, sheetId: UID, data: FieldValue, filter: DataFilterValue, preComputedCriterion?: unknown): boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Registry } from "../registries/registry";
|
|
2
2
|
import { CellValue } from "../types/cells";
|
|
3
|
-
import { CoreGetters } from "../types/
|
|
3
|
+
import { CoreGetters } from "../types/getters";
|
|
4
4
|
import { Link } from "../types/misc";
|
|
5
5
|
import { SpreadsheetChildEnv } from "../types/spreadsheet_env";
|
|
6
6
|
/**
|
|
@@ -2,7 +2,7 @@ import { CellComposerStore } from "../../components/composer/composer/cell_compo
|
|
|
2
2
|
import { CompiledFormula } from "../../formulas/compiler";
|
|
3
3
|
import { EnrichedToken } from "../../formulas/composer_tokenizer";
|
|
4
4
|
import { AutoCompleteProposal } from "../../registries/auto_completes/auto_complete_registry";
|
|
5
|
-
import { CoreGetters } from "../../types/
|
|
5
|
+
import { CoreGetters } from "../../types/getters";
|
|
6
6
|
import { Granularity, PivotField, PivotMeasure } from "../../types/pivot";
|
|
7
7
|
/**
|
|
8
8
|
* Get the first Pivot function description of the given formula.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PivotParams, PivotUIConstructor } from "./pivot_registry";
|
|
2
2
|
import { CellValue } from "../../types/cells";
|
|
3
|
-
import {
|
|
3
|
+
import { EvaluationGetters } from "../../types/getters";
|
|
4
4
|
import { FunctionResultObject, SortDirection, UID } from "../../types/misc";
|
|
5
5
|
import { ModelConfig } from "../../types/model";
|
|
6
6
|
import { DimensionTree, NEXT_VALUE, PivotDimension, PivotDomain, PivotMeasure, PivotMeasureDisplay, PivotValueCell, PREVIOUS_VALUE } from "../../types/pivot";
|
|
@@ -24,7 +24,7 @@ type DomainGroups<T> = {
|
|
|
24
24
|
*/
|
|
25
25
|
export default function (PivotClass: PivotUIConstructor): {
|
|
26
26
|
new (pivotId: any, custom: ModelConfig["custom"], params: PivotParams): {
|
|
27
|
-
getters:
|
|
27
|
+
getters: EvaluationGetters;
|
|
28
28
|
pivotId: UID;
|
|
29
29
|
cache: Record<string, FunctionResultObject>;
|
|
30
30
|
rankAsc: CacheForMeasureAndField<DomainGroups<number> | undefined>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Registry } from "../../registries/registry";
|
|
2
|
-
import { CoreGetters } from "../../types/
|
|
3
|
-
import { Getters } from "../../types/getters";
|
|
2
|
+
import { CoreGetters, EvaluationGetters } from "../../types/getters";
|
|
4
3
|
import { ApplyRangeChange, UID } from "../../types/misc";
|
|
5
4
|
import { ModelConfig } from "../../types/model";
|
|
6
5
|
import { PivotCoreDefinition, PivotField, PivotFields } from "../../types/pivot";
|
|
@@ -8,14 +7,14 @@ import { Pivot } from "../../types/pivot_runtime";
|
|
|
8
7
|
import { PivotRuntimeDefinition } from "./pivot_runtime_definition";
|
|
9
8
|
export interface PivotParams {
|
|
10
9
|
definition: PivotCoreDefinition;
|
|
11
|
-
getters:
|
|
10
|
+
getters: EvaluationGetters;
|
|
12
11
|
}
|
|
13
12
|
export interface PivotCoreParams {
|
|
14
13
|
definition: PivotCoreDefinition;
|
|
15
14
|
getters: CoreGetters;
|
|
16
15
|
}
|
|
17
16
|
export type PivotUIConstructor = new (custom: ModelConfig["custom"], params: PivotParams) => Pivot;
|
|
18
|
-
type PivotDefinitionConstructor = new (definition: PivotCoreDefinition, fields: PivotFields, getters:
|
|
17
|
+
type PivotDefinitionConstructor = new (definition: PivotCoreDefinition, fields: PivotFields, getters: EvaluationGetters) => PivotRuntimeDefinition;
|
|
19
18
|
export interface PivotRegistryItem {
|
|
20
19
|
ui: PivotUIConstructor;
|
|
21
20
|
definition: PivotDefinitionConstructor;
|
|
@@ -24,7 +23,7 @@ export interface PivotRegistryItem {
|
|
|
24
23
|
isMeasureCandidate: (field: PivotField) => boolean;
|
|
25
24
|
isGroupable: (field: PivotField) => boolean;
|
|
26
25
|
canHaveCustomGroup: (field: PivotField) => boolean;
|
|
27
|
-
isPivotUnused: (getters:
|
|
26
|
+
isPivotUnused: (getters: EvaluationGetters, pivotId: UID) => boolean;
|
|
28
27
|
adaptRanges?: (getters: CoreGetters, definition: PivotCoreDefinition, applyChange: ApplyRangeChange) => PivotCoreDefinition;
|
|
29
28
|
}
|
|
30
29
|
export declare const pivotRegistry: Registry<PivotRegistryItem>;
|
package/dist/types/helpers/pivot/spreadsheet_pivot/runtime_definition_spreadsheet_pivot.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EvaluationGetters } from "../../../types/getters";
|
|
2
2
|
import { PivotFields, SpreadsheetPivotCoreDefinition } from "../../../types/pivot";
|
|
3
3
|
import { Range } from "../../../types/range";
|
|
4
4
|
import { PivotRuntimeDefinition } from "../pivot_runtime_definition";
|
|
5
5
|
export declare class SpreadsheetPivotRuntimeDefinition extends PivotRuntimeDefinition {
|
|
6
6
|
readonly range?: Range;
|
|
7
|
-
constructor(definition: SpreadsheetPivotCoreDefinition, fields: PivotFields, getters:
|
|
7
|
+
constructor(definition: SpreadsheetPivotCoreDefinition, fields: PivotFields, getters: EvaluationGetters);
|
|
8
8
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Registry } from "../registries/registry";
|
|
2
2
|
import { CoreCommand, CoreCommandTypes } from "../types/commands";
|
|
3
|
-
import { CoreGetters } from "../types/
|
|
3
|
+
import { CoreGetters } from "../types/getters";
|
|
4
4
|
import { CellPosition, RangeAdapter, UID, UnboundedZone, ZoneDimension } from "../types/misc";
|
|
5
5
|
import { BoundedRange, Range, RangePart, RangeStringOptions } from "../types/range";
|
|
6
6
|
interface RangeArgs {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -124,13 +124,13 @@ export { findCellInNewZone } from "./helpers/zones";
|
|
|
124
124
|
export { load } from "./migrations/data";
|
|
125
125
|
export { Model } from "./model";
|
|
126
126
|
export { CorePlugin } from "./plugins/core_plugin";
|
|
127
|
-
export {
|
|
127
|
+
export { EvaluationPlugin } from "./plugins/evaluation_plugin";
|
|
128
128
|
export { UIPlugin } from "./plugins/ui_plugin";
|
|
129
129
|
export { Registry } from "./registries/registry";
|
|
130
130
|
export { setTranslationMethod } from "./translation";
|
|
131
131
|
export type { Client } from "./types/collaborative/session";
|
|
132
132
|
export type { ClientJoinedMessage, ClientLeftMessage, ClientMovedMessage, CollaborationMessage, RemoteRevisionMessage, RevisionRedoneMessage, RevisionUndoneMessage, TransportService, } from "./types/collaborative/transport_service";
|
|
133
|
-
export { canExecuteInReadonly, CommandResult, coreTypes, DispatchResult, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, isCoreCommand, isSheetDependent, lockedSheetAllowedCommands, readonlyAllowedCommands, } from "./types/commands";
|
|
133
|
+
export { canExecuteInReadonly, CommandResult, coreTypes, dispatcheableEvaluationCommandTypes, DispatchResult, evaluationCommandTypes, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, isCoreCommand, isSheetDependent, lockedSheetAllowedCommands, readonlyAllowedCommands, } from "./types/commands";
|
|
134
134
|
export type { CancelledReason } from "./types/commands";
|
|
135
135
|
export { CellErrorType, EvaluationError } from "./types/errors";
|
|
136
136
|
export { addRenderingLayer } from "./types/rendering";
|
|
@@ -152,11 +152,11 @@ export declare const registries: {
|
|
|
152
152
|
colMenuRegistry: import("./registries/menu_items_registry").MenuItemRegistry;
|
|
153
153
|
errorTypes: Set<string>;
|
|
154
154
|
functionRegistry: import(".").FunctionRegistry;
|
|
155
|
-
featurePluginRegistry: import("
|
|
155
|
+
featurePluginRegistry: import("./plugins/plugin_registries").PluginRegistry<import("./plugins/ui_plugin").UIPluginConstructor>;
|
|
156
156
|
iconsOnCellRegistry: import(".").Registry<(getters: import(".").Getters, position: import(".").CellPosition) => import("./registries/icons_on_cell_registry").GridIcon | undefined>;
|
|
157
|
-
statefulUIPluginRegistry: import("
|
|
158
|
-
|
|
159
|
-
corePluginRegistry: import("
|
|
157
|
+
statefulUIPluginRegistry: import("./plugins/plugin_registries").PluginRegistry<import("./plugins/ui_plugin").UIPluginConstructor>;
|
|
158
|
+
evaluationPluginRegistry: import("./plugins/plugin_registries").PluginRegistry<import("./plugins/evaluation_plugin").EvaluationPluginConstructor>;
|
|
159
|
+
corePluginRegistry: import("./plugins/plugin_registries").PluginRegistry<import("./plugins/core_plugin").CorePluginConstructor>;
|
|
160
160
|
rowMenuRegistry: import("./registries/menu_items_registry").MenuItemRegistry;
|
|
161
161
|
sidePanelRegistry: import(".").Registry<import("./registries/side_panel_registry").SidePanelContent>;
|
|
162
162
|
figureRegistry: import(".").Registry<import("./registries/figures_registry").FigureContent>;
|
|
@@ -207,7 +207,7 @@ export declare const registries: {
|
|
|
207
207
|
register: (chart: import("./types/chart/chartjs").GlobalChart) => void;
|
|
208
208
|
unregister: (chart: import("./types/chart/chartjs").GlobalChart) => void;
|
|
209
209
|
}>;
|
|
210
|
-
onIterationEndEvaluationRegistry: import(".").Registry<(getters: import(".").
|
|
210
|
+
onIterationEndEvaluationRegistry: import(".").Registry<(getters: import(".").EvaluationGetters) => void>;
|
|
211
211
|
specificRangeTransformRegistry: {
|
|
212
212
|
add<C extends import(".").CoreCommand>(cmdType: C["type"], fn: (cmd: C, rangeAdapters: import(".").RangeAdapterFunctions) => C): /*elided*/ any;
|
|
213
213
|
replace<C extends import(".").CoreCommand>(cmdType: C["type"], fn: (cmd: C, rangeAdapters: import(".").RangeAdapterFunctions) => C): /*elided*/ any;
|
|
@@ -415,7 +415,6 @@ export declare const hooks: {
|
|
|
415
415
|
};
|
|
416
416
|
export declare const compatibility: {
|
|
417
417
|
Component: any;
|
|
418
|
-
useExternalListener: any;
|
|
419
418
|
EnvPlugin: any;
|
|
420
419
|
App: any;
|
|
421
420
|
};
|
package/dist/types/model.d.ts
CHANGED
|
@@ -32,7 +32,6 @@ import { XLSXExport } from "./types/xlsx";
|
|
|
32
32
|
* programmatically a spreadsheet.
|
|
33
33
|
*/
|
|
34
34
|
export declare class Model extends EventBus<any> implements CommandDispatcher {
|
|
35
|
-
private corePlugins;
|
|
36
35
|
private statefulUIPlugins;
|
|
37
36
|
private range;
|
|
38
37
|
private formulasPlugin;
|
|
@@ -59,7 +58,7 @@ export declare class Model extends EventBus<any> implements CommandDispatcher {
|
|
|
59
58
|
*/
|
|
60
59
|
readonly config: ModelConfig;
|
|
61
60
|
private corePluginConfig;
|
|
62
|
-
private
|
|
61
|
+
private evaluationPluginConfig;
|
|
63
62
|
private uiPluginConfig;
|
|
64
63
|
private state;
|
|
65
64
|
readonly selection: SelectionStreamProcessor;
|
|
@@ -71,24 +70,30 @@ export declare class Model extends EventBus<any> implements CommandDispatcher {
|
|
|
71
70
|
getters: Getters;
|
|
72
71
|
/**
|
|
73
72
|
* Getters that are accessible from the core plugins. It's a subset of `getters`,
|
|
74
|
-
* without the UI getters
|
|
73
|
+
* without the UI getters and without the evaluation getters
|
|
75
74
|
*/
|
|
76
75
|
private coreGetters;
|
|
76
|
+
/**
|
|
77
|
+
* Getters that are accessible from the evaluation plugins. It's a subset of
|
|
78
|
+
* `getters`, without the UI getters.
|
|
79
|
+
*/
|
|
80
|
+
private evaluationGetters;
|
|
77
81
|
private readonly handlers;
|
|
78
82
|
private readonly uiHandlers;
|
|
79
83
|
private readonly coreHandlers;
|
|
84
|
+
private readonly evaluationHandlers;
|
|
80
85
|
constructor(data?: any, config?: Partial<ModelConfig>, stateUpdateMessages?: StateUpdateMessage[], verboseImport?: boolean);
|
|
81
86
|
joinSession(): void;
|
|
82
87
|
leaveSession({ shouldSnapshot }?: {
|
|
83
88
|
shouldSnapshot?: boolean;
|
|
84
89
|
}): Promise<void>;
|
|
90
|
+
private registerCoreGetter;
|
|
91
|
+
private registerEvaluationGetter;
|
|
92
|
+
private registerUiGetter;
|
|
85
93
|
private setupUiPlugin;
|
|
86
|
-
private
|
|
94
|
+
private setupEvaluationPlugin;
|
|
87
95
|
/**
|
|
88
96
|
* Initialize and properly configure a plugin.
|
|
89
|
-
*
|
|
90
|
-
* This method is private for now, but if the need arise, there is no deep
|
|
91
|
-
* reason why the model could not add dynamically a plugin while it is running.
|
|
92
97
|
*/
|
|
93
98
|
private setupCorePlugin;
|
|
94
99
|
private onRemoteRevisionReceived;
|
|
@@ -96,9 +101,9 @@ export declare class Model extends EventBus<any> implements CommandDispatcher {
|
|
|
96
101
|
private setupSessionEvents;
|
|
97
102
|
private setupConfig;
|
|
98
103
|
private setupExternalConfig;
|
|
99
|
-
private
|
|
100
|
-
private
|
|
101
|
-
private
|
|
104
|
+
private getCorePluginConfig;
|
|
105
|
+
private getEvaluationPluginConfig;
|
|
106
|
+
private getUiPluginConfig;
|
|
102
107
|
/**
|
|
103
108
|
* Check if the given command is allowed by all the plugins and the history.
|
|
104
109
|
*/
|
|
@@ -107,6 +112,7 @@ export declare class Model extends EventBus<any> implements CommandDispatcher {
|
|
|
107
112
|
private checkDispatchAllowedRemoteCommand;
|
|
108
113
|
private checkDispatchAllowedCoreCommand;
|
|
109
114
|
private checkDispatchAllowedLocalCommand;
|
|
115
|
+
private canHandle;
|
|
110
116
|
private finalize;
|
|
111
117
|
/**
|
|
112
118
|
* Check if a command can be dispatched, and returns a DispatchResult object with the possible
|
|
@@ -133,6 +139,7 @@ export declare class Model extends EventBus<any> implements CommandDispatcher {
|
|
|
133
139
|
* A command dispatched from this function is not added to the history.
|
|
134
140
|
*/
|
|
135
141
|
private dispatchFromCorePlugin;
|
|
142
|
+
private dispatchFromEvaluationPlugin;
|
|
136
143
|
/**
|
|
137
144
|
* Dispatch the given command to the given handlers.
|
|
138
145
|
* It will call `beforeHandle` and `handle`
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
*
|
|
12
12
|
* 1. Update template directives:
|
|
13
13
|
* - replace `t-portal` → `t-custom-portal`
|
|
14
|
-
* - replace `t-model` → `t-custom-model`
|
|
15
14
|
*
|
|
16
15
|
* 2. Load this file immediately after Owl 3.
|
|
17
16
|
*
|
|
@@ -26,7 +25,6 @@
|
|
|
26
25
|
* Gradually remove the compatibility layer by migrating to native Owl 3:
|
|
27
26
|
*
|
|
28
27
|
* - replace `t-custom-portal` with proper Owl 3 portal usage
|
|
29
|
-
* - replace `t-custom-model` with `t-model` + signals
|
|
30
28
|
* - convert `useLayoutEffect` back to `useEffect` where appropriate
|
|
31
29
|
*
|
|
32
30
|
* The end goal is to eliminate all compatibility shims.
|
|
@@ -38,14 +36,11 @@ export interface ComponentConstructor<Env = any> {
|
|
|
38
36
|
template: string;
|
|
39
37
|
}
|
|
40
38
|
declare class _Component<Env = any> extends OwlComponent {
|
|
41
|
-
static template: string;
|
|
42
39
|
env: Env;
|
|
43
40
|
constructor(node: any);
|
|
44
41
|
setup(): void;
|
|
45
|
-
render(deep?: boolean): void;
|
|
46
42
|
}
|
|
47
43
|
declare function _useComponent(): any;
|
|
48
|
-
declare function _useExternalListener(target: any, eventName: any, handler: any, eventParams?: any): void;
|
|
49
44
|
declare function _useLayoutEffect(effect: any, computeDependencies?: () => any): void;
|
|
50
45
|
declare class _EnvPlugin extends Plugin {
|
|
51
46
|
static id: string;
|
|
@@ -53,8 +48,6 @@ declare class _EnvPlugin extends Plugin {
|
|
|
53
48
|
}
|
|
54
49
|
declare function _useEnv(): any;
|
|
55
50
|
declare function _useSubEnv(extension: any): void;
|
|
56
|
-
declare function _useChildSubEnv(extension: any): void;
|
|
57
|
-
declare function _useChildEnv(): any;
|
|
58
51
|
declare class _App extends OwlApp {
|
|
59
52
|
/**
|
|
60
53
|
* @param {any} config
|
|
@@ -64,22 +57,16 @@ declare class _App extends OwlApp {
|
|
|
64
57
|
}
|
|
65
58
|
declare const Component: typeof _Component;
|
|
66
59
|
declare const useComponent: typeof _useComponent;
|
|
67
|
-
declare const useExternalListener: typeof _useExternalListener;
|
|
68
60
|
declare const useLayoutEffect: typeof _useLayoutEffect;
|
|
69
61
|
declare const EnvPlugin: typeof _EnvPlugin;
|
|
70
62
|
declare const useEnv: typeof _useEnv;
|
|
71
63
|
declare const useSubEnv: typeof _useSubEnv;
|
|
72
|
-
declare const useChildEnv: typeof _useChildEnv;
|
|
73
|
-
declare const useChildSubEnv: typeof _useChildSubEnv;
|
|
74
64
|
declare const App: typeof _App;
|
|
75
|
-
export { App, Component, EnvPlugin,
|
|
65
|
+
export { App, Component, EnvPlugin, useComponent, useEnv, useLayoutEffect, useSubEnv };
|
|
76
66
|
export type Component<Env = any> = _Component<Env>;
|
|
77
67
|
export type useComponent = () => any;
|
|
78
|
-
export type useExternalListener = (target: any, eventName: any, handler: any, eventParams?: any) => void;
|
|
79
68
|
export type useLayoutEffect = (effect: any, computeDependencies: () => any) => void;
|
|
80
69
|
export type EnvPlugin = _EnvPlugin;
|
|
81
70
|
export type useEnv = () => any;
|
|
82
71
|
export type useSubEnv = () => any;
|
|
83
|
-
export type useChildEnv = () => any;
|
|
84
|
-
export type useChildSubEnv = () => any;
|
|
85
72
|
export type App = _App;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command, CommandHandler, CommandResult, CoreCommand } from "../../types/commands";
|
|
2
|
-
import { CoreGetters } from "../../types/
|
|
2
|
+
import { CoreGetters } from "../../types/getters";
|
|
3
3
|
import { Dimension, RangeProvider, UID, UnboundedZone, Zone } from "../../types/misc";
|
|
4
4
|
import { Range, RangeData, RangeStringOptions } from "../../types/range";
|
|
5
5
|
export declare class RangeAdapterPlugin implements CommandHandler<CoreCommand> {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CompiledFormula } from "../../formulas/compiler";
|
|
2
2
|
import { Cell } from "../../types/cells";
|
|
3
3
|
import { UpdateCellCommand } from "../../types/commands";
|
|
4
|
-
import { CoreGetters } from "../../types/
|
|
4
|
+
import { CoreGetters } from "../../types/getters";
|
|
5
5
|
import { UID } from "../../types/misc";
|
|
6
6
|
/**
|
|
7
7
|
* Example of squishing:
|
|
@@ -32,6 +32,7 @@ export declare class Squisher {
|
|
|
32
32
|
private baseFormulaWasTransformed;
|
|
33
33
|
private rangeToStringOptions;
|
|
34
34
|
private baseNumber;
|
|
35
|
+
private baseNumberFormat;
|
|
35
36
|
constructor(getters: CoreGetters);
|
|
36
37
|
/** Build the result object based on a transformation. Joins the numbers into a single string, tries to do the same
|
|
37
38
|
* with references (unless they contain a sheet name that contains the separator). */
|
|
@@ -40,6 +41,8 @@ export declare class Squisher {
|
|
|
40
41
|
resetBaseTo(formula: CompiledFormula): void;
|
|
41
42
|
/** Reset the base formula to undefined, resetting all offsets */
|
|
42
43
|
resetBaseFormula(): void;
|
|
44
|
+
/** Reset the base number literal chain, so the next literal number cannot be squished as an offset of it */
|
|
45
|
+
resetBaseNumber(): void;
|
|
43
46
|
/**
|
|
44
47
|
* Takes a cell and squish their formulas against the previous one (in the previous call).
|
|
45
48
|
* We should call this method for each cell in the sheet, in order from top to bottom, then from left to right (all cells of a columns, for each columns left to right).
|
|
@@ -8,7 +8,7 @@ interface TableState {
|
|
|
8
8
|
nextTableId: number;
|
|
9
9
|
}
|
|
10
10
|
export declare class TablePlugin extends CorePlugin<TableState> implements TableState {
|
|
11
|
-
static getters: readonly ["getCoreTable", "getCoreTables", "getCoreTableMatchingTopLeft"];
|
|
11
|
+
static getters: readonly ["getCoreTable", "getCoreTables", "getCoreTableMatchingTopLeft", "getCoreTableById"];
|
|
12
12
|
readonly tables: Record<UID, Record<TableId, CoreTable | undefined>>;
|
|
13
13
|
readonly nextTableId: number;
|
|
14
14
|
adaptRanges({ applyChange }: RangeAdapterFunctions): void;
|
|
@@ -16,6 +16,7 @@ export declare class TablePlugin extends CorePlugin<TableState> implements Table
|
|
|
16
16
|
handle(cmd: CoreCommand): void;
|
|
17
17
|
getCoreTables(sheetId: UID): CoreTable[];
|
|
18
18
|
getCoreTable({ sheetId, col, row }: CellPosition): CoreTable | undefined;
|
|
19
|
+
getCoreTableById(sheetId: UID, tableId: UID): CoreTable | undefined;
|
|
19
20
|
private getTablesOverlappingZones;
|
|
20
21
|
/** Extend a table down one row */
|
|
21
22
|
private extendTableDown;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SquishedCoreCommand } from "../../collaborative/command_squisher";
|
|
2
2
|
import { CompiledFormula } from "../../formulas/compiler";
|
|
3
3
|
import { CoreCommand } from "../../types/commands";
|
|
4
|
-
import { CoreGetters } from "../../types/
|
|
4
|
+
import { CoreGetters } from "../../types/getters";
|
|
5
5
|
import { Position, UID } from "../../types/misc";
|
|
6
6
|
import { SquishedContent } from "./squisher";
|
|
7
7
|
export declare class Unsquisher {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CompiledFormula } from "../formulas/compiler";
|
|
2
2
|
import { StateObserver } from "../state_observer";
|
|
3
3
|
import { CoreCommand, CoreCommandDispatcher } from "../types/commands";
|
|
4
|
-
import { CoreGetters } from "../types/
|
|
4
|
+
import { CoreGetters } from "../types/getters";
|
|
5
5
|
import { FormulaProvider, RangeAdapterFunctions, RangeProvider } from "../types/misc";
|
|
6
6
|
import { ModelConfig } from "../types/model";
|
|
7
7
|
import { WorkbookData } from "../types/workbook_data";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EvaluationCommand } from "../../types/commands";
|
|
2
2
|
import { Border, CellPosition, Style } from "../../types/misc";
|
|
3
3
|
import { ExcelWorkbookData } from "../../types/workbook_data";
|
|
4
|
-
import {
|
|
5
|
-
export declare class CellComputedStylePlugin extends
|
|
4
|
+
import { EvaluationPlugin } from "../evaluation_plugin";
|
|
5
|
+
export declare class CellComputedStylePlugin extends EvaluationPlugin {
|
|
6
6
|
static getters: readonly ["getCellComputedBorder", "getCellComputedStyle"];
|
|
7
7
|
private styles;
|
|
8
8
|
private borders;
|
|
9
|
-
handle(cmd:
|
|
9
|
+
handle(cmd: EvaluationCommand): void;
|
|
10
10
|
getCellComputedBorder(position: CellPosition): Border | null;
|
|
11
11
|
getCellComputedStyle(position: CellPosition): Style;
|
|
12
12
|
private computeCellStyle;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { CompiledFormula } from "../../../formulas/compiler";
|
|
2
2
|
import { CellValue, EvaluatedCell, FormulaCell } from "../../../types/cells";
|
|
3
|
-
import {
|
|
3
|
+
import { CommandResult, EvaluationCommand } 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
|
-
import {
|
|
9
|
-
export declare class
|
|
8
|
+
import { EvaluationPlugin, EvaluationPluginConfig } from "../../evaluation_plugin";
|
|
9
|
+
export declare class CellEvaluationPlugin extends EvaluationPlugin {
|
|
10
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
13
|
private automaticEvaluation;
|
|
14
14
|
private evaluator;
|
|
15
15
|
private positionsToUpdate;
|
|
16
|
-
constructor(config:
|
|
17
|
-
allowDispatch(cmd:
|
|
18
|
-
beforeHandle(cmd:
|
|
19
|
-
handle(cmd:
|
|
16
|
+
constructor(config: EvaluationPluginConfig);
|
|
17
|
+
allowDispatch(cmd: EvaluationCommand): CommandResult.Success | CommandResult.NoChangeInAutomaticEvaluation;
|
|
18
|
+
beforeHandle(cmd: EvaluationCommand): void;
|
|
19
|
+
handle(cmd: EvaluationCommand): void;
|
|
20
20
|
finalize(): void;
|
|
21
21
|
/**
|
|
22
22
|
* Returns whether automatic evaluation is enabled.
|
package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/compilation_parameters.d.ts
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EvaluatedCell } from "../../../types/cells";
|
|
2
2
|
import { EvalContext } from "../../../types/functions";
|
|
3
|
-
import {
|
|
3
|
+
import { EvaluationGetters } from "../../../types/getters";
|
|
4
4
|
import { CellPosition, EnsureRange, ReferenceDenormalizer } from "../../../types/misc";
|
|
5
5
|
import { ModelConfig } from "../../../types/model";
|
|
6
6
|
export type CompilationParameters = {
|
|
@@ -14,4 +14,4 @@ export type CompilationParameters = {
|
|
|
14
14
|
* - a range function to convert any reference to a proper value array
|
|
15
15
|
* - an evaluation context
|
|
16
16
|
*/
|
|
17
|
-
export declare function buildCompilationParameters(context: ModelConfig["custom"], getters:
|
|
17
|
+
export declare function buildCompilationParameters(context: ModelConfig["custom"], getters: EvaluationGetters, computeCell: (position: CellPosition) => EvaluatedCell): CompilationParameters;
|
|
@@ -2,7 +2,7 @@ import { CompiledFormula } from "../../../formulas/compiler";
|
|
|
2
2
|
import { EvaluatedCell } from "../../../types/cells";
|
|
3
3
|
import { CompilationParameters } from "./compilation_parameters";
|
|
4
4
|
import { PerfProfile } from "../../../types/functions";
|
|
5
|
-
import {
|
|
5
|
+
import { EvaluationGetters } from "../../../types/getters";
|
|
6
6
|
import { CellPosition, FunctionResultObject, GetSymbolValue, Matrix, UID, Zone } from "../../../types/misc";
|
|
7
7
|
import { ModelConfig } from "../../../types/model";
|
|
8
8
|
export declare class Evaluator {
|
|
@@ -14,7 +14,7 @@ export declare class Evaluator {
|
|
|
14
14
|
private blockedArrayFormulas;
|
|
15
15
|
private spreadingRelations;
|
|
16
16
|
private perfProfile;
|
|
17
|
-
constructor(context: ModelConfig["custom"], getters:
|
|
17
|
+
constructor(context: ModelConfig["custom"], getters: EvaluationGetters);
|
|
18
18
|
getPerfProfile(): PerfProfile | undefined;
|
|
19
19
|
getEvaluatedCell(position: CellPosition): EvaluatedCell;
|
|
20
20
|
getSpreadZone(position: CellPosition, options?: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EvaluationCommand } from "../../types/commands";
|
|
2
2
|
import { Color, Immutable } from "../../types/misc";
|
|
3
|
-
import {
|
|
3
|
+
import { EvaluationPlugin, EvaluationPluginConfig } from "../evaluation_plugin";
|
|
4
4
|
interface CustomColorState {
|
|
5
5
|
readonly customColors: Immutable<Record<Color, true>>;
|
|
6
6
|
readonly shouldUpdateColors: boolean;
|
|
@@ -10,12 +10,12 @@ interface CustomColorState {
|
|
|
10
10
|
* This plugins aims to compute and keep to custom colors used in the
|
|
11
11
|
* current spreadsheet
|
|
12
12
|
*/
|
|
13
|
-
export declare class CustomColorsPlugin extends
|
|
13
|
+
export declare class CustomColorsPlugin extends EvaluationPlugin<CustomColorState> {
|
|
14
14
|
private readonly customColors;
|
|
15
15
|
private readonly shouldUpdateColors;
|
|
16
16
|
static getters: readonly ["getCustomColors"];
|
|
17
|
-
constructor(config:
|
|
18
|
-
handle(cmd:
|
|
17
|
+
constructor(config: EvaluationPluginConfig);
|
|
18
|
+
handle(cmd: EvaluationCommand): void;
|
|
19
19
|
finalize(): void;
|
|
20
20
|
getCustomColors(): Color[];
|
|
21
21
|
private computeCustomColors;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EvaluationCommand } from "../../types/commands";
|
|
2
2
|
import { CellPosition, FilterId, UID, Zone } from "../../types/misc";
|
|
3
3
|
import { Filter, Table } from "../../types/table";
|
|
4
4
|
import { ExcelWorkbookData } from "../../types/workbook_data";
|
|
5
|
-
import {
|
|
6
|
-
export declare class DynamicTablesPlugin extends
|
|
5
|
+
import { EvaluationPlugin } from "../evaluation_plugin";
|
|
6
|
+
export declare class DynamicTablesPlugin extends EvaluationPlugin {
|
|
7
7
|
static getters: readonly ["canCreateDynamicTableOnZones", "doesZonesContainFilter", "getFilter", "getFilters", "getTable", "getTables", "getTablesOverlappingZones", "getFilterId", "getFilterHeaders", "isFilterHeader"];
|
|
8
8
|
tables: Record<UID, Table[]>;
|
|
9
|
-
handle(cmd:
|
|
9
|
+
handle(cmd: EvaluationCommand): void;
|
|
10
10
|
finalize(): void;
|
|
11
11
|
private computeTables;
|
|
12
12
|
private getDynamicTables;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EvaluationPlugin } from "../evaluation_plugin";
|
|
2
2
|
/**
|
|
3
3
|
* This plugin provides dynamic translation getter. In o-spreadsheet, it has
|
|
4
4
|
* no implementation, but this plugin can be replaced by another one to provide
|
|
@@ -7,7 +7,7 @@ import { UIPlugin } from "../ui_plugin";
|
|
|
7
7
|
* For example, in Odoo, the plugin is replaced by a plugin that used the
|
|
8
8
|
* module namespace to dynamically translate terms.
|
|
9
9
|
*/
|
|
10
|
-
export declare class DynamicTranslate extends
|
|
10
|
+
export declare class DynamicTranslate extends EvaluationPlugin {
|
|
11
11
|
static getters: readonly ["dynamicTranslate"];
|
|
12
12
|
dynamicTranslate(term: string): string;
|
|
13
13
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ChartRuntime } from "../../types/chart/chart";
|
|
2
|
+
import { EvaluationCommand } from "../../types/commands";
|
|
3
|
+
import { Color, UID } from "../../types/misc";
|
|
4
|
+
import { Range } from "../../types/range";
|
|
5
|
+
import { ColorThemeName } from "../../types/rendering";
|
|
6
|
+
import { ExcelWorkbookData } from "../../types/workbook_data";
|
|
7
|
+
import { EvaluationPlugin } from "../evaluation_plugin";
|
|
8
|
+
interface EvaluationChartStyle {
|
|
9
|
+
background: Color;
|
|
10
|
+
fontColor: Color;
|
|
11
|
+
}
|
|
12
|
+
interface EvaluationChartState {
|
|
13
|
+
charts: Record<UID, Partial<Record<ColorThemeName, ChartRuntime | undefined>>>;
|
|
14
|
+
}
|
|
15
|
+
export declare class EvaluationChartPlugin extends EvaluationPlugin<EvaluationChartState> {
|
|
16
|
+
static getters: readonly ["getStyleOfSingleCellChart", "getChartRuntimeWithTheme"];
|
|
17
|
+
charts: Record<UID, Partial<Record<ColorThemeName, ChartRuntime | undefined>>>;
|
|
18
|
+
handle(cmd: EvaluationCommand): void;
|
|
19
|
+
getChartRuntimeWithTheme(chartId: UID, colorThemeName: ColorThemeName): ChartRuntime;
|
|
20
|
+
/**
|
|
21
|
+
* Get the background and textColor of a chart based on the color of the first cell of the main range of the chart.
|
|
22
|
+
*/
|
|
23
|
+
getStyleOfSingleCellChart(chartBackground: Color | undefined, mainRange: Range | undefined, colorThemeName: ColorThemeName): EvaluationChartStyle;
|
|
24
|
+
exportForExcel(data: ExcelWorkbookData): Promise<void>;
|
|
25
|
+
private createRuntimeChart;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EvaluationCommand } from "../../types/commands";
|
|
2
2
|
import { CellPosition, DataBarFill, Style } from "../../types/misc";
|
|
3
|
-
import {
|
|
4
|
-
export declare class EvaluationConditionalFormatPlugin extends
|
|
3
|
+
import { EvaluationPlugin } from "../evaluation_plugin";
|
|
4
|
+
export declare class EvaluationConditionalFormatPlugin extends EvaluationPlugin {
|
|
5
5
|
static getters: readonly ["getConditionalIcon", "getCellConditionalFormatStyle", "getConditionalDataBar"];
|
|
6
6
|
private isStale;
|
|
7
7
|
private computedStyles;
|
|
8
8
|
private computedIcons;
|
|
9
9
|
private computedDataBars;
|
|
10
|
-
handle(cmd:
|
|
10
|
+
handle(cmd: EvaluationCommand): void;
|
|
11
11
|
finalize(): void;
|
|
12
12
|
getCellConditionalFormatStyle(position: CellPosition): Style | undefined;
|
|
13
13
|
getConditionalIcon({ sheetId, col, row }: CellPosition): string | undefined;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CellValue } from "../../types/cells";
|
|
2
|
-
import {
|
|
2
|
+
import { EvaluationCommand } from "../../types/commands";
|
|
3
3
|
import { DataValidationCriterionType, DataValidationRule } from "../../types/data_validation";
|
|
4
4
|
import { GenericCriterion } from "../../types/generic_criterion";
|
|
5
5
|
import { CellPosition, HeaderIndex, Lazy, Style, UID } from "../../types/misc";
|
|
6
|
-
import {
|
|
6
|
+
import { EvaluationPlugin } from "../evaluation_plugin";
|
|
7
7
|
interface InvalidValidationResult {
|
|
8
8
|
readonly isValid: false;
|
|
9
9
|
readonly rule: DataValidationRule;
|
|
@@ -16,13 +16,13 @@ type ValidationResult = ValidValidationResult | InvalidValidationResult;
|
|
|
16
16
|
type SheetValidationResult = {
|
|
17
17
|
[col: HeaderIndex]: Array<Lazy<ValidationResult>>;
|
|
18
18
|
};
|
|
19
|
-
export declare class EvaluationDataValidationPlugin extends
|
|
19
|
+
export declare class EvaluationDataValidationPlugin extends EvaluationPlugin {
|
|
20
20
|
static getters: readonly ["getDataValidationInvalidCriterionValueMessage", "getInvalidDataValidationMessage", "getValidationResultForCellValue", "getDataValidationRangeValues", "isCellValidCheckbox", "getDataValidationCellStyle", "getDataValidationChipStyle", "isDataValidationInvalid"];
|
|
21
21
|
validationResults: Record<UID, SheetValidationResult>;
|
|
22
22
|
criterionPreComputeResult: Record<UID, {
|
|
23
23
|
[dvRuleId: UID]: unknown;
|
|
24
24
|
}>;
|
|
25
|
-
handle(cmd:
|
|
25
|
+
handle(cmd: EvaluationCommand): void;
|
|
26
26
|
isDataValidationInvalid(cellPosition: CellPosition): boolean;
|
|
27
27
|
getDataValidationCellStyle(position: CellPosition): Style | undefined;
|
|
28
28
|
getDataValidationChipStyle(position: CellPosition): Style | undefined;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CommandResult, EvaluationCommand } from "../../types/commands";
|
|
2
2
|
import { CellPosition, UID } from "../../types/misc";
|
|
3
3
|
import { CriterionFilter, DataFilterValue } from "../../types/table";
|
|
4
4
|
import { ExcelWorkbookData } from "../../types/workbook_data";
|
|
5
|
-
import {
|
|
6
|
-
export declare class FilterEvaluationPlugin extends
|
|
5
|
+
import { EvaluationPlugin } from "../evaluation_plugin";
|
|
6
|
+
export declare class FilterEvaluationPlugin extends EvaluationPlugin {
|
|
7
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;
|
|
11
|
-
allowDispatch(cmd:
|
|
12
|
-
handle(cmd:
|
|
11
|
+
allowDispatch(cmd: EvaluationCommand): CommandResult;
|
|
12
|
+
handle(cmd: EvaluationCommand): void;
|
|
13
13
|
finalize(): void;
|
|
14
14
|
isRowFiltered(sheetId: UID, row: number): boolean;
|
|
15
15
|
getFilterValue(position: CellPosition): DataFilterValue | undefined;
|