@odoo/o-spreadsheet 19.1.22 → 19.1.26

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.1.22
6
- * @date 2026-06-06T06:23:19.222Z
7
- * @hash 97a02db
5
+ * @version 19.1.26
6
+ * @date 2026-07-01T05:03:31.665Z
7
+ * @hash 44237c0
8
8
  */
9
9
 
10
10
  (function(exports, _odoo_owl) {
@@ -224,7 +224,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
224
224
  const GRAY_300 = "#D8DADD";
225
225
  const GRAY_200 = "#E7E9ED";
226
226
  const TEXT_BODY = "#374151";
227
- const TEXT_BODY_MUTED = TEXT_BODY + "C2";
227
+ const TEXT_BODY_MUTED = "#374151C2";
228
228
  const ACTION_COLOR = HIGHLIGHT_COLOR;
229
229
  const CHART_TITLE_FONT_SIZE = 16;
230
230
  const DEFAULT_CHART_COLOR_SCALE = {
@@ -317,9 +317,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
317
317
  ];
318
318
  const DEFAULT_CELL_HEIGHT = 23;
319
319
  const FOOTER_HEIGHT = 2 * 23;
320
- const MENU_SEPARATOR_BORDER_WIDTH = 1;
321
- const MENU_SEPARATOR_PADDING = 5;
322
- const MENU_SEPARATOR_HEIGHT = 1 + 2 * 5;
323
320
  const ZOOM_VALUES = [
324
321
  50,
325
322
  75,
@@ -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"
@@ -1164,7 +1161,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1164
1161
  function recomputeZones(zones, zonesToRemove = []) {
1165
1162
  if (zones.length <= 1 && zonesToRemove.length === 0) return zones;
1166
1163
  const profilesStartingPosition = [0];
1167
- const profiles = new Map([[0, []]]);
1164
+ const profiles = /* @__PURE__ */ new Map([[0, []]]);
1168
1165
  modifyProfiles(profilesStartingPosition, profiles, zones, false);
1169
1166
  modifyProfiles(profilesStartingPosition, profiles, zonesToRemove, true);
1170
1167
  return constructZonesFromProfiles(profilesStartingPosition, profiles);
@@ -3472,12 +3469,10 @@ stores.inject(MyMetaStore, storeInstance);
3472
3469
  const pIntegerAndDecimals = `(?:\\d+(?:${escapeRegExp(locale.thousandsSeparator || "")}\\d{3,})*(?:${decimalSeparator}\\d*)?)`;
3473
3470
  const pOnlyDecimals = `(?:${decimalSeparator}\\d+)`;
3474
3471
  const pNumber = "(?:\\s*" + pIntegerAndDecimals + "|" + pOnlyDecimals + ")(?:(e|E)(?:\\+|-)?(?:[0-9]|[0-9][0-9]|[12][0-9]{2}|30[0-7]))?(?:\\s*%)?";
3475
- const pMinus = "(?:\\s*-)?";
3476
- const pCurrencyFormat = "(?:\\s*[\\$€])?";
3477
3472
  const pNumberExp = "^(?:(?:" + [
3478
- pMinus + pCurrencyFormat + pNumber,
3479
- pMinus + pNumber + pCurrencyFormat,
3480
- pCurrencyFormat + pMinus + pNumber
3473
+ "(?:\\s*-)?(?:\\s*[\\$€])?" + pNumber,
3474
+ "(?:\\s*-)?" + pNumber + "(?:\\s*[\\$€])?",
3475
+ "(?:\\s*[\\$€])?(?:\\s*-)?" + pNumber
3481
3476
  ].join(")|(?:") + "))$";
3482
3477
  return new RegExp(pNumberExp, "i");
3483
3478
  });
@@ -5376,7 +5371,7 @@ stores.inject(MyMetaStore, storeInstance);
5376
5371
  function isZoneDependent(cmd) {
5377
5372
  return "sheetId" in cmd && "zone" in cmd;
5378
5373
  }
5379
- const invalidateEvaluationCommands = new Set([
5374
+ const invalidateEvaluationCommands = /* @__PURE__ */ new Set([
5380
5375
  "RENAME_SHEET",
5381
5376
  "DELETE_SHEET",
5382
5377
  "CREATE_SHEET",
@@ -5395,7 +5390,7 @@ stores.inject(MyMetaStore, storeInstance);
5395
5390
  "REMOVE_PIVOT",
5396
5391
  "DUPLICATE_PIVOT"
5397
5392
  ]);
5398
- const invalidateChartEvaluationCommands = new Set([
5393
+ const invalidateChartEvaluationCommands = /* @__PURE__ */ new Set([
5399
5394
  "EVALUATE_CELLS",
5400
5395
  "EVALUATE_CHARTS",
5401
5396
  "UPDATE_CELL",
@@ -5416,20 +5411,20 @@ stores.inject(MyMetaStore, storeInstance);
5416
5411
  "UNDO",
5417
5412
  "REDO"
5418
5413
  ]);
5419
- const invalidateDependenciesCommands = new Set(["MOVE_RANGES"]);
5420
- const invalidateCFEvaluationCommands = new Set([
5414
+ const invalidateDependenciesCommands = /* @__PURE__ */ new Set(["MOVE_RANGES"]);
5415
+ const invalidateCFEvaluationCommands = /* @__PURE__ */ new Set([
5421
5416
  "EVALUATE_CELLS",
5422
5417
  "ADD_CONDITIONAL_FORMAT",
5423
5418
  "REMOVE_CONDITIONAL_FORMAT",
5424
5419
  "CHANGE_CONDITIONAL_FORMAT_PRIORITY"
5425
5420
  ]);
5426
- const invalidateBordersCommands = new Set([
5421
+ const invalidateBordersCommands = /* @__PURE__ */ new Set([
5427
5422
  "AUTOFILL_CELL",
5428
5423
  "SET_BORDER",
5429
5424
  "SET_ZONE_BORDERS",
5430
5425
  "SET_BORDERS_ON_TARGET"
5431
5426
  ]);
5432
- const invalidSubtotalFormulasCommands = new Set([
5427
+ const invalidSubtotalFormulasCommands = /* @__PURE__ */ new Set([
5433
5428
  "UNHIDE_COLUMNS_ROWS",
5434
5429
  "HIDE_COLUMNS_ROWS",
5435
5430
  "GROUP_HEADERS",
@@ -5443,7 +5438,7 @@ stores.inject(MyMetaStore, storeInstance);
5443
5438
  "UPDATE_TABLE",
5444
5439
  "UPDATE_FILTER"
5445
5440
  ]);
5446
- const readonlyAllowedCommands = new Set([
5441
+ const readonlyAllowedCommands = /* @__PURE__ */ new Set([
5447
5442
  "START",
5448
5443
  "ACTIVATE_SHEET",
5449
5444
  "COPY",
@@ -5458,7 +5453,7 @@ stores.inject(MyMetaStore, storeInstance);
5458
5453
  "UPDATE_CAROUSEL_ACTIVE_ITEM",
5459
5454
  "UPDATE_PIVOT"
5460
5455
  ]);
5461
- const coreTypes = new Set([
5456
+ const coreTypes = /* @__PURE__ */ new Set([
5462
5457
  "UPDATE_CELL",
5463
5458
  "UPDATE_CELL_POSITION",
5464
5459
  "CLEAR_CELL",
@@ -6003,7 +5998,6 @@ stores.inject(MyMetaStore, storeInstance);
6003
5998
  //#region src/helpers/edge_scrolling.ts
6004
5999
  const MAX_DELAY = 140;
6005
6000
  const MIN_DELAY = 20;
6006
- const ACCELERATION = .035;
6007
6001
  /**
6008
6002
  * Decreasing exponential function used to determine the "speed" of edge-scrolling
6009
6003
  * as the timeout delay.
@@ -6011,7 +6005,7 @@ stores.inject(MyMetaStore, storeInstance);
6011
6005
  * Returns a timeout delay in milliseconds.
6012
6006
  */
6013
6007
  function scrollDelay(value) {
6014
- return 20 + (140 - 20) * Math.exp(-ACCELERATION * (value - 1));
6008
+ return 20 + (140 - 20) * Math.exp(-.035 * (value - 1));
6015
6009
  }
6016
6010
 
6017
6011
  //#endregion
@@ -7005,7 +6999,7 @@ stores.inject(MyMetaStore, storeInstance);
7005
6999
  const cryptoObj = this.getCrypto();
7006
7000
  if (cryptoObj) return "10000000-1000".replace(/[01]/g, (c) => {
7007
7001
  const n = Number(c);
7008
- return (n ^ cryptoObj.getRandomValues(new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
7002
+ return (n ^ cryptoObj.getRandomValues(/* @__PURE__ */ new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
7009
7003
  });
7010
7004
  else return "xxxxxxxx-xxxx".replace(/[xy]/g, function(c) {
7011
7005
  const r = Math.random() * 16 | 0;
@@ -7020,7 +7014,7 @@ stores.inject(MyMetaStore, storeInstance);
7020
7014
  const cryptoObj = this.getCrypto();
7021
7015
  if (cryptoObj) return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => {
7022
7016
  const n = Number(c);
7023
- return (n ^ cryptoObj.getRandomValues(new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
7017
+ return (n ^ cryptoObj.getRandomValues(/* @__PURE__ */ new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
7024
7018
  });
7025
7019
  else return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
7026
7020
  const r = Math.random() * 16 | 0;
@@ -11614,7 +11608,7 @@ stores.inject(MyMetaStore, storeInstance);
11614
11608
 
11615
11609
  //#endregion
11616
11610
  //#region src/types/data_validation.ts
11617
- const availableDataValidationOperators = new Set([
11611
+ const availableDataValidationOperators = /* @__PURE__ */ new Set([
11618
11612
  "containsText",
11619
11613
  "notContainsText",
11620
11614
  "isEqualText",
@@ -12188,10 +12182,10 @@ stores.inject(MyMetaStore, storeInstance);
12188
12182
  type: dimension.type
12189
12183
  }));
12190
12184
  if (groupValueString.toLowerCase() === "false") return false;
12191
- return pivotNormalizationValueRegistry.get(dimension.type)(groupValueString, dimension.granularity);
12185
+ return pivotNormalizationValueRegistry.get(dimension.type)(groupValueString, dimension);
12192
12186
  }
12193
- function normalizeDateTime(value, granularity) {
12194
- return pivotTimeAdapter(granularity ?? "month").normalizeFunctionValue(value);
12187
+ function normalizeDateTime(value, dimension) {
12188
+ return pivotTimeAdapter(dimension.granularity ?? "month").normalizeFunctionValue(value);
12195
12189
  }
12196
12190
  function toFunctionPivotValue(value, dimension) {
12197
12191
  if (value === null) return `"null"`;
@@ -15217,6 +15211,59 @@ stores.inject(MyMetaStore, storeInstance);
15217
15211
  return (chartSubtypeRegistry.getAll().find((c) => c.matcher?.(definition)) || chartSubtypeRegistry.get(definition.type)).displayName;
15218
15212
  }
15219
15213
 
15214
+ //#endregion
15215
+ //#region src/components/helpers/css.ts
15216
+ function getTextDecoration({ strikethrough, underline }) {
15217
+ if (!strikethrough && !underline) return "none";
15218
+ return `${strikethrough ? "line-through" : ""} ${underline ? "underline" : ""}`;
15219
+ }
15220
+ /**
15221
+ * Convert the cell style to CSS properties.
15222
+ */
15223
+ function cellStyleToCss(style) {
15224
+ const attributes = cellTextStyleToCss(style);
15225
+ if (!style) return attributes;
15226
+ if (style.fillColor) attributes["background"] = style.fillColor;
15227
+ return attributes;
15228
+ }
15229
+ /**
15230
+ * Convert the cell text style to CSS properties.
15231
+ */
15232
+ function cellTextStyleToCss(style) {
15233
+ const attributes = {};
15234
+ if (!style) return attributes;
15235
+ if (style.bold) attributes["font-weight"] = "bold";
15236
+ if (style.italic) attributes["font-style"] = "italic";
15237
+ if (style.fontSize) attributes["font-size"] = `${style.fontSize}px`;
15238
+ if (style.strikethrough || style.underline) {
15239
+ let decoration = style.strikethrough ? "line-through" : "";
15240
+ decoration = style.underline ? decoration + " underline" : decoration;
15241
+ attributes["text-decoration"] = decoration;
15242
+ }
15243
+ if (style.textColor) attributes["color"] = style.textColor;
15244
+ return attributes;
15245
+ }
15246
+ /**
15247
+ * Transform CSS properties into a CSS string.
15248
+ */
15249
+ function cssPropertiesToCss(attributes) {
15250
+ let styleStr = "";
15251
+ for (const attName in attributes) {
15252
+ if (!attributes[attName]) continue;
15253
+ styleStr += `${attName}:${attributes[attName]}; `;
15254
+ }
15255
+ return styleStr;
15256
+ }
15257
+ function getElementMargins(el) {
15258
+ const style = window.getComputedStyle(el);
15259
+ return {
15260
+ top: parseInt(style.marginTop, 10) || 0,
15261
+ bottom: parseInt(style.marginBottom, 10) || 0,
15262
+ left: parseInt(style.marginLeft, 10) || 0,
15263
+ right: parseInt(style.marginRight, 10) || 0
15264
+ };
15265
+ }
15266
+
15220
15267
  //#endregion
15221
15268
  //#region src/components/figures/chart/chartJs/zoomable_chart/zoomable_chart_store.ts
15222
15269
  const TREND_LINE_AXES_IDS = ["x1", MOVING_AVERAGE_TREND_LINE_XAXIS_ID];
@@ -15316,9 +15363,7 @@ stores.inject(MyMetaStore, storeInstance);
15316
15363
  this.removeEventListeners();
15317
15364
  }
15318
15365
  get containerStyle() {
15319
- return `
15320
- height:${this.sliceable ? `calc(100% - ${60}px)` : "100%"};
15321
- `;
15366
+ return cssPropertiesToCss({ height: this.sliceable ? `calc(100% - ${60}px)` : "100%" });
15322
15367
  }
15323
15368
  get masterChartContainerStyle() {
15324
15369
  const runtime = this.env.model.getters.getChartRuntime(this.props.chartId);
@@ -16174,59 +16219,6 @@ stores.inject(MyMetaStore, storeInstance);
16174
16219
  }
16175
16220
  };
16176
16221
 
16177
- //#endregion
16178
- //#region src/components/helpers/css.ts
16179
- function getTextDecoration({ strikethrough, underline }) {
16180
- if (!strikethrough && !underline) return "none";
16181
- return `${strikethrough ? "line-through" : ""} ${underline ? "underline" : ""}`;
16182
- }
16183
- /**
16184
- * Convert the cell style to CSS properties.
16185
- */
16186
- function cellStyleToCss(style) {
16187
- const attributes = cellTextStyleToCss(style);
16188
- if (!style) return attributes;
16189
- if (style.fillColor) attributes["background"] = style.fillColor;
16190
- return attributes;
16191
- }
16192
- /**
16193
- * Convert the cell text style to CSS properties.
16194
- */
16195
- function cellTextStyleToCss(style) {
16196
- const attributes = {};
16197
- if (!style) return attributes;
16198
- if (style.bold) attributes["font-weight"] = "bold";
16199
- if (style.italic) attributes["font-style"] = "italic";
16200
- if (style.fontSize) attributes["font-size"] = `${style.fontSize}px`;
16201
- if (style.strikethrough || style.underline) {
16202
- let decoration = style.strikethrough ? "line-through" : "";
16203
- decoration = style.underline ? decoration + " underline" : decoration;
16204
- attributes["text-decoration"] = decoration;
16205
- }
16206
- if (style.textColor) attributes["color"] = style.textColor;
16207
- return attributes;
16208
- }
16209
- /**
16210
- * Transform CSS properties into a CSS string.
16211
- */
16212
- function cssPropertiesToCss(attributes) {
16213
- let styleStr = "";
16214
- for (const attName in attributes) {
16215
- if (!attributes[attName]) continue;
16216
- styleStr += `${attName}:${attributes[attName]}; `;
16217
- }
16218
- return styleStr;
16219
- }
16220
- function getElementMargins(el) {
16221
- const style = window.getComputedStyle(el);
16222
- return {
16223
- top: parseInt(style.marginTop, 10) || 0,
16224
- bottom: parseInt(style.marginBottom, 10) || 0,
16225
- left: parseInt(style.marginLeft, 10) || 0,
16226
- right: parseInt(style.marginRight, 10) || 0
16227
- };
16228
- }
16229
-
16230
16222
  //#endregion
16231
16223
  //#region src/components/helpers/time_hooks.ts
16232
16224
  /**
@@ -17221,11 +17213,11 @@ stores.inject(MyMetaStore, storeInstance);
17221
17213
  getResizerPosition(resizer) {
17222
17214
  const anchorCenteringOffset = (ANCHOR_SIZE - ACTIVE_BORDER_WIDTH) / 2;
17223
17215
  const style = {};
17224
- if (resizer.includes("top")) style.top = `${-anchorCenteringOffset}px`;
17225
- else if (resizer.includes("bottom")) style.bottom = `${-anchorCenteringOffset}px`;
17216
+ if (resizer.includes("top")) style.top = `-3px`;
17217
+ else if (resizer.includes("bottom")) style.bottom = `-3px`;
17226
17218
  else style.bottom = `calc(50% - ${anchorCenteringOffset}px)`;
17227
- if (resizer.includes("left")) style.left = `${-anchorCenteringOffset}px`;
17228
- else if (resizer.includes("right")) style.right = `${-anchorCenteringOffset}px`;
17219
+ if (resizer.includes("left")) style.left = `-3px`;
17220
+ else if (resizer.includes("right")) style.right = `-3px`;
17229
17221
  else style.right = `calc(50% - ${anchorCenteringOffset}px)`;
17230
17222
  return cssPropertiesToCss(style);
17231
17223
  }
@@ -27602,6 +27594,7 @@ stores.inject(MyMetaStore, storeInstance);
27602
27594
  function mapParentFunction(tokens) {
27603
27595
  const stack = [];
27604
27596
  let functionStarted = "";
27597
+ let braceDepth = 0;
27605
27598
  function pushTokenToFunctionContext(token) {
27606
27599
  if (stack.length === 0) return;
27607
27600
  const functionContext = stack.at(-1);
@@ -27614,7 +27607,7 @@ stores.inject(MyMetaStore, storeInstance);
27614
27607
  });
27615
27608
  }
27616
27609
  }
27617
- return tokens.map((token, i) => {
27610
+ return tokens.map((token) => {
27618
27611
  if (!["SPACE", "LEFT_PAREN"].includes(token.type)) functionStarted = "";
27619
27612
  switch (token.type) {
27620
27613
  case "SYMBOL":
@@ -27635,8 +27628,16 @@ stores.inject(MyMetaStore, storeInstance);
27635
27628
  stack.pop()?.argsTokens?.flat().forEach(pushTokenToFunctionContext);
27636
27629
  pushTokenToFunctionContext(token);
27637
27630
  break;
27631
+ case "LEFT_BRACE":
27632
+ braceDepth++;
27633
+ pushTokenToFunctionContext(token);
27634
+ break;
27635
+ case "RIGHT_BRACE":
27636
+ braceDepth--;
27637
+ pushTokenToFunctionContext(token);
27638
+ break;
27638
27639
  case "ARG_SEPARATOR":
27639
- if (stack.length) stack[stack.length - 1].argPosition++;
27640
+ if (stack.length && braceDepth === 0) stack[stack.length - 1].argPosition++;
27640
27641
  pushTokenToFunctionContext(token);
27641
27642
  break;
27642
27643
  default:
@@ -28850,10 +28851,7 @@ stores.inject(MyMetaStore, storeInstance);
28850
28851
  //#endregion
28851
28852
  //#region src/components/color_picker/color_picker.ts
28852
28853
  const ITEM_BORDER_WIDTH = 1;
28853
- const ITEM_EDGE_LENGTH = 18;
28854
- const ITEMS_PER_LINE = 10;
28855
- const MAGNIFIER_EDGE = 16;
28856
- const CONTENT_WIDTH = ITEMS_PER_LINE * (ITEM_EDGE_LENGTH + 2 * ITEM_BORDER_WIDTH) + (ITEMS_PER_LINE - 1) * 2;
28854
+ const CONTENT_WIDTH = 218;
28857
28855
  const INNER_GRADIENT_WIDTH = CONTENT_WIDTH - 2 * ITEM_BORDER_WIDTH;
28858
28856
  const INNER_GRADIENT_HEIGHT = CONTENT_WIDTH - 30 - 2 * ITEM_BORDER_WIDTH;
28859
28857
  var ColorPicker = class extends _odoo_owl.Component {
@@ -28917,8 +28915,8 @@ stores.inject(MyMetaStore, storeInstance);
28917
28915
  const left = Math.round(INNER_GRADIENT_WIDTH * clip(s / 100, 0, 1));
28918
28916
  const top = Math.round(INNER_GRADIENT_HEIGHT * clip(1 - 2 * l / (200 - s), 0, 1));
28919
28917
  return cssPropertiesToCss({
28920
- left: `${-MAGNIFIER_EDGE / 2 + left}px`,
28921
- top: `${-MAGNIFIER_EDGE / 2 + top}px`,
28918
+ left: `${-16 / 2 + left}px`,
28919
+ top: `${-16 / 2 + top}px`,
28922
28920
  background: hslaToHex(this.state.currentHslaColor)
28923
28921
  });
28924
28922
  }
@@ -41195,8 +41193,12 @@ stores.inject(MyMetaStore, storeInstance);
41195
41193
  }
41196
41194
  stopEdition(direction) {
41197
41195
  if (this.canStopEdition()) {
41196
+ const { col, row } = this.currentEditedCell;
41198
41197
  this._stopEdition();
41199
- if (direction) this.model.selection.moveAnchorCell(direction, 1);
41198
+ if (direction) {
41199
+ this.model.selection.selectCell(col, row);
41200
+ this.model.selection.moveAnchorCell(direction, 1);
41201
+ }
41200
41202
  return;
41201
41203
  }
41202
41204
  const editedCell = this.currentEditedCell;
@@ -48463,9 +48465,9 @@ stores.inject(MyMetaStore, storeInstance);
48463
48465
  allSheetsMatches = [];
48464
48466
  activeSheetMatches = [];
48465
48467
  specificRangeMatches = [];
48468
+ selectedMatchPosition = null;
48466
48469
  currentSearchRegex = null;
48467
48470
  initialShowFormulaState;
48468
- preserveSelectedMatchIndex = false;
48469
48471
  irreplaceableMatchCount = 0;
48470
48472
  isSearchDirty = false;
48471
48473
  shouldFinalizeUpdateSelection = false;
@@ -48587,7 +48589,10 @@ stores.inject(MyMetaStore, storeInstance);
48587
48589
  */
48588
48590
  _updateSearch(toSearch, searchOptions) {
48589
48591
  this.searchOptions = searchOptions;
48590
- if (toSearch !== this.toSearch) this.selectedMatchIndex = null;
48592
+ if (toSearch !== this.toSearch) {
48593
+ this.selectedMatchIndex = null;
48594
+ this.selectedMatchPosition = null;
48595
+ }
48591
48596
  this.toSearch = toSearch;
48592
48597
  this.currentSearchRegex = getSearchRegex(this.toSearch, this.searchOptions);
48593
48598
  this.refreshSearch({
@@ -48599,8 +48604,14 @@ stores.inject(MyMetaStore, storeInstance);
48599
48604
  * refresh the matches according to the current search options
48600
48605
  */
48601
48606
  refreshSearch(options) {
48602
- if (!this.preserveSelectedMatchIndex) this.selectedMatchIndex = null;
48603
48607
  this.findMatches();
48608
+ if (this.selectedMatchPosition) if (this.selectedMatchPosition.sheetId !== this.getters.getActiveSheetId()) {
48609
+ this.selectedMatchIndex = null;
48610
+ this.selectedMatchPosition = null;
48611
+ } else {
48612
+ const index = this.searchMatches.findIndex((match) => match.sheetId === this.selectedMatchPosition?.sheetId && match.col === this.selectedMatchPosition?.col && match.row === this.selectedMatchPosition?.row);
48613
+ if (index !== -1) this.selectedMatchIndex = index;
48614
+ }
48604
48615
  this.selectNextCell(0, options);
48605
48616
  }
48606
48617
  getSheetsInSearchOrder() {
@@ -48668,6 +48679,7 @@ stores.inject(MyMetaStore, storeInstance);
48668
48679
  const matches = this.searchMatches;
48669
48680
  if (!matches.length) {
48670
48681
  this.selectedMatchIndex = null;
48682
+ this.selectedMatchPosition = null;
48671
48683
  return;
48672
48684
  }
48673
48685
  let nextIndex;
@@ -48681,14 +48693,13 @@ stores.inject(MyMetaStore, storeInstance);
48681
48693
  } else nextIndex = this.selectedMatchIndex + indexChange;
48682
48694
  nextIndex = (nextIndex + matches.length) % matches.length;
48683
48695
  this.selectedMatchIndex = nextIndex;
48696
+ this.selectedMatchPosition = matches[this.selectedMatchIndex];
48684
48697
  const selectedMatch = matches[nextIndex];
48685
48698
  if (options.jumpToMatchSheet && this.getters.getActiveSheetId() !== selectedMatch.sheetId) {
48686
- this.preserveSelectedMatchIndex = true;
48687
48699
  this.model.dispatch("ACTIVATE_SHEET", {
48688
48700
  sheetIdFrom: this.getters.getActiveSheetId(),
48689
48701
  sheetIdTo: selectedMatch.sheetId
48690
48702
  });
48691
- this.preserveSelectedMatchIndex = false;
48692
48703
  this.isSearchDirty = false;
48693
48704
  }
48694
48705
  this.model.selection.getBackToDefault();
@@ -48699,7 +48710,6 @@ stores.inject(MyMetaStore, storeInstance);
48699
48710
  */
48700
48711
  replace() {
48701
48712
  if (this.selectedMatchIndex === null) return;
48702
- this.preserveSelectedMatchIndex = true;
48703
48713
  this.shouldFinalizeUpdateSelection = true;
48704
48714
  this.model.dispatch("REPLACE_SEARCH", {
48705
48715
  searchString: this.toSearch,
@@ -48707,7 +48717,6 @@ stores.inject(MyMetaStore, storeInstance);
48707
48717
  matches: [this.searchMatches[this.selectedMatchIndex]],
48708
48718
  searchOptions: this.searchOptions
48709
48719
  });
48710
- this.preserveSelectedMatchIndex = false;
48711
48720
  }
48712
48721
  /**
48713
48722
  * Apply the replace function to all the matches one time.
@@ -52609,7 +52618,7 @@ stores.inject(MyMetaStore, storeInstance);
52609
52618
  ev.preventDefault();
52610
52619
  const clipboardData = ev.clipboardData;
52611
52620
  if (!clipboardData) return;
52612
- const image = [...clipboardData.files]?.find((file) => AllowedImageMimeTypes.includes(file.type));
52621
+ const image = [...clipboardData.files].find((file) => AllowedImageMimeTypes.includes(file.type));
52613
52622
  const osClipboard = { content: {
52614
52623
  ["text/plain"]: clipboardData?.getData("text/plain"),
52615
52624
  ["text/html"]: clipboardData?.getData("text/html")
@@ -58441,7 +58450,7 @@ stores.inject(MyMetaStore, storeInstance);
58441
58450
  //#region src/plugins/ui_core_views/cell_evaluation/zone_set.ts
58442
58451
  var ZoneSet = class ZoneSet {
58443
58452
  profilesStartingPosition = [0];
58444
- profiles = new Map([[0, []]]);
58453
+ profiles = /* @__PURE__ */ new Map([[0, []]]);
58445
58454
  constructor(zones = []) {
58446
58455
  for (const zone of zones) this.add(zone);
58447
58456
  }
@@ -59630,7 +59639,7 @@ stores.inject(MyMetaStore, storeInstance);
59630
59639
  const definition = getters.getPivotCoreDefinition(pivotId);
59631
59640
  const isDashboard = getters.isDashboard();
59632
59641
  const fields = pivotCell.dimension === "COL" ? definition.columns : definition.rows;
59633
- const hasIcon = !isDashboard && pivotCell.domain.length !== fields.length;
59642
+ const hasIcon = !isDashboard && !getters.shouldShowFormulas() && pivotCell.domain.length !== fields.length;
59634
59643
  const isCollapsed = (definition.collapsedDomains?.[pivotCell.dimension] ?? []).some((domain) => deepEquals(domain, pivotCell.domain));
59635
59644
  const indent = pivotCell.dimension === "ROW" ? (pivotCell.domain.length - 1) * 15 : 0;
59636
59645
  return {
@@ -59819,12 +59828,22 @@ stores.inject(MyMetaStore, storeInstance);
59819
59828
  handle(cmd) {
59820
59829
  switch (cmd.type) {
59821
59830
  case "START":
59822
- for (const sheetId of this.getters.getSheetIds()) for (const chartId of this.getters.getChartIds(sheetId)) this.tryToAddColors(this.getChartColors(chartId));
59831
+ for (const sheetId of this.getters.getSheetIds()) {
59832
+ for (const chartId of this.getters.getChartIds(sheetId)) this.tryToAddColors(this.getChartColors(chartId));
59833
+ for (const figureId of this.getters.getFigures(sheetId)) this.tryToAddColors(this.getCarouselColors(sheetId, figureId.id));
59834
+ }
59823
59835
  break;
59824
59836
  case "UPDATE_CHART":
59825
59837
  case "CREATE_CHART":
59826
59838
  this.tryToAddColors(this.getChartColors(cmd.chartId));
59827
59839
  break;
59840
+ case "CREATE_CAROUSEL":
59841
+ case "UPDATE_CAROUSEL":
59842
+ this.tryToAddColors(this.getCarouselColors(cmd.sheetId, cmd.figureId));
59843
+ break;
59844
+ case "COLOR_SHEET":
59845
+ if (cmd.color) this.tryToAddColors([cmd.color]);
59846
+ break;
59828
59847
  case "UPDATE_CELL":
59829
59848
  case "ADD_CONDITIONAL_FORMAT":
59830
59849
  case "SET_BORDER":
@@ -59847,8 +59866,12 @@ stores.inject(MyMetaStore, storeInstance);
59847
59866
  }
59848
59867
  computeCustomColors() {
59849
59868
  let usedColors = [];
59850
- for (const sheetId of this.getters.getSheetIds()) usedColors = usedColors.concat(this.getColorsFromCells(sheetId), this.getFormattingColors(sheetId), this.getTableColors(sheetId));
59851
- return [...new Set([...usedColors])];
59869
+ for (const sheetId of this.getters.getSheetIds()) usedColors = usedColors.concat(this.getSheetColors(sheetId), this.getColorsFromCells(sheetId), this.getFormattingColors(sheetId), this.getTableColors(sheetId));
59870
+ return [.../* @__PURE__ */ new Set([...usedColors])];
59871
+ }
59872
+ getSheetColors(sheetId) {
59873
+ const sheet = this.getters.getSheet(sheetId);
59874
+ return sheet.color ? [sheet.color] : [];
59852
59875
  }
59853
59876
  getColorsFromCells(sheetId) {
59854
59877
  const colors = /* @__PURE__ */ new Set();
@@ -59877,6 +59900,11 @@ stores.inject(MyMetaStore, storeInstance);
59877
59900
  if (chart === void 0) return [];
59878
59901
  return [...JSON.stringify(chart.getDefinition()).matchAll(chartColorRegex)].map((color) => color[1]);
59879
59902
  }
59903
+ getCarouselColors(sheetId, figureId) {
59904
+ if (this.getters.getFigure(sheetId, figureId)?.tag !== "carousel") return [];
59905
+ const titleColor = this.getters.getCarousel(figureId).title?.color;
59906
+ return titleColor ? [titleColor] : [];
59907
+ }
59880
59908
  getTableColors(sheetId) {
59881
59909
  return this.getters.getTables(sheetId).flatMap((table) => {
59882
59910
  const config = table.config;
@@ -63093,7 +63121,7 @@ stores.inject(MyMetaStore, storeInstance);
63093
63121
  };
63094
63122
  }
63095
63123
  };
63096
- const invalidateTableStyleCommandsSet = new Set([
63124
+ const invalidateTableStyleCommandsSet = /* @__PURE__ */ new Set([
63097
63125
  "HIDE_COLUMNS_ROWS",
63098
63126
  "UNHIDE_COLUMNS_ROWS",
63099
63127
  "UNFOLD_HEADER_GROUP",
@@ -67362,14 +67390,14 @@ stores.inject(MyMetaStore, storeInstance);
67362
67390
  adjustPositionX(targetCol) {
67363
67391
  const sheetId = this.sheetId;
67364
67392
  const { start, end } = this.getters.getColDimensions(sheetId, targetCol);
67365
- if (this.offsetX + this.viewportWidth + this.offsetCorrectionX < end) this.offsetX = end - this.viewportWidth;
67393
+ if (this.offsetX + this.viewportWidth + this.offsetCorrectionX < end) this.offsetX = end - this.viewportWidth - this.offsetCorrectionX;
67366
67394
  else if (this.offsetX + this.offsetCorrectionX > start) this.offsetX = start - this.offsetCorrectionX;
67367
67395
  this.adjustViewportZoneX();
67368
67396
  }
67369
67397
  adjustPositionY(targetRow) {
67370
67398
  const sheetId = this.sheetId;
67371
67399
  const { start, end } = this.getters.getRowDimensions(sheetId, targetRow);
67372
- if (this.offsetY + this.viewportHeight + this.offsetCorrectionY < end) this.offsetY = end - this.viewportHeight;
67400
+ if (this.offsetY + this.viewportHeight + this.offsetCorrectionY < end) this.offsetY = end - this.viewportHeight - this.offsetCorrectionY;
67373
67401
  else if (this.offsetY + this.offsetCorrectionY > start) this.offsetY = start - this.offsetCorrectionY;
67374
67402
  this.adjustViewportZoneY();
67375
67403
  }
@@ -69951,11 +69979,14 @@ stores.inject(MyMetaStore, storeInstance);
69951
69979
  }
69952
69980
  });
69953
69981
  this.DOMFocusableElementStore = useStore(DOMFocusableElementStore);
69954
- (0, _odoo_owl.useExternalListener)(window, "click", () => this.state.pickerOpened = false);
69982
+ (0, _odoo_owl.useExternalListener)(window, "click", this.onExternalClick.bind(this), { capture: true });
69955
69983
  (0, _odoo_owl.useEffect)((sheetId) => {
69956
69984
  if (this.props.sheetId === sheetId) this.scrollToSheet();
69957
69985
  }, () => [this.env.model.getters.getActiveSheetId()]);
69958
69986
  }
69987
+ onExternalClick(ev) {
69988
+ if (!ev.target.closest(".o-color-picker")) this.state.pickerOpened = false;
69989
+ }
69959
69990
  focusInputAndSelectContent() {
69960
69991
  if (!this.state.isEditing || !this.sheetNameRef.el) return;
69961
69992
  this.sheetNameRef.el.focus();
@@ -70057,6 +70088,8 @@ stores.inject(MyMetaStore, storeInstance);
70057
70088
  },
70058
70089
  openSheetColorPickerCallback: () => {
70059
70090
  this.state.pickerOpened = true;
70091
+ const sheet = this.env.model.getters.getSheet(this.props.sheetId);
70092
+ this.state.currentPickerColor = sheet.color;
70060
70093
  }
70061
70094
  });
70062
70095
  }
@@ -74248,11 +74281,11 @@ stores.inject(MyMetaStore, storeInstance);
74248
74281
  <!-- each data marker in the series does not have a different color -->
74249
74282
  <c:varyColors val="0"/>
74250
74283
  ${joinXmlNodes(rightDataSetsNodes)}
74251
- <c:axId val="${catAxId + 1}" />
74252
- <c:axId val="${valAxId + 1}" />
74284
+ <c:axId val="${17781238}" />
74285
+ <c:axId val="${88853994}" />
74253
74286
  </c:barChart>
74254
- ${addAx("b", "c:catAx", catAxId + 1, valAxId + 1, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
74255
- ${addAx("r", "c:valAx", valAxId + 1, catAxId + 1, chart.axesDesign?.y1?.title, chart.fontColor)}
74287
+ ${addAx("b", "c:catAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
74288
+ ${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
74256
74289
  ` : ""}`;
74257
74290
  }
74258
74291
  function addComboChart(chart) {
@@ -74490,11 +74523,11 @@ stores.inject(MyMetaStore, storeInstance);
74490
74523
  <!-- each data marker in the series does not have a different color -->
74491
74524
  <c:varyColors val="0"/>
74492
74525
  ${joinXmlNodes(rightDataSetsNodes)}
74493
- <c:axId val="${catAxId + 1}" />
74494
- <c:axId val="${valAxId + 1}" />
74526
+ <c:axId val="${17781238}" />
74527
+ <c:axId val="${88853994}" />
74495
74528
  </c:lineChart>
74496
- ${addAx("b", "c:catAx", catAxId + 1, valAxId + 1, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
74497
- ${addAx("r", "c:valAx", valAxId + 1, catAxId + 1, chart.axesDesign?.y1?.title, chart.fontColor)}
74529
+ ${addAx("b", "c:catAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
74530
+ ${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
74498
74531
  ` : ""}
74499
74532
  `;
74500
74533
  }
@@ -74557,11 +74590,11 @@ stores.inject(MyMetaStore, storeInstance);
74557
74590
  <c:varyColors val="0"/>
74558
74591
  <c:scatterStyle val="lineMarker"/>
74559
74592
  ${joinXmlNodes(rightDataSetsNodes)}
74560
- <c:axId val="${catAxId + 1}" />
74561
- <c:axId val="${valAxId + 1}" />
74593
+ <c:axId val="${17781238}" />
74594
+ <c:axId val="${88853994}" />
74562
74595
  </c:scatterChart>
74563
- ${addAx("b", "c:valAx", catAxId + 1, valAxId + 1, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
74564
- ${addAx("r", "c:valAx", valAxId + 1, catAxId + 1, chart.axesDesign?.y1?.title, chart.fontColor)}
74596
+ ${addAx("b", "c:valAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
74597
+ ${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
74565
74598
  ` : ""}`;
74566
74599
  }
74567
74600
  function addRadarChart(chart) {
@@ -79121,8 +79154,8 @@ exports.stores = stores;
79121
79154
  exports.tokenColors = tokenColors;
79122
79155
  exports.tokenize = tokenize;
79123
79156
 
79124
- __info__.version = "19.1.22";
79125
- __info__.date = "2026-06-06T06:23:19.222Z";
79126
- __info__.hash = "97a02db";
79157
+ __info__.version = "19.1.26";
79158
+ __info__.date = "2026-07-01T05:03:31.665Z";
79159
+ __info__.hash = "44237c0";
79127
79160
 
79128
79161
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);