@odoo/o-spreadsheet 17.0.84 → 17.0.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/o-spreadsheet.cjs.js +46071 -53455
- package/dist/o-spreadsheet.esm.js +45886 -53454
- package/dist/o-spreadsheet.iife.js +50220 -57787
- package/dist/o-spreadsheet.iife.min.js +534 -505
- package/dist/o_spreadsheet.xml +3 -3
- package/dist/types/actions/action.d.ts +73 -0
- package/dist/types/actions/data_actions.d.ts +9 -0
- package/dist/types/actions/edit_actions.d.ts +21 -0
- package/dist/types/actions/format_actions.d.ts +45 -0
- package/dist/types/actions/insert_actions.d.ts +28 -0
- package/dist/types/actions/menu_items_actions.d.ts +32 -0
- package/dist/types/actions/sheet_actions.d.ts +10 -0
- package/dist/types/actions/view_actions.d.ts +28 -0
- package/dist/types/collaborative/local_transport_service.d.ts +8 -0
- package/dist/types/collaborative/ot/ot.d.ts +22 -0
- package/dist/types/collaborative/ot/ot_helpers.d.ts +3 -0
- package/dist/types/collaborative/ot/ot_specific.d.ts +1 -0
- package/dist/types/collaborative/revisions.d.ts +22 -0
- package/dist/types/collaborative/session.d.ts +100 -0
- package/dist/types/components/action_button/action_button.d.ts +23 -0
- package/dist/types/components/animation/ripple.d.ts +53 -0
- package/dist/types/components/autofill/autofill.d.ts +25 -0
- package/dist/types/components/border_editor/border_editor.d.ts +41 -0
- package/dist/types/components/border_editor/border_editor_widget.d.ts +31 -0
- package/dist/types/components/bottom_bar/bottom_bar.d.ts +56 -0
- package/dist/types/components/bottom_bar_sheet/bottom_bar_sheet.d.ts +44 -0
- package/dist/types/components/bottom_bar_statistic/bottom_bar_statistic.d.ts +21 -0
- package/dist/types/components/collaborative_client_tag/collaborative_client_tag.d.ts +14 -0
- package/dist/types/components/color_picker/color_picker.d.ts +41 -0
- package/dist/types/components/color_picker/color_picker_widget.d.ts +27 -0
- package/dist/types/components/composer/autocomplete_dropdown/autocomplete_dropdown.d.ts +15 -0
- package/dist/types/components/composer/composer/composer.d.ts +135 -0
- package/dist/types/components/composer/content_editable_helper.d.ts +60 -0
- package/dist/types/components/composer/formula_assistant/formula_assistant.d.ts +20 -0
- package/dist/types/components/composer/grid_composer/grid_composer.d.ts +39 -0
- package/dist/types/components/composer/top_bar_composer/top_bar_composer.d.ts +18 -0
- package/dist/types/components/dashboard/dashboard.d.ts +50 -0
- package/dist/types/components/data_validation_overlay/data_validation_overlay.d.ts +15 -0
- package/dist/types/components/data_validation_overlay/dv_checkbox/dv_checkbox.d.ts +12 -0
- package/dist/types/components/data_validation_overlay/dv_list_icon/dv_list_icon.d.ts +10 -0
- package/dist/types/components/error_tooltip/error_tooltip.d.ts +18 -0
- package/dist/types/components/figures/chart/chartJs/chartjs.d.ts +18 -0
- package/dist/types/components/figures/chart/scorecard/chart_scorecard.d.ts +14 -0
- package/dist/types/components/figures/figure/figure.d.ts +41 -0
- package/dist/types/components/figures/figure_chart/figure_chart.d.ts +14 -0
- package/dist/types/components/figures/figure_container/figure_container.d.ts +117 -0
- package/dist/types/components/figures/figure_image/figure_image.d.ts +13 -0
- package/dist/types/components/filters/filter_icon/filter_icon.d.ts +12 -0
- package/dist/types/components/filters/filter_icons_overlay/filter_icons_overlay.d.ts +22 -0
- package/dist/types/components/filters/filter_menu/filter_menu.d.ts +43 -0
- package/dist/types/components/filters/filter_menu_item/filter_menu_value_item.d.ts +17 -0
- package/dist/types/components/font_size_editor/font_size_editor.d.ts +29 -0
- package/dist/types/components/grid/grid.d.ts +99 -0
- package/dist/types/components/grid_add_rows_footer/grid_add_rows_footer.d.ts +27 -0
- package/dist/types/components/grid_cell_icon/grid_cell_icon.d.ts +16 -0
- package/dist/types/components/grid_overlay/grid_overlay.d.ts +45 -0
- package/dist/types/components/grid_popover/grid_popover.d.ts +20 -0
- package/dist/types/components/header_group/header_group.d.ts +41 -0
- package/dist/types/components/header_group/header_group_container.d.ts +29 -0
- package/dist/types/components/headers_overlay/headers_overlay.d.ts +117 -0
- package/dist/types/components/helpers/css.d.ts +40 -0
- package/dist/types/components/helpers/dom_helpers.d.ts +34 -0
- package/dist/types/components/helpers/drag_and_drop.d.ts +20 -0
- package/dist/types/components/helpers/drag_and_drop_hook.d.ts +24 -0
- package/dist/types/components/helpers/draw_grid_hook.d.ts +3 -0
- package/dist/types/components/helpers/figure_container_helper.d.ts +14 -0
- package/dist/types/components/helpers/figure_drag_helper.d.ts +6 -0
- package/dist/types/components/helpers/figure_snap_helper.d.ts +25 -0
- package/dist/types/components/helpers/html_content_helpers.d.ts +2 -0
- package/dist/types/components/helpers/index.d.ts +1 -0
- package/dist/types/components/helpers/listener_hook.d.ts +10 -0
- package/dist/types/components/helpers/position_hook.d.ts +25 -0
- package/dist/types/components/helpers/selection_helpers.d.ts +2 -0
- package/dist/types/components/helpers/time_hooks.d.ts +9 -0
- package/dist/types/components/helpers/wheel_hook.d.ts +1 -0
- package/dist/types/components/highlight/border/border.d.ts +15 -0
- package/dist/types/components/highlight/corner/corner.d.ts +18 -0
- package/dist/types/components/highlight/highlight/highlight.d.ts +22 -0
- package/dist/types/components/icon_picker/icon_picker.d.ts +65 -0
- package/dist/types/components/icons/icons.d.ts +56 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/link/index.d.ts +2 -0
- package/dist/types/components/link/link_display/link_display.d.ts +21 -0
- package/dist/types/components/link/link_editor/link_editor.d.ts +39 -0
- package/dist/types/components/menu/menu.d.ts +58 -0
- package/dist/types/components/paint_format_button/paint_format_button.d.ts +12 -0
- package/dist/types/components/popover/popover.d.ts +40 -0
- package/dist/types/components/scrollbar/index.d.ts +2 -0
- package/dist/types/components/scrollbar/scrollbar.d.ts +25 -0
- package/dist/types/components/scrollbar/scrollbar_horizontal.d.ts +26 -0
- package/dist/types/components/scrollbar/scrollbar_vertical.d.ts +26 -0
- package/dist/types/components/scrollbar.d.ts +9 -0
- package/dist/types/components/selection_input/selection_input.d.ts +54 -0
- package/dist/types/components/side_panel/chart/bar_chart/bar_chart_config_panel.d.ts +6 -0
- package/dist/types/components/side_panel/chart/bar_chart/bar_chart_design_panel.d.ts +4 -0
- package/dist/types/components/side_panel/chart/gauge_chart_panel/gauge_chart_config_panel.d.ts +26 -0
- package/dist/types/components/side_panel/chart/gauge_chart_panel/gauge_chart_design_panel.d.ts +34 -0
- package/dist/types/components/side_panel/chart/index.d.ts +17 -0
- package/dist/types/components/side_panel/chart/line_bar_pie_panel/config_panel.d.ts +45 -0
- package/dist/types/components/side_panel/chart/line_bar_pie_panel/design_panel.d.ts +26 -0
- package/dist/types/components/side_panel/chart/line_chart/line_chart_config_panel.d.ts +9 -0
- package/dist/types/components/side_panel/chart/line_chart/line_chart_design_panel.d.ts +4 -0
- package/dist/types/components/side_panel/chart/main_chart_panel/main_chart_panel.d.ts +20 -0
- package/dist/types/components/side_panel/chart/scorecard_chart_panel/scorecard_chart_config_panel.d.ts +32 -0
- package/dist/types/components/side_panel/chart/scorecard_chart_panel/scorecard_chart_design_panel.d.ts +26 -0
- package/dist/types/components/side_panel/conditional_formatting/cf_editor/cf_editor.d.ts +137 -0
- package/dist/types/components/side_panel/conditional_formatting/cf_preview_list/cf_preview_list.d.ts +58 -0
- package/dist/types/components/side_panel/conditional_formatting/conditional_formatting.d.ts +23 -0
- package/dist/types/components/side_panel/custom_currency/custom_currency.d.ts +27 -0
- package/dist/types/components/side_panel/data_validation/data_validation_panel.d.ts +25 -0
- package/dist/types/components/side_panel/data_validation/data_validation_panel_helper.d.ts +14 -0
- package/dist/types/components/side_panel/data_validation/dv_criterion_form/dv_criterion_form.d.ts +11 -0
- package/dist/types/components/side_panel/data_validation/dv_criterion_form/dv_date_criterion/dv_date_criterion.d.ts +16 -0
- package/dist/types/components/side_panel/data_validation/dv_criterion_form/dv_double_input_criterion/dv_double_input_criterion.d.ts +10 -0
- package/dist/types/components/side_panel/data_validation/dv_criterion_form/dv_input/dv_input.d.ts +30 -0
- package/dist/types/components/side_panel/data_validation/dv_criterion_form/dv_single_input_criterion/dv_single_input_criterion.d.ts +9 -0
- package/dist/types/components/side_panel/data_validation/dv_criterion_form/dv_value_in_list_criterion/dv_value_in_list_criterion.d.ts +23 -0
- package/dist/types/components/side_panel/data_validation/dv_criterion_form/dv_value_in_range_criterion/dv_value_in_range_criterion.d.ts +12 -0
- package/dist/types/components/side_panel/data_validation/dv_editor/dv_editor.d.ts +34 -0
- package/dist/types/components/side_panel/data_validation/dv_preview/dv_preview.d.ts +13 -0
- package/dist/types/components/side_panel/find_and_replace/find_and_replace.d.ts +27 -0
- package/dist/types/components/side_panel/more_formats/more_formats.d.ts +10 -0
- package/dist/types/components/side_panel/remove_duplicates/remove_duplicates.d.ts +32 -0
- package/dist/types/components/side_panel/select_menu/select_menu.d.ts +29 -0
- package/dist/types/components/side_panel/settings/settings_panel.d.ts +18 -0
- package/dist/types/components/side_panel/side_panel/side_panel.d.ts +18 -0
- package/dist/types/components/side_panel/split_to_columns_panel/split_to_columns_panel.d.ts +35 -0
- package/dist/types/components/spreadsheet/spreadsheet.d.ts +64 -0
- package/dist/types/components/top_bar/top_bar.d.ts +65 -0
- package/dist/types/components/translations_terms.d.ts +104 -0
- package/dist/types/components/validation_messages/validation_messages.d.ts +11 -0
- package/dist/types/constants.d.ts +137 -0
- package/dist/types/formulas/code_builder.d.ts +28 -0
- package/dist/types/formulas/compiler.d.ts +7 -0
- package/dist/types/formulas/composer_tokenizer.d.ts +31 -0
- package/dist/types/formulas/helpers.d.ts +2 -0
- package/dist/types/formulas/index.d.ts +16 -0
- package/dist/types/formulas/parser.d.ts +72 -0
- package/dist/types/formulas/range_tokenizer.d.ts +8 -0
- package/dist/types/formulas/tokenizer.d.ts +25 -0
- package/dist/types/functions/arguments.d.ts +10 -0
- package/dist/types/functions/helper_assert.d.ts +6 -0
- package/dist/types/functions/helper_financial.d.ts +49 -0
- package/dist/types/functions/helper_matrices.d.ts +23 -0
- package/dist/types/functions/helper_statistical.d.ts +3 -0
- package/dist/types/functions/helpers.d.ts +101 -0
- package/dist/types/functions/index.d.ts +10 -0
- package/dist/types/functions/module_array.d.ts +141 -0
- package/dist/types/functions/module_custom.d.ts +8 -0
- package/dist/types/functions/module_database.d.ts +85 -0
- package/dist/types/functions/module_date.d.ts +231 -0
- package/dist/types/functions/module_engineering.d.ts +8 -0
- package/dist/types/functions/module_filter.d.ts +17 -0
- package/dist/types/functions/module_financial.d.ts +358 -0
- package/dist/types/functions/module_info.d.ts +64 -0
- package/dist/types/functions/module_logical.d.ts +59 -0
- package/dist/types/functions/module_lookup.d.ts +72 -0
- package/dist/types/functions/module_math.d.ts +424 -0
- package/dist/types/functions/module_operators.d.ts +98 -0
- package/dist/types/functions/module_statistical.d.ts +296 -0
- package/dist/types/functions/module_text.d.ts +147 -0
- package/dist/types/functions/module_web.d.ts +8 -0
- package/dist/types/helpers/cells/cell_evaluation.d.ts +6 -0
- package/dist/types/helpers/cells/index.d.ts +2 -0
- package/dist/types/helpers/chart_date.d.ts +8 -0
- package/dist/types/helpers/clipboard/clipboard_abstract_cell_state.d.ts +26 -0
- package/dist/types/helpers/clipboard/clipboard_cells_state.d.ts +70 -0
- package/dist/types/helpers/clipboard/clipboard_figure_state.d.ts +41 -0
- package/dist/types/helpers/clipboard/clipboard_os_state.d.ts +12 -0
- package/dist/types/helpers/clipboard/navigator_clipboard_wrapper.d.ts +13 -0
- package/dist/types/helpers/color.d.ts +68 -0
- package/dist/types/helpers/coordinates.d.ts +40 -0
- package/dist/types/helpers/data_validation_helpers.d.ts +5 -0
- package/dist/types/helpers/dates.d.ts +90 -0
- package/dist/types/helpers/edge_scrolling.d.ts +9 -0
- package/dist/types/helpers/event_bus.d.ts +45 -0
- package/dist/types/helpers/figures/charts/abstract_chart.d.ts +56 -0
- package/dist/types/helpers/figures/charts/bar_chart.d.ts +29 -0
- package/dist/types/helpers/figures/charts/chart_common.d.ts +62 -0
- package/dist/types/helpers/figures/charts/chart_factory.d.ts +40 -0
- package/dist/types/helpers/figures/charts/chart_js_gauge_controller.d.ts +1 -0
- package/dist/types/helpers/figures/charts/chart_ui_common.d.ts +41 -0
- package/dist/types/helpers/figures/charts/gauge_chart.d.ts +23 -0
- package/dist/types/helpers/figures/charts/index.d.ts +10 -0
- package/dist/types/helpers/figures/charts/line_chart.d.ts +32 -0
- package/dist/types/helpers/figures/charts/pie_chart.d.ts +27 -0
- package/dist/types/helpers/figures/charts/scorecard_chart.d.ts +30 -0
- package/dist/types/helpers/figures/charts/scorecard_chart_config_builder.d.ts +35 -0
- package/dist/types/helpers/figures/figure/figure.d.ts +6 -0
- package/dist/types/helpers/figures/images/image_provider.d.ts +10 -0
- package/dist/types/helpers/filters.d.ts +19 -0
- package/dist/types/helpers/focus_manager.d.ts +5 -0
- package/dist/types/helpers/format.d.ts +32 -0
- package/dist/types/helpers/index.d.ts +15 -0
- package/dist/types/helpers/internal_viewport.d.ts +83 -0
- package/dist/types/helpers/inverse_commands.d.ts +2 -0
- package/dist/types/helpers/links.d.ts +23 -0
- package/dist/types/helpers/locale.d.ts +58 -0
- package/dist/types/helpers/misc.d.ts +178 -0
- package/dist/types/helpers/numbers.d.ts +25 -0
- package/dist/types/helpers/range.d.ts +59 -0
- package/dist/types/helpers/recompute_zones.d.ts +136 -0
- package/dist/types/helpers/rectangle.d.ts +7 -0
- package/dist/types/helpers/reference_type.d.ts +9 -0
- package/dist/types/helpers/references.d.ts +23 -0
- package/dist/types/helpers/search.d.ts +19 -0
- package/dist/types/helpers/sheet.d.ts +7 -0
- package/dist/types/helpers/sort.d.ts +16 -0
- package/dist/types/helpers/state_manager_helpers.d.ts +6 -0
- package/dist/types/helpers/text_helper.d.ts +28 -0
- package/dist/types/helpers/ui/cut_interactive.d.ts +2 -0
- package/dist/types/helpers/ui/filter_interactive.d.ts +7 -0
- package/dist/types/helpers/ui/freeze_interactive.d.ts +2 -0
- package/dist/types/helpers/ui/merge_interactive.d.ts +6 -0
- package/dist/types/helpers/ui/paste_interactive.d.ts +10 -0
- package/dist/types/helpers/ui/sheet_interactive.d.ts +2 -0
- package/dist/types/helpers/ui/split_to_columns_interactive.d.ts +6 -0
- package/dist/types/helpers/ui/stop_edition_interactive.d.ts +2 -0
- package/dist/types/helpers/ui/toggle_group_interactive.d.ts +6 -0
- package/dist/types/helpers/uuid.d.ts +20 -0
- package/dist/types/helpers/zones.d.ts +173 -0
- package/dist/types/history/branch.d.ts +62 -0
- package/dist/types/history/factory.d.ts +9 -0
- package/dist/types/history/operation.d.ts +17 -0
- package/dist/types/history/operation_sequence.d.ts +31 -0
- package/dist/types/history/repeat_commands/repeat_commands_generic.d.ts +6 -0
- package/dist/types/history/repeat_commands/repeat_commands_specific.d.ts +13 -0
- package/dist/types/history/repeat_commands/repeat_revision.d.ts +5 -0
- package/dist/types/history/selective_history.d.ts +81 -0
- package/dist/types/history/tree.d.ts +175 -0
- package/dist/types/index.d.ts +189 -0
- package/dist/types/migrations/data.d.ts +30 -0
- package/dist/types/migrations/legacy_tools.d.ts +15 -0
- package/dist/types/model.d.ts +192 -0
- package/dist/types/plugins/base_plugin.d.ts +63 -0
- package/dist/types/plugins/core/borders.d.ts +127 -0
- package/dist/types/plugins/core/cell.d.ts +103 -0
- package/dist/types/plugins/core/chart.d.ts +41 -0
- package/dist/types/plugins/core/conditional_format.d.ts +52 -0
- package/dist/types/plugins/core/data_validation.d.ts +31 -0
- package/dist/types/plugins/core/figures.d.ts +34 -0
- package/dist/types/plugins/core/filters.d.ts +43 -0
- package/dist/types/plugins/core/header_grouping.d.ts +82 -0
- package/dist/types/plugins/core/header_size.d.ts +23 -0
- package/dist/types/plugins/core/header_visibility.d.ts +20 -0
- package/dist/types/plugins/core/image.d.ts +32 -0
- package/dist/types/plugins/core/index.d.ts +13 -0
- package/dist/types/plugins/core/merge.d.ts +83 -0
- package/dist/types/plugins/core/range.d.ts +59 -0
- package/dist/types/plugins/core/settings.d.ts +12 -0
- package/dist/types/plugins/core/sheet.d.ts +151 -0
- package/dist/types/plugins/core_plugin.d.ts +49 -0
- package/dist/types/plugins/index.d.ts +7 -0
- package/dist/types/plugins/ui_core_views/cell_evaluation/compilation_parameters.d.ts +10 -0
- package/dist/types/plugins/ui_core_views/cell_evaluation/evaluation_plugin.d.ts +43 -0
- package/dist/types/plugins/ui_core_views/cell_evaluation/evaluator.d.ts +90 -0
- package/dist/types/plugins/ui_core_views/cell_evaluation/formula_dependency_graph.d.ts +23 -0
- package/dist/types/plugins/ui_core_views/cell_evaluation/index.d.ts +1 -0
- package/dist/types/plugins/ui_core_views/cell_evaluation/r_tree.d.ts +108 -0
- package/dist/types/plugins/ui_core_views/cell_evaluation/spreading_relation.d.ts +60 -0
- package/dist/types/plugins/ui_core_views/custom_colors.d.ts +24 -0
- package/dist/types/plugins/ui_core_views/evaluation_chart.d.ts +24 -0
- package/dist/types/plugins/ui_core_views/evaluation_conditional_format.d.ts +37 -0
- package/dist/types/plugins/ui_core_views/evaluation_data_validation.d.ts +38 -0
- package/dist/types/plugins/ui_core_views/header_sizes_ui.d.ts +32 -0
- package/dist/types/plugins/ui_core_views/index.d.ts +5 -0
- package/dist/types/plugins/ui_feature/autofill.d.ts +60 -0
- package/dist/types/plugins/ui_feature/automatic_sum.d.ts +101 -0
- package/dist/types/plugins/ui_feature/cell_popovers.d.ts +16 -0
- package/dist/types/plugins/ui_feature/collaborative.d.ts +25 -0
- package/dist/types/plugins/ui_feature/data_cleanup.d.ts +16 -0
- package/dist/types/plugins/ui_feature/find_and_replace.d.ts +76 -0
- package/dist/types/plugins/ui_feature/format.d.ts +23 -0
- package/dist/types/plugins/ui_feature/header_visibility_ui.d.ts +21 -0
- package/dist/types/plugins/ui_feature/highlight.d.ts +12 -0
- package/dist/types/plugins/ui_feature/index.d.ts +15 -0
- package/dist/types/plugins/ui_feature/local_history.d.ts +36 -0
- package/dist/types/plugins/ui_feature/renderer.d.ts +45 -0
- package/dist/types/plugins/ui_feature/selection_input.d.ts +67 -0
- package/dist/types/plugins/ui_feature/selection_inputs_manager.d.ts +33 -0
- package/dist/types/plugins/ui_feature/sort.d.ts +75 -0
- package/dist/types/plugins/ui_feature/split_to_columns.d.ts +21 -0
- package/dist/types/plugins/ui_feature/ui_options.d.ts +8 -0
- package/dist/types/plugins/ui_feature/ui_sheet.d.ts +30 -0
- package/dist/types/plugins/ui_plugin.d.ts +36 -0
- package/dist/types/plugins/ui_stateful/clipboard.d.ts +43 -0
- package/dist/types/plugins/ui_stateful/edition.d.ts +117 -0
- package/dist/types/plugins/ui_stateful/filter_evaluation.d.ts +26 -0
- package/dist/types/plugins/ui_stateful/header_positions.d.ts +28 -0
- package/dist/types/plugins/ui_stateful/index.d.ts +5 -0
- package/dist/types/plugins/ui_stateful/selection.d.ts +78 -0
- package/dist/types/plugins/ui_stateful/sheetview.d.ts +164 -0
- package/dist/types/registries/autofill_modifiers.d.ts +7 -0
- package/dist/types/registries/autofill_rules.d.ts +15 -0
- package/dist/types/registries/cell_clickable_registry.d.ts +8 -0
- package/dist/types/registries/cell_popovers_registry.d.ts +3 -0
- package/dist/types/registries/chart_types.d.ts +28 -0
- package/dist/types/registries/currencies_registry.d.ts +7 -0
- package/dist/types/registries/data_validation_registry.d.ts +32 -0
- package/dist/types/registries/figure_registry.d.ts +18 -0
- package/dist/types/registries/index.d.ts +11 -0
- package/dist/types/registries/inverse_command_registry.d.ts +5 -0
- package/dist/types/registries/menu_items_registry.d.ts +19 -0
- package/dist/types/registries/menus/cell_menu_registry.d.ts +2 -0
- package/dist/types/registries/menus/col_menu_registry.d.ts +2 -0
- package/dist/types/registries/menus/header_group_registry.d.ts +7 -0
- package/dist/types/registries/menus/index.d.ts +7 -0
- package/dist/types/registries/menus/link_menu_registry.d.ts +2 -0
- package/dist/types/registries/menus/number_format_menu_registry.d.ts +4 -0
- package/dist/types/registries/menus/row_menu_registry.d.ts +2 -0
- package/dist/types/registries/menus/sheet_menu_registry.d.ts +4 -0
- package/dist/types/registries/menus/topbar_menu_registry.d.ts +2 -0
- package/dist/types/registries/ot_registry.d.ts +21 -0
- package/dist/types/registries/registry.d.ts +44 -0
- package/dist/types/registries/repeat_commands_registry.d.ts +20 -0
- package/dist/types/registries/side_panel_registry.d.ts +8 -0
- package/dist/types/registries/topbar_component_registry.d.ts +18 -0
- package/dist/types/selection_stream/event_stream.d.ts +64 -0
- package/dist/types/selection_stream/selection_stream_processor.d.ts +167 -0
- package/dist/types/state_observer.d.ts +15 -0
- package/dist/types/translation.d.ts +21 -0
- package/dist/types/types/autofill.d.ts +62 -0
- package/dist/types/types/cell_popovers.d.ts +44 -0
- package/dist/types/types/cells.d.ts +64 -0
- package/dist/types/types/chart/bar_chart.d.ts +19 -0
- package/dist/types/types/chart/chart.d.ts +48 -0
- package/dist/types/types/chart/common_chart.d.ts +2 -0
- package/dist/types/types/chart/gauge_chart.d.ts +73 -0
- package/dist/types/types/chart/index.d.ts +7 -0
- package/dist/types/types/chart/line_chart.d.ts +21 -0
- package/dist/types/types/chart/pie_chart.d.ts +17 -0
- package/dist/types/types/chart/scorecard_chart.d.ts +26 -0
- package/dist/types/types/clipboard.d.ts +31 -0
- package/dist/types/types/collaborative/revisions.d.ts +7 -0
- package/dist/types/types/collaborative/session.d.ts +46 -0
- package/dist/types/types/collaborative/transport_service.d.ts +91 -0
- package/dist/types/types/commands.d.ts +873 -0
- package/dist/types/types/conditional_formatting.d.ts +103 -0
- package/dist/types/types/currency.d.ts +7 -0
- package/dist/types/types/data_validation.d.ts +121 -0
- package/dist/types/types/env.d.ts +33 -0
- package/dist/types/types/errors.d.ts +33 -0
- package/dist/types/types/event_stream/index.d.ts +1 -0
- package/dist/types/types/event_stream/selection_events.d.ts +11 -0
- package/dist/types/types/figure.d.ts +14 -0
- package/dist/types/types/files.d.ts +27 -0
- package/dist/types/types/format.d.ts +8 -0
- package/dist/types/types/functions.d.ts +49 -0
- package/dist/types/types/getters.d.ts +101 -0
- package/dist/types/types/history.d.ts +43 -0
- package/dist/types/types/image.d.ts +12 -0
- package/dist/types/types/index.d.ts +30 -0
- package/dist/types/types/locale.d.ts +13 -0
- package/dist/types/types/misc.d.ts +276 -0
- package/dist/types/types/range.d.ts +21 -0
- package/dist/types/types/rendering.d.ts +86 -0
- package/dist/types/types/validator.d.ts +16 -0
- package/dist/types/types/workbook_data.d.ts +112 -0
- package/dist/types/types/xlsx.d.ts +441 -0
- package/dist/types/xlsx/constants.d.ts +74 -0
- package/dist/types/xlsx/conversion/cf_conversion.d.ts +4 -0
- package/dist/types/xlsx/conversion/color_conversion.d.ts +24 -0
- package/dist/types/xlsx/conversion/conversion_maps.d.ts +167 -0
- package/dist/types/xlsx/conversion/figure_conversion.d.ts +3 -0
- package/dist/types/xlsx/conversion/format_conversion.d.ts +8 -0
- package/dist/types/xlsx/conversion/formula_conversion.d.ts +9 -0
- package/dist/types/xlsx/conversion/index.d.ts +7 -0
- package/dist/types/xlsx/conversion/sheet_conversion.d.ts +4 -0
- package/dist/types/xlsx/conversion/style_conversion.d.ts +19 -0
- package/dist/types/xlsx/conversion/table_conversion.d.ts +14 -0
- package/dist/types/xlsx/extraction/base_extractor.d.ts +142 -0
- package/dist/types/xlsx/extraction/cf_extractor.d.ts +14 -0
- package/dist/types/xlsx/extraction/chart_extractor.d.ts +11 -0
- package/dist/types/xlsx/extraction/external_book_extractor.d.ts +6 -0
- package/dist/types/xlsx/extraction/figure_extractor.d.ts +8 -0
- package/dist/types/xlsx/extraction/index.d.ts +3 -0
- package/dist/types/xlsx/extraction/misc_extractor.d.ts +18 -0
- package/dist/types/xlsx/extraction/pivot_extractor.d.ts +8 -0
- package/dist/types/xlsx/extraction/sheet_extractor.d.ts +23 -0
- package/dist/types/xlsx/extraction/style_extractor.d.ts +19 -0
- package/dist/types/xlsx/extraction/table_extractor.d.ts +10 -0
- package/dist/types/xlsx/functions/cells.d.ts +11 -0
- package/dist/types/xlsx/functions/charts.d.ts +3 -0
- package/dist/types/xlsx/functions/conditional_formatting.d.ts +3 -0
- package/dist/types/xlsx/functions/drawings.d.ts +5 -0
- package/dist/types/xlsx/functions/styles.d.ts +10 -0
- package/dist/types/xlsx/functions/table.d.ts +2 -0
- package/dist/types/xlsx/functions/worksheet.d.ts +9 -0
- package/dist/types/xlsx/helpers/colors.d.ts +8 -0
- package/dist/types/xlsx/helpers/content_helpers.d.ts +48 -0
- package/dist/types/xlsx/helpers/misc.d.ts +29 -0
- package/dist/types/xlsx/helpers/xlsx_helper.d.ts +10 -0
- package/dist/types/xlsx/helpers/xlsx_parser_error_manager.d.ts +34 -0
- package/dist/types/xlsx/helpers/xml_helpers.d.ts +36 -0
- package/dist/types/xlsx/xlsx_reader.d.ts +13 -0
- package/dist/types/xlsx/xlsx_writer.d.ts +8 -0
- package/package.json +42 -25
- package/dist/o-spreadsheet.d.ts +0 -8046
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { ModelConfig } from "../../../model";
|
|
2
|
+
import { CellPosition, EvaluatedCell, Getters, Matrix, UID, ValueAndFormat } from "../../../types";
|
|
3
|
+
import { RTreeBoundingBox } from "./r_tree";
|
|
4
|
+
/**
|
|
5
|
+
* A CellPosition encoded as an integer
|
|
6
|
+
*/
|
|
7
|
+
export type PositionId = bigint;
|
|
8
|
+
export declare class Evaluator {
|
|
9
|
+
private readonly context;
|
|
10
|
+
private readonly getters;
|
|
11
|
+
private compilationParams;
|
|
12
|
+
private readonly encoder;
|
|
13
|
+
private evaluatedCells;
|
|
14
|
+
private formulaDependencies;
|
|
15
|
+
private blockedArrayFormulas;
|
|
16
|
+
private spreadingRelations;
|
|
17
|
+
constructor(context: ModelConfig["custom"], getters: Getters);
|
|
18
|
+
getEvaluatedCell(position: CellPosition): EvaluatedCell;
|
|
19
|
+
getSpreadPositionsOf(position: CellPosition): CellPosition[];
|
|
20
|
+
getArrayFormulaSpreadingOn(position: CellPosition): CellPosition | undefined;
|
|
21
|
+
getEvaluatedPositions(): CellPosition[];
|
|
22
|
+
private getArrayFormulaSpreadingOnId;
|
|
23
|
+
updateDependencies(position: CellPosition): void;
|
|
24
|
+
private updateCompilationParameters;
|
|
25
|
+
evaluateCells(positions: CellPosition[]): void;
|
|
26
|
+
private getArrayFormulasImpactedByChangesOf;
|
|
27
|
+
buildDependencyGraph(): void;
|
|
28
|
+
evaluateAllCells(): void;
|
|
29
|
+
evaluateFormulaResult(sheetId: UID, formulaString: string): ValueAndFormat | Matrix<ValueAndFormat>;
|
|
30
|
+
private getAllCells;
|
|
31
|
+
/**
|
|
32
|
+
* Return the position of formulas blocked by the given position
|
|
33
|
+
* as well as all their dependencies.
|
|
34
|
+
*/
|
|
35
|
+
private getArrayFormulasBlockedBy;
|
|
36
|
+
private nextPositionsToUpdate;
|
|
37
|
+
private cellsBeingComputed;
|
|
38
|
+
private evaluate;
|
|
39
|
+
private setEvaluatedCell;
|
|
40
|
+
private computeCell;
|
|
41
|
+
private computeAndSave;
|
|
42
|
+
private handleError;
|
|
43
|
+
private computeFormulaCell;
|
|
44
|
+
private invalidatePositionsDependingOnSpread;
|
|
45
|
+
private assertSheetHasEnoughSpaceToSpreadFormulaResult;
|
|
46
|
+
private updateSpreadRelation;
|
|
47
|
+
private checkCollision;
|
|
48
|
+
private spreadValues;
|
|
49
|
+
private invalidateSpreading;
|
|
50
|
+
private getDirectDependencies;
|
|
51
|
+
private getCellsDependingOn;
|
|
52
|
+
private getCell;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Encode (and decode) cell positions { sheetId, col, row }
|
|
56
|
+
* to a single integer.
|
|
57
|
+
*
|
|
58
|
+
* `col` and `row` values are encoded on 21 bits each (max 2^21 = 2_097_152),
|
|
59
|
+
* An incremental integer id is assigned to each different sheet id, starting at 0.
|
|
60
|
+
*
|
|
61
|
+
* e.g.
|
|
62
|
+
* Given { col: 10, row: 4, sheetId: "abcde" }
|
|
63
|
+
* we have:
|
|
64
|
+
* - row "4" encoded on 21 bits: 000000000000000000100
|
|
65
|
+
* - col "10" encoded on 21 bits: 000000000000000001010
|
|
66
|
+
* - sheetId: let's say it's the 4th sheetId met, encoded to: 11
|
|
67
|
+
*
|
|
68
|
+
* The final encoded value is found by concatenating the 3 bit sequences:
|
|
69
|
+
*
|
|
70
|
+
* sheetId: 11
|
|
71
|
+
* col: 000000000000000001010
|
|
72
|
+
* row: 000000000000000000100
|
|
73
|
+
* => 11000000000000000001010000000000000000000100
|
|
74
|
+
*
|
|
75
|
+
* this binary sequence is the integer 13194160504836
|
|
76
|
+
*/
|
|
77
|
+
export declare class PositionBitsEncoder {
|
|
78
|
+
private readonly sheetMapping;
|
|
79
|
+
private readonly inverseSheetMapping;
|
|
80
|
+
constructor();
|
|
81
|
+
/**
|
|
82
|
+
* Encode a cell position to a single integer.
|
|
83
|
+
*/
|
|
84
|
+
encode({ sheetId, col, row }: CellPosition): PositionId;
|
|
85
|
+
encodeBoundingBox({ sheetId, zone }: RTreeBoundingBox): PositionId[];
|
|
86
|
+
decode(id: PositionId): CellPosition;
|
|
87
|
+
decodeToBoundingBox(id: PositionId): RTreeBoundingBox;
|
|
88
|
+
private encodeSheet;
|
|
89
|
+
private decodeSheet;
|
|
90
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PositionBitsEncoder, PositionId } from "./evaluator";
|
|
2
|
+
import { RTreeBoundingBox, RTreeItem } from "./r_tree";
|
|
3
|
+
/**
|
|
4
|
+
* Implementation of a dependency Graph.
|
|
5
|
+
* The graph is used to evaluate the cells in the correct
|
|
6
|
+
* order, and should be updated each time a cell's content is modified
|
|
7
|
+
*
|
|
8
|
+
* It uses an R-Tree data structure to efficiently find dependent cells.
|
|
9
|
+
*/
|
|
10
|
+
export declare class FormulaDependencyGraph {
|
|
11
|
+
private readonly encoder;
|
|
12
|
+
private readonly dependencies;
|
|
13
|
+
private readonly rTree;
|
|
14
|
+
constructor(encoder: PositionBitsEncoder, data?: RTreeItem<PositionId>[]);
|
|
15
|
+
removeAllDependencies(formulaPositionId: PositionId): void;
|
|
16
|
+
addDependencies(formulaPositionId: PositionId, dependencies: RTreeBoundingBox[]): void;
|
|
17
|
+
/**
|
|
18
|
+
* Return all the cells that depend on the provided ranges,
|
|
19
|
+
* in the correct order they should be evaluated.
|
|
20
|
+
* This is called a topological ordering (excluding cycles)
|
|
21
|
+
*/
|
|
22
|
+
getCellsDependingOn(ranges: RTreeBoundingBox[]): Set<PositionId>;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./evaluation_plugin";
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { UID, Zone } from "../../../types";
|
|
2
|
+
/**
|
|
3
|
+
* R-Tree Data Structure
|
|
4
|
+
*
|
|
5
|
+
* R-Tree is a spatial data structure used for efficient indexing and querying
|
|
6
|
+
* of multi-dimensional objects, particularly in geometric and spatial applications.
|
|
7
|
+
*
|
|
8
|
+
* It organizes objects into a tree hierarchy, grouping nearby objects together
|
|
9
|
+
* in bounding boxes. Each node in the tree represents a bounding box that
|
|
10
|
+
* contains its child nodes or leaf objects. This hierarchical structure allows
|
|
11
|
+
* for faster spatial queries.
|
|
12
|
+
*
|
|
13
|
+
* @see https://en.wikipedia.org/wiki/R-tree
|
|
14
|
+
*
|
|
15
|
+
* Consider a 2D Space with four zones: A, B, C, D
|
|
16
|
+
* +--------------------------+
|
|
17
|
+
* | |
|
|
18
|
+
* | +---+ +-------+ |
|
|
19
|
+
* | | A | | B | |
|
|
20
|
+
* | +---+ +-------+ |
|
|
21
|
+
* | |
|
|
22
|
+
* | |
|
|
23
|
+
* | +---+ |
|
|
24
|
+
* | | C | |
|
|
25
|
+
* | +---+ |
|
|
26
|
+
* | +-----------+ |
|
|
27
|
+
* | | D | |
|
|
28
|
+
* | +-----------+ |
|
|
29
|
+
* | |
|
|
30
|
+
* +--------------------------+
|
|
31
|
+
*
|
|
32
|
+
* It groups together zones that are spatially close into a minimum bounding box.
|
|
33
|
+
* For example, A and B are grouped together in rectangle R1, and C and D are grouped
|
|
34
|
+
* in R2.
|
|
35
|
+
*
|
|
36
|
+
* R0
|
|
37
|
+
* +--------------------------+
|
|
38
|
+
* | R1 |
|
|
39
|
+
* | +-----------------+ |
|
|
40
|
+
* | | A | | B | |
|
|
41
|
+
* | +-----------------+ |
|
|
42
|
+
* | |
|
|
43
|
+
* | R2 |
|
|
44
|
+
* | +---+---+---+ |
|
|
45
|
+
* | | | C | | |
|
|
46
|
+
* | | +---+ | |
|
|
47
|
+
* | +-----------+ |
|
|
48
|
+
* | | D | |
|
|
49
|
+
* | +-----------+ |
|
|
50
|
+
* | |
|
|
51
|
+
* +--------------------------+
|
|
52
|
+
*
|
|
53
|
+
* The tree would look like this:
|
|
54
|
+
* R0
|
|
55
|
+
* / \
|
|
56
|
+
* / \
|
|
57
|
+
* R1 R2
|
|
58
|
+
* | |
|
|
59
|
+
* A,B C,D
|
|
60
|
+
|
|
61
|
+
* Choosing how to group the zones is crucial for the performance of the tree.
|
|
62
|
+
* Key considerations include avoiding excessive empty space coverage and minimizing overlap
|
|
63
|
+
* to reduce the number of subtrees processed during searches.
|
|
64
|
+
*
|
|
65
|
+
* Various heuristics exist for determining the optimal grouping strategy, such as "least enlargement"
|
|
66
|
+
* which prioritizes grouping nodes resulting in the smallest increase in bounding box size. In cases where
|
|
67
|
+
* the choice cannot be made based on this criterion due to the same enlargement for different groupings,
|
|
68
|
+
* we then evaluate "least area," aiming to minimize the overall area of bounding boxes.
|
|
69
|
+
*
|
|
70
|
+
* This implementation is tailored for spreadsheet use, indexing objects associated
|
|
71
|
+
* with a zone and a sheet.
|
|
72
|
+
*
|
|
73
|
+
* It uses the RBush library under the hood. One 2D RBush R-tree per sheet.
|
|
74
|
+
* @see https://github.com/mourner/rbush
|
|
75
|
+
*/
|
|
76
|
+
export declare class SpreadsheetRTree<T> {
|
|
77
|
+
/**
|
|
78
|
+
* One 2D R-tree per sheet
|
|
79
|
+
*/
|
|
80
|
+
private rTrees;
|
|
81
|
+
/**
|
|
82
|
+
* Bulk-inserts the given items into the tree. Bulk insertion is usually ~2-3 times
|
|
83
|
+
* faster than inserting items one by one. After bulk loading (bulk insertion into
|
|
84
|
+
* an empty tree), subsequent query performance is also ~20-30% better.
|
|
85
|
+
*/
|
|
86
|
+
constructor(items?: RTreeItem[]);
|
|
87
|
+
insert(item: RTreeItem<T>): void;
|
|
88
|
+
search({ zone, sheetId }: RTreeBoundingBox): RTreeItem<T>[];
|
|
89
|
+
remove(item: RTreeItem<T>): void;
|
|
90
|
+
rtreeItemComparer(left: RTreeItem<T>, right: RTreeItem<T>): boolean;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Data associated with a range to be indexed in a R-tree
|
|
94
|
+
*/
|
|
95
|
+
export interface RTreeItem<T = unknown> {
|
|
96
|
+
/**
|
|
97
|
+
* A bounding box to locate the item in the space
|
|
98
|
+
*/
|
|
99
|
+
boundingBox: RTreeBoundingBox;
|
|
100
|
+
/**
|
|
101
|
+
* Any arbitrary data associated with the bounding box
|
|
102
|
+
*/
|
|
103
|
+
data: T;
|
|
104
|
+
}
|
|
105
|
+
export interface RTreeBoundingBox {
|
|
106
|
+
sheetId: UID;
|
|
107
|
+
zone: Zone;
|
|
108
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { PositionId } from "./evaluator";
|
|
2
|
+
/**
|
|
3
|
+
* Contains, for each cell, the array
|
|
4
|
+
* formulas that could potentially spread on it
|
|
5
|
+
* This is essentially a two way mapping between array formulas
|
|
6
|
+
* and their results.
|
|
7
|
+
*
|
|
8
|
+
* As we don't allow two array formulas to spread on the same cell, this structure
|
|
9
|
+
* is used to force the reevaluation of the potential spreaders of a cell when the
|
|
10
|
+
* content of this cell is modified. This structure should be updated each time
|
|
11
|
+
* an array formula is evaluated and try to spread on another cell.
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
export declare class SpreadingRelation {
|
|
15
|
+
/**
|
|
16
|
+
* Internal structure:
|
|
17
|
+
* For something like
|
|
18
|
+
* - A2:'=SPLIT("KAYAK", "A")'
|
|
19
|
+
* - B1:'=TRANSPOSE(SPLIT("COYOTE", "O"))'
|
|
20
|
+
*
|
|
21
|
+
* Resulting in:
|
|
22
|
+
* ```
|
|
23
|
+
* -----------------
|
|
24
|
+
* | | A | B | C |
|
|
25
|
+
* |---+---+---+---|
|
|
26
|
+
* | 1 | | C | |
|
|
27
|
+
* | 2 | K | Y | K |
|
|
28
|
+
* | 3 | | T | |
|
|
29
|
+
* | 4 | | E | |
|
|
30
|
+
* -----------------
|
|
31
|
+
* ```
|
|
32
|
+
* We will have `resultsToArrayFormulas` looking like:
|
|
33
|
+
* - (B2) --> (A2, B1) meaning B2 can be the result of A2 OR B1
|
|
34
|
+
* - (C2) --> (A2) meaning C2 is the result of A2
|
|
35
|
+
* - (B3) --> (B1) meaning B3 is the result of B1
|
|
36
|
+
* - (B4) --> (B1) meaning B4 is the result of B1
|
|
37
|
+
*
|
|
38
|
+
* We will have `arrayFormulasToResults` looking like:
|
|
39
|
+
* - (A2) --> (B2, C2) meaning A2 spreads on B2 and C2
|
|
40
|
+
* - (B1) --> (B2, B3, B4) meaning B1 spreads on B2, B3 and B4
|
|
41
|
+
*
|
|
42
|
+
*/
|
|
43
|
+
private readonly resultsToArrayFormulas;
|
|
44
|
+
private readonly arrayFormulasToResults;
|
|
45
|
+
getFormulaPositionsSpreadingOn(resultPositionId: PositionId): Iterable<PositionId>;
|
|
46
|
+
getArrayResultPositionIds(formulasPositionId: PositionId): Iterable<PositionId>;
|
|
47
|
+
/**
|
|
48
|
+
* Remove a node, also remove it from other nodes adjacency list
|
|
49
|
+
*/
|
|
50
|
+
removeNode(positionId: PositionId): void;
|
|
51
|
+
/**
|
|
52
|
+
* Create a spreading relation between two cells
|
|
53
|
+
*/
|
|
54
|
+
addRelation({ arrayFormulaPositionId, resultPositionId, }: {
|
|
55
|
+
arrayFormulaPositionId: PositionId;
|
|
56
|
+
resultPositionId: PositionId;
|
|
57
|
+
}): void;
|
|
58
|
+
hasArrayFormulaResult(positionId: PositionId): boolean;
|
|
59
|
+
isArrayFormula(positionId: PositionId): boolean;
|
|
60
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Color, CoreViewCommand, Immutable } from "../../types";
|
|
2
|
+
import { UIPlugin } from "../ui_plugin";
|
|
3
|
+
interface CustomColorState {
|
|
4
|
+
readonly customColors: Immutable<Record<Color, true>>;
|
|
5
|
+
readonly shouldUpdateColors: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* CustomColors plugin
|
|
9
|
+
* This plugins aims to compute and keep to custom colors used in the
|
|
10
|
+
* current spreadsheet
|
|
11
|
+
*/
|
|
12
|
+
export declare class CustomColorsPlugin extends UIPlugin<CustomColorState> {
|
|
13
|
+
private readonly customColors;
|
|
14
|
+
private readonly shouldUpdateColors;
|
|
15
|
+
static getters: readonly ["getCustomColors"];
|
|
16
|
+
handle(cmd: CoreViewCommand): void;
|
|
17
|
+
finalize(): void;
|
|
18
|
+
getCustomColors(): Color[];
|
|
19
|
+
private getColorsFromCells;
|
|
20
|
+
private getFormattingColors;
|
|
21
|
+
private getChartColors;
|
|
22
|
+
private tryToAddColor;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Color, ExcelWorkbookData, Range, UID } from "../../types";
|
|
2
|
+
import { ChartRuntime } from "../../types/chart/chart";
|
|
3
|
+
import { CoreViewCommand } from "../../types/commands";
|
|
4
|
+
import { UIPlugin } from "../ui_plugin";
|
|
5
|
+
interface EvaluationChartStyle {
|
|
6
|
+
background: Color;
|
|
7
|
+
fontColor: Color;
|
|
8
|
+
}
|
|
9
|
+
interface EvaluationChartState {
|
|
10
|
+
charts: Record<UID, ChartRuntime | undefined>;
|
|
11
|
+
}
|
|
12
|
+
export declare class EvaluationChartPlugin extends UIPlugin<EvaluationChartState> {
|
|
13
|
+
static getters: readonly ["getChartRuntime", "getStyleOfSingleCellChart"];
|
|
14
|
+
charts: Record<UID, ChartRuntime | undefined>;
|
|
15
|
+
private createRuntimeChart;
|
|
16
|
+
handle(cmd: CoreViewCommand): void;
|
|
17
|
+
getChartRuntime(figureId: UID): ChartRuntime;
|
|
18
|
+
/**
|
|
19
|
+
* Get the background and textColor of a chart based on the color of the first cell of the main range of the chart.
|
|
20
|
+
*/
|
|
21
|
+
getStyleOfSingleCellChart(chartBackground: Color | undefined, mainRange: Range | undefined): EvaluationChartStyle;
|
|
22
|
+
exportForExcel(data: ExcelWorkbookData): void;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { CellPosition, Style } from "../../types/index";
|
|
2
|
+
import { UIPlugin } from "../ui_plugin";
|
|
3
|
+
import { CoreViewCommand } from "./../../types/commands";
|
|
4
|
+
export declare class EvaluationConditionalFormatPlugin extends UIPlugin {
|
|
5
|
+
static getters: readonly ["getConditionalIcon", "getCellComputedStyle"];
|
|
6
|
+
private isStale;
|
|
7
|
+
private computedStyles;
|
|
8
|
+
private computedIcons;
|
|
9
|
+
handle(cmd: CoreViewCommand): void;
|
|
10
|
+
finalize(): void;
|
|
11
|
+
getCellComputedStyle(position: CellPosition): Style;
|
|
12
|
+
getConditionalIcon({ sheetId, col, row }: CellPosition): string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Compute the styles according to the conditional formatting.
|
|
15
|
+
* This computation must happen after the cell values are computed if they change
|
|
16
|
+
*
|
|
17
|
+
* This result of the computation will be in the state.cell[XC].conditionalStyle and will be the union of all the style
|
|
18
|
+
* properties of the rules applied (in order).
|
|
19
|
+
* So if a cell has multiple conditional formatting applied to it, and each affect a different value of the style,
|
|
20
|
+
* the resulting style will have the combination of all those values.
|
|
21
|
+
* If multiple conditional formatting use the same style value, they will be applied in order so that the last applied wins
|
|
22
|
+
*/
|
|
23
|
+
private getComputedStyles;
|
|
24
|
+
private getComputedIcons;
|
|
25
|
+
private parsePoint;
|
|
26
|
+
/** Compute the CF icons for the given range and CF rule, and apply in in the given computedIcons object */
|
|
27
|
+
private applyIcon;
|
|
28
|
+
private computeIcon;
|
|
29
|
+
/** Compute the color scale for the given range and CF rule, and apply in in the given computedStyle object */
|
|
30
|
+
private applyColorScale;
|
|
31
|
+
private computeColorDiffUnits;
|
|
32
|
+
private colorCell;
|
|
33
|
+
/**
|
|
34
|
+
* Execute the predicate to know if a conditional formatting rule should be applied to a cell
|
|
35
|
+
*/
|
|
36
|
+
private rulePredicate;
|
|
37
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { CellPosition, CellValue, DataValidationCriterionType, DataValidationRule, HeaderIndex, Lazy, UID } from "../../types";
|
|
2
|
+
import { CoreViewCommand } from "../../types/commands";
|
|
3
|
+
import { UIPlugin } from "../ui_plugin";
|
|
4
|
+
interface InvalidValidationResult {
|
|
5
|
+
readonly isValid: false;
|
|
6
|
+
readonly rule: DataValidationRule;
|
|
7
|
+
readonly error: string;
|
|
8
|
+
}
|
|
9
|
+
interface ValidValidationResult {
|
|
10
|
+
readonly isValid: true;
|
|
11
|
+
}
|
|
12
|
+
type ValidationResult = ValidValidationResult | InvalidValidationResult;
|
|
13
|
+
type SheetValidationResult = {
|
|
14
|
+
[col: HeaderIndex]: Array<Lazy<ValidationResult>>;
|
|
15
|
+
};
|
|
16
|
+
export declare class EvaluationDataValidationPlugin extends UIPlugin {
|
|
17
|
+
static getters: readonly ["getDataValidationInvalidCriterionValueMessage", "getInvalidDataValidationMessage", "getValidationResultForCellValue", "isCellValidCheckbox", "isDataValidationInvalid"];
|
|
18
|
+
validationResults: Record<UID, SheetValidationResult>;
|
|
19
|
+
handle(cmd: CoreViewCommand): void;
|
|
20
|
+
isDataValidationInvalid(cellPosition: CellPosition): boolean;
|
|
21
|
+
getInvalidDataValidationMessage(cellPosition: CellPosition): string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Check if the value is valid for the given criterion, and return an error message if not.
|
|
24
|
+
*
|
|
25
|
+
* The value must be canonicalized.
|
|
26
|
+
*/
|
|
27
|
+
getDataValidationInvalidCriterionValueMessage(criterionType: DataValidationCriterionType, value: string): string | undefined;
|
|
28
|
+
isCellValidCheckbox(cellPosition: CellPosition): boolean;
|
|
29
|
+
/** Get the validation result if the cell on the given position had the given value */
|
|
30
|
+
getValidationResultForCellValue(cellValue: CellValue, cellPosition: CellPosition): ValidationResult;
|
|
31
|
+
private getValidationResultForCell;
|
|
32
|
+
private computeSheetValidationResults;
|
|
33
|
+
private getRuleErrorForCellValue;
|
|
34
|
+
/** Get the offset of the cell inside the ranges of the rule. Throws an error if the cell isn't inside the rule. */
|
|
35
|
+
private getCellOffsetInRule;
|
|
36
|
+
private getEvaluatedCriterionValues;
|
|
37
|
+
}
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Command } from "../../types";
|
|
2
|
+
import { CellPosition, Dimension, HeaderIndex, Immutable, Pixel, UID } from "../../types/misc";
|
|
3
|
+
import { UIPlugin } from "../ui_plugin";
|
|
4
|
+
interface HeaderSizeState {
|
|
5
|
+
tallestCellInRow: Immutable<Record<UID, Array<CellWithSize | undefined>>>;
|
|
6
|
+
}
|
|
7
|
+
interface CellWithSize {
|
|
8
|
+
cell: CellPosition;
|
|
9
|
+
size: Pixel;
|
|
10
|
+
}
|
|
11
|
+
export declare class HeaderSizeUIPlugin extends UIPlugin<HeaderSizeState> implements HeaderSizeState {
|
|
12
|
+
static getters: readonly ["getRowSize", "getHeaderSize"];
|
|
13
|
+
readonly tallestCellInRow: Immutable<Record<UID, Array<CellWithSize | undefined>>>;
|
|
14
|
+
private ctx;
|
|
15
|
+
beforeHandle(cmd: Command): void;
|
|
16
|
+
handle(cmd: Command): void;
|
|
17
|
+
getRowSize(sheetId: UID, row: HeaderIndex): Pixel;
|
|
18
|
+
getHeaderSize(sheetId: UID, dimension: Dimension, index: HeaderIndex): Pixel;
|
|
19
|
+
private updateRowSizeForCellChange;
|
|
20
|
+
private initializeSheet;
|
|
21
|
+
/**
|
|
22
|
+
* Return the height the cell should have in the sheet, which is either DEFAULT_CELL_HEIGHT if the cell is in a multi-row
|
|
23
|
+
* merge, or the height of the cell computed based on its style/content.
|
|
24
|
+
*/
|
|
25
|
+
private getCellHeight;
|
|
26
|
+
private isInMultiRowMerge;
|
|
27
|
+
/**
|
|
28
|
+
* Get the tallest cell of a row and its size.
|
|
29
|
+
*/
|
|
30
|
+
private getRowTallestCell;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Command, CommandResult, GridRenderingContext, LAYERS, LocalCommand, Tooltip } from "../../types/index";
|
|
2
|
+
import { UIPlugin } from "../ui_plugin";
|
|
3
|
+
/**
|
|
4
|
+
* Autofill Plugin
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
export declare class AutofillPlugin extends UIPlugin {
|
|
8
|
+
static layers: LAYERS[];
|
|
9
|
+
static getters: readonly ["getAutofillTooltip"];
|
|
10
|
+
private autofillZone;
|
|
11
|
+
private steps;
|
|
12
|
+
private lastCellSelected;
|
|
13
|
+
private direction;
|
|
14
|
+
private tooltip;
|
|
15
|
+
allowDispatch(cmd: LocalCommand): CommandResult;
|
|
16
|
+
handle(cmd: Command): void;
|
|
17
|
+
getAutofillTooltip(): Tooltip | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Autofill the autofillZone from the current selection
|
|
20
|
+
* @param apply Flag set to true to apply the autofill in the model. It's
|
|
21
|
+
* useful to set it to false when we need to fill the tooltip
|
|
22
|
+
*/
|
|
23
|
+
private autofill;
|
|
24
|
+
private collectBordersData;
|
|
25
|
+
private collectConditionalFormatsData;
|
|
26
|
+
private collectDataValidationsData;
|
|
27
|
+
private autofillCell;
|
|
28
|
+
private autofillBorders;
|
|
29
|
+
private autofillConditionalFormats;
|
|
30
|
+
private autofillDataValidations;
|
|
31
|
+
/**
|
|
32
|
+
* Select a cell which becomes the last cell of the autofillZone
|
|
33
|
+
*/
|
|
34
|
+
private select;
|
|
35
|
+
/**
|
|
36
|
+
* Computes the autofillZone to autofill when the user double click on the
|
|
37
|
+
* autofiller
|
|
38
|
+
*/
|
|
39
|
+
private autofillAuto;
|
|
40
|
+
/**
|
|
41
|
+
* Generate the next cell
|
|
42
|
+
*/
|
|
43
|
+
private computeNewCell;
|
|
44
|
+
/**
|
|
45
|
+
* Get the rule associated to the current cell
|
|
46
|
+
*/
|
|
47
|
+
private getRule;
|
|
48
|
+
/**
|
|
49
|
+
* Create the generator to be able to autofill the next cells.
|
|
50
|
+
*/
|
|
51
|
+
private createGenerator;
|
|
52
|
+
private saveZone;
|
|
53
|
+
/**
|
|
54
|
+
* Compute the direction of the autofill from the last selected zone and
|
|
55
|
+
* a given cell (col, row)
|
|
56
|
+
*/
|
|
57
|
+
private getDirection;
|
|
58
|
+
private autofillMerge;
|
|
59
|
+
drawGrid(renderingContext: GridRenderingContext): void;
|
|
60
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { Command, Position, UID, Zone } from "../../types";
|
|
2
|
+
import { UIPlugin } from "../ui_plugin";
|
|
3
|
+
interface AutomaticSum {
|
|
4
|
+
position: Position;
|
|
5
|
+
zone: Zone;
|
|
6
|
+
}
|
|
7
|
+
export declare class AutomaticSumPlugin extends UIPlugin {
|
|
8
|
+
static getters: readonly ["getAutomaticSums"];
|
|
9
|
+
handle(cmd: Command): void;
|
|
10
|
+
getAutomaticSums(sheetId: UID, zone: Zone, anchor: Position): AutomaticSum[];
|
|
11
|
+
private sumData;
|
|
12
|
+
private sumAdjacentData;
|
|
13
|
+
/**
|
|
14
|
+
* Find a zone to automatically sum a column or row of numbers.
|
|
15
|
+
*
|
|
16
|
+
* We first decide which direction will be summed (column or row).
|
|
17
|
+
* Here is the strategy:
|
|
18
|
+
* 1. If the left cell is a number and the top cell is not: choose horizontal
|
|
19
|
+
* 2. Try to find a valid vertical zone. If it's valid: choose vertical
|
|
20
|
+
* 3. Try to find a valid horizontal zone. If it's valid: choose horizontal
|
|
21
|
+
* 4. Otherwise, no zone is returned
|
|
22
|
+
*
|
|
23
|
+
* Now, how to find a valid zone?
|
|
24
|
+
* The zone starts directly above or on the left of the starting point
|
|
25
|
+
* (depending on the direction).
|
|
26
|
+
* The zone ends where the first continuous sequence of numbers ends.
|
|
27
|
+
* Empty or text cells can be part of the zone while no number has been found.
|
|
28
|
+
* Other kind of cells (boolean, dates, etc.) are not valid in the zone and the
|
|
29
|
+
* search stops immediately if one is found.
|
|
30
|
+
*
|
|
31
|
+
* ------- -------
|
|
32
|
+
* | 1 | | 1 |
|
|
33
|
+
* ------- -------
|
|
34
|
+
* | | | |
|
|
35
|
+
* ------- <= end of the sequence, stop here -------
|
|
36
|
+
* | 2 | | 2 |
|
|
37
|
+
* ------- -------
|
|
38
|
+
* | 3 | <= start of the number sequence | 3 |
|
|
39
|
+
* ------- -------
|
|
40
|
+
* | | <= ignored | FALSE | <= invalid, no zone is found
|
|
41
|
+
* ------- -------
|
|
42
|
+
* | A | <= ignored | A | <= ignored
|
|
43
|
+
* ------- -------
|
|
44
|
+
*/
|
|
45
|
+
private findAdjacentData;
|
|
46
|
+
/**
|
|
47
|
+
* Return the zone to sum if a valid one is found.
|
|
48
|
+
* @see getAutomaticSumZone
|
|
49
|
+
*/
|
|
50
|
+
private findSuitableZoneToSum;
|
|
51
|
+
private findVerticalZone;
|
|
52
|
+
private findHorizontalZone;
|
|
53
|
+
/**
|
|
54
|
+
* Reduces a column or row zone to a valid zone for the automatic sum.
|
|
55
|
+
* @see getAutomaticSumZone
|
|
56
|
+
* @param sheet
|
|
57
|
+
* @param zone one dimensional zone (a single row or a single column). The zone is
|
|
58
|
+
* assumed to start at the beginning of the column (top=0) or the row (left=0)
|
|
59
|
+
* @param end end index of the zone (`bottom` or `right` depending on the dimension)
|
|
60
|
+
* @returns the starting position of the valid zone or Infinity if the zone is not valid.
|
|
61
|
+
*/
|
|
62
|
+
private reduceZoneStart;
|
|
63
|
+
private shouldFindData;
|
|
64
|
+
private isNumber;
|
|
65
|
+
private isZoneValid;
|
|
66
|
+
private lastColIsEmpty;
|
|
67
|
+
private lastRowIsEmpty;
|
|
68
|
+
/**
|
|
69
|
+
* Decides which dimensions (columns or rows) should be summed
|
|
70
|
+
* based on its shape and what's inside the zone.
|
|
71
|
+
*/
|
|
72
|
+
private dimensionsToSum;
|
|
73
|
+
/**
|
|
74
|
+
* Sum each column and/or row in the zone in the appropriate cells,
|
|
75
|
+
* depending on the available space.
|
|
76
|
+
*/
|
|
77
|
+
private sumDimensions;
|
|
78
|
+
/**
|
|
79
|
+
* Sum the total of the zone in the bottom right cell, assuming
|
|
80
|
+
* the last row contains summed columns.
|
|
81
|
+
*/
|
|
82
|
+
private sumTotal;
|
|
83
|
+
private sumColumns;
|
|
84
|
+
private sumRows;
|
|
85
|
+
private dispatchCellUpdates;
|
|
86
|
+
/**
|
|
87
|
+
* Find the first row where all cells below the zone are empty.
|
|
88
|
+
*/
|
|
89
|
+
private nextEmptyRow;
|
|
90
|
+
/**
|
|
91
|
+
* Find the first column where all cells right of the zone are empty.
|
|
92
|
+
*/
|
|
93
|
+
private nextEmptyCol;
|
|
94
|
+
/**
|
|
95
|
+
* Transpose the given dimensions.
|
|
96
|
+
* COL becomes ROW
|
|
97
|
+
* ROW becomes COL
|
|
98
|
+
*/
|
|
99
|
+
private transpose;
|
|
100
|
+
}
|
|
101
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Command, CommandResult, LocalCommand, Position } from "../../types";
|
|
2
|
+
import { CellPopoverType, ClosedCellPopover, PositionedCellPopover } from "../../types/cell_popovers";
|
|
3
|
+
import { UIPlugin } from "../ui_plugin";
|
|
4
|
+
/**
|
|
5
|
+
* Plugin managing the display of components next to cells.
|
|
6
|
+
*/
|
|
7
|
+
export declare class CellPopoverPlugin extends UIPlugin {
|
|
8
|
+
static getters: readonly ["getCellPopover", "getPersistentPopoverTypeAtPosition", "hasOpenedPopover"];
|
|
9
|
+
private persistentPopover?;
|
|
10
|
+
allowDispatch(cmd: LocalCommand): CommandResult;
|
|
11
|
+
handle(cmd: Command): void;
|
|
12
|
+
getCellPopover({ col, row }: Partial<Position>): ClosedCellPopover | PositionedCellPopover;
|
|
13
|
+
hasOpenedPopover(): boolean;
|
|
14
|
+
getPersistentPopoverTypeAtPosition({ col, row }: Position): CellPopoverType | undefined;
|
|
15
|
+
private computePopoverAnchorRect;
|
|
16
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Client, Color, GridRenderingContext, LAYERS } from "../../types";
|
|
2
|
+
import { UIPlugin, UIPluginConfig } from "../ui_plugin";
|
|
3
|
+
interface ClientToDisplay extends Required<Client> {
|
|
4
|
+
color: Color;
|
|
5
|
+
}
|
|
6
|
+
export declare class CollaborativePlugin extends UIPlugin {
|
|
7
|
+
static getters: readonly ["getClientsToDisplay", "getClient", "getConnectedClients", "isFullySynchronized"];
|
|
8
|
+
static layers: LAYERS[];
|
|
9
|
+
private availableColors;
|
|
10
|
+
private colors;
|
|
11
|
+
private session;
|
|
12
|
+
constructor(config: UIPluginConfig);
|
|
13
|
+
private isPositionValid;
|
|
14
|
+
private chooseNewColor;
|
|
15
|
+
getClient(): Client;
|
|
16
|
+
getConnectedClients(): Set<Client>;
|
|
17
|
+
isFullySynchronized(): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Get the list of others connected clients which are present in the same sheet
|
|
20
|
+
* and with a valid position
|
|
21
|
+
*/
|
|
22
|
+
getClientsToDisplay(): ClientToDisplay[];
|
|
23
|
+
drawGrid(renderingContext: GridRenderingContext): void;
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Command, CommandResult } from "../../types/index";
|
|
2
|
+
import { UIPlugin } from "../ui_plugin";
|
|
3
|
+
export declare class DataCleanupPlugin extends UIPlugin {
|
|
4
|
+
allowDispatch(cmd: Command): CommandResult | CommandResult[];
|
|
5
|
+
handle(cmd: Command): void;
|
|
6
|
+
private removeDuplicates;
|
|
7
|
+
private getUniqueRowsIndexes;
|
|
8
|
+
private notifyRowsRemovedAndRemaining;
|
|
9
|
+
private checkSingleRangeSelected;
|
|
10
|
+
private checkNoMergeInZone;
|
|
11
|
+
private checkRangeContainsValues;
|
|
12
|
+
private checkNoColumnProvided;
|
|
13
|
+
private checkColumnsIncludedInZone;
|
|
14
|
+
private checkColumnsAreUnique;
|
|
15
|
+
private trimWhitespace;
|
|
16
|
+
}
|