@odoo/o-spreadsheet 19.4.0-alpha.10 → 19.4.0-alpha.12

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 (194) hide show
  1. package/dist/o_spreadsheet.cjs +1386 -1780
  2. package/dist/o_spreadsheet.css +5 -5
  3. package/dist/o_spreadsheet.esm.js +1385 -1781
  4. package/dist/o_spreadsheet.iife.js +1386 -1780
  5. package/dist/o_spreadsheet.min.iife.js +279 -279
  6. package/dist/o_spreadsheet.xml +29 -16
  7. package/dist/types/components/action_button/action_button.d.ts +8 -29
  8. package/dist/types/components/animation/ripple.d.ts +33 -92
  9. package/dist/types/components/autofill/autofill.d.ts +5 -9
  10. package/dist/types/components/border_editor/border_editor.d.ts +18 -43
  11. package/dist/types/components/border_editor/border_editor_widget.d.ts +6 -20
  12. package/dist/types/components/bottom_bar/bottom_bar.d.ts +4 -7
  13. package/dist/types/components/bottom_bar/bottom_bar_sheet/bottom_bar_sheet.d.ts +8 -22
  14. package/dist/types/components/bottom_bar/bottom_bar_statistic/bottom_bar_statistic.d.ts +5 -10
  15. package/dist/types/components/collaborative_client_tag/collaborative_client_tag.d.ts +8 -17
  16. package/dist/types/components/color_picker/color_picker.d.ts +13 -30
  17. package/dist/types/components/color_picker/color_picker_widget.d.ts +12 -40
  18. package/dist/types/components/composer/autocomplete_dropdown/autocomplete_dropdown.d.ts +7 -17
  19. package/dist/types/components/composer/composer/composer.d.ts +18 -63
  20. package/dist/types/components/composer/formula_assistant/formula_assistant.d.ts +8 -17
  21. package/dist/types/components/composer/grid_composer/grid_composer.d.ts +8 -13
  22. package/dist/types/components/composer/speech_bubble/speech_bubble.d.ts +5 -10
  23. package/dist/types/components/composer/standalone_composer/standalone_composer.d.ts +16 -62
  24. package/dist/types/components/composer/top_bar_composer/top_bar_composer.d.ts +1 -2
  25. package/dist/types/components/dashboard/clickable_cell_sort_icon/clickable_cell_sort_icon.d.ts +5 -11
  26. package/dist/types/components/dashboard/dashboard.d.ts +4 -8
  27. package/dist/types/components/error_tooltip/error_tooltip.d.ts +5 -14
  28. package/dist/types/components/figures/chart/chartJs/chartjs.d.ts +5 -14
  29. package/dist/types/components/figures/chart/chart_dashboard_menu/chart_dashboard_menu.d.ts +7 -15
  30. package/dist/types/components/figures/chart/gauge/gauge_chart_component.d.ts +5 -13
  31. package/dist/types/components/figures/chart/scorecard/chart_scorecard.d.ts +5 -14
  32. package/dist/types/components/figures/figure/figure.d.ts +10 -30
  33. package/dist/types/components/figures/figure_carousel/figure_carousel.d.ts +8 -24
  34. package/dist/types/components/figures/figure_chart/figure_chart.d.ts +7 -24
  35. package/dist/types/components/figures/figure_container/figure_container.d.ts +1 -4
  36. package/dist/types/components/figures/figure_image/figure_image.d.ts +6 -19
  37. package/dist/types/components/filters/filter_menu/filter_menu.d.ts +2 -13
  38. package/dist/types/components/filters/filter_menu_criterion/filter_menu_criterion.d.ts +6 -13
  39. package/dist/types/components/filters/filter_menu_item/filter_menu_value_item.d.ts +9 -21
  40. package/dist/types/components/filters/filter_menu_value_list/filter_menu_value_list.d.ts +12 -11
  41. package/dist/types/components/filters/pivot_filter_menu/pivot_filter_menu.d.ts +13 -28
  42. package/dist/types/components/font_size_editor/font_size_editor.d.ts +10 -25
  43. package/dist/types/components/full_screen_figure/full_screen_figure.d.ts +1 -2
  44. package/dist/types/components/generic_input/generic_input.d.ts +16 -45
  45. package/dist/types/components/grid/grid.d.ts +5 -10
  46. package/dist/types/components/grid_add_rows_footer/grid_add_rows_footer.d.ts +1 -5
  47. package/dist/types/components/grid_overlay/grid_overlay.d.ts +11 -37
  48. package/dist/types/components/grid_popover/grid_popover.d.ts +6 -13
  49. package/dist/types/components/header_group/header_group.d.ts +7 -12
  50. package/dist/types/components/header_group/header_group_container.d.ts +6 -11
  51. package/dist/types/components/headers_overlay/headers_overlay.d.ts +10 -16
  52. package/dist/types/components/headers_overlay/unhide_headers.d.ts +19 -30
  53. package/dist/types/components/highlight/border/border.d.ts +7 -16
  54. package/dist/types/components/highlight/corner/corner.d.ts +8 -18
  55. package/dist/types/components/highlight/highlight/highlight.d.ts +6 -11
  56. package/dist/types/components/icon_picker/icon_picker.d.ts +4 -8
  57. package/dist/types/components/link/link_display/link_display.d.ts +6 -13
  58. package/dist/types/components/link/link_editor/link_editor.d.ts +6 -13
  59. package/dist/types/components/menu/menu.d.ts +14 -55
  60. package/dist/types/components/menu_popover/menu_popover.d.ts +22 -69
  61. package/dist/types/components/named_range_selector/named_range_selector.d.ts +1 -4
  62. package/dist/types/components/number_editor/number_editor.d.ts +18 -54
  63. package/dist/types/components/number_input/number_input.d.ts +1 -52
  64. package/dist/types/components/paint_format_button/paint_format_button.d.ts +4 -11
  65. package/dist/types/components/pivot_html_renderer/pivot_html_renderer.d.ts +5 -9
  66. package/dist/types/components/popover/popover.d.ts +18 -69
  67. package/dist/types/components/props_validation.d.ts +185 -0
  68. package/dist/types/components/scrollbar/scrollbar.d.ts +13 -11
  69. package/dist/types/components/scrollbar/scrollbar_horizontal.d.ts +5 -13
  70. package/dist/types/components/scrollbar/scrollbar_vertical.d.ts +5 -13
  71. package/dist/types/components/select/select.d.ts +13 -36
  72. package/dist/types/components/selection/selection.d.ts +4 -4
  73. package/dist/types/components/selection_input/selection_input.d.ts +20 -74
  74. package/dist/types/components/side_panel/carousel_panel/carousel_panel.d.ts +5 -10
  75. package/dist/types/components/side_panel/chart/bar_chart/bar_chart_design_panel.d.ts +2 -10
  76. package/dist/types/components/side_panel/chart/bubble_chart/bubble_chart_config_panel.d.ts +2 -7
  77. package/dist/types/components/side_panel/chart/bubble_chart/bubble_chart_design_panel.d.ts +4 -16
  78. package/dist/types/components/side_panel/chart/building_blocks/axis_design/axis_design_editor.d.ts +7 -14
  79. package/dist/types/components/side_panel/chart/building_blocks/chart_title/chart_title.d.ts +11 -33
  80. package/dist/types/components/side_panel/chart/building_blocks/color_scale/color_scale_picker.d.ts +10 -13
  81. package/dist/types/components/side_panel/chart/building_blocks/data_series/data_series.d.ts +18 -61
  82. package/dist/types/components/side_panel/chart/building_blocks/data_source/data_source.d.ts +16 -42
  83. package/dist/types/components/side_panel/chart/building_blocks/error_section/error_section.d.ts +4 -11
  84. package/dist/types/components/side_panel/chart/building_blocks/general_design/general_design_editor.d.ts +11 -24
  85. package/dist/types/components/side_panel/chart/building_blocks/generic_side_panel/config_panel.d.ts +2 -7
  86. package/dist/types/components/side_panel/chart/building_blocks/humanize_numbers/humanize_numbers.d.ts +2 -7
  87. package/dist/types/components/side_panel/chart/building_blocks/label_range/label_range.d.ts +18 -35
  88. package/dist/types/components/side_panel/chart/building_blocks/legend/legend.d.ts +9 -17
  89. package/dist/types/components/side_panel/chart/building_blocks/pie_hole_size/pie_hole_size.d.ts +5 -10
  90. package/dist/types/components/side_panel/chart/building_blocks/range_data_source/range_data_source.d.ts +17 -41
  91. package/dist/types/components/side_panel/chart/building_blocks/series_design/series_design_editor.d.ts +9 -17
  92. package/dist/types/components/side_panel/chart/building_blocks/series_design/series_with_axis_design_editor.d.ts +8 -16
  93. package/dist/types/components/side_panel/chart/building_blocks/show_data_markers/show_data_markers.d.ts +2 -7
  94. package/dist/types/components/side_panel/chart/building_blocks/show_values/show_values.d.ts +8 -17
  95. package/dist/types/components/side_panel/chart/building_blocks/text_styler/text_styler.d.ts +10 -38
  96. package/dist/types/components/side_panel/chart/calendar_chart/calendar_chart_design_panel.d.ts +2 -7
  97. package/dist/types/components/side_panel/chart/chart_type_picker/chart_type_picker.d.ts +8 -11
  98. package/dist/types/components/side_panel/chart/chart_with_axis/design_panel.d.ts +2 -7
  99. package/dist/types/components/side_panel/chart/common.d.ts +5 -5
  100. package/dist/types/components/side_panel/chart/funnel_chart_panel/funnel_chart_design_panel.d.ts +4 -7
  101. package/dist/types/components/side_panel/chart/gauge_chart_panel/gauge_chart_config_panel.d.ts +2 -7
  102. package/dist/types/components/side_panel/chart/gauge_chart_panel/gauge_chart_design_panel.d.ts +4 -8
  103. package/dist/types/components/side_panel/chart/geo_chart_panel/geo_chart_region_select_section.d.ts +6 -12
  104. package/dist/types/components/side_panel/chart/main_chart_panel/main_chart_panel.d.ts +5 -10
  105. package/dist/types/components/side_panel/chart/pie_chart/pie_chart_design_panel.d.ts +2 -7
  106. package/dist/types/components/side_panel/chart/radar_chart/radar_chart_design_panel.d.ts +2 -7
  107. package/dist/types/components/side_panel/chart/scorecard_chart_panel/scorecard_chart_config_panel.d.ts +2 -7
  108. package/dist/types/components/side_panel/chart/scorecard_chart_panel/scorecard_chart_design_panel.d.ts +2 -7
  109. package/dist/types/components/side_panel/chart/sunburst_chart/sunburst_chart_design_panel.d.ts +5 -8
  110. package/dist/types/components/side_panel/chart/treemap_chart/treemap_category_color/treemap_category_color.d.ts +8 -14
  111. package/dist/types/components/side_panel/chart/treemap_chart/treemap_chart_design_panel.d.ts +13 -9
  112. package/dist/types/components/side_panel/chart/treemap_chart/treemap_color_scale/treemap_color_scale.d.ts +7 -14
  113. package/dist/types/components/side_panel/chart/waterfall_chart/waterfall_chart_design_panel.d.ts +2 -7
  114. package/dist/types/components/side_panel/chart/zoomable_chart/design_panel.d.ts +1 -3
  115. package/dist/types/components/side_panel/column_stats/column_stats_panel.d.ts +4 -8
  116. package/dist/types/components/side_panel/components/badge_selection/badge_selection.d.ts +6 -11
  117. package/dist/types/components/side_panel/components/checkbox/checkbox.d.ts +11 -40
  118. package/dist/types/components/side_panel/components/cog_wheel_menu/cog_wheel_menu.d.ts +4 -9
  119. package/dist/types/components/side_panel/components/collapse/collapse.d.ts +4 -10
  120. package/dist/types/components/side_panel/components/collapsible/side_panel_collapsible.d.ts +6 -16
  121. package/dist/types/components/side_panel/components/radio_selection/radio_selection.d.ts +9 -22
  122. package/dist/types/components/side_panel/components/round_color_picker/round_color_picker.d.ts +7 -23
  123. package/dist/types/components/side_panel/components/section/section.d.ts +6 -16
  124. package/dist/types/components/side_panel/conditional_formatting/cf_editor/cell_is_rule_editor.d.ts +4 -9
  125. package/dist/types/components/side_panel/conditional_formatting/cf_editor/cf_editor.d.ts +6 -13
  126. package/dist/types/components/side_panel/conditional_formatting/cf_editor/color_scale_rule_editor.d.ts +4 -9
  127. package/dist/types/components/side_panel/conditional_formatting/cf_editor/color_scale_rule_editor_threshold.d.ts +7 -12
  128. package/dist/types/components/side_panel/conditional_formatting/cf_editor/data_bar_rule_editor.d.ts +4 -9
  129. package/dist/types/components/side_panel/conditional_formatting/cf_editor/icon_set_rule_editor.d.ts +6 -10
  130. package/dist/types/components/side_panel/conditional_formatting/cf_preview/cf_preview.d.ts +6 -13
  131. package/dist/types/components/side_panel/conditional_formatting/cf_preview_list/cf_preview_list.d.ts +4 -8
  132. package/dist/types/components/side_panel/criterion_form/criterion_form.d.ts +7 -20
  133. package/dist/types/components/side_panel/criterion_form/criterion_input/criterion_input.d.ts +17 -46
  134. package/dist/types/components/side_panel/data_validation/data_validation_panel.d.ts +4 -8
  135. package/dist/types/components/side_panel/data_validation/dv_editor/dv_editor.d.ts +6 -14
  136. package/dist/types/components/side_panel/data_validation/dv_preview/dv_preview.d.ts +4 -9
  137. package/dist/types/components/side_panel/find_and_replace/find_and_replace.d.ts +4 -8
  138. package/dist/types/components/side_panel/more_formats/more_formats.d.ts +6 -14
  139. package/dist/types/components/side_panel/named_ranges_panel/named_range_preview/named_range_preview.d.ts +5 -8
  140. package/dist/types/components/side_panel/named_ranges_panel/named_ranges_panel.d.ts +4 -8
  141. package/dist/types/components/side_panel/perf_profile/perf_profile_panel.d.ts +4 -8
  142. package/dist/types/components/side_panel/pivot/pivot_custom_groups_collapsible/pivot_custom_groups_collapsible.d.ts +7 -13
  143. package/dist/types/components/side_panel/pivot/pivot_defer_update/pivot_defer_update.d.ts +10 -18
  144. package/dist/types/components/side_panel/pivot/pivot_filter/pivot_filter.d.ts +8 -15
  145. package/dist/types/components/side_panel/pivot/pivot_layout_configurator/add_dimension_button/add_dimension_button.d.ts +5 -14
  146. package/dist/types/components/side_panel/pivot/pivot_layout_configurator/pivot_dimension/pivot_dimension.d.ts +7 -23
  147. package/dist/types/components/side_panel/pivot/pivot_layout_configurator/pivot_dimension_granularity/pivot_dimension_granularity.d.ts +9 -16
  148. package/dist/types/components/side_panel/pivot/pivot_layout_configurator/pivot_dimension_order/pivot_dimension_order.d.ts +9 -12
  149. package/dist/types/components/side_panel/pivot/pivot_layout_configurator/pivot_layout_configurator.d.ts +15 -30
  150. package/dist/types/components/side_panel/pivot/pivot_layout_configurator/pivot_measure/pivot_measure.d.ts +12 -22
  151. package/dist/types/components/side_panel/pivot/pivot_layout_configurator/pivot_sort_section/pivot_sort_section.d.ts +6 -13
  152. package/dist/types/components/side_panel/pivot/pivot_measure_display_panel/pivot_measure_display_panel.d.ts +8 -15
  153. package/dist/types/components/side_panel/pivot/pivot_side_panel/pivot_design_panel/pivot_design_panel.d.ts +5 -10
  154. package/dist/types/components/side_panel/pivot/pivot_side_panel/pivot_side_panel.d.ts +8 -18
  155. package/dist/types/components/side_panel/pivot/pivot_side_panel/pivot_spreadsheet_side_panel/pivot_spreadsheet_side_panel.d.ts +5 -11
  156. package/dist/types/components/side_panel/pivot/pivot_title_section/pivot_title_section.d.ts +6 -12
  157. package/dist/types/components/side_panel/remove_duplicates/remove_duplicates.d.ts +4 -7
  158. package/dist/types/components/side_panel/settings/settings_panel.d.ts +4 -8
  159. package/dist/types/components/side_panel/side_panel/side_panel.d.ts +12 -37
  160. package/dist/types/components/side_panel/side_panels/side_panels.d.ts +16 -6
  161. package/dist/types/components/side_panel/split_to_columns_panel/split_to_columns_panel.d.ts +4 -7
  162. package/dist/types/components/side_panel/table_panel/table_panel.d.ts +6 -10
  163. package/dist/types/components/side_panel/table_style_editor_panel/table_style_editor_panel.d.ts +6 -17
  164. package/dist/types/components/small_bottom_bar/ribbon_menu/ribbon_menu.d.ts +7 -11
  165. package/dist/types/components/small_bottom_bar/small_bottom_bar.d.ts +7 -10
  166. package/dist/types/components/spreadsheet/spreadsheet.d.ts +8 -20
  167. package/dist/types/components/spreadsheet_print/spreadsheet_print.d.ts +4 -8
  168. package/dist/types/components/standalone_grid_canvas/standalone_grid_canvas.d.ts +6 -13
  169. package/dist/types/components/tables/table_dropdown_button/table_dropdown_button.d.ts +7 -12
  170. package/dist/types/components/tables/table_resizer/table_resizer.d.ts +4 -8
  171. package/dist/types/components/tables/table_style_picker/table_style_picker.d.ts +11 -16
  172. package/dist/types/components/tables/table_style_preview/table_style_preview.d.ts +9 -28
  173. package/dist/types/components/tables/table_styles_popover/table_styles_popover.d.ts +23 -26
  174. package/dist/types/components/text_input/text_input.d.ts +1 -48
  175. package/dist/types/components/top_bar/color_editor/color_editor.d.ts +7 -14
  176. package/dist/types/components/top_bar/dropdown_action/dropdown_action.d.ts +10 -17
  177. package/dist/types/components/top_bar/font_size_editor/font_size_editor.d.ts +4 -8
  178. package/dist/types/components/top_bar/number_formats_tool/number_formats_tool.d.ts +4 -7
  179. package/dist/types/components/top_bar/top_bar.d.ts +9 -12
  180. package/dist/types/components/top_bar/zoom_editor/zoom_editor.d.ts +4 -8
  181. package/dist/types/components/validation_messages/validation_messages.d.ts +6 -15
  182. package/dist/types/helpers/formulas.d.ts +1 -0
  183. package/dist/types/index.d.ts +21 -1
  184. package/dist/types/owl3_compatibility_layer.d.ts +3 -6
  185. package/dist/types/plugins/ui_feature/table_computed_style.d.ts +1 -1
  186. package/dist/types/types/cell_popovers.d.ts +2 -2
  187. package/dist/types/types/chart/bar_chart.d.ts +1 -0
  188. package/dist/types/types/chart/chart.d.ts +1 -0
  189. package/dist/types/types/chart/sunburst_chart.d.ts +3 -1
  190. package/dist/types/types/chart/tree_map_chart.d.ts +11 -2
  191. package/dist/types/types/misc.d.ts +4 -2
  192. package/dist/types/types/props_of.d.ts +7 -3
  193. package/dist/types/types/spreadsheet_env.d.ts +0 -1
  194. package/package.json +2 -2
@@ -2,9 +2,9 @@
2
2
  /**
3
3
  * This file is generated by o-spreadsheet build tools. Do not edit it.
4
4
  * @see https://github.com/odoo/o-spreadsheet
5
- * @version 19.4.0-alpha.10
6
- * @date 2026-06-02T12:07:58.355Z
7
- * @hash 41144f9
5
+ * @version 19.4.0-alpha.12
6
+ * @date 2026-06-06T06:24:48.209Z
7
+ * @hash a71f829
8
8
  */
9
9
 
10
10
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
@@ -670,6 +670,18 @@ const borderStyles = [
670
670
  function isMatrix(x) {
671
671
  return Array.isArray(x) && Array.isArray(x[0]);
672
672
  }
673
+ const borderPositions = [
674
+ "all",
675
+ "hv",
676
+ "h",
677
+ "v",
678
+ "external",
679
+ "left",
680
+ "top",
681
+ "right",
682
+ "bottom",
683
+ "clear"
684
+ ];
673
685
  let DIRECTION = /* @__PURE__ */ function(DIRECTION) {
674
686
  DIRECTION["UP"] = "up";
675
687
  DIRECTION["DOWN"] = "down";
@@ -677,6 +689,11 @@ let DIRECTION = /* @__PURE__ */ function(DIRECTION) {
677
689
  DIRECTION["RIGHT"] = "right";
678
690
  return DIRECTION;
679
691
  }({});
692
+ const composerFocusTypes = [
693
+ "inactive",
694
+ "cellFocus",
695
+ "contentFocus"
696
+ ];
680
697
 
681
698
  //#endregion
682
699
  //#region src/helpers/misc.ts
@@ -2578,13 +2595,9 @@ function unregisterChartJsExtensions() {
2578
2595
  const isOdooCompatLoaded = _odoo_owl.__ODOO_COMPATIBILITY_LAYER_ADDED__ === true;
2579
2596
  var _Component = class extends _odoo_owl.Component {
2580
2597
  static template = "";
2581
- static props = {};
2582
- static defaultProps = {};
2583
- props;
2584
2598
  env;
2585
2599
  constructor(node) {
2586
2600
  super(node);
2587
- this.props = (0, _odoo_owl.props)(null, this.constructor.defaultProps);
2588
2601
  this.env = useChildEnv();
2589
2602
  this.__owl__ = node;
2590
2603
  }
@@ -2706,10 +2719,11 @@ var VPortal = class extends _odoo_owl.blockDom.text("").constructor {
2706
2719
  };
2707
2720
  var Portal = class extends _odoo_owl.Component {
2708
2721
  static template = _odoo_owl.xml`<t t-call-slot="default"/>`;
2709
- static props = {
2710
- selector: String,
2711
- slots: true
2712
- };
2722
+ constructor(node) {
2723
+ super(node);
2724
+ this.props = (0, _odoo_owl.props)();
2725
+ this.__owl__ = node;
2726
+ }
2713
2727
  setup() {
2714
2728
  const node = this.__owl__;
2715
2729
  const renderContent = node.renderFn;
@@ -4309,6 +4323,7 @@ const DEFAULT_LOCALE_DIGIT_GROUPING = "[3,0]";
4309
4323
  //#endregion
4310
4324
  //#region src/helpers/format/format_tokenizer.ts
4311
4325
  function tokenizeFormat(str) {
4326
+ str = str.replace(/\s/g, " ");
4312
4327
  const chars = new TokenizingChars(str);
4313
4328
  const result = [];
4314
4329
  let currentFormatPart = [];
@@ -7024,6 +7039,11 @@ function getRange(sheetXC, sheetId) {
7024
7039
  sheetId
7025
7040
  }, defaultGetSheetSize);
7026
7041
  }
7042
+ function replaceSymbolInFormula(formula, oldSymbol, newSymbol) {
7043
+ const oldCanonicalSymbol = getCanonicalSymbolName(oldSymbol);
7044
+ const newCanonicalSymbol = getCanonicalSymbolName(newSymbol);
7045
+ return tokenize(formula).map((token) => token.type === "SYMBOL" && token.value === oldCanonicalSymbol ? newCanonicalSymbol : token.value).join("");
7046
+ }
7027
7047
 
7028
7048
  //#endregion
7029
7049
  //#region src/formulas/code_builder.ts
@@ -9917,6 +9937,9 @@ function getChartBackgroundColor({ background }, getters) {
9917
9937
  //#endregion
9918
9938
  //#region src/components/figures/chart/chartJs/chartjs_show_values_plugin.ts
9919
9939
  const MINIMAL_VERTICAL_DISTANCE = 13;
9940
+ function isLineOverlayOnBarChart(options, dataset) {
9941
+ return options.type === "bar" && dataset.type === "line";
9942
+ }
9920
9943
  /** This is a chartJS plugin that will draw the values of each data next to the point/bar/pie slice */
9921
9944
  const chartShowValuesPlugin = {
9922
9945
  id: "chartShowValuesPlugin",
@@ -9967,7 +9990,7 @@ function drawTextWithBackground(text, x, y, ctx) {
9967
9990
  function drawLineOrBarOrRadarChartValues(chart, options, ctx) {
9968
9991
  const textsPositions = {};
9969
9992
  for (const dataset of chart._metasets) {
9970
- if (isTrendLineAxis(dataset.xAxisID) || dataset.hidden) continue;
9993
+ if (isTrendLineAxis(dataset.xAxisID) || dataset.hidden || isLineOverlayOnBarChart(options, dataset)) continue;
9971
9994
  const yAxisScale = chart.scales[dataset.yAxisID];
9972
9995
  for (let i = 0; i < dataset._parsed.length; i++) {
9973
9996
  const parsedValue = dataset._parsed[i];
@@ -10046,7 +10069,7 @@ function drawBubbleChartValues(chart, options, ctx) {
10046
10069
  function drawHorizontalBarChartValues(chart, options, ctx) {
10047
10070
  const textsPositions = {};
10048
10071
  for (const dataset of chart._metasets) {
10049
- if (isTrendLineAxis(dataset.xAxisID)) return;
10072
+ if (isTrendLineAxis(dataset.xAxisID) || isLineOverlayOnBarChart(options, dataset)) continue;
10050
10073
  const xZeroLine = chart.scales[dataset.xAxisID].getPixelForValue(0);
10051
10074
  for (let i = 0; i < dataset._parsed.length; i++) {
10052
10075
  const value = Number(dataset._parsed[i].x);
@@ -10548,7 +10571,7 @@ function getChartAxisTitleRuntime(design) {
10548
10571
  font: {
10549
10572
  style: italic ? "italic" : "normal",
10550
10573
  weight: bold ? "bold" : "normal",
10551
- size: design.title.fontSize ?? 12
10574
+ size: fontSizeInPixels(design.title.fontSize ?? 12)
10552
10575
  },
10553
10576
  align: align === "left" ? "start" : align === "right" ? "end" : "center"
10554
10577
  };
@@ -10691,8 +10714,38 @@ function getBarChartDatasets(definition, args) {
10691
10714
  trendDatasets.push(getTrendingLineDataSet(dataset, trendConfig, trendData));
10692
10715
  }
10693
10716
  dataSets.push(...trendDatasets);
10717
+ const totalLineDataset = getBarChartTotalLineDataset(definition, dataSetsValues);
10718
+ if (totalLineDataset) dataSets.push(totalLineDataset);
10694
10719
  return dataSets;
10695
10720
  }
10721
+ function getBarChartTotalLineDataset(definition, dataSetsValues) {
10722
+ const visibleDataSetsValues = dataSetsValues.filter((dataSet) => !dataSet.hidden);
10723
+ if (!definition.stacked || !definition.showTotalLine || visibleDataSetsValues.length < 2) return;
10724
+ const data = range(0, Math.max(...visibleDataSetsValues.map((dataSet) => dataSet.data.length))).map((index) => {
10725
+ let total;
10726
+ for (const dataSet of visibleDataSetsValues) {
10727
+ const cell = dataSet.data[index];
10728
+ if (isNumberResult(cell)) total = (total ?? 0) + cell.value;
10729
+ }
10730
+ return total ?? NaN;
10731
+ });
10732
+ const color = relativeLuminance(definition.background || "#FFFFFF") < .3 ? "#e9ecef" : "#343a40";
10733
+ return {
10734
+ type: "line",
10735
+ label: _t("Sum"),
10736
+ data,
10737
+ order: -1,
10738
+ tension: 0,
10739
+ fill: false,
10740
+ pointRadius: 3,
10741
+ borderWidth: 2,
10742
+ backgroundColor: color,
10743
+ borderColor: color,
10744
+ pointBackgroundColor: color,
10745
+ xAxisID: "x",
10746
+ yAxisID: "y"
10747
+ };
10748
+ }
10696
10749
  function getCalendarChartDatasetAndLabels(definition, args) {
10697
10750
  const { labels, dataSetsValues, background } = args;
10698
10751
  const values = dataSetsValues.map((ds) => ds.data).flat().filter(isNumberResult).map((cell) => cell.value);
@@ -11140,7 +11193,7 @@ function getTextStyle(design, defaultDesign) {
11140
11193
  font: {
11141
11194
  weight: design?.bold ?? defaultDesign?.bold ? "bold" : "normal",
11142
11195
  style: design?.italic ?? defaultDesign?.italic ? "italic" : "normal",
11143
- size: design?.fontSize ?? defaultDesign?.fontSize
11196
+ size: fontSizeInPixels(design?.fontSize ?? defaultDesign.fontSize)
11144
11197
  }
11145
11198
  };
11146
11199
  }
@@ -11470,13 +11523,10 @@ chartJsExtensionRegistry.add("chartBackgroundPlugin", {
11470
11523
  });
11471
11524
  var ChartJsComponent = class extends Component {
11472
11525
  static template = "o-spreadsheet-ChartJsComponent";
11473
- static props = {
11474
- chartId: String,
11475
- isFullScreen: {
11476
- type: Boolean,
11477
- optional: true
11478
- }
11479
- };
11526
+ props = (0, _odoo_owl.props)({
11527
+ chartId: _odoo_owl.types.string(),
11528
+ "isFullScreen?": _odoo_owl.types.boolean()
11529
+ });
11480
11530
  canvas = (0, _odoo_owl.signal)(null);
11481
11531
  chart;
11482
11532
  currentRuntime;
@@ -12079,35 +12129,35 @@ var ScorecardChartConfigBuilder = class {
12079
12129
  if (this.runtime.progressBar) baselineValueFontSize /= 1.5;
12080
12130
  return {
12081
12131
  title: {
12082
- font: getDefaultContextFont(this.runtime.title.fontSize ?? 14, this.runtime.title.bold, this.runtime.title.italic),
12132
+ font: getDefaultContextFont(fontSizeInPixels(this.runtime.title.fontSize ?? 14), this.runtime.title.bold, this.runtime.title.italic),
12083
12133
  color: this.runtime.title.color ?? this.secondaryFontColor
12084
12134
  },
12085
12135
  keyValue: {
12086
12136
  color: this.runtime.keyValueStyle?.textColor || this.runtime.fontColor,
12087
- font: getDefaultContextFont(keyValueFontSize, this.runtime.keyValueStyle?.bold, this.runtime.keyValueStyle?.italic),
12137
+ font: getDefaultContextFont(fontSizeInPixels(keyValueFontSize), this.runtime.keyValueStyle?.bold, this.runtime.keyValueStyle?.italic),
12088
12138
  strikethrough: this.runtime.keyValueStyle?.strikethrough,
12089
12139
  underline: this.runtime.keyValueStyle?.underline
12090
12140
  },
12091
12141
  keyDescr: {
12092
12142
  color: this.runtime.keyValueDescrStyle?.textColor || this.runtime.fontColor,
12093
- font: getDefaultContextFont(keyValueDescrFontSize, this.runtime.keyValueDescrStyle?.bold, this.runtime.keyValueDescrStyle?.italic),
12143
+ font: getDefaultContextFont(fontSizeInPixels(keyValueDescrFontSize), this.runtime.keyValueDescrStyle?.bold, this.runtime.keyValueDescrStyle?.italic),
12094
12144
  strikethrough: this.runtime.keyValueDescrStyle?.strikethrough,
12095
12145
  underline: this.runtime.keyValueDescrStyle?.underline
12096
12146
  },
12097
12147
  baselineValue: {
12098
- font: getDefaultContextFont(baselineValueFontSize, this.runtime.baselineStyle?.bold, this.runtime.baselineStyle?.italic),
12148
+ font: getDefaultContextFont(fontSizeInPixels(baselineValueFontSize), this.runtime.baselineStyle?.bold, this.runtime.baselineStyle?.italic),
12099
12149
  strikethrough: this.runtime.baselineStyle?.strikethrough,
12100
12150
  underline: this.runtime.baselineStyle?.underline,
12101
12151
  color: this.runtime.baselineColor || this.runtime.baselineStyle?.textColor || this.secondaryFontColor
12102
12152
  },
12103
12153
  baselineDescr: {
12104
- font: getDefaultContextFont(baselineDescrFontSize, this.runtime.baselineDescrStyle?.bold, this.runtime.baselineDescrStyle?.italic),
12154
+ font: getDefaultContextFont(fontSizeInPixels(baselineDescrFontSize), this.runtime.baselineDescrStyle?.bold, this.runtime.baselineDescrStyle?.italic),
12105
12155
  strikethrough: this.runtime.baselineDescrStyle?.strikethrough,
12106
12156
  underline: this.runtime.baselineDescrStyle?.underline,
12107
12157
  color: this.runtime.baselineDescrStyle?.textColor ?? this.secondaryFontColor
12108
12158
  },
12109
12159
  baselineArrow: this.baselineArrow === "neutral" || this.runtime.progressBar ? void 0 : {
12110
- size: this.keyValue ? .8 * baselineValueFontSize : 0,
12160
+ size: this.keyValue ? .8 * fontSizeInPixels(baselineValueFontSize) : 0,
12111
12161
  color: this.runtime.baselineColor || this.runtime.baselineStyle?.textColor || this.secondaryFontColor
12112
12162
  }
12113
12163
  };
@@ -12172,13 +12222,10 @@ function getZoomTargetPosition(ev, zoom) {
12172
12222
  //#region src/components/figures/chart/scorecard/chart_scorecard.ts
12173
12223
  var ScorecardChart = class extends Component {
12174
12224
  static template = "o-spreadsheet-ScorecardChart";
12175
- static props = {
12176
- chartId: String,
12177
- isFullScreen: {
12178
- type: Boolean,
12179
- optional: true
12180
- }
12181
- };
12225
+ props = (0, _odoo_owl.props)({
12226
+ chartId: _odoo_owl.types.string(),
12227
+ "isFullScreen?": _odoo_owl.types.boolean()
12228
+ });
12182
12229
  canvas = (0, _odoo_owl.signal)(null);
12183
12230
  get runtime() {
12184
12231
  return this.env.model.getters.getChartRuntime(this.props.chartId);
@@ -12320,7 +12367,7 @@ function drawInflectionValues(ctx, config) {
12320
12367
  function drawTitle(ctx, config) {
12321
12368
  ctx.save();
12322
12369
  const title = config.title;
12323
- ctx.font = getDefaultContextFont(title.fontSize, title.bold, title.italic);
12370
+ ctx.font = getDefaultContextFont(fontSizeInPixels(title.fontSize), title.bold, title.italic);
12324
12371
  ctx.textBaseline = "middle";
12325
12372
  ctx.fillStyle = title.color;
12326
12373
  ctx.fillText(title.label, title.textPosition.x, title.textPosition.y);
@@ -12354,8 +12401,8 @@ function getGaugeRenderingConfig(boundingRect, runtime, ctx) {
12354
12401
  const inflectionValues = getInflectionValues(runtime, gaugeRect, textColor, ctx);
12355
12402
  let x = 0, titleWidth = 0, titleHeight = 0;
12356
12403
  if (runtime.title.text) ({width: titleWidth, height: titleHeight} = computeTextDimension(ctx, runtime.title.text, {
12357
- fontSize: 16,
12358
- ...runtime.title
12404
+ ...runtime.title,
12405
+ fontSize: fontSizeInPixels(runtime.title.fontSize ?? 16)
12359
12406
  }, "px"));
12360
12407
  switch (runtime.title.align) {
12361
12408
  case "right":
@@ -13864,13 +13911,10 @@ function hasIconLayoutChange(newBox, oldBox) {
13864
13911
  const ANIMATION_DURATION = 1e3;
13865
13912
  var GaugeChartComponent = class extends Component {
13866
13913
  static template = "o-spreadsheet-GaugeChartComponent";
13867
- static props = {
13868
- chartId: String,
13869
- isFullScreen: {
13870
- type: Boolean,
13871
- optional: true
13872
- }
13873
- };
13914
+ props = (0, _odoo_owl.props)({
13915
+ chartId: _odoo_owl.types.string(),
13916
+ "isFullScreen?": _odoo_owl.types.boolean()
13917
+ });
13874
13918
  canvas = (0, _odoo_owl.signal)(null);
13875
13919
  animationStore;
13876
13920
  get runtime() {
@@ -13881,10 +13925,10 @@ var GaugeChartComponent = class extends Component {
13881
13925
  let animation = null;
13882
13926
  let lastRuntime = void 0;
13883
13927
  useLayoutEffect(() => {
13884
- if (this.env.isDashboard() && lastRuntime === void 0 && this.animationStore?.animationPlayed[this.animationChartId] !== "gauge") {
13928
+ if (this.env.model.getters.isDashboard() && lastRuntime === void 0 && this.animationStore?.animationPlayed[this.animationChartId] !== "gauge") {
13885
13929
  animation = this.drawGaugeWithAnimation();
13886
13930
  this.animationStore?.disableAnimationForChart(this.animationChartId, "gauge");
13887
- } else if (this.env.isDashboard() && lastRuntime !== void 0 && !deepEquals(this.runtime, lastRuntime)) {
13931
+ } else if (this.env.model.getters.isDashboard() && lastRuntime !== void 0 && !deepEquals(this.runtime, lastRuntime)) {
13888
13932
  animation = this.drawGaugeWithAnimation();
13889
13933
  this.animationStore?.disableAnimationForChart(this.animationChartId, "gauge");
13890
13934
  } else {
@@ -14141,52 +14185,201 @@ function useTimeOut() {
14141
14185
  };
14142
14186
  }
14143
14187
 
14188
+ //#endregion
14189
+ //#region src/components/props_validation.ts
14190
+ /**
14191
+ * Validate that a prop is a number, but with a more specific type than just `number` (e.g. `Pixel`).
14192
+ */
14193
+ function validateNumber() {
14194
+ return _odoo_owl.types.number();
14195
+ }
14196
+ /**
14197
+ * Validate that a prop is a string, but with a more specific type than just `string` (e.g. `Color`).
14198
+ */
14199
+ function validateString() {
14200
+ return _odoo_owl.types.string();
14201
+ }
14202
+ /**
14203
+ * Validate that a prop is an object, but with a more specific type than just `object` (e.g. `ActionSpec`).
14204
+ */
14205
+ function validateObject() {
14206
+ return _odoo_owl.types.object();
14207
+ }
14208
+ /**
14209
+ * Validate that a prop is an array, but with a more specific element type than `any[]`.
14210
+ */
14211
+ function validateArrayOf() {
14212
+ return _odoo_owl.types.array();
14213
+ }
14214
+ /**
14215
+ * Validate that a prop is a record (string-keyed dictionary), but with a more
14216
+ * specific value type than `any`.
14217
+ */
14218
+ function validateRecordOf() {
14219
+ return _odoo_owl.types.record();
14220
+ }
14221
+ /**
14222
+ * Validate that a prop is a `Set`, typed with a specific element type.
14223
+ */
14224
+ function validateSetOf() {
14225
+ return _odoo_owl.types.instanceOf(Set);
14226
+ }
14227
+ function validateRect() {
14228
+ return _odoo_owl.types.object({
14229
+ x: _odoo_owl.types.number(),
14230
+ y: _odoo_owl.types.number(),
14231
+ width: _odoo_owl.types.number(),
14232
+ height: _odoo_owl.types.number()
14233
+ });
14234
+ }
14235
+ function validateBorderPosition() {
14236
+ return _odoo_owl.types.customValidator(validateString(), (position) => borderPositions.includes(position));
14237
+ }
14238
+ function validateBorderStyle() {
14239
+ return _odoo_owl.types.customValidator(validateString(), (style) => borderStyles.includes(style));
14240
+ }
14241
+ function validateDOMCoordinates() {
14242
+ return _odoo_owl.types.object({
14243
+ x: _odoo_owl.types.number(),
14244
+ y: _odoo_owl.types.number()
14245
+ });
14246
+ }
14247
+ function validateDOMDimension() {
14248
+ return _odoo_owl.types.object({
14249
+ width: _odoo_owl.types.number(),
14250
+ height: _odoo_owl.types.number()
14251
+ });
14252
+ }
14253
+ function validateSortDirection() {
14254
+ return _odoo_owl.types.customValidator(validateString(), (direction) => ["asc", "desc"].includes(direction));
14255
+ }
14256
+ function validateResizeDirection() {
14257
+ return _odoo_owl.types.customValidator(validateNumber(), (direction) => [
14258
+ -1,
14259
+ 0,
14260
+ 1
14261
+ ].includes(direction));
14262
+ }
14263
+ function validateComposerFocusType() {
14264
+ return _odoo_owl.types.customValidator(validateString(), (value) => composerFocusTypes.includes(value));
14265
+ }
14266
+ function validateDimension() {
14267
+ return _odoo_owl.types.customValidator(validateString(), (value) => ["COL", "ROW"].includes(value));
14268
+ }
14269
+ function validateContextMenuType() {
14270
+ return _odoo_owl.types.customValidator(validateString(), (value) => [
14271
+ "ROW",
14272
+ "COL",
14273
+ "CELL",
14274
+ "FILTER",
14275
+ "GROUP_HEADERS",
14276
+ "UNGROUP_HEADERS"
14277
+ ].includes(value));
14278
+ }
14279
+ /**
14280
+ * Validate that a prop is a store. Typed as the CQS-wrapped `Store<T>` to
14281
+ * match what `useStore(...)` returns at the call site.
14282
+ */
14283
+ function validateStore() {
14284
+ return _odoo_owl.types.object();
14285
+ }
14286
+ const types$6 = {
14287
+ ..._odoo_owl.types,
14288
+ ArrayOf: validateArrayOf,
14289
+ RecordOf: validateRecordOf,
14290
+ SetOf: validateSetOf,
14291
+ GenericCriterionType: validateString,
14292
+ UID: validateString,
14293
+ CriterionFilter: validateObject,
14294
+ CSSProperties: validateObject,
14295
+ ResizeDirection: validateResizeDirection,
14296
+ FigureUI: validateObject,
14297
+ Token: validateObject,
14298
+ CellPosition: validateObject,
14299
+ AutoCompleteProviderDefinition: validateObject,
14300
+ AutoCompleteProposal: validateObject,
14301
+ FunctionDescription: validateObject,
14302
+ Rect: validateRect,
14303
+ Pixel: validateNumber,
14304
+ HeaderIndex: validateNumber,
14305
+ BorderPosition: validateBorderPosition,
14306
+ BorderStyle: validateBorderStyle,
14307
+ Color: validateString,
14308
+ ActionSpec: validateObject,
14309
+ DOMCoordinates: validateDOMCoordinates,
14310
+ DOMDimension: validateDOMDimension,
14311
+ ComposerFocusType: validateComposerFocusType,
14312
+ SortDirection: validateSortDirection,
14313
+ Store: validateStore,
14314
+ Position: validateObject,
14315
+ PivotCoreDefinition: validateObject,
14316
+ PivotField: validateObject,
14317
+ PivotDimension: validateObject,
14318
+ PivotMeasure: validateObject,
14319
+ PivotCoreMeasure: validateObject,
14320
+ PivotCustomGroupedField: validateObject,
14321
+ PivotRuntimeDefinition: validateObject,
14322
+ PivotFilter: validateObject,
14323
+ DataFilterValue: validateObject,
14324
+ SpreadsheetPivotCoreDefinition: validateObject,
14325
+ ComposerSelection: validateObject,
14326
+ Action: validateObject,
14327
+ MenuItemOrSeparator: validateObject,
14328
+ Model: validateObject,
14329
+ DispatchResult: validateObject,
14330
+ Zone: validateObject,
14331
+ Range: validateObject,
14332
+ HeaderGroup: validateObject,
14333
+ GridClickModifiers: validateObject,
14334
+ ZoomedMouseEvent: validateObject,
14335
+ ConditionalFormat: validateObject,
14336
+ ColorScaleThreshold: validateObject,
14337
+ Table: validateObject,
14338
+ CoreTable: validateObject,
14339
+ TableConfig: validateObject,
14340
+ TableStyle: validateObject,
14341
+ TitleDesign: validateObject,
14342
+ ChartDefinition: validateObject,
14343
+ ChartDefinitionWithDataSource: validateObject,
14344
+ ChartWithAxisDefinition: validateObject,
14345
+ ChartStyle: validateObject,
14346
+ ChartColorScale: validateObject,
14347
+ ChartRangeDataSource: validateObject,
14348
+ DataSetStyle: validateObject,
14349
+ GeoChartDefinition: validateObject,
14350
+ FunnelChartDefinition: validateObject,
14351
+ TreeMapChartDefinition: validateObject,
14352
+ TreeMapCategoryColorOptions: validateObject,
14353
+ TreeMapColorScaleOptions: validateObject,
14354
+ NamedRange: validateObject,
14355
+ DataValidationRule: validateObject,
14356
+ InformationNotification: validateObject,
14357
+ NotificationStoreMethods: validateObject,
14358
+ SidePanelContent: validateObject,
14359
+ SidePanelComponentProps: validateObject,
14360
+ DataValidationCriterionType: validateString,
14361
+ Dimension: validateDimension,
14362
+ ContextMenuType: validateContextMenuType
14363
+ };
14364
+
14144
14365
  //#endregion
14145
14366
  //#region src/components/menu/menu.ts
14146
14367
  var Menu = class extends Component {
14147
14368
  static template = "o-spreadsheet-Menu";
14148
- static props = {
14149
- menuItems: Array,
14150
- onClose: Function,
14151
- onClickMenu: {
14152
- type: Function,
14153
- optional: true
14154
- },
14155
- onMouseEnter: {
14156
- type: Function,
14157
- optional: true
14158
- },
14159
- onMouseLeave: {
14160
- type: Function,
14161
- optional: true
14162
- },
14163
- width: {
14164
- type: Number,
14165
- optional: true
14166
- },
14167
- hoveredMenuId: {
14168
- type: String,
14169
- optional: true
14170
- },
14171
- isHoveredMenuFocused: {
14172
- type: Boolean,
14173
- optional: true
14174
- },
14175
- onScroll: {
14176
- type: Function,
14177
- optional: true
14178
- },
14179
- onKeyDown: {
14180
- type: Function,
14181
- optional: true
14182
- },
14183
- disableKeyboardNavigation: {
14184
- type: Boolean,
14185
- optional: true
14186
- }
14187
- };
14188
14369
  static components = {};
14189
- static defaultProps = {};
14370
+ props = (0, _odoo_owl.props)({
14371
+ menuItems: types$6.ArrayOf(),
14372
+ onClose: types$6.function([]),
14373
+ "onClickMenu?": types$6.function([types$6.Action(), types$6.instanceOf(PointerEvent)]),
14374
+ "onMouseEnter?": types$6.function([types$6.Action(), types$6.instanceOf(PointerEvent)]),
14375
+ "onMouseLeave?": types$6.function([types$6.Action(), types$6.instanceOf(PointerEvent)]),
14376
+ "width?": types$6.number(),
14377
+ "hoveredMenuId?": types$6.string(),
14378
+ "isHoveredMenuFocused?": types$6.boolean(),
14379
+ "onScroll?": types$6.function([types$6.instanceOf(CustomEvent)]),
14380
+ "onKeyDown?": types$6.function([types$6.instanceOf(KeyboardEvent)]),
14381
+ "disableKeyboardNavigation?": types$6.boolean()
14382
+ });
14190
14383
  menuRef = (0, _odoo_owl.signal)(null);
14191
14384
  setup() {
14192
14385
  useLayoutEffect(() => {
@@ -14324,57 +14517,25 @@ function usePopoverContainer() {
14324
14517
  //#region src/components/popover/popover.ts
14325
14518
  var Popover = class extends Component {
14326
14519
  static template = "o-spreadsheet-Popover";
14327
- static props = {
14328
- anchorRect: Object,
14329
- containerRect: {
14330
- type: Object,
14331
- optional: true
14332
- },
14333
- positioning: {
14334
- type: String,
14335
- optional: true
14336
- },
14337
- maxWidth: {
14338
- type: Number,
14339
- optional: true
14340
- },
14341
- maxHeight: {
14342
- type: Number,
14343
- optional: true
14344
- },
14345
- verticalOffset: {
14346
- type: Number,
14347
- optional: true
14348
- },
14349
- onMouseWheel: {
14350
- type: Function,
14351
- optional: true
14352
- },
14353
- onPopoverHidden: {
14354
- type: Function,
14355
- optional: true
14356
- },
14357
- onPopoverMoved: {
14358
- type: Function,
14359
- optional: true
14360
- },
14361
- zIndex: {
14362
- type: Number,
14363
- optional: true
14364
- },
14365
- class: {
14366
- type: String,
14367
- optional: true
14368
- },
14369
- slots: Object
14370
- };
14371
- static defaultProps = {
14520
+ props = (0, _odoo_owl.props)({
14521
+ anchorRect: types$6.Rect(),
14522
+ "containerRect?": types$6.object({}),
14523
+ "positioning?": types$6.or([types$6.literal("top-right"), types$6.literal("bottom-left")]),
14524
+ "maxWidth?": types$6.Pixel(),
14525
+ "maxHeight?": types$6.Pixel(),
14526
+ "verticalOffset?": types$6.number(),
14527
+ "onMouseWheel?": types$6.function([]),
14528
+ "onPopoverHidden?": types$6.function([]),
14529
+ "onPopoverMoved?": types$6.function([]),
14530
+ "zIndex?": types$6.number(),
14531
+ "class?": types$6.string()
14532
+ }, {
14372
14533
  positioning: "bottom-left",
14373
14534
  verticalOffset: 0,
14374
14535
  onMouseWheel: () => {},
14375
14536
  onPopoverMoved: () => {},
14376
14537
  onPopoverHidden: () => {}
14377
- };
14538
+ });
14378
14539
  popoverRef = (0, _odoo_owl.signal)(null);
14379
14540
  popoverContentRef = (0, _odoo_owl.signal)(null);
14380
14541
  currentPosition = void 0;
@@ -14536,60 +14697,29 @@ var TopRightPopoverContext = class extends PopoverPositionContext {
14536
14697
  const TIMEOUT_DELAY = 250;
14537
14698
  var MenuPopover = class MenuPopover extends Component {
14538
14699
  static template = "o-spreadsheet-Menu-Popover";
14539
- static props = {
14540
- anchorRect: Object,
14541
- popoverPositioning: {
14542
- type: String,
14543
- optional: true
14544
- },
14545
- menuItems: Array,
14546
- depth: {
14547
- type: Number,
14548
- optional: true
14549
- },
14550
- maxHeight: {
14551
- type: Number,
14552
- optional: true
14553
- },
14554
- onClose: Function,
14555
- onMenuClicked: {
14556
- type: Function,
14557
- optional: true
14558
- },
14559
- menuId: {
14560
- type: String,
14561
- optional: true
14562
- },
14563
- onMouseOver: {
14564
- type: Function,
14565
- optional: true
14566
- },
14567
- width: {
14568
- type: Number,
14569
- optional: true
14570
- },
14571
- autoSelectFirstItem: {
14572
- type: Boolean,
14573
- optional: true
14574
- },
14575
- disableKeyboardNavigation: {
14576
- type: Boolean,
14577
- optional: true
14578
- },
14579
- onKeyboardNavigation: {
14580
- type: Function,
14581
- optional: true
14582
- }
14583
- };
14584
14700
  static components = {
14585
14701
  MenuPopover,
14586
14702
  Menu,
14587
14703
  Popover
14588
14704
  };
14589
- static defaultProps = {
14705
+ props = (0, _odoo_owl.props)({
14706
+ anchorRect: types$6.Rect(),
14707
+ "popoverPositioning?": types$6.or([types$6.literal("top-right"), types$6.literal("bottom-left")]),
14708
+ menuItems: types$6.ArrayOf(),
14709
+ "depth?": types$6.number(),
14710
+ "maxHeight?": types$6.Pixel(),
14711
+ onClose: types$6.function([]),
14712
+ "onMenuClicked?": types$6.function([types$6.instanceOf(CustomEvent)]),
14713
+ "menuId?": types$6.UID(),
14714
+ "onMouseOver?": types$6.function([]),
14715
+ "width?": types$6.number(),
14716
+ "autoSelectFirstItem?": types$6.boolean(),
14717
+ "disableKeyboardNavigation?": types$6.boolean(),
14718
+ "onKeyboardNavigation?": types$6.function([types$6.instanceOf(KeyboardEvent)])
14719
+ }, {
14590
14720
  depth: 0,
14591
14721
  popoverPositioning: "top-right"
14592
- };
14722
+ });
14593
14723
  subMenu = (0, _odoo_owl.proxy)({
14594
14724
  isOpen: false,
14595
14725
  anchorRect: null,
@@ -14829,31 +14959,16 @@ var MenuPopover = class MenuPopover extends Component {
14829
14959
  //#region src/components/select/select.ts
14830
14960
  var Select = class extends Component {
14831
14961
  static template = "o-spreadsheet-Select";
14832
- static props = {
14833
- onChange: Function,
14834
- values: Array,
14835
- selectedValue: {
14836
- type: String,
14837
- optional: true
14838
- },
14839
- class: {
14840
- type: String,
14841
- optional: true
14842
- },
14843
- popoverClass: {
14844
- type: String,
14845
- optional: true
14846
- },
14847
- name: {
14848
- type: String,
14849
- optional: true
14850
- },
14851
- title: {
14852
- type: String,
14853
- optional: true
14854
- }
14855
- };
14856
14962
  static components = { Popover };
14963
+ props = (0, _odoo_owl.props)({
14964
+ onChange: types$6.function([types$6.string()]),
14965
+ values: types$6.array(),
14966
+ "selectedValue?": types$6.string(),
14967
+ "class?": types$6.string(),
14968
+ "popoverClass?": types$6.string(),
14969
+ "name?": types$6.string(),
14970
+ "title?": types$6.string()
14971
+ });
14857
14972
  selectRef = (0, _odoo_owl.signal)(null);
14858
14973
  dropdownRef = (0, _odoo_owl.signal)(null);
14859
14974
  state = (0, _odoo_owl.proxy)({
@@ -14959,14 +15074,10 @@ var ChartDashboardMenu = class extends Component {
14959
15074
  MenuPopover,
14960
15075
  Select
14961
15076
  };
14962
- static props = {
14963
- chartId: String,
14964
- hasFullScreenButton: {
14965
- type: Boolean,
14966
- optional: true
14967
- }
14968
- };
14969
- static defaultProps = { hasFullScreenButton: true };
15077
+ props = (0, _odoo_owl.props)({
15078
+ chartId: types$6.UID(),
15079
+ "hasFullScreenButton?": types$6.boolean()
15080
+ }, { hasFullScreenButton: true });
14970
15081
  fullScreenFigureStore;
14971
15082
  menuState = (0, _odoo_owl.proxy)({
14972
15083
  isOpen: false,
@@ -15029,25 +15140,16 @@ var ChartDashboardMenu = class extends Component {
15029
15140
  //#region src/components/figures/figure_carousel/figure_carousel.ts
15030
15141
  var CarouselFigure = class extends Component {
15031
15142
  static template = "o-spreadsheet-CarouselFigure";
15032
- static props = {
15033
- figureUI: Object,
15034
- editFigureStyle: {
15035
- type: Function,
15036
- optional: true
15037
- },
15038
- isFullScreen: {
15039
- type: Boolean,
15040
- optional: true
15041
- },
15042
- openContextMenu: {
15043
- type: Function,
15044
- optional: true
15045
- }
15046
- };
15047
15143
  static components = {
15048
15144
  ChartDashboardMenu,
15049
15145
  MenuPopover
15050
15146
  };
15147
+ props = (0, _odoo_owl.props)({
15148
+ figureUI: types$6.FigureUI(),
15149
+ "editFigureStyle?": types$6.function([types$6.CSSProperties()]),
15150
+ "isFullScreen?": types$6.boolean(),
15151
+ "openContextMenu?": types$6.function([types$6.Rect(), types$6.function([])])
15152
+ });
15051
15153
  carouselTabsRef = (0, _odoo_owl.signal)(null);
15052
15154
  carouselTabsDropdownRef = (0, _odoo_owl.signal)(null);
15053
15155
  menuState = (0, _odoo_owl.proxy)({
@@ -15117,10 +15219,12 @@ var CarouselFigure = class extends Component {
15117
15219
  return this.carousel.title?.text ?? "";
15118
15220
  }
15119
15221
  get titleStyle() {
15120
- return cssPropertiesToCss(cellTextStyleToCss(chartStyleToCellStyle({
15222
+ const style = {
15121
15223
  ...DEFAULT_CAROUSEL_TITLE_STYLE,
15122
15224
  ...this.carousel.title
15123
- })));
15225
+ };
15226
+ style.fontSize = fontSizeInPixels(style.fontSize ?? 16);
15227
+ return cssPropertiesToCss(cellTextStyleToCss(chartStyleToCellStyle(style)));
15124
15228
  }
15125
15229
  updateTabsVisibility() {
15126
15230
  const tabsContainerEl = this.carouselTabsRef();
@@ -15180,22 +15284,13 @@ var CarouselFigure = class extends Component {
15180
15284
  //#region src/components/figures/figure_chart/figure_chart.ts
15181
15285
  var ChartFigure = class extends Component {
15182
15286
  static template = "o-spreadsheet-ChartFigure";
15183
- static props = {
15184
- figureUI: Object,
15185
- editFigureStyle: {
15186
- type: Function,
15187
- optional: true
15188
- },
15189
- isFullScreen: {
15190
- type: Boolean,
15191
- optional: true
15192
- },
15193
- openContextMenu: {
15194
- type: Function,
15195
- optional: true
15196
- }
15197
- };
15198
15287
  static components = { ChartDashboardMenu };
15288
+ props = (0, _odoo_owl.props)({
15289
+ figureUI: types$6.FigureUI(),
15290
+ "editFigureStyle?": types$6.function([types$6.CSSProperties()]),
15291
+ "isFullScreen?": types$6.boolean(),
15292
+ "openContextMenu?": types$6.function([types$6.Rect(), types$6.function([])])
15293
+ });
15199
15294
  onDoubleClick() {
15200
15295
  this.env.model.dispatch("SELECT_FIGURE", { figureId: this.props.figureUI.id });
15201
15296
  this.env.openSidePanel("ChartPanel");
@@ -15220,18 +15315,12 @@ var ChartFigure = class extends Component {
15220
15315
  //#region src/components/figures/figure_image/figure_image.ts
15221
15316
  var ImageFigure = class extends Component {
15222
15317
  static template = "o-spreadsheet-ImageFigure";
15223
- static props = {
15224
- figureUI: Object,
15225
- editFigureStyle: {
15226
- type: Function,
15227
- optional: true
15228
- },
15229
- openContextMenu: {
15230
- type: Function,
15231
- optional: true
15232
- }
15233
- };
15234
15318
  static components = {};
15319
+ props = (0, _odoo_owl.props)({
15320
+ figureUI: types$6.FigureUI(),
15321
+ "editFigureStyle?": types$6.function([types$6.CSSProperties()]),
15322
+ "openContextMenu?": types$6.function([types$6.Rect(), types$6.function([])])
15323
+ });
15235
15324
  get figureId() {
15236
15325
  return this.props.figureUI.id;
15237
15326
  }
@@ -15267,30 +15356,21 @@ const BORDER_WIDTH = 1;
15267
15356
  const ACTIVE_BORDER_WIDTH = 2;
15268
15357
  var FigureComponent = class extends Component {
15269
15358
  static template = "o-spreadsheet-FigureComponent";
15270
- static props = {
15271
- figureUI: Object,
15272
- style: {
15273
- type: String,
15274
- optional: true
15275
- },
15276
- class: {
15277
- type: String,
15278
- optional: true
15279
- },
15280
- onMouseDown: {
15281
- type: Function,
15282
- optional: true
15283
- },
15284
- onClickAnchor: {
15285
- type: Function,
15286
- optional: true
15287
- }
15288
- };
15289
15359
  static components = { MenuPopover };
15290
- static defaultProps = {
15360
+ props = (0, _odoo_owl.props)({
15361
+ figureUI: types$6.FigureUI(),
15362
+ style: types$6.string(),
15363
+ class: types$6.string(),
15364
+ "onMouseDown?": types$6.function([types$6.instanceOf(MouseEvent)]),
15365
+ "onClickAnchor?": types$6.function([
15366
+ types$6.ResizeDirection(),
15367
+ types$6.ResizeDirection(),
15368
+ types$6.instanceOf(MouseEvent)
15369
+ ])
15370
+ }, {
15291
15371
  onMouseDown: () => {},
15292
15372
  onClickAnchor: () => {}
15293
- };
15373
+ });
15294
15374
  menuState = (0, _odoo_owl.proxy)({
15295
15375
  isOpen: false,
15296
15376
  anchorRect: null,
@@ -15307,7 +15387,7 @@ var FigureComponent = class extends Component {
15307
15387
  return figureRegistry;
15308
15388
  }
15309
15389
  getBorderWidth() {
15310
- if (this.env.isDashboard()) return 0;
15390
+ if (this.env.model.getters.isDashboard()) return 0;
15311
15391
  return this.isSelected ? ACTIVE_BORDER_WIDTH : this.borderWidth;
15312
15392
  }
15313
15393
  getBorderStyle(position) {
@@ -15449,7 +15529,7 @@ var FigureComponent = class extends Component {
15449
15529
  };
15450
15530
  }
15451
15531
  onContextMenu(ev) {
15452
- if (this.env.isDashboard()) return;
15532
+ if (this.env.model.getters.isDashboard()) return;
15453
15533
  const zoomedMouseEvent = withZoom(this.env, ev);
15454
15534
  this.openContextMenu({
15455
15535
  x: zoomedMouseEvent.clientX,
@@ -15475,7 +15555,7 @@ var FigureComponent = class extends Component {
15475
15555
  if (el) for (const property in properties) el.style.setProperty(property, properties[property] || null);
15476
15556
  }
15477
15557
  get isFigureResizable() {
15478
- return this.isSelected && !this.env.isMobile() && !this.env.isDashboard() && !this.env.model.getters.isCurrentSheetLocked();
15558
+ return this.isSelected && !this.env.isMobile() && !this.env.model.getters.isDashboard() && !this.env.model.getters.isCurrentSheetLocked();
15479
15559
  }
15480
15560
  };
15481
15561
 
@@ -21764,7 +21844,7 @@ function changeCalculatedMeasuresOnMeasureChange(oldMeasure, newMeasure, measure
21764
21844
  return measures.map((measure) => {
21765
21845
  if (measure.id === oldMeasure.id) return newMeasure;
21766
21846
  else if (!measure.computedBy || oldMeasure.id === newMeasure.id) return measure;
21767
- const newFormula = tokenize(measure.computedBy.formula).map((token) => token.type === "SYMBOL" && token.value === getCanonicalSymbolName(oldMeasure.id) ? getCanonicalSymbolName(newMeasure.id) : token.value).join("");
21847
+ const newFormula = replaceSymbolInFormula(measure.computedBy.formula, oldMeasure.id, newMeasure.id);
21768
21848
  return {
21769
21849
  ...measure,
21770
21850
  computedBy: {
@@ -24405,51 +24485,22 @@ function useAutofocus(ref) {
24405
24485
 
24406
24486
  //#endregion
24407
24487
  //#region src/components/generic_input/generic_input.ts
24488
+ const genericInputPropsDefinition = {
24489
+ value: types$6.or([types$6.number(), types$6.string()]),
24490
+ onChange: types$6.function([types$6.string()]),
24491
+ "onFocused?": types$6.function([]),
24492
+ "onBlur?": types$6.function([]),
24493
+ "onInput?": types$6.function([types$6.string()]),
24494
+ "class?": types$6.string(),
24495
+ "id?": types$6.string(),
24496
+ "placeholder?": types$6.string(),
24497
+ "autofocus?": types$6.boolean(),
24498
+ "alwaysShowBorder?": types$6.boolean(),
24499
+ "selectContentOnFocus?": types$6.boolean(),
24500
+ "resetOnBlur?": types$6.boolean()
24501
+ };
24408
24502
  var GenericInput = class extends Component {
24409
- static props = {
24410
- value: [Number, String],
24411
- onChange: Function,
24412
- onFocused: {
24413
- type: Function,
24414
- optional: true
24415
- },
24416
- onBlur: {
24417
- type: Function,
24418
- optional: true
24419
- },
24420
- onInput: {
24421
- type: Function,
24422
- optional: true
24423
- },
24424
- class: {
24425
- type: String,
24426
- optional: true
24427
- },
24428
- id: {
24429
- type: String,
24430
- optional: true
24431
- },
24432
- placeholder: {
24433
- type: String,
24434
- optional: true
24435
- },
24436
- autofocus: {
24437
- type: Boolean,
24438
- optional: true
24439
- },
24440
- alwaysShowBorder: {
24441
- type: Boolean,
24442
- optional: true
24443
- },
24444
- selectContentOnFocus: {
24445
- type: Boolean,
24446
- optional: true
24447
- },
24448
- resetOnBlur: {
24449
- type: Boolean,
24450
- optional: true
24451
- }
24452
- };
24503
+ props = (0, _odoo_owl.props)(genericInputPropsDefinition);
24453
24504
  genericInputRef = (0, _odoo_owl.signal)(null);
24454
24505
  lastOnChangeValue = this.props.value.toString();
24455
24506
  setup() {
@@ -24532,13 +24583,11 @@ var GenericInput = class extends Component {
24532
24583
  var TextInput = class extends GenericInput {
24533
24584
  static template = "o-spreadsheet-TextInput";
24534
24585
  static components = {};
24535
- static props = {
24536
- ...GenericInput.props,
24537
- errorMessage: {
24538
- type: String,
24539
- optional: true
24540
- }
24541
- };
24586
+ props = (0, _odoo_owl.props)({
24587
+ ...genericInputPropsDefinition,
24588
+ value: types$6.string(),
24589
+ "errorMessage?": types$6.string()
24590
+ });
24542
24591
  get inputClass() {
24543
24592
  return [
24544
24593
  this.props.class,
@@ -24553,25 +24602,13 @@ var TextInput = class extends GenericInput {
24553
24602
  //#region src/components/action_button/action_button.ts
24554
24603
  var ActionButton = class extends Component {
24555
24604
  static template = "o-spreadsheet-ActionButton";
24556
- static props = {
24557
- action: Object,
24558
- hasTriangleDownIcon: {
24559
- type: Boolean,
24560
- optional: true
24561
- },
24562
- selectedColor: {
24563
- type: String,
24564
- optional: true
24565
- },
24566
- class: {
24567
- type: String,
24568
- optional: true
24569
- },
24570
- onClick: {
24571
- type: Function,
24572
- optional: true
24573
- }
24574
- };
24605
+ props = (0, _odoo_owl.props)({
24606
+ action: types$6.ActionSpec(),
24607
+ "hasTriangleDownIcon?": types$6.boolean(),
24608
+ "selectedColor?": types$6.string(),
24609
+ "class?": types$6.string(),
24610
+ "onClick?": types$6.function()
24611
+ });
24575
24612
  actionButton = createAction(this.props.action);
24576
24613
  setup() {
24577
24614
  (0, _odoo_owl.onWillUpdateProps)((nextProps) => {
@@ -24623,24 +24660,14 @@ const INNER_GRADIENT_WIDTH = CONTENT_WIDTH - 2 * ITEM_BORDER_WIDTH;
24623
24660
  const INNER_GRADIENT_HEIGHT = CONTENT_WIDTH - 30 - 2 * ITEM_BORDER_WIDTH;
24624
24661
  var ColorPicker = class extends Component {
24625
24662
  static template = "o-spreadsheet-ColorPicker";
24626
- static props = {
24627
- onColorPicked: Function,
24628
- currentColor: {
24629
- type: String,
24630
- optional: true
24631
- },
24632
- maxHeight: {
24633
- type: Number,
24634
- optional: true
24635
- },
24636
- anchorRect: Object,
24637
- disableNoColor: {
24638
- type: Boolean,
24639
- optional: true
24640
- }
24641
- };
24642
- static defaultProps = { currentColor: "" };
24643
24663
  static components = { Popover };
24664
+ props = (0, _odoo_owl.props)({
24665
+ onColorPicked: types$6.function([types$6.string()]),
24666
+ "currentColor?": types$6.string(),
24667
+ "maxHeight?": types$6.Pixel(),
24668
+ anchorRect: types$6.Rect(),
24669
+ "disableNoColor?": types$6.boolean()
24670
+ }, { currentColor: "" });
24644
24671
  COLORS = COLOR_PICKER_DEFAULTS;
24645
24672
  state = (0, _odoo_owl.proxy)({
24646
24673
  showGradient: false,
@@ -24784,33 +24811,18 @@ var ColorPicker = class extends Component {
24784
24811
  //#region src/components/color_picker/color_picker_widget.ts
24785
24812
  var ColorPickerWidget = class extends Component {
24786
24813
  static template = "o-spreadsheet-ColorPickerWidget";
24787
- static props = {
24788
- currentColor: {
24789
- type: String,
24790
- optional: true
24791
- },
24792
- toggleColorPicker: Function,
24793
- showColorPicker: Boolean,
24794
- onColorPicked: Function,
24795
- icon: String,
24796
- title: {
24797
- type: String,
24798
- optional: true
24799
- },
24800
- disabled: {
24801
- type: Boolean,
24802
- optional: true
24803
- },
24804
- dropdownMaxHeight: {
24805
- type: Number,
24806
- optional: true
24807
- },
24808
- class: {
24809
- type: String,
24810
- optional: true
24811
- }
24812
- };
24813
24814
  static components = { ColorPicker };
24815
+ props = (0, _odoo_owl.props)({
24816
+ "currentColor?": types$6.string(),
24817
+ toggleColorPicker: types$6.function([]),
24818
+ showColorPicker: types$6.boolean(),
24819
+ onColorPicked: types$6.function([types$6.string()]),
24820
+ icon: types$6.string(),
24821
+ "title?": types$6.string(),
24822
+ "disabled?": types$6.boolean(),
24823
+ "dropdownMaxHeight?": types$6.Pixel(),
24824
+ "class?": types$6.string()
24825
+ });
24814
24826
  colorPickerButtonRef = (0, _odoo_owl.signal)(null);
24815
24827
  get iconStyle() {
24816
24828
  return this.props.currentColor ? `border-color: ${this.props.currentColor}` : "border-bottom-style: hidden";
@@ -24824,29 +24836,19 @@ var ColorPickerWidget = class extends Component {
24824
24836
  //#region src/components/number_editor/number_editor.ts
24825
24837
  var NumberEditor = class extends Component {
24826
24838
  static template = "o-spreadsheet-NumberEditor";
24827
- static props = {
24828
- currentValue: Number,
24829
- onValueChange: Function,
24830
- onToggle: {
24831
- type: Function,
24832
- optional: true
24833
- },
24834
- onFocusInput: {
24835
- type: Function,
24836
- optional: true
24837
- },
24838
- class: String,
24839
- valueIcon: {
24840
- type: String,
24841
- optional: true
24842
- },
24843
- min: Number,
24844
- max: Number,
24845
- title: String,
24846
- valueList: Array
24847
- };
24848
- static defaultProps = { onFocusInput: () => {} };
24849
24839
  static components = { Popover };
24840
+ props = (0, _odoo_owl.props)({
24841
+ currentValue: types$6.number(),
24842
+ onValueChange: types$6.function([types$6.number()]),
24843
+ "onToggle?": types$6.function([]),
24844
+ "onFocusInput?": types$6.function([]),
24845
+ class: types$6.string(),
24846
+ "valueIcon?": types$6.string(),
24847
+ min: types$6.number(),
24848
+ max: types$6.number(),
24849
+ title: types$6.string(),
24850
+ valueList: types$6.array(types$6.number())
24851
+ }, { onFocusInput: () => {} });
24850
24852
  dropdown = (0, _odoo_owl.proxy)({ isOpen: false });
24851
24853
  inputRef = (0, _odoo_owl.signal)(null);
24852
24854
  rootEditorRef = (0, _odoo_owl.signal)(null);
@@ -24925,20 +24927,13 @@ var NumberEditor = class extends Component {
24925
24927
  var FontSizeEditor = class extends Component {
24926
24928
  static template = "o-spreadsheet-FontSizeEditor";
24927
24929
  static components = { NumberEditor };
24928
- static props = {
24929
- currentFontSize: Number,
24930
- onFontSizeChanged: Function,
24931
- onToggle: {
24932
- type: Function,
24933
- optional: true
24934
- },
24935
- onFocusInput: {
24936
- type: Function,
24937
- optional: true
24938
- },
24939
- class: String
24940
- };
24941
- static defaultProps = { onFocusInput: () => {} };
24930
+ props = (0, _odoo_owl.props)({
24931
+ currentFontSize: types$6.number(),
24932
+ onFontSizeChanged: types$6.function([types$6.number()]),
24933
+ "onToggle?": types$6.function([]),
24934
+ "onFocusInput?": types$6.function([]),
24935
+ class: types$6.string()
24936
+ }, { onFocusInput: () => {} });
24942
24937
  fontSizes = FONT_SIZES;
24943
24938
  };
24944
24939
 
@@ -24951,33 +24946,15 @@ var TextStyler = class extends Component {
24951
24946
  ActionButton,
24952
24947
  FontSizeEditor
24953
24948
  };
24954
- static props = {
24955
- style: Object,
24956
- updateStyle: {
24957
- type: Function,
24958
- optional: true
24959
- },
24960
- defaultStyle: {
24961
- type: Object,
24962
- optional: true
24963
- },
24964
- hasVerticalAlign: {
24965
- type: Boolean,
24966
- optional: true
24967
- },
24968
- hasHorizontalAlign: {
24969
- type: Boolean,
24970
- optional: true
24971
- },
24972
- hasBackgroundColor: {
24973
- type: Boolean,
24974
- optional: true
24975
- },
24976
- class: {
24977
- type: String,
24978
- optional: true
24979
- }
24980
- };
24949
+ props = (0, _odoo_owl.props)({
24950
+ style: types$6.ChartStyle(),
24951
+ updateStyle: types$6.function([types$6.ChartStyle()]),
24952
+ "defaultStyle?": types$6.object({}),
24953
+ "hasVerticalAlign?": types$6.boolean(),
24954
+ "hasHorizontalAlign?": types$6.boolean(),
24955
+ "hasBackgroundColor?": types$6.boolean(),
24956
+ "class?": types$6.string()
24957
+ });
24981
24958
  openedEl = null;
24982
24959
  setup() {
24983
24960
  useExternalListener(window, "click", this.onExternalClick);
@@ -25159,7 +25136,7 @@ var TextStyler = class extends Component {
25159
25136
  var CogWheelMenu = class extends Component {
25160
25137
  static template = "o-spreadsheet-CogWheelMenu";
25161
25138
  static components = { MenuPopover };
25162
- static props = { items: Array };
25139
+ props = (0, _odoo_owl.props)({ items: types$6.array(types$6.ActionSpec()) });
25163
25140
  buttonRef = (0, _odoo_owl.signal)(null);
25164
25141
  menuState = (0, _odoo_owl.proxy)({
25165
25142
  isOpen: false,
@@ -25179,33 +25156,27 @@ var CogWheelMenu = class extends Component {
25179
25156
  //#region src/components/side_panel/components/section/section.ts
25180
25157
  var Section = class extends Component {
25181
25158
  static template = "o_spreadsheet.Section";
25182
- static props = {
25183
- class: {
25184
- type: String,
25185
- optional: true
25186
- },
25187
- title: {
25188
- type: String,
25189
- optional: true
25190
- },
25191
- slots: Object
25192
- };
25159
+ props = (0, _odoo_owl.props)({
25160
+ "class?": types$6.string(),
25161
+ "title?": types$6.string(),
25162
+ slots: types$6.object()
25163
+ });
25193
25164
  };
25194
25165
 
25195
25166
  //#endregion
25196
25167
  //#region src/components/side_panel/carousel_panel/carousel_panel.ts
25197
25168
  var CarouselPanel = class extends Component {
25198
25169
  static template = "o-spreadsheet-CarouselPanel";
25199
- static props = {
25200
- onCloseSidePanel: Function,
25201
- figureId: String
25202
- };
25203
25170
  static components = {
25204
25171
  Section,
25205
25172
  TextInput,
25206
25173
  TextStyler,
25207
25174
  CogWheelMenu
25208
25175
  };
25176
+ props = (0, _odoo_owl.props)({
25177
+ onCloseSidePanel: types$6.function([]),
25178
+ figureId: types$6.UID()
25179
+ });
25209
25180
  DEFAULT_CAROUSEL_TITLE_STYLE = DEFAULT_CAROUSEL_TITLE_STYLE;
25210
25181
  dragAndDrop = useDragAndDropListItems();
25211
25182
  previewListRef = (0, _odoo_owl.signal)(null);
@@ -25412,34 +25383,15 @@ const chartDataSourceSidePanelComponentRegistry = new Registry();
25412
25383
  //#region src/components/side_panel/components/checkbox/checkbox.ts
25413
25384
  var Checkbox = class extends Component {
25414
25385
  static template = "o-spreadsheet.Checkbox";
25415
- static props = {
25416
- label: {
25417
- type: String,
25418
- optional: true
25419
- },
25420
- value: {
25421
- type: Boolean,
25422
- optional: true
25423
- },
25424
- className: {
25425
- type: String,
25426
- optional: true
25427
- },
25428
- name: {
25429
- type: String,
25430
- optional: true
25431
- },
25432
- title: {
25433
- type: String,
25434
- optional: true
25435
- },
25436
- disabled: {
25437
- type: Boolean,
25438
- optional: true
25439
- },
25440
- onChange: Function
25441
- };
25442
- static defaultProps = { value: false };
25386
+ props = (0, _odoo_owl.props)({
25387
+ "label?": types$6.string(),
25388
+ "value?": types$6.boolean(),
25389
+ "className?": types$6.string(),
25390
+ "name?": types$6.string(),
25391
+ "title?": types$6.string(),
25392
+ "disabled?": types$6.boolean(),
25393
+ onChange: types$6.function([types$6.boolean()])
25394
+ }, { value: false });
25443
25395
  onChange(ev) {
25444
25396
  const value = ev.target.checked;
25445
25397
  this.props.onChange(value);
@@ -25448,11 +25400,11 @@ var Checkbox = class extends Component {
25448
25400
 
25449
25401
  //#endregion
25450
25402
  //#region src/components/side_panel/chart/common.ts
25451
- const ChartSidePanelPropsObject = {
25452
- chartId: String,
25453
- definition: Object,
25454
- canUpdateChart: Function,
25455
- updateChart: Function
25403
+ const chartSidePanelPropsDefinition = {
25404
+ chartId: types$6.UID(),
25405
+ definition: types$6.object({}),
25406
+ canUpdateChart: types$6.function([types$6.UID(), types$6.object({})], types$6.DispatchResult()),
25407
+ updateChart: types$6.function([types$6.UID(), types$6.object({})], types$6.DispatchResult())
25456
25408
  };
25457
25409
 
25458
25410
  //#endregion
@@ -25940,63 +25892,25 @@ var SelectionInputStore = class extends SpreadsheetStore {
25940
25892
  */
25941
25893
  var SelectionInput = class extends Component {
25942
25894
  static template = "o-spreadsheet-SelectionInput";
25943
- static props = {
25944
- ranges: Array,
25945
- hasSingleRange: {
25946
- type: Boolean,
25947
- optional: true
25948
- },
25949
- required: {
25950
- type: Boolean,
25951
- optional: true
25952
- },
25953
- autofocus: {
25954
- type: Boolean,
25955
- optional: true
25956
- },
25957
- isInvalid: {
25958
- type: Boolean,
25959
- optional: true
25960
- },
25961
- class: {
25962
- type: String,
25963
- optional: true
25964
- },
25965
- onSelectionChanged: {
25966
- type: Function,
25967
- optional: true
25968
- },
25969
- onSelectionConfirmed: {
25970
- type: Function,
25971
- optional: true
25972
- },
25973
- onSelectionReordered: {
25974
- type: Function,
25975
- optional: true
25976
- },
25977
- onSelectionRemoved: {
25978
- type: Function,
25979
- optional: true
25980
- },
25981
- onInputFocused: {
25982
- type: Function,
25983
- optional: true
25984
- },
25985
- colors: {
25986
- type: Array,
25987
- optional: true,
25988
- default: []
25989
- },
25990
- disabledRanges: {
25991
- type: Array,
25992
- optional: true,
25993
- default: []
25994
- },
25995
- disabledRangeTitle: {
25996
- type: String,
25997
- optional: true
25998
- }
25999
- };
25895
+ props = (0, _odoo_owl.props)({
25896
+ ranges: types$6.array(types$6.string()),
25897
+ "hasSingleRange?": types$6.boolean(),
25898
+ "required?": types$6.boolean(),
25899
+ "autofocus?": types$6.boolean(),
25900
+ "isInvalid?": types$6.boolean(),
25901
+ "class?": types$6.string(),
25902
+ "onSelectionChanged?": types$6.function([types$6.array(types$6.string())]),
25903
+ "onSelectionConfirmed?": types$6.function([]),
25904
+ "onSelectionReordered?": types$6.function([types$6.array(types$6.number())]),
25905
+ "onSelectionRemoved?": types$6.function([types$6.number()]),
25906
+ "onInputFocused?": types$6.function([]),
25907
+ "colors?": types$6.ArrayOf(),
25908
+ "disabledRanges?": types$6.array(types$6.boolean()),
25909
+ "disabledRangeTitle?": types$6.string()
25910
+ }, {
25911
+ colors: [],
25912
+ disabledRanges: []
25913
+ });
26000
25914
  state = (0, _odoo_owl.proxy)({ isMissing: false });
26001
25915
  dragAndDrop = useDragAndDropListItems();
26002
25916
  focusedInputRef = (0, _odoo_owl.signal)(null);
@@ -26160,47 +26074,20 @@ var ChartDataSeries = class extends Component {
26160
26074
  SelectionInput,
26161
26075
  Section
26162
26076
  };
26163
- static props = {
26164
- ranges: Array,
26165
- dataSetStyles: {
26166
- type: Object,
26167
- optional: true
26168
- },
26169
- hasSingleRange: {
26170
- type: Boolean,
26171
- optional: true
26172
- },
26173
- onSelectionChanged: Function,
26174
- onSelectionReordered: {
26175
- type: Function,
26176
- optional: true
26177
- },
26178
- onSelectionRemoved: {
26179
- type: Function,
26180
- optional: true
26181
- },
26182
- onSelectionConfirmed: Function,
26183
- title: {
26184
- type: String,
26185
- optional: true
26186
- },
26187
- maxNumberOfUsedRanges: {
26188
- type: Number,
26189
- optional: true
26190
- },
26191
- datasetOrientation: {
26192
- type: String,
26193
- optional: true
26194
- },
26195
- canChangeDatasetOrientation: {
26196
- type: Boolean,
26197
- optional: true
26198
- },
26199
- onFlipAxis: {
26200
- type: Function,
26201
- optional: true
26202
- }
26203
- };
26077
+ props = (0, _odoo_owl.props)({
26078
+ ranges: types$6.ArrayOf(),
26079
+ "dataSetStyles?": types$6.DataSetStyle(),
26080
+ "hasSingleRange?": types$6.boolean(),
26081
+ onSelectionChanged: types$6.function([types$6.array(types$6.string())]),
26082
+ "onSelectionReordered?": types$6.function([types$6.array(types$6.number())]),
26083
+ "onSelectionRemoved?": types$6.function([types$6.number()]),
26084
+ onSelectionConfirmed: types$6.function([]),
26085
+ "maxNumberOfUsedRanges?": types$6.number(),
26086
+ "title?": types$6.string(),
26087
+ "datasetOrientation?": types$6.or([types$6.literal("rows"), types$6.literal("columns")]),
26088
+ "canChangeDatasetOrientation?": types$6.boolean(),
26089
+ "onFlipAxis?": types$6.function([types$6.string()])
26090
+ });
26204
26091
  get ranges() {
26205
26092
  return this.props.ranges.map((r) => r.dataRange);
26206
26093
  }
@@ -26228,28 +26115,18 @@ var ChartLabelRange = class extends Component {
26228
26115
  Checkbox,
26229
26116
  Section
26230
26117
  };
26231
- static props = {
26232
- title: {
26233
- type: String,
26234
- optional: true
26235
- },
26236
- range: String,
26237
- class: {
26238
- type: String,
26239
- optional: true
26240
- },
26241
- isInvalid: Boolean,
26242
- onSelectionChanged: Function,
26243
- onSelectionConfirmed: Function,
26244
- options: {
26245
- type: Array,
26246
- optional: true
26247
- }
26248
- };
26249
- static defaultProps = {
26118
+ props = (0, _odoo_owl.props)({
26119
+ "title?": types$6.string(),
26120
+ range: types$6.string(),
26121
+ "class?": types$6.string(),
26122
+ isInvalid: types$6.boolean(),
26123
+ onSelectionChanged: types$6.function([types$6.string()]),
26124
+ onSelectionConfirmed: types$6.function([]),
26125
+ "options?": types$6.ArrayOf()
26126
+ }, {
26250
26127
  title: _t("Categories / Labels"),
26251
26128
  options: []
26252
- };
26129
+ });
26253
26130
  get sectionClass() {
26254
26131
  return "o-data-labels" + (this.props.class ? ` ${this.props.class}` : "");
26255
26132
  }
@@ -26263,28 +26140,16 @@ var ChartDataSourceComponent = class extends Component {
26263
26140
  ChartDataSeries,
26264
26141
  ChartLabelRange
26265
26142
  };
26266
- static props = {
26267
- chartId: String,
26268
- definition: Object,
26269
- updateChart: Function,
26270
- canUpdateChart: Function,
26271
- onErrorMessagesChanged: {
26272
- type: Function,
26273
- optional: true
26274
- },
26275
- dataSeriesTitle: {
26276
- type: String,
26277
- optional: true
26278
- },
26279
- labelRangeTitle: {
26280
- type: String,
26281
- optional: true
26282
- },
26283
- getLabelRangeOptions: {
26284
- type: Function,
26285
- optional: true
26286
- }
26287
- };
26143
+ props = (0, _odoo_owl.props)({
26144
+ chartId: types$6.UID(),
26145
+ definition: types$6.ChartDefinitionWithDataSource(),
26146
+ updateChart: types$6.function([]),
26147
+ canUpdateChart: types$6.function([]),
26148
+ "onErrorMessagesChanged?": types$6.function([types$6.array(types$6.string())]),
26149
+ "dataSeriesTitle?": types$6.string(),
26150
+ "labelRangeTitle?": types$6.string(),
26151
+ "getLabelRangeOptions?": types$6.function([])
26152
+ });
26288
26153
  get DataSourceComponent() {
26289
26154
  const dataSourceType = this.props.definition.dataSource.type;
26290
26155
  return chartDataSourceSidePanelComponentRegistry.get(dataSourceType);
@@ -26295,14 +26160,15 @@ var ChartDataSourceComponent = class extends Component {
26295
26160
  //#region src/components/validation_messages/validation_messages.ts
26296
26161
  var ValidationMessages = class extends Component {
26297
26162
  static template = "o-spreadsheet-ValidationMessages";
26298
- static props = {
26299
- messages: Array,
26300
- msgType: String,
26301
- singleBox: {
26302
- type: Boolean,
26303
- optional: true
26304
- }
26305
- };
26163
+ props = (0, _odoo_owl.props)({
26164
+ messages: types$6.array(types$6.string()),
26165
+ msgType: types$6.or([
26166
+ types$6.literal("warning"),
26167
+ types$6.literal("error"),
26168
+ types$6.literal("info")
26169
+ ]),
26170
+ "singleBox?": types$6.boolean()
26171
+ });
26306
26172
  get divClasses() {
26307
26173
  if (this.props.msgType === "warning") return "o-validation-warning";
26308
26174
  if (this.props.msgType === "info") return "o-validation-info";
@@ -26321,10 +26187,7 @@ var ChartErrorSection = class extends Component {
26321
26187
  Section,
26322
26188
  ValidationMessages
26323
26189
  };
26324
- static props = { messages: {
26325
- type: Array,
26326
- element: String
26327
- } };
26190
+ props = (0, _odoo_owl.props)({ messages: types$6.array(types$6.string()) });
26328
26191
  };
26329
26192
 
26330
26193
  //#endregion
@@ -26337,7 +26200,7 @@ var GenericChartConfigPanel = class extends Component {
26337
26200
  Checkbox,
26338
26201
  ChartErrorSection
26339
26202
  };
26340
- static props = ChartSidePanelPropsObject;
26203
+ props = (0, _odoo_owl.props)(chartSidePanelPropsDefinition);
26341
26204
  chartTerms = ChartTerms;
26342
26205
  state = (0, _odoo_owl.proxy)({ errorMessages: [] });
26343
26206
  onErrorMessagesChanged(errorMessages) {
@@ -26384,10 +26247,7 @@ var BarConfigPanel = class extends GenericChartConfigPanel {
26384
26247
  //#region src/components/side_panel/components/collapse/collapse.ts
26385
26248
  var Collapse = class extends Component {
26386
26249
  static template = "o-spreadsheet-Collapse";
26387
- static props = {
26388
- isCollapsed: Boolean,
26389
- slots: Object
26390
- };
26250
+ props = (0, _odoo_owl.props)({ isCollapsed: types$6.boolean() });
26391
26251
  contentRef = (0, _odoo_owl.signal)(null);
26392
26252
  setup() {
26393
26253
  (0, _odoo_owl.onMounted)(() => {
@@ -26419,23 +26279,13 @@ var Collapse = class extends Component {
26419
26279
  //#region src/components/side_panel/components/collapsible/side_panel_collapsible.ts
26420
26280
  var SidePanelCollapsible = class extends Component {
26421
26281
  static template = "o-spreadsheet-SidePanelCollapsible";
26422
- static props = {
26423
- slots: Object,
26424
- title: {
26425
- type: String,
26426
- optional: true
26427
- },
26428
- isInitiallyCollapsed: {
26429
- type: Boolean,
26430
- optional: true
26431
- },
26432
- class: {
26433
- type: String,
26434
- optional: true
26435
- }
26436
- };
26437
26282
  static components = { Collapse };
26438
- state = (0, _odoo_owl.proxy)({ isCollapsed: this.props.isInitiallyCollapsed });
26283
+ props = (0, _odoo_owl.props)({
26284
+ "title?": types$6.string(),
26285
+ "isInitiallyCollapsed?": types$6.boolean(),
26286
+ "class?": types$6.string()
26287
+ });
26288
+ state = (0, _odoo_owl.proxy)({ isCollapsed: !!this.props.isInitiallyCollapsed });
26439
26289
  toggle() {
26440
26290
  this.state.isCollapsed = !this.state.isCollapsed;
26441
26291
  }
@@ -26446,17 +26296,11 @@ var SidePanelCollapsible = class extends Component {
26446
26296
  var NumberInput = class extends GenericInput {
26447
26297
  static template = "o-spreadsheet-NumberInput";
26448
26298
  static components = {};
26449
- static props = {
26450
- ...GenericInput.props,
26451
- min: {
26452
- type: Number,
26453
- optional: true
26454
- },
26455
- max: {
26456
- type: Number,
26457
- optional: true
26458
- }
26459
- };
26299
+ props = (0, _odoo_owl.props)({
26300
+ ...genericInputPropsDefinition,
26301
+ "min?": types$6.number(),
26302
+ "max?": types$6.number()
26303
+ });
26460
26304
  debouncedOnChange = debounce(this.props.onChange.bind(this), 100, true);
26461
26305
  save() {
26462
26306
  const currentValue = (this.genericInputRef()?.value || "").trim();
@@ -26477,11 +26321,11 @@ var DateInput = class extends NumberInput {
26477
26321
  //#region src/components/side_panel/components/badge_selection/badge_selection.ts
26478
26322
  var BadgeSelection = class extends Component {
26479
26323
  static template = "o-spreadsheet.BadgeSelection";
26480
- static props = {
26481
- choices: Array,
26482
- onChange: Function,
26483
- selectedValue: String
26484
- };
26324
+ props = (0, _odoo_owl.props)({
26325
+ choices: types$6.ArrayOf(),
26326
+ onChange: types$6.function([types$6.string()]),
26327
+ selectedValue: types$6.string()
26328
+ });
26485
26329
  };
26486
26330
 
26487
26331
  //#endregion
@@ -26493,28 +26337,18 @@ var ChartTitle = class extends Component {
26493
26337
  TextStyler,
26494
26338
  TextInput
26495
26339
  };
26496
- static props = {
26497
- title: {
26498
- type: String,
26499
- optional: true
26500
- },
26501
- placeholder: {
26502
- type: String,
26503
- optional: true
26504
- },
26505
- updateTitle: Function,
26506
- name: { type: String },
26507
- style: Object,
26508
- defaultStyle: {
26509
- type: Object,
26510
- optional: true
26511
- },
26512
- updateStyle: Function
26513
- };
26514
- static defaultProps = {
26340
+ props = (0, _odoo_owl.props)({
26341
+ "title?": types$6.string(),
26342
+ "placeholder?": types$6.string(),
26343
+ updateTitle: types$6.function([types$6.string()]),
26344
+ "name?": types$6.string(),
26345
+ style: types$6.TitleDesign(),
26346
+ "defaultStyle?": types$6.object({}),
26347
+ updateStyle: types$6.function([types$6.object({})])
26348
+ }, {
26515
26349
  title: "",
26516
26350
  placeholder: ""
26517
- };
26351
+ });
26518
26352
  updateTitle(value) {
26519
26353
  this.props.updateTitle(value);
26520
26354
  }
@@ -26532,12 +26366,12 @@ var AxisDesignEditor = class extends Component {
26532
26366
  NumberInput,
26533
26367
  DateInput
26534
26368
  };
26535
- static props = {
26536
- chartId: String,
26537
- definition: Object,
26538
- updateChart: Function,
26539
- axesList: Array
26540
- };
26369
+ props = (0, _odoo_owl.props)({
26370
+ chartId: types$6.UID(),
26371
+ definition: types$6.ChartWithAxisDefinition(),
26372
+ updateChart: types$6.function([types$6.UID(), types$6.object({})], types$6.DispatchResult()),
26373
+ axesList: types$6.ArrayOf()
26374
+ });
26541
26375
  state = (0, _odoo_owl.proxy)({ currentAxis: "x" });
26542
26376
  defaultFontSize = 12;
26543
26377
  get axisTitleStyle() {
@@ -26707,17 +26541,13 @@ var AxisDesignEditor = class extends Component {
26707
26541
  //#region src/components/side_panel/components/radio_selection/radio_selection.ts
26708
26542
  var RadioSelection = class extends Component {
26709
26543
  static template = "o-spreadsheet.RadioSelection";
26710
- static props = {
26711
- choices: Array,
26712
- onChange: Function,
26713
- selectedValue: { optional: false },
26714
- name: String,
26715
- direction: {
26716
- type: String,
26717
- optional: true
26718
- }
26719
- };
26720
- static defaultProps = { direction: "horizontal" };
26544
+ props = (0, _odoo_owl.props)({
26545
+ choices: types$6.ArrayOf(),
26546
+ onChange: types$6.function([types$6.any()]),
26547
+ selectedValue: types$6.string(),
26548
+ name: types$6.string(),
26549
+ "direction?": types$6.or([types$6.literal("horizontal"), types$6.literal("vertical")])
26550
+ }, { direction: "horizontal" });
26721
26551
  };
26722
26552
 
26723
26553
  //#endregion
@@ -26728,21 +26558,12 @@ var RoundColorPicker = class extends Component {
26728
26558
  Section,
26729
26559
  ColorPicker
26730
26560
  };
26731
- static props = {
26732
- currentColor: {
26733
- type: String,
26734
- optional: true
26735
- },
26736
- title: {
26737
- type: String,
26738
- optional: true
26739
- },
26740
- onColorPicked: Function,
26741
- disableNoColor: {
26742
- type: Boolean,
26743
- optional: true
26744
- }
26745
- };
26561
+ props = (0, _odoo_owl.props)({
26562
+ "currentColor?": types$6.string(),
26563
+ "title?": types$6.string(),
26564
+ onColorPicked: types$6.function([types$6.string()]),
26565
+ "disableNoColor?": types$6.boolean()
26566
+ });
26746
26567
  colorPickerButtonRef = (0, _odoo_owl.signal)(null);
26747
26568
  state;
26748
26569
  setup() {
@@ -26778,18 +26599,13 @@ var GeneralDesignEditor = class extends Component {
26778
26599
  SidePanelCollapsible,
26779
26600
  RadioSelection
26780
26601
  };
26781
- static props = {
26782
- ...ChartSidePanelPropsObject,
26783
- defaultChartTitleFontSize: {
26784
- type: Number,
26785
- optional: true
26786
- },
26787
- slots: {
26788
- type: Object,
26789
- optional: true
26790
- }
26791
- };
26792
- static defaultProps = { defaultChartTitleFontSize: 16 };
26602
+ props = (0, _odoo_owl.props)({
26603
+ chartId: types$6.UID(),
26604
+ definition: types$6.ChartDefinition(),
26605
+ canUpdateChart: types$6.function([types$6.UID(), types$6.object({})], types$6.DispatchResult()),
26606
+ updateChart: types$6.function([types$6.UID(), types$6.object({})], types$6.DispatchResult()),
26607
+ "defaultChartTitleFontSize?": types$6.number()
26608
+ }, { defaultChartTitleFontSize: 16 });
26793
26609
  state;
26794
26610
  setup() {
26795
26611
  this.state = (0, _odoo_owl.proxy)({ activeTool: "" });
@@ -26826,7 +26642,7 @@ var GeneralDesignEditor = class extends Component {
26826
26642
  var ChartHumanizeNumbers = class extends Component {
26827
26643
  static template = "o-spreadsheet-ChartHumanizeNumbers";
26828
26644
  static components = { Checkbox };
26829
- static props = ChartSidePanelPropsObject;
26645
+ props = (0, _odoo_owl.props)(chartSidePanelPropsDefinition);
26830
26646
  get title() {
26831
26647
  const locale = this.env.model.getters.getLocale();
26832
26648
  return _t("E.g. 1234567 -> %(value)s", { value: formatValue(1234567, {
@@ -26844,14 +26660,13 @@ var ChartLegend = class extends Component {
26844
26660
  Section,
26845
26661
  Select
26846
26662
  };
26847
- static props = {
26848
- ...ChartSidePanelPropsObject,
26849
- isDisabled: {
26850
- type: Boolean,
26851
- optional: true
26852
- }
26853
- };
26854
- static defaultProps = { isDisabled: false };
26663
+ props = (0, _odoo_owl.props)({
26664
+ chartId: types$6.string(),
26665
+ definition: types$6.ChartDefinitionWithDataSource(),
26666
+ canUpdateChart: types$6.function(),
26667
+ updateChart: types$6.function(),
26668
+ "isDisabled?": types$6.boolean()
26669
+ }, { isDisabled: false });
26855
26670
  updateLegendPosition(value) {
26856
26671
  this.props.updateChart(this.props.chartId, { legendPosition: value });
26857
26672
  }
@@ -26891,13 +26706,12 @@ var SeriesDesignEditor = class extends Component {
26891
26706
  RoundColorPicker,
26892
26707
  Select
26893
26708
  };
26894
- static props = {
26895
- ...ChartSidePanelPropsObject,
26896
- slots: {
26897
- type: Object,
26898
- optional: true
26899
- }
26900
- };
26709
+ props = (0, _odoo_owl.props)({
26710
+ chartId: types$6.UID(),
26711
+ definition: types$6.ChartDefinitionWithDataSource(),
26712
+ canUpdateChart: types$6.function([types$6.UID(), types$6.object({})], types$6.DispatchResult()),
26713
+ updateChart: types$6.function([types$6.UID(), types$6.object({})], types$6.DispatchResult())
26714
+ });
26901
26715
  state = (0, _odoo_owl.proxy)({ dataSetId: this.getDataSeries()[0]?.dataSetId || "" });
26902
26716
  getRuntime() {
26903
26717
  const runtime = this.env.model.getters.getChartRuntime(this.props.chartId);
@@ -26957,13 +26771,12 @@ var SeriesWithAxisDesignEditor = class extends Component {
26957
26771
  NumberInput,
26958
26772
  Select
26959
26773
  };
26960
- static props = {
26961
- ...ChartSidePanelPropsObject,
26962
- slots: {
26963
- type: Object,
26964
- optional: true
26965
- }
26966
- };
26774
+ props = (0, _odoo_owl.props)({
26775
+ chartId: types$6.UID(),
26776
+ definition: types$6.ChartDefinitionWithDataSource(),
26777
+ canUpdateChart: types$6.function([types$6.UID(), types$6.object({})], types$6.DispatchResult()),
26778
+ updateChart: types$6.function([types$6.UID(), types$6.object({})], types$6.DispatchResult())
26779
+ });
26967
26780
  axisChoices = CHART_AXIS_CHOICES;
26968
26781
  updateDataSeriesAxis(dataSetId, axis) {
26969
26782
  const dataSetStyles = { ...this.props.definition.dataSetStyles };
@@ -27098,13 +26911,13 @@ var SeriesWithAxisDesignEditor = class extends Component {
27098
26911
  var ChartShowValues = class extends Component {
27099
26912
  static template = "o-spreadsheet-ChartShowValues";
27100
26913
  static components = { Checkbox };
27101
- static props = {
27102
- ...ChartSidePanelPropsObject,
27103
- defaultValue: {
27104
- type: Boolean,
27105
- optional: true
27106
- }
27107
- };
26914
+ props = (0, _odoo_owl.props)({
26915
+ chartId: types$6.UID(),
26916
+ definition: types$6.ChartDefinitionWithDataSource(),
26917
+ canUpdateChart: types$6.function([]),
26918
+ updateChart: types$6.function([]),
26919
+ "defaultValue?": types$6.boolean()
26920
+ });
27108
26921
  };
27109
26922
 
27110
26923
  //#endregion
@@ -27121,7 +26934,7 @@ var ChartWithAxisDesignPanel = class extends Component {
27121
26934
  ChartShowValues,
27122
26935
  ChartHumanizeNumbers
27123
26936
  };
27124
- static props = ChartSidePanelPropsObject;
26937
+ props = (0, _odoo_owl.props)(chartSidePanelPropsDefinition);
27125
26938
  get axesList() {
27126
26939
  const { useLeftAxis, useRightAxis } = getDefinedAxis(this.props.definition);
27127
26940
  const axes = [{
@@ -27171,7 +26984,7 @@ var BubbleChartConfigPanel = class extends Component {
27171
26984
  ChartLabelRange,
27172
26985
  ChartErrorSection
27173
26986
  };
27174
- static props = ChartSidePanelPropsObject;
26987
+ props = (0, _odoo_owl.props)(chartSidePanelPropsDefinition);
27175
26988
  state = (0, _odoo_owl.proxy)({
27176
26989
  datasetDispatchResult: void 0,
27177
26990
  labelsDispatchResult: void 0,
@@ -27307,7 +27120,7 @@ var BubbleChartDesignPanel = class extends Component {
27307
27120
  RoundColorPicker,
27308
27121
  Checkbox
27309
27122
  };
27310
- static props = ChartSidePanelPropsObject;
27123
+ props = (0, _odoo_owl.props)(chartSidePanelPropsDefinition);
27311
27124
  get axesList() {
27312
27125
  return [{
27313
27126
  id: "x",
@@ -28300,10 +28113,7 @@ function getBarChartLegend(definition, args) {
28300
28113
  toggleDataVisibility: toggleLineBarDataVisibility
28301
28114
  }),
28302
28115
  ...getLegendDisplayOptions(definition),
28303
- ...getCustomLegendLabels(chartFontColor(definition.background), {
28304
- pointStyle: "rect",
28305
- lineWidth: 3
28306
- })
28116
+ ...getCustomLegendLabels(chartFontColor(definition.background), { lineWidth: 3 })
28307
28117
  };
28308
28118
  }
28309
28119
  function getPyramidChartLegend(definition, args) {
@@ -28674,7 +28484,7 @@ function getSunburstShowValues(definition, args) {
28674
28484
  showLabels: definition.showLabels ?? SunburstChartDefaults.showLabels,
28675
28485
  showValues: definition.showValues ?? SunburstChartDefaults.showValues,
28676
28486
  style: {
28677
- fontSize: definition.valuesDesign?.fontSize ?? SunburstChartDefaults.valuesDesign.fontSize,
28487
+ fontSize: fontSizeInPixels(definition.valuesDesign?.fontSize ?? SunburstChartDefaults.valuesDesign.fontSize),
28678
28488
  align: definition.valuesDesign?.align ?? SunburstChartDefaults.valuesDesign.align,
28679
28489
  bold: definition.valuesDesign?.bold ?? SunburstChartDefaults.valuesDesign.bold,
28680
28490
  italic: definition.valuesDesign?.italic ?? SunburstChartDefaults.valuesDesign.italic,
@@ -28729,7 +28539,7 @@ function getChartTitle({ title, legendPosition, background }, getters) {
28729
28539
  color: title?.color ?? fontColor,
28730
28540
  align: title.align === "center" ? "center" : title.align === "right" ? "end" : "start",
28731
28541
  font: {
28732
- size: title.fontSize ?? 16,
28542
+ size: fontSizeInPixels(title.fontSize ?? 16),
28733
28543
  weight: title.bold ? "bold" : "normal",
28734
28544
  style: title.italic ? "italic" : "normal"
28735
28545
  },
@@ -29111,6 +28921,7 @@ const BarChart = {
29111
28921
  "stacked",
29112
28922
  "aggregated",
29113
28923
  "showValues",
28924
+ "showTotalLine",
29114
28925
  "zoomable"
29115
28926
  ],
29116
28927
  fromStrDefinition: (definition) => ({
@@ -29136,6 +28947,7 @@ const BarChart = {
29136
28947
  type: "bar",
29137
28948
  axesDesign: context.axesDesign,
29138
28949
  showValues: context.showValues,
28950
+ showTotalLine: context.showTotalLine,
29139
28951
  horizontal: context.horizontal,
29140
28952
  zoomable: context.zoomable,
29141
28953
  humanize: context.humanize
@@ -29737,29 +29549,17 @@ var ChartRangeDataSourceComponent = class extends Component {
29737
29549
  ChartDataSeries,
29738
29550
  ChartLabelRange
29739
29551
  };
29740
- static props = {
29741
- chartId: String,
29742
- definition: Object,
29743
- dataSource: Object,
29744
- updateChart: Function,
29745
- canUpdateChart: Function,
29746
- onErrorMessagesChanged: {
29747
- type: Function,
29748
- optional: true
29749
- },
29750
- dataSeriesTitle: {
29751
- type: String,
29752
- optional: true
29753
- },
29754
- labelRangeTitle: {
29755
- type: String,
29756
- optional: true
29757
- },
29758
- getLabelRangeOptions: {
29759
- type: Function,
29760
- optional: true
29761
- }
29762
- };
29552
+ props = (0, _odoo_owl.props)({
29553
+ chartId: types$6.UID(),
29554
+ definition: types$6.ChartDefinitionWithDataSource(),
29555
+ dataSource: types$6.ChartRangeDataSource(),
29556
+ updateChart: types$6.function([types$6.UID(), types$6.object({})], types$6.DispatchResult()),
29557
+ canUpdateChart: types$6.function([types$6.UID(), types$6.object({})], types$6.DispatchResult()),
29558
+ "onErrorMessagesChanged?": types$6.function([types$6.array(types$6.string())]),
29559
+ "dataSeriesTitle?": types$6.string(),
29560
+ "labelRangeTitle?": types$6.string(),
29561
+ "getLabelRangeOptions?": types$6.function([])
29562
+ });
29763
29563
  state = (0, _odoo_owl.proxy)({
29764
29564
  datasetDispatchResult: void 0,
29765
29565
  labelsDispatchResult: void 0
@@ -30609,10 +30409,10 @@ var ColorScalePicker = class extends Component {
30609
30409
  RoundColorPicker,
30610
30410
  Popover
30611
30411
  };
30612
- static props = {
30613
- definition: Object,
30614
- onUpdateColorScale: Function
30615
- };
30412
+ props = (0, _odoo_owl.props)({
30413
+ definition: types$6.object({ "colorScale?": types$6.ChartColorScale() }),
30414
+ onUpdateColorScale: types$6.function([types$6.ChartColorScale()])
30415
+ });
30616
30416
  colorScales = COLORSCALES.map((colorScale) => ({
30617
30417
  value: colorScale,
30618
30418
  label: ChartTerms.ColorScales[colorScale],
@@ -30703,7 +30503,7 @@ var CalendarChartDesignPanel = class extends Component {
30703
30503
  RoundColorPicker,
30704
30504
  Select
30705
30505
  };
30706
- static props = ChartSidePanelPropsObject;
30506
+ props = (0, _odoo_owl.props)(chartSidePanelPropsDefinition);
30707
30507
  get axesList() {
30708
30508
  return [{
30709
30509
  id: "x",
@@ -30748,7 +30548,7 @@ var CalendarChartDesignPanel = class extends Component {
30748
30548
  var ChartShowDataMarkers = class extends Component {
30749
30549
  static template = "o-spreadsheet-ChartShowDataMarkers";
30750
30550
  static components = { Checkbox };
30751
- static props = ChartSidePanelPropsObject;
30551
+ props = (0, _odoo_owl.props)(chartSidePanelPropsDefinition);
30752
30552
  };
30753
30553
 
30754
30554
  //#endregion
@@ -30811,12 +30611,10 @@ var FunnelChartDesignPanel = class extends Component {
30811
30611
  Section,
30812
30612
  ChartHumanizeNumbers
30813
30613
  };
30814
- static props = {
30815
- chartId: String,
30816
- definition: Object,
30817
- updateChart: Function,
30818
- canUpdateChart: Function
30819
- };
30614
+ props = (0, _odoo_owl.props)({
30615
+ ...chartSidePanelPropsDefinition,
30616
+ definition: types$6.FunnelChartDefinition()
30617
+ });
30820
30618
  getFunnelColorItems() {
30821
30619
  const labels = this.env.model.getters.getChartRuntime(this.props.chartId).chartJsConfig.data.labels || [];
30822
30620
  const colors = getFunnelLabelColors(labels, this.props.definition.funnelColors);
@@ -30839,7 +30637,7 @@ var GaugeChartConfigPanel = class extends Component {
30839
30637
  ChartErrorSection,
30840
30638
  ChartDataSeries
30841
30639
  };
30842
- static props = ChartSidePanelPropsObject;
30640
+ props = (0, _odoo_owl.props)(chartSidePanelPropsDefinition);
30843
30641
  state = (0, _odoo_owl.proxy)({ dataRangeDispatchResult: void 0 });
30844
30642
  dataRange = this.props.definition.dataRange;
30845
30643
  get configurationErrorMessages() {
@@ -30864,15 +30662,12 @@ var GaugeChartConfigPanel = class extends Component {
30864
30662
  //#region src/components/composer/autocomplete_dropdown/autocomplete_dropdown.ts
30865
30663
  var TextValueProvider = class extends Component {
30866
30664
  static template = "o-spreadsheet-TextValueProvider";
30867
- static props = {
30868
- proposals: Array,
30869
- selectedIndex: {
30870
- type: Number,
30871
- optional: true
30872
- },
30873
- onValueSelected: Function,
30874
- onValueHovered: Function
30875
- };
30665
+ props = (0, _odoo_owl.props)({
30666
+ proposals: types$6.array(types$6.AutoCompleteProposal()),
30667
+ "selectedIndex?": types$6.number(),
30668
+ onValueSelected: types$6.function([types$6.AutoCompleteProposal()]),
30669
+ onValueHovered: types$6.function([types$6.string()])
30670
+ });
30876
30671
  autoCompleteListRef = (0, _odoo_owl.signal)(null);
30877
30672
  setup() {
30878
30673
  (0, _odoo_owl.useEffect)(() => {
@@ -31089,15 +30884,12 @@ function isEmptyParagraph(node) {
31089
30884
  //#region src/components/composer/formula_assistant/formula_assistant.ts
31090
30885
  var FunctionDescriptionProvider = class extends Component {
31091
30886
  static template = "o-spreadsheet-FunctionDescriptionProvider";
31092
- static props = {
31093
- functionDescription: Object,
31094
- argsToFocus: Array,
31095
- repeatingArgGroupIndex: {
31096
- type: Number,
31097
- optional: true
31098
- }
31099
- };
31100
30887
  static components = { Collapse };
30888
+ props = (0, _odoo_owl.props)({
30889
+ functionDescription: types$6.FunctionDescription(),
30890
+ argsToFocus: types$6.array(types$6.number()),
30891
+ "repeatingArgGroupIndex?": types$6.number()
30892
+ });
31101
30893
  state = (0, _odoo_owl.proxy)({ isCollapsed: true });
31102
30894
  toggle() {
31103
30895
  this.state.isCollapsed = !this.state.isCollapsed;
@@ -31161,11 +30953,11 @@ var FunctionDescriptionProvider = class extends Component {
31161
30953
  const BUBBLE_ARROW_SIZE = 7;
31162
30954
  var SpeechBubble = class extends Component {
31163
30955
  static template = "o-spreadsheet-SpeechBubble";
31164
- static props = {
31165
- content: String,
31166
- anchorRect: Object
31167
- };
31168
30956
  static components = {};
30957
+ props = (0, _odoo_owl.props)({
30958
+ content: types$6.string(),
30959
+ anchorRect: types$6.Rect()
30960
+ });
31169
30961
  spreadsheetRect = useSpreadsheetRect();
31170
30962
  bubbleRef = (0, _odoo_owl.signal)(null);
31171
30963
  setup() {
@@ -31192,62 +30984,30 @@ const highlightParenthesisClass = "highlight-parenthesis-flag";
31192
30984
  const highlightClass = "highlight-flag";
31193
30985
  var Composer = class extends Component {
31194
30986
  static template = "o-spreadsheet-Composer";
31195
- static props = {
31196
- focus: { validate: (value) => [
31197
- "inactive",
31198
- "cellFocus",
31199
- "contentFocus"
31200
- ].includes(value) },
31201
- inputStyle: {
31202
- type: String,
31203
- optional: true
31204
- },
31205
- rect: {
31206
- type: Object,
31207
- optional: true
31208
- },
31209
- delimitation: {
31210
- type: Object,
31211
- optional: true
31212
- },
31213
- onComposerCellFocused: {
31214
- type: Function,
31215
- optional: true
31216
- },
31217
- onComposerContentFocused: Function,
31218
- isDefaultFocus: {
31219
- type: Boolean,
31220
- optional: true
31221
- },
31222
- onInputContextMenu: {
31223
- type: Function,
31224
- optional: true
31225
- },
31226
- composerStore: Object,
31227
- placeholder: {
31228
- type: String,
31229
- optional: true
31230
- },
31231
- inputMode: {
31232
- type: String,
31233
- optional: true
31234
- },
31235
- showAssistant: {
31236
- type: Boolean,
31237
- optional: true
31238
- }
31239
- };
31240
30987
  static components = {
31241
30988
  TextValueProvider,
31242
30989
  FunctionDescriptionProvider,
31243
30990
  SpeechBubble
31244
30991
  };
31245
- static defaultProps = {
30992
+ props = (0, _odoo_owl.props)({
30993
+ focus: types$6.ComposerFocusType(),
30994
+ "inputStyle?": types$6.string(),
30995
+ "rect?": types$6.Rect(),
30996
+ "delimitation?": types$6.DOMDimension(),
30997
+ "onComposerCellFocused?": types$6.function([types$6.string()]),
30998
+ onComposerContentFocused: types$6.function([types$6.ComposerSelection()]),
30999
+ "isDefaultFocus?": types$6.boolean(),
31000
+ "onInputContextMenu?": types$6.function([types$6.instanceOf(MouseEvent)]),
31001
+ composerStore: types$6.Store(),
31002
+ "placeholder?": types$6.string(),
31003
+ "inputMode?": types$6.string(),
31004
+ "showAssistant?": types$6.boolean()
31005
+ }, {
31246
31006
  inputStyle: "",
31247
31007
  isDefaultFocus: false,
31248
31008
  inputMode: "text",
31249
31009
  showAssistant: true
31250
- };
31010
+ });
31251
31011
  DOMFocusableElementStore;
31252
31012
  composerRef = (0, _odoo_owl.signal)(null);
31253
31013
  containerRef = (0, _odoo_owl.signal)(null);
@@ -32812,54 +32572,23 @@ var StandaloneComposerStore = class extends AbstractComposerStore {
32812
32572
  //#region src/components/composer/standalone_composer/standalone_composer.ts
32813
32573
  var StandaloneComposer = class extends Component {
32814
32574
  static template = "o-spreadsheet-StandaloneComposer";
32815
- static props = {
32816
- composerContent: {
32817
- type: String,
32818
- optional: true
32819
- },
32820
- defaultRangeSheetId: {
32821
- type: String,
32822
- optional: true
32823
- },
32824
- defaultStatic: {
32825
- type: Boolean,
32826
- optional: true
32827
- },
32828
- onConfirm: Function,
32829
- contextualAutocomplete: {
32830
- type: Object,
32831
- optional: true
32832
- },
32833
- placeholder: {
32834
- type: String,
32835
- optional: true
32836
- },
32837
- title: {
32838
- type: String,
32839
- optional: true
32840
- },
32841
- class: {
32842
- type: String,
32843
- optional: true
32844
- },
32845
- invalid: {
32846
- type: Boolean,
32847
- optional: true
32848
- },
32849
- autofocus: {
32850
- type: Boolean,
32851
- optional: true
32852
- },
32853
- getContextualColoredSymbolToken: {
32854
- type: Function,
32855
- optional: true
32856
- }
32857
- };
32858
32575
  static components = { Composer };
32859
- static defaultProps = {
32576
+ props = (0, _odoo_owl.props)({
32577
+ onConfirm: types$6.function([types$6.string()]),
32578
+ "composerContent?": types$6.string(),
32579
+ defaultRangeSheetId: types$6.UID(),
32580
+ "defaultStatic?": types$6.boolean(),
32581
+ "contextualAutocomplete?": types$6.AutoCompleteProviderDefinition(),
32582
+ "placeholder?": types$6.string(),
32583
+ "title?": types$6.string(),
32584
+ "class?": types$6.string(),
32585
+ "invalid?": types$6.boolean(),
32586
+ "autofocus?": types$6.boolean(),
32587
+ "getContextualColoredSymbolToken?": types$6.function([types$6.Token()], types$6.Color())
32588
+ }, {
32860
32589
  composerContent: "",
32861
32590
  defaultStatic: false
32862
- };
32591
+ });
32863
32592
  composerFocusStore;
32864
32593
  standaloneComposerStore;
32865
32594
  composerInterface;
@@ -32923,7 +32652,7 @@ var GaugeChartDesignPanel = class extends Component {
32923
32652
  ChartHumanizeNumbers,
32924
32653
  Select
32925
32654
  };
32926
- static props = ChartSidePanelPropsObject;
32655
+ props = (0, _odoo_owl.props)(chartSidePanelPropsDefinition);
32927
32656
  state;
32928
32657
  setup() {
32929
32658
  this.state = (0, _odoo_owl.proxy)({
@@ -33054,11 +32783,11 @@ var GeoChartRegionSelectSection = class extends Component {
33054
32783
  Section,
33055
32784
  Select
33056
32785
  };
33057
- static props = {
33058
- chartId: String,
33059
- definition: Object,
33060
- updateChart: Function
33061
- };
32786
+ props = (0, _odoo_owl.props)({
32787
+ chartId: types$6.UID(),
32788
+ definition: types$6.GeoChartDefinition(),
32789
+ updateChart: types$6.function([types$6.UID(), types$6.object({})], types$6.DispatchResult())
32790
+ });
33062
32791
  updateSelectedRegion(value) {
33063
32792
  this.props.updateChart(this.props.chartId, { region: value });
33064
32793
  }
@@ -33208,10 +32937,10 @@ var PieHoleSize = class extends Component {
33208
32937
  Section,
33209
32938
  NumberInput
33210
32939
  };
33211
- static props = {
33212
- onValueChange: Function,
33213
- value: Number
33214
- };
32940
+ props = (0, _odoo_owl.props)({
32941
+ onValueChange: types$6.function([types$6.number()]),
32942
+ value: types$6.number()
32943
+ });
33215
32944
  onChange(value) {
33216
32945
  if (!isNaN(Number(value))) this.props.onValueChange(clip(Number(value), 0, 95));
33217
32946
  }
@@ -33233,7 +32962,7 @@ var PieChartDesignPanel = class extends Component {
33233
32962
  RoundColorPicker,
33234
32963
  Select
33235
32964
  };
33236
- static props = ChartSidePanelPropsObject;
32965
+ props = (0, _odoo_owl.props)(chartSidePanelPropsDefinition);
33237
32966
  state = (0, _odoo_owl.proxy)({ index: 0 });
33238
32967
  get runtime() {
33239
32968
  return this.env.model.getters.getChartRuntime(this.props.chartId);
@@ -33293,7 +33022,7 @@ var RadarChartDesignPanel = class extends Component {
33293
33022
  Checkbox,
33294
33023
  ChartHumanizeNumbers
33295
33024
  };
33296
- static props = ChartSidePanelPropsObject;
33025
+ props = (0, _odoo_owl.props)(chartSidePanelPropsDefinition);
33297
33026
  };
33298
33027
 
33299
33028
  //#endregion
@@ -33343,7 +33072,7 @@ var ScorecardChartConfigPanel = class extends Component {
33343
33072
  Section,
33344
33073
  Select
33345
33074
  };
33346
- static props = ChartSidePanelPropsObject;
33075
+ props = (0, _odoo_owl.props)(chartSidePanelPropsDefinition);
33347
33076
  state = (0, _odoo_owl.proxy)({
33348
33077
  keyValueDispatchResult: void 0,
33349
33078
  baselineDispatchResult: void 0
@@ -33417,7 +33146,7 @@ var ScorecardChartDesignPanel = class extends Component {
33417
33146
  ChartTitle,
33418
33147
  ChartHumanizeNumbers
33419
33148
  };
33420
- static props = ChartSidePanelPropsObject;
33149
+ props = (0, _odoo_owl.props)(chartSidePanelPropsDefinition);
33421
33150
  get colorsSectionTitle() {
33422
33151
  return this.props.definition.baselineMode === "progress" ? _t("Progress bar colors") : _t("Baseline colors");
33423
33152
  }
@@ -33498,7 +33227,7 @@ var SunburstChartDesignPanel = class extends Component {
33498
33227
  PieHoleSize,
33499
33228
  ChartHumanizeNumbers
33500
33229
  };
33501
- static props = ChartSidePanelPropsObject;
33230
+ props = (0, _odoo_owl.props)(chartSidePanelPropsDefinition);
33502
33231
  defaults = SunburstChartDefaults;
33503
33232
  get showValues() {
33504
33233
  return this.props.definition.showValues ?? SunburstChartDefaults.showValues;
@@ -33531,11 +33260,11 @@ var TreeMapCategoryColors = class extends Component {
33531
33260
  Checkbox,
33532
33261
  RoundColorPicker
33533
33262
  };
33534
- static props = {
33535
- chartId: String,
33536
- definition: Object,
33537
- onColorChanged: Function
33538
- };
33263
+ props = (0, _odoo_owl.props)({
33264
+ chartId: types$6.UID(),
33265
+ definition: types$6.TreeMapChartDefinition(),
33266
+ onColorChanged: types$6.function([types$6.TreeMapCategoryColorOptions()], types$6.DispatchResult())
33267
+ });
33539
33268
  get coloringOptions() {
33540
33269
  const coloringOptions = this.props.definition.coloringOptions ?? TreeMapChartDefaults.coloringOptions;
33541
33270
  if (coloringOptions.type !== "categoryColor") throw new Error("Coloring options is not solid color");
@@ -33563,11 +33292,11 @@ var TreeMapCategoryColors = class extends Component {
33563
33292
  var TreeMapColorScale = class extends Component {
33564
33293
  static template = "o-spreadsheet-TreeMapColorScale";
33565
33294
  static components = { RoundColorPicker };
33566
- static props = {
33567
- chartId: String,
33568
- definition: Object,
33569
- onColorChanged: Function
33570
- };
33295
+ props = (0, _odoo_owl.props)({
33296
+ chartId: types$6.UID(),
33297
+ definition: types$6.TreeMapChartDefinition(),
33298
+ onColorChanged: types$6.function([types$6.TreeMapColorScaleOptions()], types$6.DispatchResult())
33299
+ });
33571
33300
  get coloringOptions() {
33572
33301
  const coloringOptions = this.props.definition.coloringOptions ?? TreeMapChartDefaults.coloringOptions;
33573
33302
  if (coloringOptions.type !== "colorScale") throw new Error("Coloring options is not a color scale");
@@ -33609,7 +33338,7 @@ var TreeMapChartDesignPanel = class extends Component {
33609
33338
  TreeMapColorScale,
33610
33339
  ChartHumanizeNumbers
33611
33340
  };
33612
- static props = ChartSidePanelPropsObject;
33341
+ props = (0, _odoo_owl.props)(chartSidePanelPropsDefinition);
33613
33342
  savedColors = {
33614
33343
  categoryColors: DEFAULT_SOLID_COLOR,
33615
33344
  colorScale: DEFAULT_COLOR_SCALE
@@ -33666,7 +33395,7 @@ var WaterfallChartDesignPanel = class extends Component {
33666
33395
  ChartLegend,
33667
33396
  ChartHumanizeNumbers
33668
33397
  };
33669
- static props = ChartSidePanelPropsObject;
33398
+ props = (0, _odoo_owl.props)(chartSidePanelPropsDefinition);
33670
33399
  axisChoices = CHART_AXIS_CHOICES;
33671
33400
  onUpdateShowSubTotals(showSubTotals) {
33672
33401
  this.props.updateChart(this.props.chartId, { showSubTotals });
@@ -33780,10 +33509,10 @@ var ChartTypePicker = class extends Component {
33780
33509
  Section,
33781
33510
  Popover
33782
33511
  };
33783
- static props = {
33784
- chartId: String,
33785
- chartPanelStore: Object
33786
- };
33512
+ props = (0, _odoo_owl.props)({
33513
+ chartId: types$6.UID(),
33514
+ chartPanelStore: types$6.Store()
33515
+ });
33787
33516
  categories = chartCategories;
33788
33517
  chartTypeByCategories = {};
33789
33518
  popoverRef = (0, _odoo_owl.signal)(null);
@@ -33958,10 +33687,10 @@ var ChartPanel = class extends Component {
33958
33687
  Section,
33959
33688
  ChartTypePicker
33960
33689
  };
33961
- static props = {
33962
- onCloseSidePanel: Function,
33963
- chartId: String
33964
- };
33690
+ props = (0, _odoo_owl.props)({
33691
+ onCloseSidePanel: types$6.function([]),
33692
+ chartId: types$6.UID()
33693
+ });
33965
33694
  store;
33966
33695
  get chartId() {
33967
33696
  return this.props.chartId;
@@ -34352,13 +34081,13 @@ var ColumnStatisticsStore = class extends SpreadsheetStore {
34352
34081
  //#region src/components/side_panel/column_stats/column_stats_panel.ts
34353
34082
  var ColumnStatsPanel = class extends Component {
34354
34083
  static template = "o-spreadsheet-ColumnStatsPanel";
34355
- static props = { onCloseSidePanel: Function };
34356
34084
  static components = {
34357
34085
  NumberInput,
34358
34086
  SidePanelCollapsible,
34359
34087
  BadgeSelection,
34360
34088
  Section
34361
34089
  };
34090
+ props = (0, _odoo_owl.props)({ onCloseSidePanel: types$6.function([]) });
34362
34091
  state = (0, _odoo_owl.proxy)({
34363
34092
  currentChart: "count",
34364
34093
  currentFrequencyOrder: "descending",
@@ -34601,7 +34330,7 @@ var CellIsRuleEditor = class extends Component {
34601
34330
  ColorPickerWidget,
34602
34331
  Select
34603
34332
  };
34604
- static props = { store: Object };
34333
+ props = (0, _odoo_owl.props)({ store: types$6.Store() });
34605
34334
  getTextDecoration = getTextDecoration;
34606
34335
  get rule() {
34607
34336
  return this.props.store.state.rules.cellIs;
@@ -34611,18 +34340,12 @@ var CellIsRuleEditor = class extends Component {
34611
34340
  //#endregion
34612
34341
  //#region src/components/side_panel/criterion_form/criterion_form.ts
34613
34342
  var CriterionForm = class extends Component {
34614
- static props = {
34615
- criterion: Object,
34616
- onCriterionChanged: Function,
34617
- disableFormulas: {
34618
- type: Boolean,
34619
- optional: true
34620
- },
34621
- autofocus: {
34622
- type: Boolean,
34623
- optional: true
34624
- }
34625
- };
34343
+ props = (0, _odoo_owl.props)({
34344
+ criterion: types$6.object({}),
34345
+ onCriterionChanged: types$6.function([types$6.object({})]),
34346
+ "disableFormulas?": types$6.boolean(),
34347
+ "autofocus?": types$6.boolean()
34348
+ });
34626
34349
  setup() {
34627
34350
  const composerFocusStore = useStore(ComposerFocusStore);
34628
34351
  if (composerFocusStore.activeComposer.editionMode !== "inactive") composerFocusStore.activeComposer.stopEdition();
@@ -35203,41 +34926,22 @@ function getOccurrencesInRanges(criterionRanges, getters) {
35203
34926
  //#region src/components/side_panel/criterion_form/criterion_input/criterion_input.ts
35204
34927
  var CriterionInput = class extends Component {
35205
34928
  static template = "o-spreadsheet-CriterionInput";
35206
- static props = {
35207
- value: {
35208
- type: String,
35209
- optional: true
35210
- },
35211
- criterionType: String,
35212
- onValueChanged: Function,
35213
- onKeyDown: {
35214
- type: Function,
35215
- optional: true
35216
- },
35217
- focused: {
35218
- type: Boolean,
35219
- optional: true
35220
- },
35221
- onBlur: {
35222
- type: Function,
35223
- optional: true
35224
- },
35225
- onFocus: {
35226
- type: Function,
35227
- optional: true
35228
- },
35229
- disableFormulas: {
35230
- type: Boolean,
35231
- optional: true
35232
- }
35233
- };
35234
- static defaultProps = {
34929
+ static components = { StandaloneComposer };
34930
+ props = (0, _odoo_owl.props)({
34931
+ "value?": types$6.string(),
34932
+ criterionType: types$6.DataValidationCriterionType(),
34933
+ onValueChanged: types$6.function([types$6.string()]),
34934
+ "onKeyDown?": types$6.function([types$6.instanceOf(KeyboardEvent)]),
34935
+ "focused?": types$6.boolean(),
34936
+ "onBlur?": types$6.function([]),
34937
+ "onFocus?": types$6.function([]),
34938
+ "disableFormulas?": types$6.boolean()
34939
+ }, {
35235
34940
  value: "",
35236
34941
  onKeyDown: () => {},
35237
34942
  focused: false,
35238
34943
  onBlur: () => {}
35239
- };
35240
- static components = { StandaloneComposer };
34944
+ });
35241
34945
  inputRef = (0, _odoo_owl.signal)(null);
35242
34946
  setup() {
35243
34947
  useLayoutEffect(() => {
@@ -36064,10 +35768,14 @@ var ColorScaleRuleEditorThreshold = class extends Component {
36064
35768
  StandaloneComposer,
36065
35769
  Select
36066
35770
  };
36067
- static props = {
36068
- store: Object,
36069
- thresholdType: String
36070
- };
35771
+ props = (0, _odoo_owl.props)({
35772
+ store: types$6.Store(),
35773
+ thresholdType: types$6.or([
35774
+ types$6.literal("minimum"),
35775
+ types$6.literal("midpoint"),
35776
+ types$6.literal("maximum")
35777
+ ])
35778
+ });
36071
35779
  get rule() {
36072
35780
  return this.props.store.state.rules.colorScale;
36073
35781
  }
@@ -36138,7 +35846,7 @@ var ColorScaleRuleEditorThreshold = class extends Component {
36138
35846
  var ColorScaleRuleEditor = class extends Component {
36139
35847
  static template = "o-spreadsheet-ColorScaleRuleEditor";
36140
35848
  static components = { ColorScaleRuleEditorThreshold };
36141
- static props = { store: Object };
35849
+ props = (0, _odoo_owl.props)({ store: types$6.Store() });
36142
35850
  };
36143
35851
 
36144
35852
  //#endregion
@@ -36149,7 +35857,7 @@ var DataBarRuleEditor = class extends Component {
36149
35857
  SelectionInput,
36150
35858
  RoundColorPicker
36151
35859
  };
36152
- static props = { store: Object };
35860
+ props = (0, _odoo_owl.props)({ store: types$6.Store() });
36153
35861
  get rule() {
36154
35862
  return this.props.store.state.rules.dataBar;
36155
35863
  }
@@ -36160,7 +35868,7 @@ var DataBarRuleEditor = class extends Component {
36160
35868
  //#region src/components/icon_picker/icon_picker.ts
36161
35869
  var IconPicker = class extends Component {
36162
35870
  static template = "o-spreadsheet-IconPicker";
36163
- static props = { onIconPicked: Function };
35871
+ props = (0, _odoo_owl.props)({ onIconPicked: types$6.function([types$6.string()]) });
36164
35872
  onIconClick(icon) {
36165
35873
  if (icon) this.props.onIconPicked(icon);
36166
35874
  }
@@ -36181,7 +35889,7 @@ var IconSetRuleEditor = class extends Component {
36181
35889
  StandaloneComposer,
36182
35890
  Select
36183
35891
  };
36184
- static props = { store: Object };
35892
+ props = (0, _odoo_owl.props)({ store: types$6.Store() });
36185
35893
  get rule() {
36186
35894
  return this.props.store.state.rules.iconSet;
36187
35895
  }
@@ -36260,11 +35968,11 @@ var ConditionalFormattingEditor = class extends Component {
36260
35968
  IconSetRuleEditor,
36261
35969
  DataBarRuleEditor
36262
35970
  };
36263
- static props = {
36264
- cf: Object,
36265
- isNewCf: Boolean,
36266
- onCloseSidePanel: Function
36267
- };
35971
+ props = (0, _odoo_owl.props)({
35972
+ cf: types$6.ConditionalFormat(),
35973
+ isNewCf: types$6.boolean(),
35974
+ onCloseSidePanel: types$6.function([])
35975
+ });
36268
35976
  activeSheetId;
36269
35977
  store;
36270
35978
  setup() {
@@ -36320,11 +36028,11 @@ var ConditionalFormattingEditor = class extends Component {
36320
36028
  //#region src/components/side_panel/conditional_formatting/cf_preview/cf_preview.ts
36321
36029
  var ConditionalFormatPreview = class extends Component {
36322
36030
  static template = "o-spreadsheet-ConditionalFormatPreview";
36323
- static props = {
36324
- conditionalFormat: Object,
36325
- onMouseDown: Function,
36326
- class: String
36327
- };
36031
+ props = (0, _odoo_owl.props)({
36032
+ conditionalFormat: types$6.ConditionalFormat(),
36033
+ onMouseDown: types$6.function([types$6.instanceOf(MouseEvent)]),
36034
+ class: types$6.string()
36035
+ });
36328
36036
  icons = ICONS;
36329
36037
  cfPreviewRef = (0, _odoo_owl.signal)(null);
36330
36038
  setup() {
@@ -36380,8 +36088,8 @@ var ConditionalFormatPreview = class extends Component {
36380
36088
  //#region src/components/side_panel/conditional_formatting/cf_preview_list/cf_preview_list.ts
36381
36089
  var ConditionalFormatPreviewList = class extends Component {
36382
36090
  static template = "o-spreadsheet-ConditionalFormatPreviewList";
36383
- static props = { onCloseSidePanel: Function };
36384
36091
  static components = { ConditionalFormatPreview };
36092
+ props = (0, _odoo_owl.props)({ onCloseSidePanel: types$6.function([]) });
36385
36093
  dragAndDrop = useDragAndDropListItems();
36386
36094
  cfListRef = (0, _odoo_owl.signal)(null);
36387
36095
  get conditionalFormats() {
@@ -36450,7 +36158,7 @@ var ConditionalFormatPreviewList = class extends Component {
36450
36158
  //#region src/components/side_panel/data_validation/dv_preview/dv_preview.ts
36451
36159
  var DataValidationPreview = class extends Component {
36452
36160
  static template = "o-spreadsheet-DataValidationPreview";
36453
- static props = { rule: Object };
36161
+ props = (0, _odoo_owl.props)({ rule: types$6.DataValidationRule() });
36454
36162
  dvPreviewRef = (0, _odoo_owl.signal)(null);
36455
36163
  setup() {
36456
36164
  useHighlightsOnHover(this.dvPreviewRef, this);
@@ -36485,8 +36193,8 @@ var DataValidationPreview = class extends Component {
36485
36193
  //#region src/components/side_panel/data_validation/data_validation_panel.ts
36486
36194
  var DataValidationPanel = class extends Component {
36487
36195
  static template = "o-spreadsheet-DataValidationPanel";
36488
- static props = { onCloseSidePanel: Function };
36489
36196
  static components = { DataValidationPreview };
36197
+ props = (0, _odoo_owl.props)({ onCloseSidePanel: types$6.function([]) });
36490
36198
  addDataValidationRule() {
36491
36199
  this.env.replaceSidePanel("DataValidationEditor", "DataValidation", { ruleId: UuidGenerator.smallUuid() });
36492
36200
  }
@@ -36540,14 +36248,11 @@ var DataValidationEditor = class extends Component {
36540
36248
  Section,
36541
36249
  ValidationMessages
36542
36250
  };
36543
- static props = {
36544
- ruleId: String,
36545
- onCancel: {
36546
- type: Function,
36547
- optional: true
36548
- },
36549
- onCloseSidePanel: Function
36550
- };
36251
+ props = (0, _odoo_owl.props)({
36252
+ ruleId: types$6.UID(),
36253
+ "onCancel?": types$6.function([]),
36254
+ onCloseSidePanel: types$6.function([])
36255
+ });
36551
36256
  state = (0, _odoo_owl.proxy)({
36552
36257
  rule: this.defaultDataValidationRule,
36553
36258
  errors: [],
@@ -36994,7 +36699,7 @@ var FindAndReplacePanel = class extends Component {
36994
36699
  ValidationMessages,
36995
36700
  Select
36996
36701
  };
36997
- static props = { onCloseSidePanel: Function };
36702
+ props = (0, _odoo_owl.props)({ onCloseSidePanel: types$6.function([]) });
36998
36703
  searchInputRef = (0, _odoo_owl.signal)(null);
36999
36704
  store;
37000
36705
  state;
@@ -37820,13 +37525,6 @@ var MoreFormatsStore = class extends SpreadsheetStore {
37820
37525
  //#region src/components/side_panel/more_formats/more_formats.ts
37821
37526
  var MoreFormatsPanel = class extends Component {
37822
37527
  static template = "o-spreadsheet-MoreFormatsPanel";
37823
- static props = {
37824
- onCloseSidePanel: Function,
37825
- category: {
37826
- type: String,
37827
- optional: true
37828
- }
37829
- };
37830
37528
  static components = {
37831
37529
  BadgeSelection,
37832
37530
  Section,
@@ -37834,6 +37532,14 @@ var MoreFormatsPanel = class extends Component {
37834
37532
  Checkbox,
37835
37533
  Select
37836
37534
  };
37535
+ props = (0, _odoo_owl.props)({
37536
+ onCloseSidePanel: types$6.function([]),
37537
+ "category?": types$6.or([
37538
+ types$6.literal("number"),
37539
+ types$6.literal("date"),
37540
+ types$6.literal("currency")
37541
+ ])
37542
+ });
37837
37543
  store;
37838
37544
  setup() {
37839
37545
  this.store = useLocalStore(MoreFormatsStore, this.props.category);
@@ -37889,11 +37595,11 @@ function handleResult(env, result) {
37889
37595
  //#region src/components/side_panel/named_ranges_panel/named_range_preview/named_range_preview.ts
37890
37596
  var NamedRangePreview = class extends Component {
37891
37597
  static template = "o-spreadsheet-NamedRangePreview";
37892
- static props = { namedRange: Object };
37893
37598
  static components = {
37894
37599
  SelectionInput,
37895
37600
  TextInput
37896
37601
  };
37602
+ props = (0, _odoo_owl.props)({ namedRange: types$6.NamedRange() });
37897
37603
  state = (0, _odoo_owl.proxy)({});
37898
37604
  namedRangePreviewRef = (0, _odoo_owl.signal)(null);
37899
37605
  setup() {
@@ -37945,12 +37651,12 @@ var NamedRangePreview = class extends Component {
37945
37651
  //#region src/components/side_panel/named_ranges_panel/named_ranges_panel.ts
37946
37652
  var NamedRangesPanel = class extends Component {
37947
37653
  static template = "o-spreadsheet-NamedRangesPanel";
37948
- static props = { onCloseSidePanel: Function };
37949
37654
  static components = {
37950
37655
  NamedRangePreview,
37951
37656
  SelectionInput,
37952
37657
  TextInput
37953
37658
  };
37659
+ props = (0, _odoo_owl.props)({ onCloseSidePanel: types$6.function([]) });
37954
37660
  get namedRanges() {
37955
37661
  return this.env.model.getters.getNamedRanges();
37956
37662
  }
@@ -37971,7 +37677,7 @@ const HIGHLIGHT_COLOR = "#e28f08";
37971
37677
  var PerfProfilePanel = class extends Component {
37972
37678
  static template = "o-spreadsheet-PerfProfilePanel";
37973
37679
  static components = { Section };
37974
- static props = { onCloseSidePanel: Function };
37680
+ props = (0, _odoo_owl.props)({ onCloseSidePanel: types$6.function([]) });
37975
37681
  state = (0, _odoo_owl.proxy)({
37976
37682
  selectedIndex: void 0,
37977
37683
  lastProfiledTime: 0
@@ -38187,11 +37893,11 @@ var PivotMeasureDisplayPanelStore = class extends SpreadsheetStore {
38187
37893
  //#region src/components/side_panel/pivot/pivot_measure_display_panel/pivot_measure_display_panel.ts
38188
37894
  var PivotMeasureDisplayPanel = class extends Component {
38189
37895
  static template = "o-spreadsheet-PivotMeasureDisplayPanel";
38190
- static props = {
38191
- onCloseSidePanel: Function,
38192
- pivotId: String,
38193
- measure: Object
38194
- };
37896
+ props = (0, _odoo_owl.props)({
37897
+ onCloseSidePanel: types$6.function([]),
37898
+ pivotId: types$6.UID(),
37899
+ measure: types$6.PivotCoreMeasure()
37900
+ });
38195
37901
  static components = {
38196
37902
  Section,
38197
37903
  Checkbox,
@@ -38253,13 +37959,13 @@ function getVisiblePivotCellPositions(getters, pivotId) {
38253
37959
  //#region src/components/side_panel/pivot/pivot_defer_update/pivot_defer_update.ts
38254
37960
  var PivotDeferUpdate = class extends Component {
38255
37961
  static template = "o-spreadsheet-PivotDeferUpdate";
38256
- static props = {
38257
- deferUpdate: Boolean,
38258
- isDirty: Boolean,
38259
- toggleDeferUpdate: Function,
38260
- discard: Function,
38261
- apply: Function
38262
- };
37962
+ props = (0, _odoo_owl.props)({
37963
+ deferUpdate: types$6.boolean(),
37964
+ isDirty: types$6.boolean(),
37965
+ toggleDeferUpdate: types$6.function([types$6.boolean()]),
37966
+ discard: types$6.function([]),
37967
+ apply: types$6.function([])
37968
+ });
38263
37969
  static components = {
38264
37970
  Section,
38265
37971
  Checkbox
@@ -38272,6 +37978,150 @@ var PivotDeferUpdate = class extends Component {
38272
37978
  }
38273
37979
  };
38274
37980
 
37981
+ //#endregion
37982
+ //#region src/helpers/pivot/pivot_runtime_definition.ts
37983
+ /**
37984
+ * Represent a pivot runtime definition. A pivot runtime definition is a pivot
37985
+ * definition that has been enriched to include the display name of its attributes
37986
+ * (measures, columns, rows).
37987
+ */
37988
+ var PivotRuntimeDefinition = class {
37989
+ measures;
37990
+ columns;
37991
+ rows;
37992
+ filters;
37993
+ sortedColumn;
37994
+ collapsedDomains;
37995
+ customFields;
37996
+ constructor(definition, fields) {
37997
+ this.columns = definition.columns.map((dimension) => this.createPivotDimension(fields, dimension));
37998
+ this.rows = definition.rows.map((dimension) => this.createPivotDimension(fields, dimension));
37999
+ this.measures = definition.measures.map((measure) => this.createMeasure(fields, measure));
38000
+ this.filters = (definition.filters ?? []).map((filter) => this.createPivotFilter(fields, filter));
38001
+ this.sortedColumn = definition.sortedColumn;
38002
+ this.collapsedDomains = definition.collapsedDomains;
38003
+ this.customFields = definition.customFields;
38004
+ }
38005
+ getDimension(nameWithGranularity) {
38006
+ const dimension = this.columns.find((d) => d.nameWithGranularity === nameWithGranularity) || this.rows.find((d) => d.nameWithGranularity === nameWithGranularity);
38007
+ if (!dimension) throw new EvaluationError(_t("Dimension %s does not exist", nameWithGranularity));
38008
+ return dimension;
38009
+ }
38010
+ getMeasure(id) {
38011
+ const measure = this.measures.find((measure) => measure.id === id);
38012
+ if (!measure) throw new EvaluationError(_t("Field %s is not a measure", id));
38013
+ return measure;
38014
+ }
38015
+ get invalidAggregatorsForCustomField() {
38016
+ return [];
38017
+ }
38018
+ createMeasure(fields, measure) {
38019
+ const fieldName = measure.fieldName;
38020
+ const field = fieldName === "__count" ? {
38021
+ name: "__count",
38022
+ string: _t("Count"),
38023
+ type: "integer",
38024
+ aggregator: "sum"
38025
+ } : fields[fieldName];
38026
+ const aggregator = measure.aggregator;
38027
+ let isValid = !!(field || measure.computedBy);
38028
+ for (const dimension of [...this.rows, ...this.columns]) if (fields[dimension.fieldName]?.isCustomField && this.invalidAggregatorsForCustomField.includes(aggregator)) {
38029
+ isValid = false;
38030
+ break;
38031
+ }
38032
+ return {
38033
+ /**
38034
+ * Get the id of the measure, as it is stored in the pivot formula
38035
+ */
38036
+ id: measure.id,
38037
+ /**
38038
+ * Display name of the measure
38039
+ * e.g. "__count" -> "Count", "amount_total" -> "Total Amount"
38040
+ */
38041
+ get displayName() {
38042
+ return measure.userDefinedName ?? field?.string ?? measure.fieldName;
38043
+ },
38044
+ userDefinedName: measure.userDefinedName,
38045
+ /**
38046
+ * Get the name of the field of the measure
38047
+ */
38048
+ fieldName,
38049
+ /**
38050
+ * Get the aggregator of the measure
38051
+ */
38052
+ aggregator,
38053
+ /**
38054
+ * Get the type of the measure field
38055
+ * e.g. "stage_id" -> "many2one", "create_date:month" -> "date"
38056
+ */
38057
+ type: fieldName === "__count" ? "integer" : field?.type ?? "integer",
38058
+ isValid,
38059
+ isHidden: measure.isHidden,
38060
+ format: measure.format,
38061
+ computedBy: measure.computedBy,
38062
+ display: measure.display
38063
+ };
38064
+ }
38065
+ createPivotDimension(fields, dimension) {
38066
+ const field = fields[dimension.fieldName];
38067
+ const type = field?.type ?? "integer";
38068
+ const granularity = field && isDateOrDatetimeField(field) ? dimension.granularity : void 0;
38069
+ return {
38070
+ /**
38071
+ * Get the display name of the dimension
38072
+ * e.g. "stage_id" -> "Stage", "create_date:month" -> "Create Date"
38073
+ */
38074
+ displayName: field?.string ?? dimension.fieldName,
38075
+ /**
38076
+ * Get the name of the dimension, as it is stored in the pivot formula
38077
+ * e.g. "stage_id", "create_date:month"
38078
+ */
38079
+ nameWithGranularity: dimension.fieldName + (granularity ? `:${granularity}` : ""),
38080
+ /**
38081
+ * Get the name of the field of the dimension
38082
+ * e.g. "stage_id" -> "stage_id", "create_date:month" -> "create_date"
38083
+ */
38084
+ fieldName: dimension.fieldName,
38085
+ /**
38086
+ * Get the aggregate operator of the dimension
38087
+ * e.g. "stage_id" -> undefined, "create_date:month" -> "month"
38088
+ */
38089
+ granularity,
38090
+ /**
38091
+ * Get the type of the field of the dimension
38092
+ * e.g. "stage_id" -> "many2one", "create_date:month" -> "date"
38093
+ */
38094
+ type: field?.isCustomField ? "custom" : type,
38095
+ order: dimension.order,
38096
+ isValid: !!field,
38097
+ isCustomField: !!field?.isCustomField,
38098
+ customGroups: field?.customGroups,
38099
+ parentField: field?.parentField
38100
+ };
38101
+ }
38102
+ createPivotFilter(fields, filter) {
38103
+ const field = fields[filter.fieldName];
38104
+ return {
38105
+ ...filter,
38106
+ displayName: field?.name ?? filter.fieldName,
38107
+ isValid: !!field
38108
+ };
38109
+ }
38110
+ };
38111
+
38112
+ //#endregion
38113
+ //#region src/helpers/pivot/spreadsheet_pivot/runtime_definition_spreadsheet_pivot.ts
38114
+ var SpreadsheetPivotRuntimeDefinition = class extends PivotRuntimeDefinition {
38115
+ range;
38116
+ constructor(definition, fields, getters) {
38117
+ super(definition, fields);
38118
+ if (definition.dataSet) {
38119
+ const { sheetId, zone } = definition.dataSet;
38120
+ this.range = getters.getRangeFromZone(sheetId, zone);
38121
+ }
38122
+ }
38123
+ };
38124
+
38275
38125
  //#endregion
38276
38126
  //#region src/types/table.ts
38277
38127
  const filterCriterions = [
@@ -38337,12 +38187,12 @@ const filterDateCriterionOperators = [
38337
38187
  //#region src/components/filters/filter_menu_criterion/filter_menu_criterion.ts
38338
38188
  var FilterMenuCriterion = class extends Component {
38339
38189
  static template = "o-spreadsheet-FilterMenuCriterion";
38340
- static props = {
38341
- criterion: Object,
38342
- onCriterionChanged: Function,
38343
- criterionOperators: Array
38344
- };
38345
38190
  static components = { Select };
38191
+ props = (0, _odoo_owl.props)({
38192
+ criterion: types$6.CriterionFilter(),
38193
+ criterionOperators: types$6.array(types$6.GenericCriterionType()),
38194
+ onCriterionChanged: types$6.function([types$6.CriterionFilter()])
38195
+ });
38346
38196
  state;
38347
38197
  setup() {
38348
38198
  (0, _odoo_owl.onWillUpdateProps)((nextProps) => {
@@ -38375,17 +38225,14 @@ var FilterMenuCriterion = class extends Component {
38375
38225
  var FilterMenuValueItem = class extends Component {
38376
38226
  static template = "o-spreadsheet-FilterMenuValueItem";
38377
38227
  static components = { Checkbox };
38378
- static props = {
38379
- value: String,
38380
- isChecked: Boolean,
38381
- isSelected: Boolean,
38382
- onMouseMove: Function,
38383
- onClick: Function,
38384
- scrolledTo: {
38385
- type: String,
38386
- optional: true
38387
- }
38388
- };
38228
+ props = (0, _odoo_owl.props)({
38229
+ value: _odoo_owl.types.string(),
38230
+ isChecked: _odoo_owl.types.boolean(),
38231
+ isSelected: _odoo_owl.types.boolean(),
38232
+ onMouseMove: _odoo_owl.types.function([]),
38233
+ onClick: _odoo_owl.types.function([]),
38234
+ "scrolledTo?": _odoo_owl.types.or([_odoo_owl.types.literal("top"), _odoo_owl.types.literal("bottom")])
38235
+ });
38389
38236
  itemRef = (0, _odoo_owl.signal)(null);
38390
38237
  setup() {
38391
38238
  (0, _odoo_owl.onWillPatch)(() => {
@@ -38403,11 +38250,15 @@ var FilterMenuValueItem = class extends Component {
38403
38250
  //#region src/components/filters/filter_menu_value_list/filter_menu_value_list.ts
38404
38251
  var FilterMenuValueList = class extends Component {
38405
38252
  static template = "o-spreadsheet-FilterMenuValueList";
38406
- static props = {
38407
- values: Object,
38408
- onUpdateHiddenValues: Function
38409
- };
38410
38253
  static components = { FilterMenuValueItem };
38254
+ props = (0, _odoo_owl.props)({
38255
+ values: types$6.array(types$6.object({
38256
+ checked: types$6.boolean(),
38257
+ string: types$6.string(),
38258
+ "scrolledTo?": types$6.or([types$6.literal("top"), types$6.literal("bottom")])
38259
+ })),
38260
+ onUpdateHiddenValues: types$6.function([types$6.array(types$6.string())])
38261
+ });
38411
38262
  state = (0, _odoo_owl.proxy)({
38412
38263
  displayedValues: [],
38413
38264
  textFilter: "",
@@ -38508,17 +38359,6 @@ var FilterMenuValueList = class extends Component {
38508
38359
  //#region src/components/filters/pivot_filter_menu/pivot_filter_menu.ts
38509
38360
  var PivotFilterMenu = class extends Component {
38510
38361
  static template = "o-spreadsheet-PivotFilterMenu";
38511
- static props = {
38512
- pivotId: String,
38513
- definition: Object,
38514
- filter: Object,
38515
- values: Object,
38516
- onClosed: {
38517
- type: Function,
38518
- optional: true
38519
- },
38520
- onConfirmed: Function
38521
- };
38522
38362
  static components = {
38523
38363
  FilterMenuValueList,
38524
38364
  SidePanelCollapsible,
@@ -38526,6 +38366,18 @@ var PivotFilterMenu = class extends Component {
38526
38366
  };
38527
38367
  criterionCategory = "char";
38528
38368
  updatedCriterionValue;
38369
+ props = (0, _odoo_owl.props)({
38370
+ pivotId: types$6.UID(),
38371
+ definition: types$6.instanceOf(SpreadsheetPivotRuntimeDefinition),
38372
+ filter: types$6.PivotFilter(),
38373
+ values: types$6.array(types$6.object({
38374
+ checked: types$6.boolean(),
38375
+ string: types$6.string(),
38376
+ "scrolledTo?": types$6.or([types$6.literal("top"), types$6.literal("bottom")])
38377
+ })),
38378
+ "onClosed?": types$6.function([]),
38379
+ onConfirmed: types$6.function([types$6.DataFilterValue()])
38380
+ });
38529
38381
  setup() {
38530
38382
  (0, _odoo_owl.onWillUpdateProps)((nextProps) => {
38531
38383
  if (!deepEquals(nextProps.definition, this.props.definition)) {
@@ -38577,21 +38429,29 @@ var PivotFilterMenu = class extends Component {
38577
38429
  //#region src/components/side_panel/pivot/pivot_layout_configurator/pivot_dimension/pivot_dimension.ts
38578
38430
  var PivotDimension = class extends Component {
38579
38431
  static template = "o-spreadsheet-PivotDimension";
38580
- static props = {
38581
- dimension: Object,
38582
- onRemoved: {
38583
- type: Function,
38584
- optional: true
38585
- },
38586
- onNameUpdated: {
38587
- type: Function,
38588
- optional: true
38589
- },
38590
- slots: {
38591
- type: Object,
38592
- optional: true
38593
- }
38594
- };
38432
+ props = (0, _odoo_owl.props)({
38433
+ dimension: types$6.or([
38434
+ types$6.PivotDimension(),
38435
+ types$6.PivotMeasure(),
38436
+ types$6.PivotFilter()
38437
+ ]),
38438
+ "onRemoved?": types$6.function([types$6.or([
38439
+ types$6.PivotDimension(),
38440
+ types$6.PivotMeasure(),
38441
+ types$6.PivotFilter()
38442
+ ])]),
38443
+ "onNameUpdated?": types$6.function([types$6.or([
38444
+ types$6.PivotDimension(),
38445
+ types$6.PivotMeasure(),
38446
+ types$6.PivotFilter()
38447
+ ]), types$6.string()]),
38448
+ "type?": types$6.or([
38449
+ types$6.literal("row"),
38450
+ types$6.literal("col"),
38451
+ types$6.literal("measure"),
38452
+ types$6.literal("filter")
38453
+ ])
38454
+ });
38595
38455
  static components = {
38596
38456
  CogWheelMenu,
38597
38457
  TextInput
@@ -38614,12 +38474,12 @@ var PivotFilterEditor = class extends Component {
38614
38474
  Popover,
38615
38475
  PivotFilterMenu
38616
38476
  };
38617
- static props = {
38618
- pivotId: String,
38619
- definition: Object,
38620
- filter: Object,
38621
- onFiltersUpdated: Function
38622
- };
38477
+ props = (0, _odoo_owl.props)({
38478
+ pivotId: types$6.UID(),
38479
+ definition: types$6.instanceOf(SpreadsheetPivotRuntimeDefinition),
38480
+ filter: types$6.PivotFilter(),
38481
+ onFiltersUpdated: types$6.function([types$6.SpreadsheetPivotCoreDefinition()])
38482
+ });
38623
38483
  state;
38624
38484
  buttonFilter = (0, _odoo_owl.signal)(null);
38625
38485
  popover;
@@ -38746,14 +38606,10 @@ var AddDimensionButton = class extends Component {
38746
38606
  Popover,
38747
38607
  TextValueProvider
38748
38608
  };
38749
- static props = {
38750
- onFieldPicked: Function,
38751
- fields: Array,
38752
- slots: {
38753
- type: Object,
38754
- optional: true
38755
- }
38756
- };
38609
+ props = (0, _odoo_owl.props)({
38610
+ onFieldPicked: types$6.function([types$6.string()]),
38611
+ fields: types$6.array()
38612
+ });
38757
38613
  buttonRef = (0, _odoo_owl.signal)(null);
38758
38614
  popover = (0, _odoo_owl.proxy)({ isOpen: false });
38759
38615
  search = (0, _odoo_owl.proxy)({ input: "" });
@@ -38845,11 +38701,11 @@ var AddDimensionButton = class extends Component {
38845
38701
  //#region src/components/side_panel/pivot/pivot_custom_groups_collapsible/pivot_custom_groups_collapsible.ts
38846
38702
  var PivotCustomGroupsCollapsible = class extends Component {
38847
38703
  static template = "o-spreadsheet-PivotCustomGroupsCollapsible";
38848
- static props = {
38849
- pivotId: String,
38850
- customField: Object,
38851
- onCustomFieldUpdated: Function
38852
- };
38704
+ props = (0, _odoo_owl.props)({
38705
+ pivotId: types$6.UID(),
38706
+ customField: types$6.PivotCustomGroupedField(),
38707
+ onCustomFieldUpdated: types$6.function([types$6.object({})])
38708
+ });
38853
38709
  static components = {
38854
38710
  SidePanelCollapsible,
38855
38711
  TextInput,
@@ -38909,12 +38765,12 @@ var PivotCustomGroupsCollapsible = class extends Component {
38909
38765
  //#region src/components/side_panel/pivot/pivot_layout_configurator/pivot_dimension_granularity/pivot_dimension_granularity.ts
38910
38766
  var PivotDimensionGranularity = class extends Component {
38911
38767
  static template = "o-spreadsheet-PivotDimensionGranularity";
38912
- static props = {
38913
- dimension: Object,
38914
- onUpdated: Function,
38915
- availableGranularities: Set,
38916
- allGranularities: Array
38917
- };
38768
+ props = (0, _odoo_owl.props)({
38769
+ dimension: types$6.PivotDimension(),
38770
+ onUpdated: types$6.function([types$6.PivotDimension(), types$6.instanceOf(InputEvent)]),
38771
+ availableGranularities: types$6.SetOf(),
38772
+ allGranularities: types$6.array()
38773
+ });
38918
38774
  static components = { Select };
38919
38775
  periods = ALL_PERIODS;
38920
38776
  get granularityOptions() {
@@ -38930,10 +38786,11 @@ var PivotDimensionGranularity = class extends Component {
38930
38786
  //#region src/components/side_panel/pivot/pivot_layout_configurator/pivot_dimension_order/pivot_dimension_order.ts
38931
38787
  var PivotDimensionOrder = class extends Component {
38932
38788
  static template = "o-spreadsheet-PivotDimensionOrder";
38933
- static props = {
38934
- dimension: Object,
38935
- onUpdated: Function
38936
- };
38789
+ props = (0, _odoo_owl.props)({
38790
+ dimension: types$6.PivotDimension(),
38791
+ onUpdated: types$6.function([types$6.PivotDimension(), types$6.instanceOf(InputEvent)]),
38792
+ "isMeasureSorted?": types$6.boolean()
38793
+ });
38937
38794
  static components = { Select };
38938
38795
  get orderSelectOptions() {
38939
38796
  const options = [{
@@ -38943,12 +38800,20 @@ var PivotDimensionOrder = class extends Component {
38943
38800
  value: "desc",
38944
38801
  label: _t("Descending")
38945
38802
  }];
38803
+ if (this.props.isMeasureSorted) options.unshift({
38804
+ value: "measures",
38805
+ label: _t("Sorted by measure")
38806
+ });
38946
38807
  if (this.props.dimension.type === "date") return options;
38947
38808
  return [{
38948
38809
  value: "",
38949
38810
  label: _t("Unsorted")
38950
38811
  }, ...options];
38951
38812
  }
38813
+ get selectedValue() {
38814
+ if (this.props.isMeasureSorted) return "measures";
38815
+ return this.props.dimension.order || "";
38816
+ }
38952
38817
  };
38953
38818
 
38954
38819
  //#endregion
@@ -39003,15 +38868,15 @@ var PivotMeasureEditor = class extends Component {
39003
38868
  StandaloneComposer,
39004
38869
  Select
39005
38870
  };
39006
- static props = {
39007
- definition: Object,
39008
- measure: Object,
39009
- onMeasureUpdated: Function,
39010
- onRemoved: Function,
39011
- generateMeasureId: Function,
39012
- aggregators: Object,
39013
- pivotId: String
39014
- };
38871
+ props = (0, _odoo_owl.props)({
38872
+ pivotId: types$6.string(),
38873
+ definition: types$6.PivotRuntimeDefinition(),
38874
+ measure: types$6.PivotMeasure(),
38875
+ onMeasureUpdated: types$6.function([types$6.PivotMeasure()]),
38876
+ onRemoved: types$6.function([]),
38877
+ generateMeasureId: types$6.function([types$6.string(), types$6.string()], types$6.string()),
38878
+ aggregators: types$6.object({})
38879
+ });
39015
38880
  getMeasureAutocomplete() {
39016
38881
  return createMeasureAutoComplete(this.props.definition, this.props.measure);
39017
38882
  }
@@ -39091,10 +38956,10 @@ var PivotMeasureEditor = class extends Component {
39091
38956
  var PivotSortSection = class extends Component {
39092
38957
  static template = "o-spreadsheet-PivotSortSection";
39093
38958
  static components = { Section };
39094
- static props = {
39095
- definition: Object,
39096
- pivotId: String
39097
- };
38959
+ props = (0, _odoo_owl.props)({
38960
+ definition: types$6.PivotRuntimeDefinition(),
38961
+ pivotId: types$6.UID()
38962
+ });
39098
38963
  get hasValidSort() {
39099
38964
  const pivot = this.env.model.getters.getPivot(this.props.pivotId);
39100
38965
  return !!this.props.definition.sortedColumn && isSortedColumnValid(this.props.definition.sortedColumn, pivot);
@@ -39146,21 +39011,18 @@ var PivotLayoutConfigurator = class extends Component {
39146
39011
  PivotCustomGroupsCollapsible,
39147
39012
  SidePanelCollapsible
39148
39013
  };
39149
- static props = {
39150
- definition: Object,
39151
- onDimensionsUpdated: Function,
39152
- onFiltersUpdated: Function,
39153
- unusedGroupableFields: Array,
39154
- measureFields: Array,
39155
- unusedGranularities: Object,
39156
- dateGranularities: Array,
39157
- datetimeGranularities: Array,
39158
- getScrollableContainerEl: {
39159
- type: Function,
39160
- optional: true
39161
- },
39162
- pivotId: String
39163
- };
39014
+ props = (0, _odoo_owl.props)({
39015
+ definition: types$6.instanceOf(PivotRuntimeDefinition),
39016
+ onDimensionsUpdated: types$6.function([types$6.PivotCoreDefinition()]),
39017
+ onFiltersUpdated: types$6.function([types$6.PivotCoreDefinition()]),
39018
+ unusedGroupableFields: types$6.array(types$6.PivotField()),
39019
+ measureFields: types$6.array(types$6.PivotField()),
39020
+ unusedGranularities: types$6.RecordOf(),
39021
+ dateGranularities: types$6.array(types$6.string()),
39022
+ datetimeGranularities: types$6.array(types$6.string()),
39023
+ "getScrollableContainerEl?": types$6.function([], types$6.instanceOf(HTMLElement)),
39024
+ pivotId: types$6.UID()
39025
+ });
39164
39026
  dimensionsRef = (0, _odoo_owl.signal)(null);
39165
39027
  dragAndDrop = useDragAndDropListItems();
39166
39028
  AGGREGATORS = AGGREGATORS;
@@ -39322,7 +39184,8 @@ var PivotLayoutConfigurator = class extends Component {
39322
39184
  return this.env.model.getters.getPivotCoreDefinition(this.props.pivotId).customFields?.[dimension.nameWithGranularity];
39323
39185
  }
39324
39186
  updateOrder(updateDimension, order) {
39325
- const { rows, columns } = this.props.definition;
39187
+ const { rows, columns, sortedColumn } = this.props.definition;
39188
+ const isRow = rows.some((row) => row.nameWithGranularity === updateDimension.nameWithGranularity);
39326
39189
  this.props.onDimensionsUpdated({
39327
39190
  rows: rows.map((row) => {
39328
39191
  if (row.nameWithGranularity === updateDimension.nameWithGranularity) return {
@@ -39337,7 +39200,8 @@ var PivotLayoutConfigurator = class extends Component {
39337
39200
  order: order || void 0
39338
39201
  };
39339
39202
  return col;
39340
- })
39203
+ }),
39204
+ sortedColumn: isRow ? void 0 : sortedColumn
39341
39205
  });
39342
39206
  }
39343
39207
  updateGranularity(dimension, granularity) {
@@ -39363,6 +39227,9 @@ var PivotLayoutConfigurator = class extends Component {
39363
39227
  const possibleValues = this.env.model.getters.getPivot(this.props.pivotId).getPossibleFieldValues(dimension);
39364
39228
  return possibleValues.length > 100 ? _t("This dimension contains a lot of values (%s), and might slow down the pivot table.", possibleValues.length) : void 0;
39365
39229
  }
39230
+ get hasSortedColumn() {
39231
+ return !!this.props.definition.sortedColumn;
39232
+ }
39366
39233
  };
39367
39234
 
39368
39235
  //#endregion
@@ -39374,10 +39241,10 @@ var PivotTitleSection = class extends Component {
39374
39241
  Section,
39375
39242
  TextInput
39376
39243
  };
39377
- static props = {
39378
- pivotId: String,
39379
- flipAxis: Function
39380
- };
39244
+ props = (0, _odoo_owl.props)({
39245
+ pivotId: types$6.UID(),
39246
+ flipAxis: types$6.function([])
39247
+ });
39381
39248
  get cogWheelMenuItems() {
39382
39249
  return [
39383
39250
  {
@@ -39443,150 +39310,6 @@ var PivotTitleSection = class extends Component {
39443
39310
  }
39444
39311
  };
39445
39312
 
39446
- //#endregion
39447
- //#region src/helpers/pivot/pivot_runtime_definition.ts
39448
- /**
39449
- * Represent a pivot runtime definition. A pivot runtime definition is a pivot
39450
- * definition that has been enriched to include the display name of its attributes
39451
- * (measures, columns, rows).
39452
- */
39453
- var PivotRuntimeDefinition = class {
39454
- measures;
39455
- columns;
39456
- rows;
39457
- filters;
39458
- sortedColumn;
39459
- collapsedDomains;
39460
- customFields;
39461
- constructor(definition, fields) {
39462
- this.columns = definition.columns.map((dimension) => this.createPivotDimension(fields, dimension));
39463
- this.rows = definition.rows.map((dimension) => this.createPivotDimension(fields, dimension));
39464
- this.measures = definition.measures.map((measure) => this.createMeasure(fields, measure));
39465
- this.filters = (definition.filters ?? []).map((filter) => this.createPivotFilter(fields, filter));
39466
- this.sortedColumn = definition.sortedColumn;
39467
- this.collapsedDomains = definition.collapsedDomains;
39468
- this.customFields = definition.customFields;
39469
- }
39470
- getDimension(nameWithGranularity) {
39471
- const dimension = this.columns.find((d) => d.nameWithGranularity === nameWithGranularity) || this.rows.find((d) => d.nameWithGranularity === nameWithGranularity);
39472
- if (!dimension) throw new EvaluationError(_t("Dimension %s does not exist", nameWithGranularity));
39473
- return dimension;
39474
- }
39475
- getMeasure(id) {
39476
- const measure = this.measures.find((measure) => measure.id === id);
39477
- if (!measure) throw new EvaluationError(_t("Field %s is not a measure", id));
39478
- return measure;
39479
- }
39480
- get invalidAggregatorsForCustomField() {
39481
- return [];
39482
- }
39483
- createMeasure(fields, measure) {
39484
- const fieldName = measure.fieldName;
39485
- const field = fieldName === "__count" ? {
39486
- name: "__count",
39487
- string: _t("Count"),
39488
- type: "integer",
39489
- aggregator: "sum"
39490
- } : fields[fieldName];
39491
- const aggregator = measure.aggregator;
39492
- let isValid = !!(field || measure.computedBy);
39493
- for (const dimension of [...this.rows, ...this.columns]) if (fields[dimension.fieldName]?.isCustomField && this.invalidAggregatorsForCustomField.includes(aggregator)) {
39494
- isValid = false;
39495
- break;
39496
- }
39497
- return {
39498
- /**
39499
- * Get the id of the measure, as it is stored in the pivot formula
39500
- */
39501
- id: measure.id,
39502
- /**
39503
- * Display name of the measure
39504
- * e.g. "__count" -> "Count", "amount_total" -> "Total Amount"
39505
- */
39506
- get displayName() {
39507
- return measure.userDefinedName ?? field?.string ?? measure.fieldName;
39508
- },
39509
- userDefinedName: measure.userDefinedName,
39510
- /**
39511
- * Get the name of the field of the measure
39512
- */
39513
- fieldName,
39514
- /**
39515
- * Get the aggregator of the measure
39516
- */
39517
- aggregator,
39518
- /**
39519
- * Get the type of the measure field
39520
- * e.g. "stage_id" -> "many2one", "create_date:month" -> "date"
39521
- */
39522
- type: fieldName === "__count" ? "integer" : field?.type ?? "integer",
39523
- isValid,
39524
- isHidden: measure.isHidden,
39525
- format: measure.format,
39526
- computedBy: measure.computedBy,
39527
- display: measure.display
39528
- };
39529
- }
39530
- createPivotDimension(fields, dimension) {
39531
- const field = fields[dimension.fieldName];
39532
- const type = field?.type ?? "integer";
39533
- const granularity = field && isDateOrDatetimeField(field) ? dimension.granularity : void 0;
39534
- return {
39535
- /**
39536
- * Get the display name of the dimension
39537
- * e.g. "stage_id" -> "Stage", "create_date:month" -> "Create Date"
39538
- */
39539
- displayName: field?.string ?? dimension.fieldName,
39540
- /**
39541
- * Get the name of the dimension, as it is stored in the pivot formula
39542
- * e.g. "stage_id", "create_date:month"
39543
- */
39544
- nameWithGranularity: dimension.fieldName + (granularity ? `:${granularity}` : ""),
39545
- /**
39546
- * Get the name of the field of the dimension
39547
- * e.g. "stage_id" -> "stage_id", "create_date:month" -> "create_date"
39548
- */
39549
- fieldName: dimension.fieldName,
39550
- /**
39551
- * Get the aggregate operator of the dimension
39552
- * e.g. "stage_id" -> undefined, "create_date:month" -> "month"
39553
- */
39554
- granularity,
39555
- /**
39556
- * Get the type of the field of the dimension
39557
- * e.g. "stage_id" -> "many2one", "create_date:month" -> "date"
39558
- */
39559
- type: field?.isCustomField ? "custom" : type,
39560
- order: dimension.order,
39561
- isValid: !!field,
39562
- isCustomField: !!field?.isCustomField,
39563
- customGroups: field?.customGroups,
39564
- parentField: field?.parentField
39565
- };
39566
- }
39567
- createPivotFilter(fields, filter) {
39568
- const field = fields[filter.fieldName];
39569
- return {
39570
- ...filter,
39571
- displayName: field?.name ?? filter.fieldName,
39572
- isValid: !!field
39573
- };
39574
- }
39575
- };
39576
-
39577
- //#endregion
39578
- //#region src/helpers/pivot/spreadsheet_pivot/runtime_definition_spreadsheet_pivot.ts
39579
- var SpreadsheetPivotRuntimeDefinition = class extends PivotRuntimeDefinition {
39580
- range;
39581
- constructor(definition, fields, getters) {
39582
- super(definition, fields);
39583
- if (definition.dataSet) {
39584
- const { sheetId, zone } = definition.dataSet;
39585
- this.range = getters.getRangeFromZone(sheetId, zone);
39586
- }
39587
- }
39588
- };
39589
-
39590
39313
  //#endregion
39591
39314
  //#region src/helpers/filter_helpers.ts
39592
39315
  /**
@@ -41138,10 +40861,6 @@ var PivotSidePanelStore = class extends SpreadsheetStore {
41138
40861
  //#region src/components/side_panel/pivot/pivot_side_panel/pivot_spreadsheet_side_panel/pivot_spreadsheet_side_panel.ts
41139
40862
  var PivotSpreadsheetSidePanel = class extends Component {
41140
40863
  static template = "o-spreadsheet-PivotSpreadsheetSidePanel";
41141
- static props = {
41142
- pivotId: String,
41143
- onCloseSidePanel: Function
41144
- };
41145
40864
  static components = {
41146
40865
  PivotLayoutConfigurator,
41147
40866
  Section,
@@ -41152,6 +40871,10 @@ var PivotSpreadsheetSidePanel = class extends Component {
41152
40871
  AddDimensionButton,
41153
40872
  PivotFilterEditor
41154
40873
  };
40874
+ props = (0, _odoo_owl.props)({
40875
+ pivotId: types$6.UID(),
40876
+ onCloseSidePanel: types$6.function([])
40877
+ });
41155
40878
  store;
41156
40879
  state;
41157
40880
  pivotSidePanelRef = (0, _odoo_owl.signal)(null);
@@ -42386,23 +42109,14 @@ function drawTexts(ctx, tableStyle, params) {
42386
42109
  var TableStylePreview = class extends Component {
42387
42110
  static template = "o-spreadsheet-TableStylePreview";
42388
42111
  static components = { MenuPopover };
42389
- static props = {
42390
- tableConfig: Object,
42391
- tableStyle: Object,
42392
- type: String,
42393
- styleId: {
42394
- type: String,
42395
- optional: true
42396
- },
42397
- selected: {
42398
- type: Boolean,
42399
- optional: true
42400
- },
42401
- onClick: {
42402
- type: Function,
42403
- optional: true
42404
- }
42405
- };
42112
+ props = (0, _odoo_owl.props)({
42113
+ tableConfig: types$6.TableConfig(),
42114
+ tableStyle: types$6.TableStyle(),
42115
+ type: types$6.or([types$6.literal("table"), types$6.literal("pivot")]),
42116
+ "styleId?": types$6.string(),
42117
+ "selected?": types$6.boolean(),
42118
+ "onClick?": types$6.function([])
42119
+ });
42406
42120
  canvasRef = (0, _odoo_owl.signal)(null);
42407
42121
  menu = (0, _odoo_owl.proxy)({
42408
42122
  isOpen: false,
@@ -42488,21 +42202,15 @@ var TableStylesPopover = class extends Component {
42488
42202
  Popover,
42489
42203
  TableStylePreview
42490
42204
  };
42491
- static props = {
42492
- tableConfig: Object,
42493
- popoverProps: {
42494
- type: Object,
42495
- optional: true
42496
- },
42497
- closePopover: Function,
42498
- onStylePicked: Function,
42499
- selectedStyleId: {
42500
- type: String,
42501
- optional: true
42502
- },
42503
- tableStyles: Object,
42504
- type: String
42505
- };
42205
+ props = (0, _odoo_owl.props)({
42206
+ tableConfig: types$6.object({}),
42207
+ "popoverProps?": types$6.object({}),
42208
+ closePopover: types$6.function([]),
42209
+ onStylePicked: types$6.function([types$6.string()]),
42210
+ "selectedStyleId?": types$6.string(),
42211
+ tableStyles: types$6.RecordOf(),
42212
+ type: types$6.or([types$6.literal("table"), types$6.literal("pivot")])
42213
+ });
42506
42214
  tableStyleListRef = (0, _odoo_owl.signal)(null);
42507
42215
  state = (0, _odoo_owl.proxy)({ selectedCategory: this.initialSelectedCategory });
42508
42216
  setup() {
@@ -42542,12 +42250,12 @@ var TableStylePicker = class extends Component {
42542
42250
  TableStylesPopover,
42543
42251
  TableStylePreview
42544
42252
  };
42545
- static props = {
42546
- tableConfig: Object,
42547
- onStylePicked: Function,
42548
- tableStyles: Object,
42549
- type: String
42550
- };
42253
+ props = (0, _odoo_owl.props)({
42254
+ tableConfig: types$6.TableConfig(),
42255
+ onStylePicked: types$6.function([types$6.string()]),
42256
+ tableStyles: types$6.RecordOf(),
42257
+ type: types$6.or([types$6.literal("table"), types$6.literal("pivot")])
42258
+ });
42551
42259
  state = (0, _odoo_owl.proxy)({ popoverProps: void 0 });
42552
42260
  getDisplayedTableStyles() {
42553
42261
  const allStyles = this.props.tableStyles;
@@ -42588,13 +42296,13 @@ var TableStylePicker = class extends Component {
42588
42296
  //#region src/components/side_panel/pivot/pivot_side_panel/pivot_design_panel/pivot_design_panel.ts
42589
42297
  var PivotDesignPanel = class extends Component {
42590
42298
  static template = "o-spreadsheet-PivotDesignPanel";
42591
- static props = { pivotId: String };
42592
42299
  static components = {
42593
42300
  Section,
42594
42301
  Checkbox,
42595
42302
  NumberInput,
42596
42303
  TableStylePicker
42597
42304
  };
42305
+ props = (0, _odoo_owl.props)({ pivotId: types$6.UID() });
42598
42306
  store;
42599
42307
  setup() {
42600
42308
  this.store = useLocalStore(PivotSidePanelStore, this.props.pivotId, "neverDefer");
@@ -42643,20 +42351,16 @@ var PivotDesignPanel = class extends Component {
42643
42351
  //#region src/components/side_panel/pivot/pivot_side_panel/pivot_side_panel.ts
42644
42352
  var PivotSidePanel = class extends Component {
42645
42353
  static template = "o-spreadsheet-PivotSidePanel";
42646
- static props = {
42647
- pivotId: String,
42648
- onCloseSidePanel: Function,
42649
- openTab: {
42650
- type: String,
42651
- optional: true
42652
- }
42653
- };
42654
- static defaultProps = { openTab: "configuration" };
42655
42354
  static components = {
42656
42355
  PivotLayoutConfigurator,
42657
42356
  Section,
42658
42357
  PivotDesignPanel
42659
42358
  };
42359
+ props = (0, _odoo_owl.props)({
42360
+ pivotId: types$6.UID(),
42361
+ onCloseSidePanel: types$6.function([]),
42362
+ "openTab?": types$6.or([types$6.literal("configuration"), types$6.literal("design")])
42363
+ }, { openTab: "configuration" });
42660
42364
  state = (0, _odoo_owl.proxy)({ panel: this.props.openTab || "configuration" });
42661
42365
  setup() {
42662
42366
  useHighlights(this);
@@ -42686,7 +42390,7 @@ var RemoveDuplicatesPanel = class extends Component {
42686
42390
  Section,
42687
42391
  Checkbox
42688
42392
  };
42689
- static props = { onCloseSidePanel: Function };
42393
+ props = (0, _odoo_owl.props)({ onCloseSidePanel: types$6.function([]) });
42690
42394
  state = (0, _odoo_owl.proxy)({
42691
42395
  hasHeader: false,
42692
42396
  columns: {}
@@ -42770,7 +42474,7 @@ var SettingsPanel = class extends Component {
42770
42474
  BadgeSelection,
42771
42475
  Select
42772
42476
  };
42773
- static props = { onCloseSidePanel: Function };
42477
+ props = (0, _odoo_owl.props)({ onCloseSidePanel: types$6.function([]) });
42774
42478
  loadedLocales = [];
42775
42479
  setup() {
42776
42480
  (0, _odoo_owl.onWillStart)(() => this.loadLocales());
@@ -42888,7 +42592,7 @@ var SplitIntoColumnsPanel = class extends Component {
42888
42592
  Checkbox,
42889
42593
  Select
42890
42594
  };
42891
- static props = { onCloseSidePanel: Function };
42595
+ props = (0, _odoo_owl.props)({ onCloseSidePanel: types$6.function([]) });
42892
42596
  state = (0, _odoo_owl.proxy)({
42893
42597
  separatorValue: "auto",
42894
42598
  addNewColumns: false,
@@ -42964,10 +42668,10 @@ var TablePanel = class extends Component {
42964
42668
  Section,
42965
42669
  NumberInput
42966
42670
  };
42967
- static props = {
42968
- onCloseSidePanel: Function,
42969
- table: Object
42970
- };
42671
+ props = (0, _odoo_owl.props)({
42672
+ onCloseSidePanel: types$6.function([]),
42673
+ table: types$6.CoreTable()
42674
+ });
42971
42675
  state;
42972
42676
  setup() {
42973
42677
  const sheetId = this.env.model.getters.getActiveSheetId();
@@ -43124,17 +42828,11 @@ var TableStyleEditorPanel = class extends Component {
43124
42828
  RoundColorPicker,
43125
42829
  TableStylePreview
43126
42830
  };
43127
- static props = {
43128
- onCloseSidePanel: Function,
43129
- onStylePicked: {
43130
- type: Function,
43131
- optional: true
43132
- },
43133
- styleId: {
43134
- type: String,
43135
- optional: true
43136
- }
43137
- };
42831
+ props = (0, _odoo_owl.props)({
42832
+ onCloseSidePanel: types$6.function([]),
42833
+ "onStylePicked?": types$6.function([types$6.string()]),
42834
+ "styleId?": types$6.string()
42835
+ });
43138
42836
  state = (0, _odoo_owl.proxy)(this.getInitialState());
43139
42837
  setup() {
43140
42838
  useExternalListener(window, "click", () => this.state.pickerOpened = false);
@@ -45464,10 +45162,10 @@ function adjustIndexWithinBounds(index, position, max) {
45464
45162
  //#region src/components/autofill/autofill.ts
45465
45163
  var Autofill = class extends Component {
45466
45164
  static template = "o-spreadsheet-Autofill";
45467
- static props = {
45468
- position: Object,
45469
- isVisible: Boolean
45470
- };
45165
+ props = (0, _odoo_owl.props)({
45166
+ position: types$6.DOMCoordinates(),
45167
+ isVisible: types$6.boolean()
45168
+ });
45471
45169
  state = (0, _odoo_owl.proxy)({
45472
45170
  position: {
45473
45171
  x: 0,
@@ -45542,7 +45240,7 @@ var Autofill = class extends Component {
45542
45240
  }
45543
45241
  };
45544
45242
  var TooltipComponent = class extends Component {
45545
- static props = { content: String };
45243
+ props = (0, _odoo_owl.props)({ content: types$6.string() });
45546
45244
  static template = _odoo_owl.xml`
45547
45245
  <div t-out="this.props.content"/>
45548
45246
  `;
@@ -45552,13 +45250,13 @@ var TooltipComponent = class extends Component {
45552
45250
  //#region src/components/collaborative_client_tag/collaborative_client_tag.ts
45553
45251
  var ClientTag = class extends Component {
45554
45252
  static template = "o-spreadsheet-ClientTag";
45555
- static props = {
45556
- active: Boolean,
45557
- name: String,
45558
- color: String,
45559
- col: Number,
45560
- row: Number
45561
- };
45253
+ props = (0, _odoo_owl.props)({
45254
+ active: types$6.boolean(),
45255
+ name: types$6.string(),
45256
+ color: types$6.Color(),
45257
+ col: types$6.HeaderIndex(),
45258
+ row: types$6.HeaderIndex()
45259
+ });
45562
45260
  get tagStyle() {
45563
45261
  const { col, row, color } = this.props;
45564
45262
  const { height } = this.env.model.getters.getSheetViewDimensionWithHeaders();
@@ -46132,11 +45830,11 @@ const GRID_CELL_REFERENCE_TOP_OFFSET = 28;
46132
45830
  */
46133
45831
  var GridComposer = class extends Component {
46134
45832
  static template = "o-spreadsheet-GridComposer";
46135
- static props = {
46136
- gridDims: Object,
46137
- onInputContextMenu: Function
46138
- };
46139
45833
  static components = { Composer };
45834
+ props = (0, _odoo_owl.props)({
45835
+ gridDims: types$6.DOMDimension(),
45836
+ onInputContextMenu: types$6.function([types$6.instanceOf(MouseEvent)])
45837
+ });
46140
45838
  rect = this.defaultRect;
46141
45839
  isEditing = false;
46142
45840
  isCellReferenceVisible = false;
@@ -46596,7 +46294,6 @@ function getAxis(getters, figureUI, dnd, axisType) {
46596
46294
  */
46597
46295
  var FiguresContainer = class extends Component {
46598
46296
  static template = "o-spreadsheet-FiguresContainer";
46599
- static props = {};
46600
46297
  static components = { FigureComponent };
46601
46298
  dnd = (0, _odoo_owl.proxy)({
46602
46299
  draggedFigure: void 0,
@@ -46947,7 +46644,6 @@ var FiguresContainer = class extends Component {
46947
46644
  //#region src/components/grid_add_rows_footer/grid_add_rows_footer.ts
46948
46645
  var GridAddRowsFooter = class extends Component {
46949
46646
  static template = "o-spreadsheet-GridAddRowsFooter";
46950
- static props = {};
46951
46647
  static components = { ValidationMessages };
46952
46648
  DOMFocusableElementStore;
46953
46649
  inputRef = (0, _odoo_owl.signal)(null);
@@ -47255,40 +46951,32 @@ function useCellHovered(env, gridRef) {
47255
46951
  }
47256
46952
  var GridOverlay = class extends Component {
47257
46953
  static template = "o-spreadsheet-GridOverlay";
47258
- static props = {
47259
- onCellDoubleClicked: {
47260
- type: Function,
47261
- optional: true
47262
- },
47263
- onCellClicked: {
47264
- type: Function,
47265
- optional: true
47266
- },
47267
- onCellRightClicked: {
47268
- type: Function,
47269
- optional: true
47270
- },
47271
- onGridResized: {
47272
- type: Function,
47273
- optional: true
47274
- },
47275
- onGridMoved: Function,
47276
- gridOverlayDimensions: String,
47277
- slots: {
47278
- type: Object,
47279
- optional: true
47280
- }
47281
- };
47282
46954
  static components = {
47283
46955
  FiguresContainer,
47284
46956
  GridAddRowsFooter
47285
46957
  };
47286
- static defaultProps = {
46958
+ props = (0, _odoo_owl.props)({
46959
+ "onCellDoubleClicked?": types$6.function([types$6.HeaderIndex(), types$6.HeaderIndex()]),
46960
+ "onCellClicked?": types$6.function([
46961
+ types$6.HeaderIndex(),
46962
+ types$6.HeaderIndex(),
46963
+ types$6.GridClickModifiers(),
46964
+ types$6.ZoomedMouseEvent()
46965
+ ]),
46966
+ "onCellRightClicked?": types$6.function([
46967
+ types$6.HeaderIndex(),
46968
+ types$6.HeaderIndex(),
46969
+ types$6.DOMCoordinates()
46970
+ ]),
46971
+ "onGridResized?": types$6.function([]),
46972
+ onGridMoved: types$6.function([types$6.Pixel(), types$6.Pixel()]),
46973
+ gridOverlayDimensions: types$6.string()
46974
+ }, {
47287
46975
  onCellDoubleClicked: () => {},
47288
46976
  onCellClicked: () => {},
47289
46977
  onCellRightClicked: () => {},
47290
46978
  onGridResized: () => {}
47291
- };
46979
+ });
47292
46980
  gridOverlayRef = (0, _odoo_owl.signal)(null);
47293
46981
  cellPopovers;
47294
46982
  paintFormatStore;
@@ -47398,12 +47086,12 @@ var GridOverlay = class extends Component {
47398
47086
  //#region src/components/grid_popover/grid_popover.ts
47399
47087
  var GridPopover = class extends Component {
47400
47088
  static template = "o-spreadsheet-GridPopover";
47401
- static props = {
47402
- onClosePopover: Function,
47403
- onMouseWheel: Function,
47404
- gridRect: Object
47405
- };
47406
47089
  static components = { Popover };
47090
+ props = (0, _odoo_owl.props)({
47091
+ onClosePopover: types$6.function([]),
47092
+ onMouseWheel: types$6.function([types$6.instanceOf(WheelEvent)]),
47093
+ gridRect: types$6.Rect()
47094
+ });
47407
47095
  cellPopovers;
47408
47096
  setup() {
47409
47097
  this.cellPopovers = useStore(CellPopoverStore);
@@ -47427,15 +47115,14 @@ var GridPopover = class extends Component {
47427
47115
  //#region src/components/headers_overlay/unhide_headers.ts
47428
47116
  var UnhideRowHeaders = class extends Component {
47429
47117
  static template = "o-spreadsheet-UnhideRowHeaders";
47430
- static props = {
47431
- headersGroups: Array,
47432
- headerRange: Object,
47433
- offset: {
47434
- type: Number,
47435
- optional: true
47436
- }
47437
- };
47438
- static defaultProps = { offset: 0 };
47118
+ props = (0, _odoo_owl.props)({
47119
+ headersGroups: types$6.array(),
47120
+ headerRange: types$6.object({
47121
+ start: types$6.HeaderIndex(),
47122
+ end: types$6.HeaderIndex()
47123
+ }),
47124
+ "offset?": types$6.number()
47125
+ }, { offset: 0 });
47439
47126
  get sheetId() {
47440
47127
  return this.env.model.getters.getActiveSheetId();
47441
47128
  }
@@ -47471,15 +47158,14 @@ var UnhideRowHeaders = class extends Component {
47471
47158
  };
47472
47159
  var UnhideColumnHeaders = class extends Component {
47473
47160
  static template = "o-spreadsheet-UnhideColumnHeaders";
47474
- static props = {
47475
- headersGroups: Array,
47476
- headerRange: Object,
47477
- offset: {
47478
- type: Number,
47479
- optional: true
47480
- }
47481
- };
47482
- static defaultProps = { offset: 0 };
47161
+ props = (0, _odoo_owl.props)({
47162
+ headersGroups: types$6.array(),
47163
+ headerRange: types$6.object({
47164
+ start: types$6.HeaderIndex(),
47165
+ end: types$6.HeaderIndex()
47166
+ }),
47167
+ "offset?": types$6.number()
47168
+ }, { offset: 0 });
47483
47169
  get sheetId() {
47484
47170
  return this.env.model.getters.getActiveSheetId();
47485
47171
  }
@@ -47510,8 +47196,13 @@ var UnhideColumnHeaders = class extends Component {
47510
47196
 
47511
47197
  //#endregion
47512
47198
  //#region src/components/headers_overlay/headers_overlay.ts
47199
+ const resizerPropsDefinition = { onOpenContextMenu: types$6.function([
47200
+ types$6.ContextMenuType(),
47201
+ types$6.Pixel(),
47202
+ types$6.Pixel()
47203
+ ]) };
47513
47204
  var AbstractResizer = class extends Component {
47514
- static props = { onOpenContextMenu: Function };
47205
+ props = (0, _odoo_owl.props)(resizerPropsDefinition);
47515
47206
  composerFocusStore;
47516
47207
  PADDING = 0;
47517
47208
  MAX_SIZE_MARGIN = 0;
@@ -47709,7 +47400,6 @@ var AbstractResizer = class extends Component {
47709
47400
  }
47710
47401
  };
47711
47402
  var ColResizer = class extends AbstractResizer {
47712
- static props = { onOpenContextMenu: Function };
47713
47403
  static template = "o-spreadsheet-ColResizer";
47714
47404
  static components = { UnhideColumnHeaders };
47715
47405
  colResizerRef = (0, _odoo_owl.signal)(null);
@@ -47844,7 +47534,6 @@ var ColResizer = class extends AbstractResizer {
47844
47534
  }
47845
47535
  };
47846
47536
  var RowResizer = class extends AbstractResizer {
47847
- static props = { onOpenContextMenu: Function };
47848
47537
  static template = "o-spreadsheet-RowResizer";
47849
47538
  static components = { UnhideRowHeaders };
47850
47539
  rowResizerRef = (0, _odoo_owl.signal)(null);
@@ -47975,8 +47664,8 @@ var RowResizer = class extends AbstractResizer {
47975
47664
  }
47976
47665
  };
47977
47666
  var HeadersOverlay = class extends Component {
47978
- static props = { onOpenContextMenu: Function };
47979
47667
  static template = "o-spreadsheet-HeadersOverlay";
47668
+ props = (0, _odoo_owl.props)(resizerPropsDefinition);
47980
47669
  static components = {
47981
47670
  ColResizer,
47982
47671
  RowResizer
@@ -48964,12 +48653,17 @@ function useWheelHandler(handler) {
48964
48653
  //#region src/components/highlight/border/border.ts
48965
48654
  var Border = class extends Component {
48966
48655
  static template = "o-spreadsheet-Border";
48967
- static props = {
48968
- zone: Object,
48969
- orientation: String,
48970
- isMoving: Boolean,
48971
- onMoveHighlight: Function
48972
- };
48656
+ props = (0, _odoo_owl.props)({
48657
+ zone: types$6.Zone(),
48658
+ orientation: types$6.or([
48659
+ types$6.literal("n"),
48660
+ types$6.literal("s"),
48661
+ types$6.literal("w"),
48662
+ types$6.literal("e")
48663
+ ]),
48664
+ isMoving: types$6.boolean(),
48665
+ onMoveHighlight: types$6.function([types$6.instanceOf(PointerEvent)])
48666
+ });
48973
48667
  get style() {
48974
48668
  const isTop = [
48975
48669
  "n",
@@ -49012,13 +48706,26 @@ var Border = class extends Component {
49012
48706
  const MOBILE_HANDLER_WIDTH = 40;
49013
48707
  var Corner = class extends Component {
49014
48708
  static template = "o-spreadsheet-Corner";
49015
- static props = {
49016
- zone: Object,
49017
- color: String,
49018
- orientation: String,
49019
- isResizing: Boolean,
49020
- onResizeHighlight: Function
49021
- };
48709
+ props = (0, _odoo_owl.props)({
48710
+ zone: types$6.Zone(),
48711
+ color: types$6.Color(),
48712
+ orientation: types$6.or([
48713
+ types$6.literal("nw"),
48714
+ types$6.literal("ne"),
48715
+ types$6.literal("sw"),
48716
+ types$6.literal("se"),
48717
+ types$6.literal("n"),
48718
+ types$6.literal("s"),
48719
+ types$6.literal("e"),
48720
+ types$6.literal("w")
48721
+ ]),
48722
+ isResizing: types$6.boolean(),
48723
+ onResizeHighlight: types$6.function([
48724
+ types$6.instanceOf(PointerEvent),
48725
+ types$6.ResizeDirection(),
48726
+ types$6.ResizeDirection()
48727
+ ])
48728
+ });
49022
48729
  dirX;
49023
48730
  dirY;
49024
48731
  setup() {
@@ -49073,14 +48780,14 @@ function orientationToDir(or) {
49073
48780
  //#region src/components/highlight/highlight/highlight.ts
49074
48781
  var Highlight = class extends Component {
49075
48782
  static template = "o-spreadsheet-Highlight";
49076
- static props = {
49077
- range: Object,
49078
- color: String
49079
- };
49080
48783
  static components = {
49081
48784
  Corner,
49082
48785
  Border
49083
48786
  };
48787
+ props = (0, _odoo_owl.props)({
48788
+ range: types$6.Range(),
48789
+ color: types$6.Color()
48790
+ });
49084
48791
  highlightState = (0, _odoo_owl.proxy)({ shiftingMode: "none" });
49085
48792
  dragNDropGrid = useDragAndDropBeyondTheViewport(this.env);
49086
48793
  get cornerOrientations() {
@@ -49221,20 +48928,20 @@ var ScrollBar = class extends Component {
49221
48928
  <div t-att-style="this.sizeCss"/>
49222
48929
  </div>
49223
48930
  `;
48931
+ props = (0, _odoo_owl.props)({
48932
+ "width?": types$6.Pixel(),
48933
+ "height?": types$6.Pixel(),
48934
+ direction: types$6.customValidator(types$6.string(), (direction) => ["horizontal", "vertical"].includes(direction)),
48935
+ position: types$6.CSSProperties(),
48936
+ offset: types$6.Pixel(),
48937
+ onScroll: types$6.function([types$6.Pixel()])
48938
+ }, {
48939
+ width: 1,
48940
+ height: 1
48941
+ });
49224
48942
  scrollbarRef = (0, _odoo_owl.signal)(null);
49225
48943
  scrollbar;
49226
48944
  setup() {
49227
- this.props = (0, _odoo_owl.props)({
49228
- "width?": _odoo_owl.types.number(),
49229
- "height?": _odoo_owl.types.number(),
49230
- direction: _odoo_owl.types.customValidator(_odoo_owl.types.string(), (direction) => ["horizontal", "vertical"].includes(direction)),
49231
- position: _odoo_owl.types.object({}),
49232
- offset: _odoo_owl.types.number(),
49233
- onScroll: _odoo_owl.types.function()
49234
- }, {
49235
- width: 1,
49236
- height: 1
49237
- });
49238
48945
  this.scrollbar = new ScrollBar$1(this.scrollbarRef(), this.props.direction);
49239
48946
  (0, _odoo_owl.onMounted)(() => {
49240
48947
  this.scrollbar.el = this.scrollbarRef();
@@ -49260,10 +48967,6 @@ var ScrollBar = class extends Component {
49260
48967
  //#endregion
49261
48968
  //#region src/components/scrollbar/scrollbar_horizontal.ts
49262
48969
  var HorizontalScrollBar = class extends Component {
49263
- static props = { leftOffset: {
49264
- type: Number,
49265
- optional: true
49266
- } };
49267
48970
  static components = { ScrollBar };
49268
48971
  static template = _odoo_owl.xml`
49269
48972
  <ScrollBar
@@ -49274,7 +48977,7 @@ var HorizontalScrollBar = class extends Component {
49274
48977
  direction="'horizontal'"
49275
48978
  onScroll.bind="this.onScroll"
49276
48979
  />`;
49277
- static defaultProps = { leftOffset: 0 };
48980
+ props = (0, _odoo_owl.props)({ "leftOffset?": types$6.number() }, { leftOffset: 0 });
49278
48981
  get offset() {
49279
48982
  return this.env.model.getters.getActiveSheetScrollInfo().scrollX;
49280
48983
  }
@@ -49307,10 +49010,6 @@ var HorizontalScrollBar = class extends Component {
49307
49010
  //#endregion
49308
49011
  //#region src/components/scrollbar/scrollbar_vertical.ts
49309
49012
  var VerticalScrollBar = class extends Component {
49310
- static props = { topOffset: {
49311
- type: Number,
49312
- optional: true
49313
- } };
49314
49013
  static components = { ScrollBar };
49315
49014
  static template = _odoo_owl.xml`
49316
49015
  <ScrollBar
@@ -49321,7 +49020,7 @@ var VerticalScrollBar = class extends Component {
49321
49020
  direction="'vertical'"
49322
49021
  onScroll.bind="(offset) => this.onScroll(offset)"
49323
49022
  />`;
49324
- static defaultProps = { topOffset: 0 };
49023
+ props = (0, _odoo_owl.props)({ "topOffset?": types$6.number() }, { topOffset: 0 });
49325
49024
  get offset() {
49326
49025
  return this.env.model.getters.getActiveSheetScrollInfo().scrollY;
49327
49026
  }
@@ -49355,7 +49054,6 @@ var VerticalScrollBar = class extends Component {
49355
49054
  //#region src/components/selection/selection.ts
49356
49055
  var Selection = class extends Component {
49357
49056
  static template = "o-spreadsheet-Selection";
49358
- static props = {};
49359
49057
  static components = { Highlight };
49360
49058
  get highlightProps() {
49361
49059
  const sheetId = this.env.model.getters.getActiveSheetId();
@@ -49373,7 +49071,7 @@ const SIZE = 3;
49373
49071
  const COLOR = "#777";
49374
49072
  var TableResizer = class extends Component {
49375
49073
  static template = "o-spreadsheet-TableResizer";
49376
- static props = { table: Object };
49074
+ props = (0, _odoo_owl.props)({ table: types$6.Table() });
49377
49075
  state = (0, _odoo_owl.proxy)({ highlightZone: void 0 });
49378
49076
  dragNDropGrid = useDragAndDropBeyondTheViewport(this.env);
49379
49077
  setup() {
@@ -49446,10 +49144,6 @@ const registries$1 = {
49446
49144
  };
49447
49145
  var Grid = class extends Component {
49448
49146
  static template = "o-spreadsheet-Grid";
49449
- static props = {
49450
- exposeFocus: Function,
49451
- getGridSize: Function
49452
- };
49453
49147
  static components = {
49454
49148
  GridComposer,
49455
49149
  GridOverlay,
@@ -49465,6 +49159,10 @@ var Grid = class extends Component {
49465
49159
  TableResizer,
49466
49160
  Selection
49467
49161
  };
49162
+ props = (0, _odoo_owl.props)({
49163
+ exposeFocus: types$6.function([types$6.function([])]),
49164
+ getGridSize: types$6.function([], types$6.DOMDimension())
49165
+ });
49468
49166
  HEADER_HEIGHT = 26;
49469
49167
  HEADER_WIDTH = 48;
49470
49168
  menuState;
@@ -50104,10 +49802,10 @@ supportedPivotPositionalFormulaRegistry.add("SPREADSHEET", false);
50104
49802
  //#region src/components/dashboard/clickable_cell_sort_icon/clickable_cell_sort_icon.ts
50105
49803
  var ClickableCellSortIcon = class extends Component {
50106
49804
  static template = "o-spreadsheet-ClickableCellSortIcon";
50107
- static props = {
50108
- position: Object,
50109
- sortDirection: String
50110
- };
49805
+ props = (0, _odoo_owl.props)({
49806
+ position: types$6.CellPosition(),
49807
+ sortDirection: types$6.or([types$6.SortDirection, types$6.literal("none")])
49808
+ });
50111
49809
  hoveredTableStore;
50112
49810
  setup() {
50113
49811
  this.hoveredTableStore = useStore(HoveredTableStore);
@@ -50140,7 +49838,6 @@ var ClickableCellSortIcon = class extends Component {
50140
49838
  //#region src/components/full_screen_figure/full_screen_figure.ts
50141
49839
  var FullScreenFigure = class extends Component {
50142
49840
  static template = "o-spreadsheet-FullScreenFigure";
50143
- static props = {};
50144
49841
  static components = { ChartFigure };
50145
49842
  fullScreenFigureStore;
50146
49843
  fullScreenFigureRef = (0, _odoo_owl.signal)(null);
@@ -50180,10 +49877,10 @@ var FullScreenFigure = class extends Component {
50180
49877
  var PivotHTMLRenderer = class extends Component {
50181
49878
  static template = "o_spreadsheet.PivotHTMLRenderer";
50182
49879
  static components = { Checkbox };
50183
- static props = {
50184
- pivotId: String,
50185
- onCellClicked: Function
50186
- };
49880
+ props = (0, _odoo_owl.props)({
49881
+ pivotId: types$6.UID(),
49882
+ onCellClicked: types$6.function([types$6.string()])
49883
+ });
50187
49884
  pivot = this.env.model.getters.getPivot(this.props.pivotId);
50188
49885
  data = {
50189
49886
  columns: [],
@@ -59331,9 +59028,11 @@ var PivotUIPlugin = class extends CoreViewPlugin {
59331
59028
  this.refreshPivot(cmd.id);
59332
59029
  break;
59333
59030
  case "ADD_PIVOT":
59031
+ this.unusedPivotsInFormulas?.push(cmd.pivotId);
59334
59032
  this.setupPivot(cmd.pivotId);
59335
59033
  break;
59336
59034
  case "DUPLICATE_PIVOT":
59035
+ this.unusedPivotsInFormulas?.push(cmd.newPivotId);
59337
59036
  this.setupPivot(cmd.newPivotId);
59338
59037
  break;
59339
59038
  case "UPDATE_PIVOT":
@@ -59525,8 +59224,8 @@ var PivotUIPlugin = class extends CoreViewPlugin {
59525
59224
  }
59526
59225
  }
59527
59226
  for (const pivotId of this.getters.getPivotIds()) {
59528
- const pivot = this.getters.getPivot(pivotId);
59529
- for (const measure of pivot.definition.measures) if (measure.computedBy) {
59227
+ const pivot = this.getters.getPivotCoreDefinition(pivotId);
59228
+ for (const measure of pivot.measures) if (measure.computedBy) {
59530
59229
  const { sheetId } = measure.computedBy;
59531
59230
  const formula = this.getters.getMeasureCompiledFormula(pivotId, measure);
59532
59231
  const relatedPivotIds = this.getPivotIdsFromFormula(sheetId, formula);
@@ -60902,7 +60601,8 @@ const invalidateTableStyleCommandsSet = new Set([
60902
60601
  "REMOVE_TABLE",
60903
60602
  "RESIZE_TABLE",
60904
60603
  "CREATE_TABLE_STYLE",
60905
- "REMOVE_TABLE_STYLE"
60604
+ "REMOVE_TABLE_STYLE",
60605
+ "DELETE_CONTENT"
60906
60606
  ]);
60907
60607
  function doesCommandInvalidatesTableStyle(cmd) {
60908
60608
  return invalidateTableStyleCommandsSet.has(cmd.type);
@@ -64705,7 +64405,7 @@ var ClipboardPlugin = class extends UIPlugin {
64705
64405
  if (this.getters.getFigure(figureSheetId, figureId).tag === "image") innerHTML = await this.craftImageHTML(figureId);
64706
64406
  else innerHTML = " ";
64707
64407
  } else innerHTML = " ";
64708
- else if (cells.length === 1 && cells[0].length === 1) innerHTML = `${this.getters.getCellText(cells[0][0].position)}`;
64408
+ else if (cells.length === 1 && cells[0].length === 1) innerHTML = xmlEscape(`${this.getters.getCellText(cells[0][0].position)}`);
64709
64409
  else if (!cells[0][0]) return "";
64710
64410
  else {
64711
64411
  let htmlTable = `<table border="1" style="border-collapse:collapse">`;
@@ -68062,20 +67762,22 @@ const RIPPLE_KEY_FRAMES = [
68062
67762
  ];
68063
67763
  var RippleEffect = class extends Component {
68064
67764
  static template = "o-spreadsheet-RippleEffect";
68065
- static props = {
68066
- x: String,
68067
- y: String,
68068
- color: String,
68069
- opacity: Number,
68070
- duration: Number,
68071
- width: Number,
68072
- height: Number,
68073
- offsetY: Number,
68074
- offsetX: Number,
68075
- allowOverflow: Boolean,
68076
- onAnimationEnd: Function,
68077
- style: String
68078
- };
67765
+ props = (0, _odoo_owl.props)({
67766
+ x: _odoo_owl.types.string(),
67767
+ y: _odoo_owl.types.string(),
67768
+ color: _odoo_owl.types.string(),
67769
+ opacity: _odoo_owl.types.number(),
67770
+ duration: _odoo_owl.types.number(),
67771
+ /** Width of the ripple. Defaults to the width of the element the ripple is on (without margins). */
67772
+ width: _odoo_owl.types.number(),
67773
+ /** Height of the ripple. Defaults to the height of the element the ripple is on (without margins). */
67774
+ height: _odoo_owl.types.number(),
67775
+ offsetY: _odoo_owl.types.number(),
67776
+ offsetX: _odoo_owl.types.number(),
67777
+ allowOverflow: _odoo_owl.types.boolean(),
67778
+ onAnimationEnd: _odoo_owl.types.function(),
67779
+ style: _odoo_owl.types.string()
67780
+ });
68079
67781
  rippleRef = (0, _odoo_owl.signal)(null);
68080
67782
  setup() {
68081
67783
  let animation = void 0;
@@ -68112,66 +67814,31 @@ var RippleEffect = class extends Component {
68112
67814
  };
68113
67815
  var Ripple = class extends Component {
68114
67816
  static template = "o-spreadsheet-Ripple";
68115
- static props = {
68116
- color: {
68117
- type: String,
68118
- optional: true
68119
- },
68120
- opacity: {
68121
- type: Number,
68122
- optional: true
68123
- },
68124
- duration: {
68125
- type: Number,
68126
- optional: true
68127
- },
68128
- ignoreClickPosition: {
68129
- type: Boolean,
68130
- optional: true
68131
- },
68132
- width: {
68133
- type: Number,
68134
- optional: true
68135
- },
68136
- height: {
68137
- type: Number,
68138
- optional: true
68139
- },
68140
- offsetY: {
68141
- type: Number,
68142
- optional: true
68143
- },
68144
- offsetX: {
68145
- type: Number,
68146
- optional: true
68147
- },
68148
- allowOverflow: {
68149
- type: Boolean,
68150
- optional: true
68151
- },
68152
- enabled: {
68153
- type: Boolean,
68154
- optional: true
68155
- },
68156
- onAnimationEnd: {
68157
- type: Function,
68158
- optional: true
68159
- },
68160
- slots: Object,
68161
- class: {
68162
- type: String,
68163
- optional: true
68164
- }
68165
- };
68166
67817
  static components = { RippleEffect };
68167
- static defaultProps = {
67818
+ props = (0, _odoo_owl.props)({
67819
+ "color?": _odoo_owl.types.string(),
67820
+ "opacity?": _odoo_owl.types.number(),
67821
+ "duration?": _odoo_owl.types.number(),
67822
+ /** If true, the ripple will play from the element center instead of the position of the click */
67823
+ "ignoreClickPosition?": _odoo_owl.types.boolean(),
67824
+ /** Width of the ripple. Defaults to the width of the element the ripple is on (without margins). */
67825
+ "width?": _odoo_owl.types.number(),
67826
+ /** Height of the ripple. Defaults to the height of the element the ripple is on (without margins). */
67827
+ "height?": _odoo_owl.types.number(),
67828
+ "offsetY?": _odoo_owl.types.number(),
67829
+ "offsetX?": _odoo_owl.types.number(),
67830
+ "allowOverflow?": _odoo_owl.types.boolean(),
67831
+ "enabled?": _odoo_owl.types.boolean(),
67832
+ "onAnimationEnd?": _odoo_owl.types.function(),
67833
+ "class?": _odoo_owl.types.string()
67834
+ }, {
68168
67835
  color: "#aaaaaa",
68169
67836
  opacity: .4,
68170
67837
  duration: 800,
68171
67838
  enabled: true,
68172
67839
  onAnimationEnd: () => {},
68173
67840
  class: ""
68174
- };
67841
+ });
68175
67842
  childContainerRef = (0, _odoo_owl.signal)(null);
68176
67843
  state = (0, _odoo_owl.proxy)({ ripples: [] });
68177
67844
  currentId = 1;
@@ -68419,26 +68086,19 @@ const getSheetLockAnimation = (duration, iterations) => {
68419
68086
  };
68420
68087
  var BottomBarSheet = class extends Component {
68421
68088
  static template = "o-spreadsheet-BottomBarSheet";
68422
- static props = {
68423
- sheetId: String,
68424
- openContextMenu: Function,
68425
- style: {
68426
- type: String,
68427
- optional: true
68428
- },
68429
- onMouseDown: {
68430
- type: Function,
68431
- optional: true
68432
- }
68433
- };
68434
68089
  static components = {
68435
68090
  Ripple,
68436
68091
  ColorPicker
68437
68092
  };
68438
- static defaultProps = {
68093
+ props = (0, _odoo_owl.props)({
68094
+ sheetId: _odoo_owl.types.string(),
68095
+ openContextMenu: _odoo_owl.types.function([_odoo_owl.types.instanceOf(MenuItemRegistry), _odoo_owl.types.instanceOf(MouseEvent)]),
68096
+ "style?": _odoo_owl.types.string(),
68097
+ "onMouseDown?": _odoo_owl.types.function([_odoo_owl.types.instanceOf(PointerEvent)])
68098
+ }, {
68439
68099
  onMouseDown: () => {},
68440
68100
  style: ""
68441
- };
68101
+ });
68442
68102
  state = (0, _odoo_owl.proxy)({
68443
68103
  isEditing: false,
68444
68104
  pickerOpened: false
@@ -68699,11 +68359,15 @@ var AggregateStatisticsStore = class extends SpreadsheetStore {
68699
68359
  //#region src/components/bottom_bar/bottom_bar_statistic/bottom_bar_statistic.ts
68700
68360
  var BottomBarStatistic = class extends Component {
68701
68361
  static template = "o-spreadsheet-BottomBarStatistic";
68702
- static props = {
68703
- openContextMenu: Function,
68704
- closeContextMenu: Function
68705
- };
68706
68362
  static components = { Ripple };
68363
+ props = (0, _odoo_owl.props)({
68364
+ openContextMenu: _odoo_owl.types.function([
68365
+ _odoo_owl.types.number(),
68366
+ _odoo_owl.types.number(),
68367
+ _odoo_owl.types.instanceOf(MenuItemRegistry)
68368
+ ]),
68369
+ closeContextMenu: _odoo_owl.types.function([])
68370
+ });
68707
68371
  state = (0, _odoo_owl.proxy)({ selectedStatisticFn: "" });
68708
68372
  store;
68709
68373
  setup() {
@@ -68746,7 +68410,7 @@ var BottomBarStatistic = class extends Component {
68746
68410
  const MENU_MAX_HEIGHT = 250;
68747
68411
  var BottomBar = class extends Component {
68748
68412
  static template = "o-spreadsheet-BottomBar";
68749
- static props = { onClick: Function };
68413
+ props = (0, _odoo_owl.props)({ onClick: _odoo_owl.types.function([]) });
68750
68414
  static components = {
68751
68415
  MenuPopover,
68752
68416
  Ripple,
@@ -69022,7 +68686,6 @@ var ClickableCellsStore = class extends SpreadsheetStore {
69022
68686
  //#region src/components/dashboard/dashboard.ts
69023
68687
  var SpreadsheetDashboard = class extends Component {
69024
68688
  static template = "o-spreadsheet-SpreadsheetDashboard";
69025
- static props = { getGridSize: Function };
69026
68689
  static components = {
69027
68690
  GridOverlay,
69028
68691
  GridPopover,
@@ -69030,6 +68693,7 @@ var SpreadsheetDashboard = class extends Component {
69030
68693
  VerticalScrollBar,
69031
68694
  HorizontalScrollBar
69032
68695
  };
68696
+ props = (0, _odoo_owl.props)({ getGridSize: types$6.function([], types$6.DOMDimension()) });
69033
68697
  cellPopovers;
69034
68698
  onMouseWheel;
69035
68699
  canvasPosition;
@@ -69142,11 +68806,11 @@ var SpreadsheetDashboard = class extends Component {
69142
68806
  //#region src/components/header_group/header_group.ts
69143
68807
  var AbstractHeaderGroup = class extends Component {
69144
68808
  static template = "o-spreadsheet-HeaderGroup";
69145
- static props = {
69146
- group: Object,
69147
- layerOffset: Number,
69148
- openContextMenu: Function
69149
- };
68809
+ props = (0, _odoo_owl.props)({
68810
+ group: types$6.HeaderGroup(),
68811
+ layerOffset: types$6.number(),
68812
+ openContextMenu: types$6.function([types$6.DOMCoordinates(), types$6.ArrayOf()])
68813
+ });
69150
68814
  toggleGroup() {
69151
68815
  const sheetId = this.env.model.getters.getActiveSheetId();
69152
68816
  const { start, end } = this.props.group;
@@ -69291,15 +68955,15 @@ var ColGroup = class extends AbstractHeaderGroup {
69291
68955
  //#region src/components/header_group/header_group_container.ts
69292
68956
  var HeaderGroupContainer = class extends Component {
69293
68957
  static template = "o-spreadsheet-HeaderGroupContainer";
69294
- static props = {
69295
- dimension: String,
69296
- layers: Array
69297
- };
69298
68958
  static components = {
69299
68959
  RowGroup,
69300
68960
  ColGroup,
69301
68961
  MenuPopover
69302
68962
  };
68963
+ props = (0, _odoo_owl.props)({
68964
+ dimension: types$6.Dimension(),
68965
+ layers: types$6.array()
68966
+ });
69303
68967
  menu = (0, _odoo_owl.proxy)({
69304
68968
  isOpen: false,
69305
68969
  anchorRect: null,
@@ -69372,29 +69036,17 @@ function useScreenWidth() {
69372
69036
  //#region src/components/side_panel/side_panel/side_panel.ts
69373
69037
  var SidePanel = class extends Component {
69374
69038
  static template = "o-spreadsheet-SidePanel";
69375
- static props = {
69376
- panelContent: Object,
69377
- panelProps: Object,
69378
- onCloseSidePanel: Function,
69379
- onStartHandleDrag: Function,
69380
- onResetPanelSize: Function,
69381
- isPinned: {
69382
- type: Boolean,
69383
- optional: true
69384
- },
69385
- onTogglePinPanel: {
69386
- type: Function,
69387
- optional: true
69388
- },
69389
- onToggleCollapsePanel: {
69390
- type: Function,
69391
- optional: true
69392
- },
69393
- isCollapsed: {
69394
- type: Boolean,
69395
- optional: true
69396
- }
69397
- };
69039
+ props = (0, _odoo_owl.props)({
69040
+ panelContent: types$6.SidePanelContent(),
69041
+ panelProps: types$6.SidePanelComponentProps(),
69042
+ onCloseSidePanel: types$6.function([]),
69043
+ onStartHandleDrag: types$6.function([types$6.instanceOf(MouseEvent)]),
69044
+ onResetPanelSize: types$6.function([]),
69045
+ "isPinned?": types$6.boolean(),
69046
+ "onTogglePinPanel?": types$6.function([]),
69047
+ "onToggleCollapsePanel?": types$6.function([]),
69048
+ "isCollapsed?": types$6.boolean()
69049
+ });
69398
69050
  spreadsheetRect = useSpreadsheetRect();
69399
69051
  getTitle() {
69400
69052
  const panel = this.props.panelContent;
@@ -69406,7 +69058,6 @@ var SidePanel = class extends Component {
69406
69058
  //#region src/components/side_panel/side_panels/side_panels.ts
69407
69059
  var SidePanels = class extends Component {
69408
69060
  static template = "o-spreadsheet-SidePanels";
69409
- static props = {};
69410
69061
  static components = { SidePanel };
69411
69062
  sidePanelStore;
69412
69063
  spreadsheetRect = useSpreadsheetRect();
@@ -69478,8 +69129,8 @@ var SidePanels = class extends Component {
69478
69129
  //#region src/components/small_bottom_bar/ribbon_menu/ribbon_menu.ts
69479
69130
  var RibbonMenu = class extends Component {
69480
69131
  static template = "o-spreadsheet-RibbonMenu";
69481
- static props = { onClose: Function };
69482
69132
  static components = { Menu };
69133
+ props = (0, _odoo_owl.props)({ onClose: types$6.function([]) });
69483
69134
  rootItems = topbarMenuRegistry.getMenuItems();
69484
69135
  menuRef = (0, _odoo_owl.signal)(null);
69485
69136
  containerRef = (0, _odoo_owl.signal)(null);
@@ -69517,9 +69168,6 @@ var RibbonMenu = class extends Component {
69517
69168
  onClickMenu: this.onClickMenu.bind(this)
69518
69169
  };
69519
69170
  }
69520
- get style() {
69521
- return cssPropertiesToCss({ height: `${this.props.height}px` });
69522
- }
69523
69171
  updateShadows() {
69524
69172
  const el = this.containerRef();
69525
69173
  if (!el) return;
@@ -69553,7 +69201,7 @@ var SmallBottomBar = class extends Component {
69553
69201
  RibbonMenu
69554
69202
  };
69555
69203
  static template = "o-spreadsheet-SmallBottomBar";
69556
- static props = { onClick: Function };
69204
+ props = (0, _odoo_owl.props)({ onClick: types$6.function([]) });
69557
69205
  composerFocusStore;
69558
69206
  composerStore;
69559
69207
  composerInterface;
@@ -69754,11 +69402,11 @@ var FigureRendererStore = class extends DisposableStore {
69754
69402
  //#region src/components/standalone_grid_canvas/standalone_grid_canvas.ts
69755
69403
  var StandaloneGridCanvas = class extends Component {
69756
69404
  static template = "o-spreadsheet-StandaloneGridCanvas";
69757
- static props = {
69758
- sheetId: String,
69759
- zone: Object,
69760
- renderingCtx: Object
69761
- };
69405
+ props = (0, _odoo_owl.props)({
69406
+ sheetId: types$6.UID(),
69407
+ zone: types$6.Zone(),
69408
+ renderingCtx: types$6.object({})
69409
+ });
69762
69410
  canvasRef = (0, _odoo_owl.signal)(null);
69763
69411
  rendererStore;
69764
69412
  figureRendererStore;
@@ -70079,7 +69727,7 @@ var SpreadsheetPrintStore = class extends SpreadsheetStore {
70079
69727
  //#region src/components/spreadsheet_print/spreadsheet_print.ts
70080
69728
  var SpreadsheetPrint = class extends Component {
70081
69729
  static template = "o-spreadsheet-SpreadsheetPrint";
70082
- static props = { onExitPrintMode: Function };
69730
+ props = (0, _odoo_owl.props)({ onExitPrintMode: types$6.function([]) });
70083
69731
  static components = {
70084
69732
  StandaloneGridCanvas,
70085
69733
  Section,
@@ -70141,7 +69789,6 @@ var SpreadsheetPrint = class extends Component {
70141
69789
  const COMPOSER_MAX_HEIGHT = 300;
70142
69790
  var TopBarComposer = class extends Component {
70143
69791
  static template = "o-spreadsheet-TopBarComposer";
70144
- static props = {};
70145
69792
  static components = { Composer };
70146
69793
  composerFocusStore;
70147
69794
  composerStore;
@@ -70226,7 +69873,6 @@ function useToolBarDropdownStore() {
70226
69873
  //#region src/components/named_range_selector/named_range_selector.ts
70227
69874
  var NamedRangeSelector = class extends Component {
70228
69875
  static template = "o-spreadsheet-NamedRangeSelector";
70229
- static props = {};
70230
69876
  static components = {
70231
69877
  TextInput,
70232
69878
  MenuPopover
@@ -70409,36 +70055,21 @@ const BORDER_POSITIONS = [[
70409
70055
  ]];
70410
70056
  var BorderEditor = class extends Component {
70411
70057
  static template = "o-spreadsheet-BorderEditor";
70412
- static props = {
70413
- class: {
70414
- type: String,
70415
- optional: true
70416
- },
70417
- currentBorderColor: {
70418
- type: String,
70419
- optional: false
70420
- },
70421
- currentBorderStyle: {
70422
- type: String,
70423
- optional: false
70424
- },
70425
- currentBorderPosition: {
70426
- type: String,
70427
- optional: true
70428
- },
70429
- onBorderColorPicked: Function,
70430
- onBorderStylePicked: Function,
70431
- onBorderPositionPicked: Function,
70432
- maxHeight: {
70433
- type: Number,
70434
- optional: true
70435
- },
70436
- anchorRect: Object
70437
- };
70438
70058
  static components = {
70439
70059
  ColorPickerWidget,
70440
70060
  Popover
70441
70061
  };
70062
+ props = (0, _odoo_owl.props)({
70063
+ "class?": types$6.string(),
70064
+ currentBorderColor: types$6.Color(),
70065
+ currentBorderStyle: types$6.BorderStyle(),
70066
+ "currentBorderPosition?": types$6.BorderPosition(),
70067
+ onBorderColorPicked: types$6.function([types$6.Color()]),
70068
+ onBorderStylePicked: types$6.function([types$6.BorderStyle()]),
70069
+ onBorderPositionPicked: types$6.function([types$6.BorderPosition()]),
70070
+ "maxHeight?": types$6.Pixel(),
70071
+ anchorRect: types$6.Rect()
70072
+ });
70442
70073
  BORDER_POSITIONS = BORDER_POSITIONS;
70443
70074
  lineStyleButtonRef = (0, _odoo_owl.signal)(null);
70444
70075
  borderStyles = borderStyles;
@@ -70499,21 +70130,12 @@ var BorderEditor = class extends Component {
70499
70130
  //#region src/components/border_editor/border_editor_widget.ts
70500
70131
  var BorderEditorWidget = class extends Component {
70501
70132
  static template = "o-spreadsheet-BorderEditorWidget";
70502
- static props = {
70503
- disabled: {
70504
- type: Boolean,
70505
- optional: true
70506
- },
70507
- dropdownMaxHeight: {
70508
- type: Number,
70509
- optional: true
70510
- },
70511
- class: {
70512
- type: String,
70513
- optional: true
70514
- }
70515
- };
70516
70133
  static components = { BorderEditor };
70134
+ props = (0, _odoo_owl.props)({
70135
+ "disabled?": types$6.boolean(),
70136
+ "dropdownMaxHeight?": types$6.Pixel(),
70137
+ "class?": types$6.string()
70138
+ });
70517
70139
  topBarToolStore;
70518
70140
  borderEditorButtonRef = (0, _odoo_owl.signal)(null);
70519
70141
  state = (0, _odoo_owl.proxy)({
@@ -70570,10 +70192,7 @@ var BorderEditorWidget = class extends Component {
70570
70192
  //#region src/components/paint_format_button/paint_format_button.ts
70571
70193
  var PaintFormatButton = class extends Component {
70572
70194
  static template = "o-spreadsheet-PaintFormatButton";
70573
- static props = { class: {
70574
- type: String,
70575
- optional: true
70576
- } };
70195
+ props = (0, _odoo_owl.props)({ "class?": types$6.string() });
70577
70196
  paintFormatStore;
70578
70197
  setup() {
70579
70198
  this.paintFormatStore = useStore(PaintFormatStore);
@@ -70598,10 +70217,7 @@ var TableDropdownButton = class extends Component {
70598
70217
  TableStylesPopover,
70599
70218
  ActionButton
70600
70219
  };
70601
- static props = { class: {
70602
- type: String,
70603
- optional: true
70604
- } };
70220
+ props = (0, _odoo_owl.props)({ "class?": types$6.string() });
70605
70221
  topBarToolStore;
70606
70222
  state = (0, _odoo_owl.proxy)({ popoverProps: void 0 });
70607
70223
  setup() {
@@ -70690,13 +70306,13 @@ var TableDropdownButton = class extends Component {
70690
70306
  //#region src/components/top_bar/color_editor/color_editor.ts
70691
70307
  var TopBarColorEditor = class extends Component {
70692
70308
  static components = { ColorPickerWidget };
70693
- static props = {
70694
- class: String,
70695
- style: String,
70696
- icon: String,
70697
- title: String
70698
- };
70699
70309
  static template = "o-spreadsheet-ColorEditor";
70310
+ props = (0, _odoo_owl.props)({
70311
+ class: types$6.string(),
70312
+ style: types$6.or([types$6.literal("textColor"), types$6.literal("fillColor")]),
70313
+ icon: types$6.string(),
70314
+ title: types$6.string()
70315
+ });
70700
70316
  topBarToolStore;
70701
70317
  state = (0, _odoo_owl.proxy)({ isOpen: false });
70702
70318
  setup() {
@@ -70726,12 +70342,12 @@ var DropdownAction = class extends Component {
70726
70342
  ActionButton,
70727
70343
  Popover
70728
70344
  };
70729
- static props = {
70730
- parentAction: Object,
70731
- childActions: Array,
70732
- class: String,
70733
- childClass: String
70734
- };
70345
+ props = (0, _odoo_owl.props)({
70346
+ parentAction: types$6.ActionSpec(),
70347
+ childActions: types$6.array(types$6.ActionSpec()),
70348
+ class: types$6.string(),
70349
+ childClass: types$6.string()
70350
+ });
70735
70351
  topBarToolStore;
70736
70352
  actionRef = (0, _odoo_owl.signal)(null);
70737
70353
  setup() {
@@ -70758,8 +70374,8 @@ var DropdownAction = class extends Component {
70758
70374
  //#region src/components/top_bar/font_size_editor/font_size_editor.ts
70759
70375
  var TopBarFontSizeEditor = class extends Component {
70760
70376
  static components = { FontSizeEditor };
70761
- static props = { class: String };
70762
70377
  static template = "o-spreadsheet-TopBarFontSizeEditor";
70378
+ props = (0, _odoo_owl.props)({ class: _odoo_owl.types.string() });
70763
70379
  topBarToolStore;
70764
70380
  setup() {
70765
70381
  this.topBarToolStore = useToolBarDropdownStore();
@@ -70793,7 +70409,7 @@ var NumberFormatsTool = class extends Component {
70793
70409
  MenuPopover,
70794
70410
  ActionButton
70795
70411
  };
70796
- static props = { class: String };
70412
+ props = (0, _odoo_owl.props)({ class: types$6.string() });
70797
70413
  formatNumberMenuItemSpec = formatNumberMenuItemSpec;
70798
70414
  topBarToolStore;
70799
70415
  buttonRef = (0, _odoo_owl.signal)(null);
@@ -70828,7 +70444,7 @@ var NumberFormatsTool = class extends Component {
70828
70444
  var ToolBarZoom = class extends Component {
70829
70445
  static template = "o-spreadsheet-TopBarZoom";
70830
70446
  static components = { NumberEditor };
70831
- static props = { class: String };
70447
+ props = (0, _odoo_owl.props)({ class: types$6.string() });
70832
70448
  topBarToolStore;
70833
70449
  valueList = ZOOM_VALUES;
70834
70450
  setup() {
@@ -71054,10 +70670,10 @@ topBarToolBarRegistry.add("edit").addChild("edit", {
71054
70670
  //#region src/components/top_bar/top_bar.ts
71055
70671
  var TopBar = class extends Component {
71056
70672
  static template = "o-spreadsheet-TopBar";
71057
- static props = {
71058
- onClick: Function,
71059
- dropdownMaxHeight: Number
71060
- };
70673
+ props = (0, _odoo_owl.props)({
70674
+ onClick: types$6.function([]),
70675
+ dropdownMaxHeight: types$6.Pixel()
70676
+ });
71061
70677
  static components = {
71062
70678
  MenuPopover,
71063
70679
  TopBarComposer,
@@ -71332,21 +70948,16 @@ var WebClipboardWrapper = class {
71332
70948
  //#region src/components/spreadsheet/spreadsheet.ts
71333
70949
  var Spreadsheet = class extends Component {
71334
70950
  static template = "o-spreadsheet-Spreadsheet";
71335
- static props = {
71336
- model: Object,
71337
- notifyUser: {
71338
- type: Function,
71339
- optional: true
71340
- },
71341
- raiseError: {
71342
- type: Function,
71343
- optional: true
71344
- },
71345
- askConfirmation: {
71346
- type: Function,
71347
- optional: true
71348
- }
71349
- };
70951
+ props = (0, _odoo_owl.props)({
70952
+ model: types$6.Model(),
70953
+ "notifyUser?": types$6.function([types$6.InformationNotification()]),
70954
+ "raiseError?": types$6.function([types$6.string(), types$6.function([])]),
70955
+ "askConfirmation?": types$6.function([
70956
+ types$6.string(),
70957
+ types$6.function([]),
70958
+ types$6.function([])
70959
+ ])
70960
+ });
71350
70961
  static components = {
71351
70962
  TopBar,
71352
70963
  Grid,
@@ -71376,7 +70987,7 @@ var Spreadsheet = class extends Component {
71376
70987
  properties["color-scheme"] = this.props.model.getters.isDarkMode() ? "dark" : "light";
71377
70988
  if (this.state.printModeEnabled) properties["display"] = `block`;
71378
70989
  else {
71379
- if (this.env.isDashboard()) properties["grid-template-rows"] = `auto`;
70990
+ if (this.env.model.getters.isDashboard()) properties["grid-template-rows"] = `auto`;
71380
70991
  else properties["grid-template-rows"] = `min-content auto min-content`;
71381
70992
  properties["grid-template-columns"] = `auto ${this.sidePanel.mainPanel ? `${this.sidePanel.totalPanelSize || 350}px` : "auto"}`;
71382
70993
  }
@@ -71404,7 +71015,6 @@ var Spreadsheet = class extends Component {
71404
71015
  imageProvider: fileStore ? new ImageProvider(fileStore) : void 0,
71405
71016
  loadCurrencies: this.model.config.external.loadCurrencies,
71406
71017
  loadLocales: this.model.config.external.loadLocales,
71407
- isDashboard: () => this.model.getters.isDashboard(),
71408
71018
  openSidePanel: this.sidePanel.open.bind(this.sidePanel),
71409
71019
  replaceSidePanel: this.sidePanel.replace.bind(this.sidePanel),
71410
71020
  toggleSidePanel: this.sidePanel.toggle.bind(this.sidePanel),
@@ -76924,13 +76534,10 @@ const ERROR_TOOLTIP_MAX_HEIGHT = 80;
76924
76534
  var ErrorToolTip = class extends Component {
76925
76535
  static maxSize = { maxHeight: ERROR_TOOLTIP_MAX_HEIGHT };
76926
76536
  static template = "o-spreadsheet-ErrorToolTip";
76927
- static props = {
76928
- cellPosition: Object,
76929
- onClosed: {
76930
- type: Function,
76931
- optional: true
76932
- }
76933
- };
76537
+ props = (0, _odoo_owl.props)({
76538
+ cellPosition: types$6.CellPosition(),
76539
+ "onClosed?": types$6.function([])
76540
+ });
76934
76541
  get dataValidationErrorMessage() {
76935
76542
  return this.env.model.getters.getInvalidDataValidationMessage(this.props.cellPosition);
76936
76543
  }
@@ -77006,18 +76613,15 @@ const ErrorToolTipPopoverBuilder = { onHover: (position, getters) => {
77006
76613
  //#region src/components/filters/filter_menu/filter_menu.ts
77007
76614
  var FilterMenu = class extends Component {
77008
76615
  static template = "o-spreadsheet-FilterMenu";
77009
- static props = {
77010
- filterPosition: Object,
77011
- onClosed: {
77012
- type: Function,
77013
- optional: true
77014
- }
77015
- };
77016
76616
  static components = {
77017
76617
  FilterMenuValueList,
77018
76618
  SidePanelCollapsible,
77019
76619
  FilterMenuCriterion
77020
76620
  };
76621
+ props = (0, _odoo_owl.props)({
76622
+ filterPosition: types$6.Position(),
76623
+ "onClosed?": types$6.function([])
76624
+ });
77021
76625
  state;
77022
76626
  criterionCategory = "text";
77023
76627
  updatedCriterionValue;
@@ -77194,13 +76798,10 @@ const FilterMenuPopoverBuilder = { onOpen: (position, getters) => {
77194
76798
  //#region src/components/link/link_display/link_display.ts
77195
76799
  var LinkDisplay = class extends Component {
77196
76800
  static template = "o-spreadsheet-LinkDisplay";
77197
- static props = {
77198
- cellPosition: Object,
77199
- onClosed: {
77200
- type: Function,
77201
- optional: true
77202
- }
77203
- };
76801
+ props = (0, _odoo_owl.props)({
76802
+ cellPosition: types$6.CellPosition(),
76803
+ "onClosed?": types$6.function([])
76804
+ });
77204
76805
  cellPopovers;
77205
76806
  setup() {
77206
76807
  this.cellPopovers = useStore(CellPopoverStore);
@@ -77270,14 +76871,11 @@ const LinkCellPopoverBuilder = { onHover: (position, getters) => {
77270
76871
  //#region src/components/link/link_editor/link_editor.ts
77271
76872
  var LinkEditor = class extends Component {
77272
76873
  static template = "o-spreadsheet-LinkEditor";
77273
- static props = {
77274
- cellPosition: Object,
77275
- onClosed: {
77276
- type: Function,
77277
- optional: true
77278
- }
77279
- };
77280
76874
  static components = { MenuPopover };
76875
+ props = (0, _odoo_owl.props)({
76876
+ cellPosition: types$6.CellPosition(),
76877
+ "onClosed?": types$6.function([])
76878
+ });
77281
76879
  static size = { maxHeight: 500 };
77282
76880
  urlInput = (0, _odoo_owl.signal)(null);
77283
76881
  suggestionListRef = (0, _odoo_owl.signal)(null);
@@ -86664,7 +86262,9 @@ const registries = {
86664
86262
  supportedPivotPositionalFormulaRegistry,
86665
86263
  pivotToFunctionValueRegistry,
86666
86264
  migrationStepRegistry,
86667
- chartJsExtensionRegistry
86265
+ chartJsExtensionRegistry,
86266
+ onIterationEndEvaluationRegistry,
86267
+ specificRangeTransformRegistry
86668
86268
  };
86669
86269
  const helpers = {
86670
86270
  arg,
@@ -86737,7 +86337,10 @@ const helpers = {
86737
86337
  parseFormat,
86738
86338
  isFormula,
86739
86339
  domainToColRowDomain,
86740
- collapseHierarchicalDisplayName
86340
+ collapseHierarchicalDisplayName,
86341
+ getCanonicalSymbolName,
86342
+ fuzzyLookup,
86343
+ replaceSymbolInFormula
86741
86344
  };
86742
86345
  const links = {
86743
86346
  isMarkdownLink,
@@ -86788,6 +86391,7 @@ const components = {
86788
86391
  MenuPopover,
86789
86392
  Popover,
86790
86393
  SelectionInput,
86394
+ StandaloneComposer,
86791
86395
  ValidationMessages,
86792
86396
  AddDimensionButton,
86793
86397
  PivotDimensionGranularity,
@@ -86909,12 +86513,14 @@ exports.astToFormula = astToFormula;
86909
86513
  exports.availableConditionalFormatOperators = availableConditionalFormatOperators;
86910
86514
  exports.availableDataValidationOperators = availableDataValidationOperators;
86911
86515
  exports.availableFiltersOperators = availableFiltersOperators;
86516
+ exports.borderPositions = borderPositions;
86912
86517
  exports.borderStyles = borderStyles;
86913
86518
  exports.canExecuteInReadonly = canExecuteInReadonly;
86914
86519
  exports.categories = categories;
86915
86520
  exports.chartHelpers = chartHelpers;
86916
86521
  exports.compatibility = compatibility;
86917
86522
  exports.components = components;
86523
+ exports.composerFocusTypes = composerFocusTypes;
86918
86524
  exports.constants = constants;
86919
86525
  exports.convertAstNodes = convertAstNodes;
86920
86526
  exports.coreTypes = coreTypes;
@@ -86958,6 +86564,6 @@ exports.stores = stores;
86958
86564
  exports.tokenColors = tokenColors;
86959
86565
  exports.tokenize = tokenize;
86960
86566
 
86961
- __info__.version = "19.4.0-alpha.10";
86962
- __info__.date = "2026-06-02T12:07:58.355Z";
86963
- __info__.hash = "41144f9";
86567
+ __info__.version = "19.4.0-alpha.12";
86568
+ __info__.date = "2026-06-06T06:24:48.209Z";
86569
+ __info__.hash = "a71f829";