@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,117 @@
|
|
|
1
|
+
import { Component } from "@odoo/owl";
|
|
2
|
+
import { EdgeScrollInfo, HeaderDimensions, HeaderIndex, Pixel, SpreadsheetChildEnv } from "../../types/index";
|
|
3
|
+
import { ContextMenuType } from "../grid/grid";
|
|
4
|
+
interface ResizerState {
|
|
5
|
+
resizerIsActive: boolean;
|
|
6
|
+
isResizing: boolean;
|
|
7
|
+
isMoving: boolean;
|
|
8
|
+
isSelecting: boolean;
|
|
9
|
+
waitingForMove: boolean;
|
|
10
|
+
activeElement: Pixel;
|
|
11
|
+
draggerLinePosition: Pixel;
|
|
12
|
+
draggerShadowPosition: Pixel;
|
|
13
|
+
draggerShadowThickness: number;
|
|
14
|
+
delta: number;
|
|
15
|
+
base: number;
|
|
16
|
+
position: "before" | "after";
|
|
17
|
+
}
|
|
18
|
+
interface ResizerProps {
|
|
19
|
+
onOpenContextMenu: (type: ContextMenuType, x: Pixel, y: Pixel) => void;
|
|
20
|
+
}
|
|
21
|
+
declare abstract class AbstractResizer extends Component<ResizerProps, SpreadsheetChildEnv> {
|
|
22
|
+
PADDING: number;
|
|
23
|
+
MAX_SIZE_MARGIN: number;
|
|
24
|
+
MIN_ELEMENT_SIZE: number;
|
|
25
|
+
lastSelectedElementIndex: HeaderIndex | null;
|
|
26
|
+
state: ResizerState;
|
|
27
|
+
abstract _getEvOffset(ev: MouseEvent): Pixel;
|
|
28
|
+
abstract _getViewportOffset(): Pixel;
|
|
29
|
+
abstract _getClientPosition(ev: MouseEvent): Pixel;
|
|
30
|
+
abstract _getElementIndex(position: Pixel): HeaderIndex;
|
|
31
|
+
abstract _getSelectedZoneStart(): HeaderIndex;
|
|
32
|
+
abstract _getSelectedZoneEnd(): HeaderIndex;
|
|
33
|
+
abstract _getEdgeScroll(position: Pixel): EdgeScrollInfo;
|
|
34
|
+
abstract _getDimensionsInViewport(index: HeaderIndex): HeaderDimensions;
|
|
35
|
+
abstract _getElementSize(index: HeaderIndex): Pixel;
|
|
36
|
+
abstract _getMaxSize(): Pixel;
|
|
37
|
+
abstract _updateSize(): void;
|
|
38
|
+
abstract _moveElements(): void;
|
|
39
|
+
abstract _selectElement(index: HeaderIndex, addDistinctHeader: boolean): void;
|
|
40
|
+
abstract _increaseSelection(index: HeaderIndex): void;
|
|
41
|
+
abstract _fitElementSize(index: HeaderIndex): void;
|
|
42
|
+
abstract _getType(): ContextMenuType;
|
|
43
|
+
abstract _getActiveElements(): Set<HeaderIndex>;
|
|
44
|
+
abstract _getPreviousVisibleElement(index: HeaderIndex): HeaderIndex;
|
|
45
|
+
_computeHandleDisplay(ev: MouseEvent): void;
|
|
46
|
+
_computeGrabDisplay(ev: MouseEvent): void;
|
|
47
|
+
onMouseMove(ev: MouseEvent): void;
|
|
48
|
+
onMouseLeave(): void;
|
|
49
|
+
onDblClick(ev: MouseEvent): void;
|
|
50
|
+
onMouseDown(ev: MouseEvent): void;
|
|
51
|
+
select(ev: MouseEvent): void;
|
|
52
|
+
private startMovement;
|
|
53
|
+
private startSelection;
|
|
54
|
+
onMouseUp(ev: MouseEvent): void;
|
|
55
|
+
onContextMenu(ev: MouseEvent): void;
|
|
56
|
+
}
|
|
57
|
+
export declare class ColResizer extends AbstractResizer {
|
|
58
|
+
static template: string;
|
|
59
|
+
private colResizerRef;
|
|
60
|
+
setup(): void;
|
|
61
|
+
get sheetId(): import("../../types/misc").UID;
|
|
62
|
+
_getEvOffset(ev: MouseEvent): Pixel;
|
|
63
|
+
_getViewportOffset(): Pixel;
|
|
64
|
+
_getClientPosition(ev: MouseEvent): Pixel;
|
|
65
|
+
_getElementIndex(position: Pixel): HeaderIndex;
|
|
66
|
+
_getSelectedZoneStart(): HeaderIndex;
|
|
67
|
+
_getSelectedZoneEnd(): HeaderIndex;
|
|
68
|
+
_getEdgeScroll(position: Pixel): EdgeScrollInfo;
|
|
69
|
+
_getDimensionsInViewport(index: HeaderIndex): HeaderDimensions;
|
|
70
|
+
_getElementSize(index: HeaderIndex): Pixel;
|
|
71
|
+
_getMaxSize(): Pixel;
|
|
72
|
+
_updateSize(): void;
|
|
73
|
+
_moveElements(): void;
|
|
74
|
+
_selectElement(index: HeaderIndex, addDistinctHeader: boolean): void;
|
|
75
|
+
_increaseSelection(index: HeaderIndex): void;
|
|
76
|
+
_fitElementSize(index: HeaderIndex): void;
|
|
77
|
+
_getType(): ContextMenuType;
|
|
78
|
+
_getActiveElements(): Set<HeaderIndex>;
|
|
79
|
+
_getPreviousVisibleElement(index: HeaderIndex): HeaderIndex;
|
|
80
|
+
unhide(hiddenElements: HeaderIndex[]): void;
|
|
81
|
+
unhideStyleValue(hiddenIndex: HeaderIndex): Pixel;
|
|
82
|
+
}
|
|
83
|
+
export declare class RowResizer extends AbstractResizer {
|
|
84
|
+
static template: string;
|
|
85
|
+
setup(): void;
|
|
86
|
+
private rowResizerRef;
|
|
87
|
+
get sheetId(): import("../../types/misc").UID;
|
|
88
|
+
_getEvOffset(ev: MouseEvent): Pixel;
|
|
89
|
+
_getViewportOffset(): Pixel;
|
|
90
|
+
_getClientPosition(ev: MouseEvent): Pixel;
|
|
91
|
+
_getElementIndex(position: Pixel): HeaderIndex;
|
|
92
|
+
_getSelectedZoneStart(): HeaderIndex;
|
|
93
|
+
_getSelectedZoneEnd(): HeaderIndex;
|
|
94
|
+
_getEdgeScroll(position: Pixel): EdgeScrollInfo;
|
|
95
|
+
_getDimensionsInViewport(index: HeaderIndex): HeaderDimensions;
|
|
96
|
+
_getElementSize(index: HeaderIndex): Pixel;
|
|
97
|
+
_getMaxSize(): Pixel;
|
|
98
|
+
_updateSize(): void;
|
|
99
|
+
_moveElements(): void;
|
|
100
|
+
_selectElement(index: HeaderIndex, addDistinctHeader: boolean): void;
|
|
101
|
+
_increaseSelection(index: HeaderIndex): void;
|
|
102
|
+
_fitElementSize(index: HeaderIndex): void;
|
|
103
|
+
_getType(): ContextMenuType;
|
|
104
|
+
_getActiveElements(): Set<HeaderIndex>;
|
|
105
|
+
_getPreviousVisibleElement(index: HeaderIndex): HeaderIndex;
|
|
106
|
+
unhide(hiddenElements: HeaderIndex[]): void;
|
|
107
|
+
unhideStyleValue(hiddenIndex: HeaderIndex): Pixel;
|
|
108
|
+
}
|
|
109
|
+
export declare class HeadersOverlay extends Component<any, SpreadsheetChildEnv> {
|
|
110
|
+
static template: string;
|
|
111
|
+
static components: {
|
|
112
|
+
ColResizer: typeof ColResizer;
|
|
113
|
+
RowResizer: typeof RowResizer;
|
|
114
|
+
};
|
|
115
|
+
selectAll(): void;
|
|
116
|
+
}
|
|
117
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is largely inspired by owl 1.
|
|
3
|
+
* `css` tag has been removed from owl 2 without workaround to manage css.
|
|
4
|
+
* So, the solution was to import the behavior of owl 1 directly in our
|
|
5
|
+
* codebase, with one difference: the css is added to the sheet as soon as the
|
|
6
|
+
* css tag is executed. In owl 1, the css was added as soon as a Component was
|
|
7
|
+
* created for the first time.
|
|
8
|
+
*/
|
|
9
|
+
import { CSSProperties, Style } from "../../types";
|
|
10
|
+
/**
|
|
11
|
+
* CSS tag helper for defining inline stylesheets. With this, one can simply define
|
|
12
|
+
* an inline stylesheet with just the following code:
|
|
13
|
+
* ```js
|
|
14
|
+
* css`.component-a { color: red; }`;
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare function css(strings: any, ...args: any[]): string;
|
|
18
|
+
export declare function processSheet(str: string): string;
|
|
19
|
+
export declare function getTextDecoration({ strikethrough, underline, }: {
|
|
20
|
+
strikethrough?: boolean;
|
|
21
|
+
underline?: boolean;
|
|
22
|
+
}): string;
|
|
23
|
+
/**
|
|
24
|
+
* Convert the cell style to CSS properties.
|
|
25
|
+
*/
|
|
26
|
+
export declare function cellStyleToCss(style: Style | undefined): CSSProperties;
|
|
27
|
+
/**
|
|
28
|
+
* Convert the cell text style to CSS properties.
|
|
29
|
+
*/
|
|
30
|
+
export declare function cellTextStyleToCss(style: Style | undefined): CSSProperties;
|
|
31
|
+
/**
|
|
32
|
+
* Transform CSS properties into a CSS string.
|
|
33
|
+
*/
|
|
34
|
+
export declare function cssPropertiesToCss(attributes: CSSProperties): string;
|
|
35
|
+
export declare function getElementMargins(el: Element): {
|
|
36
|
+
top: number;
|
|
37
|
+
bottom: number;
|
|
38
|
+
left: number;
|
|
39
|
+
right: number;
|
|
40
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Rect } from "./../../types/rendering";
|
|
2
|
+
/**
|
|
3
|
+
* Return true if the event was triggered from
|
|
4
|
+
* a child element.
|
|
5
|
+
*/
|
|
6
|
+
export declare function isChildEvent(parent: HTMLElement, ev: Event): boolean;
|
|
7
|
+
export declare function gridOverlayPosition(): {
|
|
8
|
+
top: number;
|
|
9
|
+
left: number;
|
|
10
|
+
};
|
|
11
|
+
export declare function getBoundingRectAsPOJO(el: Element): Rect;
|
|
12
|
+
/**
|
|
13
|
+
* Iterate over all the children of `el` in the dom tree starting at `el`, depth first.
|
|
14
|
+
*/
|
|
15
|
+
export declare function iterateChildren(el: Node): Generator<Node>;
|
|
16
|
+
export declare function getOpenedMenus(): HTMLElement[];
|
|
17
|
+
/**
|
|
18
|
+
* Transform a keyboard event into a shortcut string that represent this event. The letters keys will be uppercased.
|
|
19
|
+
*
|
|
20
|
+
* @argument ev - The keyboard event to transform
|
|
21
|
+
* @argument mode - Use either ev.key of ev.code to get the string shortcut
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* event : { ctrlKey: true, key: "a" } => "Ctrl+A"
|
|
25
|
+
* event : { shift: true, alt: true, key: "Home" } => "Alt+Shift+Home"
|
|
26
|
+
*/
|
|
27
|
+
export declare function keyboardEventToShortcutString(ev: KeyboardEvent, mode?: "key" | "code"): string;
|
|
28
|
+
export declare function isMacOS(): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* @param {KeyboardEvent | MouseEvent} ev
|
|
31
|
+
* @returns Returns true if the event was triggered with the "ctrl" modifier pressed.
|
|
32
|
+
* On Mac, this is the "meta" or "command" key.
|
|
33
|
+
*/
|
|
34
|
+
export declare function isCtrlKey(ev: KeyboardEvent | MouseEvent): boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SpreadsheetChildEnv } from "../../types/env";
|
|
2
|
+
import { HeaderIndex } from "../../types/misc";
|
|
3
|
+
type EventFn = (ev: MouseEvent) => void;
|
|
4
|
+
/**
|
|
5
|
+
* Start listening to pointer events and apply the given callbacks.
|
|
6
|
+
*
|
|
7
|
+
* @returns A function to remove the listeners.
|
|
8
|
+
*/
|
|
9
|
+
export declare function startDnd(onMouseMove: EventFn, onMouseUp: EventFn, onMouseDown?: EventFn): () => void;
|
|
10
|
+
/**
|
|
11
|
+
* Function to be used during a mousedown event, this function allows to
|
|
12
|
+
* perform actions related to the mousemove and mouseup events and adjusts the viewport
|
|
13
|
+
* when the new position related to the mousemove event is outside of it.
|
|
14
|
+
* Among inputs are two callback functions. First intended for actions performed during
|
|
15
|
+
* the mousemove event, it receives as parameters the current position of the mousemove
|
|
16
|
+
* (occurrence of the current column and the current row). Second intended for actions
|
|
17
|
+
* performed during the mouseup event.
|
|
18
|
+
*/
|
|
19
|
+
export declare function dragAndDropBeyondTheViewport(env: SpreadsheetChildEnv, cbMouseMove: (col: HeaderIndex, row: HeaderIndex, ev: MouseEvent) => void, cbMouseUp: () => void, only?: "horizontal" | "vertical" | false): void;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Pixel, UID } from "../../types";
|
|
2
|
+
type Direction = "horizontal" | "vertical";
|
|
3
|
+
interface DragAndDropItemsPartial {
|
|
4
|
+
id: UID;
|
|
5
|
+
size: Pixel;
|
|
6
|
+
position: Pixel;
|
|
7
|
+
}
|
|
8
|
+
interface DndPartialArgs {
|
|
9
|
+
draggedItemId: UID;
|
|
10
|
+
initialMousePosition: Pixel;
|
|
11
|
+
items: DragAndDropItemsPartial[];
|
|
12
|
+
containerEl: HTMLElement;
|
|
13
|
+
onChange?: () => void;
|
|
14
|
+
onCancel?: () => void;
|
|
15
|
+
onDragEnd?: (itemId: UID, indexAtEnd: Pixel) => void;
|
|
16
|
+
}
|
|
17
|
+
interface State {
|
|
18
|
+
itemsStyle: Record<UID, string>;
|
|
19
|
+
draggedItemId: UID | undefined;
|
|
20
|
+
start: (direction: Direction, args: DndPartialArgs) => void;
|
|
21
|
+
cancel: () => void;
|
|
22
|
+
}
|
|
23
|
+
export declare function useDragAndDropListItems(): State;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Figure, Getters } from "../../types";
|
|
2
|
+
/**
|
|
3
|
+
* Transform a figure with coordinates from the model, to coordinates as they are shown on the screen,
|
|
4
|
+
* taking into account the scroll position of the active sheet and the frozen panes.
|
|
5
|
+
*/
|
|
6
|
+
export declare function internalFigureToScreen(getters: Getters, fig: Figure): Figure;
|
|
7
|
+
/**
|
|
8
|
+
* Transform a figure with coordinates as they are shown on the screen, to coordinates as they are in the model,
|
|
9
|
+
* taking into account the scroll position of the active sheet and the frozen panes.
|
|
10
|
+
*
|
|
11
|
+
* Note that this isn't exactly the reverse operation as internalFigureToScreen, because the figure will always be on top
|
|
12
|
+
* of the frozen panes.
|
|
13
|
+
*/
|
|
14
|
+
export declare function screenFigureToInternal(getters: Getters, fig: Figure): Figure;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Figure, PixelPosition, SheetScrollInfo } from "../../types";
|
|
2
|
+
export declare function dragFigureForMove({ x: mouseX, y: mouseY }: PixelPosition, { x: mouseInitialX, y: mouseInitialY }: PixelPosition, initialFigure: Figure, { x: viewportX, y: viewportY }: PixelPosition, { maxX, maxY }: {
|
|
3
|
+
maxX: number;
|
|
4
|
+
maxY: number;
|
|
5
|
+
}, { scrollX, scrollY }: SheetScrollInfo): Figure;
|
|
6
|
+
export declare function dragFigureForResize(initialFigure: Figure, dirX: -1 | 0 | 1, dirY: -1 | 0 | 1, { x: mouseX, y: mouseY }: PixelPosition, { x: mouseInitialX, y: mouseInitialY }: PixelPosition, keepRatio: boolean, minFigSize: number, { scrollX, scrollY }: SheetScrollInfo): Figure;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Figure, Getters, Pixel, UID } from "../../types";
|
|
2
|
+
export type HFigureAxisType = "top" | "bottom" | "vCenter";
|
|
3
|
+
export type VFigureAxisType = "right" | "left" | "hCenter";
|
|
4
|
+
export interface SnapLine<T extends HFigureAxisType | VFigureAxisType> {
|
|
5
|
+
matchedFigIds: UID[];
|
|
6
|
+
snapOffset: number;
|
|
7
|
+
snappedAxisType: T;
|
|
8
|
+
position: Pixel;
|
|
9
|
+
}
|
|
10
|
+
interface SnapReturn {
|
|
11
|
+
snappedFigure: Figure;
|
|
12
|
+
verticalSnapLine?: SnapLine<VFigureAxisType>;
|
|
13
|
+
horizontalSnapLine?: SnapLine<HFigureAxisType>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Try to snap the given figure to other figures when moving the figure, and return the snapped
|
|
17
|
+
* figure and the possible snap lines, if any were found
|
|
18
|
+
*/
|
|
19
|
+
export declare function snapForMove(getters: Getters, figureToSnap: Figure, otherFigures: Figure[]): SnapReturn;
|
|
20
|
+
/**
|
|
21
|
+
* Try to snap the given figure to the other figures when resizing the figure, and return the snapped
|
|
22
|
+
* figure and the possible snap lines, if any were found
|
|
23
|
+
*/
|
|
24
|
+
export declare function snapForResize(getters: Getters, resizeDirX: -1 | 0 | 1, resizeDirY: -1 | 0 | 1, figureToSnap: Figure, otherFigures: Figure[]): SnapReturn;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./css";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Ref } from "../../types";
|
|
2
|
+
/**
|
|
3
|
+
* Manages an event listener on a ref. Useful for hooks that want to manage
|
|
4
|
+
* event listeners, especially more than one. Prefer using t-on directly in
|
|
5
|
+
* components. If your hook only needs a single event listener, consider simply
|
|
6
|
+
* returning it from the hook and letting the user attach it with t-on.
|
|
7
|
+
*
|
|
8
|
+
* Adapted from Odoo Community - See https://github.com/odoo/odoo/blob/saas-16.2/addons/web/static/src/core/utils/hooks.js
|
|
9
|
+
*/
|
|
10
|
+
export declare function useRefListener(ref: Ref<HTMLElement>, ...listener: Parameters<typeof addEventListener>): void;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useRef } from "@odoo/owl";
|
|
2
|
+
import { Rect } from "../../types";
|
|
3
|
+
type Ref = ReturnType<typeof useRef>;
|
|
4
|
+
/**
|
|
5
|
+
* Return the o-spreadsheet element position relative
|
|
6
|
+
* to the browser viewport.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useSpreadsheetRect(): Rect;
|
|
9
|
+
/**
|
|
10
|
+
* Return the component (or ref's component) BoundingRect, relative
|
|
11
|
+
* to the upper left corner of the screen (<body> element).
|
|
12
|
+
*
|
|
13
|
+
* Note: when used with a <Portal/> component, it will
|
|
14
|
+
* return the portal position, not the teleported position.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useAbsoluteBoundingRect(ref: Ref): Rect;
|
|
17
|
+
/**
|
|
18
|
+
* Get the rectangle inside which a popover should stay when being displayed.
|
|
19
|
+
* It's the value defined in `env.getPopoverContainerRect`, or the Rect of the "o-spreadsheet"
|
|
20
|
+
* element by default.
|
|
21
|
+
*
|
|
22
|
+
* Coordinates are expressed expressed as absolute DOM position.
|
|
23
|
+
*/
|
|
24
|
+
export declare function usePopoverContainer(): Rect;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useWheelHandler(handler: (deltaX: number, deltaY: number) => void): (ev: WheelEvent) => void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Component } from "@odoo/owl";
|
|
2
|
+
import { Pixel, SpreadsheetChildEnv, Zone } from "../../../types";
|
|
3
|
+
type Orientation = "n" | "s" | "w" | "e";
|
|
4
|
+
interface Props {
|
|
5
|
+
zone: Zone;
|
|
6
|
+
orientation: Orientation;
|
|
7
|
+
isMoving: boolean;
|
|
8
|
+
onMoveHighlight: (x: Pixel, y: Pixel) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare class Border extends Component<Props, SpreadsheetChildEnv> {
|
|
11
|
+
static template: string;
|
|
12
|
+
get style(): string;
|
|
13
|
+
onMouseDown(ev: MouseEvent): void;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Component } from "@odoo/owl";
|
|
2
|
+
import { Color, SpreadsheetChildEnv, Zone } from "../../../types";
|
|
3
|
+
type Orientation = "nw" | "ne" | "sw" | "se";
|
|
4
|
+
interface Props {
|
|
5
|
+
zone: Zone;
|
|
6
|
+
color: Color;
|
|
7
|
+
orientation: Orientation;
|
|
8
|
+
isResizing: boolean;
|
|
9
|
+
onResizeHighlight: (isLeft: boolean, isRight: boolean) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare class Corner extends Component<Props, SpreadsheetChildEnv> {
|
|
12
|
+
static template: string;
|
|
13
|
+
private isTop;
|
|
14
|
+
private isLeft;
|
|
15
|
+
get style(): string;
|
|
16
|
+
onMouseDown(ev: MouseEvent): void;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Component } from "@odoo/owl";
|
|
2
|
+
import { Color, Pixel, SpreadsheetChildEnv, Zone } from "../../../types";
|
|
3
|
+
import { Border } from "../border/border";
|
|
4
|
+
import { Corner } from "../corner/corner";
|
|
5
|
+
interface Props {
|
|
6
|
+
zone: Zone;
|
|
7
|
+
color: Color;
|
|
8
|
+
}
|
|
9
|
+
interface HighlightState {
|
|
10
|
+
shiftingMode: "isMoving" | "isResizing" | "none";
|
|
11
|
+
}
|
|
12
|
+
export declare class Highlight extends Component<Props, SpreadsheetChildEnv> {
|
|
13
|
+
static template: string;
|
|
14
|
+
static components: {
|
|
15
|
+
Corner: typeof Corner;
|
|
16
|
+
Border: typeof Border;
|
|
17
|
+
};
|
|
18
|
+
highlightState: HighlightState;
|
|
19
|
+
onResizeHighlight(isLeft: boolean, isTop: boolean): void;
|
|
20
|
+
onMoveHighlight(clientX: Pixel, clientY: Pixel): void;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Component } from "@odoo/owl";
|
|
2
|
+
import { SpreadsheetChildEnv } from "../../types/env";
|
|
3
|
+
interface Props {
|
|
4
|
+
onIconPicked: (icon: string) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare class IconPicker extends Component<Props, SpreadsheetChildEnv> {
|
|
7
|
+
static template: string;
|
|
8
|
+
icons: {
|
|
9
|
+
arrowGood: {
|
|
10
|
+
template: string;
|
|
11
|
+
img: HTMLImageElement;
|
|
12
|
+
};
|
|
13
|
+
arrowNeutral: {
|
|
14
|
+
template: string;
|
|
15
|
+
img: HTMLImageElement;
|
|
16
|
+
};
|
|
17
|
+
arrowBad: {
|
|
18
|
+
template: string;
|
|
19
|
+
img: HTMLImageElement;
|
|
20
|
+
};
|
|
21
|
+
smileyGood: {
|
|
22
|
+
template: string;
|
|
23
|
+
img: HTMLImageElement;
|
|
24
|
+
};
|
|
25
|
+
smileyNeutral: {
|
|
26
|
+
template: string;
|
|
27
|
+
img: HTMLImageElement;
|
|
28
|
+
};
|
|
29
|
+
smileyBad: {
|
|
30
|
+
template: string;
|
|
31
|
+
img: HTMLImageElement;
|
|
32
|
+
};
|
|
33
|
+
dotGood: {
|
|
34
|
+
template: string;
|
|
35
|
+
img: HTMLImageElement;
|
|
36
|
+
};
|
|
37
|
+
dotNeutral: {
|
|
38
|
+
template: string;
|
|
39
|
+
img: HTMLImageElement;
|
|
40
|
+
};
|
|
41
|
+
dotBad: {
|
|
42
|
+
template: string;
|
|
43
|
+
img: HTMLImageElement;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
iconSets: {
|
|
47
|
+
arrows: {
|
|
48
|
+
good: string;
|
|
49
|
+
neutral: string;
|
|
50
|
+
bad: string;
|
|
51
|
+
};
|
|
52
|
+
smiley: {
|
|
53
|
+
good: string;
|
|
54
|
+
neutral: string;
|
|
55
|
+
bad: string;
|
|
56
|
+
};
|
|
57
|
+
dots: {
|
|
58
|
+
good: string;
|
|
59
|
+
neutral: string;
|
|
60
|
+
bad: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
onIconClick(icon: string): void;
|
|
64
|
+
}
|
|
65
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export type IconSetType = keyof typeof ICON_SETS;
|
|
2
|
+
export declare const ICONS: {
|
|
3
|
+
arrowGood: {
|
|
4
|
+
template: string;
|
|
5
|
+
img: HTMLImageElement;
|
|
6
|
+
};
|
|
7
|
+
arrowNeutral: {
|
|
8
|
+
template: string;
|
|
9
|
+
img: HTMLImageElement;
|
|
10
|
+
};
|
|
11
|
+
arrowBad: {
|
|
12
|
+
template: string;
|
|
13
|
+
img: HTMLImageElement;
|
|
14
|
+
};
|
|
15
|
+
smileyGood: {
|
|
16
|
+
template: string;
|
|
17
|
+
img: HTMLImageElement;
|
|
18
|
+
};
|
|
19
|
+
smileyNeutral: {
|
|
20
|
+
template: string;
|
|
21
|
+
img: HTMLImageElement;
|
|
22
|
+
};
|
|
23
|
+
smileyBad: {
|
|
24
|
+
template: string;
|
|
25
|
+
img: HTMLImageElement;
|
|
26
|
+
};
|
|
27
|
+
dotGood: {
|
|
28
|
+
template: string;
|
|
29
|
+
img: HTMLImageElement;
|
|
30
|
+
};
|
|
31
|
+
dotNeutral: {
|
|
32
|
+
template: string;
|
|
33
|
+
img: HTMLImageElement;
|
|
34
|
+
};
|
|
35
|
+
dotBad: {
|
|
36
|
+
template: string;
|
|
37
|
+
img: HTMLImageElement;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export declare const ICON_SETS: {
|
|
41
|
+
arrows: {
|
|
42
|
+
good: string;
|
|
43
|
+
neutral: string;
|
|
44
|
+
bad: string;
|
|
45
|
+
};
|
|
46
|
+
smiley: {
|
|
47
|
+
good: string;
|
|
48
|
+
neutral: string;
|
|
49
|
+
bad: string;
|
|
50
|
+
};
|
|
51
|
+
dots: {
|
|
52
|
+
good: string;
|
|
53
|
+
neutral: string;
|
|
54
|
+
bad: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Spreadsheet } from "./spreadsheet/spreadsheet";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Component } from "@odoo/owl";
|
|
2
|
+
import { EvaluatedCell, Link, Position, SpreadsheetChildEnv } from "../../../types";
|
|
3
|
+
import { PopoverBuilders } from "../../../types/cell_popovers";
|
|
4
|
+
import { Menu } from "../../menu/menu";
|
|
5
|
+
interface LinkDisplayProps {
|
|
6
|
+
cellPosition: Position;
|
|
7
|
+
}
|
|
8
|
+
export declare class LinkDisplay extends Component<LinkDisplayProps, SpreadsheetChildEnv> {
|
|
9
|
+
static components: {
|
|
10
|
+
Menu: typeof Menu;
|
|
11
|
+
};
|
|
12
|
+
static template: string;
|
|
13
|
+
get cell(): EvaluatedCell;
|
|
14
|
+
get link(): Link;
|
|
15
|
+
getUrlRepresentation(link: Link): string;
|
|
16
|
+
openLink(): void;
|
|
17
|
+
edit(): void;
|
|
18
|
+
unlink(): void;
|
|
19
|
+
}
|
|
20
|
+
export declare const LinkCellPopoverBuilder: PopoverBuilders;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Component } from "@odoo/owl";
|
|
2
|
+
import { DOMCoordinates, Link, Position, SpreadsheetChildEnv } from "../../../types";
|
|
3
|
+
import { PopoverBuilders } from "../../../types/cell_popovers";
|
|
4
|
+
import { Menu } from "../../menu/menu";
|
|
5
|
+
interface LinkEditorProps {
|
|
6
|
+
cellPosition: Position;
|
|
7
|
+
onClosed?: () => void;
|
|
8
|
+
}
|
|
9
|
+
interface State {
|
|
10
|
+
label: string;
|
|
11
|
+
url: string;
|
|
12
|
+
isUrlEditable: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare class LinkEditor extends Component<LinkEditorProps, SpreadsheetChildEnv> {
|
|
15
|
+
static template: string;
|
|
16
|
+
static components: {
|
|
17
|
+
Menu: typeof Menu;
|
|
18
|
+
};
|
|
19
|
+
menuItems: import("../../../actions/action").Action[];
|
|
20
|
+
private link;
|
|
21
|
+
private menu;
|
|
22
|
+
private linkEditorRef;
|
|
23
|
+
private position;
|
|
24
|
+
urlInput: {
|
|
25
|
+
el: HTMLElement | null;
|
|
26
|
+
};
|
|
27
|
+
setup(): void;
|
|
28
|
+
get defaultState(): State;
|
|
29
|
+
get menuPosition(): DOMCoordinates;
|
|
30
|
+
onSpecialLink(ev: CustomEvent<string>): void;
|
|
31
|
+
getUrlRepresentation(link: Link): string;
|
|
32
|
+
openMenu(): void;
|
|
33
|
+
removeLink(): void;
|
|
34
|
+
save(): void;
|
|
35
|
+
cancel(): void;
|
|
36
|
+
onKeyDown(ev: KeyboardEvent): void;
|
|
37
|
+
}
|
|
38
|
+
export declare const LinkEditorPopoverBuilder: PopoverBuilders;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Component } from "@odoo/owl";
|
|
2
|
+
import { Action } from "../../actions/action";
|
|
3
|
+
import { DOMCoordinates, Pixel, SpreadsheetChildEnv, UID } from "../../types";
|
|
4
|
+
import { Popover, PopoverProps } from "../popover/popover";
|
|
5
|
+
type MenuItemOrSeparator = Action | "separator";
|
|
6
|
+
interface Props {
|
|
7
|
+
position: DOMCoordinates;
|
|
8
|
+
menuItems: Action[];
|
|
9
|
+
depth: number;
|
|
10
|
+
maxHeight?: Pixel;
|
|
11
|
+
onClose: () => void;
|
|
12
|
+
onMenuClicked?: (ev: CustomEvent) => void;
|
|
13
|
+
menuId?: UID;
|
|
14
|
+
}
|
|
15
|
+
export interface MenuState {
|
|
16
|
+
isOpen: boolean;
|
|
17
|
+
parentMenu?: Action;
|
|
18
|
+
position: null | DOMCoordinates;
|
|
19
|
+
scrollOffset?: Pixel;
|
|
20
|
+
menuItems: Action[];
|
|
21
|
+
}
|
|
22
|
+
export declare class Menu extends Component<Props, SpreadsheetChildEnv> {
|
|
23
|
+
static template: string;
|
|
24
|
+
static components: {
|
|
25
|
+
Menu: typeof Menu;
|
|
26
|
+
Popover: typeof Popover;
|
|
27
|
+
};
|
|
28
|
+
static defaultProps: {
|
|
29
|
+
depth: number;
|
|
30
|
+
};
|
|
31
|
+
private subMenu;
|
|
32
|
+
private menuRef;
|
|
33
|
+
private position;
|
|
34
|
+
setup(): void;
|
|
35
|
+
get menuItemsAndSeparators(): MenuItemOrSeparator[];
|
|
36
|
+
get subMenuPosition(): DOMCoordinates;
|
|
37
|
+
get popoverProps(): PopoverProps;
|
|
38
|
+
get childrenHaveIcon(): boolean;
|
|
39
|
+
getIconName(menu: Action): string;
|
|
40
|
+
getColor(menu: Action): string | undefined;
|
|
41
|
+
activateMenu(menu: Action): Promise<void>;
|
|
42
|
+
private close;
|
|
43
|
+
private onExternalClick;
|
|
44
|
+
getName(menu: Action): string;
|
|
45
|
+
isRoot(menu: Action): boolean;
|
|
46
|
+
isEnabled(menu: Action): boolean;
|
|
47
|
+
onScroll(ev: any): void;
|
|
48
|
+
/**
|
|
49
|
+
* If the given menu is not disabled, open it's submenu at the
|
|
50
|
+
* correct position according to available surrounding space.
|
|
51
|
+
*/
|
|
52
|
+
openSubMenu(menu: Action, menuIndex: number, ev: MouseEvent): void;
|
|
53
|
+
isParentMenu(subMenu: MenuState, menuItem: Action): boolean;
|
|
54
|
+
closeSubMenu(): void;
|
|
55
|
+
onClickMenu(menu: Action, menuIndex: number, ev: MouseEvent): void;
|
|
56
|
+
onMouseOver(menu: Action, position: Pixel, ev: MouseEvent): void;
|
|
57
|
+
}
|
|
58
|
+
export {};
|