@odoo/o-spreadsheet 19.5.0-alpha.9 → 20.1.0-alpha.0

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.
Files changed (175) hide show
  1. package/dist/material_symbols_outlined.css +9 -0
  2. package/dist/o_spreadsheet.cjs +34889 -32633
  3. package/dist/o_spreadsheet.css +271 -127
  4. package/dist/o_spreadsheet.esm.js +29707 -27456
  5. package/dist/o_spreadsheet.iife.js +30429 -28173
  6. package/dist/o_spreadsheet.min.iife.js +408 -354
  7. package/dist/o_spreadsheet.xml +303 -239
  8. package/dist/types/actions/data_actions.d.ts +1 -0
  9. package/dist/types/actions/menu_items_actions.d.ts +3 -2
  10. package/dist/types/collaborative/command_squisher.d.ts +1 -1
  11. package/dist/types/collaborative/session.d.ts +3 -1
  12. package/dist/types/components/autofill/autofill.d.ts +1 -1
  13. package/dist/types/components/autofill/autofill_store.d.ts +1 -1
  14. package/dist/types/components/bottom_bar/bottom_bar_statistic/bottom_bar_statistic.d.ts +3 -0
  15. package/dist/types/components/dashboard/clickable_cell_sort_icon/clickable_cell_sort_icon.d.ts +1 -1
  16. package/dist/types/components/dashboard/dashboard.d.ts +1 -0
  17. package/dist/types/components/figures/chart/chartJs/chartjs_geo_projection_plugin.d.ts +12 -0
  18. package/dist/types/components/figures/chart/chartJs/zoomable_chart/zoomable_chartjs.d.ts +1 -0
  19. package/dist/types/components/figures/chart/gauge/gauge_chart_component.d.ts +1 -1
  20. package/dist/types/components/figures/chart/scorecard/chart_scorecard.d.ts +1 -1
  21. package/dist/types/components/figures/figure/figure.d.ts +7 -3
  22. package/dist/types/components/figures/figure_carousel/figure_carousel.d.ts +10 -2
  23. package/dist/types/components/figures/figure_container/figure_container.d.ts +8 -4
  24. package/dist/types/components/full_screen_figure/full_screen_figure.d.ts +12 -1
  25. package/dist/types/components/grid/grid.d.ts +3 -0
  26. package/dist/types/components/grid_overlay/grid_overlay.d.ts +2 -0
  27. package/dist/types/components/grid_popover/grid_popover.d.ts +1 -1
  28. package/dist/types/components/headers_overlay/headers_overlay.d.ts +2 -0
  29. package/dist/types/components/helpers/chart_drag_and_drop.d.ts +15 -0
  30. package/dist/types/components/helpers/dom_helpers.d.ts +3 -2
  31. package/dist/types/components/helpers/draw_grid_hook.d.ts +1 -2
  32. package/dist/types/components/helpers/figure_drag_helper.d.ts +3 -3
  33. package/dist/types/components/helpers/figure_snap_helper.d.ts +8 -3
  34. package/dist/types/components/helpers/zoom.d.ts +0 -14
  35. package/dist/types/components/highlight/highlight/highlight.d.ts +1 -0
  36. package/dist/types/components/link/link_editor/link_editor.d.ts +2 -1
  37. package/dist/types/components/popover/popover.d.ts +0 -1
  38. package/dist/types/components/popover/popover_container_owl_plugin.d.ts +5 -0
  39. package/dist/types/components/scrollbar/scrollbar_horizontal.d.ts +1 -0
  40. package/dist/types/components/scrollbar/scrollbar_vertical.d.ts +1 -0
  41. package/dist/types/components/side_panel/carousel_panel/carousel_panel.d.ts +1 -1
  42. package/dist/types/components/side_panel/chart/building_blocks/chart_title/chart_title.d.ts +1 -0
  43. package/dist/types/components/side_panel/chart/building_blocks/color_scale/color_scale_picker.d.ts +1 -1
  44. package/dist/types/components/side_panel/chart/calendar_chart/calendar_chart_config_panel.d.ts +0 -2
  45. package/dist/types/components/side_panel/chart/chart_type_picker_popover/chart_type_picker_popover.d.ts +0 -1
  46. package/dist/types/components/side_panel/chart/scorecard_chart_panel/scorecard_chart_config_panel.d.ts +6 -10
  47. package/dist/types/components/side_panel/components/radio_selection/radio_selection.d.ts +1 -1
  48. package/dist/types/components/side_panel/data_analysis/chart_suggestion_preview.d.ts +19 -0
  49. package/dist/types/components/side_panel/data_analysis/data_analysis_panel.d.ts +17 -0
  50. package/dist/types/components/side_panel/data_analysis/data_analysis_store.d.ts +15 -0
  51. package/dist/types/components/side_panel/find_and_replace/find_and_replace.d.ts +1 -0
  52. package/dist/types/components/side_panel/find_and_replace/find_and_replace_store.d.ts +2 -1
  53. package/dist/types/components/side_panel/pivot/pivot_layout_configurator/pivot_layout_configurator.d.ts +1 -6
  54. package/dist/types/components/side_panel/side_panel/side_panel_store.d.ts +2 -1
  55. package/dist/types/components/side_panel/table_panel/table_panel.d.ts +6 -0
  56. package/dist/types/components/side_panel/table_style_editor_panel/table_style_editor_panel.d.ts +2 -0
  57. package/dist/types/components/spreadsheet/spreadsheet.d.ts +11 -5
  58. package/dist/types/components/spreadsheet_print/print_iframe.d.ts +15 -0
  59. package/dist/types/components/spreadsheet_print/spreadsheet_print.d.ts +4 -0
  60. package/dist/types/components/standalone_grid_canvas/carousel_data_view_print.d.ts +32 -0
  61. package/dist/types/components/standalone_grid_canvas/standalone_grid_canvas.d.ts +395 -1
  62. package/dist/types/components/standalone_viewport/standalone_viewport.d.ts +8 -4
  63. package/dist/types/components/standalone_viewport/standalone_viewport_store.d.ts +2 -1
  64. package/dist/types/components/tables/hovered_table_store.d.ts +6 -7
  65. package/dist/types/components/tables/table_resizer/table_resizer.d.ts +1 -0
  66. package/dist/types/components/tables/table_styles_popover/table_styles_popover.d.ts +0 -1
  67. package/dist/types/components/top_bar/color_editor/color_editor.d.ts +1 -1
  68. package/dist/types/components/top_bar/zoom_editor/zoom_editor.d.ts +1 -1
  69. package/dist/types/constants.d.ts +17 -2
  70. package/dist/types/formulas/compiler.d.ts +1 -1
  71. package/dist/types/functions/function_registry.d.ts +3 -0
  72. package/dist/types/functions/helper_lookup.d.ts +1 -1
  73. package/dist/types/functions/helpers.d.ts +4 -0
  74. package/dist/types/functions/module_operators.d.ts +1 -1
  75. package/dist/types/functions/module_text.d.ts +16 -13
  76. package/dist/types/functions/module_web.d.ts +1 -1
  77. package/dist/types/helpers/carousel_helpers.d.ts +8 -1
  78. package/dist/types/helpers/cells/cell_evaluation.d.ts +1 -1
  79. package/dist/types/helpers/color.d.ts +1 -1
  80. package/dist/types/helpers/color_themes.d.ts +2 -0
  81. package/dist/types/helpers/data_analysis.d.ts +17 -0
  82. package/dist/types/helpers/figures/chart.d.ts +7 -6
  83. package/dist/types/helpers/figures/charts/chart_common.d.ts +3 -3
  84. package/dist/types/helpers/figures/charts/chart_data_source_helpers.d.ts +10 -0
  85. package/dist/types/helpers/figures/charts/chart_data_sources.d.ts +3 -3
  86. package/dist/types/helpers/figures/charts/chart_suggestion_engine.d.ts +8 -0
  87. package/dist/types/helpers/figures/charts/chart_ui_common.d.ts +11 -4
  88. package/dist/types/helpers/figures/charts/charts_suggestions_constants.d.ts +37 -0
  89. package/dist/types/helpers/figures/charts/gauge_chart_rendering.d.ts +6 -2
  90. package/dist/types/helpers/figures/charts/runtime/chart_data_extractor.d.ts +13 -12
  91. package/dist/types/helpers/figures/charts/runtime/chartjs_title.d.ts +2 -2
  92. package/dist/types/helpers/filter_helpers.d.ts +2 -2
  93. package/dist/types/helpers/links.d.ts +1 -1
  94. package/dist/types/helpers/owl3_helpers.d.ts +4 -0
  95. package/dist/types/helpers/pivot/pivot_composer_helpers.d.ts +1 -1
  96. package/dist/types/helpers/pivot/pivot_presentation.d.ts +2 -2
  97. package/dist/types/helpers/pivot/pivot_registry.d.ts +4 -5
  98. package/dist/types/helpers/pivot/spreadsheet_pivot/runtime_definition_spreadsheet_pivot.d.ts +2 -2
  99. package/dist/types/helpers/range.d.ts +1 -1
  100. package/dist/types/helpers/rectangle.d.ts +4 -0
  101. package/dist/types/helpers/text_helper.d.ts +1 -1
  102. package/dist/types/helpers/viewport_collection.d.ts +2 -6
  103. package/dist/types/index.d.ts +22 -10
  104. package/dist/types/model.d.ts +17 -10
  105. package/dist/types/owl3_compatibility_layer.d.ts +1 -14
  106. package/dist/types/plugins/core/carousel.d.ts +1 -1
  107. package/dist/types/plugins/core/image.d.ts +2 -1
  108. package/dist/types/plugins/core/range.d.ts +4 -2
  109. package/dist/types/plugins/core/squisher.d.ts +6 -2
  110. package/dist/types/plugins/core/tables.d.ts +2 -1
  111. package/dist/types/plugins/core/unsquisher.d.ts +1 -1
  112. package/dist/types/plugins/core_plugin.d.ts +1 -1
  113. package/dist/types/plugins/{ui_stateful → evaluation}/cell_computed_style.d.ts +4 -4
  114. package/dist/types/plugins/{ui_core_views/cell_evaluation/evaluation_plugin.d.ts → evaluation/cell_evaluation/cell_evaluation_plugin.d.ts} +7 -7
  115. package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/compilation_parameters.d.ts +2 -2
  116. package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/evaluator.d.ts +2 -2
  117. package/dist/types/plugins/{ui_core_views → evaluation}/custom_colors.d.ts +5 -5
  118. package/dist/types/plugins/{ui_core_views → evaluation}/dynamic_tables.d.ts +4 -4
  119. package/dist/types/plugins/{ui_feature → evaluation}/dynamic_translate.d.ts +2 -2
  120. package/dist/types/plugins/evaluation/evaluation_chart.d.ts +27 -0
  121. package/dist/types/plugins/{ui_core_views → evaluation}/evaluation_conditional_format.d.ts +4 -4
  122. package/dist/types/plugins/{ui_core_views → evaluation}/evaluation_data_validation.d.ts +4 -4
  123. package/dist/types/plugins/{ui_stateful → evaluation}/filter_evaluation.d.ts +5 -5
  124. package/dist/types/plugins/{ui_core_views → evaluation}/fingerprint.d.ts +2 -2
  125. package/dist/types/plugins/evaluation/formula_tracker.d.ts +8 -0
  126. package/dist/types/plugins/evaluation/geo_loader.d.ts +13 -0
  127. package/dist/types/plugins/{ui_core_views → evaluation}/header_sizes_ui.d.ts +5 -5
  128. package/dist/types/plugins/{ui_stateful/header_visibility_ui.d.ts → evaluation/header_visibility_evaluation.d.ts} +2 -2
  129. package/dist/types/plugins/evaluation/pivot_presence_plugin.d.ts +12 -0
  130. package/dist/types/plugins/{ui_core_views → evaluation}/pivot_ui.d.ts +6 -6
  131. package/dist/types/plugins/evaluation/subtotal_evaluation.d.ts +5 -0
  132. package/dist/types/plugins/{ui_stateful → evaluation}/table_computed_style.d.ts +7 -7
  133. package/dist/types/plugins/evaluation_plugin.d.ts +31 -0
  134. package/dist/types/plugins/plugin_registries.d.ts +11 -5
  135. package/dist/types/plugins/ui_feature/chart_ui.d.ts +6 -0
  136. package/dist/types/plugins/ui_feature/color_theme.d.ts +0 -3
  137. package/dist/types/plugins/ui_feature/geo_features.d.ts +1 -6
  138. package/dist/types/plugins/ui_plugin.d.ts +1 -4
  139. package/dist/types/plugins/{ui_core_views → ui_stateful}/cell_icon_plugin.d.ts +2 -2
  140. package/dist/types/registries/chart_data_source_registry.d.ts +4 -5
  141. package/dist/types/registries/chart_registry.d.ts +5 -5
  142. package/dist/types/registries/criterion_registry.d.ts +4 -4
  143. package/dist/types/registries/evaluation_registry.d.ts +2 -2
  144. package/dist/types/registries/figures_registry.d.ts +6 -2
  145. package/dist/types/stores/cell_hover_overlay_store.d.ts +15 -0
  146. package/dist/types/stores/chart_drag_store.d.ts +10 -0
  147. package/dist/types/{plugins/ui_stateful/clipboard.d.ts → stores/clipboard_store.d.ts} +11 -11
  148. package/dist/types/stores/grid_renderer_store.d.ts +3 -2
  149. package/dist/types/stores/main_viewport_store.d.ts +3 -0
  150. package/dist/types/stores/viewports_store.d.ts +3 -6
  151. package/dist/types/stores/zoom_store.d.ts +27 -0
  152. package/dist/types/types/chart/chart.d.ts +3 -1
  153. package/dist/types/types/chart/chart_suggestion.d.ts +137 -0
  154. package/dist/types/types/chart/scorecard_chart.d.ts +3 -4
  155. package/dist/types/types/collaborative/transport_service.d.ts +4 -1
  156. package/dist/types/types/commands.d.ts +39 -19
  157. package/dist/types/types/functions.d.ts +2 -2
  158. package/dist/types/types/getters.d.ts +102 -21
  159. package/dist/types/types/model.d.ts +2 -4
  160. package/dist/types/types/rendering.d.ts +20 -1
  161. package/package.json +6 -5
  162. package/dist/types/plugins/core_view_plugin.d.ts +0 -29
  163. package/dist/types/plugins/ui_core_views/evaluation_chart.d.ts +0 -26
  164. package/dist/types/plugins/ui_core_views/formula_tracker.d.ts +0 -8
  165. package/dist/types/plugins/ui_feature/pivot_presence_plugin.d.ts +0 -11
  166. package/dist/types/plugins/ui_feature/subtotal_evaluation.d.ts +0 -5
  167. package/dist/types/types/core_getters.d.ts +0 -77
  168. /package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/binary_grid.d.ts +0 -0
  169. /package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/formula_dependency_graph.d.ts +0 -0
  170. /package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/interval_tree.d.ts +0 -0
  171. /package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/position_set.d.ts +0 -0
  172. /package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/r_tree.d.ts +0 -0
  173. /package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/range_set.d.ts +0 -0
  174. /package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/spreading_relation.d.ts +0 -0
  175. /package/dist/types/plugins/{ui_core_views → evaluation}/cell_evaluation/zone_set.d.ts +0 -0
@@ -99,6 +99,7 @@ import { HighlightStore } from "./stores/highlight_store";
99
99
  import { NotificationStore } from "./stores/notification_store";
100
100
  import { RendererStore } from "./stores/renderer_store";
101
101
  import { SpreadsheetStore } from "./stores/spreadsheet_store";
102
+ import { ZoomStore } from "./stores/zoom_store";
102
103
  import { schemeToColorScale } from "./types/chart/chart";
103
104
  import { AddFunctionDescription } from "./types/functions";
104
105
  import { isMatrix } from "./types/misc";
@@ -123,13 +124,13 @@ export { findCellInNewZone } from "./helpers/zones";
123
124
  export { load } from "./migrations/data";
124
125
  export { Model } from "./model";
125
126
  export { CorePlugin } from "./plugins/core_plugin";
126
- export { CoreViewPlugin } from "./plugins/core_view_plugin";
127
+ export { EvaluationPlugin } from "./plugins/evaluation_plugin";
127
128
  export { UIPlugin } from "./plugins/ui_plugin";
128
129
  export { Registry } from "./registries/registry";
129
130
  export { setTranslationMethod } from "./translation";
130
131
  export type { Client } from "./types/collaborative/session";
131
132
  export type { ClientJoinedMessage, ClientLeftMessage, ClientMovedMessage, CollaborationMessage, RemoteRevisionMessage, RevisionRedoneMessage, RevisionUndoneMessage, TransportService, } from "./types/collaborative/transport_service";
132
- export { canExecuteInReadonly, CommandResult, coreTypes, DispatchResult, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, isCoreCommand, isSheetDependent, lockedSheetAllowedCommands, readonlyAllowedCommands, } from "./types/commands";
133
+ export { canExecuteInReadonly, CommandResult, coreTypes, dispatcheableEvaluationCommandTypes, DispatchResult, evaluationCommandTypes, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, isCoreCommand, isSheetDependent, lockedSheetAllowedCommands, readonlyAllowedCommands, } from "./types/commands";
133
134
  export type { CancelledReason } from "./types/commands";
134
135
  export { CellErrorType, EvaluationError } from "./types/errors";
135
136
  export { addRenderingLayer } from "./types/rendering";
@@ -151,11 +152,11 @@ export declare const registries: {
151
152
  colMenuRegistry: import("./registries/menu_items_registry").MenuItemRegistry;
152
153
  errorTypes: Set<string>;
153
154
  functionRegistry: import(".").FunctionRegistry;
154
- featurePluginRegistry: import(".").Registry<import("./plugins/ui_plugin").UIPluginConstructor>;
155
+ featurePluginRegistry: import("./plugins/plugin_registries").PluginRegistry<import("./plugins/ui_plugin").UIPluginConstructor>;
155
156
  iconsOnCellRegistry: import(".").Registry<(getters: import(".").Getters, position: import(".").CellPosition) => import("./registries/icons_on_cell_registry").GridIcon | undefined>;
156
- statefulUIPluginRegistry: import(".").Registry<import("./plugins/ui_plugin").UIPluginConstructor>;
157
- coreViewsPluginRegistry: import(".").Registry<import("./plugins/core_view_plugin").CoreViewPluginConstructor>;
158
- corePluginRegistry: import(".").Registry<import("./plugins/core_plugin").CorePluginConstructor>;
157
+ statefulUIPluginRegistry: import("./plugins/plugin_registries").PluginRegistry<import("./plugins/ui_plugin").UIPluginConstructor>;
158
+ evaluationPluginRegistry: import("./plugins/plugin_registries").PluginRegistry<import("./plugins/evaluation_plugin").EvaluationPluginConstructor>;
159
+ corePluginRegistry: import("./plugins/plugin_registries").PluginRegistry<import("./plugins/core_plugin").CorePluginConstructor>;
159
160
  rowMenuRegistry: import("./registries/menu_items_registry").MenuItemRegistry;
160
161
  sidePanelRegistry: import(".").Registry<import("./registries/side_panel_registry").SidePanelContent>;
161
162
  figureRegistry: import(".").Registry<import("./registries/figures_registry").FigureContent>;
@@ -206,7 +207,7 @@ export declare const registries: {
206
207
  register: (chart: import("./types/chart/chartjs").GlobalChart) => void;
207
208
  unregister: (chart: import("./types/chart/chartjs").GlobalChart) => void;
208
209
  }>;
209
- onIterationEndEvaluationRegistry: import(".").Registry<(getters: import(".").Getters) => void>;
210
+ onIterationEndEvaluationRegistry: import(".").Registry<(getters: import(".").EvaluationGetters) => void>;
210
211
  specificRangeTransformRegistry: {
211
212
  add<C extends import(".").CoreCommand>(cmdType: C["type"], fn: (cmd: C, rangeAdapters: import(".").RangeAdapterFunctions) => C): /*elided*/ any;
212
213
  replace<C extends import(".").CoreCommand>(cmdType: C["type"], fn: (cmd: C, rangeAdapters: import(".").RangeAdapterFunctions) => C): /*elided*/ any;
@@ -220,6 +221,7 @@ export declare const registries: {
220
221
  remove(key: string): void;
221
222
  };
222
223
  unusedDataSourceRegistry: import(".").Registry<import("./registries/data_source_registry").DataSourceType>;
224
+ NonSquishableFunctionRegistry: import(".").Registry<string>;
223
225
  };
224
226
  /** Registries Population */
225
227
  import "./clipboard_handlers/clipboard_handler_registrations";
@@ -233,7 +235,9 @@ import { AutofillStore } from "./components/autofill/autofill_store";
233
235
  import { TableAutofillStore } from "./components/autofill/table_autofill_store";
234
236
  import { Composer } from "./components/composer/composer/composer";
235
237
  import { StandaloneComposer } from "./components/composer/standalone_composer/standalone_composer";
236
- import { isMobileOS } from "./components/helpers/dom_helpers";
238
+ import { CarouselFigure } from "./components/figures/figure_carousel/figure_carousel";
239
+ import { getBoundingRectWithMargins, hasInteractiveElementInEventTree, isMobileOS } from "./components/helpers/dom_helpers";
240
+ import { PopoverContainerPlugin } from "./components/popover/popover_container_owl_plugin";
237
241
  import { Select } from "./components/select/select";
238
242
  import { ChartRangeDataSourceComponent } from "./components/side_panel/chart/building_blocks/range_data_source/range_data_source";
239
243
  import { CalendarButton } from "./components/side_panel/criterion_form/calendar_button/calendar_button";
@@ -247,6 +251,7 @@ import { getFirstPivotFunction, getNumberOfPivotFunctions } from "./helpers/pivo
247
251
  import { domainToColRowDomain } from "./helpers/pivot/pivot_domain_helpers";
248
252
  import { drawHighlight } from "./helpers/rendering";
249
253
  import { fuzzyLookup } from "./helpers/search";
254
+ import { ClipboardStore } from "./stores/clipboard_store";
250
255
  import { ViewportsStore } from "./stores/viewports_store";
251
256
  export declare const helpers: {
252
257
  arg: typeof arg;
@@ -329,6 +334,8 @@ export declare const helpers: {
329
334
  createComputeFunction: typeof createComputeFunction;
330
335
  isMobileOS: typeof isMobileOS;
331
336
  drawHighlight: typeof drawHighlight;
337
+ getBoundingRectWithMargins: typeof getBoundingRectWithMargins;
338
+ hasInteractiveElementInEventTree: typeof hasInteractiveElementInEventTree;
332
339
  };
333
340
  export declare const links: {
334
341
  isMarkdownLink: typeof isMarkdownLink;
@@ -401,6 +408,7 @@ export declare const components: {
401
408
  Composer: typeof Composer;
402
409
  CalendarButton: typeof CalendarButton;
403
410
  Spreadsheet: typeof Spreadsheet;
411
+ CarouselFigure: typeof CarouselFigure;
404
412
  };
405
413
  export declare const hooks: {
406
414
  useDragAndDropListItems: typeof useDragAndDropListItems;
@@ -409,7 +417,6 @@ export declare const hooks: {
409
417
  };
410
418
  export declare const compatibility: {
411
419
  Component: any;
412
- useExternalListener: any;
413
420
  EnvPlugin: any;
414
421
  App: any;
415
422
  };
@@ -438,11 +445,16 @@ export declare const stores: {
438
445
  ClientFocusStore: typeof ClientFocusStore;
439
446
  GridRenderer: typeof GridRenderer;
440
447
  ViewportsStore: typeof ViewportsStore;
448
+ ClipboardStore: typeof ClipboardStore;
449
+ ZoomStore: typeof ZoomStore;
441
450
  globalStores: import(".").Registry<import(".").StoreConstructor<SpreadsheetStore, any[]>>;
442
451
  };
452
+ export declare const owlPlugins: {
453
+ PopoverContainerPlugin: typeof PopoverContainerPlugin;
454
+ };
443
455
  export { getCaretDownSvg, getCaretUpSvg } from "./components/icons/icons";
444
456
  export { createAutocompleteArgumentsProvider } from "./functions/autocomplete_arguments_provider";
445
- export type { FunctionRegistry } from "./functions/function_registry";
457
+ export type { FunctionRegistry, NonSquishableFunctionRegistry, } from "./functions/function_registry";
446
458
  export { categories } from "./functions/function_registry_population";
447
459
  export type { StoreConstructor, StoreParams } from "./types/store_engine";
448
460
  export declare function addFunction(functionName: string, functionDescription: AddFunctionDescription): {
@@ -32,7 +32,6 @@ import { XLSXExport } from "./types/xlsx";
32
32
  * programmatically a spreadsheet.
33
33
  */
34
34
  export declare class Model extends EventBus<any> implements CommandDispatcher {
35
- private corePlugins;
36
35
  private statefulUIPlugins;
37
36
  private range;
38
37
  private formulasPlugin;
@@ -59,7 +58,7 @@ export declare class Model extends EventBus<any> implements CommandDispatcher {
59
58
  */
60
59
  readonly config: ModelConfig;
61
60
  private corePluginConfig;
62
- private coreViewPluginConfig;
61
+ private evaluationPluginConfig;
63
62
  private uiPluginConfig;
64
63
  private state;
65
64
  readonly selection: SelectionStreamProcessor;
@@ -71,24 +70,30 @@ export declare class Model extends EventBus<any> implements CommandDispatcher {
71
70
  getters: Getters;
72
71
  /**
73
72
  * Getters that are accessible from the core plugins. It's a subset of `getters`,
74
- * without the UI getters
73
+ * without the UI getters and without the evaluation getters
75
74
  */
76
75
  private coreGetters;
76
+ /**
77
+ * Getters that are accessible from the evaluation plugins. It's a subset of
78
+ * `getters`, without the UI getters.
79
+ */
80
+ private evaluationGetters;
77
81
  private readonly handlers;
78
82
  private readonly uiHandlers;
79
83
  private readonly coreHandlers;
84
+ private readonly evaluationHandlers;
80
85
  constructor(data?: any, config?: Partial<ModelConfig>, stateUpdateMessages?: StateUpdateMessage[], verboseImport?: boolean);
81
86
  joinSession(): void;
82
87
  leaveSession({ shouldSnapshot }?: {
83
88
  shouldSnapshot?: boolean;
84
89
  }): Promise<void>;
90
+ private registerCoreGetter;
91
+ private registerEvaluationGetter;
92
+ private registerUiGetter;
85
93
  private setupUiPlugin;
86
- private setupCoreViewPlugin;
94
+ private setupEvaluationPlugin;
87
95
  /**
88
96
  * Initialize and properly configure a plugin.
89
- *
90
- * This method is private for now, but if the need arise, there is no deep
91
- * reason why the model could not add dynamically a plugin while it is running.
92
97
  */
93
98
  private setupCorePlugin;
94
99
  private onRemoteRevisionReceived;
@@ -96,9 +101,9 @@ export declare class Model extends EventBus<any> implements CommandDispatcher {
96
101
  private setupSessionEvents;
97
102
  private setupConfig;
98
103
  private setupExternalConfig;
99
- private setupCorePluginConfig;
100
- private setupCoreViewPluginConfig;
101
- private setupUiPluginConfig;
104
+ private getCorePluginConfig;
105
+ private getEvaluationPluginConfig;
106
+ private getUiPluginConfig;
102
107
  /**
103
108
  * Check if the given command is allowed by all the plugins and the history.
104
109
  */
@@ -107,6 +112,7 @@ export declare class Model extends EventBus<any> implements CommandDispatcher {
107
112
  private checkDispatchAllowedRemoteCommand;
108
113
  private checkDispatchAllowedCoreCommand;
109
114
  private checkDispatchAllowedLocalCommand;
115
+ private canHandle;
110
116
  private finalize;
111
117
  /**
112
118
  * Check if a command can be dispatched, and returns a DispatchResult object with the possible
@@ -133,6 +139,7 @@ export declare class Model extends EventBus<any> implements CommandDispatcher {
133
139
  * A command dispatched from this function is not added to the history.
134
140
  */
135
141
  private dispatchFromCorePlugin;
142
+ private dispatchFromEvaluationPlugin;
136
143
  /**
137
144
  * Dispatch the given command to the given handlers.
138
145
  * It will call `beforeHandle` and `handle`
@@ -11,7 +11,6 @@
11
11
  *
12
12
  * 1. Update template directives:
13
13
  * - replace `t-portal` → `t-custom-portal`
14
- * - replace `t-model` → `t-custom-model`
15
14
  *
16
15
  * 2. Load this file immediately after Owl 3.
17
16
  *
@@ -26,7 +25,6 @@
26
25
  * Gradually remove the compatibility layer by migrating to native Owl 3:
27
26
  *
28
27
  * - replace `t-custom-portal` with proper Owl 3 portal usage
29
- * - replace `t-custom-model` with `t-model` + signals
30
28
  * - convert `useLayoutEffect` back to `useEffect` where appropriate
31
29
  *
32
30
  * The end goal is to eliminate all compatibility shims.
@@ -38,14 +36,11 @@ export interface ComponentConstructor<Env = any> {
38
36
  template: string;
39
37
  }
40
38
  declare class _Component<Env = any> extends OwlComponent {
41
- static template: string;
42
39
  env: Env;
43
40
  constructor(node: any);
44
41
  setup(): void;
45
- render(deep?: boolean): void;
46
42
  }
47
43
  declare function _useComponent(): any;
48
- declare function _useExternalListener(target: any, eventName: any, handler: any, eventParams?: any): void;
49
44
  declare function _useLayoutEffect(effect: any, computeDependencies?: () => any): void;
50
45
  declare class _EnvPlugin extends Plugin {
51
46
  static id: string;
@@ -53,8 +48,6 @@ declare class _EnvPlugin extends Plugin {
53
48
  }
54
49
  declare function _useEnv(): any;
55
50
  declare function _useSubEnv(extension: any): void;
56
- declare function _useChildSubEnv(extension: any): void;
57
- declare function _useChildEnv(): any;
58
51
  declare class _App extends OwlApp {
59
52
  /**
60
53
  * @param {any} config
@@ -64,22 +57,16 @@ declare class _App extends OwlApp {
64
57
  }
65
58
  declare const Component: typeof _Component;
66
59
  declare const useComponent: typeof _useComponent;
67
- declare const useExternalListener: typeof _useExternalListener;
68
60
  declare const useLayoutEffect: typeof _useLayoutEffect;
69
61
  declare const EnvPlugin: typeof _EnvPlugin;
70
62
  declare const useEnv: typeof _useEnv;
71
63
  declare const useSubEnv: typeof _useSubEnv;
72
- declare const useChildEnv: typeof _useChildEnv;
73
- declare const useChildSubEnv: typeof _useChildSubEnv;
74
64
  declare const App: typeof _App;
75
- export { App, Component, EnvPlugin, useChildEnv, useChildSubEnv, useComponent, useEnv, useExternalListener, useLayoutEffect, useSubEnv, };
65
+ export { App, Component, EnvPlugin, useComponent, useEnv, useLayoutEffect, useSubEnv };
76
66
  export type Component<Env = any> = _Component<Env>;
77
67
  export type useComponent = () => any;
78
- export type useExternalListener = (target: any, eventName: any, handler: any, eventParams?: any) => void;
79
68
  export type useLayoutEffect = (effect: any, computeDependencies: () => any) => void;
80
69
  export type EnvPlugin = _EnvPlugin;
81
70
  export type useEnv = () => any;
82
71
  export type useSubEnv = () => any;
83
- export type useChildEnv = () => any;
84
- export type useChildSubEnv = () => any;
85
72
  export type App = _App;
@@ -10,7 +10,7 @@ export declare class CarouselPlugin extends CorePlugin<CarouselState> implements
10
10
  static getters: readonly ["getCarousel", "doesCarouselExist", "carouselToCarouselData"];
11
11
  readonly carousels: Record<UID, Record<UID, Carousel | undefined> | undefined>;
12
12
  adaptRanges(rangeAdapterFunctions: RangeAdapterFunctions): void;
13
- allowDispatch(cmd: CoreCommand): CommandResult.Success | CommandResult.InvalidRange | CommandResult.InvalidFigureId | CommandResult.DuplicatedFigureId;
13
+ allowDispatch(cmd: CoreCommand): CommandResult.Success | CommandResult.InvalidRange | CommandResult.InvalidFigureId | CommandResult.DuplicatedFigureId | CommandResult.ChartDoesNotExist;
14
14
  handle(cmd: CoreCommand): void;
15
15
  doesCarouselExist(figureId: UID): boolean;
16
16
  getCarousel(figureId: UID): Carousel;
@@ -9,7 +9,7 @@ interface ImageState {
9
9
  readonly images: Record<UID, Record<UID, Image | undefined> | undefined>;
10
10
  }
11
11
  export declare class ImagePlugin extends CorePlugin<ImageState> implements ImageState {
12
- static getters: readonly ["getImage", "getImagePath", "getImageSize"];
12
+ static getters: readonly ["getImage", "getImagePath", "getImageSize", "getImageFile"];
13
13
  readonly fileStore?: FileStore;
14
14
  readonly images: Record<UID, Record<UID, Image | undefined> | undefined>;
15
15
  /**
@@ -22,6 +22,7 @@ export declare class ImagePlugin extends CorePlugin<ImageState> implements Image
22
22
  getImage(figureId: UID): Image;
23
23
  getImagePath(figureId: UID): string;
24
24
  getImageSize(figureId: UID): FigureSize;
25
+ getImageFile(figureId: UID): Promise<Blob | File | undefined>;
25
26
  private addFigure;
26
27
  import(data: WorkbookData): void;
27
28
  export(data: WorkbookData): void;
@@ -1,5 +1,5 @@
1
1
  import { Command, CommandHandler, CommandResult, CoreCommand } from "../../types/commands";
2
- import { CoreGetters } from "../../types/core_getters";
2
+ import { CoreGetters } from "../../types/getters";
3
3
  import { Dimension, RangeProvider, UID, UnboundedZone, Zone } from "../../types/misc";
4
4
  import { Range, RangeData, RangeStringOptions } from "../../types/range";
5
5
  export declare class RangeAdapterPlugin implements CommandHandler<CoreCommand> {
@@ -7,7 +7,7 @@ export declare class RangeAdapterPlugin implements CommandHandler<CoreCommand> {
7
7
  private providers;
8
8
  private isAdaptingRanges;
9
9
  constructor(getters: CoreGetters);
10
- static getters: readonly ["copyFormulaStringForSheet", "extendRange", "getRangeString", "getRangeFromSheetXC", "createAdaptedRanges", "getRangeData", "getRangeDataFromXc", "getRangeDataFromZone", "getRangeFromRangeData", "getRangeFromZone", "getRangesUnion", "recomputeRanges", "isRangeValid", "removeRangesSheetPrefix"];
10
+ static getters: readonly ["copyFormulaStringForSheet", "extendRange", "getRangeString", "getRangeFromSheetXC", "clipRangesToSheet", "clipRangeToSheet", "createAdaptedRanges", "getRangeData", "getRangeDataFromXc", "getRangeDataFromZone", "getRangeFromRangeData", "getRangeFromZone", "getRangesUnion", "recomputeRanges", "isRangeValid", "removeRangesSheetPrefix"];
11
11
  allowDispatch(cmd: CoreCommand): CommandResult;
12
12
  beforeHandle(command: Command): void;
13
13
  handle(cmd: CoreCommand): void;
@@ -22,6 +22,8 @@ export declare class RangeAdapterPlugin implements CommandHandler<CoreCommand> {
22
22
  * all ranges
23
23
  */
24
24
  addRangeProvider(provider: RangeProvider["adaptRanges"]): void;
25
+ clipRangeToSheet(range: Range): Range | undefined;
26
+ clipRangesToSheet(ranges: Range[]): Range[];
25
27
  createAdaptedRanges(ranges: Range[], offsetX: number, offsetY: number, sheetId: UID): Range[];
26
28
  /**
27
29
  * Remove the sheet name prefix if a range is part of the given sheet.
@@ -1,7 +1,7 @@
1
1
  import { CompiledFormula } from "../../formulas/compiler";
2
2
  import { Cell } from "../../types/cells";
3
3
  import { UpdateCellCommand } from "../../types/commands";
4
- import { CoreGetters } from "../../types/core_getters";
4
+ import { CoreGetters } from "../../types/getters";
5
5
  import { UID } from "../../types/misc";
6
6
  /**
7
7
  * Example of squishing:
@@ -32,6 +32,7 @@ export declare class Squisher {
32
32
  private baseFormulaWasTransformed;
33
33
  private rangeToStringOptions;
34
34
  private baseNumber;
35
+ private baseNumberFormat;
35
36
  constructor(getters: CoreGetters);
36
37
  /** Build the result object based on a transformation. Joins the numbers into a single string, tries to do the same
37
38
  * with references (unless they contain a sheet name that contains the separator). */
@@ -40,6 +41,8 @@ export declare class Squisher {
40
41
  resetBaseTo(formula: CompiledFormula): void;
41
42
  /** Reset the base formula to undefined, resetting all offsets */
42
43
  resetBaseFormula(): void;
44
+ /** Reset the base number literal chain, so the next literal number cannot be squished as an offset of it */
45
+ resetBaseNumber(): void;
43
46
  /**
44
47
  * Takes a cell and squish their formulas against the previous one (in the previous call).
45
48
  * We should call this method for each cell in the sheet, in order from top to bottom, then from left to right (all cells of a columns, for each columns left to right).
@@ -47,7 +50,8 @@ export declare class Squisher {
47
50
  * The result of this method is:
48
51
  * - if the cell is not a formula, returns the content as is and resets the base formula
49
52
  * - if the cell is a formula:
50
- * - if there is no previous formula, or the normalized formula is different from the previous one, resets the base formula to this one and returns the full formula string
53
+ * - if there is no previous formula, or the normalized formula is different from the previous one or it contains blacklisted functions (see NonSquishableFunctionRegistry),
54
+ * resets the base formula to this one and returns the full formula string
51
55
  * - else, compares the literal values and range dependencies to the previous formula, and for each parameter:
52
56
  * - for numbers: returns a relative change (+N or -N) if possible, else the full number or "=" if unchanged
53
57
  * - for strings: returns the full string if changed, else "="
@@ -8,7 +8,7 @@ interface TableState {
8
8
  nextTableId: number;
9
9
  }
10
10
  export declare class TablePlugin extends CorePlugin<TableState> implements TableState {
11
- static getters: readonly ["getCoreTable", "getCoreTables", "getCoreTableMatchingTopLeft"];
11
+ static getters: readonly ["getCoreTable", "getCoreTables", "getCoreTableMatchingTopLeft", "getCoreTableById"];
12
12
  readonly tables: Record<UID, Record<TableId, CoreTable | undefined>>;
13
13
  readonly nextTableId: number;
14
14
  adaptRanges({ applyChange }: RangeAdapterFunctions): void;
@@ -16,6 +16,7 @@ export declare class TablePlugin extends CorePlugin<TableState> implements Table
16
16
  handle(cmd: CoreCommand): void;
17
17
  getCoreTables(sheetId: UID): CoreTable[];
18
18
  getCoreTable({ sheetId, col, row }: CellPosition): CoreTable | undefined;
19
+ getCoreTableById(sheetId: UID, tableId: UID): CoreTable | undefined;
19
20
  private getTablesOverlappingZones;
20
21
  /** Extend a table down one row */
21
22
  private extendTableDown;
@@ -1,7 +1,7 @@
1
1
  import { SquishedCoreCommand } from "../../collaborative/command_squisher";
2
2
  import { CompiledFormula } from "../../formulas/compiler";
3
3
  import { CoreCommand } from "../../types/commands";
4
- import { CoreGetters } from "../../types/core_getters";
4
+ import { CoreGetters } from "../../types/getters";
5
5
  import { Position, UID } from "../../types/misc";
6
6
  import { SquishedContent } from "./squisher";
7
7
  export declare class Unsquisher {
@@ -1,7 +1,7 @@
1
1
  import { CompiledFormula } from "../formulas/compiler";
2
2
  import { StateObserver } from "../state_observer";
3
3
  import { CoreCommand, CoreCommandDispatcher } from "../types/commands";
4
- import { CoreGetters } from "../types/core_getters";
4
+ import { CoreGetters } from "../types/getters";
5
5
  import { FormulaProvider, RangeAdapterFunctions, RangeProvider } from "../types/misc";
6
6
  import { ModelConfig } from "../types/model";
7
7
  import { WorkbookData } from "../types/workbook_data";
@@ -1,12 +1,12 @@
1
- import { Command } from "../../types/commands";
1
+ import { EvaluationCommand } from "../../types/commands";
2
2
  import { Border, CellPosition, Style } from "../../types/misc";
3
3
  import { ExcelWorkbookData } from "../../types/workbook_data";
4
- import { UIPlugin } from "../ui_plugin";
5
- export declare class CellComputedStylePlugin extends UIPlugin {
4
+ import { EvaluationPlugin } from "../evaluation_plugin";
5
+ export declare class CellComputedStylePlugin extends EvaluationPlugin {
6
6
  static getters: readonly ["getCellComputedBorder", "getCellComputedStyle"];
7
7
  private styles;
8
8
  private borders;
9
- handle(cmd: Command): void;
9
+ handle(cmd: EvaluationCommand): void;
10
10
  getCellComputedBorder(position: CellPosition): Border | null;
11
11
  getCellComputedStyle(position: CellPosition): Style;
12
12
  private computeCellStyle;
@@ -1,22 +1,22 @@
1
1
  import { CompiledFormula } from "../../../formulas/compiler";
2
2
  import { CellValue, EvaluatedCell, FormulaCell } from "../../../types/cells";
3
- import { Command, CommandResult } from "../../../types/commands";
3
+ import { CommandResult, EvaluationCommand } from "../../../types/commands";
4
4
  import { PerfProfile } from "../../../types/functions";
5
5
  import { CellPosition, FunctionResultObject, GetSymbolValue, Matrix, UID, Zone } from "../../../types/misc";
6
6
  import { Range } from "../../../types/range";
7
7
  import { ExcelWorkbookData } from "../../../types/workbook_data";
8
- import { CoreViewPlugin, CoreViewPluginConfig } from "../../core_view_plugin";
9
- export declare class EvaluationPlugin extends CoreViewPlugin {
8
+ import { EvaluationPlugin, EvaluationPluginConfig } from "../../evaluation_plugin";
9
+ export declare class CellEvaluationPlugin extends EvaluationPlugin {
10
10
  static getters: readonly ["evaluateFormula", "evaluateFormulaResult", "evaluateCompiledFormula", "getCorrespondingFormulaCell", "getVisibleRangeValues", "getEvaluatedCell", "getEvaluatedCells", "getEvaluatedCellsInZone", "getEvaluatedCellsPositions", "getSpreadZone", "getArrayFormulaSpreadingOn", "isArrayFormulaSpillBlocked", "isEmpty", "getPerfProfile", "isAutomaticEvaluationEnabled"];
11
11
  private shouldRebuildDependenciesGraph;
12
12
  private forceEvaluation;
13
13
  private automaticEvaluation;
14
14
  private evaluator;
15
15
  private positionsToUpdate;
16
- constructor(config: CoreViewPluginConfig);
17
- allowDispatch(cmd: Command): CommandResult.Success | CommandResult.NoChangeInAutomaticEvaluation;
18
- beforeHandle(cmd: Command): void;
19
- handle(cmd: Command): void;
16
+ constructor(config: EvaluationPluginConfig);
17
+ allowDispatch(cmd: EvaluationCommand): CommandResult.Success | CommandResult.NoChangeInAutomaticEvaluation;
18
+ beforeHandle(cmd: EvaluationCommand): void;
19
+ handle(cmd: EvaluationCommand): void;
20
20
  finalize(): void;
21
21
  /**
22
22
  * Returns whether automatic evaluation is enabled.
@@ -1,6 +1,6 @@
1
1
  import { EvaluatedCell } from "../../../types/cells";
2
2
  import { EvalContext } from "../../../types/functions";
3
- import { Getters } from "../../../types/getters";
3
+ import { EvaluationGetters } from "../../../types/getters";
4
4
  import { CellPosition, EnsureRange, ReferenceDenormalizer } from "../../../types/misc";
5
5
  import { ModelConfig } from "../../../types/model";
6
6
  export type CompilationParameters = {
@@ -14,4 +14,4 @@ export type CompilationParameters = {
14
14
  * - a range function to convert any reference to a proper value array
15
15
  * - an evaluation context
16
16
  */
17
- export declare function buildCompilationParameters(context: ModelConfig["custom"], getters: Getters, computeCell: (position: CellPosition) => EvaluatedCell): CompilationParameters;
17
+ export declare function buildCompilationParameters(context: ModelConfig["custom"], getters: EvaluationGetters, computeCell: (position: CellPosition) => EvaluatedCell): CompilationParameters;
@@ -2,7 +2,7 @@ import { CompiledFormula } from "../../../formulas/compiler";
2
2
  import { EvaluatedCell } from "../../../types/cells";
3
3
  import { CompilationParameters } from "./compilation_parameters";
4
4
  import { PerfProfile } from "../../../types/functions";
5
- import { Getters } from "../../../types/getters";
5
+ import { EvaluationGetters } from "../../../types/getters";
6
6
  import { CellPosition, FunctionResultObject, GetSymbolValue, Matrix, UID, Zone } from "../../../types/misc";
7
7
  import { ModelConfig } from "../../../types/model";
8
8
  export declare class Evaluator {
@@ -14,7 +14,7 @@ export declare class Evaluator {
14
14
  private blockedArrayFormulas;
15
15
  private spreadingRelations;
16
16
  private perfProfile;
17
- constructor(context: ModelConfig["custom"], getters: Getters);
17
+ constructor(context: ModelConfig["custom"], getters: EvaluationGetters);
18
18
  getPerfProfile(): PerfProfile | undefined;
19
19
  getEvaluatedCell(position: CellPosition): EvaluatedCell;
20
20
  getSpreadZone(position: CellPosition, options?: {
@@ -1,6 +1,6 @@
1
- import { Command } from "../../types/commands";
1
+ import { EvaluationCommand } from "../../types/commands";
2
2
  import { Color, Immutable } from "../../types/misc";
3
- import { CoreViewPlugin, CoreViewPluginConfig } from "../core_view_plugin";
3
+ import { EvaluationPlugin, EvaluationPluginConfig } from "../evaluation_plugin";
4
4
  interface CustomColorState {
5
5
  readonly customColors: Immutable<Record<Color, true>>;
6
6
  readonly shouldUpdateColors: boolean;
@@ -10,12 +10,12 @@ interface CustomColorState {
10
10
  * This plugins aims to compute and keep to custom colors used in the
11
11
  * current spreadsheet
12
12
  */
13
- export declare class CustomColorsPlugin extends CoreViewPlugin<CustomColorState> {
13
+ export declare class CustomColorsPlugin extends EvaluationPlugin<CustomColorState> {
14
14
  private readonly customColors;
15
15
  private readonly shouldUpdateColors;
16
16
  static getters: readonly ["getCustomColors"];
17
- constructor(config: CoreViewPluginConfig);
18
- handle(cmd: Command): void;
17
+ constructor(config: EvaluationPluginConfig);
18
+ handle(cmd: EvaluationCommand): void;
19
19
  finalize(): void;
20
20
  getCustomColors(): Color[];
21
21
  private computeCustomColors;
@@ -1,12 +1,12 @@
1
- import { Command } from "../../types/commands";
1
+ import { EvaluationCommand } from "../../types/commands";
2
2
  import { CellPosition, FilterId, UID, Zone } from "../../types/misc";
3
3
  import { Filter, Table } from "../../types/table";
4
4
  import { ExcelWorkbookData } from "../../types/workbook_data";
5
- import { CoreViewPlugin } from "../core_view_plugin";
6
- export declare class DynamicTablesPlugin extends CoreViewPlugin {
5
+ import { EvaluationPlugin } from "../evaluation_plugin";
6
+ export declare class DynamicTablesPlugin extends EvaluationPlugin {
7
7
  static getters: readonly ["canCreateDynamicTableOnZones", "doesZonesContainFilter", "getFilter", "getFilters", "getTable", "getTables", "getTablesOverlappingZones", "getFilterId", "getFilterHeaders", "isFilterHeader"];
8
8
  tables: Record<UID, Table[]>;
9
- handle(cmd: Command): void;
9
+ handle(cmd: EvaluationCommand): void;
10
10
  finalize(): void;
11
11
  private computeTables;
12
12
  private getDynamicTables;
@@ -1,4 +1,4 @@
1
- import { UIPlugin } from "../ui_plugin";
1
+ import { EvaluationPlugin } from "../evaluation_plugin";
2
2
  /**
3
3
  * This plugin provides dynamic translation getter. In o-spreadsheet, it has
4
4
  * no implementation, but this plugin can be replaced by another one to provide
@@ -7,7 +7,7 @@ import { UIPlugin } from "../ui_plugin";
7
7
  * For example, in Odoo, the plugin is replaced by a plugin that used the
8
8
  * module namespace to dynamically translate terms.
9
9
  */
10
- export declare class DynamicTranslate extends UIPlugin {
10
+ export declare class DynamicTranslate extends EvaluationPlugin {
11
11
  static getters: readonly ["dynamicTranslate"];
12
12
  dynamicTranslate(term: string): string;
13
13
  }
@@ -0,0 +1,27 @@
1
+ import { ChartRuntime } from "../../types/chart/chart";
2
+ import { EvaluationCommand } from "../../types/commands";
3
+ import { Color, UID } from "../../types/misc";
4
+ import { Range } from "../../types/range";
5
+ import { ColorThemeName } from "../../types/rendering";
6
+ import { ExcelWorkbookData } from "../../types/workbook_data";
7
+ import { EvaluationPlugin } from "../evaluation_plugin";
8
+ interface EvaluationChartStyle {
9
+ background: Color;
10
+ fontColor: Color;
11
+ }
12
+ interface EvaluationChartState {
13
+ charts: Record<UID, Partial<Record<ColorThemeName, ChartRuntime | undefined>>>;
14
+ }
15
+ export declare class EvaluationChartPlugin extends EvaluationPlugin<EvaluationChartState> {
16
+ static getters: readonly ["getStyleOfSingleCellChart", "getChartRuntimeWithTheme"];
17
+ charts: Record<UID, Partial<Record<ColorThemeName, ChartRuntime | undefined>>>;
18
+ handle(cmd: EvaluationCommand): void;
19
+ getChartRuntimeWithTheme(chartId: UID, colorThemeName: ColorThemeName): ChartRuntime;
20
+ /**
21
+ * Get the background and textColor of a chart based on the color of the first cell of the main range of the chart.
22
+ */
23
+ getStyleOfSingleCellChart(chartBackground: Color | undefined, mainRange: Range | undefined, colorThemeName: ColorThemeName): EvaluationChartStyle;
24
+ exportForExcel(data: ExcelWorkbookData): Promise<void>;
25
+ private createRuntimeChart;
26
+ }
27
+ export {};
@@ -1,13 +1,13 @@
1
- import { CoreViewCommand } from "../../types/commands";
1
+ import { EvaluationCommand } from "../../types/commands";
2
2
  import { CellPosition, DataBarFill, Style } from "../../types/misc";
3
- import { CoreViewPlugin } from "../core_view_plugin";
4
- export declare class EvaluationConditionalFormatPlugin extends CoreViewPlugin {
3
+ import { EvaluationPlugin } from "../evaluation_plugin";
4
+ export declare class EvaluationConditionalFormatPlugin extends EvaluationPlugin {
5
5
  static getters: readonly ["getConditionalIcon", "getCellConditionalFormatStyle", "getConditionalDataBar"];
6
6
  private isStale;
7
7
  private computedStyles;
8
8
  private computedIcons;
9
9
  private computedDataBars;
10
- handle(cmd: CoreViewCommand): void;
10
+ handle(cmd: EvaluationCommand): void;
11
11
  finalize(): void;
12
12
  getCellConditionalFormatStyle(position: CellPosition): Style | undefined;
13
13
  getConditionalIcon({ sheetId, col, row }: CellPosition): string | undefined;
@@ -1,9 +1,9 @@
1
1
  import { CellValue } from "../../types/cells";
2
- import { CoreViewCommand } from "../../types/commands";
2
+ import { EvaluationCommand } from "../../types/commands";
3
3
  import { DataValidationCriterionType, DataValidationRule } from "../../types/data_validation";
4
4
  import { GenericCriterion } from "../../types/generic_criterion";
5
5
  import { CellPosition, HeaderIndex, Lazy, Style, UID } from "../../types/misc";
6
- import { CoreViewPlugin } from "../core_view_plugin";
6
+ import { EvaluationPlugin } from "../evaluation_plugin";
7
7
  interface InvalidValidationResult {
8
8
  readonly isValid: false;
9
9
  readonly rule: DataValidationRule;
@@ -16,13 +16,13 @@ type ValidationResult = ValidValidationResult | InvalidValidationResult;
16
16
  type SheetValidationResult = {
17
17
  [col: HeaderIndex]: Array<Lazy<ValidationResult>>;
18
18
  };
19
- export declare class EvaluationDataValidationPlugin extends CoreViewPlugin {
19
+ export declare class EvaluationDataValidationPlugin extends EvaluationPlugin {
20
20
  static getters: readonly ["getDataValidationInvalidCriterionValueMessage", "getInvalidDataValidationMessage", "getValidationResultForCellValue", "getDataValidationRangeValues", "isCellValidCheckbox", "getDataValidationCellStyle", "getDataValidationChipStyle", "isDataValidationInvalid"];
21
21
  validationResults: Record<UID, SheetValidationResult>;
22
22
  criterionPreComputeResult: Record<UID, {
23
23
  [dvRuleId: UID]: unknown;
24
24
  }>;
25
- handle(cmd: CoreViewCommand): void;
25
+ handle(cmd: EvaluationCommand): void;
26
26
  isDataValidationInvalid(cellPosition: CellPosition): boolean;
27
27
  getDataValidationCellStyle(position: CellPosition): Style | undefined;
28
28
  getDataValidationChipStyle(position: CellPosition): Style | undefined;