@odoo/o-spreadsheet 19.5.0-alpha.0 → 19.5.0-alpha.10

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 (177) hide show
  1. package/dist/o_spreadsheet.cjs +54635 -52850
  2. package/dist/o_spreadsheet.css +95 -44
  3. package/dist/o_spreadsheet.esm.js +54380 -52595
  4. package/dist/o_spreadsheet.iife.js +54407 -52622
  5. package/dist/o_spreadsheet.min.iife.js +403 -403
  6. package/dist/o_spreadsheet.xml +290 -167
  7. package/dist/types/actions/action.d.ts +1 -7
  8. package/dist/types/actions/data_actions.d.ts +1 -0
  9. package/dist/types/actions/menu_items_actions.d.ts +2 -0
  10. package/dist/types/clipboard_handlers/default_clipboard.d.ts +1 -1
  11. package/dist/types/collaborative/ot/ot_helpers.d.ts +3 -1
  12. package/dist/types/components/autofill/autofill.d.ts +3 -0
  13. package/dist/types/{plugins/ui_feature/autofill.d.ts → components/autofill/autofill_store.d.ts} +7 -12
  14. package/dist/types/components/autofill/table_autofill_store.d.ts +6 -0
  15. package/dist/types/components/border_editor/border_editor_widget.d.ts +1 -0
  16. package/dist/types/components/clickable_cells_overlay/clickable_cells_overlay.d.ts +20 -0
  17. package/dist/types/components/collaborative_client_tag/collaborative_client_tag.d.ts +2 -0
  18. package/dist/types/components/composer/composer/abstract_composer_store.d.ts +3 -2
  19. package/dist/types/components/composer/composer/composer.d.ts +2 -1
  20. package/dist/types/components/composer/grid_composer/grid_composer.d.ts +1 -0
  21. package/dist/types/components/dashboard/clickable_cell_store.d.ts +1 -0
  22. package/dist/types/components/dashboard/dashboard.d.ts +7 -12
  23. package/dist/types/components/error_tooltip/error_tooltip.d.ts +2 -0
  24. package/dist/types/components/figures/chart/chartJs/chartjs_geo_projection_plugin.d.ts +12 -0
  25. package/dist/types/components/figures/chart/gauge/gauge_chart_component.d.ts +1 -0
  26. package/dist/types/components/figures/chart/scorecard/chart_scorecard.d.ts +3 -0
  27. package/dist/types/components/figures/figure/figure.d.ts +8 -9
  28. package/dist/types/components/figures/figure_carousel/figure_carousel.d.ts +7 -2
  29. package/dist/types/components/figures/figure_chart/figure_chart.d.ts +1 -2
  30. package/dist/types/components/figures/figure_container/figure_container.d.ts +4 -2
  31. package/dist/types/components/figures/figure_image/figure_image.d.ts +1 -2
  32. package/dist/types/components/filters/filter_menu/filter_menu.d.ts +1 -0
  33. package/dist/types/components/grid/grid.d.ts +8 -0
  34. package/dist/types/components/grid_add_rows_footer/grid_add_rows_footer.d.ts +1 -0
  35. package/dist/types/components/grid_overlay/grid_overlay.d.ts +6 -4
  36. package/dist/types/components/grid_popover/grid_popover.d.ts +1 -0
  37. package/dist/types/components/header_group/header_group_container.d.ts +2 -0
  38. package/dist/types/components/headers_overlay/headers_overlay.d.ts +3 -0
  39. package/dist/types/components/headers_overlay/unhide_headers.d.ts +4 -0
  40. package/dist/types/components/helpers/dom_helpers.d.ts +2 -0
  41. package/dist/types/components/helpers/figure_snap_helper.d.ts +3 -3
  42. package/dist/types/components/helpers/wheel_hook.d.ts +1 -1
  43. package/dist/types/components/helpers/zoom.d.ts +1 -5
  44. package/dist/types/components/highlight/border/border.d.ts +2 -0
  45. package/dist/types/components/highlight/corner/corner.d.ts +1 -0
  46. package/dist/types/components/highlight/highlight/highlight.d.ts +3 -0
  47. package/dist/types/components/link/link_display/link_display.d.ts +1 -0
  48. package/dist/types/components/link/link_editor/link_editor.d.ts +1 -0
  49. package/dist/types/components/paint_format_button/paint_format_store.d.ts +1 -1
  50. package/dist/types/components/popover/cell_popover_store.d.ts +2 -1
  51. package/dist/types/components/props_validation.d.ts +7 -7
  52. package/dist/types/components/scrollbar/scrollbar_horizontal.d.ts +3 -0
  53. package/dist/types/components/scrollbar/scrollbar_vertical.d.ts +5 -1
  54. package/dist/types/components/selection_input/selection_input_store.d.ts +1 -1
  55. package/dist/types/components/side_panel/carousel_panel/carousel_panel.d.ts +20 -2
  56. package/dist/types/components/side_panel/chart/building_blocks/chart_title/chart_title.d.ts +1 -0
  57. package/dist/types/components/side_panel/chart/chart_type_picker/chart_type_picker.d.ts +5 -18
  58. package/dist/types/components/side_panel/chart/chart_type_picker_popover/chart_type_picker_popover.d.ts +64 -0
  59. package/dist/types/components/side_panel/chart/common.d.ts +1 -1
  60. package/dist/types/components/side_panel/conditional_formatting/cf_editor/cell_is_rule_editor.d.ts +1 -1
  61. package/dist/types/components/side_panel/conditional_formatting/cf_editor/color_scale_rule_editor.d.ts +1 -1
  62. package/dist/types/components/side_panel/conditional_formatting/cf_editor/color_scale_rule_editor_threshold.d.ts +1 -1
  63. package/dist/types/components/side_panel/conditional_formatting/cf_editor/data_bar_rule_editor.d.ts +1 -1
  64. package/dist/types/components/side_panel/conditional_formatting/cf_editor/icon_set_rule_editor.d.ts +1 -1
  65. package/dist/types/components/side_panel/criterion_form/calendar_button/calendar_button.d.ts +13 -0
  66. package/dist/types/components/side_panel/criterion_form/date_criterion/date_criterion.d.ts +2 -0
  67. package/dist/types/components/side_panel/criterion_form/double_input_criterion/double_input_criterion.d.ts +3 -0
  68. package/dist/types/components/side_panel/data_sources_cleanup/data_sources_cleanup.d.ts +28 -0
  69. package/dist/types/components/side_panel/data_sources_cleanup/data_sources_cleanup_store.d.ts +13 -0
  70. package/dist/types/components/side_panel/find_and_replace/find_and_replace_store.d.ts +1 -0
  71. package/dist/types/components/side_panel/pivot/pivot_layout_configurator/pivot_layout_configurator.d.ts +0 -2
  72. package/dist/types/components/side_panel/pivot/pivot_side_panel/pivot_side_panel_store.d.ts +1 -0
  73. package/dist/types/components/side_panel/remove_duplicates/remove_duplicates.d.ts +3 -10
  74. package/dist/types/components/side_panel/side_panel/side_panel_store.d.ts +1 -1
  75. package/dist/types/components/side_panel/split_to_columns_panel/split_to_columns_panel.d.ts +4 -11
  76. package/dist/types/components/side_panel/split_to_columns_panel/split_to_columns_store.d.ts +33 -0
  77. package/dist/types/components/small_bottom_bar/small_bottom_bar.d.ts +1 -0
  78. package/dist/types/components/spreadsheet/spreadsheet.d.ts +2 -0
  79. package/dist/types/components/standalone_grid_canvas/standalone_grid_canvas.d.ts +2 -1
  80. package/dist/types/components/standalone_viewport/standalone_viewport.d.ts +56 -0
  81. package/dist/types/components/standalone_viewport/standalone_viewport_store.d.ts +28 -0
  82. package/dist/types/components/tables/hovered_table_store.d.ts +3 -6
  83. package/dist/types/components/tables/table_resizer/table_resizer.d.ts +1 -0
  84. package/dist/types/components/top_bar/zoom_editor/zoom_editor.d.ts +2 -1
  85. package/dist/types/constants.d.ts +4 -0
  86. package/dist/types/formulas/code_builder.d.ts +2 -1
  87. package/dist/types/formulas/compiler.d.ts +7 -0
  88. package/dist/types/functions/create_compute_function.d.ts +4 -3
  89. package/dist/types/functions/function_registry.d.ts +1 -5
  90. package/dist/types/functions/helper_matrices.d.ts +1 -0
  91. package/dist/types/functions/helper_statistical.d.ts +6 -0
  92. package/dist/types/functions/module_array.d.ts +41 -23
  93. package/dist/types/functions/module_database.d.ts +18 -6
  94. package/dist/types/functions/module_date.d.ts +70 -22
  95. package/dist/types/functions/module_engineering.d.ts +3 -1
  96. package/dist/types/functions/module_filter.d.ts +2 -2
  97. package/dist/types/functions/module_financial.d.ts +105 -35
  98. package/dist/types/functions/module_info.d.ts +33 -11
  99. package/dist/types/functions/module_logical.d.ts +16 -8
  100. package/dist/types/functions/module_lookup.d.ts +23 -15
  101. package/dist/types/functions/module_math.d.ts +125 -43
  102. package/dist/types/functions/module_operators.d.ts +7 -3
  103. package/dist/types/functions/module_statistical.d.ts +78 -22
  104. package/dist/types/functions/module_text.d.ts +70 -24
  105. package/dist/types/functions/module_web.d.ts +3 -1
  106. package/dist/types/helpers/carousel_helpers.d.ts +8 -3
  107. package/dist/types/helpers/figures/chart.d.ts +2 -0
  108. package/dist/types/helpers/figures/charts/chart_common.d.ts +0 -2
  109. package/dist/types/helpers/figures/charts/scorecard_chart_config_builder.d.ts +2 -0
  110. package/dist/types/helpers/figures/figure/figure.d.ts +3 -2
  111. package/dist/types/helpers/internal_viewport.d.ts +20 -10
  112. package/dist/types/helpers/misc.d.ts +2 -0
  113. package/dist/types/helpers/pivot/pivot_helpers.d.ts +2 -2
  114. package/dist/types/helpers/pivot/pivot_highlight.d.ts +2 -2
  115. package/dist/types/helpers/rectangle.d.ts +4 -0
  116. package/dist/types/helpers/text_helper.d.ts +6 -1
  117. package/dist/types/helpers/ui/split_to_columns_interactive.d.ts +1 -1
  118. package/dist/types/helpers/viewport_collection.d.ts +51 -21
  119. package/dist/types/helpers/zones.d.ts +1 -0
  120. package/dist/types/index.d.ts +29 -3
  121. package/dist/types/model.d.ts +1 -0
  122. package/dist/types/plugins/core/carousel.d.ts +8 -4
  123. package/dist/types/plugins/core/cell.d.ts +1 -0
  124. package/dist/types/plugins/core/chart.d.ts +2 -0
  125. package/dist/types/plugins/core/conditional_format.d.ts +2 -0
  126. package/dist/types/plugins/core/data_validation.d.ts +2 -0
  127. package/dist/types/plugins/core/formulas_provider.d.ts +8 -0
  128. package/dist/types/plugins/core/pivot.d.ts +1 -0
  129. package/dist/types/plugins/core/squisher.d.ts +1 -0
  130. package/dist/types/plugins/core_plugin.d.ts +7 -3
  131. package/dist/types/plugins/ui_core_views/cell_evaluation/evaluation_plugin.d.ts +10 -3
  132. package/dist/types/plugins/ui_core_views/pivot_ui.d.ts +3 -0
  133. package/dist/types/plugins/ui_feature/collaborative.d.ts +2 -1
  134. package/dist/types/plugins/ui_feature/ui_options.d.ts +1 -7
  135. package/dist/types/plugins/ui_feature/ui_sheet.d.ts +2 -1
  136. package/dist/types/plugins/ui_stateful/carousel_ui.d.ts +2 -2
  137. package/dist/types/plugins/{ui_feature → ui_stateful}/figure.d.ts +4 -0
  138. package/dist/types/plugins/ui_stateful/filter_evaluation.d.ts +2 -3
  139. package/dist/types/plugins/ui_stateful/header_positions.d.ts +2 -1
  140. package/dist/types/registries/chart_registry.d.ts +3 -0
  141. package/dist/types/registries/data_source_registry.d.ts +15 -0
  142. package/dist/types/registries/figures_registry.d.ts +4 -1
  143. package/dist/types/store_engine/dependency_container.d.ts +5 -0
  144. package/dist/types/store_engine/store_hooks.d.ts +6 -0
  145. package/dist/types/store_engine/store_registries.d.ts +4 -0
  146. package/dist/types/stores/array_formula_highlight.d.ts +1 -1
  147. package/dist/types/{plugins/ui_feature/automatic_sum.d.ts → stores/automatic_sum_store.d.ts} +5 -4
  148. package/dist/types/stores/checkbox_toggle.d.ts +9 -0
  149. package/dist/types/stores/client_focus_store.d.ts +1 -0
  150. package/dist/types/stores/data_cleanup_store.d.ts +31 -0
  151. package/dist/types/stores/main_viewport_store.d.ts +11 -0
  152. package/dist/types/stores/spreadsheet_store.d.ts +1 -1
  153. package/dist/types/stores/table_resize_store.d.ts +6 -0
  154. package/dist/types/stores/trim_whitespace_store.d.ts +9 -0
  155. package/dist/types/stores/viewports_store.d.ts +87 -0
  156. package/dist/types/stores/zoom_store.d.ts +14 -0
  157. package/dist/types/types/chart/radar_chart.d.ts +1 -1
  158. package/dist/types/types/chart/scorecard_chart.d.ts +2 -0
  159. package/dist/types/types/commands.d.ts +25 -58
  160. package/dist/types/types/core_getters.d.ts +3 -1
  161. package/dist/types/types/figure.d.ts +26 -3
  162. package/dist/types/types/functions.d.ts +14 -4
  163. package/dist/types/types/getters.d.ts +28 -11
  164. package/dist/types/types/misc.d.ts +19 -1
  165. package/dist/types/types/range.d.ts +1 -0
  166. package/dist/types/types/rendering.d.ts +1 -0
  167. package/dist/types/types/store_engine.d.ts +10 -3
  168. package/package.json +2 -2
  169. package/dist/types/plugins/ui_feature/checkbox_toggle.d.ts +0 -9
  170. package/dist/types/plugins/ui_feature/data_cleanup.d.ts +0 -16
  171. package/dist/types/plugins/ui_feature/split_to_columns.d.ts +0 -21
  172. package/dist/types/plugins/ui_feature/table_autofill.d.ts +0 -6
  173. package/dist/types/plugins/ui_feature/table_resize_ui.d.ts +0 -6
  174. package/dist/types/plugins/ui_stateful/sheetview.d.ts +0 -123
  175. /package/dist/types/plugins/{ui_feature → ui_stateful}/cell_computed_style.d.ts +0 -0
  176. /package/dist/types/plugins/{ui_feature → ui_stateful}/header_visibility_ui.d.ts +0 -0
  177. /package/dist/types/plugins/{ui_feature → ui_stateful}/table_computed_style.d.ts +0 -0
@@ -10,31 +10,26 @@ import { FingerprintPlugin } from "../plugins/ui_core_views/fingerprint";
10
10
  import { FormulaTrackerPlugin } from "../plugins/ui_core_views/formula_tracker";
11
11
  import { HeaderSizeUIPlugin } from "../plugins/ui_core_views/header_sizes_ui";
12
12
  import { PivotUIPlugin } from "../plugins/ui_core_views/pivot_ui";
13
- import { AutofillPlugin } from "../plugins/ui_feature/autofill";
14
- import { AutomaticSumPlugin } from "../plugins/ui_feature/automatic_sum";
15
- import { CellComputedStylePlugin } from "../plugins/ui_feature/cell_computed_style";
16
- import { CheckboxTogglePlugin } from "../plugins/ui_feature/checkbox_toggle";
17
13
  import { CollaborativePlugin } from "../plugins/ui_feature/collaborative";
18
14
  import { ColorThemeUIPlugin } from "../plugins/ui_feature/color_theme";
19
15
  import { DynamicTranslate } from "../plugins/ui_feature/dynamic_translate";
20
- import { FigureUIPlugin } from "../plugins/ui_feature/figure";
21
16
  import { GeoFeaturePlugin } from "../plugins/ui_feature/geo_features";
22
- import { HeaderVisibilityUIPlugin } from "../plugins/ui_feature/header_visibility_ui";
23
17
  import { HistoryPlugin } from "../plugins/ui_feature/local_history";
24
18
  import { LockSheetPlugin } from "../plugins/ui_feature/lock_sheet";
25
19
  import { PivotPresencePlugin } from "../plugins/ui_feature/pivot_presence_plugin";
26
20
  import { SortPlugin } from "../plugins/ui_feature/sort";
27
- import { SplitToColumnsPlugin } from "../plugins/ui_feature/split_to_columns";
28
21
  import { SubtotalEvaluationPlugin } from "../plugins/ui_feature/subtotal_evaluation";
29
- import { TableComputedStylePlugin } from "../plugins/ui_feature/table_computed_style";
30
22
  import { UIOptionsPlugin } from "../plugins/ui_feature/ui_options";
31
23
  import { SheetUIPlugin } from "../plugins/ui_feature/ui_sheet";
32
24
  import { CarouselUIPlugin } from "../plugins/ui_stateful/carousel_ui";
25
+ import { CellComputedStylePlugin } from "../plugins/ui_stateful/cell_computed_style";
33
26
  import { ClipboardPlugin } from "../plugins/ui_stateful/clipboard";
27
+ import { FigureUIPlugin } from "../plugins/ui_stateful/figure";
34
28
  import { FilterEvaluationPlugin } from "../plugins/ui_stateful/filter_evaluation";
35
29
  import { HeaderPositionsUIPlugin } from "../plugins/ui_stateful/header_positions";
30
+ import { HeaderVisibilityUIPlugin } from "../plugins/ui_stateful/header_visibility_ui";
36
31
  import { GridSelectionPlugin } from "../plugins/ui_stateful/selection";
37
- import { SheetViewPlugin } from "../plugins/ui_stateful/sheetview";
32
+ import { TableComputedStylePlugin } from "../plugins/ui_stateful/table_computed_style";
38
33
  import { CoreGetters, PluginGetters } from "./core_getters";
39
34
  /**
40
35
  * The getters that can be used in the rendering-related stores and helpers. The SheetView and Selection getters should
@@ -43,5 +38,27 @@ import { CoreGetters, PluginGetters } from "./core_getters";
43
38
  export type RenderingGetters = {
44
39
  isReadonly: () => boolean;
45
40
  isDashboard: () => boolean;
46
- } & CoreGetters & PluginGetters<typeof AutofillPlugin> & PluginGetters<typeof AutomaticSumPlugin> & PluginGetters<typeof HistoryPlugin> & PluginGetters<typeof ClipboardPlugin> & PluginGetters<typeof EvaluationPlugin> & PluginGetters<typeof EvaluationChartPlugin> & PluginGetters<typeof EvaluationConditionalFormatPlugin> & PluginGetters<typeof HeaderVisibilityUIPlugin> & PluginGetters<typeof CustomColorsPlugin> & PluginGetters<typeof AutomaticSumPlugin> & PluginGetters<typeof CollaborativePlugin> & PluginGetters<typeof SortPlugin> & PluginGetters<typeof UIOptionsPlugin> & PluginGetters<typeof SheetUIPlugin> & PluginGetters<typeof FilterEvaluationPlugin> & PluginGetters<typeof FingerprintPlugin> & PluginGetters<typeof SplitToColumnsPlugin> & PluginGetters<typeof SubtotalEvaluationPlugin> & PluginGetters<typeof HeaderSizeUIPlugin> & PluginGetters<typeof EvaluationDataValidationPlugin> & PluginGetters<typeof HeaderPositionsUIPlugin> & PluginGetters<typeof TableStylePlugin> & PluginGetters<typeof CellComputedStylePlugin> & PluginGetters<typeof DynamicTablesPlugin> & PluginGetters<typeof PivotUIPlugin> & PluginGetters<typeof TableComputedStylePlugin> & PluginGetters<typeof GeoFeaturePlugin> & PluginGetters<typeof PivotPresencePlugin> & PluginGetters<typeof TableComputedStylePlugin> & PluginGetters<typeof CheckboxTogglePlugin> & PluginGetters<typeof CellIconPlugin> & PluginGetters<typeof DynamicTranslate> & PluginGetters<typeof FormulaTrackerPlugin> & PluginGetters<typeof LockSheetPlugin> & PluginGetters<typeof CarouselUIPlugin> & PluginGetters<typeof ColorThemeUIPlugin> & PluginGetters<typeof FigureUIPlugin>;
47
- export type Getters = RenderingGetters & PluginGetters<typeof SheetViewPlugin> & PluginGetters<typeof GridSelectionPlugin>;
41
+ } & CoreGetters & PluginGetters<typeof HistoryPlugin> & PluginGetters<typeof ClipboardPlugin> & PluginGetters<typeof EvaluationPlugin> & PluginGetters<typeof EvaluationChartPlugin> & PluginGetters<typeof EvaluationConditionalFormatPlugin> & PluginGetters<typeof HeaderVisibilityUIPlugin> & PluginGetters<typeof CustomColorsPlugin> & PluginGetters<typeof CollaborativePlugin> & PluginGetters<typeof SortPlugin> & PluginGetters<typeof UIOptionsPlugin> & PluginGetters<typeof SheetUIPlugin> & PluginGetters<typeof FilterEvaluationPlugin> & PluginGetters<typeof FingerprintPlugin> & PluginGetters<typeof SubtotalEvaluationPlugin> & PluginGetters<typeof HeaderSizeUIPlugin> & PluginGetters<typeof EvaluationDataValidationPlugin> & PluginGetters<typeof HeaderPositionsUIPlugin> & PluginGetters<typeof TableStylePlugin> & PluginGetters<typeof CellComputedStylePlugin> & PluginGetters<typeof DynamicTablesPlugin> & PluginGetters<typeof PivotUIPlugin> & PluginGetters<typeof TableComputedStylePlugin> & PluginGetters<typeof GeoFeaturePlugin> & PluginGetters<typeof PivotPresencePlugin> & PluginGetters<typeof TableComputedStylePlugin> & PluginGetters<typeof CellIconPlugin> & PluginGetters<typeof DynamicTranslate> & PluginGetters<typeof FormulaTrackerPlugin> & PluginGetters<typeof LockSheetPlugin> & PluginGetters<typeof CarouselUIPlugin> & PluginGetters<typeof ColorThemeUIPlugin> & PluginGetters<typeof FigureUIPlugin>;
42
+ export type Getters = RenderingGetters & PluginGetters<typeof GridSelectionPlugin>;
43
+ export interface ViewportsGetters {
44
+ getColDimensions: Getters["getColDimensions"];
45
+ getRowDimensions: Getters["getRowDimensions"];
46
+ findLastVisibleColRowIndex: Getters["findLastVisibleColRowIndex"];
47
+ isReadonly: Getters["isReadonly"];
48
+ getMainCellPosition: Getters["getMainCellPosition"];
49
+ getNextVisibleCellPosition: Getters["getNextVisibleCellPosition"];
50
+ getColRowOffset: Getters["getColRowOffset"];
51
+ isColHidden: Getters["isColHidden"];
52
+ isRowHidden: Getters["isRowHidden"];
53
+ isHeaderHidden: Getters["isHeaderHidden"];
54
+ getNumberHeaders: Getters["getNumberHeaders"];
55
+ getHeaderSize: Getters["getHeaderSize"];
56
+ getColSize: Getters["getColSize"];
57
+ getRowSize: Getters["getRowSize"];
58
+ getSheetIds: Getters["getSheetIds"];
59
+ tryGetSheet: Getters["tryGetSheet"];
60
+ getNumberCols: Getters["getNumberCols"];
61
+ getNumberRows: Getters["getNumberRows"];
62
+ getSheetZone: Getters["getSheetZone"];
63
+ getFigures: Getters["getFigures"];
64
+ }
@@ -2,6 +2,7 @@ import { CellValue, EvaluatedCell } from "./cells";
2
2
  import { CompiledFormula } from "../formulas/compiler";
3
3
  import { CommandResult } from "./commands";
4
4
  import { Format } from "./format";
5
+ import { ComputeFunction } from "./functions";
5
6
  import { Range } from "./range";
6
7
  /**
7
8
  * The following type is meant to be used in union with other aliases to prevent
@@ -142,7 +143,7 @@ export interface Border {
142
143
  export type ReferenceDenormalizer = (range: Range) => FunctionResultObject;
143
144
  export type EnsureRange = (range: Range) => Matrix<FunctionResultObject>;
144
145
  export type GetSymbolValue = (symbolName: string, isRange: boolean) => Arg;
145
- export type FormulaToExecute = (deps: Range[], refFn: ReferenceDenormalizer, range: EnsureRange, getSymbolValue: GetSymbolValue, ctx: object) => Matrix<FunctionResultObject> | FunctionResultObject;
146
+ export type FormulaToExecute = (deps: Range[], refFn: ReferenceDenormalizer, range: EnsureRange, getSymbolValue: GetSymbolValue, ctx: object, functions: ComputeFunction[]) => Matrix<FunctionResultObject> | FunctionResultObject;
146
147
  export interface LiteralValues {
147
148
  numbers: {
148
149
  value: number;
@@ -200,6 +201,10 @@ export interface PixelPosition {
200
201
  x: Pixel;
201
202
  y: Pixel;
202
203
  }
204
+ export interface PixelDimension {
205
+ width: Pixel;
206
+ height: Pixel;
207
+ }
203
208
  export interface Merge extends Zone {
204
209
  id: number;
205
210
  }
@@ -259,6 +264,9 @@ export type ConsecutiveIndexes = HeaderIndex[];
259
264
  export interface RangeProvider {
260
265
  adaptRanges: (adapterFunctions: RangeAdapterFunctions) => void;
261
266
  }
267
+ export interface FormulaProvider {
268
+ getFormulas: () => CompiledFormula[];
269
+ }
262
270
  export type Validation<T> = (toValidate: T) => CommandResult | CommandResult[];
263
271
  export type Increment = 1 | -1 | 0;
264
272
  export interface Ref<T> {
@@ -324,6 +332,10 @@ export interface Offset {
324
332
  col: number;
325
333
  row: number;
326
334
  }
335
+ export interface PixelOffset {
336
+ offsetX: Pixel;
337
+ offsetY: Pixel;
338
+ }
327
339
  export type DebouncedFunction<T> = T & {
328
340
  stopDebounce: () => void;
329
341
  isDebouncePending: () => boolean;
@@ -345,4 +357,10 @@ export interface NamedRange {
345
357
  name: string;
346
358
  range: Range;
347
359
  }
360
+ export interface SheetViewDimensions {
361
+ height: Pixel;
362
+ width: Pixel;
363
+ gridOffsetX?: Pixel;
364
+ gridOffsetY?: Pixel;
365
+ }
348
366
  export {};
@@ -22,6 +22,7 @@ export interface BoundedRange {
22
22
  export interface RangeStringOptions {
23
23
  useBoundedReference?: boolean;
24
24
  useFixedReference?: boolean;
25
+ doNotSimplifyRange?: boolean;
25
26
  }
26
27
  export interface RangeData {
27
28
  _zone: Zone | UnboundedZone;
@@ -105,6 +105,7 @@ export type GridRenderingContext = {
105
105
  thinLineWidth: number;
106
106
  viewports: ViewportCollection;
107
107
  hideGridLines?: boolean;
108
+ hideFrozenPaneBorder?: boolean;
108
109
  } & SelectionState;
109
110
  declare const LAYERS: {
110
111
  readonly Background: 0;
@@ -28,9 +28,16 @@ export type SkipFirst<T extends any[]> = T extends [any, ...infer U] ? U : never
28
28
  export type OmitFunctions<T> = {
29
29
  [K in keyof T as T[K] extends Function ? never : K]: T[K];
30
30
  };
31
- export type Store<S> = S extends {
32
- mutators: readonly (keyof S)[];
33
- } ? CQS<Pick<S, S["mutators"][number]> & OmitFunctions<S>> : CQS<OmitFunctions<S>>;
31
+ export type FunctionKeys<T> = {
32
+ [K in keyof T]: T[K] extends Function ? K : never;
33
+ }[keyof T];
34
+ export type MutatorKeys<S> = S extends {
35
+ mutators: readonly FunctionKeys<S>[];
36
+ } ? S["mutators"][number] : never;
37
+ export type GetterKeys<S> = S extends {
38
+ storeGetters: readonly FunctionKeys<S>[];
39
+ } ? S["storeGetters"][number] : never;
40
+ export type Store<S> = CQS<Pick<S, MutatorKeys<S>> & OmitFunctions<S>> & Pick<S, GetterKeys<S>>;
34
41
  /**
35
42
  * Command Query Separation [1,2] implementation with types.
36
43
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odoo/o-spreadsheet",
3
- "version": "19.5.0-alpha.0",
3
+ "version": "19.5.0-alpha.10",
4
4
  "description": "A spreadsheet component",
5
5
  "type": "module",
6
6
  "main": "dist/o_spreadsheet.cjs",
@@ -141,7 +141,7 @@
141
141
  "xmlSelfClosingSpace": false
142
142
  },
143
143
  "dependencies": {
144
- "@odoo/owl": "3.0.0-alpha.40",
144
+ "@odoo/owl": "3.0.0-alpha.45",
145
145
  "bootstrap": "5.3.3",
146
146
  "font-awesome": "^4.7.0",
147
147
  "rbush": "^3.0.1"
@@ -1,9 +0,0 @@
1
- import { Command } from "../../types/commands";
2
- import { Zone } from "../../types/misc";
3
- import { UIPlugin } from "../ui_plugin";
4
- export declare class CheckboxTogglePlugin extends UIPlugin {
5
- static getters: readonly ["hasBooleanValidationInZones"];
6
- handle(cmd: Command): void;
7
- hasBooleanValidationInZones(zones: Zone[]): boolean;
8
- private toggleCheckbox;
9
- }
@@ -1,16 +0,0 @@
1
- import { Command, CommandResult } from "../../types/commands";
2
- import { UIPlugin } from "../ui_plugin";
3
- export declare class DataCleanupPlugin extends UIPlugin {
4
- allowDispatch(cmd: Command): CommandResult | CommandResult[];
5
- handle(cmd: Command): void;
6
- private removeDuplicates;
7
- private getUniqueRowsIndexes;
8
- private notifyRowsRemovedAndRemaining;
9
- private checkSingleRangeSelected;
10
- private checkNoMergeInZone;
11
- private checkRangeContainsValues;
12
- private checkNoColumnProvided;
13
- private checkColumnsIncludedInZone;
14
- private checkColumnsAreUnique;
15
- private trimWhitespace;
16
- }
@@ -1,21 +0,0 @@
1
- import { Command, CommandResult } from "../../types/commands";
2
- import { UIPlugin } from "../ui_plugin";
3
- export declare class SplitToColumnsPlugin extends UIPlugin {
4
- static getters: readonly ["getAutomaticSeparator"];
5
- allowDispatch(cmd: Command): CommandResult | CommandResult[];
6
- handle(cmd: Command): void;
7
- getAutomaticSeparator(): string;
8
- private getAutoSeparatorForString;
9
- private splitIntoColumns;
10
- private getSplittedCols;
11
- private splitAndRemoveTrailingEmpty;
12
- private willSplittedColsOverwriteContent;
13
- private removeMergesInSplitZone;
14
- private addColsToAvoidCollisions;
15
- private getColsToAddToAvoidCollision;
16
- private addColumnsToNotOverflowSheet;
17
- private checkSingleColSelected;
18
- private checkNonEmptySelector;
19
- private checkNotOverwritingContent;
20
- private checkSeparatorInSelection;
21
- }
@@ -1,6 +0,0 @@
1
- import { Command } from "../../types/commands";
2
- import { UIPlugin } from "../ui_plugin";
3
- export declare class TableAutofillPlugin extends UIPlugin {
4
- handle(cmd: Command): void;
5
- private autofillTableZone;
6
- }
@@ -1,6 +0,0 @@
1
- import { Command, CommandResult } from "../../types/commands";
2
- import { UIPlugin } from "../ui_plugin";
3
- export declare class TableResizeUI extends UIPlugin {
4
- allowDispatch(cmd: Command): CommandResult | CommandResult[];
5
- handle(cmd: Command): void;
6
- }
@@ -1,123 +0,0 @@
1
- import { ViewportCollection } from "../../helpers/viewport_collection";
2
- import { Command, CommandResult, LocalCommand } from "../../types/commands";
3
- import { AnchorOffset, Figure, FigureUI } from "../../types/figure";
4
- import { CellPosition, Dimension, HeaderDimensions, HeaderIndex, Pixel, PixelPosition, UID, Zone } from "../../types/misc";
5
- import { DOMCoordinates, DOMDimension, EdgeScrollInfo, Rect, SheetDOMScrollInfo, Viewport } from "../../types/rendering";
6
- import { UIPlugin } from "../ui_plugin";
7
- /**
8
- * Viewport plugin.
9
- *
10
- * This plugin manages all things related to all viewport states.
11
- *
12
- */
13
- export declare class SheetViewPlugin extends UIPlugin {
14
- static getters: readonly ["getColIndex", "getRowIndex", "getActiveMainViewport", "getSheetViewDimension", "getSheetViewDimensionWithHeaders", "getMainViewportRect", "isVisibleInViewport", "getEdgeScrollCol", "getEdgeScrollRow", "getVisibleFigures", "getVisibleRect", "getVisibleRectWithoutHeaders", "getVisibleRectWithZoom", "getVisibleCellPositions", "getColRowOffsetInViewport", "getMainViewportCoordinates", "getActiveSheetScrollInfo", "getSheetViewVisibleCols", "getSheetViewVisibleRows", "getFrozenSheetViewRatio", "isPixelPositionVisible", "getColDimensionsInViewport", "getRowDimensionsInViewport", "getRect", "getFigureUI", "getPositionAnchorOffset", "getGridOffset", "getViewportZoomLevel", "getScrollBarWidth", "getMaximumSheetOffset", "getViewportCollection"];
15
- private viewports;
16
- private sheetsWithDirtyViewports;
17
- private shouldRepositionViewports;
18
- allowDispatch(cmd: LocalCommand): CommandResult | CommandResult[];
19
- private handleEvent;
20
- handle(cmd: Command): void;
21
- finalize(): void;
22
- private setViewports;
23
- private syncPaneDivision;
24
- /**
25
- * Return the index of a column given an offset x, based on the viewport left
26
- * visible cell.
27
- * It returns -1 if no column is found.
28
- */
29
- getColIndex(x: Pixel): HeaderIndex;
30
- /**
31
- * Return the index of a row given an offset y, based on the viewport top
32
- * visible cell.
33
- * It returns -1 if no row is found.
34
- */
35
- getRowIndex(y: Pixel): HeaderIndex;
36
- getSheetViewDimensionWithHeaders(): DOMDimension;
37
- getSheetViewDimension(): DOMDimension;
38
- getGridOffset(): DOMCoordinates;
39
- /** type as pane, not viewport but basically pane extends viewport */
40
- getActiveMainViewport(): Viewport;
41
- /**
42
- * Return the DOM scroll info of the active sheet, ie. the offset between the viewport left/top side and
43
- * the grid left/top side, corresponding to the scroll of the scrollbars and not snapped to the grid.
44
- */
45
- getActiveSheetScrollInfo(): SheetDOMScrollInfo;
46
- getSheetViewVisibleCols(): HeaderIndex[];
47
- getSheetViewVisibleRows(): HeaderIndex[];
48
- /**
49
- * Get the positions of all the cells that are visible in the viewport, taking merges into account.
50
- */
51
- getVisibleCellPositions(): CellPosition[];
52
- /**
53
- * Return the main viewport maximum size relative to the client size.
54
- */
55
- getMainViewportRect(): Rect;
56
- getMaximumSheetOffset(): {
57
- maxOffsetX: Pixel;
58
- maxOffsetY: Pixel;
59
- };
60
- getColRowOffsetInViewport(dimension: Dimension, referenceHeaderIndex: HeaderIndex, targetHeaderIndex: HeaderIndex): Pixel;
61
- /**
62
- * Check if a given position is visible in the viewport.
63
- */
64
- isVisibleInViewport(cellPosition: CellPosition): boolean;
65
- getScrollBarWidth(): Pixel;
66
- getEdgeScrollCol(x: number, previousX: number, startingX: number): EdgeScrollInfo;
67
- getEdgeScrollRow(y: number, previousY: number, startingY: number): EdgeScrollInfo;
68
- /**
69
- * Computes the coordinates and size to draw the zone on the canvas
70
- */
71
- getVisibleRect(zone: Zone): Rect;
72
- /**
73
- * Computes the coordinates and size to draw the zone on the canvas after it has been zoomed
74
- */
75
- getVisibleRectWithZoom(zone: Zone): Rect;
76
- /**
77
- * Computes the coordinates and size to draw the zone without taking the grid offset into account
78
- */
79
- getVisibleRectWithoutHeaders(zone: Zone): Rect;
80
- /**
81
- * Computes the actual size and position (:Rect) of the zone on the canvas
82
- * regardless of the viewport dimensions.
83
- */
84
- getRect(zone: Zone): Rect;
85
- /**
86
- * Computes the actual size and position (:Rect) of the zone on the canvas
87
- * regardless of the viewport dimensions.
88
- */
89
- getRectWithoutHeaders(zone: Zone): Rect;
90
- /**
91
- * Returns the position of the MainViewport relatively to the start of the grid (without headers)
92
- * It corresponds to the summed dimensions of the visible cols/rows (in x/y respectively)
93
- * situated before the pane divisions.
94
- */
95
- getMainViewportCoordinates(): DOMCoordinates;
96
- /**
97
- * Returns the size, start and end coordinates of a column relative to the left
98
- * column of the current viewport
99
- */
100
- getColDimensionsInViewport(sheetId: UID, col: HeaderIndex): HeaderDimensions;
101
- /**
102
- * Returns the size, start and end coordinates of a row relative to the top row
103
- * of the current viewport
104
- */
105
- getRowDimensionsInViewport(sheetId: UID, row: HeaderIndex): HeaderDimensions;
106
- getViewportZoomLevel(): number;
107
- /**
108
- * Shift the viewport vertically and move the selection anchor
109
- * such that it remains at the same place relative to the
110
- * viewport top.
111
- */
112
- private shiftVertically;
113
- getVisibleFigures(): FigureUI[];
114
- getFigureUI(sheetId: UID, figure: Figure): FigureUI;
115
- getPositionAnchorOffset(position: PixelPosition): AnchorOffset;
116
- isPixelPositionVisible(position: PixelPosition): boolean;
117
- getFrozenSheetViewRatio(sheetId: UID): {
118
- xRatio: number;
119
- yRatio: number;
120
- };
121
- getViewportCollection(): ViewportCollection;
122
- private getPaneDivisions;
123
- }