@odoo/o-spreadsheet 19.0.37 → 19.0.41

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.
@@ -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.0.37
6
- * @date 2026-06-06T06:22:21.404Z
7
- * @hash 41aace0
5
+ * @version 19.0.41
6
+ * @date 2026-07-01T05:03:20.304Z
7
+ * @hash 346d3c0
8
8
  */
9
9
 
10
10
  (function(exports, _odoo_owl) {
@@ -215,7 +215,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
215
215
  const GRAY_200 = "#E7E9ED";
216
216
  const GRAY_100 = "#F9FAFB";
217
217
  const TEXT_BODY = "#374151";
218
- const TEXT_BODY_MUTED = TEXT_BODY + "C2";
218
+ const TEXT_BODY_MUTED = "#374151C2";
219
219
  const TEXT_HEADING = "#111827";
220
220
  const PRIMARY_BUTTON_BG = "#714B67";
221
221
  const PRIMARY_BUTTON_HOVER_BG = "#624159";
@@ -323,9 +323,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
323
323
  ];
324
324
  const DEFAULT_CELL_HEIGHT = 23;
325
325
  const FOOTER_HEIGHT = 2 * 23;
326
- const MENU_SEPARATOR_BORDER_WIDTH = 1;
327
- const MENU_SEPARATOR_PADDING = 5;
328
- const MENU_SEPARATOR_HEIGHT = 1 + 2 * 5;
329
326
  const DEFAULT_STYLE = {
330
327
  align: "left",
331
328
  verticalAlign: "bottom",
@@ -345,7 +342,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
345
342
  const DEFAULT_VERTICAL_ALIGN = DEFAULT_STYLE.verticalAlign;
346
343
  const DEFAULT_WRAPPING_MODE = DEFAULT_STYLE.wrapping;
347
344
  const DEFAULT_FONT_SIZE = DEFAULT_STYLE.fontSize;
348
- const DEFAULT_FONT = "'Roboto', arial";
345
+ const DEFAULT_FONT = "'Roboto', arial, 'Liberation Sans'";
349
346
  const DEFAULT_BORDER_DESC = {
350
347
  style: "thin",
351
348
  color: "#000000"
@@ -1674,7 +1671,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1674
1671
  function isZoneDependent(cmd) {
1675
1672
  return "sheetId" in cmd && "zone" in cmd;
1676
1673
  }
1677
- const invalidateEvaluationCommands = new Set([
1674
+ const invalidateEvaluationCommands = /* @__PURE__ */ new Set([
1678
1675
  "RENAME_SHEET",
1679
1676
  "DELETE_SHEET",
1680
1677
  "CREATE_SHEET",
@@ -1693,7 +1690,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1693
1690
  "REMOVE_PIVOT",
1694
1691
  "DUPLICATE_PIVOT"
1695
1692
  ]);
1696
- const invalidateChartEvaluationCommands = new Set([
1693
+ const invalidateChartEvaluationCommands = /* @__PURE__ */ new Set([
1697
1694
  "EVALUATE_CELLS",
1698
1695
  "EVALUATE_CHARTS",
1699
1696
  "UPDATE_CELL",
@@ -1712,20 +1709,20 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1712
1709
  "UNDO",
1713
1710
  "REDO"
1714
1711
  ]);
1715
- const invalidateDependenciesCommands = new Set(["MOVE_RANGES"]);
1716
- const invalidateCFEvaluationCommands = new Set([
1712
+ const invalidateDependenciesCommands = /* @__PURE__ */ new Set(["MOVE_RANGES"]);
1713
+ const invalidateCFEvaluationCommands = /* @__PURE__ */ new Set([
1717
1714
  "EVALUATE_CELLS",
1718
1715
  "ADD_CONDITIONAL_FORMAT",
1719
1716
  "REMOVE_CONDITIONAL_FORMAT",
1720
1717
  "CHANGE_CONDITIONAL_FORMAT_PRIORITY"
1721
1718
  ]);
1722
- const invalidateBordersCommands = new Set([
1719
+ const invalidateBordersCommands = /* @__PURE__ */ new Set([
1723
1720
  "AUTOFILL_CELL",
1724
1721
  "SET_BORDER",
1725
1722
  "SET_ZONE_BORDERS",
1726
1723
  "SET_BORDERS_ON_TARGET"
1727
1724
  ]);
1728
- const invalidSubtotalFormulasCommands = new Set([
1725
+ const invalidSubtotalFormulasCommands = /* @__PURE__ */ new Set([
1729
1726
  "UNHIDE_COLUMNS_ROWS",
1730
1727
  "HIDE_COLUMNS_ROWS",
1731
1728
  "GROUP_HEADERS",
@@ -1739,7 +1736,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1739
1736
  "UPDATE_TABLE",
1740
1737
  "UPDATE_FILTER"
1741
1738
  ]);
1742
- const readonlyAllowedCommands = new Set([
1739
+ const readonlyAllowedCommands = /* @__PURE__ */ new Set([
1743
1740
  "START",
1744
1741
  "ACTIVATE_SHEET",
1745
1742
  "COPY",
@@ -1753,7 +1750,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1753
1750
  "UPDATE_CAROUSEL_ACTIVE_ITEM",
1754
1751
  "UPDATE_PIVOT"
1755
1752
  ]);
1756
- const coreTypes = new Set([
1753
+ const coreTypes = /* @__PURE__ */ new Set([
1757
1754
  "UPDATE_CELL",
1758
1755
  "UPDATE_CELL_POSITION",
1759
1756
  "CLEAR_CELL",
@@ -1991,7 +1988,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1991
1988
 
1992
1989
  //#endregion
1993
1990
  //#region src/types/conditional_formatting.ts
1994
- const availableConditionalFormatOperators = new Set([
1991
+ const availableConditionalFormatOperators = /* @__PURE__ */ new Set([
1995
1992
  "containsText",
1996
1993
  "notContainsText",
1997
1994
  "isGreaterThan",
@@ -2011,7 +2008,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2011
2008
 
2012
2009
  //#endregion
2013
2010
  //#region src/types/data_validation.ts
2014
- const availableDataValidationOperators = new Set([
2011
+ const availableDataValidationOperators = /* @__PURE__ */ new Set([
2015
2012
  "containsText",
2016
2013
  "notContainsText",
2017
2014
  "isEqualText",
@@ -2736,12 +2733,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2736
2733
  const pIntegerAndDecimals = `(?:\\d+(?:${escapeRegExp(locale.thousandsSeparator || "")}\\d{3,})*(?:${decimalSeparator}\\d*)?)`;
2737
2734
  const pOnlyDecimals = `(?:${decimalSeparator}\\d+)`;
2738
2735
  const pNumber = "(?:\\s*" + pIntegerAndDecimals + "|" + pOnlyDecimals + ")(?:e(?:\\+|-)?\\d+)?(?:\\s*%)?";
2739
- const pMinus = "(?:\\s*-)?";
2740
- const pCurrencyFormat = "(?:\\s*[\\$€])?";
2741
2736
  const pNumberExp = "^(?:(?:" + [
2742
- pMinus + pCurrencyFormat + pNumber,
2743
- pMinus + pNumber + pCurrencyFormat,
2744
- pCurrencyFormat + pMinus + pNumber
2737
+ "(?:\\s*-)?(?:\\s*[\\$€])?" + pNumber,
2738
+ "(?:\\s*-)?" + pNumber + "(?:\\s*[\\$€])?",
2739
+ "(?:\\s*[\\$€])?(?:\\s*-)?" + pNumber
2745
2740
  ].join(")|(?:") + "))$";
2746
2741
  return new RegExp(pNumberExp, "i");
2747
2742
  });
@@ -4678,7 +4673,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4678
4673
  function recomputeZones(zones, zonesToRemove = []) {
4679
4674
  if (zones.length <= 1 && zonesToRemove.length === 0) return zones;
4680
4675
  const profilesStartingPosition = [0];
4681
- const profiles = new Map([[0, []]]);
4676
+ const profiles = /* @__PURE__ */ new Map([[0, []]]);
4682
4677
  modifyProfiles(profilesStartingPosition, profiles, zones, false);
4683
4678
  modifyProfiles(profilesStartingPosition, profiles, zonesToRemove, true);
4684
4679
  return constructZonesFromProfiles(profilesStartingPosition, profiles);
@@ -5466,7 +5461,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5466
5461
  //#region src/helpers/edge_scrolling.ts
5467
5462
  const MAX_DELAY = 140;
5468
5463
  const MIN_DELAY = 20;
5469
- const ACCELERATION = .035;
5470
5464
  /**
5471
5465
  * Decreasing exponential function used to determine the "speed" of edge-scrolling
5472
5466
  * as the timeout delay.
@@ -5474,7 +5468,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5474
5468
  * Returns a timeout delay in milliseconds.
5475
5469
  */
5476
5470
  function scrollDelay(value) {
5477
- return 20 + (140 - 20) * Math.exp(-ACCELERATION * (value - 1));
5471
+ return 20 + (140 - 20) * Math.exp(-.035 * (value - 1));
5478
5472
  }
5479
5473
 
5480
5474
  //#endregion
@@ -6315,7 +6309,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
6315
6309
  smallUuid() {
6316
6310
  if (window.crypto) return "10000000-1000".replace(/[01]/g, (c) => {
6317
6311
  const n = Number(c);
6318
- return (n ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
6312
+ return (n ^ crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
6319
6313
  });
6320
6314
  else return "xxxxxxxx-xxxx".replace(/[xy]/g, function(c) {
6321
6315
  const r = Math.random() * 16 | 0;
@@ -6329,7 +6323,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
6329
6323
  uuidv4() {
6330
6324
  if (window.crypto) return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => {
6331
6325
  const n = Number(c);
6332
- return (n ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
6326
+ return (n ^ crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
6333
6327
  });
6334
6328
  else return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
6335
6329
  const r = Math.random() * 16 | 0;
@@ -7880,10 +7874,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
7880
7874
  type: dimension.type
7881
7875
  }));
7882
7876
  if (groupValueString.toLowerCase() === "false") return false;
7883
- return pivotNormalizationValueRegistry.get(dimension.type)(groupValueString, dimension.granularity);
7877
+ return pivotNormalizationValueRegistry.get(dimension.type)(groupValueString, dimension);
7884
7878
  }
7885
- function normalizeDateTime(value, granularity) {
7886
- return pivotTimeAdapter(granularity ?? "month").normalizeFunctionValue(value);
7879
+ function normalizeDateTime(value, dimension) {
7880
+ return pivotTimeAdapter(dimension.granularity ?? "month").normalizeFunctionValue(value);
7887
7881
  }
7888
7882
  function toFunctionPivotValue(value, dimension) {
7889
7883
  if (value === null) return `"null"`;
@@ -23513,9 +23507,7 @@ stores.inject(MyMetaStore, storeInstance);
23513
23507
  this.removeEventListeners();
23514
23508
  }
23515
23509
  get containerStyle() {
23516
- return `
23517
- height:${this.sliceable ? `calc(100% - ${60}px)` : "100%"};
23518
- `;
23510
+ return cssPropertiesToCss({ height: this.sliceable ? `calc(100% - ${60}px)` : "100%" });
23519
23511
  }
23520
23512
  get masterChartContainerStyle() {
23521
23513
  const runtime = this.env.model.getters.getChartRuntime(this.props.chartId);
@@ -28191,11 +28183,11 @@ stores.inject(MyMetaStore, storeInstance);
28191
28183
  getResizerPosition(resizer) {
28192
28184
  const anchorCenteringOffset = (ANCHOR_SIZE - ACTIVE_BORDER_WIDTH) / 2;
28193
28185
  const style = {};
28194
- if (resizer.includes("top")) style.top = `${-anchorCenteringOffset}px`;
28195
- else if (resizer.includes("bottom")) style.bottom = `${-anchorCenteringOffset}px`;
28186
+ if (resizer.includes("top")) style.top = `-3px`;
28187
+ else if (resizer.includes("bottom")) style.bottom = `-3px`;
28196
28188
  else style.bottom = `calc(50% - ${anchorCenteringOffset}px)`;
28197
- if (resizer.includes("left")) style.left = `${-anchorCenteringOffset}px`;
28198
- else if (resizer.includes("right")) style.right = `${-anchorCenteringOffset}px`;
28189
+ if (resizer.includes("left")) style.left = `-3px`;
28190
+ else if (resizer.includes("right")) style.right = `-3px`;
28199
28191
  else style.right = `calc(50% - ${anchorCenteringOffset}px)`;
28200
28192
  return cssPropertiesToCss(style);
28201
28193
  }
@@ -31106,11 +31098,10 @@ stores.inject(MyMetaStore, storeInstance);
31106
31098
  const LINE_VERTICAL_PADDING = 1;
31107
31099
  const PICKER_PADDING = 8;
31108
31100
  const ITEM_BORDER_WIDTH = 1;
31109
- const ITEM_EDGE_LENGTH = 18;
31110
31101
  const ITEMS_PER_LINE = 10;
31111
31102
  const MAGNIFIER_EDGE = 16;
31112
31103
  const ITEM_GAP = 2;
31113
- const CONTENT_WIDTH = ITEMS_PER_LINE * (ITEM_EDGE_LENGTH + 2 * ITEM_BORDER_WIDTH) + (ITEMS_PER_LINE - 1) * ITEM_GAP;
31104
+ const CONTENT_WIDTH = 218;
31114
31105
  const INNER_GRADIENT_WIDTH = CONTENT_WIDTH - 2 * ITEM_BORDER_WIDTH;
31115
31106
  const INNER_GRADIENT_HEIGHT = CONTENT_WIDTH - 30 - 2 * ITEM_BORDER_WIDTH;
31116
31107
  css`
@@ -31122,7 +31113,7 @@ stores.inject(MyMetaStore, storeInstance);
31122
31113
  line-height: 1.2;
31123
31114
  overflow-y: auto;
31124
31115
  overflow-x: hidden;
31125
- width: ${CONTENT_WIDTH + 2 * PICKER_PADDING}px;
31116
+ width: ${234}px;
31126
31117
 
31127
31118
  .o-color-picker-section-name {
31128
31119
  margin: 0px ${ITEM_BORDER_WIDTH}px;
@@ -31148,8 +31139,8 @@ stores.inject(MyMetaStore, storeInstance);
31148
31139
  }
31149
31140
  }
31150
31141
  .o-color-picker-line-item {
31151
- width: ${ITEM_EDGE_LENGTH + 2 * ITEM_BORDER_WIDTH}px;
31152
- height: ${ITEM_EDGE_LENGTH + 2 * ITEM_BORDER_WIDTH}px;
31142
+ width: ${20}px;
31143
+ height: ${20}px;
31153
31144
  margin: 0px;
31154
31145
  border-radius: 50px;
31155
31146
  border: ${ITEM_BORDER_WIDTH}px solid #666666;
@@ -31193,13 +31184,13 @@ stores.inject(MyMetaStore, storeInstance);
31193
31184
  }
31194
31185
 
31195
31186
  .o-custom-selector {
31196
- padding: ${PICKER_PADDING + 2}px ${PICKER_PADDING}px;
31187
+ padding: ${10}px ${PICKER_PADDING}px;
31197
31188
  position: relative;
31198
31189
  .o-gradient {
31199
31190
  margin-bottom: ${MAGNIFIER_EDGE / 2}px;
31200
31191
  border: ${ITEM_BORDER_WIDTH}px solid #c0c0c0;
31201
- width: ${INNER_GRADIENT_WIDTH + 2 * ITEM_BORDER_WIDTH}px;
31202
- height: ${INNER_GRADIENT_HEIGHT + 2 * ITEM_BORDER_WIDTH}px;
31192
+ width: ${218}px;
31193
+ height: ${188}px;
31203
31194
  position: relative;
31204
31195
  }
31205
31196
 
@@ -31337,8 +31328,8 @@ stores.inject(MyMetaStore, storeInstance);
31337
31328
  const left = Math.round(INNER_GRADIENT_WIDTH * clip(s / 100, 0, 1));
31338
31329
  const top = Math.round(INNER_GRADIENT_HEIGHT * clip(1 - 2 * l / (200 - s), 0, 1));
31339
31330
  return cssPropertiesToCss({
31340
- left: `${-MAGNIFIER_EDGE / 2 + left}px`,
31341
- top: `${-MAGNIFIER_EDGE / 2 + top}px`,
31331
+ left: `${-16 / 2 + left}px`,
31332
+ top: `${-16 / 2 + top}px`,
31342
31333
  background: hslaToHex(this.state.currentHslaColor)
31343
31334
  });
31344
31335
  }
@@ -33523,17 +33514,16 @@ stores.inject(MyMetaStore, storeInstance);
33523
33514
 
33524
33515
  //#endregion
33525
33516
  //#region src/components/link/link_editor/link_editor.ts
33526
- const PADDING = 12;
33527
33517
  css`
33528
33518
  .o-link-editor {
33529
33519
  font-size: 13px;
33530
33520
  background-color: white;
33531
33521
  box-shadow: 0 1px 4px 3px rgba(60, 64, 67, 0.15);
33532
- padding: ${PADDING}px;
33522
+ padding: ${12}px;
33533
33523
  display: flex;
33534
33524
  flex-direction: column;
33535
33525
  border-radius: 4px;
33536
- width: ${340 + 2 * PADDING}px;
33526
+ width: ${364}px;
33537
33527
 
33538
33528
  .o-section {
33539
33529
  .o-section-title {
@@ -43586,8 +43576,12 @@ stores.inject(MyMetaStore, storeInstance);
43586
43576
  }
43587
43577
  stopEdition(direction) {
43588
43578
  if (this.canStopEdition()) {
43579
+ const { col, row } = this.currentEditedCell;
43589
43580
  this._stopEdition();
43590
- if (direction) this.model.selection.moveAnchorCell(direction, 1);
43581
+ if (direction) {
43582
+ this.model.selection.selectCell(col, row);
43583
+ this.model.selection.moveAnchorCell(direction, 1);
43584
+ }
43591
43585
  return;
43592
43586
  }
43593
43587
  const editedCell = this.currentEditedCell;
@@ -51417,9 +51411,9 @@ stores.inject(MyMetaStore, storeInstance);
51417
51411
  allSheetsMatches = [];
51418
51412
  activeSheetMatches = [];
51419
51413
  specificRangeMatches = [];
51414
+ selectedMatchPosition = null;
51420
51415
  currentSearchRegex = null;
51421
51416
  initialShowFormulaState;
51422
- preserveSelectedMatchIndex = false;
51423
51417
  irreplaceableMatchCount = 0;
51424
51418
  isSearchDirty = false;
51425
51419
  shouldFinalizeUpdateSelection = false;
@@ -51541,7 +51535,10 @@ stores.inject(MyMetaStore, storeInstance);
51541
51535
  */
51542
51536
  _updateSearch(toSearch, searchOptions) {
51543
51537
  this.searchOptions = searchOptions;
51544
- if (toSearch !== this.toSearch) this.selectedMatchIndex = null;
51538
+ if (toSearch !== this.toSearch) {
51539
+ this.selectedMatchIndex = null;
51540
+ this.selectedMatchPosition = null;
51541
+ }
51545
51542
  this.toSearch = toSearch;
51546
51543
  this.currentSearchRegex = getSearchRegex(this.toSearch, this.searchOptions);
51547
51544
  this.refreshSearch({
@@ -51553,8 +51550,14 @@ stores.inject(MyMetaStore, storeInstance);
51553
51550
  * refresh the matches according to the current search options
51554
51551
  */
51555
51552
  refreshSearch(options) {
51556
- if (!this.preserveSelectedMatchIndex) this.selectedMatchIndex = null;
51557
51553
  this.findMatches();
51554
+ if (this.selectedMatchPosition) if (this.selectedMatchPosition.sheetId !== this.getters.getActiveSheetId()) {
51555
+ this.selectedMatchIndex = null;
51556
+ this.selectedMatchPosition = null;
51557
+ } else {
51558
+ const index = this.searchMatches.findIndex((match) => match.sheetId === this.selectedMatchPosition?.sheetId && match.col === this.selectedMatchPosition?.col && match.row === this.selectedMatchPosition?.row);
51559
+ if (index !== -1) this.selectedMatchIndex = index;
51560
+ }
51558
51561
  this.selectNextCell(0, options);
51559
51562
  }
51560
51563
  getSheetsInSearchOrder() {
@@ -51622,6 +51625,7 @@ stores.inject(MyMetaStore, storeInstance);
51622
51625
  const matches = this.searchMatches;
51623
51626
  if (!matches.length) {
51624
51627
  this.selectedMatchIndex = null;
51628
+ this.selectedMatchPosition = null;
51625
51629
  return;
51626
51630
  }
51627
51631
  let nextIndex;
@@ -51635,14 +51639,13 @@ stores.inject(MyMetaStore, storeInstance);
51635
51639
  } else nextIndex = this.selectedMatchIndex + indexChange;
51636
51640
  nextIndex = (nextIndex + matches.length) % matches.length;
51637
51641
  this.selectedMatchIndex = nextIndex;
51642
+ this.selectedMatchPosition = matches[this.selectedMatchIndex];
51638
51643
  const selectedMatch = matches[nextIndex];
51639
51644
  if (options.jumpToMatchSheet && this.getters.getActiveSheetId() !== selectedMatch.sheetId) {
51640
- this.preserveSelectedMatchIndex = true;
51641
51645
  this.model.dispatch("ACTIVATE_SHEET", {
51642
51646
  sheetIdFrom: this.getters.getActiveSheetId(),
51643
51647
  sheetIdTo: selectedMatch.sheetId
51644
51648
  });
51645
- this.preserveSelectedMatchIndex = false;
51646
51649
  this.isSearchDirty = false;
51647
51650
  }
51648
51651
  this.model.selection.getBackToDefault();
@@ -51653,7 +51656,6 @@ stores.inject(MyMetaStore, storeInstance);
51653
51656
  */
51654
51657
  replace() {
51655
51658
  if (this.selectedMatchIndex === null) return;
51656
- this.preserveSelectedMatchIndex = true;
51657
51659
  this.shouldFinalizeUpdateSelection = true;
51658
51660
  this.model.dispatch("REPLACE_SEARCH", {
51659
51661
  searchString: this.toSearch,
@@ -51661,7 +51663,6 @@ stores.inject(MyMetaStore, storeInstance);
51661
51663
  matches: [this.searchMatches[this.selectedMatchIndex]],
51662
51664
  searchOptions: this.searchOptions
51663
51665
  });
51664
- this.preserveSelectedMatchIndex = false;
51665
51666
  }
51666
51667
  /**
51667
51668
  * Apply the replace function to all the matches one time.
@@ -55105,7 +55106,7 @@ stores.inject(MyMetaStore, storeInstance);
55105
55106
  ev.preventDefault();
55106
55107
  const clipboardData = ev.clipboardData;
55107
55108
  if (!clipboardData) return;
55108
- const image = [...clipboardData.files]?.find((file) => AllowedImageMimeTypes.includes(file.type));
55109
+ const image = [...clipboardData.files].find((file) => AllowedImageMimeTypes.includes(file.type));
55109
55110
  const osClipboard = { content: {
55110
55111
  ["text/plain"]: clipboardData?.getData("text/plain"),
55111
55112
  ["text/html"]: clipboardData?.getData("text/html")
@@ -61050,7 +61051,7 @@ stores.inject(MyMetaStore, storeInstance);
61050
61051
  //#region src/plugins/ui_core_views/cell_evaluation/zone_set.ts
61051
61052
  var ZoneSet = class ZoneSet {
61052
61053
  profilesStartingPosition = [0];
61053
- profiles = new Map([[0, []]]);
61054
+ profiles = /* @__PURE__ */ new Map([[0, []]]);
61054
61055
  constructor(zones = []) {
61055
61056
  for (const zone of zones) this.add(zone);
61056
61057
  }
@@ -62219,12 +62220,22 @@ stores.inject(MyMetaStore, storeInstance);
62219
62220
  handle(cmd) {
62220
62221
  switch (cmd.type) {
62221
62222
  case "START":
62222
- for (const sheetId of this.getters.getSheetIds()) for (const chartId of this.getters.getChartIds(sheetId)) this.tryToAddColors(this.getChartColors(chartId));
62223
+ for (const sheetId of this.getters.getSheetIds()) {
62224
+ for (const chartId of this.getters.getChartIds(sheetId)) this.tryToAddColors(this.getChartColors(chartId));
62225
+ for (const figureId of this.getters.getFigures(sheetId)) this.tryToAddColors(this.getCarouselColors(sheetId, figureId.id));
62226
+ }
62223
62227
  break;
62224
62228
  case "UPDATE_CHART":
62225
62229
  case "CREATE_CHART":
62226
62230
  this.tryToAddColors(this.getChartColors(cmd.chartId));
62227
62231
  break;
62232
+ case "CREATE_CAROUSEL":
62233
+ case "UPDATE_CAROUSEL":
62234
+ this.tryToAddColors(this.getCarouselColors(cmd.sheetId, cmd.figureId));
62235
+ break;
62236
+ case "COLOR_SHEET":
62237
+ if (cmd.color) this.tryToAddColors([cmd.color]);
62238
+ break;
62228
62239
  case "UPDATE_CELL":
62229
62240
  case "ADD_CONDITIONAL_FORMAT":
62230
62241
  case "SET_BORDER":
@@ -62247,8 +62258,12 @@ stores.inject(MyMetaStore, storeInstance);
62247
62258
  }
62248
62259
  computeCustomColors() {
62249
62260
  let usedColors = [];
62250
- for (const sheetId of this.getters.getSheetIds()) usedColors = usedColors.concat(this.getColorsFromCells(sheetId), this.getFormattingColors(sheetId), this.getTableColors(sheetId));
62251
- return [...new Set([...usedColors])];
62261
+ for (const sheetId of this.getters.getSheetIds()) usedColors = usedColors.concat(this.getSheetColors(sheetId), this.getColorsFromCells(sheetId), this.getFormattingColors(sheetId), this.getTableColors(sheetId));
62262
+ return [.../* @__PURE__ */ new Set([...usedColors])];
62263
+ }
62264
+ getSheetColors(sheetId) {
62265
+ const sheet = this.getters.getSheet(sheetId);
62266
+ return sheet.color ? [sheet.color] : [];
62252
62267
  }
62253
62268
  getColorsFromCells(sheetId) {
62254
62269
  const cells = Object.values(this.getters.getCells(sheetId));
@@ -62281,6 +62296,11 @@ stores.inject(MyMetaStore, storeInstance);
62281
62296
  if (chart === void 0) return [];
62282
62297
  return [...JSON.stringify(chart.getDefinition()).matchAll(chartColorRegex)].map((color) => color[1]);
62283
62298
  }
62299
+ getCarouselColors(sheetId, figureId) {
62300
+ if (this.getters.getFigure(sheetId, figureId)?.tag !== "carousel") return [];
62301
+ const titleColor = this.getters.getCarousel(figureId).title?.color;
62302
+ return titleColor ? [titleColor] : [];
62303
+ }
62284
62304
  getTableColors(sheetId) {
62285
62305
  return this.getters.getTables(sheetId).flatMap((table) => {
62286
62306
  const config = table.config;
@@ -62913,7 +62933,7 @@ stores.inject(MyMetaStore, storeInstance);
62913
62933
  const definition = getters.getPivotCoreDefinition(pivotId);
62914
62934
  const isDashboard = getters.isDashboard();
62915
62935
  const fields = pivotCell.dimension === "COL" ? definition.columns : definition.rows;
62916
- const hasIcon = !isDashboard && pivotCell.domain.length !== fields.length;
62936
+ const hasIcon = !isDashboard && !getters.shouldShowFormulas() && pivotCell.domain.length !== fields.length;
62917
62937
  const isCollapsed = (definition.collapsedDomains?.[pivotCell.dimension] ?? []).some((domain) => deepEquals(domain, pivotCell.domain));
62918
62938
  const indent = pivotCell.dimension === "ROW" ? (pivotCell.domain.length - 1) * 15 : 0;
62919
62939
  return {
@@ -67262,7 +67282,7 @@ stores.inject(MyMetaStore, storeInstance);
67262
67282
  };
67263
67283
  }
67264
67284
  };
67265
- const invalidateTableStyleCommandsSet = new Set([
67285
+ const invalidateTableStyleCommandsSet = /* @__PURE__ */ new Set([
67266
67286
  "HIDE_COLUMNS_ROWS",
67267
67287
  "UNHIDE_COLUMNS_ROWS",
67268
67288
  "UNFOLD_HEADER_GROUP",
@@ -69541,14 +69561,14 @@ stores.inject(MyMetaStore, storeInstance);
69541
69561
  adjustPositionX(targetCol) {
69542
69562
  const sheetId = this.sheetId;
69543
69563
  const { start, end } = this.getters.getColDimensions(sheetId, targetCol);
69544
- if (this.offsetX + this.viewportWidth + this.offsetCorrectionX < end) this.offsetX = end - this.viewportWidth;
69564
+ if (this.offsetX + this.viewportWidth + this.offsetCorrectionX < end) this.offsetX = end - this.viewportWidth - this.offsetCorrectionX;
69545
69565
  else if (this.offsetX + this.offsetCorrectionX > start) this.offsetX = start - this.offsetCorrectionX;
69546
69566
  this.adjustViewportZoneX();
69547
69567
  }
69548
69568
  adjustPositionY(targetRow) {
69549
69569
  const sheetId = this.sheetId;
69550
69570
  const { start, end } = this.getters.getRowDimensions(sheetId, targetRow);
69551
- if (this.offsetY + this.viewportHeight + this.offsetCorrectionY < end) this.offsetY = end - this.viewportHeight;
69571
+ if (this.offsetY + this.viewportHeight + this.offsetCorrectionY < end) this.offsetY = end - this.viewportHeight - this.offsetCorrectionY;
69552
69572
  else if (this.offsetY + this.offsetCorrectionY > start) this.offsetY = start - this.offsetCorrectionY;
69553
69573
  this.adjustViewportZoneY();
69554
69574
  }
@@ -72162,11 +72182,14 @@ stores.inject(MyMetaStore, storeInstance);
72162
72182
  }
72163
72183
  });
72164
72184
  this.DOMFocusableElementStore = useStore(DOMFocusableElementStore);
72165
- (0, _odoo_owl.useExternalListener)(window, "click", () => this.state.pickerOpened = false);
72185
+ (0, _odoo_owl.useExternalListener)(window, "click", this.onExternalClick.bind(this), { capture: true });
72166
72186
  (0, _odoo_owl.useEffect)((sheetId) => {
72167
72187
  if (this.props.sheetId === sheetId) this.scrollToSheet();
72168
72188
  }, () => [this.env.model.getters.getActiveSheetId()]);
72169
72189
  }
72190
+ onExternalClick(ev) {
72191
+ if (!ev.target.closest(".o-color-picker")) this.state.pickerOpened = false;
72192
+ }
72170
72193
  focusInputAndSelectContent() {
72171
72194
  if (!this.state.isEditing || !this.sheetNameRef.el) return;
72172
72195
  this.sheetNameRef.el.focus();
@@ -72268,6 +72291,8 @@ stores.inject(MyMetaStore, storeInstance);
72268
72291
  },
72269
72292
  openSheetColorPickerCallback: () => {
72270
72293
  this.state.pickerOpened = true;
72294
+ const sheet = this.env.model.getters.getSheet(this.props.sheetId);
72295
+ this.state.currentPickerColor = sheet.color;
72271
72296
  }
72272
72297
  });
72273
72298
  }
@@ -76827,11 +76852,11 @@ stores.inject(MyMetaStore, storeInstance);
76827
76852
  <!-- each data marker in the series does not have a different color -->
76828
76853
  <c:varyColors val="0"/>
76829
76854
  ${joinXmlNodes(rightDataSetsNodes)}
76830
- <c:axId val="${catAxId + 1}" />
76831
- <c:axId val="${valAxId + 1}" />
76855
+ <c:axId val="${17781238}" />
76856
+ <c:axId val="${88853994}" />
76832
76857
  </c:barChart>
76833
- ${addAx("b", "c:catAx", catAxId + 1, valAxId + 1, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
76834
- ${addAx("r", "c:valAx", valAxId + 1, catAxId + 1, chart.axesDesign?.y1?.title, chart.fontColor)}
76858
+ ${addAx("b", "c:catAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
76859
+ ${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
76835
76860
  ` : ""}`;
76836
76861
  }
76837
76862
  function addComboChart(chart) {
@@ -77069,11 +77094,11 @@ stores.inject(MyMetaStore, storeInstance);
77069
77094
  <!-- each data marker in the series does not have a different color -->
77070
77095
  <c:varyColors val="0"/>
77071
77096
  ${joinXmlNodes(rightDataSetsNodes)}
77072
- <c:axId val="${catAxId + 1}" />
77073
- <c:axId val="${valAxId + 1}" />
77097
+ <c:axId val="${17781238}" />
77098
+ <c:axId val="${88853994}" />
77074
77099
  </c:lineChart>
77075
- ${addAx("b", "c:catAx", catAxId + 1, valAxId + 1, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
77076
- ${addAx("r", "c:valAx", valAxId + 1, catAxId + 1, chart.axesDesign?.y1?.title, chart.fontColor)}
77100
+ ${addAx("b", "c:catAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
77101
+ ${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
77077
77102
  ` : ""}
77078
77103
  `;
77079
77104
  }
@@ -77136,11 +77161,11 @@ stores.inject(MyMetaStore, storeInstance);
77136
77161
  <c:varyColors val="0"/>
77137
77162
  <c:scatterStyle val="lineMarker"/>
77138
77163
  ${joinXmlNodes(rightDataSetsNodes)}
77139
- <c:axId val="${catAxId + 1}" />
77140
- <c:axId val="${valAxId + 1}" />
77164
+ <c:axId val="${17781238}" />
77165
+ <c:axId val="${88853994}" />
77141
77166
  </c:scatterChart>
77142
- ${addAx("b", "c:valAx", catAxId + 1, valAxId + 1, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
77143
- ${addAx("r", "c:valAx", valAxId + 1, catAxId + 1, chart.axesDesign?.y1?.title, chart.fontColor)}
77167
+ ${addAx("b", "c:valAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
77168
+ ${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
77144
77169
  ` : ""}`;
77145
77170
  }
77146
77171
  function addRadarChart(chart) {
@@ -79384,8 +79409,8 @@ exports.stores = stores;
79384
79409
  exports.tokenColors = tokenColors;
79385
79410
  exports.tokenize = tokenize;
79386
79411
 
79387
- __info__.version = "19.0.37";
79388
- __info__.date = "2026-06-06T06:22:21.404Z";
79389
- __info__.hash = "41aace0";
79412
+ __info__.version = "19.0.41";
79413
+ __info__.date = "2026-07-01T05:03:20.304Z";
79414
+ __info__.hash = "346d3c0";
79390
79415
 
79391
79416
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);