@odoo/o-spreadsheet 17.0.85 → 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 +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 +42 -25
- package/dist/o-spreadsheet.d.ts +0 -8046
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Color } from "chart.js";
|
|
2
|
+
import { DOMDimension, Pixel, PixelPosition } from "../../../types";
|
|
3
|
+
import { BaselineArrowDirection, ScorecardChartRuntime } from "../../../types/chart";
|
|
4
|
+
type ScorecardChartElement = {
|
|
5
|
+
text: string;
|
|
6
|
+
style: {
|
|
7
|
+
font: string;
|
|
8
|
+
color: Color;
|
|
9
|
+
strikethrough?: boolean;
|
|
10
|
+
underline?: boolean;
|
|
11
|
+
};
|
|
12
|
+
position: PixelPosition;
|
|
13
|
+
};
|
|
14
|
+
export type ScorecardChartConfig = {
|
|
15
|
+
canvas: {
|
|
16
|
+
width: number;
|
|
17
|
+
height: number;
|
|
18
|
+
backgroundColor: Color;
|
|
19
|
+
};
|
|
20
|
+
title?: ScorecardChartElement;
|
|
21
|
+
baselineArrow?: {
|
|
22
|
+
direction: BaselineArrowDirection;
|
|
23
|
+
style: {
|
|
24
|
+
size: Pixel;
|
|
25
|
+
color: Color;
|
|
26
|
+
};
|
|
27
|
+
position: PixelPosition;
|
|
28
|
+
};
|
|
29
|
+
baseline?: ScorecardChartElement;
|
|
30
|
+
baselineDescr?: ScorecardChartElement;
|
|
31
|
+
key?: ScorecardChartElement;
|
|
32
|
+
};
|
|
33
|
+
export declare function formatBaselineDescr(baselineDescr: string | undefined, baseline: string | undefined): string;
|
|
34
|
+
export declare function getScorecardConfiguration({ width, height }: DOMDimension, runtime: ScorecardChartRuntime): ScorecardChartConfig;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FigureSize } from "../../../types";
|
|
2
|
+
import { FileStore, ImageProviderInterface } from "../../../types/files";
|
|
3
|
+
import { type Image } from "../../../types/image";
|
|
4
|
+
export declare class ImageProvider implements ImageProviderInterface {
|
|
5
|
+
private fileStore;
|
|
6
|
+
constructor(fileStore: FileStore);
|
|
7
|
+
requestImage(): Promise<Image>;
|
|
8
|
+
private getImageFromUser;
|
|
9
|
+
getImageOriginalSize(path: string): Promise<FigureSize>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Cloneable, FilterTableId, UID, Zone } from "../types/misc";
|
|
2
|
+
export declare class FilterTable implements Cloneable<FilterTable> {
|
|
3
|
+
readonly id: FilterTableId;
|
|
4
|
+
readonly zone: Zone;
|
|
5
|
+
readonly filters: Filter[];
|
|
6
|
+
constructor(zone: Zone);
|
|
7
|
+
/** Get zone of the table without the headers */
|
|
8
|
+
get contentZone(): Zone | undefined;
|
|
9
|
+
getFilterId(col: number): string | undefined;
|
|
10
|
+
clone(): FilterTable;
|
|
11
|
+
}
|
|
12
|
+
export declare class Filter {
|
|
13
|
+
readonly id: UID;
|
|
14
|
+
readonly zoneWithHeaders: Zone;
|
|
15
|
+
constructor(id: UID, zone: Zone);
|
|
16
|
+
get col(): import("../types").HeaderIndex;
|
|
17
|
+
/** Filtered zone, ie. zone of the filter without the header */
|
|
18
|
+
get filteredZone(): Zone | undefined;
|
|
19
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CellValue, Currency, Format, FormattedValue, Locale, LocaleFormat } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Formats a cell value with its format.
|
|
4
|
+
*/
|
|
5
|
+
export declare function formatValue(value: CellValue, { format, locale }: LocaleFormat): FormattedValue;
|
|
6
|
+
/** Convert a number into a string, without scientific notation */
|
|
7
|
+
export declare function numberToString(number: number, decimalSeparator: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* Check if the given format is a time, date or date time format.
|
|
10
|
+
*/
|
|
11
|
+
export declare function isDateTimeFormat(format: Format): boolean;
|
|
12
|
+
export declare function applyDateTimeFormat(value: number, format: Format): FormattedValue;
|
|
13
|
+
/**
|
|
14
|
+
* Get a regex matching decimal number based on the locale's thousand separator
|
|
15
|
+
*
|
|
16
|
+
* eg. if the locale's thousand separator is a comma, this will return a regex /[0-9]+,[0-9]/
|
|
17
|
+
*/
|
|
18
|
+
export declare const getDecimalNumberRegex: (locale: Locale) => RegExp;
|
|
19
|
+
/**
|
|
20
|
+
* Create a default format for a number.
|
|
21
|
+
*
|
|
22
|
+
* If possible this will try round the number to have less than DEFAULT_FORMAT_NUMBER_OF_DIGITS characters
|
|
23
|
+
* in the number. This is obviously only possible for number with a big decimal part. For number with a lot
|
|
24
|
+
* of digits in the integer part, keep the number as it is.
|
|
25
|
+
*/
|
|
26
|
+
export declare function createDefaultFormat(value: number): Format;
|
|
27
|
+
export declare function detectDateFormat(content: string, locale: Locale): Format | undefined;
|
|
28
|
+
export declare function detectNumberFormat(content: string): Format | undefined;
|
|
29
|
+
export declare function createCurrencyFormat(currency: Partial<Currency>): Format;
|
|
30
|
+
export declare function roundFormat(format: Format): Format;
|
|
31
|
+
export declare function createLargeNumberFormat(format: Format | undefined, magnitude: number, postFix: string, locale: Locale): Format;
|
|
32
|
+
export declare function changeDecimalPlaces(format: Format, step: number, locale: Locale): Format;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from "./color";
|
|
2
|
+
export * from "./coordinates";
|
|
3
|
+
export * from "./data_validation_helpers";
|
|
4
|
+
export * from "./dates";
|
|
5
|
+
export * from "./edge_scrolling";
|
|
6
|
+
export * from "./format";
|
|
7
|
+
export * from "./misc";
|
|
8
|
+
export * from "./numbers";
|
|
9
|
+
export * from "./range";
|
|
10
|
+
export * from "./references";
|
|
11
|
+
export * from "./search";
|
|
12
|
+
export * from "./sheet";
|
|
13
|
+
export * from "./text_helper";
|
|
14
|
+
export * from "./uuid";
|
|
15
|
+
export * from "./zones";
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { DOMDimension, Getters, HeaderIndex, Pixel, Position, Rect, UID, Zone } from "../types";
|
|
2
|
+
export declare class InternalViewport {
|
|
3
|
+
private getters;
|
|
4
|
+
private sheetId;
|
|
5
|
+
private boundaries;
|
|
6
|
+
top: HeaderIndex;
|
|
7
|
+
bottom: HeaderIndex;
|
|
8
|
+
left: HeaderIndex;
|
|
9
|
+
right: HeaderIndex;
|
|
10
|
+
offsetX: Pixel;
|
|
11
|
+
offsetY: Pixel;
|
|
12
|
+
offsetScrollbarX: Pixel;
|
|
13
|
+
offsetScrollbarY: Pixel;
|
|
14
|
+
canScrollVertically: boolean;
|
|
15
|
+
canScrollHorizontally: boolean;
|
|
16
|
+
viewportWidth: Pixel;
|
|
17
|
+
viewportHeight: Pixel;
|
|
18
|
+
offsetCorrectionX: Pixel;
|
|
19
|
+
offsetCorrectionY: Pixel;
|
|
20
|
+
constructor(getters: Getters, sheetId: UID, boundaries: Zone, sizeInGrid: {
|
|
21
|
+
width: Pixel;
|
|
22
|
+
height: Pixel;
|
|
23
|
+
}, options: {
|
|
24
|
+
canScrollVertically: boolean;
|
|
25
|
+
canScrollHorizontally: boolean;
|
|
26
|
+
}, offsets: {
|
|
27
|
+
x: Pixel;
|
|
28
|
+
y: Pixel;
|
|
29
|
+
});
|
|
30
|
+
/** Returns the maximum size (in Pixels) of the viewport relative to its allocated client size
|
|
31
|
+
* When the viewport grid size is smaller than its client width (resp. height), it will return
|
|
32
|
+
* the client width (resp. height).
|
|
33
|
+
*/
|
|
34
|
+
getMaxSize(): DOMDimension;
|
|
35
|
+
/**
|
|
36
|
+
* Return the index of a column given an offset x, based on the pane left
|
|
37
|
+
* visible cell.
|
|
38
|
+
* It returns -1 if no column is found.
|
|
39
|
+
*/
|
|
40
|
+
getColIndex(x: Pixel): HeaderIndex;
|
|
41
|
+
/**
|
|
42
|
+
* Return the index of a row given an offset y, based on the pane top
|
|
43
|
+
* visible cell.
|
|
44
|
+
* It returns -1 if no row is found.
|
|
45
|
+
*/
|
|
46
|
+
getRowIndex(y: Pixel): HeaderIndex;
|
|
47
|
+
/**
|
|
48
|
+
* This function will make sure that the provided cell position (or current selected position) is part of
|
|
49
|
+
* the pane that is actually displayed on the client. We therefore adjust the offset of the pane
|
|
50
|
+
* until it contains the cell completely.
|
|
51
|
+
*/
|
|
52
|
+
adjustPosition(position?: Position): void;
|
|
53
|
+
adjustPositionX(targetCol: HeaderIndex): void;
|
|
54
|
+
adjustPositionY(targetRow: HeaderIndex): void;
|
|
55
|
+
setViewportOffset(offsetX: Pixel, offsetY: Pixel): void;
|
|
56
|
+
adjustViewportZone(): void;
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
* @param zone
|
|
60
|
+
* @returns Computes the absolute coordinate of a given zone inside the viewport
|
|
61
|
+
*/
|
|
62
|
+
getVisibleRect(zone: Zone): Rect | undefined;
|
|
63
|
+
getFullRect(zone: Zone): Rect | undefined;
|
|
64
|
+
isVisible(col: HeaderIndex, row: HeaderIndex): boolean;
|
|
65
|
+
private searchHeaderIndex;
|
|
66
|
+
private get zone();
|
|
67
|
+
private setViewportOffsetX;
|
|
68
|
+
private setViewportOffsetY;
|
|
69
|
+
/** Corrects the viewport's horizontal offset based on the current structure
|
|
70
|
+
* To make sure that at least one column is visible inside the viewport.
|
|
71
|
+
*/
|
|
72
|
+
private adjustViewportOffsetX;
|
|
73
|
+
/** Corrects the viewport's vertical offset based on the current structure
|
|
74
|
+
* To make sure that at least one row is visible inside the viewport.
|
|
75
|
+
*/
|
|
76
|
+
private adjustViewportOffsetY;
|
|
77
|
+
/** Updates the pane zone and snapped offset based on its horizontal
|
|
78
|
+
* offset (will find Left) and its width (will find Right) */
|
|
79
|
+
private adjustViewportZoneX;
|
|
80
|
+
/** Updates the pane zone and snapped offset based on its vertical
|
|
81
|
+
* offset (will find Top) and its width (will find Bottom) */
|
|
82
|
+
private adjustViewportZoneY;
|
|
83
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Registry } from "../registries/registry";
|
|
2
|
+
import { CellValue, Getters, Link, SpreadsheetChildEnv } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Add the `https` prefix to the url if it's missing
|
|
5
|
+
*/
|
|
6
|
+
export declare function withHttps(url: string): string;
|
|
7
|
+
export interface LinkSpec {
|
|
8
|
+
readonly match: (url: string) => boolean;
|
|
9
|
+
readonly createLink: (url: string, label: string) => Link;
|
|
10
|
+
/**
|
|
11
|
+
* String used to display the URL in components.
|
|
12
|
+
* Particularly useful for special links (sheet, etc.)
|
|
13
|
+
* - a simple web link displays the raw url
|
|
14
|
+
* - a link to a sheet displays the sheet name
|
|
15
|
+
*/
|
|
16
|
+
readonly urlRepresentation: (url: string, getters: Getters) => string;
|
|
17
|
+
readonly open: (url: string, env: SpreadsheetChildEnv) => void;
|
|
18
|
+
readonly sequence: number;
|
|
19
|
+
}
|
|
20
|
+
export declare const urlRegistry: Registry<LinkSpec>;
|
|
21
|
+
export declare function urlRepresentation(link: Link, getters: Getters): string;
|
|
22
|
+
export declare function openLink(link: Link, env: SpreadsheetChildEnv): void;
|
|
23
|
+
export declare function detectLink(value: CellValue | null): Link | undefined;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ConditionalFormatRule, DataValidationRule, Locale } from "../types";
|
|
2
|
+
export declare function isValidLocale(locale: any): locale is Locale;
|
|
3
|
+
/**
|
|
4
|
+
* Change a content string from the given locale to its canonical form (en_US locale). Don't convert date string.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* canonicalizeNumberContent("=SUM(1,5; 02/12/2012)", FR_LOCALE) // "=SUM(1.5, 02/12/2012)"
|
|
8
|
+
* canonicalizeNumberContent("125,9", FR_LOCALE) // "125.9"
|
|
9
|
+
* canonicalizeNumberContent("02/12/2012", FR_LOCALE) // "02/12/2012"
|
|
10
|
+
*/
|
|
11
|
+
export declare function canonicalizeNumberContent(content: string, locale: Locale): string;
|
|
12
|
+
/**
|
|
13
|
+
* Change a content string from the given locale to its canonical form (en_US locale). Also convert date string.
|
|
14
|
+
* This is destructive and won't preserve the original format.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* canonicalizeContent("=SUM(1,5; 5)", FR_LOCALE) // "=SUM(1.5, 5)"
|
|
18
|
+
* canonicalizeContent("125,9", FR_LOCALE) // "125.9"
|
|
19
|
+
* canonicalizeContent("02/12/2012", FR_LOCALE) // "12/02/2012"
|
|
20
|
+
* canonicalizeContent("02-12-2012", FR_LOCALE) // "12/02/2012"
|
|
21
|
+
*/
|
|
22
|
+
export declare function canonicalizeContent(content: string, locale: Locale): string;
|
|
23
|
+
/**
|
|
24
|
+
* Change a content string from its canonical form (en_US locale) to the given locale. Don't convert date string.
|
|
25
|
+
* This is destructive and won't preserve the original format.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* localizeNumberContent("=SUM(1.5, 5)", FR_LOCALE) // "=SUM(1,5; 5)"
|
|
29
|
+
* localizeNumberContent("125.9", FR_LOCALE) // "125,9"
|
|
30
|
+
* localizeNumberContent("02/12/2012", FR_LOCALE) // "12/02/2012"
|
|
31
|
+
* localizeNumberContent("02-12-2012", FR_LOCALE) // "12/02/2012"
|
|
32
|
+
*/
|
|
33
|
+
export declare function localizeNumberContent(content: string, locale: Locale): string;
|
|
34
|
+
/**
|
|
35
|
+
* Change a content string from its canonical form (en_US locale) to the given locale. Also convert date string.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* localizeContent("=SUM(1.5, 5)", FR_LOCALE) // "=SUM(1,5; 5)"
|
|
39
|
+
* localizeContent("125.9", FR_LOCALE) // "125,9"
|
|
40
|
+
* localizeContent("12/02/2012", FR_LOCALE) // "02/12/2012"
|
|
41
|
+
*/
|
|
42
|
+
export declare function localizeContent(content: string, locale: Locale): string;
|
|
43
|
+
/** Change a number string to its canonical form (en_US locale) */
|
|
44
|
+
export declare function canonicalizeNumberValue(content: string, locale: Locale): string;
|
|
45
|
+
/** Change a formula from the canonical form to the given locale */
|
|
46
|
+
export declare function localizeFormula(formula: string, locale: Locale): string;
|
|
47
|
+
/**
|
|
48
|
+
* Change a literal string from the given locale to its canonical form (en_US locale). Don't convert date string.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* canonicalizeNumberLiteral("125,9", FR_LOCALE) // "125.9"
|
|
52
|
+
* canonicalizeNumberLiteral("02/12/2012", FR_LOCALE) // "02/12/2012"
|
|
53
|
+
*/
|
|
54
|
+
export declare function canonicalizeNumberLiteral(content: string, locale: Locale): string;
|
|
55
|
+
export declare function canonicalizeCFRule(cf: ConditionalFormatRule, locale: Locale): ConditionalFormatRule;
|
|
56
|
+
export declare function localizeCFRule(cf: ConditionalFormatRule, locale: Locale): ConditionalFormatRule;
|
|
57
|
+
export declare function localizeDataValidationRule(rule: DataValidationRule, locale: Locale): DataValidationRule;
|
|
58
|
+
export declare function getDateTimeFormat(locale: Locale): string;
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { ConsecutiveIndexes, Lazy, UID } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Remove quotes from a quoted string
|
|
4
|
+
* ```js
|
|
5
|
+
* removeStringQuotes('"Hello"')
|
|
6
|
+
* > 'Hello'
|
|
7
|
+
* ```
|
|
8
|
+
*/
|
|
9
|
+
export declare function removeStringQuotes(str: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Escapes a string to use as a literal string in a RegExp.
|
|
12
|
+
* @url https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Escaping
|
|
13
|
+
*/
|
|
14
|
+
export declare function escapeRegExp(str: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Deep copy arrays, plain objects and primitive values.
|
|
17
|
+
* Throws an error for other types such as class instances.
|
|
18
|
+
* Sparse arrays remain sparse.
|
|
19
|
+
*/
|
|
20
|
+
export declare function deepCopy<T>(obj: T): T;
|
|
21
|
+
/**
|
|
22
|
+
* Sanitize the name of a sheet, by eventually removing quotes
|
|
23
|
+
* @param sheetName name of the sheet, potentially quoted with single quotes
|
|
24
|
+
*/
|
|
25
|
+
export declare function getUnquotedSheetName(sheetName: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* Add quotes around the sheet name if it contains at least one non alphanumeric character
|
|
28
|
+
* '\w' captures [0-9][a-z][A-Z] and _.
|
|
29
|
+
* @param sheetName Name of the sheet
|
|
30
|
+
*/
|
|
31
|
+
export declare function getCanonicalSheetName(sheetName: string): string;
|
|
32
|
+
export declare function clip(val: number, min: number, max: number): number;
|
|
33
|
+
/**
|
|
34
|
+
* Create a range from start (included) to end (excluded).
|
|
35
|
+
* range(10, 13) => [10, 11, 12]
|
|
36
|
+
* range(2, 8, 2) => [2, 4, 6]
|
|
37
|
+
*/
|
|
38
|
+
export declare function range(start: number, end: number, step?: number): number[];
|
|
39
|
+
/**
|
|
40
|
+
* Groups consecutive numbers.
|
|
41
|
+
* The input array is assumed to be sorted
|
|
42
|
+
* @param numbers
|
|
43
|
+
*/
|
|
44
|
+
export declare function groupConsecutive(numbers: number[]): ConsecutiveIndexes[];
|
|
45
|
+
/**
|
|
46
|
+
* Create one generator from two generators by linking
|
|
47
|
+
* each item of the first generator to the next item of
|
|
48
|
+
* the second generator.
|
|
49
|
+
*
|
|
50
|
+
* Let's say generator G1 yields A, B, C and generator G2 yields X, Y, Z.
|
|
51
|
+
* The resulting generator of `linkNext(G1, G2)` will yield A', B', C'
|
|
52
|
+
* where `A' = A & {next: Y}`, `B' = B & {next: Z}` and `C' = C & {next: undefined}`
|
|
53
|
+
* @param generator
|
|
54
|
+
* @param nextGenerator
|
|
55
|
+
*/
|
|
56
|
+
export declare function linkNext<T>(generator: Generator<T>, nextGenerator: Generator<T>): Generator<T & {
|
|
57
|
+
next?: T;
|
|
58
|
+
}>;
|
|
59
|
+
export declare function isBoolean(str: string): boolean;
|
|
60
|
+
export declare function isMarkdownLink(str: string): boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Check if the string is a web link.
|
|
63
|
+
* e.g. http://odoo.com
|
|
64
|
+
*/
|
|
65
|
+
export declare function isWebLink(str: string): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Build a markdown link from a label and an url
|
|
68
|
+
*/
|
|
69
|
+
export declare function markdownLink(label: string, url: string): string;
|
|
70
|
+
export declare function parseMarkdownLink(str: string): {
|
|
71
|
+
url: string;
|
|
72
|
+
label: string;
|
|
73
|
+
};
|
|
74
|
+
export declare function isSheetUrl(url: string): boolean;
|
|
75
|
+
export declare function buildSheetLink(sheetId: UID): string;
|
|
76
|
+
/**
|
|
77
|
+
* Parse a sheet link and return the sheet id
|
|
78
|
+
*/
|
|
79
|
+
export declare function parseSheetUrl(sheetLink: string): string;
|
|
80
|
+
/**
|
|
81
|
+
* This helper function can be used as a type guard when filtering arrays.
|
|
82
|
+
* const foo: number[] = [1, 2, undefined, 4].filter(isDefined)
|
|
83
|
+
*/
|
|
84
|
+
export declare function isDefined<T>(argument: T | undefined): argument is T;
|
|
85
|
+
export declare function isNotNull<T>(argument: T | null): argument is T;
|
|
86
|
+
/**
|
|
87
|
+
* Check if all the values of an object, and all the values of the objects inside of it, are undefined.
|
|
88
|
+
*/
|
|
89
|
+
export declare function isObjectEmptyRecursive<T extends object>(argument: T | undefined): boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Get the id of the given item (its key in the given dictionnary).
|
|
92
|
+
* If the given item does not exist in the dictionary, it creates one with a new id.
|
|
93
|
+
*/
|
|
94
|
+
export declare function getItemId<T>(item: T, itemsDic: {
|
|
95
|
+
[id: number]: T;
|
|
96
|
+
}): number;
|
|
97
|
+
/**
|
|
98
|
+
* This method comes from owl 1 as it was removed in owl 2
|
|
99
|
+
*
|
|
100
|
+
* Returns a function, that, as long as it continues to be invoked, will not
|
|
101
|
+
* be triggered. The function will be called after it stops being called for
|
|
102
|
+
* N milliseconds. If `immediate` is passed, trigger the function on the
|
|
103
|
+
* leading edge, instead of the trailing.
|
|
104
|
+
*
|
|
105
|
+
* Inspired by https://davidwalsh.name/javascript-debounce-function
|
|
106
|
+
*/
|
|
107
|
+
export declare function debounce(func: Function, wait: number, immediate?: boolean): Function;
|
|
108
|
+
export declare function concat(chars: string[]): string;
|
|
109
|
+
/**
|
|
110
|
+
* Lazy value computed by the provided function.
|
|
111
|
+
*/
|
|
112
|
+
export declare function lazy<T>(fn: (() => T) | T): Lazy<T>;
|
|
113
|
+
/**
|
|
114
|
+
* Find the next defined value after the given index in an array of strings. If there is no defined value
|
|
115
|
+
* after the index, return the closest defined value before the index. Return an empty string if no
|
|
116
|
+
* defined value was found.
|
|
117
|
+
*
|
|
118
|
+
*/
|
|
119
|
+
export declare function findNextDefinedValue(arr: string[], index: number): string;
|
|
120
|
+
/** Get index of first header added by an ADD_COLUMNS_ROWS command */
|
|
121
|
+
export declare function getAddHeaderStartIndex(position: "before" | "after", base: number): number;
|
|
122
|
+
/**
|
|
123
|
+
* Compares two objects.
|
|
124
|
+
*/
|
|
125
|
+
export declare function deepEquals(o1: any, o2: any): boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Compares two arrays.
|
|
128
|
+
* For performance reasons, this function is to be preferred
|
|
129
|
+
* to 'deepEquals' in the case we know that the inputs are arrays.
|
|
130
|
+
*/
|
|
131
|
+
export declare function deepEqualsArray(arr1: unknown[], arr2: unknown[]): boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Check if the given array contains all the values of the other array.
|
|
134
|
+
* It makes the assumption that both array do not contain duplicates.
|
|
135
|
+
*/
|
|
136
|
+
export declare function includesAll<T>(arr: T[], values: T[]): boolean;
|
|
137
|
+
/**
|
|
138
|
+
* Return an object with all the keys in the object that have a falsy value removed.
|
|
139
|
+
*/
|
|
140
|
+
export declare function removeFalsyAttributes(obj: Object): Object;
|
|
141
|
+
export declare const specialWhiteSpaceRegexp: RegExp;
|
|
142
|
+
/**
|
|
143
|
+
* Replace all different newlines characters by \n
|
|
144
|
+
*/
|
|
145
|
+
export declare function replaceNewLines(text: string | undefined): string;
|
|
146
|
+
/** Move the item at the starting index to the target index in an array */
|
|
147
|
+
export declare function moveItemToIndex<T>(array: T[], startIndex: number, targetIndex: number): T[];
|
|
148
|
+
/**
|
|
149
|
+
* Determine if the numbers are consecutive.
|
|
150
|
+
*/
|
|
151
|
+
export declare function isConsecutive(iterable: Iterable<number>): boolean;
|
|
152
|
+
export declare class JetSet<T> extends Set<T> {
|
|
153
|
+
addMany(iterable: Iterable<T>): this;
|
|
154
|
+
deleteMany(iterable: Iterable<T>): void;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Creates a version of the function that's memoized on the value of its first
|
|
158
|
+
* argument, if any.
|
|
159
|
+
*/
|
|
160
|
+
export declare function memoize<T extends any[], U>(func: (...args: T) => U): (...args: T) => U;
|
|
161
|
+
/**
|
|
162
|
+
* Removes the specified indexes from the array.
|
|
163
|
+
* Sparse (empty) elements are transformed to undefined (unless their index is explicitly removed).
|
|
164
|
+
*/
|
|
165
|
+
export declare function removeIndexesFromArray<T>(array: readonly T[], indexes: number[]): T[];
|
|
166
|
+
export declare function insertItemsAtIndex<T>(array: readonly T[], items: T[], index: number): T[];
|
|
167
|
+
export declare function trimContent(content: string): string;
|
|
168
|
+
export declare function isNumberBetween(value: number, min: number, max: number): boolean;
|
|
169
|
+
/**
|
|
170
|
+
* Alternative to Math.max that works with large arrays.
|
|
171
|
+
* Typically useful for arrays bigger than 100k elements.
|
|
172
|
+
*/
|
|
173
|
+
export declare function largeMax(array: number[]): number;
|
|
174
|
+
/**
|
|
175
|
+
* Alternative to Math.min that works with large arrays.
|
|
176
|
+
* Typically useful for arrays bigger than 100k elements.
|
|
177
|
+
*/
|
|
178
|
+
export declare function largeMin(array: number[]): number;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Locale } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* This function returns a regexp that is supposed to be as close as possible as the numberRegexp,
|
|
4
|
+
* but its purpose is to be used by the tokenizer.
|
|
5
|
+
*
|
|
6
|
+
* - it tolerates extra characters at the end. This is useful because the tokenizer
|
|
7
|
+
* only needs to find the number at the start of a string
|
|
8
|
+
* - it does not support % symbol, in formulas % is an operator
|
|
9
|
+
*/
|
|
10
|
+
export declare const getFormulaNumberRegex: (decimalSeparator: string) => RegExp;
|
|
11
|
+
/**
|
|
12
|
+
* Return true if the argument is a "number string".
|
|
13
|
+
*
|
|
14
|
+
* Note that "" (empty string) does not count as a number string
|
|
15
|
+
*/
|
|
16
|
+
export declare function isNumber(value: string | undefined, locale: Locale): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Convert a string into a number. It assumes that the string actually represents
|
|
19
|
+
* a number (as determined by the isNumber function)
|
|
20
|
+
*
|
|
21
|
+
* Note that it accepts "" (empty string), even though it does not count as a
|
|
22
|
+
* number from the point of view of the isNumber function.
|
|
23
|
+
*/
|
|
24
|
+
export declare function parseNumber(str: string, locale: Locale): number;
|
|
25
|
+
export declare function percentile(values: number[], percent: number, isInclusive: boolean): number;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { CellPosition, CoreGetters, Getters, Range, RangeData, RangePart, UID, UnboundedZone, Zone, ZoneDimension } from "../types";
|
|
2
|
+
interface ConstructorArgs {
|
|
3
|
+
readonly zone: Readonly<Zone | UnboundedZone>;
|
|
4
|
+
readonly parts: readonly RangePart[];
|
|
5
|
+
readonly invalidXc?: string;
|
|
6
|
+
/** true if the user provided the range with the sheet name */
|
|
7
|
+
readonly prefixSheet: boolean;
|
|
8
|
+
/** the name of any sheet that is invalid */
|
|
9
|
+
readonly invalidSheetName?: string;
|
|
10
|
+
/** the sheet on which the range is defined */
|
|
11
|
+
readonly sheetId: UID;
|
|
12
|
+
}
|
|
13
|
+
export declare class RangeImpl implements Range {
|
|
14
|
+
private getSheetSize;
|
|
15
|
+
private readonly _zone;
|
|
16
|
+
readonly parts: Range["parts"];
|
|
17
|
+
readonly invalidXc?: string;
|
|
18
|
+
readonly prefixSheet: boolean;
|
|
19
|
+
readonly sheetId: UID;
|
|
20
|
+
readonly invalidSheetName?: string;
|
|
21
|
+
constructor(args: ConstructorArgs, getSheetSize: (sheetId: UID) => ZoneDimension);
|
|
22
|
+
static fromRange(range: Range, getters: CoreGetters): RangeImpl;
|
|
23
|
+
get unboundedZone(): UnboundedZone;
|
|
24
|
+
get zone(): Readonly<Zone>;
|
|
25
|
+
static getRangeParts(xc: string, zone: UnboundedZone): RangePart[];
|
|
26
|
+
get isFullCol(): boolean;
|
|
27
|
+
get isFullRow(): boolean;
|
|
28
|
+
get rangeData(): RangeData;
|
|
29
|
+
/**
|
|
30
|
+
* Check that a zone is valid regarding the order of top-bottom and left-right.
|
|
31
|
+
* Left should be smaller than right, top should be smaller than bottom.
|
|
32
|
+
* If it's not the case, simply invert them, and invert the linked parts
|
|
33
|
+
*/
|
|
34
|
+
orderZone(): RangeImpl;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @param rangeParams optional, values to put in the cloned range instead of the current values of the range
|
|
38
|
+
*/
|
|
39
|
+
clone(rangeParams?: Partial<ConstructorArgs>): RangeImpl;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Copy a range. If the range is on the sheetIdFrom, the range will target
|
|
43
|
+
* sheetIdTo.
|
|
44
|
+
*/
|
|
45
|
+
export declare function copyRangeWithNewSheetId(sheetIdFrom: UID, sheetIdTo: UID, range: Range): Range;
|
|
46
|
+
/**
|
|
47
|
+
* Create a range from a xc. If the xc is empty, this function returns undefined.
|
|
48
|
+
*/
|
|
49
|
+
export declare function createValidRange(getters: CoreGetters, sheetId: UID, xc?: string): Range | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Spread multiple colrows zone to one row/col zone and add a many new input range as needed.
|
|
52
|
+
* For example, A1:B4 will become [A1:A4, B1:B4]
|
|
53
|
+
*/
|
|
54
|
+
export declare function spreadRange(getters: Getters, ranges: string[]): string[];
|
|
55
|
+
/**
|
|
56
|
+
* Get all the cell positions in the given ranges. If a cell is in multiple ranges, it will be returned multiple times.
|
|
57
|
+
*/
|
|
58
|
+
export declare function getCellPositionsInRanges(ranges: Range[]): CellPosition[];
|
|
59
|
+
export {};
|