@odoo/o-spreadsheet 19.5.0-alpha.8 → 20.0.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/material_symbols_outlined.css +11 -0
- package/dist/o_spreadsheet.cjs +34960 -32701
- package/dist/o_spreadsheet.css +271 -127
- package/dist/o_spreadsheet.esm.js +29778 -27524
- package/dist/o_spreadsheet.iife.js +30467 -28208
- package/dist/o_spreadsheet.min.iife.js +408 -354
- package/dist/o_spreadsheet.xml +303 -239
- package/dist/types/actions/data_actions.d.ts +1 -0
- 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/autofill/autofill.d.ts +1 -1
- package/dist/types/components/autofill/autofill_store.d.ts +1 -1
- package/dist/types/components/bottom_bar/bottom_bar_statistic/bottom_bar_statistic.d.ts +3 -0
- package/dist/types/components/dashboard/clickable_cell_sort_icon/clickable_cell_sort_icon.d.ts +1 -1
- package/dist/types/components/dashboard/dashboard.d.ts +1 -0
- package/dist/types/components/figures/chart/chartJs/chartjs_geo_projection_plugin.d.ts +12 -0
- package/dist/types/components/figures/chart/chartJs/zoomable_chart/zoomable_chartjs.d.ts +1 -0
- package/dist/types/components/figures/chart/gauge/gauge_chart_component.d.ts +1 -1
- package/dist/types/components/figures/chart/scorecard/chart_scorecard.d.ts +1 -1
- package/dist/types/components/figures/figure/figure.d.ts +7 -3
- package/dist/types/components/figures/figure_carousel/figure_carousel.d.ts +10 -2
- package/dist/types/components/figures/figure_container/figure_container.d.ts +8 -4
- package/dist/types/components/full_screen_figure/full_screen_figure.d.ts +12 -1
- package/dist/types/components/grid/grid.d.ts +3 -0
- package/dist/types/components/grid_overlay/grid_overlay.d.ts +2 -0
- package/dist/types/components/grid_popover/grid_popover.d.ts +1 -1
- package/dist/types/components/headers_overlay/headers_overlay.d.ts +2 -0
- package/dist/types/components/helpers/chart_drag_and_drop.d.ts +15 -0
- package/dist/types/components/helpers/dom_helpers.d.ts +3 -2
- package/dist/types/components/helpers/draw_grid_hook.d.ts +1 -2
- 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 -14
- package/dist/types/components/highlight/highlight/highlight.d.ts +1 -0
- package/dist/types/components/link/link_editor/link_editor.d.ts +2 -1
- package/dist/types/components/popover/popover.d.ts +0 -1
- package/dist/types/components/popover/popover_container_owl_plugin.d.ts +5 -0
- package/dist/types/components/scrollbar/scrollbar_horizontal.d.ts +1 -0
- package/dist/types/components/scrollbar/scrollbar_vertical.d.ts +1 -0
- package/dist/types/components/side_panel/carousel_panel/carousel_panel.d.ts +1 -1
- package/dist/types/components/side_panel/chart/building_blocks/chart_title/chart_title.d.ts +1 -0
- package/dist/types/components/side_panel/chart/building_blocks/color_scale/color_scale_picker.d.ts +1 -1
- package/dist/types/components/side_panel/chart/calendar_chart/calendar_chart_config_panel.d.ts +0 -2
- package/dist/types/components/side_panel/chart/chart_type_picker_popover/chart_type_picker_popover.d.ts +0 -1
- package/dist/types/components/side_panel/chart/scorecard_chart_panel/scorecard_chart_config_panel.d.ts +6 -10
- package/dist/types/components/side_panel/components/radio_selection/radio_selection.d.ts +1 -1
- package/dist/types/components/side_panel/data_analysis/chart_suggestion_preview.d.ts +19 -0
- package/dist/types/components/side_panel/data_analysis/data_analysis_panel.d.ts +17 -0
- package/dist/types/components/side_panel/data_analysis/data_analysis_store.d.ts +15 -0
- 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/pivot/pivot_layout_configurator/pivot_layout_configurator.d.ts +1 -6
- package/dist/types/components/side_panel/side_panel/side_panel_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/spreadsheet/spreadsheet.d.ts +11 -5
- package/dist/types/components/spreadsheet_print/print_iframe.d.ts +15 -0
- package/dist/types/components/spreadsheet_print/spreadsheet_print.d.ts +4 -0
- package/dist/types/components/standalone_grid_canvas/carousel_data_view_print.d.ts +32 -0
- package/dist/types/components/standalone_grid_canvas/standalone_grid_canvas.d.ts +396 -1
- package/dist/types/components/standalone_viewport/standalone_viewport.d.ts +8 -4
- package/dist/types/components/standalone_viewport/standalone_viewport_store.d.ts +2 -1
- package/dist/types/components/tables/hovered_table_store.d.ts +6 -7
- package/dist/types/components/tables/table_resizer/table_resizer.d.ts +1 -0
- package/dist/types/components/tables/table_styles_popover/table_styles_popover.d.ts +0 -1
- package/dist/types/components/top_bar/color_editor/color_editor.d.ts +1 -1
- package/dist/types/components/top_bar/zoom_editor/zoom_editor.d.ts +1 -1
- package/dist/types/constants.d.ts +17 -2
- package/dist/types/formulas/compiler.d.ts +1 -1
- package/dist/types/functions/function_registry.d.ts +3 -0
- package/dist/types/functions/helper_lookup.d.ts +1 -1
- package/dist/types/functions/helpers.d.ts +4 -0
- package/dist/types/functions/module_operators.d.ts +1 -1
- package/dist/types/functions/module_text.d.ts +16 -13
- package/dist/types/functions/module_web.d.ts +1 -1
- package/dist/types/helpers/carousel_helpers.d.ts +8 -1
- package/dist/types/helpers/cells/cell_evaluation.d.ts +1 -1
- package/dist/types/helpers/color.d.ts +1 -1
- package/dist/types/helpers/color_themes.d.ts +2 -0
- package/dist/types/helpers/data_analysis.d.ts +17 -0
- package/dist/types/helpers/figures/chart.d.ts +7 -6
- package/dist/types/helpers/figures/charts/chart_common.d.ts +3 -3
- package/dist/types/helpers/figures/charts/chart_data_source_helpers.d.ts +10 -0
- package/dist/types/helpers/figures/charts/chart_data_sources.d.ts +3 -3
- package/dist/types/helpers/figures/charts/chart_suggestion_engine.d.ts +8 -0
- package/dist/types/helpers/figures/charts/chart_ui_common.d.ts +11 -4
- package/dist/types/helpers/figures/charts/charts_suggestions_constants.d.ts +37 -0
- package/dist/types/helpers/figures/charts/gauge_chart_rendering.d.ts +6 -2
- 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/helpers/rectangle.d.ts +4 -0
- package/dist/types/helpers/text_helper.d.ts +1 -1
- package/dist/types/helpers/viewport_collection.d.ts +2 -6
- package/dist/types/index.d.ts +24 -10
- package/dist/types/model.d.ts +17 -10
- package/dist/types/owl3_compatibility_layer.d.ts +1 -14
- package/dist/types/plugins/core/carousel.d.ts +1 -1
- package/dist/types/plugins/core/image.d.ts +2 -1
- package/dist/types/plugins/core/range.d.ts +4 -2
- package/dist/types/plugins/core/squisher.d.ts +6 -2
- 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 +13 -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_plugin.d.ts +1 -4
- 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 +5 -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 +6 -2
- package/dist/types/stores/cell_hover_overlay_store.d.ts +15 -0
- package/dist/types/stores/chart_drag_store.d.ts +10 -0
- package/dist/types/{plugins/ui_stateful/clipboard.d.ts → stores/clipboard_store.d.ts} +11 -11
- package/dist/types/stores/grid_renderer_store.d.ts +3 -2
- package/dist/types/stores/main_viewport_store.d.ts +3 -0
- package/dist/types/stores/viewports_store.d.ts +3 -6
- package/dist/types/stores/zoom_store.d.ts +27 -0
- package/dist/types/types/chart/chart.d.ts +3 -1
- package/dist/types/types/chart/chart_suggestion.d.ts +137 -0
- package/dist/types/types/chart/scorecard_chart.d.ts +3 -4
- package/dist/types/types/collaborative/transport_service.d.ts +4 -1
- package/dist/types/types/commands.d.ts +39 -19
- package/dist/types/types/functions.d.ts +2 -2
- package/dist/types/types/getters.d.ts +102 -21
- package/dist/types/types/model.d.ts +2 -4
- package/dist/types/types/rendering.d.ts +21 -1
- package/package.json +7 -6
- 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,5 +1,5 @@
|
|
|
1
1
|
import { EvaluationError } from "../types/errors";
|
|
2
|
-
import { Arg,
|
|
2
|
+
import { Arg, FunctionResultObject, Maybe } from "../types/misc";
|
|
3
3
|
export declare const CHAR: {
|
|
4
4
|
description: string;
|
|
5
5
|
args: import("..").ArgDefinition[];
|
|
@@ -11,7 +11,7 @@ export declare const CHAR: {
|
|
|
11
11
|
export declare const CLEAN: {
|
|
12
12
|
description: string;
|
|
13
13
|
args: import("..").ArgDefinition[];
|
|
14
|
-
compute: (text: Maybe<FunctionResultObject>) => {
|
|
14
|
+
compute: (this: import("..").EvalContext, text: Maybe<FunctionResultObject>) => {
|
|
15
15
|
value: string;
|
|
16
16
|
};
|
|
17
17
|
isExported: true;
|
|
@@ -19,7 +19,7 @@ export declare const CLEAN: {
|
|
|
19
19
|
export declare const CONCATENATE: {
|
|
20
20
|
description: string;
|
|
21
21
|
args: import("..").ArgDefinition[];
|
|
22
|
-
compute: (...datas: Arg[]) => {
|
|
22
|
+
compute: (this: import("..").EvalContext, ...datas: Arg[]) => {
|
|
23
23
|
value: string;
|
|
24
24
|
};
|
|
25
25
|
isExported: true;
|
|
@@ -27,7 +27,7 @@ export declare const CONCATENATE: {
|
|
|
27
27
|
export declare const EXACT: {
|
|
28
28
|
description: string;
|
|
29
29
|
args: import("..").ArgDefinition[];
|
|
30
|
-
compute: (string1: Maybe<FunctionResultObject>, string2: Maybe<FunctionResultObject>) => {
|
|
30
|
+
compute: (this: import("..").EvalContext, string1: Maybe<FunctionResultObject>, string2: Maybe<FunctionResultObject>) => {
|
|
31
31
|
value: boolean;
|
|
32
32
|
};
|
|
33
33
|
isExported: true;
|
|
@@ -43,12 +43,15 @@ export declare const FIND: {
|
|
|
43
43
|
export declare const FORMAT_LARGE_NUMBER: {
|
|
44
44
|
description: string;
|
|
45
45
|
args: import("..").ArgDefinition[];
|
|
46
|
-
compute: (this: import("..").EvalContext, value: Maybe<FunctionResultObject>, unite: Maybe<FunctionResultObject>) =>
|
|
46
|
+
compute: (this: import("..").EvalContext, value: Maybe<FunctionResultObject>, unite: Maybe<FunctionResultObject>) => EvaluationError | {
|
|
47
|
+
value: number;
|
|
48
|
+
format: string;
|
|
49
|
+
};
|
|
47
50
|
};
|
|
48
51
|
export declare const JOIN: {
|
|
49
52
|
description: string;
|
|
50
53
|
args: import("..").ArgDefinition[];
|
|
51
|
-
compute: (delimiter: Maybe<FunctionResultObject>, ...valuesOrArrays: Arg[]) => {
|
|
54
|
+
compute: (this: import("..").EvalContext, delimiter: Maybe<FunctionResultObject>, ...valuesOrArrays: Arg[]) => {
|
|
52
55
|
value: string;
|
|
53
56
|
};
|
|
54
57
|
};
|
|
@@ -63,7 +66,7 @@ export declare const LEFT: {
|
|
|
63
66
|
export declare const LEN: {
|
|
64
67
|
description: string;
|
|
65
68
|
args: import("..").ArgDefinition[];
|
|
66
|
-
compute: (text: Maybe<FunctionResultObject>) => {
|
|
69
|
+
compute: (this: import("..").EvalContext, text: Maybe<FunctionResultObject>) => {
|
|
67
70
|
value: number;
|
|
68
71
|
};
|
|
69
72
|
isExported: true;
|
|
@@ -71,7 +74,7 @@ export declare const LEN: {
|
|
|
71
74
|
export declare const LOWER: {
|
|
72
75
|
description: string;
|
|
73
76
|
args: import("..").ArgDefinition[];
|
|
74
|
-
compute: (text: Maybe<FunctionResultObject>) => {
|
|
77
|
+
compute: (this: import("..").EvalContext, text: Maybe<FunctionResultObject>) => {
|
|
75
78
|
value: string;
|
|
76
79
|
};
|
|
77
80
|
isExported: true;
|
|
@@ -87,7 +90,7 @@ export declare const MID: {
|
|
|
87
90
|
export declare const PROPER: {
|
|
88
91
|
description: string;
|
|
89
92
|
args: import("..").ArgDefinition[];
|
|
90
|
-
compute: (text: Maybe<FunctionResultObject>) => {
|
|
93
|
+
compute: (this: import("..").EvalContext, text: Maybe<FunctionResultObject>) => {
|
|
91
94
|
value: string;
|
|
92
95
|
};
|
|
93
96
|
isExported: true;
|
|
@@ -149,7 +152,7 @@ export declare const SEARCH: {
|
|
|
149
152
|
export declare const SPLIT: {
|
|
150
153
|
description: string;
|
|
151
154
|
args: import("..").ArgDefinition[];
|
|
152
|
-
computeArray: (text: Maybe<FunctionResultObject>, delimiter: Maybe<FunctionResultObject>, splitByEach?: Maybe<FunctionResultObject>, removeEmptyText?: Maybe<FunctionResultObject>) => EvaluationError | import("..").Matrix<{
|
|
155
|
+
computeArray: (this: import("..").EvalContext, text: Maybe<FunctionResultObject>, delimiter: Maybe<FunctionResultObject>, splitByEach?: Maybe<FunctionResultObject>, removeEmptyText?: Maybe<FunctionResultObject>) => EvaluationError | import("..").Matrix<{
|
|
153
156
|
value: string;
|
|
154
157
|
}>;
|
|
155
158
|
isExported: false;
|
|
@@ -165,7 +168,7 @@ export declare const SUBSTITUTE: {
|
|
|
165
168
|
export declare const TEXTJOIN: {
|
|
166
169
|
description: string;
|
|
167
170
|
args: import("..").ArgDefinition[];
|
|
168
|
-
compute: (delimiter: Maybe<FunctionResultObject>, ignoreEmpty?: Maybe<FunctionResultObject>, ...textsOrArrays: Arg[]) => {
|
|
171
|
+
compute: (this: import("..").EvalContext, delimiter: Maybe<FunctionResultObject>, ignoreEmpty?: Maybe<FunctionResultObject>, ...textsOrArrays: Arg[]) => {
|
|
169
172
|
value: string;
|
|
170
173
|
};
|
|
171
174
|
isExported: true;
|
|
@@ -179,7 +182,7 @@ export declare const TEXTSPLIT: {
|
|
|
179
182
|
export declare const TRIM: {
|
|
180
183
|
description: string;
|
|
181
184
|
args: import("..").ArgDefinition[];
|
|
182
|
-
compute: (text: Maybe<FunctionResultObject>) => {
|
|
185
|
+
compute: (this: import("..").EvalContext, text: Maybe<FunctionResultObject>) => {
|
|
183
186
|
value: string;
|
|
184
187
|
};
|
|
185
188
|
isExported: true;
|
|
@@ -187,7 +190,7 @@ export declare const TRIM: {
|
|
|
187
190
|
export declare const UPPER: {
|
|
188
191
|
description: string;
|
|
189
192
|
args: import("..").ArgDefinition[];
|
|
190
|
-
compute: (text: Maybe<FunctionResultObject>) => {
|
|
193
|
+
compute: (this: import("..").EvalContext, text: Maybe<FunctionResultObject>) => {
|
|
191
194
|
value: string;
|
|
192
195
|
};
|
|
193
196
|
isExported: true;
|
|
@@ -2,7 +2,7 @@ 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: (this: import("..").EvalContext, url: Maybe<FunctionResultObject>, linkLabel: Maybe<FunctionResultObject>) => {
|
|
6
6
|
value: string;
|
|
7
7
|
};
|
|
8
8
|
isExported: true;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { AnchorOffset, CarouselItem } from "../types/figure";
|
|
1
|
+
import { AnchorOffset, Carousel, CarouselItem } from "../types/figure";
|
|
2
2
|
import { Getters } from "../types/getters";
|
|
3
3
|
import { UID } from "../types/misc";
|
|
4
|
+
import { Rect } from "../types/rendering";
|
|
4
5
|
import { SpreadsheetChildEnv } from "../types/spreadsheet_env";
|
|
5
6
|
/**
|
|
6
7
|
* Compute the anchor of a chart popped out of a carousel: slightly offset from the
|
|
@@ -9,3 +10,9 @@ import { SpreadsheetChildEnv } from "../types/spreadsheet_env";
|
|
|
9
10
|
export declare function getPoppedOutChartAnchor(env: SpreadsheetChildEnv, sheetId: UID, carouselId: UID): AnchorOffset;
|
|
10
11
|
export declare function getCarouselItemPreview(getters: Getters, item: CarouselItem): string;
|
|
11
12
|
export declare function getCarouselItemTitle(getters: Getters, item: CarouselItem): string;
|
|
13
|
+
export declare function getCarouselLayout(figureRect: Rect, carousel: Carousel, selectedItem: CarouselItem | undefined): {
|
|
14
|
+
headerRect: Rect;
|
|
15
|
+
separatorRect: Rect | undefined;
|
|
16
|
+
contentRect: Rect;
|
|
17
|
+
headerLineHeight: 1.5;
|
|
18
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CompiledFormula } from "../../formulas/compiler";
|
|
2
2
|
import { Cell, CellValue, EvaluatedCell, FormulaCell, LiteralCell } from "../../types/cells";
|
|
3
|
-
import { CoreGetters } from "../../types/core_getters";
|
|
4
3
|
import { Format, LocaleFormat } from "../../types/format";
|
|
4
|
+
import { CoreGetters } from "../../types/getters";
|
|
5
5
|
import { Locale } from "../../types/locale";
|
|
6
6
|
import { CellPosition, FunctionResultObject, Style, UID } from "../../types/misc";
|
|
7
7
|
export declare function evaluateLiteral(literalCell: LiteralCell, localeFormat: LocaleFormat, position?: CellPosition): EvaluatedCell;
|
|
@@ -94,7 +94,7 @@ export declare const DARK_MODE_FILTER_STRING: string;
|
|
|
94
94
|
* stored in the theme so that, after the dark-mode CSS filter is applied, the
|
|
95
95
|
* desired color is actually shown.
|
|
96
96
|
*
|
|
97
|
-
* This function computes
|
|
97
|
+
* This function computes an approximate inverse of the DARK_MODE_FILTER chain.
|
|
98
98
|
*/
|
|
99
99
|
export declare function adaptForDarkMode(displayedColor: Color): Color;
|
|
100
100
|
export declare function darkenColor(color: Color, percentage: number): Color;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { EvaluatedCell } from "../types/cells";
|
|
2
|
+
import { Getters } from "../types/getters";
|
|
3
|
+
import { CellPosition, UID, Zone } from "../types/misc";
|
|
4
|
+
export type ExtendedColumnType = "error" | "number" | "percentage" | "date" | "categorical" | "label" | "boolean" | "empty";
|
|
5
|
+
export interface ColumnAnalysis {
|
|
6
|
+
zone: Zone;
|
|
7
|
+
type: ExtendedColumnType;
|
|
8
|
+
title?: string;
|
|
9
|
+
headerInZone: boolean;
|
|
10
|
+
rowCount: number;
|
|
11
|
+
uniqueCount: number;
|
|
12
|
+
uniqueRatio: number;
|
|
13
|
+
maxValue?: number;
|
|
14
|
+
nonEmpty: EvaluatedCell[];
|
|
15
|
+
}
|
|
16
|
+
export declare function analyzeColumns(zones: Zone[], getters: Getters): ColumnAnalysis[];
|
|
17
|
+
export declare function getColumnTableHeaderPosition(sheetId: UID, zone: Zone, getters: Getters): CellPosition | undefined;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CompiledFormula } from "../../formulas/compiler";
|
|
2
2
|
import { ChartCreationContext, ChartData, ChartDefinition } from "../../types/chart/chart";
|
|
3
|
-
import { CoreGetters } from "../../types/
|
|
4
|
-
import { Getters } from "../../types/getters";
|
|
3
|
+
import { CoreGetters, EvaluationGetters } from "../../types/getters";
|
|
5
4
|
import { RangeAdapterFunctions, UID } from "../../types/misc";
|
|
6
5
|
import { Range } from "../../types/range";
|
|
6
|
+
import { ColorThemeName } from "../../types/rendering";
|
|
7
7
|
import { Validator } from "../../types/validator";
|
|
8
8
|
export declare class SpreadsheetChart {
|
|
9
9
|
private readonly getters;
|
|
@@ -16,16 +16,17 @@ export declare class SpreadsheetChart {
|
|
|
16
16
|
static fromStrDefinition(getters: CoreGetters, sheetId: UID, definition: ChartDefinition<string>): SpreadsheetChart;
|
|
17
17
|
static fromDefinition(getters: CoreGetters, sheetId: UID, definition: ChartDefinition<Range>): SpreadsheetChart;
|
|
18
18
|
static validate(validator: Validator, definition: ChartDefinition<string>): import("../..").CommandResult | import("../..").CommandResult[];
|
|
19
|
-
static transformDefinition(chartSheetId: UID, definition: ChartDefinition<string>, rangeAdapters: RangeAdapterFunctions): import("../../types/chart/line_chart").LineChartDefinition<string> | import("../../types/chart/pie_chart").PieChartDefinition<string> | import("../../types/chart/bar_chart").BarChartDefinition<string> | import("../../types/chart/scatter_chart").ScatterChartDefinition<string> | import("../../types/chart/combo_chart").ComboChartDefinition<string> | import("../../types/chart/waterfall_chart").WaterfallChartDefinition<string> | import("../../types/chart/pyramid_chart").PyramidChartDefinition<string> | import("../../types/chart/radar_chart").RadarChartDefinition<string> | import("../../types/chart/geo_chart").GeoChartDefinition<string> | import("../../types/chart/funnel_chart").FunnelChartDefinition<string> | import("../../types/chart/sunburst_chart").SunburstChartDefinition<string> | import("../../types/chart/tree_map_chart").TreeMapChartDefinition<string> | import("../../types/chart/calendar_chart").CalendarChartDefinition<string> | import("../../types/chart/
|
|
19
|
+
static transformDefinition(chartSheetId: UID, definition: ChartDefinition<string>, rangeAdapters: RangeAdapterFunctions): import("../../types/chart/scorecard_chart").ScorecardChartDefinition | import("../../types/chart/line_chart").LineChartDefinition<string> | import("../../types/chart/pie_chart").PieChartDefinition<string> | import("../../types/chart/bar_chart").BarChartDefinition<string> | import("../../types/chart/scatter_chart").ScatterChartDefinition<string> | import("../../types/chart/combo_chart").ComboChartDefinition<string> | import("../../types/chart/waterfall_chart").WaterfallChartDefinition<string> | import("../../types/chart/pyramid_chart").PyramidChartDefinition<string> | import("../../types/chart/radar_chart").RadarChartDefinition<string> | import("../../types/chart/geo_chart").GeoChartDefinition<string> | import("../../types/chart/funnel_chart").FunnelChartDefinition<string> | import("../../types/chart/sunburst_chart").SunburstChartDefinition<string> | import("../../types/chart/tree_map_chart").TreeMapChartDefinition<string> | import("../../types/chart/calendar_chart").CalendarChartDefinition<string> | import("../../types/chart/gauge_chart").GaugeChartDefinition<string> | import("../../types/chart/bubble_chart").BubbleChartDefinition<string>;
|
|
20
20
|
getRangeDefinition(): ChartDefinition<Range>;
|
|
21
21
|
getDefinition(): ChartDefinition<string>;
|
|
22
22
|
updateRanges(rangeAdapters: RangeAdapterFunctions): ChartDefinition<Range>;
|
|
23
23
|
duplicateInDuplicatedSheet(sheetIdFrom: UID, sheetIdTo: UID): ChartDefinition<string>;
|
|
24
24
|
copyInSheetId(sheetIdTo: UID): ChartDefinition<Range>;
|
|
25
25
|
getContextCreation(): ChartCreationContext;
|
|
26
|
-
getDefinitionForExcel(getters:
|
|
27
|
-
getData(getters:
|
|
26
|
+
getDefinitionForExcel(getters: EvaluationGetters): import("../..").ExcelChartDefinition | undefined;
|
|
27
|
+
getData(getters: EvaluationGetters, chartId: UID): ChartData;
|
|
28
28
|
getFormulas(getters: CoreGetters): CompiledFormula[];
|
|
29
|
-
getRuntime(getters:
|
|
29
|
+
getRuntime(getters: EvaluationGetters, chartId: UID, colorThemeName: ColorThemeName): import("../..").ChartRuntime;
|
|
30
30
|
static deleteInvalidKeys(definition: ChartDefinition<any>): ChartDefinition<any>;
|
|
31
|
+
loadDataForExport(getters: EvaluationGetters): Promise<void | undefined>;
|
|
31
32
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ChartAxisFormats, ChartDefinition, ChartRangeDataSource, DataSet, DataSetStyle, DatasetValues, ExcelChartDataset } from "../../../types/chart/chart";
|
|
2
2
|
import { CommandResult } from "../../../types/commands";
|
|
3
|
-
import { CoreGetters } from "../../../types/core_getters";
|
|
4
3
|
import { LocaleFormat } from "../../../types/format";
|
|
5
|
-
import {
|
|
4
|
+
import { CoreGetters } from "../../../types/getters";
|
|
6
5
|
import { Locale } from "../../../types/locale";
|
|
7
6
|
import { Color, RangeAdapterFunctions, UID } from "../../../types/misc";
|
|
8
7
|
import { Range } from "../../../types/range";
|
|
8
|
+
import { ColorThemeName } from "../../../types/rendering";
|
|
9
9
|
import { ColorGenerator } from "../../color";
|
|
10
10
|
export declare const TREND_LINE_XAXIS_ID = "x1";
|
|
11
11
|
export declare const MOVING_AVERAGE_TREND_LINE_XAXIS_ID = "xMovingAverage";
|
|
@@ -61,4 +61,4 @@ export declare function truncateLabel(label: string | undefined, maxLen?: number
|
|
|
61
61
|
export declare function isTrendLineAxis(axisID: string): axisID is "x1" | "xMovingAverage";
|
|
62
62
|
export declare function getChartBackgroundColor({ background }: {
|
|
63
63
|
background?: Color;
|
|
64
|
-
},
|
|
64
|
+
}, colorThemeName: ColorThemeName): Color;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChartRangeDataSource } from "../../../types/chart/chart";
|
|
2
|
+
import { Getters } from "../../../types/getters";
|
|
3
|
+
import { Zone } from "../../../types/misc";
|
|
4
|
+
export declare function getUnboundRange(getters: Getters, zone: Zone): string;
|
|
5
|
+
export declare function isDatasetTitled(getters: Getters, zone: Zone): boolean;
|
|
6
|
+
export declare function dataset(zone: Zone, getters: Getters, id?: string): {
|
|
7
|
+
dataRange: string;
|
|
8
|
+
dataSetId: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function rangeSource(dataSets: ReturnType<typeof dataset>[], dataSetsHaveTitle: boolean, labelRange?: string): ChartRangeDataSource<string>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ChartDataSourceBuilder } from "../../../registries/chart_data_source_registry";
|
|
2
2
|
import { ChartData, ChartRangeDataSource, DataSet } from "../../../types/chart/chart";
|
|
3
|
-
import {
|
|
3
|
+
import { EvaluationGetters } from "../../../types/getters";
|
|
4
4
|
import { FunctionResultObject } from "../../../types/misc";
|
|
5
5
|
import { Range } from "../../../types/range";
|
|
6
6
|
export declare const ChartRangeDataSourceHandler: ChartDataSourceBuilder<ChartRangeDataSource<string>, ChartRangeDataSource<Range>>;
|
|
7
|
-
export declare function getChartData(getters:
|
|
7
|
+
export declare function getChartData(getters: EvaluationGetters, dataSource: ChartRangeDataSource): ChartData;
|
|
8
8
|
/**
|
|
9
9
|
* Get the data from a dataSet
|
|
10
10
|
*/
|
|
11
|
-
export declare function getData(getters:
|
|
11
|
+
export declare function getData(getters: EvaluationGetters, ds: DataSet): FunctionResultObject[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ChartDefinition } from "../../../types/chart/chart";
|
|
2
|
+
import { Getters } from "../../../types/getters";
|
|
3
|
+
import { Zone } from "../../../types/misc";
|
|
4
|
+
export interface ChartSuggestion {
|
|
5
|
+
description: string;
|
|
6
|
+
definition: ChartDefinition;
|
|
7
|
+
}
|
|
8
|
+
export declare function getChartSuggestions(zones: Zone[], getters: Getters): ChartSuggestion[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { ChartConfiguration } from "chart.js";
|
|
1
2
|
import { ChartRuntime, ChartType } from "../../../types/chart/chart";
|
|
2
3
|
import { Figure } from "../../../types/figure";
|
|
3
|
-
import { DOMDimension } from "../../../types/rendering";
|
|
4
|
+
import { ColorThemeName, DOMDimension } from "../../../types/rendering";
|
|
4
5
|
export declare const CHART_COMMON_OPTIONS: {
|
|
5
6
|
responsive: true;
|
|
6
7
|
maintainAspectRatio: false;
|
|
@@ -15,11 +16,17 @@ export declare const CHART_COMMON_OPTIONS: {
|
|
|
15
16
|
animation: false;
|
|
16
17
|
events: ("click" | "mousemove" | "mouseout" | "mouseup" | "touchmove" | "touchstart")[];
|
|
17
18
|
};
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Sample down a Chart.js configuration's data points to at most `maxPoints`, evenly spaced.
|
|
21
|
+
* Used for lightweight previews (drag preview, chart suggestions) where rendering every point
|
|
22
|
+
* of a large dataset would make Chart.js slow without any visible benefit on a small canvas.
|
|
23
|
+
*/
|
|
24
|
+
export declare function limitChartConfigDataPoints(config: ChartConfiguration<any>, maxPoints?: number): ChartConfiguration<any>;
|
|
25
|
+
export declare function chartToImageUrl(runtime: ChartRuntime, figure: Figure, type: ChartType, colorThemeName?: ColorThemeName): Promise<string | undefined>;
|
|
26
|
+
export declare function chartToImageFile(runtime: ChartRuntime, figure: Figure, type: ChartType, colorThemeName?: ColorThemeName): Promise<Blob | null>;
|
|
20
27
|
/**
|
|
21
28
|
* Draw the given chart on the canvas.
|
|
22
29
|
*
|
|
23
30
|
* @returns a cleanup function to be called after the drawing is no longer needed (to free Chart.js resources)
|
|
24
31
|
*/
|
|
25
|
-
export declare function drawChartOnCanvas(canvas: HTMLCanvasElement | OffscreenCanvas, runtime: ChartRuntime, size: DOMDimension, type: ChartType): () => void;
|
|
32
|
+
export declare function drawChartOnCanvas(canvas: HTMLCanvasElement | OffscreenCanvas, runtime: ChartRuntime, size: DOMDimension, type: ChartType, zoom?: number): () => void;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { CategoricalDateNumberContext, CategoricalTwoNumbersContext, CategoricalVsMultipleNumbersContext, CategoricalVsNumberContext, CategoricalVsPercentageContext, DateVsMultipleNumbersContext, DateVsSeriesContext, LabelVsMultipleNumbersContext, LabelVsNumberContext, ManyNumbersContext, MultipleCategoricalsVsNumberContext, NumberVsNumberContext, SingleCategoricalContext, SingleDateContext, SingleLabelContext, SingleNumberContext, SinglePercentageContext, Suggestion } from "../../../types/chart/chart_suggestion";
|
|
2
|
+
import { GaugeChartDefinition } from "../../../types/chart/gauge_chart";
|
|
3
|
+
export declare function gaugeChart(titleText: string, dataRange: string, rangeMin: string, rangeMax: string): GaugeChartDefinition<string>;
|
|
4
|
+
/** Pattern A — Single numeric column */
|
|
5
|
+
export declare const SINGLE_NUMBER_COLUMN_SUGGESTIONS: Suggestion<SingleNumberContext>[];
|
|
6
|
+
/** Pattern B — Single percentage column */
|
|
7
|
+
export declare const SINGLE_PERCENTAGE_COLUMN_SUGGESTIONS: Suggestion<SinglePercentageContext>[];
|
|
8
|
+
/** Pattern C — Single date column */
|
|
9
|
+
export declare const SINGLE_DATE_COLUMN_SUGGESTIONS: Suggestion<SingleDateContext>[];
|
|
10
|
+
/** Pattern D — Single categorical column */
|
|
11
|
+
export declare const SINGLE_CATEGORICAL_COLUMN_SUGGESTIONS: Suggestion<SingleCategoricalContext>[];
|
|
12
|
+
/** Pattern E — Single label column */
|
|
13
|
+
export declare const SINGLE_LABEL_COLUMN_SUGGESTIONS: Suggestion<SingleLabelContext>[];
|
|
14
|
+
/** Pattern F — Categorical + Number */
|
|
15
|
+
export declare const CATEGORICAL_VS_NUMBER_SUGGESTIONS: Suggestion<CategoricalVsNumberContext>[];
|
|
16
|
+
/** Patterns G & J — Date + Number or Date + Percentage */
|
|
17
|
+
export declare const DATE_VS_SERIES_SUGGESTIONS: Suggestion<DateVsSeriesContext>[];
|
|
18
|
+
/** Pattern H — Number + Number */
|
|
19
|
+
export declare const NUMBER_VS_NUMBER_SUGGESTIONS: Suggestion<NumberVsNumberContext>[];
|
|
20
|
+
/** Pattern I — Categorical + Percentage */
|
|
21
|
+
export declare const CATEGORICAL_VS_PERCENTAGE_SUGGESTIONS: Suggestion<CategoricalVsPercentageContext>[];
|
|
22
|
+
/** Pattern K — Label + Number */
|
|
23
|
+
export declare const LABEL_VS_NUMBER_SUGGESTIONS: Suggestion<LabelVsNumberContext>[];
|
|
24
|
+
/** Pattern M — Categorical + Multiple Numbers */
|
|
25
|
+
export declare const CATEGORICAL_VS_MULTIPLE_NUMBERS_SUGGESTIONS: Suggestion<CategoricalVsMultipleNumbersContext>[];
|
|
26
|
+
/** Pattern N — Date + Multiple Numbers */
|
|
27
|
+
export declare const DATE_VS_MULTIPLE_NUMBERS_SUGGESTIONS: Suggestion<DateVsMultipleNumbersContext>[];
|
|
28
|
+
/** Pattern O — Categorical + Categorical + Number */
|
|
29
|
+
export declare const MULTIPLE_CATEGORICALS_VS_NUMBER_SUGGESTIONS: Suggestion<MultipleCategoricalsVsNumberContext>[];
|
|
30
|
+
/** Pattern P — Categorical + Date + Number */
|
|
31
|
+
export declare const CATEGORICAL_DATE_NUMBER_SUGGESTIONS: Suggestion<CategoricalDateNumberContext>[];
|
|
32
|
+
/** Pattern Q — Label + Multiple Numbers */
|
|
33
|
+
export declare const LABEL_VS_MULTIPLE_NUMBERS_SUGGESTIONS: Suggestion<LabelVsMultipleNumbersContext>[];
|
|
34
|
+
/** Pattern R — Categorical + Two Numbers (Population Pyramid or Grouped) */
|
|
35
|
+
export declare const CATEGORICAL_TWO_NUMBERS_SUGGESTIONS: Suggestion<CategoricalTwoNumbersContext>[];
|
|
36
|
+
/** Pattern S — Many Numbers (3+ numeric columns, no categorical/date) */
|
|
37
|
+
export declare const MANY_NUMBERS_SUGGESTIONS: Suggestion<ManyNumbersContext>[];
|
|
@@ -40,6 +40,10 @@ interface InflectionValue {
|
|
|
40
40
|
color: Color;
|
|
41
41
|
offset: number;
|
|
42
42
|
}
|
|
43
|
-
export declare function drawGaugeChart(canvas: CanvasSurface, runtime: GaugeAnimatedRuntime, zoom?: number, dimensions?: DOMDimension
|
|
44
|
-
|
|
43
|
+
export declare function drawGaugeChart(canvas: CanvasSurface, runtime: GaugeAnimatedRuntime, zoom?: number, dimensions?: DOMDimension, options?: {
|
|
44
|
+
labelFontSize?: number;
|
|
45
|
+
}): void;
|
|
46
|
+
export declare function getGaugeRenderingConfig(boundingRect: Rect, runtime: GaugeAnimatedRuntime, ctx: CanvasRenderingContext2D, options?: {
|
|
47
|
+
labelFontSize?: number;
|
|
48
|
+
}): RenderingParams;
|
|
45
49
|
export {};
|
|
@@ -12,24 +12,25 @@ import { RadarChartDefinition } from "../../../../types/chart/radar_chart";
|
|
|
12
12
|
import { SunburstChartDefinition } from "../../../../types/chart/sunburst_chart";
|
|
13
13
|
import { TreeMapChartDefinition } from "../../../../types/chart/tree_map_chart";
|
|
14
14
|
import { Format } from "../../../../types/format";
|
|
15
|
-
import {
|
|
15
|
+
import { EvaluationGetters } from "../../../../types/getters";
|
|
16
16
|
import { Locale } from "../../../../types/locale";
|
|
17
17
|
import { FunctionResultObject } from "../../../../types/misc";
|
|
18
18
|
import { Range } from "../../../../types/range";
|
|
19
|
+
import { ColorThemeName } from "../../../../types/rendering";
|
|
19
20
|
import { BubbleChartData } from "../bubble_chart";
|
|
20
|
-
export declare function getBarChartData(definition: GenericDefinition<BarChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters:
|
|
21
|
-
export declare function getCalendarChartData(definition: GenericDefinition<CalendarChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters:
|
|
22
|
-
export declare function getPyramidChartData(definition: PyramidChartDefinition, { labelValues, dataSetsValues }: ChartData, getters:
|
|
23
|
-
export declare function getLineChartData(definition: GenericDefinition<LineChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters:
|
|
24
|
-
export declare function getPieChartData(definition: GenericDefinition<PieChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters:
|
|
25
|
-
export declare function getRadarChartData(definition: GenericDefinition<RadarChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters:
|
|
26
|
-
export declare function getGeoChartData(definition: GeoChartDefinition, { labelValues, dataSetsValues }: ChartData, getters:
|
|
27
|
-
export declare function getFunnelChartData(definition: GenericDefinition<FunnelChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters:
|
|
28
|
-
export declare function getHierarchalChartData(definition: SunburstChartDefinition | TreeMapChartDefinition, { labelValues, dataSetsValues }: ChartData, getters:
|
|
29
|
-
export declare function getBubbleChartData(definition: BubbleChartDefinition<Range>, getters:
|
|
21
|
+
export declare function getBarChartData(definition: GenericDefinition<BarChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters: EvaluationGetters, colorThemeName: ColorThemeName): ChartRuntimeGenerationArgs;
|
|
22
|
+
export declare function getCalendarChartData(definition: GenericDefinition<CalendarChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters: EvaluationGetters, colorThemeName: ColorThemeName): ChartRuntimeGenerationArgs;
|
|
23
|
+
export declare function getPyramidChartData(definition: PyramidChartDefinition, { labelValues, dataSetsValues }: ChartData, getters: EvaluationGetters, colorThemeName: ColorThemeName): ChartRuntimeGenerationArgs;
|
|
24
|
+
export declare function getLineChartData(definition: GenericDefinition<LineChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters: EvaluationGetters, colorThemeName: ColorThemeName): ChartRuntimeGenerationArgs;
|
|
25
|
+
export declare function getPieChartData(definition: GenericDefinition<PieChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters: EvaluationGetters, colorThemeName: ColorThemeName): ChartRuntimeGenerationArgs;
|
|
26
|
+
export declare function getRadarChartData(definition: GenericDefinition<RadarChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters: EvaluationGetters, colorThemeName: ColorThemeName): ChartRuntimeGenerationArgs;
|
|
27
|
+
export declare function getGeoChartData(definition: GeoChartDefinition, { labelValues, dataSetsValues }: ChartData, getters: EvaluationGetters, colorThemeName: ColorThemeName): GeoChartRuntimeGenerationArgs;
|
|
28
|
+
export declare function getFunnelChartData(definition: GenericDefinition<FunnelChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters: EvaluationGetters, colorThemeName: ColorThemeName): ChartRuntimeGenerationArgs;
|
|
29
|
+
export declare function getHierarchalChartData(definition: SunburstChartDefinition | TreeMapChartDefinition, { labelValues, dataSetsValues }: ChartData, getters: EvaluationGetters, colorThemeName: ColorThemeName): ChartRuntimeGenerationArgs;
|
|
30
|
+
export declare function getBubbleChartData(definition: BubbleChartDefinition<Range>, getters: EvaluationGetters, colorThemeName: ColorThemeName): BubbleChartData;
|
|
30
31
|
export declare function getTrendDatasetForBarChart(config: TrendConfiguration, data: FunctionResultObject[]): Point[] | undefined;
|
|
31
32
|
export declare function getTrendDatasetForLineChart(config: TrendConfiguration, data: FunctionResultObject[], labels: string[], axisType: AxisType, locale: Locale): Point[] | undefined;
|
|
32
33
|
export declare function canChartParseLabels(chartData: ChartData): boolean;
|
|
33
34
|
export declare function getChartLabelFormat(labelValues: LabelValues): Format | undefined;
|
|
34
35
|
export declare function makeDatasetsCumulative(datasets: DatasetValues[], order: "asc" | "desc"): DatasetValues[];
|
|
35
|
-
export declare function getTopPaddingForDashboard(definition: GenericDefinition<PieChartDefinition | LineChartDefinition | BarChartDefinition>, getters:
|
|
36
|
+
export declare function getTopPaddingForDashboard(definition: GenericDefinition<PieChartDefinition | LineChartDefinition | BarChartDefinition>, getters: EvaluationGetters): 0 | 30;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { TitleOptions } from "chart.js";
|
|
2
2
|
import { TitleDesign } from "../../../..";
|
|
3
|
-
import {
|
|
3
|
+
import { EvaluationGetters } from "../../../../types/getters";
|
|
4
4
|
import { DeepPartial } from "../../../../types/misc";
|
|
5
5
|
export declare function getChartTitle({ title, legendPosition, background, }: {
|
|
6
6
|
title: TitleDesign;
|
|
7
7
|
legendPosition: string;
|
|
8
8
|
background?: string;
|
|
9
|
-
}, getters:
|
|
9
|
+
}, getters: EvaluationGetters): DeepPartial<TitleOptions>;
|
|
@@ -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 {
|
|
@@ -6,3 +6,7 @@ export declare function rectIntersection(rect1: Rect, rect2: Rect): Rect | undef
|
|
|
6
6
|
/** Compute the union of the rectangles, ie. the smallest rectangle that contain them all */
|
|
7
7
|
export declare function rectUnion(...rects: Rect[]): Rect;
|
|
8
8
|
export declare function isPointInsideRect(x: number, y: number, rect: Rect): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Return a Rect with position and size on the zoomed canvas
|
|
11
|
+
*/
|
|
12
|
+
export declare function getZoomedRect(zoom: number, rect: Rect): Rect;
|
|
@@ -24,7 +24,7 @@ export declare function computeCachedTextDimension(context: Canvas2DContext, tex
|
|
|
24
24
|
height: number;
|
|
25
25
|
};
|
|
26
26
|
export declare function fontSizeInPixels(fontSize: number): number;
|
|
27
|
-
export declare function computeTextFont(style: Style, fontUnit?: "px" | "pt"): string;
|
|
27
|
+
export declare function computeTextFont(style: Style, fontUnit?: "px" | "pt", fontWeight?: number): string;
|
|
28
28
|
export declare function computeTextFontSizeInPixels(style?: Style): number;
|
|
29
29
|
/**
|
|
30
30
|
* Return the given text, split in multiple lines if needed. The text will be split in multiple
|
|
@@ -19,7 +19,7 @@ interface ViewportCollectionArgs {
|
|
|
19
19
|
paneDivision: Record<UID, PaneDivision>;
|
|
20
20
|
sheetViewWidth: Pixel;
|
|
21
21
|
sheetViewHeight: Pixel;
|
|
22
|
-
|
|
22
|
+
getZoomLevel: () => number;
|
|
23
23
|
getFooterSize: () => number;
|
|
24
24
|
zoneToDisplay?: Zone;
|
|
25
25
|
}
|
|
@@ -66,7 +66,7 @@ export declare class ViewportCollection {
|
|
|
66
66
|
private paneDivision;
|
|
67
67
|
private sheetViewWidth;
|
|
68
68
|
private sheetViewHeight;
|
|
69
|
-
|
|
69
|
+
getZoomLevel: () => number;
|
|
70
70
|
private getFooterSize;
|
|
71
71
|
private zoneToDisplay?;
|
|
72
72
|
constructor(args: ViewportCollectionArgs);
|
|
@@ -111,7 +111,6 @@ export declare class ViewportCollection {
|
|
|
111
111
|
*/
|
|
112
112
|
isVisibleInViewport({ sheetId, col, row }: CellPosition): boolean;
|
|
113
113
|
isZoneVisibleInViewport(sheetId: UID, zone: Zone): boolean;
|
|
114
|
-
getScrollBarWidth(): Pixel;
|
|
115
114
|
getEdgeScrollCol(sheetId: UID, x: number, previousX: number, startingX: number): EdgeScrollInfo;
|
|
116
115
|
getEdgeScrollRow(sheetId: UID, y: number, previousY: number, startingY: number): EdgeScrollInfo;
|
|
117
116
|
/**
|
|
@@ -156,7 +155,6 @@ export declare class ViewportCollection {
|
|
|
156
155
|
zone: Zone;
|
|
157
156
|
rect: Rect;
|
|
158
157
|
}[];
|
|
159
|
-
getViewportZoomLevel(): number;
|
|
160
158
|
ensureMainViewportExist(sheetId: UID): void;
|
|
161
159
|
getPanesDimensions(sheetId: UID): {
|
|
162
160
|
paneWidth: number;
|
|
@@ -222,8 +220,6 @@ export declare class ViewportCollection {
|
|
|
222
220
|
private mapViewportsToRect;
|
|
223
221
|
getGridOffsetX(): Pixel;
|
|
224
222
|
getGridOffsetY(): Pixel;
|
|
225
|
-
getZoomLevel(): number;
|
|
226
|
-
setZoomLevel(zoomLevel: number): void;
|
|
227
223
|
private getPaneDivisions;
|
|
228
224
|
setPaneDivision(sheetId: UID, paneDivision: PaneDivision): void;
|
|
229
225
|
}
|