@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,8 +1,8 @@
|
|
|
1
1
|
import { CoreChartOptions } from "chart.js";
|
|
2
|
+
import { ColorThemeName, CompiledFormula } from "..";
|
|
2
3
|
import { ChartCreationContext, ChartData, ChartRuntime, ChartType, ChartTypeDefinition, ExcelChartDefinition } from "../types/chart/chart";
|
|
3
4
|
import { CommandResult } from "../types/commands";
|
|
4
|
-
import { CoreGetters } from "../types/
|
|
5
|
-
import { Getters } from "../types/getters";
|
|
5
|
+
import { CoreGetters, EvaluationGetters } from "../types/getters";
|
|
6
6
|
import { RangeAdapterFunctions, UID } from "../types/misc";
|
|
7
7
|
import { Range } from "../types/range";
|
|
8
8
|
import { Validator } from "../types/validator";
|
|
@@ -45,11 +45,14 @@ export interface ChartTypeBuilder<T extends ChartType> {
|
|
|
45
45
|
* Get the definition of the chart used for excel export.
|
|
46
46
|
* If the chart is not supported by Excel, this function returns undefined.
|
|
47
47
|
*/
|
|
48
|
-
getDefinitionForExcel(getters:
|
|
49
|
-
getRuntime(getters:
|
|
48
|
+
getDefinitionForExcel(getters: EvaluationGetters, definition: ChartTypeDefinition<T, Range>, params: Pick<ExcelChartDefinition, "dataSets" | "labelRange">): ExcelChartDefinition | undefined;
|
|
49
|
+
getRuntime(getters: EvaluationGetters, definition: ChartTypeDefinition<T, Range>, chartDataExtractors: ChartDataExtractors, sheetId: UID, eventHandlers: ChartJsEventHandlers, colorThemeName: ColorThemeName): ChartRuntime;
|
|
50
|
+
/** Get all the formulas used in the chart */
|
|
51
|
+
getFormulas(getters: CoreGetters, sheetId: UID, definition: ChartTypeDefinition<T, Range>): CompiledFormula[];
|
|
50
52
|
allowedDefinitionKeys: readonly string[];
|
|
51
53
|
sequence: number;
|
|
52
54
|
dataSeriesLimit?: number;
|
|
55
|
+
loadDataForExport?: (getters: EvaluationGetters) => Promise<void>;
|
|
53
56
|
}
|
|
54
57
|
interface ChartDataExtractors {
|
|
55
58
|
extractData(): ChartData;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CellValue } from "../types/cells";
|
|
2
2
|
import { EvaluatedCriterion, GenericCriterion, GenericCriterionType } from "../types/generic_criterion";
|
|
3
|
-
import {
|
|
3
|
+
import { EvaluationGetters } from "../types/getters";
|
|
4
4
|
import { UID } from "../types/misc";
|
|
5
5
|
import { Range } from "../types/range";
|
|
6
6
|
import { Registry } from "./registry";
|
|
@@ -20,13 +20,13 @@ export type CriterionEvaluator<T = unknown> = {
|
|
|
20
20
|
* For more complex criteria (like "top10"), we might want to pre-compute some data before evaluating the criterion for
|
|
21
21
|
* each cell, to avoid recomputing everything each time.
|
|
22
22
|
*/
|
|
23
|
-
preComputeCriterion?: (criterion: GenericCriterion, criterionRanges: Range[], getters:
|
|
23
|
+
preComputeCriterion?: (criterion: GenericCriterion, criterionRanges: Range[], getters: EvaluationGetters) => T;
|
|
24
24
|
/**
|
|
25
25
|
* Returns the error string to display when the value is not valid.
|
|
26
26
|
*
|
|
27
27
|
* The criterion values should be in canonical form (non-localized), and formulas should be evaluated.
|
|
28
28
|
*/
|
|
29
|
-
getErrorString: (criterion: EvaluatedCriterion, getters:
|
|
29
|
+
getErrorString: (criterion: EvaluatedCriterion, getters: EvaluationGetters, sheetId: UID) => string;
|
|
30
30
|
/**
|
|
31
31
|
* Checks if a criterion value is valid.
|
|
32
32
|
*
|
|
@@ -36,7 +36,7 @@ export type CriterionEvaluator<T = unknown> = {
|
|
|
36
36
|
/** Return the number of values that the criterion must contains. Return undefined if the criterion can have any number of values */
|
|
37
37
|
numberOfValues: (criterion: GenericCriterion) => number | undefined;
|
|
38
38
|
name: string;
|
|
39
|
-
getPreview: (criterion: GenericCriterion, getters:
|
|
39
|
+
getPreview: (criterion: GenericCriterion, getters: EvaluationGetters) => string;
|
|
40
40
|
/** Error string when a criterion value is invalid */
|
|
41
41
|
criterionValueErrorString: string;
|
|
42
42
|
allowedValues?: "onlyLiterals" | "onlyFormulas";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Model } from "../model";
|
|
2
|
+
import { Getters } from "../types/getters";
|
|
3
|
+
import { UID } from "../types/misc";
|
|
4
|
+
import { Registry } from "./registry";
|
|
5
|
+
export interface UnusedDataSource {
|
|
6
|
+
label: string;
|
|
7
|
+
id: UID;
|
|
8
|
+
}
|
|
9
|
+
export interface DataSourceType {
|
|
10
|
+
type: string;
|
|
11
|
+
unusedLabel: string;
|
|
12
|
+
getUnusedInstances: (getters: Getters) => UnusedDataSource[];
|
|
13
|
+
deleteDataSource: (dispatch: Model["dispatch"], id: UID) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const unusedDataSourceRegistry: Registry<DataSourceType>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EvaluationGetters } from "../types/getters";
|
|
2
2
|
import { Registry } from "./registry";
|
|
3
3
|
/**
|
|
4
4
|
* This registry is used to register functions that should be called after each iteration of the evaluation.
|
|
@@ -6,4 +6,4 @@ import { Registry } from "./registry";
|
|
|
6
6
|
* to avoid to reload the data of the pivot at each function call (PIVOT.VALUE and PIVOT.HEADER). After each
|
|
7
7
|
* evaluation iteration, the pivot has to be re-evaluated during the next iteration.
|
|
8
8
|
*/
|
|
9
|
-
export declare const onIterationEndEvaluationRegistry: Registry<(getters:
|
|
9
|
+
export declare const onIterationEndEvaluationRegistry: Registry<(getters: EvaluationGetters) => void>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Action } from "../actions/action";
|
|
2
|
+
import { Getters } from "../types/getters";
|
|
2
3
|
import { UID } from "../types/misc";
|
|
3
4
|
import { SpreadsheetChildEnv } from "../types/spreadsheet_env";
|
|
4
5
|
import { Registry } from "./registry";
|
|
@@ -11,9 +12,12 @@ import { Registry } from "./registry";
|
|
|
11
12
|
export interface FigureContent {
|
|
12
13
|
Component: any;
|
|
13
14
|
menuBuilder: (figureId: UID, env: SpreadsheetChildEnv) => Action[];
|
|
15
|
+
isThemeDependant: boolean;
|
|
14
16
|
SidePanelComponent?: string;
|
|
15
17
|
keepRatio?: boolean;
|
|
16
|
-
minFigSize
|
|
17
|
-
borderWidth
|
|
18
|
+
minFigSize: number;
|
|
19
|
+
borderWidth: (getters: Getters) => number;
|
|
20
|
+
hasShadow: (getters: Getters) => boolean;
|
|
21
|
+
isRounded: (getters: Getters) => boolean;
|
|
18
22
|
}
|
|
19
23
|
export declare const figureRegistry: Registry<FigureContent>;
|
|
@@ -9,6 +9,10 @@ interface StoreUpdateEvent {
|
|
|
9
9
|
export declare class DependencyContainer extends EventBus<StoreUpdateEvent> {
|
|
10
10
|
private dependencies;
|
|
11
11
|
private factory;
|
|
12
|
+
private parent?;
|
|
13
|
+
/** If the dependency container has a parent, those are the store that will be owned by this container instead of its parent */
|
|
14
|
+
private ownStores;
|
|
15
|
+
constructor(parent?: DependencyContainer, extendedStores?: StoreConstructor[]);
|
|
12
16
|
/**
|
|
13
17
|
* Injects a store instance in the dependency container.
|
|
14
18
|
* Useful for injecting an external store that is not created by the container.
|
|
@@ -22,5 +26,6 @@ export declare class DependencyContainer extends EventBus<StoreUpdateEvent> {
|
|
|
22
26
|
instantiate<T>(Store: StoreConstructor<T>, ...args: StoreParams<StoreConstructor<T>>): T;
|
|
23
27
|
resetStores(): void;
|
|
24
28
|
dispose(): void;
|
|
29
|
+
trigger(type: StoreUpdateEvent["type"], payload?: Omit<StoreUpdateEvent, "type">): void;
|
|
25
30
|
}
|
|
26
31
|
export {};
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { LocalStoreConstructor, Store, StoreConstructor, StoreParams } from "../types/store_engine";
|
|
2
|
+
import { DependencyContainer } from "./dependency_container";
|
|
2
3
|
/**
|
|
3
4
|
* This hook should be used at the root of your app to provide the store container.
|
|
4
5
|
*/
|
|
5
6
|
export declare function useStoreProvider(): any;
|
|
7
|
+
/**
|
|
8
|
+
* This create a new store dependency container. The store given in the extended store array will be owned by this
|
|
9
|
+
* new container, the other stores will be owned by the parent container.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useChildStoreProvider(extendedStores: StoreConstructor[]): DependencyContainer;
|
|
6
12
|
/**
|
|
7
13
|
* Get the instance of a store.
|
|
8
14
|
*/
|
|
@@ -3,7 +3,7 @@ import { Get } from "../types/store_engine";
|
|
|
3
3
|
import { HighlightStore } from "./highlight_store";
|
|
4
4
|
import { SpreadsheetStore } from "./spreadsheet_store";
|
|
5
5
|
export declare class ArrayFormulaHighlight extends SpreadsheetStore {
|
|
6
|
-
protected highlightStore: import("../types/store_engine").
|
|
6
|
+
protected highlightStore: import("../types/store_engine").Store<HighlightStore>;
|
|
7
7
|
constructor(get: Get);
|
|
8
8
|
get highlights(): Highlight[];
|
|
9
9
|
}
|
package/dist/types/{plugins/ui_feature/automatic_sum.d.ts → stores/automatic_sum_store.d.ts}
RENAMED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { Command } from "
|
|
2
|
-
import { Position, UID, Zone } from "
|
|
3
|
-
import {
|
|
1
|
+
import { Command } from "../types/commands";
|
|
2
|
+
import { Position, UID, Zone } from "../types/misc";
|
|
3
|
+
import { SpreadsheetStore } from "./spreadsheet_store";
|
|
4
4
|
interface AutomaticSum {
|
|
5
5
|
position: Position;
|
|
6
6
|
zone: Zone;
|
|
7
7
|
}
|
|
8
|
-
export declare class
|
|
8
|
+
export declare class AutomaticSumStore extends SpreadsheetStore {
|
|
9
9
|
static getters: readonly ["getAutomaticSums"];
|
|
10
10
|
handle(cmd: Command): void;
|
|
11
11
|
getAutomaticSums(sheetId: UID, zone: Zone, anchor: Position): AutomaticSum[];
|
|
12
|
+
get automaticSumsOnMainSelectedZone(): AutomaticSum[];
|
|
12
13
|
private sumData;
|
|
13
14
|
private sumAdjacentData;
|
|
14
15
|
/**
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PositionMap } from "../helpers/cells/position_map";
|
|
2
|
+
import { CellPosition, Color } from "../types/misc";
|
|
3
|
+
import { SpreadsheetStore } from "./spreadsheet_store";
|
|
4
|
+
export interface CellHoverOverlayProvider {
|
|
5
|
+
getHighlightedPositions: (hoveredPosition: CellPosition) => CellPosition[];
|
|
6
|
+
}
|
|
7
|
+
export declare class CellHoverOverlayStore extends SpreadsheetStore {
|
|
8
|
+
mutators: readonly ["hover", "register", "unRegister"];
|
|
9
|
+
storeGetters: readonly ["getCellHoverOverlayColor"];
|
|
10
|
+
private providers;
|
|
11
|
+
overlayColors: PositionMap<Color>;
|
|
12
|
+
hover(hoveredPosition: CellPosition | undefined): "noStateChange" | undefined;
|
|
13
|
+
register(highlightProvider: CellHoverOverlayProvider): void;
|
|
14
|
+
unRegister(highlightProvider: CellHoverOverlayProvider): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UID } from "../types/misc";
|
|
2
|
+
/**
|
|
3
|
+
* Holds the id of the figure that a dragged chart suggestion is currently
|
|
4
|
+
* hovering over, so it can be highlighted reactively instead of through direct DOM manipulation.
|
|
5
|
+
*/
|
|
6
|
+
export declare class ChartDragStore {
|
|
7
|
+
mutators: readonly ["setHighlightedFigure"];
|
|
8
|
+
highlightedFigureId: UID | undefined;
|
|
9
|
+
setHighlightedFigure(figureId: UID | undefined): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Command } from "../types/commands";
|
|
2
|
+
import { Zone } from "../types/misc";
|
|
3
|
+
import { SpreadsheetStore } from "./spreadsheet_store";
|
|
4
|
+
export declare class CheckboxToggleStore extends SpreadsheetStore {
|
|
5
|
+
storeGetters: readonly ["hasBooleanValidationInZones"];
|
|
6
|
+
handle(cmd: Command): void;
|
|
7
|
+
hasBooleanValidationInZones(zones: Zone[]): boolean;
|
|
8
|
+
private toggleCheckbox;
|
|
9
|
+
}
|
|
@@ -5,6 +5,7 @@ export declare class ClientFocusStore extends SpreadsheetStore {
|
|
|
5
5
|
mutators: readonly ["focusClient", "unfocusClient", "showClientTag", "hideClientTag", "jumpToClient"];
|
|
6
6
|
private _showClientTag;
|
|
7
7
|
private clientFocusTimeout;
|
|
8
|
+
private viewStore;
|
|
8
9
|
constructor(get: Get);
|
|
9
10
|
get focusedClients(): Set<ClientId>;
|
|
10
11
|
jumpToClient(clientId: ClientId): void;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { OSClipboardContent } from "
|
|
2
|
-
import { Command,
|
|
3
|
-
import { GridRenderingContext } from "
|
|
4
|
-
import {
|
|
1
|
+
import { OSClipboardContent } from "../types/clipboard";
|
|
2
|
+
import { Command, DispatchResult } from "../types/commands";
|
|
3
|
+
import { GridRenderingContext } from "../types/rendering";
|
|
4
|
+
import { SpreadsheetStore } from "./spreadsheet_store";
|
|
5
5
|
export declare const MAX_FILE_SIZE: number;
|
|
6
6
|
/**
|
|
7
|
-
* Clipboard
|
|
7
|
+
* Clipboard Store
|
|
8
8
|
*
|
|
9
9
|
* This clipboard manages all cut/copy/paste interactions internal to the
|
|
10
10
|
* application, and with the OS clipboard as well.
|
|
11
11
|
*/
|
|
12
|
-
export declare class
|
|
13
|
-
|
|
14
|
-
static getters: readonly ["getClipboardTextAndImageContent", "getClipboardId", "getClipboardTextContent", "isCutOperation"];
|
|
12
|
+
export declare class ClipboardStore extends SpreadsheetStore {
|
|
13
|
+
storeGetters: readonly ["getClipboardTextAndImageContent", "getClipboardId", "getClipboardTextContent", "isCutOperation", "isCommandValid"];
|
|
15
14
|
private status;
|
|
16
15
|
private originSheetId?;
|
|
17
16
|
private copiedData?;
|
|
18
17
|
private _isCutOperation;
|
|
19
18
|
private clipboardId;
|
|
20
|
-
private
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
private notificationStore;
|
|
20
|
+
get renderingLayers(): readonly ["Clipboard"];
|
|
21
|
+
isCommandValid(cmd: Command): DispatchResult;
|
|
22
|
+
private getCommandResult;
|
|
23
23
|
handle(cmd: Command): void;
|
|
24
24
|
private getCopiedDataAbove;
|
|
25
25
|
private getCopiedDataOnLeft;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { CancelledReason, Command } from "../types/commands";
|
|
2
|
+
import { Get } from "../types/store_engine";
|
|
3
|
+
import { SpreadsheetStore } from "./spreadsheet_store";
|
|
4
|
+
export declare class DataCleanupStore extends SpreadsheetStore {
|
|
5
|
+
mutators: readonly ["setHasHeader", "setColumns", "toggleAllColumns", "toggleColumn"];
|
|
6
|
+
private notificationStore;
|
|
7
|
+
hasHeader: boolean;
|
|
8
|
+
columns: {
|
|
9
|
+
[colIndex: number]: boolean;
|
|
10
|
+
};
|
|
11
|
+
constructor(get: Get);
|
|
12
|
+
private updateColumns;
|
|
13
|
+
setHasHeader(hasHeader: boolean): void;
|
|
14
|
+
setColumns(columns: {
|
|
15
|
+
[colIndex: number]: boolean;
|
|
16
|
+
}): void;
|
|
17
|
+
toggleAllColumns(): void;
|
|
18
|
+
toggleColumn(colIndex: number): void;
|
|
19
|
+
private get isEveryColumnSelected();
|
|
20
|
+
get removeDuplicateErrors(): CancelledReason[];
|
|
21
|
+
handle(cmd: Command): void;
|
|
22
|
+
private removeDuplicates;
|
|
23
|
+
private getUniqueRowsIndexes;
|
|
24
|
+
private notifyRowsRemovedAndRemaining;
|
|
25
|
+
private checkSingleRangeSelected;
|
|
26
|
+
private checkNoMergeInZone;
|
|
27
|
+
private checkRangeContainsValues;
|
|
28
|
+
private checkNoColumnProvided;
|
|
29
|
+
private checkColumnsIncludedInZone;
|
|
30
|
+
private getColsToAnalyze;
|
|
31
|
+
}
|
|
@@ -8,8 +8,9 @@ export declare const CELL_BACKGROUND_GRIDLINE_STROKE_STYLE = "#111";
|
|
|
8
8
|
export declare const CELL_ANIMATION_DURATION = 200;
|
|
9
9
|
export declare class GridRenderer extends DisposableStore {
|
|
10
10
|
private renderer;
|
|
11
|
+
storeGetters: readonly ["drawLayer"];
|
|
11
12
|
private fingerprints;
|
|
12
|
-
private
|
|
13
|
+
private cellHoverOverlayStore;
|
|
13
14
|
private hoveredIcon;
|
|
14
15
|
private lastRenderSheetId;
|
|
15
16
|
private lastRenderBoxes;
|
|
@@ -17,7 +18,7 @@ export declare class GridRenderer extends DisposableStore {
|
|
|
17
18
|
private zonesWithPreventedAnimationsInNextFrame;
|
|
18
19
|
private animations;
|
|
19
20
|
protected getters: RenderingGetters;
|
|
20
|
-
constructor(get: Get, renderer?: Store<RendererStore>);
|
|
21
|
+
constructor(get: Get, renderer?: Store<RendererStore> | null);
|
|
21
22
|
handle(cmd: Command): void;
|
|
22
23
|
finalize(): void;
|
|
23
24
|
get renderingLayers(): readonly ["Background", "Headers"];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Command } from "../types/commands";
|
|
2
|
+
import { Get } from "../types/store_engine";
|
|
3
|
+
import { SpreadsheetStore } from "./spreadsheet_store";
|
|
4
|
+
/**
|
|
5
|
+
* The goal of this store is to make its attached viewport store follow the active sheet
|
|
6
|
+
*/
|
|
7
|
+
export declare class MainViewportStore extends SpreadsheetStore {
|
|
8
|
+
private viewStore;
|
|
9
|
+
private sheetIdAtFinalize;
|
|
10
|
+
constructor(get: Get);
|
|
11
|
+
private handleEvent;
|
|
12
|
+
protected handle(cmd: Command): void;
|
|
13
|
+
protected finalize(): void;
|
|
14
|
+
}
|
|
@@ -7,7 +7,7 @@ import { RendererStore } from "./renderer_store";
|
|
|
7
7
|
export declare class SpreadsheetStore extends DisposableStore {
|
|
8
8
|
protected model: Model;
|
|
9
9
|
protected getters: import("..").Getters;
|
|
10
|
-
protected renderer: import("../types/store_engine").
|
|
10
|
+
protected renderer: import("../types/store_engine").Store<RendererStore>;
|
|
11
11
|
constructor(get: Get);
|
|
12
12
|
get renderingLayers(): Readonly<LayerName[]>;
|
|
13
13
|
protected handle(cmd: Command): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Command, DispatchResult, ResizeTableCommand } from "../types/commands";
|
|
2
|
+
import { SpreadsheetStore } from "./spreadsheet_store";
|
|
3
|
+
export declare class TableResizeStore extends SpreadsheetStore {
|
|
4
|
+
canResizeTable(cmd: ResizeTableCommand): DispatchResult;
|
|
5
|
+
handle(cmd: Command): void;
|
|
6
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Command } from "../types/commands";
|
|
2
|
+
import { SpreadsheetStore } from "./spreadsheet_store";
|
|
3
|
+
export declare class TrimWhitespaceStore extends SpreadsheetStore {
|
|
4
|
+
mutators: readonly ["trimWhitespace"];
|
|
5
|
+
private notificationStore;
|
|
6
|
+
trimWhitespace(): void;
|
|
7
|
+
handle(cmd: Command): void;
|
|
8
|
+
private _trimWhitespace;
|
|
9
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { CellPosition, FigureUI, HeaderDimensions, HeaderIndex, Pixel, SheetViewDimensions, UID, ViewportsGetters, Zone } from "..";
|
|
2
|
+
import { ViewportCollection } from "../helpers/viewport_collection";
|
|
3
|
+
import { Command } from "../types/commands";
|
|
4
|
+
import { DOMCoordinates, DOMDimension, Rect, SheetDOMScrollInfo, Viewport } from "../types/rendering";
|
|
5
|
+
import { Get } from "../types/store_engine";
|
|
6
|
+
import { SpreadsheetStore } from "./spreadsheet_store";
|
|
7
|
+
type getHeaderDimensionsCallback = (sheetId: UID, dimension: "COL" | "ROW", index: number) => HeaderDimensions;
|
|
8
|
+
/**
|
|
9
|
+
* Viewport store.
|
|
10
|
+
*
|
|
11
|
+
* This store manages all things related to all viewport states.
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
export declare class ViewportsStore extends SpreadsheetStore {
|
|
15
|
+
mutators: readonly ["setViewportOffset", "resizeSheetView", "shiftViewportDown", "shiftViewportUp", "scrollToCell", "setDisplayedSheetId", "setViewportArgs", "rebuildViewports"];
|
|
16
|
+
private zoomStore;
|
|
17
|
+
private getHeaderDimensionsCallback;
|
|
18
|
+
private getFooterSizeCallback;
|
|
19
|
+
private getZoomLevelCallback;
|
|
20
|
+
private zoneToDisplay;
|
|
21
|
+
viewports: ViewportCollection;
|
|
22
|
+
private sheetsWithDirtyViewports;
|
|
23
|
+
displayedSheetId: UID;
|
|
24
|
+
constructor(get: Get);
|
|
25
|
+
handle(cmd: Command): void;
|
|
26
|
+
finalize(): void;
|
|
27
|
+
private setViewports;
|
|
28
|
+
private syncPaneDivision;
|
|
29
|
+
setDisplayedSheetId(sheetId: UID): void;
|
|
30
|
+
setViewportOffset(offset: {
|
|
31
|
+
offsetX: Pixel;
|
|
32
|
+
offsetY: Pixel;
|
|
33
|
+
}): "noStateChange" | undefined;
|
|
34
|
+
resizeSheetView(dimensions: SheetViewDimensions): "noStateChange" | undefined;
|
|
35
|
+
shiftViewportDown(): void;
|
|
36
|
+
shiftViewportUp(): void;
|
|
37
|
+
scrollToCell(sheetId: UID, col: HeaderIndex, row: HeaderIndex): void;
|
|
38
|
+
get sheetViewDimensionWithHeaders(): DOMDimension;
|
|
39
|
+
get sheetViewDimension(): DOMDimension;
|
|
40
|
+
get gridOffset(): DOMCoordinates;
|
|
41
|
+
/** type as pane, not viewport but basically pane extends viewport */
|
|
42
|
+
get activeMainViewport(): Viewport;
|
|
43
|
+
/**
|
|
44
|
+
* Return the DOM scroll info of the active sheet, ie. the offset between the viewport left/top side and
|
|
45
|
+
* the grid left/top side, corresponding to the scroll of the scrollbars and not snapped to the grid.
|
|
46
|
+
*/
|
|
47
|
+
get activeSheetScrollInfo(): SheetDOMScrollInfo;
|
|
48
|
+
get visibleCols(): HeaderIndex[];
|
|
49
|
+
get visibleRows(): HeaderIndex[];
|
|
50
|
+
/**
|
|
51
|
+
* Get the positions of all the cells that are visible in the viewport, taking merges into account.
|
|
52
|
+
*/
|
|
53
|
+
get visibleCellPositions(): CellPosition[];
|
|
54
|
+
/**
|
|
55
|
+
* Return the main viewport maximum size relative to the client size.
|
|
56
|
+
*/
|
|
57
|
+
get mainViewportRect(): Rect;
|
|
58
|
+
get maximumSheetOffset(): {
|
|
59
|
+
maxOffsetX: Pixel;
|
|
60
|
+
maxOffsetY: Pixel;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Returns the position of the MainViewport relatively to the start of the grid (without headers)
|
|
64
|
+
* It corresponds to the summed dimensions of the visible cols/rows (in x/y respectively)
|
|
65
|
+
* situated before the pane divisions.
|
|
66
|
+
*/
|
|
67
|
+
get mainViewportCoordinates(): DOMCoordinates;
|
|
68
|
+
get visibleFigures(): FigureUI[];
|
|
69
|
+
/**
|
|
70
|
+
* Shift the viewport vertically and move the selection anchor
|
|
71
|
+
* such that it remains at the same place relative to the
|
|
72
|
+
* viewport top.
|
|
73
|
+
*/
|
|
74
|
+
private shiftVertically;
|
|
75
|
+
private getPaneDivisions;
|
|
76
|
+
private getFooterSize;
|
|
77
|
+
setViewportArgs(args: {
|
|
78
|
+
getHeaderDimensions?: getHeaderDimensionsCallback;
|
|
79
|
+
getFooterSize?: () => Pixel;
|
|
80
|
+
zoneToDisplay?: Zone;
|
|
81
|
+
}): void;
|
|
82
|
+
rebuildViewports(): void;
|
|
83
|
+
buildViewportGetters(getHeaderDimensions: (sheetId: UID, dimension: "COL" | "ROW", index: number) => HeaderDimensions): ViewportsGetters;
|
|
84
|
+
}
|
|
85
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ZoomedMouseEvent } from "../components/helpers/zoom";
|
|
2
|
+
import { Pixel } from "../types/misc";
|
|
3
|
+
import { DOMCoordinates, Rect } from "../types/rendering";
|
|
4
|
+
/**
|
|
5
|
+
* Holds the zoom level of the spreadsheet UI, and everything derived purely from it.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ZoomStore {
|
|
8
|
+
mutators: readonly ["setZoom"];
|
|
9
|
+
storeGetters: readonly ["getZoomedRect", "getZoomedEvent"];
|
|
10
|
+
zoomLevel: number;
|
|
11
|
+
setZoom(zoom: number): "noStateChange" | undefined;
|
|
12
|
+
getZoomedRect(rect: Rect): Rect;
|
|
13
|
+
/**
|
|
14
|
+
* Return a POJO containing the original event as well as the client position and the client offset
|
|
15
|
+
* where the event would target if the spreadsheet was not zoomed
|
|
16
|
+
* @param ev unzoomed mouse event
|
|
17
|
+
* @param originalTargetPosition The original target bounding rect the resulting ZoomedMouseEvent offset must refer to
|
|
18
|
+
* @returns a ZoomedMouseEvent
|
|
19
|
+
*/
|
|
20
|
+
getZoomedEvent<T extends MouseEvent>(ev: T, originalTargetPosition?: DOMCoordinates | null): ZoomedMouseEvent<T>;
|
|
21
|
+
/**
|
|
22
|
+
* Returns the bounding rect of the closest or self element who is targetable by a ZoomedMouseEvent
|
|
23
|
+
*/
|
|
24
|
+
private getZoomTargetPosition;
|
|
25
|
+
get scrollBarWidth(): Pixel;
|
|
26
|
+
get cssZoom(): string;
|
|
27
|
+
}
|
|
@@ -24,7 +24,7 @@ import { BubbleChartDefinition, BubbleChartRuntime, BubbleColorMode } from "./bu
|
|
|
24
24
|
export declare const CHART_TYPES: readonly ["line", "bar", "pie", "scorecard", "gauge", "scatter", "bubble", "combo", "waterfall", "pyramid", "radar", "geo", "funnel", "sunburst", "treemap", "calendar"];
|
|
25
25
|
export type ChartType = (typeof CHART_TYPES)[number];
|
|
26
26
|
export type ChartDefinitionWithDataSource<T extends string | Range = Range> = LineChartDefinition<T> | PieChartDefinition<T> | BarChartDefinition<T> | ScatterChartDefinition<T> | ComboChartDefinition<T> | WaterfallChartDefinition<T> | PyramidChartDefinition<T> | RadarChartDefinition<T> | GeoChartDefinition<T> | FunnelChartDefinition<T> | SunburstChartDefinition<T> | TreeMapChartDefinition<T> | CalendarChartDefinition<T>;
|
|
27
|
-
export type ChartDefinition<T extends string | Range = string> = ChartDefinitionWithDataSource<T> | ScorecardChartDefinition
|
|
27
|
+
export type ChartDefinition<T extends string | Range = string> = ChartDefinitionWithDataSource<T> | ScorecardChartDefinition | GaugeChartDefinition<T> | BubbleChartDefinition<T>;
|
|
28
28
|
/**
|
|
29
29
|
* `ChartTypeDefinition<"bar", Range>`
|
|
30
30
|
* `ChartTypeDefinition<"bar", string>`
|
|
@@ -203,6 +203,8 @@ export interface ChartCreationContext {
|
|
|
203
203
|
readonly bubbleColorMode?: BubbleColorMode;
|
|
204
204
|
readonly annotationText?: string;
|
|
205
205
|
readonly annotationLink?: string;
|
|
206
|
+
readonly scorecardKeyValueFormula?: string;
|
|
207
|
+
readonly scorecardBaselineFormula?: string;
|
|
206
208
|
}
|
|
207
209
|
export type ChartAxisFormats = {
|
|
208
210
|
[axisId: string]: Format | undefined;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { ChartDefinition, ChartRangeDataSource } from "./chart";
|
|
2
|
+
export interface Suggestion<T> {
|
|
3
|
+
description: string;
|
|
4
|
+
/** Defaults to always-applicable. */
|
|
5
|
+
isApplicable?: (ctx: T) => boolean;
|
|
6
|
+
build: (ctx: T) => ChartDefinition;
|
|
7
|
+
}
|
|
8
|
+
/** Pattern A — Single numeric column */
|
|
9
|
+
export interface SingleNumberContext {
|
|
10
|
+
title: string;
|
|
11
|
+
source: ChartRangeDataSource<string>;
|
|
12
|
+
rowCount: number;
|
|
13
|
+
firstCellXC: string;
|
|
14
|
+
lastCellXC: string;
|
|
15
|
+
prevCellXC?: string;
|
|
16
|
+
}
|
|
17
|
+
/** Pattern B — Single percentage column */
|
|
18
|
+
export interface SinglePercentageContext {
|
|
19
|
+
title: string;
|
|
20
|
+
source: ChartRangeDataSource<string>;
|
|
21
|
+
rowCount: number;
|
|
22
|
+
firstCellXC: string;
|
|
23
|
+
lastCellXC: string;
|
|
24
|
+
prevCellXC?: string;
|
|
25
|
+
isAboveOne: boolean;
|
|
26
|
+
}
|
|
27
|
+
/** Pattern C — Single date column */
|
|
28
|
+
export interface SingleDateContext {
|
|
29
|
+
title: string;
|
|
30
|
+
lastCellXC: string;
|
|
31
|
+
rowCount: number;
|
|
32
|
+
source: ChartRangeDataSource<string>;
|
|
33
|
+
}
|
|
34
|
+
/** Pattern D — Single categorical column */
|
|
35
|
+
export interface SingleCategoricalContext {
|
|
36
|
+
title: string;
|
|
37
|
+
source: ChartRangeDataSource<string>;
|
|
38
|
+
range: string;
|
|
39
|
+
}
|
|
40
|
+
/** Pattern E — Single label column */
|
|
41
|
+
export interface SingleLabelContext {
|
|
42
|
+
title: string;
|
|
43
|
+
lastCellXC: string;
|
|
44
|
+
rowCount: number;
|
|
45
|
+
}
|
|
46
|
+
/** Pattern F — Categorical + Number */
|
|
47
|
+
export interface CategoricalVsNumberContext {
|
|
48
|
+
title: string;
|
|
49
|
+
source: ChartRangeDataSource<string>;
|
|
50
|
+
treemapSource: ChartRangeDataSource<string>;
|
|
51
|
+
}
|
|
52
|
+
/** Patterns G & J — Date + Number or Date + Percentage */
|
|
53
|
+
export interface DateVsSeriesContext {
|
|
54
|
+
title: string;
|
|
55
|
+
source: ChartRangeDataSource<string>;
|
|
56
|
+
isPercentage: boolean;
|
|
57
|
+
}
|
|
58
|
+
/** Pattern H — Number + Number */
|
|
59
|
+
export interface NumberVsNumberContext {
|
|
60
|
+
title: string;
|
|
61
|
+
source2: ChartRangeDataSource<string>;
|
|
62
|
+
sourceBoth: ChartRangeDataSource<string>;
|
|
63
|
+
rowCount1: number;
|
|
64
|
+
rowCount2: number;
|
|
65
|
+
lastCellXC: string;
|
|
66
|
+
prevCellXC?: string;
|
|
67
|
+
}
|
|
68
|
+
/** Pattern I — Categorical + Percentage */
|
|
69
|
+
export interface CategoricalVsPercentageContext {
|
|
70
|
+
title: string;
|
|
71
|
+
source: ChartRangeDataSource<string>;
|
|
72
|
+
rowCount: number;
|
|
73
|
+
}
|
|
74
|
+
/** Pattern K — Label + Number */
|
|
75
|
+
export interface LabelVsNumberContext {
|
|
76
|
+
title: string;
|
|
77
|
+
source: ChartRangeDataSource<string>;
|
|
78
|
+
rowCount: number;
|
|
79
|
+
lastCellXC: string;
|
|
80
|
+
prevCellXC?: string;
|
|
81
|
+
}
|
|
82
|
+
/** Pattern M — Categorical + Multiple Numbers */
|
|
83
|
+
export interface CategoricalVsMultipleNumbersContext {
|
|
84
|
+
title: string;
|
|
85
|
+
source: ChartRangeDataSource<string>;
|
|
86
|
+
rowCount: number;
|
|
87
|
+
}
|
|
88
|
+
/** Pattern N — Date + Multiple Numbers */
|
|
89
|
+
export interface DateVsMultipleNumbersContext {
|
|
90
|
+
title: string;
|
|
91
|
+
source: ChartRangeDataSource<string>;
|
|
92
|
+
}
|
|
93
|
+
/** Pattern O — Categorical + Categorical + Number */
|
|
94
|
+
export interface MultipleCategoricalsVsNumberContext {
|
|
95
|
+
title: string;
|
|
96
|
+
hierarchySource: ChartRangeDataSource<string>;
|
|
97
|
+
barSource: ChartRangeDataSource<string>;
|
|
98
|
+
}
|
|
99
|
+
/** Pattern P — Categorical + Date + Number */
|
|
100
|
+
export interface CategoricalDateNumberContext {
|
|
101
|
+
title: string;
|
|
102
|
+
sourceByDate: ChartRangeDataSource<string>;
|
|
103
|
+
sourceByCat: ChartRangeDataSource<string>;
|
|
104
|
+
}
|
|
105
|
+
/** Pattern Q — Label + Multiple Numbers */
|
|
106
|
+
export interface LabelVsMultipleNumbersContext {
|
|
107
|
+
title: string;
|
|
108
|
+
source: ChartRangeDataSource<string>;
|
|
109
|
+
rowCount: number;
|
|
110
|
+
numColsCount: number;
|
|
111
|
+
/** Always defined: this rule only fires with >= 2 numeric columns (open-ended shape, min 3 total). */
|
|
112
|
+
scatterSource: ChartRangeDataSource<string>;
|
|
113
|
+
/** Only defined when numColsCount === 3 (Bubble Chart's isApplicable guards its use). */
|
|
114
|
+
bubble?: {
|
|
115
|
+
xRange: string;
|
|
116
|
+
yRanges: string[];
|
|
117
|
+
sizeRange: string;
|
|
118
|
+
labelRange: string;
|
|
119
|
+
headerInZone: boolean;
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
/** Pattern R — Categorical + Two Numbers (Population Pyramid or Grouped) */
|
|
123
|
+
export interface CategoricalTwoNumbersContext {
|
|
124
|
+
title: string;
|
|
125
|
+
sourceBoth: ChartRangeDataSource<string>;
|
|
126
|
+
isPyramid: boolean;
|
|
127
|
+
}
|
|
128
|
+
/** Pattern S — Many Numbers (3+ numeric columns, no categorical/date) */
|
|
129
|
+
export interface ManyNumbersContext {
|
|
130
|
+
title: string;
|
|
131
|
+
source: ChartRangeDataSource<string>;
|
|
132
|
+
colsLength: number;
|
|
133
|
+
rowCount: number;
|
|
134
|
+
lastCellXC: string;
|
|
135
|
+
firstCellXC: string;
|
|
136
|
+
secondCellXC: string;
|
|
137
|
+
}
|
|
@@ -10,7 +10,7 @@ export interface RadarChartDefinition<T extends string | Range = Range> extends
|
|
|
10
10
|
readonly humanize?: boolean;
|
|
11
11
|
}
|
|
12
12
|
export type RadarChartRuntime = {
|
|
13
|
-
chartJsConfig: ChartConfiguration
|
|
13
|
+
chartJsConfig: ChartConfiguration<"radar">;
|
|
14
14
|
customizableSeries: {
|
|
15
15
|
dataSetId: string;
|
|
16
16
|
label: string;
|