@odoo/o-spreadsheet 19.5.0-alpha.2 → 19.5.0-alpha.20
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/material_symbols_outlined.css +9 -0
- package/dist/o_spreadsheet.cjs +53040 -49146
- package/dist/o_spreadsheet.css +330 -157
- package/dist/o_spreadsheet.esm.js +52813 -48924
- package/dist/o_spreadsheet.iife.js +49777 -45883
- package/dist/o_spreadsheet.min.iife.js +413 -359
- package/dist/o_spreadsheet.xml +505 -332
- package/dist/types/actions/action.d.ts +1 -7
- package/dist/types/actions/data_actions.d.ts +2 -0
- package/dist/types/actions/menu_items_actions.d.ts +5 -2
- package/dist/types/clipboard_handlers/default_clipboard.d.ts +1 -1
- package/dist/types/collaborative/command_squisher.d.ts +1 -1
- package/dist/types/collaborative/ot/ot_helpers.d.ts +3 -1
- package/dist/types/collaborative/session.d.ts +3 -1
- package/dist/types/components/autofill/autofill.d.ts +3 -0
- package/dist/types/{plugins/ui_feature/autofill.d.ts → components/autofill/autofill_store.d.ts} +7 -12
- package/dist/types/components/autofill/table_autofill_store.d.ts +6 -0
- package/dist/types/components/border_editor/border_editor_widget.d.ts +1 -0
- package/dist/types/components/bottom_bar/bottom_bar_statistic/bottom_bar_statistic.d.ts +3 -0
- package/dist/types/components/clickable_cells_overlay/clickable_cells_overlay.d.ts +20 -0
- package/dist/types/components/collaborative_client_tag/collaborative_client_tag.d.ts +2 -0
- package/dist/types/components/composer/composer/abstract_composer_store.d.ts +3 -2
- package/dist/types/components/composer/composer/composer.d.ts +2 -1
- package/dist/types/components/composer/grid_composer/grid_composer.d.ts +1 -0
- package/dist/types/components/dashboard/clickable_cell_sort_icon/clickable_cell_sort_icon.d.ts +1 -1
- package/dist/types/components/dashboard/clickable_cell_store.d.ts +1 -0
- package/dist/types/components/dashboard/dashboard.d.ts +7 -12
- package/dist/types/components/error_tooltip/error_tooltip.d.ts +2 -0
- package/dist/types/components/figures/chart/chartJs/chartjs_geo_projection_plugin.d.ts +12 -0
- package/dist/types/components/figures/chart/chartJs/zoomable_chart/zoomable_chartjs.d.ts +1 -0
- package/dist/types/components/figures/chart/gauge/gauge_chart_component.d.ts +1 -0
- package/dist/types/components/figures/chart/scorecard/chart_scorecard.d.ts +1 -0
- package/dist/types/components/figures/figure/figure.d.ts +10 -9
- package/dist/types/components/figures/figure_carousel/figure_carousel.d.ts +16 -1
- package/dist/types/components/figures/figure_chart/figure_chart.d.ts +1 -2
- package/dist/types/components/figures/figure_container/figure_container.d.ts +9 -4
- package/dist/types/components/figures/figure_image/figure_image.d.ts +1 -2
- package/dist/types/components/filters/filter_menu/filter_menu.d.ts +1 -0
- package/dist/types/components/full_screen_figure/full_screen_figure.d.ts +12 -1
- package/dist/types/components/grid/grid.d.ts +10 -0
- package/dist/types/components/grid_add_rows_footer/grid_add_rows_footer.d.ts +1 -0
- package/dist/types/components/grid_overlay/grid_overlay.d.ts +8 -4
- package/dist/types/components/grid_popover/grid_popover.d.ts +1 -0
- package/dist/types/components/header_group/header_group_container.d.ts +2 -0
- package/dist/types/components/headers_overlay/headers_overlay.d.ts +5 -0
- package/dist/types/components/headers_overlay/unhide_headers.d.ts +4 -0
- package/dist/types/components/helpers/chart_drag_and_drop.d.ts +15 -0
- package/dist/types/components/helpers/dom_helpers.d.ts +5 -2
- package/dist/types/components/helpers/draw_grid_hook.d.ts +1 -2
- package/dist/types/components/helpers/figure_drag_helper.d.ts +3 -3
- package/dist/types/components/helpers/figure_snap_helper.d.ts +9 -4
- package/dist/types/components/helpers/wheel_hook.d.ts +1 -1
- package/dist/types/components/helpers/zoom.d.ts +0 -14
- package/dist/types/components/highlight/border/border.d.ts +2 -0
- package/dist/types/components/highlight/corner/corner.d.ts +1 -0
- package/dist/types/components/highlight/highlight/highlight.d.ts +3 -0
- package/dist/types/components/link/link_display/link_display.d.ts +1 -0
- package/dist/types/components/link/link_editor/link_editor.d.ts +3 -1
- package/dist/types/components/paint_format_button/paint_format_store.d.ts +1 -1
- package/dist/types/components/popover/cell_popover_store.d.ts +2 -1
- package/dist/types/components/popover/popover.d.ts +0 -1
- package/dist/types/components/popover/popover_container_owl_plugin.d.ts +5 -0
- package/dist/types/components/props_validation.d.ts +7 -7
- package/dist/types/components/scrollbar/scrollbar_horizontal.d.ts +3 -0
- package/dist/types/components/scrollbar/scrollbar_vertical.d.ts +5 -1
- package/dist/types/components/selection_input/selection_input_store.d.ts +1 -1
- package/dist/types/components/side_panel/carousel_panel/carousel_panel.d.ts +20 -2
- package/dist/types/components/side_panel/chart/building_blocks/chart_title/chart_title.d.ts +1 -0
- package/dist/types/components/side_panel/chart/building_blocks/color_scale/color_scale_picker.d.ts +1 -1
- package/dist/types/components/side_panel/chart/calendar_chart/calendar_chart_config_panel.d.ts +0 -2
- package/dist/types/components/side_panel/chart/chart_type_picker/chart_type_picker.d.ts +5 -18
- package/dist/types/components/side_panel/chart/chart_type_picker_popover/chart_type_picker_popover.d.ts +63 -0
- package/dist/types/components/side_panel/chart/common.d.ts +1 -1
- package/dist/types/components/side_panel/chart/scorecard_chart_panel/scorecard_chart_config_panel.d.ts +6 -10
- package/dist/types/components/side_panel/components/radio_selection/radio_selection.d.ts +1 -1
- package/dist/types/components/side_panel/conditional_formatting/cf_editor/cell_is_rule_editor.d.ts +1 -1
- package/dist/types/components/side_panel/conditional_formatting/cf_editor/color_scale_rule_editor.d.ts +1 -1
- package/dist/types/components/side_panel/conditional_formatting/cf_editor/color_scale_rule_editor_threshold.d.ts +1 -1
- package/dist/types/components/side_panel/conditional_formatting/cf_editor/data_bar_rule_editor.d.ts +1 -1
- package/dist/types/components/side_panel/conditional_formatting/cf_editor/icon_set_rule_editor.d.ts +1 -1
- package/dist/types/components/side_panel/data_analysis/chart_suggestion_preview.d.ts +19 -0
- package/dist/types/components/side_panel/data_analysis/data_analysis_panel.d.ts +17 -0
- package/dist/types/components/side_panel/data_analysis/data_analysis_store.d.ts +15 -0
- package/dist/types/components/side_panel/data_sources_cleanup/data_sources_cleanup.d.ts +28 -0
- package/dist/types/components/side_panel/data_sources_cleanup/data_sources_cleanup_store.d.ts +13 -0
- package/dist/types/components/side_panel/find_and_replace/find_and_replace.d.ts +1 -0
- package/dist/types/components/side_panel/find_and_replace/find_and_replace_store.d.ts +3 -1
- package/dist/types/components/side_panel/pivot/pivot_layout_configurator/pivot_layout_configurator.d.ts +1 -8
- package/dist/types/components/side_panel/pivot/pivot_side_panel/pivot_side_panel_store.d.ts +1 -0
- package/dist/types/components/side_panel/remove_duplicates/remove_duplicates.d.ts +3 -10
- package/dist/types/components/side_panel/side_panel/side_panel_store.d.ts +3 -2
- package/dist/types/components/side_panel/split_to_columns_panel/split_to_columns_panel.d.ts +4 -11
- package/dist/types/components/side_panel/split_to_columns_panel/split_to_columns_store.d.ts +33 -0
- package/dist/types/components/side_panel/table_panel/table_panel.d.ts +6 -0
- package/dist/types/components/side_panel/table_style_editor_panel/table_style_editor_panel.d.ts +2 -0
- package/dist/types/components/small_bottom_bar/small_bottom_bar.d.ts +1 -0
- package/dist/types/components/spreadsheet/spreadsheet.d.ts +12 -5
- package/dist/types/components/spreadsheet_print/print_iframe.d.ts +15 -0
- package/dist/types/components/spreadsheet_print/spreadsheet_print.d.ts +4 -0
- package/dist/types/components/standalone_grid_canvas/carousel_data_view_print.d.ts +32 -0
- package/dist/types/components/standalone_grid_canvas/standalone_grid_canvas.d.ts +397 -2
- package/dist/types/components/standalone_viewport/standalone_viewport.d.ts +59 -0
- package/dist/types/components/standalone_viewport/standalone_viewport_store.d.ts +29 -0
- package/dist/types/components/tables/hovered_table_store.d.ts +7 -11
- package/dist/types/components/tables/table_resizer/table_resizer.d.ts +2 -0
- package/dist/types/components/tables/table_styles_popover/table_styles_popover.d.ts +0 -1
- package/dist/types/components/top_bar/color_editor/color_editor.d.ts +1 -1
- package/dist/types/components/top_bar/zoom_editor/zoom_editor.d.ts +2 -1
- package/dist/types/constants.d.ts +17 -2
- package/dist/types/formulas/code_builder.d.ts +2 -1
- package/dist/types/formulas/compiler.d.ts +8 -1
- package/dist/types/functions/create_compute_function.d.ts +4 -3
- package/dist/types/functions/function_registry.d.ts +4 -5
- package/dist/types/functions/helper_lookup.d.ts +1 -1
- package/dist/types/functions/helper_matrices.d.ts +1 -0
- package/dist/types/functions/helper_statistical.d.ts +6 -0
- package/dist/types/functions/helpers.d.ts +4 -0
- package/dist/types/functions/module_array.d.ts +41 -23
- package/dist/types/functions/module_database.d.ts +18 -6
- package/dist/types/functions/module_date.d.ts +70 -22
- package/dist/types/functions/module_engineering.d.ts +3 -1
- package/dist/types/functions/module_filter.d.ts +2 -2
- package/dist/types/functions/module_financial.d.ts +105 -35
- package/dist/types/functions/module_info.d.ts +33 -11
- package/dist/types/functions/module_logical.d.ts +16 -8
- package/dist/types/functions/module_lookup.d.ts +23 -15
- package/dist/types/functions/module_math.d.ts +125 -43
- package/dist/types/functions/module_operators.d.ts +7 -3
- package/dist/types/functions/module_statistical.d.ts +78 -22
- package/dist/types/functions/module_text.d.ts +75 -26
- package/dist/types/functions/module_web.d.ts +3 -1
- package/dist/types/helpers/carousel_helpers.d.ts +15 -3
- package/dist/types/helpers/cells/cell_evaluation.d.ts +1 -1
- package/dist/types/helpers/color.d.ts +1 -1
- package/dist/types/helpers/color_themes.d.ts +2 -0
- package/dist/types/helpers/data_analysis.d.ts +17 -0
- package/dist/types/helpers/figures/chart.d.ts +9 -6
- package/dist/types/helpers/figures/charts/chart_common.d.ts +3 -5
- package/dist/types/helpers/figures/charts/chart_data_source_helpers.d.ts +10 -0
- package/dist/types/helpers/figures/charts/chart_data_sources.d.ts +3 -3
- package/dist/types/helpers/figures/charts/chart_suggestion_engine.d.ts +8 -0
- package/dist/types/helpers/figures/charts/chart_ui_common.d.ts +11 -4
- package/dist/types/helpers/figures/charts/charts_suggestions_constants.d.ts +37 -0
- package/dist/types/helpers/figures/charts/gauge_chart_rendering.d.ts +6 -2
- package/dist/types/helpers/figures/charts/runtime/chart_data_extractor.d.ts +13 -12
- package/dist/types/helpers/figures/charts/runtime/chartjs_title.d.ts +2 -2
- package/dist/types/helpers/figures/figure/figure.d.ts +3 -2
- package/dist/types/helpers/filter_helpers.d.ts +2 -2
- package/dist/types/helpers/internal_viewport.d.ts +19 -10
- package/dist/types/helpers/links.d.ts +1 -1
- package/dist/types/helpers/misc.d.ts +2 -0
- package/dist/types/helpers/owl3_helpers.d.ts +4 -0
- package/dist/types/helpers/pivot/pivot_composer_helpers.d.ts +1 -1
- package/dist/types/helpers/pivot/pivot_highlight.d.ts +2 -2
- package/dist/types/helpers/pivot/pivot_presentation.d.ts +2 -2
- package/dist/types/helpers/pivot/pivot_registry.d.ts +4 -5
- package/dist/types/helpers/pivot/spreadsheet_pivot/runtime_definition_spreadsheet_pivot.d.ts +2 -2
- package/dist/types/helpers/range.d.ts +1 -1
- package/dist/types/helpers/rectangle.d.ts +4 -0
- package/dist/types/helpers/text_helper.d.ts +1 -1
- package/dist/types/helpers/ui/split_to_columns_interactive.d.ts +1 -1
- package/dist/types/helpers/viewport_collection.d.ts +50 -21
- package/dist/types/helpers/zones.d.ts +1 -0
- package/dist/types/index.d.ts +39 -9
- package/dist/types/model.d.ts +18 -10
- package/dist/types/owl3_compatibility_layer.d.ts +1 -14
- package/dist/types/plugins/core/carousel.d.ts +8 -4
- package/dist/types/plugins/core/cell.d.ts +1 -0
- package/dist/types/plugins/core/chart.d.ts +2 -0
- package/dist/types/plugins/core/conditional_format.d.ts +2 -0
- package/dist/types/plugins/core/data_validation.d.ts +2 -0
- package/dist/types/plugins/core/formulas_provider.d.ts +8 -0
- package/dist/types/plugins/core/image.d.ts +2 -1
- package/dist/types/plugins/core/pivot.d.ts +1 -0
- package/dist/types/plugins/core/range.d.ts +4 -2
- package/dist/types/plugins/core/squisher.d.ts +7 -2
- package/dist/types/plugins/core/tables.d.ts +2 -1
- package/dist/types/plugins/core/unsquisher.d.ts +1 -1
- package/dist/types/plugins/core_plugin.d.ts +8 -4
- package/dist/types/plugins/{ui_feature → evaluation}/cell_computed_style.d.ts +4 -4
- package/dist/types/plugins/{ui_core_views/cell_evaluation/evaluation_plugin.d.ts → evaluation/cell_evaluation/cell_evaluation_plugin.d.ts} +14 -7
- package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/compilation_parameters.d.ts +2 -2
- package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/evaluator.d.ts +2 -2
- package/dist/types/plugins/{ui_core_views → evaluation}/custom_colors.d.ts +5 -5
- package/dist/types/plugins/{ui_core_views → evaluation}/dynamic_tables.d.ts +4 -4
- package/dist/types/plugins/{ui_feature → evaluation}/dynamic_translate.d.ts +2 -2
- package/dist/types/plugins/evaluation/evaluation_chart.d.ts +27 -0
- package/dist/types/plugins/{ui_core_views → evaluation}/evaluation_conditional_format.d.ts +4 -4
- package/dist/types/plugins/{ui_core_views → evaluation}/evaluation_data_validation.d.ts +4 -4
- package/dist/types/plugins/{ui_stateful → evaluation}/filter_evaluation.d.ts +7 -8
- package/dist/types/plugins/{ui_core_views → evaluation}/fingerprint.d.ts +2 -2
- package/dist/types/plugins/evaluation/formula_tracker.d.ts +8 -0
- package/dist/types/plugins/evaluation/geo_loader.d.ts +13 -0
- package/dist/types/plugins/{ui_core_views → evaluation}/header_sizes_ui.d.ts +5 -5
- package/dist/types/plugins/{ui_feature/header_visibility_ui.d.ts → evaluation/header_visibility_evaluation.d.ts} +2 -2
- package/dist/types/plugins/evaluation/pivot_presence_plugin.d.ts +12 -0
- package/dist/types/plugins/{ui_core_views → evaluation}/pivot_ui.d.ts +9 -6
- package/dist/types/plugins/evaluation/subtotal_evaluation.d.ts +5 -0
- package/dist/types/plugins/{ui_feature → evaluation}/table_computed_style.d.ts +7 -7
- package/dist/types/plugins/evaluation_plugin.d.ts +31 -0
- package/dist/types/plugins/plugin_registries.d.ts +11 -5
- package/dist/types/plugins/ui_feature/chart_ui.d.ts +6 -0
- package/dist/types/plugins/ui_feature/collaborative.d.ts +2 -1
- package/dist/types/plugins/ui_feature/color_theme.d.ts +0 -3
- package/dist/types/plugins/ui_feature/geo_features.d.ts +1 -6
- package/dist/types/plugins/ui_feature/ui_options.d.ts +1 -7
- package/dist/types/plugins/ui_feature/ui_sheet.d.ts +2 -1
- package/dist/types/plugins/ui_plugin.d.ts +1 -4
- package/dist/types/plugins/ui_stateful/carousel_ui.d.ts +2 -2
- package/dist/types/plugins/{ui_core_views → ui_stateful}/cell_icon_plugin.d.ts +2 -2
- package/dist/types/plugins/{ui_feature → ui_stateful}/figure.d.ts +4 -0
- package/dist/types/plugins/ui_stateful/header_positions.d.ts +2 -1
- package/dist/types/registries/chart_data_source_registry.d.ts +4 -5
- package/dist/types/registries/chart_registry.d.ts +7 -4
- package/dist/types/registries/criterion_registry.d.ts +4 -4
- package/dist/types/registries/data_source_registry.d.ts +15 -0
- package/dist/types/registries/evaluation_registry.d.ts +2 -2
- package/dist/types/registries/figures_registry.d.ts +6 -2
- package/dist/types/store_engine/dependency_container.d.ts +5 -0
- package/dist/types/store_engine/store_hooks.d.ts +6 -0
- package/dist/types/store_engine/store_registries.d.ts +4 -0
- package/dist/types/stores/array_formula_highlight.d.ts +1 -1
- package/dist/types/{plugins/ui_feature/automatic_sum.d.ts → stores/automatic_sum_store.d.ts} +5 -4
- package/dist/types/stores/cell_hover_overlay_store.d.ts +15 -0
- package/dist/types/stores/chart_drag_store.d.ts +10 -0
- package/dist/types/stores/checkbox_toggle.d.ts +9 -0
- package/dist/types/stores/client_focus_store.d.ts +1 -0
- package/dist/types/{plugins/ui_stateful/clipboard.d.ts → stores/clipboard_store.d.ts} +11 -11
- package/dist/types/stores/data_cleanup_store.d.ts +31 -0
- package/dist/types/stores/grid_renderer_store.d.ts +3 -2
- package/dist/types/stores/main_viewport_store.d.ts +14 -0
- package/dist/types/stores/spreadsheet_store.d.ts +1 -1
- package/dist/types/stores/table_resize_store.d.ts +6 -0
- package/dist/types/stores/trim_whitespace_store.d.ts +9 -0
- package/dist/types/stores/viewports_store.d.ts +85 -0
- package/dist/types/stores/zoom_store.d.ts +27 -0
- package/dist/types/types/chart/chart.d.ts +3 -1
- package/dist/types/types/chart/chart_suggestion.d.ts +137 -0
- package/dist/types/types/chart/radar_chart.d.ts +1 -1
- package/dist/types/types/chart/scorecard_chart.d.ts +3 -4
- package/dist/types/types/collaborative/transport_service.d.ts +1 -0
- package/dist/types/types/commands.d.ts +55 -68
- package/dist/types/types/figure.d.ts +26 -3
- package/dist/types/types/functions.d.ts +16 -6
- package/dist/types/types/getters.d.ts +126 -28
- package/dist/types/types/misc.d.ts +19 -1
- package/dist/types/types/model.d.ts +2 -4
- package/dist/types/types/range.d.ts +1 -0
- package/dist/types/types/rendering.d.ts +21 -1
- package/dist/types/types/store_engine.d.ts +10 -3
- package/package.json +6 -5
- package/dist/types/plugins/core_view_plugin.d.ts +0 -29
- package/dist/types/plugins/ui_core_views/evaluation_chart.d.ts +0 -26
- package/dist/types/plugins/ui_core_views/formula_tracker.d.ts +0 -8
- package/dist/types/plugins/ui_feature/checkbox_toggle.d.ts +0 -9
- package/dist/types/plugins/ui_feature/data_cleanup.d.ts +0 -16
- package/dist/types/plugins/ui_feature/pivot_presence_plugin.d.ts +0 -11
- package/dist/types/plugins/ui_feature/split_to_columns.d.ts +0 -21
- package/dist/types/plugins/ui_feature/subtotal_evaluation.d.ts +0 -5
- package/dist/types/plugins/ui_feature/table_autofill.d.ts +0 -6
- package/dist/types/plugins/ui_feature/table_resize_ui.d.ts +0 -6
- package/dist/types/plugins/ui_stateful/sheetview.d.ts +0 -123
- package/dist/types/types/core_getters.d.ts +0 -75
- /package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/binary_grid.d.ts +0 -0
- /package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/formula_dependency_graph.d.ts +0 -0
- /package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/interval_tree.d.ts +0 -0
- /package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/position_set.d.ts +0 -0
- /package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/r_tree.d.ts +0 -0
- /package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/range_set.d.ts +0 -0
- /package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/spreading_relation.d.ts +0 -0
- /package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/zone_set.d.ts +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { ChartConfiguration } from "chart.js";
|
|
1
2
|
import { ChartRuntime, ChartType } from "../../../types/chart/chart";
|
|
2
3
|
import { Figure } from "../../../types/figure";
|
|
3
|
-
import { DOMDimension } from "../../../types/rendering";
|
|
4
|
+
import { ColorThemeName, DOMDimension } from "../../../types/rendering";
|
|
4
5
|
export declare const CHART_COMMON_OPTIONS: {
|
|
5
6
|
responsive: true;
|
|
6
7
|
maintainAspectRatio: false;
|
|
@@ -15,11 +16,17 @@ export declare const CHART_COMMON_OPTIONS: {
|
|
|
15
16
|
animation: false;
|
|
16
17
|
events: ("click" | "mousemove" | "mouseout" | "mouseup" | "touchmove" | "touchstart")[];
|
|
17
18
|
};
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Sample down a Chart.js configuration's data points to at most `maxPoints`, evenly spaced.
|
|
21
|
+
* Used for lightweight previews (drag preview, chart suggestions) where rendering every point
|
|
22
|
+
* of a large dataset would make Chart.js slow without any visible benefit on a small canvas.
|
|
23
|
+
*/
|
|
24
|
+
export declare function limitChartConfigDataPoints(config: ChartConfiguration<any>, maxPoints?: number): ChartConfiguration<any>;
|
|
25
|
+
export declare function chartToImageUrl(runtime: ChartRuntime, figure: Figure, type: ChartType, colorThemeName?: ColorThemeName): Promise<string | undefined>;
|
|
26
|
+
export declare function chartToImageFile(runtime: ChartRuntime, figure: Figure, type: ChartType, colorThemeName?: ColorThemeName): Promise<Blob | null>;
|
|
20
27
|
/**
|
|
21
28
|
* Draw the given chart on the canvas.
|
|
22
29
|
*
|
|
23
30
|
* @returns a cleanup function to be called after the drawing is no longer needed (to free Chart.js resources)
|
|
24
31
|
*/
|
|
25
|
-
export declare function drawChartOnCanvas(canvas: HTMLCanvasElement | OffscreenCanvas, runtime: ChartRuntime, size: DOMDimension, type: ChartType): () => void;
|
|
32
|
+
export declare function drawChartOnCanvas(canvas: HTMLCanvasElement | OffscreenCanvas, runtime: ChartRuntime, size: DOMDimension, type: ChartType, zoom?: number): () => void;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { CategoricalDateNumberContext, CategoricalTwoNumbersContext, CategoricalVsMultipleNumbersContext, CategoricalVsNumberContext, CategoricalVsPercentageContext, DateVsMultipleNumbersContext, DateVsSeriesContext, LabelVsMultipleNumbersContext, LabelVsNumberContext, ManyNumbersContext, MultipleCategoricalsVsNumberContext, NumberVsNumberContext, SingleCategoricalContext, SingleDateContext, SingleLabelContext, SingleNumberContext, SinglePercentageContext, Suggestion } from "../../../types/chart/chart_suggestion";
|
|
2
|
+
import { GaugeChartDefinition } from "../../../types/chart/gauge_chart";
|
|
3
|
+
export declare function gaugeChart(titleText: string, dataRange: string, rangeMin: string, rangeMax: string): GaugeChartDefinition<string>;
|
|
4
|
+
/** Pattern A — Single numeric column */
|
|
5
|
+
export declare const SINGLE_NUMBER_COLUMN_SUGGESTIONS: Suggestion<SingleNumberContext>[];
|
|
6
|
+
/** Pattern B — Single percentage column */
|
|
7
|
+
export declare const SINGLE_PERCENTAGE_COLUMN_SUGGESTIONS: Suggestion<SinglePercentageContext>[];
|
|
8
|
+
/** Pattern C — Single date column */
|
|
9
|
+
export declare const SINGLE_DATE_COLUMN_SUGGESTIONS: Suggestion<SingleDateContext>[];
|
|
10
|
+
/** Pattern D — Single categorical column */
|
|
11
|
+
export declare const SINGLE_CATEGORICAL_COLUMN_SUGGESTIONS: Suggestion<SingleCategoricalContext>[];
|
|
12
|
+
/** Pattern E — Single label column */
|
|
13
|
+
export declare const SINGLE_LABEL_COLUMN_SUGGESTIONS: Suggestion<SingleLabelContext>[];
|
|
14
|
+
/** Pattern F — Categorical + Number */
|
|
15
|
+
export declare const CATEGORICAL_VS_NUMBER_SUGGESTIONS: Suggestion<CategoricalVsNumberContext>[];
|
|
16
|
+
/** Patterns G & J — Date + Number or Date + Percentage */
|
|
17
|
+
export declare const DATE_VS_SERIES_SUGGESTIONS: Suggestion<DateVsSeriesContext>[];
|
|
18
|
+
/** Pattern H — Number + Number */
|
|
19
|
+
export declare const NUMBER_VS_NUMBER_SUGGESTIONS: Suggestion<NumberVsNumberContext>[];
|
|
20
|
+
/** Pattern I — Categorical + Percentage */
|
|
21
|
+
export declare const CATEGORICAL_VS_PERCENTAGE_SUGGESTIONS: Suggestion<CategoricalVsPercentageContext>[];
|
|
22
|
+
/** Pattern K — Label + Number */
|
|
23
|
+
export declare const LABEL_VS_NUMBER_SUGGESTIONS: Suggestion<LabelVsNumberContext>[];
|
|
24
|
+
/** Pattern M — Categorical + Multiple Numbers */
|
|
25
|
+
export declare const CATEGORICAL_VS_MULTIPLE_NUMBERS_SUGGESTIONS: Suggestion<CategoricalVsMultipleNumbersContext>[];
|
|
26
|
+
/** Pattern N — Date + Multiple Numbers */
|
|
27
|
+
export declare const DATE_VS_MULTIPLE_NUMBERS_SUGGESTIONS: Suggestion<DateVsMultipleNumbersContext>[];
|
|
28
|
+
/** Pattern O — Categorical + Categorical + Number */
|
|
29
|
+
export declare const MULTIPLE_CATEGORICALS_VS_NUMBER_SUGGESTIONS: Suggestion<MultipleCategoricalsVsNumberContext>[];
|
|
30
|
+
/** Pattern P — Categorical + Date + Number */
|
|
31
|
+
export declare const CATEGORICAL_DATE_NUMBER_SUGGESTIONS: Suggestion<CategoricalDateNumberContext>[];
|
|
32
|
+
/** Pattern Q — Label + Multiple Numbers */
|
|
33
|
+
export declare const LABEL_VS_MULTIPLE_NUMBERS_SUGGESTIONS: Suggestion<LabelVsMultipleNumbersContext>[];
|
|
34
|
+
/** Pattern R — Categorical + Two Numbers (Population Pyramid or Grouped) */
|
|
35
|
+
export declare const CATEGORICAL_TWO_NUMBERS_SUGGESTIONS: Suggestion<CategoricalTwoNumbersContext>[];
|
|
36
|
+
/** Pattern S — Many Numbers (3+ numeric columns, no categorical/date) */
|
|
37
|
+
export declare const MANY_NUMBERS_SUGGESTIONS: Suggestion<ManyNumbersContext>[];
|
|
@@ -40,6 +40,10 @@ interface InflectionValue {
|
|
|
40
40
|
color: Color;
|
|
41
41
|
offset: number;
|
|
42
42
|
}
|
|
43
|
-
export declare function drawGaugeChart(canvas: CanvasSurface, runtime: GaugeAnimatedRuntime, zoom?: number, dimensions?: DOMDimension
|
|
44
|
-
|
|
43
|
+
export declare function drawGaugeChart(canvas: CanvasSurface, runtime: GaugeAnimatedRuntime, zoom?: number, dimensions?: DOMDimension, options?: {
|
|
44
|
+
labelFontSize?: number;
|
|
45
|
+
}): void;
|
|
46
|
+
export declare function getGaugeRenderingConfig(boundingRect: Rect, runtime: GaugeAnimatedRuntime, ctx: CanvasRenderingContext2D, options?: {
|
|
47
|
+
labelFontSize?: number;
|
|
48
|
+
}): RenderingParams;
|
|
45
49
|
export {};
|
|
@@ -12,24 +12,25 @@ import { RadarChartDefinition } from "../../../../types/chart/radar_chart";
|
|
|
12
12
|
import { SunburstChartDefinition } from "../../../../types/chart/sunburst_chart";
|
|
13
13
|
import { TreeMapChartDefinition } from "../../../../types/chart/tree_map_chart";
|
|
14
14
|
import { Format } from "../../../../types/format";
|
|
15
|
-
import {
|
|
15
|
+
import { EvaluationGetters } from "../../../../types/getters";
|
|
16
16
|
import { Locale } from "../../../../types/locale";
|
|
17
17
|
import { FunctionResultObject } from "../../../../types/misc";
|
|
18
18
|
import { Range } from "../../../../types/range";
|
|
19
|
+
import { ColorThemeName } from "../../../../types/rendering";
|
|
19
20
|
import { BubbleChartData } from "../bubble_chart";
|
|
20
|
-
export declare function getBarChartData(definition: GenericDefinition<BarChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters:
|
|
21
|
-
export declare function getCalendarChartData(definition: GenericDefinition<CalendarChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters:
|
|
22
|
-
export declare function getPyramidChartData(definition: PyramidChartDefinition, { labelValues, dataSetsValues }: ChartData, getters:
|
|
23
|
-
export declare function getLineChartData(definition: GenericDefinition<LineChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters:
|
|
24
|
-
export declare function getPieChartData(definition: GenericDefinition<PieChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters:
|
|
25
|
-
export declare function getRadarChartData(definition: GenericDefinition<RadarChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters:
|
|
26
|
-
export declare function getGeoChartData(definition: GeoChartDefinition, { labelValues, dataSetsValues }: ChartData, getters:
|
|
27
|
-
export declare function getFunnelChartData(definition: GenericDefinition<FunnelChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters:
|
|
28
|
-
export declare function getHierarchalChartData(definition: SunburstChartDefinition | TreeMapChartDefinition, { labelValues, dataSetsValues }: ChartData, getters:
|
|
29
|
-
export declare function getBubbleChartData(definition: BubbleChartDefinition<Range>, getters:
|
|
21
|
+
export declare function getBarChartData(definition: GenericDefinition<BarChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters: EvaluationGetters, colorThemeName: ColorThemeName): ChartRuntimeGenerationArgs;
|
|
22
|
+
export declare function getCalendarChartData(definition: GenericDefinition<CalendarChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters: EvaluationGetters, colorThemeName: ColorThemeName): ChartRuntimeGenerationArgs;
|
|
23
|
+
export declare function getPyramidChartData(definition: PyramidChartDefinition, { labelValues, dataSetsValues }: ChartData, getters: EvaluationGetters, colorThemeName: ColorThemeName): ChartRuntimeGenerationArgs;
|
|
24
|
+
export declare function getLineChartData(definition: GenericDefinition<LineChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters: EvaluationGetters, colorThemeName: ColorThemeName): ChartRuntimeGenerationArgs;
|
|
25
|
+
export declare function getPieChartData(definition: GenericDefinition<PieChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters: EvaluationGetters, colorThemeName: ColorThemeName): ChartRuntimeGenerationArgs;
|
|
26
|
+
export declare function getRadarChartData(definition: GenericDefinition<RadarChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters: EvaluationGetters, colorThemeName: ColorThemeName): ChartRuntimeGenerationArgs;
|
|
27
|
+
export declare function getGeoChartData(definition: GeoChartDefinition, { labelValues, dataSetsValues }: ChartData, getters: EvaluationGetters, colorThemeName: ColorThemeName): GeoChartRuntimeGenerationArgs;
|
|
28
|
+
export declare function getFunnelChartData(definition: GenericDefinition<FunnelChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters: EvaluationGetters, colorThemeName: ColorThemeName): ChartRuntimeGenerationArgs;
|
|
29
|
+
export declare function getHierarchalChartData(definition: SunburstChartDefinition | TreeMapChartDefinition, { labelValues, dataSetsValues }: ChartData, getters: EvaluationGetters, colorThemeName: ColorThemeName): ChartRuntimeGenerationArgs;
|
|
30
|
+
export declare function getBubbleChartData(definition: BubbleChartDefinition<Range>, getters: EvaluationGetters, colorThemeName: ColorThemeName): BubbleChartData;
|
|
30
31
|
export declare function getTrendDatasetForBarChart(config: TrendConfiguration, data: FunctionResultObject[]): Point[] | undefined;
|
|
31
32
|
export declare function getTrendDatasetForLineChart(config: TrendConfiguration, data: FunctionResultObject[], labels: string[], axisType: AxisType, locale: Locale): Point[] | undefined;
|
|
32
33
|
export declare function canChartParseLabels(chartData: ChartData): boolean;
|
|
33
34
|
export declare function getChartLabelFormat(labelValues: LabelValues): Format | undefined;
|
|
34
35
|
export declare function makeDatasetsCumulative(datasets: DatasetValues[], order: "asc" | "desc"): DatasetValues[];
|
|
35
|
-
export declare function getTopPaddingForDashboard(definition: GenericDefinition<PieChartDefinition | LineChartDefinition | BarChartDefinition>, getters:
|
|
36
|
+
export declare function getTopPaddingForDashboard(definition: GenericDefinition<PieChartDefinition | LineChartDefinition | BarChartDefinition>, getters: EvaluationGetters): 0 | 30;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { TitleOptions } from "chart.js";
|
|
2
2
|
import { TitleDesign } from "../../../..";
|
|
3
|
-
import {
|
|
3
|
+
import { EvaluationGetters } from "../../../../types/getters";
|
|
4
4
|
import { DeepPartial } from "../../../../types/misc";
|
|
5
5
|
export declare function getChartTitle({ title, legendPosition, background, }: {
|
|
6
6
|
title: TitleDesign;
|
|
7
7
|
legendPosition: string;
|
|
8
8
|
background?: string;
|
|
9
|
-
}, getters:
|
|
9
|
+
}, getters: EvaluationGetters): DeepPartial<TitleOptions>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Position, UID } from "../../..";
|
|
2
2
|
import { AnchorOffset, Figure, FigureSize } from "../../../types/figure";
|
|
3
3
|
import { Getters } from "../../../types/getters";
|
|
4
|
-
|
|
5
|
-
export declare function
|
|
4
|
+
import { SpreadsheetChildEnv } from "../../../types/spreadsheet_env";
|
|
5
|
+
export declare function centerFigurePosition(env: SpreadsheetChildEnv, size: FigureSize): AnchorOffset;
|
|
6
|
+
export declare function getMaxFigureSize(figureSize: FigureSize): FigureSize;
|
|
6
7
|
export declare function boundColRowOffsetInSheet(getters: Getters, sheetId: UID, position: Position, figure: Figure): {
|
|
7
8
|
col: import("../../..").HeaderIndex;
|
|
8
9
|
row: import("../../..").HeaderIndex;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { UID } from "..";
|
|
2
|
-
import {
|
|
2
|
+
import { EvaluationGetters } from "../types/getters";
|
|
3
3
|
import { DataFilterValue } from "../types/table";
|
|
4
4
|
import { FieldValue } from "./pivot/spreadsheet_pivot/data_entry_spreadsheet_pivot";
|
|
5
5
|
/**
|
|
6
6
|
*Determines whether a given value should be filtered out (hidden)
|
|
7
7
|
*/
|
|
8
|
-
export declare function isValueFiltered(getters:
|
|
8
|
+
export declare function isValueFiltered(getters: EvaluationGetters, sheetId: UID, data: FieldValue, filter: DataFilterValue, preComputedCriterion?: unknown): boolean;
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ViewportsGetters } from "../types/getters";
|
|
2
2
|
import { Dimension, HeaderIndex, Pixel, Position, UID, Zone } from "../types/misc";
|
|
3
3
|
import { DOMCoordinates, DOMDimension, Rect } from "../types/rendering";
|
|
4
|
+
interface InternalViewportArgs {
|
|
5
|
+
getters: ViewportsGetters;
|
|
6
|
+
sheetId: UID;
|
|
7
|
+
boundaries: Zone;
|
|
8
|
+
sizeInGrid: DOMDimension;
|
|
9
|
+
canScrollVertically: boolean;
|
|
10
|
+
canScrollHorizontally: boolean;
|
|
11
|
+
offsets: DOMCoordinates;
|
|
12
|
+
getFooterSize: () => number;
|
|
13
|
+
}
|
|
4
14
|
export declare class InternalViewport {
|
|
5
|
-
private getters;
|
|
6
|
-
private sheetId;
|
|
7
|
-
private boundaries;
|
|
8
15
|
top: HeaderIndex;
|
|
9
16
|
bottom: HeaderIndex;
|
|
10
17
|
left: HeaderIndex;
|
|
@@ -15,12 +22,13 @@ export declare class InternalViewport {
|
|
|
15
22
|
canScrollHorizontally: boolean;
|
|
16
23
|
viewportWidth: Pixel;
|
|
17
24
|
viewportHeight: Pixel;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
25
|
+
boundaryLeftX: Pixel;
|
|
26
|
+
boundaryTopY: Pixel;
|
|
27
|
+
private getters;
|
|
28
|
+
private sheetId;
|
|
29
|
+
private boundaries;
|
|
30
|
+
private getFooterSize;
|
|
31
|
+
constructor(args: InternalViewportArgs);
|
|
24
32
|
/** Returns the maximum size (in Pixels) of the viewport relative to its allocated client size
|
|
25
33
|
* When the viewport grid size is smaller than its client width (resp. height), it will return
|
|
26
34
|
* the client width (resp. height).
|
|
@@ -85,3 +93,4 @@ export declare class InternalViewport {
|
|
|
85
93
|
* */
|
|
86
94
|
private get snapCorrection();
|
|
87
95
|
}
|
|
96
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Registry } from "../registries/registry";
|
|
2
2
|
import { CellValue } from "../types/cells";
|
|
3
|
-
import { CoreGetters } from "../types/
|
|
3
|
+
import { CoreGetters } from "../types/getters";
|
|
4
4
|
import { Link } from "../types/misc";
|
|
5
5
|
import { SpreadsheetChildEnv } from "../types/spreadsheet_env";
|
|
6
6
|
/**
|
|
@@ -2,7 +2,7 @@ import { CellComposerStore } from "../../components/composer/composer/cell_compo
|
|
|
2
2
|
import { CompiledFormula } from "../../formulas/compiler";
|
|
3
3
|
import { EnrichedToken } from "../../formulas/composer_tokenizer";
|
|
4
4
|
import { AutoCompleteProposal } from "../../registries/auto_completes/auto_complete_registry";
|
|
5
|
-
import { CoreGetters } from "../../types/
|
|
5
|
+
import { CoreGetters } from "../../types/getters";
|
|
6
6
|
import { Granularity, PivotField, PivotMeasure } from "../../types/pivot";
|
|
7
7
|
/**
|
|
8
8
|
* Get the first Pivot function description of the given formula.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Getters } from "../../types/getters";
|
|
2
1
|
import { Highlight, UID } from "../../types/misc";
|
|
3
|
-
|
|
2
|
+
import { SpreadsheetChildEnv } from "../../types/spreadsheet_env";
|
|
3
|
+
export declare function getPivotHighlights(env: SpreadsheetChildEnv, pivotId: UID): Highlight[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PivotParams, PivotUIConstructor } from "./pivot_registry";
|
|
2
2
|
import { CellValue } from "../../types/cells";
|
|
3
|
-
import {
|
|
3
|
+
import { EvaluationGetters } from "../../types/getters";
|
|
4
4
|
import { FunctionResultObject, SortDirection, UID } from "../../types/misc";
|
|
5
5
|
import { ModelConfig } from "../../types/model";
|
|
6
6
|
import { DimensionTree, NEXT_VALUE, PivotDimension, PivotDomain, PivotMeasure, PivotMeasureDisplay, PivotValueCell, PREVIOUS_VALUE } from "../../types/pivot";
|
|
@@ -24,7 +24,7 @@ type DomainGroups<T> = {
|
|
|
24
24
|
*/
|
|
25
25
|
export default function (PivotClass: PivotUIConstructor): {
|
|
26
26
|
new (pivotId: any, custom: ModelConfig["custom"], params: PivotParams): {
|
|
27
|
-
getters:
|
|
27
|
+
getters: EvaluationGetters;
|
|
28
28
|
pivotId: UID;
|
|
29
29
|
cache: Record<string, FunctionResultObject>;
|
|
30
30
|
rankAsc: CacheForMeasureAndField<DomainGroups<number> | undefined>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Registry } from "../../registries/registry";
|
|
2
|
-
import { CoreGetters } from "../../types/
|
|
3
|
-
import { Getters } from "../../types/getters";
|
|
2
|
+
import { CoreGetters, EvaluationGetters } from "../../types/getters";
|
|
4
3
|
import { ApplyRangeChange, UID } from "../../types/misc";
|
|
5
4
|
import { ModelConfig } from "../../types/model";
|
|
6
5
|
import { PivotCoreDefinition, PivotField, PivotFields } from "../../types/pivot";
|
|
@@ -8,14 +7,14 @@ import { Pivot } from "../../types/pivot_runtime";
|
|
|
8
7
|
import { PivotRuntimeDefinition } from "./pivot_runtime_definition";
|
|
9
8
|
export interface PivotParams {
|
|
10
9
|
definition: PivotCoreDefinition;
|
|
11
|
-
getters:
|
|
10
|
+
getters: EvaluationGetters;
|
|
12
11
|
}
|
|
13
12
|
export interface PivotCoreParams {
|
|
14
13
|
definition: PivotCoreDefinition;
|
|
15
14
|
getters: CoreGetters;
|
|
16
15
|
}
|
|
17
16
|
export type PivotUIConstructor = new (custom: ModelConfig["custom"], params: PivotParams) => Pivot;
|
|
18
|
-
type PivotDefinitionConstructor = new (definition: PivotCoreDefinition, fields: PivotFields, getters:
|
|
17
|
+
type PivotDefinitionConstructor = new (definition: PivotCoreDefinition, fields: PivotFields, getters: EvaluationGetters) => PivotRuntimeDefinition;
|
|
19
18
|
export interface PivotRegistryItem {
|
|
20
19
|
ui: PivotUIConstructor;
|
|
21
20
|
definition: PivotDefinitionConstructor;
|
|
@@ -24,7 +23,7 @@ export interface PivotRegistryItem {
|
|
|
24
23
|
isMeasureCandidate: (field: PivotField) => boolean;
|
|
25
24
|
isGroupable: (field: PivotField) => boolean;
|
|
26
25
|
canHaveCustomGroup: (field: PivotField) => boolean;
|
|
27
|
-
isPivotUnused: (getters:
|
|
26
|
+
isPivotUnused: (getters: EvaluationGetters, pivotId: UID) => boolean;
|
|
28
27
|
adaptRanges?: (getters: CoreGetters, definition: PivotCoreDefinition, applyChange: ApplyRangeChange) => PivotCoreDefinition;
|
|
29
28
|
}
|
|
30
29
|
export declare const pivotRegistry: Registry<PivotRegistryItem>;
|
package/dist/types/helpers/pivot/spreadsheet_pivot/runtime_definition_spreadsheet_pivot.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EvaluationGetters } from "../../../types/getters";
|
|
2
2
|
import { PivotFields, SpreadsheetPivotCoreDefinition } from "../../../types/pivot";
|
|
3
3
|
import { Range } from "../../../types/range";
|
|
4
4
|
import { PivotRuntimeDefinition } from "../pivot_runtime_definition";
|
|
5
5
|
export declare class SpreadsheetPivotRuntimeDefinition extends PivotRuntimeDefinition {
|
|
6
6
|
readonly range?: Range;
|
|
7
|
-
constructor(definition: SpreadsheetPivotCoreDefinition, fields: PivotFields, getters:
|
|
7
|
+
constructor(definition: SpreadsheetPivotCoreDefinition, fields: PivotFields, getters: EvaluationGetters);
|
|
8
8
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Registry } from "../registries/registry";
|
|
2
2
|
import { CoreCommand, CoreCommandTypes } from "../types/commands";
|
|
3
|
-
import { CoreGetters } from "../types/
|
|
3
|
+
import { CoreGetters } from "../types/getters";
|
|
4
4
|
import { CellPosition, RangeAdapter, UID, UnboundedZone, ZoneDimension } from "../types/misc";
|
|
5
5
|
import { BoundedRange, Range, RangePart, RangeStringOptions } from "../types/range";
|
|
6
6
|
interface RangeArgs {
|
|
@@ -6,3 +6,7 @@ export declare function rectIntersection(rect1: Rect, rect2: Rect): Rect | undef
|
|
|
6
6
|
/** Compute the union of the rectangles, ie. the smallest rectangle that contain them all */
|
|
7
7
|
export declare function rectUnion(...rects: Rect[]): Rect;
|
|
8
8
|
export declare function isPointInsideRect(x: number, y: number, rect: Rect): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Return a Rect with position and size on the zoomed canvas
|
|
11
|
+
*/
|
|
12
|
+
export declare function getZoomedRect(zoom: number, rect: Rect): Rect;
|
|
@@ -24,7 +24,7 @@ export declare function computeCachedTextDimension(context: Canvas2DContext, tex
|
|
|
24
24
|
height: number;
|
|
25
25
|
};
|
|
26
26
|
export declare function fontSizeInPixels(fontSize: number): number;
|
|
27
|
-
export declare function computeTextFont(style: Style, fontUnit?: "px" | "pt"): string;
|
|
27
|
+
export declare function computeTextFont(style: Style, fontUnit?: "px" | "pt", fontWeight?: number): string;
|
|
28
28
|
export declare function computeTextFontSizeInPixels(style?: Style): number;
|
|
29
29
|
/**
|
|
30
30
|
* Return the given text, split in multiple lines if needed. The text will be split in multiple
|
|
@@ -3,4 +3,4 @@ import { SpreadsheetChildEnv } from "../../types/spreadsheet_env";
|
|
|
3
3
|
export declare const SplitToColumnsInteractiveContent: {
|
|
4
4
|
SplitIsDestructive: string;
|
|
5
5
|
};
|
|
6
|
-
export declare function interactiveSplitToColumns(env: SpreadsheetChildEnv
|
|
6
|
+
export declare function interactiveSplitToColumns(env: SpreadsheetChildEnv): DispatchResult;
|
|
@@ -1,15 +1,28 @@
|
|
|
1
|
-
import { CommandResult, ResizeViewportCommand, SetViewportOffsetCommand } from "../types/commands";
|
|
2
1
|
import { AnchorOffset, Figure, FigureUI } from "../types/figure";
|
|
3
|
-
import {
|
|
4
|
-
import { CellPosition, Dimension, HeaderDimensions, HeaderIndex, PaneDivision, Pixel, PixelPosition, Position, UID, Zone } from "../types/misc";
|
|
2
|
+
import { ViewportsGetters } from "../types/getters";
|
|
3
|
+
import { CellPosition, Dimension, HeaderDimensions, HeaderIndex, PaneDivision, Pixel, PixelPosition, Position, SheetViewDimensions, UID, Zone } from "../types/misc";
|
|
5
4
|
import { DOMCoordinates, DOMDimension, EdgeScrollInfo, Rect, SheetDOMScrollInfo, Viewport } from "../types/rendering";
|
|
6
5
|
import { InternalViewport } from "./internal_viewport";
|
|
7
6
|
type SheetViewports = {
|
|
8
|
-
topLeft
|
|
9
|
-
bottomLeft
|
|
10
|
-
topRight
|
|
7
|
+
topLeft?: InternalViewport;
|
|
8
|
+
bottomLeft?: InternalViewport;
|
|
9
|
+
topRight?: InternalViewport;
|
|
11
10
|
bottomRight: InternalViewport;
|
|
12
11
|
};
|
|
12
|
+
interface PositionedViewport {
|
|
13
|
+
viewport: InternalViewport;
|
|
14
|
+
viewportX: Pixel;
|
|
15
|
+
viewportY: Pixel;
|
|
16
|
+
}
|
|
17
|
+
interface ViewportCollectionArgs {
|
|
18
|
+
getters: ViewportsGetters;
|
|
19
|
+
paneDivision: Record<UID, PaneDivision>;
|
|
20
|
+
sheetViewWidth: Pixel;
|
|
21
|
+
sheetViewHeight: Pixel;
|
|
22
|
+
getZoomLevel: () => number;
|
|
23
|
+
getFooterSize: () => number;
|
|
24
|
+
zoneToDisplay?: Zone;
|
|
25
|
+
}
|
|
13
26
|
/**
|
|
14
27
|
* EdgeScrollCases Schema
|
|
15
28
|
*
|
|
@@ -46,15 +59,18 @@ type SheetViewports = {
|
|
|
46
59
|
* ↓ ↓
|
|
47
60
|
*/
|
|
48
61
|
export declare class ViewportCollection {
|
|
49
|
-
|
|
50
|
-
private sheetViewWidth;
|
|
51
|
-
private sheetViewHeight;
|
|
52
|
-
private zoomLevel;
|
|
53
|
-
getters: RenderingGetters;
|
|
62
|
+
getters: ViewportsGetters;
|
|
54
63
|
viewports: Record<UID, SheetViewports | undefined>;
|
|
55
64
|
private gridOffsetX;
|
|
56
65
|
private gridOffsetY;
|
|
57
|
-
|
|
66
|
+
private paneDivision;
|
|
67
|
+
private sheetViewWidth;
|
|
68
|
+
private sheetViewHeight;
|
|
69
|
+
getZoomLevel: () => number;
|
|
70
|
+
private getFooterSize;
|
|
71
|
+
private zoneToDisplay?;
|
|
72
|
+
constructor(args: ViewportCollectionArgs);
|
|
73
|
+
changeViewportArgs(args: Partial<ViewportCollectionArgs>): void;
|
|
58
74
|
/**
|
|
59
75
|
* Return the index of a column given an offset x, based on the viewport left
|
|
60
76
|
* visible cell.
|
|
@@ -95,7 +111,6 @@ export declare class ViewportCollection {
|
|
|
95
111
|
*/
|
|
96
112
|
isVisibleInViewport({ sheetId, col, row }: CellPosition): boolean;
|
|
97
113
|
isZoneVisibleInViewport(sheetId: UID, zone: Zone): boolean;
|
|
98
|
-
getScrollBarWidth(): Pixel;
|
|
99
114
|
getEdgeScrollCol(sheetId: UID, x: number, previousX: number, startingX: number): EdgeScrollInfo;
|
|
100
115
|
getEdgeScrollRow(sheetId: UID, y: number, previousY: number, startingY: number): EdgeScrollInfo;
|
|
101
116
|
/**
|
|
@@ -140,21 +155,28 @@ export declare class ViewportCollection {
|
|
|
140
155
|
zone: Zone;
|
|
141
156
|
rect: Rect;
|
|
142
157
|
}[];
|
|
143
|
-
getViewportZoomLevel(): number;
|
|
144
158
|
ensureMainViewportExist(sheetId: UID): void;
|
|
159
|
+
getPanesDimensions(sheetId: UID): {
|
|
160
|
+
paneWidth: number;
|
|
161
|
+
paneHeight: number;
|
|
162
|
+
};
|
|
163
|
+
getPositionedViewports(sheetId: UID): PositionedViewport[];
|
|
145
164
|
getSubViewports(sheetId: UID): InternalViewport[];
|
|
146
|
-
checkPositiveDimension(
|
|
147
|
-
checkValuesAreDifferent(
|
|
165
|
+
checkPositiveDimension(dims: SheetViewDimensions): boolean;
|
|
166
|
+
checkValuesAreDifferent(dims: SheetViewDimensions): boolean;
|
|
148
167
|
checkScrollingDirection(sheetId: UID, { offsetX, offsetY }: {
|
|
149
168
|
offsetX: Pixel;
|
|
150
169
|
offsetY: Pixel;
|
|
151
|
-
}):
|
|
152
|
-
checkIfViewportsWillChange(sheetId: UID, { offsetX, offsetY }:
|
|
170
|
+
}): boolean;
|
|
171
|
+
checkIfViewportsWillChange(sheetId: UID, { offsetX, offsetY }: {
|
|
172
|
+
offsetX: Pixel;
|
|
173
|
+
offsetY: Pixel;
|
|
174
|
+
}): boolean;
|
|
153
175
|
getMainViewport(sheetId: UID): Viewport;
|
|
154
176
|
getMainInternalViewport(sheetId: UID): InternalViewport;
|
|
155
177
|
/** gets rid of deprecated sheetIds */
|
|
156
178
|
cleanViewports(): void;
|
|
157
|
-
resizeSheetView(
|
|
179
|
+
resizeSheetView(dimensions: SheetViewDimensions): void;
|
|
158
180
|
recomputeViewports(): void;
|
|
159
181
|
setSheetViewOffset(sheetId: UID, offsetX: Pixel, offsetY: Pixel): void;
|
|
160
182
|
getViewportOffset(sheetId: UID): {
|
|
@@ -162,6 +184,15 @@ export declare class ViewportCollection {
|
|
|
162
184
|
y: number | Pixel;
|
|
163
185
|
};
|
|
164
186
|
resetViewports(sheetId: UID): void;
|
|
187
|
+
/**
|
|
188
|
+
* Depending on how `this.zoneToDisplay` intersects the viewports, we may need to reorganize the viewports to ensure that
|
|
189
|
+
* `viewports.bottomRight` is always defined.
|
|
190
|
+
*
|
|
191
|
+
* For example if `this.zoneToDisplay` is only intersecting the bottom-left viewport, we need to treat the bottom-left
|
|
192
|
+
* viewport as the bottom-right viewport.
|
|
193
|
+
*/
|
|
194
|
+
private reorganizeViewportZones;
|
|
195
|
+
private getViewportZones;
|
|
165
196
|
/**
|
|
166
197
|
* Adjust the viewport such that the anchor position is visible
|
|
167
198
|
*/
|
|
@@ -189,8 +220,6 @@ export declare class ViewportCollection {
|
|
|
189
220
|
private mapViewportsToRect;
|
|
190
221
|
getGridOffsetX(): Pixel;
|
|
191
222
|
getGridOffsetY(): Pixel;
|
|
192
|
-
getZoomLevel(): number;
|
|
193
|
-
setZoomLevel(zoomLevel: number): void;
|
|
194
223
|
private getPaneDivisions;
|
|
195
224
|
setPaneDivision(sheetId: UID, paneDivision: PaneDivision): void;
|
|
196
225
|
}
|