@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,36 +1,116 @@
|
|
|
1
|
+
import { BordersPlugin } from "../plugins/core/borders";
|
|
2
|
+
import { CarouselPlugin } from "../plugins/core/carousel";
|
|
3
|
+
import { CellPlugin } from "../plugins/core/cell";
|
|
4
|
+
import { ChartPlugin } from "../plugins/core/chart";
|
|
5
|
+
import { ConditionalFormatPlugin } from "../plugins/core/conditional_format";
|
|
6
|
+
import { DataValidationPlugin } from "../plugins/core/data_validation";
|
|
7
|
+
import { DefaultPlugin } from "../plugins/core/default";
|
|
8
|
+
import { FigurePlugin } from "../plugins/core/figures";
|
|
9
|
+
import { FormulaProviderAggregator } from "../plugins/core/formulas_provider";
|
|
10
|
+
import { HeaderGroupingPlugin } from "../plugins/core/header_grouping";
|
|
11
|
+
import { HeaderSizePlugin } from "../plugins/core/header_size";
|
|
12
|
+
import { HeaderVisibilityPlugin } from "../plugins/core/header_visibility";
|
|
13
|
+
import { ImagePlugin } from "../plugins/core/image";
|
|
14
|
+
import { MergePlugin } from "../plugins/core/merge";
|
|
15
|
+
import { NamedRangesPlugin } from "../plugins/core/named_range";
|
|
16
|
+
import { PivotCorePlugin } from "../plugins/core/pivot";
|
|
17
|
+
import { RangeAdapterPlugin } from "../plugins/core/range";
|
|
18
|
+
import { SettingsPlugin } from "../plugins/core/settings";
|
|
19
|
+
import { SheetPlugin } from "../plugins/core/sheet";
|
|
1
20
|
import { TableStylePlugin } from "../plugins/core/table_style";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
21
|
+
import { TablePlugin } from "../plugins/core/tables";
|
|
22
|
+
import { CellComputedStylePlugin } from "../plugins/evaluation/cell_computed_style";
|
|
23
|
+
import { CellEvaluationPlugin } from "../plugins/evaluation/cell_evaluation/cell_evaluation_plugin";
|
|
24
|
+
import { CustomColorsPlugin } from "../plugins/evaluation/custom_colors";
|
|
25
|
+
import { DynamicTablesPlugin } from "../plugins/evaluation/dynamic_tables";
|
|
26
|
+
import { DynamicTranslate } from "../plugins/evaluation/dynamic_translate";
|
|
27
|
+
import { EvaluationChartPlugin } from "../plugins/evaluation/evaluation_chart";
|
|
28
|
+
import { EvaluationConditionalFormatPlugin } from "../plugins/evaluation/evaluation_conditional_format";
|
|
29
|
+
import { EvaluationDataValidationPlugin } from "../plugins/evaluation/evaluation_data_validation";
|
|
30
|
+
import { FilterEvaluationPlugin } from "../plugins/evaluation/filter_evaluation";
|
|
31
|
+
import { FingerprintPlugin } from "../plugins/evaluation/fingerprint";
|
|
32
|
+
import { FormulaTrackerPlugin } from "../plugins/evaluation/formula_tracker";
|
|
33
|
+
import { GeoLoaderEvaluation } from "../plugins/evaluation/geo_loader";
|
|
34
|
+
import { HeaderSizeUIPlugin } from "../plugins/evaluation/header_sizes_ui";
|
|
35
|
+
import { HeaderVisibilityEvaluationPlugin } from "../plugins/evaluation/header_visibility_evaluation";
|
|
36
|
+
import { PivotPresencePlugin } from "../plugins/evaluation/pivot_presence_plugin";
|
|
37
|
+
import { PivotUIPlugin } from "../plugins/evaluation/pivot_ui";
|
|
38
|
+
import { SubtotalEvaluationPlugin } from "../plugins/evaluation/subtotal_evaluation";
|
|
39
|
+
import { TableComputedStylePlugin } from "../plugins/evaluation/table_computed_style";
|
|
40
|
+
import { ChartUIPlugin } from "../plugins/ui_feature/chart_ui";
|
|
13
41
|
import { CollaborativePlugin } from "../plugins/ui_feature/collaborative";
|
|
14
42
|
import { ColorThemeUIPlugin } from "../plugins/ui_feature/color_theme";
|
|
15
|
-
import { DynamicTranslate } from "../plugins/ui_feature/dynamic_translate";
|
|
16
43
|
import { GeoFeaturePlugin } from "../plugins/ui_feature/geo_features";
|
|
17
44
|
import { HistoryPlugin } from "../plugins/ui_feature/local_history";
|
|
18
45
|
import { LockSheetPlugin } from "../plugins/ui_feature/lock_sheet";
|
|
19
|
-
import { PivotPresencePlugin } from "../plugins/ui_feature/pivot_presence_plugin";
|
|
20
46
|
import { SortPlugin } from "../plugins/ui_feature/sort";
|
|
21
|
-
import { SubtotalEvaluationPlugin } from "../plugins/ui_feature/subtotal_evaluation";
|
|
22
47
|
import { UIOptionsPlugin } from "../plugins/ui_feature/ui_options";
|
|
23
48
|
import { SheetUIPlugin } from "../plugins/ui_feature/ui_sheet";
|
|
24
49
|
import { CarouselUIPlugin } from "../plugins/ui_stateful/carousel_ui";
|
|
25
|
-
import {
|
|
26
|
-
import { ClipboardPlugin } from "../plugins/ui_stateful/clipboard";
|
|
50
|
+
import { CellIconPlugin } from "../plugins/ui_stateful/cell_icon_plugin";
|
|
27
51
|
import { FigureUIPlugin } from "../plugins/ui_stateful/figure";
|
|
28
|
-
import { FilterEvaluationPlugin } from "../plugins/ui_stateful/filter_evaluation";
|
|
29
52
|
import { HeaderPositionsUIPlugin } from "../plugins/ui_stateful/header_positions";
|
|
30
|
-
import { HeaderVisibilityUIPlugin } from "../plugins/ui_stateful/header_visibility_ui";
|
|
31
53
|
import { GridSelectionPlugin } from "../plugins/ui_stateful/selection";
|
|
32
|
-
|
|
33
|
-
|
|
54
|
+
/**
|
|
55
|
+
* Union of all getter names of a plugin.
|
|
56
|
+
*
|
|
57
|
+
* e.g. With the following plugin
|
|
58
|
+
* ```ts
|
|
59
|
+
* class MyPlugin {
|
|
60
|
+
* static getters = [
|
|
61
|
+
* "getCell",
|
|
62
|
+
* "getCellValue",
|
|
63
|
+
* ] as const;
|
|
64
|
+
* getCell() { ... }
|
|
65
|
+
* getCellValue() { ... }
|
|
66
|
+
* }
|
|
67
|
+
* ```
|
|
68
|
+
* `type Names = GetterNames<typeof MyPlugin>` is equivalent to
|
|
69
|
+
* `type Names = "getCell" | "getCellValue"`
|
|
70
|
+
*
|
|
71
|
+
* Some technical comments:
|
|
72
|
+
*
|
|
73
|
+
* - Since the getter names are in a static array, the type of the plugin must
|
|
74
|
+
* be given, not the class itself.
|
|
75
|
+
*
|
|
76
|
+
* - we need to index the getters array with every index:
|
|
77
|
+
* `Plugin["getters"][0] | Plugin["getters"][1] | Plugin["getters"][2] | ...`
|
|
78
|
+
* which is equivalent to `Plugin["getters"][0 | 1 | 2 | ...]`.
|
|
79
|
+
* This can be generalized because the union of all indices `0 | 1 | 2 | 3 | ...`
|
|
80
|
+
* is actually the type `number`.
|
|
81
|
+
*/
|
|
82
|
+
type GetterNames<Plugin extends {
|
|
83
|
+
getters: readonly string[];
|
|
84
|
+
}> = Plugin["getters"][number];
|
|
85
|
+
/**
|
|
86
|
+
* Extract getter methods from a plugin, based on its `getters` static array.
|
|
87
|
+
* @example
|
|
88
|
+
* class MyPlugin {
|
|
89
|
+
* static getters = [
|
|
90
|
+
* "getCell",
|
|
91
|
+
* "getCellValue",
|
|
92
|
+
* ] as const;
|
|
93
|
+
* getCell() { ... }
|
|
94
|
+
* getCellValue() { ... }
|
|
95
|
+
* }
|
|
96
|
+
* type MyPluginGetters = PluginGetters<typeof MyPlugin>;
|
|
97
|
+
* // MyPluginGetters is equivalent to:
|
|
98
|
+
* // {
|
|
99
|
+
* // getCell: () => ...,
|
|
100
|
+
* // getCellValue: () => ...,
|
|
101
|
+
* // }
|
|
102
|
+
*/
|
|
103
|
+
export type PluginGetters<Plugin extends {
|
|
104
|
+
new (...args: unknown[]): any;
|
|
105
|
+
getters: readonly string[];
|
|
106
|
+
}> = Pick<InstanceType<Plugin>, GetterNames<Plugin>>;
|
|
107
|
+
type RangeAdapterGetters = Pick<RangeAdapterPlugin, GetterNames<typeof RangeAdapterPlugin>>;
|
|
108
|
+
type FormulasGetters = Pick<FormulaProviderAggregator, GetterNames<typeof FormulaProviderAggregator>>;
|
|
109
|
+
export type CoreGetters = PluginGetters<typeof SheetPlugin> & PluginGetters<typeof HeaderSizePlugin> & PluginGetters<typeof HeaderVisibilityPlugin> & PluginGetters<typeof CellPlugin> & PluginGetters<typeof DefaultPlugin> & PluginGetters<typeof MergePlugin> & PluginGetters<typeof BordersPlugin> & PluginGetters<typeof ChartPlugin> & PluginGetters<typeof ImagePlugin> & PluginGetters<typeof CarouselPlugin> & PluginGetters<typeof FigurePlugin> & RangeAdapterGetters & FormulasGetters & PluginGetters<typeof ConditionalFormatPlugin> & PluginGetters<typeof TableStylePlugin> & PluginGetters<typeof TablePlugin> & PluginGetters<typeof SettingsPlugin> & PluginGetters<typeof HeaderGroupingPlugin> & PluginGetters<typeof DataValidationPlugin> & PluginGetters<typeof NamedRangesPlugin> & PluginGetters<typeof PivotCorePlugin>;
|
|
110
|
+
export type EvaluationGetters = {
|
|
111
|
+
isReadonly: () => boolean;
|
|
112
|
+
isDashboard: () => boolean;
|
|
113
|
+
} & CoreGetters & PluginGetters<typeof CellEvaluationPlugin> & PluginGetters<typeof EvaluationChartPlugin> & PluginGetters<typeof EvaluationConditionalFormatPlugin> & PluginGetters<typeof EvaluationDataValidationPlugin> & PluginGetters<typeof FilterEvaluationPlugin> & PluginGetters<typeof CustomColorsPlugin> & PluginGetters<typeof FingerprintPlugin> & PluginGetters<typeof HeaderSizeUIPlugin> & PluginGetters<typeof PivotUIPlugin> & PluginGetters<typeof DynamicTablesPlugin> & PluginGetters<typeof PivotPresencePlugin> & PluginGetters<typeof HeaderVisibilityEvaluationPlugin> & PluginGetters<typeof CellComputedStylePlugin> & PluginGetters<typeof SubtotalEvaluationPlugin> & PluginGetters<typeof TableComputedStylePlugin> & PluginGetters<typeof GeoLoaderEvaluation> & PluginGetters<typeof DynamicTranslate> & PluginGetters<typeof FormulaTrackerPlugin>;
|
|
34
114
|
/**
|
|
35
115
|
* The getters that can be used in the rendering-related stores and helpers. The SheetView and Selection getters should
|
|
36
116
|
* not be used in those, they should use the values in the GridRenderingContext instead.
|
|
@@ -38,7 +118,7 @@ import { CoreGetters, PluginGetters } from "./core_getters";
|
|
|
38
118
|
export type RenderingGetters = {
|
|
39
119
|
isReadonly: () => boolean;
|
|
40
120
|
isDashboard: () => boolean;
|
|
41
|
-
} & CoreGetters &
|
|
121
|
+
} & CoreGetters & EvaluationGetters & PluginGetters<typeof HistoryPlugin> & PluginGetters<typeof CollaborativePlugin> & PluginGetters<typeof SortPlugin> & PluginGetters<typeof UIOptionsPlugin> & PluginGetters<typeof SheetUIPlugin> & PluginGetters<typeof HeaderPositionsUIPlugin> & PluginGetters<typeof PivotUIPlugin> & PluginGetters<typeof CellIconPlugin> & PluginGetters<typeof GeoFeaturePlugin> & PluginGetters<typeof LockSheetPlugin> & PluginGetters<typeof CarouselUIPlugin> & PluginGetters<typeof ColorThemeUIPlugin> & PluginGetters<typeof ChartUIPlugin> & PluginGetters<typeof FigureUIPlugin>;
|
|
42
122
|
export type Getters = RenderingGetters & PluginGetters<typeof GridSelectionPlugin>;
|
|
43
123
|
export interface ViewportsGetters {
|
|
44
124
|
getColDimensions: Getters["getColDimensions"];
|
|
@@ -62,3 +142,4 @@ export interface ViewportsGetters {
|
|
|
62
142
|
getSheetZone: Getters["getSheetZone"];
|
|
63
143
|
getFigures: Getters["getFigures"];
|
|
64
144
|
}
|
|
145
|
+
export {};
|
|
@@ -2,10 +2,10 @@ import { GeoChartRegion } from "./chart/geo_chart";
|
|
|
2
2
|
import { Client, ClientPosition } from "./collaborative/session";
|
|
3
3
|
import { TransportService } from "./collaborative/transport_service";
|
|
4
4
|
import { Currency } from "./currency";
|
|
5
|
-
import { InformationNotification } from "./env";
|
|
6
5
|
import { FileStore } from "./files";
|
|
7
6
|
import { Locale } from "./locale";
|
|
8
7
|
import { Color } from "./misc";
|
|
8
|
+
import { ColorThemeName } from "./rendering";
|
|
9
9
|
export type Mode = "normal" | "readonly" | "dashboard" | "export_verification";
|
|
10
10
|
export interface ModelConfig {
|
|
11
11
|
readonly mode: Mode;
|
|
@@ -27,10 +27,8 @@ export interface ModelConfig {
|
|
|
27
27
|
readonly transportService: TransportService;
|
|
28
28
|
readonly client: Client;
|
|
29
29
|
readonly snapshotRequested: boolean;
|
|
30
|
-
readonly notifyUI: (payload: InformationNotification) => void;
|
|
31
|
-
readonly raiseBlockingErrorUI: (text: string) => void;
|
|
32
30
|
readonly customColors: Color[];
|
|
33
|
-
readonly colorScheme?:
|
|
31
|
+
readonly colorScheme?: ColorThemeName;
|
|
34
32
|
}
|
|
35
33
|
export interface ModelExternalConfig {
|
|
36
34
|
readonly fileStore?: FileStore;
|
|
@@ -86,9 +86,28 @@ export interface SheetDOMScrollInfo {
|
|
|
86
86
|
*/
|
|
87
87
|
scrollY: Pixel;
|
|
88
88
|
}
|
|
89
|
+
export type ColorThemeName = "light" | "dark";
|
|
89
90
|
export interface GridRenderingTheme {
|
|
90
|
-
|
|
91
|
+
colorThemeName: ColorThemeName;
|
|
92
|
+
/**
|
|
93
|
+
* Default background of a chart. Deliberately NOT the background of the grid: the grid canvas is
|
|
94
|
+
* transparent where no cell colour is drawn, and its background comes from the
|
|
95
|
+
* `--os-canvas-background-color` CSS variable so integrators can override it. Painting this on the
|
|
96
|
+
* grid would ignore that override, so no such field exists here.
|
|
97
|
+
*/
|
|
98
|
+
chartBackgroundColor: string;
|
|
99
|
+
/**
|
|
100
|
+
* Base colour of the grid lines. Blended with the sheet background at draw time so the lines pick
|
|
101
|
+
* up its tint while staying opaque — they are drawn opaque because adjacent boxes stroke their
|
|
102
|
+
* shared border twice, which a translucent stroke would darken.
|
|
103
|
+
*/
|
|
91
104
|
gridBorderColor: string;
|
|
105
|
+
/**
|
|
106
|
+
* Used instead when the sheet has no background: the canvas is transparent there and the colour
|
|
107
|
+
* behind it lives outside the dark mode filter, so there is nothing to blend against. This is
|
|
108
|
+
* `gridBorderColor` already blended with the default background.
|
|
109
|
+
*/
|
|
110
|
+
gridBorderColorOnDefaultBackground: string;
|
|
92
111
|
headerBackgroundColor: string;
|
|
93
112
|
headerActiveBackgroundColor: string;
|
|
94
113
|
headerSelectedBackgroundColor: string;
|
|
@@ -105,6 +124,7 @@ export type GridRenderingContext = {
|
|
|
105
124
|
thinLineWidth: number;
|
|
106
125
|
viewports: ViewportCollection;
|
|
107
126
|
hideGridLines?: boolean;
|
|
127
|
+
hideFrozenPaneBorder?: boolean;
|
|
108
128
|
} & SelectionState;
|
|
109
129
|
declare const LAYERS: {
|
|
110
130
|
readonly Background: 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odoo/o-spreadsheet",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "20.0.0",
|
|
4
4
|
"description": "A spreadsheet component",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/o_spreadsheet.cjs",
|
|
@@ -33,17 +33,19 @@
|
|
|
33
33
|
"bundle:xml:watch": "node tools/bundle_xml/watch_xml_templates.cjs",
|
|
34
34
|
"bundle:css": "node tools/bundle_css/main.cjs",
|
|
35
35
|
"bundle:css:watch": "node tools/bundle_css/watch_css_files.cjs",
|
|
36
|
+
"bundle:icons": "node tools/bundle_icons/main.cjs",
|
|
36
37
|
"serve-static": "live-server --host=127.0.0.1 --open=demo --watch=build/o_spreadsheet.iife.js,build/o_spreadsheet.xml,build/o_spreadsheet.css,demo",
|
|
37
38
|
"serve-static:wait": "wait-on build/o_spreadsheet.iife.js build/o_spreadsheet.xml build/o_spreadsheet.css && npm run serve-static",
|
|
38
39
|
"server": "node tools/server/main.cjs",
|
|
39
40
|
"dist": "tsc --module es6 --declaration --declarationDir dist/types && rolldown -c",
|
|
40
|
-
"postdist": " npm run bundle:xml -- --outDir dist && npm run bundle:css -- --out dist",
|
|
41
|
+
"postdist": " npm run bundle:xml -- --outDir dist && npm run bundle:css -- --out dist && npm run bundle:icons -- --outDir dist",
|
|
41
42
|
"test": "tsc --noEmit --project tests/tsconfig.json && jest",
|
|
42
43
|
"monkey": "SPREADSHEET_MONKEY_COUNT=$npm_config_monkey_count jest 'tests/collaborative/collaborative_monkey_party.test.ts'",
|
|
43
44
|
"model-in-node": "npm run dist && node tools/run_in_node.mjs",
|
|
44
45
|
"zipXlsx": "node tools/bundle_xlsx/zip_xlsx_demo.cjs",
|
|
45
46
|
"unzipXlsx": "node tools/bundle_xlsx/unzip_xlsx_demo.cjs",
|
|
46
|
-
"runbot": "npm run check-formatting && npm run model-in-node && npm run test --"
|
|
47
|
+
"runbot": "npm run check-formatting && npm run model-in-node && npm run test --",
|
|
48
|
+
"update-icons": "node tools/bundle_icons/update_icons.cjs"
|
|
47
49
|
},
|
|
48
50
|
"browserslist": [
|
|
49
51
|
"last 1 Chrome versions"
|
|
@@ -141,9 +143,8 @@
|
|
|
141
143
|
"xmlSelfClosingSpace": false
|
|
142
144
|
},
|
|
143
145
|
"dependencies": {
|
|
144
|
-
"@odoo/owl": "3.0.0-alpha.
|
|
146
|
+
"@odoo/owl": "3.0.0-alpha.49",
|
|
145
147
|
"bootstrap": "5.3.3",
|
|
146
|
-
"font-awesome": "^4.7.0",
|
|
147
148
|
"rbush": "^3.0.1"
|
|
148
149
|
},
|
|
149
150
|
"jest": {
|
|
@@ -184,6 +185,6 @@
|
|
|
184
185
|
]
|
|
185
186
|
},
|
|
186
187
|
"publishConfig": {
|
|
187
|
-
"tag": "
|
|
188
|
+
"tag": "latest"
|
|
188
189
|
}
|
|
189
190
|
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Session } from "../collaborative/session";
|
|
2
|
-
import { StateObserver } from "../state_observer";
|
|
3
|
-
import { Command } from "../types/commands";
|
|
4
|
-
import { Currency } from "../types/currency";
|
|
5
|
-
import { Getters } from "../types/getters";
|
|
6
|
-
import { Color } from "../types/misc";
|
|
7
|
-
import { ModelConfig } from "../types/model";
|
|
8
|
-
import { BasePlugin } from "./base_plugin";
|
|
9
|
-
export interface CoreViewPluginConfig {
|
|
10
|
-
readonly getters: Getters;
|
|
11
|
-
readonly stateObserver: StateObserver;
|
|
12
|
-
readonly custom: ModelConfig["custom"];
|
|
13
|
-
readonly session: Session;
|
|
14
|
-
readonly defaultCurrency?: Partial<Currency>;
|
|
15
|
-
readonly customColors: Color[];
|
|
16
|
-
readonly external: ModelConfig["external"];
|
|
17
|
-
}
|
|
18
|
-
export interface CoreViewPluginConstructor {
|
|
19
|
-
new (config: CoreViewPluginConfig): CoreViewPlugin;
|
|
20
|
-
getters: readonly string[];
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Core view plugins handle any data derived from core date (i.e. evaluation).
|
|
24
|
-
* They cannot impact the model data (i.e. cannot dispatch commands).
|
|
25
|
-
*/
|
|
26
|
-
export declare class CoreViewPlugin<State = any> extends BasePlugin<State, Command> {
|
|
27
|
-
protected getters: Getters;
|
|
28
|
-
constructor({ getters, stateObserver }: CoreViewPluginConfig);
|
|
29
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ChartRuntime } from "../../types/chart/chart";
|
|
2
|
-
import { CoreViewCommand } from "../../types/commands";
|
|
3
|
-
import { Color, UID } from "../../types/misc";
|
|
4
|
-
import { Range } from "../../types/range";
|
|
5
|
-
import { ExcelWorkbookData } from "../../types/workbook_data";
|
|
6
|
-
import { CoreViewPlugin } from "../core_view_plugin";
|
|
7
|
-
interface EvaluationChartStyle {
|
|
8
|
-
background: Color;
|
|
9
|
-
fontColor: Color;
|
|
10
|
-
}
|
|
11
|
-
interface EvaluationChartState {
|
|
12
|
-
charts: Record<UID, ChartRuntime | undefined>;
|
|
13
|
-
}
|
|
14
|
-
export declare class EvaluationChartPlugin extends CoreViewPlugin<EvaluationChartState> {
|
|
15
|
-
static getters: readonly ["getChartRuntime", "getStyleOfSingleCellChart"];
|
|
16
|
-
charts: Record<UID, ChartRuntime | undefined>;
|
|
17
|
-
handle(cmd: CoreViewCommand): void;
|
|
18
|
-
getChartRuntime(chartId: UID): ChartRuntime;
|
|
19
|
-
/**
|
|
20
|
-
* Get the background and textColor of a chart based on the color of the first cell of the main range of the chart.
|
|
21
|
-
*/
|
|
22
|
-
getStyleOfSingleCellChart(chartBackground: Color | undefined, mainRange: Range | undefined): EvaluationChartStyle;
|
|
23
|
-
exportForExcel(data: ExcelWorkbookData): Promise<void>;
|
|
24
|
-
private createRuntimeChart;
|
|
25
|
-
}
|
|
26
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Command } from "../../types/commands";
|
|
2
|
-
import { CoreViewPlugin } from "../core_view_plugin";
|
|
3
|
-
export declare class FormulaTrackerPlugin extends CoreViewPlugin {
|
|
4
|
-
static getters: readonly ["getCellsWithTrackedFormula"];
|
|
5
|
-
private trackedCells;
|
|
6
|
-
handle(cmd: Command): void;
|
|
7
|
-
getCellsWithTrackedFormula(formula: string): number[];
|
|
8
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { PivotPresenceTracker } from "../../helpers/pivot/pivot_presence_tracker";
|
|
2
|
-
import { Command } from "../../types/commands";
|
|
3
|
-
import { UID } from "../../types/misc";
|
|
4
|
-
import { UIPlugin } from "../ui_plugin";
|
|
5
|
-
export declare class PivotPresencePlugin extends UIPlugin {
|
|
6
|
-
static getters: readonly ["getPivotPresenceTracker"];
|
|
7
|
-
private trackPresencePivotId?;
|
|
8
|
-
private tracker?;
|
|
9
|
-
handle(cmd: Command): void;
|
|
10
|
-
getPivotPresenceTracker(pivotId: UID): PivotPresenceTracker | undefined;
|
|
11
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { BordersPlugin } from "../plugins/core/borders";
|
|
2
|
-
import { CarouselPlugin } from "../plugins/core/carousel";
|
|
3
|
-
import { CellPlugin } from "../plugins/core/cell";
|
|
4
|
-
import { ChartPlugin } from "../plugins/core/chart";
|
|
5
|
-
import { ConditionalFormatPlugin } from "../plugins/core/conditional_format";
|
|
6
|
-
import { DataValidationPlugin } from "../plugins/core/data_validation";
|
|
7
|
-
import { DefaultPlugin } from "../plugins/core/default";
|
|
8
|
-
import { FigurePlugin } from "../plugins/core/figures";
|
|
9
|
-
import { FormulaProviderAggregator } from "../plugins/core/formulas_provider";
|
|
10
|
-
import { HeaderGroupingPlugin } from "../plugins/core/header_grouping";
|
|
11
|
-
import { HeaderSizePlugin } from "../plugins/core/header_size";
|
|
12
|
-
import { HeaderVisibilityPlugin } from "../plugins/core/header_visibility";
|
|
13
|
-
import { ImagePlugin } from "../plugins/core/image";
|
|
14
|
-
import { MergePlugin } from "../plugins/core/merge";
|
|
15
|
-
import { NamedRangesPlugin } from "../plugins/core/named_range";
|
|
16
|
-
import { PivotCorePlugin } from "../plugins/core/pivot";
|
|
17
|
-
import { RangeAdapterPlugin } from "../plugins/core/range";
|
|
18
|
-
import { SettingsPlugin } from "../plugins/core/settings";
|
|
19
|
-
import { SheetPlugin } from "../plugins/core/sheet";
|
|
20
|
-
import { TablePlugin } from "../plugins/core/tables";
|
|
21
|
-
/**
|
|
22
|
-
* Union of all getter names of a plugin.
|
|
23
|
-
*
|
|
24
|
-
* e.g. With the following plugin
|
|
25
|
-
* ```ts
|
|
26
|
-
* class MyPlugin {
|
|
27
|
-
* static getters = [
|
|
28
|
-
* "getCell",
|
|
29
|
-
* "getCellValue",
|
|
30
|
-
* ] as const;
|
|
31
|
-
* getCell() { ... }
|
|
32
|
-
* getCellValue() { ... }
|
|
33
|
-
* }
|
|
34
|
-
* ```
|
|
35
|
-
* `type Names = GetterNames<typeof MyPlugin>` is equivalent to
|
|
36
|
-
* `type Names = "getCell" | "getCellValue"`
|
|
37
|
-
*
|
|
38
|
-
* Some technical comments:
|
|
39
|
-
*
|
|
40
|
-
* - Since the getter names are in a static array, the type of the plugin must
|
|
41
|
-
* be given, not the class itself.
|
|
42
|
-
*
|
|
43
|
-
* - we need to index the getters array with every index:
|
|
44
|
-
* `Plugin["getters"][0] | Plugin["getters"][1] | Plugin["getters"][2] | ...`
|
|
45
|
-
* which is equivalent to `Plugin["getters"][0 | 1 | 2 | ...]`.
|
|
46
|
-
* This can be generalized because the union of all indices `0 | 1 | 2 | 3 | ...`
|
|
47
|
-
* is actually the type `number`.
|
|
48
|
-
*/
|
|
49
|
-
type GetterNames<Plugin extends {
|
|
50
|
-
getters: readonly string[];
|
|
51
|
-
}> = Plugin["getters"][number];
|
|
52
|
-
/**
|
|
53
|
-
* Extract getter methods from a plugin, based on its `getters` static array.
|
|
54
|
-
* @example
|
|
55
|
-
* class MyPlugin {
|
|
56
|
-
* static getters = [
|
|
57
|
-
* "getCell",
|
|
58
|
-
* "getCellValue",
|
|
59
|
-
* ] as const;
|
|
60
|
-
* getCell() { ... }
|
|
61
|
-
* getCellValue() { ... }
|
|
62
|
-
* }
|
|
63
|
-
* type MyPluginGetters = PluginGetters<typeof MyPlugin>;
|
|
64
|
-
* // MyPluginGetters is equivalent to:
|
|
65
|
-
* // {
|
|
66
|
-
* // getCell: () => ...,
|
|
67
|
-
* // getCellValue: () => ...,
|
|
68
|
-
* // }
|
|
69
|
-
*/
|
|
70
|
-
export type PluginGetters<Plugin extends {
|
|
71
|
-
new (...args: unknown[]): any;
|
|
72
|
-
getters: readonly string[];
|
|
73
|
-
}> = Pick<InstanceType<Plugin>, GetterNames<Plugin>>;
|
|
74
|
-
type RangeAdapterGetters = Pick<RangeAdapterPlugin, GetterNames<typeof RangeAdapterPlugin>>;
|
|
75
|
-
type FormulasGetters = Pick<FormulaProviderAggregator, GetterNames<typeof FormulaProviderAggregator>>;
|
|
76
|
-
export type CoreGetters = PluginGetters<typeof SheetPlugin> & PluginGetters<typeof HeaderSizePlugin> & PluginGetters<typeof HeaderVisibilityPlugin> & PluginGetters<typeof CellPlugin> & PluginGetters<typeof DefaultPlugin> & PluginGetters<typeof MergePlugin> & PluginGetters<typeof BordersPlugin> & PluginGetters<typeof ChartPlugin> & PluginGetters<typeof ImagePlugin> & PluginGetters<typeof CarouselPlugin> & PluginGetters<typeof FigurePlugin> & RangeAdapterGetters & FormulasGetters & PluginGetters<typeof ConditionalFormatPlugin> & PluginGetters<typeof TablePlugin> & PluginGetters<typeof SettingsPlugin> & PluginGetters<typeof HeaderGroupingPlugin> & PluginGetters<typeof DataValidationPlugin> & PluginGetters<typeof NamedRangesPlugin> & PluginGetters<typeof PivotCorePlugin>;
|
|
77
|
-
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/spreading_relation.d.ts
RENAMED
|
File without changes
|
|
File without changes
|