@odoo/o-spreadsheet 19.5.0-alpha.2 → 19.5.0-alpha.20
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 +9 -0
- package/dist/o_spreadsheet.cjs +53040 -49146
- package/dist/o_spreadsheet.css +330 -157
- package/dist/o_spreadsheet.esm.js +52813 -48924
- package/dist/o_spreadsheet.iife.js +49777 -45883
- package/dist/o_spreadsheet.min.iife.js +413 -359
- package/dist/o_spreadsheet.xml +505 -332
- package/dist/types/actions/action.d.ts +1 -7
- package/dist/types/actions/data_actions.d.ts +2 -0
- package/dist/types/actions/menu_items_actions.d.ts +5 -2
- package/dist/types/clipboard_handlers/default_clipboard.d.ts +1 -1
- package/dist/types/collaborative/command_squisher.d.ts +1 -1
- package/dist/types/collaborative/ot/ot_helpers.d.ts +3 -1
- package/dist/types/collaborative/session.d.ts +3 -1
- package/dist/types/components/autofill/autofill.d.ts +3 -0
- package/dist/types/{plugins/ui_feature/autofill.d.ts → components/autofill/autofill_store.d.ts} +7 -12
- package/dist/types/components/autofill/table_autofill_store.d.ts +6 -0
- package/dist/types/components/border_editor/border_editor_widget.d.ts +1 -0
- package/dist/types/components/bottom_bar/bottom_bar_statistic/bottom_bar_statistic.d.ts +3 -0
- package/dist/types/components/clickable_cells_overlay/clickable_cells_overlay.d.ts +20 -0
- package/dist/types/components/collaborative_client_tag/collaborative_client_tag.d.ts +2 -0
- package/dist/types/components/composer/composer/abstract_composer_store.d.ts +3 -2
- package/dist/types/components/composer/composer/composer.d.ts +2 -1
- package/dist/types/components/composer/grid_composer/grid_composer.d.ts +1 -0
- package/dist/types/components/dashboard/clickable_cell_sort_icon/clickable_cell_sort_icon.d.ts +1 -1
- package/dist/types/components/dashboard/clickable_cell_store.d.ts +1 -0
- package/dist/types/components/dashboard/dashboard.d.ts +7 -12
- package/dist/types/components/error_tooltip/error_tooltip.d.ts +2 -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 -0
- package/dist/types/components/figures/chart/scorecard/chart_scorecard.d.ts +1 -0
- package/dist/types/components/figures/figure/figure.d.ts +10 -9
- package/dist/types/components/figures/figure_carousel/figure_carousel.d.ts +16 -1
- package/dist/types/components/figures/figure_chart/figure_chart.d.ts +1 -2
- package/dist/types/components/figures/figure_container/figure_container.d.ts +9 -4
- package/dist/types/components/figures/figure_image/figure_image.d.ts +1 -2
- package/dist/types/components/filters/filter_menu/filter_menu.d.ts +1 -0
- package/dist/types/components/full_screen_figure/full_screen_figure.d.ts +12 -1
- package/dist/types/components/grid/grid.d.ts +10 -0
- package/dist/types/components/grid_add_rows_footer/grid_add_rows_footer.d.ts +1 -0
- package/dist/types/components/grid_overlay/grid_overlay.d.ts +8 -4
- package/dist/types/components/grid_popover/grid_popover.d.ts +1 -0
- package/dist/types/components/header_group/header_group_container.d.ts +2 -0
- package/dist/types/components/headers_overlay/headers_overlay.d.ts +5 -0
- package/dist/types/components/headers_overlay/unhide_headers.d.ts +4 -0
- package/dist/types/components/helpers/chart_drag_and_drop.d.ts +15 -0
- package/dist/types/components/helpers/dom_helpers.d.ts +5 -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 +9 -4
- package/dist/types/components/helpers/wheel_hook.d.ts +1 -1
- package/dist/types/components/helpers/zoom.d.ts +0 -14
- package/dist/types/components/highlight/border/border.d.ts +2 -0
- package/dist/types/components/highlight/corner/corner.d.ts +1 -0
- package/dist/types/components/highlight/highlight/highlight.d.ts +3 -0
- package/dist/types/components/link/link_display/link_display.d.ts +1 -0
- package/dist/types/components/link/link_editor/link_editor.d.ts +3 -1
- package/dist/types/components/paint_format_button/paint_format_store.d.ts +1 -1
- package/dist/types/components/popover/cell_popover_store.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/props_validation.d.ts +7 -7
- package/dist/types/components/scrollbar/scrollbar_horizontal.d.ts +3 -0
- package/dist/types/components/scrollbar/scrollbar_vertical.d.ts +5 -1
- package/dist/types/components/selection_input/selection_input_store.d.ts +1 -1
- package/dist/types/components/side_panel/carousel_panel/carousel_panel.d.ts +20 -2
- 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/chart_type_picker.d.ts +5 -18
- package/dist/types/components/side_panel/chart/chart_type_picker_popover/chart_type_picker_popover.d.ts +63 -0
- package/dist/types/components/side_panel/chart/common.d.ts +1 -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/conditional_formatting/cf_editor/cell_is_rule_editor.d.ts +1 -1
- package/dist/types/components/side_panel/conditional_formatting/cf_editor/color_scale_rule_editor.d.ts +1 -1
- package/dist/types/components/side_panel/conditional_formatting/cf_editor/color_scale_rule_editor_threshold.d.ts +1 -1
- package/dist/types/components/side_panel/conditional_formatting/cf_editor/data_bar_rule_editor.d.ts +1 -1
- package/dist/types/components/side_panel/conditional_formatting/cf_editor/icon_set_rule_editor.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/data_sources_cleanup/data_sources_cleanup.d.ts +28 -0
- package/dist/types/components/side_panel/data_sources_cleanup/data_sources_cleanup_store.d.ts +13 -0
- package/dist/types/components/side_panel/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 +3 -1
- package/dist/types/components/side_panel/pivot/pivot_layout_configurator/pivot_layout_configurator.d.ts +1 -8
- package/dist/types/components/side_panel/pivot/pivot_side_panel/pivot_side_panel_store.d.ts +1 -0
- package/dist/types/components/side_panel/remove_duplicates/remove_duplicates.d.ts +3 -10
- package/dist/types/components/side_panel/side_panel/side_panel_store.d.ts +3 -2
- package/dist/types/components/side_panel/split_to_columns_panel/split_to_columns_panel.d.ts +4 -11
- package/dist/types/components/side_panel/split_to_columns_panel/split_to_columns_store.d.ts +33 -0
- package/dist/types/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/small_bottom_bar/small_bottom_bar.d.ts +1 -0
- package/dist/types/components/spreadsheet/spreadsheet.d.ts +12 -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 +397 -2
- package/dist/types/components/standalone_viewport/standalone_viewport.d.ts +59 -0
- package/dist/types/components/standalone_viewport/standalone_viewport_store.d.ts +29 -0
- package/dist/types/components/tables/hovered_table_store.d.ts +7 -11
- package/dist/types/components/tables/table_resizer/table_resizer.d.ts +2 -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 +2 -1
- package/dist/types/constants.d.ts +17 -2
- package/dist/types/formulas/code_builder.d.ts +2 -1
- package/dist/types/formulas/compiler.d.ts +8 -1
- package/dist/types/functions/create_compute_function.d.ts +4 -3
- package/dist/types/functions/function_registry.d.ts +4 -5
- package/dist/types/functions/helper_lookup.d.ts +1 -1
- package/dist/types/functions/helper_matrices.d.ts +1 -0
- package/dist/types/functions/helper_statistical.d.ts +6 -0
- package/dist/types/functions/helpers.d.ts +4 -0
- package/dist/types/functions/module_array.d.ts +41 -23
- package/dist/types/functions/module_database.d.ts +18 -6
- package/dist/types/functions/module_date.d.ts +70 -22
- package/dist/types/functions/module_engineering.d.ts +3 -1
- package/dist/types/functions/module_filter.d.ts +2 -2
- package/dist/types/functions/module_financial.d.ts +105 -35
- package/dist/types/functions/module_info.d.ts +33 -11
- package/dist/types/functions/module_logical.d.ts +16 -8
- package/dist/types/functions/module_lookup.d.ts +23 -15
- package/dist/types/functions/module_math.d.ts +125 -43
- package/dist/types/functions/module_operators.d.ts +7 -3
- package/dist/types/functions/module_statistical.d.ts +78 -22
- package/dist/types/functions/module_text.d.ts +75 -26
- package/dist/types/functions/module_web.d.ts +3 -1
- package/dist/types/helpers/carousel_helpers.d.ts +15 -3
- 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 +9 -6
- package/dist/types/helpers/figures/charts/chart_common.d.ts +3 -5
- 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/figures/figure/figure.d.ts +3 -2
- package/dist/types/helpers/filter_helpers.d.ts +2 -2
- package/dist/types/helpers/internal_viewport.d.ts +19 -10
- package/dist/types/helpers/links.d.ts +1 -1
- package/dist/types/helpers/misc.d.ts +2 -0
- 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_highlight.d.ts +2 -2
- 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/ui/split_to_columns_interactive.d.ts +1 -1
- package/dist/types/helpers/viewport_collection.d.ts +50 -21
- package/dist/types/helpers/zones.d.ts +1 -0
- package/dist/types/index.d.ts +39 -9
- package/dist/types/model.d.ts +18 -10
- package/dist/types/owl3_compatibility_layer.d.ts +1 -14
- package/dist/types/plugins/core/carousel.d.ts +8 -4
- package/dist/types/plugins/core/cell.d.ts +1 -0
- package/dist/types/plugins/core/chart.d.ts +2 -0
- package/dist/types/plugins/core/conditional_format.d.ts +2 -0
- package/dist/types/plugins/core/data_validation.d.ts +2 -0
- package/dist/types/plugins/core/formulas_provider.d.ts +8 -0
- package/dist/types/plugins/core/image.d.ts +2 -1
- package/dist/types/plugins/core/pivot.d.ts +1 -0
- package/dist/types/plugins/core/range.d.ts +4 -2
- package/dist/types/plugins/core/squisher.d.ts +7 -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 +8 -4
- package/dist/types/plugins/{ui_feature → 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} +14 -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 +7 -8
- 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_feature/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 +9 -6
- package/dist/types/plugins/evaluation/subtotal_evaluation.d.ts +5 -0
- package/dist/types/plugins/{ui_feature → 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/collaborative.d.ts +2 -1
- 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_feature/ui_options.d.ts +1 -7
- package/dist/types/plugins/ui_feature/ui_sheet.d.ts +2 -1
- package/dist/types/plugins/ui_plugin.d.ts +1 -4
- package/dist/types/plugins/ui_stateful/carousel_ui.d.ts +2 -2
- package/dist/types/plugins/{ui_core_views → ui_stateful}/cell_icon_plugin.d.ts +2 -2
- package/dist/types/plugins/{ui_feature → ui_stateful}/figure.d.ts +4 -0
- package/dist/types/plugins/ui_stateful/header_positions.d.ts +2 -1
- package/dist/types/registries/chart_data_source_registry.d.ts +4 -5
- package/dist/types/registries/chart_registry.d.ts +7 -4
- package/dist/types/registries/criterion_registry.d.ts +4 -4
- package/dist/types/registries/data_source_registry.d.ts +15 -0
- package/dist/types/registries/evaluation_registry.d.ts +2 -2
- package/dist/types/registries/figures_registry.d.ts +6 -2
- package/dist/types/store_engine/dependency_container.d.ts +5 -0
- package/dist/types/store_engine/store_hooks.d.ts +6 -0
- package/dist/types/store_engine/store_registries.d.ts +4 -0
- package/dist/types/stores/array_formula_highlight.d.ts +1 -1
- package/dist/types/{plugins/ui_feature/automatic_sum.d.ts → stores/automatic_sum_store.d.ts} +5 -4
- 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/stores/checkbox_toggle.d.ts +9 -0
- package/dist/types/stores/client_focus_store.d.ts +1 -0
- package/dist/types/{plugins/ui_stateful/clipboard.d.ts → stores/clipboard_store.d.ts} +11 -11
- package/dist/types/stores/data_cleanup_store.d.ts +31 -0
- package/dist/types/stores/grid_renderer_store.d.ts +3 -2
- package/dist/types/stores/main_viewport_store.d.ts +14 -0
- package/dist/types/stores/spreadsheet_store.d.ts +1 -1
- package/dist/types/stores/table_resize_store.d.ts +6 -0
- package/dist/types/stores/trim_whitespace_store.d.ts +9 -0
- package/dist/types/stores/viewports_store.d.ts +85 -0
- 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/radar_chart.d.ts +1 -1
- package/dist/types/types/chart/scorecard_chart.d.ts +3 -4
- package/dist/types/types/collaborative/transport_service.d.ts +1 -0
- package/dist/types/types/commands.d.ts +55 -68
- package/dist/types/types/figure.d.ts +26 -3
- package/dist/types/types/functions.d.ts +16 -6
- package/dist/types/types/getters.d.ts +126 -28
- package/dist/types/types/misc.d.ts +19 -1
- package/dist/types/types/model.d.ts +2 -4
- package/dist/types/types/range.d.ts +1 -0
- package/dist/types/types/rendering.d.ts +21 -1
- package/dist/types/types/store_engine.d.ts +10 -3
- package/package.json +6 -5
- 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/checkbox_toggle.d.ts +0 -9
- package/dist/types/plugins/ui_feature/data_cleanup.d.ts +0 -16
- package/dist/types/plugins/ui_feature/pivot_presence_plugin.d.ts +0 -11
- package/dist/types/plugins/ui_feature/split_to_columns.d.ts +0 -21
- package/dist/types/plugins/ui_feature/subtotal_evaluation.d.ts +0 -5
- package/dist/types/plugins/ui_feature/table_autofill.d.ts +0 -6
- package/dist/types/plugins/ui_feature/table_resize_ui.d.ts +0 -6
- package/dist/types/plugins/ui_stateful/sheetview.d.ts +0 -123
- package/dist/types/types/core_getters.d.ts +0 -75
- /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,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,22 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CommandResult, EvaluationCommand } from "../../types/commands";
|
|
2
2
|
import { CellPosition, UID } from "../../types/misc";
|
|
3
|
-
import { CriterionFilter, DataFilterValue
|
|
3
|
+
import { CriterionFilter, DataFilterValue } from "../../types/table";
|
|
4
4
|
import { ExcelWorkbookData } from "../../types/workbook_data";
|
|
5
|
-
import {
|
|
6
|
-
export declare class FilterEvaluationPlugin extends
|
|
7
|
-
static getters: readonly ["getFilterValue", "getFilterHiddenValues", "getFilterCriterionValue", "
|
|
5
|
+
import { EvaluationPlugin } from "../evaluation_plugin";
|
|
6
|
+
export declare class FilterEvaluationPlugin extends EvaluationPlugin {
|
|
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;
|
|
16
16
|
getFilterHiddenValues(position: CellPosition): string[];
|
|
17
17
|
getFilterCriterionValue(position: CellPosition): CriterionFilter;
|
|
18
18
|
isFilterActive(position: CellPosition): boolean;
|
|
19
|
-
getFirstTableInSelection(): Table | undefined;
|
|
20
19
|
private updateFilter;
|
|
21
20
|
private updateHiddenRows;
|
|
22
21
|
exportForExcel(data: ExcelWorkbookData): void;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Cell } from "../../types/cells";
|
|
2
|
-
import {
|
|
2
|
+
import { EvaluationPlugin } from "../evaluation_plugin";
|
|
3
3
|
/**
|
|
4
4
|
* A string that represents the shape of a formula.
|
|
5
5
|
*/
|
|
6
6
|
export type Fingerprint = string;
|
|
7
|
-
export declare class FingerprintPlugin extends
|
|
7
|
+
export declare class FingerprintPlugin extends EvaluationPlugin {
|
|
8
8
|
static getters: readonly ["getCellFingerprint"];
|
|
9
9
|
getCellFingerprint(cell: Cell): Fingerprint | undefined;
|
|
10
10
|
private computeFormulaFingerprint;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EvaluationCommand } from "../../types/commands";
|
|
2
|
+
import { EvaluationPlugin } from "../evaluation_plugin";
|
|
3
|
+
export declare class FormulaTrackerPlugin extends EvaluationPlugin {
|
|
4
|
+
static getters: readonly ["getCellsWithTrackedFormula"];
|
|
5
|
+
private trackedCells;
|
|
6
|
+
handle(cmd: EvaluationCommand): void;
|
|
7
|
+
getCellsWithTrackedFormula(formula: string): number[];
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { GeoChartRegion } from "../../types/chart/geo_chart";
|
|
2
|
+
import { EvaluationPlugin, EvaluationPluginConfig } from "../evaluation_plugin";
|
|
3
|
+
export declare class GeoLoaderEvaluation extends EvaluationPlugin {
|
|
4
|
+
static getters: readonly ["getGeoJsonFeatures", "geoFeatureNameToId", "getGeoChartAvailableRegions", "loadUsedGeoJsonFeatures"];
|
|
5
|
+
private readonly geoJsonService;
|
|
6
|
+
private geoJsonCache;
|
|
7
|
+
constructor(config: EvaluationPluginConfig);
|
|
8
|
+
getGeoChartAvailableRegions(): GeoChartRegion[];
|
|
9
|
+
getGeoJsonFeatures(region: string): GeoJSON.Feature[] | undefined;
|
|
10
|
+
geoFeatureNameToId(region: string, featureName: string): string | undefined;
|
|
11
|
+
private convertToGeoJson;
|
|
12
|
+
loadUsedGeoJsonFeatures(): Promise<void>;
|
|
13
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Canvas2DContext } from "../../types/canvas";
|
|
2
|
-
import {
|
|
2
|
+
import { EvaluationCommand } from "../../types/commands";
|
|
3
3
|
import { AnchorOffset } from "../../types/figure";
|
|
4
4
|
import { CellPosition, Dimension, HeaderIndex, Immutable, Pixel, UID } from "../../types/misc";
|
|
5
|
-
import {
|
|
5
|
+
import { EvaluationPlugin } from "../evaluation_plugin";
|
|
6
6
|
interface HeaderSizeState {
|
|
7
7
|
tallestCellInRow: Immutable<Record<UID, Array<CellWithSize | undefined>>>;
|
|
8
8
|
}
|
|
@@ -10,12 +10,12 @@ interface CellWithSize {
|
|
|
10
10
|
cell: CellPosition;
|
|
11
11
|
size: Pixel;
|
|
12
12
|
}
|
|
13
|
-
export declare class HeaderSizeUIPlugin extends
|
|
13
|
+
export declare class HeaderSizeUIPlugin extends EvaluationPlugin<HeaderSizeState> implements HeaderSizeState {
|
|
14
14
|
static getters: readonly ["getRowSize", "getHeaderSize", "getMaxAnchorOffset"];
|
|
15
15
|
readonly tallestCellInRow: Immutable<Record<UID, Array<CellWithSize | undefined>>>;
|
|
16
16
|
ctx: Canvas2DContext;
|
|
17
|
-
beforeHandle(cmd:
|
|
18
|
-
handle(cmd:
|
|
17
|
+
beforeHandle(cmd: EvaluationCommand): void;
|
|
18
|
+
handle(cmd: EvaluationCommand): void;
|
|
19
19
|
getRowSize(sheetId: UID, row: HeaderIndex): Pixel;
|
|
20
20
|
getMaxAnchorOffset(sheetId: UID, height: Pixel, width: Pixel): AnchorOffset;
|
|
21
21
|
getHeaderSize(sheetId: UID, dimension: Dimension, index: HeaderIndex): Pixel;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CellPosition, Dimension, HeaderIndex, UID } from "../../types/misc";
|
|
2
2
|
import { ExcelWorkbookData } from "../../types/workbook_data";
|
|
3
|
-
import {
|
|
4
|
-
export declare class
|
|
3
|
+
import { EvaluationPlugin } from "../evaluation_plugin";
|
|
4
|
+
export declare class HeaderVisibilityEvaluationPlugin extends EvaluationPlugin {
|
|
5
5
|
static getters: readonly ["getNextVisibleCellPosition", "findVisibleHeader", "findLastVisibleColRowIndex", "findFirstVisibleColRowIndex", "isRowHidden", "isColHidden", "isHeaderHidden"];
|
|
6
6
|
isRowHidden(sheetId: UID, index: number): boolean;
|
|
7
7
|
isColHidden(sheetId: UID, index: number): boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PivotPresenceTracker } from "../../helpers/pivot/pivot_presence_tracker";
|
|
2
|
+
import { EvaluationCommand } from "../../types/commands";
|
|
3
|
+
import { UID } from "../../types/misc";
|
|
4
|
+
import { EvaluationPlugin } from "../evaluation_plugin";
|
|
5
|
+
export declare class PivotPresencePlugin extends EvaluationPlugin {
|
|
6
|
+
static getters: readonly ["getPivotPresenceTracker"];
|
|
7
|
+
private trackPresencePivotId?;
|
|
8
|
+
private sheetId?;
|
|
9
|
+
private tracker?;
|
|
10
|
+
handle(cmd: EvaluationCommand): void;
|
|
11
|
+
getPivotPresenceTracker(pivotId: UID, sheetId: UID): PivotPresenceTracker | undefined;
|
|
12
|
+
}
|
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
import { CompiledFormula } from "../../formulas/compiler";
|
|
2
2
|
import { CellValue } from "../../types/cells";
|
|
3
|
-
import {
|
|
3
|
+
import { EvaluationCommand } from "../../types/commands";
|
|
4
4
|
import { CellPosition, Matrix, SortDirection, UID } from "../../types/misc";
|
|
5
5
|
import { PivotCoreMeasure, PivotStyle, PivotTableCell } from "../../types/pivot";
|
|
6
6
|
import { Pivot } from "../../types/pivot_runtime";
|
|
7
|
-
import {
|
|
7
|
+
import { EvaluationPlugin, EvaluationPluginConfig } from "../evaluation_plugin";
|
|
8
8
|
export declare const UNDO_REDO_PIVOT_COMMANDS: string[];
|
|
9
9
|
interface PivotEvaluatedArgs {
|
|
10
10
|
functionName: string;
|
|
11
11
|
args: (CellValue | Matrix<CellValue> | undefined)[];
|
|
12
12
|
}
|
|
13
|
-
export declare class PivotUIPlugin extends
|
|
13
|
+
export declare class PivotUIPlugin extends EvaluationPlugin {
|
|
14
14
|
static getters: readonly ["getPivot", "getFirstPivotFunction", "getPivotCellSortDirection", "getPivotIdFromPosition", "getPivotIdsFromPosition", "getPivotCellFromPosition", "generateNewCalculatedMeasureName", "isPivotUnused", "isSpillPivotFormula", "getAllPivotArrayFormulas", "getPivotStyleAtPosition"];
|
|
15
15
|
private pivots;
|
|
16
16
|
private unusedPivotsInFormulas?;
|
|
17
17
|
private custom;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
private pivotPositionCache;
|
|
19
|
+
private shouldInvalidateCache;
|
|
20
|
+
constructor(config: EvaluationPluginConfig);
|
|
21
|
+
beforeHandle(cmd: EvaluationCommand): void;
|
|
22
|
+
handle(cmd: EvaluationCommand): void;
|
|
23
|
+
finalize(): void;
|
|
21
24
|
/**
|
|
22
25
|
* Get the id of the first pivot in the formula at the given position. Returns undefined if there
|
|
23
26
|
* is no pivot at this position
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Command } from "../../types/commands";
|
|
1
|
+
import { Command, EvaluationCommand } from "../../types/commands";
|
|
2
2
|
import { Border, CellPosition, Style } from "../../types/misc";
|
|
3
|
-
import {
|
|
4
|
-
export declare class TableComputedStylePlugin extends
|
|
3
|
+
import { EvaluationPlugin } from "../evaluation_plugin";
|
|
4
|
+
export declare class TableComputedStylePlugin extends EvaluationPlugin {
|
|
5
5
|
static getters: readonly ["getCellTableStyle", "getCellTableBorder"];
|
|
6
6
|
private tableStyles;
|
|
7
|
-
handle(cmd:
|
|
7
|
+
handle(cmd: EvaluationCommand): void;
|
|
8
8
|
finalize(): void;
|
|
9
9
|
getCellTableStyle(position: CellPosition): Style | undefined;
|
|
10
10
|
getCellTableBorder(position: CellPosition): Border | undefined;
|
|
@@ -21,8 +21,8 @@ export declare class TableComputedStylePlugin extends UIPlugin {
|
|
|
21
21
|
*/
|
|
22
22
|
private getTableMapping;
|
|
23
23
|
}
|
|
24
|
-
declare const invalidateTableStyleCommands: readonly ["HIDE_COLUMNS_ROWS", "UNHIDE_COLUMNS_ROWS", "UNFOLD_HEADER_GROUP", "UNGROUP_HEADERS", "FOLD_HEADER_GROUP", "FOLD_ALL_HEADER_GROUPS", "UNFOLD_ALL_HEADER_GROUPS", "FOLD_HEADER_GROUPS_IN_ZONE", "UNFOLD_HEADER_GROUPS_IN_ZONE", "CREATE_TABLE", "UPDATE_TABLE", "UPDATE_FILTER", "REMOVE_TABLE", "
|
|
25
|
-
export declare function doesCommandInvalidatesTableStyle(cmd:
|
|
24
|
+
declare const invalidateTableStyleCommands: readonly ["HIDE_COLUMNS_ROWS", "UNHIDE_COLUMNS_ROWS", "UNFOLD_HEADER_GROUP", "UNGROUP_HEADERS", "FOLD_HEADER_GROUP", "FOLD_ALL_HEADER_GROUPS", "UNFOLD_ALL_HEADER_GROUPS", "FOLD_HEADER_GROUPS_IN_ZONE", "UNFOLD_HEADER_GROUPS_IN_ZONE", "CREATE_TABLE", "UPDATE_TABLE", "UPDATE_FILTER", "REMOVE_TABLE", "CREATE_TABLE_STYLE", "REMOVE_TABLE_STYLE", "DELETE_CONTENT"];
|
|
25
|
+
export declare function doesCommandInvalidatesTableStyle<C extends Command>(cmd: C): cmd is Extract<C, {
|
|
26
26
|
type: (typeof invalidateTableStyleCommands)[number];
|
|
27
|
-
}
|
|
27
|
+
}>;
|
|
28
28
|
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Session } from "../collaborative/session";
|
|
2
|
+
import { StateObserver } from "../state_observer";
|
|
3
|
+
import { EvaluationCommand, EvaluationCommandDispatcher } from "../types/commands";
|
|
4
|
+
import { Currency } from "../types/currency";
|
|
5
|
+
import { EvaluationGetters } from "../types/getters";
|
|
6
|
+
import { Color } from "../types/misc";
|
|
7
|
+
import { ModelConfig } from "../types/model";
|
|
8
|
+
import { BasePlugin } from "./base_plugin";
|
|
9
|
+
export interface EvaluationPluginConfig {
|
|
10
|
+
readonly getters: EvaluationGetters;
|
|
11
|
+
readonly stateObserver: StateObserver;
|
|
12
|
+
readonly custom: ModelConfig["custom"];
|
|
13
|
+
readonly session: Session;
|
|
14
|
+
readonly dispatch: EvaluationCommandDispatcher["dispatch"];
|
|
15
|
+
readonly defaultCurrency?: Partial<Currency>;
|
|
16
|
+
readonly customColors: Color[];
|
|
17
|
+
readonly external: ModelConfig["external"];
|
|
18
|
+
}
|
|
19
|
+
export interface EvaluationPluginConstructor {
|
|
20
|
+
new (config: EvaluationPluginConfig): EvaluationPlugin;
|
|
21
|
+
getters: readonly string[];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Evaluation plugins handle any data derived from core data (i.e. evaluation).
|
|
25
|
+
* They cannot impact the model data (i.e. cannot dispatch core commands).
|
|
26
|
+
*/
|
|
27
|
+
export declare class EvaluationPlugin<State = any> extends BasePlugin<State, EvaluationCommand> {
|
|
28
|
+
protected getters: EvaluationGetters;
|
|
29
|
+
protected dispatch: EvaluationCommandDispatcher["dispatch"];
|
|
30
|
+
constructor({ getters, stateObserver, dispatch }: EvaluationPluginConfig);
|
|
31
|
+
}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { Registry } from "../registries/registry";
|
|
2
2
|
import { CorePluginConstructor } from "./core_plugin";
|
|
3
|
-
import {
|
|
3
|
+
import { EvaluationPluginConstructor } from "./evaluation_plugin";
|
|
4
4
|
import { UIPluginConstructor } from "./ui_plugin";
|
|
5
|
-
export declare
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
export declare class PluginRegistry<T extends new (config: any) => any> extends Registry<T> {
|
|
6
|
+
private readonly PluginClass;
|
|
7
|
+
constructor(PluginClass: new (config: any) => any);
|
|
8
|
+
add(key: string, value: T): this;
|
|
9
|
+
replace(key: string, value: T): this;
|
|
10
|
+
}
|
|
11
|
+
export declare const corePluginRegistry: PluginRegistry<CorePluginConstructor>;
|
|
12
|
+
export declare const featurePluginRegistry: PluginRegistry<UIPluginConstructor>;
|
|
13
|
+
export declare const statefulUIPluginRegistry: PluginRegistry<UIPluginConstructor>;
|
|
14
|
+
export declare const evaluationPluginRegistry: PluginRegistry<EvaluationPluginConstructor>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { UID } from "../..";
|
|
1
2
|
import { Client, ClientId, ClientWithColor } from "../../types/collaborative/session";
|
|
2
3
|
import { GridRenderingContext } from "../../types/rendering";
|
|
3
4
|
import { UIPlugin, UIPluginConfig } from "../ui_plugin";
|
|
@@ -18,7 +19,7 @@ export declare class CollaborativePlugin extends UIPlugin {
|
|
|
18
19
|
* Get the list of others connected clients which are present in the same sheet
|
|
19
20
|
* and with a valid position
|
|
20
21
|
*/
|
|
21
|
-
getClientsToDisplay(): ClientToDisplay[];
|
|
22
|
+
getClientsToDisplay(sheetId: UID): ClientToDisplay[];
|
|
22
23
|
drawLayer(renderingContext: GridRenderingContext): void;
|
|
23
24
|
}
|
|
24
25
|
export {};
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { Command } from "../../types/commands";
|
|
2
2
|
import { GridRenderingTheme } from "../../types/rendering";
|
|
3
3
|
import { UIPlugin, UIPluginConfig } from "../ui_plugin";
|
|
4
|
-
export declare const BACKGROUND_HEADER_SELECTED_COLOR = "#E8EAED";
|
|
5
|
-
export declare const BACKGROUND_HEADER_ACTIVE_COLOR = "#595959";
|
|
6
|
-
export declare const COLOR_THEMES: Record<string, GridRenderingTheme>;
|
|
7
4
|
export declare class ColorThemeUIPlugin extends UIPlugin {
|
|
8
5
|
static getters: readonly ["isDarkMode", "getSpreadsheetTheme"];
|
|
9
6
|
private colorScheme?;
|
|
@@ -3,21 +3,16 @@ import { Command } from "../../types/commands";
|
|
|
3
3
|
import { UID } from "../../types/misc";
|
|
4
4
|
import { UIPlugin, UIPluginConfig } from "../ui_plugin";
|
|
5
5
|
export declare class GeoFeaturePlugin extends UIPlugin {
|
|
6
|
-
static getters: readonly ["
|
|
6
|
+
static getters: readonly ["getAvailableChartRegions"];
|
|
7
7
|
private readonly geoJsonService;
|
|
8
|
-
private geoJsonCache;
|
|
9
8
|
/** Stores the initial region of each geo chart at the time of the START command */
|
|
10
9
|
private initialRegions;
|
|
11
10
|
constructor(config: UIPluginConfig);
|
|
12
11
|
handle(cmd: Command): void;
|
|
13
12
|
private trackInitialRegion;
|
|
14
|
-
getGeoChartAvailableRegions(): GeoChartRegion[];
|
|
15
13
|
/**
|
|
16
14
|
* Returns the regions that can be selected as an alternative for a given geo chart in dashboard mode.
|
|
17
15
|
* The available alternatives are based on the initial region of the chart (before any dashboard-level change).
|
|
18
16
|
*/
|
|
19
17
|
getAvailableChartRegions(chartId: UID): GeoChartRegion[];
|
|
20
|
-
getGeoJsonFeatures(region: string): GeoJSON.Feature[] | undefined;
|
|
21
|
-
geoFeatureNameToId(region: string, featureName: string): string | undefined;
|
|
22
|
-
private convertToGeoJson;
|
|
23
18
|
}
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import { Command } from "../../types/commands";
|
|
2
2
|
import { UIPlugin } from "../ui_plugin";
|
|
3
3
|
export declare class UIOptionsPlugin extends UIPlugin {
|
|
4
|
-
static getters: readonly ["shouldShowFormulas"
|
|
4
|
+
static getters: readonly ["shouldShowFormulas"];
|
|
5
5
|
private showFormulas;
|
|
6
|
-
private automaticEvaluation;
|
|
7
6
|
handle(cmd: Command): void;
|
|
8
7
|
shouldShowFormulas(): boolean;
|
|
9
|
-
/**
|
|
10
|
-
* Returns whether automatic evaluation is enabled.
|
|
11
|
-
* When disabled, cells are only re-evaluated on explicit EVALUATE_CELLS commands (F9).
|
|
12
|
-
*/
|
|
13
|
-
isAutomaticEvaluationEnabled(): boolean;
|
|
14
8
|
}
|
|
@@ -3,7 +3,7 @@ import { CellPosition, Pixel, Style, UID, VerticalAlign, Zone } from "../../type
|
|
|
3
3
|
import { Rect } from "../../types/rendering";
|
|
4
4
|
import { UIPlugin } from "../ui_plugin";
|
|
5
5
|
export declare class SheetUIPlugin extends UIPlugin {
|
|
6
|
-
static getters: readonly ["getCellWidth", "getTextWidth", "getCellText", "getCellMultiLineText", "getMultilineTextSize", "getContiguousZone", "computeTextYCoordinate"];
|
|
6
|
+
static getters: readonly ["getCellWidth", "getTextWidth", "getCellText", "getCellMultiLineText", "getMultilineTextSize", "getContiguousZone", "computeTextYCoordinate", "getZoneMaxWidth"];
|
|
7
7
|
private ctx;
|
|
8
8
|
allowDispatch(cmd: LocalCommand): CommandResult | CommandResult[];
|
|
9
9
|
handle(cmd: Command): void;
|
|
@@ -40,6 +40,7 @@ export declare class SheetUIPlugin extends UIPlugin {
|
|
|
40
40
|
* If the cell is part of a merge, the check applies to the main cell of the merge.
|
|
41
41
|
*/
|
|
42
42
|
private isCellEmpty;
|
|
43
|
+
getZoneMaxWidth(sheetId: UID, zone: Zone): number;
|
|
43
44
|
private getColMaxWidth;
|
|
44
45
|
/**
|
|
45
46
|
* Check that any "sheetId" in the command matches an existing
|
|
@@ -9,7 +9,6 @@ import { ModelConfig } from "../types/model";
|
|
|
9
9
|
import { GridRenderingContext, LayerName } from "../types/rendering";
|
|
10
10
|
import { SelectionStreamProcessor } from "../types/selection_stream_processor";
|
|
11
11
|
import { BasePlugin } from "./base_plugin";
|
|
12
|
-
export type UIActions = Pick<ModelConfig, "notifyUI" | "raiseBlockingErrorUI">;
|
|
13
12
|
export interface UIPluginConfig {
|
|
14
13
|
readonly getters: Getters;
|
|
15
14
|
readonly stateObserver: StateObserver;
|
|
@@ -17,7 +16,6 @@ export interface UIPluginConfig {
|
|
|
17
16
|
readonly canDispatch: CommandDispatcher["dispatch"];
|
|
18
17
|
readonly selection: SelectionStreamProcessor;
|
|
19
18
|
readonly moveClient: (position: ClientPosition) => void;
|
|
20
|
-
readonly uiActions: UIActions;
|
|
21
19
|
readonly custom: ModelConfig["custom"];
|
|
22
20
|
readonly session: Session;
|
|
23
21
|
readonly defaultCurrency?: Partial<Currency>;
|
|
@@ -37,10 +35,9 @@ export interface UIPluginConstructor {
|
|
|
37
35
|
export declare class UIPlugin<State = any> extends BasePlugin<State, Command> {
|
|
38
36
|
static layers: Readonly<LayerName[]>;
|
|
39
37
|
protected getters: Getters;
|
|
40
|
-
protected ui: UIActions;
|
|
41
38
|
protected selection: SelectionStreamProcessor;
|
|
42
39
|
protected dispatch: CommandDispatcher["dispatch"];
|
|
43
40
|
protected canDispatch: CommandDispatcher["dispatch"];
|
|
44
|
-
constructor({ getters, stateObserver, dispatch, canDispatch,
|
|
41
|
+
constructor({ getters, stateObserver, dispatch, canDispatch, selection }: UIPluginConfig);
|
|
45
42
|
drawLayer(ctx: GridRenderingContext, layer: LayerName): void;
|
|
46
43
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SpreadsheetChart } from "../../helpers/figures/chart";
|
|
2
|
-
import { Command, CommandResult, LocalCommand } from "../../types/commands";
|
|
2
|
+
import { Command, CommandResult, LocalCommand, PopOutChartFromCarouselCommand } from "../../types/commands";
|
|
3
3
|
import { CarouselItem } from "../../types/figure";
|
|
4
4
|
import { UID } from "../../types/misc";
|
|
5
5
|
import { UIPlugin } from "../ui_plugin";
|
|
@@ -8,7 +8,7 @@ export declare class CarouselUIPlugin extends UIPlugin {
|
|
|
8
8
|
carouselStates: Record<UID, string | undefined>;
|
|
9
9
|
allowDispatch(cmd: LocalCommand): CommandResult | CommandResult[];
|
|
10
10
|
handle(cmd: Command): void;
|
|
11
|
-
popOutChartFromCarousel(
|
|
11
|
+
popOutChartFromCarousel(cmd: PopOutChartFromCarouselCommand): void;
|
|
12
12
|
getSelectedCarouselItem(figureId: UID): CarouselItem | undefined;
|
|
13
13
|
getChartFromFigureId(figureId: UID): SpreadsheetChart | undefined;
|
|
14
14
|
getChartIdFromFigureId(figureId: UID): UID | undefined;
|
|
@@ -2,8 +2,8 @@ import { GridIcon } from "../../registries/icons_on_cell_registry";
|
|
|
2
2
|
import { Command } from "../../types/commands";
|
|
3
3
|
import { CellPosition } from "../../types/misc";
|
|
4
4
|
import { Rect } from "../../types/rendering";
|
|
5
|
-
import {
|
|
6
|
-
export declare class CellIconPlugin extends
|
|
5
|
+
import { UIPlugin } from "../ui_plugin";
|
|
6
|
+
export declare class CellIconPlugin extends UIPlugin {
|
|
7
7
|
static getters: readonly ["doesCellHaveGridIcon", "getCellIcons", "getCellIconRect"];
|
|
8
8
|
private cellIconsCache;
|
|
9
9
|
handle(cmd: Command): void;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { Command, CommandResult } from "../../types/commands";
|
|
2
|
+
import { Figure, FigureUI } from "../../types/figure";
|
|
3
|
+
import { UID } from "../../types/misc";
|
|
2
4
|
import { UIPlugin } from "../ui_plugin";
|
|
3
5
|
export declare class FigureUIPlugin extends UIPlugin {
|
|
6
|
+
static getters: readonly ["getFigureUI"];
|
|
4
7
|
allowDispatch(cmd: Command): CommandResult | CommandResult[];
|
|
5
8
|
handle(cmd: Command): void;
|
|
9
|
+
getFigureUI(sheetId: UID, figure: Figure): FigureUI;
|
|
6
10
|
}
|
|
@@ -2,7 +2,7 @@ import { Command } from "../../types/commands";
|
|
|
2
2
|
import { Dimension, HeaderDimensions, HeaderIndex, Pixel, UID } from "../../types/misc";
|
|
3
3
|
import { UIPlugin } from "../ui_plugin";
|
|
4
4
|
export declare class HeaderPositionsUIPlugin extends UIPlugin {
|
|
5
|
-
static getters: readonly ["getColDimensions", "getRowDimensions", "getColRowOffset"];
|
|
5
|
+
static getters: readonly ["getColDimensions", "getRowDimensions", "getHeaderDimensions", "getColRowOffset"];
|
|
6
6
|
private headerPositions;
|
|
7
7
|
private isDirty;
|
|
8
8
|
handle(cmd: Command): void;
|
|
@@ -15,6 +15,7 @@ export declare class HeaderPositionsUIPlugin extends UIPlugin {
|
|
|
15
15
|
* Returns the size, start and end coordinates of a row an unfolded sheet
|
|
16
16
|
*/
|
|
17
17
|
getRowDimensions(sheetId: UID, row: HeaderIndex): HeaderDimensions;
|
|
18
|
+
getHeaderDimensions(sheetId: UID, dimension: "COL" | "ROW", index: number): HeaderDimensions;
|
|
18
19
|
/**
|
|
19
20
|
* Returns the offset of a header (determined by the dimension) at the given index
|
|
20
21
|
* based on the referenceIndex given. If start === 0, this method will return
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type * as ChartJS from "chart.js";
|
|
2
2
|
import { ChartCreationContext, ChartData, ChartDataSource, ChartDataSourceType, ChartType, DataSetStyle, ExcelChartDefinition } from "../types/chart/chart";
|
|
3
3
|
import { CommandResult } from "../types/commands";
|
|
4
|
-
import { CoreGetters } from "../types/
|
|
5
|
-
import { Getters } from "../types/getters";
|
|
4
|
+
import { CoreGetters, EvaluationGetters } from "../types/getters";
|
|
6
5
|
import { RangeAdapterFunctions, UID } from "../types/misc";
|
|
7
6
|
import { Validator } from "../types/validator";
|
|
8
7
|
import { Registry } from "./registry";
|
|
@@ -13,15 +12,15 @@ export interface ChartDataSourceBuilder<TExternal, TInternal> {
|
|
|
13
12
|
fromHierarchicalContextCreation: (context: ChartCreationContext) => ChartDataSource<string>;
|
|
14
13
|
validate: (dataSource: TExternal, validator: Validator) => CommandResult | CommandResult[];
|
|
15
14
|
transform(dataSource: TExternal, defaultSheetId: UID, rangeAdapters: RangeAdapterFunctions): TExternal;
|
|
16
|
-
extractData(dataSource: TInternal, chartId: UID, getters:
|
|
17
|
-
extractHierarchicalData(dataSource: TInternal, chartId: UID, getters:
|
|
15
|
+
extractData(dataSource: TInternal, chartId: UID, getters: EvaluationGetters): ChartData;
|
|
16
|
+
extractHierarchicalData(dataSource: TInternal, chartId: UID, getters: EvaluationGetters): ChartData;
|
|
18
17
|
adaptRanges(dataSource: TInternal, rangeAdapters: RangeAdapterFunctions): TInternal;
|
|
19
18
|
duplicateInDuplicatedSheet(dataSource: TInternal, sheetIdFrom: UID, sheetIdTo: UID, getters: CoreGetters): TInternal;
|
|
20
19
|
getDefinition(dataSource: TInternal, defaultSheetId: UID, getters: CoreGetters): TExternal;
|
|
21
20
|
getContextCreation(dataSource: TExternal): ChartCreationContext;
|
|
22
21
|
getHierarchicalContextCreation(dataSource: TExternal): ChartCreationContext;
|
|
23
22
|
toExcelDataSets(dataSource: TInternal, dataSetStyles: DataSetStyle, getters: CoreGetters): Pick<ExcelChartDefinition, "dataSets" | "labelRange"> | undefined;
|
|
24
|
-
onDataSetClick?: (chartType: ChartType, chartId: UID, event: ChartJS.ChartEvent, items: ChartJS.ActiveElement[], chartJsChart: ChartJS.Chart, getters:
|
|
23
|
+
onDataSetClick?: (chartType: ChartType, chartId: UID, event: ChartJS.ChartEvent, items: ChartJS.ActiveElement[], chartJsChart: ChartJS.Chart, getters: EvaluationGetters) => void;
|
|
25
24
|
onDataSetHover?: (chartType: ChartType, chartId: UID, event: ChartJS.ChartEvent, items: ChartJS.ActiveElement[], chartJsChart: ChartJS.Chart) => void;
|
|
26
25
|
}
|
|
27
26
|
export interface ChartDataSourceRegistry extends Registry<ChartDataSourceBuilder<unknown, unknown>> {
|