@odoo/o-spreadsheet 18.0.82 → 18.0.84

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 18.0.82
6
- * @date 2026-09-10T05:35:40.438Z
7
- * @hash d0329aa
5
+ * @version 18.0.84
6
+ * @date 2026-10-14T06:49:38.664Z
7
+ * @hash 56a1fca
8
8
  */
9
9
 
10
10
  import { Component, markRaw, onMounted, onPatched, onWillPatch, onWillStart, onWillUnmount, onWillUpdateProps, status, toRaw, useChildSubEnv, useComponent, useEffect, useEnv, useExternalListener, useRef, useState, useSubEnv, xml } from "@odoo/owl";
@@ -207,6 +207,10 @@ const ALERT_INFO_BG = "#CDEDF1";
207
207
  const ALERT_INFO_BORDER = "#98DBE2";
208
208
  const ALERT_INFO_TEXT_COLOR = "#09414A";
209
209
  const BADGE_SELECTED_COLOR = "#E6F2F3";
210
+ const DEFAULT_CHART_PADDING = 20;
211
+ const DEFAULT_CHART_FONT_SIZE = 22;
212
+ const SCORECARD_GAUGE_CHART_PADDING = 10;
213
+ const SCORECARD_GAUGE_CHART_FONT_SIZE = 14;
210
214
  const COLOR_PICKER_DEFAULTS = [
211
215
  "#000000",
212
216
  "#434343",
@@ -289,8 +293,34 @@ const COLOR_PICKER_DEFAULTS = [
289
293
  "#20124D",
290
294
  "#4C1130"
291
295
  ];
296
+ const MIN_ROW_HEIGHT = 10;
297
+ const MIN_COL_WIDTH = 5;
298
+ const HEADER_HEIGHT = 26;
299
+ const HEADER_WIDTH = 48;
300
+ const TOPBAR_HEIGHT = 63;
301
+ const TOPBAR_TOOLBAR_HEIGHT = 34;
302
+ const BOTTOMBAR_HEIGHT = 36;
303
+ const DEFAULT_CELL_WIDTH = 96;
292
304
  const DEFAULT_CELL_HEIGHT = 23;
293
- const FOOTER_HEIGHT = 2 * 23;
305
+ const SCROLLBAR_WIDTH = 15;
306
+ const AUTOFILL_EDGE_LENGTH = 8;
307
+ const ICON_EDGE_LENGTH = 18;
308
+ const MIN_CF_ICON_MARGIN = 4;
309
+ const MIN_CELL_TEXT_MARGIN = 4;
310
+ const CF_ICON_EDGE_LENGTH = 15;
311
+ const PADDING_AUTORESIZE_VERTICAL = 3;
312
+ const PADDING_AUTORESIZE_HORIZONTAL = MIN_CELL_TEXT_MARGIN;
313
+ const GROUP_LAYER_WIDTH = 21;
314
+ const GRID_ICON_MARGIN = 2;
315
+ const GRID_ICON_EDGE_LENGTH = 17;
316
+ const FOOTER_HEIGHT = 2 * DEFAULT_CELL_HEIGHT;
317
+ const MENU_WIDTH = 250;
318
+ const MENU_VERTICAL_PADDING = 6;
319
+ const MENU_ITEM_HEIGHT = 26;
320
+ const MENU_ITEM_PADDING_HORIZONTAL = 11;
321
+ const MENU_ITEM_PADDING_VERTICAL = 4;
322
+ const MENU_SEPARATOR_BORDER_WIDTH = 1;
323
+ const MENU_SEPARATOR_PADDING = 5;
294
324
  const DEFAULT_STYLE = {
295
325
  align: "left",
296
326
  verticalAlign: "bottom",
@@ -309,13 +339,22 @@ const DEFAULT_NUMBER_STYLE = {
309
339
  };
310
340
  const DEFAULT_VERTICAL_ALIGN = DEFAULT_STYLE.verticalAlign;
311
341
  const DEFAULT_WRAPPING_MODE = DEFAULT_STYLE.wrapping;
342
+ const DEFAULT_FONT_WEIGHT = "400";
312
343
  const DEFAULT_FONT_SIZE = DEFAULT_STYLE.fontSize;
344
+ const HEADER_FONT_SIZE = 11;
313
345
  const DEFAULT_FONT = "'Roboto', arial, 'Liberation Sans'";
314
346
  const DEFAULT_BORDER_DESC = {
315
347
  style: "thin",
316
348
  color: "#000000"
317
349
  };
350
+ const MAX_HISTORY_STEPS = 99;
318
351
  const DEFAULT_REVISION_ID = "START_REVISION";
352
+ const DEFAULT_FIGURE_HEIGHT = 335;
353
+ const DEFAULT_FIGURE_WIDTH = 536;
354
+ const FIGURE_BORDER_WIDTH = 1;
355
+ const MIN_FIG_SIZE = 80;
356
+ const MAX_CHAR_LABEL = 20;
357
+ const FIGURE_ID_SPLITTER = "??";
319
358
  const DEFAULT_GAUGE_LOWER_COLOR = "#EA6175";
320
359
  const DEFAULT_GAUGE_MIDDLE_COLOR = "#FFD86D";
321
360
  const DEFAULT_GAUGE_UPPER_COLOR = "#43C5B1";
@@ -323,6 +362,8 @@ const DEFAULT_SCORECARD_BASELINE_MODE = "difference";
323
362
  const DEFAULT_SCORECARD_BASELINE_COLOR_UP = "#43C5B1";
324
363
  const DEFAULT_SCORECARD_BASELINE_COLOR_DOWN = "#EA6175";
325
364
  const LINE_FILL_TRANSPARENCY = .4;
365
+ const DEBOUNCE_TIME = 200;
366
+ const MESSAGE_VERSION = 1;
326
367
  const FORBIDDEN_SHEETNAME_CHARS = [
327
368
  "'",
328
369
  "*",
@@ -333,6 +374,7 @@ const FORBIDDEN_SHEETNAME_CHARS = [
333
374
  "]"
334
375
  ];
335
376
  const FORBIDDEN_SHEETNAME_CHARS_IN_EXCEL_REGEX = /'|\*|\?|\/|\\|\[|\]/;
377
+ const FORMULA_REF_IDENTIFIER = "|";
336
378
  let DEFAULT_SHEETVIEW_SIZE = 0;
337
379
  function getDefaultSheetViewSize() {
338
380
  return DEFAULT_SHEETVIEW_SIZE;
@@ -341,6 +383,7 @@ function setDefaultSheetViewSize(size) {
341
383
  DEFAULT_SHEETVIEW_SIZE = size;
342
384
  }
343
385
  const MAXIMAL_FREEZABLE_RATIO = .85;
386
+ const NEWLINE = "\n";
344
387
  const FONT_SIZES = [
345
388
  6,
346
389
  7,
@@ -725,7 +768,7 @@ const whiteSpaceCharacters = specialWhiteSpaceSpecialCharacters.concat([" "]);
725
768
  */
726
769
  function replaceNewLines(text) {
727
770
  if (!text) return "";
728
- return text.replace(newLineRegexp, "\n");
771
+ return text.replace(newLineRegexp, NEWLINE);
729
772
  }
730
773
  /**
731
774
  * Determine if the numbers are consecutive.
@@ -1333,7 +1376,7 @@ function toCartesian(xc) {
1333
1376
  consumeSpaces(chars);
1334
1377
  const col = letterPart - 1;
1335
1378
  const row = num - 1;
1336
- if (!chars.isOver() || col > MAX_COL || row > 9999998) throw new Error(`Invalid cell description: ${xc}`);
1379
+ if (!chars.isOver() || col > MAX_COL || row > MAX_ROW) throw new Error(`Invalid cell description: ${xc}`);
1337
1380
  return {
1338
1381
  col,
1339
1382
  row
@@ -1771,7 +1814,7 @@ function toUnboundedZone(xc) {
1771
1814
  const orderedZone = reorderZone(toZoneWithoutBoundaryChanges(xc));
1772
1815
  const bottom = orderedZone.bottom;
1773
1816
  const right = orderedZone.right;
1774
- if (bottom !== void 0 && bottom > 9999998 || right !== void 0 && right > MAX_COL) throw new Error(`Range string out of bounds: ${xc}`);
1817
+ if (bottom !== void 0 && bottom > MAX_ROW || right !== void 0 && right > MAX_COL) throw new Error(`Range string out of bounds: ${xc}`);
1775
1818
  if (bottom === void 0 && right === void 0) throw new Error("Wrong zone xc. The zone cannot be at the same time a full column and a full row");
1776
1819
  return orderedZone;
1777
1820
  }
@@ -2168,7 +2211,8 @@ const globalIdCounter = /* @__PURE__ */ new WeakMap();
2168
2211
  function getItemId(item, itemsDic) {
2169
2212
  if (!globalReverseLookup$1.has(itemsDic)) {
2170
2213
  globalReverseLookup$1.set(itemsDic, /* @__PURE__ */ new Map());
2171
- globalIdCounter.set(itemsDic, 0);
2214
+ const maxId = Math.max(...Object.keys(itemsDic).map(Number), 0);
2215
+ globalIdCounter.set(itemsDic, maxId);
2172
2216
  }
2173
2217
  const reverseLookup = globalReverseLookup$1.get(itemsDic);
2174
2218
  const canonical = getCanonicalRepresentation(item);
@@ -2210,6 +2254,26 @@ function getCanonicalRepresentation(item) {
2210
2254
  repr += "}";
2211
2255
  return repr;
2212
2256
  }
2257
+ /**
2258
+ * This adds a border/style/format to the cell position in the workbook data, updating the zonified structure accordingly.
2259
+ */
2260
+ function addStyleToWorkbookData(workbookData, key, position, newItem) {
2261
+ const sheetData = workbookData.sheets.find((sheet) => sheet.id === position.sheetId);
2262
+ if (!sheetData) throw new Error(`Sheet with id ${position.sheetId} not found`);
2263
+ const id = getItemId(newItem, workbookData[key]);
2264
+ const zonifiedData = sheetData[key];
2265
+ const zone = positionToZone(position);
2266
+ const styleXc = Object.keys(zonifiedData).find((styleXc) => isZoneInside(zone, toZone(styleXc)));
2267
+ if (!styleXc) {
2268
+ zonifiedData[zoneToXc(zone)] = id;
2269
+ return;
2270
+ }
2271
+ const existingStyle = zonifiedData[styleXc];
2272
+ const remainingZones = recomputeZones([toZone(styleXc)], [zone]);
2273
+ delete zonifiedData[styleXc];
2274
+ for (const remainingZone of remainingZones) zonifiedData[zoneToXc(remainingZone)] = existingStyle;
2275
+ zonifiedData[zoneToXc(zone)] = id;
2276
+ }
2213
2277
 
2214
2278
  //#endregion
2215
2279
  //#region src/helpers/dates.ts
@@ -3668,7 +3732,7 @@ function visitMatchingRanges(args, cb, locale, isQuery = false) {
3668
3732
  for (let i = 0; i < countArg - 1; i += 2) {
3669
3733
  const criteriaRange = toMatrix(args[i]);
3670
3734
  if (criteriaRange.length !== dimRow || criteriaRange[0].length !== dimCol) throw new EvaluationError(_t("Function [[FUNCTION_NAME]] expects criteria_range to have the same dimension"));
3671
- const predicate = getPredicate(toString(args[i + 1]), locale);
3735
+ const predicate = getPredicate(toLocaleString(args[i + 1], locale), locale);
3672
3736
  if (isQuery && typeof predicate.operand === "string") predicate.operand += "*";
3673
3737
  predicates.push(predicate);
3674
3738
  }
@@ -4124,7 +4188,7 @@ function parseNumberFormatTokens(tokens) {
4124
4188
  switch (token.type) {
4125
4189
  case "DIGIT":
4126
4190
  if (parsedPart === integerPart) parsedPart.push(token);
4127
- else if (numberOfDecimalsDigits < 20) {
4191
+ else if (numberOfDecimalsDigits < MAX_DECIMAL_PLACES) {
4128
4192
  parsedPart.push(token);
4129
4193
  numberOfDecimalsDigits++;
4130
4194
  }
@@ -4441,7 +4505,7 @@ const numberRepresentation = [];
4441
4505
  * exceed in the decimal part, in which case digits are rounded.
4442
4506
  *
4443
4507
  **/
4444
- function splitNumber(value, maxDecimals = 20) {
4508
+ function splitNumber(value, maxDecimals = MAX_DECIMAL_PLACES) {
4445
4509
  const asString = value.toString();
4446
4510
  if (asString.includes("e")) return splitNumberIntl(value, maxDecimals);
4447
4511
  if (Number.isInteger(value)) return {
@@ -4510,7 +4574,7 @@ function limitDecimalDigits(decimalDigits, maxDecimals) {
4510
4574
  * Supports numbers with a lot of digits that are transformed to scientific notation by
4511
4575
  * number.toString(), but is slow.
4512
4576
  */
4513
- function splitNumberIntl(value, maxDecimals = 20) {
4577
+ function splitNumberIntl(value, maxDecimals = MAX_DECIMAL_PLACES) {
4514
4578
  let formatter = numberRepresentation[maxDecimals];
4515
4579
  if (!formatter) {
4516
4580
  formatter = new Intl.NumberFormat("en-US", {
@@ -4997,7 +5061,7 @@ const MIN_DELAY = 20;
4997
5061
  * Returns a timeout delay in milliseconds.
4998
5062
  */
4999
5063
  function scrollDelay(value) {
5000
- return 20 + (140 - 20) * Math.exp(-.035 * (value - 1));
5064
+ return MIN_DELAY + (MAX_DELAY - MIN_DELAY) * Math.exp(-.035 * (value - 1));
5001
5065
  }
5002
5066
 
5003
5067
  //#endregion
@@ -5365,13 +5429,13 @@ function isSheetNameEqual(name1, name2) {
5365
5429
  //#endregion
5366
5430
  //#region src/helpers/text_helper.ts
5367
5431
  function computeTextLinesHeight(textLineHeight, numberOfLines = 1) {
5368
- return numberOfLines * (textLineHeight + 4) - 4;
5432
+ return numberOfLines * (textLineHeight + MIN_CELL_TEXT_MARGIN) - MIN_CELL_TEXT_MARGIN;
5369
5433
  }
5370
5434
  /**
5371
5435
  * Get the default height of the cell given its style.
5372
5436
  */
5373
5437
  function getDefaultCellHeight(ctx, cell, locale, colSize) {
5374
- if (!cell || !cell.isFormula && !cell.content) return 23;
5438
+ if (!cell || !cell.isFormula && !cell.content) return DEFAULT_CELL_HEIGHT;
5375
5439
  let content = "";
5376
5440
  try {
5377
5441
  if (!cell.isFormula) {
@@ -5387,8 +5451,8 @@ function getDefaultCellHeight(ctx, cell, locale, colSize) {
5387
5451
  return getCellContentHeight(ctx, content, cell.style, colSize);
5388
5452
  }
5389
5453
  function getCellContentHeight(ctx, content, style, colSize) {
5390
- const numberOfLines = splitTextToWidth(ctx, content, style, style?.wrapping === "wrap" ? colSize - 2 * 4 : void 0).length;
5391
- return computeTextLinesHeight(computeTextFontSizeInPixels(style), numberOfLines) + 2 * 3;
5454
+ const numberOfLines = splitTextToWidth(ctx, content, style, style?.wrapping === "wrap" ? colSize - 2 * MIN_CELL_TEXT_MARGIN : void 0).length;
5455
+ return computeTextLinesHeight(computeTextFontSizeInPixels(style), numberOfLines) + 2 * PADDING_AUTORESIZE_VERTICAL;
5392
5456
  }
5393
5457
  function getDefaultContextFont(fontSize, bold = false, italic = false) {
5394
5458
  return `${italic ? "italic" : ""} ${bold ? "bold" : ""} ${fontSize}px ${DEFAULT_FONT}`;
@@ -5438,7 +5502,7 @@ function fontSizeInPixels(fontSize) {
5438
5502
  return Math.round(fontSize * 96 / 72);
5439
5503
  }
5440
5504
  function computeTextFont(style, fontUnit = "pt") {
5441
- return `${style.italic ? "italic " : ""}${style.bold ? "bold" : "400"} ${(fontUnit === "pt" ? computeTextFontSizeInPixels(style) : style.fontSize) ?? DEFAULT_FONT_SIZE}px ${DEFAULT_FONT}`;
5505
+ return `${style.italic ? "italic " : ""}${style.bold ? "bold" : DEFAULT_FONT_WEIGHT} ${(fontUnit === "pt" ? computeTextFontSizeInPixels(style) : style.fontSize) ?? DEFAULT_FONT_SIZE}px ${DEFAULT_FONT}`;
5442
5506
  }
5443
5507
  function computeTextFontSizeInPixels(style) {
5444
5508
  return fontSizeInPixels(style?.fontSize || DEFAULT_FONT_SIZE);
@@ -5462,7 +5526,7 @@ function splitTextToWidth(ctx, text, style, width) {
5462
5526
  if (!style) style = {};
5463
5527
  if (isMarkdownLink(text)) text = parseMarkdownLink(text).label;
5464
5528
  const brokenText = [];
5465
- const lines = text.includes("\n") ? text.split("\n") : [text];
5529
+ const lines = text.includes(NEWLINE) ? text.split(NEWLINE) : [text];
5466
5530
  for (const line of lines) {
5467
5531
  const words = line.includes(" ") ? line.split(" ") : [line];
5468
5532
  if (!width) {
@@ -5526,7 +5590,7 @@ function getFontSizeMatchingWidth(lineWidth, maxFontSize, getTextWidth, precisio
5526
5590
  return fontSize;
5527
5591
  }
5528
5592
  function computeIconWidth(style) {
5529
- return computeTextFontSizeInPixels(style) + 2 * 4;
5593
+ return computeTextFontSizeInPixels(style) + 2 * MIN_CF_ICON_MARGIN;
5530
5594
  }
5531
5595
  /** Transform a string to lower case. If the string is undefined, return an empty string */
5532
5596
  function toLowerCase(str) {
@@ -6045,13 +6109,13 @@ function tokenizeSimpleSpace(chars) {
6045
6109
  }
6046
6110
  function tokenizeNewLine(chars) {
6047
6111
  let length = 0;
6048
- while (chars.current === "\n") {
6112
+ while (chars.current === NEWLINE) {
6049
6113
  length++;
6050
6114
  chars.shift();
6051
6115
  }
6052
6116
  if (length) return {
6053
6117
  type: "SPACE",
6054
- value: "\n".repeat(length)
6118
+ value: NEWLINE.repeat(length)
6055
6119
  };
6056
6120
  return null;
6057
6121
  }
@@ -6705,7 +6769,7 @@ function getPreviousOrNextValueDomain(pivot, domain, fieldNameWithGranularity, d
6705
6769
  if (value === void 0) return;
6706
6770
  const valueIndex = values.indexOf(value);
6707
6771
  if (value === void 0 || valueIndex === -1) return;
6708
- return replaceFieldValueInDomain(domain, fieldNameWithGranularity, values[clip(valueIndex + (direction === "(previous)" ? -1 : 1), 0, values.length - 1)]);
6772
+ return replaceFieldValueInDomain(domain, fieldNameWithGranularity, values[clip(valueIndex + (direction === PREVIOUS_VALUE ? -1 : 1), 0, values.length - 1)]);
6709
6773
  }
6710
6774
  function domainToString(domain) {
6711
6775
  return domain ? domain.map(domainNodeToString).join(", ") : "";
@@ -8658,7 +8722,7 @@ function getFullTrendingLineDataSet(dataset, config, data, labels) {
8658
8722
  const borderColor = config.color || lightenColor(rgbaToHex(defaultBorderColor), .5);
8659
8723
  return {
8660
8724
  type: "line",
8661
- xAxisID: "x1",
8725
+ xAxisID: TREND_LINE_XAXIS_ID,
8662
8726
  yAxisID: dataset.yAxisID,
8663
8727
  label: dataset.label ? _t("Trend line for %s", dataset.label) : "",
8664
8728
  data: data.map((v, i) => ({
@@ -8781,7 +8845,7 @@ function drawTextWithBackground(text, x, y, ctx) {
8781
8845
  function drawLineOrBarChartValues(chart, options, ctx) {
8782
8846
  const textsPositions = {};
8783
8847
  for (const dataset of chart._metasets) {
8784
- if (dataset.xAxisID === "x1") return;
8848
+ if (dataset.xAxisID === TREND_LINE_XAXIS_ID) return;
8785
8849
  for (let i = 0; i < dataset._parsed.length; i++) {
8786
8850
  const value = dataset._parsed[i].y;
8787
8851
  const point = dataset.data[i];
@@ -8801,7 +8865,7 @@ function drawLineOrBarChartValues(chart, options, ctx) {
8801
8865
  function drawHorizontalBarChartValues(chart, options, ctx) {
8802
8866
  const textsPositions = {};
8803
8867
  for (const dataset of chart._metasets) {
8804
- if (dataset.xAxisID === "x1") return;
8868
+ if (dataset.xAxisID === TREND_LINE_XAXIS_ID) return;
8805
8869
  for (let i = 0; i < dataset._parsed.length; i++) {
8806
8870
  const value = dataset._parsed[i].x;
8807
8871
  const displayValue = options.callback(value, dataset, i);
@@ -8988,6 +9052,9 @@ const WIDTH_FACTOR = .143;
8988
9052
  const EXCEL_DEFAULT_COL_WIDTH = 8.43;
8989
9053
  /** unit : points */
8990
9054
  const EXCEL_DEFAULT_ROW_HEIGHT = 12.75;
9055
+ const EXCEL_IMPORT_DEFAULT_NUMBER_OF_COLS = 30;
9056
+ const EXCEL_IMPORT_DEFAULT_NUMBER_OF_ROWS = 100;
9057
+ const FIRST_NUMFMT_ID = 164;
8991
9058
  const FORCE_DEFAULT_ARGS_FUNCTIONS = {
8992
9059
  FLOOR: [{
8993
9060
  type: "NUMBER",
@@ -9305,9 +9372,9 @@ css`
9305
9372
  display: flex;
9306
9373
  align-items: center;
9307
9374
  justify-content: center;
9308
- width: ${18}px;
9309
- height: ${18}px;
9310
- font-size: ${18}px;
9375
+ width: ${ICON_EDGE_LENGTH}px;
9376
+ height: ${ICON_EDGE_LENGTH}px;
9377
+ font-size: ${ICON_EDGE_LENGTH}px;
9311
9378
  vertical-align: middle;
9312
9379
 
9313
9380
  .small-text {
@@ -10279,7 +10346,7 @@ function extractStyle(cell, data) {
10279
10346
  alignment: {
10280
10347
  horizontal: style.align,
10281
10348
  vertical: style.verticalAlign ? V_ALIGNMENT_EXPORT_CONVERSION_MAP[style.verticalAlign] : void 0,
10282
- wrapText: style.wrapping === "wrap" || cell.content?.includes("\n") ? true : void 0,
10349
+ wrapText: style.wrapping === "wrap" || cell.content?.includes(NEWLINE) ? true : void 0,
10283
10350
  shrinkToFit: style.wrapping === "clip" ? true : void 0
10284
10351
  }
10285
10352
  };
@@ -10310,7 +10377,7 @@ function normalizeStyle(construct, styles) {
10310
10377
  function convertFormat(format, numFmtStructure) {
10311
10378
  if (!format) return 0;
10312
10379
  let formatId = XLSX_FORMAT_MAP[format.format];
10313
- if (!formatId) formatId = pushElement(format, numFmtStructure) + 164;
10380
+ if (!formatId) formatId = pushElement(format, numFmtStructure) + FIRST_NUMFMT_ID;
10314
10381
  return formatId;
10315
10382
  }
10316
10383
  /**
@@ -10892,8 +10959,8 @@ function getSheetDims(sheet) {
10892
10959
  dims[0] = Math.max(dims[0], largeMax(row.cells.map((cell) => toCartesian(cell.xc).col)));
10893
10960
  dims[1] = Math.max(dims[1], row.index);
10894
10961
  }
10895
- dims[0] = Math.max(dims[0], 30);
10896
- dims[1] = Math.max(dims[1], 100);
10962
+ dims[0] = Math.max(dims[0], EXCEL_IMPORT_DEFAULT_NUMBER_OF_COLS);
10963
+ dims[1] = Math.max(dims[1], EXCEL_IMPORT_DEFAULT_NUMBER_OF_ROWS);
10897
10964
  return dims;
10898
10965
  }
10899
10966
  /**
@@ -11998,7 +12065,7 @@ var XlsxBaseExtractor = class {
11998
12065
  rgb = this.getThemeColor(themeIndex, theme.clrScheme);
11999
12066
  } else {
12000
12067
  rgb = this.extractAttr(colorElement, "rgb")?.asString();
12001
- rgb = rgb === "FF000000" ? void 0 : rgb;
12068
+ rgb = rgb === DEFAULT_SYSTEM_COLOR ? void 0 : rgb;
12002
12069
  }
12003
12070
  return {
12004
12071
  rgb: rgb || defaultColor,
@@ -13076,7 +13143,7 @@ function getPathsOfContent(contentType, xmls) {
13076
13143
  * Get the corresponding relationship file for a given xml file in a XLSX directory.
13077
13144
  */
13078
13145
  function getRelationFile(file, xmls) {
13079
- if (file === "[Content_Types].xml") return "_rels/.rels";
13146
+ if (file === CONTENT_TYPES_FILE) return "_rels/.rels";
13080
13147
  let relsFile = "";
13081
13148
  const pathParts = file.split("/");
13082
13149
  for (let i = 0; i < pathParts.length - 1; i++) relsFile += pathParts[i] + "/";
@@ -13276,7 +13343,7 @@ function normalizeV9(formula) {
13276
13343
  if (token.type === "REFERENCE" && cellReference.test(token.value)) {
13277
13344
  const value = token.value.trim();
13278
13345
  if (!dependencies.includes(value)) dependencies.push(value);
13279
- return `${"|"}${dependencies.indexOf(value)}${"|"}`;
13346
+ return `${FORMULA_REF_IDENTIFIER}${dependencies.indexOf(value)}${FORMULA_REF_IDENTIFIER}`;
13280
13347
  } else return token.value;
13281
13348
  })),
13282
13349
  dependencies
@@ -13504,7 +13571,7 @@ migrationStepRegistry.add("migration_1", {
13504
13571
  if (cell.formula) {
13505
13572
  let { text, dependencies } = cell.formula;
13506
13573
  for (const [index, d] of Object.entries(dependencies)) {
13507
- const stringPosition = `\\${"|"}${index}\\${"|"}`;
13574
+ const stringPosition = `\\${FORMULA_REF_IDENTIFIER}${index}\\${FORMULA_REF_IDENTIFIER}`;
13508
13575
  text = text.replace(new RegExp(stringPosition, "g"), d);
13509
13576
  }
13510
13577
  cell.content = text;
@@ -13700,7 +13767,7 @@ function load(data, verboseImport) {
13700
13767
  if (verboseImport) for (const parsingError of reader.warningManager.warnings.sort()) console.warn(parsingError);
13701
13768
  }
13702
13769
  if ("version" in data) {
13703
- if (data.version < 22) {
13770
+ if (data.version < CURRENT_VERSION) {
13704
13771
  console.debug("Migrating data from version", data.version);
13705
13772
  data = migrate(data);
13706
13773
  }
@@ -13756,7 +13823,7 @@ function forceUnicityOfFigure(data) {
13756
13823
  * sensible default values
13757
13824
  */
13758
13825
  function setDefaults(partialData) {
13759
- const data = Object.assign(createEmptyWorkbookData(), partialData, { version: 22 });
13826
+ const data = Object.assign(createEmptyWorkbookData(), partialData, { version: CURRENT_VERSION });
13760
13827
  data.sheets = data.sheets ? data.sheets.map((s, i) => Object.assign(createEmptySheet(`Sheet${i + 1}`, `Sheet${i + 1}`), s)) : [];
13761
13828
  if (data.sheets.length === 0) data.sheets.push(createEmptySheet(INITIAL_SHEET_ID, "Sheet1"));
13762
13829
  if (!isValidLocale(data.settings.locale)) data.settings.locale = DEFAULT_LOCALE;
@@ -13898,7 +13965,7 @@ function createEmptySheet(sheetId, name) {
13898
13965
  }
13899
13966
  function createEmptyWorkbookData(sheetName = "Sheet1") {
13900
13967
  return {
13901
- version: 22,
13968
+ version: CURRENT_VERSION,
13902
13969
  sheets: [createEmptySheet(INITIAL_SHEET_ID, sheetName)],
13903
13970
  styles: {},
13904
13971
  formats: {},
@@ -13948,7 +14015,7 @@ function interactivePaste(env, target, pasteOption) {
13948
14015
  }));
13949
14016
  }
13950
14017
  function interactivePasteFromOS(env, target, clipboardContent, pasteOption) {
13951
- if (clipboardContent.data && clipboardContent.data.version !== 22) env.notifyUser({
14018
+ if (clipboardContent.data && clipboardContent.data.version !== CURRENT_VERSION) env.notifyUser({
13952
14019
  type: "warning",
13953
14020
  text: _t("You copied content from a different version of the application. Only text content will be pasted."),
13954
14021
  sticky: false
@@ -14161,9 +14228,9 @@ const GAUGE_TEXT_COLOR_HIGH_CONTRAST = "#C8C8C8";
14161
14228
  const GAUGE_INFLECTION_MARKER_COLOR = "#666666aa";
14162
14229
  const GAUGE_INFLECTION_LABEL_BOTTOM_MARGIN = 6;
14163
14230
  const GAUGE_TITLE_SECTION_HEIGHT = 25;
14164
- const GAUGE_TITLE_FONT_SIZE = 14;
14165
- const GAUGE_TITLE_PADDING_LEFT = 10;
14166
- const GAUGE_TITLE_PADDING_TOP = 10;
14231
+ const GAUGE_TITLE_FONT_SIZE = SCORECARD_GAUGE_CHART_FONT_SIZE;
14232
+ const GAUGE_TITLE_PADDING_LEFT = SCORECARD_GAUGE_CHART_PADDING;
14233
+ const GAUGE_TITLE_PADDING_TOP = SCORECARD_GAUGE_CHART_PADDING;
14167
14234
  function drawGaugeChart(canvas, runtime) {
14168
14235
  const canvasBoundingRect = canvas.getBoundingClientRect();
14169
14236
  const dpr = window.devicePixelRatio || 1;
@@ -14257,18 +14324,18 @@ function getGaugeRenderingConfig(boundingRect, runtime, ctx) {
14257
14324
  x: boundingRect.width / 2,
14258
14325
  y: gaugeRect.y + gaugeRect.height - gaugeRect.height / 12
14259
14326
  };
14260
- let gaugeValueFontSize = 80;
14327
+ let gaugeValueFontSize = GAUGE_DEFAULT_VALUE_FONT_SIZE;
14261
14328
  if (gaugeRect.height < 300) gaugeValueFontSize = gaugeValueFontSize * (gaugeRect.height / 300);
14262
14329
  const maxTextWidth = gaugeRect.width / 2;
14263
14330
  const gaugeLabel = gaugeValue?.label || "-";
14264
14331
  if (computeTextWidth(ctx, gaugeLabel, { fontSize: gaugeValueFontSize }, "px") > maxTextWidth) gaugeValueFontSize = getFontSizeMatchingWidth(maxTextWidth, gaugeValueFontSize, (fontSize) => computeTextWidth(ctx, gaugeLabel, { fontSize }, "px"));
14265
14332
  const minLabelPosition = {
14266
14333
  x: gaugeRect.x + gaugeArcWidth / 2,
14267
- y: gaugeRect.y + gaugeRect.height + 12
14334
+ y: gaugeRect.y + gaugeRect.height + GAUGE_LABELS_FONT_SIZE
14268
14335
  };
14269
14336
  const maxLabelPosition = {
14270
14337
  x: gaugeRect.x + gaugeRect.width - gaugeArcWidth / 2,
14271
- y: gaugeRect.y + gaugeRect.height + 12
14338
+ y: gaugeRect.y + gaugeRect.height + GAUGE_LABELS_FONT_SIZE
14272
14339
  };
14273
14340
  const textColor = getContrastedTextColor(runtime.background);
14274
14341
  const inflectionValues = getInflectionValues(runtime, gaugeRect, textColor, ctx);
@@ -14319,13 +14386,13 @@ function getGaugeRenderingConfig(boundingRect, runtime, ctx) {
14319
14386
  minLabel: {
14320
14387
  label: runtime.minValue.label,
14321
14388
  textPosition: minLabelPosition,
14322
- fontSize: 12,
14389
+ fontSize: GAUGE_LABELS_FONT_SIZE,
14323
14390
  color: textColor
14324
14391
  },
14325
14392
  maxLabel: {
14326
14393
  label: runtime.maxValue.label,
14327
14394
  textPosition: maxLabelPosition,
14328
- fontSize: 12,
14395
+ fontSize: GAUGE_LABELS_FONT_SIZE,
14329
14396
  color: textColor
14330
14397
  }
14331
14398
  };
@@ -14335,9 +14402,9 @@ function getGaugeRenderingConfig(boundingRect, runtime, ctx) {
14335
14402
  * space for the title and labels.
14336
14403
  */
14337
14404
  function getGaugeRect(boundingRect, title) {
14338
- const titleHeight = title ? 25 : 0;
14339
- const drawHeight = boundingRect.height - 20 - titleHeight - 10;
14340
- const drawWidth = boundingRect.width - 30 * 2;
14405
+ const titleHeight = title ? GAUGE_TITLE_SECTION_HEIGHT : 0;
14406
+ const drawHeight = boundingRect.height - GAUGE_PADDING_BOTTOM - titleHeight - GAUGE_PADDING_TOP;
14407
+ const drawWidth = boundingRect.width - GAUGE_PADDING_SIDE * 2;
14341
14408
  let gaugeWidth;
14342
14409
  let gaugeHeight;
14343
14410
  if (drawWidth > 2 * drawHeight) {
@@ -14348,8 +14415,8 @@ function getGaugeRect(boundingRect, title) {
14348
14415
  gaugeHeight = drawWidth / 2;
14349
14416
  }
14350
14417
  return {
14351
- x: 30 + (drawWidth - gaugeWidth) / 2,
14352
- y: titleHeight + 10 + (drawHeight - gaugeHeight) / 2,
14418
+ x: GAUGE_PADDING_SIDE + (drawWidth - gaugeWidth) / 2,
14419
+ y: titleHeight + GAUGE_PADDING_TOP + (drawHeight - gaugeHeight) / 2,
14353
14420
  width: gaugeWidth,
14354
14421
  height: gaugeHeight
14355
14422
  };
@@ -14366,20 +14433,20 @@ function getInflectionValues(runtime, gaugeRect, textColor, ctx) {
14366
14433
  x: gaugeRect.x + gaugeRect.width / 2,
14367
14434
  y: gaugeRect.y + gaugeRect.height
14368
14435
  };
14369
- const textStyle = { fontSize: 12 };
14436
+ const textStyle = { fontSize: GAUGE_LABELS_FONT_SIZE };
14370
14437
  const inflectionValues = [];
14371
14438
  const inflectionValuesTextRects = [];
14372
14439
  for (const inflectionValue of runtime.inflectionValues) {
14373
14440
  const percentage = (inflectionValue.value - minValue.value) / (maxValue.value - minValue.value);
14374
14441
  const labelWidth = computeTextWidth(ctx, inflectionValue.label, textStyle, "px");
14375
14442
  const angle = Math.PI - Math.PI * percentage;
14376
- const textRect = getRectangleTangentToCircle(angle, gaugeRect.height + GAUGE_INFLECTION_LABEL_BOTTOM_MARGIN, gaugeCircleCenter.x, gaugeCircleCenter.y, labelWidth + 2, 12);
14377
- const offset = inflectionValuesTextRects.some((rect) => doRectanglesIntersect(rect, textRect)) ? 12 : 0;
14443
+ const textRect = getRectangleTangentToCircle(angle, gaugeRect.height + GAUGE_INFLECTION_LABEL_BOTTOM_MARGIN, gaugeCircleCenter.x, gaugeCircleCenter.y, labelWidth + 2, GAUGE_LABELS_FONT_SIZE);
14444
+ const offset = inflectionValuesTextRects.some((rect) => doRectanglesIntersect(rect, textRect)) ? GAUGE_LABELS_FONT_SIZE : 0;
14378
14445
  inflectionValuesTextRects.push(textRect);
14379
14446
  inflectionValues.push({
14380
14447
  rotation: angle,
14381
14448
  label: inflectionValue.label,
14382
- fontSize: 12,
14449
+ fontSize: GAUGE_LABELS_FONT_SIZE,
14383
14450
  color: textColor,
14384
14451
  offset
14385
14452
  });
@@ -14589,8 +14656,8 @@ var ScorecardChart$1 = class ScorecardChart$1 extends AbstractChart {
14589
14656
  this.baselineMode = definition.baselineMode;
14590
14657
  this.baselineDescr = definition.baselineDescr;
14591
14658
  this.background = definition.background;
14592
- this.baselineColorUp = definition.baselineColorUp ?? "#43C5B1";
14593
- this.baselineColorDown = definition.baselineColorDown ?? "#EA6175";
14659
+ this.baselineColorUp = definition.baselineColorUp ?? DEFAULT_SCORECARD_BASELINE_COLOR_UP;
14660
+ this.baselineColorDown = definition.baselineColorDown ?? DEFAULT_SCORECARD_BASELINE_COLOR_DOWN;
14594
14661
  this.humanize = definition.humanize ?? false;
14595
14662
  }
14596
14663
  static validateChartDefinition(validator, definition) {
@@ -14665,7 +14732,7 @@ function drawScoreChart(structure, canvas) {
14665
14732
  canvas.width = dpr * structure.canvas.width;
14666
14733
  canvas.height = dpr * structure.canvas.height;
14667
14734
  ctx.scale(dpr, dpr);
14668
- const availableWidth = structure.canvas.width - 20;
14735
+ const availableWidth = structure.canvas.width - DEFAULT_CHART_PADDING;
14669
14736
  ctx.fillStyle = structure.canvas.backgroundColor;
14670
14737
  ctx.fillRect(0, 0, structure.canvas.width, structure.canvas.height);
14671
14738
  if (structure.title) {
@@ -14780,9 +14847,9 @@ function createScorecardChartRuntime(chart, getters) {
14780
14847
 
14781
14848
  //#endregion
14782
14849
  //#region src/helpers/figures/charts/scorecard_chart_config_builder.ts
14783
- const CHART_PADDING = 10;
14850
+ const CHART_PADDING = SCORECARD_GAUGE_CHART_PADDING;
14784
14851
  const BOTTOM_PADDING_RATIO = .05;
14785
- const CHART_TITLE_FONT_SIZE = 14;
14852
+ const CHART_TITLE_FONT_SIZE = SCORECARD_GAUGE_CHART_FONT_SIZE;
14786
14853
  const KEY_VALUE_FONT_SIZE = 32;
14787
14854
  const BASELINE_MAX_FONT_SIZE = 16;
14788
14855
  function formatBaselineDescr(baselineDescr, baseline) {
@@ -14848,7 +14915,7 @@ var ScorecardChartConfigBuilder = class {
14848
14915
  y: this.keyValue ? this.height * (1 - BOTTOM_PADDING_RATIO * (this.runtime.progressBar ? 1 : 2)) : this.height - (this.height - titleHeight - baselineHeight) / 2 - CHART_PADDING
14849
14916
  }
14850
14917
  };
14851
- const minimalBaselinePosition = baselineArrowSize + 20;
14918
+ const minimalBaselinePosition = baselineArrowSize + DEFAULT_CHART_PADDING;
14852
14919
  if (structure.baseline.position.x < minimalBaselinePosition) structure.baseline.position.x = minimalBaselinePosition;
14853
14920
  if (style.baselineArrow && !this.runtime.progressBar) structure.baselineArrow = {
14854
14921
  direction: this.baselineArrow,
@@ -15026,7 +15093,7 @@ function aggregateDataForLabels(labels, datasets) {
15026
15093
  }
15027
15094
  function truncateLabel(label) {
15028
15095
  if (!label) return "";
15029
- if (label.length > 20) return label.substring(0, 20) + "…";
15096
+ if (label.length > MAX_CHAR_LABEL) return label.substring(0, MAX_CHAR_LABEL) + "…";
15030
15097
  return label;
15031
15098
  }
15032
15099
  /**
@@ -15041,10 +15108,10 @@ function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale, tr
15041
15108
  responsive: true,
15042
15109
  maintainAspectRatio: false,
15043
15110
  layout: { padding: {
15044
- left: 20,
15045
- right: 20,
15046
- top: chartTitle.text ? 20 / 2 : 20 + 5,
15047
- bottom: 20
15111
+ left: DEFAULT_CHART_PADDING,
15112
+ right: DEFAULT_CHART_PADDING,
15113
+ top: chartTitle.text ? DEFAULT_CHART_PADDING / 2 : DEFAULT_CHART_PADDING + 5,
15114
+ bottom: DEFAULT_CHART_PADDING
15048
15115
  } },
15049
15116
  elements: {
15050
15117
  line: { fill: false },
@@ -15058,7 +15125,7 @@ function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale, tr
15058
15125
  color: chartTitle?.color ?? fontColor,
15059
15126
  align: chartTitle.align === "center" ? "center" : chartTitle.align === "right" ? "end" : "start",
15060
15127
  font: {
15061
- size: 22,
15128
+ size: DEFAULT_CHART_FONT_SIZE,
15062
15129
  weight: chartTitle.bold ? "bold" : "normal",
15063
15130
  style: chartTitle.italic ? "italic" : "normal"
15064
15131
  }
@@ -23492,7 +23559,7 @@ var ContentEditableHelper = class {
23492
23559
  while (!current.done) {
23493
23560
  if (!current.value.hasChildNodes()) text += current.value.textContent;
23494
23561
  if (current.value.nodeName === "P" || current.value.nodeName === "DIV" && current.value !== this.el) if (isFirstParagraph) isFirstParagraph = false;
23495
- else text += "\n";
23562
+ else text += NEWLINE;
23496
23563
  current = it.next();
23497
23564
  }
23498
23565
  return text;
@@ -23719,7 +23786,7 @@ var Composer = class extends Component {
23719
23786
  if (cellX + ASSISTANT_WIDTH > this.props.delimitation.width) assistantStyle.right = `0px`;
23720
23787
  } else {
23721
23788
  assistantStyle["max-height"] = `${this.spreadsheetRect.height - composerRect.bottom - 1}px`;
23722
- if (composerRect.left + ASSISTANT_WIDTH + 15 + CLOSE_ICON_RADIUS > this.spreadsheetRect.width) assistantStyle.right = `${CLOSE_ICON_RADIUS}px`;
23789
+ if (composerRect.left + ASSISTANT_WIDTH + SCROLLBAR_WIDTH + CLOSE_ICON_RADIUS > this.spreadsheetRect.width) assistantStyle.right = `${CLOSE_ICON_RADIUS}px`;
23723
23790
  }
23724
23791
  return assistantStyle;
23725
23792
  }
@@ -23833,7 +23900,7 @@ var Composer = class extends Component {
23833
23900
  const start = Math.min(selection.start, selection.end);
23834
23901
  const end = Math.max(selection.start, selection.end);
23835
23902
  this.props.composerStore.stopComposerRangeSelection();
23836
- this.props.composerStore.setCurrentContent(content.slice(0, start) + "\n" + content.slice(end), {
23903
+ this.props.composerStore.setCurrentContent(content.slice(0, start) + NEWLINE + content.slice(end), {
23837
23904
  start: start + 1,
23838
23905
  end: start + 1
23839
23906
  });
@@ -24062,8 +24129,8 @@ var Composer = class extends Component {
24062
24129
  splitHtmlContentIntoLines(contents) {
24063
24130
  const contentSplitInLines = [];
24064
24131
  let currentLine = [];
24065
- for (const content of contents) if (content.value.includes("\n")) {
24066
- const lines = content.value.split("\n");
24132
+ for (const content of contents) if (content.value.includes(NEWLINE)) {
24133
+ const lines = content.value.split(NEWLINE);
24067
24134
  const lastLine = lines.pop();
24068
24135
  for (const line of lines) {
24069
24136
  currentLine.push({
@@ -25284,7 +25351,7 @@ var BarChart = class BarChart extends AbstractChart {
25284
25351
  const definition = this.getDefinition();
25285
25352
  return {
25286
25353
  ...definition,
25287
- backgroundColor: toXlsxHexColor(this.background || "#FFFFFF"),
25354
+ backgroundColor: toXlsxHexColor(this.background || BACKGROUND_CHART_COLOR),
25288
25355
  fontColor: toXlsxHexColor(chartFontColor(this.background)),
25289
25356
  dataSets,
25290
25357
  labelRange,
@@ -25374,7 +25441,7 @@ function createBarChartRuntime(chart, getters) {
25374
25441
  label,
25375
25442
  data,
25376
25443
  hidden,
25377
- borderColor: definition.background || "#FFFFFF",
25444
+ borderColor: definition.background || BACKGROUND_CHART_COLOR,
25378
25445
  borderWidth: definition.stacked ? 1 : 0,
25379
25446
  backgroundColor: color
25380
25447
  };
@@ -25388,7 +25455,7 @@ function createBarChartRuntime(chart, getters) {
25388
25455
  }
25389
25456
  if (trendDatasets.length) {
25390
25457
  const maxLength = Math.max(...trendDatasets.map((trendDataset) => trendDataset.data.length));
25391
- config.options.scales["x1"] = {
25458
+ config.options.scales[TREND_LINE_XAXIS_ID] = {
25392
25459
  ...xAxis,
25393
25460
  labels: Array(maxLength).fill(""),
25394
25461
  offset: false,
@@ -25396,12 +25463,12 @@ function createBarChartRuntime(chart, getters) {
25396
25463
  };
25397
25464
  trendDatasets.forEach((x) => config.data.datasets.push(x));
25398
25465
  config.options.plugins.tooltip.callbacks.title = function(tooltipItems) {
25399
- return tooltipItems.some((item) => item.dataset.xAxisID !== "x1") ? void 0 : "";
25466
+ return tooltipItems.some((item) => item.dataset.xAxisID !== TREND_LINE_XAXIS_ID) ? void 0 : "";
25400
25467
  };
25401
25468
  }
25402
25469
  return {
25403
25470
  chartJsConfig: config,
25404
- background: chart.background || "#FFFFFF"
25471
+ background: chart.background || BACKGROUND_CHART_COLOR
25405
25472
  };
25406
25473
  }
25407
25474
 
@@ -25688,7 +25755,7 @@ function createLineOrScatterChartRuntime(chart, getters) {
25688
25755
  config.options.plugins.tooltip.callbacks.label = (tooltipItem) => {
25689
25756
  let dataSetPoint;
25690
25757
  let label;
25691
- if (tooltipItem.dataset.xAxisID === "x1") {
25758
+ if (tooltipItem.dataset.xAxisID === TREND_LINE_XAXIS_ID) {
25692
25759
  dataSetPoint = dataSetsValues[tooltipItem.datasetIndex].data[tooltipItem.dataIndex].y;
25693
25760
  label = "";
25694
25761
  } else {
@@ -25759,23 +25826,23 @@ function createLineOrScatterChartRuntime(chart, getters) {
25759
25826
  }
25760
25827
  }
25761
25828
  if (trendDatasets.length) {
25762
- config.options.scales["x1"] = {
25829
+ config.options.scales[TREND_LINE_XAXIS_ID] = {
25763
25830
  ...xAxis,
25764
25831
  display: false
25765
25832
  };
25766
25833
  if (axisType === "category" || axisType === "time") {
25767
- config.options.scales["x1"]["type"] = "category";
25768
- config.options.scales["x1"]["labels"] = range(0, maxLength).map((x) => x.toString());
25769
- config.options.scales["x1"]["offset"] = false;
25834
+ config.options.scales[TREND_LINE_XAXIS_ID]["type"] = "category";
25835
+ config.options.scales[TREND_LINE_XAXIS_ID]["labels"] = range(0, maxLength).map((x) => x.toString());
25836
+ config.options.scales[TREND_LINE_XAXIS_ID]["offset"] = false;
25770
25837
  }
25771
25838
  trendDatasets.forEach((x) => config.data.datasets.push(x));
25772
25839
  }
25773
25840
  config.options.plugins.tooltip.callbacks.title = function(tooltipItems) {
25774
- return axisType !== "linear" && tooltipItems.some((item) => item.dataset.xAxisID !== "x1") ? void 0 : "";
25841
+ return axisType !== "linear" && tooltipItems.some((item) => item.dataset.xAxisID !== TREND_LINE_XAXIS_ID) ? void 0 : "";
25775
25842
  };
25776
25843
  return {
25777
25844
  chartJsConfig: config,
25778
- background: chart.background || "#FFFFFF"
25845
+ background: chart.background || BACKGROUND_CHART_COLOR
25779
25846
  };
25780
25847
  }
25781
25848
 
@@ -25851,7 +25918,7 @@ var ComboChart = class ComboChart extends AbstractChart {
25851
25918
  const definition = this.getDefinition();
25852
25919
  return {
25853
25920
  ...definition,
25854
- backgroundColor: toXlsxHexColor(this.background || "#FFFFFF"),
25921
+ backgroundColor: toXlsxHexColor(this.background || BACKGROUND_CHART_COLOR),
25855
25922
  fontColor: toXlsxHexColor(chartFontColor(this.background)),
25856
25923
  dataSets,
25857
25924
  labelRange,
@@ -25991,19 +26058,19 @@ function createComboChartRuntime(chart, getters) {
25991
26058
  }
25992
26059
  if (trendDatasets.length) {
25993
26060
  const trendLinesMaxLength = Math.max(...trendDatasets.map((trend) => trend.data.length));
25994
- config.options.scales["x1"] = {
26061
+ config.options.scales[TREND_LINE_XAXIS_ID] = {
25995
26062
  labels: Array(Math.round(trendLinesMaxLength)).fill(""),
25996
26063
  offset: false,
25997
26064
  display: false
25998
26065
  };
25999
26066
  trendDatasets.forEach((x) => config.data.datasets.push(x));
26000
26067
  config.options.plugins.tooltip.callbacks.title = function(tooltipItems) {
26001
- return tooltipItems.some((item) => item.dataset.xAxisID !== "x1") ? void 0 : "";
26068
+ return tooltipItems.some((item) => item.dataset.xAxisID !== TREND_LINE_XAXIS_ID) ? void 0 : "";
26002
26069
  };
26003
26070
  }
26004
26071
  return {
26005
26072
  chartJsConfig: config,
26006
- background: chart.background || "#FFFFFF"
26073
+ background: chart.background || BACKGROUND_CHART_COLOR
26007
26074
  };
26008
26075
  }
26009
26076
 
@@ -26327,7 +26394,7 @@ var LineChart = class LineChart extends AbstractChart {
26327
26394
  const definition = this.getDefinition();
26328
26395
  return {
26329
26396
  ...definition,
26330
- backgroundColor: toXlsxHexColor(this.background || "#FFFFFF"),
26397
+ backgroundColor: toXlsxHexColor(this.background || BACKGROUND_CHART_COLOR),
26331
26398
  fontColor: toXlsxHexColor(chartFontColor(this.background)),
26332
26399
  dataSets,
26333
26400
  labelRange,
@@ -26424,7 +26491,7 @@ var PieChart = class PieChart extends AbstractChart {
26424
26491
  const labelRange = toExcelLabelRange(this.getters, this.labelRange, shouldRemoveFirstLabel(this.labelRange, this.dataSets[0], this.dataSetsHaveTitle));
26425
26492
  return {
26426
26493
  ...this.getDefinition(),
26427
- backgroundColor: toXlsxHexColor(this.background || "#FFFFFF"),
26494
+ backgroundColor: toXlsxHexColor(this.background || BACKGROUND_CHART_COLOR),
26428
26495
  fontColor: toXlsxHexColor(chartFontColor(this.background)),
26429
26496
  dataSets,
26430
26497
  labelRange
@@ -26528,7 +26595,7 @@ function createPieChartRuntime(chart, getters) {
26528
26595
  if (chart.isDoughnut) config.type = "doughnut";
26529
26596
  return {
26530
26597
  chartJsConfig: config,
26531
- background: chart.background || "#FFFFFF"
26598
+ background: chart.background || BACKGROUND_CHART_COLOR
26532
26599
  };
26533
26600
  }
26534
26601
 
@@ -26660,7 +26727,7 @@ function createPyramidChartRuntime(chart, getters) {
26660
26727
  config.options.plugins.chartShowValuesPlugin.callback = (value, dataset, index) => callback(Math.abs(value), dataset, index);
26661
26728
  return {
26662
26729
  chartJsConfig: config,
26663
- background: chart.background || "#FFFFFF"
26730
+ background: chart.background || BACKGROUND_CHART_COLOR
26664
26731
  };
26665
26732
  }
26666
26733
 
@@ -26758,7 +26825,7 @@ var ScatterChart = class ScatterChart extends AbstractChart {
26758
26825
  const definition = this.getDefinition();
26759
26826
  return {
26760
26827
  ...definition,
26761
- backgroundColor: toXlsxHexColor(this.background || "#FFFFFF"),
26828
+ backgroundColor: toXlsxHexColor(this.background || BACKGROUND_CHART_COLOR),
26762
26829
  fontColor: toXlsxHexColor(chartFontColor(this.background)),
26763
26830
  dataSets,
26764
26831
  labelRange,
@@ -26907,9 +26974,9 @@ function getWaterfallConfiguration(chart, labels, dataSeriesLabels, localeFormat
26907
26974
  const { locale, format } = localeFormat;
26908
26975
  const fontColor = chartFontColor(chart.background);
26909
26976
  const config = getDefaultChartJsRuntime(chart, labels, fontColor, localeFormat);
26910
- const negativeColor = chart.negativeValuesColor || "#EA6175";
26911
- const positiveColor = chart.positiveValuesColor || "#4EA7F2";
26912
- const subTotalColor = chart.subTotalValuesColor || "#AAAAAA";
26977
+ const negativeColor = chart.negativeValuesColor || CHART_WATERFALL_NEGATIVE_COLOR;
26978
+ const positiveColor = chart.positiveValuesColor || CHART_WATERFALL_POSITIVE_COLOR;
26979
+ const subTotalColor = chart.subTotalValuesColor || CHART_WATERFALL_SUBTOTAL_COLOR;
26913
26980
  const legend = { labels: { generateLabels: () => {
26914
26981
  const legendValues = [{
26915
26982
  text: _t("Positive values"),
@@ -27013,9 +27080,9 @@ function createWaterfallChartRuntime(chart, getters) {
27013
27080
  locale
27014
27081
  }, dataSetsValues);
27015
27082
  config.type = "bar";
27016
- const negativeColor = chart.negativeValuesColor || "#EA6175";
27017
- const positiveColor = chart.positiveValuesColor || "#4EA7F2";
27018
- const subTotalColor = chart.subTotalValuesColor || "#AAAAAA";
27083
+ const negativeColor = chart.negativeValuesColor || CHART_WATERFALL_NEGATIVE_COLOR;
27084
+ const positiveColor = chart.positiveValuesColor || CHART_WATERFALL_POSITIVE_COLOR;
27085
+ const subTotalColor = chart.subTotalValuesColor || CHART_WATERFALL_SUBTOTAL_COLOR;
27019
27086
  const backgroundColor = [];
27020
27087
  const datasetValues = [];
27021
27088
  const dataset = {
@@ -27050,7 +27117,7 @@ function createWaterfallChartRuntime(chart, getters) {
27050
27117
  config.data.labels = labelsWithSubTotals.map(truncateLabel);
27051
27118
  return {
27052
27119
  chartJsConfig: config,
27053
- background: chart.background || "#FFFFFF"
27120
+ background: chart.background || BACKGROUND_CHART_COLOR
27054
27121
  };
27055
27122
  }
27056
27123
 
@@ -27779,7 +27846,7 @@ const CSS = css`
27779
27846
  .o-filter-menu-item {
27780
27847
  display: flex;
27781
27848
  box-sizing: border-box;
27782
- height: ${26}px;
27849
+ height: ${MENU_ITEM_HEIGHT}px;
27783
27850
  padding: 4px 4px 4px 0px;
27784
27851
  cursor: pointer;
27785
27852
  user-select: none;
@@ -28214,7 +28281,7 @@ var LinkDisplay = class extends Component {
28214
28281
  col,
28215
28282
  row
28216
28283
  });
28217
- const textColor = style?.textColor === "#017E84" ? void 0 : style?.textColor;
28284
+ const textColor = style?.textColor === LINK_COLOR ? void 0 : style?.textColor;
28218
28285
  this.env.model.dispatch("UPDATE_CELL", {
28219
28286
  col,
28220
28287
  row,
@@ -28621,15 +28688,15 @@ var TopRightPopoverContext = class extends PopoverPositionContext {
28621
28688
  css`
28622
28689
  .o-menu {
28623
28690
  background-color: white;
28624
- padding: ${6}px 0px;
28625
- width: ${250}px;
28691
+ padding: ${MENU_VERTICAL_PADDING}px 0px;
28692
+ width: ${MENU_WIDTH}px;
28626
28693
  box-sizing: border-box !important;
28627
28694
  user-select: none;
28628
28695
 
28629
28696
  .o-menu-item {
28630
28697
  box-sizing: border-box;
28631
- height: ${26}px;
28632
- padding: ${4}px ${11}px;
28698
+ height: ${MENU_ITEM_HEIGHT}px;
28699
+ padding: ${MENU_ITEM_PADDING_VERTICAL}px ${MENU_ITEM_PADDING_HORIZONTAL}px;
28633
28700
  cursor: pointer;
28634
28701
  user-select: none;
28635
28702
 
@@ -28640,8 +28707,8 @@ css`
28640
28707
  .o-menu-item-icon {
28641
28708
  display: inline-block;
28642
28709
  margin: 0px 8px 0px 0px;
28643
- width: ${26 - 2 * 4}px;
28644
- line-height: ${26 - 2 * 4}px;
28710
+ width: ${MENU_ITEM_HEIGHT - 2 * MENU_ITEM_PADDING_VERTICAL}px;
28711
+ line-height: ${MENU_ITEM_HEIGHT - 2 * MENU_ITEM_PADDING_VERTICAL}px;
28645
28712
  }
28646
28713
 
28647
28714
  &:not(.disabled) {
@@ -28746,11 +28813,11 @@ var Menu = class Menu extends Component {
28746
28813
  anchorRect: {
28747
28814
  x: this.props.position.x,
28748
28815
  y: this.props.position.y,
28749
- width: isRoot ? 0 : this.props.width || 250,
28750
- height: isRoot ? 0 : 26
28816
+ width: isRoot ? 0 : this.props.width || MENU_WIDTH,
28817
+ height: isRoot ? 0 : MENU_ITEM_HEIGHT
28751
28818
  },
28752
28819
  positioning: "TopRight",
28753
- verticalOffset: isRoot ? 0 : 6,
28820
+ verticalOffset: isRoot ? 0 : MENU_VERTICAL_PADDING,
28754
28821
  onPopoverHidden: () => this.closeSubMenu(),
28755
28822
  onPopoverMoved: () => this.closeSubMenu()
28756
28823
  };
@@ -29431,8 +29498,8 @@ const CREATE_CHART = (env) => {
29431
29498
  const sheetId = getters.getActiveSheetId();
29432
29499
  if (getZoneArea(env.model.getters.getSelectedZone()) === 1) env.model.selection.selectTableAroundSelection();
29433
29500
  const size = {
29434
- width: 536,
29435
- height: 335
29501
+ width: DEFAULT_FIGURE_WIDTH,
29502
+ height: DEFAULT_FIGURE_HEIGHT
29436
29503
  };
29437
29504
  const position = getChartPositionAtCenterOfViewport(getters, size);
29438
29505
  if (env.model.dispatch("CREATE_CHART", {
@@ -31256,7 +31323,7 @@ function getVisiblePivotCellPositions(getters, pivotId) {
31256
31323
  function drawHighlight(renderingContext, highlight, rect) {
31257
31324
  const { x, y, width, height } = rect;
31258
31325
  if (width < 0 || height < 0) return;
31259
- const color = highlight.color || "#37A850";
31326
+ const color = highlight.color || HIGHLIGHT_COLOR;
31260
31327
  const { ctx } = renderingContext;
31261
31328
  ctx.save();
31262
31329
  if (!highlight.noBorder) {
@@ -31751,8 +31818,8 @@ css`
31751
31818
  -webkit-appearance: none;
31752
31819
  -moz-appearance: none;
31753
31820
  border-radius: 0;
31754
- width: ${14}px;
31755
- height: ${14}px;
31821
+ width: ${CHECKBOX_WIDTH}px;
31822
+ height: ${CHECKBOX_WIDTH}px;
31756
31823
  vertical-align: top;
31757
31824
  box-sizing: border-box;
31758
31825
  outline: none;
@@ -32694,7 +32761,7 @@ function dragAndDropBeyondTheViewport(env, cbMouseMove, cbMouseUp, only = false)
32694
32761
  let { scrollX, scrollY } = getters.getActiveSheetDOMScrollInfo();
32695
32762
  const { xSplit, ySplit } = getters.getPaneDivisions(sheetId);
32696
32763
  let canEdgeScroll = false;
32697
- let timeoutDelay = 140;
32764
+ let timeoutDelay = MAX_DELAY;
32698
32765
  const x = currentEv.clientX - position.left;
32699
32766
  colIndex = getters.getColIndex(x);
32700
32767
  if (only !== "vertical") {
@@ -32860,9 +32927,9 @@ css`
32860
32927
  }
32861
32928
  }
32862
32929
  .o-separator {
32863
- border-bottom: ${1}px solid ${SEPARATOR_COLOR};
32864
- margin-top: ${5}px;
32865
- margin-bottom: ${5}px;
32930
+ border-bottom: ${MENU_SEPARATOR_BORDER_WIDTH}px solid ${SEPARATOR_COLOR};
32931
+ margin-top: ${MENU_SEPARATOR_PADDING}px;
32932
+ margin-bottom: ${MENU_SEPARATOR_PADDING}px;
32866
32933
  }
32867
32934
 
32868
32935
  .o-custom-selector {
@@ -33004,7 +33071,7 @@ var ColorPicker = class extends Component {
33004
33071
  }
33005
33072
  get sliderStyle() {
33006
33073
  const hue = this.state.currentHslaColor?.h || 0;
33007
- return cssPropertiesToCss({ "margin-left": `${clip(Math.round(hue / 360 * INNER_GRADIENT_WIDTH), 1, INNER_GRADIENT_WIDTH) - 18 / 2}px` });
33074
+ return cssPropertiesToCss({ "margin-left": `${clip(Math.round(hue / 360 * INNER_GRADIENT_WIDTH), 1, INNER_GRADIENT_WIDTH) - ICON_EDGE_LENGTH / 2}px` });
33008
33075
  }
33009
33076
  get pointerStyle() {
33010
33077
  const { s, l } = this.state.currentHslaColor || {
@@ -34129,13 +34196,13 @@ var WaterfallChartDesignPanel = class extends Component {
34129
34196
  }];
34130
34197
  }
34131
34198
  get positiveValuesColor() {
34132
- return this.props.definition.positiveValuesColor || "#4EA7F2";
34199
+ return this.props.definition.positiveValuesColor || CHART_WATERFALL_POSITIVE_COLOR;
34133
34200
  }
34134
34201
  get negativeValuesColor() {
34135
- return this.props.definition.negativeValuesColor || "#EA6175";
34202
+ return this.props.definition.negativeValuesColor || CHART_WATERFALL_NEGATIVE_COLOR;
34136
34203
  }
34137
34204
  get subTotalValuesColor() {
34138
- return this.props.definition.subTotalValuesColor || "#AAAAAA";
34205
+ return this.props.definition.subTotalValuesColor || CHART_WATERFALL_SUBTOTAL_COLOR;
34139
34206
  }
34140
34207
  updateLegendPosition(ev) {
34141
34208
  this.props.updateChart(this.props.figureId, { legendPosition: ev.target.value });
@@ -35409,8 +35476,8 @@ css`
35409
35476
  height: 50px;
35410
35477
  width: 50px;
35411
35478
  .o-icon {
35412
- width: ${15}px;
35413
- height: ${15}px;
35479
+ width: ${CF_ICON_EDGE_LENGTH}px;
35480
+ height: ${CF_ICON_EDGE_LENGTH}px;
35414
35481
  }
35415
35482
  }
35416
35483
  .o-cf-preview-description {
@@ -35588,8 +35655,8 @@ css`
35588
35655
  background-color: ${BADGE_SELECTED_COLOR};
35589
35656
  }
35590
35657
  .o-icon {
35591
- width: ${15}px;
35592
- height: ${15}px;
35658
+ width: ${CF_ICON_EDGE_LENGTH}px;
35659
+ height: ${CF_ICON_EDGE_LENGTH}px;
35593
35660
  }
35594
35661
  }
35595
35662
  .o-cf-iconsets {
@@ -35863,7 +35930,7 @@ var ConditionalFormattingEditor = class extends Component {
35863
35930
  getPreviewGradient() {
35864
35931
  const rule = this.state.rules.colorScale;
35865
35932
  const minColor = colorNumberString(rule.minimum.color);
35866
- const midColor = colorNumberString(rule.midpoint?.color || 11982760);
35933
+ const midColor = colorNumberString(rule.midpoint?.color || DEFAULT_COLOR_SCALE_MIDPOINT_COLOR);
35867
35934
  const maxColor = colorNumberString(rule.maximum.color);
35868
35935
  const baseString = "background-image: linear-gradient(to right, ";
35869
35936
  return rule.midpoint === void 0 ? baseString + minColor + ", " + maxColor + ")" : baseString + minColor + ", " + midColor + ", " + maxColor + ")";
@@ -37862,7 +37929,7 @@ var PivotMeasureDisplayPanelStore = class extends SpreadsheetStore {
37862
37929
  return {
37863
37930
  type: measureDisplayType,
37864
37931
  fieldNameWithGranularity,
37865
- value: value ?? "(previous)"
37932
+ value: value ?? PREVIOUS_VALUE
37866
37933
  };
37867
37934
  }
37868
37935
  }
@@ -40057,7 +40124,7 @@ var PivotSpreadsheetSidePanel = class extends Component {
40057
40124
  return this.pivot.isInvalidRange;
40058
40125
  }
40059
40126
  get ranges() {
40060
- if (this.state.range) return [this.state.range];
40127
+ if (this.state.rangeHasChanged) return this.state.range ? [this.state.range] : [];
40061
40128
  if (this.definition.range) return [this.env.model.getters.getRangeString(this.definition.range, "forceSheetReference")];
40062
40129
  return [];
40063
40130
  }
@@ -40072,25 +40139,23 @@ var PivotSpreadsheetSidePanel = class extends Component {
40072
40139
  }
40073
40140
  onSelectionChanged(ranges) {
40074
40141
  this.state.rangeHasChanged = true;
40075
- if (ranges.length === 0) {
40076
- this.state.range = void 0;
40077
- return;
40078
- }
40079
- const sheetId = this.env.model.getters.getActiveSheetId();
40080
- const range = this.env.model.getters.getRangeFromSheetXC(sheetId, ranges[0]);
40081
- this.state.range = this.env.model.getters.getRangeString(range, "forceSheetReference", { useBoundedReference: true });
40142
+ this.state.range = ranges[0];
40082
40143
  }
40083
40144
  onSelectionConfirmed() {
40084
- if (this.state.range) {
40085
- const range = this.env.model.getters.getRangeFromSheetXC(this.env.model.getters.getActiveSheetId(), this.state.range);
40086
- if (range.invalidSheetName || range.invalidXc) return;
40087
- const dataSet = {
40088
- sheetId: range.sheetId,
40089
- zone: range.zone
40090
- };
40091
- this.store.update({ dataSet });
40092
- this.store.applyUpdate();
40145
+ if (!this.state.range) {
40146
+ const pivotRange = this.definition.range;
40147
+ this.state.range = pivotRange ? this.env.model.getters.getRangeString(pivotRange, "forceSheetReference") : void 0;
40148
+ return;
40093
40149
  }
40150
+ const range = this.env.model.getters.getRangeFromSheetXC(this.env.model.getters.getActiveSheetId(), this.state.range);
40151
+ if (range.invalidSheetName || range.invalidXc) return;
40152
+ this.state.range = this.env.model.getters.getRangeString(range, "forceSheetReference", { useBoundedReference: true });
40153
+ const dataSet = {
40154
+ sheetId: range.sheetId,
40155
+ zone: range.zone
40156
+ };
40157
+ this.store.update({ dataSet });
40158
+ this.store.applyUpdate();
40094
40159
  }
40095
40160
  flipAxis() {
40096
40161
  const { rows, columns } = this.definition;
@@ -40331,7 +40396,7 @@ const SEPARATORS = [
40331
40396
  },
40332
40397
  {
40333
40398
  name: _t("Line Break"),
40334
- value: "\n"
40399
+ value: NEWLINE
40335
40400
  }
40336
40401
  ];
40337
40402
  var SplitIntoColumnsPanel = class extends Component {
@@ -41579,7 +41644,7 @@ var FigureComponent = class extends Component {
41579
41644
  showMenu() {
41580
41645
  const { x, y, width } = this.menuButtonRect;
41581
41646
  const menuPosition = {
41582
- x: x >= 250 ? x - 250 : x + width,
41647
+ x: x >= MENU_WIDTH ? x - MENU_WIDTH : x + width,
41583
41648
  y
41584
41649
  };
41585
41650
  this.openContextMenu(menuPosition);
@@ -41717,8 +41782,8 @@ var ArrayFormulaHighlight = class extends SpreadsheetStore {
41717
41782
  css`
41718
41783
  .o-autofill {
41719
41784
  position: absolute;
41720
- height: ${8}px;
41721
- width: ${8}px;
41785
+ height: ${AUTOFILL_EDGE_LENGTH}px;
41786
+ width: ${AUTOFILL_EDGE_LENGTH}px;
41722
41787
  border: 1px solid white;
41723
41788
  box-sizing: border-box !important;
41724
41789
  background-color: #1a73e8;
@@ -41726,8 +41791,8 @@ css`
41726
41791
 
41727
41792
  .o-autofill-handler {
41728
41793
  position: absolute;
41729
- height: ${8}px;
41730
- width: ${8}px;
41794
+ height: ${AUTOFILL_EDGE_LENGTH}px;
41795
+ width: ${AUTOFILL_EDGE_LENGTH}px;
41731
41796
  &:hover {
41732
41797
  cursor: crosshair;
41733
41798
  }
@@ -42275,8 +42340,8 @@ var GridComposer = class extends Component {
42275
42340
  //#region src/components/grid_cell_icon/grid_cell_icon.ts
42276
42341
  css`
42277
42342
  .o-grid-cell-icon {
42278
- width: ${17}px;
42279
- height: ${17}px;
42343
+ width: ${GRID_ICON_EDGE_LENGTH}px;
42344
+ height: ${GRID_ICON_EDGE_LENGTH}px;
42280
42345
  }
42281
42346
  `;
42282
42347
  var GridCellIcon = class extends Component {
@@ -42308,11 +42373,11 @@ var GridCellIcon = class extends Component {
42308
42373
  const end = rect.y + rect.height;
42309
42374
  const cell = this.env.model.getters.getCell(cellPosition);
42310
42375
  switch (this.props.verticalAlign || cell?.style?.verticalAlign || DEFAULT_VERTICAL_ALIGN) {
42311
- case "bottom": return end - 2 - 17;
42312
- case "top": return start + 2;
42376
+ case "bottom": return end - GRID_ICON_MARGIN - GRID_ICON_EDGE_LENGTH;
42377
+ case "top": return start + GRID_ICON_MARGIN;
42313
42378
  default:
42314
- const centeringOffset = Math.floor((end - start - 17) / 2);
42315
- return end - 17 - centeringOffset;
42379
+ const centeringOffset = Math.floor((end - start - GRID_ICON_EDGE_LENGTH) / 2);
42380
+ return end - GRID_ICON_EDGE_LENGTH - centeringOffset;
42316
42381
  }
42317
42382
  }
42318
42383
  getIconHorizontalPosition(rect, cellPosition) {
@@ -42321,11 +42386,11 @@ var GridCellIcon = class extends Component {
42321
42386
  const cell = this.env.model.getters.getCell(cellPosition);
42322
42387
  const evaluatedCell = this.env.model.getters.getEvaluatedCell(cellPosition);
42323
42388
  switch (this.props.horizontalAlign || cell?.style?.align || evaluatedCell.defaultAlign) {
42324
- case "right": return end - 2 - 17;
42325
- case "left": return start + 2;
42389
+ case "right": return end - GRID_ICON_MARGIN - GRID_ICON_EDGE_LENGTH;
42390
+ case "left": return start + GRID_ICON_MARGIN;
42326
42391
  default:
42327
- const centeringOffset = Math.floor((end - start - 17) / 2);
42328
- return end - 17 - centeringOffset;
42392
+ const centeringOffset = Math.floor((end - start - GRID_ICON_EDGE_LENGTH) / 2);
42393
+ return end - GRID_ICON_EDGE_LENGTH - centeringOffset;
42329
42394
  }
42330
42395
  }
42331
42396
  isPositionVisible(position) {
@@ -42340,7 +42405,7 @@ css`
42340
42405
  .o-dv-checkbox {
42341
42406
  box-sizing: border-box !important;
42342
42407
  accent-color: #808080;
42343
- margin: ${(17 - 14) / 2}px;
42408
+ margin: ${(GRID_ICON_EDGE_LENGTH - CHECKBOX_WIDTH) / 2}px;
42344
42409
  /** required to prevent the checkbox position to be sensible to the font-size (affects Firefox) */
42345
42410
  position: absolute;
42346
42411
  }
@@ -42375,8 +42440,8 @@ css`
42375
42440
  .o-dv-list-icon {
42376
42441
  color: ${TEXT_BODY_MUTED};
42377
42442
  border-radius: 1px;
42378
- height: ${17}px;
42379
- width: ${17}px;
42443
+ height: ${GRID_ICON_EDGE_LENGTH}px;
42444
+ width: ${GRID_ICON_EDGE_LENGTH}px;
42380
42445
 
42381
42446
  &:hover {
42382
42447
  color: #ffffff;
@@ -42691,19 +42756,19 @@ function getAxis(fig, axisType) {
42691
42756
  position = fig.y;
42692
42757
  break;
42693
42758
  case "bottom":
42694
- position = fig.y + fig.height - 1;
42759
+ position = fig.y + fig.height - FIGURE_BORDER_WIDTH;
42695
42760
  break;
42696
42761
  case "vCenter":
42697
- position = fig.y + Math.floor(fig.height / 2) - 1;
42762
+ position = fig.y + Math.floor(fig.height / 2) - FIGURE_BORDER_WIDTH;
42698
42763
  break;
42699
42764
  case "left":
42700
42765
  position = fig.x;
42701
42766
  break;
42702
42767
  case "right":
42703
- position = fig.x + fig.width - 1;
42768
+ position = fig.x + fig.width - FIGURE_BORDER_WIDTH;
42704
42769
  break;
42705
42770
  case "hCenter":
42706
- position = fig.x + Math.floor(fig.width / 2) - 1;
42771
+ position = fig.x + Math.floor(fig.width / 2) - FIGURE_BORDER_WIDTH;
42707
42772
  break;
42708
42773
  }
42709
42774
  return {
@@ -42960,7 +43025,7 @@ var FiguresContainer = class extends Component {
42960
43025
  y
42961
43026
  };
42962
43027
  const keepRatio = figureRegistry.get(figure.tag).keepRatio || false;
42963
- const minFigSize = figureRegistry.get(figure.tag).minFigSize || 80;
43028
+ const minFigSize = figureRegistry.get(figure.tag).minFigSize || MIN_FIG_SIZE;
42964
43029
  const onMouseMove = (ev) => {
42965
43030
  const draggedFigure = dragFigureForResize(initialFig, dirX, dirY, {
42966
43031
  x: ev.clientX,
@@ -43051,8 +43116,8 @@ css`
43051
43116
  display: flex;
43052
43117
  align-items: center;
43053
43118
  justify-content: center;
43054
- width: ${17}px;
43055
- height: ${17}px;
43119
+ width: ${GRID_ICON_EDGE_LENGTH}px;
43120
+ height: ${GRID_ICON_EDGE_LENGTH}px;
43056
43121
 
43057
43122
  &:hover {
43058
43123
  background: ${FILTERS_COLOR};
@@ -43679,9 +43744,9 @@ css`
43679
43744
  .o-col-resizer {
43680
43745
  position: absolute;
43681
43746
  top: 0;
43682
- left: ${48}px;
43683
- right: ${15}px;
43684
- height: ${26}px;
43747
+ left: ${HEADER_WIDTH}px;
43748
+ right: ${SCROLLBAR_WIDTH}px;
43749
+ height: ${HEADER_HEIGHT}px;
43685
43750
  &.o-dragging {
43686
43751
  cursor: grabbing;
43687
43752
  }
@@ -43689,14 +43754,14 @@ css`
43689
43754
  cursor: grab;
43690
43755
  }
43691
43756
  .dragging-col-line {
43692
- top: ${26}px;
43757
+ top: ${HEADER_HEIGHT}px;
43693
43758
  position: absolute;
43694
43759
  width: 2px;
43695
43760
  height: 10000px;
43696
43761
  background-color: black;
43697
43762
  }
43698
43763
  .dragging-col-shadow {
43699
- top: ${26}px;
43764
+ top: ${HEADER_HEIGHT}px;
43700
43765
  position: absolute;
43701
43766
  height: 10000px;
43702
43767
  background-color: black;
@@ -43704,13 +43769,13 @@ css`
43704
43769
  }
43705
43770
  .o-handle {
43706
43771
  position: absolute;
43707
- height: ${26}px;
43772
+ height: ${HEADER_HEIGHT}px;
43708
43773
  width: 4px;
43709
43774
  cursor: e-resize;
43710
43775
  background-color: ${SELECTION_BORDER_COLOR};
43711
43776
  }
43712
43777
  .dragging-resizer {
43713
- top: ${26}px;
43778
+ top: ${HEADER_HEIGHT}px;
43714
43779
  position: absolute;
43715
43780
  margin-left: 2px;
43716
43781
  width: 1px;
@@ -43735,7 +43800,7 @@ var ColResizer = class extends AbstractResizer {
43735
43800
  this.colResizerRef = useRef("colResizer");
43736
43801
  this.PADDING = 15;
43737
43802
  this.MAX_SIZE_MARGIN = 90;
43738
- this.MIN_ELEMENT_SIZE = 5;
43803
+ this.MIN_ELEMENT_SIZE = MIN_COL_WIDTH;
43739
43804
  }
43740
43805
  get sheetId() {
43741
43806
  return this.env.model.getters.getActiveSheetId();
@@ -43834,10 +43899,10 @@ var ColResizer = class extends AbstractResizer {
43834
43899
  css`
43835
43900
  .o-row-resizer {
43836
43901
  position: absolute;
43837
- top: ${26}px;
43902
+ top: ${HEADER_HEIGHT}px;
43838
43903
  left: 0;
43839
- bottom: ${15}px;
43840
- width: ${48}px;
43904
+ bottom: ${SCROLLBAR_WIDTH}px;
43905
+ width: ${HEADER_WIDTH}px;
43841
43906
  &.o-dragging {
43842
43907
  cursor: grabbing;
43843
43908
  }
@@ -43845,14 +43910,14 @@ css`
43845
43910
  cursor: grab;
43846
43911
  }
43847
43912
  .dragging-row-line {
43848
- left: ${48}px;
43913
+ left: ${HEADER_WIDTH}px;
43849
43914
  position: absolute;
43850
43915
  width: 10000px;
43851
43916
  height: 2px;
43852
43917
  background-color: black;
43853
43918
  }
43854
43919
  .dragging-row-shadow {
43855
- left: ${48}px;
43920
+ left: ${HEADER_WIDTH}px;
43856
43921
  position: absolute;
43857
43922
  width: 10000px;
43858
43923
  background-color: black;
@@ -43861,12 +43926,12 @@ css`
43861
43926
  .o-handle {
43862
43927
  position: absolute;
43863
43928
  height: 4px;
43864
- width: ${48}px;
43929
+ width: ${HEADER_WIDTH}px;
43865
43930
  cursor: n-resize;
43866
43931
  background-color: ${SELECTION_BORDER_COLOR};
43867
43932
  }
43868
43933
  .dragging-resizer {
43869
- left: ${48}px;
43934
+ left: ${HEADER_WIDTH}px;
43870
43935
  position: absolute;
43871
43936
  margin-top: 2px;
43872
43937
  width: 10000px;
@@ -43890,7 +43955,7 @@ var RowResizer = class extends AbstractResizer {
43890
43955
  this.rowResizerRef = useRef("rowResizer");
43891
43956
  this.PADDING = 5;
43892
43957
  this.MAX_SIZE_MARGIN = 60;
43893
- this.MIN_ELEMENT_SIZE = 10;
43958
+ this.MIN_ELEMENT_SIZE = MIN_ROW_HEIGHT;
43894
43959
  }
43895
43960
  rowResizerRef;
43896
43961
  get sheetId() {
@@ -43997,8 +44062,8 @@ css`
43997
44062
  top: 0;
43998
44063
  left: 0;
43999
44064
  right: 0;
44000
- width: ${48}px;
44001
- height: ${26}px;
44065
+ width: ${HEADER_WIDTH}px;
44066
+ height: ${HEADER_HEIGHT}px;
44002
44067
  }
44003
44068
  }
44004
44069
  `;
@@ -44033,7 +44098,7 @@ var GridRenderer = class {
44033
44098
  */
44034
44099
  getHeaderOffset(dimension, start, index) {
44035
44100
  let size = this.getters.getColRowOffsetInViewport(dimension, start, index);
44036
- if (!this.getters.isDashboard()) size += dimension === "ROW" ? 26 : 48;
44101
+ if (!this.getters.isDashboard()) size += dimension === "ROW" ? HEADER_HEIGHT : HEADER_WIDTH;
44037
44102
  return size;
44038
44103
  }
44039
44104
  drawLayer(renderingContext, layer) {
@@ -44215,8 +44280,8 @@ var GridRenderer = class {
44215
44280
  }
44216
44281
  ctx.fillStyle = style.textColor || "#000";
44217
44282
  let x = box.x;
44218
- if (align === "left") x += 4 + (box.image ? box.image.size + 4 : 0);
44219
- else if (align === "right") x += box.width - 4 - (box.hasIcon ? 17 + 2 : 0);
44283
+ if (align === "left") x += MIN_CELL_TEXT_MARGIN + (box.image ? box.image.size + MIN_CF_ICON_MARGIN : 0);
44284
+ else if (align === "right") x += box.width - MIN_CELL_TEXT_MARGIN - (box.hasIcon ? GRID_ICON_EDGE_LENGTH + GRID_ICON_MARGIN : 0);
44220
44285
  else x += box.width / 2;
44221
44286
  ctx.textAlign = align;
44222
44287
  if (box.clipRect) {
@@ -44234,7 +44299,7 @@ var GridRenderer = class {
44234
44299
  x: Math.round(x),
44235
44300
  y: Math.round(y)
44236
44301
  }, style.underline, style.strikethrough);
44237
- y += 4 + textLineHeight;
44302
+ y += MIN_CELL_TEXT_MARGIN + textLineHeight;
44238
44303
  }
44239
44304
  if (box.clipRect) ctx.restore();
44240
44305
  }
@@ -44252,7 +44317,7 @@ var GridRenderer = class {
44252
44317
  }
44253
44318
  const iconSize = box.image.size;
44254
44319
  const y = this.computeTextYCoordinate(box, iconSize);
44255
- ctx.drawImage(icon, box.x + 4, y, iconSize, iconSize);
44320
+ ctx.drawImage(icon, box.x + MIN_CF_ICON_MARGIN, y, iconSize, iconSize);
44256
44321
  if (box.image.clipIcon) ctx.restore();
44257
44322
  }
44258
44323
  }
@@ -44264,13 +44329,13 @@ var GridRenderer = class {
44264
44329
  computeTextYCoordinate(box, textLineHeight, numberOfLines = 1) {
44265
44330
  const y = box.y + 1;
44266
44331
  const textHeight = computeTextLinesHeight(textLineHeight, numberOfLines);
44267
- const hasEnoughSpaces = box.height > textHeight + 4 * 2;
44332
+ const hasEnoughSpaces = box.height > textHeight + MIN_CELL_TEXT_MARGIN * 2;
44268
44333
  const verticalAlign = box.verticalAlign || DEFAULT_VERTICAL_ALIGN;
44269
44334
  if (hasEnoughSpaces) {
44270
44335
  if (verticalAlign === "middle") return y + (box.height - textHeight) / 2;
44271
- if (verticalAlign === "bottom") return y + box.height - textHeight - 4;
44336
+ if (verticalAlign === "bottom") return y + box.height - textHeight - MIN_CELL_TEXT_MARGIN;
44272
44337
  }
44273
- return y + 4;
44338
+ return y + MIN_CELL_TEXT_MARGIN;
44274
44339
  }
44275
44340
  drawHeaders(renderingContext) {
44276
44341
  const { ctx, thinLineWidth } = renderingContext;
@@ -44287,7 +44352,7 @@ var GridRenderer = class {
44287
44352
  const numberOfRows = this.getters.getNumberRows(sheetId);
44288
44353
  const activeCols = this.getters.getActiveCols();
44289
44354
  const activeRows = this.getters.getActiveRows();
44290
- ctx.font = `400 ${11}px ${DEFAULT_FONT}`;
44355
+ ctx.font = `400 ${HEADER_FONT_SIZE}px ${DEFAULT_FONT}`;
44291
44356
  ctx.textAlign = "center";
44292
44357
  ctx.textBaseline = "middle";
44293
44358
  ctx.lineWidth = thinLineWidth;
@@ -44305,7 +44370,7 @@ var GridRenderer = class {
44305
44370
  if (isColActive) ctx.fillStyle = BACKGROUND_HEADER_ACTIVE_COLOR;
44306
44371
  else if (isColSelected) ctx.fillStyle = BACKGROUND_HEADER_SELECTED_COLOR;
44307
44372
  else ctx.fillStyle = BACKGROUND_HEADER_COLOR;
44308
- ctx.fillRect(x, 0, width, 26);
44373
+ ctx.fillRect(x, 0, width, HEADER_HEIGHT);
44309
44374
  }
44310
44375
  for (const row of visibleRows) {
44311
44376
  const rowZone = {
@@ -44320,13 +44385,13 @@ var GridRenderer = class {
44320
44385
  if (isRowActive) ctx.fillStyle = BACKGROUND_HEADER_ACTIVE_COLOR;
44321
44386
  else if (isRowSelected) ctx.fillStyle = BACKGROUND_HEADER_SELECTED_COLOR;
44322
44387
  else ctx.fillStyle = BACKGROUND_HEADER_COLOR;
44323
- ctx.fillRect(0, y, 48, height);
44388
+ ctx.fillRect(0, y, HEADER_WIDTH, height);
44324
44389
  }
44325
44390
  ctx.beginPath();
44326
- ctx.moveTo(48, 0);
44327
- ctx.lineTo(48, height);
44328
- ctx.moveTo(0, 26);
44329
- ctx.lineTo(width, 26);
44391
+ ctx.moveTo(HEADER_WIDTH, 0);
44392
+ ctx.lineTo(HEADER_WIDTH, height);
44393
+ ctx.moveTo(0, HEADER_HEIGHT);
44394
+ ctx.lineTo(width, HEADER_HEIGHT);
44330
44395
  ctx.strokeStyle = HEADER_BORDER_COLOR;
44331
44396
  ctx.stroke();
44332
44397
  ctx.beginPath();
@@ -44335,25 +44400,25 @@ var GridRenderer = class {
44335
44400
  const colName = numberToLetters(col);
44336
44401
  ctx.fillStyle = activeCols.has(col) ? "#fff" : TEXT_HEADER_COLOR;
44337
44402
  const colStart = this.getHeaderOffset("COL", left, col);
44338
- ctx.fillText(colName, colStart + colSize / 2, 26 / 2);
44403
+ ctx.fillText(colName, colStart + colSize / 2, HEADER_HEIGHT / 2);
44339
44404
  ctx.moveTo(colStart + colSize, 0);
44340
- ctx.lineTo(colStart + colSize, 26);
44405
+ ctx.lineTo(colStart + colSize, HEADER_HEIGHT);
44341
44406
  }
44342
44407
  for (const row of visibleRows) {
44343
44408
  const rowSize = this.getters.getRowSize(sheetId, row);
44344
44409
  ctx.fillStyle = activeRows.has(row) ? "#fff" : TEXT_HEADER_COLOR;
44345
44410
  const rowStart = this.getHeaderOffset("ROW", top, row);
44346
- ctx.fillText(String(row + 1), 48 / 2, rowStart + rowSize / 2);
44411
+ ctx.fillText(String(row + 1), HEADER_WIDTH / 2, rowStart + rowSize / 2);
44347
44412
  ctx.moveTo(0, rowStart + rowSize);
44348
- ctx.lineTo(48, rowStart + rowSize);
44413
+ ctx.lineTo(HEADER_WIDTH, rowStart + rowSize);
44349
44414
  }
44350
44415
  ctx.stroke();
44351
44416
  }
44352
44417
  drawFrozenPanesHeaders(renderingContext) {
44353
44418
  const { ctx, thinLineWidth } = renderingContext;
44354
44419
  const { x: offsetCorrectionX, y: offsetCorrectionY } = this.getters.getMainViewportCoordinates();
44355
- const widthCorrection = this.getters.isDashboard() ? 0 : 48;
44356
- const heightCorrection = this.getters.isDashboard() ? 0 : 26;
44420
+ const widthCorrection = this.getters.isDashboard() ? 0 : HEADER_WIDTH;
44421
+ const heightCorrection = this.getters.isDashboard() ? 0 : HEADER_HEIGHT;
44357
44422
  ctx.lineWidth = 6 * thinLineWidth;
44358
44423
  ctx.strokeStyle = FROZEN_PANE_HEADER_BORDER_COLOR;
44359
44424
  ctx.beginPath();
@@ -44381,8 +44446,8 @@ var GridRenderer = class {
44381
44446
  bottom: visibleRows[visibleRows.length - 1]
44382
44447
  };
44383
44448
  const rect = this.getters.getVisibleRect(viewport);
44384
- const widthCorrection = this.getters.isDashboard() ? 0 : 48;
44385
- const heightCorrection = this.getters.isDashboard() ? 0 : 26;
44449
+ const widthCorrection = this.getters.isDashboard() ? 0 : HEADER_WIDTH;
44450
+ const heightCorrection = this.getters.isDashboard() ? 0 : HEADER_HEIGHT;
44386
44451
  ctx.lineWidth = 6 * thinLineWidth;
44387
44452
  ctx.strokeStyle = FROZEN_PANE_BORDER_COLOR;
44388
44453
  ctx.beginPath();
@@ -44466,7 +44531,7 @@ var GridRenderer = class {
44466
44531
  /** Icon */
44467
44532
  const iconSrc = this.getters.getCellIconSrc(position);
44468
44533
  const fontSizePX = computeTextFontSizeInPixels(box.style);
44469
- const iconBoxWidth = iconSrc ? 4 + fontSizePX : 0;
44534
+ const iconBoxWidth = iconSrc ? MIN_CF_ICON_MARGIN + fontSizePX : 0;
44470
44535
  if (iconSrc) {
44471
44536
  const imageHtmlElement = loadIconImage(iconSrc);
44472
44537
  box.image = {
@@ -44484,19 +44549,19 @@ var GridRenderer = class {
44484
44549
  if (cell.type === "empty" || this.getters.isCellValidCheckbox(position)) return box;
44485
44550
  /** Filter Header or data validation icon */
44486
44551
  box.hasIcon = this.getters.doesCellHaveGridIcon(position);
44487
- const headerIconWidth = box.hasIcon ? 17 + 2 : 0;
44552
+ const headerIconWidth = box.hasIcon ? GRID_ICON_EDGE_LENGTH + GRID_ICON_MARGIN : 0;
44488
44553
  /** Content */
44489
44554
  const style = this.getters.getCellComputedStyle(position);
44490
44555
  const wrapping = style.wrapping || "overflow";
44491
44556
  const wrapText = wrapping === "wrap" && !showFormula;
44492
- const maxWidth = width - 2 * 4;
44557
+ const maxWidth = width - 2 * MIN_CELL_TEXT_MARGIN;
44493
44558
  const formatWidth = style.align ? 0 : maxWidth;
44494
44559
  const multiLineText = this.getters.getCellMultiLineText(position, {
44495
44560
  maxWidth,
44496
44561
  formatWidth,
44497
44562
  wrapText
44498
44563
  });
44499
- const textWidth = Math.max(...multiLineText.map((line) => this.getters.getTextWidth(line, style) + 4));
44564
+ const textWidth = Math.max(...multiLineText.map((line) => this.getters.getTextWidth(line, style) + MIN_CELL_TEXT_MARGIN));
44500
44565
  const contentWidth = iconBoxWidth + textWidth + headerIconWidth;
44501
44566
  const align = this.computeCellAlignment(position, contentWidth > width);
44502
44567
  box.content = {
@@ -44708,7 +44773,7 @@ function useTouchScroll(ref, updateScroll, canMoveUp) {
44708
44773
  resetTimeout = setTimeout(() => {
44709
44774
  velocityX = 0;
44710
44775
  velocityY = 0;
44711
- }, 100);
44776
+ }, resetTimeoutDuration);
44712
44777
  updateScroll(deltaX * horizontalScrollFactor, deltaY * verticalScrollFactor);
44713
44778
  }
44714
44779
  function onTouchEnd(ev) {
@@ -44739,7 +44804,7 @@ function useTouchScroll(ref, updateScroll, canMoveUp) {
44739
44804
  //#region src/components/helpers/wheel_hook.ts
44740
44805
  function useWheelHandler(handler) {
44741
44806
  function normalize(val, deltaMode) {
44742
- return val * (deltaMode === 0 ? 1 : 23);
44807
+ return val * (deltaMode === 0 ? 1 : DEFAULT_CELL_HEIGHT);
44743
44808
  }
44744
44809
  const onMouseWheel = (ev) => {
44745
44810
  handler(normalize(ev.shiftKey && !isMacOS() ? ev.deltaY : ev.deltaX, ev.deltaMode), normalize(ev.shiftKey && !isMacOS() ? ev.deltaX : ev.deltaY, ev.deltaMode));
@@ -44855,8 +44920,8 @@ var Corner = class extends Component {
44855
44920
  const leftValue = this.isLeft ? rect.x : rect.x + rect.width;
44856
44921
  const topValue = this.isTop ? rect.y : rect.y + rect.height;
44857
44922
  return cssPropertiesToCss({
44858
- left: `${leftValue - 8 / 2}px`,
44859
- top: `${topValue - 8 / 2}px`,
44923
+ left: `${leftValue - AUTOFILL_EDGE_LENGTH / 2}px`,
44924
+ top: `${topValue - AUTOFILL_EDGE_LENGTH / 2}px`,
44860
44925
  "background-color": this.props.color
44861
44926
  });
44862
44927
  }
@@ -44996,8 +45061,8 @@ css`
44996
45061
  &.corner {
44997
45062
  right: 0px;
44998
45063
  bottom: 0px;
44999
- height: ${15}px;
45000
- width: ${15}px;
45064
+ height: ${SCROLLBAR_WIDTH}px;
45065
+ width: ${SCROLLBAR_WIDTH}px;
45001
45066
  border-top: 1px solid #e2e3e3;
45002
45067
  border-left: 1px solid #e2e3e3;
45003
45068
  }
@@ -45090,7 +45155,7 @@ var HorizontalScrollBar = class extends Component {
45090
45155
  return {
45091
45156
  left: `${this.props.leftOffset + x}px`,
45092
45157
  bottom: "0px",
45093
- height: `${15}px`,
45158
+ height: `${SCROLLBAR_WIDTH}px`,
45094
45159
  right: `0px`
45095
45160
  };
45096
45161
  }
@@ -45136,7 +45201,7 @@ var VerticalScrollBar = class extends Component {
45136
45201
  return {
45137
45202
  top: `${this.props.topOffset + y}px`,
45138
45203
  right: "0px",
45139
- width: `${15}px`,
45204
+ width: `${SCROLLBAR_WIDTH}px`,
45140
45205
  bottom: `0px`
45141
45206
  };
45142
45207
  }
@@ -45163,7 +45228,7 @@ var SidePanelStore = class extends SpreadsheetStore {
45163
45228
  ];
45164
45229
  currentPanelProps = {};
45165
45230
  componentTag = "";
45166
- panelSize = 350;
45231
+ panelSize = DEFAULT_SIDE_PANEL_SIZE;
45167
45232
  get isOpen() {
45168
45233
  if (!this.componentTag) return false;
45169
45234
  return this.computeState(this.componentTag, this.currentPanelProps).isOpen;
@@ -45194,12 +45259,12 @@ var SidePanelStore = class extends SpreadsheetStore {
45194
45259
  this.componentTag = "";
45195
45260
  }
45196
45261
  changePanelSize(size, spreadsheetElWidth) {
45197
- if (size < 350) this.panelSize = 350;
45198
- else if (size > spreadsheetElWidth - 150) this.panelSize = Math.max(spreadsheetElWidth - 150, 350);
45262
+ if (size < DEFAULT_SIDE_PANEL_SIZE) this.panelSize = DEFAULT_SIDE_PANEL_SIZE;
45263
+ else if (size > spreadsheetElWidth - MIN_SHEET_VIEW_WIDTH) this.panelSize = Math.max(spreadsheetElWidth - MIN_SHEET_VIEW_WIDTH, DEFAULT_SIDE_PANEL_SIZE);
45199
45264
  else this.panelSize = size;
45200
45265
  }
45201
45266
  resetPanelSize() {
45202
- this.panelSize = 350;
45267
+ this.panelSize = DEFAULT_SIDE_PANEL_SIZE;
45203
45268
  }
45204
45269
  computeState(componentTag, panelProps) {
45205
45270
  const customComputeState = sidePanelRegistry.get(componentTag).computeState;
@@ -45315,8 +45380,8 @@ var Grid = class extends Component {
45315
45380
  HorizontalScrollBar,
45316
45381
  TableResizer
45317
45382
  };
45318
- HEADER_HEIGHT = 26;
45319
- HEADER_WIDTH = 48;
45383
+ HEADER_HEIGHT = HEADER_HEIGHT;
45384
+ HEADER_WIDTH = HEADER_WIDTH;
45320
45385
  menuState;
45321
45386
  gridRef;
45322
45387
  highlightStore;
@@ -45374,10 +45439,10 @@ var Grid = class extends Component {
45374
45439
  }
45375
45440
  get gridOverlayDimensions() {
45376
45441
  return cssPropertiesToCss({
45377
- top: `${26}px`,
45378
- left: `${48}px`,
45379
- height: `calc(100% - ${26 + 15}px)`,
45380
- width: `calc(100% - ${48 + 15}px)`
45442
+ top: `${HEADER_HEIGHT}px`,
45443
+ left: `${HEADER_WIDTH}px`,
45444
+ height: `calc(100% - ${HEADER_HEIGHT + SCROLLBAR_WIDTH}px)`,
45445
+ width: `calc(100% - ${HEADER_WIDTH + SCROLLBAR_WIDTH}px)`
45381
45446
  });
45382
45447
  }
45383
45448
  onClosePopover() {
@@ -45550,8 +45615,8 @@ var Grid = class extends Component {
45550
45615
  const zone = this.env.model.getters.getSelectedZone();
45551
45616
  const rect = this.env.model.getters.getVisibleRect(zone);
45552
45617
  return {
45553
- left: rect.x + rect.width - 8 / 2,
45554
- top: rect.y + rect.height - 8 / 2
45618
+ left: rect.x + rect.width - AUTOFILL_EDGE_LENGTH / 2,
45619
+ top: rect.y + rect.height - AUTOFILL_EDGE_LENGTH / 2
45555
45620
  };
45556
45621
  }
45557
45622
  get isAutofillVisible() {
@@ -45568,8 +45633,8 @@ var Grid = class extends Component {
45568
45633
  this.env.model.dispatch("RESIZE_SHEETVIEW", {
45569
45634
  width,
45570
45635
  height,
45571
- gridOffsetX: 48,
45572
- gridOffsetY: 26
45636
+ gridOffsetX: HEADER_WIDTH,
45637
+ gridOffsetY: HEADER_HEIGHT
45573
45638
  });
45574
45639
  }
45575
45640
  moveCanvas(deltaX, deltaY) {
@@ -47305,8 +47370,8 @@ var ChartPlugin = class extends CorePlugin {
47305
47370
  case "DUPLICATE_SHEET": {
47306
47371
  const sheetFiguresFrom = this.getters.getFigures(cmd.sheetId);
47307
47372
  for (const fig of sheetFiguresFrom) if (fig.tag === "chart") {
47308
- const figureIdBase = fig.id.split("??").pop();
47309
- const duplicatedFigureId = `${cmd.sheetIdTo}${"??"}${figureIdBase}`;
47373
+ const figureIdBase = fig.id.split(FIGURE_ID_SPLITTER).pop();
47374
+ const duplicatedFigureId = `${cmd.sheetIdTo}${FIGURE_ID_SPLITTER}${figureIdBase}`;
47310
47375
  const chart = this.charts[fig.id]?.copyForSheetId(cmd.sheetIdTo);
47311
47376
  if (chart) this.dispatch("CREATE_CHART", {
47312
47377
  id: duplicatedFigureId,
@@ -47383,8 +47448,8 @@ var ChartPlugin = class extends CorePlugin {
47383
47448
  x: 0,
47384
47449
  y: 0
47385
47450
  }, size = {
47386
- width: 536,
47387
- height: 335
47451
+ width: DEFAULT_FIGURE_WIDTH,
47452
+ height: DEFAULT_FIGURE_HEIGHT
47388
47453
  }) {
47389
47454
  if (this.getters.getFigure(sheetId, id)) return;
47390
47455
  const figure = {
@@ -48026,7 +48091,7 @@ var FigurePlugin = class extends CorePlugin {
48026
48091
  onRowDeletion(sheetId) {
48027
48092
  const numHeader = this.getters.getNumberRows(sheetId);
48028
48093
  let gridHeight = 0;
48029
- for (let i = 0; i < numHeader; i++) gridHeight += this.getters.getUserRowSize(sheetId, i) || 23;
48094
+ for (let i = 0; i < numHeader; i++) gridHeight += this.getters.getUserRowSize(sheetId, i) || DEFAULT_CELL_HEIGHT;
48030
48095
  const figures = this.getters.getFigures(sheetId);
48031
48096
  for (const figure of figures) {
48032
48097
  const newY = Math.min(figure.y, gridHeight - figure.height);
@@ -48157,7 +48222,7 @@ var HeaderSizePlugin = class extends CorePlugin {
48157
48222
  }
48158
48223
  }
48159
48224
  getColSize(sheetId, index) {
48160
- return Math.round(this.sizes[sheetId]?.["COL"][index] || 96);
48225
+ return Math.round(this.sizes[sheetId]?.["COL"][index] || DEFAULT_CELL_WIDTH);
48161
48226
  }
48162
48227
  getUserRowSize(sheetId, index) {
48163
48228
  const rowSize = this.sizes[sheetId]?.["ROW"][index];
@@ -48190,7 +48255,7 @@ var HeaderSizePlugin = class extends CorePlugin {
48190
48255
  if (sheet.rows === void 0) sheet.rows = {};
48191
48256
  for (const row of range(0, this.getters.getNumberRows(sheet.id))) if (exportDefaults || this.sizes[sheet.id]["ROW"][row]) sheet.rows[row] = {
48192
48257
  ...sheet.rows[row],
48193
- size: this.getUserRowSize(sheet.id, row) ?? 23
48258
+ size: this.getUserRowSize(sheet.id, row) ?? DEFAULT_CELL_HEIGHT
48194
48259
  };
48195
48260
  if (sheet.cols === void 0) sheet.cols = {};
48196
48261
  for (const col of range(0, this.getters.getNumberCols(sheet.id))) if (exportDefaults || this.sizes[sheet.id]["COL"][col]) sheet.cols[col] = {
@@ -48371,8 +48436,8 @@ var ImagePlugin = class extends CorePlugin {
48371
48436
  case "DUPLICATE_SHEET": {
48372
48437
  const sheetFiguresFrom = this.getters.getFigures(cmd.sheetId);
48373
48438
  for (const fig of sheetFiguresFrom) if (fig.tag === "image") {
48374
- const figureIdBase = fig.id.split("??").pop();
48375
- const duplicatedFigureId = `${cmd.sheetIdTo}${"??"}${figureIdBase}`;
48439
+ const figureIdBase = fig.id.split(FIGURE_ID_SPLITTER).pop();
48440
+ const duplicatedFigureId = `${cmd.sheetIdTo}${FIGURE_ID_SPLITTER}${figureIdBase}`;
48376
48441
  const image = this.getImage(fig.id);
48377
48442
  if (image) {
48378
48443
  const size = {
@@ -52679,7 +52744,7 @@ var EvaluationChartPlugin = class extends UIPlugin {
52679
52744
  col,
52680
52745
  row
52681
52746
  });
52682
- const background = style.fillColor || "#FFFFFF";
52747
+ const background = style.fillColor || BACKGROUND_CHART_COLOR;
52683
52748
  return {
52684
52749
  background,
52685
52750
  fontColor: style.textColor || chartFontColor(background)
@@ -53376,7 +53441,7 @@ var HeaderSizeUIPlugin = class extends UIPlugin {
53376
53441
  }
53377
53442
  }
53378
53443
  getRowSize(sheetId, row) {
53379
- return Math.round(this.getters.getUserRowSize(sheetId, row) ?? this.tallestCellInRow[sheetId][row]?.size ?? 23);
53444
+ return Math.round(this.getters.getUserRowSize(sheetId, row) ?? this.tallestCellInRow[sheetId][row]?.size ?? DEFAULT_CELL_HEIGHT);
53380
53445
  }
53381
53446
  getHeaderSize(sheetId, dimension, index) {
53382
53447
  if (this.getters.isHeaderHidden(sheetId, dimension, index)) return 0;
@@ -53393,8 +53458,8 @@ var HeaderSizeUIPlugin = class extends UIPlugin {
53393
53458
  col,
53394
53459
  row
53395
53460
  });
53396
- if (updatedCellHeight <= 23) return;
53397
- if (!tallestCellInRow && updatedCellHeight > 23 || tallestCellInRow && updatedCellHeight > tallestCellInRow.size) {
53461
+ if (updatedCellHeight <= DEFAULT_CELL_HEIGHT) return;
53462
+ if (!tallestCellInRow && updatedCellHeight > DEFAULT_CELL_HEIGHT || tallestCellInRow && updatedCellHeight > tallestCellInRow.size) {
53398
53463
  const newTallestCell = {
53399
53464
  cell: {
53400
53465
  sheetId,
@@ -53419,7 +53484,7 @@ var HeaderSizeUIPlugin = class extends UIPlugin {
53419
53484
  * merge, or the height of the cell computed based on its style/content.
53420
53485
  */
53421
53486
  getCellHeight(position) {
53422
- if (this.isInMultiRowMerge(position)) return 23;
53487
+ if (this.isInMultiRowMerge(position)) return DEFAULT_CELL_HEIGHT;
53423
53488
  const cell = this.getters.getCell(position);
53424
53489
  const colSize = this.getters.getColSize(position.sheetId, position.col);
53425
53490
  return getDefaultCellHeight(this.ctx, cell, this.getters.getLocale(), colSize);
@@ -53441,7 +53506,7 @@ var HeaderSizeUIPlugin = class extends UIPlugin {
53441
53506
  if (!cell) continue;
53442
53507
  const position = this.getters.getCellPosition(cell.id);
53443
53508
  const cellHeight = this.getCellHeight(position);
53444
- if (cellHeight > maxHeight && cellHeight > 23) {
53509
+ if (cellHeight > maxHeight && cellHeight > DEFAULT_CELL_HEIGHT) {
53445
53510
  maxHeight = cellHeight;
53446
53511
  tallestCell = {
53447
53512
  cell: position,
@@ -53449,7 +53514,7 @@ var HeaderSizeUIPlugin = class extends UIPlugin {
53449
53514
  };
53450
53515
  }
53451
53516
  }
53452
- if (tallestCell && tallestCell.size > 23) return tallestCell;
53517
+ if (tallestCell && tallestCell.size > DEFAULT_CELL_HEIGHT) return tallestCell;
53453
53518
  }
53454
53519
  };
53455
53520
 
@@ -53837,7 +53902,7 @@ function pivot_presentation_default(PivotClass) {
53837
53902
  * @returns the value of the cell in the pivot with the new domain, or "sameValue" if the domain is the same
53838
53903
  */
53839
53904
  getComparisonValue(measure, domain, fieldNameWithGranularity, valueToCompare) {
53840
- const comparedDomain = valueToCompare === "(previous)" || valueToCompare === "(next)" ? getPreviousOrNextValueDomain(this, domain, fieldNameWithGranularity, valueToCompare) : replaceFieldValueInDomain(domain, fieldNameWithGranularity, valueToCompare);
53905
+ const comparedDomain = valueToCompare === PREVIOUS_VALUE || valueToCompare === NEXT_VALUE ? getPreviousOrNextValueDomain(this, domain, fieldNameWithGranularity, valueToCompare) : replaceFieldValueInDomain(domain, fieldNameWithGranularity, valueToCompare);
53841
53906
  if (deepEquals(comparedDomain, domain)) return "sameValue";
53842
53907
  if (!comparedDomain || !isDomainIsInPivot(this, comparedDomain)) throw new NotAvailableError();
53843
53908
  const comparedValue = this._getPivotCellValueAndFormat(measure.id, comparedDomain);
@@ -55312,7 +55377,7 @@ var Session = class extends EventBus {
55312
55377
  this.revisions = revisions;
55313
55378
  this.transportService = transportService;
55314
55379
  this.serverRevisionId = serverRevisionId;
55315
- this.debouncedMove = debounce(this._move.bind(this), 200);
55380
+ this.debouncedMove = debounce(this._move.bind(this), DEBOUNCE_TIME);
55316
55381
  }
55317
55382
  canApplyOptimisticUpdate() {
55318
55383
  return !this.waitingUndoRedoAck;
@@ -55329,7 +55394,7 @@ var Session = class extends EventBus {
55329
55394
  this.trigger("new-local-state-update", { id: revision.id });
55330
55395
  this.sendUpdateMessage({
55331
55396
  type: "REMOTE_REVISION",
55332
- version: 1,
55397
+ version: MESSAGE_VERSION,
55333
55398
  serverRevisionId: this.serverRevisionId,
55334
55399
  nextRevisionId: revision.id,
55335
55400
  clientId: revision.clientId,
@@ -55340,7 +55405,7 @@ var Session = class extends EventBus {
55340
55405
  this.waitingUndoRedoAck = true;
55341
55406
  this.sendUpdateMessage({
55342
55407
  type: "REVISION_UNDONE",
55343
- version: 1,
55408
+ version: MESSAGE_VERSION,
55344
55409
  serverRevisionId: this.serverRevisionId,
55345
55410
  nextRevisionId: this.uuidGenerator.uuidv4(),
55346
55411
  undoneRevisionId: revisionId
@@ -55350,7 +55415,7 @@ var Session = class extends EventBus {
55350
55415
  this.waitingUndoRedoAck = true;
55351
55416
  this.sendUpdateMessage({
55352
55417
  type: "REVISION_REDONE",
55353
- version: 1,
55418
+ version: MESSAGE_VERSION,
55354
55419
  serverRevisionId: this.serverRevisionId,
55355
55420
  nextRevisionId: this.uuidGenerator.uuidv4(),
55356
55421
  redoneRevisionId: revisionId
@@ -55393,7 +55458,7 @@ var Session = class extends EventBus {
55393
55458
  this.transportService.sendMessage({
55394
55459
  type: "CLIENT_LEFT",
55395
55460
  clientId: this.clientId,
55396
- version: 1
55461
+ version: MESSAGE_VERSION
55397
55462
  });
55398
55463
  }
55399
55464
  /**
@@ -55410,7 +55475,7 @@ var Session = class extends EventBus {
55410
55475
  ...data,
55411
55476
  revisionId: snapshotId
55412
55477
  },
55413
- version: 1
55478
+ version: MESSAGE_VERSION
55414
55479
  });
55415
55480
  }
55416
55481
  getClient() {
@@ -55445,7 +55510,7 @@ var Session = class extends EventBus {
55445
55510
  };
55446
55511
  this.transportService.sendMessage({
55447
55512
  type,
55448
- version: 1,
55513
+ version: MESSAGE_VERSION,
55449
55514
  client: {
55450
55515
  ...client,
55451
55516
  position
@@ -55522,7 +55587,7 @@ var Session = class extends EventBus {
55522
55587
  const { position } = client;
55523
55588
  if (position) this.transportService.sendMessage({
55524
55589
  type: "CLIENT_MOVED",
55525
- version: 1,
55590
+ version: MESSAGE_VERSION,
55526
55591
  client: {
55527
55592
  ...client,
55528
55593
  position
@@ -56442,9 +56507,9 @@ var SheetUIPlugin = class extends UIPlugin {
56442
56507
  contentWidth += Math.max(...multiLineText.map((line) => computeTextWidth(this.ctx, line, style)));
56443
56508
  }
56444
56509
  if (this.getters.getCellIconSrc(position)) contentWidth += computeIconWidth(style);
56445
- if (this.getters.doesCellHaveGridIcon(position)) contentWidth += 18 + 2;
56510
+ if (this.getters.doesCellHaveGridIcon(position)) contentWidth += ICON_EDGE_LENGTH + GRID_ICON_MARGIN;
56446
56511
  if (contentWidth === 0) return 0;
56447
- contentWidth += 2 * 4;
56512
+ contentWidth += 2 * PADDING_AUTORESIZE_HORIZONTAL;
56448
56513
  if (style.wrapping === "wrap") {
56449
56514
  const colWidth = this.getters.getColSize(position.sheetId, position.col);
56450
56515
  return Math.min(colWidth, contentWidth);
@@ -56600,11 +56665,11 @@ var SheetUIPlugin = class extends UIPlugin {
56600
56665
  if (cell.isFormula || this.getters.getArrayFormulaSpreadingOn(position)) {
56601
56666
  const content = this.getters.getEvaluatedCell(position).formattedValue;
56602
56667
  const evaluatedSize = getCellContentHeight(this.ctx, content, cell?.style, colSize);
56603
- if (evaluatedSize > evaluatedRowSize && evaluatedSize > 23) evaluatedRowSize = evaluatedSize;
56668
+ if (evaluatedSize > evaluatedRowSize && evaluatedSize > DEFAULT_CELL_HEIGHT) evaluatedRowSize = evaluatedSize;
56604
56669
  } else {
56605
56670
  const content = cell.content;
56606
56671
  const dynamicRowSize = getCellContentHeight(this.ctx, content, cell?.style, colSize);
56607
- if (dynamicRowSize >= evaluatedRowSize && dynamicRowSize > 23) evaluatedRowSize = 0;
56672
+ if (dynamicRowSize >= evaluatedRowSize && dynamicRowSize > DEFAULT_CELL_HEIGHT) evaluatedRowSize = 0;
56608
56673
  }
56609
56674
  }
56610
56675
  rowSizes.push(evaluatedRowSize || null);
@@ -57144,7 +57209,7 @@ var HistoryPlugin = class extends UIPlugin {
57144
57209
  onNewLocalStateUpdate({ id }) {
57145
57210
  this.undoStack.push(id);
57146
57211
  this.redoStack = [];
57147
- if (this.undoStack.length > 99) this.undoStack.shift();
57212
+ if (this.undoStack.length > MAX_HISTORY_STEPS) this.undoStack.shift();
57148
57213
  }
57149
57214
  /**
57150
57215
  * Fetch the last revision which is not empty and not a repeated command
@@ -57239,7 +57304,7 @@ var SplitToColumnsPlugin = class extends UIPlugin {
57239
57304
  }
57240
57305
  getAutoSeparatorForString(str) {
57241
57306
  const separators = [
57242
- "\n",
57307
+ NEWLINE,
57243
57308
  ";",
57244
57309
  ",",
57245
57310
  " ",
@@ -57564,7 +57629,7 @@ var ClipboardPlugin = class extends UIPlugin {
57564
57629
  case "PASTE_FROM_OS_CLIPBOARD": {
57565
57630
  this._isCutOperation = false;
57566
57631
  let contentToPaste = cmd.clipboardContent;
57567
- if (contentToPaste.data?.version !== 22) {
57632
+ if (contentToPaste.data?.version !== CURRENT_VERSION) {
57568
57633
  contentToPaste = { ...contentToPaste };
57569
57634
  delete contentToPaste.data;
57570
57635
  }
@@ -57799,7 +57864,7 @@ var ClipboardPlugin = class extends UIPlugin {
57799
57864
  }
57800
57865
  getSheetData() {
57801
57866
  const data = {
57802
- version: 22,
57867
+ version: CURRENT_VERSION,
57803
57868
  clipboardId: this.clipboardId
57804
57869
  };
57805
57870
  if (this.copiedData && "figureId" in this.copiedData) return data;
@@ -58522,7 +58587,7 @@ var GridSelectionPlugin = class extends UIPlugin {
58522
58587
  const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
58523
58588
  const originalSize = Object.fromEntries(toRemove.map((element) => {
58524
58589
  const size = isCol ? this.getters.getColSize(cmd.sheetId, element) : this.getters.getUserRowSize(cmd.sheetId, element);
58525
- return [element, isCol && size === 96 || size === void 0 ? null : size];
58590
+ return [element, isCol && size === DEFAULT_CELL_WIDTH || size === void 0 ? null : size];
58526
58591
  }));
58527
58592
  const target = [{
58528
58593
  left: isCol ? start + deltaCol : 0,
@@ -58737,14 +58802,14 @@ var InternalViewport = class {
58737
58802
  const topRowSize = this.getters.getRowSize(this.sheetId, topRowIndex);
58738
58803
  let width = lastColEnd - this.offsetCorrectionX;
58739
58804
  if (this.canScrollHorizontally) {
58740
- width += Math.max(96, Math.min(leftColSize, this.viewportWidth - lastColSize));
58805
+ width += Math.max(DEFAULT_CELL_WIDTH, Math.min(leftColSize, this.viewportWidth - lastColSize));
58741
58806
  width = Math.max(width, this.viewportWidth);
58742
58807
  }
58743
58808
  let height = lastRowEnd - this.offsetCorrectionY;
58744
58809
  if (this.canScrollVertically) {
58745
- height += Math.max(23 + 5, Math.min(topRowSize, this.viewportHeight - lastRowSize));
58810
+ height += Math.max(DEFAULT_CELL_HEIGHT + 5, Math.min(topRowSize, this.viewportHeight - lastRowSize));
58746
58811
  height = Math.max(height, this.viewportHeight);
58747
- if (lastRowEnd + 46 > height && !this.getters.isReadonly()) height += 46;
58812
+ if (lastRowEnd + FOOTER_HEIGHT > height && !this.getters.isReadonly()) height += FOOTER_HEIGHT;
58748
58813
  }
58749
58814
  return {
58750
58815
  width,
@@ -60045,7 +60110,7 @@ css`
60045
60110
  .o-sheet {
60046
60111
  padding: 0 15px;
60047
60112
  padding-right: 10px;
60048
- height: ${36}px;
60113
+ height: ${BOTTOMBAR_HEIGHT}px;
60049
60114
  border-left: 1px solid #c1c1c1;
60050
60115
  border-right: 1px solid #c1c1c1;
60051
60116
  margin-left: -1px;
@@ -60418,7 +60483,7 @@ const MENU_MAX_HEIGHT = 250;
60418
60483
  css`
60419
60484
  .o-spreadsheet-bottom-bar {
60420
60485
  background-color: ${BACKGROUND_GRAY_COLOR};
60421
- padding-left: ${48}px;
60486
+ padding-left: ${HEADER_WIDTH}px;
60422
60487
  font-size: 15px;
60423
60488
  border-top: 1px solid lightgrey;
60424
60489
 
@@ -60918,16 +60983,16 @@ var RowGroup = class extends AbstractHeaderGroup {
60918
60983
  const startCoordinates = this.env.model.getters.getRowDimensions(sheetId, startRow).start;
60919
60984
  const endCoordinates = this.env.model.getters.getRowDimensions(sheetId, endRow).end;
60920
60985
  let groupHeaderY = 0;
60921
- let groupHeaderHeight = 26;
60986
+ let groupHeaderHeight = HEADER_HEIGHT;
60922
60987
  if (startRow !== 0) {
60923
60988
  const headerRowDims = this.env.model.getters.getRowDimensions(sheetId, startRow - 1);
60924
- groupHeaderY = 26 + headerRowDims.start;
60989
+ groupHeaderY = HEADER_HEIGHT + headerRowDims.start;
60925
60990
  groupHeaderHeight = headerRowDims.end - headerRowDims.start;
60926
60991
  }
60927
60992
  const headerRect = {
60928
60993
  x: this.props.layerOffset,
60929
60994
  y: groupHeaderY,
60930
- width: 21,
60995
+ width: GROUP_LAYER_WIDTH,
60931
60996
  height: groupHeaderHeight
60932
60997
  };
60933
60998
  return {
@@ -60935,7 +61000,7 @@ var RowGroup = class extends AbstractHeaderGroup {
60935
61000
  groupRect: {
60936
61001
  x: this.props.layerOffset,
60937
61002
  y: headerRect.y,
60938
- width: 21,
61003
+ width: GROUP_LAYER_WIDTH,
60939
61004
  height: headerRect.height + (endCoordinates - startCoordinates)
60940
61005
  },
60941
61006
  isEndHidden: this.env.model.getters.isRowHidden(sheetId, endRow)
@@ -60968,17 +61033,17 @@ var ColGroup = class extends AbstractHeaderGroup {
60968
61033
  const startCoordinates = this.env.model.getters.getColDimensions(sheetId, startCol).start;
60969
61034
  const endCoordinates = this.env.model.getters.getColDimensions(sheetId, endCol).end;
60970
61035
  let groupHeaderX = 0;
60971
- let groupHeaderWidth = 48;
61036
+ let groupHeaderWidth = HEADER_WIDTH;
60972
61037
  if (startCol !== 0) {
60973
61038
  const headerRowDims = this.env.model.getters.getColDimensions(sheetId, startCol - 1);
60974
- groupHeaderX = 48 + headerRowDims.start;
61039
+ groupHeaderX = HEADER_WIDTH + headerRowDims.start;
60975
61040
  groupHeaderWidth = headerRowDims.end - headerRowDims.start;
60976
61041
  }
60977
61042
  const headerRect = {
60978
61043
  x: groupHeaderX,
60979
61044
  y: this.props.layerOffset,
60980
61045
  width: groupHeaderWidth,
60981
- height: 21
61046
+ height: GROUP_LAYER_WIDTH
60982
61047
  };
60983
61048
  return {
60984
61049
  headerRect,
@@ -60986,7 +61051,7 @@ var ColGroup = class extends AbstractHeaderGroup {
60986
61051
  x: headerRect.x,
60987
61052
  y: this.props.layerOffset,
60988
61053
  width: headerRect.width + (endCoordinates - startCoordinates),
60989
- height: 21
61054
+ height: GROUP_LAYER_WIDTH
60990
61055
  },
60991
61056
  isEndHidden: this.env.model.getters.isColHidden(sheetId, endCol)
60992
61057
  };
@@ -61033,7 +61098,7 @@ var HeaderGroupContainer = class extends Component {
61033
61098
  menuItems: []
61034
61099
  });
61035
61100
  getLayerOffset(layerIndex) {
61036
- return layerIndex * 21;
61101
+ return layerIndex * GROUP_LAYER_WIDTH;
61037
61102
  }
61038
61103
  onContextMenu(event) {
61039
61104
  const sheetId = this.env.model.getters.getActiveSheetId();
@@ -61077,8 +61142,8 @@ var HeaderGroupContainer = class extends Component {
61077
61142
  get frozenPaneContainerSize() {
61078
61143
  if (!this.hasFrozenPane) return 0;
61079
61144
  const viewportCoordinates = this.env.model.getters.getMainViewportCoordinates();
61080
- if (this.props.dimension === "COL") return 48 + viewportCoordinates.x;
61081
- else return 26 + viewportCoordinates.y;
61145
+ if (this.props.dimension === "COL") return HEADER_WIDTH + viewportCoordinates.x;
61146
+ else return HEADER_HEIGHT + viewportCoordinates.y;
61082
61147
  }
61083
61148
  };
61084
61149
 
@@ -61597,7 +61662,7 @@ var TopBarComposer = class extends Component {
61597
61662
  "max-height": `${COMPOSER_MAX_HEIGHT}px`,
61598
61663
  "line-height": "24px"
61599
61664
  };
61600
- style.height = this.focus === "inactive" ? `${34}px` : "fit-content";
61665
+ style.height = this.focus === "inactive" ? `${TOPBAR_TOOLBAR_HEIGHT}px` : "fit-content";
61601
61666
  return cssPropertiesToCss(style);
61602
61667
  }
61603
61668
  get containerStyle() {
@@ -61805,7 +61870,7 @@ css`
61805
61870
 
61806
61871
  /* Toolbar */
61807
61872
  .o-topbar-toolbar {
61808
- height: ${34}px;
61873
+ height: ${TOPBAR_TOOLBAR_HEIGHT}px;
61809
61874
 
61810
61875
  .o-readonly-toolbar {
61811
61876
  background-color: ${BACKGROUND_HEADER_COLOR};
@@ -62072,9 +62137,9 @@ css`
62072
62137
  direction: ltr;
62073
62138
  }
62074
62139
  .o-separator {
62075
- border-bottom: ${1}px solid ${SEPARATOR_COLOR};
62076
- margin-top: ${5}px;
62077
- margin-bottom: ${5}px;
62140
+ border-bottom: ${MENU_SEPARATOR_BORDER_WIDTH}px solid ${SEPARATOR_COLOR};
62141
+ margin-top: ${MENU_SEPARATOR_PADDING}px;
62142
+ margin-bottom: ${MENU_SEPARATOR_PADDING}px;
62078
62143
  }
62079
62144
  .o-hoverable-button {
62080
62145
  border-radius: 2px;
@@ -62201,8 +62266,8 @@ css`
62201
62266
  &.corner {
62202
62267
  right: 0px;
62203
62268
  bottom: 0px;
62204
- height: ${15}px;
62205
- width: ${15}px;
62269
+ height: ${SCROLLBAR_WIDTH}px;
62270
+ width: ${SCROLLBAR_WIDTH}px;
62206
62271
  border-top: 1px solid #e2e3e3;
62207
62272
  border-left: 1px solid #e2e3e3;
62208
62273
  }
@@ -62328,7 +62393,7 @@ var Spreadsheet = class extends Component {
62328
62393
  getStyle() {
62329
62394
  const properties = {};
62330
62395
  if (this.env.isDashboard()) properties["grid-template-rows"] = `auto`;
62331
- else properties["grid-template-rows"] = `${63}px auto ${36 + 1}px`;
62396
+ else properties["grid-template-rows"] = `${TOPBAR_HEIGHT}px auto ${BOTTOMBAR_HEIGHT + 1}px`;
62332
62397
  properties["grid-template-columns"] = `auto ${this.sidePanel.panelSize}px`;
62333
62398
  return cssPropertiesToCss(properties);
62334
62399
  }
@@ -62405,7 +62470,7 @@ var Spreadsheet = class extends Component {
62405
62470
  checkViewportSize() {
62406
62471
  const { xRatio, yRatio } = this.env.model.getters.getFrozenSheetViewRatio(this.env.model.getters.getActiveSheetId());
62407
62472
  if (!isFinite(xRatio) || !isFinite(yRatio)) return;
62408
- if (yRatio > .85 || xRatio > .85) {
62473
+ if (yRatio > MAXIMAL_FREEZABLE_RATIO || xRatio > MAXIMAL_FREEZABLE_RATIO) {
62409
62474
  if (this.isViewportTooSmall) return;
62410
62475
  this.notificationStore.notifyUser({
62411
62476
  text: _t("The current window is too small to display this sheet properly. Consider resizing your browser window or adjusting frozen rows and columns."),
@@ -62436,8 +62501,8 @@ var Spreadsheet = class extends Component {
62436
62501
  return height;
62437
62502
  }
62438
62503
  get gridContainerStyle() {
62439
- const gridColSize = 21 * this.rowLayers.length;
62440
- const gridRowSize = 21 * this.colLayers.length;
62504
+ const gridColSize = GROUP_LAYER_WIDTH * this.rowLayers.length;
62505
+ const gridRowSize = GROUP_LAYER_WIDTH * this.colLayers.length;
62441
62506
  return cssPropertiesToCss({
62442
62507
  "grid-template-columns": `${gridColSize ? gridColSize + 2 : 0}px auto`,
62443
62508
  "grid-template-rows": `${gridRowSize ? gridRowSize + 2 : 0}px auto`
@@ -63973,7 +64038,7 @@ function createChart(chart, chartSheetIndex, data) {
63973
64038
  const color = chart.data.title.color ? toXlsxHexColor(chart.data.title.color) : chart.data.fontColor;
63974
64039
  title = escapeXml`
63975
64040
  <c:title>
63976
- ${insertText(chart.data.title.text, color, 22, chart.data.title)}
64041
+ ${insertText(chart.data.title.text, color, DEFAULT_CHART_FONT_SIZE, chart.data.title)}
63977
64042
  <c:overlay val="0" />
63978
64043
  </c:title>
63979
64044
  `;
@@ -64057,7 +64122,7 @@ function lineAttributes(params) {
64057
64122
  </a:ln>
64058
64123
  `;
64059
64124
  }
64060
- function insertText(text, fontColor = "000000", fontsize = 22, style = {}) {
64125
+ function insertText(text, fontColor = "000000", fontsize = DEFAULT_CHART_FONT_SIZE, style = {}) {
64061
64126
  return escapeXml`
64062
64127
  <c:tx>
64063
64128
  <c:rich>
@@ -65009,12 +65074,12 @@ function figureCoordinates(headers, position) {
65009
65074
  let currentPosition = 0;
65010
65075
  for (const [headerIndex, header] of headers.entries()) if (currentPosition <= position && position < currentPosition + header.size) return {
65011
65076
  index: headerIndex,
65012
- offset: convertDotValueToEMU(position - currentPosition + 1)
65077
+ offset: convertDotValueToEMU(position - currentPosition + FIGURE_BORDER_WIDTH)
65013
65078
  };
65014
65079
  else if (headerIndex < headers.length - 1) currentPosition += header.size;
65015
65080
  return {
65016
65081
  index: headers.length - 1,
65017
- offset: convertDotValueToEMU(position - currentPosition + 1)
65082
+ offset: convertDotValueToEMU(position - currentPosition + FIGURE_BORDER_WIDTH)
65018
65083
  };
65019
65084
  }
65020
65085
  function createChartDrawing(figure, sheet, chartRelId) {
@@ -65113,7 +65178,7 @@ function createImageDrawing(figure, sheet, imageRelId) {
65113
65178
  function addNumberFormats(numFmts) {
65114
65179
  const numFmtNodes = [];
65115
65180
  for (const [index, numFmt] of Object.entries(numFmts)) {
65116
- const numFmtAttrs = [["numFmtId", parseInt(index) + 164], ["formatCode", numFmt.format]];
65181
+ const numFmtAttrs = [["numFmtId", parseInt(index) + FIRST_NUMFMT_ID], ["formatCode", numFmt.format]];
65117
65182
  numFmtNodes.push(escapeXml`
65118
65183
  <numFmt ${formatAttributes(numFmtAttrs)}/>
65119
65184
  `);
@@ -65345,7 +65410,7 @@ function addColumns(cols) {
65345
65410
  const attributes = [
65346
65411
  ["min", parseInt(id) + 1],
65347
65412
  ["max", parseInt(id) + 1],
65348
- ["width", convertWidthToExcel(col.size || 96)],
65413
+ ["width", convertWidthToExcel(col.size || DEFAULT_CELL_WIDTH)],
65349
65414
  ["customWidth", 1],
65350
65415
  ["hidden", col.isHidden ? 1 : 0]
65351
65416
  ];
@@ -65366,7 +65431,7 @@ function addRows(construct, data, sheet) {
65366
65431
  for (let r = 0; r < sheet.rowNumber; r++) {
65367
65432
  const rowAttrs = [["r", r + 1]];
65368
65433
  const row = sheet.rows[r] || {};
65369
- if (row.size && row.size !== 23) rowAttrs.push(["ht", convertHeightToExcel(row.size)], ["customHeight", 1]);
65434
+ if (row.size && row.size !== DEFAULT_CELL_HEIGHT) rowAttrs.push(["ht", convertHeightToExcel(row.size)], ["customHeight", 1]);
65370
65435
  if (row.isHidden) rowAttrs.push(["hidden", 1]);
65371
65436
  if (row.outlineLevel) rowAttrs.push(["outlineLevel", row.outlineLevel]);
65372
65437
  if (row.collapsed) rowAttrs.push(["collapsed", 1]);
@@ -65399,7 +65464,7 @@ function addRows(construct, data, sheet) {
65399
65464
  </c>`);
65400
65465
  }
65401
65466
  }
65402
- if (cellNodes.length || row.size !== 23 || row.isHidden || row.outlineLevel || row.collapsed) rowNodes.push(escapeXml`
65467
+ if (cellNodes.length || row.size !== DEFAULT_CELL_HEIGHT || row.isHidden || row.outlineLevel || row.collapsed) rowNodes.push(escapeXml`
65403
65468
  <row ${formatAttributes(rowAttrs)}>
65404
65469
  ${joinXmlNodes(cellNodes)}
65405
65470
  </row>
@@ -65572,7 +65637,7 @@ function createWorksheets(data, construct) {
65572
65637
  let currentTableIndex = 1;
65573
65638
  for (const [sheetIndex, sheet] of Object.entries(data.sheets)) {
65574
65639
  const namespaces = [["xmlns", NAMESPACE["worksheet"]], ["xmlns:r", RELATIONSHIP_NSR]];
65575
- const sheetFormatAttributes = [["defaultRowHeight", convertHeightToExcel(23)], ["defaultColWidth", convertWidthToExcel(96)]];
65640
+ const sheetFormatAttributes = [["defaultRowHeight", convertHeightToExcel(DEFAULT_CELL_HEIGHT)], ["defaultColWidth", convertWidthToExcel(DEFAULT_CELL_WIDTH)]];
65576
65641
  const tablesNode = createTablesForSheet(sheet, sheetIndex, currentTableIndex, construct, files);
65577
65642
  currentTableIndex += sheet.tables.length;
65578
65643
  let drawingNode = escapeXml``;
@@ -66200,7 +66265,7 @@ var Model = class extends EventBus {
66200
66265
  exportData() {
66201
66266
  let data = createEmptyWorkbookData();
66202
66267
  for (const handler of this.handlers) if (handler instanceof CorePlugin) handler.export(data);
66203
- data.revisionId = this.session.getRevisionId() || "START_REVISION";
66268
+ data.revisionId = this.session.getRevisionId() || DEFAULT_REVISION_ID;
66204
66269
  data = deepCopy(data);
66205
66270
  return data;
66206
66271
  }
@@ -66244,15 +66309,15 @@ function createCommand(type, payload = {}) {
66244
66309
  */
66245
66310
  const __info__ = {};
66246
66311
  const SPREADSHEET_DIMENSIONS = {
66247
- MIN_ROW_HEIGHT: 10,
66248
- MIN_COL_WIDTH: 5,
66249
- HEADER_HEIGHT: 26,
66250
- HEADER_WIDTH: 48,
66251
- TOPBAR_HEIGHT: 63,
66252
- BOTTOMBAR_HEIGHT: 36,
66253
- DEFAULT_CELL_WIDTH: 96,
66254
- DEFAULT_CELL_HEIGHT: 23,
66255
- SCROLLBAR_WIDTH: 15
66312
+ MIN_ROW_HEIGHT,
66313
+ MIN_COL_WIDTH,
66314
+ HEADER_HEIGHT,
66315
+ HEADER_WIDTH,
66316
+ TOPBAR_HEIGHT,
66317
+ BOTTOMBAR_HEIGHT,
66318
+ DEFAULT_CELL_WIDTH,
66319
+ DEFAULT_CELL_HEIGHT,
66320
+ SCROLLBAR_WIDTH
66256
66321
  };
66257
66322
  const registries = {
66258
66323
  autoCompleteProviders,
@@ -66337,6 +66402,7 @@ const helpers = {
66337
66402
  overlap,
66338
66403
  union,
66339
66404
  isInside,
66405
+ addStyleToWorkbookData,
66340
66406
  deepCopy,
66341
66407
  expandZoneOnInsertion,
66342
66408
  reduceZoneOnDeletion,
@@ -66444,7 +66510,7 @@ const constants = {
66444
66510
  DEFAULT_LOCALE,
66445
66511
  HIGHLIGHT_COLOR,
66446
66512
  PIVOT_TABLE_CONFIG,
66447
- TREND_LINE_XAXIS_ID: "x1",
66513
+ TREND_LINE_XAXIS_ID,
66448
66514
  CHART_AXIS_CHOICES,
66449
66515
  ChartTerms
66450
66516
  };
@@ -66452,6 +66518,6 @@ const constants = {
66452
66518
  //#endregion
66453
66519
  export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
66454
66520
 
66455
- __info__.version = "18.0.82";
66456
- __info__.date = "2026-09-10T05:35:40.438Z";
66457
- __info__.hash = "d0329aa";
66521
+ __info__.version = "18.0.84";
66522
+ __info__.date = "2026-10-14T06:49:38.664Z";
66523
+ __info__.hash = "56a1fca";