@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
  import { App, Component, EnvPlugin, Plugin, __ODOO_COMPATIBILITY_LAYER_ADDED__, blockDom, config, markRaw, onMounted, onPatched, onWillPatch, onWillStart, onWillUnmount, onWillUpdateProps, plugin, props, providePlugins, proxy, signal, status, toRaw, types, useChildEnv, useChildSubEnv, useComponent, useEffect, useEnv, useExternalListener, useLayoutEffect, useListener, useScope, useSubEnv, whenReady, xml } from "@odoo/owl";
@@ -669,6 +669,18 @@ const borderStyles = [
669
669
  function isMatrix(x) {
670
670
  return Array.isArray(x) && Array.isArray(x[0]);
671
671
  }
672
+ const borderPositions = [
673
+ "all",
674
+ "hv",
675
+ "h",
676
+ "v",
677
+ "external",
678
+ "left",
679
+ "top",
680
+ "right",
681
+ "bottom",
682
+ "clear"
683
+ ];
672
684
  let DIRECTION = /* @__PURE__ */ function(DIRECTION) {
673
685
  DIRECTION["UP"] = "up";
674
686
  DIRECTION["DOWN"] = "down";
@@ -676,6 +688,11 @@ let DIRECTION = /* @__PURE__ */ function(DIRECTION) {
676
688
  DIRECTION["RIGHT"] = "right";
677
689
  return DIRECTION;
678
690
  }({});
691
+ const composerFocusTypes = [
692
+ "inactive",
693
+ "cellFocus",
694
+ "contentFocus"
695
+ ];
679
696
 
680
697
  //#endregion
681
698
  //#region src/helpers/misc.ts
@@ -2577,13 +2594,9 @@ function unregisterChartJsExtensions() {
2577
2594
  const isOdooCompatLoaded = __ODOO_COMPATIBILITY_LAYER_ADDED__ === true;
2578
2595
  var _Component = class extends Component {
2579
2596
  static template = "";
2580
- static props = {};
2581
- static defaultProps = {};
2582
- props;
2583
2597
  env;
2584
2598
  constructor(node) {
2585
2599
  super(node);
2586
- this.props = props(null, this.constructor.defaultProps);
2587
2600
  this.env = useChildEnv$1();
2588
2601
  this.__owl__ = node;
2589
2602
  }
@@ -2705,10 +2718,11 @@ var VPortal = class extends blockDom.text("").constructor {
2705
2718
  };
2706
2719
  var Portal = class extends Component {
2707
2720
  static template = xml`<t t-call-slot="default"/>`;
2708
- static props = {
2709
- selector: String,
2710
- slots: true
2711
- };
2721
+ constructor(node) {
2722
+ super(node);
2723
+ this.props = props();
2724
+ this.__owl__ = node;
2725
+ }
2712
2726
  setup() {
2713
2727
  const node = this.__owl__;
2714
2728
  const renderContent = node.renderFn;
@@ -4308,6 +4322,7 @@ const DEFAULT_LOCALE_DIGIT_GROUPING = "[3,0]";
4308
4322
  //#endregion
4309
4323
  //#region src/helpers/format/format_tokenizer.ts
4310
4324
  function tokenizeFormat(str) {
4325
+ str = str.replace(/\s/g, " ");
4311
4326
  const chars = new TokenizingChars(str);
4312
4327
  const result = [];
4313
4328
  let currentFormatPart = [];
@@ -7023,6 +7038,11 @@ function getRange(sheetXC, sheetId) {
7023
7038
  sheetId
7024
7039
  }, defaultGetSheetSize);
7025
7040
  }
7041
+ function replaceSymbolInFormula(formula, oldSymbol, newSymbol) {
7042
+ const oldCanonicalSymbol = getCanonicalSymbolName(oldSymbol);
7043
+ const newCanonicalSymbol = getCanonicalSymbolName(newSymbol);
7044
+ return tokenize(formula).map((token) => token.type === "SYMBOL" && token.value === oldCanonicalSymbol ? newCanonicalSymbol : token.value).join("");
7045
+ }
7026
7046
 
7027
7047
  //#endregion
7028
7048
  //#region src/formulas/code_builder.ts
@@ -9916,6 +9936,9 @@ function getChartBackgroundColor({ background }, getters) {
9916
9936
  //#endregion
9917
9937
  //#region src/components/figures/chart/chartJs/chartjs_show_values_plugin.ts
9918
9938
  const MINIMAL_VERTICAL_DISTANCE = 13;
9939
+ function isLineOverlayOnBarChart(options, dataset) {
9940
+ return options.type === "bar" && dataset.type === "line";
9941
+ }
9919
9942
  /** This is a chartJS plugin that will draw the values of each data next to the point/bar/pie slice */
9920
9943
  const chartShowValuesPlugin = {
9921
9944
  id: "chartShowValuesPlugin",
@@ -9966,7 +9989,7 @@ function drawTextWithBackground(text, x, y, ctx) {
9966
9989
  function drawLineOrBarOrRadarChartValues(chart, options, ctx) {
9967
9990
  const textsPositions = {};
9968
9991
  for (const dataset of chart._metasets) {
9969
- if (isTrendLineAxis(dataset.xAxisID) || dataset.hidden) continue;
9992
+ if (isTrendLineAxis(dataset.xAxisID) || dataset.hidden || isLineOverlayOnBarChart(options, dataset)) continue;
9970
9993
  const yAxisScale = chart.scales[dataset.yAxisID];
9971
9994
  for (let i = 0; i < dataset._parsed.length; i++) {
9972
9995
  const parsedValue = dataset._parsed[i];
@@ -10045,7 +10068,7 @@ function drawBubbleChartValues(chart, options, ctx) {
10045
10068
  function drawHorizontalBarChartValues(chart, options, ctx) {
10046
10069
  const textsPositions = {};
10047
10070
  for (const dataset of chart._metasets) {
10048
- if (isTrendLineAxis(dataset.xAxisID)) return;
10071
+ if (isTrendLineAxis(dataset.xAxisID) || isLineOverlayOnBarChart(options, dataset)) continue;
10049
10072
  const xZeroLine = chart.scales[dataset.xAxisID].getPixelForValue(0);
10050
10073
  for (let i = 0; i < dataset._parsed.length; i++) {
10051
10074
  const value = Number(dataset._parsed[i].x);
@@ -10547,7 +10570,7 @@ function getChartAxisTitleRuntime(design) {
10547
10570
  font: {
10548
10571
  style: italic ? "italic" : "normal",
10549
10572
  weight: bold ? "bold" : "normal",
10550
- size: design.title.fontSize ?? 12
10573
+ size: fontSizeInPixels(design.title.fontSize ?? 12)
10551
10574
  },
10552
10575
  align: align === "left" ? "start" : align === "right" ? "end" : "center"
10553
10576
  };
@@ -10690,8 +10713,38 @@ function getBarChartDatasets(definition, args) {
10690
10713
  trendDatasets.push(getTrendingLineDataSet(dataset, trendConfig, trendData));
10691
10714
  }
10692
10715
  dataSets.push(...trendDatasets);
10716
+ const totalLineDataset = getBarChartTotalLineDataset(definition, dataSetsValues);
10717
+ if (totalLineDataset) dataSets.push(totalLineDataset);
10693
10718
  return dataSets;
10694
10719
  }
10720
+ function getBarChartTotalLineDataset(definition, dataSetsValues) {
10721
+ const visibleDataSetsValues = dataSetsValues.filter((dataSet) => !dataSet.hidden);
10722
+ if (!definition.stacked || !definition.showTotalLine || visibleDataSetsValues.length < 2) return;
10723
+ const data = range(0, Math.max(...visibleDataSetsValues.map((dataSet) => dataSet.data.length))).map((index) => {
10724
+ let total;
10725
+ for (const dataSet of visibleDataSetsValues) {
10726
+ const cell = dataSet.data[index];
10727
+ if (isNumberResult(cell)) total = (total ?? 0) + cell.value;
10728
+ }
10729
+ return total ?? NaN;
10730
+ });
10731
+ const color = relativeLuminance(definition.background || "#FFFFFF") < .3 ? "#e9ecef" : "#343a40";
10732
+ return {
10733
+ type: "line",
10734
+ label: _t("Sum"),
10735
+ data,
10736
+ order: -1,
10737
+ tension: 0,
10738
+ fill: false,
10739
+ pointRadius: 3,
10740
+ borderWidth: 2,
10741
+ backgroundColor: color,
10742
+ borderColor: color,
10743
+ pointBackgroundColor: color,
10744
+ xAxisID: "x",
10745
+ yAxisID: "y"
10746
+ };
10747
+ }
10695
10748
  function getCalendarChartDatasetAndLabels(definition, args) {
10696
10749
  const { labels, dataSetsValues, background } = args;
10697
10750
  const values = dataSetsValues.map((ds) => ds.data).flat().filter(isNumberResult).map((cell) => cell.value);
@@ -11139,7 +11192,7 @@ function getTextStyle(design, defaultDesign) {
11139
11192
  font: {
11140
11193
  weight: design?.bold ?? defaultDesign?.bold ? "bold" : "normal",
11141
11194
  style: design?.italic ?? defaultDesign?.italic ? "italic" : "normal",
11142
- size: design?.fontSize ?? defaultDesign?.fontSize
11195
+ size: fontSizeInPixels(design?.fontSize ?? defaultDesign.fontSize)
11143
11196
  }
11144
11197
  };
11145
11198
  }
@@ -11469,13 +11522,10 @@ chartJsExtensionRegistry.add("chartBackgroundPlugin", {
11469
11522
  });
11470
11523
  var ChartJsComponent = class extends Component$1 {
11471
11524
  static template = "o-spreadsheet-ChartJsComponent";
11472
- static props = {
11473
- chartId: String,
11474
- isFullScreen: {
11475
- type: Boolean,
11476
- optional: true
11477
- }
11478
- };
11525
+ props = props({
11526
+ chartId: types.string(),
11527
+ "isFullScreen?": types.boolean()
11528
+ });
11479
11529
  canvas = signal(null);
11480
11530
  chart;
11481
11531
  currentRuntime;
@@ -12078,35 +12128,35 @@ var ScorecardChartConfigBuilder = class {
12078
12128
  if (this.runtime.progressBar) baselineValueFontSize /= 1.5;
12079
12129
  return {
12080
12130
  title: {
12081
- font: getDefaultContextFont(this.runtime.title.fontSize ?? 14, this.runtime.title.bold, this.runtime.title.italic),
12131
+ font: getDefaultContextFont(fontSizeInPixels(this.runtime.title.fontSize ?? 14), this.runtime.title.bold, this.runtime.title.italic),
12082
12132
  color: this.runtime.title.color ?? this.secondaryFontColor
12083
12133
  },
12084
12134
  keyValue: {
12085
12135
  color: this.runtime.keyValueStyle?.textColor || this.runtime.fontColor,
12086
- font: getDefaultContextFont(keyValueFontSize, this.runtime.keyValueStyle?.bold, this.runtime.keyValueStyle?.italic),
12136
+ font: getDefaultContextFont(fontSizeInPixels(keyValueFontSize), this.runtime.keyValueStyle?.bold, this.runtime.keyValueStyle?.italic),
12087
12137
  strikethrough: this.runtime.keyValueStyle?.strikethrough,
12088
12138
  underline: this.runtime.keyValueStyle?.underline
12089
12139
  },
12090
12140
  keyDescr: {
12091
12141
  color: this.runtime.keyValueDescrStyle?.textColor || this.runtime.fontColor,
12092
- font: getDefaultContextFont(keyValueDescrFontSize, this.runtime.keyValueDescrStyle?.bold, this.runtime.keyValueDescrStyle?.italic),
12142
+ font: getDefaultContextFont(fontSizeInPixels(keyValueDescrFontSize), this.runtime.keyValueDescrStyle?.bold, this.runtime.keyValueDescrStyle?.italic),
12093
12143
  strikethrough: this.runtime.keyValueDescrStyle?.strikethrough,
12094
12144
  underline: this.runtime.keyValueDescrStyle?.underline
12095
12145
  },
12096
12146
  baselineValue: {
12097
- font: getDefaultContextFont(baselineValueFontSize, this.runtime.baselineStyle?.bold, this.runtime.baselineStyle?.italic),
12147
+ font: getDefaultContextFont(fontSizeInPixels(baselineValueFontSize), this.runtime.baselineStyle?.bold, this.runtime.baselineStyle?.italic),
12098
12148
  strikethrough: this.runtime.baselineStyle?.strikethrough,
12099
12149
  underline: this.runtime.baselineStyle?.underline,
12100
12150
  color: this.runtime.baselineColor || this.runtime.baselineStyle?.textColor || this.secondaryFontColor
12101
12151
  },
12102
12152
  baselineDescr: {
12103
- font: getDefaultContextFont(baselineDescrFontSize, this.runtime.baselineDescrStyle?.bold, this.runtime.baselineDescrStyle?.italic),
12153
+ font: getDefaultContextFont(fontSizeInPixels(baselineDescrFontSize), this.runtime.baselineDescrStyle?.bold, this.runtime.baselineDescrStyle?.italic),
12104
12154
  strikethrough: this.runtime.baselineDescrStyle?.strikethrough,
12105
12155
  underline: this.runtime.baselineDescrStyle?.underline,
12106
12156
  color: this.runtime.baselineDescrStyle?.textColor ?? this.secondaryFontColor
12107
12157
  },
12108
12158
  baselineArrow: this.baselineArrow === "neutral" || this.runtime.progressBar ? void 0 : {
12109
- size: this.keyValue ? .8 * baselineValueFontSize : 0,
12159
+ size: this.keyValue ? .8 * fontSizeInPixels(baselineValueFontSize) : 0,
12110
12160
  color: this.runtime.baselineColor || this.runtime.baselineStyle?.textColor || this.secondaryFontColor
12111
12161
  }
12112
12162
  };
@@ -12171,13 +12221,10 @@ function getZoomTargetPosition(ev, zoom) {
12171
12221
  //#region src/components/figures/chart/scorecard/chart_scorecard.ts
12172
12222
  var ScorecardChart = class extends Component$1 {
12173
12223
  static template = "o-spreadsheet-ScorecardChart";
12174
- static props = {
12175
- chartId: String,
12176
- isFullScreen: {
12177
- type: Boolean,
12178
- optional: true
12179
- }
12180
- };
12224
+ props = props({
12225
+ chartId: types.string(),
12226
+ "isFullScreen?": types.boolean()
12227
+ });
12181
12228
  canvas = signal(null);
12182
12229
  get runtime() {
12183
12230
  return this.env.model.getters.getChartRuntime(this.props.chartId);
@@ -12319,7 +12366,7 @@ function drawInflectionValues(ctx, config) {
12319
12366
  function drawTitle(ctx, config) {
12320
12367
  ctx.save();
12321
12368
  const title = config.title;
12322
- ctx.font = getDefaultContextFont(title.fontSize, title.bold, title.italic);
12369
+ ctx.font = getDefaultContextFont(fontSizeInPixels(title.fontSize), title.bold, title.italic);
12323
12370
  ctx.textBaseline = "middle";
12324
12371
  ctx.fillStyle = title.color;
12325
12372
  ctx.fillText(title.label, title.textPosition.x, title.textPosition.y);
@@ -12353,8 +12400,8 @@ function getGaugeRenderingConfig(boundingRect, runtime, ctx) {
12353
12400
  const inflectionValues = getInflectionValues(runtime, gaugeRect, textColor, ctx);
12354
12401
  let x = 0, titleWidth = 0, titleHeight = 0;
12355
12402
  if (runtime.title.text) ({width: titleWidth, height: titleHeight} = computeTextDimension(ctx, runtime.title.text, {
12356
- fontSize: 16,
12357
- ...runtime.title
12403
+ ...runtime.title,
12404
+ fontSize: fontSizeInPixels(runtime.title.fontSize ?? 16)
12358
12405
  }, "px"));
12359
12406
  switch (runtime.title.align) {
12360
12407
  case "right":
@@ -13863,13 +13910,10 @@ function hasIconLayoutChange(newBox, oldBox) {
13863
13910
  const ANIMATION_DURATION = 1e3;
13864
13911
  var GaugeChartComponent = class extends Component$1 {
13865
13912
  static template = "o-spreadsheet-GaugeChartComponent";
13866
- static props = {
13867
- chartId: String,
13868
- isFullScreen: {
13869
- type: Boolean,
13870
- optional: true
13871
- }
13872
- };
13913
+ props = props({
13914
+ chartId: types.string(),
13915
+ "isFullScreen?": types.boolean()
13916
+ });
13873
13917
  canvas = signal(null);
13874
13918
  animationStore;
13875
13919
  get runtime() {
@@ -13880,10 +13924,10 @@ var GaugeChartComponent = class extends Component$1 {
13880
13924
  let animation = null;
13881
13925
  let lastRuntime = void 0;
13882
13926
  useLayoutEffect$1(() => {
13883
- if (this.env.isDashboard() && lastRuntime === void 0 && this.animationStore?.animationPlayed[this.animationChartId] !== "gauge") {
13927
+ if (this.env.model.getters.isDashboard() && lastRuntime === void 0 && this.animationStore?.animationPlayed[this.animationChartId] !== "gauge") {
13884
13928
  animation = this.drawGaugeWithAnimation();
13885
13929
  this.animationStore?.disableAnimationForChart(this.animationChartId, "gauge");
13886
- } else if (this.env.isDashboard() && lastRuntime !== void 0 && !deepEquals(this.runtime, lastRuntime)) {
13930
+ } else if (this.env.model.getters.isDashboard() && lastRuntime !== void 0 && !deepEquals(this.runtime, lastRuntime)) {
13887
13931
  animation = this.drawGaugeWithAnimation();
13888
13932
  this.animationStore?.disableAnimationForChart(this.animationChartId, "gauge");
13889
13933
  } else {
@@ -14140,52 +14184,201 @@ function useTimeOut() {
14140
14184
  };
14141
14185
  }
14142
14186
 
14187
+ //#endregion
14188
+ //#region src/components/props_validation.ts
14189
+ /**
14190
+ * Validate that a prop is a number, but with a more specific type than just `number` (e.g. `Pixel`).
14191
+ */
14192
+ function validateNumber() {
14193
+ return types.number();
14194
+ }
14195
+ /**
14196
+ * Validate that a prop is a string, but with a more specific type than just `string` (e.g. `Color`).
14197
+ */
14198
+ function validateString() {
14199
+ return types.string();
14200
+ }
14201
+ /**
14202
+ * Validate that a prop is an object, but with a more specific type than just `object` (e.g. `ActionSpec`).
14203
+ */
14204
+ function validateObject() {
14205
+ return types.object();
14206
+ }
14207
+ /**
14208
+ * Validate that a prop is an array, but with a more specific element type than `any[]`.
14209
+ */
14210
+ function validateArrayOf() {
14211
+ return types.array();
14212
+ }
14213
+ /**
14214
+ * Validate that a prop is a record (string-keyed dictionary), but with a more
14215
+ * specific value type than `any`.
14216
+ */
14217
+ function validateRecordOf() {
14218
+ return types.record();
14219
+ }
14220
+ /**
14221
+ * Validate that a prop is a `Set`, typed with a specific element type.
14222
+ */
14223
+ function validateSetOf() {
14224
+ return types.instanceOf(Set);
14225
+ }
14226
+ function validateRect() {
14227
+ return types.object({
14228
+ x: types.number(),
14229
+ y: types.number(),
14230
+ width: types.number(),
14231
+ height: types.number()
14232
+ });
14233
+ }
14234
+ function validateBorderPosition() {
14235
+ return types.customValidator(validateString(), (position) => borderPositions.includes(position));
14236
+ }
14237
+ function validateBorderStyle() {
14238
+ return types.customValidator(validateString(), (style) => borderStyles.includes(style));
14239
+ }
14240
+ function validateDOMCoordinates() {
14241
+ return types.object({
14242
+ x: types.number(),
14243
+ y: types.number()
14244
+ });
14245
+ }
14246
+ function validateDOMDimension() {
14247
+ return types.object({
14248
+ width: types.number(),
14249
+ height: types.number()
14250
+ });
14251
+ }
14252
+ function validateSortDirection() {
14253
+ return types.customValidator(validateString(), (direction) => ["asc", "desc"].includes(direction));
14254
+ }
14255
+ function validateResizeDirection() {
14256
+ return types.customValidator(validateNumber(), (direction) => [
14257
+ -1,
14258
+ 0,
14259
+ 1
14260
+ ].includes(direction));
14261
+ }
14262
+ function validateComposerFocusType() {
14263
+ return types.customValidator(validateString(), (value) => composerFocusTypes.includes(value));
14264
+ }
14265
+ function validateDimension() {
14266
+ return types.customValidator(validateString(), (value) => ["COL", "ROW"].includes(value));
14267
+ }
14268
+ function validateContextMenuType() {
14269
+ return types.customValidator(validateString(), (value) => [
14270
+ "ROW",
14271
+ "COL",
14272
+ "CELL",
14273
+ "FILTER",
14274
+ "GROUP_HEADERS",
14275
+ "UNGROUP_HEADERS"
14276
+ ].includes(value));
14277
+ }
14278
+ /**
14279
+ * Validate that a prop is a store. Typed as the CQS-wrapped `Store<T>` to
14280
+ * match what `useStore(...)` returns at the call site.
14281
+ */
14282
+ function validateStore() {
14283
+ return types.object();
14284
+ }
14285
+ const types$1 = {
14286
+ ...types,
14287
+ ArrayOf: validateArrayOf,
14288
+ RecordOf: validateRecordOf,
14289
+ SetOf: validateSetOf,
14290
+ GenericCriterionType: validateString,
14291
+ UID: validateString,
14292
+ CriterionFilter: validateObject,
14293
+ CSSProperties: validateObject,
14294
+ ResizeDirection: validateResizeDirection,
14295
+ FigureUI: validateObject,
14296
+ Token: validateObject,
14297
+ CellPosition: validateObject,
14298
+ AutoCompleteProviderDefinition: validateObject,
14299
+ AutoCompleteProposal: validateObject,
14300
+ FunctionDescription: validateObject,
14301
+ Rect: validateRect,
14302
+ Pixel: validateNumber,
14303
+ HeaderIndex: validateNumber,
14304
+ BorderPosition: validateBorderPosition,
14305
+ BorderStyle: validateBorderStyle,
14306
+ Color: validateString,
14307
+ ActionSpec: validateObject,
14308
+ DOMCoordinates: validateDOMCoordinates,
14309
+ DOMDimension: validateDOMDimension,
14310
+ ComposerFocusType: validateComposerFocusType,
14311
+ SortDirection: validateSortDirection,
14312
+ Store: validateStore,
14313
+ Position: validateObject,
14314
+ PivotCoreDefinition: validateObject,
14315
+ PivotField: validateObject,
14316
+ PivotDimension: validateObject,
14317
+ PivotMeasure: validateObject,
14318
+ PivotCoreMeasure: validateObject,
14319
+ PivotCustomGroupedField: validateObject,
14320
+ PivotRuntimeDefinition: validateObject,
14321
+ PivotFilter: validateObject,
14322
+ DataFilterValue: validateObject,
14323
+ SpreadsheetPivotCoreDefinition: validateObject,
14324
+ ComposerSelection: validateObject,
14325
+ Action: validateObject,
14326
+ MenuItemOrSeparator: validateObject,
14327
+ Model: validateObject,
14328
+ DispatchResult: validateObject,
14329
+ Zone: validateObject,
14330
+ Range: validateObject,
14331
+ HeaderGroup: validateObject,
14332
+ GridClickModifiers: validateObject,
14333
+ ZoomedMouseEvent: validateObject,
14334
+ ConditionalFormat: validateObject,
14335
+ ColorScaleThreshold: validateObject,
14336
+ Table: validateObject,
14337
+ CoreTable: validateObject,
14338
+ TableConfig: validateObject,
14339
+ TableStyle: validateObject,
14340
+ TitleDesign: validateObject,
14341
+ ChartDefinition: validateObject,
14342
+ ChartDefinitionWithDataSource: validateObject,
14343
+ ChartWithAxisDefinition: validateObject,
14344
+ ChartStyle: validateObject,
14345
+ ChartColorScale: validateObject,
14346
+ ChartRangeDataSource: validateObject,
14347
+ DataSetStyle: validateObject,
14348
+ GeoChartDefinition: validateObject,
14349
+ FunnelChartDefinition: validateObject,
14350
+ TreeMapChartDefinition: validateObject,
14351
+ TreeMapCategoryColorOptions: validateObject,
14352
+ TreeMapColorScaleOptions: validateObject,
14353
+ NamedRange: validateObject,
14354
+ DataValidationRule: validateObject,
14355
+ InformationNotification: validateObject,
14356
+ NotificationStoreMethods: validateObject,
14357
+ SidePanelContent: validateObject,
14358
+ SidePanelComponentProps: validateObject,
14359
+ DataValidationCriterionType: validateString,
14360
+ Dimension: validateDimension,
14361
+ ContextMenuType: validateContextMenuType
14362
+ };
14363
+
14143
14364
  //#endregion
14144
14365
  //#region src/components/menu/menu.ts
14145
14366
  var Menu = class extends Component$1 {
14146
14367
  static template = "o-spreadsheet-Menu";
14147
- static props = {
14148
- menuItems: Array,
14149
- onClose: Function,
14150
- onClickMenu: {
14151
- type: Function,
14152
- optional: true
14153
- },
14154
- onMouseEnter: {
14155
- type: Function,
14156
- optional: true
14157
- },
14158
- onMouseLeave: {
14159
- type: Function,
14160
- optional: true
14161
- },
14162
- width: {
14163
- type: Number,
14164
- optional: true
14165
- },
14166
- hoveredMenuId: {
14167
- type: String,
14168
- optional: true
14169
- },
14170
- isHoveredMenuFocused: {
14171
- type: Boolean,
14172
- optional: true
14173
- },
14174
- onScroll: {
14175
- type: Function,
14176
- optional: true
14177
- },
14178
- onKeyDown: {
14179
- type: Function,
14180
- optional: true
14181
- },
14182
- disableKeyboardNavigation: {
14183
- type: Boolean,
14184
- optional: true
14185
- }
14186
- };
14187
14368
  static components = {};
14188
- static defaultProps = {};
14369
+ props = props({
14370
+ menuItems: types$1.ArrayOf(),
14371
+ onClose: types$1.function([]),
14372
+ "onClickMenu?": types$1.function([types$1.Action(), types$1.instanceOf(PointerEvent)]),
14373
+ "onMouseEnter?": types$1.function([types$1.Action(), types$1.instanceOf(PointerEvent)]),
14374
+ "onMouseLeave?": types$1.function([types$1.Action(), types$1.instanceOf(PointerEvent)]),
14375
+ "width?": types$1.number(),
14376
+ "hoveredMenuId?": types$1.string(),
14377
+ "isHoveredMenuFocused?": types$1.boolean(),
14378
+ "onScroll?": types$1.function([types$1.instanceOf(CustomEvent)]),
14379
+ "onKeyDown?": types$1.function([types$1.instanceOf(KeyboardEvent)]),
14380
+ "disableKeyboardNavigation?": types$1.boolean()
14381
+ });
14189
14382
  menuRef = signal(null);
14190
14383
  setup() {
14191
14384
  useLayoutEffect$1(() => {
@@ -14323,57 +14516,25 @@ function usePopoverContainer() {
14323
14516
  //#region src/components/popover/popover.ts
14324
14517
  var Popover = class extends Component$1 {
14325
14518
  static template = "o-spreadsheet-Popover";
14326
- static props = {
14327
- anchorRect: Object,
14328
- containerRect: {
14329
- type: Object,
14330
- optional: true
14331
- },
14332
- positioning: {
14333
- type: String,
14334
- optional: true
14335
- },
14336
- maxWidth: {
14337
- type: Number,
14338
- optional: true
14339
- },
14340
- maxHeight: {
14341
- type: Number,
14342
- optional: true
14343
- },
14344
- verticalOffset: {
14345
- type: Number,
14346
- optional: true
14347
- },
14348
- onMouseWheel: {
14349
- type: Function,
14350
- optional: true
14351
- },
14352
- onPopoverHidden: {
14353
- type: Function,
14354
- optional: true
14355
- },
14356
- onPopoverMoved: {
14357
- type: Function,
14358
- optional: true
14359
- },
14360
- zIndex: {
14361
- type: Number,
14362
- optional: true
14363
- },
14364
- class: {
14365
- type: String,
14366
- optional: true
14367
- },
14368
- slots: Object
14369
- };
14370
- static defaultProps = {
14519
+ props = props({
14520
+ anchorRect: types$1.Rect(),
14521
+ "containerRect?": types$1.object({}),
14522
+ "positioning?": types$1.or([types$1.literal("top-right"), types$1.literal("bottom-left")]),
14523
+ "maxWidth?": types$1.Pixel(),
14524
+ "maxHeight?": types$1.Pixel(),
14525
+ "verticalOffset?": types$1.number(),
14526
+ "onMouseWheel?": types$1.function([]),
14527
+ "onPopoverHidden?": types$1.function([]),
14528
+ "onPopoverMoved?": types$1.function([]),
14529
+ "zIndex?": types$1.number(),
14530
+ "class?": types$1.string()
14531
+ }, {
14371
14532
  positioning: "bottom-left",
14372
14533
  verticalOffset: 0,
14373
14534
  onMouseWheel: () => {},
14374
14535
  onPopoverMoved: () => {},
14375
14536
  onPopoverHidden: () => {}
14376
- };
14537
+ });
14377
14538
  popoverRef = signal(null);
14378
14539
  popoverContentRef = signal(null);
14379
14540
  currentPosition = void 0;
@@ -14535,60 +14696,29 @@ var TopRightPopoverContext = class extends PopoverPositionContext {
14535
14696
  const TIMEOUT_DELAY = 250;
14536
14697
  var MenuPopover = class MenuPopover extends Component$1 {
14537
14698
  static template = "o-spreadsheet-Menu-Popover";
14538
- static props = {
14539
- anchorRect: Object,
14540
- popoverPositioning: {
14541
- type: String,
14542
- optional: true
14543
- },
14544
- menuItems: Array,
14545
- depth: {
14546
- type: Number,
14547
- optional: true
14548
- },
14549
- maxHeight: {
14550
- type: Number,
14551
- optional: true
14552
- },
14553
- onClose: Function,
14554
- onMenuClicked: {
14555
- type: Function,
14556
- optional: true
14557
- },
14558
- menuId: {
14559
- type: String,
14560
- optional: true
14561
- },
14562
- onMouseOver: {
14563
- type: Function,
14564
- optional: true
14565
- },
14566
- width: {
14567
- type: Number,
14568
- optional: true
14569
- },
14570
- autoSelectFirstItem: {
14571
- type: Boolean,
14572
- optional: true
14573
- },
14574
- disableKeyboardNavigation: {
14575
- type: Boolean,
14576
- optional: true
14577
- },
14578
- onKeyboardNavigation: {
14579
- type: Function,
14580
- optional: true
14581
- }
14582
- };
14583
14699
  static components = {
14584
14700
  MenuPopover,
14585
14701
  Menu,
14586
14702
  Popover
14587
14703
  };
14588
- static defaultProps = {
14704
+ props = props({
14705
+ anchorRect: types$1.Rect(),
14706
+ "popoverPositioning?": types$1.or([types$1.literal("top-right"), types$1.literal("bottom-left")]),
14707
+ menuItems: types$1.ArrayOf(),
14708
+ "depth?": types$1.number(),
14709
+ "maxHeight?": types$1.Pixel(),
14710
+ onClose: types$1.function([]),
14711
+ "onMenuClicked?": types$1.function([types$1.instanceOf(CustomEvent)]),
14712
+ "menuId?": types$1.UID(),
14713
+ "onMouseOver?": types$1.function([]),
14714
+ "width?": types$1.number(),
14715
+ "autoSelectFirstItem?": types$1.boolean(),
14716
+ "disableKeyboardNavigation?": types$1.boolean(),
14717
+ "onKeyboardNavigation?": types$1.function([types$1.instanceOf(KeyboardEvent)])
14718
+ }, {
14589
14719
  depth: 0,
14590
14720
  popoverPositioning: "top-right"
14591
- };
14721
+ });
14592
14722
  subMenu = proxy({
14593
14723
  isOpen: false,
14594
14724
  anchorRect: null,
@@ -14828,31 +14958,16 @@ var MenuPopover = class MenuPopover extends Component$1 {
14828
14958
  //#region src/components/select/select.ts
14829
14959
  var Select = class extends Component$1 {
14830
14960
  static template = "o-spreadsheet-Select";
14831
- static props = {
14832
- onChange: Function,
14833
- values: Array,
14834
- selectedValue: {
14835
- type: String,
14836
- optional: true
14837
- },
14838
- class: {
14839
- type: String,
14840
- optional: true
14841
- },
14842
- popoverClass: {
14843
- type: String,
14844
- optional: true
14845
- },
14846
- name: {
14847
- type: String,
14848
- optional: true
14849
- },
14850
- title: {
14851
- type: String,
14852
- optional: true
14853
- }
14854
- };
14855
14961
  static components = { Popover };
14962
+ props = props({
14963
+ onChange: types$1.function([types$1.string()]),
14964
+ values: types$1.array(),
14965
+ "selectedValue?": types$1.string(),
14966
+ "class?": types$1.string(),
14967
+ "popoverClass?": types$1.string(),
14968
+ "name?": types$1.string(),
14969
+ "title?": types$1.string()
14970
+ });
14856
14971
  selectRef = signal(null);
14857
14972
  dropdownRef = signal(null);
14858
14973
  state = proxy({
@@ -14958,14 +15073,10 @@ var ChartDashboardMenu = class extends Component$1 {
14958
15073
  MenuPopover,
14959
15074
  Select
14960
15075
  };
14961
- static props = {
14962
- chartId: String,
14963
- hasFullScreenButton: {
14964
- type: Boolean,
14965
- optional: true
14966
- }
14967
- };
14968
- static defaultProps = { hasFullScreenButton: true };
15076
+ props = props({
15077
+ chartId: types$1.UID(),
15078
+ "hasFullScreenButton?": types$1.boolean()
15079
+ }, { hasFullScreenButton: true });
14969
15080
  fullScreenFigureStore;
14970
15081
  menuState = proxy({
14971
15082
  isOpen: false,
@@ -15028,25 +15139,16 @@ var ChartDashboardMenu = class extends Component$1 {
15028
15139
  //#region src/components/figures/figure_carousel/figure_carousel.ts
15029
15140
  var CarouselFigure = class extends Component$1 {
15030
15141
  static template = "o-spreadsheet-CarouselFigure";
15031
- static props = {
15032
- figureUI: Object,
15033
- editFigureStyle: {
15034
- type: Function,
15035
- optional: true
15036
- },
15037
- isFullScreen: {
15038
- type: Boolean,
15039
- optional: true
15040
- },
15041
- openContextMenu: {
15042
- type: Function,
15043
- optional: true
15044
- }
15045
- };
15046
15142
  static components = {
15047
15143
  ChartDashboardMenu,
15048
15144
  MenuPopover
15049
15145
  };
15146
+ props = props({
15147
+ figureUI: types$1.FigureUI(),
15148
+ "editFigureStyle?": types$1.function([types$1.CSSProperties()]),
15149
+ "isFullScreen?": types$1.boolean(),
15150
+ "openContextMenu?": types$1.function([types$1.Rect(), types$1.function([])])
15151
+ });
15050
15152
  carouselTabsRef = signal(null);
15051
15153
  carouselTabsDropdownRef = signal(null);
15052
15154
  menuState = proxy({
@@ -15116,10 +15218,12 @@ var CarouselFigure = class extends Component$1 {
15116
15218
  return this.carousel.title?.text ?? "";
15117
15219
  }
15118
15220
  get titleStyle() {
15119
- return cssPropertiesToCss(cellTextStyleToCss(chartStyleToCellStyle({
15221
+ const style = {
15120
15222
  ...DEFAULT_CAROUSEL_TITLE_STYLE,
15121
15223
  ...this.carousel.title
15122
- })));
15224
+ };
15225
+ style.fontSize = fontSizeInPixels(style.fontSize ?? 16);
15226
+ return cssPropertiesToCss(cellTextStyleToCss(chartStyleToCellStyle(style)));
15123
15227
  }
15124
15228
  updateTabsVisibility() {
15125
15229
  const tabsContainerEl = this.carouselTabsRef();
@@ -15179,22 +15283,13 @@ var CarouselFigure = class extends Component$1 {
15179
15283
  //#region src/components/figures/figure_chart/figure_chart.ts
15180
15284
  var ChartFigure = class extends Component$1 {
15181
15285
  static template = "o-spreadsheet-ChartFigure";
15182
- static props = {
15183
- figureUI: Object,
15184
- editFigureStyle: {
15185
- type: Function,
15186
- optional: true
15187
- },
15188
- isFullScreen: {
15189
- type: Boolean,
15190
- optional: true
15191
- },
15192
- openContextMenu: {
15193
- type: Function,
15194
- optional: true
15195
- }
15196
- };
15197
15286
  static components = { ChartDashboardMenu };
15287
+ props = props({
15288
+ figureUI: types$1.FigureUI(),
15289
+ "editFigureStyle?": types$1.function([types$1.CSSProperties()]),
15290
+ "isFullScreen?": types$1.boolean(),
15291
+ "openContextMenu?": types$1.function([types$1.Rect(), types$1.function([])])
15292
+ });
15198
15293
  onDoubleClick() {
15199
15294
  this.env.model.dispatch("SELECT_FIGURE", { figureId: this.props.figureUI.id });
15200
15295
  this.env.openSidePanel("ChartPanel");
@@ -15219,18 +15314,12 @@ var ChartFigure = class extends Component$1 {
15219
15314
  //#region src/components/figures/figure_image/figure_image.ts
15220
15315
  var ImageFigure = class extends Component$1 {
15221
15316
  static template = "o-spreadsheet-ImageFigure";
15222
- static props = {
15223
- figureUI: Object,
15224
- editFigureStyle: {
15225
- type: Function,
15226
- optional: true
15227
- },
15228
- openContextMenu: {
15229
- type: Function,
15230
- optional: true
15231
- }
15232
- };
15233
15317
  static components = {};
15318
+ props = props({
15319
+ figureUI: types$1.FigureUI(),
15320
+ "editFigureStyle?": types$1.function([types$1.CSSProperties()]),
15321
+ "openContextMenu?": types$1.function([types$1.Rect(), types$1.function([])])
15322
+ });
15234
15323
  get figureId() {
15235
15324
  return this.props.figureUI.id;
15236
15325
  }
@@ -15266,30 +15355,21 @@ const BORDER_WIDTH = 1;
15266
15355
  const ACTIVE_BORDER_WIDTH = 2;
15267
15356
  var FigureComponent = class extends Component$1 {
15268
15357
  static template = "o-spreadsheet-FigureComponent";
15269
- static props = {
15270
- figureUI: Object,
15271
- style: {
15272
- type: String,
15273
- optional: true
15274
- },
15275
- class: {
15276
- type: String,
15277
- optional: true
15278
- },
15279
- onMouseDown: {
15280
- type: Function,
15281
- optional: true
15282
- },
15283
- onClickAnchor: {
15284
- type: Function,
15285
- optional: true
15286
- }
15287
- };
15288
15358
  static components = { MenuPopover };
15289
- static defaultProps = {
15359
+ props = props({
15360
+ figureUI: types$1.FigureUI(),
15361
+ style: types$1.string(),
15362
+ class: types$1.string(),
15363
+ "onMouseDown?": types$1.function([types$1.instanceOf(MouseEvent)]),
15364
+ "onClickAnchor?": types$1.function([
15365
+ types$1.ResizeDirection(),
15366
+ types$1.ResizeDirection(),
15367
+ types$1.instanceOf(MouseEvent)
15368
+ ])
15369
+ }, {
15290
15370
  onMouseDown: () => {},
15291
15371
  onClickAnchor: () => {}
15292
- };
15372
+ });
15293
15373
  menuState = proxy({
15294
15374
  isOpen: false,
15295
15375
  anchorRect: null,
@@ -15306,7 +15386,7 @@ var FigureComponent = class extends Component$1 {
15306
15386
  return figureRegistry;
15307
15387
  }
15308
15388
  getBorderWidth() {
15309
- if (this.env.isDashboard()) return 0;
15389
+ if (this.env.model.getters.isDashboard()) return 0;
15310
15390
  return this.isSelected ? ACTIVE_BORDER_WIDTH : this.borderWidth;
15311
15391
  }
15312
15392
  getBorderStyle(position) {
@@ -15448,7 +15528,7 @@ var FigureComponent = class extends Component$1 {
15448
15528
  };
15449
15529
  }
15450
15530
  onContextMenu(ev) {
15451
- if (this.env.isDashboard()) return;
15531
+ if (this.env.model.getters.isDashboard()) return;
15452
15532
  const zoomedMouseEvent = withZoom(this.env, ev);
15453
15533
  this.openContextMenu({
15454
15534
  x: zoomedMouseEvent.clientX,
@@ -15474,7 +15554,7 @@ var FigureComponent = class extends Component$1 {
15474
15554
  if (el) for (const property in properties) el.style.setProperty(property, properties[property] || null);
15475
15555
  }
15476
15556
  get isFigureResizable() {
15477
- return this.isSelected && !this.env.isMobile() && !this.env.isDashboard() && !this.env.model.getters.isCurrentSheetLocked();
15557
+ return this.isSelected && !this.env.isMobile() && !this.env.model.getters.isDashboard() && !this.env.model.getters.isCurrentSheetLocked();
15478
15558
  }
15479
15559
  };
15480
15560
 
@@ -21763,7 +21843,7 @@ function changeCalculatedMeasuresOnMeasureChange(oldMeasure, newMeasure, measure
21763
21843
  return measures.map((measure) => {
21764
21844
  if (measure.id === oldMeasure.id) return newMeasure;
21765
21845
  else if (!measure.computedBy || oldMeasure.id === newMeasure.id) return measure;
21766
- const newFormula = tokenize(measure.computedBy.formula).map((token) => token.type === "SYMBOL" && token.value === getCanonicalSymbolName(oldMeasure.id) ? getCanonicalSymbolName(newMeasure.id) : token.value).join("");
21846
+ const newFormula = replaceSymbolInFormula(measure.computedBy.formula, oldMeasure.id, newMeasure.id);
21767
21847
  return {
21768
21848
  ...measure,
21769
21849
  computedBy: {
@@ -24404,51 +24484,22 @@ function useAutofocus(ref) {
24404
24484
 
24405
24485
  //#endregion
24406
24486
  //#region src/components/generic_input/generic_input.ts
24487
+ const genericInputPropsDefinition = {
24488
+ value: types$1.or([types$1.number(), types$1.string()]),
24489
+ onChange: types$1.function([types$1.string()]),
24490
+ "onFocused?": types$1.function([]),
24491
+ "onBlur?": types$1.function([]),
24492
+ "onInput?": types$1.function([types$1.string()]),
24493
+ "class?": types$1.string(),
24494
+ "id?": types$1.string(),
24495
+ "placeholder?": types$1.string(),
24496
+ "autofocus?": types$1.boolean(),
24497
+ "alwaysShowBorder?": types$1.boolean(),
24498
+ "selectContentOnFocus?": types$1.boolean(),
24499
+ "resetOnBlur?": types$1.boolean()
24500
+ };
24407
24501
  var GenericInput = class extends Component$1 {
24408
- static props = {
24409
- value: [Number, String],
24410
- onChange: Function,
24411
- onFocused: {
24412
- type: Function,
24413
- optional: true
24414
- },
24415
- onBlur: {
24416
- type: Function,
24417
- optional: true
24418
- },
24419
- onInput: {
24420
- type: Function,
24421
- optional: true
24422
- },
24423
- class: {
24424
- type: String,
24425
- optional: true
24426
- },
24427
- id: {
24428
- type: String,
24429
- optional: true
24430
- },
24431
- placeholder: {
24432
- type: String,
24433
- optional: true
24434
- },
24435
- autofocus: {
24436
- type: Boolean,
24437
- optional: true
24438
- },
24439
- alwaysShowBorder: {
24440
- type: Boolean,
24441
- optional: true
24442
- },
24443
- selectContentOnFocus: {
24444
- type: Boolean,
24445
- optional: true
24446
- },
24447
- resetOnBlur: {
24448
- type: Boolean,
24449
- optional: true
24450
- }
24451
- };
24502
+ props = props(genericInputPropsDefinition);
24452
24503
  genericInputRef = signal(null);
24453
24504
  lastOnChangeValue = this.props.value.toString();
24454
24505
  setup() {
@@ -24531,13 +24582,11 @@ var GenericInput = class extends Component$1 {
24531
24582
  var TextInput = class extends GenericInput {
24532
24583
  static template = "o-spreadsheet-TextInput";
24533
24584
  static components = {};
24534
- static props = {
24535
- ...GenericInput.props,
24536
- errorMessage: {
24537
- type: String,
24538
- optional: true
24539
- }
24540
- };
24585
+ props = props({
24586
+ ...genericInputPropsDefinition,
24587
+ value: types$1.string(),
24588
+ "errorMessage?": types$1.string()
24589
+ });
24541
24590
  get inputClass() {
24542
24591
  return [
24543
24592
  this.props.class,
@@ -24552,25 +24601,13 @@ var TextInput = class extends GenericInput {
24552
24601
  //#region src/components/action_button/action_button.ts
24553
24602
  var ActionButton = class extends Component$1 {
24554
24603
  static template = "o-spreadsheet-ActionButton";
24555
- static props = {
24556
- action: Object,
24557
- hasTriangleDownIcon: {
24558
- type: Boolean,
24559
- optional: true
24560
- },
24561
- selectedColor: {
24562
- type: String,
24563
- optional: true
24564
- },
24565
- class: {
24566
- type: String,
24567
- optional: true
24568
- },
24569
- onClick: {
24570
- type: Function,
24571
- optional: true
24572
- }
24573
- };
24604
+ props = props({
24605
+ action: types$1.ActionSpec(),
24606
+ "hasTriangleDownIcon?": types$1.boolean(),
24607
+ "selectedColor?": types$1.string(),
24608
+ "class?": types$1.string(),
24609
+ "onClick?": types$1.function()
24610
+ });
24574
24611
  actionButton = createAction(this.props.action);
24575
24612
  setup() {
24576
24613
  onWillUpdateProps((nextProps) => {
@@ -24622,24 +24659,14 @@ const INNER_GRADIENT_WIDTH = CONTENT_WIDTH - 2 * ITEM_BORDER_WIDTH;
24622
24659
  const INNER_GRADIENT_HEIGHT = CONTENT_WIDTH - 30 - 2 * ITEM_BORDER_WIDTH;
24623
24660
  var ColorPicker = class extends Component$1 {
24624
24661
  static template = "o-spreadsheet-ColorPicker";
24625
- static props = {
24626
- onColorPicked: Function,
24627
- currentColor: {
24628
- type: String,
24629
- optional: true
24630
- },
24631
- maxHeight: {
24632
- type: Number,
24633
- optional: true
24634
- },
24635
- anchorRect: Object,
24636
- disableNoColor: {
24637
- type: Boolean,
24638
- optional: true
24639
- }
24640
- };
24641
- static defaultProps = { currentColor: "" };
24642
24662
  static components = { Popover };
24663
+ props = props({
24664
+ onColorPicked: types$1.function([types$1.string()]),
24665
+ "currentColor?": types$1.string(),
24666
+ "maxHeight?": types$1.Pixel(),
24667
+ anchorRect: types$1.Rect(),
24668
+ "disableNoColor?": types$1.boolean()
24669
+ }, { currentColor: "" });
24643
24670
  COLORS = COLOR_PICKER_DEFAULTS;
24644
24671
  state = proxy({
24645
24672
  showGradient: false,
@@ -24783,33 +24810,18 @@ var ColorPicker = class extends Component$1 {
24783
24810
  //#region src/components/color_picker/color_picker_widget.ts
24784
24811
  var ColorPickerWidget = class extends Component$1 {
24785
24812
  static template = "o-spreadsheet-ColorPickerWidget";
24786
- static props = {
24787
- currentColor: {
24788
- type: String,
24789
- optional: true
24790
- },
24791
- toggleColorPicker: Function,
24792
- showColorPicker: Boolean,
24793
- onColorPicked: Function,
24794
- icon: String,
24795
- title: {
24796
- type: String,
24797
- optional: true
24798
- },
24799
- disabled: {
24800
- type: Boolean,
24801
- optional: true
24802
- },
24803
- dropdownMaxHeight: {
24804
- type: Number,
24805
- optional: true
24806
- },
24807
- class: {
24808
- type: String,
24809
- optional: true
24810
- }
24811
- };
24812
24813
  static components = { ColorPicker };
24814
+ props = props({
24815
+ "currentColor?": types$1.string(),
24816
+ toggleColorPicker: types$1.function([]),
24817
+ showColorPicker: types$1.boolean(),
24818
+ onColorPicked: types$1.function([types$1.string()]),
24819
+ icon: types$1.string(),
24820
+ "title?": types$1.string(),
24821
+ "disabled?": types$1.boolean(),
24822
+ "dropdownMaxHeight?": types$1.Pixel(),
24823
+ "class?": types$1.string()
24824
+ });
24813
24825
  colorPickerButtonRef = signal(null);
24814
24826
  get iconStyle() {
24815
24827
  return this.props.currentColor ? `border-color: ${this.props.currentColor}` : "border-bottom-style: hidden";
@@ -24823,29 +24835,19 @@ var ColorPickerWidget = class extends Component$1 {
24823
24835
  //#region src/components/number_editor/number_editor.ts
24824
24836
  var NumberEditor = class extends Component$1 {
24825
24837
  static template = "o-spreadsheet-NumberEditor";
24826
- static props = {
24827
- currentValue: Number,
24828
- onValueChange: Function,
24829
- onToggle: {
24830
- type: Function,
24831
- optional: true
24832
- },
24833
- onFocusInput: {
24834
- type: Function,
24835
- optional: true
24836
- },
24837
- class: String,
24838
- valueIcon: {
24839
- type: String,
24840
- optional: true
24841
- },
24842
- min: Number,
24843
- max: Number,
24844
- title: String,
24845
- valueList: Array
24846
- };
24847
- static defaultProps = { onFocusInput: () => {} };
24848
24838
  static components = { Popover };
24839
+ props = props({
24840
+ currentValue: types$1.number(),
24841
+ onValueChange: types$1.function([types$1.number()]),
24842
+ "onToggle?": types$1.function([]),
24843
+ "onFocusInput?": types$1.function([]),
24844
+ class: types$1.string(),
24845
+ "valueIcon?": types$1.string(),
24846
+ min: types$1.number(),
24847
+ max: types$1.number(),
24848
+ title: types$1.string(),
24849
+ valueList: types$1.array(types$1.number())
24850
+ }, { onFocusInput: () => {} });
24849
24851
  dropdown = proxy({ isOpen: false });
24850
24852
  inputRef = signal(null);
24851
24853
  rootEditorRef = signal(null);
@@ -24924,20 +24926,13 @@ var NumberEditor = class extends Component$1 {
24924
24926
  var FontSizeEditor = class extends Component$1 {
24925
24927
  static template = "o-spreadsheet-FontSizeEditor";
24926
24928
  static components = { NumberEditor };
24927
- static props = {
24928
- currentFontSize: Number,
24929
- onFontSizeChanged: Function,
24930
- onToggle: {
24931
- type: Function,
24932
- optional: true
24933
- },
24934
- onFocusInput: {
24935
- type: Function,
24936
- optional: true
24937
- },
24938
- class: String
24939
- };
24940
- static defaultProps = { onFocusInput: () => {} };
24929
+ props = props({
24930
+ currentFontSize: types$1.number(),
24931
+ onFontSizeChanged: types$1.function([types$1.number()]),
24932
+ "onToggle?": types$1.function([]),
24933
+ "onFocusInput?": types$1.function([]),
24934
+ class: types$1.string()
24935
+ }, { onFocusInput: () => {} });
24941
24936
  fontSizes = FONT_SIZES;
24942
24937
  };
24943
24938
 
@@ -24950,33 +24945,15 @@ var TextStyler = class extends Component$1 {
24950
24945
  ActionButton,
24951
24946
  FontSizeEditor
24952
24947
  };
24953
- static props = {
24954
- style: Object,
24955
- updateStyle: {
24956
- type: Function,
24957
- optional: true
24958
- },
24959
- defaultStyle: {
24960
- type: Object,
24961
- optional: true
24962
- },
24963
- hasVerticalAlign: {
24964
- type: Boolean,
24965
- optional: true
24966
- },
24967
- hasHorizontalAlign: {
24968
- type: Boolean,
24969
- optional: true
24970
- },
24971
- hasBackgroundColor: {
24972
- type: Boolean,
24973
- optional: true
24974
- },
24975
- class: {
24976
- type: String,
24977
- optional: true
24978
- }
24979
- };
24948
+ props = props({
24949
+ style: types$1.ChartStyle(),
24950
+ updateStyle: types$1.function([types$1.ChartStyle()]),
24951
+ "defaultStyle?": types$1.object({}),
24952
+ "hasVerticalAlign?": types$1.boolean(),
24953
+ "hasHorizontalAlign?": types$1.boolean(),
24954
+ "hasBackgroundColor?": types$1.boolean(),
24955
+ "class?": types$1.string()
24956
+ });
24980
24957
  openedEl = null;
24981
24958
  setup() {
24982
24959
  useExternalListener$1(window, "click", this.onExternalClick);
@@ -25158,7 +25135,7 @@ var TextStyler = class extends Component$1 {
25158
25135
  var CogWheelMenu = class extends Component$1 {
25159
25136
  static template = "o-spreadsheet-CogWheelMenu";
25160
25137
  static components = { MenuPopover };
25161
- static props = { items: Array };
25138
+ props = props({ items: types$1.array(types$1.ActionSpec()) });
25162
25139
  buttonRef = signal(null);
25163
25140
  menuState = proxy({
25164
25141
  isOpen: false,
@@ -25178,33 +25155,27 @@ var CogWheelMenu = class extends Component$1 {
25178
25155
  //#region src/components/side_panel/components/section/section.ts
25179
25156
  var Section = class extends Component$1 {
25180
25157
  static template = "o_spreadsheet.Section";
25181
- static props = {
25182
- class: {
25183
- type: String,
25184
- optional: true
25185
- },
25186
- title: {
25187
- type: String,
25188
- optional: true
25189
- },
25190
- slots: Object
25191
- };
25158
+ props = props({
25159
+ "class?": types$1.string(),
25160
+ "title?": types$1.string(),
25161
+ slots: types$1.object()
25162
+ });
25192
25163
  };
25193
25164
 
25194
25165
  //#endregion
25195
25166
  //#region src/components/side_panel/carousel_panel/carousel_panel.ts
25196
25167
  var CarouselPanel = class extends Component$1 {
25197
25168
  static template = "o-spreadsheet-CarouselPanel";
25198
- static props = {
25199
- onCloseSidePanel: Function,
25200
- figureId: String
25201
- };
25202
25169
  static components = {
25203
25170
  Section,
25204
25171
  TextInput,
25205
25172
  TextStyler,
25206
25173
  CogWheelMenu
25207
25174
  };
25175
+ props = props({
25176
+ onCloseSidePanel: types$1.function([]),
25177
+ figureId: types$1.UID()
25178
+ });
25208
25179
  DEFAULT_CAROUSEL_TITLE_STYLE = DEFAULT_CAROUSEL_TITLE_STYLE;
25209
25180
  dragAndDrop = useDragAndDropListItems();
25210
25181
  previewListRef = signal(null);
@@ -25411,34 +25382,15 @@ const chartDataSourceSidePanelComponentRegistry = new Registry();
25411
25382
  //#region src/components/side_panel/components/checkbox/checkbox.ts
25412
25383
  var Checkbox = class extends Component$1 {
25413
25384
  static template = "o-spreadsheet.Checkbox";
25414
- static props = {
25415
- label: {
25416
- type: String,
25417
- optional: true
25418
- },
25419
- value: {
25420
- type: Boolean,
25421
- optional: true
25422
- },
25423
- className: {
25424
- type: String,
25425
- optional: true
25426
- },
25427
- name: {
25428
- type: String,
25429
- optional: true
25430
- },
25431
- title: {
25432
- type: String,
25433
- optional: true
25434
- },
25435
- disabled: {
25436
- type: Boolean,
25437
- optional: true
25438
- },
25439
- onChange: Function
25440
- };
25441
- static defaultProps = { value: false };
25385
+ props = props({
25386
+ "label?": types$1.string(),
25387
+ "value?": types$1.boolean(),
25388
+ "className?": types$1.string(),
25389
+ "name?": types$1.string(),
25390
+ "title?": types$1.string(),
25391
+ "disabled?": types$1.boolean(),
25392
+ onChange: types$1.function([types$1.boolean()])
25393
+ }, { value: false });
25442
25394
  onChange(ev) {
25443
25395
  const value = ev.target.checked;
25444
25396
  this.props.onChange(value);
@@ -25447,11 +25399,11 @@ var Checkbox = class extends Component$1 {
25447
25399
 
25448
25400
  //#endregion
25449
25401
  //#region src/components/side_panel/chart/common.ts
25450
- const ChartSidePanelPropsObject = {
25451
- chartId: String,
25452
- definition: Object,
25453
- canUpdateChart: Function,
25454
- updateChart: Function
25402
+ const chartSidePanelPropsDefinition = {
25403
+ chartId: types$1.UID(),
25404
+ definition: types$1.object({}),
25405
+ canUpdateChart: types$1.function([types$1.UID(), types$1.object({})], types$1.DispatchResult()),
25406
+ updateChart: types$1.function([types$1.UID(), types$1.object({})], types$1.DispatchResult())
25455
25407
  };
25456
25408
 
25457
25409
  //#endregion
@@ -25939,63 +25891,25 @@ var SelectionInputStore = class extends SpreadsheetStore {
25939
25891
  */
25940
25892
  var SelectionInput = class extends Component$1 {
25941
25893
  static template = "o-spreadsheet-SelectionInput";
25942
- static props = {
25943
- ranges: Array,
25944
- hasSingleRange: {
25945
- type: Boolean,
25946
- optional: true
25947
- },
25948
- required: {
25949
- type: Boolean,
25950
- optional: true
25951
- },
25952
- autofocus: {
25953
- type: Boolean,
25954
- optional: true
25955
- },
25956
- isInvalid: {
25957
- type: Boolean,
25958
- optional: true
25959
- },
25960
- class: {
25961
- type: String,
25962
- optional: true
25963
- },
25964
- onSelectionChanged: {
25965
- type: Function,
25966
- optional: true
25967
- },
25968
- onSelectionConfirmed: {
25969
- type: Function,
25970
- optional: true
25971
- },
25972
- onSelectionReordered: {
25973
- type: Function,
25974
- optional: true
25975
- },
25976
- onSelectionRemoved: {
25977
- type: Function,
25978
- optional: true
25979
- },
25980
- onInputFocused: {
25981
- type: Function,
25982
- optional: true
25983
- },
25984
- colors: {
25985
- type: Array,
25986
- optional: true,
25987
- default: []
25988
- },
25989
- disabledRanges: {
25990
- type: Array,
25991
- optional: true,
25992
- default: []
25993
- },
25994
- disabledRangeTitle: {
25995
- type: String,
25996
- optional: true
25997
- }
25998
- };
25894
+ props = props({
25895
+ ranges: types$1.array(types$1.string()),
25896
+ "hasSingleRange?": types$1.boolean(),
25897
+ "required?": types$1.boolean(),
25898
+ "autofocus?": types$1.boolean(),
25899
+ "isInvalid?": types$1.boolean(),
25900
+ "class?": types$1.string(),
25901
+ "onSelectionChanged?": types$1.function([types$1.array(types$1.string())]),
25902
+ "onSelectionConfirmed?": types$1.function([]),
25903
+ "onSelectionReordered?": types$1.function([types$1.array(types$1.number())]),
25904
+ "onSelectionRemoved?": types$1.function([types$1.number()]),
25905
+ "onInputFocused?": types$1.function([]),
25906
+ "colors?": types$1.ArrayOf(),
25907
+ "disabledRanges?": types$1.array(types$1.boolean()),
25908
+ "disabledRangeTitle?": types$1.string()
25909
+ }, {
25910
+ colors: [],
25911
+ disabledRanges: []
25912
+ });
25999
25913
  state = proxy({ isMissing: false });
26000
25914
  dragAndDrop = useDragAndDropListItems();
26001
25915
  focusedInputRef = signal(null);
@@ -26159,47 +26073,20 @@ var ChartDataSeries = class extends Component$1 {
26159
26073
  SelectionInput,
26160
26074
  Section
26161
26075
  };
26162
- static props = {
26163
- ranges: Array,
26164
- dataSetStyles: {
26165
- type: Object,
26166
- optional: true
26167
- },
26168
- hasSingleRange: {
26169
- type: Boolean,
26170
- optional: true
26171
- },
26172
- onSelectionChanged: Function,
26173
- onSelectionReordered: {
26174
- type: Function,
26175
- optional: true
26176
- },
26177
- onSelectionRemoved: {
26178
- type: Function,
26179
- optional: true
26180
- },
26181
- onSelectionConfirmed: Function,
26182
- title: {
26183
- type: String,
26184
- optional: true
26185
- },
26186
- maxNumberOfUsedRanges: {
26187
- type: Number,
26188
- optional: true
26189
- },
26190
- datasetOrientation: {
26191
- type: String,
26192
- optional: true
26193
- },
26194
- canChangeDatasetOrientation: {
26195
- type: Boolean,
26196
- optional: true
26197
- },
26198
- onFlipAxis: {
26199
- type: Function,
26200
- optional: true
26201
- }
26202
- };
26076
+ props = props({
26077
+ ranges: types$1.ArrayOf(),
26078
+ "dataSetStyles?": types$1.DataSetStyle(),
26079
+ "hasSingleRange?": types$1.boolean(),
26080
+ onSelectionChanged: types$1.function([types$1.array(types$1.string())]),
26081
+ "onSelectionReordered?": types$1.function([types$1.array(types$1.number())]),
26082
+ "onSelectionRemoved?": types$1.function([types$1.number()]),
26083
+ onSelectionConfirmed: types$1.function([]),
26084
+ "maxNumberOfUsedRanges?": types$1.number(),
26085
+ "title?": types$1.string(),
26086
+ "datasetOrientation?": types$1.or([types$1.literal("rows"), types$1.literal("columns")]),
26087
+ "canChangeDatasetOrientation?": types$1.boolean(),
26088
+ "onFlipAxis?": types$1.function([types$1.string()])
26089
+ });
26203
26090
  get ranges() {
26204
26091
  return this.props.ranges.map((r) => r.dataRange);
26205
26092
  }
@@ -26227,28 +26114,18 @@ var ChartLabelRange = class extends Component$1 {
26227
26114
  Checkbox,
26228
26115
  Section
26229
26116
  };
26230
- static props = {
26231
- title: {
26232
- type: String,
26233
- optional: true
26234
- },
26235
- range: String,
26236
- class: {
26237
- type: String,
26238
- optional: true
26239
- },
26240
- isInvalid: Boolean,
26241
- onSelectionChanged: Function,
26242
- onSelectionConfirmed: Function,
26243
- options: {
26244
- type: Array,
26245
- optional: true
26246
- }
26247
- };
26248
- static defaultProps = {
26117
+ props = props({
26118
+ "title?": types$1.string(),
26119
+ range: types$1.string(),
26120
+ "class?": types$1.string(),
26121
+ isInvalid: types$1.boolean(),
26122
+ onSelectionChanged: types$1.function([types$1.string()]),
26123
+ onSelectionConfirmed: types$1.function([]),
26124
+ "options?": types$1.ArrayOf()
26125
+ }, {
26249
26126
  title: _t("Categories / Labels"),
26250
26127
  options: []
26251
- };
26128
+ });
26252
26129
  get sectionClass() {
26253
26130
  return "o-data-labels" + (this.props.class ? ` ${this.props.class}` : "");
26254
26131
  }
@@ -26262,28 +26139,16 @@ var ChartDataSourceComponent = class extends Component$1 {
26262
26139
  ChartDataSeries,
26263
26140
  ChartLabelRange
26264
26141
  };
26265
- static props = {
26266
- chartId: String,
26267
- definition: Object,
26268
- updateChart: Function,
26269
- canUpdateChart: Function,
26270
- onErrorMessagesChanged: {
26271
- type: Function,
26272
- optional: true
26273
- },
26274
- dataSeriesTitle: {
26275
- type: String,
26276
- optional: true
26277
- },
26278
- labelRangeTitle: {
26279
- type: String,
26280
- optional: true
26281
- },
26282
- getLabelRangeOptions: {
26283
- type: Function,
26284
- optional: true
26285
- }
26286
- };
26142
+ props = props({
26143
+ chartId: types$1.UID(),
26144
+ definition: types$1.ChartDefinitionWithDataSource(),
26145
+ updateChart: types$1.function([]),
26146
+ canUpdateChart: types$1.function([]),
26147
+ "onErrorMessagesChanged?": types$1.function([types$1.array(types$1.string())]),
26148
+ "dataSeriesTitle?": types$1.string(),
26149
+ "labelRangeTitle?": types$1.string(),
26150
+ "getLabelRangeOptions?": types$1.function([])
26151
+ });
26287
26152
  get DataSourceComponent() {
26288
26153
  const dataSourceType = this.props.definition.dataSource.type;
26289
26154
  return chartDataSourceSidePanelComponentRegistry.get(dataSourceType);
@@ -26294,14 +26159,15 @@ var ChartDataSourceComponent = class extends Component$1 {
26294
26159
  //#region src/components/validation_messages/validation_messages.ts
26295
26160
  var ValidationMessages = class extends Component$1 {
26296
26161
  static template = "o-spreadsheet-ValidationMessages";
26297
- static props = {
26298
- messages: Array,
26299
- msgType: String,
26300
- singleBox: {
26301
- type: Boolean,
26302
- optional: true
26303
- }
26304
- };
26162
+ props = props({
26163
+ messages: types$1.array(types$1.string()),
26164
+ msgType: types$1.or([
26165
+ types$1.literal("warning"),
26166
+ types$1.literal("error"),
26167
+ types$1.literal("info")
26168
+ ]),
26169
+ "singleBox?": types$1.boolean()
26170
+ });
26305
26171
  get divClasses() {
26306
26172
  if (this.props.msgType === "warning") return "o-validation-warning";
26307
26173
  if (this.props.msgType === "info") return "o-validation-info";
@@ -26320,10 +26186,7 @@ var ChartErrorSection = class extends Component$1 {
26320
26186
  Section,
26321
26187
  ValidationMessages
26322
26188
  };
26323
- static props = { messages: {
26324
- type: Array,
26325
- element: String
26326
- } };
26189
+ props = props({ messages: types$1.array(types$1.string()) });
26327
26190
  };
26328
26191
 
26329
26192
  //#endregion
@@ -26336,7 +26199,7 @@ var GenericChartConfigPanel = class extends Component$1 {
26336
26199
  Checkbox,
26337
26200
  ChartErrorSection
26338
26201
  };
26339
- static props = ChartSidePanelPropsObject;
26202
+ props = props(chartSidePanelPropsDefinition);
26340
26203
  chartTerms = ChartTerms;
26341
26204
  state = proxy({ errorMessages: [] });
26342
26205
  onErrorMessagesChanged(errorMessages) {
@@ -26383,10 +26246,7 @@ var BarConfigPanel = class extends GenericChartConfigPanel {
26383
26246
  //#region src/components/side_panel/components/collapse/collapse.ts
26384
26247
  var Collapse = class extends Component$1 {
26385
26248
  static template = "o-spreadsheet-Collapse";
26386
- static props = {
26387
- isCollapsed: Boolean,
26388
- slots: Object
26389
- };
26249
+ props = props({ isCollapsed: types$1.boolean() });
26390
26250
  contentRef = signal(null);
26391
26251
  setup() {
26392
26252
  onMounted(() => {
@@ -26418,23 +26278,13 @@ var Collapse = class extends Component$1 {
26418
26278
  //#region src/components/side_panel/components/collapsible/side_panel_collapsible.ts
26419
26279
  var SidePanelCollapsible = class extends Component$1 {
26420
26280
  static template = "o-spreadsheet-SidePanelCollapsible";
26421
- static props = {
26422
- slots: Object,
26423
- title: {
26424
- type: String,
26425
- optional: true
26426
- },
26427
- isInitiallyCollapsed: {
26428
- type: Boolean,
26429
- optional: true
26430
- },
26431
- class: {
26432
- type: String,
26433
- optional: true
26434
- }
26435
- };
26436
26281
  static components = { Collapse };
26437
- state = proxy({ isCollapsed: this.props.isInitiallyCollapsed });
26282
+ props = props({
26283
+ "title?": types$1.string(),
26284
+ "isInitiallyCollapsed?": types$1.boolean(),
26285
+ "class?": types$1.string()
26286
+ });
26287
+ state = proxy({ isCollapsed: !!this.props.isInitiallyCollapsed });
26438
26288
  toggle() {
26439
26289
  this.state.isCollapsed = !this.state.isCollapsed;
26440
26290
  }
@@ -26445,17 +26295,11 @@ var SidePanelCollapsible = class extends Component$1 {
26445
26295
  var NumberInput = class extends GenericInput {
26446
26296
  static template = "o-spreadsheet-NumberInput";
26447
26297
  static components = {};
26448
- static props = {
26449
- ...GenericInput.props,
26450
- min: {
26451
- type: Number,
26452
- optional: true
26453
- },
26454
- max: {
26455
- type: Number,
26456
- optional: true
26457
- }
26458
- };
26298
+ props = props({
26299
+ ...genericInputPropsDefinition,
26300
+ "min?": types$1.number(),
26301
+ "max?": types$1.number()
26302
+ });
26459
26303
  debouncedOnChange = debounce(this.props.onChange.bind(this), 100, true);
26460
26304
  save() {
26461
26305
  const currentValue = (this.genericInputRef()?.value || "").trim();
@@ -26476,11 +26320,11 @@ var DateInput = class extends NumberInput {
26476
26320
  //#region src/components/side_panel/components/badge_selection/badge_selection.ts
26477
26321
  var BadgeSelection = class extends Component$1 {
26478
26322
  static template = "o-spreadsheet.BadgeSelection";
26479
- static props = {
26480
- choices: Array,
26481
- onChange: Function,
26482
- selectedValue: String
26483
- };
26323
+ props = props({
26324
+ choices: types$1.ArrayOf(),
26325
+ onChange: types$1.function([types$1.string()]),
26326
+ selectedValue: types$1.string()
26327
+ });
26484
26328
  };
26485
26329
 
26486
26330
  //#endregion
@@ -26492,28 +26336,18 @@ var ChartTitle = class extends Component$1 {
26492
26336
  TextStyler,
26493
26337
  TextInput
26494
26338
  };
26495
- static props = {
26496
- title: {
26497
- type: String,
26498
- optional: true
26499
- },
26500
- placeholder: {
26501
- type: String,
26502
- optional: true
26503
- },
26504
- updateTitle: Function,
26505
- name: { type: String },
26506
- style: Object,
26507
- defaultStyle: {
26508
- type: Object,
26509
- optional: true
26510
- },
26511
- updateStyle: Function
26512
- };
26513
- static defaultProps = {
26339
+ props = props({
26340
+ "title?": types$1.string(),
26341
+ "placeholder?": types$1.string(),
26342
+ updateTitle: types$1.function([types$1.string()]),
26343
+ "name?": types$1.string(),
26344
+ style: types$1.TitleDesign(),
26345
+ "defaultStyle?": types$1.object({}),
26346
+ updateStyle: types$1.function([types$1.object({})])
26347
+ }, {
26514
26348
  title: "",
26515
26349
  placeholder: ""
26516
- };
26350
+ });
26517
26351
  updateTitle(value) {
26518
26352
  this.props.updateTitle(value);
26519
26353
  }
@@ -26531,12 +26365,12 @@ var AxisDesignEditor = class extends Component$1 {
26531
26365
  NumberInput,
26532
26366
  DateInput
26533
26367
  };
26534
- static props = {
26535
- chartId: String,
26536
- definition: Object,
26537
- updateChart: Function,
26538
- axesList: Array
26539
- };
26368
+ props = props({
26369
+ chartId: types$1.UID(),
26370
+ definition: types$1.ChartWithAxisDefinition(),
26371
+ updateChart: types$1.function([types$1.UID(), types$1.object({})], types$1.DispatchResult()),
26372
+ axesList: types$1.ArrayOf()
26373
+ });
26540
26374
  state = proxy({ currentAxis: "x" });
26541
26375
  defaultFontSize = 12;
26542
26376
  get axisTitleStyle() {
@@ -26706,17 +26540,13 @@ var AxisDesignEditor = class extends Component$1 {
26706
26540
  //#region src/components/side_panel/components/radio_selection/radio_selection.ts
26707
26541
  var RadioSelection = class extends Component$1 {
26708
26542
  static template = "o-spreadsheet.RadioSelection";
26709
- static props = {
26710
- choices: Array,
26711
- onChange: Function,
26712
- selectedValue: { optional: false },
26713
- name: String,
26714
- direction: {
26715
- type: String,
26716
- optional: true
26717
- }
26718
- };
26719
- static defaultProps = { direction: "horizontal" };
26543
+ props = props({
26544
+ choices: types$1.ArrayOf(),
26545
+ onChange: types$1.function([types$1.any()]),
26546
+ selectedValue: types$1.string(),
26547
+ name: types$1.string(),
26548
+ "direction?": types$1.or([types$1.literal("horizontal"), types$1.literal("vertical")])
26549
+ }, { direction: "horizontal" });
26720
26550
  };
26721
26551
 
26722
26552
  //#endregion
@@ -26727,21 +26557,12 @@ var RoundColorPicker = class extends Component$1 {
26727
26557
  Section,
26728
26558
  ColorPicker
26729
26559
  };
26730
- static props = {
26731
- currentColor: {
26732
- type: String,
26733
- optional: true
26734
- },
26735
- title: {
26736
- type: String,
26737
- optional: true
26738
- },
26739
- onColorPicked: Function,
26740
- disableNoColor: {
26741
- type: Boolean,
26742
- optional: true
26743
- }
26744
- };
26560
+ props = props({
26561
+ "currentColor?": types$1.string(),
26562
+ "title?": types$1.string(),
26563
+ onColorPicked: types$1.function([types$1.string()]),
26564
+ "disableNoColor?": types$1.boolean()
26565
+ });
26745
26566
  colorPickerButtonRef = signal(null);
26746
26567
  state;
26747
26568
  setup() {
@@ -26777,18 +26598,13 @@ var GeneralDesignEditor = class extends Component$1 {
26777
26598
  SidePanelCollapsible,
26778
26599
  RadioSelection
26779
26600
  };
26780
- static props = {
26781
- ...ChartSidePanelPropsObject,
26782
- defaultChartTitleFontSize: {
26783
- type: Number,
26784
- optional: true
26785
- },
26786
- slots: {
26787
- type: Object,
26788
- optional: true
26789
- }
26790
- };
26791
- static defaultProps = { defaultChartTitleFontSize: 16 };
26601
+ props = props({
26602
+ chartId: types$1.UID(),
26603
+ definition: types$1.ChartDefinition(),
26604
+ canUpdateChart: types$1.function([types$1.UID(), types$1.object({})], types$1.DispatchResult()),
26605
+ updateChart: types$1.function([types$1.UID(), types$1.object({})], types$1.DispatchResult()),
26606
+ "defaultChartTitleFontSize?": types$1.number()
26607
+ }, { defaultChartTitleFontSize: 16 });
26792
26608
  state;
26793
26609
  setup() {
26794
26610
  this.state = proxy({ activeTool: "" });
@@ -26825,7 +26641,7 @@ var GeneralDesignEditor = class extends Component$1 {
26825
26641
  var ChartHumanizeNumbers = class extends Component$1 {
26826
26642
  static template = "o-spreadsheet-ChartHumanizeNumbers";
26827
26643
  static components = { Checkbox };
26828
- static props = ChartSidePanelPropsObject;
26644
+ props = props(chartSidePanelPropsDefinition);
26829
26645
  get title() {
26830
26646
  const locale = this.env.model.getters.getLocale();
26831
26647
  return _t("E.g. 1234567 -> %(value)s", { value: formatValue(1234567, {
@@ -26843,14 +26659,13 @@ var ChartLegend = class extends Component$1 {
26843
26659
  Section,
26844
26660
  Select
26845
26661
  };
26846
- static props = {
26847
- ...ChartSidePanelPropsObject,
26848
- isDisabled: {
26849
- type: Boolean,
26850
- optional: true
26851
- }
26852
- };
26853
- static defaultProps = { isDisabled: false };
26662
+ props = props({
26663
+ chartId: types$1.string(),
26664
+ definition: types$1.ChartDefinitionWithDataSource(),
26665
+ canUpdateChart: types$1.function(),
26666
+ updateChart: types$1.function(),
26667
+ "isDisabled?": types$1.boolean()
26668
+ }, { isDisabled: false });
26854
26669
  updateLegendPosition(value) {
26855
26670
  this.props.updateChart(this.props.chartId, { legendPosition: value });
26856
26671
  }
@@ -26890,13 +26705,12 @@ var SeriesDesignEditor = class extends Component$1 {
26890
26705
  RoundColorPicker,
26891
26706
  Select
26892
26707
  };
26893
- static props = {
26894
- ...ChartSidePanelPropsObject,
26895
- slots: {
26896
- type: Object,
26897
- optional: true
26898
- }
26899
- };
26708
+ props = props({
26709
+ chartId: types$1.UID(),
26710
+ definition: types$1.ChartDefinitionWithDataSource(),
26711
+ canUpdateChart: types$1.function([types$1.UID(), types$1.object({})], types$1.DispatchResult()),
26712
+ updateChart: types$1.function([types$1.UID(), types$1.object({})], types$1.DispatchResult())
26713
+ });
26900
26714
  state = proxy({ dataSetId: this.getDataSeries()[0]?.dataSetId || "" });
26901
26715
  getRuntime() {
26902
26716
  const runtime = this.env.model.getters.getChartRuntime(this.props.chartId);
@@ -26956,13 +26770,12 @@ var SeriesWithAxisDesignEditor = class extends Component$1 {
26956
26770
  NumberInput,
26957
26771
  Select
26958
26772
  };
26959
- static props = {
26960
- ...ChartSidePanelPropsObject,
26961
- slots: {
26962
- type: Object,
26963
- optional: true
26964
- }
26965
- };
26773
+ props = props({
26774
+ chartId: types$1.UID(),
26775
+ definition: types$1.ChartDefinitionWithDataSource(),
26776
+ canUpdateChart: types$1.function([types$1.UID(), types$1.object({})], types$1.DispatchResult()),
26777
+ updateChart: types$1.function([types$1.UID(), types$1.object({})], types$1.DispatchResult())
26778
+ });
26966
26779
  axisChoices = CHART_AXIS_CHOICES;
26967
26780
  updateDataSeriesAxis(dataSetId, axis) {
26968
26781
  const dataSetStyles = { ...this.props.definition.dataSetStyles };
@@ -27097,13 +26910,13 @@ var SeriesWithAxisDesignEditor = class extends Component$1 {
27097
26910
  var ChartShowValues = class extends Component$1 {
27098
26911
  static template = "o-spreadsheet-ChartShowValues";
27099
26912
  static components = { Checkbox };
27100
- static props = {
27101
- ...ChartSidePanelPropsObject,
27102
- defaultValue: {
27103
- type: Boolean,
27104
- optional: true
27105
- }
27106
- };
26913
+ props = props({
26914
+ chartId: types$1.UID(),
26915
+ definition: types$1.ChartDefinitionWithDataSource(),
26916
+ canUpdateChart: types$1.function([]),
26917
+ updateChart: types$1.function([]),
26918
+ "defaultValue?": types$1.boolean()
26919
+ });
27107
26920
  };
27108
26921
 
27109
26922
  //#endregion
@@ -27120,7 +26933,7 @@ var ChartWithAxisDesignPanel = class extends Component$1 {
27120
26933
  ChartShowValues,
27121
26934
  ChartHumanizeNumbers
27122
26935
  };
27123
- static props = ChartSidePanelPropsObject;
26936
+ props = props(chartSidePanelPropsDefinition);
27124
26937
  get axesList() {
27125
26938
  const { useLeftAxis, useRightAxis } = getDefinedAxis(this.props.definition);
27126
26939
  const axes = [{
@@ -27170,7 +26983,7 @@ var BubbleChartConfigPanel = class extends Component$1 {
27170
26983
  ChartLabelRange,
27171
26984
  ChartErrorSection
27172
26985
  };
27173
- static props = ChartSidePanelPropsObject;
26986
+ props = props(chartSidePanelPropsDefinition);
27174
26987
  state = proxy({
27175
26988
  datasetDispatchResult: void 0,
27176
26989
  labelsDispatchResult: void 0,
@@ -27306,7 +27119,7 @@ var BubbleChartDesignPanel = class extends Component$1 {
27306
27119
  RoundColorPicker,
27307
27120
  Checkbox
27308
27121
  };
27309
- static props = ChartSidePanelPropsObject;
27122
+ props = props(chartSidePanelPropsDefinition);
27310
27123
  get axesList() {
27311
27124
  return [{
27312
27125
  id: "x",
@@ -28299,10 +28112,7 @@ function getBarChartLegend(definition, args) {
28299
28112
  toggleDataVisibility: toggleLineBarDataVisibility
28300
28113
  }),
28301
28114
  ...getLegendDisplayOptions(definition),
28302
- ...getCustomLegendLabels(chartFontColor(definition.background), {
28303
- pointStyle: "rect",
28304
- lineWidth: 3
28305
- })
28115
+ ...getCustomLegendLabels(chartFontColor(definition.background), { lineWidth: 3 })
28306
28116
  };
28307
28117
  }
28308
28118
  function getPyramidChartLegend(definition, args) {
@@ -28673,7 +28483,7 @@ function getSunburstShowValues(definition, args) {
28673
28483
  showLabels: definition.showLabels ?? SunburstChartDefaults.showLabels,
28674
28484
  showValues: definition.showValues ?? SunburstChartDefaults.showValues,
28675
28485
  style: {
28676
- fontSize: definition.valuesDesign?.fontSize ?? SunburstChartDefaults.valuesDesign.fontSize,
28486
+ fontSize: fontSizeInPixels(definition.valuesDesign?.fontSize ?? SunburstChartDefaults.valuesDesign.fontSize),
28677
28487
  align: definition.valuesDesign?.align ?? SunburstChartDefaults.valuesDesign.align,
28678
28488
  bold: definition.valuesDesign?.bold ?? SunburstChartDefaults.valuesDesign.bold,
28679
28489
  italic: definition.valuesDesign?.italic ?? SunburstChartDefaults.valuesDesign.italic,
@@ -28728,7 +28538,7 @@ function getChartTitle({ title, legendPosition, background }, getters) {
28728
28538
  color: title?.color ?? fontColor,
28729
28539
  align: title.align === "center" ? "center" : title.align === "right" ? "end" : "start",
28730
28540
  font: {
28731
- size: title.fontSize ?? 16,
28541
+ size: fontSizeInPixels(title.fontSize ?? 16),
28732
28542
  weight: title.bold ? "bold" : "normal",
28733
28543
  style: title.italic ? "italic" : "normal"
28734
28544
  },
@@ -29110,6 +28920,7 @@ const BarChart = {
29110
28920
  "stacked",
29111
28921
  "aggregated",
29112
28922
  "showValues",
28923
+ "showTotalLine",
29113
28924
  "zoomable"
29114
28925
  ],
29115
28926
  fromStrDefinition: (definition) => ({
@@ -29135,6 +28946,7 @@ const BarChart = {
29135
28946
  type: "bar",
29136
28947
  axesDesign: context.axesDesign,
29137
28948
  showValues: context.showValues,
28949
+ showTotalLine: context.showTotalLine,
29138
28950
  horizontal: context.horizontal,
29139
28951
  zoomable: context.zoomable,
29140
28952
  humanize: context.humanize
@@ -29736,29 +29548,17 @@ var ChartRangeDataSourceComponent = class extends Component$1 {
29736
29548
  ChartDataSeries,
29737
29549
  ChartLabelRange
29738
29550
  };
29739
- static props = {
29740
- chartId: String,
29741
- definition: Object,
29742
- dataSource: Object,
29743
- updateChart: Function,
29744
- canUpdateChart: Function,
29745
- onErrorMessagesChanged: {
29746
- type: Function,
29747
- optional: true
29748
- },
29749
- dataSeriesTitle: {
29750
- type: String,
29751
- optional: true
29752
- },
29753
- labelRangeTitle: {
29754
- type: String,
29755
- optional: true
29756
- },
29757
- getLabelRangeOptions: {
29758
- type: Function,
29759
- optional: true
29760
- }
29761
- };
29551
+ props = props({
29552
+ chartId: types$1.UID(),
29553
+ definition: types$1.ChartDefinitionWithDataSource(),
29554
+ dataSource: types$1.ChartRangeDataSource(),
29555
+ updateChart: types$1.function([types$1.UID(), types$1.object({})], types$1.DispatchResult()),
29556
+ canUpdateChart: types$1.function([types$1.UID(), types$1.object({})], types$1.DispatchResult()),
29557
+ "onErrorMessagesChanged?": types$1.function([types$1.array(types$1.string())]),
29558
+ "dataSeriesTitle?": types$1.string(),
29559
+ "labelRangeTitle?": types$1.string(),
29560
+ "getLabelRangeOptions?": types$1.function([])
29561
+ });
29762
29562
  state = proxy({
29763
29563
  datasetDispatchResult: void 0,
29764
29564
  labelsDispatchResult: void 0
@@ -30608,10 +30408,10 @@ var ColorScalePicker = class extends Component$1 {
30608
30408
  RoundColorPicker,
30609
30409
  Popover
30610
30410
  };
30611
- static props = {
30612
- definition: Object,
30613
- onUpdateColorScale: Function
30614
- };
30411
+ props = props({
30412
+ definition: types$1.object({ "colorScale?": types$1.ChartColorScale() }),
30413
+ onUpdateColorScale: types$1.function([types$1.ChartColorScale()])
30414
+ });
30615
30415
  colorScales = COLORSCALES.map((colorScale) => ({
30616
30416
  value: colorScale,
30617
30417
  label: ChartTerms.ColorScales[colorScale],
@@ -30702,7 +30502,7 @@ var CalendarChartDesignPanel = class extends Component$1 {
30702
30502
  RoundColorPicker,
30703
30503
  Select
30704
30504
  };
30705
- static props = ChartSidePanelPropsObject;
30505
+ props = props(chartSidePanelPropsDefinition);
30706
30506
  get axesList() {
30707
30507
  return [{
30708
30508
  id: "x",
@@ -30747,7 +30547,7 @@ var CalendarChartDesignPanel = class extends Component$1 {
30747
30547
  var ChartShowDataMarkers = class extends Component$1 {
30748
30548
  static template = "o-spreadsheet-ChartShowDataMarkers";
30749
30549
  static components = { Checkbox };
30750
- static props = ChartSidePanelPropsObject;
30550
+ props = props(chartSidePanelPropsDefinition);
30751
30551
  };
30752
30552
 
30753
30553
  //#endregion
@@ -30810,12 +30610,10 @@ var FunnelChartDesignPanel = class extends Component$1 {
30810
30610
  Section,
30811
30611
  ChartHumanizeNumbers
30812
30612
  };
30813
- static props = {
30814
- chartId: String,
30815
- definition: Object,
30816
- updateChart: Function,
30817
- canUpdateChart: Function
30818
- };
30613
+ props = props({
30614
+ ...chartSidePanelPropsDefinition,
30615
+ definition: types$1.FunnelChartDefinition()
30616
+ });
30819
30617
  getFunnelColorItems() {
30820
30618
  const labels = this.env.model.getters.getChartRuntime(this.props.chartId).chartJsConfig.data.labels || [];
30821
30619
  const colors = getFunnelLabelColors(labels, this.props.definition.funnelColors);
@@ -30838,7 +30636,7 @@ var GaugeChartConfigPanel = class extends Component$1 {
30838
30636
  ChartErrorSection,
30839
30637
  ChartDataSeries
30840
30638
  };
30841
- static props = ChartSidePanelPropsObject;
30639
+ props = props(chartSidePanelPropsDefinition);
30842
30640
  state = proxy({ dataRangeDispatchResult: void 0 });
30843
30641
  dataRange = this.props.definition.dataRange;
30844
30642
  get configurationErrorMessages() {
@@ -30863,15 +30661,12 @@ var GaugeChartConfigPanel = class extends Component$1 {
30863
30661
  //#region src/components/composer/autocomplete_dropdown/autocomplete_dropdown.ts
30864
30662
  var TextValueProvider = class extends Component$1 {
30865
30663
  static template = "o-spreadsheet-TextValueProvider";
30866
- static props = {
30867
- proposals: Array,
30868
- selectedIndex: {
30869
- type: Number,
30870
- optional: true
30871
- },
30872
- onValueSelected: Function,
30873
- onValueHovered: Function
30874
- };
30664
+ props = props({
30665
+ proposals: types$1.array(types$1.AutoCompleteProposal()),
30666
+ "selectedIndex?": types$1.number(),
30667
+ onValueSelected: types$1.function([types$1.AutoCompleteProposal()]),
30668
+ onValueHovered: types$1.function([types$1.string()])
30669
+ });
30875
30670
  autoCompleteListRef = signal(null);
30876
30671
  setup() {
30877
30672
  useEffect(() => {
@@ -31088,15 +30883,12 @@ function isEmptyParagraph(node) {
31088
30883
  //#region src/components/composer/formula_assistant/formula_assistant.ts
31089
30884
  var FunctionDescriptionProvider = class extends Component$1 {
31090
30885
  static template = "o-spreadsheet-FunctionDescriptionProvider";
31091
- static props = {
31092
- functionDescription: Object,
31093
- argsToFocus: Array,
31094
- repeatingArgGroupIndex: {
31095
- type: Number,
31096
- optional: true
31097
- }
31098
- };
31099
30886
  static components = { Collapse };
30887
+ props = props({
30888
+ functionDescription: types$1.FunctionDescription(),
30889
+ argsToFocus: types$1.array(types$1.number()),
30890
+ "repeatingArgGroupIndex?": types$1.number()
30891
+ });
31100
30892
  state = proxy({ isCollapsed: true });
31101
30893
  toggle() {
31102
30894
  this.state.isCollapsed = !this.state.isCollapsed;
@@ -31160,11 +30952,11 @@ var FunctionDescriptionProvider = class extends Component$1 {
31160
30952
  const BUBBLE_ARROW_SIZE = 7;
31161
30953
  var SpeechBubble = class extends Component$1 {
31162
30954
  static template = "o-spreadsheet-SpeechBubble";
31163
- static props = {
31164
- content: String,
31165
- anchorRect: Object
31166
- };
31167
30955
  static components = {};
30956
+ props = props({
30957
+ content: types$1.string(),
30958
+ anchorRect: types$1.Rect()
30959
+ });
31168
30960
  spreadsheetRect = useSpreadsheetRect();
31169
30961
  bubbleRef = signal(null);
31170
30962
  setup() {
@@ -31191,62 +30983,30 @@ const highlightParenthesisClass = "highlight-parenthesis-flag";
31191
30983
  const highlightClass = "highlight-flag";
31192
30984
  var Composer = class extends Component$1 {
31193
30985
  static template = "o-spreadsheet-Composer";
31194
- static props = {
31195
- focus: { validate: (value) => [
31196
- "inactive",
31197
- "cellFocus",
31198
- "contentFocus"
31199
- ].includes(value) },
31200
- inputStyle: {
31201
- type: String,
31202
- optional: true
31203
- },
31204
- rect: {
31205
- type: Object,
31206
- optional: true
31207
- },
31208
- delimitation: {
31209
- type: Object,
31210
- optional: true
31211
- },
31212
- onComposerCellFocused: {
31213
- type: Function,
31214
- optional: true
31215
- },
31216
- onComposerContentFocused: Function,
31217
- isDefaultFocus: {
31218
- type: Boolean,
31219
- optional: true
31220
- },
31221
- onInputContextMenu: {
31222
- type: Function,
31223
- optional: true
31224
- },
31225
- composerStore: Object,
31226
- placeholder: {
31227
- type: String,
31228
- optional: true
31229
- },
31230
- inputMode: {
31231
- type: String,
31232
- optional: true
31233
- },
31234
- showAssistant: {
31235
- type: Boolean,
31236
- optional: true
31237
- }
31238
- };
31239
30986
  static components = {
31240
30987
  TextValueProvider,
31241
30988
  FunctionDescriptionProvider,
31242
30989
  SpeechBubble
31243
30990
  };
31244
- static defaultProps = {
30991
+ props = props({
30992
+ focus: types$1.ComposerFocusType(),
30993
+ "inputStyle?": types$1.string(),
30994
+ "rect?": types$1.Rect(),
30995
+ "delimitation?": types$1.DOMDimension(),
30996
+ "onComposerCellFocused?": types$1.function([types$1.string()]),
30997
+ onComposerContentFocused: types$1.function([types$1.ComposerSelection()]),
30998
+ "isDefaultFocus?": types$1.boolean(),
30999
+ "onInputContextMenu?": types$1.function([types$1.instanceOf(MouseEvent)]),
31000
+ composerStore: types$1.Store(),
31001
+ "placeholder?": types$1.string(),
31002
+ "inputMode?": types$1.string(),
31003
+ "showAssistant?": types$1.boolean()
31004
+ }, {
31245
31005
  inputStyle: "",
31246
31006
  isDefaultFocus: false,
31247
31007
  inputMode: "text",
31248
31008
  showAssistant: true
31249
- };
31009
+ });
31250
31010
  DOMFocusableElementStore;
31251
31011
  composerRef = signal(null);
31252
31012
  containerRef = signal(null);
@@ -32811,54 +32571,23 @@ var StandaloneComposerStore = class extends AbstractComposerStore {
32811
32571
  //#region src/components/composer/standalone_composer/standalone_composer.ts
32812
32572
  var StandaloneComposer = class extends Component$1 {
32813
32573
  static template = "o-spreadsheet-StandaloneComposer";
32814
- static props = {
32815
- composerContent: {
32816
- type: String,
32817
- optional: true
32818
- },
32819
- defaultRangeSheetId: {
32820
- type: String,
32821
- optional: true
32822
- },
32823
- defaultStatic: {
32824
- type: Boolean,
32825
- optional: true
32826
- },
32827
- onConfirm: Function,
32828
- contextualAutocomplete: {
32829
- type: Object,
32830
- optional: true
32831
- },
32832
- placeholder: {
32833
- type: String,
32834
- optional: true
32835
- },
32836
- title: {
32837
- type: String,
32838
- optional: true
32839
- },
32840
- class: {
32841
- type: String,
32842
- optional: true
32843
- },
32844
- invalid: {
32845
- type: Boolean,
32846
- optional: true
32847
- },
32848
- autofocus: {
32849
- type: Boolean,
32850
- optional: true
32851
- },
32852
- getContextualColoredSymbolToken: {
32853
- type: Function,
32854
- optional: true
32855
- }
32856
- };
32857
32574
  static components = { Composer };
32858
- static defaultProps = {
32575
+ props = props({
32576
+ onConfirm: types$1.function([types$1.string()]),
32577
+ "composerContent?": types$1.string(),
32578
+ defaultRangeSheetId: types$1.UID(),
32579
+ "defaultStatic?": types$1.boolean(),
32580
+ "contextualAutocomplete?": types$1.AutoCompleteProviderDefinition(),
32581
+ "placeholder?": types$1.string(),
32582
+ "title?": types$1.string(),
32583
+ "class?": types$1.string(),
32584
+ "invalid?": types$1.boolean(),
32585
+ "autofocus?": types$1.boolean(),
32586
+ "getContextualColoredSymbolToken?": types$1.function([types$1.Token()], types$1.Color())
32587
+ }, {
32859
32588
  composerContent: "",
32860
32589
  defaultStatic: false
32861
- };
32590
+ });
32862
32591
  composerFocusStore;
32863
32592
  standaloneComposerStore;
32864
32593
  composerInterface;
@@ -32922,7 +32651,7 @@ var GaugeChartDesignPanel = class extends Component$1 {
32922
32651
  ChartHumanizeNumbers,
32923
32652
  Select
32924
32653
  };
32925
- static props = ChartSidePanelPropsObject;
32654
+ props = props(chartSidePanelPropsDefinition);
32926
32655
  state;
32927
32656
  setup() {
32928
32657
  this.state = proxy({
@@ -33053,11 +32782,11 @@ var GeoChartRegionSelectSection = class extends Component$1 {
33053
32782
  Section,
33054
32783
  Select
33055
32784
  };
33056
- static props = {
33057
- chartId: String,
33058
- definition: Object,
33059
- updateChart: Function
33060
- };
32785
+ props = props({
32786
+ chartId: types$1.UID(),
32787
+ definition: types$1.GeoChartDefinition(),
32788
+ updateChart: types$1.function([types$1.UID(), types$1.object({})], types$1.DispatchResult())
32789
+ });
33061
32790
  updateSelectedRegion(value) {
33062
32791
  this.props.updateChart(this.props.chartId, { region: value });
33063
32792
  }
@@ -33207,10 +32936,10 @@ var PieHoleSize = class extends Component$1 {
33207
32936
  Section,
33208
32937
  NumberInput
33209
32938
  };
33210
- static props = {
33211
- onValueChange: Function,
33212
- value: Number
33213
- };
32939
+ props = props({
32940
+ onValueChange: types$1.function([types$1.number()]),
32941
+ value: types$1.number()
32942
+ });
33214
32943
  onChange(value) {
33215
32944
  if (!isNaN(Number(value))) this.props.onValueChange(clip(Number(value), 0, 95));
33216
32945
  }
@@ -33232,7 +32961,7 @@ var PieChartDesignPanel = class extends Component$1 {
33232
32961
  RoundColorPicker,
33233
32962
  Select
33234
32963
  };
33235
- static props = ChartSidePanelPropsObject;
32964
+ props = props(chartSidePanelPropsDefinition);
33236
32965
  state = proxy({ index: 0 });
33237
32966
  get runtime() {
33238
32967
  return this.env.model.getters.getChartRuntime(this.props.chartId);
@@ -33292,7 +33021,7 @@ var RadarChartDesignPanel = class extends Component$1 {
33292
33021
  Checkbox,
33293
33022
  ChartHumanizeNumbers
33294
33023
  };
33295
- static props = ChartSidePanelPropsObject;
33024
+ props = props(chartSidePanelPropsDefinition);
33296
33025
  };
33297
33026
 
33298
33027
  //#endregion
@@ -33342,7 +33071,7 @@ var ScorecardChartConfigPanel = class extends Component$1 {
33342
33071
  Section,
33343
33072
  Select
33344
33073
  };
33345
- static props = ChartSidePanelPropsObject;
33074
+ props = props(chartSidePanelPropsDefinition);
33346
33075
  state = proxy({
33347
33076
  keyValueDispatchResult: void 0,
33348
33077
  baselineDispatchResult: void 0
@@ -33416,7 +33145,7 @@ var ScorecardChartDesignPanel = class extends Component$1 {
33416
33145
  ChartTitle,
33417
33146
  ChartHumanizeNumbers
33418
33147
  };
33419
- static props = ChartSidePanelPropsObject;
33148
+ props = props(chartSidePanelPropsDefinition);
33420
33149
  get colorsSectionTitle() {
33421
33150
  return this.props.definition.baselineMode === "progress" ? _t("Progress bar colors") : _t("Baseline colors");
33422
33151
  }
@@ -33497,7 +33226,7 @@ var SunburstChartDesignPanel = class extends Component$1 {
33497
33226
  PieHoleSize,
33498
33227
  ChartHumanizeNumbers
33499
33228
  };
33500
- static props = ChartSidePanelPropsObject;
33229
+ props = props(chartSidePanelPropsDefinition);
33501
33230
  defaults = SunburstChartDefaults;
33502
33231
  get showValues() {
33503
33232
  return this.props.definition.showValues ?? SunburstChartDefaults.showValues;
@@ -33530,11 +33259,11 @@ var TreeMapCategoryColors = class extends Component$1 {
33530
33259
  Checkbox,
33531
33260
  RoundColorPicker
33532
33261
  };
33533
- static props = {
33534
- chartId: String,
33535
- definition: Object,
33536
- onColorChanged: Function
33537
- };
33262
+ props = props({
33263
+ chartId: types$1.UID(),
33264
+ definition: types$1.TreeMapChartDefinition(),
33265
+ onColorChanged: types$1.function([types$1.TreeMapCategoryColorOptions()], types$1.DispatchResult())
33266
+ });
33538
33267
  get coloringOptions() {
33539
33268
  const coloringOptions = this.props.definition.coloringOptions ?? TreeMapChartDefaults.coloringOptions;
33540
33269
  if (coloringOptions.type !== "categoryColor") throw new Error("Coloring options is not solid color");
@@ -33562,11 +33291,11 @@ var TreeMapCategoryColors = class extends Component$1 {
33562
33291
  var TreeMapColorScale = class extends Component$1 {
33563
33292
  static template = "o-spreadsheet-TreeMapColorScale";
33564
33293
  static components = { RoundColorPicker };
33565
- static props = {
33566
- chartId: String,
33567
- definition: Object,
33568
- onColorChanged: Function
33569
- };
33294
+ props = props({
33295
+ chartId: types$1.UID(),
33296
+ definition: types$1.TreeMapChartDefinition(),
33297
+ onColorChanged: types$1.function([types$1.TreeMapColorScaleOptions()], types$1.DispatchResult())
33298
+ });
33570
33299
  get coloringOptions() {
33571
33300
  const coloringOptions = this.props.definition.coloringOptions ?? TreeMapChartDefaults.coloringOptions;
33572
33301
  if (coloringOptions.type !== "colorScale") throw new Error("Coloring options is not a color scale");
@@ -33608,7 +33337,7 @@ var TreeMapChartDesignPanel = class extends Component$1 {
33608
33337
  TreeMapColorScale,
33609
33338
  ChartHumanizeNumbers
33610
33339
  };
33611
- static props = ChartSidePanelPropsObject;
33340
+ props = props(chartSidePanelPropsDefinition);
33612
33341
  savedColors = {
33613
33342
  categoryColors: DEFAULT_SOLID_COLOR,
33614
33343
  colorScale: DEFAULT_COLOR_SCALE
@@ -33665,7 +33394,7 @@ var WaterfallChartDesignPanel = class extends Component$1 {
33665
33394
  ChartLegend,
33666
33395
  ChartHumanizeNumbers
33667
33396
  };
33668
- static props = ChartSidePanelPropsObject;
33397
+ props = props(chartSidePanelPropsDefinition);
33669
33398
  axisChoices = CHART_AXIS_CHOICES;
33670
33399
  onUpdateShowSubTotals(showSubTotals) {
33671
33400
  this.props.updateChart(this.props.chartId, { showSubTotals });
@@ -33779,10 +33508,10 @@ var ChartTypePicker = class extends Component$1 {
33779
33508
  Section,
33780
33509
  Popover
33781
33510
  };
33782
- static props = {
33783
- chartId: String,
33784
- chartPanelStore: Object
33785
- };
33511
+ props = props({
33512
+ chartId: types$1.UID(),
33513
+ chartPanelStore: types$1.Store()
33514
+ });
33786
33515
  categories = chartCategories;
33787
33516
  chartTypeByCategories = {};
33788
33517
  popoverRef = signal(null);
@@ -33957,10 +33686,10 @@ var ChartPanel = class extends Component$1 {
33957
33686
  Section,
33958
33687
  ChartTypePicker
33959
33688
  };
33960
- static props = {
33961
- onCloseSidePanel: Function,
33962
- chartId: String
33963
- };
33689
+ props = props({
33690
+ onCloseSidePanel: types$1.function([]),
33691
+ chartId: types$1.UID()
33692
+ });
33964
33693
  store;
33965
33694
  get chartId() {
33966
33695
  return this.props.chartId;
@@ -34351,13 +34080,13 @@ var ColumnStatisticsStore = class extends SpreadsheetStore {
34351
34080
  //#region src/components/side_panel/column_stats/column_stats_panel.ts
34352
34081
  var ColumnStatsPanel = class extends Component$1 {
34353
34082
  static template = "o-spreadsheet-ColumnStatsPanel";
34354
- static props = { onCloseSidePanel: Function };
34355
34083
  static components = {
34356
34084
  NumberInput,
34357
34085
  SidePanelCollapsible,
34358
34086
  BadgeSelection,
34359
34087
  Section
34360
34088
  };
34089
+ props = props({ onCloseSidePanel: types$1.function([]) });
34361
34090
  state = proxy({
34362
34091
  currentChart: "count",
34363
34092
  currentFrequencyOrder: "descending",
@@ -34600,7 +34329,7 @@ var CellIsRuleEditor = class extends Component$1 {
34600
34329
  ColorPickerWidget,
34601
34330
  Select
34602
34331
  };
34603
- static props = { store: Object };
34332
+ props = props({ store: types$1.Store() });
34604
34333
  getTextDecoration = getTextDecoration;
34605
34334
  get rule() {
34606
34335
  return this.props.store.state.rules.cellIs;
@@ -34610,18 +34339,12 @@ var CellIsRuleEditor = class extends Component$1 {
34610
34339
  //#endregion
34611
34340
  //#region src/components/side_panel/criterion_form/criterion_form.ts
34612
34341
  var CriterionForm = class extends Component$1 {
34613
- static props = {
34614
- criterion: Object,
34615
- onCriterionChanged: Function,
34616
- disableFormulas: {
34617
- type: Boolean,
34618
- optional: true
34619
- },
34620
- autofocus: {
34621
- type: Boolean,
34622
- optional: true
34623
- }
34624
- };
34342
+ props = props({
34343
+ criterion: types$1.object({}),
34344
+ onCriterionChanged: types$1.function([types$1.object({})]),
34345
+ "disableFormulas?": types$1.boolean(),
34346
+ "autofocus?": types$1.boolean()
34347
+ });
34625
34348
  setup() {
34626
34349
  const composerFocusStore = useStore(ComposerFocusStore);
34627
34350
  if (composerFocusStore.activeComposer.editionMode !== "inactive") composerFocusStore.activeComposer.stopEdition();
@@ -35202,41 +34925,22 @@ function getOccurrencesInRanges(criterionRanges, getters) {
35202
34925
  //#region src/components/side_panel/criterion_form/criterion_input/criterion_input.ts
35203
34926
  var CriterionInput = class extends Component$1 {
35204
34927
  static template = "o-spreadsheet-CriterionInput";
35205
- static props = {
35206
- value: {
35207
- type: String,
35208
- optional: true
35209
- },
35210
- criterionType: String,
35211
- onValueChanged: Function,
35212
- onKeyDown: {
35213
- type: Function,
35214
- optional: true
35215
- },
35216
- focused: {
35217
- type: Boolean,
35218
- optional: true
35219
- },
35220
- onBlur: {
35221
- type: Function,
35222
- optional: true
35223
- },
35224
- onFocus: {
35225
- type: Function,
35226
- optional: true
35227
- },
35228
- disableFormulas: {
35229
- type: Boolean,
35230
- optional: true
35231
- }
35232
- };
35233
- static defaultProps = {
34928
+ static components = { StandaloneComposer };
34929
+ props = props({
34930
+ "value?": types$1.string(),
34931
+ criterionType: types$1.DataValidationCriterionType(),
34932
+ onValueChanged: types$1.function([types$1.string()]),
34933
+ "onKeyDown?": types$1.function([types$1.instanceOf(KeyboardEvent)]),
34934
+ "focused?": types$1.boolean(),
34935
+ "onBlur?": types$1.function([]),
34936
+ "onFocus?": types$1.function([]),
34937
+ "disableFormulas?": types$1.boolean()
34938
+ }, {
35234
34939
  value: "",
35235
34940
  onKeyDown: () => {},
35236
34941
  focused: false,
35237
34942
  onBlur: () => {}
35238
- };
35239
- static components = { StandaloneComposer };
34943
+ });
35240
34944
  inputRef = signal(null);
35241
34945
  setup() {
35242
34946
  useLayoutEffect$1(() => {
@@ -36063,10 +35767,14 @@ var ColorScaleRuleEditorThreshold = class extends Component$1 {
36063
35767
  StandaloneComposer,
36064
35768
  Select
36065
35769
  };
36066
- static props = {
36067
- store: Object,
36068
- thresholdType: String
36069
- };
35770
+ props = props({
35771
+ store: types$1.Store(),
35772
+ thresholdType: types$1.or([
35773
+ types$1.literal("minimum"),
35774
+ types$1.literal("midpoint"),
35775
+ types$1.literal("maximum")
35776
+ ])
35777
+ });
36070
35778
  get rule() {
36071
35779
  return this.props.store.state.rules.colorScale;
36072
35780
  }
@@ -36137,7 +35845,7 @@ var ColorScaleRuleEditorThreshold = class extends Component$1 {
36137
35845
  var ColorScaleRuleEditor = class extends Component$1 {
36138
35846
  static template = "o-spreadsheet-ColorScaleRuleEditor";
36139
35847
  static components = { ColorScaleRuleEditorThreshold };
36140
- static props = { store: Object };
35848
+ props = props({ store: types$1.Store() });
36141
35849
  };
36142
35850
 
36143
35851
  //#endregion
@@ -36148,7 +35856,7 @@ var DataBarRuleEditor = class extends Component$1 {
36148
35856
  SelectionInput,
36149
35857
  RoundColorPicker
36150
35858
  };
36151
- static props = { store: Object };
35859
+ props = props({ store: types$1.Store() });
36152
35860
  get rule() {
36153
35861
  return this.props.store.state.rules.dataBar;
36154
35862
  }
@@ -36159,7 +35867,7 @@ var DataBarRuleEditor = class extends Component$1 {
36159
35867
  //#region src/components/icon_picker/icon_picker.ts
36160
35868
  var IconPicker = class extends Component$1 {
36161
35869
  static template = "o-spreadsheet-IconPicker";
36162
- static props = { onIconPicked: Function };
35870
+ props = props({ onIconPicked: types$1.function([types$1.string()]) });
36163
35871
  onIconClick(icon) {
36164
35872
  if (icon) this.props.onIconPicked(icon);
36165
35873
  }
@@ -36180,7 +35888,7 @@ var IconSetRuleEditor = class extends Component$1 {
36180
35888
  StandaloneComposer,
36181
35889
  Select
36182
35890
  };
36183
- static props = { store: Object };
35891
+ props = props({ store: types$1.Store() });
36184
35892
  get rule() {
36185
35893
  return this.props.store.state.rules.iconSet;
36186
35894
  }
@@ -36259,11 +35967,11 @@ var ConditionalFormattingEditor = class extends Component$1 {
36259
35967
  IconSetRuleEditor,
36260
35968
  DataBarRuleEditor
36261
35969
  };
36262
- static props = {
36263
- cf: Object,
36264
- isNewCf: Boolean,
36265
- onCloseSidePanel: Function
36266
- };
35970
+ props = props({
35971
+ cf: types$1.ConditionalFormat(),
35972
+ isNewCf: types$1.boolean(),
35973
+ onCloseSidePanel: types$1.function([])
35974
+ });
36267
35975
  activeSheetId;
36268
35976
  store;
36269
35977
  setup() {
@@ -36319,11 +36027,11 @@ var ConditionalFormattingEditor = class extends Component$1 {
36319
36027
  //#region src/components/side_panel/conditional_formatting/cf_preview/cf_preview.ts
36320
36028
  var ConditionalFormatPreview = class extends Component$1 {
36321
36029
  static template = "o-spreadsheet-ConditionalFormatPreview";
36322
- static props = {
36323
- conditionalFormat: Object,
36324
- onMouseDown: Function,
36325
- class: String
36326
- };
36030
+ props = props({
36031
+ conditionalFormat: types$1.ConditionalFormat(),
36032
+ onMouseDown: types$1.function([types$1.instanceOf(MouseEvent)]),
36033
+ class: types$1.string()
36034
+ });
36327
36035
  icons = ICONS;
36328
36036
  cfPreviewRef = signal(null);
36329
36037
  setup() {
@@ -36379,8 +36087,8 @@ var ConditionalFormatPreview = class extends Component$1 {
36379
36087
  //#region src/components/side_panel/conditional_formatting/cf_preview_list/cf_preview_list.ts
36380
36088
  var ConditionalFormatPreviewList = class extends Component$1 {
36381
36089
  static template = "o-spreadsheet-ConditionalFormatPreviewList";
36382
- static props = { onCloseSidePanel: Function };
36383
36090
  static components = { ConditionalFormatPreview };
36091
+ props = props({ onCloseSidePanel: types$1.function([]) });
36384
36092
  dragAndDrop = useDragAndDropListItems();
36385
36093
  cfListRef = signal(null);
36386
36094
  get conditionalFormats() {
@@ -36449,7 +36157,7 @@ var ConditionalFormatPreviewList = class extends Component$1 {
36449
36157
  //#region src/components/side_panel/data_validation/dv_preview/dv_preview.ts
36450
36158
  var DataValidationPreview = class extends Component$1 {
36451
36159
  static template = "o-spreadsheet-DataValidationPreview";
36452
- static props = { rule: Object };
36160
+ props = props({ rule: types$1.DataValidationRule() });
36453
36161
  dvPreviewRef = signal(null);
36454
36162
  setup() {
36455
36163
  useHighlightsOnHover(this.dvPreviewRef, this);
@@ -36484,8 +36192,8 @@ var DataValidationPreview = class extends Component$1 {
36484
36192
  //#region src/components/side_panel/data_validation/data_validation_panel.ts
36485
36193
  var DataValidationPanel = class extends Component$1 {
36486
36194
  static template = "o-spreadsheet-DataValidationPanel";
36487
- static props = { onCloseSidePanel: Function };
36488
36195
  static components = { DataValidationPreview };
36196
+ props = props({ onCloseSidePanel: types$1.function([]) });
36489
36197
  addDataValidationRule() {
36490
36198
  this.env.replaceSidePanel("DataValidationEditor", "DataValidation", { ruleId: UuidGenerator.smallUuid() });
36491
36199
  }
@@ -36539,14 +36247,11 @@ var DataValidationEditor = class extends Component$1 {
36539
36247
  Section,
36540
36248
  ValidationMessages
36541
36249
  };
36542
- static props = {
36543
- ruleId: String,
36544
- onCancel: {
36545
- type: Function,
36546
- optional: true
36547
- },
36548
- onCloseSidePanel: Function
36549
- };
36250
+ props = props({
36251
+ ruleId: types$1.UID(),
36252
+ "onCancel?": types$1.function([]),
36253
+ onCloseSidePanel: types$1.function([])
36254
+ });
36550
36255
  state = proxy({
36551
36256
  rule: this.defaultDataValidationRule,
36552
36257
  errors: [],
@@ -36993,7 +36698,7 @@ var FindAndReplacePanel = class extends Component$1 {
36993
36698
  ValidationMessages,
36994
36699
  Select
36995
36700
  };
36996
- static props = { onCloseSidePanel: Function };
36701
+ props = props({ onCloseSidePanel: types$1.function([]) });
36997
36702
  searchInputRef = signal(null);
36998
36703
  store;
36999
36704
  state;
@@ -37819,13 +37524,6 @@ var MoreFormatsStore = class extends SpreadsheetStore {
37819
37524
  //#region src/components/side_panel/more_formats/more_formats.ts
37820
37525
  var MoreFormatsPanel = class extends Component$1 {
37821
37526
  static template = "o-spreadsheet-MoreFormatsPanel";
37822
- static props = {
37823
- onCloseSidePanel: Function,
37824
- category: {
37825
- type: String,
37826
- optional: true
37827
- }
37828
- };
37829
37527
  static components = {
37830
37528
  BadgeSelection,
37831
37529
  Section,
@@ -37833,6 +37531,14 @@ var MoreFormatsPanel = class extends Component$1 {
37833
37531
  Checkbox,
37834
37532
  Select
37835
37533
  };
37534
+ props = props({
37535
+ onCloseSidePanel: types$1.function([]),
37536
+ "category?": types$1.or([
37537
+ types$1.literal("number"),
37538
+ types$1.literal("date"),
37539
+ types$1.literal("currency")
37540
+ ])
37541
+ });
37836
37542
  store;
37837
37543
  setup() {
37838
37544
  this.store = useLocalStore(MoreFormatsStore, this.props.category);
@@ -37888,11 +37594,11 @@ function handleResult(env, result) {
37888
37594
  //#region src/components/side_panel/named_ranges_panel/named_range_preview/named_range_preview.ts
37889
37595
  var NamedRangePreview = class extends Component$1 {
37890
37596
  static template = "o-spreadsheet-NamedRangePreview";
37891
- static props = { namedRange: Object };
37892
37597
  static components = {
37893
37598
  SelectionInput,
37894
37599
  TextInput
37895
37600
  };
37601
+ props = props({ namedRange: types$1.NamedRange() });
37896
37602
  state = proxy({});
37897
37603
  namedRangePreviewRef = signal(null);
37898
37604
  setup() {
@@ -37944,12 +37650,12 @@ var NamedRangePreview = class extends Component$1 {
37944
37650
  //#region src/components/side_panel/named_ranges_panel/named_ranges_panel.ts
37945
37651
  var NamedRangesPanel = class extends Component$1 {
37946
37652
  static template = "o-spreadsheet-NamedRangesPanel";
37947
- static props = { onCloseSidePanel: Function };
37948
37653
  static components = {
37949
37654
  NamedRangePreview,
37950
37655
  SelectionInput,
37951
37656
  TextInput
37952
37657
  };
37658
+ props = props({ onCloseSidePanel: types$1.function([]) });
37953
37659
  get namedRanges() {
37954
37660
  return this.env.model.getters.getNamedRanges();
37955
37661
  }
@@ -37970,7 +37676,7 @@ const HIGHLIGHT_COLOR = "#e28f08";
37970
37676
  var PerfProfilePanel = class extends Component$1 {
37971
37677
  static template = "o-spreadsheet-PerfProfilePanel";
37972
37678
  static components = { Section };
37973
- static props = { onCloseSidePanel: Function };
37679
+ props = props({ onCloseSidePanel: types$1.function([]) });
37974
37680
  state = proxy({
37975
37681
  selectedIndex: void 0,
37976
37682
  lastProfiledTime: 0
@@ -38186,11 +37892,11 @@ var PivotMeasureDisplayPanelStore = class extends SpreadsheetStore {
38186
37892
  //#region src/components/side_panel/pivot/pivot_measure_display_panel/pivot_measure_display_panel.ts
38187
37893
  var PivotMeasureDisplayPanel = class extends Component$1 {
38188
37894
  static template = "o-spreadsheet-PivotMeasureDisplayPanel";
38189
- static props = {
38190
- onCloseSidePanel: Function,
38191
- pivotId: String,
38192
- measure: Object
38193
- };
37895
+ props = props({
37896
+ onCloseSidePanel: types$1.function([]),
37897
+ pivotId: types$1.UID(),
37898
+ measure: types$1.PivotCoreMeasure()
37899
+ });
38194
37900
  static components = {
38195
37901
  Section,
38196
37902
  Checkbox,
@@ -38252,13 +37958,13 @@ function getVisiblePivotCellPositions(getters, pivotId) {
38252
37958
  //#region src/components/side_panel/pivot/pivot_defer_update/pivot_defer_update.ts
38253
37959
  var PivotDeferUpdate = class extends Component$1 {
38254
37960
  static template = "o-spreadsheet-PivotDeferUpdate";
38255
- static props = {
38256
- deferUpdate: Boolean,
38257
- isDirty: Boolean,
38258
- toggleDeferUpdate: Function,
38259
- discard: Function,
38260
- apply: Function
38261
- };
37961
+ props = props({
37962
+ deferUpdate: types$1.boolean(),
37963
+ isDirty: types$1.boolean(),
37964
+ toggleDeferUpdate: types$1.function([types$1.boolean()]),
37965
+ discard: types$1.function([]),
37966
+ apply: types$1.function([])
37967
+ });
38262
37968
  static components = {
38263
37969
  Section,
38264
37970
  Checkbox
@@ -38271,6 +37977,150 @@ var PivotDeferUpdate = class extends Component$1 {
38271
37977
  }
38272
37978
  };
38273
37979
 
37980
+ //#endregion
37981
+ //#region src/helpers/pivot/pivot_runtime_definition.ts
37982
+ /**
37983
+ * Represent a pivot runtime definition. A pivot runtime definition is a pivot
37984
+ * definition that has been enriched to include the display name of its attributes
37985
+ * (measures, columns, rows).
37986
+ */
37987
+ var PivotRuntimeDefinition = class {
37988
+ measures;
37989
+ columns;
37990
+ rows;
37991
+ filters;
37992
+ sortedColumn;
37993
+ collapsedDomains;
37994
+ customFields;
37995
+ constructor(definition, fields) {
37996
+ this.columns = definition.columns.map((dimension) => this.createPivotDimension(fields, dimension));
37997
+ this.rows = definition.rows.map((dimension) => this.createPivotDimension(fields, dimension));
37998
+ this.measures = definition.measures.map((measure) => this.createMeasure(fields, measure));
37999
+ this.filters = (definition.filters ?? []).map((filter) => this.createPivotFilter(fields, filter));
38000
+ this.sortedColumn = definition.sortedColumn;
38001
+ this.collapsedDomains = definition.collapsedDomains;
38002
+ this.customFields = definition.customFields;
38003
+ }
38004
+ getDimension(nameWithGranularity) {
38005
+ const dimension = this.columns.find((d) => d.nameWithGranularity === nameWithGranularity) || this.rows.find((d) => d.nameWithGranularity === nameWithGranularity);
38006
+ if (!dimension) throw new EvaluationError(_t("Dimension %s does not exist", nameWithGranularity));
38007
+ return dimension;
38008
+ }
38009
+ getMeasure(id) {
38010
+ const measure = this.measures.find((measure) => measure.id === id);
38011
+ if (!measure) throw new EvaluationError(_t("Field %s is not a measure", id));
38012
+ return measure;
38013
+ }
38014
+ get invalidAggregatorsForCustomField() {
38015
+ return [];
38016
+ }
38017
+ createMeasure(fields, measure) {
38018
+ const fieldName = measure.fieldName;
38019
+ const field = fieldName === "__count" ? {
38020
+ name: "__count",
38021
+ string: _t("Count"),
38022
+ type: "integer",
38023
+ aggregator: "sum"
38024
+ } : fields[fieldName];
38025
+ const aggregator = measure.aggregator;
38026
+ let isValid = !!(field || measure.computedBy);
38027
+ for (const dimension of [...this.rows, ...this.columns]) if (fields[dimension.fieldName]?.isCustomField && this.invalidAggregatorsForCustomField.includes(aggregator)) {
38028
+ isValid = false;
38029
+ break;
38030
+ }
38031
+ return {
38032
+ /**
38033
+ * Get the id of the measure, as it is stored in the pivot formula
38034
+ */
38035
+ id: measure.id,
38036
+ /**
38037
+ * Display name of the measure
38038
+ * e.g. "__count" -> "Count", "amount_total" -> "Total Amount"
38039
+ */
38040
+ get displayName() {
38041
+ return measure.userDefinedName ?? field?.string ?? measure.fieldName;
38042
+ },
38043
+ userDefinedName: measure.userDefinedName,
38044
+ /**
38045
+ * Get the name of the field of the measure
38046
+ */
38047
+ fieldName,
38048
+ /**
38049
+ * Get the aggregator of the measure
38050
+ */
38051
+ aggregator,
38052
+ /**
38053
+ * Get the type of the measure field
38054
+ * e.g. "stage_id" -> "many2one", "create_date:month" -> "date"
38055
+ */
38056
+ type: fieldName === "__count" ? "integer" : field?.type ?? "integer",
38057
+ isValid,
38058
+ isHidden: measure.isHidden,
38059
+ format: measure.format,
38060
+ computedBy: measure.computedBy,
38061
+ display: measure.display
38062
+ };
38063
+ }
38064
+ createPivotDimension(fields, dimension) {
38065
+ const field = fields[dimension.fieldName];
38066
+ const type = field?.type ?? "integer";
38067
+ const granularity = field && isDateOrDatetimeField(field) ? dimension.granularity : void 0;
38068
+ return {
38069
+ /**
38070
+ * Get the display name of the dimension
38071
+ * e.g. "stage_id" -> "Stage", "create_date:month" -> "Create Date"
38072
+ */
38073
+ displayName: field?.string ?? dimension.fieldName,
38074
+ /**
38075
+ * Get the name of the dimension, as it is stored in the pivot formula
38076
+ * e.g. "stage_id", "create_date:month"
38077
+ */
38078
+ nameWithGranularity: dimension.fieldName + (granularity ? `:${granularity}` : ""),
38079
+ /**
38080
+ * Get the name of the field of the dimension
38081
+ * e.g. "stage_id" -> "stage_id", "create_date:month" -> "create_date"
38082
+ */
38083
+ fieldName: dimension.fieldName,
38084
+ /**
38085
+ * Get the aggregate operator of the dimension
38086
+ * e.g. "stage_id" -> undefined, "create_date:month" -> "month"
38087
+ */
38088
+ granularity,
38089
+ /**
38090
+ * Get the type of the field of the dimension
38091
+ * e.g. "stage_id" -> "many2one", "create_date:month" -> "date"
38092
+ */
38093
+ type: field?.isCustomField ? "custom" : type,
38094
+ order: dimension.order,
38095
+ isValid: !!field,
38096
+ isCustomField: !!field?.isCustomField,
38097
+ customGroups: field?.customGroups,
38098
+ parentField: field?.parentField
38099
+ };
38100
+ }
38101
+ createPivotFilter(fields, filter) {
38102
+ const field = fields[filter.fieldName];
38103
+ return {
38104
+ ...filter,
38105
+ displayName: field?.name ?? filter.fieldName,
38106
+ isValid: !!field
38107
+ };
38108
+ }
38109
+ };
38110
+
38111
+ //#endregion
38112
+ //#region src/helpers/pivot/spreadsheet_pivot/runtime_definition_spreadsheet_pivot.ts
38113
+ var SpreadsheetPivotRuntimeDefinition = class extends PivotRuntimeDefinition {
38114
+ range;
38115
+ constructor(definition, fields, getters) {
38116
+ super(definition, fields);
38117
+ if (definition.dataSet) {
38118
+ const { sheetId, zone } = definition.dataSet;
38119
+ this.range = getters.getRangeFromZone(sheetId, zone);
38120
+ }
38121
+ }
38122
+ };
38123
+
38274
38124
  //#endregion
38275
38125
  //#region src/types/table.ts
38276
38126
  const filterCriterions = [
@@ -38336,12 +38186,12 @@ const filterDateCriterionOperators = [
38336
38186
  //#region src/components/filters/filter_menu_criterion/filter_menu_criterion.ts
38337
38187
  var FilterMenuCriterion = class extends Component$1 {
38338
38188
  static template = "o-spreadsheet-FilterMenuCriterion";
38339
- static props = {
38340
- criterion: Object,
38341
- onCriterionChanged: Function,
38342
- criterionOperators: Array
38343
- };
38344
38189
  static components = { Select };
38190
+ props = props({
38191
+ criterion: types$1.CriterionFilter(),
38192
+ criterionOperators: types$1.array(types$1.GenericCriterionType()),
38193
+ onCriterionChanged: types$1.function([types$1.CriterionFilter()])
38194
+ });
38345
38195
  state;
38346
38196
  setup() {
38347
38197
  onWillUpdateProps((nextProps) => {
@@ -38374,17 +38224,14 @@ var FilterMenuCriterion = class extends Component$1 {
38374
38224
  var FilterMenuValueItem = class extends Component$1 {
38375
38225
  static template = "o-spreadsheet-FilterMenuValueItem";
38376
38226
  static components = { Checkbox };
38377
- static props = {
38378
- value: String,
38379
- isChecked: Boolean,
38380
- isSelected: Boolean,
38381
- onMouseMove: Function,
38382
- onClick: Function,
38383
- scrolledTo: {
38384
- type: String,
38385
- optional: true
38386
- }
38387
- };
38227
+ props = props({
38228
+ value: types.string(),
38229
+ isChecked: types.boolean(),
38230
+ isSelected: types.boolean(),
38231
+ onMouseMove: types.function([]),
38232
+ onClick: types.function([]),
38233
+ "scrolledTo?": types.or([types.literal("top"), types.literal("bottom")])
38234
+ });
38388
38235
  itemRef = signal(null);
38389
38236
  setup() {
38390
38237
  onWillPatch(() => {
@@ -38402,11 +38249,15 @@ var FilterMenuValueItem = class extends Component$1 {
38402
38249
  //#region src/components/filters/filter_menu_value_list/filter_menu_value_list.ts
38403
38250
  var FilterMenuValueList = class extends Component$1 {
38404
38251
  static template = "o-spreadsheet-FilterMenuValueList";
38405
- static props = {
38406
- values: Object,
38407
- onUpdateHiddenValues: Function
38408
- };
38409
38252
  static components = { FilterMenuValueItem };
38253
+ props = props({
38254
+ values: types$1.array(types$1.object({
38255
+ checked: types$1.boolean(),
38256
+ string: types$1.string(),
38257
+ "scrolledTo?": types$1.or([types$1.literal("top"), types$1.literal("bottom")])
38258
+ })),
38259
+ onUpdateHiddenValues: types$1.function([types$1.array(types$1.string())])
38260
+ });
38410
38261
  state = proxy({
38411
38262
  displayedValues: [],
38412
38263
  textFilter: "",
@@ -38507,17 +38358,6 @@ var FilterMenuValueList = class extends Component$1 {
38507
38358
  //#region src/components/filters/pivot_filter_menu/pivot_filter_menu.ts
38508
38359
  var PivotFilterMenu = class extends Component$1 {
38509
38360
  static template = "o-spreadsheet-PivotFilterMenu";
38510
- static props = {
38511
- pivotId: String,
38512
- definition: Object,
38513
- filter: Object,
38514
- values: Object,
38515
- onClosed: {
38516
- type: Function,
38517
- optional: true
38518
- },
38519
- onConfirmed: Function
38520
- };
38521
38361
  static components = {
38522
38362
  FilterMenuValueList,
38523
38363
  SidePanelCollapsible,
@@ -38525,6 +38365,18 @@ var PivotFilterMenu = class extends Component$1 {
38525
38365
  };
38526
38366
  criterionCategory = "char";
38527
38367
  updatedCriterionValue;
38368
+ props = props({
38369
+ pivotId: types$1.UID(),
38370
+ definition: types$1.instanceOf(SpreadsheetPivotRuntimeDefinition),
38371
+ filter: types$1.PivotFilter(),
38372
+ values: types$1.array(types$1.object({
38373
+ checked: types$1.boolean(),
38374
+ string: types$1.string(),
38375
+ "scrolledTo?": types$1.or([types$1.literal("top"), types$1.literal("bottom")])
38376
+ })),
38377
+ "onClosed?": types$1.function([]),
38378
+ onConfirmed: types$1.function([types$1.DataFilterValue()])
38379
+ });
38528
38380
  setup() {
38529
38381
  onWillUpdateProps((nextProps) => {
38530
38382
  if (!deepEquals(nextProps.definition, this.props.definition)) {
@@ -38576,21 +38428,29 @@ var PivotFilterMenu = class extends Component$1 {
38576
38428
  //#region src/components/side_panel/pivot/pivot_layout_configurator/pivot_dimension/pivot_dimension.ts
38577
38429
  var PivotDimension = class extends Component$1 {
38578
38430
  static template = "o-spreadsheet-PivotDimension";
38579
- static props = {
38580
- dimension: Object,
38581
- onRemoved: {
38582
- type: Function,
38583
- optional: true
38584
- },
38585
- onNameUpdated: {
38586
- type: Function,
38587
- optional: true
38588
- },
38589
- slots: {
38590
- type: Object,
38591
- optional: true
38592
- }
38593
- };
38431
+ props = props({
38432
+ dimension: types$1.or([
38433
+ types$1.PivotDimension(),
38434
+ types$1.PivotMeasure(),
38435
+ types$1.PivotFilter()
38436
+ ]),
38437
+ "onRemoved?": types$1.function([types$1.or([
38438
+ types$1.PivotDimension(),
38439
+ types$1.PivotMeasure(),
38440
+ types$1.PivotFilter()
38441
+ ])]),
38442
+ "onNameUpdated?": types$1.function([types$1.or([
38443
+ types$1.PivotDimension(),
38444
+ types$1.PivotMeasure(),
38445
+ types$1.PivotFilter()
38446
+ ]), types$1.string()]),
38447
+ "type?": types$1.or([
38448
+ types$1.literal("row"),
38449
+ types$1.literal("col"),
38450
+ types$1.literal("measure"),
38451
+ types$1.literal("filter")
38452
+ ])
38453
+ });
38594
38454
  static components = {
38595
38455
  CogWheelMenu,
38596
38456
  TextInput
@@ -38613,12 +38473,12 @@ var PivotFilterEditor = class extends Component$1 {
38613
38473
  Popover,
38614
38474
  PivotFilterMenu
38615
38475
  };
38616
- static props = {
38617
- pivotId: String,
38618
- definition: Object,
38619
- filter: Object,
38620
- onFiltersUpdated: Function
38621
- };
38476
+ props = props({
38477
+ pivotId: types$1.UID(),
38478
+ definition: types$1.instanceOf(SpreadsheetPivotRuntimeDefinition),
38479
+ filter: types$1.PivotFilter(),
38480
+ onFiltersUpdated: types$1.function([types$1.SpreadsheetPivotCoreDefinition()])
38481
+ });
38622
38482
  state;
38623
38483
  buttonFilter = signal(null);
38624
38484
  popover;
@@ -38745,14 +38605,10 @@ var AddDimensionButton = class extends Component$1 {
38745
38605
  Popover,
38746
38606
  TextValueProvider
38747
38607
  };
38748
- static props = {
38749
- onFieldPicked: Function,
38750
- fields: Array,
38751
- slots: {
38752
- type: Object,
38753
- optional: true
38754
- }
38755
- };
38608
+ props = props({
38609
+ onFieldPicked: types$1.function([types$1.string()]),
38610
+ fields: types$1.array()
38611
+ });
38756
38612
  buttonRef = signal(null);
38757
38613
  popover = proxy({ isOpen: false });
38758
38614
  search = proxy({ input: "" });
@@ -38844,11 +38700,11 @@ var AddDimensionButton = class extends Component$1 {
38844
38700
  //#region src/components/side_panel/pivot/pivot_custom_groups_collapsible/pivot_custom_groups_collapsible.ts
38845
38701
  var PivotCustomGroupsCollapsible = class extends Component$1 {
38846
38702
  static template = "o-spreadsheet-PivotCustomGroupsCollapsible";
38847
- static props = {
38848
- pivotId: String,
38849
- customField: Object,
38850
- onCustomFieldUpdated: Function
38851
- };
38703
+ props = props({
38704
+ pivotId: types$1.UID(),
38705
+ customField: types$1.PivotCustomGroupedField(),
38706
+ onCustomFieldUpdated: types$1.function([types$1.object({})])
38707
+ });
38852
38708
  static components = {
38853
38709
  SidePanelCollapsible,
38854
38710
  TextInput,
@@ -38908,12 +38764,12 @@ var PivotCustomGroupsCollapsible = class extends Component$1 {
38908
38764
  //#region src/components/side_panel/pivot/pivot_layout_configurator/pivot_dimension_granularity/pivot_dimension_granularity.ts
38909
38765
  var PivotDimensionGranularity = class extends Component$1 {
38910
38766
  static template = "o-spreadsheet-PivotDimensionGranularity";
38911
- static props = {
38912
- dimension: Object,
38913
- onUpdated: Function,
38914
- availableGranularities: Set,
38915
- allGranularities: Array
38916
- };
38767
+ props = props({
38768
+ dimension: types$1.PivotDimension(),
38769
+ onUpdated: types$1.function([types$1.PivotDimension(), types$1.instanceOf(InputEvent)]),
38770
+ availableGranularities: types$1.SetOf(),
38771
+ allGranularities: types$1.array()
38772
+ });
38917
38773
  static components = { Select };
38918
38774
  periods = ALL_PERIODS;
38919
38775
  get granularityOptions() {
@@ -38929,10 +38785,11 @@ var PivotDimensionGranularity = class extends Component$1 {
38929
38785
  //#region src/components/side_panel/pivot/pivot_layout_configurator/pivot_dimension_order/pivot_dimension_order.ts
38930
38786
  var PivotDimensionOrder = class extends Component$1 {
38931
38787
  static template = "o-spreadsheet-PivotDimensionOrder";
38932
- static props = {
38933
- dimension: Object,
38934
- onUpdated: Function
38935
- };
38788
+ props = props({
38789
+ dimension: types$1.PivotDimension(),
38790
+ onUpdated: types$1.function([types$1.PivotDimension(), types$1.instanceOf(InputEvent)]),
38791
+ "isMeasureSorted?": types$1.boolean()
38792
+ });
38936
38793
  static components = { Select };
38937
38794
  get orderSelectOptions() {
38938
38795
  const options = [{
@@ -38942,12 +38799,20 @@ var PivotDimensionOrder = class extends Component$1 {
38942
38799
  value: "desc",
38943
38800
  label: _t("Descending")
38944
38801
  }];
38802
+ if (this.props.isMeasureSorted) options.unshift({
38803
+ value: "measures",
38804
+ label: _t("Sorted by measure")
38805
+ });
38945
38806
  if (this.props.dimension.type === "date") return options;
38946
38807
  return [{
38947
38808
  value: "",
38948
38809
  label: _t("Unsorted")
38949
38810
  }, ...options];
38950
38811
  }
38812
+ get selectedValue() {
38813
+ if (this.props.isMeasureSorted) return "measures";
38814
+ return this.props.dimension.order || "";
38815
+ }
38951
38816
  };
38952
38817
 
38953
38818
  //#endregion
@@ -39002,15 +38867,15 @@ var PivotMeasureEditor = class extends Component$1 {
39002
38867
  StandaloneComposer,
39003
38868
  Select
39004
38869
  };
39005
- static props = {
39006
- definition: Object,
39007
- measure: Object,
39008
- onMeasureUpdated: Function,
39009
- onRemoved: Function,
39010
- generateMeasureId: Function,
39011
- aggregators: Object,
39012
- pivotId: String
39013
- };
38870
+ props = props({
38871
+ pivotId: types$1.string(),
38872
+ definition: types$1.PivotRuntimeDefinition(),
38873
+ measure: types$1.PivotMeasure(),
38874
+ onMeasureUpdated: types$1.function([types$1.PivotMeasure()]),
38875
+ onRemoved: types$1.function([]),
38876
+ generateMeasureId: types$1.function([types$1.string(), types$1.string()], types$1.string()),
38877
+ aggregators: types$1.object({})
38878
+ });
39014
38879
  getMeasureAutocomplete() {
39015
38880
  return createMeasureAutoComplete(this.props.definition, this.props.measure);
39016
38881
  }
@@ -39090,10 +38955,10 @@ var PivotMeasureEditor = class extends Component$1 {
39090
38955
  var PivotSortSection = class extends Component$1 {
39091
38956
  static template = "o-spreadsheet-PivotSortSection";
39092
38957
  static components = { Section };
39093
- static props = {
39094
- definition: Object,
39095
- pivotId: String
39096
- };
38958
+ props = props({
38959
+ definition: types$1.PivotRuntimeDefinition(),
38960
+ pivotId: types$1.UID()
38961
+ });
39097
38962
  get hasValidSort() {
39098
38963
  const pivot = this.env.model.getters.getPivot(this.props.pivotId);
39099
38964
  return !!this.props.definition.sortedColumn && isSortedColumnValid(this.props.definition.sortedColumn, pivot);
@@ -39145,21 +39010,18 @@ var PivotLayoutConfigurator = class extends Component$1 {
39145
39010
  PivotCustomGroupsCollapsible,
39146
39011
  SidePanelCollapsible
39147
39012
  };
39148
- static props = {
39149
- definition: Object,
39150
- onDimensionsUpdated: Function,
39151
- onFiltersUpdated: Function,
39152
- unusedGroupableFields: Array,
39153
- measureFields: Array,
39154
- unusedGranularities: Object,
39155
- dateGranularities: Array,
39156
- datetimeGranularities: Array,
39157
- getScrollableContainerEl: {
39158
- type: Function,
39159
- optional: true
39160
- },
39161
- pivotId: String
39162
- };
39013
+ props = props({
39014
+ definition: types$1.instanceOf(PivotRuntimeDefinition),
39015
+ onDimensionsUpdated: types$1.function([types$1.PivotCoreDefinition()]),
39016
+ onFiltersUpdated: types$1.function([types$1.PivotCoreDefinition()]),
39017
+ unusedGroupableFields: types$1.array(types$1.PivotField()),
39018
+ measureFields: types$1.array(types$1.PivotField()),
39019
+ unusedGranularities: types$1.RecordOf(),
39020
+ dateGranularities: types$1.array(types$1.string()),
39021
+ datetimeGranularities: types$1.array(types$1.string()),
39022
+ "getScrollableContainerEl?": types$1.function([], types$1.instanceOf(HTMLElement)),
39023
+ pivotId: types$1.UID()
39024
+ });
39163
39025
  dimensionsRef = signal(null);
39164
39026
  dragAndDrop = useDragAndDropListItems();
39165
39027
  AGGREGATORS = AGGREGATORS;
@@ -39321,7 +39183,8 @@ var PivotLayoutConfigurator = class extends Component$1 {
39321
39183
  return this.env.model.getters.getPivotCoreDefinition(this.props.pivotId).customFields?.[dimension.nameWithGranularity];
39322
39184
  }
39323
39185
  updateOrder(updateDimension, order) {
39324
- const { rows, columns } = this.props.definition;
39186
+ const { rows, columns, sortedColumn } = this.props.definition;
39187
+ const isRow = rows.some((row) => row.nameWithGranularity === updateDimension.nameWithGranularity);
39325
39188
  this.props.onDimensionsUpdated({
39326
39189
  rows: rows.map((row) => {
39327
39190
  if (row.nameWithGranularity === updateDimension.nameWithGranularity) return {
@@ -39336,7 +39199,8 @@ var PivotLayoutConfigurator = class extends Component$1 {
39336
39199
  order: order || void 0
39337
39200
  };
39338
39201
  return col;
39339
- })
39202
+ }),
39203
+ sortedColumn: isRow ? void 0 : sortedColumn
39340
39204
  });
39341
39205
  }
39342
39206
  updateGranularity(dimension, granularity) {
@@ -39362,6 +39226,9 @@ var PivotLayoutConfigurator = class extends Component$1 {
39362
39226
  const possibleValues = this.env.model.getters.getPivot(this.props.pivotId).getPossibleFieldValues(dimension);
39363
39227
  return possibleValues.length > 100 ? _t("This dimension contains a lot of values (%s), and might slow down the pivot table.", possibleValues.length) : void 0;
39364
39228
  }
39229
+ get hasSortedColumn() {
39230
+ return !!this.props.definition.sortedColumn;
39231
+ }
39365
39232
  };
39366
39233
 
39367
39234
  //#endregion
@@ -39373,10 +39240,10 @@ var PivotTitleSection = class extends Component$1 {
39373
39240
  Section,
39374
39241
  TextInput
39375
39242
  };
39376
- static props = {
39377
- pivotId: String,
39378
- flipAxis: Function
39379
- };
39243
+ props = props({
39244
+ pivotId: types$1.UID(),
39245
+ flipAxis: types$1.function([])
39246
+ });
39380
39247
  get cogWheelMenuItems() {
39381
39248
  return [
39382
39249
  {
@@ -39442,150 +39309,6 @@ var PivotTitleSection = class extends Component$1 {
39442
39309
  }
39443
39310
  };
39444
39311
 
39445
- //#endregion
39446
- //#region src/helpers/pivot/pivot_runtime_definition.ts
39447
- /**
39448
- * Represent a pivot runtime definition. A pivot runtime definition is a pivot
39449
- * definition that has been enriched to include the display name of its attributes
39450
- * (measures, columns, rows).
39451
- */
39452
- var PivotRuntimeDefinition = class {
39453
- measures;
39454
- columns;
39455
- rows;
39456
- filters;
39457
- sortedColumn;
39458
- collapsedDomains;
39459
- customFields;
39460
- constructor(definition, fields) {
39461
- this.columns = definition.columns.map((dimension) => this.createPivotDimension(fields, dimension));
39462
- this.rows = definition.rows.map((dimension) => this.createPivotDimension(fields, dimension));
39463
- this.measures = definition.measures.map((measure) => this.createMeasure(fields, measure));
39464
- this.filters = (definition.filters ?? []).map((filter) => this.createPivotFilter(fields, filter));
39465
- this.sortedColumn = definition.sortedColumn;
39466
- this.collapsedDomains = definition.collapsedDomains;
39467
- this.customFields = definition.customFields;
39468
- }
39469
- getDimension(nameWithGranularity) {
39470
- const dimension = this.columns.find((d) => d.nameWithGranularity === nameWithGranularity) || this.rows.find((d) => d.nameWithGranularity === nameWithGranularity);
39471
- if (!dimension) throw new EvaluationError(_t("Dimension %s does not exist", nameWithGranularity));
39472
- return dimension;
39473
- }
39474
- getMeasure(id) {
39475
- const measure = this.measures.find((measure) => measure.id === id);
39476
- if (!measure) throw new EvaluationError(_t("Field %s is not a measure", id));
39477
- return measure;
39478
- }
39479
- get invalidAggregatorsForCustomField() {
39480
- return [];
39481
- }
39482
- createMeasure(fields, measure) {
39483
- const fieldName = measure.fieldName;
39484
- const field = fieldName === "__count" ? {
39485
- name: "__count",
39486
- string: _t("Count"),
39487
- type: "integer",
39488
- aggregator: "sum"
39489
- } : fields[fieldName];
39490
- const aggregator = measure.aggregator;
39491
- let isValid = !!(field || measure.computedBy);
39492
- for (const dimension of [...this.rows, ...this.columns]) if (fields[dimension.fieldName]?.isCustomField && this.invalidAggregatorsForCustomField.includes(aggregator)) {
39493
- isValid = false;
39494
- break;
39495
- }
39496
- return {
39497
- /**
39498
- * Get the id of the measure, as it is stored in the pivot formula
39499
- */
39500
- id: measure.id,
39501
- /**
39502
- * Display name of the measure
39503
- * e.g. "__count" -> "Count", "amount_total" -> "Total Amount"
39504
- */
39505
- get displayName() {
39506
- return measure.userDefinedName ?? field?.string ?? measure.fieldName;
39507
- },
39508
- userDefinedName: measure.userDefinedName,
39509
- /**
39510
- * Get the name of the field of the measure
39511
- */
39512
- fieldName,
39513
- /**
39514
- * Get the aggregator of the measure
39515
- */
39516
- aggregator,
39517
- /**
39518
- * Get the type of the measure field
39519
- * e.g. "stage_id" -> "many2one", "create_date:month" -> "date"
39520
- */
39521
- type: fieldName === "__count" ? "integer" : field?.type ?? "integer",
39522
- isValid,
39523
- isHidden: measure.isHidden,
39524
- format: measure.format,
39525
- computedBy: measure.computedBy,
39526
- display: measure.display
39527
- };
39528
- }
39529
- createPivotDimension(fields, dimension) {
39530
- const field = fields[dimension.fieldName];
39531
- const type = field?.type ?? "integer";
39532
- const granularity = field && isDateOrDatetimeField(field) ? dimension.granularity : void 0;
39533
- return {
39534
- /**
39535
- * Get the display name of the dimension
39536
- * e.g. "stage_id" -> "Stage", "create_date:month" -> "Create Date"
39537
- */
39538
- displayName: field?.string ?? dimension.fieldName,
39539
- /**
39540
- * Get the name of the dimension, as it is stored in the pivot formula
39541
- * e.g. "stage_id", "create_date:month"
39542
- */
39543
- nameWithGranularity: dimension.fieldName + (granularity ? `:${granularity}` : ""),
39544
- /**
39545
- * Get the name of the field of the dimension
39546
- * e.g. "stage_id" -> "stage_id", "create_date:month" -> "create_date"
39547
- */
39548
- fieldName: dimension.fieldName,
39549
- /**
39550
- * Get the aggregate operator of the dimension
39551
- * e.g. "stage_id" -> undefined, "create_date:month" -> "month"
39552
- */
39553
- granularity,
39554
- /**
39555
- * Get the type of the field of the dimension
39556
- * e.g. "stage_id" -> "many2one", "create_date:month" -> "date"
39557
- */
39558
- type: field?.isCustomField ? "custom" : type,
39559
- order: dimension.order,
39560
- isValid: !!field,
39561
- isCustomField: !!field?.isCustomField,
39562
- customGroups: field?.customGroups,
39563
- parentField: field?.parentField
39564
- };
39565
- }
39566
- createPivotFilter(fields, filter) {
39567
- const field = fields[filter.fieldName];
39568
- return {
39569
- ...filter,
39570
- displayName: field?.name ?? filter.fieldName,
39571
- isValid: !!field
39572
- };
39573
- }
39574
- };
39575
-
39576
- //#endregion
39577
- //#region src/helpers/pivot/spreadsheet_pivot/runtime_definition_spreadsheet_pivot.ts
39578
- var SpreadsheetPivotRuntimeDefinition = class extends PivotRuntimeDefinition {
39579
- range;
39580
- constructor(definition, fields, getters) {
39581
- super(definition, fields);
39582
- if (definition.dataSet) {
39583
- const { sheetId, zone } = definition.dataSet;
39584
- this.range = getters.getRangeFromZone(sheetId, zone);
39585
- }
39586
- }
39587
- };
39588
-
39589
39312
  //#endregion
39590
39313
  //#region src/helpers/filter_helpers.ts
39591
39314
  /**
@@ -41137,10 +40860,6 @@ var PivotSidePanelStore = class extends SpreadsheetStore {
41137
40860
  //#region src/components/side_panel/pivot/pivot_side_panel/pivot_spreadsheet_side_panel/pivot_spreadsheet_side_panel.ts
41138
40861
  var PivotSpreadsheetSidePanel = class extends Component$1 {
41139
40862
  static template = "o-spreadsheet-PivotSpreadsheetSidePanel";
41140
- static props = {
41141
- pivotId: String,
41142
- onCloseSidePanel: Function
41143
- };
41144
40863
  static components = {
41145
40864
  PivotLayoutConfigurator,
41146
40865
  Section,
@@ -41151,6 +40870,10 @@ var PivotSpreadsheetSidePanel = class extends Component$1 {
41151
40870
  AddDimensionButton,
41152
40871
  PivotFilterEditor
41153
40872
  };
40873
+ props = props({
40874
+ pivotId: types$1.UID(),
40875
+ onCloseSidePanel: types$1.function([])
40876
+ });
41154
40877
  store;
41155
40878
  state;
41156
40879
  pivotSidePanelRef = signal(null);
@@ -42385,23 +42108,14 @@ function drawTexts(ctx, tableStyle, params) {
42385
42108
  var TableStylePreview = class extends Component$1 {
42386
42109
  static template = "o-spreadsheet-TableStylePreview";
42387
42110
  static components = { MenuPopover };
42388
- static props = {
42389
- tableConfig: Object,
42390
- tableStyle: Object,
42391
- type: String,
42392
- styleId: {
42393
- type: String,
42394
- optional: true
42395
- },
42396
- selected: {
42397
- type: Boolean,
42398
- optional: true
42399
- },
42400
- onClick: {
42401
- type: Function,
42402
- optional: true
42403
- }
42404
- };
42111
+ props = props({
42112
+ tableConfig: types$1.TableConfig(),
42113
+ tableStyle: types$1.TableStyle(),
42114
+ type: types$1.or([types$1.literal("table"), types$1.literal("pivot")]),
42115
+ "styleId?": types$1.string(),
42116
+ "selected?": types$1.boolean(),
42117
+ "onClick?": types$1.function([])
42118
+ });
42405
42119
  canvasRef = signal(null);
42406
42120
  menu = proxy({
42407
42121
  isOpen: false,
@@ -42487,21 +42201,15 @@ var TableStylesPopover = class extends Component$1 {
42487
42201
  Popover,
42488
42202
  TableStylePreview
42489
42203
  };
42490
- static props = {
42491
- tableConfig: Object,
42492
- popoverProps: {
42493
- type: Object,
42494
- optional: true
42495
- },
42496
- closePopover: Function,
42497
- onStylePicked: Function,
42498
- selectedStyleId: {
42499
- type: String,
42500
- optional: true
42501
- },
42502
- tableStyles: Object,
42503
- type: String
42504
- };
42204
+ props = props({
42205
+ tableConfig: types$1.object({}),
42206
+ "popoverProps?": types$1.object({}),
42207
+ closePopover: types$1.function([]),
42208
+ onStylePicked: types$1.function([types$1.string()]),
42209
+ "selectedStyleId?": types$1.string(),
42210
+ tableStyles: types$1.RecordOf(),
42211
+ type: types$1.or([types$1.literal("table"), types$1.literal("pivot")])
42212
+ });
42505
42213
  tableStyleListRef = signal(null);
42506
42214
  state = proxy({ selectedCategory: this.initialSelectedCategory });
42507
42215
  setup() {
@@ -42541,12 +42249,12 @@ var TableStylePicker = class extends Component$1 {
42541
42249
  TableStylesPopover,
42542
42250
  TableStylePreview
42543
42251
  };
42544
- static props = {
42545
- tableConfig: Object,
42546
- onStylePicked: Function,
42547
- tableStyles: Object,
42548
- type: String
42549
- };
42252
+ props = props({
42253
+ tableConfig: types$1.TableConfig(),
42254
+ onStylePicked: types$1.function([types$1.string()]),
42255
+ tableStyles: types$1.RecordOf(),
42256
+ type: types$1.or([types$1.literal("table"), types$1.literal("pivot")])
42257
+ });
42550
42258
  state = proxy({ popoverProps: void 0 });
42551
42259
  getDisplayedTableStyles() {
42552
42260
  const allStyles = this.props.tableStyles;
@@ -42587,13 +42295,13 @@ var TableStylePicker = class extends Component$1 {
42587
42295
  //#region src/components/side_panel/pivot/pivot_side_panel/pivot_design_panel/pivot_design_panel.ts
42588
42296
  var PivotDesignPanel = class extends Component$1 {
42589
42297
  static template = "o-spreadsheet-PivotDesignPanel";
42590
- static props = { pivotId: String };
42591
42298
  static components = {
42592
42299
  Section,
42593
42300
  Checkbox,
42594
42301
  NumberInput,
42595
42302
  TableStylePicker
42596
42303
  };
42304
+ props = props({ pivotId: types$1.UID() });
42597
42305
  store;
42598
42306
  setup() {
42599
42307
  this.store = useLocalStore(PivotSidePanelStore, this.props.pivotId, "neverDefer");
@@ -42642,20 +42350,16 @@ var PivotDesignPanel = class extends Component$1 {
42642
42350
  //#region src/components/side_panel/pivot/pivot_side_panel/pivot_side_panel.ts
42643
42351
  var PivotSidePanel = class extends Component$1 {
42644
42352
  static template = "o-spreadsheet-PivotSidePanel";
42645
- static props = {
42646
- pivotId: String,
42647
- onCloseSidePanel: Function,
42648
- openTab: {
42649
- type: String,
42650
- optional: true
42651
- }
42652
- };
42653
- static defaultProps = { openTab: "configuration" };
42654
42353
  static components = {
42655
42354
  PivotLayoutConfigurator,
42656
42355
  Section,
42657
42356
  PivotDesignPanel
42658
42357
  };
42358
+ props = props({
42359
+ pivotId: types$1.UID(),
42360
+ onCloseSidePanel: types$1.function([]),
42361
+ "openTab?": types$1.or([types$1.literal("configuration"), types$1.literal("design")])
42362
+ }, { openTab: "configuration" });
42659
42363
  state = proxy({ panel: this.props.openTab || "configuration" });
42660
42364
  setup() {
42661
42365
  useHighlights(this);
@@ -42685,7 +42389,7 @@ var RemoveDuplicatesPanel = class extends Component$1 {
42685
42389
  Section,
42686
42390
  Checkbox
42687
42391
  };
42688
- static props = { onCloseSidePanel: Function };
42392
+ props = props({ onCloseSidePanel: types$1.function([]) });
42689
42393
  state = proxy({
42690
42394
  hasHeader: false,
42691
42395
  columns: {}
@@ -42769,7 +42473,7 @@ var SettingsPanel = class extends Component$1 {
42769
42473
  BadgeSelection,
42770
42474
  Select
42771
42475
  };
42772
- static props = { onCloseSidePanel: Function };
42476
+ props = props({ onCloseSidePanel: types$1.function([]) });
42773
42477
  loadedLocales = [];
42774
42478
  setup() {
42775
42479
  onWillStart(() => this.loadLocales());
@@ -42887,7 +42591,7 @@ var SplitIntoColumnsPanel = class extends Component$1 {
42887
42591
  Checkbox,
42888
42592
  Select
42889
42593
  };
42890
- static props = { onCloseSidePanel: Function };
42594
+ props = props({ onCloseSidePanel: types$1.function([]) });
42891
42595
  state = proxy({
42892
42596
  separatorValue: "auto",
42893
42597
  addNewColumns: false,
@@ -42963,10 +42667,10 @@ var TablePanel = class extends Component$1 {
42963
42667
  Section,
42964
42668
  NumberInput
42965
42669
  };
42966
- static props = {
42967
- onCloseSidePanel: Function,
42968
- table: Object
42969
- };
42670
+ props = props({
42671
+ onCloseSidePanel: types$1.function([]),
42672
+ table: types$1.CoreTable()
42673
+ });
42970
42674
  state;
42971
42675
  setup() {
42972
42676
  const sheetId = this.env.model.getters.getActiveSheetId();
@@ -43123,17 +42827,11 @@ var TableStyleEditorPanel = class extends Component$1 {
43123
42827
  RoundColorPicker,
43124
42828
  TableStylePreview
43125
42829
  };
43126
- static props = {
43127
- onCloseSidePanel: Function,
43128
- onStylePicked: {
43129
- type: Function,
43130
- optional: true
43131
- },
43132
- styleId: {
43133
- type: String,
43134
- optional: true
43135
- }
43136
- };
42830
+ props = props({
42831
+ onCloseSidePanel: types$1.function([]),
42832
+ "onStylePicked?": types$1.function([types$1.string()]),
42833
+ "styleId?": types$1.string()
42834
+ });
43137
42835
  state = proxy(this.getInitialState());
43138
42836
  setup() {
43139
42837
  useExternalListener$1(window, "click", () => this.state.pickerOpened = false);
@@ -45463,10 +45161,10 @@ function adjustIndexWithinBounds(index, position, max) {
45463
45161
  //#region src/components/autofill/autofill.ts
45464
45162
  var Autofill = class extends Component$1 {
45465
45163
  static template = "o-spreadsheet-Autofill";
45466
- static props = {
45467
- position: Object,
45468
- isVisible: Boolean
45469
- };
45164
+ props = props({
45165
+ position: types$1.DOMCoordinates(),
45166
+ isVisible: types$1.boolean()
45167
+ });
45470
45168
  state = proxy({
45471
45169
  position: {
45472
45170
  x: 0,
@@ -45541,7 +45239,7 @@ var Autofill = class extends Component$1 {
45541
45239
  }
45542
45240
  };
45543
45241
  var TooltipComponent = class extends Component$1 {
45544
- static props = { content: String };
45242
+ props = props({ content: types$1.string() });
45545
45243
  static template = xml`
45546
45244
  <div t-out="this.props.content"/>
45547
45245
  `;
@@ -45551,13 +45249,13 @@ var TooltipComponent = class extends Component$1 {
45551
45249
  //#region src/components/collaborative_client_tag/collaborative_client_tag.ts
45552
45250
  var ClientTag = class extends Component$1 {
45553
45251
  static template = "o-spreadsheet-ClientTag";
45554
- static props = {
45555
- active: Boolean,
45556
- name: String,
45557
- color: String,
45558
- col: Number,
45559
- row: Number
45560
- };
45252
+ props = props({
45253
+ active: types$1.boolean(),
45254
+ name: types$1.string(),
45255
+ color: types$1.Color(),
45256
+ col: types$1.HeaderIndex(),
45257
+ row: types$1.HeaderIndex()
45258
+ });
45561
45259
  get tagStyle() {
45562
45260
  const { col, row, color } = this.props;
45563
45261
  const { height } = this.env.model.getters.getSheetViewDimensionWithHeaders();
@@ -46131,11 +45829,11 @@ const GRID_CELL_REFERENCE_TOP_OFFSET = 28;
46131
45829
  */
46132
45830
  var GridComposer = class extends Component$1 {
46133
45831
  static template = "o-spreadsheet-GridComposer";
46134
- static props = {
46135
- gridDims: Object,
46136
- onInputContextMenu: Function
46137
- };
46138
45832
  static components = { Composer };
45833
+ props = props({
45834
+ gridDims: types$1.DOMDimension(),
45835
+ onInputContextMenu: types$1.function([types$1.instanceOf(MouseEvent)])
45836
+ });
46139
45837
  rect = this.defaultRect;
46140
45838
  isEditing = false;
46141
45839
  isCellReferenceVisible = false;
@@ -46595,7 +46293,6 @@ function getAxis(getters, figureUI, dnd, axisType) {
46595
46293
  */
46596
46294
  var FiguresContainer = class extends Component$1 {
46597
46295
  static template = "o-spreadsheet-FiguresContainer";
46598
- static props = {};
46599
46296
  static components = { FigureComponent };
46600
46297
  dnd = proxy({
46601
46298
  draggedFigure: void 0,
@@ -46946,7 +46643,6 @@ var FiguresContainer = class extends Component$1 {
46946
46643
  //#region src/components/grid_add_rows_footer/grid_add_rows_footer.ts
46947
46644
  var GridAddRowsFooter = class extends Component$1 {
46948
46645
  static template = "o-spreadsheet-GridAddRowsFooter";
46949
- static props = {};
46950
46646
  static components = { ValidationMessages };
46951
46647
  DOMFocusableElementStore;
46952
46648
  inputRef = signal(null);
@@ -47254,40 +46950,32 @@ function useCellHovered(env, gridRef) {
47254
46950
  }
47255
46951
  var GridOverlay = class extends Component$1 {
47256
46952
  static template = "o-spreadsheet-GridOverlay";
47257
- static props = {
47258
- onCellDoubleClicked: {
47259
- type: Function,
47260
- optional: true
47261
- },
47262
- onCellClicked: {
47263
- type: Function,
47264
- optional: true
47265
- },
47266
- onCellRightClicked: {
47267
- type: Function,
47268
- optional: true
47269
- },
47270
- onGridResized: {
47271
- type: Function,
47272
- optional: true
47273
- },
47274
- onGridMoved: Function,
47275
- gridOverlayDimensions: String,
47276
- slots: {
47277
- type: Object,
47278
- optional: true
47279
- }
47280
- };
47281
46953
  static components = {
47282
46954
  FiguresContainer,
47283
46955
  GridAddRowsFooter
47284
46956
  };
47285
- static defaultProps = {
46957
+ props = props({
46958
+ "onCellDoubleClicked?": types$1.function([types$1.HeaderIndex(), types$1.HeaderIndex()]),
46959
+ "onCellClicked?": types$1.function([
46960
+ types$1.HeaderIndex(),
46961
+ types$1.HeaderIndex(),
46962
+ types$1.GridClickModifiers(),
46963
+ types$1.ZoomedMouseEvent()
46964
+ ]),
46965
+ "onCellRightClicked?": types$1.function([
46966
+ types$1.HeaderIndex(),
46967
+ types$1.HeaderIndex(),
46968
+ types$1.DOMCoordinates()
46969
+ ]),
46970
+ "onGridResized?": types$1.function([]),
46971
+ onGridMoved: types$1.function([types$1.Pixel(), types$1.Pixel()]),
46972
+ gridOverlayDimensions: types$1.string()
46973
+ }, {
47286
46974
  onCellDoubleClicked: () => {},
47287
46975
  onCellClicked: () => {},
47288
46976
  onCellRightClicked: () => {},
47289
46977
  onGridResized: () => {}
47290
- };
46978
+ });
47291
46979
  gridOverlayRef = signal(null);
47292
46980
  cellPopovers;
47293
46981
  paintFormatStore;
@@ -47397,12 +47085,12 @@ var GridOverlay = class extends Component$1 {
47397
47085
  //#region src/components/grid_popover/grid_popover.ts
47398
47086
  var GridPopover = class extends Component$1 {
47399
47087
  static template = "o-spreadsheet-GridPopover";
47400
- static props = {
47401
- onClosePopover: Function,
47402
- onMouseWheel: Function,
47403
- gridRect: Object
47404
- };
47405
47088
  static components = { Popover };
47089
+ props = props({
47090
+ onClosePopover: types$1.function([]),
47091
+ onMouseWheel: types$1.function([types$1.instanceOf(WheelEvent)]),
47092
+ gridRect: types$1.Rect()
47093
+ });
47406
47094
  cellPopovers;
47407
47095
  setup() {
47408
47096
  this.cellPopovers = useStore(CellPopoverStore);
@@ -47426,15 +47114,14 @@ var GridPopover = class extends Component$1 {
47426
47114
  //#region src/components/headers_overlay/unhide_headers.ts
47427
47115
  var UnhideRowHeaders = class extends Component$1 {
47428
47116
  static template = "o-spreadsheet-UnhideRowHeaders";
47429
- static props = {
47430
- headersGroups: Array,
47431
- headerRange: Object,
47432
- offset: {
47433
- type: Number,
47434
- optional: true
47435
- }
47436
- };
47437
- static defaultProps = { offset: 0 };
47117
+ props = props({
47118
+ headersGroups: types$1.array(),
47119
+ headerRange: types$1.object({
47120
+ start: types$1.HeaderIndex(),
47121
+ end: types$1.HeaderIndex()
47122
+ }),
47123
+ "offset?": types$1.number()
47124
+ }, { offset: 0 });
47438
47125
  get sheetId() {
47439
47126
  return this.env.model.getters.getActiveSheetId();
47440
47127
  }
@@ -47470,15 +47157,14 @@ var UnhideRowHeaders = class extends Component$1 {
47470
47157
  };
47471
47158
  var UnhideColumnHeaders = class extends Component$1 {
47472
47159
  static template = "o-spreadsheet-UnhideColumnHeaders";
47473
- static props = {
47474
- headersGroups: Array,
47475
- headerRange: Object,
47476
- offset: {
47477
- type: Number,
47478
- optional: true
47479
- }
47480
- };
47481
- static defaultProps = { offset: 0 };
47160
+ props = props({
47161
+ headersGroups: types$1.array(),
47162
+ headerRange: types$1.object({
47163
+ start: types$1.HeaderIndex(),
47164
+ end: types$1.HeaderIndex()
47165
+ }),
47166
+ "offset?": types$1.number()
47167
+ }, { offset: 0 });
47482
47168
  get sheetId() {
47483
47169
  return this.env.model.getters.getActiveSheetId();
47484
47170
  }
@@ -47509,8 +47195,13 @@ var UnhideColumnHeaders = class extends Component$1 {
47509
47195
 
47510
47196
  //#endregion
47511
47197
  //#region src/components/headers_overlay/headers_overlay.ts
47198
+ const resizerPropsDefinition = { onOpenContextMenu: types$1.function([
47199
+ types$1.ContextMenuType(),
47200
+ types$1.Pixel(),
47201
+ types$1.Pixel()
47202
+ ]) };
47512
47203
  var AbstractResizer = class extends Component$1 {
47513
- static props = { onOpenContextMenu: Function };
47204
+ props = props(resizerPropsDefinition);
47514
47205
  composerFocusStore;
47515
47206
  PADDING = 0;
47516
47207
  MAX_SIZE_MARGIN = 0;
@@ -47708,7 +47399,6 @@ var AbstractResizer = class extends Component$1 {
47708
47399
  }
47709
47400
  };
47710
47401
  var ColResizer = class extends AbstractResizer {
47711
- static props = { onOpenContextMenu: Function };
47712
47402
  static template = "o-spreadsheet-ColResizer";
47713
47403
  static components = { UnhideColumnHeaders };
47714
47404
  colResizerRef = signal(null);
@@ -47843,7 +47533,6 @@ var ColResizer = class extends AbstractResizer {
47843
47533
  }
47844
47534
  };
47845
47535
  var RowResizer = class extends AbstractResizer {
47846
- static props = { onOpenContextMenu: Function };
47847
47536
  static template = "o-spreadsheet-RowResizer";
47848
47537
  static components = { UnhideRowHeaders };
47849
47538
  rowResizerRef = signal(null);
@@ -47974,8 +47663,8 @@ var RowResizer = class extends AbstractResizer {
47974
47663
  }
47975
47664
  };
47976
47665
  var HeadersOverlay = class extends Component$1 {
47977
- static props = { onOpenContextMenu: Function };
47978
47666
  static template = "o-spreadsheet-HeadersOverlay";
47667
+ props = props(resizerPropsDefinition);
47979
47668
  static components = {
47980
47669
  ColResizer,
47981
47670
  RowResizer
@@ -48963,12 +48652,17 @@ function useWheelHandler(handler) {
48963
48652
  //#region src/components/highlight/border/border.ts
48964
48653
  var Border = class extends Component$1 {
48965
48654
  static template = "o-spreadsheet-Border";
48966
- static props = {
48967
- zone: Object,
48968
- orientation: String,
48969
- isMoving: Boolean,
48970
- onMoveHighlight: Function
48971
- };
48655
+ props = props({
48656
+ zone: types$1.Zone(),
48657
+ orientation: types$1.or([
48658
+ types$1.literal("n"),
48659
+ types$1.literal("s"),
48660
+ types$1.literal("w"),
48661
+ types$1.literal("e")
48662
+ ]),
48663
+ isMoving: types$1.boolean(),
48664
+ onMoveHighlight: types$1.function([types$1.instanceOf(PointerEvent)])
48665
+ });
48972
48666
  get style() {
48973
48667
  const isTop = [
48974
48668
  "n",
@@ -49011,13 +48705,26 @@ var Border = class extends Component$1 {
49011
48705
  const MOBILE_HANDLER_WIDTH = 40;
49012
48706
  var Corner = class extends Component$1 {
49013
48707
  static template = "o-spreadsheet-Corner";
49014
- static props = {
49015
- zone: Object,
49016
- color: String,
49017
- orientation: String,
49018
- isResizing: Boolean,
49019
- onResizeHighlight: Function
49020
- };
48708
+ props = props({
48709
+ zone: types$1.Zone(),
48710
+ color: types$1.Color(),
48711
+ orientation: types$1.or([
48712
+ types$1.literal("nw"),
48713
+ types$1.literal("ne"),
48714
+ types$1.literal("sw"),
48715
+ types$1.literal("se"),
48716
+ types$1.literal("n"),
48717
+ types$1.literal("s"),
48718
+ types$1.literal("e"),
48719
+ types$1.literal("w")
48720
+ ]),
48721
+ isResizing: types$1.boolean(),
48722
+ onResizeHighlight: types$1.function([
48723
+ types$1.instanceOf(PointerEvent),
48724
+ types$1.ResizeDirection(),
48725
+ types$1.ResizeDirection()
48726
+ ])
48727
+ });
49021
48728
  dirX;
49022
48729
  dirY;
49023
48730
  setup() {
@@ -49072,14 +48779,14 @@ function orientationToDir(or) {
49072
48779
  //#region src/components/highlight/highlight/highlight.ts
49073
48780
  var Highlight = class extends Component$1 {
49074
48781
  static template = "o-spreadsheet-Highlight";
49075
- static props = {
49076
- range: Object,
49077
- color: String
49078
- };
49079
48782
  static components = {
49080
48783
  Corner,
49081
48784
  Border
49082
48785
  };
48786
+ props = props({
48787
+ range: types$1.Range(),
48788
+ color: types$1.Color()
48789
+ });
49083
48790
  highlightState = proxy({ shiftingMode: "none" });
49084
48791
  dragNDropGrid = useDragAndDropBeyondTheViewport(this.env);
49085
48792
  get cornerOrientations() {
@@ -49220,20 +48927,20 @@ var ScrollBar = class extends Component$1 {
49220
48927
  <div t-att-style="this.sizeCss"/>
49221
48928
  </div>
49222
48929
  `;
48930
+ props = props({
48931
+ "width?": types$1.Pixel(),
48932
+ "height?": types$1.Pixel(),
48933
+ direction: types$1.customValidator(types$1.string(), (direction) => ["horizontal", "vertical"].includes(direction)),
48934
+ position: types$1.CSSProperties(),
48935
+ offset: types$1.Pixel(),
48936
+ onScroll: types$1.function([types$1.Pixel()])
48937
+ }, {
48938
+ width: 1,
48939
+ height: 1
48940
+ });
49223
48941
  scrollbarRef = signal(null);
49224
48942
  scrollbar;
49225
48943
  setup() {
49226
- this.props = props({
49227
- "width?": types.number(),
49228
- "height?": types.number(),
49229
- direction: types.customValidator(types.string(), (direction) => ["horizontal", "vertical"].includes(direction)),
49230
- position: types.object({}),
49231
- offset: types.number(),
49232
- onScroll: types.function()
49233
- }, {
49234
- width: 1,
49235
- height: 1
49236
- });
49237
48944
  this.scrollbar = new ScrollBar$1(this.scrollbarRef(), this.props.direction);
49238
48945
  onMounted(() => {
49239
48946
  this.scrollbar.el = this.scrollbarRef();
@@ -49259,10 +48966,6 @@ var ScrollBar = class extends Component$1 {
49259
48966
  //#endregion
49260
48967
  //#region src/components/scrollbar/scrollbar_horizontal.ts
49261
48968
  var HorizontalScrollBar = class extends Component$1 {
49262
- static props = { leftOffset: {
49263
- type: Number,
49264
- optional: true
49265
- } };
49266
48969
  static components = { ScrollBar };
49267
48970
  static template = xml`
49268
48971
  <ScrollBar
@@ -49273,7 +48976,7 @@ var HorizontalScrollBar = class extends Component$1 {
49273
48976
  direction="'horizontal'"
49274
48977
  onScroll.bind="this.onScroll"
49275
48978
  />`;
49276
- static defaultProps = { leftOffset: 0 };
48979
+ props = props({ "leftOffset?": types$1.number() }, { leftOffset: 0 });
49277
48980
  get offset() {
49278
48981
  return this.env.model.getters.getActiveSheetScrollInfo().scrollX;
49279
48982
  }
@@ -49306,10 +49009,6 @@ var HorizontalScrollBar = class extends Component$1 {
49306
49009
  //#endregion
49307
49010
  //#region src/components/scrollbar/scrollbar_vertical.ts
49308
49011
  var VerticalScrollBar = class extends Component$1 {
49309
- static props = { topOffset: {
49310
- type: Number,
49311
- optional: true
49312
- } };
49313
49012
  static components = { ScrollBar };
49314
49013
  static template = xml`
49315
49014
  <ScrollBar
@@ -49320,7 +49019,7 @@ var VerticalScrollBar = class extends Component$1 {
49320
49019
  direction="'vertical'"
49321
49020
  onScroll.bind="(offset) => this.onScroll(offset)"
49322
49021
  />`;
49323
- static defaultProps = { topOffset: 0 };
49022
+ props = props({ "topOffset?": types$1.number() }, { topOffset: 0 });
49324
49023
  get offset() {
49325
49024
  return this.env.model.getters.getActiveSheetScrollInfo().scrollY;
49326
49025
  }
@@ -49354,7 +49053,6 @@ var VerticalScrollBar = class extends Component$1 {
49354
49053
  //#region src/components/selection/selection.ts
49355
49054
  var Selection = class extends Component$1 {
49356
49055
  static template = "o-spreadsheet-Selection";
49357
- static props = {};
49358
49056
  static components = { Highlight };
49359
49057
  get highlightProps() {
49360
49058
  const sheetId = this.env.model.getters.getActiveSheetId();
@@ -49372,7 +49070,7 @@ const SIZE = 3;
49372
49070
  const COLOR = "#777";
49373
49071
  var TableResizer = class extends Component$1 {
49374
49072
  static template = "o-spreadsheet-TableResizer";
49375
- static props = { table: Object };
49073
+ props = props({ table: types$1.Table() });
49376
49074
  state = proxy({ highlightZone: void 0 });
49377
49075
  dragNDropGrid = useDragAndDropBeyondTheViewport(this.env);
49378
49076
  setup() {
@@ -49445,10 +49143,6 @@ const registries$1 = {
49445
49143
  };
49446
49144
  var Grid = class extends Component$1 {
49447
49145
  static template = "o-spreadsheet-Grid";
49448
- static props = {
49449
- exposeFocus: Function,
49450
- getGridSize: Function
49451
- };
49452
49146
  static components = {
49453
49147
  GridComposer,
49454
49148
  GridOverlay,
@@ -49464,6 +49158,10 @@ var Grid = class extends Component$1 {
49464
49158
  TableResizer,
49465
49159
  Selection
49466
49160
  };
49161
+ props = props({
49162
+ exposeFocus: types$1.function([types$1.function([])]),
49163
+ getGridSize: types$1.function([], types$1.DOMDimension())
49164
+ });
49467
49165
  HEADER_HEIGHT = 26;
49468
49166
  HEADER_WIDTH = 48;
49469
49167
  menuState;
@@ -50103,10 +49801,10 @@ supportedPivotPositionalFormulaRegistry.add("SPREADSHEET", false);
50103
49801
  //#region src/components/dashboard/clickable_cell_sort_icon/clickable_cell_sort_icon.ts
50104
49802
  var ClickableCellSortIcon = class extends Component$1 {
50105
49803
  static template = "o-spreadsheet-ClickableCellSortIcon";
50106
- static props = {
50107
- position: Object,
50108
- sortDirection: String
50109
- };
49804
+ props = props({
49805
+ position: types$1.CellPosition(),
49806
+ sortDirection: types$1.or([types$1.SortDirection, types$1.literal("none")])
49807
+ });
50110
49808
  hoveredTableStore;
50111
49809
  setup() {
50112
49810
  this.hoveredTableStore = useStore(HoveredTableStore);
@@ -50139,7 +49837,6 @@ var ClickableCellSortIcon = class extends Component$1 {
50139
49837
  //#region src/components/full_screen_figure/full_screen_figure.ts
50140
49838
  var FullScreenFigure = class extends Component$1 {
50141
49839
  static template = "o-spreadsheet-FullScreenFigure";
50142
- static props = {};
50143
49840
  static components = { ChartFigure };
50144
49841
  fullScreenFigureStore;
50145
49842
  fullScreenFigureRef = signal(null);
@@ -50179,10 +49876,10 @@ var FullScreenFigure = class extends Component$1 {
50179
49876
  var PivotHTMLRenderer = class extends Component$1 {
50180
49877
  static template = "o_spreadsheet.PivotHTMLRenderer";
50181
49878
  static components = { Checkbox };
50182
- static props = {
50183
- pivotId: String,
50184
- onCellClicked: Function
50185
- };
49879
+ props = props({
49880
+ pivotId: types$1.UID(),
49881
+ onCellClicked: types$1.function([types$1.string()])
49882
+ });
50186
49883
  pivot = this.env.model.getters.getPivot(this.props.pivotId);
50187
49884
  data = {
50188
49885
  columns: [],
@@ -59146,9 +58843,11 @@ var PivotUIPlugin = class extends CoreViewPlugin {
59146
58843
  this.refreshPivot(cmd.id);
59147
58844
  break;
59148
58845
  case "ADD_PIVOT":
58846
+ this.unusedPivotsInFormulas?.push(cmd.pivotId);
59149
58847
  this.setupPivot(cmd.pivotId);
59150
58848
  break;
59151
58849
  case "DUPLICATE_PIVOT":
58850
+ this.unusedPivotsInFormulas?.push(cmd.newPivotId);
59152
58851
  this.setupPivot(cmd.newPivotId);
59153
58852
  break;
59154
58853
  case "UPDATE_PIVOT":
@@ -59340,8 +59039,8 @@ var PivotUIPlugin = class extends CoreViewPlugin {
59340
59039
  }
59341
59040
  }
59342
59041
  for (const pivotId of this.getters.getPivotIds()) {
59343
- const pivot = this.getters.getPivot(pivotId);
59344
- for (const measure of pivot.definition.measures) if (measure.computedBy) {
59042
+ const pivot = this.getters.getPivotCoreDefinition(pivotId);
59043
+ for (const measure of pivot.measures) if (measure.computedBy) {
59345
59044
  const { sheetId } = measure.computedBy;
59346
59045
  const formula = this.getters.getMeasureCompiledFormula(pivotId, measure);
59347
59046
  const relatedPivotIds = this.getPivotIdsFromFormula(sheetId, formula);
@@ -60717,7 +60416,8 @@ const invalidateTableStyleCommandsSet = new Set([
60717
60416
  "REMOVE_TABLE",
60718
60417
  "RESIZE_TABLE",
60719
60418
  "CREATE_TABLE_STYLE",
60720
- "REMOVE_TABLE_STYLE"
60419
+ "REMOVE_TABLE_STYLE",
60420
+ "DELETE_CONTENT"
60721
60421
  ]);
60722
60422
  function doesCommandInvalidatesTableStyle(cmd) {
60723
60423
  return invalidateTableStyleCommandsSet.has(cmd.type);
@@ -64520,7 +64220,7 @@ var ClipboardPlugin = class extends UIPlugin {
64520
64220
  if (this.getters.getFigure(figureSheetId, figureId).tag === "image") innerHTML = await this.craftImageHTML(figureId);
64521
64221
  else innerHTML = " ";
64522
64222
  } else innerHTML = " ";
64523
- else if (cells.length === 1 && cells[0].length === 1) innerHTML = `${this.getters.getCellText(cells[0][0].position)}`;
64223
+ else if (cells.length === 1 && cells[0].length === 1) innerHTML = xmlEscape(`${this.getters.getCellText(cells[0][0].position)}`);
64524
64224
  else if (!cells[0][0]) return "";
64525
64225
  else {
64526
64226
  let htmlTable = `<table border="1" style="border-collapse:collapse">`;
@@ -67877,20 +67577,22 @@ const RIPPLE_KEY_FRAMES = [
67877
67577
  ];
67878
67578
  var RippleEffect = class extends Component$1 {
67879
67579
  static template = "o-spreadsheet-RippleEffect";
67880
- static props = {
67881
- x: String,
67882
- y: String,
67883
- color: String,
67884
- opacity: Number,
67885
- duration: Number,
67886
- width: Number,
67887
- height: Number,
67888
- offsetY: Number,
67889
- offsetX: Number,
67890
- allowOverflow: Boolean,
67891
- onAnimationEnd: Function,
67892
- style: String
67893
- };
67580
+ props = props({
67581
+ x: types.string(),
67582
+ y: types.string(),
67583
+ color: types.string(),
67584
+ opacity: types.number(),
67585
+ duration: types.number(),
67586
+ /** Width of the ripple. Defaults to the width of the element the ripple is on (without margins). */
67587
+ width: types.number(),
67588
+ /** Height of the ripple. Defaults to the height of the element the ripple is on (without margins). */
67589
+ height: types.number(),
67590
+ offsetY: types.number(),
67591
+ offsetX: types.number(),
67592
+ allowOverflow: types.boolean(),
67593
+ onAnimationEnd: types.function(),
67594
+ style: types.string()
67595
+ });
67894
67596
  rippleRef = signal(null);
67895
67597
  setup() {
67896
67598
  let animation = void 0;
@@ -67927,66 +67629,31 @@ var RippleEffect = class extends Component$1 {
67927
67629
  };
67928
67630
  var Ripple = class extends Component$1 {
67929
67631
  static template = "o-spreadsheet-Ripple";
67930
- static props = {
67931
- color: {
67932
- type: String,
67933
- optional: true
67934
- },
67935
- opacity: {
67936
- type: Number,
67937
- optional: true
67938
- },
67939
- duration: {
67940
- type: Number,
67941
- optional: true
67942
- },
67943
- ignoreClickPosition: {
67944
- type: Boolean,
67945
- optional: true
67946
- },
67947
- width: {
67948
- type: Number,
67949
- optional: true
67950
- },
67951
- height: {
67952
- type: Number,
67953
- optional: true
67954
- },
67955
- offsetY: {
67956
- type: Number,
67957
- optional: true
67958
- },
67959
- offsetX: {
67960
- type: Number,
67961
- optional: true
67962
- },
67963
- allowOverflow: {
67964
- type: Boolean,
67965
- optional: true
67966
- },
67967
- enabled: {
67968
- type: Boolean,
67969
- optional: true
67970
- },
67971
- onAnimationEnd: {
67972
- type: Function,
67973
- optional: true
67974
- },
67975
- slots: Object,
67976
- class: {
67977
- type: String,
67978
- optional: true
67979
- }
67980
- };
67981
67632
  static components = { RippleEffect };
67982
- static defaultProps = {
67633
+ props = props({
67634
+ "color?": types.string(),
67635
+ "opacity?": types.number(),
67636
+ "duration?": types.number(),
67637
+ /** If true, the ripple will play from the element center instead of the position of the click */
67638
+ "ignoreClickPosition?": types.boolean(),
67639
+ /** Width of the ripple. Defaults to the width of the element the ripple is on (without margins). */
67640
+ "width?": types.number(),
67641
+ /** Height of the ripple. Defaults to the height of the element the ripple is on (without margins). */
67642
+ "height?": types.number(),
67643
+ "offsetY?": types.number(),
67644
+ "offsetX?": types.number(),
67645
+ "allowOverflow?": types.boolean(),
67646
+ "enabled?": types.boolean(),
67647
+ "onAnimationEnd?": types.function(),
67648
+ "class?": types.string()
67649
+ }, {
67983
67650
  color: "#aaaaaa",
67984
67651
  opacity: .4,
67985
67652
  duration: 800,
67986
67653
  enabled: true,
67987
67654
  onAnimationEnd: () => {},
67988
67655
  class: ""
67989
- };
67656
+ });
67990
67657
  childContainerRef = signal(null);
67991
67658
  state = proxy({ ripples: [] });
67992
67659
  currentId = 1;
@@ -68234,26 +67901,19 @@ const getSheetLockAnimation = (duration, iterations) => {
68234
67901
  };
68235
67902
  var BottomBarSheet = class extends Component$1 {
68236
67903
  static template = "o-spreadsheet-BottomBarSheet";
68237
- static props = {
68238
- sheetId: String,
68239
- openContextMenu: Function,
68240
- style: {
68241
- type: String,
68242
- optional: true
68243
- },
68244
- onMouseDown: {
68245
- type: Function,
68246
- optional: true
68247
- }
68248
- };
68249
67904
  static components = {
68250
67905
  Ripple,
68251
67906
  ColorPicker
68252
67907
  };
68253
- static defaultProps = {
67908
+ props = props({
67909
+ sheetId: types.string(),
67910
+ openContextMenu: types.function([types.instanceOf(MenuItemRegistry), types.instanceOf(MouseEvent)]),
67911
+ "style?": types.string(),
67912
+ "onMouseDown?": types.function([types.instanceOf(PointerEvent)])
67913
+ }, {
68254
67914
  onMouseDown: () => {},
68255
67915
  style: ""
68256
- };
67916
+ });
68257
67917
  state = proxy({
68258
67918
  isEditing: false,
68259
67919
  pickerOpened: false
@@ -68514,11 +68174,15 @@ var AggregateStatisticsStore = class extends SpreadsheetStore {
68514
68174
  //#region src/components/bottom_bar/bottom_bar_statistic/bottom_bar_statistic.ts
68515
68175
  var BottomBarStatistic = class extends Component$1 {
68516
68176
  static template = "o-spreadsheet-BottomBarStatistic";
68517
- static props = {
68518
- openContextMenu: Function,
68519
- closeContextMenu: Function
68520
- };
68521
68177
  static components = { Ripple };
68178
+ props = props({
68179
+ openContextMenu: types.function([
68180
+ types.number(),
68181
+ types.number(),
68182
+ types.instanceOf(MenuItemRegistry)
68183
+ ]),
68184
+ closeContextMenu: types.function([])
68185
+ });
68522
68186
  state = proxy({ selectedStatisticFn: "" });
68523
68187
  store;
68524
68188
  setup() {
@@ -68561,7 +68225,7 @@ var BottomBarStatistic = class extends Component$1 {
68561
68225
  const MENU_MAX_HEIGHT = 250;
68562
68226
  var BottomBar = class extends Component$1 {
68563
68227
  static template = "o-spreadsheet-BottomBar";
68564
- static props = { onClick: Function };
68228
+ props = props({ onClick: types.function([]) });
68565
68229
  static components = {
68566
68230
  MenuPopover,
68567
68231
  Ripple,
@@ -68837,7 +68501,6 @@ var ClickableCellsStore = class extends SpreadsheetStore {
68837
68501
  //#region src/components/dashboard/dashboard.ts
68838
68502
  var SpreadsheetDashboard = class extends Component$1 {
68839
68503
  static template = "o-spreadsheet-SpreadsheetDashboard";
68840
- static props = { getGridSize: Function };
68841
68504
  static components = {
68842
68505
  GridOverlay,
68843
68506
  GridPopover,
@@ -68845,6 +68508,7 @@ var SpreadsheetDashboard = class extends Component$1 {
68845
68508
  VerticalScrollBar,
68846
68509
  HorizontalScrollBar
68847
68510
  };
68511
+ props = props({ getGridSize: types$1.function([], types$1.DOMDimension()) });
68848
68512
  cellPopovers;
68849
68513
  onMouseWheel;
68850
68514
  canvasPosition;
@@ -68957,11 +68621,11 @@ var SpreadsheetDashboard = class extends Component$1 {
68957
68621
  //#region src/components/header_group/header_group.ts
68958
68622
  var AbstractHeaderGroup = class extends Component$1 {
68959
68623
  static template = "o-spreadsheet-HeaderGroup";
68960
- static props = {
68961
- group: Object,
68962
- layerOffset: Number,
68963
- openContextMenu: Function
68964
- };
68624
+ props = props({
68625
+ group: types$1.HeaderGroup(),
68626
+ layerOffset: types$1.number(),
68627
+ openContextMenu: types$1.function([types$1.DOMCoordinates(), types$1.ArrayOf()])
68628
+ });
68965
68629
  toggleGroup() {
68966
68630
  const sheetId = this.env.model.getters.getActiveSheetId();
68967
68631
  const { start, end } = this.props.group;
@@ -69106,15 +68770,15 @@ var ColGroup = class extends AbstractHeaderGroup {
69106
68770
  //#region src/components/header_group/header_group_container.ts
69107
68771
  var HeaderGroupContainer = class extends Component$1 {
69108
68772
  static template = "o-spreadsheet-HeaderGroupContainer";
69109
- static props = {
69110
- dimension: String,
69111
- layers: Array
69112
- };
69113
68773
  static components = {
69114
68774
  RowGroup,
69115
68775
  ColGroup,
69116
68776
  MenuPopover
69117
68777
  };
68778
+ props = props({
68779
+ dimension: types$1.Dimension(),
68780
+ layers: types$1.array()
68781
+ });
69118
68782
  menu = proxy({
69119
68783
  isOpen: false,
69120
68784
  anchorRect: null,
@@ -69187,29 +68851,17 @@ function useScreenWidth() {
69187
68851
  //#region src/components/side_panel/side_panel/side_panel.ts
69188
68852
  var SidePanel = class extends Component$1 {
69189
68853
  static template = "o-spreadsheet-SidePanel";
69190
- static props = {
69191
- panelContent: Object,
69192
- panelProps: Object,
69193
- onCloseSidePanel: Function,
69194
- onStartHandleDrag: Function,
69195
- onResetPanelSize: Function,
69196
- isPinned: {
69197
- type: Boolean,
69198
- optional: true
69199
- },
69200
- onTogglePinPanel: {
69201
- type: Function,
69202
- optional: true
69203
- },
69204
- onToggleCollapsePanel: {
69205
- type: Function,
69206
- optional: true
69207
- },
69208
- isCollapsed: {
69209
- type: Boolean,
69210
- optional: true
69211
- }
69212
- };
68854
+ props = props({
68855
+ panelContent: types$1.SidePanelContent(),
68856
+ panelProps: types$1.SidePanelComponentProps(),
68857
+ onCloseSidePanel: types$1.function([]),
68858
+ onStartHandleDrag: types$1.function([types$1.instanceOf(MouseEvent)]),
68859
+ onResetPanelSize: types$1.function([]),
68860
+ "isPinned?": types$1.boolean(),
68861
+ "onTogglePinPanel?": types$1.function([]),
68862
+ "onToggleCollapsePanel?": types$1.function([]),
68863
+ "isCollapsed?": types$1.boolean()
68864
+ });
69213
68865
  spreadsheetRect = useSpreadsheetRect();
69214
68866
  getTitle() {
69215
68867
  const panel = this.props.panelContent;
@@ -69221,7 +68873,6 @@ var SidePanel = class extends Component$1 {
69221
68873
  //#region src/components/side_panel/side_panels/side_panels.ts
69222
68874
  var SidePanels = class extends Component$1 {
69223
68875
  static template = "o-spreadsheet-SidePanels";
69224
- static props = {};
69225
68876
  static components = { SidePanel };
69226
68877
  sidePanelStore;
69227
68878
  spreadsheetRect = useSpreadsheetRect();
@@ -69293,8 +68944,8 @@ var SidePanels = class extends Component$1 {
69293
68944
  //#region src/components/small_bottom_bar/ribbon_menu/ribbon_menu.ts
69294
68945
  var RibbonMenu = class extends Component$1 {
69295
68946
  static template = "o-spreadsheet-RibbonMenu";
69296
- static props = { onClose: Function };
69297
68947
  static components = { Menu };
68948
+ props = props({ onClose: types$1.function([]) });
69298
68949
  rootItems = topbarMenuRegistry.getMenuItems();
69299
68950
  menuRef = signal(null);
69300
68951
  containerRef = signal(null);
@@ -69332,9 +68983,6 @@ var RibbonMenu = class extends Component$1 {
69332
68983
  onClickMenu: this.onClickMenu.bind(this)
69333
68984
  };
69334
68985
  }
69335
- get style() {
69336
- return cssPropertiesToCss({ height: `${this.props.height}px` });
69337
- }
69338
68986
  updateShadows() {
69339
68987
  const el = this.containerRef();
69340
68988
  if (!el) return;
@@ -69368,7 +69016,7 @@ var SmallBottomBar = class extends Component$1 {
69368
69016
  RibbonMenu
69369
69017
  };
69370
69018
  static template = "o-spreadsheet-SmallBottomBar";
69371
- static props = { onClick: Function };
69019
+ props = props({ onClick: types$1.function([]) });
69372
69020
  composerFocusStore;
69373
69021
  composerStore;
69374
69022
  composerInterface;
@@ -69569,11 +69217,11 @@ var FigureRendererStore = class extends DisposableStore {
69569
69217
  //#region src/components/standalone_grid_canvas/standalone_grid_canvas.ts
69570
69218
  var StandaloneGridCanvas = class extends Component$1 {
69571
69219
  static template = "o-spreadsheet-StandaloneGridCanvas";
69572
- static props = {
69573
- sheetId: String,
69574
- zone: Object,
69575
- renderingCtx: Object
69576
- };
69220
+ props = props({
69221
+ sheetId: types$1.UID(),
69222
+ zone: types$1.Zone(),
69223
+ renderingCtx: types$1.object({})
69224
+ });
69577
69225
  canvasRef = signal(null);
69578
69226
  rendererStore;
69579
69227
  figureRendererStore;
@@ -69894,7 +69542,7 @@ var SpreadsheetPrintStore = class extends SpreadsheetStore {
69894
69542
  //#region src/components/spreadsheet_print/spreadsheet_print.ts
69895
69543
  var SpreadsheetPrint = class extends Component$1 {
69896
69544
  static template = "o-spreadsheet-SpreadsheetPrint";
69897
- static props = { onExitPrintMode: Function };
69545
+ props = props({ onExitPrintMode: types$1.function([]) });
69898
69546
  static components = {
69899
69547
  StandaloneGridCanvas,
69900
69548
  Section,
@@ -69956,7 +69604,6 @@ var SpreadsheetPrint = class extends Component$1 {
69956
69604
  const COMPOSER_MAX_HEIGHT = 300;
69957
69605
  var TopBarComposer = class extends Component$1 {
69958
69606
  static template = "o-spreadsheet-TopBarComposer";
69959
- static props = {};
69960
69607
  static components = { Composer };
69961
69608
  composerFocusStore;
69962
69609
  composerStore;
@@ -70041,7 +69688,6 @@ function useToolBarDropdownStore() {
70041
69688
  //#region src/components/named_range_selector/named_range_selector.ts
70042
69689
  var NamedRangeSelector = class extends Component$1 {
70043
69690
  static template = "o-spreadsheet-NamedRangeSelector";
70044
- static props = {};
70045
69691
  static components = {
70046
69692
  TextInput,
70047
69693
  MenuPopover
@@ -70224,36 +69870,21 @@ const BORDER_POSITIONS = [[
70224
69870
  ]];
70225
69871
  var BorderEditor = class extends Component$1 {
70226
69872
  static template = "o-spreadsheet-BorderEditor";
70227
- static props = {
70228
- class: {
70229
- type: String,
70230
- optional: true
70231
- },
70232
- currentBorderColor: {
70233
- type: String,
70234
- optional: false
70235
- },
70236
- currentBorderStyle: {
70237
- type: String,
70238
- optional: false
70239
- },
70240
- currentBorderPosition: {
70241
- type: String,
70242
- optional: true
70243
- },
70244
- onBorderColorPicked: Function,
70245
- onBorderStylePicked: Function,
70246
- onBorderPositionPicked: Function,
70247
- maxHeight: {
70248
- type: Number,
70249
- optional: true
70250
- },
70251
- anchorRect: Object
70252
- };
70253
69873
  static components = {
70254
69874
  ColorPickerWidget,
70255
69875
  Popover
70256
69876
  };
69877
+ props = props({
69878
+ "class?": types$1.string(),
69879
+ currentBorderColor: types$1.Color(),
69880
+ currentBorderStyle: types$1.BorderStyle(),
69881
+ "currentBorderPosition?": types$1.BorderPosition(),
69882
+ onBorderColorPicked: types$1.function([types$1.Color()]),
69883
+ onBorderStylePicked: types$1.function([types$1.BorderStyle()]),
69884
+ onBorderPositionPicked: types$1.function([types$1.BorderPosition()]),
69885
+ "maxHeight?": types$1.Pixel(),
69886
+ anchorRect: types$1.Rect()
69887
+ });
70257
69888
  BORDER_POSITIONS = BORDER_POSITIONS;
70258
69889
  lineStyleButtonRef = signal(null);
70259
69890
  borderStyles = borderStyles;
@@ -70314,21 +69945,12 @@ var BorderEditor = class extends Component$1 {
70314
69945
  //#region src/components/border_editor/border_editor_widget.ts
70315
69946
  var BorderEditorWidget = class extends Component$1 {
70316
69947
  static template = "o-spreadsheet-BorderEditorWidget";
70317
- static props = {
70318
- disabled: {
70319
- type: Boolean,
70320
- optional: true
70321
- },
70322
- dropdownMaxHeight: {
70323
- type: Number,
70324
- optional: true
70325
- },
70326
- class: {
70327
- type: String,
70328
- optional: true
70329
- }
70330
- };
70331
69948
  static components = { BorderEditor };
69949
+ props = props({
69950
+ "disabled?": types$1.boolean(),
69951
+ "dropdownMaxHeight?": types$1.Pixel(),
69952
+ "class?": types$1.string()
69953
+ });
70332
69954
  topBarToolStore;
70333
69955
  borderEditorButtonRef = signal(null);
70334
69956
  state = proxy({
@@ -70385,10 +70007,7 @@ var BorderEditorWidget = class extends Component$1 {
70385
70007
  //#region src/components/paint_format_button/paint_format_button.ts
70386
70008
  var PaintFormatButton = class extends Component$1 {
70387
70009
  static template = "o-spreadsheet-PaintFormatButton";
70388
- static props = { class: {
70389
- type: String,
70390
- optional: true
70391
- } };
70010
+ props = props({ "class?": types$1.string() });
70392
70011
  paintFormatStore;
70393
70012
  setup() {
70394
70013
  this.paintFormatStore = useStore(PaintFormatStore);
@@ -70413,10 +70032,7 @@ var TableDropdownButton = class extends Component$1 {
70413
70032
  TableStylesPopover,
70414
70033
  ActionButton
70415
70034
  };
70416
- static props = { class: {
70417
- type: String,
70418
- optional: true
70419
- } };
70035
+ props = props({ "class?": types$1.string() });
70420
70036
  topBarToolStore;
70421
70037
  state = proxy({ popoverProps: void 0 });
70422
70038
  setup() {
@@ -70505,13 +70121,13 @@ var TableDropdownButton = class extends Component$1 {
70505
70121
  //#region src/components/top_bar/color_editor/color_editor.ts
70506
70122
  var TopBarColorEditor = class extends Component$1 {
70507
70123
  static components = { ColorPickerWidget };
70508
- static props = {
70509
- class: String,
70510
- style: String,
70511
- icon: String,
70512
- title: String
70513
- };
70514
70124
  static template = "o-spreadsheet-ColorEditor";
70125
+ props = props({
70126
+ class: types$1.string(),
70127
+ style: types$1.or([types$1.literal("textColor"), types$1.literal("fillColor")]),
70128
+ icon: types$1.string(),
70129
+ title: types$1.string()
70130
+ });
70515
70131
  topBarToolStore;
70516
70132
  state = proxy({ isOpen: false });
70517
70133
  setup() {
@@ -70541,12 +70157,12 @@ var DropdownAction = class extends Component$1 {
70541
70157
  ActionButton,
70542
70158
  Popover
70543
70159
  };
70544
- static props = {
70545
- parentAction: Object,
70546
- childActions: Array,
70547
- class: String,
70548
- childClass: String
70549
- };
70160
+ props = props({
70161
+ parentAction: types$1.ActionSpec(),
70162
+ childActions: types$1.array(types$1.ActionSpec()),
70163
+ class: types$1.string(),
70164
+ childClass: types$1.string()
70165
+ });
70550
70166
  topBarToolStore;
70551
70167
  actionRef = signal(null);
70552
70168
  setup() {
@@ -70573,8 +70189,8 @@ var DropdownAction = class extends Component$1 {
70573
70189
  //#region src/components/top_bar/font_size_editor/font_size_editor.ts
70574
70190
  var TopBarFontSizeEditor = class extends Component$1 {
70575
70191
  static components = { FontSizeEditor };
70576
- static props = { class: String };
70577
70192
  static template = "o-spreadsheet-TopBarFontSizeEditor";
70193
+ props = props({ class: types.string() });
70578
70194
  topBarToolStore;
70579
70195
  setup() {
70580
70196
  this.topBarToolStore = useToolBarDropdownStore();
@@ -70608,7 +70224,7 @@ var NumberFormatsTool = class extends Component$1 {
70608
70224
  MenuPopover,
70609
70225
  ActionButton
70610
70226
  };
70611
- static props = { class: String };
70227
+ props = props({ class: types$1.string() });
70612
70228
  formatNumberMenuItemSpec = formatNumberMenuItemSpec;
70613
70229
  topBarToolStore;
70614
70230
  buttonRef = signal(null);
@@ -70643,7 +70259,7 @@ var NumberFormatsTool = class extends Component$1 {
70643
70259
  var ToolBarZoom = class extends Component$1 {
70644
70260
  static template = "o-spreadsheet-TopBarZoom";
70645
70261
  static components = { NumberEditor };
70646
- static props = { class: String };
70262
+ props = props({ class: types$1.string() });
70647
70263
  topBarToolStore;
70648
70264
  valueList = ZOOM_VALUES;
70649
70265
  setup() {
@@ -70869,10 +70485,10 @@ topBarToolBarRegistry.add("edit").addChild("edit", {
70869
70485
  //#region src/components/top_bar/top_bar.ts
70870
70486
  var TopBar = class extends Component$1 {
70871
70487
  static template = "o-spreadsheet-TopBar";
70872
- static props = {
70873
- onClick: Function,
70874
- dropdownMaxHeight: Number
70875
- };
70488
+ props = props({
70489
+ onClick: types$1.function([]),
70490
+ dropdownMaxHeight: types$1.Pixel()
70491
+ });
70876
70492
  static components = {
70877
70493
  MenuPopover,
70878
70494
  TopBarComposer,
@@ -71147,21 +70763,16 @@ var WebClipboardWrapper = class {
71147
70763
  //#region src/components/spreadsheet/spreadsheet.ts
71148
70764
  var Spreadsheet = class extends Component$1 {
71149
70765
  static template = "o-spreadsheet-Spreadsheet";
71150
- static props = {
71151
- model: Object,
71152
- notifyUser: {
71153
- type: Function,
71154
- optional: true
71155
- },
71156
- raiseError: {
71157
- type: Function,
71158
- optional: true
71159
- },
71160
- askConfirmation: {
71161
- type: Function,
71162
- optional: true
71163
- }
71164
- };
70766
+ props = props({
70767
+ model: types$1.Model(),
70768
+ "notifyUser?": types$1.function([types$1.InformationNotification()]),
70769
+ "raiseError?": types$1.function([types$1.string(), types$1.function([])]),
70770
+ "askConfirmation?": types$1.function([
70771
+ types$1.string(),
70772
+ types$1.function([]),
70773
+ types$1.function([])
70774
+ ])
70775
+ });
71165
70776
  static components = {
71166
70777
  TopBar,
71167
70778
  Grid,
@@ -71191,7 +70802,7 @@ var Spreadsheet = class extends Component$1 {
71191
70802
  properties["color-scheme"] = this.props.model.getters.isDarkMode() ? "dark" : "light";
71192
70803
  if (this.state.printModeEnabled) properties["display"] = `block`;
71193
70804
  else {
71194
- if (this.env.isDashboard()) properties["grid-template-rows"] = `auto`;
70805
+ if (this.env.model.getters.isDashboard()) properties["grid-template-rows"] = `auto`;
71195
70806
  else properties["grid-template-rows"] = `min-content auto min-content`;
71196
70807
  properties["grid-template-columns"] = `auto ${this.sidePanel.mainPanel ? `${this.sidePanel.totalPanelSize || 350}px` : "auto"}`;
71197
70808
  }
@@ -71219,7 +70830,6 @@ var Spreadsheet = class extends Component$1 {
71219
70830
  imageProvider: fileStore ? new ImageProvider(fileStore) : void 0,
71220
70831
  loadCurrencies: this.model.config.external.loadCurrencies,
71221
70832
  loadLocales: this.model.config.external.loadLocales,
71222
- isDashboard: () => this.model.getters.isDashboard(),
71223
70833
  openSidePanel: this.sidePanel.open.bind(this.sidePanel),
71224
70834
  replaceSidePanel: this.sidePanel.replace.bind(this.sidePanel),
71225
70835
  toggleSidePanel: this.sidePanel.toggle.bind(this.sidePanel),
@@ -76739,13 +76349,10 @@ const ERROR_TOOLTIP_MAX_HEIGHT = 80;
76739
76349
  var ErrorToolTip = class extends Component$1 {
76740
76350
  static maxSize = { maxHeight: ERROR_TOOLTIP_MAX_HEIGHT };
76741
76351
  static template = "o-spreadsheet-ErrorToolTip";
76742
- static props = {
76743
- cellPosition: Object,
76744
- onClosed: {
76745
- type: Function,
76746
- optional: true
76747
- }
76748
- };
76352
+ props = props({
76353
+ cellPosition: types$1.CellPosition(),
76354
+ "onClosed?": types$1.function([])
76355
+ });
76749
76356
  get dataValidationErrorMessage() {
76750
76357
  return this.env.model.getters.getInvalidDataValidationMessage(this.props.cellPosition);
76751
76358
  }
@@ -76821,18 +76428,15 @@ const ErrorToolTipPopoverBuilder = { onHover: (position, getters) => {
76821
76428
  //#region src/components/filters/filter_menu/filter_menu.ts
76822
76429
  var FilterMenu = class extends Component$1 {
76823
76430
  static template = "o-spreadsheet-FilterMenu";
76824
- static props = {
76825
- filterPosition: Object,
76826
- onClosed: {
76827
- type: Function,
76828
- optional: true
76829
- }
76830
- };
76831
76431
  static components = {
76832
76432
  FilterMenuValueList,
76833
76433
  SidePanelCollapsible,
76834
76434
  FilterMenuCriterion
76835
76435
  };
76436
+ props = props({
76437
+ filterPosition: types$1.Position(),
76438
+ "onClosed?": types$1.function([])
76439
+ });
76836
76440
  state;
76837
76441
  criterionCategory = "text";
76838
76442
  updatedCriterionValue;
@@ -77009,13 +76613,10 @@ const FilterMenuPopoverBuilder = { onOpen: (position, getters) => {
77009
76613
  //#region src/components/link/link_display/link_display.ts
77010
76614
  var LinkDisplay = class extends Component$1 {
77011
76615
  static template = "o-spreadsheet-LinkDisplay";
77012
- static props = {
77013
- cellPosition: Object,
77014
- onClosed: {
77015
- type: Function,
77016
- optional: true
77017
- }
77018
- };
76616
+ props = props({
76617
+ cellPosition: types$1.CellPosition(),
76618
+ "onClosed?": types$1.function([])
76619
+ });
77019
76620
  cellPopovers;
77020
76621
  setup() {
77021
76622
  this.cellPopovers = useStore(CellPopoverStore);
@@ -77085,14 +76686,11 @@ const LinkCellPopoverBuilder = { onHover: (position, getters) => {
77085
76686
  //#region src/components/link/link_editor/link_editor.ts
77086
76687
  var LinkEditor = class extends Component$1 {
77087
76688
  static template = "o-spreadsheet-LinkEditor";
77088
- static props = {
77089
- cellPosition: Object,
77090
- onClosed: {
77091
- type: Function,
77092
- optional: true
77093
- }
77094
- };
77095
76689
  static components = { MenuPopover };
76690
+ props = props({
76691
+ cellPosition: types$1.CellPosition(),
76692
+ "onClosed?": types$1.function([])
76693
+ });
77096
76694
  static size = { maxHeight: 500 };
77097
76695
  urlInput = signal(null);
77098
76696
  suggestionListRef = signal(null);
@@ -86479,7 +86077,9 @@ const registries = {
86479
86077
  supportedPivotPositionalFormulaRegistry,
86480
86078
  pivotToFunctionValueRegistry,
86481
86079
  migrationStepRegistry,
86482
- chartJsExtensionRegistry
86080
+ chartJsExtensionRegistry,
86081
+ onIterationEndEvaluationRegistry,
86082
+ specificRangeTransformRegistry
86483
86083
  };
86484
86084
  const helpers = {
86485
86085
  arg,
@@ -86552,7 +86152,10 @@ const helpers = {
86552
86152
  parseFormat,
86553
86153
  isFormula,
86554
86154
  domainToColRowDomain,
86555
- collapseHierarchicalDisplayName
86155
+ collapseHierarchicalDisplayName,
86156
+ getCanonicalSymbolName,
86157
+ fuzzyLookup,
86158
+ replaceSymbolInFormula
86556
86159
  };
86557
86160
  const links = {
86558
86161
  isMarkdownLink,
@@ -86603,6 +86206,7 @@ const components = {
86603
86206
  MenuPopover,
86604
86207
  Popover,
86605
86208
  SelectionInput,
86209
+ StandaloneComposer,
86606
86210
  ValidationMessages,
86607
86211
  AddDimensionButton,
86608
86212
  PivotDimensionGranularity,
@@ -86679,8 +86283,8 @@ const chartHelpers = {
86679
86283
  };
86680
86284
 
86681
86285
  //#endregion
86682
- export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, BadExpressionError, CHART_TYPES, CellErrorType, CellValueType, CircularDependencyError, ClientDisconnectedError, ClipboardMIMEType, CommandResult, CompiledFormula, CorePlugin, CoreViewPlugin, DEFAULT_LOCALE, DEFAULT_LOCALES, DEFAULT_LOCALE_DIGIT_GROUPING, DIRECTION, DispatchResult, DivisionByZeroError, EvaluationError, InvalidReferenceError, LocalTransportService, Model, NEXT_VALUE, NotAvailableError, NumberTooLargeError, OrderedLayers, PREVIOUS_VALUE, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, SplillBlockedError, Spreadsheet, SpreadsheetPivotTable, UIPlugin, UnknownFunctionError, __info__, addFunction, addRenderingLayer, astToFormula, availableConditionalFormatOperators, availableDataValidationOperators, availableFiltersOperators, borderStyles, canExecuteInReadonly, categories, chartHelpers, compatibility, components, constants, convertAstNodes, coreTypes, createAutocompleteArgumentsProvider, errorTypes, filterDateCriterionOperators, filterNumberCriterionOperators, filterTextCriterionOperators, findCellInNewZone, functionCache, getCaretDownSvg, getCaretUpSvg, helpers, hooks, invalidSubtotalFormulasCommands, invalidateBordersCommands, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, isCoreCommand, isHeadersDependant, isMatrix, isPositionDependent, isRangeDependant, isSheetDependent, isTargetDependent, isZoneDependent, iterateAstNodes, links, load, lockedSheetAllowedCommands, parse, parseTokens, readonlyAllowedCommands, registries, schemeToColorScale, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
86286
+ export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, BadExpressionError, CHART_TYPES, CellErrorType, CellValueType, CircularDependencyError, ClientDisconnectedError, ClipboardMIMEType, CommandResult, CompiledFormula, CorePlugin, CoreViewPlugin, DEFAULT_LOCALE, DEFAULT_LOCALES, DEFAULT_LOCALE_DIGIT_GROUPING, DIRECTION, DispatchResult, DivisionByZeroError, EvaluationError, InvalidReferenceError, LocalTransportService, Model, NEXT_VALUE, NotAvailableError, NumberTooLargeError, OrderedLayers, PREVIOUS_VALUE, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, SplillBlockedError, Spreadsheet, SpreadsheetPivotTable, UIPlugin, UnknownFunctionError, __info__, addFunction, addRenderingLayer, astToFormula, availableConditionalFormatOperators, availableDataValidationOperators, availableFiltersOperators, borderPositions, borderStyles, canExecuteInReadonly, categories, chartHelpers, compatibility, components, composerFocusTypes, constants, convertAstNodes, coreTypes, createAutocompleteArgumentsProvider, errorTypes, filterDateCriterionOperators, filterNumberCriterionOperators, filterTextCriterionOperators, findCellInNewZone, functionCache, getCaretDownSvg, getCaretUpSvg, helpers, hooks, invalidSubtotalFormulasCommands, invalidateBordersCommands, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, isCoreCommand, isHeadersDependant, isMatrix, isPositionDependent, isRangeDependant, isSheetDependent, isTargetDependent, isZoneDependent, iterateAstNodes, links, load, lockedSheetAllowedCommands, parse, parseTokens, readonlyAllowedCommands, registries, schemeToColorScale, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
86683
86287
 
86684
- __info__.version = "19.4.0-alpha.10";
86685
- __info__.date = "2026-06-02T12:07:58.355Z";
86686
- __info__.hash = "41144f9";
86288
+ __info__.version = "19.4.0-alpha.12";
86289
+ __info__.date = "2026-06-06T06:24:48.209Z";
86290
+ __info__.hash = "a71f829";