@odoo/o-spreadsheet 17.0.85 → 17.0.97
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 +45990 -53385
- package/dist/o-spreadsheet.esm.js +45805 -53384
- package/dist/o-spreadsheet.iife.js +50220 -57798
- 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 +41 -24
- package/dist/o-spreadsheet.d.ts +0 -8046
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export interface StreamCallbacks<Event> {
|
|
2
|
+
handleEvent: (event: Event) => void;
|
|
3
|
+
/** this callback will only be called when another consumer captures the stream,
|
|
4
|
+
* not when the current consumer decides to release itself */
|
|
5
|
+
release?: () => void;
|
|
6
|
+
}
|
|
7
|
+
type Owner = unknown;
|
|
8
|
+
/**
|
|
9
|
+
* Stateless sequence of events that can be processed by consumers.
|
|
10
|
+
*
|
|
11
|
+
* There are three kind of consumers:
|
|
12
|
+
* - the main consumer
|
|
13
|
+
* - the default consumer
|
|
14
|
+
* - observer consumers
|
|
15
|
+
*
|
|
16
|
+
* Main consumer
|
|
17
|
+
* -------------
|
|
18
|
+
* Anyone can capture the event stream and become the main consumer.
|
|
19
|
+
* If there is already a main consumer, it is kicked off and it will no longer
|
|
20
|
+
* receive events.
|
|
21
|
+
* The main consumer can release the stream at any moment to stop listening
|
|
22
|
+
* events.
|
|
23
|
+
*
|
|
24
|
+
* Default consumer
|
|
25
|
+
* ----------------
|
|
26
|
+
* When the main consumer releases the stream and until the stream is captured
|
|
27
|
+
* again, all events are transmitted to the default consumer.
|
|
28
|
+
*
|
|
29
|
+
* Observer consumers
|
|
30
|
+
* ------------------
|
|
31
|
+
* Observers permanently receive events.
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
export declare class EventStream<Event> {
|
|
35
|
+
private observers;
|
|
36
|
+
/**
|
|
37
|
+
* the one we default to when someone releases the stream by themeselves
|
|
38
|
+
*/
|
|
39
|
+
private defaultSubscription?;
|
|
40
|
+
private mainSubscription?;
|
|
41
|
+
registerAsDefault(owner: Owner, callbacks: StreamCallbacks<Event>): void;
|
|
42
|
+
/**
|
|
43
|
+
* Register callbacks to observe the stream
|
|
44
|
+
*/
|
|
45
|
+
observe(owner: Owner, callbacks: StreamCallbacks<Event>): void;
|
|
46
|
+
/**
|
|
47
|
+
* Capture the stream for yourself
|
|
48
|
+
*/
|
|
49
|
+
capture(owner: Owner, callbacks: StreamCallbacks<Event>): void;
|
|
50
|
+
release(owner: Owner): void;
|
|
51
|
+
/**
|
|
52
|
+
* Release whichever subscription in charge and get back to the default subscription
|
|
53
|
+
*/
|
|
54
|
+
getBackToDefault(): void;
|
|
55
|
+
/**
|
|
56
|
+
* Check if you are currently the main stream consumer
|
|
57
|
+
*/
|
|
58
|
+
isListening(owner: Owner): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Push an event to the stream and broadcast it to consumers
|
|
61
|
+
*/
|
|
62
|
+
send(event: Event): void;
|
|
63
|
+
}
|
|
64
|
+
export {};
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { AnchorZone, Direction, DispatchResult, Getters, SelectionStep } from "../types";
|
|
2
|
+
import { SelectionEvent, SelectionEventOptions } from "../types/event_stream";
|
|
3
|
+
import { HeaderIndex } from "./../types/misc";
|
|
4
|
+
import { StreamCallbacks } from "./event_stream";
|
|
5
|
+
type StatefulStream<Event, State> = {
|
|
6
|
+
capture(owner: unknown, state: State, callbacks: StreamCallbacks<Event>): void;
|
|
7
|
+
registerAsDefault: (owner: unknown, state: State, callbacks: StreamCallbacks<Event>) => void;
|
|
8
|
+
resetDefaultAnchor: (owner: unknown, state: State) => void;
|
|
9
|
+
resetAnchor: (owner: unknown, state: State) => void;
|
|
10
|
+
observe: (owner: unknown, callbacks: StreamCallbacks<Event>) => void;
|
|
11
|
+
release: (owner: unknown) => void;
|
|
12
|
+
getBackToDefault(): void;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Allows to select cells in the grid and update the selection
|
|
16
|
+
*/
|
|
17
|
+
interface SelectionProcessor {
|
|
18
|
+
selectZone(anchor: AnchorZone, options?: SelectionEventOptions): DispatchResult;
|
|
19
|
+
selectCell(col: number, row: number): DispatchResult;
|
|
20
|
+
moveAnchorCell(direction: Direction, step: SelectionStep): DispatchResult;
|
|
21
|
+
setAnchorCorner(col: number, row: number): DispatchResult;
|
|
22
|
+
addCellToSelection(col: number, row: number): DispatchResult;
|
|
23
|
+
resizeAnchorZone(direction: Direction, step: SelectionStep): DispatchResult;
|
|
24
|
+
selectColumn(index: number, mode: SelectionEvent["mode"]): DispatchResult;
|
|
25
|
+
selectRow(index: number, mode: SelectionEvent["mode"]): DispatchResult;
|
|
26
|
+
selectAll(): DispatchResult;
|
|
27
|
+
loopSelection(): DispatchResult;
|
|
28
|
+
selectTableAroundSelection(): DispatchResult;
|
|
29
|
+
isListening(owner: unknown): boolean;
|
|
30
|
+
}
|
|
31
|
+
export type SelectionStreamProcessor = SelectionProcessor & StatefulStream<SelectionEvent, AnchorZone>;
|
|
32
|
+
/**
|
|
33
|
+
* Processes all selection updates (usually from user inputs) and emits an event
|
|
34
|
+
* with the new selected anchor
|
|
35
|
+
*/
|
|
36
|
+
export declare class SelectionStreamProcessorImpl implements SelectionStreamProcessor {
|
|
37
|
+
private getters;
|
|
38
|
+
private stream;
|
|
39
|
+
/**
|
|
40
|
+
* "Active" anchor used as a reference to compute new anchors
|
|
41
|
+
* An new initial value is given each time the stream is
|
|
42
|
+
* captured. The value is updated with each new anchor.
|
|
43
|
+
*/
|
|
44
|
+
private anchor;
|
|
45
|
+
private defaultAnchor;
|
|
46
|
+
constructor(getters: Getters);
|
|
47
|
+
capture(owner: unknown, anchor: AnchorZone, callbacks: StreamCallbacks<SelectionEvent>): void;
|
|
48
|
+
/**
|
|
49
|
+
* Register as default subscriber and capture the event stream.
|
|
50
|
+
*/
|
|
51
|
+
registerAsDefault(owner: unknown, anchor: AnchorZone, callbacks: StreamCallbacks<SelectionEvent>): void;
|
|
52
|
+
resetDefaultAnchor(owner: unknown, anchor: AnchorZone): void;
|
|
53
|
+
resetAnchor(owner: unknown, anchor: AnchorZone): void;
|
|
54
|
+
observe(owner: unknown, callbacks: StreamCallbacks<SelectionEvent>): void;
|
|
55
|
+
release(owner: unknown): void;
|
|
56
|
+
getBackToDefault(): void;
|
|
57
|
+
private modifyAnchor;
|
|
58
|
+
/**
|
|
59
|
+
* Select a new anchor
|
|
60
|
+
*/
|
|
61
|
+
selectZone(anchor: AnchorZone, options?: SelectionEventOptions): DispatchResult;
|
|
62
|
+
/**
|
|
63
|
+
* Select a single cell as the new anchor.
|
|
64
|
+
*/
|
|
65
|
+
selectCell(col: HeaderIndex, row: HeaderIndex): DispatchResult;
|
|
66
|
+
/**
|
|
67
|
+
* Set the selection to one of the cells adjacent to the current anchor cell.
|
|
68
|
+
*/
|
|
69
|
+
moveAnchorCell(direction: Direction, step?: SelectionStep): DispatchResult;
|
|
70
|
+
/**
|
|
71
|
+
* Update the current anchor such that it includes the given
|
|
72
|
+
* cell position.
|
|
73
|
+
*/
|
|
74
|
+
setAnchorCorner(col: HeaderIndex, row: HeaderIndex): DispatchResult;
|
|
75
|
+
/**
|
|
76
|
+
* Add a new cell to the current selection
|
|
77
|
+
*/
|
|
78
|
+
addCellToSelection(col: HeaderIndex, row: HeaderIndex): DispatchResult;
|
|
79
|
+
/**
|
|
80
|
+
* Increase or decrease the size of the current anchor zone.
|
|
81
|
+
* The anchor cell remains where it is. It's the opposite side
|
|
82
|
+
* of the anchor zone which moves.
|
|
83
|
+
*/
|
|
84
|
+
resizeAnchorZone(direction: Direction, step?: SelectionStep): DispatchResult;
|
|
85
|
+
selectColumn(index: HeaderIndex, mode: SelectionEvent["mode"]): DispatchResult;
|
|
86
|
+
selectRow(index: HeaderIndex, mode: SelectionEvent["mode"]): DispatchResult;
|
|
87
|
+
/**
|
|
88
|
+
* Loop the current selection while keeping the same anchor. The selection will loop through:
|
|
89
|
+
* 1) the smallest zone that contain the anchor and that have only empty cells bordering it
|
|
90
|
+
* 2) the whole sheet
|
|
91
|
+
* 3) the anchor cell
|
|
92
|
+
*/
|
|
93
|
+
loopSelection(): DispatchResult;
|
|
94
|
+
/**
|
|
95
|
+
* Select a "table" around the current selection.
|
|
96
|
+
* We define a table by the smallest zone that contain the anchor and that have only empty
|
|
97
|
+
* cells bordering it
|
|
98
|
+
*/
|
|
99
|
+
selectTableAroundSelection(): DispatchResult;
|
|
100
|
+
/**
|
|
101
|
+
* Select the entire sheet
|
|
102
|
+
*/
|
|
103
|
+
selectAll(): DispatchResult;
|
|
104
|
+
isListening(owner: unknown): boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Process a new anchor selection event. If the new anchor is inside
|
|
107
|
+
* the sheet boundaries, the event is pushed to the event stream to
|
|
108
|
+
* be processed.
|
|
109
|
+
*/
|
|
110
|
+
private processEvent;
|
|
111
|
+
private checkEventAnchorZone;
|
|
112
|
+
private checkAnchorZone;
|
|
113
|
+
private checkAnchorZoneOrThrow;
|
|
114
|
+
/**
|
|
115
|
+
* ---- PRIVATE ----
|
|
116
|
+
*/
|
|
117
|
+
/** Computes the next cell position in the direction of deltaX and deltaY
|
|
118
|
+
* by crossing through merges and skipping hidden cells.
|
|
119
|
+
* Note that the resulting position might be out of the sheet, it needs to be validated.
|
|
120
|
+
*/
|
|
121
|
+
private getNextAvailablePosition;
|
|
122
|
+
private getNextAvailableCol;
|
|
123
|
+
private getNextAvailableRow;
|
|
124
|
+
private getNextAvailableHeader;
|
|
125
|
+
/**
|
|
126
|
+
* Finds a visible cell in the currently selected zone starting with the anchor.
|
|
127
|
+
* If the anchor is hidden, browses from left to right and top to bottom to
|
|
128
|
+
* find a visible cell.
|
|
129
|
+
*/
|
|
130
|
+
private getReferenceAnchor;
|
|
131
|
+
private deltaToTarget;
|
|
132
|
+
private getStartingPosition;
|
|
133
|
+
/**
|
|
134
|
+
* Given a starting position, compute the end of the cluster containing the position in the given
|
|
135
|
+
* direction or the start of the next cluster. We define cluster here as side-by-side cells that
|
|
136
|
+
* all have a content.
|
|
137
|
+
*
|
|
138
|
+
* We will return the end of the cluster if the given cell is inside a cluster, and the start of the
|
|
139
|
+
* next cluster if the given cell is outside a cluster or at the border of a cluster in the given direction.
|
|
140
|
+
*/
|
|
141
|
+
private getEndOfCluster;
|
|
142
|
+
/**
|
|
143
|
+
* Checks if a cell is empty (i.e. does not have a content). If the cell is part of a merge,
|
|
144
|
+
* the check applies to the main cell of the merge.
|
|
145
|
+
*/
|
|
146
|
+
private isCellEmpty;
|
|
147
|
+
/**
|
|
148
|
+
* Checks if a cell evaluated value is empty. If the cell is part of a merge,
|
|
149
|
+
* the check applies to the main cell of the merge.
|
|
150
|
+
*/
|
|
151
|
+
private isEvaluatedCellEmpty;
|
|
152
|
+
/** Computes the next cell position in the given direction by crossing through merges and skipping hidden cells.
|
|
153
|
+
*
|
|
154
|
+
* This has the same behaviour as getNextAvailablePosition() for certain arguments, but use this method instead
|
|
155
|
+
* inside directionToDelta(), which is called in getNextAvailablePosition(), to avoid possible infinite
|
|
156
|
+
* recursion.
|
|
157
|
+
*/
|
|
158
|
+
private getNextCellPosition;
|
|
159
|
+
private getPosition;
|
|
160
|
+
/**
|
|
161
|
+
* Expand the given zone to a table.
|
|
162
|
+
* We define a table by the smallest zone that contain the anchor and that have only empty
|
|
163
|
+
* cells bordering it
|
|
164
|
+
*/
|
|
165
|
+
private expandZoneToTable;
|
|
166
|
+
}
|
|
167
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CoreCommand, HistoryChange } from "./types";
|
|
2
|
+
export declare class StateObserver {
|
|
3
|
+
private changes;
|
|
4
|
+
private commands;
|
|
5
|
+
/**
|
|
6
|
+
* Record the changes which could happen in the given callback, save them in a
|
|
7
|
+
* new revision with the given id and userId.
|
|
8
|
+
*/
|
|
9
|
+
recordChanges(callback: () => void): {
|
|
10
|
+
changes: HistoryChange[];
|
|
11
|
+
commands: CoreCommand[];
|
|
12
|
+
};
|
|
13
|
+
addCommand(command: CoreCommand): void;
|
|
14
|
+
addChange(...args: [...HistoryChange["path"], any]): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type SprintfValues = (string | String | number)[] | [{
|
|
2
|
+
[key: string]: string | number;
|
|
3
|
+
}];
|
|
4
|
+
export type TranslationFunction = (string: string, ...values: SprintfValues) => string;
|
|
5
|
+
/***
|
|
6
|
+
* Allow to inject a translation function from outside o-spreadsheet. This should be called before instantiating
|
|
7
|
+
* a model.
|
|
8
|
+
* @param tfn the function that will do the translation
|
|
9
|
+
* @param loaded a function that returns true when the translation is loaded
|
|
10
|
+
*/
|
|
11
|
+
export declare function setTranslationMethod(tfn: TranslationFunction, loaded?: () => boolean): void;
|
|
12
|
+
/**
|
|
13
|
+
* If no translation function has been set, this will mark the translation are loaded.
|
|
14
|
+
*
|
|
15
|
+
* By default, the translations should not be set as loaded, otherwise top-level translated constants will never be
|
|
16
|
+
* translated. But if by the time the model is instantiated no custom translation function has been set, we can set
|
|
17
|
+
* the default translation function as loaded so o-spreadsheet can be run in standalone with no translations.
|
|
18
|
+
*/
|
|
19
|
+
export declare function setDefaultTranslationMethod(): void;
|
|
20
|
+
export declare const _t: TranslationFunction;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An AutofillModifier describe the possible operations to apply to the
|
|
3
|
+
* content of a cell when we autofill this cell.
|
|
4
|
+
*
|
|
5
|
+
* It could be:
|
|
6
|
+
* - Increment: increment the content by a given step
|
|
7
|
+
* - Copy: simply copy the content
|
|
8
|
+
* - Formula: update the formula, with the same behavior than paste
|
|
9
|
+
*/
|
|
10
|
+
import { Getters } from ".";
|
|
11
|
+
import { Cell } from "./cells";
|
|
12
|
+
import { Border, DIRECTION, UID, UpdateCellData } from "./misc";
|
|
13
|
+
export interface IncrementModifier {
|
|
14
|
+
type: "INCREMENT_MODIFIER";
|
|
15
|
+
increment: number;
|
|
16
|
+
current: number;
|
|
17
|
+
}
|
|
18
|
+
export interface AlphanumericIncrementModifier {
|
|
19
|
+
type: "ALPHANUMERIC_INCREMENT_MODIFIER";
|
|
20
|
+
increment: number;
|
|
21
|
+
current: number;
|
|
22
|
+
prefix: string;
|
|
23
|
+
numberPostfixLength: number;
|
|
24
|
+
}
|
|
25
|
+
export interface CopyModifier {
|
|
26
|
+
type: "COPY_MODIFIER";
|
|
27
|
+
}
|
|
28
|
+
export interface FormulaModifier {
|
|
29
|
+
type: "FORMULA_MODIFIER";
|
|
30
|
+
increment: number;
|
|
31
|
+
current: number;
|
|
32
|
+
}
|
|
33
|
+
export type AutofillModifier = IncrementModifier | AlphanumericIncrementModifier | CopyModifier | FormulaModifier;
|
|
34
|
+
export interface Tooltip {
|
|
35
|
+
props: any;
|
|
36
|
+
component?: any;
|
|
37
|
+
}
|
|
38
|
+
export interface AutofillCellData extends UpdateCellData {
|
|
39
|
+
border?: Border;
|
|
40
|
+
}
|
|
41
|
+
export interface AutofillData {
|
|
42
|
+
cell?: Cell;
|
|
43
|
+
col: number;
|
|
44
|
+
row: number;
|
|
45
|
+
sheetId: UID;
|
|
46
|
+
border?: Border;
|
|
47
|
+
}
|
|
48
|
+
export interface AutofillResult {
|
|
49
|
+
cellData: AutofillCellData;
|
|
50
|
+
tooltip?: Tooltip;
|
|
51
|
+
origin: {
|
|
52
|
+
col: number;
|
|
53
|
+
row: number;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export interface GeneratorCell {
|
|
57
|
+
data: AutofillData;
|
|
58
|
+
rule: AutofillModifier;
|
|
59
|
+
}
|
|
60
|
+
export interface AutofillModifierImplementation {
|
|
61
|
+
apply: (rule: AutofillModifier, data: AutofillData, getters: Getters, direction: DIRECTION) => Omit<AutofillResult, "origin">;
|
|
62
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ComponentConstructor } from "@odoo/owl";
|
|
2
|
+
import { Getters } from "./index";
|
|
3
|
+
import { CellPosition, PropsOf } from "./misc";
|
|
4
|
+
import { Rect } from "./rendering";
|
|
5
|
+
export type CellPopoverType = "ErrorToolTip" | "LinkDisplay" | "FilterMenu" | "LinkEditor";
|
|
6
|
+
export type PopoverPropsPosition = "TopRight" | "BottomLeft";
|
|
7
|
+
type MaxSizedComponentConstructor = ComponentConstructor & {
|
|
8
|
+
maxSize?: {
|
|
9
|
+
maxWidth?: number;
|
|
10
|
+
maxHeight?: number;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* If the cell at the given position have an associated component (linkDisplay, errorTooltip, ...),
|
|
15
|
+
* returns the parameters to display the component
|
|
16
|
+
*/
|
|
17
|
+
type CellPopoverBuilder = (position: CellPosition, getters: Getters) => CellPopoverComponent<MaxSizedComponentConstructor>;
|
|
18
|
+
export interface PopoverBuilders {
|
|
19
|
+
onOpen?: CellPopoverBuilder;
|
|
20
|
+
onHover?: CellPopoverBuilder;
|
|
21
|
+
}
|
|
22
|
+
export interface ClosedCellPopover {
|
|
23
|
+
isOpen: false;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Description of a cell component.
|
|
27
|
+
* i.e. which component class, which props and where to
|
|
28
|
+
* display it relative to the cell
|
|
29
|
+
*/
|
|
30
|
+
type OpenCellPopover<C extends ComponentConstructor> = {
|
|
31
|
+
isOpen: true;
|
|
32
|
+
Component: C;
|
|
33
|
+
props: PropsOf<C>;
|
|
34
|
+
cellCorner: PopoverPropsPosition;
|
|
35
|
+
};
|
|
36
|
+
export type CellPopoverComponent<C extends MaxSizedComponentConstructor = MaxSizedComponentConstructor> = ClosedCellPopover | OpenCellPopover<C>;
|
|
37
|
+
export type PositionedCellPopover<C extends MaxSizedComponentConstructor = MaxSizedComponentConstructor> = {
|
|
38
|
+
isOpen: true;
|
|
39
|
+
Component: C;
|
|
40
|
+
props: PropsOf<C>;
|
|
41
|
+
anchorRect: Rect;
|
|
42
|
+
cellCorner: PopoverPropsPosition;
|
|
43
|
+
};
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { EvaluationError } from "./errors";
|
|
2
|
+
import { Format, FormattedValue } from "./format";
|
|
3
|
+
import { Link, RangeCompiledFormula, Style, UID } from "./misc";
|
|
4
|
+
interface CellAttributes {
|
|
5
|
+
readonly id: UID;
|
|
6
|
+
/**
|
|
7
|
+
* Raw cell content
|
|
8
|
+
*/
|
|
9
|
+
readonly content: string;
|
|
10
|
+
readonly style?: Style;
|
|
11
|
+
readonly format?: Format;
|
|
12
|
+
}
|
|
13
|
+
export interface LiteralCell extends CellAttributes {
|
|
14
|
+
readonly isFormula: false;
|
|
15
|
+
}
|
|
16
|
+
export interface FormulaCell extends CellAttributes {
|
|
17
|
+
readonly isFormula: true;
|
|
18
|
+
readonly compiledFormula: RangeCompiledFormula;
|
|
19
|
+
}
|
|
20
|
+
export type Cell = LiteralCell | FormulaCell;
|
|
21
|
+
interface EvaluatedCellProperties {
|
|
22
|
+
readonly format?: Format;
|
|
23
|
+
/**
|
|
24
|
+
* Cell value formatted based on the format
|
|
25
|
+
*/
|
|
26
|
+
readonly formattedValue: FormattedValue;
|
|
27
|
+
readonly defaultAlign: "right" | "center" | "left";
|
|
28
|
+
/**
|
|
29
|
+
* Can the cell appear in an automatic sum zone.
|
|
30
|
+
*/
|
|
31
|
+
readonly isAutoSummable: boolean;
|
|
32
|
+
readonly link?: Link;
|
|
33
|
+
}
|
|
34
|
+
export type CellValue = string | number | boolean | null;
|
|
35
|
+
export type EvaluatedCell = NumberCell | TextCell | BooleanCell | EmptyCell | ErrorCell;
|
|
36
|
+
export interface NumberCell extends EvaluatedCellProperties {
|
|
37
|
+
readonly type: CellValueType.number;
|
|
38
|
+
readonly value: number;
|
|
39
|
+
}
|
|
40
|
+
export interface TextCell extends EvaluatedCellProperties {
|
|
41
|
+
readonly type: CellValueType.text;
|
|
42
|
+
readonly value: string;
|
|
43
|
+
}
|
|
44
|
+
export interface BooleanCell extends EvaluatedCellProperties {
|
|
45
|
+
readonly type: CellValueType.boolean;
|
|
46
|
+
readonly value: boolean;
|
|
47
|
+
}
|
|
48
|
+
export interface EmptyCell extends EvaluatedCellProperties {
|
|
49
|
+
readonly type: CellValueType.empty;
|
|
50
|
+
readonly value: "";
|
|
51
|
+
}
|
|
52
|
+
export interface ErrorCell extends EvaluatedCellProperties {
|
|
53
|
+
readonly type: CellValueType.error;
|
|
54
|
+
readonly value: string;
|
|
55
|
+
readonly error: EvaluationError;
|
|
56
|
+
}
|
|
57
|
+
export declare enum CellValueType {
|
|
58
|
+
boolean = "boolean",
|
|
59
|
+
number = "number",
|
|
60
|
+
text = "text",
|
|
61
|
+
empty = "empty",
|
|
62
|
+
error = "error"
|
|
63
|
+
}
|
|
64
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ChartConfiguration } from "chart.js";
|
|
2
|
+
import { Color } from "../misc";
|
|
3
|
+
import { LegendPosition, VerticalAxisPosition } from "./common_chart";
|
|
4
|
+
export interface BarChartDefinition {
|
|
5
|
+
readonly type: "bar";
|
|
6
|
+
readonly dataSets: string[];
|
|
7
|
+
readonly dataSetsHaveTitle: boolean;
|
|
8
|
+
readonly labelRange?: string;
|
|
9
|
+
readonly title: string;
|
|
10
|
+
readonly background?: Color;
|
|
11
|
+
readonly verticalAxisPosition: VerticalAxisPosition;
|
|
12
|
+
readonly legendPosition: LegendPosition;
|
|
13
|
+
readonly stacked: boolean;
|
|
14
|
+
readonly aggregated?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export type BarChartRuntime = {
|
|
17
|
+
chartJsConfig: ChartConfiguration;
|
|
18
|
+
background: Color;
|
|
19
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Range } from "../../types";
|
|
2
|
+
import { XlsxHexColor } from "../xlsx";
|
|
3
|
+
import { BarChartDefinition, BarChartRuntime } from "./bar_chart";
|
|
4
|
+
import { LegendPosition, VerticalAxisPosition } from "./common_chart";
|
|
5
|
+
import { GaugeChartDefinition, GaugeChartRuntime } from "./gauge_chart";
|
|
6
|
+
import { LineChartDefinition, LineChartRuntime } from "./line_chart";
|
|
7
|
+
import { PieChartDefinition, PieChartRuntime } from "./pie_chart";
|
|
8
|
+
import { ScorecardChartDefinition, ScorecardChartRuntime } from "./scorecard_chart";
|
|
9
|
+
export type ChartType = "line" | "bar" | "pie" | "scorecard" | "gauge";
|
|
10
|
+
export type ChartDefinition = LineChartDefinition | PieChartDefinition | BarChartDefinition | ScorecardChartDefinition | GaugeChartDefinition;
|
|
11
|
+
export type ChartJSRuntime = LineChartRuntime | PieChartRuntime | BarChartRuntime | GaugeChartRuntime;
|
|
12
|
+
export type ChartRuntime = ChartJSRuntime | ScorecardChartRuntime;
|
|
13
|
+
export interface LabelValues {
|
|
14
|
+
readonly values: string[];
|
|
15
|
+
readonly formattedValues: string[];
|
|
16
|
+
}
|
|
17
|
+
export interface DatasetValues {
|
|
18
|
+
readonly label?: string;
|
|
19
|
+
readonly data: any[];
|
|
20
|
+
}
|
|
21
|
+
export type AxisType = "category" | "linear" | "time";
|
|
22
|
+
export interface DataSet {
|
|
23
|
+
readonly labelCell?: Range;
|
|
24
|
+
readonly dataRange: Range;
|
|
25
|
+
}
|
|
26
|
+
export interface ExcelChartDataset {
|
|
27
|
+
readonly label?: string;
|
|
28
|
+
readonly range: string;
|
|
29
|
+
}
|
|
30
|
+
export type ExcelChartType = "line" | "bar" | "pie";
|
|
31
|
+
export interface ExcelChartDefinition {
|
|
32
|
+
readonly title?: string;
|
|
33
|
+
readonly type: ExcelChartType;
|
|
34
|
+
readonly dataSets: ExcelChartDataset[];
|
|
35
|
+
readonly labelRange?: string;
|
|
36
|
+
readonly backgroundColor: XlsxHexColor;
|
|
37
|
+
readonly fontColor: XlsxHexColor;
|
|
38
|
+
readonly verticalAxisPosition: VerticalAxisPosition;
|
|
39
|
+
readonly legendPosition: LegendPosition;
|
|
40
|
+
readonly stacked?: boolean;
|
|
41
|
+
readonly cumulative?: boolean;
|
|
42
|
+
}
|
|
43
|
+
export interface ChartCreationContext {
|
|
44
|
+
readonly range?: string[];
|
|
45
|
+
readonly title?: string;
|
|
46
|
+
readonly background?: string;
|
|
47
|
+
readonly auxiliaryRange?: string;
|
|
48
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { ChartConfiguration, ChartData, ChartDataset, ChartOptions } from "chart.js";
|
|
2
|
+
import { Color } from "../misc";
|
|
3
|
+
export interface GaugeChartDefinition {
|
|
4
|
+
readonly type: "gauge";
|
|
5
|
+
readonly title: string;
|
|
6
|
+
readonly dataRange?: string;
|
|
7
|
+
readonly sectionRule: SectionRule;
|
|
8
|
+
readonly background?: Color;
|
|
9
|
+
}
|
|
10
|
+
export interface SectionRule {
|
|
11
|
+
readonly colors: ColorSet;
|
|
12
|
+
readonly rangeMin: string;
|
|
13
|
+
readonly rangeMax: string;
|
|
14
|
+
readonly lowerInflectionPoint: SectionThreshold;
|
|
15
|
+
readonly upperInflectionPoint: SectionThreshold;
|
|
16
|
+
}
|
|
17
|
+
interface ColorSet {
|
|
18
|
+
readonly lowerColor: Color;
|
|
19
|
+
readonly middleColor: Color;
|
|
20
|
+
readonly upperColor: Color;
|
|
21
|
+
}
|
|
22
|
+
interface SectionThreshold {
|
|
23
|
+
readonly type: "number" | "percentage";
|
|
24
|
+
readonly value: string;
|
|
25
|
+
}
|
|
26
|
+
export interface GaugeChartConfiguration extends Omit<ChartConfiguration, "data" | "options"> {
|
|
27
|
+
data?: GaugeChartData;
|
|
28
|
+
options: GaugeChartOptions;
|
|
29
|
+
}
|
|
30
|
+
export interface GaugeChartRuntime {
|
|
31
|
+
chartJsConfig: GaugeChartConfiguration;
|
|
32
|
+
background: Color;
|
|
33
|
+
}
|
|
34
|
+
interface GaugeChartData extends Omit<ChartData, "datasets"> {
|
|
35
|
+
datasets: GaugeChartDataSets[];
|
|
36
|
+
}
|
|
37
|
+
interface GaugeChartDataSets extends ChartDataset<"doughnut"> {
|
|
38
|
+
readonly minValue?: number;
|
|
39
|
+
readonly value?: number | undefined;
|
|
40
|
+
readonly backgroundColor?: string[];
|
|
41
|
+
}
|
|
42
|
+
export interface GaugeChartOptions extends ChartOptions {
|
|
43
|
+
needle?: NeedleOptions;
|
|
44
|
+
valueLabel?: ValueLabelOptions;
|
|
45
|
+
}
|
|
46
|
+
export interface NeedleOptions {
|
|
47
|
+
display?: boolean;
|
|
48
|
+
borderColor?: Color;
|
|
49
|
+
backgroundColor?: Color;
|
|
50
|
+
/**
|
|
51
|
+
* Needle width as the percentage of the chart area width
|
|
52
|
+
*/
|
|
53
|
+
width?: number;
|
|
54
|
+
}
|
|
55
|
+
export interface ValueLabelOptions {
|
|
56
|
+
display?: boolean;
|
|
57
|
+
formatter?: (value: any) => string;
|
|
58
|
+
font?: {
|
|
59
|
+
size?: number;
|
|
60
|
+
family?: string;
|
|
61
|
+
color?: Color;
|
|
62
|
+
};
|
|
63
|
+
backgroundColor?: Color;
|
|
64
|
+
borderColor?: Color;
|
|
65
|
+
borderRadius?: number;
|
|
66
|
+
padding?: {
|
|
67
|
+
left: number;
|
|
68
|
+
right: number;
|
|
69
|
+
top: number;
|
|
70
|
+
bottom: number;
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ChartConfiguration } from "chart.js";
|
|
2
|
+
import { Color } from "../misc";
|
|
3
|
+
import { LegendPosition, VerticalAxisPosition } from "./common_chart";
|
|
4
|
+
export interface LineChartDefinition {
|
|
5
|
+
readonly type: "line";
|
|
6
|
+
readonly dataSets: string[];
|
|
7
|
+
readonly dataSetsHaveTitle: boolean;
|
|
8
|
+
readonly labelRange?: string;
|
|
9
|
+
readonly title: string;
|
|
10
|
+
readonly background?: Color;
|
|
11
|
+
readonly verticalAxisPosition: VerticalAxisPosition;
|
|
12
|
+
readonly legendPosition: LegendPosition;
|
|
13
|
+
readonly labelsAsText: boolean;
|
|
14
|
+
readonly stacked: boolean;
|
|
15
|
+
readonly aggregated?: boolean;
|
|
16
|
+
readonly cumulative: boolean;
|
|
17
|
+
}
|
|
18
|
+
export type LineChartRuntime = {
|
|
19
|
+
chartJsConfig: ChartConfiguration;
|
|
20
|
+
background: Color;
|
|
21
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ChartConfiguration } from "chart.js";
|
|
2
|
+
import { Color } from "../misc";
|
|
3
|
+
import { LegendPosition } from "./common_chart";
|
|
4
|
+
export interface PieChartDefinition {
|
|
5
|
+
readonly type: "pie";
|
|
6
|
+
readonly dataSets: string[];
|
|
7
|
+
readonly dataSetsHaveTitle: boolean;
|
|
8
|
+
readonly labelRange?: string;
|
|
9
|
+
readonly title: string;
|
|
10
|
+
readonly background?: Color;
|
|
11
|
+
readonly legendPosition: LegendPosition;
|
|
12
|
+
readonly aggregated?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export type PieChartRuntime = {
|
|
15
|
+
chartJsConfig: ChartConfiguration;
|
|
16
|
+
background: Color;
|
|
17
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Color, Style } from "../misc";
|
|
2
|
+
export interface ScorecardChartDefinition {
|
|
3
|
+
readonly type: "scorecard";
|
|
4
|
+
readonly title: string;
|
|
5
|
+
readonly keyValue?: string;
|
|
6
|
+
readonly baseline?: string;
|
|
7
|
+
readonly baselineMode: BaselineMode;
|
|
8
|
+
readonly baselineDescr?: string;
|
|
9
|
+
readonly background?: Color;
|
|
10
|
+
readonly baselineColorUp: Color;
|
|
11
|
+
readonly baselineColorDown: Color;
|
|
12
|
+
}
|
|
13
|
+
export type BaselineMode = "text" | "difference" | "percentage";
|
|
14
|
+
export type BaselineArrowDirection = "neutral" | "up" | "down";
|
|
15
|
+
export interface ScorecardChartRuntime {
|
|
16
|
+
readonly title: string;
|
|
17
|
+
readonly keyValue: string;
|
|
18
|
+
readonly baselineDisplay: string;
|
|
19
|
+
readonly baselineColor?: string;
|
|
20
|
+
readonly baselineArrow: BaselineArrowDirection;
|
|
21
|
+
readonly baselineDescr?: string;
|
|
22
|
+
readonly background: Color;
|
|
23
|
+
readonly fontColor: Color;
|
|
24
|
+
readonly keyValueStyle?: Style;
|
|
25
|
+
readonly baselineStyle?: Style;
|
|
26
|
+
}
|