@odoo/o-spreadsheet 19.5.0-alpha.13 → 19.5.0-alpha.14

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 (34) hide show
  1. package/dist/o_spreadsheet.cjs +352 -311
  2. package/dist/o_spreadsheet.css +15 -4
  3. package/dist/o_spreadsheet.esm.js +352 -311
  4. package/dist/o_spreadsheet.iife.js +352 -311
  5. package/dist/o_spreadsheet.min.iife.js +299 -299
  6. package/dist/o_spreadsheet.xml +16 -10
  7. package/dist/types/components/figures/figure_container/figure_container.d.ts +6 -2
  8. package/dist/types/components/helpers/figure_drag_helper.d.ts +3 -3
  9. package/dist/types/components/helpers/figure_snap_helper.d.ts +8 -3
  10. package/dist/types/components/link/link_editor/link_editor.d.ts +1 -0
  11. package/dist/types/components/side_panel/carousel_panel/carousel_panel.d.ts +1 -1
  12. package/dist/types/components/side_panel/chart/chart_type_picker_popover/chart_type_picker_popover.d.ts +12 -12
  13. package/dist/types/components/side_panel/find_and_replace/find_and_replace.d.ts +1 -0
  14. package/dist/types/components/side_panel/find_and_replace/find_and_replace_store.d.ts +2 -1
  15. package/dist/types/components/side_panel/table_style_editor_panel/table_style_editor_panel.d.ts +2 -0
  16. package/dist/types/constants.d.ts +0 -1
  17. package/dist/types/helpers/color_themes.d.ts +2 -0
  18. package/dist/types/helpers/figures/chart.d.ts +2 -1
  19. package/dist/types/helpers/figures/charts/chart_common.d.ts +2 -2
  20. package/dist/types/helpers/figures/charts/chart_ui_common.d.ts +3 -3
  21. package/dist/types/helpers/figures/charts/runtime/chart_data_extractor.d.ts +11 -10
  22. package/dist/types/helpers/owl3_helpers.d.ts +4 -0
  23. package/dist/types/index.d.ts +0 -1
  24. package/dist/types/owl3_compatibility_layer.d.ts +1 -14
  25. package/dist/types/plugins/ui_core_views/evaluation_chart.d.ts +6 -5
  26. package/dist/types/plugins/ui_feature/chart_ui.d.ts +6 -0
  27. package/dist/types/plugins/ui_feature/color_theme.d.ts +0 -3
  28. package/dist/types/registries/chart_registry.d.ts +2 -2
  29. package/dist/types/registries/figures_registry.d.ts +1 -1
  30. package/dist/types/types/commands.d.ts +15 -15
  31. package/dist/types/types/getters.d.ts +2 -1
  32. package/dist/types/types/model.d.ts +2 -1
  33. package/dist/types/types/rendering.d.ts +2 -0
  34. 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.5.0-alpha.13
6
- * @date 2026-08-21T15:33:44.046Z
7
- * @hash a73559e
5
+ * @version 19.5.0-alpha.14
6
+ * @date 2026-08-29T09:17:09.184Z
7
+ * @hash e8ad6ad
8
8
  */
9
9
 
10
10
  (function(exports, _odoo_owl) {
@@ -2639,7 +2639,6 @@ stores.inject(MyMetaStore, storeInstance);
2639
2639
  *
2640
2640
  * 1. Update template directives:
2641
2641
  * - replace `t-portal` → `t-custom-portal`
2642
- * - replace `t-model` → `t-custom-model`
2643
2642
  *
2644
2643
  * 2. Load this file immediately after Owl 3.
2645
2644
  *
@@ -2654,35 +2653,23 @@ stores.inject(MyMetaStore, storeInstance);
2654
2653
  * Gradually remove the compatibility layer by migrating to native Owl 3:
2655
2654
  *
2656
2655
  * - replace `t-custom-portal` with proper Owl 3 portal usage
2657
- * - replace `t-custom-model` with `t-model` + signals
2658
2656
  * - convert `useLayoutEffect` back to `useEffect` where appropriate
2659
2657
  *
2660
2658
  * The end goal is to eliminate all compatibility shims.
2661
2659
  */
2662
- const { __ODOO_COMPATIBILITY_LAYER_ADDED__, blockDom: blockDom$1, config, onMounted: onMounted$26, onPatched: onPatched$5, onWillUnmount: onWillUnmount$20, App: OwlApp, Component: OwlComponent, EnvPlugin: OwlEnvPlugin, useChildEnv: OwlUseChildEnv, useChildSubEnv: OwlUseChildSubEnv, useComponent: OwlUseComponent, useEnv: OwlUseEnv, useExternalListener: OwlUseExternalListener, useLayoutEffect: OwlUseLayoutEffect, useSubEnv: OwlUseSubEnv, Plugin, plugin, props, providePlugins, useScope, xml: xml$5 } = _odoo_owl;
2660
+ const { __ODOO_COMPATIBILITY_LAYER_ADDED__, blockDom: blockDom$1, config, onMounted: onMounted$26, onPatched: onPatched$5, onWillUnmount: onWillUnmount$20, App: OwlApp, Component: OwlComponent, EnvPlugin: OwlEnvPlugin, useComponent: OwlUseComponent, useEnv: OwlUseEnv, useLayoutEffect: OwlUseLayoutEffect, useSubEnv: OwlUseSubEnv, Plugin, usePlugin, useProps: useProps$171, providePlugins, useScope, xml: xml$5 } = _odoo_owl;
2663
2661
  const isOdooCompatLoaded = __ODOO_COMPATIBILITY_LAYER_ADDED__ === true;
2664
2662
  var _Component = class extends OwlComponent {
2665
- static template = "";
2666
2663
  env;
2667
2664
  constructor(node) {
2668
2665
  super(node);
2669
- this.env = useChildEnv();
2670
- this.__owl__ = node;
2666
+ this.env = _useEnv();
2671
2667
  }
2672
2668
  setup() {}
2673
- render(deep = false) {
2674
- this.__owl__.render(deep === true);
2675
- }
2676
2669
  };
2677
2670
  function _useComponent() {
2678
2671
  return useScope().component;
2679
2672
  }
2680
- function _useExternalListener(target, eventName, handler, eventParams) {
2681
- const node = useScope();
2682
- const boundHandler = handler.bind(node.component);
2683
- onMounted$26(() => target.addEventListener(eventName, boundHandler, eventParams));
2684
- onWillUnmount$20(() => target.removeEventListener(eventName, boundHandler, eventParams));
2685
- }
2686
2673
  function onWillRender(cb) {
2687
2674
  const node = useScope();
2688
2675
  const renderFn = node.renderFn;
@@ -2720,27 +2707,14 @@ stores.inject(MyMetaStore, storeInstance);
2720
2707
  env = config("env") ?? {};
2721
2708
  };
2722
2709
  function _useEnv() {
2723
- return useScope().component.env;
2724
- }
2725
- function provideEnv(env) {
2726
- providePlugins([_EnvPlugin], { env });
2727
- return env;
2728
- }
2729
- function extendEnv(extension) {
2730
- const env = useChildEnv();
2731
- const subEnv = Object.create(env);
2732
- Object.defineProperties(subEnv, Object.getOwnPropertyDescriptors(extension));
2733
- return provideEnv(subEnv);
2710
+ return usePlugin(_EnvPlugin).env;
2734
2711
  }
2735
2712
  function _useSubEnv(extension) {
2736
- const component = useScope().component;
2737
- component.env = extendEnv(extension);
2738
- }
2739
- function _useChildSubEnv(extension) {
2740
- extendEnv(extension);
2741
- }
2742
- function _useChildEnv() {
2743
- return plugin(_EnvPlugin).env;
2713
+ const subEnv = Object.create(_useEnv());
2714
+ Object.defineProperties(subEnv, Object.getOwnPropertyDescriptors(extension));
2715
+ providePlugins([_EnvPlugin], { env: subEnv });
2716
+ const component = _useComponent();
2717
+ component.env = subEnv;
2744
2718
  }
2745
2719
  var VPortal = class extends blockDom$1.text("").constructor {
2746
2720
  /**
@@ -2789,7 +2763,7 @@ stores.inject(MyMetaStore, storeInstance);
2789
2763
  static template = xml$5`<t t-call-slot="default"/>`;
2790
2764
  constructor(node) {
2791
2765
  super(node);
2792
- this.props = props();
2766
+ this.props = useProps$171();
2793
2767
  this.__owl__ = node;
2794
2768
  }
2795
2769
  setup() {
@@ -2822,18 +2796,6 @@ stores.inject(MyMetaStore, storeInstance);
2822
2796
  /**
2823
2797
  * @param {HTMLElement} node
2824
2798
  * @param {string} value
2825
- * @param {string[]} modifiers
2826
- */
2827
- model: (node, value, modifiers) => {
2828
- let attribute = "t-model";
2829
- for (const modifier of modifiers) attribute += `.${modifier}`;
2830
- const getter = `() => ${value}`;
2831
- const setter = `(nv) => {${value} = nv;}`;
2832
- node.setAttribute(attribute, `__globals__.createModelSignal(${getter}, ${setter})`);
2833
- },
2834
- /**
2835
- * @param {HTMLElement} node
2836
- * @param {string} value
2837
2799
  */
2838
2800
  portal: (node, value) => {
2839
2801
  if (node.nodeName.toLowerCase() !== "t") throw new Error("t-custom-portal should be on a 't' element");
@@ -2862,11 +2824,6 @@ set(value) {
2862
2824
  refInfo.values[refId] = value;
2863
2825
  } };
2864
2826
  },
2865
- /**
2866
- * @param {Function} getter
2867
- * @param {Function} setter
2868
- */
2869
- createModelSignal: (getter, setter) => Object.assign(getter, { set: setter }),
2870
2827
  Portal
2871
2828
  };
2872
2829
  var _App = class extends OwlApp {
@@ -2892,7 +2849,7 @@ set(value) {
2892
2849
  createRoot(component, config = {}) {
2893
2850
  if (config.env) component = { [component.name]: class extends component {
2894
2851
  constructor(node) {
2895
- provideEnv(config.env);
2852
+ providePlugins([_EnvPlugin], { env: config.env });
2896
2853
  super(node);
2897
2854
  }
2898
2855
  } }[component.name];
@@ -2901,13 +2858,10 @@ set(value) {
2901
2858
  };
2902
2859
  const Component = isOdooCompatLoaded ? OwlComponent : _Component;
2903
2860
  const useComponent = isOdooCompatLoaded ? OwlUseComponent : _useComponent;
2904
- const useExternalListener = isOdooCompatLoaded ? OwlUseExternalListener : _useExternalListener;
2905
2861
  const useLayoutEffect = isOdooCompatLoaded ? OwlUseLayoutEffect : _useLayoutEffect;
2906
2862
  const EnvPlugin = isOdooCompatLoaded ? OwlEnvPlugin : _EnvPlugin;
2907
2863
  const useEnv = isOdooCompatLoaded ? OwlUseEnv : _useEnv;
2908
2864
  const useSubEnv = isOdooCompatLoaded ? OwlUseSubEnv : _useSubEnv;
2909
- const useChildEnv = isOdooCompatLoaded ? OwlUseChildEnv : _useChildEnv;
2910
- const useChildSubEnv = isOdooCompatLoaded ? OwlUseChildSubEnv : _useChildSubEnv;
2911
2865
  const App$1 = isOdooCompatLoaded ? OwlApp : _App;
2912
2866
 
2913
2867
  //#endregion
@@ -7951,7 +7905,8 @@ set(value) {
7951
7905
  "UPDATE_CHART",
7952
7906
  "UPDATE_CHART_REGION",
7953
7907
  "UPDATE_CAROUSEL_ACTIVE_ITEM",
7954
- "UPDATE_PIVOT"
7908
+ "UPDATE_PIVOT",
7909
+ "UPDATE_COLOR_SCHEME"
7955
7910
  ]);
7956
7911
  const lockedSheetAllowedCommands = /* @__PURE__ */ new Set([
7957
7912
  "LOCK_SHEET",
@@ -9995,6 +9950,46 @@ set(value) {
9995
9950
  ];
9996
9951
  const CONTENT_TYPES_FILE = "[Content_Types].xml";
9997
9952
 
9953
+ //#endregion
9954
+ //#region src/helpers/color_themes.ts
9955
+ const FROZEN_PANE_HEADER_BORDER_COLOR = "#BCBCBC";
9956
+ const FROZEN_PANE_BORDER_COLOR = "#DADFE8";
9957
+ const HEADER_BORDER_COLOR = "#C0C0C0";
9958
+ const TEXT_HEADER_COLOR = "#666666";
9959
+ const BACKGROUND_HEADER_COLOR = "#F8F9FA";
9960
+ const BACKGROUND_HEADER_SELECTED_COLOR = "#E8EAED";
9961
+ const BACKGROUND_HEADER_ACTIVE_COLOR = "#595959";
9962
+ const COLOR_THEMES = {
9963
+ light: {
9964
+ colorThemeName: "light",
9965
+ backgroundColor: "#FFFFFF",
9966
+ gridBorderColor: "#CECFCF",
9967
+ headerBackgroundColor: BACKGROUND_HEADER_COLOR,
9968
+ headerActiveBackgroundColor: BACKGROUND_HEADER_ACTIVE_COLOR,
9969
+ headerSelectedBackgroundColor: BACKGROUND_HEADER_SELECTED_COLOR,
9970
+ headerTextColor: TEXT_HEADER_COLOR,
9971
+ headerBorderColor: HEADER_BORDER_COLOR,
9972
+ frozenPaneBorderColor: FROZEN_PANE_BORDER_COLOR,
9973
+ frozenPaneHeaderBorderColor: FROZEN_PANE_HEADER_BORDER_COLOR,
9974
+ singleCellSelectionBackgroundColor: "#F3F7FE",
9975
+ multipleCellsSelectionBackgroundColor: "#E9F0FF"
9976
+ },
9977
+ dark: {
9978
+ colorThemeName: "dark",
9979
+ backgroundColor: adaptForDarkMode("#1A1C2E"),
9980
+ gridBorderColor: adaptForDarkMode("#6B706F"),
9981
+ headerBackgroundColor: adaptForDarkMode("#262A36"),
9982
+ headerActiveBackgroundColor: adaptForDarkMode("#3A4052"),
9983
+ headerSelectedBackgroundColor: adaptForDarkMode("#4E566E"),
9984
+ headerTextColor: adaptForDarkMode("#A1A6B3"),
9985
+ headerBorderColor: adaptForDarkMode("#7A7F91"),
9986
+ frozenPaneBorderColor: adaptForDarkMode("#7A7F91"),
9987
+ frozenPaneHeaderBorderColor: adaptForDarkMode("#9FA5BD"),
9988
+ singleCellSelectionBackgroundColor: adaptForDarkMode("#696E8044"),
9989
+ multipleCellsSelectionBackgroundColor: adaptForDarkMode("#828AA044")
9990
+ }
9991
+ };
9992
+
9998
9993
  //#endregion
9999
9994
  //#region src/helpers/figures/charts/chart_common.ts
10000
9995
  const TREND_LINE_XAXIS_ID = "x1";
@@ -10216,9 +10211,8 @@ set(value) {
10216
10211
  function isTrendLineAxis(axisID) {
10217
10212
  return axisID === "x1" || axisID === "xMovingAverage";
10218
10213
  }
10219
- function getChartBackgroundColor({ background }, getters) {
10220
- const defaultColor = getters.getSpreadsheetTheme().backgroundColor;
10221
- if (!background) return defaultColor;
10214
+ function getChartBackgroundColor({ background }, colorThemeName) {
10215
+ if (!background) return COLOR_THEMES[colorThemeName].backgroundColor;
10222
10216
  return background;
10223
10217
  }
10224
10218
 
@@ -12315,14 +12309,14 @@ set(value) {
12315
12309
  if (definition.baseline && isFormula(definition.baseline)) formulas.push(CompiledFormula.Compile(definition.baseline, sheetId, getters));
12316
12310
  return formulas;
12317
12311
  },
12318
- getRuntime(getters, definition, _dataExtractor, sheetId) {
12312
+ getRuntime(getters, definition, _dataExtractor, sheetId, eventHandlers, colorThemeName) {
12319
12313
  let formattedKeyValue = "";
12320
12314
  const { scalar: keyValue, range: keyValueRange } = getData$1(definition.keyValue, getters, sheetId);
12321
12315
  const locale = getters.getLocale();
12322
12316
  if (keyValue !== null && keyValue !== void 0) formattedKeyValue = getKeyValueText(keyValue, definition.humanize ?? true, locale);
12323
12317
  else formattedKeyValue = "";
12324
12318
  const { scalar: baseline, range: baselineRange } = getData$1(definition.baseline, getters, sheetId);
12325
- const { background, fontColor } = getters.getStyleOfSingleCellChart(definition.background, keyValueRange);
12319
+ const { background, fontColor } = getters.getStyleOfSingleCellChart(definition.background, keyValueRange, colorThemeName);
12326
12320
  const baselineDisplay = getBaselineText(baseline, keyValue, definition.baselineMode, definition.humanize ?? true, locale);
12327
12321
  const baselineValue = definition.baselineMode === "progress" && isNumber(baselineDisplay, locale) ? toNumber(baselineDisplay, locale) : 0;
12328
12322
  const title = definition.title;
@@ -14562,22 +14556,35 @@ set(value) {
14562
14556
  const step = length / maxPoints;
14563
14557
  return Array.from({ length: maxPoints }, (_, i) => Math.min(length - 1, Math.floor(i * step)));
14564
14558
  }
14565
- async function chartToImageUrl(runtime, figure, type) {
14559
+ async function chartToImageUrl(runtime, figure, type, colorThemeName = "light") {
14566
14560
  try {
14567
14561
  const canvas = createRenderingSurface(figure.width, figure.height);
14568
14562
  const cleanup = drawChartOnCanvas(canvas, runtime, figure, type);
14569
- const imageUrl = await canvasToObjectUrl(canvas);
14563
+ const imageUrl = await canvasToObjectUrl(colorThemeName === "dark" ? applyDarkMode(canvas) : canvas);
14570
14564
  cleanup();
14571
14565
  return imageUrl;
14572
14566
  } catch (error) {
14573
14567
  console.log("Error exporting chart to image URL: " + error.message);
14574
14568
  }
14575
14569
  }
14576
- async function chartToImageFile(runtime, figure, type) {
14570
+ /**
14571
+ * Charts are drawn with pre-inverted colors (see `adaptForDarkMode`) because they are displayed
14572
+ * through the `os-theme-dependant` CSS filter. An exported image doesn't get that filter, so it
14573
+ * has to be applied to the pixels to obtain what is actually displayed on screen.
14574
+ */
14575
+ function applyDarkMode(canvas) {
14576
+ const filtered = createRenderingSurface(canvas.width, canvas.height);
14577
+ const ctx = filtered.getContext("2d");
14578
+ if (!ctx || !("filter" in ctx)) return canvas;
14579
+ ctx.filter = DARK_MODE_FILTER_STRING;
14580
+ ctx.drawImage(canvas, 0, 0);
14581
+ return filtered;
14582
+ }
14583
+ async function chartToImageFile(runtime, figure, type, colorThemeName = "light") {
14577
14584
  try {
14578
14585
  const canvas = createRenderingSurface(figure.width, figure.height);
14579
14586
  const cleanup = drawChartOnCanvas(canvas, runtime, figure, type);
14580
- const chartBlob = await canvasToBlob(canvas);
14587
+ const chartBlob = await canvasToBlob(colorThemeName === "dark" ? applyDarkMode(canvas) : canvas);
14581
14588
  cleanup();
14582
14589
  return chartBlob;
14583
14590
  } catch (error) {
@@ -14885,7 +14892,7 @@ set(value) {
14885
14892
  const chartId = env.model.getters.getChartIdFromFigureId(figureId);
14886
14893
  if (!chartId) return;
14887
14894
  const chartType = env.model.getters.getChartType(chartId);
14888
- const blob = await chartToImageFile(env.model.getters.getChartRuntime(chartId), figure, chartType);
14895
+ const blob = await chartToImageFile(env.model.getters.getChartRuntime(chartId), figure, chartType, env.model.getters.getSpreadsheetTheme().colorThemeName);
14889
14896
  if (!blob) return;
14890
14897
  const image = await new Promise((resolve) => {
14891
14898
  const reader = new FileReader();
@@ -14922,7 +14929,7 @@ set(value) {
14922
14929
  const chartId = env.model.getters.getChartIdFromFigureId(figureId);
14923
14930
  if (!chartId) return;
14924
14931
  const chartType = env.model.getters.getChartType(chartId);
14925
- const url = await chartToImageUrl(env.model.getters.getChartRuntime(chartId), figure, chartType);
14932
+ const url = await chartToImageUrl(env.model.getters.getChartRuntime(chartId), figure, chartType, env.model.getters.getSpreadsheetTheme().colorThemeName);
14926
14933
  if (!url) return;
14927
14934
  downloadFile(url, "chart");
14928
14935
  },
@@ -16471,8 +16478,8 @@ set(value) {
16471
16478
  useLayoutEffect(() => {
16472
16479
  if (!this.props.disableKeyboardNavigation && !this.state.hoveredMenu && !this.subMenu.isOpen) this.menuRef()?.focus();
16473
16480
  });
16474
- useExternalListener(window, "click", this.onExternalClick, { capture: true });
16475
- useExternalListener(window, "contextmenu", this.onExternalClick, { capture: true });
16481
+ (0, _odoo_owl.useListener)(window, "click", this.onExternalClick.bind(this), { capture: true });
16482
+ (0, _odoo_owl.useListener)(window, "contextmenu", this.onExternalClick.bind(this), { capture: true });
16476
16483
  (0, _odoo_owl.onWillUpdateProps)((nextProps) => {
16477
16484
  if (nextProps.menuItems !== this.props.menuItems) this.closeSubMenu();
16478
16485
  });
@@ -20976,7 +20983,7 @@ set(value) {
20976
20983
  setup() {
20977
20984
  this.DOMFocusableElementStore = useStore(DOMFocusableElementStore);
20978
20985
  this.viewStore = useStore(ViewportsStore);
20979
- useExternalListener(window, "click", this.onExternalClick, { capture: true });
20986
+ (0, _odoo_owl.useListener)(window, "click", this.onExternalClick.bind(this), { capture: true });
20980
20987
  }
20981
20988
  get addRowsPosition() {
20982
20989
  const { scrollY } = this.viewStore.activeSheetScrollInfo;
@@ -21507,7 +21514,7 @@ set(value) {
21507
21514
  (0, _odoo_owl.useListener)(gridRef, "mouseenter", resume);
21508
21515
  (0, _odoo_owl.useListener)(gridRef, "pointerdown", recompute);
21509
21516
  (0, _odoo_owl.useListener)(gridRef, "pointerdown", (ev) => env.isMobile() && updateMousePosition(withZoom(env, ev)));
21510
- useExternalListener(window, "click", handleGlobalClick);
21517
+ (0, _odoo_owl.useListener)(window, "click", handleGlobalClick);
21511
21518
  function handleGlobalClick(e) {
21512
21519
  const target = e.target;
21513
21520
  const grid = gridRef();
@@ -23511,7 +23518,7 @@ set(value) {
23511
23518
  hoveredValue: void 0
23512
23519
  });
23513
23520
  setup() {
23514
- useExternalListener(window, "pointerdown", this.onExternalClick, { capture: true });
23521
+ (0, _odoo_owl.useListener)(window, "pointerdown", this.onExternalClick.bind(this), { capture: true });
23515
23522
  useLayoutEffect(() => {
23516
23523
  const el = this.dropdownRef();
23517
23524
  if (el) el.style.width = `${this.selectRef()?.offsetWidth}px`;
@@ -23613,7 +23620,7 @@ set(value) {
23613
23620
  });
23614
23621
  static components = { Popover };
23615
23622
  setup() {
23616
- useExternalListener(window, "click", this.onExternalClick, { capture: true });
23623
+ (0, _odoo_owl.useListener)(window, "click", this.onExternalClick.bind(this), { capture: true });
23617
23624
  }
23618
23625
  infoRef = _odoo_owl.signal.ref();
23619
23626
  get popoverProps() {
@@ -24023,6 +24030,7 @@ set(value) {
24023
24030
  Component: ChartFigure,
24024
24031
  SidePanelComponent: "ChartPanel",
24025
24032
  menuBuilder: getChartMenuActions,
24033
+ minFigSize: 80,
24026
24034
  borderWidth: (getters) => getters.isDashboard() ? 0 : 1,
24027
24035
  hasShadow: (getters) => getters.isDashboard(),
24028
24036
  isRounded: (getters) => getters.isDashboard(),
@@ -24041,6 +24049,7 @@ set(value) {
24041
24049
  figureRegistry.add("carousel", {
24042
24050
  Component: CarouselFigure,
24043
24051
  menuBuilder: getCarouselMenuActions,
24052
+ minFigSize: 80,
24044
24053
  borderWidth: (getters) => getters.isDashboard() ? 0 : 1,
24045
24054
  hasShadow: (getters) => getters.isDashboard(),
24046
24055
  isRounded: (getters) => getters.isDashboard(),
@@ -24173,7 +24182,7 @@ set(value) {
24173
24182
  ...this.positionInBoundary(sheetId, this.env.model.getters.getFigureUI(sheetId, figure), ev.key, ev.shiftKey)
24174
24183
  });
24175
24184
  }
24176
- this.env.model.dispatch("MOVE_FIGURES", { figures });
24185
+ this.env.model.dispatch("UPDATE_FIGURES", { figures });
24177
24186
  ev.preventDefault();
24178
24187
  ev.stopPropagation();
24179
24188
  break;
@@ -30918,7 +30927,7 @@ set(value) {
30918
30927
  getFormulas(getters) {
30919
30928
  return this.chartTypeBuilder.getFormulas(getters, this.sheetId, this.definition);
30920
30929
  }
30921
- getRuntime(getters, chartId) {
30930
+ getRuntime(getters, chartId, colorThemeName) {
30922
30931
  const dataSource = this.dataSource;
30923
30932
  const dataExtractors = dataSource ? {
30924
30933
  extractData: () => this.dataSourceBuilder.extractData(dataSource, chartId, getters),
@@ -30938,7 +30947,7 @@ set(value) {
30938
30947
  return this.dataSourceBuilder.onDataSetClick?.(this.definition.type, chartId, event, items, chartJsChart, getters);
30939
30948
  },
30940
30949
  onHover: (event, items, chartJsChart) => this.dataSourceBuilder.onDataSetHover?.(this.definition.type, chartId, event, items, chartJsChart)
30941
- });
30950
+ }, colorThemeName);
30942
30951
  }
30943
30952
  static deleteInvalidKeys(definition) {
30944
30953
  definition = { ...definition };
@@ -32201,7 +32210,7 @@ set(value) {
32201
32210
  DOMFocusableElementStore;
32202
32211
  setup() {
32203
32212
  this.DOMFocusableElementStore = useStore(DOMFocusableElementStore);
32204
- useExternalListener(window, "click", this.onExternalClick, { capture: true });
32213
+ (0, _odoo_owl.useListener)(window, "click", this.onExternalClick.bind(this), { capture: true });
32205
32214
  (0, _odoo_owl.onWillUpdateProps)((nextProps) => {
32206
32215
  const input = this.inputRef();
32207
32216
  if (input && document.activeElement !== input) input.value = nextProps.currentValue;
@@ -32302,7 +32311,7 @@ set(value) {
32302
32311
  });
32303
32312
  openedEl = null;
32304
32313
  setup() {
32305
- useExternalListener(window, "click", this.onExternalClick);
32314
+ (0, _odoo_owl.useListener)(window, "click", this.onExternalClick.bind(this));
32306
32315
  }
32307
32316
  state = (0, _odoo_owl.proxy)({ activeTool: "" });
32308
32317
  updateFontSize(fontSize) {
@@ -33396,7 +33405,7 @@ set(value) {
33396
33405
  state;
33397
33406
  setup() {
33398
33407
  this.state = (0, _odoo_owl.proxy)({ pickerOpened: false });
33399
- useExternalListener(window, "click", this.closePicker);
33408
+ (0, _odoo_owl.useListener)(window, "click", this.closePicker.bind(this));
33400
33409
  }
33401
33410
  closePicker() {
33402
33411
  this.state.pickerOpened = false;
@@ -34019,7 +34028,7 @@ set(value) {
34019
34028
  //#region src/helpers/figures/charts/runtime/chart_data_extractor.ts
34020
34029
  const EMPTY$1 = Object.freeze({ value: null });
34021
34030
  const ZERO = Object.freeze({ value: 0 });
34022
- function getBarChartData(definition, { labelValues, dataSetsValues }, getters) {
34031
+ function getBarChartData(definition, { labelValues, dataSetsValues }, getters, colorThemeName) {
34023
34032
  const locale = getters.getLocale();
34024
34033
  let labels = labelValues.map(({ value, format }) => formatValue(value, {
34025
34034
  format,
@@ -34051,7 +34060,7 @@ set(value) {
34051
34060
  labels,
34052
34061
  locale: getters.getLocale(),
34053
34062
  topPadding: getTopPaddingForDashboard(definition, getters),
34054
- background: getChartBackgroundColor(definition, getters)
34063
+ background: getChartBackgroundColor(definition, colorThemeName)
34055
34064
  };
34056
34065
  }
34057
34066
  function getDateTimeLabel(value, stamp) {
@@ -34110,7 +34119,7 @@ set(value) {
34110
34119
  labels: xValues.map((v) => ({ value: getDateTimeLabel(v, horizontalGroupBy) }))
34111
34120
  };
34112
34121
  }
34113
- function getCalendarChartData(definition, { labelValues, dataSetsValues }, getters) {
34122
+ function getCalendarChartData(definition, { labelValues, dataSetsValues }, getters, colorThemeName) {
34114
34123
  let labels = labelValues;
34115
34124
  const locale = getters.getLocale();
34116
34125
  const countEntries = dataSetsValues.length === 0;
@@ -34123,14 +34132,14 @@ set(value) {
34123
34132
  labels: labels.map(({ value }) => String(value ?? "")),
34124
34133
  locale: getters.getLocale(),
34125
34134
  topPadding: getTopPaddingForDashboard(definition, getters),
34126
- background: getChartBackgroundColor(definition, getters)
34135
+ background: getChartBackgroundColor(definition, colorThemeName)
34127
34136
  };
34128
34137
  }
34129
- function getPyramidChartData(definition, { labelValues, dataSetsValues }, getters) {
34138
+ function getPyramidChartData(definition, { labelValues, dataSetsValues }, getters, colorThemeName) {
34130
34139
  const barChartData = getBarChartData(definition, {
34131
34140
  labelValues,
34132
34141
  dataSetsValues: dataSetsValues.slice(0, 2)
34133
- }, getters);
34142
+ }, getters, colorThemeName);
34134
34143
  const barDataset = barChartData.dataSetsValues.filter((ds) => !ds.hidden);
34135
34144
  const pyramidDatasetValues = [];
34136
34145
  if (barDataset[0]) {
@@ -34152,7 +34161,7 @@ set(value) {
34152
34161
  dataSetsValues: pyramidDatasetValues
34153
34162
  };
34154
34163
  }
34155
- function getLineChartData(definition, { labelValues, dataSetsValues }, getters) {
34164
+ function getLineChartData(definition, { labelValues, dataSetsValues }, getters, colorThemeName) {
34156
34165
  const axisType = getChartAxisType(definition, {
34157
34166
  labelValues,
34158
34167
  dataSetsValues
@@ -34188,10 +34197,10 @@ set(value) {
34188
34197
  trendDataSetsValues,
34189
34198
  axisType,
34190
34199
  topPadding: getTopPaddingForDashboard(definition, getters),
34191
- background: getChartBackgroundColor(definition, getters)
34200
+ background: getChartBackgroundColor(definition, colorThemeName)
34192
34201
  };
34193
34202
  }
34194
- function getPieChartData(definition, { labelValues, dataSetsValues }, getters) {
34203
+ function getPieChartData(definition, { labelValues, dataSetsValues }, getters, colorThemeName) {
34195
34204
  let labels = labelValues.map(({ value, format }) => formatValue(value, {
34196
34205
  format,
34197
34206
  locale: getters.getLocale()
@@ -34206,10 +34215,10 @@ set(value) {
34206
34215
  labels,
34207
34216
  locale: getters.getLocale(),
34208
34217
  topPadding: getTopPaddingForDashboard(definition, getters),
34209
- background: getChartBackgroundColor(definition, getters)
34218
+ background: getChartBackgroundColor(definition, colorThemeName)
34210
34219
  };
34211
34220
  }
34212
- function getRadarChartData(definition, { labelValues, dataSetsValues }, getters) {
34221
+ function getRadarChartData(definition, { labelValues, dataSetsValues }, getters, colorThemeName) {
34213
34222
  let labels = labelValues.map(({ value, format }) => formatValue(value, {
34214
34223
  format,
34215
34224
  locale: getters.getLocale()
@@ -34222,10 +34231,10 @@ set(value) {
34222
34231
  axisFormats,
34223
34232
  labels,
34224
34233
  locale: getters.getLocale(),
34225
- background: getChartBackgroundColor(definition, getters)
34234
+ background: getChartBackgroundColor(definition, colorThemeName)
34226
34235
  };
34227
34236
  }
34228
- function getGeoChartData(definition, { labelValues, dataSetsValues }, getters) {
34237
+ function getGeoChartData(definition, { labelValues, dataSetsValues }, getters, colorThemeName) {
34229
34238
  dataSetsValues = dataSetsValues.slice(0, 1);
34230
34239
  let labels = labelValues.map(({ value, format }) => formatValue(value, {
34231
34240
  format,
@@ -34241,10 +34250,10 @@ set(value) {
34241
34250
  availableRegions: getters.getGeoChartAvailableRegions(),
34242
34251
  geoFeatureNameToId: getters.geoFeatureNameToId,
34243
34252
  getGeoJsonFeatures: getters.getGeoJsonFeatures,
34244
- background: getChartBackgroundColor(definition, getters)
34253
+ background: getChartBackgroundColor(definition, colorThemeName)
34245
34254
  };
34246
34255
  }
34247
- function getFunnelChartData(definition, { labelValues, dataSetsValues }, getters) {
34256
+ function getFunnelChartData(definition, { labelValues, dataSetsValues }, getters, colorThemeName) {
34248
34257
  let labels = labelValues.map(({ value, format }) => formatValue(value, {
34249
34258
  format,
34250
34259
  locale: getters.getLocale()
@@ -34258,10 +34267,10 @@ set(value) {
34258
34267
  axisFormats: { x: format },
34259
34268
  labels,
34260
34269
  locale: getters.getLocale(),
34261
- background: getChartBackgroundColor(definition, getters)
34270
+ background: getChartBackgroundColor(definition, colorThemeName)
34262
34271
  };
34263
34272
  }
34264
- function getHierarchalChartData(definition, { labelValues, dataSetsValues }, getters) {
34273
+ function getHierarchalChartData(definition, { labelValues, dataSetsValues }, getters, colorThemeName) {
34265
34274
  let labels = labelValues;
34266
34275
  ({labels, dataSetsValues} = filterValuesWithDifferentSigns(labels, dataSetsValues));
34267
34276
  ({labels, dataSetsValues} = filterInvalidHierarchicalPoints(labels, dataSetsValues));
@@ -34270,12 +34279,12 @@ set(value) {
34270
34279
  axisFormats: { y: getChartLabelFormat(labels) },
34271
34280
  labels: labels.map(({ value }) => String(value ?? "")),
34272
34281
  locale: getters.getLocale(),
34273
- background: getChartBackgroundColor(definition, getters)
34282
+ background: getChartBackgroundColor(definition, colorThemeName)
34274
34283
  };
34275
34284
  }
34276
- function getBubbleChartData(definition, getters) {
34285
+ function getBubbleChartData(definition, getters, colorThemeName) {
34277
34286
  const chartData = getBubbleChartSourceData(definition, getters);
34278
- const data = getLineChartData(definition, chartData, getters);
34287
+ const data = getLineChartData(definition, chartData, getters, colorThemeName);
34279
34288
  let labelValues = definition.labelRange ? getters.getVisibleRangeValues(definition.labelRange) : [];
34280
34289
  let sizeValues = definition.sizeRange ? getters.getVisibleRangeValues(definition.sizeRange) : [];
34281
34290
  if (chartData.shouldRemoveFirstLabel) {
@@ -35277,9 +35286,9 @@ set(value) {
35277
35286
  `;
35278
35287
  let app;
35279
35288
  function renderToString(templateName, context = {}) {
35280
- return render(templateName, context).innerHTML;
35289
+ return render$1(templateName, context).innerHTML;
35281
35290
  }
35282
- function render(templateName, context = {}) {
35291
+ function render$1(templateName, context = {}) {
35283
35292
  if (!app) app = new _odoo_owl.App({
35284
35293
  templates,
35285
35294
  translateFn: _t
@@ -35644,8 +35653,8 @@ set(value) {
35644
35653
  verticalAxis: getDefinedAxis(definition)
35645
35654
  };
35646
35655
  },
35647
- getRuntime(getters, definition, { extractData }, sheetId, eventHandlers) {
35648
- const chartData = getBarChartData(definition, extractData(), getters);
35656
+ getRuntime(getters, definition, { extractData }, sheetId, eventHandlers, colorThemeName) {
35657
+ const chartData = getBarChartData(definition, extractData(), getters, colorThemeName);
35649
35658
  return {
35650
35659
  chartJsConfig: {
35651
35660
  type: "bar",
@@ -35833,7 +35842,7 @@ set(value) {
35833
35842
  definition.sectionRule.upperInflectionPoint.value
35834
35843
  ].filter((value) => value.startsWith("=")).map((formula) => CompiledFormula.Compile(formula, sheetId, getters));
35835
35844
  },
35836
- getRuntime(getters, definition, dataSource, sheetId) {
35845
+ getRuntime(getters, definition, dataSource, sheetId, eventHandlers, colorThemeName) {
35837
35846
  const locale = getters.getLocale();
35838
35847
  const chartColors = definition.sectionRule.colors;
35839
35848
  let gaugeValue = void 0;
@@ -35854,7 +35863,7 @@ set(value) {
35854
35863
  }
35855
35864
  let minValue = getFormulaNumberValue(sheetId, definition.sectionRule.rangeMin, getters);
35856
35865
  let maxValue = getFormulaNumberValue(sheetId, definition.sectionRule.rangeMax, getters);
35857
- if (minValue === void 0 || maxValue === void 0) return getInvalidGaugeRuntime(definition, getters);
35866
+ if (minValue === void 0 || maxValue === void 0) return getInvalidGaugeRuntime(definition, getters, colorThemeName);
35858
35867
  if (maxValue < minValue) [minValue, maxValue] = [maxValue, minValue];
35859
35868
  const lowerPoint = definition.sectionRule.lowerInflectionPoint;
35860
35869
  const upperPoint = definition.sectionRule.upperInflectionPoint;
@@ -35886,7 +35895,7 @@ set(value) {
35886
35895
  }
35887
35896
  colors.push(chartColors.upperColor);
35888
35897
  return {
35889
- background: getters.getStyleOfSingleCellChart(definition.background, dataRange).background,
35898
+ background: getters.getStyleOfSingleCellChart(definition.background, dataRange, colorThemeName).background,
35890
35899
  title: {
35891
35900
  ...title,
35892
35901
  text: title.text ? getters.dynamicTranslate(title.text) : ""
@@ -35920,9 +35929,9 @@ set(value) {
35920
35929
  const value = getters.evaluateFormula(sheetId, formula);
35921
35930
  return isMultipleElementMatrix(value) ? void 0 : tryToNumber(toScalar(value), getters.getLocale());
35922
35931
  }
35923
- function getInvalidGaugeRuntime(definition, getters) {
35932
+ function getInvalidGaugeRuntime(definition, getters, colorThemeName) {
35924
35933
  return {
35925
- background: getters.getStyleOfSingleCellChart(definition.background, definition.dataRange).background,
35934
+ background: getters.getStyleOfSingleCellChart(definition.background, definition.dataRange, colorThemeName).background,
35926
35935
  title: definition.title ?? { text: "" },
35927
35936
  minValue: {
35928
35937
  value: 0,
@@ -36016,8 +36025,8 @@ set(value) {
36016
36025
  verticalAxis: getDefinedAxis(definition)
36017
36026
  };
36018
36027
  },
36019
- getRuntime(getters, definition, { extractData }, sheetId, eventHandlers) {
36020
- const chartData = getLineChartData(definition, extractData(), getters);
36028
+ getRuntime(getters, definition, { extractData }, sheetId, eventHandlers, colorThemeName) {
36029
+ const chartData = getLineChartData(definition, extractData(), getters, colorThemeName);
36021
36030
  return {
36022
36031
  chartJsConfig: {
36023
36032
  type: "line",
@@ -36098,8 +36107,8 @@ set(value) {
36098
36107
  labelRange
36099
36108
  };
36100
36109
  },
36101
- getRuntime(getters, definition, { extractData }, sheetId, eventHandlers) {
36102
- const chartData = getPieChartData(definition, extractData(), getters);
36110
+ getRuntime(getters, definition, { extractData }, sheetId, eventHandlers, colorThemeName) {
36111
+ const chartData = getPieChartData(definition, extractData(), getters, colorThemeName);
36103
36112
  return { chartJsConfig: {
36104
36113
  type: definition.isDoughnut ? "doughnut" : "pie",
36105
36114
  data: {
@@ -36175,8 +36184,8 @@ set(value) {
36175
36184
  };
36176
36185
  },
36177
36186
  getDefinitionForExcel: () => void 0,
36178
- getRuntime(getters, definition, { extractData }, sheetId, eventHandlers) {
36179
- const chartData = getBarChartData(definition, extractData(), getters);
36187
+ getRuntime(getters, definition, { extractData }, sheetId, eventHandlers, colorThemeName) {
36188
+ const chartData = getBarChartData(definition, extractData(), getters, colorThemeName);
36180
36189
  const { labels, datasets } = getWaterfallDatasetAndLabels(definition, chartData);
36181
36190
  return { chartJsConfig: {
36182
36191
  type: "bar",
@@ -36943,7 +36952,7 @@ set(value) {
36943
36952
  getGroupByOptions() {
36944
36953
  const sheetId = this.env.model.getters.getFigureSheetId(this.env.model.getters.getFigureIdFromChartId(this.props.chartId));
36945
36954
  const definition = SpreadsheetChart.fromStrDefinition(this.env.model.getters, sheetId, this.props.definition).getRangeDefinition();
36946
- const labels = getBarChartData(definition, getChartData(this.env.model.getters, definition.dataSource), this.env.model.getters).labels.filter((l) => isDateTime(l, DEFAULT_LOCALE));
36955
+ const labels = getBarChartData(definition, getChartData(this.env.model.getters, definition.dataSource), this.env.model.getters, this.env.model.getters.getSpreadsheetTheme().colorThemeName).labels.filter((l) => isDateTime(l, DEFAULT_LOCALE));
36947
36956
  if (labels.length === 0) return [];
36948
36957
  const dates = labels.map((label) => toJsDate(label, this.env.model.getters.getLocale()));
36949
36958
  const uniqueYears = /* @__PURE__ */ new Set();
@@ -37007,7 +37016,7 @@ set(value) {
37007
37016
  });
37008
37017
  popoverRef = _odoo_owl.signal.ref(HTMLTableElement);
37009
37018
  setup() {
37010
- useExternalListener(window, "click", this.closePopover);
37019
+ (0, _odoo_owl.useListener)(window, "click", this.closePopover.bind(this));
37011
37020
  }
37012
37021
  get currentColorScale() {
37013
37022
  return this.props.definition.colorScale || schemeToColorScale("oranges");
@@ -42026,7 +42035,7 @@ set(value) {
42026
42035
  useLayoutEffect((sheetId, isCfRemoved) => {
42027
42036
  if (this.activeSheetId !== sheetId || isCfRemoved) this.env.replaceSidePanel("ConditionalFormatting", `ConditionalFormattingEditor_${this.props.cf.id}`);
42028
42037
  }, () => [this.env.model.getters.getActiveSheetId(), this.isEditedCfRemoved]);
42029
- useExternalListener(window, "click", () => this.store.closeMenus());
42038
+ (0, _odoo_owl.useListener)(window, "click", () => this.store.closeMenus());
42030
42039
  }
42031
42040
  get isEditedCfRemoved() {
42032
42041
  return !Boolean(this.env.model.getters.getConditionalFormats(this.activeSheetId).find((cf) => cf.id === this.props.cf.id));
@@ -42299,7 +42308,7 @@ set(value) {
42299
42308
  canvas.className = "w-100 h-100";
42300
42309
  container.appendChild(canvas);
42301
42310
  spreadsheet.appendChild(container);
42302
- destroyChart = drawChartOnCanvas(canvas, SpreadsheetChart.fromStrDefinition(getters, sheetId, definition).getRuntime(getters, "newChart"), {
42311
+ destroyChart = drawChartOnCanvas(canvas, SpreadsheetChart.fromStrDefinition(getters, sheetId, definition).getRuntime(getters, "newChart", getters.getSpreadsheetTheme().colorThemeName), {
42303
42312
  width,
42304
42313
  height
42305
42314
  }, definition.type, zoom);
@@ -42380,7 +42389,7 @@ set(value) {
42380
42389
  getChartConfiguration() {
42381
42390
  const getters = this.env.model.getters;
42382
42391
  const activeSheetId = getters.getActiveSheetId();
42383
- const runtime = SpreadsheetChart.fromStrDefinition(getters, activeSheetId, this.props.definition).getRuntime(getters, "myChart");
42392
+ const runtime = SpreadsheetChart.fromStrDefinition(getters, activeSheetId, this.props.definition).getRuntime(getters, "myChart", getters.getSpreadsheetTheme().colorThemeName);
42384
42393
  if (!("chartJsConfig" in runtime)) return null;
42385
42394
  let config = runtime.chartJsConfig;
42386
42395
  const existingScales = config.options?.scales ?? {};
@@ -42447,7 +42456,7 @@ set(value) {
42447
42456
  const canvas = this.chartCanvasRef();
42448
42457
  if (!canvas) return;
42449
42458
  const getters = this.env.model.getters;
42450
- let runtime = SpreadsheetChart.fromStrDefinition(getters, getters.getActiveSheetId(), this.props.definition).getRuntime(getters, "myChart");
42459
+ let runtime = SpreadsheetChart.fromStrDefinition(getters, getters.getActiveSheetId(), this.props.definition).getRuntime(getters, "myChart", getters.getSpreadsheetTheme().colorThemeName);
42451
42460
  const { type } = this.props.definition;
42452
42461
  if (type === "scorecard") {
42453
42462
  const rect = canvas.getBoundingClientRect();
@@ -43929,6 +43938,7 @@ set(value) {
43929
43938
  mutators = [
43930
43939
  "updateSearchOptions",
43931
43940
  "updateSearchContent",
43941
+ "updateReplaceContent",
43932
43942
  "searchFormulas",
43933
43943
  "selectPreviousMatch",
43934
43944
  "selectNextMatch",
@@ -43981,6 +43991,9 @@ set(value) {
43981
43991
  updateSearchContent(toSearch) {
43982
43992
  this._updateSearch(toSearch, this.searchOptions);
43983
43993
  }
43994
+ updateReplaceContent(toReplace) {
43995
+ this.toReplace = toReplace;
43996
+ }
43984
43997
  updateSearchOptions(searchOptions) {
43985
43998
  this._updateSearch(this.toSearch, {
43986
43999
  ...this.searchOptions,
@@ -44338,7 +44351,7 @@ set(value) {
44338
44351
  get currentSheetMatchesCount() {
44339
44352
  const { activeSheetMatchesCount: count, activeSheetHiddenMatchesCount: hidden, searchOptions } = this.store;
44340
44353
  const sheetName = this.env.model.getters.getSheetName(this.env.model.getters.getActiveSheetId());
44341
- let label = count === 1 ? _t("1 match in %(sheetName)s", { sheetName }) : _t("%(count)s matches in %(sheetName)s", {
44354
+ let label = count === 1 ? _t("1 match in '%(sheetName)s'", { sheetName }) : _t("%(count)s matches in '%(sheetName)s'", {
44342
44355
  count,
44343
44356
  sheetName
44344
44357
  });
@@ -44350,10 +44363,10 @@ set(value) {
44350
44363
  if (!range) return "";
44351
44364
  const { specificRangeMatchesCount: count, specificRangeHiddenMatchesCount: hidden, searchOptions } = this.store;
44352
44365
  const { sheetId, zone } = range;
44353
- let label = count === 1 ? _t("1 match in range %(range)s of %(sheetName)s", {
44366
+ let label = count === 1 ? _t("1 match in range %(range)s of '%(sheetName)s'", {
44354
44367
  range: zoneToXc(zone),
44355
44368
  sheetName: this.env.model.getters.getSheetName(sheetId)
44356
- }) : _t("%(count)s matches in range %(range)s of %(sheetName)s", {
44369
+ }) : _t("%(count)s matches in range %(range)s of '%(sheetName)s'", {
44357
44370
  count,
44358
44371
  range: zoneToXc(zone),
44359
44372
  sheetName: this.env.model.getters.getSheetName(sheetId)
@@ -44381,7 +44394,7 @@ set(value) {
44381
44394
  (0, _odoo_owl.onMounted)(() => this.searchInputRef()?.focus());
44382
44395
  (0, _odoo_owl.onWillUnmount)(() => this.updateSearchContent.stopDebounce());
44383
44396
  this.updateSearchContent = debounce(this.store.updateSearchContent, 200);
44384
- useExternalListener(window, "keydown", (ev) => {
44397
+ (0, _odoo_owl.useListener)(window, "keydown", (ev) => {
44385
44398
  const code = keyboardEventToShortcutString(ev);
44386
44399
  if (code === "Ctrl+F" || code === "Ctrl+H") {
44387
44400
  this.searchInputRef()?.focus();
@@ -44396,6 +44409,9 @@ set(value) {
44396
44409
  onSearchInput(ev) {
44397
44410
  this.updateSearchContent(ev.target.value);
44398
44411
  }
44412
+ onReplaceInput(ev) {
44413
+ this.store.updateReplaceContent(ev.target.value);
44414
+ }
44399
44415
  onKeydownPanel(ev) {
44400
44416
  if (ev.key === "Escape") {
44401
44417
  ev.preventDefault();
@@ -45976,7 +45992,7 @@ set(value) {
45976
45992
  buttonFilter = _odoo_owl.signal.ref();
45977
45993
  popover;
45978
45994
  setup() {
45979
- useExternalListener(window, "click", (ev) => {
45995
+ (0, _odoo_owl.useListener)(window, "click", (ev) => {
45980
45996
  if (!isChildEvent(this.buttonFilter(), ev)) this.popover.isOpen = false;
45981
45997
  });
45982
45998
  (0, _odoo_owl.onWillUpdateProps)((nextProps) => {
@@ -46110,7 +46126,7 @@ set(value) {
46110
46126
  setup() {
46111
46127
  this.autoComplete = useLocalStore(AutoCompleteStore);
46112
46128
  this.autoComplete.useProvider(this.getProvider());
46113
- useExternalListener(window, "click", (ev) => {
46129
+ (0, _odoo_owl.useListener)(window, "click", (ev) => {
46114
46130
  if (ev.target !== this.buttonRef()) this.popover.isOpen = false;
46115
46131
  });
46116
46132
  useAutofocus(this.autofocusRef);
@@ -48488,7 +48504,7 @@ set(value) {
48488
48504
  tableStyleListRef = _odoo_owl.signal.ref();
48489
48505
  state = (0, _odoo_owl.proxy)({ selectedCategory: this.initialSelectedCategory });
48490
48506
  setup() {
48491
- useExternalListener(window, "click", this.onExternalClick, { capture: true });
48507
+ (0, _odoo_owl.useListener)(window, "click", this.onExternalClick.bind(this), { capture: true });
48492
48508
  }
48493
48509
  onExternalClick(ev) {
48494
48510
  const el = this.tableStyleListRef();
@@ -49703,7 +49719,8 @@ set(value) {
49703
49719
  static components = {
49704
49720
  Section,
49705
49721
  RoundColorPicker,
49706
- TableStylePreview
49722
+ TableStylePreview,
49723
+ TextInput
49707
49724
  };
49708
49725
  props = (0, _odoo_owl.useProps)({
49709
49726
  onCloseSidePanel: types.function(),
@@ -49712,7 +49729,7 @@ set(value) {
49712
49729
  });
49713
49730
  state = (0, _odoo_owl.proxy)(this.getInitialState());
49714
49731
  setup() {
49715
- useExternalListener(window, "click", () => this.state.pickerOpened = false);
49732
+ (0, _odoo_owl.useListener)(window, "click", () => this.state.pickerOpened = false);
49716
49733
  }
49717
49734
  getInitialState() {
49718
49735
  const editedStyle = this.props.styleId ? this.env.model.getters.getTableStyle(this.props.styleId) : null;
@@ -53589,6 +53606,15 @@ set(value) {
53589
53606
  }
53590
53607
  };
53591
53608
 
53609
+ //#endregion
53610
+ //#region src/helpers/owl3_helpers.ts
53611
+ /**
53612
+ * Comes from https://github.com/odoo/odoo/blob/master/addons/web/static/src/owl2/utils.js
53613
+ */
53614
+ function render(component, deep = false) {
53615
+ component.__owl__.render(deep);
53616
+ }
53617
+
53592
53618
  //#endregion
53593
53619
  //#region src/components/helpers/figure_drag_helper.ts
53594
53620
  function dragFigureForMove({ x: mouseX, y: mouseY }, { x: mouseInitialX, y: mouseInitialY }, initialFigures, { maxX, maxY }, { scrollX: initialScrollX, scrollY: initialScrollY }, { scrollX, scrollY }) {
@@ -53606,19 +53632,19 @@ set(value) {
53606
53632
  };
53607
53633
  });
53608
53634
  }
53609
- function dragFigureForResize(initialFigure, dirX, dirY, { x: mouseX, y: mouseY }, { x: mouseInitialX, y: mouseInitialY }, keepRatio, minFigSize, { scrollX: initialScrollX, scrollY: initialScrollY }, { scrollX, scrollY }, { maxX, maxY }) {
53610
- let { x, y, width, height } = initialFigure;
53635
+ function dragFigureForResize(initialRect, dirX, dirY, { x: mouseX, y: mouseY }, { x: mouseInitialX, y: mouseInitialY }, keepRatio, minFigSize, { scrollX: initialScrollX, scrollY: initialScrollY }, { scrollX, scrollY }, { maxX, maxY }) {
53636
+ let { x, y, width, height } = initialRect;
53611
53637
  if (keepRatio && dirX !== 0 && dirY !== 0) {
53612
- const deltaX = Math.min(dirX * (mouseInitialX - mouseX + scrollX - initialScrollX), width - minFigSize);
53613
- const deltaY = Math.min(dirY * (mouseInitialY - mouseY + scrollY - initialScrollY), height - minFigSize);
53638
+ const deltaX = Math.min(dirX * (mouseInitialX - mouseX + scrollX - initialScrollX), width - minFigSize.width);
53639
+ const deltaY = Math.min(dirY * (mouseInitialY - mouseY + scrollY - initialScrollY), height - minFigSize.height);
53614
53640
  const fraction = Math.min(deltaX / width, deltaY / height);
53615
53641
  if (dirX < 0) x = x + width * fraction;
53616
53642
  if (dirY < 0) y = y + height * fraction;
53617
53643
  width = width * (1 - fraction);
53618
53644
  height = height * (1 - fraction);
53619
53645
  } else {
53620
- const deltaX = Math.max(dirX * (mouseX - mouseInitialX + scrollX - initialScrollX), minFigSize - width);
53621
- const deltaY = Math.max(dirY * (mouseY - mouseInitialY + scrollY - initialScrollY), minFigSize - height);
53646
+ const deltaX = Math.max(dirX * (mouseX - mouseInitialX + scrollX - initialScrollX), minFigSize.width - width);
53647
+ const deltaY = Math.max(dirY * (mouseY - mouseInitialY + scrollY - initialScrollY), minFigSize.height - height);
53622
53648
  width = width + deltaX;
53623
53649
  height = height + deltaY;
53624
53650
  if (dirX < 0) x = x - deltaX;
@@ -53633,7 +53659,6 @@ set(value) {
53633
53659
  y = -scrollY;
53634
53660
  } else if (y + height > maxY) height = maxY - y;
53635
53661
  return {
53636
- ...initialFigure,
53637
53662
  x,
53638
53663
  y,
53639
53664
  width,
@@ -53696,29 +53721,30 @@ set(value) {
53696
53721
  * Try to snap the given figure to the other figures when resizing the figure, and return the snapped
53697
53722
  * figure and the possible snap lines, if any were found
53698
53723
  */
53699
- function snapForResize(env, resizeDirX, resizeDirY, figureToSnap, otherFigures) {
53700
- const verticalSnapLine = getSnapLine(env, figureToSnap, [resizeDirX === -1 ? "left" : "right"], otherFigures, ["right", "left"]);
53724
+ function snapForResize(env, resizeDirX, resizeDirY, rect, otherFigures) {
53725
+ const verticalSnapLine = getSnapLine(env, rect, [resizeDirX === -1 ? "left" : "right"], otherFigures, ["right", "left"]);
53726
+ const horizontalSnapLine = getSnapLine(env, rect, [resizeDirY === -1 ? "top" : "bottom"], otherFigures, ["bottom", "top"]);
53701
53727
  if (verticalSnapLine) {
53702
- if (resizeDirX === 1) figureToSnap.width -= verticalSnapLine.snapOffset;
53728
+ if (resizeDirX === 1) rect.width -= verticalSnapLine.snapOffset;
53703
53729
  else if (resizeDirX === -1) {
53704
- figureToSnap.x -= verticalSnapLine.snapOffset;
53705
- figureToSnap.width += verticalSnapLine.snapOffset;
53730
+ rect.x -= verticalSnapLine.snapOffset;
53731
+ rect.width += verticalSnapLine.snapOffset;
53706
53732
  }
53707
53733
  }
53708
- const horizontalSnapLine = getSnapLine(env, figureToSnap, [resizeDirY === -1 ? "top" : "bottom"], otherFigures, ["bottom", "top"]);
53709
53734
  if (horizontalSnapLine) {
53710
- if (resizeDirY === 1) figureToSnap.height -= horizontalSnapLine.snapOffset;
53735
+ if (resizeDirY === 1) rect.height -= horizontalSnapLine.snapOffset;
53711
53736
  else if (resizeDirY === -1) {
53712
- figureToSnap.y -= horizontalSnapLine.snapOffset;
53713
- figureToSnap.height += horizontalSnapLine.snapOffset;
53737
+ rect.y -= horizontalSnapLine.snapOffset;
53738
+ rect.height += horizontalSnapLine.snapOffset;
53714
53739
  }
53715
53740
  }
53716
- figureToSnap.x = Math.round(figureToSnap.x);
53717
- figureToSnap.y = Math.round(figureToSnap.y);
53718
- figureToSnap.height = Math.round(figureToSnap.height);
53719
- figureToSnap.width = Math.round(figureToSnap.width);
53720
53741
  return {
53721
- snappedFigures: [figureToSnap],
53742
+ snappedRect: {
53743
+ x: Math.round(rect.x),
53744
+ y: Math.round(rect.y),
53745
+ width: Math.round(rect.width),
53746
+ height: Math.round(rect.height)
53747
+ },
53722
53748
  verticalSnapLine,
53723
53749
  horizontalSnapLine
53724
53750
  };
@@ -53909,7 +53935,7 @@ set(value) {
53909
53935
  this.zoomStore = useStore(ZoomStore);
53910
53936
  this.chartDragStore = useStore(ChartDragStore);
53911
53937
  (0, _odoo_owl.onMounted)(() => {
53912
- this.render();
53938
+ render(this);
53913
53939
  });
53914
53940
  (0, _odoo_owl.onWillUpdateProps)(() => {
53915
53941
  const sheetId = this.env.model.getters.getActiveSheetId();
@@ -53983,6 +54009,13 @@ set(value) {
53983
54009
  get selectedRectStyle() {
53984
54010
  return this.dnd.selectedRect ? this.rectToCss(this.dnd.selectedRect) : "";
53985
54011
  }
54012
+ get maxDimensions() {
54013
+ const sheetId = this.env.model.getters.getActiveSheetId();
54014
+ return {
54015
+ maxX: this.env.model.getters.getColDimensions(sheetId, this.env.model.getters.getNumberCols(sheetId) - 1).end,
54016
+ maxY: this.env.model.getters.getRowDimensions(sheetId, this.env.model.getters.getNumberRows(sheetId) - 1).end
54017
+ };
54018
+ }
53986
54019
  getInverseViewportPositionStyle(container) {
53987
54020
  const { scrollX, scrollY } = this.viewStore.activeSheetScrollInfo;
53988
54021
  const { x: viewportX, y: viewportY } = this.viewStore.mainViewportCoordinates;
@@ -54040,12 +54073,9 @@ set(value) {
54040
54073
  y: ev.clientY / zoom
54041
54074
  };
54042
54075
  const initialScrollPosition = this.viewStore.activeSheetScrollInfo;
54076
+ const maxDimensions = this.maxDimensions;
54043
54077
  const initialFigures = this.env.model.getters.getSelectedFigureIds().map((id) => this.env.model.getters.getFigure(sheetId, id)).filter(isDefined).map((f) => this.env.model.getters.getFigureUI(sheetId, f)).map(this.toBottomRightViewport.bind(this));
54044
54078
  const draggedFigureId = figureUI.id;
54045
- const maxDimensions = {
54046
- maxX: this.env.model.getters.getColDimensions(sheetId, this.env.model.getters.getNumberCols(sheetId) - 1).end,
54047
- maxY: this.env.model.getters.getRowDimensions(sheetId, this.env.model.getters.getNumberRows(sheetId) - 1).end
54048
- };
54049
54079
  let hasStartedDnd = false;
54050
54080
  let overlappingChartOrCarousel = void 0;
54051
54081
  const onMouseMove = (ev) => {
@@ -54092,7 +54122,7 @@ set(value) {
54092
54122
  ...this.viewStore.viewports.getPositionAnchorOffset(sheetId, f)
54093
54123
  };
54094
54124
  }) || [];
54095
- this.env.model.dispatch("MOVE_FIGURES", { figures: payloads });
54125
+ this.env.model.dispatch("UPDATE_FIGURES", { figures: payloads });
54096
54126
  } else {
54097
54127
  const overlappingFigureId = overlappingChartOrCarousel.id;
54098
54128
  const chartFigureIds = this.dnd.selectedFigures?.map((f) => f.id) || [];
@@ -54117,7 +54147,7 @@ set(value) {
54117
54147
  this.dnd.cancelDnd = startDnd(onMouseMove, onMouseUp);
54118
54148
  }
54119
54149
  /**
54120
- * Initialize the resize of a figure with mouse movements
54150
+ * Initialize the resize of the selected figures with mouse movements
54121
54151
  *
54122
54152
  * @param dirX X direction of the resize. -1 : resize from the left border of the figure, 0 : no resize in X, 1 :
54123
54153
  * resize from the right border of the figure
@@ -54125,44 +54155,78 @@ set(value) {
54125
54155
  * resize from the bottom border of the figure
54126
54156
  * @param ev Mouse Event
54127
54157
  */
54128
- startResize(figureUI, dirX, dirY, ev) {
54158
+ resizeAllSelectedFigures(dirX, dirY, ev) {
54129
54159
  ev.stopPropagation();
54130
- const initialScrollPosition = this.viewStore.activeSheetScrollInfo;
54131
- const keepRatio = figureRegistry.get(figureUI.tag).keepRatio || false;
54132
- const minFigSize = figureRegistry.get(figureUI.tag).minFigSize || 80;
54133
- const zoom = this.zoomStore.zoomLevel;
54134
54160
  const sheetId = this.env.model.getters.getActiveSheetId();
54161
+ const zoom = this.zoomStore.zoomLevel;
54135
54162
  const initialMousePosition = {
54136
54163
  x: ev.clientX / zoom,
54137
54164
  y: ev.clientY / zoom
54138
54165
  };
54139
- const maxDimensions = {
54140
- maxX: this.env.model.getters.getColDimensions(sheetId, this.env.model.getters.getNumberCols(sheetId) - 1).end,
54141
- maxY: this.env.model.getters.getRowDimensions(sheetId, this.env.model.getters.getNumberRows(sheetId) - 1).end
54142
- };
54166
+ const initialScrollPosition = this.viewStore.activeSheetScrollInfo;
54167
+ const maxDimensions = this.maxDimensions;
54168
+ const selectedFiguresIds = this.env.model.getters.getSelectedFigureIds();
54169
+ const initialFigures = selectedFiguresIds.map((id) => this.env.model.getters.getFigure(sheetId, id)).filter(isDefined).map((figure) => this.env.model.getters.getFigureUI(sheetId, figure)).map(this.toBottomRightViewport.bind(this));
54170
+ const mutlipleFiguresSelected = selectedFiguresIds.length > 1;
54171
+ const otherFiguresUI = this.getOtherFigures(selectedFiguresIds);
54172
+ if (initialFigures.length === 0) return;
54173
+ let minAggregateSize;
54174
+ if (mutlipleFiguresSelected) {
54175
+ const widthScaleMax = Math.max(...initialFigures.map((f) => {
54176
+ return figureRegistry.get(f.tag).minFigSize / f.width;
54177
+ }));
54178
+ const heightScaleMax = Math.max(...initialFigures.map((f) => {
54179
+ return figureRegistry.get(f.tag).minFigSize / f.height;
54180
+ }));
54181
+ const initialAggregateRect = rectUnion(...initialFigures);
54182
+ minAggregateSize = {
54183
+ width: Math.round(initialAggregateRect.width * widthScaleMax),
54184
+ height: Math.round(initialAggregateRect.height * heightScaleMax)
54185
+ };
54186
+ } else {
54187
+ const minFigSize = figureRegistry.get(initialFigures[0].tag).minFigSize;
54188
+ minAggregateSize = {
54189
+ width: minFigSize,
54190
+ height: minFigSize
54191
+ };
54192
+ }
54143
54193
  const onMouseMove = (ev) => {
54144
- const draggedFigure = dragFigureForResize(figureUI, dirX, dirY, {
54194
+ const currentMousePosition = {
54145
54195
  x: ev.clientX / zoom,
54146
54196
  y: ev.clientY / zoom
54147
- }, initialMousePosition, keepRatio, minFigSize, initialScrollPosition, this.viewStore.activeSheetScrollInfo, maxDimensions);
54148
- const otherFigures = this.getOtherFigures([figureUI.id]);
54149
- const snapResult = snapForResize(this.env, dirX, dirY, draggedFigure, otherFigures);
54150
- this.dnd.draggedFigure = snapResult.snappedFigures[0];
54151
- this.dnd.selectedFigures = [this.dnd.draggedFigure];
54152
- this.dnd.selectedRect = void 0;
54153
- this.dnd.horizontalSnap = this.getSnap(snapResult.horizontalSnapLine);
54154
- this.dnd.verticalSnap = this.getSnap(snapResult.verticalSnapLine);
54197
+ };
54198
+ const keepRatio = mutlipleFiguresSelected || ev.shiftKey ? true : figureRegistry.get(initialFigures[0].tag).keepRatio || false;
54199
+ const initialRect = rectUnion(...initialFigures);
54200
+ const resizedRect = dragFigureForResize(initialRect, dirX, dirY, currentMousePosition, initialMousePosition, keepRatio, minAggregateSize, initialScrollPosition, this.viewStore.activeSheetScrollInfo, maxDimensions);
54201
+ const { snappedRect, verticalSnapLine, horizontalSnapLine } = snapForResize(this.env, dirX, dirY, resizedRect, otherFiguresUI);
54202
+ const scaleX = snappedRect.width / initialRect.width;
54203
+ const scaleY = snappedRect.height / initialRect.height;
54204
+ const snappedFigures = initialFigures.map((figureUI) => ({
54205
+ ...figureUI,
54206
+ x: Math.round(snappedRect.x + (figureUI.x - initialRect.x) * scaleX),
54207
+ y: Math.round(snappedRect.y + (figureUI.y - initialRect.y) * scaleY),
54208
+ width: Math.round(figureUI.width * scaleX),
54209
+ height: Math.round(figureUI.height * scaleY)
54210
+ }));
54211
+ this.dnd.draggedFigure = snappedFigures[0];
54212
+ this.dnd.selectedFigures = snappedFigures;
54213
+ this.dnd.selectedRect = this.getDndFigureRect();
54214
+ this.dnd.horizontalSnap = this.getSnap(horizontalSnapLine);
54215
+ this.dnd.verticalSnap = this.getSnap(verticalSnapLine);
54155
54216
  };
54156
- const onMouseUp = (ev) => {
54157
- if (!this.dnd.draggedFigure) return;
54158
- const update = this.viewStore.viewports.getPositionAnchorOffset(this.env.model.getters.getActiveSheetId(), this.dnd.draggedFigure);
54159
- if (dirX) update.width = this.dnd.draggedFigure.width;
54160
- if (dirY) update.height = this.dnd.draggedFigure.height;
54161
- this.env.model.dispatch("UPDATE_FIGURE", {
54162
- sheetId: this.env.model.getters.getActiveSheetId(),
54163
- figureId: figureUI.id,
54164
- ...update
54217
+ const onMouseUp = () => {
54218
+ if (!this.dnd.selectedFigures) return;
54219
+ const dispatchPayload = this.dnd.selectedFigures.map((figureUI) => {
54220
+ const update = this.viewStore.viewports.getPositionAnchorOffset(sheetId, figureUI);
54221
+ if (dirX) update.width = figureUI.width;
54222
+ if (dirY) update.height = figureUI.height;
54223
+ return {
54224
+ sheetId,
54225
+ figureId: figureUI.id,
54226
+ ...update
54227
+ };
54165
54228
  });
54229
+ this.env.model.dispatch("UPDATE_FIGURES", { figures: dispatchPayload });
54166
54230
  this.dnd.draggedFigure = void 0;
54167
54231
  this.dnd.selectedFigures = void 0;
54168
54232
  this.dnd.selectedRect = void 0;
@@ -54825,7 +54889,7 @@ set(value) {
54825
54889
  passive: false,
54826
54890
  capture: false
54827
54891
  });
54828
- useExternalListener(window, "pointerup", onPointerUp, {
54892
+ (0, _odoo_owl.useListener)(window, "pointerup", onPointerUp, {
54829
54893
  passive: false,
54830
54894
  capture: true
54831
54895
  });
@@ -55389,10 +55453,10 @@ set(value) {
55389
55453
  this.checkboxToggleStore = useStore(CheckboxToggleStore);
55390
55454
  useStore(ArrayFormulaHighlight);
55391
55455
  this.automaticSumStore = useLocalStore(AutomaticSumStore);
55392
- useChildSubEnv({ getPopoverContainerRect: () => this.getGridRect() });
55393
- useExternalListener(document.body, "cut", this.copy.bind(this, true));
55394
- useExternalListener(document.body, "copy", this.copy.bind(this, false));
55395
- useExternalListener(document.body, "paste", this.paste);
55456
+ useSubEnv({ getPopoverContainerRect: () => this.getGridRect() });
55457
+ (0, _odoo_owl.useListener)(document.body, "cut", this.copy.bind(this, true));
55458
+ (0, _odoo_owl.useListener)(document.body, "copy", this.copy.bind(this, false));
55459
+ (0, _odoo_owl.useListener)(document.body, "paste", this.paste.bind(this));
55396
55460
  (0, _odoo_owl.onMounted)(() => this.focusDefaultElement());
55397
55461
  this.props.exposeFocus(() => this.focusDefaultElement());
55398
55462
  useGridDrawing({
@@ -64523,36 +64587,37 @@ set(value) {
64523
64587
  //#endregion
64524
64588
  //#region src/plugins/ui_core_views/evaluation_chart.ts
64525
64589
  var EvaluationChartPlugin = class extends CoreViewPlugin {
64526
- static getters = ["getChartRuntime", "getStyleOfSingleCellChart"];
64590
+ static getters = ["getStyleOfSingleCellChart", "getChartRuntimeWithTheme"];
64527
64591
  charts = {};
64528
64592
  handle(cmd) {
64529
- if (invalidateEvaluationCommands.has(cmd.type) || invalidateCFEvaluationCommands.has(cmd.type) || invalidateChartEvaluationCommands.has(cmd.type)) for (const chartId in this.charts) this.charts[chartId] = void 0;
64593
+ if (invalidateEvaluationCommands.has(cmd.type) || invalidateCFEvaluationCommands.has(cmd.type) || invalidateChartEvaluationCommands.has(cmd.type)) for (const chartId in this.charts) this.charts[chartId] = {};
64530
64594
  switch (cmd.type) {
64531
64595
  case "UPDATE_CHART":
64532
64596
  case "CREATE_CHART":
64533
- this.charts[cmd.chartId] = void 0;
64597
+ this.charts[cmd.chartId] = {};
64534
64598
  break;
64535
64599
  case "DELETE_CHART":
64536
- this.charts[cmd.chartId] = void 0;
64600
+ this.charts[cmd.chartId] = {};
64537
64601
  break;
64538
64602
  case "DELETE_SHEET":
64539
- for (const chartId in this.charts) if (!this.getters.isChartDefined(chartId)) this.charts[chartId] = void 0;
64603
+ for (const chartId in this.charts) if (!this.getters.isChartDefined(chartId)) this.charts[chartId] = {};
64540
64604
  break;
64541
64605
  }
64542
64606
  }
64543
- getChartRuntime(chartId) {
64544
- if (!this.charts[chartId]) {
64607
+ getChartRuntimeWithTheme(chartId, colorThemeName) {
64608
+ if (!this.charts[chartId]) this.charts[chartId] = {};
64609
+ if (!this.charts[chartId][colorThemeName]) {
64545
64610
  const chart = this.getters.getChart(chartId);
64546
64611
  if (!chart) throw new Error(`No chart for the given id: ${chartId}`);
64547
- this.charts[chartId] = this.createRuntimeChart(chartId, chart);
64612
+ this.charts[chartId][colorThemeName] = this.createRuntimeChart(chartId, chart, colorThemeName);
64548
64613
  }
64549
- return this.charts[chartId];
64614
+ return this.charts[chartId][colorThemeName];
64550
64615
  }
64551
64616
  /**
64552
64617
  * Get the background and textColor of a chart based on the color of the first cell of the main range of the chart.
64553
64618
  */
64554
- getStyleOfSingleCellChart(chartBackground, mainRange) {
64555
- const themeBackground = this.getters.getSpreadsheetTheme().backgroundColor;
64619
+ getStyleOfSingleCellChart(chartBackground, mainRange, colorThemeName) {
64620
+ const themeBackground = COLOR_THEMES[colorThemeName].backgroundColor;
64556
64621
  if (chartBackground) return {
64557
64622
  background: chartBackground,
64558
64623
  fontColor: chartFontColor(chartBackground)
@@ -64593,7 +64658,7 @@ set(value) {
64593
64658
  else {
64594
64659
  if (!chart) continue;
64595
64660
  const type = this.getters.getChartType(chartId);
64596
- const img = await chartToImageUrl(this.getters.getChartRuntime(chartId), figure, type);
64661
+ const img = await chartToImageUrl(this.getChartRuntimeWithTheme(chartId, "light"), figure, type);
64597
64662
  if (img) sheet.images.push({
64598
64663
  ...figure,
64599
64664
  tag: "image",
@@ -64611,9 +64676,9 @@ set(value) {
64611
64676
  sheet.charts = figures;
64612
64677
  }
64613
64678
  }
64614
- createRuntimeChart(chartId, chart) {
64679
+ createRuntimeChart(chartId, chart, colorThemeName) {
64615
64680
  const definition = chart.getRangeDefinition();
64616
- const runtime = chart.getRuntime(this.getters, chartId);
64681
+ const runtime = chart.getRuntime(this.getters, chartId, colorThemeName);
64617
64682
  if ("chartJsConfig" in runtime && /line|combo|bar|scatter|waterfall/.test(definition.type)) {
64618
64683
  const chartJsConfig = runtime.chartJsConfig;
64619
64684
  runtime["masterChartConfig"] = generateMasterChartConfig(chartJsConfig);
@@ -65979,6 +66044,39 @@ set(value) {
65979
66044
  }
65980
66045
  };
65981
66046
 
66047
+ //#endregion
66048
+ //#region src/plugins/ui_plugin.ts
66049
+ /**
66050
+ * UI plugins handle any transient data required to display a spreadsheet.
66051
+ * They can draw on the grid canvas.
66052
+ */
66053
+ var UIPlugin = class extends BasePlugin {
66054
+ static layers = [];
66055
+ getters;
66056
+ ui;
66057
+ selection;
66058
+ dispatch;
66059
+ canDispatch;
66060
+ constructor({ getters, stateObserver, dispatch, canDispatch, uiActions, selection }) {
66061
+ super(stateObserver);
66062
+ this.getters = getters;
66063
+ this.ui = uiActions;
66064
+ this.selection = selection;
66065
+ this.dispatch = dispatch;
66066
+ this.canDispatch = canDispatch;
66067
+ }
66068
+ drawLayer(ctx, layer) {}
66069
+ };
66070
+
66071
+ //#endregion
66072
+ //#region src/plugins/ui_feature/chart_ui.ts
66073
+ var ChartUIPlugin = class extends UIPlugin {
66074
+ static getters = ["getChartRuntime"];
66075
+ getChartRuntime(chartId) {
66076
+ return this.getters.getChartRuntimeWithTheme(chartId, this.getters.getSpreadsheetTheme().colorThemeName);
66077
+ }
66078
+ };
66079
+
65982
66080
  //#endregion
65983
66081
  //#region src/helpers/range_adapter_functions.ts
65984
66082
  function getRangeAdapterFunctions(executedCommand) {
@@ -66968,30 +67066,6 @@ set(value) {
66968
67066
  }
66969
67067
  };
66970
67068
 
66971
- //#endregion
66972
- //#region src/plugins/ui_plugin.ts
66973
- /**
66974
- * UI plugins handle any transient data required to display a spreadsheet.
66975
- * They can draw on the grid canvas.
66976
- */
66977
- var UIPlugin = class extends BasePlugin {
66978
- static layers = [];
66979
- getters;
66980
- ui;
66981
- selection;
66982
- dispatch;
66983
- canDispatch;
66984
- constructor({ getters, stateObserver, dispatch, canDispatch, uiActions, selection }) {
66985
- super(stateObserver);
66986
- this.getters = getters;
66987
- this.ui = uiActions;
66988
- this.selection = selection;
66989
- this.dispatch = dispatch;
66990
- this.canDispatch = canDispatch;
66991
- }
66992
- drawLayer(ctx, layer) {}
66993
- };
66994
-
66995
67069
  //#endregion
66996
67070
  //#region src/plugins/ui_feature/collaborative.ts
66997
67071
  var CollaborativePlugin = class extends UIPlugin {
@@ -67075,41 +67149,6 @@ set(value) {
67075
67149
 
67076
67150
  //#endregion
67077
67151
  //#region src/plugins/ui_feature/color_theme.ts
67078
- const FROZEN_PANE_HEADER_BORDER_COLOR = "#BCBCBC";
67079
- const FROZEN_PANE_BORDER_COLOR = "#DADFE8";
67080
- const HEADER_BORDER_COLOR = "#C0C0C0";
67081
- const TEXT_HEADER_COLOR = "#666666";
67082
- const BACKGROUND_HEADER_COLOR = "#F8F9FA";
67083
- const BACKGROUND_HEADER_SELECTED_COLOR = "#E8EAED";
67084
- const BACKGROUND_HEADER_ACTIVE_COLOR = "#595959";
67085
- const COLOR_THEMES = {
67086
- light: {
67087
- backgroundColor: "#FFFFFF",
67088
- gridBorderColor: "#CECFCF",
67089
- headerBackgroundColor: BACKGROUND_HEADER_COLOR,
67090
- headerActiveBackgroundColor: BACKGROUND_HEADER_ACTIVE_COLOR,
67091
- headerSelectedBackgroundColor: BACKGROUND_HEADER_SELECTED_COLOR,
67092
- headerTextColor: TEXT_HEADER_COLOR,
67093
- headerBorderColor: HEADER_BORDER_COLOR,
67094
- frozenPaneBorderColor: FROZEN_PANE_BORDER_COLOR,
67095
- frozenPaneHeaderBorderColor: FROZEN_PANE_HEADER_BORDER_COLOR,
67096
- singleCellSelectionBackgroundColor: "#F3F7FE",
67097
- multipleCellsSelectionBackgroundColor: "#E9F0FF"
67098
- },
67099
- dark: {
67100
- backgroundColor: adaptForDarkMode("#1A1C2E"),
67101
- gridBorderColor: adaptForDarkMode("#6B706F"),
67102
- headerBackgroundColor: adaptForDarkMode("#262A36"),
67103
- headerActiveBackgroundColor: adaptForDarkMode("#3A4052"),
67104
- headerSelectedBackgroundColor: adaptForDarkMode("#4E566E"),
67105
- headerTextColor: adaptForDarkMode("#A1A6B3"),
67106
- headerBorderColor: adaptForDarkMode("#7A7F91"),
67107
- frozenPaneBorderColor: adaptForDarkMode("#7A7F91"),
67108
- frozenPaneHeaderBorderColor: adaptForDarkMode("#9FA5BD"),
67109
- singleCellSelectionBackgroundColor: adaptForDarkMode("#696E8044"),
67110
- multipleCellsSelectionBackgroundColor: adaptForDarkMode("#828AA044")
67111
- }
67112
- };
67113
67152
  var ColorThemeUIPlugin = class extends UIPlugin {
67114
67153
  static getters = ["isDarkMode", "getSpreadsheetTheme"];
67115
67154
  colorScheme;
@@ -69380,7 +69419,7 @@ set(value) {
69380
69419
  static getters = ["getFigureUI"];
69381
69420
  allowDispatch(cmd) {
69382
69421
  switch (cmd.type) {
69383
- case "MOVE_FIGURES":
69422
+ case "UPDATE_FIGURES":
69384
69423
  for (const updateFigurePayload of cmd.figures) {
69385
69424
  const result = this.canDispatch("UPDATE_FIGURE", updateFigurePayload);
69386
69425
  if (!result.isSuccessful) return result.reasons;
@@ -69404,7 +69443,7 @@ set(value) {
69404
69443
  }
69405
69444
  handle(cmd) {
69406
69445
  switch (cmd.type) {
69407
- case "MOVE_FIGURES":
69446
+ case "UPDATE_FIGURES":
69408
69447
  for (const updateFigurePayload of cmd.figures) this.dispatch("UPDATE_FIGURE", updateFigurePayload);
69409
69448
  break;
69410
69449
  case "DELETE_FIGURES":
@@ -70551,7 +70590,7 @@ set(value) {
70551
70590
  //#endregion
70552
70591
  //#region src/plugins/plugin_registries.ts
70553
70592
  const corePluginRegistry = new Registry().add("settings", SettingsPlugin).add("sheet", SheetPlugin).add("header grouping", HeaderGroupingPlugin).add("header visibility", HeaderVisibilityPlugin).add("tables", TablePlugin).add("dataValidation", DataValidationPlugin).add("cell", CellPlugin).add("default", DefaultPlugin).add("merge", MergePlugin).add("headerSize", HeaderSizePlugin).add("borders", BordersPlugin).add("conditional formatting", ConditionalFormatPlugin).add("figures", FigurePlugin).add("chart", ChartPlugin).add("carousel", CarouselPlugin).add("image", ImagePlugin).add("named_ranges", NamedRangesPlugin).add("pivot_core", PivotCorePlugin).add("spreadsheet_pivot_core", SpreadsheetPivotCorePlugin).add("tableStyle", TableStylePlugin);
70554
- const featurePluginRegistry = new Registry().add("ui_sheet", SheetUIPlugin).add("ui_options", UIOptionsPlugin).add("sort", SortPlugin).add("format", FormatPlugin).add("insert_pivot", InsertPivotPlugin).add("pivot_presence", PivotPresencePlugin).add("subtotal_evaluation", SubtotalEvaluationPlugin).add("collaborative", CollaborativePlugin).add("history", HistoryPlugin).add("datavalidation_insert", DataValidationInsertionPlugin).add("dynamic_translate", DynamicTranslate).add("geo_features", GeoFeaturePlugin).add("color_theme", ColorThemeUIPlugin).add("lock_sheet", LockSheetPlugin);
70593
+ const featurePluginRegistry = new Registry().add("ui_sheet", SheetUIPlugin).add("ui_options", UIOptionsPlugin).add("sort", SortPlugin).add("format", FormatPlugin).add("insert_pivot", InsertPivotPlugin).add("pivot_presence", PivotPresencePlugin).add("subtotal_evaluation", SubtotalEvaluationPlugin).add("collaborative", CollaborativePlugin).add("history", HistoryPlugin).add("datavalidation_insert", DataValidationInsertionPlugin).add("dynamic_translate", DynamicTranslate).add("geo_features", GeoFeaturePlugin).add("color_theme", ColorThemeUIPlugin).add("lock_sheet", LockSheetPlugin).add("chart_ui", ChartUIPlugin);
70555
70594
  const statefulUIPluginRegistry = new Registry().add("selection", GridSelectionPlugin).add("evaluation_filter", FilterEvaluationPlugin).add("header_visibility_ui", HeaderVisibilityUIPlugin).add("cell_computed_style", CellComputedStylePlugin).add("table_computed_style", TableComputedStylePlugin).add("header_positions", HeaderPositionsUIPlugin).add("clipboard", ClipboardPlugin).add("carousel_ui", CarouselUIPlugin).add("figure_ui", FigureUIPlugin);
70556
70595
  const coreViewsPluginRegistry = new Registry().add("evaluation", EvaluationPlugin).add("evaluation_chart", EvaluationChartPlugin).add("fingerprints", FingerprintPlugin).add("evaluation_cf", EvaluationConditionalFormatPlugin).add("row_size", HeaderSizeUIPlugin).add("data_validation_ui", EvaluationDataValidationPlugin).add("dynamic_tables", DynamicTablesPlugin).add("custom_colors", CustomColorsPlugin).add("pivot_ui", PivotUIPlugin).add("cell_icon", CellIconPlugin).add("formula_tracker", FormulaTrackerPlugin);
70557
70596
 
@@ -71907,7 +71946,7 @@ set(value) {
71907
71946
  DOMFocusableElementStore;
71908
71947
  setup() {
71909
71948
  this.DOMFocusableElementStore = useStore(DOMFocusableElementStore);
71910
- useExternalListener(window, "click", this.onExternalClick.bind(this), { capture: true });
71949
+ (0, _odoo_owl.useListener)(window, "click", this.onExternalClick.bind(this), { capture: true });
71911
71950
  useLayoutEffect(() => {}, () => [this.state.isEditing]);
71912
71951
  (0, _odoo_owl.onPatched)(() => {
71913
71952
  if (this.sheetNameRef() && this.state.isEditing && this.editionState === "initializing") {
@@ -72471,7 +72510,7 @@ set(value) {
72471
72510
  this.zoomStore = useStore(ZoomStore);
72472
72511
  useLocalStore(HoveredTableStore);
72473
72512
  const rendererStore = useLocalStore(RendererStore, OrderedLayers().filter((layer) => layer !== "Headers"));
72474
- useChildSubEnv({ getPopoverContainerRect: () => this.zoomStore.getZoomedRect(this.getGridRect()) });
72513
+ useSubEnv({ getPopoverContainerRect: () => this.zoomStore.getZoomedRect(this.getGridRect()) });
72475
72514
  useGridDrawing({
72476
72515
  canvasRef: this.canvasRef,
72477
72516
  rendererStore,
@@ -72543,13 +72582,12 @@ set(value) {
72543
72582
  return this.env.model.getters.getColDimensions(sheetId, right).end;
72544
72583
  }
72545
72584
  get dashboardStyle() {
72546
- const style = { zoom: this.zoomStore.cssZoom };
72547
- if (this.env.model.getters.getActiveSheet().backgroundColor) style["background-color"] = "transparent";
72548
- return cssPropertiesToCss(style);
72585
+ return cssPropertiesToCss({ zoom: this.zoomStore.cssZoom });
72549
72586
  }
72550
72587
  get backgroundStyle() {
72551
72588
  const sheet = this.env.model.getters.getActiveSheet();
72552
- return sheet.backgroundColor ? cssPropertiesToCss({ "background-color": sheet.backgroundColor }) : "";
72589
+ const theme = this.env.model.getters.getSpreadsheetTheme();
72590
+ return cssPropertiesToCss({ "background-color": sheet.backgroundColor || theme.backgroundColor });
72553
72591
  }
72554
72592
  };
72555
72593
 
@@ -72895,7 +72933,7 @@ set(value) {
72895
72933
  parentState: void 0
72896
72934
  });
72897
72935
  setup() {
72898
- useExternalListener(window, "click", this.onExternalClick, { capture: true });
72936
+ (0, _odoo_owl.useListener)(window, "click", this.onExternalClick.bind(this), { capture: true });
72899
72937
  (0, _odoo_owl.onMounted)(this.updateShadows);
72900
72938
  }
72901
72939
  onExternalClick(ev) {
@@ -73549,7 +73587,7 @@ set(value) {
73549
73587
  setup() {
73550
73588
  this.printStore = useLocalStore(SpreadsheetPrintStore);
73551
73589
  let styleElement = null;
73552
- useExternalListener(window, "beforeprint", () => {
73590
+ (0, _odoo_owl.useListener)(window, "beforeprint", () => {
73553
73591
  styleElement = document.createElement("style");
73554
73592
  styleElement.id = "o-spreadsheet-print-style";
73555
73593
  const size = `${this.printStore.pageLayout} ${this.printStore.orientation}`;
@@ -73562,7 +73600,7 @@ set(value) {
73562
73600
  styleElement = null;
73563
73601
  }
73564
73602
  };
73565
- useExternalListener(window, "afterprint", () => removePrintStyle());
73603
+ (0, _odoo_owl.useListener)(window, "afterprint", () => removePrintStyle());
73566
73604
  (0, _odoo_owl.onWillUnmount)(() => removePrintStyle());
73567
73605
  }
73568
73606
  get pageStyle() {
@@ -74551,8 +74589,8 @@ set(value) {
74551
74589
  this.composerFocusStore = useStore(ComposerFocusStore);
74552
74590
  this.fingerprints = useStore(FormulaFingerprintStore);
74553
74591
  this.topBarToolStore = useStore(TopBarToolStore);
74554
- useExternalListener(window, "click", this.onExternalClick);
74555
- useExternalListener(window, "keydown", this.onKeydown);
74592
+ (0, _odoo_owl.useListener)(window, "click", this.onExternalClick.bind(this));
74593
+ (0, _odoo_owl.useListener)(window, "keydown", this.onKeydown.bind(this));
74556
74594
  this.menus = topbarMenuRegistry.getMenuItems();
74557
74595
  let lastWidth;
74558
74596
  const updateVisibility = () => {
@@ -74879,9 +74917,9 @@ set(value) {
74879
74917
  const el = this.spreadsheetRef();
74880
74918
  if (el && !el.contains(document.activeElement) && document.activeElement?.contains(el)) this.focusGrid();
74881
74919
  });
74882
- useExternalListener(window, "resize", () => this.render(true));
74883
- useExternalListener(document.body, "wheel", () => {});
74884
- useExternalListener(window, "keydown", async (event) => {
74920
+ (0, _odoo_owl.useListener)(window, "resize", () => render(this, true));
74921
+ (0, _odoo_owl.useListener)(document.body, "wheel", () => {});
74922
+ (0, _odoo_owl.useListener)(window, "keydown", async (event) => {
74885
74923
  if (keyboardEventToShortcutString(event) === "Ctrl+P") {
74886
74924
  this.state.printModeEnabled = true;
74887
74925
  event.stopPropagation();
@@ -74901,11 +74939,11 @@ set(value) {
74901
74939
  resizeObserver.observe(el);
74902
74940
  return () => resizeObserver.disconnect();
74903
74941
  });
74904
- const render = batched(this.render.bind(this, true));
74942
+ const batchedRender = batched(() => render(this, true));
74905
74943
  (0, _odoo_owl.onMounted)(() => {
74906
74944
  this.bindModelEvents();
74907
74945
  this.checkViewportSize();
74908
- stores.on("store-updated", this, render);
74946
+ stores.on("store-updated", this, batchedRender);
74909
74947
  });
74910
74948
  (0, _odoo_owl.onWillUnmount)(() => {
74911
74949
  this.unbindModelEvents();
@@ -74917,7 +74955,7 @@ set(value) {
74917
74955
  });
74918
74956
  }
74919
74957
  bindModelEvents() {
74920
- this.model.on("update", this, () => this.render(true));
74958
+ this.model.on("update", this, () => render(this, true));
74921
74959
  this.model.on("command-rejected", this, ({ result }) => {
74922
74960
  if (result.isCancelledBecause("SheetLocked")) this.notificationStore.notifyUser({
74923
74961
  type: "info",
@@ -80990,6 +81028,10 @@ set(value) {
80990
81028
  this.computeLinks();
80991
81029
  (0, _odoo_owl.onMounted)(() => this.urlInput()?.focus());
80992
81030
  }
81031
+ onLinkUrlInput(ev) {
81032
+ this.state.url = ev.target.value;
81033
+ this.computeLinks();
81034
+ }
80993
81035
  computeLinks() {
80994
81036
  this.state.selectedIndex = null;
80995
81037
  this.state.linksByCategory = this.linkProposalByCategory;
@@ -81689,8 +81731,8 @@ set(value) {
81689
81731
  };
81690
81732
  },
81691
81733
  copyInSheetId: (definition) => definition,
81692
- getRuntime(getters, definition) {
81693
- const chartData = getBubbleChartData(definition, getters);
81734
+ getRuntime(getters, definition, chartDataExtractors, sheetId, eventHandlers, colorThemeName) {
81735
+ const chartData = getBubbleChartData(definition, getters, colorThemeName);
81694
81736
  return { chartJsConfig: {
81695
81737
  type: "line",
81696
81738
  data: {
@@ -81765,8 +81807,8 @@ set(value) {
81765
81807
  };
81766
81808
  },
81767
81809
  getDefinitionForExcel: () => void 0,
81768
- getRuntime(getters, definition, { extractData }) {
81769
- const chartData = getCalendarChartData(definition, extractData(), getters);
81810
+ getRuntime(getters, definition, { extractData }, sheetId, eventHandlers, colorThemeName) {
81811
+ const chartData = getCalendarChartData(definition, extractData(), getters, colorThemeName);
81770
81812
  const { labels, datasets } = getCalendarChartDatasetAndLabels(definition, chartData);
81771
81813
  return { chartJsConfig: {
81772
81814
  type: "calendar",
@@ -81852,8 +81894,8 @@ set(value) {
81852
81894
  annotationLink: context.annotationLink
81853
81895
  };
81854
81896
  },
81855
- getRuntime(getters, definition, { extractData }, sheetId, eventHandlers) {
81856
- const chartData = getBarChartData(definition, extractData(), getters);
81897
+ getRuntime(getters, definition, { extractData }, sheetId, eventHandlers, colorThemeName) {
81898
+ const chartData = getBarChartData(definition, extractData(), getters, colorThemeName);
81857
81899
  return {
81858
81900
  chartJsConfig: {
81859
81901
  type: "bar",
@@ -81929,8 +81971,8 @@ set(value) {
81929
81971
  };
81930
81972
  },
81931
81973
  getDefinitionForExcel: () => void 0,
81932
- getRuntime(getters, definition, { extractData }, sheetId, eventHandlers) {
81933
- const chartData = getFunnelChartData(definition, extractData(), getters);
81974
+ getRuntime(getters, definition, { extractData }, sheetId, eventHandlers, colorThemeName) {
81975
+ const chartData = getFunnelChartData(definition, extractData(), getters, colorThemeName);
81934
81976
  return { chartJsConfig: {
81935
81977
  type: "funnel",
81936
81978
  data: {
@@ -81992,8 +82034,8 @@ set(value) {
81992
82034
  };
81993
82035
  },
81994
82036
  getDefinitionForExcel: () => void 0,
81995
- getRuntime(getters, definition, { extractData }, sheetId, eventHandlers) {
81996
- const chartData = getGeoChartData(definition, extractData(), getters);
82037
+ getRuntime(getters, definition, { extractData }, sheetId, eventHandlers, colorThemeName) {
82038
+ const chartData = getGeoChartData(definition, extractData(), getters, colorThemeName);
81997
82039
  return { chartJsConfig: {
81998
82040
  type: "choropleth",
81999
82041
  data: { datasets: getGeoChartDatasets(definition, chartData) },
@@ -82062,7 +82104,7 @@ set(value) {
82062
82104
  },
82063
82105
  getDefinitionForExcel(getters, definition, { dataSets, labelRange }) {
82064
82106
  if (definition.dataSource.type !== "range") return;
82065
- const chartData = getPyramidChartData(definition, getChartData(getters, definition.dataSource), getters);
82107
+ const chartData = getPyramidChartData(definition, getChartData(getters, definition.dataSource), getters, "light");
82066
82108
  const { dataSetsValues } = chartData;
82067
82109
  const maxValue = Math.max(...dataSetsValues.map((dataSet) => Math.max(...dataSet.data.map((cell) => isNumberResult(cell) ? Math.abs(cell.value) : -Infinity))));
82068
82110
  return {
@@ -82076,8 +82118,8 @@ set(value) {
82076
82118
  maxValue
82077
82119
  };
82078
82120
  },
82079
- getRuntime(getters, definition, { extractData }, sheetId, eventHandlers) {
82080
- const chartData = getPyramidChartData(definition, extractData(), getters);
82121
+ getRuntime(getters, definition, { extractData }, sheetId, eventHandlers, colorThemeName) {
82122
+ const chartData = getPyramidChartData(definition, extractData(), getters, colorThemeName);
82081
82123
  return {
82082
82124
  chartJsConfig: {
82083
82125
  type: "bar",
@@ -82159,8 +82201,8 @@ set(value) {
82159
82201
  labelRange
82160
82202
  };
82161
82203
  },
82162
- getRuntime(getters, definition, { extractData }, sheetId, eventHandlers) {
82163
- const chartData = getRadarChartData(definition, extractData(), getters);
82204
+ getRuntime(getters, definition, { extractData }, sheetId, eventHandlers, colorThemeName) {
82205
+ const chartData = getRadarChartData(definition, extractData(), getters, colorThemeName);
82164
82206
  return {
82165
82207
  chartJsConfig: {
82166
82208
  type: "radar",
@@ -82240,8 +82282,8 @@ set(value) {
82240
82282
  verticalAxis: getDefinedAxis(definition)
82241
82283
  };
82242
82284
  },
82243
- getRuntime(getters, definition, { extractData }, sheetId, eventHandlers) {
82244
- const chartData = getLineChartData(definition, extractData(), getters);
82285
+ getRuntime(getters, definition, { extractData }, sheetId, eventHandlers, colorThemeName) {
82286
+ const chartData = getLineChartData(definition, extractData(), getters, colorThemeName);
82245
82287
  return {
82246
82288
  chartJsConfig: {
82247
82289
  type: "line",
@@ -82319,8 +82361,8 @@ set(value) {
82319
82361
  };
82320
82362
  },
82321
82363
  getDefinitionForExcel: () => void 0,
82322
- getRuntime(getters, definition, { extractHierarchicalData }, sheetId, eventHandlers) {
82323
- const chartData = getHierarchalChartData(definition, extractHierarchicalData(), getters);
82364
+ getRuntime(getters, definition, { extractHierarchicalData }, sheetId, eventHandlers, colorThemeName) {
82365
+ const chartData = getHierarchalChartData(definition, extractHierarchicalData(), getters, colorThemeName);
82324
82366
  return { chartJsConfig: {
82325
82367
  type: "doughnut",
82326
82368
  data: { datasets: getSunburstChartDatasets(definition, chartData) },
@@ -82393,8 +82435,8 @@ set(value) {
82393
82435
  };
82394
82436
  },
82395
82437
  getDefinitionForExcel: () => void 0,
82396
- getRuntime(getters, definition, { extractHierarchicalData }, sheetId, eventHandlers) {
82397
- const chartData = getHierarchalChartData(definition, extractHierarchicalData(), getters);
82438
+ getRuntime(getters, definition, { extractHierarchicalData }, sheetId, eventHandlers, colorThemeName) {
82439
+ const chartData = getHierarchalChartData(definition, extractHierarchicalData(), getters, colorThemeName);
82398
82440
  return { chartJsConfig: {
82399
82441
  type: "treemap",
82400
82442
  data: {
@@ -90881,7 +90923,6 @@ set(value) {
90881
90923
  };
90882
90924
  const compatibility = {
90883
90925
  Component,
90884
- useExternalListener,
90885
90926
  EnvPlugin,
90886
90927
  App: App$1
90887
90928
  };
@@ -91031,8 +91072,8 @@ exports.stores = stores;
91031
91072
  exports.tokenColors = tokenColors;
91032
91073
  exports.tokenize = tokenize;
91033
91074
 
91034
- __info__.version = "19.5.0-alpha.13";
91035
- __info__.date = "2026-08-21T15:33:44.046Z";
91036
- __info__.hash = "a73559e";
91075
+ __info__.version = "19.5.0-alpha.14";
91076
+ __info__.date = "2026-08-29T09:17:09.184Z";
91077
+ __info__.hash = "e8ad6ad";
91037
91078
 
91038
91079
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);