@odoo/o-spreadsheet 17.1.25 → 17.1.27

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 17.1.25
6
- * @date 2024-07-24T10:26:01.576Z
7
- * @hash 0edff47
5
+ * @version 17.1.27
6
+ * @date 2024-08-09T12:20:52.051Z
7
+ * @hash c626332
8
8
  */
9
9
 
10
10
  import { Component, useRef, onMounted, onWillUnmount, useEffect, onWillPatch, useState, onWillUpdateProps, onPatched, useComponent, useExternalListener, onWillStart, xml, useChildSubEnv, useSubEnv, markRaw } from '@odoo/owl';
@@ -479,7 +479,7 @@ function debounce(func, wait, immediate) {
479
479
  let timeout;
480
480
  return function () {
481
481
  const context = this;
482
- const args = arguments;
482
+ const args = Array.from(arguments);
483
483
  function later() {
484
484
  timeout = null;
485
485
  if (!immediate) {
@@ -682,7 +682,7 @@ function isNumberBetween(value, min, max) {
682
682
  */
683
683
  function largeMax(array) {
684
684
  let len = array.length;
685
- if (len < 100000)
685
+ if (len < 100_000)
686
686
  return Math.max(...array);
687
687
  let max = -Infinity;
688
688
  while (len--) {
@@ -696,7 +696,7 @@ function largeMax(array) {
696
696
  */
697
697
  function largeMin(array) {
698
698
  let len = array.length;
699
- if (len < 100000)
699
+ if (len < 100_000)
700
700
  return Math.min(...array);
701
701
  let min = +Infinity;
702
702
  while (len--) {
@@ -2613,13 +2613,16 @@ function operandToRegExp(operand) {
2613
2613
  }
2614
2614
  return new RegExp("^" + exp + "$", "i");
2615
2615
  }
2616
- function evaluatePredicate(value = "", criterion) {
2616
+ function evaluatePredicate(value = "", criterion, locale) {
2617
2617
  const { operator, operand } = criterion;
2618
2618
  if (operand === undefined || value === null || operand === null) {
2619
2619
  return false;
2620
2620
  }
2621
2621
  if (typeof operand === "number" && operator === "=") {
2622
- return value.toString() === operand.toString();
2622
+ if (typeof value === "string" && (isNumber(value, locale) || isDateTime(value, locale))) {
2623
+ return toNumber(value, locale) === operand;
2624
+ }
2625
+ return value === operand;
2623
2626
  }
2624
2627
  if (operator === "<>" || operator === "=") {
2625
2628
  let result;
@@ -2697,7 +2700,7 @@ function visitMatchingRanges(args, cb, locale, isQuery = false) {
2697
2700
  for (let k = 0; k < countArg - 1; k += 2) {
2698
2701
  const criteriaValue = toMatrix(args[k])[i][j].value;
2699
2702
  const criterion = predicates[k / 2];
2700
- validatedPredicates = evaluatePredicate(criteriaValue ?? undefined, criterion);
2703
+ validatedPredicates = evaluatePredicate(criteriaValue ?? undefined, criterion, locale);
2701
2704
  if (!validatedPredicates) {
2702
2705
  break;
2703
2706
  }
@@ -5979,7 +5982,7 @@ function textCell(value, localeFormat) {
5979
5982
  function numberCell(value, localeFormat) {
5980
5983
  return {
5981
5984
  type: CellValueType.number,
5982
- value: value || 0,
5985
+ value: value || 0, // necessary to avoid "-0" and NaN values,
5983
5986
  format: localeFormat.format,
5984
5987
  isAutoSummable: true,
5985
5988
  defaultAlign: "right",
@@ -8470,8 +8473,8 @@ function truncateLabel(label) {
8470
8473
  function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale, truncateLabels = true }) {
8471
8474
  const options = {
8472
8475
  // https://www.chartjs.org/docs/latest/general/responsive.html
8473
- responsive: true,
8474
- maintainAspectRatio: false,
8476
+ responsive: true, // will resize when its container is resized
8477
+ maintainAspectRatio: false, // doesn't maintain the aspect ration (width/height =2 by default) so the user has the choice of the exact layout
8475
8478
  layout: {
8476
8479
  padding: { left: 20, right: 20, top: chart.title ? 10 : 25, bottom: 10 },
8477
8480
  },
@@ -8517,7 +8520,7 @@ function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale, tr
8517
8520
  labels: truncateLabels ? labels.map(truncateLabel) : labels,
8518
8521
  datasets: [],
8519
8522
  },
8520
- platform: undefined,
8523
+ platform: undefined, // This key is optional and will be set by chart.js
8521
8524
  plugins: [],
8522
8525
  };
8523
8526
  }
@@ -8781,7 +8784,7 @@ function getBarConfiguration(chart, labels, localeFormat) {
8781
8784
  },
8782
8785
  y: {
8783
8786
  position: chart.verticalAxisPosition,
8784
- beginAtZero: true,
8787
+ beginAtZero: true, // the origin of the y axis is always zero
8785
8788
  ticks: {
8786
8789
  color: fontColor,
8787
8790
  callback: (value) => {
@@ -9435,7 +9438,7 @@ function getLineConfiguration(chart, labels, options) {
9435
9438
  },
9436
9439
  y: {
9437
9440
  position: chart.verticalAxisPosition,
9438
- beginAtZero: true,
9441
+ beginAtZero: true, // the origin of the y axis is always zero
9439
9442
  ticks: {
9440
9443
  color: fontColor,
9441
9444
  callback: (value) => {
@@ -9523,7 +9526,7 @@ function createLineChartRuntime(chart, getters) {
9523
9526
  const dataset = {
9524
9527
  label,
9525
9528
  data,
9526
- tension: 0,
9529
+ tension: 0, // 0 -> render straight lines, which is much faster
9527
9530
  borderColor: color,
9528
9531
  backgroundColor,
9529
9532
  pointBackgroundColor: color,
@@ -9634,7 +9637,7 @@ class PieChart extends AbstractChart {
9634
9637
  ...this.getDefinition(),
9635
9638
  backgroundColor: toXlsxHexColor(this.background || BACKGROUND_CHART_COLOR),
9636
9639
  fontColor: toXlsxHexColor(chartFontColor(this.background)),
9637
- verticalAxisPosition: "left",
9640
+ verticalAxisPosition: "left", //TODO ExcelChartDefinition should be adapted, but can be done later
9638
9641
  dataSets,
9639
9642
  labelRange,
9640
9643
  };
@@ -27201,7 +27204,9 @@ class Composer extends Component {
27201
27204
  argToFocus: 0,
27202
27205
  });
27203
27206
  compositionActive = false;
27207
+ spreadsheetRect = useSpreadsheetRect();
27204
27208
  get assistantStyle() {
27209
+ const composerRect = this.composerRef.el.getBoundingClientRect();
27205
27210
  const assistantStyle = {};
27206
27211
  assistantStyle["min-width"] = `${this.props.rect?.width || ASSISTANT_WIDTH}px`;
27207
27212
  if (this.autoCompleteState.type === "function") {
@@ -27224,6 +27229,10 @@ class Composer extends Component {
27224
27229
  assistantStyle.right = `0px`;
27225
27230
  }
27226
27231
  }
27232
+ if (this.props.focus === "contentFocus" &&
27233
+ composerRect.left + ASSISTANT_WIDTH > this.spreadsheetRect.width) {
27234
+ assistantStyle.right = "0px";
27235
+ }
27227
27236
  return cssPropertiesToCss(assistantStyle);
27228
27237
  }
27229
27238
  // we can't allow input events to be triggered while we remove and add back the content of the composer in processContent
@@ -30057,7 +30066,7 @@ class VerticalScrollBar extends Component {
30057
30066
  onScroll(offset) {
30058
30067
  const { scrollX } = this.env.model.getters.getActiveSheetDOMScrollInfo();
30059
30068
  this.env.model.dispatch("SET_VIEWPORT_OFFSET", {
30060
- offsetX: scrollX,
30069
+ offsetX: scrollX, // offsetX is the same
30061
30070
  offsetY: offset,
30062
30071
  });
30063
30072
  }
@@ -30270,8 +30279,8 @@ class Grid extends Component {
30270
30279
  "Ctrl+Shift+L": () => this.setHorizontalAlign("left"),
30271
30280
  "Ctrl+Shift+R": () => this.setHorizontalAlign("right"),
30272
30281
  "Ctrl+Shift+V": () => PASTE_AS_VALUE_ACTION(this.env),
30273
- "Ctrl+Shift+<": () => this.clearFormatting(),
30274
- "Ctrl+<": () => this.clearFormatting(),
30282
+ "Ctrl+Shift+<": () => this.clearFormatting(), // for qwerty
30283
+ "Ctrl+<": () => this.clearFormatting(), // for azerty
30275
30284
  "Ctrl+Shift+ ": () => {
30276
30285
  this.env.model.selection.selectAll();
30277
30286
  },
@@ -31069,10 +31078,10 @@ function convertCFCellIsOperator(xlsxCfOperator) {
31069
31078
  const CF_TYPE_CONVERSION_MAP = {
31070
31079
  aboveAverage: undefined,
31071
31080
  expression: undefined,
31072
- cellIs: undefined,
31073
- colorScale: undefined,
31081
+ cellIs: undefined, // exist but isn't an operator in o_spreadsheet
31082
+ colorScale: undefined, // exist but isn't an operator in o_spreadsheet
31074
31083
  dataBar: undefined,
31075
- iconSet: undefined,
31084
+ iconSet: undefined, // exist but isn't an operator in o_spreadsheet
31076
31085
  top10: undefined,
31077
31086
  uniqueValues: undefined,
31078
31087
  duplicateValues: undefined,
@@ -31307,7 +31316,7 @@ const XLSX_INDEXED_COLORS = {
31307
31316
  61: "993366",
31308
31317
  62: "333399",
31309
31318
  63: "333333",
31310
- 64: "000000",
31319
+ 64: "000000", // system foreground
31311
31320
  65: "FFFFFF", // system background
31312
31321
  };
31313
31322
  const IMAGE_MIMETYPE_TO_EXTENSION_MAPPING = {
@@ -34977,12 +34986,13 @@ class BordersPlugin extends CorePlugin {
34977
34986
  this.clearBorders(cmd.sheetId, cmd.target);
34978
34987
  break;
34979
34988
  case "REMOVE_COLUMNS_ROWS":
34980
- for (let el of [...cmd.elements].sort((a, b) => b - a)) {
34989
+ const elements = [...cmd.elements].sort((a, b) => b - a);
34990
+ for (const group of groupConsecutive(elements)) {
34981
34991
  if (cmd.dimension === "COL") {
34982
- this.shiftBordersHorizontally(cmd.sheetId, el + 1, -1);
34992
+ this.shiftBordersHorizontally(cmd.sheetId, group[group.length - 1] + 1, -group.length);
34983
34993
  }
34984
34994
  else {
34985
- this.shiftBordersVertically(cmd.sheetId, el + 1, -1);
34995
+ this.shiftBordersVertically(cmd.sheetId, group[group.length - 1] + 1, -group.length);
34986
34996
  }
34987
34997
  }
34988
34998
  break;
@@ -39114,7 +39124,7 @@ class RangeAdapter {
39114
39124
  * @param sheetXC the string description of a range, in the form SheetName!XC:XC
39115
39125
  */
39116
39126
  getRangeFromSheetXC(defaultSheetId, sheetXC) {
39117
- if (!rangeReference.test(sheetXC)) {
39127
+ if (!rangeReference.test(sheetXC) || !this.getters.tryGetSheet(defaultSheetId)) {
39118
39128
  return new RangeImpl({
39119
39129
  sheetId: "",
39120
39130
  zone: { left: -1, top: -1, right: -1, bottom: -1 },
@@ -40014,12 +40024,7 @@ class SheetPlugin extends CorePlugin {
40014
40024
  });
40015
40025
  }
40016
40026
  if (colIndex > deletedColumn) {
40017
- this.dispatch("UPDATE_CELL_POSITION", {
40018
- sheetId: sheet.id,
40019
- cellId: cellId,
40020
- col: colIndex - 1,
40021
- row: rowIndex,
40022
- });
40027
+ this.setNewPosition(cellId, sheet.id, colIndex - 1, rowIndex);
40023
40028
  }
40024
40029
  }
40025
40030
  }
@@ -40029,7 +40034,7 @@ class SheetPlugin extends CorePlugin {
40029
40034
  * Move the cells after a column or rows insertion
40030
40035
  */
40031
40036
  moveCellsOnAddition(sheet, addedElement, quantity, dimension) {
40032
- const commands = [];
40037
+ const updates = [];
40033
40038
  for (let rowIndex = 0; rowIndex < sheet.rows.length; rowIndex++) {
40034
40039
  const row = sheet.rows[rowIndex];
40035
40040
  if (dimension !== "rows" || rowIndex >= addedElement) {
@@ -40038,20 +40043,20 @@ class SheetPlugin extends CorePlugin {
40038
40043
  const cellId = row.cells[i];
40039
40044
  if (cellId) {
40040
40045
  if (dimension === "rows" || colIndex >= addedElement) {
40041
- commands.push({
40042
- type: "UPDATE_CELL_POSITION",
40046
+ updates.push({
40043
40047
  sheetId: sheet.id,
40044
40048
  cellId: cellId,
40045
40049
  col: colIndex + (dimension === "columns" ? quantity : 0),
40046
40050
  row: rowIndex + (dimension === "rows" ? quantity : 0),
40051
+ type: "UPDATE_CELL_POSITION",
40047
40052
  });
40048
40053
  }
40049
40054
  }
40050
40055
  }
40051
40056
  }
40052
40057
  }
40053
- for (let cmd of commands.reverse()) {
40054
- this.dispatch(cmd.type, cmd);
40058
+ for (let update of updates.reverse()) {
40059
+ this.updateCellPosition(update);
40055
40060
  }
40056
40061
  }
40057
40062
  /**
@@ -40084,12 +40089,7 @@ class SheetPlugin extends CorePlugin {
40084
40089
  const colIndex = Number(i);
40085
40090
  const cellId = row.cells[i];
40086
40091
  if (cellId) {
40087
- this.dispatch("UPDATE_CELL_POSITION", {
40088
- sheetId: sheet.id,
40089
- cellId: cellId,
40090
- col: colIndex,
40091
- row: rowIndex - numberRows,
40092
- });
40092
+ this.setNewPosition(cellId, sheet.id, colIndex, rowIndex - numberRows);
40093
40093
  }
40094
40094
  }
40095
40095
  }
@@ -42058,18 +42058,30 @@ class Evaluator {
42058
42058
  this.evaluate(this.getAllCells());
42059
42059
  }
42060
42060
  evaluateFormula(sheetId, formulaString) {
42061
- const compiledFormula = compile(formulaString);
42062
- const ranges = compiledFormula.dependencies.map((xc) => this.getters.getRangeFromSheetXC(sheetId, xc));
42063
- this.updateCompilationParameters();
42064
- const result = updateEvalContextAndExecute({ ...compiledFormula, dependencies: ranges }, this.compilationParams, sheetId);
42061
+ const result = this.evaluateFormulaResult(sheetId, formulaString);
42065
42062
  if (isMatrix(result)) {
42066
42063
  return matrixMap(result, (cell) => cell.value);
42067
42064
  }
42068
- if (result.value === null) {
42069
- return 0;
42070
- }
42071
42065
  return result.value;
42072
42066
  }
42067
+ evaluateFormulaResult(sheetId, formulaString) {
42068
+ try {
42069
+ const compiledFormula = compile(formulaString);
42070
+ const ranges = compiledFormula.dependencies.map((xc) => this.getters.getRangeFromSheetXC(sheetId, xc));
42071
+ this.updateCompilationParameters();
42072
+ const result = updateEvalContextAndExecute({ ...compiledFormula, dependencies: ranges }, this.compilationParams, sheetId);
42073
+ if (isMatrix(result)) {
42074
+ return result;
42075
+ }
42076
+ if (result.value === null) {
42077
+ return { value: 0, format: result.format };
42078
+ }
42079
+ return result;
42080
+ }
42081
+ catch (error) {
42082
+ return handleError(error, "");
42083
+ }
42084
+ }
42073
42085
  getAllCells() {
42074
42086
  const positionIds = new JetSet();
42075
42087
  for (const sheetId of this.getters.getSheetIds()) {
@@ -42494,6 +42506,7 @@ function updateEvalContextAndExecute(compiledFormula, compilationParams, sheetId
42494
42506
  class EvaluationPlugin extends UIPlugin {
42495
42507
  static getters = [
42496
42508
  "evaluateFormula",
42509
+ "evaluateFormulaResult",
42497
42510
  "getCorrespondingFormulaCell",
42498
42511
  "getRangeFormattedValues",
42499
42512
  "getRangeValues",
@@ -42552,12 +42565,14 @@ class EvaluationPlugin extends UIPlugin {
42552
42565
  // Getters
42553
42566
  // ---------------------------------------------------------------------------
42554
42567
  evaluateFormula(sheetId, formulaString) {
42555
- try {
42556
- return this.evaluator.evaluateFormula(sheetId, formulaString);
42557
- }
42558
- catch (error) {
42559
- return error.value || CellErrorType.GenericError;
42568
+ const result = this.evaluateFormulaResult(sheetId, formulaString);
42569
+ if (isMatrix(result)) {
42570
+ return matrixMap(result, (cell) => cell.value);
42560
42571
  }
42572
+ return result.value;
42573
+ }
42574
+ evaluateFormulaResult(sheetId, formulaString) {
42575
+ return this.evaluator.evaluateFormulaResult(sheetId, formulaString);
42561
42576
  }
42562
42577
  /**
42563
42578
  * Return the value of each cell in the range as they are displayed in the grid.
@@ -42698,17 +42713,17 @@ function isBadExpression(tokens) {
42698
42713
  */
42699
42714
  function sortWithClusters(colorsToSort) {
42700
42715
  const clusters = [
42701
- { leadColor: rgba(255, 0, 0), colors: [] },
42702
- { leadColor: rgba(255, 128, 0), colors: [] },
42703
- { leadColor: rgba(128, 128, 0), colors: [] },
42704
- { leadColor: rgba(128, 255, 0), colors: [] },
42705
- { leadColor: rgba(0, 255, 0), colors: [] },
42706
- { leadColor: rgba(0, 255, 128), colors: [] },
42707
- { leadColor: rgba(0, 255, 255), colors: [] },
42708
- { leadColor: rgba(0, 127, 255), colors: [] },
42709
- { leadColor: rgba(0, 0, 255), colors: [] },
42710
- { leadColor: rgba(127, 0, 255), colors: [] },
42711
- { leadColor: rgba(128, 0, 128), colors: [] },
42716
+ { leadColor: rgba(255, 0, 0), colors: [] }, // red
42717
+ { leadColor: rgba(255, 128, 0), colors: [] }, // orange
42718
+ { leadColor: rgba(128, 128, 0), colors: [] }, // yellow
42719
+ { leadColor: rgba(128, 255, 0), colors: [] }, // chartreuse
42720
+ { leadColor: rgba(0, 255, 0), colors: [] }, // green
42721
+ { leadColor: rgba(0, 255, 128), colors: [] }, // spring green
42722
+ { leadColor: rgba(0, 255, 255), colors: [] }, // cyan
42723
+ { leadColor: rgba(0, 127, 255), colors: [] }, // azure
42724
+ { leadColor: rgba(0, 0, 255), colors: [] }, // blue
42725
+ { leadColor: rgba(127, 0, 255), colors: [] }, // violet
42726
+ { leadColor: rgba(128, 0, 128), colors: [] }, // magenta
42712
42727
  { leadColor: rgba(255, 0, 128), colors: [] }, // rose
42713
42728
  ];
42714
42729
  for (const color of colorsToSort.map(colorToRGBA)) {
@@ -46432,6 +46447,7 @@ class FormatPlugin extends UIPlugin {
46432
46447
  * evaluated and updated with the number type.
46433
46448
  */
46434
46449
  setDecimal(sheetId, zones, step) {
46450
+ const positionsByFormat = {};
46435
46451
  // Find the each cell with a number value and get the format
46436
46452
  for (const zone of zones) {
46437
46453
  for (const position of positions(zone)) {
@@ -46441,15 +46457,20 @@ class FormatPlugin extends UIPlugin {
46441
46457
  // of the format
46442
46458
  this.getters.getLocale();
46443
46459
  const newFormat = changeDecimalPlaces(numberFormat, step);
46444
- // Apply the new format on the whole zone
46445
- this.dispatch("SET_FORMATTING", {
46446
- sheetId,
46447
- target: [positionToZone(position)],
46448
- format: newFormat,
46449
- });
46460
+ positionsByFormat[newFormat] = positionsByFormat[newFormat] || [];
46461
+ positionsByFormat[newFormat].push(position);
46450
46462
  }
46451
46463
  }
46452
46464
  }
46465
+ // consolidate all positions with the same format in bigger zones
46466
+ for (const newFormat in positionsByFormat) {
46467
+ const zones = futureRecomputeZones(positionsByFormat[newFormat].map((position) => positionToZone(position)));
46468
+ this.dispatch("SET_FORMATTING", {
46469
+ sheetId,
46470
+ format: newFormat,
46471
+ target: zones,
46472
+ });
46473
+ }
46453
46474
  }
46454
46475
  /**
46455
46476
  * Take a range of cells and return the format of the first cell containing a
@@ -52495,7 +52516,7 @@ class BottomBar extends Component {
52495
52516
  .map((sheetEl) => sheetEl.getBoundingClientRect())
52496
52517
  .map((rect) => ({
52497
52518
  x: rect.x,
52498
- width: rect.width - 1,
52519
+ width: rect.width - 1, // -1 to compensate negative margin
52499
52520
  y: rect.y,
52500
52521
  height: rect.height,
52501
52522
  }));
@@ -52717,7 +52738,7 @@ class RowGroup extends AbstractHeaderGroup {
52717
52738
  }
52718
52739
  return cssPropertiesToCss({
52719
52740
  top: `${groupBox.headerRect.height / 2}px`,
52720
- left: `calc(50% - 1px)`,
52741
+ left: `calc(50% - 1px)`, // -1px: we want the border to be on the center
52721
52742
  width: `30%`,
52722
52743
  height: `calc(100% - ${groupBox.headerRect.height / 2}px)`,
52723
52744
  "border-left": `1px solid ${HEADER_GROUPING_BORDER_COLOR}`,
@@ -52769,7 +52790,7 @@ class ColGroup extends AbstractHeaderGroup {
52769
52790
  return "";
52770
52791
  }
52771
52792
  return cssPropertiesToCss({
52772
- top: `calc(50% - 1px)`,
52793
+ top: `calc(50% - 1px)`, // -1px: we want the border to be on the center
52773
52794
  left: `${groupBox.headerRect.width / 2}px`,
52774
52795
  width: `calc(100% - ${groupBox.headerRect.width / 2}px)`,
52775
52796
  height: `30%`,
@@ -54180,7 +54201,7 @@ class Spreadsheet extends Component {
54180
54201
  const gridColSize = GROUP_LAYER_WIDTH * this.rowLayers.length;
54181
54202
  const gridRowSize = GROUP_LAYER_WIDTH * this.colLayers.length;
54182
54203
  return cssPropertiesToCss({
54183
- "grid-template-columns": `${gridColSize ? gridColSize + 2 : 0}px auto`,
54204
+ "grid-template-columns": `${gridColSize ? gridColSize + 2 : 0}px auto`, // +2: margins
54184
54205
  "grid-template-rows": `${gridRowSize ? gridRowSize + 2 : 0}px auto`,
54185
54206
  });
54186
54207
  }
@@ -55625,7 +55646,7 @@ class SelectionStreamProcessorImpl {
55625
55646
  }
55626
55647
 
55627
55648
  class StateObserver {
55628
- changes = [];
55649
+ changes;
55629
55650
  commands = [];
55630
55651
  /**
55631
55652
  * Record the changes which could happen in the given callback, save them in a
@@ -55657,7 +55678,7 @@ class StateObserver {
55657
55678
  if (value[key] === val) {
55658
55679
  return;
55659
55680
  }
55660
- this.changes.push({
55681
+ this.changes?.push({
55661
55682
  path: args,
55662
55683
  before: value[key],
55663
55684
  after: val,
@@ -56788,7 +56809,7 @@ function addTableColumns(table, sheetData) {
56788
56809
  const colHeaderXc = toXC(tableZone.left + i, tableZone.top);
56789
56810
  const colName = sheetData.cells[colHeaderXc]?.content || `col${i}`;
56790
56811
  const colAttributes = [
56791
- ["id", i + 1],
56812
+ ["id", i + 1], // id cannot be 0
56792
56813
  ["name", colName],
56793
56814
  ];
56794
56815
  columns.push(escapeXml /*xml*/ `<tableColumn ${formatAttributes(colAttributes)}/>`);
@@ -57844,6 +57865,6 @@ const constants = {
57844
57865
  export { AbstractChart, CellErrorType, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, tokenize };
57845
57866
 
57846
57867
 
57847
- __info__.version = "17.1.25";
57848
- __info__.date = "2024-07-24T10:26:01.576Z";
57849
- __info__.hash = "0edff47";
57868
+ __info__.version = "17.1.27";
57869
+ __info__.date = "2024-08-09T12:20:52.051Z";
57870
+ __info__.hash = "c626332";