@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
  import { App, Component, blockDom, markRaw, onMounted, onPatched, onWillPatch, onWillStart, onWillUnmount, onWillUpdateProps, status, toRaw, useChildSubEnv, useComponent, useEffect, useEnv, useExternalListener, useRef, useState, useSubEnv, whenReady, xml } from "@odoo/owl";
@@ -225,7 +225,7 @@ const GRAY_900 = "#111827";
225
225
  const GRAY_300 = "#D8DADD";
226
226
  const GRAY_200 = "#E7E9ED";
227
227
  const TEXT_BODY = "#374151";
228
- const TEXT_BODY_MUTED = TEXT_BODY + "C2";
228
+ const TEXT_BODY_MUTED = "#374151C2";
229
229
  const ACTION_COLOR = HIGHLIGHT_COLOR;
230
230
  const CHART_TITLE_FONT_SIZE = 16;
231
231
  const DEFAULT_CHART_COLOR_SCALE = {
@@ -318,9 +318,6 @@ const COLOR_PICKER_DEFAULTS = [
318
318
  ];
319
319
  const DEFAULT_CELL_HEIGHT = 23;
320
320
  const FOOTER_HEIGHT = 2 * 23;
321
- const MENU_SEPARATOR_BORDER_WIDTH = 1;
322
- const MENU_SEPARATOR_PADDING = 5;
323
- const MENU_SEPARATOR_HEIGHT = 1 + 2 * 5;
324
321
  const ZOOM_VALUES = [
325
322
  50,
326
323
  75,
@@ -351,7 +348,7 @@ const DEFAULT_NUMBER_STYLE = {
351
348
  const DEFAULT_VERTICAL_ALIGN = DEFAULT_STYLE.verticalAlign;
352
349
  const DEFAULT_WRAPPING_MODE = DEFAULT_STYLE.wrapping;
353
350
  const DEFAULT_FONT_SIZE = DEFAULT_STYLE.fontSize;
354
- const DEFAULT_FONT = "'Roboto', arial";
351
+ const DEFAULT_FONT = "'Roboto', arial, 'Liberation Sans'";
355
352
  const DEFAULT_BORDER_DESC = {
356
353
  style: "thin",
357
354
  color: "#000000"
@@ -1187,7 +1184,7 @@ function toXC(col, row, rangePart = {
1187
1184
  function recomputeZones(zones, zonesToRemove = []) {
1188
1185
  if (zones.length <= 1 && zonesToRemove.length === 0) return zones;
1189
1186
  const profilesStartingPosition = [0];
1190
- const profiles = new Map([[0, []]]);
1187
+ const profiles = /* @__PURE__ */ new Map([[0, []]]);
1191
1188
  modifyProfiles(profilesStartingPosition, profiles, zones, false);
1192
1189
  modifyProfiles(profilesStartingPosition, profiles, zonesToRemove, true);
1193
1190
  return constructZonesFromProfiles(profilesStartingPosition, profiles);
@@ -3495,12 +3492,10 @@ const getNumberRegex = memoize(function getNumberRegex(locale) {
3495
3492
  const pIntegerAndDecimals = `(?:\\d+(?:${escapeRegExp(locale.thousandsSeparator || "")}\\d{3,})*(?:${decimalSeparator}\\d*)?)`;
3496
3493
  const pOnlyDecimals = `(?:${decimalSeparator}\\d+)`;
3497
3494
  const pNumber = "(?:\\s*" + pIntegerAndDecimals + "|" + pOnlyDecimals + ")(?:(e|E)(?:\\+|-)?(?:[0-9]|[0-9][0-9]|[12][0-9]{2}|30[0-7]))?(?:\\s*%)?";
3498
- const pMinus = "(?:\\s*-)?";
3499
- const pCurrencyFormat = "(?:\\s*[\\$€])?";
3500
3495
  const pNumberExp = "^(?:(?:" + [
3501
- pMinus + pCurrencyFormat + pNumber,
3502
- pMinus + pNumber + pCurrencyFormat,
3503
- pCurrencyFormat + pMinus + pNumber
3496
+ "(?:\\s*-)?(?:\\s*[\\$€])?" + pNumber,
3497
+ "(?:\\s*-)?" + pNumber + "(?:\\s*[\\$€])?",
3498
+ "(?:\\s*[\\$€])?(?:\\s*-)?" + pNumber
3504
3499
  ].join(")|(?:") + "))$";
3505
3500
  return new RegExp(pNumberExp, "i");
3506
3501
  });
@@ -5400,7 +5395,7 @@ function isPositionDependent(cmd) {
5400
5395
  function isZoneDependent(cmd) {
5401
5396
  return "sheetId" in cmd && "zone" in cmd;
5402
5397
  }
5403
- const invalidateEvaluationCommands = new Set([
5398
+ const invalidateEvaluationCommands = /* @__PURE__ */ new Set([
5404
5399
  "RENAME_SHEET",
5405
5400
  "DELETE_SHEET",
5406
5401
  "CREATE_SHEET",
@@ -5419,7 +5414,7 @@ const invalidateEvaluationCommands = new Set([
5419
5414
  "REMOVE_PIVOT",
5420
5415
  "DUPLICATE_PIVOT"
5421
5416
  ]);
5422
- const invalidateChartEvaluationCommands = new Set([
5417
+ const invalidateChartEvaluationCommands = /* @__PURE__ */ new Set([
5423
5418
  "EVALUATE_CELLS",
5424
5419
  "EVALUATE_CHARTS",
5425
5420
  "UPDATE_CELL",
@@ -5438,20 +5433,20 @@ const invalidateChartEvaluationCommands = new Set([
5438
5433
  "UNDO",
5439
5434
  "REDO"
5440
5435
  ]);
5441
- const invalidateDependenciesCommands = new Set(["MOVE_RANGES"]);
5442
- const invalidateCFEvaluationCommands = new Set([
5436
+ const invalidateDependenciesCommands = /* @__PURE__ */ new Set(["MOVE_RANGES"]);
5437
+ const invalidateCFEvaluationCommands = /* @__PURE__ */ new Set([
5443
5438
  "EVALUATE_CELLS",
5444
5439
  "ADD_CONDITIONAL_FORMAT",
5445
5440
  "REMOVE_CONDITIONAL_FORMAT",
5446
5441
  "CHANGE_CONDITIONAL_FORMAT_PRIORITY"
5447
5442
  ]);
5448
- const invalidateBordersCommands = new Set([
5443
+ const invalidateBordersCommands = /* @__PURE__ */ new Set([
5449
5444
  "AUTOFILL_CELL",
5450
5445
  "SET_BORDER",
5451
5446
  "SET_ZONE_BORDERS",
5452
5447
  "SET_BORDERS_ON_TARGET"
5453
5448
  ]);
5454
- const invalidSubtotalFormulasCommands = new Set([
5449
+ const invalidSubtotalFormulasCommands = /* @__PURE__ */ new Set([
5455
5450
  "UNHIDE_COLUMNS_ROWS",
5456
5451
  "HIDE_COLUMNS_ROWS",
5457
5452
  "GROUP_HEADERS",
@@ -5465,7 +5460,7 @@ const invalidSubtotalFormulasCommands = new Set([
5465
5460
  "UPDATE_TABLE",
5466
5461
  "UPDATE_FILTER"
5467
5462
  ]);
5468
- const readonlyAllowedCommands = new Set([
5463
+ const readonlyAllowedCommands = /* @__PURE__ */ new Set([
5469
5464
  "START",
5470
5465
  "ACTIVATE_SHEET",
5471
5466
  "COPY",
@@ -5480,7 +5475,7 @@ const readonlyAllowedCommands = new Set([
5480
5475
  "UPDATE_CAROUSEL_ACTIVE_ITEM",
5481
5476
  "UPDATE_PIVOT"
5482
5477
  ]);
5483
- const lockedSheetAllowedCommands = new Set([
5478
+ const lockedSheetAllowedCommands = /* @__PURE__ */ new Set([
5484
5479
  "LOCK_SHEET",
5485
5480
  "UNLOCK_SHEET",
5486
5481
  "MOVE_SHEET",
@@ -5511,7 +5506,7 @@ const lockedSheetAllowedCommands = new Set([
5511
5506
  "SHIFT_VIEWPORT_DOWN",
5512
5507
  "SHIFT_VIEWPORT_UP"
5513
5508
  ]);
5514
- const coreTypes = new Set([
5509
+ const coreTypes = /* @__PURE__ */ new Set([
5515
5510
  "UPDATE_CELL",
5516
5511
  "UPDATE_CELL_POSITION",
5517
5512
  "CLEAR_CELL",
@@ -6062,7 +6057,6 @@ function getCanonicalRepresentation(item) {
6062
6057
  //#region src/helpers/edge_scrolling.ts
6063
6058
  const MAX_DELAY = 140;
6064
6059
  const MIN_DELAY = 20;
6065
- const ACCELERATION = .035;
6066
6060
  /**
6067
6061
  * Decreasing exponential function used to determine the "speed" of edge-scrolling
6068
6062
  * as the timeout delay.
@@ -6070,7 +6064,7 @@ const ACCELERATION = .035;
6070
6064
  * Returns a timeout delay in milliseconds.
6071
6065
  */
6072
6066
  function scrollDelay(value) {
6073
- return 20 + (140 - 20) * Math.exp(-ACCELERATION * (value - 1));
6067
+ return 20 + (140 - 20) * Math.exp(-.035 * (value - 1));
6074
6068
  }
6075
6069
 
6076
6070
  //#endregion
@@ -7064,7 +7058,7 @@ var UuidGenerator = class {
7064
7058
  const cryptoObj = this.getCrypto();
7065
7059
  if (cryptoObj) return "10000000-1000".replace(/[01]/g, (c) => {
7066
7060
  const n = Number(c);
7067
- return (n ^ cryptoObj.getRandomValues(new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
7061
+ return (n ^ cryptoObj.getRandomValues(/* @__PURE__ */ new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
7068
7062
  });
7069
7063
  else return "xxxxxxxx-xxxx".replace(/[xy]/g, function(c) {
7070
7064
  const r = Math.random() * 16 | 0;
@@ -7079,7 +7073,7 @@ var UuidGenerator = class {
7079
7073
  const cryptoObj = this.getCrypto();
7080
7074
  if (cryptoObj) return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => {
7081
7075
  const n = Number(c);
7082
- return (n ^ cryptoObj.getRandomValues(new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
7076
+ return (n ^ cryptoObj.getRandomValues(/* @__PURE__ */ new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
7083
7077
  });
7084
7078
  else return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
7085
7079
  const r = Math.random() * 16 | 0;
@@ -11697,7 +11691,7 @@ const availableConditionalFormatOperators = new Set(cfOperators);
11697
11691
 
11698
11692
  //#endregion
11699
11693
  //#region src/types/data_validation.ts
11700
- const availableDataValidationOperators = new Set([
11694
+ const availableDataValidationOperators = /* @__PURE__ */ new Set([
11701
11695
  "containsText",
11702
11696
  "notContainsText",
11703
11697
  "isEqualText",
@@ -12285,10 +12279,10 @@ function toNormalizedPivotValue(dimension, groupValue) {
12285
12279
  type: dimension.type
12286
12280
  }));
12287
12281
  if (groupValueString.toLowerCase() === "false") return false;
12288
- return pivotNormalizationValueRegistry.get(dimension.type)(groupValueString, dimension.granularity);
12282
+ return pivotNormalizationValueRegistry.get(dimension.type)(groupValueString, dimension);
12289
12283
  }
12290
- function normalizeDateTime(value, granularity) {
12291
- return pivotTimeAdapter(granularity ?? "month").normalizeFunctionValue(value);
12284
+ function normalizeDateTime(value, dimension) {
12285
+ return pivotTimeAdapter(dimension.granularity ?? "month").normalizeFunctionValue(value);
12292
12286
  }
12293
12287
  function toFunctionPivotValue(value, dimension) {
12294
12288
  if (value === null) return `"null"`;
@@ -15313,6 +15307,59 @@ function getCarouselItemTitle(getters, item) {
15313
15307
  return (chartSubtypeRegistry.getAll().find((c) => c.matcher?.(definition)) || chartSubtypeRegistry.get(definition.type)).displayName;
15314
15308
  }
15315
15309
 
15310
+ //#endregion
15311
+ //#region src/components/helpers/css.ts
15312
+ function getTextDecoration({ strikethrough, underline }) {
15313
+ if (!strikethrough && !underline) return "none";
15314
+ return `${strikethrough ? "line-through" : ""} ${underline ? "underline" : ""}`;
15315
+ }
15316
+ /**
15317
+ * Convert the cell style to CSS properties.
15318
+ */
15319
+ function cellStyleToCss(style) {
15320
+ const attributes = cellTextStyleToCss(style);
15321
+ if (!style) return attributes;
15322
+ if (style.fillColor) attributes["background"] = style.fillColor;
15323
+ return attributes;
15324
+ }
15325
+ /**
15326
+ * Convert the cell text style to CSS properties.
15327
+ */
15328
+ function cellTextStyleToCss(style) {
15329
+ const attributes = {};
15330
+ if (!style) return attributes;
15331
+ if (style.bold) attributes["font-weight"] = "bold";
15332
+ if (style.italic) attributes["font-style"] = "italic";
15333
+ if (style.fontSize) attributes["font-size"] = `${style.fontSize}px`;
15334
+ if (style.strikethrough || style.underline) {
15335
+ let decoration = style.strikethrough ? "line-through" : "";
15336
+ decoration = style.underline ? decoration + " underline" : decoration;
15337
+ attributes["text-decoration"] = decoration;
15338
+ }
15339
+ if (style.textColor) attributes["color"] = style.textColor;
15340
+ return attributes;
15341
+ }
15342
+ /**
15343
+ * Transform CSS properties into a CSS string.
15344
+ */
15345
+ function cssPropertiesToCss(attributes) {
15346
+ let styleStr = "";
15347
+ for (const attName in attributes) {
15348
+ if (!attributes[attName]) continue;
15349
+ styleStr += `${attName}:${attributes[attName]}; `;
15350
+ }
15351
+ return styleStr;
15352
+ }
15353
+ function getElementMargins(el) {
15354
+ const style = window.getComputedStyle(el);
15355
+ return {
15356
+ top: parseInt(style.marginTop, 10) || 0,
15357
+ bottom: parseInt(style.marginBottom, 10) || 0,
15358
+ left: parseInt(style.marginLeft, 10) || 0,
15359
+ right: parseInt(style.marginRight, 10) || 0
15360
+ };
15361
+ }
15362
+
15316
15363
  //#endregion
15317
15364
  //#region src/components/figures/chart/chartJs/zoomable_chart/zoomable_chart_store.ts
15318
15365
  const TREND_LINE_AXES_IDS = ["x1", MOVING_AVERAGE_TREND_LINE_XAXIS_ID];
@@ -15412,9 +15459,7 @@ var ZoomableChartJsComponent = class extends ChartJsComponent {
15412
15459
  this.removeEventListeners();
15413
15460
  }
15414
15461
  get containerStyle() {
15415
- return `
15416
- height:${this.sliceable ? `calc(100% - ${60}px)` : "100%"};
15417
- `;
15462
+ return cssPropertiesToCss({ height: this.sliceable ? `calc(100% - ${60}px)` : "100%" });
15418
15463
  }
15419
15464
  get masterChartContainerStyle() {
15420
15465
  const runtime = this.env.model.getters.getChartRuntime(this.props.chartId);
@@ -16278,59 +16323,6 @@ var FullScreenFigureStore = class extends SpreadsheetStore {
16278
16323
  }
16279
16324
  };
16280
16325
 
16281
- //#endregion
16282
- //#region src/components/helpers/css.ts
16283
- function getTextDecoration({ strikethrough, underline }) {
16284
- if (!strikethrough && !underline) return "none";
16285
- return `${strikethrough ? "line-through" : ""} ${underline ? "underline" : ""}`;
16286
- }
16287
- /**
16288
- * Convert the cell style to CSS properties.
16289
- */
16290
- function cellStyleToCss(style) {
16291
- const attributes = cellTextStyleToCss(style);
16292
- if (!style) return attributes;
16293
- if (style.fillColor) attributes["background"] = style.fillColor;
16294
- return attributes;
16295
- }
16296
- /**
16297
- * Convert the cell text style to CSS properties.
16298
- */
16299
- function cellTextStyleToCss(style) {
16300
- const attributes = {};
16301
- if (!style) return attributes;
16302
- if (style.bold) attributes["font-weight"] = "bold";
16303
- if (style.italic) attributes["font-style"] = "italic";
16304
- if (style.fontSize) attributes["font-size"] = `${style.fontSize}px`;
16305
- if (style.strikethrough || style.underline) {
16306
- let decoration = style.strikethrough ? "line-through" : "";
16307
- decoration = style.underline ? decoration + " underline" : decoration;
16308
- attributes["text-decoration"] = decoration;
16309
- }
16310
- if (style.textColor) attributes["color"] = style.textColor;
16311
- return attributes;
16312
- }
16313
- /**
16314
- * Transform CSS properties into a CSS string.
16315
- */
16316
- function cssPropertiesToCss(attributes) {
16317
- let styleStr = "";
16318
- for (const attName in attributes) {
16319
- if (!attributes[attName]) continue;
16320
- styleStr += `${attName}:${attributes[attName]}; `;
16321
- }
16322
- return styleStr;
16323
- }
16324
- function getElementMargins(el) {
16325
- const style = window.getComputedStyle(el);
16326
- return {
16327
- top: parseInt(style.marginTop, 10) || 0,
16328
- bottom: parseInt(style.marginBottom, 10) || 0,
16329
- left: parseInt(style.marginLeft, 10) || 0,
16330
- right: parseInt(style.marginRight, 10) || 0
16331
- };
16332
- }
16333
-
16334
16326
  //#endregion
16335
16327
  //#region src/components/helpers/time_hooks.ts
16336
16328
  /**
@@ -17331,11 +17323,11 @@ var FigureComponent = class extends Component {
17331
17323
  getResizerPosition(resizer) {
17332
17324
  const anchorCenteringOffset = (ANCHOR_SIZE - ACTIVE_BORDER_WIDTH) / 2;
17333
17325
  const style = {};
17334
- if (resizer.includes("top")) style.top = `${-anchorCenteringOffset}px`;
17335
- else if (resizer.includes("bottom")) style.bottom = `${-anchorCenteringOffset}px`;
17326
+ if (resizer.includes("top")) style.top = `-3px`;
17327
+ else if (resizer.includes("bottom")) style.bottom = `-3px`;
17336
17328
  else style.bottom = `calc(50% - ${anchorCenteringOffset}px)`;
17337
- if (resizer.includes("left")) style.left = `${-anchorCenteringOffset}px`;
17338
- else if (resizer.includes("right")) style.right = `${-anchorCenteringOffset}px`;
17329
+ if (resizer.includes("left")) style.left = `-3px`;
17330
+ else if (resizer.includes("right")) style.right = `-3px`;
17339
17331
  else style.right = `calc(50% - ${anchorCenteringOffset}px)`;
17340
17332
  return cssPropertiesToCss(style);
17341
17333
  }
@@ -33046,6 +33038,7 @@ function mapParenthesisCode(tokens) {
33046
33038
  function mapParentFunction(tokens) {
33047
33039
  const stack = [];
33048
33040
  let functionStarted = "";
33041
+ let braceDepth = 0;
33049
33042
  function pushTokenToFunctionContext(token) {
33050
33043
  if (stack.length === 0) return;
33051
33044
  const functionContext = stack.at(-1);
@@ -33058,7 +33051,7 @@ function mapParentFunction(tokens) {
33058
33051
  });
33059
33052
  }
33060
33053
  }
33061
- return tokens.map((token, i) => {
33054
+ return tokens.map((token) => {
33062
33055
  if (!["SPACE", "LEFT_PAREN"].includes(token.type)) functionStarted = "";
33063
33056
  switch (token.type) {
33064
33057
  case "SYMBOL":
@@ -33079,8 +33072,16 @@ function mapParentFunction(tokens) {
33079
33072
  stack.pop()?.argsTokens?.flat().forEach(pushTokenToFunctionContext);
33080
33073
  pushTokenToFunctionContext(token);
33081
33074
  break;
33075
+ case "LEFT_BRACE":
33076
+ braceDepth++;
33077
+ pushTokenToFunctionContext(token);
33078
+ break;
33079
+ case "RIGHT_BRACE":
33080
+ braceDepth--;
33081
+ pushTokenToFunctionContext(token);
33082
+ break;
33082
33083
  case "ARG_SEPARATOR":
33083
- if (stack.length) stack[stack.length - 1].argPosition++;
33084
+ if (stack.length && braceDepth === 0) stack[stack.length - 1].argPosition++;
33084
33085
  pushTokenToFunctionContext(token);
33085
33086
  break;
33086
33087
  default:
@@ -34390,10 +34391,7 @@ function startDnd(onPointerMove, onPointerUp) {
34390
34391
  //#endregion
34391
34392
  //#region src/components/color_picker/color_picker.ts
34392
34393
  const ITEM_BORDER_WIDTH = 1;
34393
- const ITEM_EDGE_LENGTH = 18;
34394
- const ITEMS_PER_LINE = 10;
34395
- const MAGNIFIER_EDGE = 16;
34396
- const CONTENT_WIDTH = ITEMS_PER_LINE * (ITEM_EDGE_LENGTH + 2 * ITEM_BORDER_WIDTH) + (ITEMS_PER_LINE - 1) * 2;
34394
+ const CONTENT_WIDTH = 218;
34397
34395
  const INNER_GRADIENT_WIDTH = CONTENT_WIDTH - 2 * ITEM_BORDER_WIDTH;
34398
34396
  const INNER_GRADIENT_HEIGHT = CONTENT_WIDTH - 30 - 2 * ITEM_BORDER_WIDTH;
34399
34397
  var ColorPicker = class extends Component {
@@ -34457,8 +34455,8 @@ var ColorPicker = class extends Component {
34457
34455
  const left = Math.round(INNER_GRADIENT_WIDTH * clip(s / 100, 0, 1));
34458
34456
  const top = Math.round(INNER_GRADIENT_HEIGHT * clip(1 - 2 * l / (200 - s), 0, 1));
34459
34457
  return cssPropertiesToCss({
34460
- left: `${-MAGNIFIER_EDGE / 2 + left}px`,
34461
- top: `${-MAGNIFIER_EDGE / 2 + top}px`,
34458
+ left: `${-16 / 2 + left}px`,
34459
+ top: `${-16 / 2 + top}px`,
34462
34460
  background: hslaToHex(this.state.currentHslaColor)
34463
34461
  });
34464
34462
  }
@@ -41880,9 +41878,9 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
41880
41878
  allSheetsMatches = [];
41881
41879
  activeSheetMatches = [];
41882
41880
  specificRangeMatches = [];
41881
+ selectedMatchPosition = null;
41883
41882
  currentSearchRegex = null;
41884
41883
  initialShowFormulaState;
41885
- preserveSelectedMatchIndex = false;
41886
41884
  irreplaceableMatchCount = 0;
41887
41885
  isSearchDirty = false;
41888
41886
  shouldFinalizeUpdateSelection = false;
@@ -42004,7 +42002,10 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
42004
42002
  */
42005
42003
  _updateSearch(toSearch, searchOptions) {
42006
42004
  this.searchOptions = searchOptions;
42007
- if (toSearch !== this.toSearch) this.selectedMatchIndex = null;
42005
+ if (toSearch !== this.toSearch) {
42006
+ this.selectedMatchIndex = null;
42007
+ this.selectedMatchPosition = null;
42008
+ }
42008
42009
  this.toSearch = toSearch;
42009
42010
  this.currentSearchRegex = getSearchRegex(this.toSearch, this.searchOptions);
42010
42011
  this.refreshSearch({
@@ -42016,8 +42017,14 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
42016
42017
  * refresh the matches according to the current search options
42017
42018
  */
42018
42019
  refreshSearch(options) {
42019
- if (!this.preserveSelectedMatchIndex) this.selectedMatchIndex = null;
42020
42020
  this.findMatches();
42021
+ if (this.selectedMatchPosition) if (this.selectedMatchPosition.sheetId !== this.getters.getActiveSheetId()) {
42022
+ this.selectedMatchIndex = null;
42023
+ this.selectedMatchPosition = null;
42024
+ } else {
42025
+ const index = this.searchMatches.findIndex((match) => match.sheetId === this.selectedMatchPosition?.sheetId && match.col === this.selectedMatchPosition?.col && match.row === this.selectedMatchPosition?.row);
42026
+ if (index !== -1) this.selectedMatchIndex = index;
42027
+ }
42021
42028
  this.selectNextCell(0, options);
42022
42029
  }
42023
42030
  getSheetsInSearchOrder() {
@@ -42085,6 +42092,7 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
42085
42092
  const matches = this.searchMatches;
42086
42093
  if (!matches.length) {
42087
42094
  this.selectedMatchIndex = null;
42095
+ this.selectedMatchPosition = null;
42088
42096
  return;
42089
42097
  }
42090
42098
  let nextIndex;
@@ -42098,14 +42106,13 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
42098
42106
  } else nextIndex = this.selectedMatchIndex + indexChange;
42099
42107
  nextIndex = (nextIndex + matches.length) % matches.length;
42100
42108
  this.selectedMatchIndex = nextIndex;
42109
+ this.selectedMatchPosition = matches[this.selectedMatchIndex];
42101
42110
  const selectedMatch = matches[nextIndex];
42102
42111
  if (options.jumpToMatchSheet && this.getters.getActiveSheetId() !== selectedMatch.sheetId) {
42103
- this.preserveSelectedMatchIndex = true;
42104
42112
  this.model.dispatch("ACTIVATE_SHEET", {
42105
42113
  sheetIdFrom: this.getters.getActiveSheetId(),
42106
42114
  sheetIdTo: selectedMatch.sheetId
42107
42115
  });
42108
- this.preserveSelectedMatchIndex = false;
42109
42116
  this.isSearchDirty = false;
42110
42117
  }
42111
42118
  this.model.selection.getBackToDefault();
@@ -42116,7 +42123,6 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
42116
42123
  */
42117
42124
  replace() {
42118
42125
  if (this.selectedMatchIndex === null) return;
42119
- this.preserveSelectedMatchIndex = true;
42120
42126
  this.shouldFinalizeUpdateSelection = true;
42121
42127
  this.model.dispatch("REPLACE_SEARCH", {
42122
42128
  searchString: this.toSearch,
@@ -42124,7 +42130,6 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
42124
42130
  matches: [this.searchMatches[this.selectedMatchIndex]],
42125
42131
  searchOptions: this.searchOptions
42126
42132
  });
42127
- this.preserveSelectedMatchIndex = false;
42128
42133
  }
42129
42134
  /**
42130
42135
  * Apply the replace function to all the matches one time.
@@ -47358,7 +47363,7 @@ var TableStylePreview = class extends Component {
47358
47363
  mode: "pivot",
47359
47364
  numberOfCols: 5,
47360
47365
  numberOfRows: 8,
47361
- mainSubHeaderRows: new Set([props.tableConfig.numberOfHeaders, props.tableConfig.numberOfHeaders + 3])
47366
+ mainSubHeaderRows: /* @__PURE__ */ new Set([props.tableConfig.numberOfHeaders, props.tableConfig.numberOfHeaders + 3])
47362
47367
  };
47363
47368
  drawPreviewTable(ctx, getComputedTableStyle(props.tableConfig, props.tableStyle, tableMetaData), {
47364
47369
  ...tableMetaData,
@@ -50607,9 +50612,12 @@ var CellComposerStore = class extends AbstractComposerStore {
50607
50612
  }
50608
50613
  stopEdition(direction) {
50609
50614
  if (this.canStopEdition()) {
50615
+ const { col, row } = this.currentEditedCell;
50610
50616
  this._stopEdition();
50611
- if (direction) if (this.getters.isSingleCellOrMerge(this.sheetId, this.getters.getSelectedZone())) this.model.selection.moveAnchorCell(direction, 1);
50612
- else moveAnchorWithinSelection(this.getters, this.model.selection, direction);
50617
+ if (direction) if (this.getters.isSingleCellOrMerge(this.sheetId, this.getters.getSelectedZone())) {
50618
+ this.model.selection.selectCell(col, row);
50619
+ this.model.selection.moveAnchorCell(direction, 1);
50620
+ } else moveAnchorWithinSelection(this.getters, this.model.selection, direction);
50613
50621
  return;
50614
50622
  }
50615
50623
  const editedCell = this.currentEditedCell;
@@ -54606,7 +54614,7 @@ var Grid = class extends Component {
54606
54614
  ev.preventDefault();
54607
54615
  const clipboardData = ev.clipboardData;
54608
54616
  if (!clipboardData) return;
54609
- const image = [...clipboardData.files]?.find((file) => AllowedImageMimeTypes.includes(file.type));
54617
+ const image = [...clipboardData.files].find((file) => AllowedImageMimeTypes.includes(file.type));
54610
54618
  const osClipboard = { content: {
54611
54619
  ["text/plain"]: clipboardData?.getData("text/plain"),
54612
54620
  ["text/html"]: clipboardData?.getData("text/html")
@@ -60622,7 +60630,7 @@ var ZoneRBush = class extends import_rbush_min.default {
60622
60630
  //#region src/plugins/ui_core_views/cell_evaluation/zone_set.ts
60623
60631
  var ZoneSet = class ZoneSet {
60624
60632
  profilesStartingPosition = [0];
60625
- profiles = new Map([[0, []]]);
60633
+ profiles = /* @__PURE__ */ new Map([[0, []]]);
60626
60634
  constructor(zones = []) {
60627
60635
  for (const zone of zones) this.add(zone);
60628
60636
  }
@@ -61784,7 +61792,7 @@ iconsOnCellRegistry.add("pivot_collapse", (getters, position) => {
61784
61792
  const definition = getters.getPivotCoreDefinition(pivotId);
61785
61793
  const isDashboard = getters.isDashboard();
61786
61794
  const fields = pivotCell.dimension === "COL" ? definition.columns : definition.rows;
61787
- const hasIcon = !isDashboard && pivotCell.domain.length !== fields.length;
61795
+ const hasIcon = !isDashboard && !getters.shouldShowFormulas() && pivotCell.domain.length !== fields.length;
61788
61796
  const isCollapsed = (definition.collapsedDomains?.[pivotCell.dimension] ?? []).some((domain) => deepEquals(domain, pivotCell.domain));
61789
61797
  const indent = pivotCell.dimension === "ROW" ? (pivotCell.domain.length - 1) * 15 : 0;
61790
61798
  return {
@@ -61973,12 +61981,22 @@ var CustomColorsPlugin = class extends CoreViewPlugin {
61973
61981
  handle(cmd) {
61974
61982
  switch (cmd.type) {
61975
61983
  case "START":
61976
- for (const sheetId of this.getters.getSheetIds()) for (const chartId of this.getters.getChartIds(sheetId)) this.tryToAddColors(this.getChartColors(chartId));
61984
+ for (const sheetId of this.getters.getSheetIds()) {
61985
+ for (const chartId of this.getters.getChartIds(sheetId)) this.tryToAddColors(this.getChartColors(chartId));
61986
+ for (const figureId of this.getters.getFigures(sheetId)) this.tryToAddColors(this.getCarouselColors(sheetId, figureId.id));
61987
+ }
61977
61988
  break;
61978
61989
  case "UPDATE_CHART":
61979
61990
  case "CREATE_CHART":
61980
61991
  this.tryToAddColors(this.getChartColors(cmd.chartId));
61981
61992
  break;
61993
+ case "CREATE_CAROUSEL":
61994
+ case "UPDATE_CAROUSEL":
61995
+ this.tryToAddColors(this.getCarouselColors(cmd.sheetId, cmd.figureId));
61996
+ break;
61997
+ case "COLOR_SHEET":
61998
+ if (cmd.color) this.tryToAddColors([cmd.color]);
61999
+ break;
61982
62000
  case "UPDATE_CELL":
61983
62001
  case "ADD_CONDITIONAL_FORMAT":
61984
62002
  case "SET_BORDER":
@@ -62001,8 +62019,12 @@ var CustomColorsPlugin = class extends CoreViewPlugin {
62001
62019
  }
62002
62020
  computeCustomColors() {
62003
62021
  let usedColors = [];
62004
- for (const sheetId of this.getters.getSheetIds()) usedColors = usedColors.concat(this.getColorsFromCells(sheetId), this.getFormattingColors(sheetId), this.getTableColors(sheetId));
62005
- return [...new Set([...usedColors])];
62022
+ for (const sheetId of this.getters.getSheetIds()) usedColors = usedColors.concat(this.getSheetColors(sheetId), this.getColorsFromCells(sheetId), this.getFormattingColors(sheetId), this.getTableColors(sheetId));
62023
+ return [.../* @__PURE__ */ new Set([...usedColors])];
62024
+ }
62025
+ getSheetColors(sheetId) {
62026
+ const sheet = this.getters.getSheet(sheetId);
62027
+ return sheet.color ? [sheet.color] : [];
62006
62028
  }
62007
62029
  getColorsFromCells(sheetId) {
62008
62030
  const cells = Object.values(this.getters.getCells(sheetId));
@@ -62035,6 +62057,11 @@ var CustomColorsPlugin = class extends CoreViewPlugin {
62035
62057
  if (chart === void 0) return [];
62036
62058
  return [...JSON.stringify(chart.getDefinition()).matchAll(chartColorRegex)].map((color) => color[1]);
62037
62059
  }
62060
+ getCarouselColors(sheetId, figureId) {
62061
+ if (this.getters.getFigure(sheetId, figureId)?.tag !== "carousel") return [];
62062
+ const titleColor = this.getters.getCarousel(figureId).title?.color;
62063
+ return titleColor ? [titleColor] : [];
62064
+ }
62038
62065
  getTableColors(sheetId) {
62039
62066
  return this.getters.getTables(sheetId).flatMap((table) => {
62040
62067
  const config = table.config;
@@ -65455,7 +65482,7 @@ var TableComputedStylePlugin = class extends UIPlugin {
65455
65482
  };
65456
65483
  }
65457
65484
  };
65458
- const invalidateTableStyleCommandsSet = new Set([
65485
+ const invalidateTableStyleCommandsSet = /* @__PURE__ */ new Set([
65459
65486
  "HIDE_COLUMNS_ROWS",
65460
65487
  "UNHIDE_COLUMNS_ROWS",
65461
65488
  "UNFOLD_HEADER_GROUP",
@@ -69797,14 +69824,14 @@ var InternalViewport = class {
69797
69824
  adjustPositionX(targetCol) {
69798
69825
  const sheetId = this.sheetId;
69799
69826
  const { start, end } = this.getters.getColDimensions(sheetId, targetCol);
69800
- if (this.offsetX + this.viewportWidth + this.offsetCorrectionX < end) this.offsetX = end - this.viewportWidth;
69827
+ if (this.offsetX + this.viewportWidth + this.offsetCorrectionX < end) this.offsetX = end - this.viewportWidth - this.offsetCorrectionX;
69801
69828
  else if (this.offsetX + this.offsetCorrectionX > start) this.offsetX = start - this.offsetCorrectionX;
69802
69829
  this.adjustViewportZoneX();
69803
69830
  }
69804
69831
  adjustPositionY(targetRow) {
69805
69832
  const sheetId = this.sheetId;
69806
69833
  const { start, end } = this.getters.getRowDimensions(sheetId, targetRow);
69807
- if (this.offsetY + this.viewportHeight + this.offsetCorrectionY < end) this.offsetY = end - this.viewportHeight;
69834
+ if (this.offsetY + this.viewportHeight + this.offsetCorrectionY < end) this.offsetY = end - this.viewportHeight - this.offsetCorrectionY;
69808
69835
  else if (this.offsetY + this.offsetCorrectionY > start) this.offsetY = start - this.offsetCorrectionY;
69809
69836
  this.adjustViewportZoneY();
69810
69837
  }
@@ -72422,7 +72449,7 @@ var BottomBarSheet = class extends Component {
72422
72449
  }
72423
72450
  });
72424
72451
  this.DOMFocusableElementStore = useStore(DOMFocusableElementStore);
72425
- useExternalListener(window, "click", () => this.state.pickerOpened = false);
72452
+ useExternalListener(window, "click", this.onExternalClick.bind(this), { capture: true });
72426
72453
  useEffect((sheetId) => {
72427
72454
  if (this.props.sheetId === sheetId) this.scrollToSheet();
72428
72455
  }, () => [this.env.model.getters.getActiveSheetId()]);
@@ -72441,6 +72468,9 @@ var BottomBarSheet = class extends Component {
72441
72468
  this.env.model.off("command-rejected", this);
72442
72469
  });
72443
72470
  }
72471
+ onExternalClick(ev) {
72472
+ if (!ev.target.closest(".o-color-picker")) this.state.pickerOpened = false;
72473
+ }
72444
72474
  focusInputAndSelectContent() {
72445
72475
  if (!this.state.isEditing || !this.sheetNameRef.el) return;
72446
72476
  this.sheetNameRef.el.focus();
@@ -72542,6 +72572,8 @@ var BottomBarSheet = class extends Component {
72542
72572
  },
72543
72573
  openSheetColorPickerCallback: () => {
72544
72574
  this.state.pickerOpened = true;
72575
+ const sheet = this.env.model.getters.getSheet(this.props.sheetId);
72576
+ this.state.currentPickerColor = sheet.color;
72545
72577
  }
72546
72578
  });
72547
72579
  }
@@ -73944,7 +73976,7 @@ var TableDropdownButton = class extends Component {
73944
73976
  this.closePopover();
73945
73977
  return;
73946
73978
  }
73947
- const pivotId = this.pivotIdInSelection;
73979
+ const pivotId = this.dynamicPivotIdInSelection;
73948
73980
  if (pivotId) {
73949
73981
  this.env.openSidePanel("PivotSidePanel", {
73950
73982
  pivotId,
@@ -73974,7 +74006,7 @@ var TableDropdownButton = class extends Component {
73974
74006
  this.state.popoverProps = void 0;
73975
74007
  }
73976
74008
  get action() {
73977
- if (this.pivotIdInSelection) return {
74009
+ if (this.dynamicPivotIdInSelection) return {
73978
74010
  name: _t("Edit pivot style"),
73979
74011
  icon: "o-spreadsheet-Icon.EDIT_TABLE"
73980
74012
  };
@@ -73993,15 +74025,19 @@ var TableDropdownButton = class extends Component {
73993
74025
  get tableStyles() {
73994
74026
  return this.env.model.getters.getTableStyles();
73995
74027
  }
73996
- get pivotIdInSelection() {
74028
+ get dynamicPivotIdInSelection() {
73997
74029
  const selection = this.env.model.getters.getSelectedZones();
73998
- for (const zone of selection) for (const position of positions(zone)) {
73999
- const sheetId = this.env.model.getters.getActiveSheetId();
74000
- const pivotId = this.env.model.getters.getPivotIdFromPosition({
74001
- sheetId,
74002
- ...position
74003
- });
74004
- if (pivotId) return pivotId;
74030
+ const pivotCellIds = new Set(this.env.model.getters.getCellsWithTrackedFormula("PIVOT"));
74031
+ if (pivotCellIds.size === 0) return;
74032
+ const activeSheetId = this.env.model.getters.getActiveSheetId();
74033
+ for (const zone of selection) for (const position of cellPositions(activeSheetId, zone)) {
74034
+ const mainPosition = this.env.model.getters.getArrayFormulaSpreadingOn(position);
74035
+ if (!mainPosition) continue;
74036
+ const cellId = this.env.model.getters.getCell(mainPosition)?.id;
74037
+ if (cellId && pivotCellIds.has(cellId)) {
74038
+ const pivotId = this.env.model.getters.getPivotIdFromPosition(mainPosition);
74039
+ if (pivotId) return pivotId;
74040
+ }
74005
74041
  }
74006
74042
  }
74007
74043
  get class() {
@@ -76804,11 +76840,11 @@ function addBarChart(chart) {
76804
76840
  <!-- each data marker in the series does not have a different color -->
76805
76841
  <c:varyColors val="0"/>
76806
76842
  ${joinXmlNodes(rightDataSetsNodes)}
76807
- <c:axId val="${catAxId + 1}" />
76808
- <c:axId val="${valAxId + 1}" />
76843
+ <c:axId val="${17781238}" />
76844
+ <c:axId val="${88853994}" />
76809
76845
  </c:barChart>
76810
- ${addAx("b", "c:catAx", catAxId + 1, valAxId + 1, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
76811
- ${addAx("r", "c:valAx", valAxId + 1, catAxId + 1, chart.axesDesign?.y1?.title, chart.fontColor)}
76846
+ ${addAx("b", "c:catAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
76847
+ ${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
76812
76848
  ` : ""}`;
76813
76849
  }
76814
76850
  function addComboChart(chart) {
@@ -77060,11 +77096,11 @@ function addLineChart(chart) {
77060
77096
  <c:varyColors val="0"/>
77061
77097
  ${joinXmlNodes(rightDataSetsNodes)}
77062
77098
  ${insertDataLabels({ showValues: chart.showValues })}
77063
- <c:axId val="${catAxId + 1}" />
77064
- <c:axId val="${valAxId + 1}" />
77099
+ <c:axId val="${17781238}" />
77100
+ <c:axId val="${88853994}" />
77065
77101
  </c:lineChart>
77066
- ${addAx("b", "c:catAx", catAxId + 1, valAxId + 1, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
77067
- ${addAx("r", "c:valAx", valAxId + 1, catAxId + 1, chart.axesDesign?.y1?.title, chart.fontColor)}
77102
+ ${addAx("b", "c:catAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
77103
+ ${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
77068
77104
  ` : ""}
77069
77105
  `;
77070
77106
  }
@@ -77130,11 +77166,11 @@ function addScatterChart(chart) {
77130
77166
  <c:scatterStyle val="lineMarker"/>
77131
77167
  ${joinXmlNodes(rightDataSetsNodes)}
77132
77168
  ${insertDataLabels({ showValues: chart.showValues })}
77133
- <c:axId val="${catAxId + 1}" />
77134
- <c:axId val="${valAxId + 1}" />
77169
+ <c:axId val="${17781238}" />
77170
+ <c:axId val="${88853994}" />
77135
77171
  </c:scatterChart>
77136
- ${addAx("b", "c:valAx", catAxId + 1, valAxId + 1, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
77137
- ${addAx("r", "c:valAx", valAxId + 1, catAxId + 1, chart.axesDesign?.y1?.title, chart.fontColor)}
77172
+ ${addAx("b", "c:valAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
77173
+ ${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
77138
77174
  ` : ""}`;
77139
77175
  }
77140
77176
  function addRadarChart(chart) {
@@ -81628,6 +81664,6 @@ const chartHelpers = {
81628
81664
  //#endregion
81629
81665
  export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, ClientDisconnectedError, CommandResult, CompiledFormula, CorePlugin, CoreViewPlugin, DEFAULT_LOCALE, DEFAULT_LOCALES, DispatchResult, EvaluationError, LocalTransportService, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, canExecuteInReadonly, categories, chartHelpers, components, constants, convertAstNodes, coreTypes, createAutocompleteArgumentsProvider, findCellInNewZone, functionCache, getCaretDownSvg, getCaretUpSvg, helpers, hooks, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, isCoreCommand, isSheetDependent, iterateAstNodes, links, load, lockedSheetAllowedCommands, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
81630
81666
 
81631
- __info__.version = "19.2.15";
81632
- __info__.date = "2026-06-06T06:23:14.723Z";
81633
- __info__.hash = "d29528e";
81667
+ __info__.version = "19.2.19";
81668
+ __info__.date = "2026-07-01T05:04:28.638Z";
81669
+ __info__.hash = "3529978";