@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,276 @@
|
|
|
1
|
+
import { ComponentConstructor } from "@odoo/owl";
|
|
2
|
+
import { Token } from "../formulas";
|
|
3
|
+
import { Cell, CellValue, EvaluatedCell } from "./cells";
|
|
4
|
+
import { CommandResult } from "./commands";
|
|
5
|
+
import { Format } from "./format";
|
|
6
|
+
import { Range } from "./range";
|
|
7
|
+
/**
|
|
8
|
+
* The following type is meant to be used in union with other aliases to prevent
|
|
9
|
+
* Intellisense from resolving it.
|
|
10
|
+
* See https://github.com/microsoft/TypeScript/issues/31940#issuecomment-841712377
|
|
11
|
+
*/
|
|
12
|
+
export type Alias = {} & {};
|
|
13
|
+
export type HeaderIndex = number & Alias;
|
|
14
|
+
export type Pixel = number & Alias;
|
|
15
|
+
export type UID = string & Alias;
|
|
16
|
+
export type SetDecimalStep = 1 | -1;
|
|
17
|
+
export type FilterId = UID & Alias;
|
|
18
|
+
export type FilterTableId = UID & Alias;
|
|
19
|
+
/**
|
|
20
|
+
* CSS style color string
|
|
21
|
+
* e.g. "#ABC", "#AAAFFF", "rgb(30, 80, 16)"
|
|
22
|
+
*/
|
|
23
|
+
export type Color = string & Alias;
|
|
24
|
+
export interface RGBA {
|
|
25
|
+
a: number;
|
|
26
|
+
r: number;
|
|
27
|
+
g: number;
|
|
28
|
+
b: number;
|
|
29
|
+
}
|
|
30
|
+
export interface HSLA {
|
|
31
|
+
a: number;
|
|
32
|
+
h: number;
|
|
33
|
+
s: number;
|
|
34
|
+
l: number;
|
|
35
|
+
}
|
|
36
|
+
export interface Link {
|
|
37
|
+
readonly label: string;
|
|
38
|
+
readonly url: string;
|
|
39
|
+
readonly isExternal: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Specifies if the URL is editable by the end user.
|
|
42
|
+
* Special links might not allow it.
|
|
43
|
+
*/
|
|
44
|
+
readonly isUrlEditable: boolean;
|
|
45
|
+
}
|
|
46
|
+
export interface Zone {
|
|
47
|
+
left: HeaderIndex;
|
|
48
|
+
right: HeaderIndex;
|
|
49
|
+
top: HeaderIndex;
|
|
50
|
+
bottom: HeaderIndex;
|
|
51
|
+
}
|
|
52
|
+
export interface AnchorZone {
|
|
53
|
+
zone: Zone;
|
|
54
|
+
cell: Position;
|
|
55
|
+
}
|
|
56
|
+
export interface Selection {
|
|
57
|
+
anchor: AnchorZone;
|
|
58
|
+
zones: Zone[];
|
|
59
|
+
}
|
|
60
|
+
export interface UnboundedZone {
|
|
61
|
+
top: HeaderIndex;
|
|
62
|
+
bottom: HeaderIndex | undefined;
|
|
63
|
+
left: HeaderIndex;
|
|
64
|
+
right: HeaderIndex | undefined;
|
|
65
|
+
hasHeader?: boolean;
|
|
66
|
+
}
|
|
67
|
+
export interface ZoneDimension {
|
|
68
|
+
numberOfRows: HeaderIndex;
|
|
69
|
+
numberOfCols: HeaderIndex;
|
|
70
|
+
}
|
|
71
|
+
export type Align = "left" | "right" | "center" | undefined;
|
|
72
|
+
export type VerticalAlign = "top" | "middle" | "bottom" | undefined;
|
|
73
|
+
export type Wrapping = "overflow" | "wrap" | "clip" | undefined;
|
|
74
|
+
export interface Style {
|
|
75
|
+
bold?: boolean;
|
|
76
|
+
italic?: boolean;
|
|
77
|
+
strikethrough?: boolean;
|
|
78
|
+
underline?: boolean;
|
|
79
|
+
align?: Align;
|
|
80
|
+
wrapping?: Wrapping;
|
|
81
|
+
verticalAlign?: VerticalAlign;
|
|
82
|
+
fillColor?: Color;
|
|
83
|
+
textColor?: Color;
|
|
84
|
+
fontSize?: number;
|
|
85
|
+
}
|
|
86
|
+
export interface UpdateCellData {
|
|
87
|
+
content?: string;
|
|
88
|
+
formula?: string;
|
|
89
|
+
style?: Style | null;
|
|
90
|
+
format?: Format;
|
|
91
|
+
}
|
|
92
|
+
export interface Sheet {
|
|
93
|
+
id: UID;
|
|
94
|
+
name: string;
|
|
95
|
+
numberOfCols: number;
|
|
96
|
+
rows: Row[];
|
|
97
|
+
areGridLinesVisible: boolean;
|
|
98
|
+
isVisible: boolean;
|
|
99
|
+
panes: PaneDivision;
|
|
100
|
+
}
|
|
101
|
+
export interface CellPosition {
|
|
102
|
+
col: HeaderIndex;
|
|
103
|
+
row: HeaderIndex;
|
|
104
|
+
sheetId: UID;
|
|
105
|
+
}
|
|
106
|
+
export declare const borderStyles: readonly ["thin", "medium", "thick", "dashed", "dotted"];
|
|
107
|
+
export type BorderStyle = (typeof borderStyles)[number];
|
|
108
|
+
export type BorderDescr = {
|
|
109
|
+
style: BorderStyle;
|
|
110
|
+
color: Color;
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* A complete border(s) data is a set of position-color-style information
|
|
114
|
+
*/
|
|
115
|
+
export type BorderData = {
|
|
116
|
+
position: BorderPosition;
|
|
117
|
+
color?: Color;
|
|
118
|
+
style?: BorderStyle;
|
|
119
|
+
};
|
|
120
|
+
export interface Border {
|
|
121
|
+
top?: BorderDescr;
|
|
122
|
+
left?: BorderDescr;
|
|
123
|
+
bottom?: BorderDescr;
|
|
124
|
+
right?: BorderDescr;
|
|
125
|
+
}
|
|
126
|
+
export type ReferenceDenormalizer = (range: Range, isMeta: boolean, functionName: string, paramNumber: number) => any | any[][];
|
|
127
|
+
export type EnsureRange = (range: Range) => Matrix<ValueAndFormat>;
|
|
128
|
+
export type NumberParser = (str: string) => number;
|
|
129
|
+
export type _CompiledFormula = (deps: Range[], refFn: ReferenceDenormalizer, range: EnsureRange, ctx: {}) => Matrix<ValueAndFormat> | ValueAndFormat;
|
|
130
|
+
export interface CompiledFormula {
|
|
131
|
+
execute: _CompiledFormula;
|
|
132
|
+
tokens: Token[];
|
|
133
|
+
dependencies: string[];
|
|
134
|
+
}
|
|
135
|
+
export interface RangeCompiledFormula extends Omit<CompiledFormula, "dependencies"> {
|
|
136
|
+
dependencies: Range[];
|
|
137
|
+
}
|
|
138
|
+
export type Matrix<T = unknown> = T[][];
|
|
139
|
+
export type ValueAndFormat = {
|
|
140
|
+
value: CellValue;
|
|
141
|
+
format?: Format;
|
|
142
|
+
};
|
|
143
|
+
export type Arg = Maybe<ValueAndFormat> | Matrix<ValueAndFormat>;
|
|
144
|
+
export type ArgValue = Maybe<CellValue> | Matrix<CellValue>;
|
|
145
|
+
export declare function isMatrix(x: any): x is Matrix<any>;
|
|
146
|
+
export interface ClipboardCell {
|
|
147
|
+
cell?: Cell;
|
|
148
|
+
evaluatedCell: EvaluatedCell;
|
|
149
|
+
border?: Border;
|
|
150
|
+
position: CellPosition;
|
|
151
|
+
}
|
|
152
|
+
export interface HeaderDimensions {
|
|
153
|
+
start: Pixel;
|
|
154
|
+
size: Pixel;
|
|
155
|
+
end: Pixel;
|
|
156
|
+
}
|
|
157
|
+
export interface Row {
|
|
158
|
+
cells: Record<number, UID | undefined>;
|
|
159
|
+
}
|
|
160
|
+
export interface Position {
|
|
161
|
+
col: HeaderIndex;
|
|
162
|
+
row: HeaderIndex;
|
|
163
|
+
}
|
|
164
|
+
export interface PixelPosition {
|
|
165
|
+
x: Pixel;
|
|
166
|
+
y: Pixel;
|
|
167
|
+
}
|
|
168
|
+
export interface Merge extends Zone {
|
|
169
|
+
id: number;
|
|
170
|
+
topLeft: Position;
|
|
171
|
+
}
|
|
172
|
+
export interface Highlight {
|
|
173
|
+
zone: Zone;
|
|
174
|
+
sheetId: UID;
|
|
175
|
+
color: Color | null;
|
|
176
|
+
}
|
|
177
|
+
export interface PaneDivision {
|
|
178
|
+
/** Represents the number of frozen columns */
|
|
179
|
+
xSplit: number;
|
|
180
|
+
/** Represents the number of frozen rows */
|
|
181
|
+
ySplit: number;
|
|
182
|
+
}
|
|
183
|
+
export type BorderPosition = "all" | "hv" | "h" | "v" | "external" | "left" | "top" | "right" | "bottom" | "clear";
|
|
184
|
+
export type BorderDescription = {
|
|
185
|
+
vertical?: BorderDescr;
|
|
186
|
+
horizontal?: BorderDescr;
|
|
187
|
+
} | undefined;
|
|
188
|
+
export declare const enum DIRECTION {
|
|
189
|
+
UP = "up",
|
|
190
|
+
DOWN = "down",
|
|
191
|
+
LEFT = "left",
|
|
192
|
+
RIGHT = "right"
|
|
193
|
+
}
|
|
194
|
+
export type ChangeType = "REMOVE" | "RESIZE" | "MOVE" | "CHANGE" | "NONE";
|
|
195
|
+
export type ApplyRangeChangeResult = {
|
|
196
|
+
changeType: Exclude<ChangeType, "NONE">;
|
|
197
|
+
range: Range;
|
|
198
|
+
} | {
|
|
199
|
+
changeType: "NONE";
|
|
200
|
+
};
|
|
201
|
+
export type ApplyRangeChange = (range: Range) => ApplyRangeChangeResult;
|
|
202
|
+
export type Dimension = "COL" | "ROW";
|
|
203
|
+
export type ConsecutiveIndexes = HeaderIndex[];
|
|
204
|
+
export interface RangeProvider {
|
|
205
|
+
adaptRanges: (applyChange: ApplyRangeChange, sheetId?: UID) => void;
|
|
206
|
+
}
|
|
207
|
+
export type Validation<T> = (toValidate: T) => CommandResult | CommandResult[];
|
|
208
|
+
export type Increment = 1 | -1 | 0;
|
|
209
|
+
export interface Ref<T> {
|
|
210
|
+
el: T | null;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Return the prop's type of a component
|
|
214
|
+
*/
|
|
215
|
+
export type PropsOf<C> = C extends ComponentConstructor<infer Props> ? Props : never;
|
|
216
|
+
/**
|
|
217
|
+
* Container for a lazy computed value
|
|
218
|
+
*/
|
|
219
|
+
export interface Lazy<T> {
|
|
220
|
+
/**
|
|
221
|
+
* Return the computed value.
|
|
222
|
+
* The value is computed only once and memoized.
|
|
223
|
+
*/
|
|
224
|
+
(): T;
|
|
225
|
+
/**
|
|
226
|
+
* Map a lazy value to another lazy value.
|
|
227
|
+
*
|
|
228
|
+
* ```ts
|
|
229
|
+
* // neither function is called here
|
|
230
|
+
* const lazyValue = lazy(() => veryExpensive(...)).map((result) => alsoVeryExpensive(result));
|
|
231
|
+
*
|
|
232
|
+
* // both values are computed now
|
|
233
|
+
* const value = lazyValue()
|
|
234
|
+
* ```
|
|
235
|
+
*/
|
|
236
|
+
map: <U>(callback: (value: T) => U) => Lazy<U>;
|
|
237
|
+
}
|
|
238
|
+
export type Maybe<T> = T | undefined;
|
|
239
|
+
export interface Cloneable<T> {
|
|
240
|
+
clone: (args?: Partial<T>) => T;
|
|
241
|
+
}
|
|
242
|
+
export type CSSProperties<P extends string = string> = Record<P, string | undefined>;
|
|
243
|
+
export interface SortOptions {
|
|
244
|
+
/** If true sort the headers of the range along with the rest */
|
|
245
|
+
sortHeaders?: boolean;
|
|
246
|
+
/** If true treat empty cells as "0" instead of undefined */
|
|
247
|
+
emptyCellAsZero?: boolean;
|
|
248
|
+
}
|
|
249
|
+
export interface MenuMouseEvent extends MouseEvent {
|
|
250
|
+
closedMenuId?: UID;
|
|
251
|
+
}
|
|
252
|
+
export type Immutable<T> = T extends ImmutablePrimitive ? T : T extends Array<infer U> ? ImmutableArray<U> : T extends Map<infer K, infer V> ? ImmutableMap<K, V> : T extends Set<infer M> ? ImmutableSet<M> : ImmutableObject<T>;
|
|
253
|
+
type ImmutablePrimitive = undefined | null | boolean | string | number | Function;
|
|
254
|
+
type ImmutableArray<T> = ReadonlyArray<Immutable<T>>;
|
|
255
|
+
type ImmutableMap<K, V> = ReadonlyMap<Immutable<K>, Immutable<V>>;
|
|
256
|
+
type ImmutableSet<T> = ReadonlySet<Immutable<T>>;
|
|
257
|
+
type ImmutableObject<T> = {
|
|
258
|
+
readonly [K in keyof T]: Immutable<T[K]>;
|
|
259
|
+
};
|
|
260
|
+
export interface HeaderGroup {
|
|
261
|
+
start: HeaderIndex;
|
|
262
|
+
end: HeaderIndex;
|
|
263
|
+
isFolded?: boolean;
|
|
264
|
+
}
|
|
265
|
+
export type Direction = "up" | "down" | "left" | "right";
|
|
266
|
+
export type SelectionStep = number | "end";
|
|
267
|
+
export interface Offset {
|
|
268
|
+
col: number;
|
|
269
|
+
row: number;
|
|
270
|
+
}
|
|
271
|
+
export type DeepPartial<T> = T extends Function ? T : T extends Array<infer U> ? _DeepPartialArray<U> : T extends object ? _DeepPartialObject<T> : T | undefined;
|
|
272
|
+
type _DeepPartialArray<T> = Array<DeepPartial<T>>;
|
|
273
|
+
type _DeepPartialObject<T> = {
|
|
274
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
275
|
+
};
|
|
276
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Cloneable, UID, UnboundedZone, Zone } from "./misc";
|
|
2
|
+
export interface RangePart {
|
|
3
|
+
readonly colFixed: boolean;
|
|
4
|
+
readonly rowFixed: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface Range extends Cloneable<Range> {
|
|
7
|
+
readonly zone: Readonly<Zone>;
|
|
8
|
+
readonly parts: readonly RangePart[];
|
|
9
|
+
readonly invalidXc?: string;
|
|
10
|
+
/** true if the user provided the range with the sheet name */
|
|
11
|
+
readonly prefixSheet: boolean;
|
|
12
|
+
/** the name of any sheet that is invalid */
|
|
13
|
+
readonly invalidSheetName?: string;
|
|
14
|
+
/** the sheet on which the range is defined */
|
|
15
|
+
readonly sheetId: UID;
|
|
16
|
+
readonly rangeData: RangeData;
|
|
17
|
+
}
|
|
18
|
+
export interface RangeData {
|
|
19
|
+
_zone: Zone | UnboundedZone;
|
|
20
|
+
_sheetId: UID;
|
|
21
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { Alias, Align, Border, Pixel, Style, VerticalAlign, Zone } from "./misc";
|
|
2
|
+
/**
|
|
3
|
+
* Coordinate in pixels
|
|
4
|
+
*/
|
|
5
|
+
export interface DOMCoordinates {
|
|
6
|
+
x: Pixel;
|
|
7
|
+
y: Pixel;
|
|
8
|
+
}
|
|
9
|
+
export interface DOMDimension {
|
|
10
|
+
width: Pixel;
|
|
11
|
+
height: Pixel;
|
|
12
|
+
}
|
|
13
|
+
export type Rect = DOMCoordinates & DOMDimension;
|
|
14
|
+
export interface BoxTextContent {
|
|
15
|
+
textLines: string[];
|
|
16
|
+
width: Pixel;
|
|
17
|
+
align: Align;
|
|
18
|
+
}
|
|
19
|
+
export interface Box extends Rect {
|
|
20
|
+
content?: BoxTextContent;
|
|
21
|
+
style: Style;
|
|
22
|
+
border?: Border;
|
|
23
|
+
hasIcon?: boolean;
|
|
24
|
+
clipRect?: Rect;
|
|
25
|
+
isError?: boolean;
|
|
26
|
+
image?: Image;
|
|
27
|
+
isMerge?: boolean;
|
|
28
|
+
verticalAlign?: VerticalAlign;
|
|
29
|
+
isOverflow?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface Image {
|
|
32
|
+
clipIcon: Rect | null;
|
|
33
|
+
size: Pixel;
|
|
34
|
+
type: "icon";
|
|
35
|
+
image: HTMLImageElement;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The viewport is the visible area of a sheet.
|
|
39
|
+
* Column and row headers are not included in the viewport.
|
|
40
|
+
*/
|
|
41
|
+
export type Viewport = Zone & Alias;
|
|
42
|
+
export interface SheetScrollInfo {
|
|
43
|
+
/**
|
|
44
|
+
* The offset in the X coordinate between the viewport left side and
|
|
45
|
+
* the grid left side (left of column "A").
|
|
46
|
+
*/
|
|
47
|
+
scrollX: Pixel;
|
|
48
|
+
/**
|
|
49
|
+
* The offset in the Y coordinate between the viewport top side and
|
|
50
|
+
* the grid top side (top of row "1").
|
|
51
|
+
*/
|
|
52
|
+
scrollY: Pixel;
|
|
53
|
+
}
|
|
54
|
+
export interface SheetDOMScrollInfo {
|
|
55
|
+
/**
|
|
56
|
+
* The scrollBar offset in the X coordinate, which can differ from offsetX as
|
|
57
|
+
* the former is "smooth" and the latter will "snap" from one cell coordinate to the other
|
|
58
|
+
*/
|
|
59
|
+
scrollX: Pixel;
|
|
60
|
+
/**
|
|
61
|
+
* The scrollBar offset in the Y coordinate, which can differ from offsetX as
|
|
62
|
+
* the former is "smooth" and the latter will "snap" from one cell coordinate to the other
|
|
63
|
+
*/
|
|
64
|
+
scrollY: Pixel;
|
|
65
|
+
}
|
|
66
|
+
export interface GridRenderingContext {
|
|
67
|
+
ctx: CanvasRenderingContext2D;
|
|
68
|
+
dpr: number;
|
|
69
|
+
thinLineWidth: number;
|
|
70
|
+
}
|
|
71
|
+
export declare const enum LAYERS {
|
|
72
|
+
Background = 0,
|
|
73
|
+
Highlights = 1,
|
|
74
|
+
Clipboard = 2,
|
|
75
|
+
Search = 3,
|
|
76
|
+
Chart = 4,
|
|
77
|
+
Autofill = 5,
|
|
78
|
+
Selection = 6,
|
|
79
|
+
Headers = 7
|
|
80
|
+
}
|
|
81
|
+
export interface EdgeScrollInfo {
|
|
82
|
+
canEdgeScroll: boolean;
|
|
83
|
+
direction: ScrollDirection;
|
|
84
|
+
delay: number;
|
|
85
|
+
}
|
|
86
|
+
export type ScrollDirection = 1 | 0 | -1 | "reset";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CommandResult } from "./commands";
|
|
2
|
+
import { Validation } from "./misc";
|
|
3
|
+
export interface Validator {
|
|
4
|
+
/**
|
|
5
|
+
* Combine multiple validation functions into a single function
|
|
6
|
+
* returning the list of result of every validation.
|
|
7
|
+
*/
|
|
8
|
+
batchValidations<T>(...validations: Validation<T>[]): Validation<T>;
|
|
9
|
+
/**
|
|
10
|
+
* Combine multiple validation functions. Every validation is executed one after
|
|
11
|
+
* the other. As soon as one validation fails, it stops and the cancelled reason
|
|
12
|
+
* is returned.
|
|
13
|
+
*/
|
|
14
|
+
chainValidations<T>(...validations: Validation<T>[]): Validation<T>;
|
|
15
|
+
checkValidations<T>(command: T, ...validations: Validation<T>[]): CommandResult | CommandResult[];
|
|
16
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { CellValue, DataValidationRule, Format, Locale } from ".";
|
|
2
|
+
import { ExcelChartDefinition } from "./chart/chart";
|
|
3
|
+
import { ConditionalFormat } from "./conditional_formatting";
|
|
4
|
+
import { Image } from "./image";
|
|
5
|
+
import { Border, Dimension, HeaderGroup, PaneDivision, Pixel, Style, UID } from "./misc";
|
|
6
|
+
export interface Dependencies {
|
|
7
|
+
references: string[];
|
|
8
|
+
numbers: number[];
|
|
9
|
+
strings: string[];
|
|
10
|
+
}
|
|
11
|
+
export interface CellData {
|
|
12
|
+
content?: string;
|
|
13
|
+
style?: number;
|
|
14
|
+
border?: number;
|
|
15
|
+
format?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface HeaderData {
|
|
18
|
+
size?: number;
|
|
19
|
+
isHidden?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface FigureData<T> {
|
|
22
|
+
id: UID;
|
|
23
|
+
x: Pixel;
|
|
24
|
+
y: Pixel;
|
|
25
|
+
width: Pixel;
|
|
26
|
+
height: Pixel;
|
|
27
|
+
tag: string;
|
|
28
|
+
data: T;
|
|
29
|
+
}
|
|
30
|
+
export interface SheetData {
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
colNumber: number;
|
|
34
|
+
rowNumber: number;
|
|
35
|
+
cells: {
|
|
36
|
+
[key: string]: CellData | undefined;
|
|
37
|
+
};
|
|
38
|
+
merges: string[];
|
|
39
|
+
figures: FigureData<any>[];
|
|
40
|
+
cols: {
|
|
41
|
+
[key: number]: HeaderData;
|
|
42
|
+
};
|
|
43
|
+
rows: {
|
|
44
|
+
[key: number]: HeaderData;
|
|
45
|
+
};
|
|
46
|
+
conditionalFormats: ConditionalFormat[];
|
|
47
|
+
dataValidationRules?: DataValidationRuleData[];
|
|
48
|
+
filterTables: FilterTableData[];
|
|
49
|
+
areGridLinesVisible?: boolean;
|
|
50
|
+
isVisible: boolean;
|
|
51
|
+
panes?: PaneDivision;
|
|
52
|
+
headerGroups?: Record<Dimension, HeaderGroup[]>;
|
|
53
|
+
}
|
|
54
|
+
interface WorkbookSettings {
|
|
55
|
+
locale: Locale;
|
|
56
|
+
}
|
|
57
|
+
export interface WorkbookData {
|
|
58
|
+
version: number;
|
|
59
|
+
sheets: SheetData[];
|
|
60
|
+
styles: {
|
|
61
|
+
[key: number]: Style;
|
|
62
|
+
};
|
|
63
|
+
formats: {
|
|
64
|
+
[key: number]: Format;
|
|
65
|
+
};
|
|
66
|
+
borders: {
|
|
67
|
+
[key: number]: Border;
|
|
68
|
+
};
|
|
69
|
+
entities: {
|
|
70
|
+
[key: string]: {
|
|
71
|
+
[key: string]: any;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
revisionId: UID;
|
|
75
|
+
uniqueFigureIds: boolean;
|
|
76
|
+
settings: WorkbookSettings;
|
|
77
|
+
}
|
|
78
|
+
export interface ExcelWorkbookData extends WorkbookData {
|
|
79
|
+
sheets: ExcelSheetData[];
|
|
80
|
+
}
|
|
81
|
+
export interface ExcelCellData extends CellData {
|
|
82
|
+
value: CellValue;
|
|
83
|
+
isFormula: Boolean;
|
|
84
|
+
computedFormat?: Format;
|
|
85
|
+
}
|
|
86
|
+
export interface ExcelSheetData extends Omit<SheetData, "figureTables"> {
|
|
87
|
+
cells: {
|
|
88
|
+
[key: string]: ExcelCellData | undefined;
|
|
89
|
+
};
|
|
90
|
+
formulaSpillRanges: {
|
|
91
|
+
[xc: string]: string;
|
|
92
|
+
};
|
|
93
|
+
charts: FigureData<ExcelChartDefinition>[];
|
|
94
|
+
images: FigureData<Image>[];
|
|
95
|
+
filterTables: ExcelFilterTableData[];
|
|
96
|
+
}
|
|
97
|
+
export interface FilterTableData {
|
|
98
|
+
range: string;
|
|
99
|
+
}
|
|
100
|
+
export interface DataValidationRuleData extends Omit<DataValidationRule, "ranges"> {
|
|
101
|
+
ranges: string[];
|
|
102
|
+
}
|
|
103
|
+
export interface ExcelFilterTableData {
|
|
104
|
+
range: string;
|
|
105
|
+
filters: ExcelFilterData[];
|
|
106
|
+
}
|
|
107
|
+
export interface ExcelFilterData {
|
|
108
|
+
colId: number;
|
|
109
|
+
displayedValues: string[];
|
|
110
|
+
displayBlanks?: boolean;
|
|
111
|
+
}
|
|
112
|
+
export {};
|