@odoo/o-spreadsheet 19.2.15 → 19.2.19

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.2.15
6
- * @date 2026-06-06T06:23:14.723Z
7
- * @hash d29528e
5
+ * @version 19.2.19
6
+ * @date 2026-07-01T05:04:28.638Z
7
+ * @hash 3529978
8
8
  */
9
9
 
10
10
  (function(exports, _odoo_owl) {
@@ -227,7 +227,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
227
227
  const GRAY_300 = "#D8DADD";
228
228
  const GRAY_200 = "#E7E9ED";
229
229
  const TEXT_BODY = "#374151";
230
- const TEXT_BODY_MUTED = TEXT_BODY + "C2";
230
+ const TEXT_BODY_MUTED = "#374151C2";
231
231
  const ACTION_COLOR = HIGHLIGHT_COLOR;
232
232
  const CHART_TITLE_FONT_SIZE = 16;
233
233
  const DEFAULT_CHART_COLOR_SCALE = {
@@ -320,9 +320,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
320
320
  ];
321
321
  const DEFAULT_CELL_HEIGHT = 23;
322
322
  const FOOTER_HEIGHT = 2 * 23;
323
- const MENU_SEPARATOR_BORDER_WIDTH = 1;
324
- const MENU_SEPARATOR_PADDING = 5;
325
- const MENU_SEPARATOR_HEIGHT = 1 + 2 * 5;
326
323
  const ZOOM_VALUES = [
327
324
  50,
328
325
  75,
@@ -353,7 +350,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
353
350
  const DEFAULT_VERTICAL_ALIGN = DEFAULT_STYLE.verticalAlign;
354
351
  const DEFAULT_WRAPPING_MODE = DEFAULT_STYLE.wrapping;
355
352
  const DEFAULT_FONT_SIZE = DEFAULT_STYLE.fontSize;
356
- const DEFAULT_FONT = "'Roboto', arial";
353
+ const DEFAULT_FONT = "'Roboto', arial, 'Liberation Sans'";
357
354
  const DEFAULT_BORDER_DESC = {
358
355
  style: "thin",
359
356
  color: "#000000"
@@ -1189,7 +1186,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1189
1186
  function recomputeZones(zones, zonesToRemove = []) {
1190
1187
  if (zones.length <= 1 && zonesToRemove.length === 0) return zones;
1191
1188
  const profilesStartingPosition = [0];
1192
- const profiles = new Map([[0, []]]);
1189
+ const profiles = /* @__PURE__ */ new Map([[0, []]]);
1193
1190
  modifyProfiles(profilesStartingPosition, profiles, zones, false);
1194
1191
  modifyProfiles(profilesStartingPosition, profiles, zonesToRemove, true);
1195
1192
  return constructZonesFromProfiles(profilesStartingPosition, profiles);
@@ -3497,12 +3494,10 @@ stores.inject(MyMetaStore, storeInstance);
3497
3494
  const pIntegerAndDecimals = `(?:\\d+(?:${escapeRegExp(locale.thousandsSeparator || "")}\\d{3,})*(?:${decimalSeparator}\\d*)?)`;
3498
3495
  const pOnlyDecimals = `(?:${decimalSeparator}\\d+)`;
3499
3496
  const pNumber = "(?:\\s*" + pIntegerAndDecimals + "|" + pOnlyDecimals + ")(?:(e|E)(?:\\+|-)?(?:[0-9]|[0-9][0-9]|[12][0-9]{2}|30[0-7]))?(?:\\s*%)?";
3500
- const pMinus = "(?:\\s*-)?";
3501
- const pCurrencyFormat = "(?:\\s*[\\$€])?";
3502
3497
  const pNumberExp = "^(?:(?:" + [
3503
- pMinus + pCurrencyFormat + pNumber,
3504
- pMinus + pNumber + pCurrencyFormat,
3505
- pCurrencyFormat + pMinus + pNumber
3498
+ "(?:\\s*-)?(?:\\s*[\\$€])?" + pNumber,
3499
+ "(?:\\s*-)?" + pNumber + "(?:\\s*[\\$€])?",
3500
+ "(?:\\s*[\\$€])?(?:\\s*-)?" + pNumber
3506
3501
  ].join(")|(?:") + "))$";
3507
3502
  return new RegExp(pNumberExp, "i");
3508
3503
  });
@@ -5402,7 +5397,7 @@ stores.inject(MyMetaStore, storeInstance);
5402
5397
  function isZoneDependent(cmd) {
5403
5398
  return "sheetId" in cmd && "zone" in cmd;
5404
5399
  }
5405
- const invalidateEvaluationCommands = new Set([
5400
+ const invalidateEvaluationCommands = /* @__PURE__ */ new Set([
5406
5401
  "RENAME_SHEET",
5407
5402
  "DELETE_SHEET",
5408
5403
  "CREATE_SHEET",
@@ -5421,7 +5416,7 @@ stores.inject(MyMetaStore, storeInstance);
5421
5416
  "REMOVE_PIVOT",
5422
5417
  "DUPLICATE_PIVOT"
5423
5418
  ]);
5424
- const invalidateChartEvaluationCommands = new Set([
5419
+ const invalidateChartEvaluationCommands = /* @__PURE__ */ new Set([
5425
5420
  "EVALUATE_CELLS",
5426
5421
  "EVALUATE_CHARTS",
5427
5422
  "UPDATE_CELL",
@@ -5440,20 +5435,20 @@ stores.inject(MyMetaStore, storeInstance);
5440
5435
  "UNDO",
5441
5436
  "REDO"
5442
5437
  ]);
5443
- const invalidateDependenciesCommands = new Set(["MOVE_RANGES"]);
5444
- const invalidateCFEvaluationCommands = new Set([
5438
+ const invalidateDependenciesCommands = /* @__PURE__ */ new Set(["MOVE_RANGES"]);
5439
+ const invalidateCFEvaluationCommands = /* @__PURE__ */ new Set([
5445
5440
  "EVALUATE_CELLS",
5446
5441
  "ADD_CONDITIONAL_FORMAT",
5447
5442
  "REMOVE_CONDITIONAL_FORMAT",
5448
5443
  "CHANGE_CONDITIONAL_FORMAT_PRIORITY"
5449
5444
  ]);
5450
- const invalidateBordersCommands = new Set([
5445
+ const invalidateBordersCommands = /* @__PURE__ */ new Set([
5451
5446
  "AUTOFILL_CELL",
5452
5447
  "SET_BORDER",
5453
5448
  "SET_ZONE_BORDERS",
5454
5449
  "SET_BORDERS_ON_TARGET"
5455
5450
  ]);
5456
- const invalidSubtotalFormulasCommands = new Set([
5451
+ const invalidSubtotalFormulasCommands = /* @__PURE__ */ new Set([
5457
5452
  "UNHIDE_COLUMNS_ROWS",
5458
5453
  "HIDE_COLUMNS_ROWS",
5459
5454
  "GROUP_HEADERS",
@@ -5467,7 +5462,7 @@ stores.inject(MyMetaStore, storeInstance);
5467
5462
  "UPDATE_TABLE",
5468
5463
  "UPDATE_FILTER"
5469
5464
  ]);
5470
- const readonlyAllowedCommands = new Set([
5465
+ const readonlyAllowedCommands = /* @__PURE__ */ new Set([
5471
5466
  "START",
5472
5467
  "ACTIVATE_SHEET",
5473
5468
  "COPY",
@@ -5482,7 +5477,7 @@ stores.inject(MyMetaStore, storeInstance);
5482
5477
  "UPDATE_CAROUSEL_ACTIVE_ITEM",
5483
5478
  "UPDATE_PIVOT"
5484
5479
  ]);
5485
- const lockedSheetAllowedCommands = new Set([
5480
+ const lockedSheetAllowedCommands = /* @__PURE__ */ new Set([
5486
5481
  "LOCK_SHEET",
5487
5482
  "UNLOCK_SHEET",
5488
5483
  "MOVE_SHEET",
@@ -5513,7 +5508,7 @@ stores.inject(MyMetaStore, storeInstance);
5513
5508
  "SHIFT_VIEWPORT_DOWN",
5514
5509
  "SHIFT_VIEWPORT_UP"
5515
5510
  ]);
5516
- const coreTypes = new Set([
5511
+ const coreTypes = /* @__PURE__ */ new Set([
5517
5512
  "UPDATE_CELL",
5518
5513
  "UPDATE_CELL_POSITION",
5519
5514
  "CLEAR_CELL",
@@ -6064,7 +6059,6 @@ stores.inject(MyMetaStore, storeInstance);
6064
6059
  //#region src/helpers/edge_scrolling.ts
6065
6060
  const MAX_DELAY = 140;
6066
6061
  const MIN_DELAY = 20;
6067
- const ACCELERATION = .035;
6068
6062
  /**
6069
6063
  * Decreasing exponential function used to determine the "speed" of edge-scrolling
6070
6064
  * as the timeout delay.
@@ -6072,7 +6066,7 @@ stores.inject(MyMetaStore, storeInstance);
6072
6066
  * Returns a timeout delay in milliseconds.
6073
6067
  */
6074
6068
  function scrollDelay(value) {
6075
- return 20 + (140 - 20) * Math.exp(-ACCELERATION * (value - 1));
6069
+ return 20 + (140 - 20) * Math.exp(-.035 * (value - 1));
6076
6070
  }
6077
6071
 
6078
6072
  //#endregion
@@ -7066,7 +7060,7 @@ stores.inject(MyMetaStore, storeInstance);
7066
7060
  const cryptoObj = this.getCrypto();
7067
7061
  if (cryptoObj) return "10000000-1000".replace(/[01]/g, (c) => {
7068
7062
  const n = Number(c);
7069
- return (n ^ cryptoObj.getRandomValues(new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
7063
+ return (n ^ cryptoObj.getRandomValues(/* @__PURE__ */ new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
7070
7064
  });
7071
7065
  else return "xxxxxxxx-xxxx".replace(/[xy]/g, function(c) {
7072
7066
  const r = Math.random() * 16 | 0;
@@ -7081,7 +7075,7 @@ stores.inject(MyMetaStore, storeInstance);
7081
7075
  const cryptoObj = this.getCrypto();
7082
7076
  if (cryptoObj) return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => {
7083
7077
  const n = Number(c);
7084
- return (n ^ cryptoObj.getRandomValues(new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
7078
+ return (n ^ cryptoObj.getRandomValues(/* @__PURE__ */ new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
7085
7079
  });
7086
7080
  else return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
7087
7081
  const r = Math.random() * 16 | 0;
@@ -11699,7 +11693,7 @@ stores.inject(MyMetaStore, storeInstance);
11699
11693
 
11700
11694
  //#endregion
11701
11695
  //#region src/types/data_validation.ts
11702
- const availableDataValidationOperators = new Set([
11696
+ const availableDataValidationOperators = /* @__PURE__ */ new Set([
11703
11697
  "containsText",
11704
11698
  "notContainsText",
11705
11699
  "isEqualText",
@@ -12287,10 +12281,10 @@ stores.inject(MyMetaStore, storeInstance);
12287
12281
  type: dimension.type
12288
12282
  }));
12289
12283
  if (groupValueString.toLowerCase() === "false") return false;
12290
- return pivotNormalizationValueRegistry.get(dimension.type)(groupValueString, dimension.granularity);
12284
+ return pivotNormalizationValueRegistry.get(dimension.type)(groupValueString, dimension);
12291
12285
  }
12292
- function normalizeDateTime(value, granularity) {
12293
- return pivotTimeAdapter(granularity ?? "month").normalizeFunctionValue(value);
12286
+ function normalizeDateTime(value, dimension) {
12287
+ return pivotTimeAdapter(dimension.granularity ?? "month").normalizeFunctionValue(value);
12294
12288
  }
12295
12289
  function toFunctionPivotValue(value, dimension) {
12296
12290
  if (value === null) return `"null"`;
@@ -15315,6 +15309,59 @@ stores.inject(MyMetaStore, storeInstance);
15315
15309
  return (chartSubtypeRegistry.getAll().find((c) => c.matcher?.(definition)) || chartSubtypeRegistry.get(definition.type)).displayName;
15316
15310
  }
15317
15311
 
15312
+ //#endregion
15313
+ //#region src/components/helpers/css.ts
15314
+ function getTextDecoration({ strikethrough, underline }) {
15315
+ if (!strikethrough && !underline) return "none";
15316
+ return `${strikethrough ? "line-through" : ""} ${underline ? "underline" : ""}`;
15317
+ }
15318
+ /**
15319
+ * Convert the cell style to CSS properties.
15320
+ */
15321
+ function cellStyleToCss(style) {
15322
+ const attributes = cellTextStyleToCss(style);
15323
+ if (!style) return attributes;
15324
+ if (style.fillColor) attributes["background"] = style.fillColor;
15325
+ return attributes;
15326
+ }
15327
+ /**
15328
+ * Convert the cell text style to CSS properties.
15329
+ */
15330
+ function cellTextStyleToCss(style) {
15331
+ const attributes = {};
15332
+ if (!style) return attributes;
15333
+ if (style.bold) attributes["font-weight"] = "bold";
15334
+ if (style.italic) attributes["font-style"] = "italic";
15335
+ if (style.fontSize) attributes["font-size"] = `${style.fontSize}px`;
15336
+ if (style.strikethrough || style.underline) {
15337
+ let decoration = style.strikethrough ? "line-through" : "";
15338
+ decoration = style.underline ? decoration + " underline" : decoration;
15339
+ attributes["text-decoration"] = decoration;
15340
+ }
15341
+ if (style.textColor) attributes["color"] = style.textColor;
15342
+ return attributes;
15343
+ }
15344
+ /**
15345
+ * Transform CSS properties into a CSS string.
15346
+ */
15347
+ function cssPropertiesToCss(attributes) {
15348
+ let styleStr = "";
15349
+ for (const attName in attributes) {
15350
+ if (!attributes[attName]) continue;
15351
+ styleStr += `${attName}:${attributes[attName]}; `;
15352
+ }
15353
+ return styleStr;
15354
+ }
15355
+ function getElementMargins(el) {
15356
+ const style = window.getComputedStyle(el);
15357
+ return {
15358
+ top: parseInt(style.marginTop, 10) || 0,
15359
+ bottom: parseInt(style.marginBottom, 10) || 0,
15360
+ left: parseInt(style.marginLeft, 10) || 0,
15361
+ right: parseInt(style.marginRight, 10) || 0
15362
+ };
15363
+ }
15364
+
15318
15365
  //#endregion
15319
15366
  //#region src/components/figures/chart/chartJs/zoomable_chart/zoomable_chart_store.ts
15320
15367
  const TREND_LINE_AXES_IDS = ["x1", MOVING_AVERAGE_TREND_LINE_XAXIS_ID];
@@ -15414,9 +15461,7 @@ stores.inject(MyMetaStore, storeInstance);
15414
15461
  this.removeEventListeners();
15415
15462
  }
15416
15463
  get containerStyle() {
15417
- return `
15418
- height:${this.sliceable ? `calc(100% - ${60}px)` : "100%"};
15419
- `;
15464
+ return cssPropertiesToCss({ height: this.sliceable ? `calc(100% - ${60}px)` : "100%" });
15420
15465
  }
15421
15466
  get masterChartContainerStyle() {
15422
15467
  const runtime = this.env.model.getters.getChartRuntime(this.props.chartId);
@@ -16280,59 +16325,6 @@ stores.inject(MyMetaStore, storeInstance);
16280
16325
  }
16281
16326
  };
16282
16327
 
16283
- //#endregion
16284
- //#region src/components/helpers/css.ts
16285
- function getTextDecoration({ strikethrough, underline }) {
16286
- if (!strikethrough && !underline) return "none";
16287
- return `${strikethrough ? "line-through" : ""} ${underline ? "underline" : ""}`;
16288
- }
16289
- /**
16290
- * Convert the cell style to CSS properties.
16291
- */
16292
- function cellStyleToCss(style) {
16293
- const attributes = cellTextStyleToCss(style);
16294
- if (!style) return attributes;
16295
- if (style.fillColor) attributes["background"] = style.fillColor;
16296
- return attributes;
16297
- }
16298
- /**
16299
- * Convert the cell text style to CSS properties.
16300
- */
16301
- function cellTextStyleToCss(style) {
16302
- const attributes = {};
16303
- if (!style) return attributes;
16304
- if (style.bold) attributes["font-weight"] = "bold";
16305
- if (style.italic) attributes["font-style"] = "italic";
16306
- if (style.fontSize) attributes["font-size"] = `${style.fontSize}px`;
16307
- if (style.strikethrough || style.underline) {
16308
- let decoration = style.strikethrough ? "line-through" : "";
16309
- decoration = style.underline ? decoration + " underline" : decoration;
16310
- attributes["text-decoration"] = decoration;
16311
- }
16312
- if (style.textColor) attributes["color"] = style.textColor;
16313
- return attributes;
16314
- }
16315
- /**
16316
- * Transform CSS properties into a CSS string.
16317
- */
16318
- function cssPropertiesToCss(attributes) {
16319
- let styleStr = "";
16320
- for (const attName in attributes) {
16321
- if (!attributes[attName]) continue;
16322
- styleStr += `${attName}:${attributes[attName]}; `;
16323
- }
16324
- return styleStr;
16325
- }
16326
- function getElementMargins(el) {
16327
- const style = window.getComputedStyle(el);
16328
- return {
16329
- top: parseInt(style.marginTop, 10) || 0,
16330
- bottom: parseInt(style.marginBottom, 10) || 0,
16331
- left: parseInt(style.marginLeft, 10) || 0,
16332
- right: parseInt(style.marginRight, 10) || 0
16333
- };
16334
- }
16335
-
16336
16328
  //#endregion
16337
16329
  //#region src/components/helpers/time_hooks.ts
16338
16330
  /**
@@ -17333,11 +17325,11 @@ stores.inject(MyMetaStore, storeInstance);
17333
17325
  getResizerPosition(resizer) {
17334
17326
  const anchorCenteringOffset = (ANCHOR_SIZE - ACTIVE_BORDER_WIDTH) / 2;
17335
17327
  const style = {};
17336
- if (resizer.includes("top")) style.top = `${-anchorCenteringOffset}px`;
17337
- else if (resizer.includes("bottom")) style.bottom = `${-anchorCenteringOffset}px`;
17328
+ if (resizer.includes("top")) style.top = `-3px`;
17329
+ else if (resizer.includes("bottom")) style.bottom = `-3px`;
17338
17330
  else style.bottom = `calc(50% - ${anchorCenteringOffset}px)`;
17339
- if (resizer.includes("left")) style.left = `${-anchorCenteringOffset}px`;
17340
- else if (resizer.includes("right")) style.right = `${-anchorCenteringOffset}px`;
17331
+ if (resizer.includes("left")) style.left = `-3px`;
17332
+ else if (resizer.includes("right")) style.right = `-3px`;
17341
17333
  else style.right = `calc(50% - ${anchorCenteringOffset}px)`;
17342
17334
  return cssPropertiesToCss(style);
17343
17335
  }
@@ -33048,6 +33040,7 @@ stores.inject(MyMetaStore, storeInstance);
33048
33040
  function mapParentFunction(tokens) {
33049
33041
  const stack = [];
33050
33042
  let functionStarted = "";
33043
+ let braceDepth = 0;
33051
33044
  function pushTokenToFunctionContext(token) {
33052
33045
  if (stack.length === 0) return;
33053
33046
  const functionContext = stack.at(-1);
@@ -33060,7 +33053,7 @@ stores.inject(MyMetaStore, storeInstance);
33060
33053
  });
33061
33054
  }
33062
33055
  }
33063
- return tokens.map((token, i) => {
33056
+ return tokens.map((token) => {
33064
33057
  if (!["SPACE", "LEFT_PAREN"].includes(token.type)) functionStarted = "";
33065
33058
  switch (token.type) {
33066
33059
  case "SYMBOL":
@@ -33081,8 +33074,16 @@ stores.inject(MyMetaStore, storeInstance);
33081
33074
  stack.pop()?.argsTokens?.flat().forEach(pushTokenToFunctionContext);
33082
33075
  pushTokenToFunctionContext(token);
33083
33076
  break;
33077
+ case "LEFT_BRACE":
33078
+ braceDepth++;
33079
+ pushTokenToFunctionContext(token);
33080
+ break;
33081
+ case "RIGHT_BRACE":
33082
+ braceDepth--;
33083
+ pushTokenToFunctionContext(token);
33084
+ break;
33084
33085
  case "ARG_SEPARATOR":
33085
- if (stack.length) stack[stack.length - 1].argPosition++;
33086
+ if (stack.length && braceDepth === 0) stack[stack.length - 1].argPosition++;
33086
33087
  pushTokenToFunctionContext(token);
33087
33088
  break;
33088
33089
  default:
@@ -34392,10 +34393,7 @@ stores.inject(MyMetaStore, storeInstance);
34392
34393
  //#endregion
34393
34394
  //#region src/components/color_picker/color_picker.ts
34394
34395
  const ITEM_BORDER_WIDTH = 1;
34395
- const ITEM_EDGE_LENGTH = 18;
34396
- const ITEMS_PER_LINE = 10;
34397
- const MAGNIFIER_EDGE = 16;
34398
- const CONTENT_WIDTH = ITEMS_PER_LINE * (ITEM_EDGE_LENGTH + 2 * ITEM_BORDER_WIDTH) + (ITEMS_PER_LINE - 1) * 2;
34396
+ const CONTENT_WIDTH = 218;
34399
34397
  const INNER_GRADIENT_WIDTH = CONTENT_WIDTH - 2 * ITEM_BORDER_WIDTH;
34400
34398
  const INNER_GRADIENT_HEIGHT = CONTENT_WIDTH - 30 - 2 * ITEM_BORDER_WIDTH;
34401
34399
  var ColorPicker = class extends _odoo_owl.Component {
@@ -34459,8 +34457,8 @@ stores.inject(MyMetaStore, storeInstance);
34459
34457
  const left = Math.round(INNER_GRADIENT_WIDTH * clip(s / 100, 0, 1));
34460
34458
  const top = Math.round(INNER_GRADIENT_HEIGHT * clip(1 - 2 * l / (200 - s), 0, 1));
34461
34459
  return cssPropertiesToCss({
34462
- left: `${-MAGNIFIER_EDGE / 2 + left}px`,
34463
- top: `${-MAGNIFIER_EDGE / 2 + top}px`,
34460
+ left: `${-16 / 2 + left}px`,
34461
+ top: `${-16 / 2 + top}px`,
34464
34462
  background: hslaToHex(this.state.currentHslaColor)
34465
34463
  });
34466
34464
  }
@@ -41882,9 +41880,9 @@ stores.inject(MyMetaStore, storeInstance);
41882
41880
  allSheetsMatches = [];
41883
41881
  activeSheetMatches = [];
41884
41882
  specificRangeMatches = [];
41883
+ selectedMatchPosition = null;
41885
41884
  currentSearchRegex = null;
41886
41885
  initialShowFormulaState;
41887
- preserveSelectedMatchIndex = false;
41888
41886
  irreplaceableMatchCount = 0;
41889
41887
  isSearchDirty = false;
41890
41888
  shouldFinalizeUpdateSelection = false;
@@ -42006,7 +42004,10 @@ stores.inject(MyMetaStore, storeInstance);
42006
42004
  */
42007
42005
  _updateSearch(toSearch, searchOptions) {
42008
42006
  this.searchOptions = searchOptions;
42009
- if (toSearch !== this.toSearch) this.selectedMatchIndex = null;
42007
+ if (toSearch !== this.toSearch) {
42008
+ this.selectedMatchIndex = null;
42009
+ this.selectedMatchPosition = null;
42010
+ }
42010
42011
  this.toSearch = toSearch;
42011
42012
  this.currentSearchRegex = getSearchRegex(this.toSearch, this.searchOptions);
42012
42013
  this.refreshSearch({
@@ -42018,8 +42019,14 @@ stores.inject(MyMetaStore, storeInstance);
42018
42019
  * refresh the matches according to the current search options
42019
42020
  */
42020
42021
  refreshSearch(options) {
42021
- if (!this.preserveSelectedMatchIndex) this.selectedMatchIndex = null;
42022
42022
  this.findMatches();
42023
+ if (this.selectedMatchPosition) if (this.selectedMatchPosition.sheetId !== this.getters.getActiveSheetId()) {
42024
+ this.selectedMatchIndex = null;
42025
+ this.selectedMatchPosition = null;
42026
+ } else {
42027
+ const index = this.searchMatches.findIndex((match) => match.sheetId === this.selectedMatchPosition?.sheetId && match.col === this.selectedMatchPosition?.col && match.row === this.selectedMatchPosition?.row);
42028
+ if (index !== -1) this.selectedMatchIndex = index;
42029
+ }
42023
42030
  this.selectNextCell(0, options);
42024
42031
  }
42025
42032
  getSheetsInSearchOrder() {
@@ -42087,6 +42094,7 @@ stores.inject(MyMetaStore, storeInstance);
42087
42094
  const matches = this.searchMatches;
42088
42095
  if (!matches.length) {
42089
42096
  this.selectedMatchIndex = null;
42097
+ this.selectedMatchPosition = null;
42090
42098
  return;
42091
42099
  }
42092
42100
  let nextIndex;
@@ -42100,14 +42108,13 @@ stores.inject(MyMetaStore, storeInstance);
42100
42108
  } else nextIndex = this.selectedMatchIndex + indexChange;
42101
42109
  nextIndex = (nextIndex + matches.length) % matches.length;
42102
42110
  this.selectedMatchIndex = nextIndex;
42111
+ this.selectedMatchPosition = matches[this.selectedMatchIndex];
42103
42112
  const selectedMatch = matches[nextIndex];
42104
42113
  if (options.jumpToMatchSheet && this.getters.getActiveSheetId() !== selectedMatch.sheetId) {
42105
- this.preserveSelectedMatchIndex = true;
42106
42114
  this.model.dispatch("ACTIVATE_SHEET", {
42107
42115
  sheetIdFrom: this.getters.getActiveSheetId(),
42108
42116
  sheetIdTo: selectedMatch.sheetId
42109
42117
  });
42110
- this.preserveSelectedMatchIndex = false;
42111
42118
  this.isSearchDirty = false;
42112
42119
  }
42113
42120
  this.model.selection.getBackToDefault();
@@ -42118,7 +42125,6 @@ stores.inject(MyMetaStore, storeInstance);
42118
42125
  */
42119
42126
  replace() {
42120
42127
  if (this.selectedMatchIndex === null) return;
42121
- this.preserveSelectedMatchIndex = true;
42122
42128
  this.shouldFinalizeUpdateSelection = true;
42123
42129
  this.model.dispatch("REPLACE_SEARCH", {
42124
42130
  searchString: this.toSearch,
@@ -42126,7 +42132,6 @@ stores.inject(MyMetaStore, storeInstance);
42126
42132
  matches: [this.searchMatches[this.selectedMatchIndex]],
42127
42133
  searchOptions: this.searchOptions
42128
42134
  });
42129
- this.preserveSelectedMatchIndex = false;
42130
42135
  }
42131
42136
  /**
42132
42137
  * Apply the replace function to all the matches one time.
@@ -47360,7 +47365,7 @@ stores.inject(MyMetaStore, storeInstance);
47360
47365
  mode: "pivot",
47361
47366
  numberOfCols: 5,
47362
47367
  numberOfRows: 8,
47363
- mainSubHeaderRows: new Set([props.tableConfig.numberOfHeaders, props.tableConfig.numberOfHeaders + 3])
47368
+ mainSubHeaderRows: /* @__PURE__ */ new Set([props.tableConfig.numberOfHeaders, props.tableConfig.numberOfHeaders + 3])
47364
47369
  };
47365
47370
  drawPreviewTable(ctx, getComputedTableStyle(props.tableConfig, props.tableStyle, tableMetaData), {
47366
47371
  ...tableMetaData,
@@ -50609,9 +50614,12 @@ stores.inject(MyMetaStore, storeInstance);
50609
50614
  }
50610
50615
  stopEdition(direction) {
50611
50616
  if (this.canStopEdition()) {
50617
+ const { col, row } = this.currentEditedCell;
50612
50618
  this._stopEdition();
50613
- if (direction) if (this.getters.isSingleCellOrMerge(this.sheetId, this.getters.getSelectedZone())) this.model.selection.moveAnchorCell(direction, 1);
50614
- else moveAnchorWithinSelection(this.getters, this.model.selection, direction);
50619
+ if (direction) if (this.getters.isSingleCellOrMerge(this.sheetId, this.getters.getSelectedZone())) {
50620
+ this.model.selection.selectCell(col, row);
50621
+ this.model.selection.moveAnchorCell(direction, 1);
50622
+ } else moveAnchorWithinSelection(this.getters, this.model.selection, direction);
50615
50623
  return;
50616
50624
  }
50617
50625
  const editedCell = this.currentEditedCell;
@@ -54608,7 +54616,7 @@ stores.inject(MyMetaStore, storeInstance);
54608
54616
  ev.preventDefault();
54609
54617
  const clipboardData = ev.clipboardData;
54610
54618
  if (!clipboardData) return;
54611
- const image = [...clipboardData.files]?.find((file) => AllowedImageMimeTypes.includes(file.type));
54619
+ const image = [...clipboardData.files].find((file) => AllowedImageMimeTypes.includes(file.type));
54612
54620
  const osClipboard = { content: {
54613
54621
  ["text/plain"]: clipboardData?.getData("text/plain"),
54614
54622
  ["text/html"]: clipboardData?.getData("text/html")
@@ -60624,7 +60632,7 @@ stores.inject(MyMetaStore, storeInstance);
60624
60632
  //#region src/plugins/ui_core_views/cell_evaluation/zone_set.ts
60625
60633
  var ZoneSet = class ZoneSet {
60626
60634
  profilesStartingPosition = [0];
60627
- profiles = new Map([[0, []]]);
60635
+ profiles = /* @__PURE__ */ new Map([[0, []]]);
60628
60636
  constructor(zones = []) {
60629
60637
  for (const zone of zones) this.add(zone);
60630
60638
  }
@@ -61786,7 +61794,7 @@ stores.inject(MyMetaStore, storeInstance);
61786
61794
  const definition = getters.getPivotCoreDefinition(pivotId);
61787
61795
  const isDashboard = getters.isDashboard();
61788
61796
  const fields = pivotCell.dimension === "COL" ? definition.columns : definition.rows;
61789
- const hasIcon = !isDashboard && pivotCell.domain.length !== fields.length;
61797
+ const hasIcon = !isDashboard && !getters.shouldShowFormulas() && pivotCell.domain.length !== fields.length;
61790
61798
  const isCollapsed = (definition.collapsedDomains?.[pivotCell.dimension] ?? []).some((domain) => deepEquals(domain, pivotCell.domain));
61791
61799
  const indent = pivotCell.dimension === "ROW" ? (pivotCell.domain.length - 1) * 15 : 0;
61792
61800
  return {
@@ -61975,12 +61983,22 @@ stores.inject(MyMetaStore, storeInstance);
61975
61983
  handle(cmd) {
61976
61984
  switch (cmd.type) {
61977
61985
  case "START":
61978
- for (const sheetId of this.getters.getSheetIds()) for (const chartId of this.getters.getChartIds(sheetId)) this.tryToAddColors(this.getChartColors(chartId));
61986
+ for (const sheetId of this.getters.getSheetIds()) {
61987
+ for (const chartId of this.getters.getChartIds(sheetId)) this.tryToAddColors(this.getChartColors(chartId));
61988
+ for (const figureId of this.getters.getFigures(sheetId)) this.tryToAddColors(this.getCarouselColors(sheetId, figureId.id));
61989
+ }
61979
61990
  break;
61980
61991
  case "UPDATE_CHART":
61981
61992
  case "CREATE_CHART":
61982
61993
  this.tryToAddColors(this.getChartColors(cmd.chartId));
61983
61994
  break;
61995
+ case "CREATE_CAROUSEL":
61996
+ case "UPDATE_CAROUSEL":
61997
+ this.tryToAddColors(this.getCarouselColors(cmd.sheetId, cmd.figureId));
61998
+ break;
61999
+ case "COLOR_SHEET":
62000
+ if (cmd.color) this.tryToAddColors([cmd.color]);
62001
+ break;
61984
62002
  case "UPDATE_CELL":
61985
62003
  case "ADD_CONDITIONAL_FORMAT":
61986
62004
  case "SET_BORDER":
@@ -62003,8 +62021,12 @@ stores.inject(MyMetaStore, storeInstance);
62003
62021
  }
62004
62022
  computeCustomColors() {
62005
62023
  let usedColors = [];
62006
- for (const sheetId of this.getters.getSheetIds()) usedColors = usedColors.concat(this.getColorsFromCells(sheetId), this.getFormattingColors(sheetId), this.getTableColors(sheetId));
62007
- return [...new Set([...usedColors])];
62024
+ for (const sheetId of this.getters.getSheetIds()) usedColors = usedColors.concat(this.getSheetColors(sheetId), this.getColorsFromCells(sheetId), this.getFormattingColors(sheetId), this.getTableColors(sheetId));
62025
+ return [.../* @__PURE__ */ new Set([...usedColors])];
62026
+ }
62027
+ getSheetColors(sheetId) {
62028
+ const sheet = this.getters.getSheet(sheetId);
62029
+ return sheet.color ? [sheet.color] : [];
62008
62030
  }
62009
62031
  getColorsFromCells(sheetId) {
62010
62032
  const cells = Object.values(this.getters.getCells(sheetId));
@@ -62037,6 +62059,11 @@ stores.inject(MyMetaStore, storeInstance);
62037
62059
  if (chart === void 0) return [];
62038
62060
  return [...JSON.stringify(chart.getDefinition()).matchAll(chartColorRegex)].map((color) => color[1]);
62039
62061
  }
62062
+ getCarouselColors(sheetId, figureId) {
62063
+ if (this.getters.getFigure(sheetId, figureId)?.tag !== "carousel") return [];
62064
+ const titleColor = this.getters.getCarousel(figureId).title?.color;
62065
+ return titleColor ? [titleColor] : [];
62066
+ }
62040
62067
  getTableColors(sheetId) {
62041
62068
  return this.getters.getTables(sheetId).flatMap((table) => {
62042
62069
  const config = table.config;
@@ -65457,7 +65484,7 @@ stores.inject(MyMetaStore, storeInstance);
65457
65484
  };
65458
65485
  }
65459
65486
  };
65460
- const invalidateTableStyleCommandsSet = new Set([
65487
+ const invalidateTableStyleCommandsSet = /* @__PURE__ */ new Set([
65461
65488
  "HIDE_COLUMNS_ROWS",
65462
65489
  "UNHIDE_COLUMNS_ROWS",
65463
65490
  "UNFOLD_HEADER_GROUP",
@@ -69799,14 +69826,14 @@ stores.inject(MyMetaStore, storeInstance);
69799
69826
  adjustPositionX(targetCol) {
69800
69827
  const sheetId = this.sheetId;
69801
69828
  const { start, end } = this.getters.getColDimensions(sheetId, targetCol);
69802
- if (this.offsetX + this.viewportWidth + this.offsetCorrectionX < end) this.offsetX = end - this.viewportWidth;
69829
+ if (this.offsetX + this.viewportWidth + this.offsetCorrectionX < end) this.offsetX = end - this.viewportWidth - this.offsetCorrectionX;
69803
69830
  else if (this.offsetX + this.offsetCorrectionX > start) this.offsetX = start - this.offsetCorrectionX;
69804
69831
  this.adjustViewportZoneX();
69805
69832
  }
69806
69833
  adjustPositionY(targetRow) {
69807
69834
  const sheetId = this.sheetId;
69808
69835
  const { start, end } = this.getters.getRowDimensions(sheetId, targetRow);
69809
- if (this.offsetY + this.viewportHeight + this.offsetCorrectionY < end) this.offsetY = end - this.viewportHeight;
69836
+ if (this.offsetY + this.viewportHeight + this.offsetCorrectionY < end) this.offsetY = end - this.viewportHeight - this.offsetCorrectionY;
69810
69837
  else if (this.offsetY + this.offsetCorrectionY > start) this.offsetY = start - this.offsetCorrectionY;
69811
69838
  this.adjustViewportZoneY();
69812
69839
  }
@@ -72424,7 +72451,7 @@ stores.inject(MyMetaStore, storeInstance);
72424
72451
  }
72425
72452
  });
72426
72453
  this.DOMFocusableElementStore = useStore(DOMFocusableElementStore);
72427
- (0, _odoo_owl.useExternalListener)(window, "click", () => this.state.pickerOpened = false);
72454
+ (0, _odoo_owl.useExternalListener)(window, "click", this.onExternalClick.bind(this), { capture: true });
72428
72455
  (0, _odoo_owl.useEffect)((sheetId) => {
72429
72456
  if (this.props.sheetId === sheetId) this.scrollToSheet();
72430
72457
  }, () => [this.env.model.getters.getActiveSheetId()]);
@@ -72443,6 +72470,9 @@ stores.inject(MyMetaStore, storeInstance);
72443
72470
  this.env.model.off("command-rejected", this);
72444
72471
  });
72445
72472
  }
72473
+ onExternalClick(ev) {
72474
+ if (!ev.target.closest(".o-color-picker")) this.state.pickerOpened = false;
72475
+ }
72446
72476
  focusInputAndSelectContent() {
72447
72477
  if (!this.state.isEditing || !this.sheetNameRef.el) return;
72448
72478
  this.sheetNameRef.el.focus();
@@ -72544,6 +72574,8 @@ stores.inject(MyMetaStore, storeInstance);
72544
72574
  },
72545
72575
  openSheetColorPickerCallback: () => {
72546
72576
  this.state.pickerOpened = true;
72577
+ const sheet = this.env.model.getters.getSheet(this.props.sheetId);
72578
+ this.state.currentPickerColor = sheet.color;
72547
72579
  }
72548
72580
  });
72549
72581
  }
@@ -73946,7 +73978,7 @@ stores.inject(MyMetaStore, storeInstance);
73946
73978
  this.closePopover();
73947
73979
  return;
73948
73980
  }
73949
- const pivotId = this.pivotIdInSelection;
73981
+ const pivotId = this.dynamicPivotIdInSelection;
73950
73982
  if (pivotId) {
73951
73983
  this.env.openSidePanel("PivotSidePanel", {
73952
73984
  pivotId,
@@ -73976,7 +74008,7 @@ stores.inject(MyMetaStore, storeInstance);
73976
74008
  this.state.popoverProps = void 0;
73977
74009
  }
73978
74010
  get action() {
73979
- if (this.pivotIdInSelection) return {
74011
+ if (this.dynamicPivotIdInSelection) return {
73980
74012
  name: _t("Edit pivot style"),
73981
74013
  icon: "o-spreadsheet-Icon.EDIT_TABLE"
73982
74014
  };
@@ -73995,15 +74027,19 @@ stores.inject(MyMetaStore, storeInstance);
73995
74027
  get tableStyles() {
73996
74028
  return this.env.model.getters.getTableStyles();
73997
74029
  }
73998
- get pivotIdInSelection() {
74030
+ get dynamicPivotIdInSelection() {
73999
74031
  const selection = this.env.model.getters.getSelectedZones();
74000
- for (const zone of selection) for (const position of positions(zone)) {
74001
- const sheetId = this.env.model.getters.getActiveSheetId();
74002
- const pivotId = this.env.model.getters.getPivotIdFromPosition({
74003
- sheetId,
74004
- ...position
74005
- });
74006
- if (pivotId) return pivotId;
74032
+ const pivotCellIds = new Set(this.env.model.getters.getCellsWithTrackedFormula("PIVOT"));
74033
+ if (pivotCellIds.size === 0) return;
74034
+ const activeSheetId = this.env.model.getters.getActiveSheetId();
74035
+ for (const zone of selection) for (const position of cellPositions(activeSheetId, zone)) {
74036
+ const mainPosition = this.env.model.getters.getArrayFormulaSpreadingOn(position);
74037
+ if (!mainPosition) continue;
74038
+ const cellId = this.env.model.getters.getCell(mainPosition)?.id;
74039
+ if (cellId && pivotCellIds.has(cellId)) {
74040
+ const pivotId = this.env.model.getters.getPivotIdFromPosition(mainPosition);
74041
+ if (pivotId) return pivotId;
74042
+ }
74007
74043
  }
74008
74044
  }
74009
74045
  get class() {
@@ -76806,11 +76842,11 @@ stores.inject(MyMetaStore, storeInstance);
76806
76842
  <!-- each data marker in the series does not have a different color -->
76807
76843
  <c:varyColors val="0"/>
76808
76844
  ${joinXmlNodes(rightDataSetsNodes)}
76809
- <c:axId val="${catAxId + 1}" />
76810
- <c:axId val="${valAxId + 1}" />
76845
+ <c:axId val="${17781238}" />
76846
+ <c:axId val="${88853994}" />
76811
76847
  </c:barChart>
76812
- ${addAx("b", "c:catAx", catAxId + 1, valAxId + 1, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
76813
- ${addAx("r", "c:valAx", valAxId + 1, catAxId + 1, chart.axesDesign?.y1?.title, chart.fontColor)}
76848
+ ${addAx("b", "c:catAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
76849
+ ${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
76814
76850
  ` : ""}`;
76815
76851
  }
76816
76852
  function addComboChart(chart) {
@@ -77062,11 +77098,11 @@ stores.inject(MyMetaStore, storeInstance);
77062
77098
  <c:varyColors val="0"/>
77063
77099
  ${joinXmlNodes(rightDataSetsNodes)}
77064
77100
  ${insertDataLabels({ showValues: chart.showValues })}
77065
- <c:axId val="${catAxId + 1}" />
77066
- <c:axId val="${valAxId + 1}" />
77101
+ <c:axId val="${17781238}" />
77102
+ <c:axId val="${88853994}" />
77067
77103
  </c:lineChart>
77068
- ${addAx("b", "c:catAx", catAxId + 1, valAxId + 1, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
77069
- ${addAx("r", "c:valAx", valAxId + 1, catAxId + 1, chart.axesDesign?.y1?.title, chart.fontColor)}
77104
+ ${addAx("b", "c:catAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
77105
+ ${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
77070
77106
  ` : ""}
77071
77107
  `;
77072
77108
  }
@@ -77132,11 +77168,11 @@ stores.inject(MyMetaStore, storeInstance);
77132
77168
  <c:scatterStyle val="lineMarker"/>
77133
77169
  ${joinXmlNodes(rightDataSetsNodes)}
77134
77170
  ${insertDataLabels({ showValues: chart.showValues })}
77135
- <c:axId val="${catAxId + 1}" />
77136
- <c:axId val="${valAxId + 1}" />
77171
+ <c:axId val="${17781238}" />
77172
+ <c:axId val="${88853994}" />
77137
77173
  </c:scatterChart>
77138
- ${addAx("b", "c:valAx", catAxId + 1, valAxId + 1, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
77139
- ${addAx("r", "c:valAx", valAxId + 1, catAxId + 1, chart.axesDesign?.y1?.title, chart.fontColor)}
77174
+ ${addAx("b", "c:valAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
77175
+ ${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
77140
77176
  ` : ""}`;
77141
77177
  }
77142
77178
  function addRadarChart(chart) {
@@ -81688,8 +81724,8 @@ exports.stores = stores;
81688
81724
  exports.tokenColors = tokenColors;
81689
81725
  exports.tokenize = tokenize;
81690
81726
 
81691
- __info__.version = "19.2.15";
81692
- __info__.date = "2026-06-06T06:23:14.723Z";
81693
- __info__.hash = "d29528e";
81727
+ __info__.version = "19.2.19";
81728
+ __info__.date = "2026-07-01T05:04:28.638Z";
81729
+ __info__.hash = "3529978";
81694
81730
 
81695
81731
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);