@odoo/o-spreadsheet 17.0.67 → 17.0.69
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.
- package/dist/o-spreadsheet.cjs.js +128 -45
- package/dist/o-spreadsheet.esm.js +128 -45
- package/dist/o-spreadsheet.iife.js +128 -45
- package/dist/o-spreadsheet.iife.min.js +200 -200
- package/dist/o_spreadsheet.xml +5 -5
- package/package.json +1 -3
|
@@ -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.0.
|
|
6
|
-
* @date 2025-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.69
|
|
6
|
+
* @date 2025-07-11T11:06:35.446Z
|
|
7
|
+
* @hash 8c0d3da
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -4587,6 +4587,8 @@ function splitWordToSpecificWidth(ctx, word, width, style) {
|
|
|
4587
4587
|
function splitTextToWidth(ctx, text, style, width) {
|
|
4588
4588
|
if (!style)
|
|
4589
4589
|
style = {};
|
|
4590
|
+
if (isMarkdownLink(text))
|
|
4591
|
+
text = parseMarkdownLink(text).label;
|
|
4590
4592
|
const brokenText = [];
|
|
4591
4593
|
// Checking if text contains NEWLINE before split makes it very slightly slower if text contains it,
|
|
4592
4594
|
// but 5-10x faster if it doesn't
|
|
@@ -32341,38 +32343,111 @@ function applyStyleToZone(appliedStyle, zone, cells, styles) {
|
|
|
32341
32343
|
* In all the sheets, replace the table-only references in the formula cells with standard references.
|
|
32342
32344
|
*/
|
|
32343
32345
|
function convertTableFormulaReferences(convertedSheets, xlsxSheets) {
|
|
32346
|
+
let deconstructedSheets = null;
|
|
32344
32347
|
for (let tableSheet of convertedSheets) {
|
|
32345
32348
|
const tables = xlsxSheets.find((s) => isSheetNameEqual(s.sheetName, tableSheet.name)).tables;
|
|
32349
|
+
if (!tables || tables.length === 0) {
|
|
32350
|
+
continue;
|
|
32351
|
+
}
|
|
32352
|
+
// Only deconstruct sheets if we are sure there are tables to process
|
|
32353
|
+
if (!deconstructedSheets) {
|
|
32354
|
+
deconstructedSheets = deconstructSheets(convertedSheets);
|
|
32355
|
+
}
|
|
32346
32356
|
for (let table of tables) {
|
|
32347
|
-
|
|
32348
|
-
|
|
32349
|
-
for (let xc in
|
|
32350
|
-
const
|
|
32351
|
-
|
|
32352
|
-
|
|
32353
|
-
|
|
32354
|
-
|
|
32355
|
-
let openBrackets = 1;
|
|
32356
|
-
while (openBrackets > 0 && endIndex < cell.content.length) {
|
|
32357
|
-
if (cell.content[endIndex] === "[") {
|
|
32358
|
-
openBrackets++;
|
|
32359
|
-
}
|
|
32360
|
-
else if (cell.content[endIndex] === "]") {
|
|
32361
|
-
openBrackets--;
|
|
32362
|
-
}
|
|
32363
|
-
endIndex++;
|
|
32364
|
-
}
|
|
32365
|
-
let reference = cell.content.slice(refIndex + tabRef.length, endIndex - 1);
|
|
32366
|
-
const sheetPrefix = tableSheet.id === sheet.id ? "" : tableSheet.name + "!";
|
|
32367
|
-
const convertedRef = convertTableReference(sheetPrefix, reference, table, xc);
|
|
32368
|
-
cell.content =
|
|
32369
|
-
cell.content.slice(0, refIndex) + convertedRef + cell.content.slice(endIndex);
|
|
32357
|
+
for (let sheetId in deconstructedSheets) {
|
|
32358
|
+
const sheet = convertedSheets.find((s) => s.id === sheetId);
|
|
32359
|
+
for (let xc in deconstructedSheets[sheetId]) {
|
|
32360
|
+
const deconstructedCell = deconstructedSheets[sheetId][xc];
|
|
32361
|
+
for (let i = deconstructedCell.length - 3; i >= 0; i -= 2) {
|
|
32362
|
+
const possibleTable = deconstructedSheets[sheetId][xc][i];
|
|
32363
|
+
if (!possibleTable.endsWith(table.name)) {
|
|
32364
|
+
continue;
|
|
32370
32365
|
}
|
|
32366
|
+
const possibleRef = deconstructedSheets[sheetId][xc][i + 1];
|
|
32367
|
+
const sheetPrefix = tableSheet.id === sheet.id ? "" : tableSheet.name + "!";
|
|
32368
|
+
const convertedRef = convertTableReference(sheetPrefix, possibleRef, table, xc);
|
|
32369
|
+
deconstructedSheets[sheetId][xc][i + 2] =
|
|
32370
|
+
possibleTable.slice(0, possibleTable.indexOf(table.name)) +
|
|
32371
|
+
convertedRef +
|
|
32372
|
+
deconstructedSheets[sheetId][xc][i + 2];
|
|
32373
|
+
deconstructedSheets[sheetId][xc].splice(i, 2);
|
|
32374
|
+
}
|
|
32375
|
+
}
|
|
32376
|
+
}
|
|
32377
|
+
}
|
|
32378
|
+
}
|
|
32379
|
+
if (!deconstructedSheets) {
|
|
32380
|
+
return;
|
|
32381
|
+
}
|
|
32382
|
+
for (let sheetId in deconstructedSheets) {
|
|
32383
|
+
const sheet = convertedSheets.find((s) => s.id === sheetId);
|
|
32384
|
+
for (let xc in deconstructedSheets[sheetId]) {
|
|
32385
|
+
const deconstructedCell = deconstructedSheets[sheetId][xc];
|
|
32386
|
+
if (deconstructedCell.length === 1) {
|
|
32387
|
+
sheet.cells[xc].content = deconstructedCell[0];
|
|
32388
|
+
continue;
|
|
32389
|
+
}
|
|
32390
|
+
let newContent = "";
|
|
32391
|
+
for (let i = 0; i < deconstructedCell.length; i += 2) {
|
|
32392
|
+
newContent += deconstructedCell[i] + "[" + deconstructedCell[i + 1] + "]";
|
|
32393
|
+
}
|
|
32394
|
+
newContent += deconstructedCell[deconstructedCell.length - 1];
|
|
32395
|
+
sheet.cells[xc].content = newContent;
|
|
32396
|
+
}
|
|
32397
|
+
}
|
|
32398
|
+
}
|
|
32399
|
+
/**
|
|
32400
|
+
* Deconstruct the content of the cells in the sheets to extract possible table references.
|
|
32401
|
+
* Example from "=AVERAGE(Table1[colName1])-AVERAGE(Table2[colName2])":
|
|
32402
|
+
* return --> ["=AVERAGE(Table1", "colName1", ")-AVERAGE(Table2", "colName2", ")"]
|
|
32403
|
+
*/
|
|
32404
|
+
function deconstructSheets(convertedSheets) {
|
|
32405
|
+
const deconstructedSheets = {};
|
|
32406
|
+
for (let sheet of convertedSheets) {
|
|
32407
|
+
for (let xc in sheet.cells) {
|
|
32408
|
+
const cellContent = sheet.cells[xc]?.content;
|
|
32409
|
+
if (!cellContent || !cellContent.startsWith("=")) {
|
|
32410
|
+
continue;
|
|
32411
|
+
}
|
|
32412
|
+
const startIndex = cellContent.indexOf("[");
|
|
32413
|
+
if (startIndex === -1) {
|
|
32414
|
+
continue;
|
|
32415
|
+
}
|
|
32416
|
+
const deconstructedCell = [];
|
|
32417
|
+
let possibleTable = cellContent.slice(0, startIndex);
|
|
32418
|
+
let possibleRef = "";
|
|
32419
|
+
let openBrackets = 1;
|
|
32420
|
+
let mainPossibleTableIndex = 0;
|
|
32421
|
+
let mainOpenBracketIndex = startIndex;
|
|
32422
|
+
for (let index = startIndex + 1; index < cellContent.length; index++) {
|
|
32423
|
+
if (cellContent[index] === "[") {
|
|
32424
|
+
if (openBrackets === 0) {
|
|
32425
|
+
possibleTable = cellContent.slice(mainPossibleTableIndex, index);
|
|
32426
|
+
mainOpenBracketIndex = index;
|
|
32427
|
+
}
|
|
32428
|
+
openBrackets++;
|
|
32429
|
+
continue;
|
|
32430
|
+
}
|
|
32431
|
+
if (cellContent[index] === "]") {
|
|
32432
|
+
openBrackets--;
|
|
32433
|
+
if (openBrackets === 0) {
|
|
32434
|
+
possibleRef = cellContent.slice(mainOpenBracketIndex + 1, index);
|
|
32435
|
+
deconstructedCell.push(possibleTable);
|
|
32436
|
+
deconstructedCell.push(possibleRef);
|
|
32437
|
+
mainPossibleTableIndex = index + 1;
|
|
32371
32438
|
}
|
|
32372
32439
|
}
|
|
32373
32440
|
}
|
|
32441
|
+
if (deconstructedCell.length) {
|
|
32442
|
+
if (!deconstructedSheets[sheet.id]) {
|
|
32443
|
+
deconstructedSheets[sheet.id] = {};
|
|
32444
|
+
}
|
|
32445
|
+
deconstructedCell.push(cellContent.slice(mainPossibleTableIndex));
|
|
32446
|
+
deconstructedSheets[sheet.id][xc] = [...deconstructedCell];
|
|
32447
|
+
}
|
|
32374
32448
|
}
|
|
32375
32449
|
}
|
|
32450
|
+
return deconstructedSheets;
|
|
32376
32451
|
}
|
|
32377
32452
|
/**
|
|
32378
32453
|
* Convert table-specific references in formulas into standard references. A table reference is composed of columns names,
|
|
@@ -52503,14 +52578,12 @@ class BottomBarSheet extends owl.Component {
|
|
|
52503
52578
|
this.editionState = "initializing";
|
|
52504
52579
|
}
|
|
52505
52580
|
stopEdition() {
|
|
52506
|
-
|
|
52507
|
-
if (!this.state.isEditing || !input)
|
|
52581
|
+
if (!this.state.isEditing || !this.sheetNameRef.el)
|
|
52508
52582
|
return;
|
|
52509
52583
|
this.state.isEditing = false;
|
|
52510
52584
|
this.editionState = "initializing";
|
|
52511
|
-
|
|
52585
|
+
this.sheetNameRef.el.blur();
|
|
52512
52586
|
const inputValue = this.getInputContent() || "";
|
|
52513
|
-
input.innerText = inputValue;
|
|
52514
52587
|
interactiveRenameSheet(this.env, this.props.sheetId, inputValue, () => this.startEdition());
|
|
52515
52588
|
}
|
|
52516
52589
|
cancelEdition() {
|
|
@@ -55629,26 +55702,28 @@ class SelectionStreamProcessorImpl {
|
|
|
55629
55702
|
bottom: Math.min(this.getters.getNumberRows(sheetId) - 1, bottom),
|
|
55630
55703
|
};
|
|
55631
55704
|
};
|
|
55632
|
-
const {
|
|
55705
|
+
const { cell: refCell, zone: refZone } = this.getReferenceAnchor();
|
|
55706
|
+
const { col: refCol, row: refRow } = refCell;
|
|
55633
55707
|
// check if we can shrink selection
|
|
55634
55708
|
let n = 0;
|
|
55635
55709
|
while (result !== null) {
|
|
55636
55710
|
n++;
|
|
55637
55711
|
if (deltaCol < 0) {
|
|
55638
55712
|
const newRight = this.getNextAvailableCol(deltaCol, right - (n - 1), refRow);
|
|
55639
|
-
result =
|
|
55713
|
+
result = refZone.right <= right - n ? expand({ top, left, bottom, right: newRight }) : null;
|
|
55640
55714
|
}
|
|
55641
55715
|
if (deltaCol > 0) {
|
|
55642
55716
|
const newLeft = this.getNextAvailableCol(deltaCol, left + (n - 1), refRow);
|
|
55643
|
-
result = left + n <=
|
|
55717
|
+
result = left + n <= refZone.left ? expand({ top, left: newLeft, bottom, right }) : null;
|
|
55644
55718
|
}
|
|
55645
55719
|
if (deltaRow < 0) {
|
|
55646
55720
|
const newBottom = this.getNextAvailableRow(deltaRow, refCol, bottom - (n - 1));
|
|
55647
|
-
result =
|
|
55721
|
+
result =
|
|
55722
|
+
refZone.bottom <= bottom - n ? expand({ top, left, bottom: newBottom, right }) : null;
|
|
55648
55723
|
}
|
|
55649
55724
|
if (deltaRow > 0) {
|
|
55650
55725
|
const newTop = this.getNextAvailableRow(deltaRow, refCol, top + (n - 1));
|
|
55651
|
-
result = top + n <=
|
|
55726
|
+
result = top + n <= refZone.top ? expand({ top: newTop, left, bottom, right }) : null;
|
|
55652
55727
|
}
|
|
55653
55728
|
result = result ? organizeZone(result) : result;
|
|
55654
55729
|
if (result && !isEqual(result, anchor.zone)) {
|
|
@@ -55877,18 +55952,26 @@ class SelectionStreamProcessorImpl {
|
|
|
55877
55952
|
* If the anchor is hidden, browses from left to right and top to bottom to
|
|
55878
55953
|
* find a visible cell.
|
|
55879
55954
|
*/
|
|
55880
|
-
|
|
55955
|
+
getReferenceAnchor() {
|
|
55881
55956
|
const sheetId = this.getters.getActiveSheetId();
|
|
55882
55957
|
const anchor = this.anchor;
|
|
55883
55958
|
const { left, right, top, bottom } = anchor.zone;
|
|
55884
55959
|
const { col: anchorCol, row: anchorRow } = anchor.cell;
|
|
55960
|
+
const col = this.getters.isColHidden(sheetId, anchorCol)
|
|
55961
|
+
? this.getters.findVisibleHeader(sheetId, "COL", left, right) || anchorCol
|
|
55962
|
+
: anchorCol;
|
|
55963
|
+
const row = this.getters.isRowHidden(sheetId, anchorRow)
|
|
55964
|
+
? this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) || anchorRow
|
|
55965
|
+
: anchorRow;
|
|
55966
|
+
const zone = this.getters.expandZone(sheetId, {
|
|
55967
|
+
left: col,
|
|
55968
|
+
right: col,
|
|
55969
|
+
top: row,
|
|
55970
|
+
bottom: row,
|
|
55971
|
+
});
|
|
55885
55972
|
return {
|
|
55886
|
-
|
|
55887
|
-
|
|
55888
|
-
: anchorCol,
|
|
55889
|
-
row: this.getters.isRowHidden(sheetId, anchorRow)
|
|
55890
|
-
? this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) || anchorRow
|
|
55891
|
-
: anchorRow,
|
|
55973
|
+
cell: { col, row },
|
|
55974
|
+
zone,
|
|
55892
55975
|
};
|
|
55893
55976
|
}
|
|
55894
55977
|
deltaToTarget(position, direction, step) {
|
|
@@ -58353,6 +58436,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
58353
58436
|
exports.tokenize = tokenize;
|
|
58354
58437
|
|
|
58355
58438
|
|
|
58356
|
-
__info__.version = "17.0.
|
|
58357
|
-
__info__.date = "2025-
|
|
58358
|
-
__info__.hash = "
|
|
58439
|
+
__info__.version = "17.0.69";
|
|
58440
|
+
__info__.date = "2025-07-11T11:06:35.446Z";
|
|
58441
|
+
__info__.hash = "8c0d3da";
|
|
@@ -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.0.
|
|
6
|
-
* @date 2025-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.69
|
|
6
|
+
* @date 2025-07-11T11:06:35.446Z
|
|
7
|
+
* @hash 8c0d3da
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { Component, useRef, onMounted, useEffect, onWillPatch, useState, onWillUpdateProps, onPatched, useComponent, useExternalListener, onWillUnmount, onWillStart, xml, useChildSubEnv, useSubEnv, markRaw } from '@odoo/owl';
|
|
@@ -4585,6 +4585,8 @@ function splitWordToSpecificWidth(ctx, word, width, style) {
|
|
|
4585
4585
|
function splitTextToWidth(ctx, text, style, width) {
|
|
4586
4586
|
if (!style)
|
|
4587
4587
|
style = {};
|
|
4588
|
+
if (isMarkdownLink(text))
|
|
4589
|
+
text = parseMarkdownLink(text).label;
|
|
4588
4590
|
const brokenText = [];
|
|
4589
4591
|
// Checking if text contains NEWLINE before split makes it very slightly slower if text contains it,
|
|
4590
4592
|
// but 5-10x faster if it doesn't
|
|
@@ -32339,38 +32341,111 @@ function applyStyleToZone(appliedStyle, zone, cells, styles) {
|
|
|
32339
32341
|
* In all the sheets, replace the table-only references in the formula cells with standard references.
|
|
32340
32342
|
*/
|
|
32341
32343
|
function convertTableFormulaReferences(convertedSheets, xlsxSheets) {
|
|
32344
|
+
let deconstructedSheets = null;
|
|
32342
32345
|
for (let tableSheet of convertedSheets) {
|
|
32343
32346
|
const tables = xlsxSheets.find((s) => isSheetNameEqual(s.sheetName, tableSheet.name)).tables;
|
|
32347
|
+
if (!tables || tables.length === 0) {
|
|
32348
|
+
continue;
|
|
32349
|
+
}
|
|
32350
|
+
// Only deconstruct sheets if we are sure there are tables to process
|
|
32351
|
+
if (!deconstructedSheets) {
|
|
32352
|
+
deconstructedSheets = deconstructSheets(convertedSheets);
|
|
32353
|
+
}
|
|
32344
32354
|
for (let table of tables) {
|
|
32345
|
-
|
|
32346
|
-
|
|
32347
|
-
for (let xc in
|
|
32348
|
-
const
|
|
32349
|
-
|
|
32350
|
-
|
|
32351
|
-
|
|
32352
|
-
|
|
32353
|
-
let openBrackets = 1;
|
|
32354
|
-
while (openBrackets > 0 && endIndex < cell.content.length) {
|
|
32355
|
-
if (cell.content[endIndex] === "[") {
|
|
32356
|
-
openBrackets++;
|
|
32357
|
-
}
|
|
32358
|
-
else if (cell.content[endIndex] === "]") {
|
|
32359
|
-
openBrackets--;
|
|
32360
|
-
}
|
|
32361
|
-
endIndex++;
|
|
32362
|
-
}
|
|
32363
|
-
let reference = cell.content.slice(refIndex + tabRef.length, endIndex - 1);
|
|
32364
|
-
const sheetPrefix = tableSheet.id === sheet.id ? "" : tableSheet.name + "!";
|
|
32365
|
-
const convertedRef = convertTableReference(sheetPrefix, reference, table, xc);
|
|
32366
|
-
cell.content =
|
|
32367
|
-
cell.content.slice(0, refIndex) + convertedRef + cell.content.slice(endIndex);
|
|
32355
|
+
for (let sheetId in deconstructedSheets) {
|
|
32356
|
+
const sheet = convertedSheets.find((s) => s.id === sheetId);
|
|
32357
|
+
for (let xc in deconstructedSheets[sheetId]) {
|
|
32358
|
+
const deconstructedCell = deconstructedSheets[sheetId][xc];
|
|
32359
|
+
for (let i = deconstructedCell.length - 3; i >= 0; i -= 2) {
|
|
32360
|
+
const possibleTable = deconstructedSheets[sheetId][xc][i];
|
|
32361
|
+
if (!possibleTable.endsWith(table.name)) {
|
|
32362
|
+
continue;
|
|
32368
32363
|
}
|
|
32364
|
+
const possibleRef = deconstructedSheets[sheetId][xc][i + 1];
|
|
32365
|
+
const sheetPrefix = tableSheet.id === sheet.id ? "" : tableSheet.name + "!";
|
|
32366
|
+
const convertedRef = convertTableReference(sheetPrefix, possibleRef, table, xc);
|
|
32367
|
+
deconstructedSheets[sheetId][xc][i + 2] =
|
|
32368
|
+
possibleTable.slice(0, possibleTable.indexOf(table.name)) +
|
|
32369
|
+
convertedRef +
|
|
32370
|
+
deconstructedSheets[sheetId][xc][i + 2];
|
|
32371
|
+
deconstructedSheets[sheetId][xc].splice(i, 2);
|
|
32372
|
+
}
|
|
32373
|
+
}
|
|
32374
|
+
}
|
|
32375
|
+
}
|
|
32376
|
+
}
|
|
32377
|
+
if (!deconstructedSheets) {
|
|
32378
|
+
return;
|
|
32379
|
+
}
|
|
32380
|
+
for (let sheetId in deconstructedSheets) {
|
|
32381
|
+
const sheet = convertedSheets.find((s) => s.id === sheetId);
|
|
32382
|
+
for (let xc in deconstructedSheets[sheetId]) {
|
|
32383
|
+
const deconstructedCell = deconstructedSheets[sheetId][xc];
|
|
32384
|
+
if (deconstructedCell.length === 1) {
|
|
32385
|
+
sheet.cells[xc].content = deconstructedCell[0];
|
|
32386
|
+
continue;
|
|
32387
|
+
}
|
|
32388
|
+
let newContent = "";
|
|
32389
|
+
for (let i = 0; i < deconstructedCell.length; i += 2) {
|
|
32390
|
+
newContent += deconstructedCell[i] + "[" + deconstructedCell[i + 1] + "]";
|
|
32391
|
+
}
|
|
32392
|
+
newContent += deconstructedCell[deconstructedCell.length - 1];
|
|
32393
|
+
sheet.cells[xc].content = newContent;
|
|
32394
|
+
}
|
|
32395
|
+
}
|
|
32396
|
+
}
|
|
32397
|
+
/**
|
|
32398
|
+
* Deconstruct the content of the cells in the sheets to extract possible table references.
|
|
32399
|
+
* Example from "=AVERAGE(Table1[colName1])-AVERAGE(Table2[colName2])":
|
|
32400
|
+
* return --> ["=AVERAGE(Table1", "colName1", ")-AVERAGE(Table2", "colName2", ")"]
|
|
32401
|
+
*/
|
|
32402
|
+
function deconstructSheets(convertedSheets) {
|
|
32403
|
+
const deconstructedSheets = {};
|
|
32404
|
+
for (let sheet of convertedSheets) {
|
|
32405
|
+
for (let xc in sheet.cells) {
|
|
32406
|
+
const cellContent = sheet.cells[xc]?.content;
|
|
32407
|
+
if (!cellContent || !cellContent.startsWith("=")) {
|
|
32408
|
+
continue;
|
|
32409
|
+
}
|
|
32410
|
+
const startIndex = cellContent.indexOf("[");
|
|
32411
|
+
if (startIndex === -1) {
|
|
32412
|
+
continue;
|
|
32413
|
+
}
|
|
32414
|
+
const deconstructedCell = [];
|
|
32415
|
+
let possibleTable = cellContent.slice(0, startIndex);
|
|
32416
|
+
let possibleRef = "";
|
|
32417
|
+
let openBrackets = 1;
|
|
32418
|
+
let mainPossibleTableIndex = 0;
|
|
32419
|
+
let mainOpenBracketIndex = startIndex;
|
|
32420
|
+
for (let index = startIndex + 1; index < cellContent.length; index++) {
|
|
32421
|
+
if (cellContent[index] === "[") {
|
|
32422
|
+
if (openBrackets === 0) {
|
|
32423
|
+
possibleTable = cellContent.slice(mainPossibleTableIndex, index);
|
|
32424
|
+
mainOpenBracketIndex = index;
|
|
32425
|
+
}
|
|
32426
|
+
openBrackets++;
|
|
32427
|
+
continue;
|
|
32428
|
+
}
|
|
32429
|
+
if (cellContent[index] === "]") {
|
|
32430
|
+
openBrackets--;
|
|
32431
|
+
if (openBrackets === 0) {
|
|
32432
|
+
possibleRef = cellContent.slice(mainOpenBracketIndex + 1, index);
|
|
32433
|
+
deconstructedCell.push(possibleTable);
|
|
32434
|
+
deconstructedCell.push(possibleRef);
|
|
32435
|
+
mainPossibleTableIndex = index + 1;
|
|
32369
32436
|
}
|
|
32370
32437
|
}
|
|
32371
32438
|
}
|
|
32439
|
+
if (deconstructedCell.length) {
|
|
32440
|
+
if (!deconstructedSheets[sheet.id]) {
|
|
32441
|
+
deconstructedSheets[sheet.id] = {};
|
|
32442
|
+
}
|
|
32443
|
+
deconstructedCell.push(cellContent.slice(mainPossibleTableIndex));
|
|
32444
|
+
deconstructedSheets[sheet.id][xc] = [...deconstructedCell];
|
|
32445
|
+
}
|
|
32372
32446
|
}
|
|
32373
32447
|
}
|
|
32448
|
+
return deconstructedSheets;
|
|
32374
32449
|
}
|
|
32375
32450
|
/**
|
|
32376
32451
|
* Convert table-specific references in formulas into standard references. A table reference is composed of columns names,
|
|
@@ -52501,14 +52576,12 @@ class BottomBarSheet extends Component {
|
|
|
52501
52576
|
this.editionState = "initializing";
|
|
52502
52577
|
}
|
|
52503
52578
|
stopEdition() {
|
|
52504
|
-
|
|
52505
|
-
if (!this.state.isEditing || !input)
|
|
52579
|
+
if (!this.state.isEditing || !this.sheetNameRef.el)
|
|
52506
52580
|
return;
|
|
52507
52581
|
this.state.isEditing = false;
|
|
52508
52582
|
this.editionState = "initializing";
|
|
52509
|
-
|
|
52583
|
+
this.sheetNameRef.el.blur();
|
|
52510
52584
|
const inputValue = this.getInputContent() || "";
|
|
52511
|
-
input.innerText = inputValue;
|
|
52512
52585
|
interactiveRenameSheet(this.env, this.props.sheetId, inputValue, () => this.startEdition());
|
|
52513
52586
|
}
|
|
52514
52587
|
cancelEdition() {
|
|
@@ -55627,26 +55700,28 @@ class SelectionStreamProcessorImpl {
|
|
|
55627
55700
|
bottom: Math.min(this.getters.getNumberRows(sheetId) - 1, bottom),
|
|
55628
55701
|
};
|
|
55629
55702
|
};
|
|
55630
|
-
const {
|
|
55703
|
+
const { cell: refCell, zone: refZone } = this.getReferenceAnchor();
|
|
55704
|
+
const { col: refCol, row: refRow } = refCell;
|
|
55631
55705
|
// check if we can shrink selection
|
|
55632
55706
|
let n = 0;
|
|
55633
55707
|
while (result !== null) {
|
|
55634
55708
|
n++;
|
|
55635
55709
|
if (deltaCol < 0) {
|
|
55636
55710
|
const newRight = this.getNextAvailableCol(deltaCol, right - (n - 1), refRow);
|
|
55637
|
-
result =
|
|
55711
|
+
result = refZone.right <= right - n ? expand({ top, left, bottom, right: newRight }) : null;
|
|
55638
55712
|
}
|
|
55639
55713
|
if (deltaCol > 0) {
|
|
55640
55714
|
const newLeft = this.getNextAvailableCol(deltaCol, left + (n - 1), refRow);
|
|
55641
|
-
result = left + n <=
|
|
55715
|
+
result = left + n <= refZone.left ? expand({ top, left: newLeft, bottom, right }) : null;
|
|
55642
55716
|
}
|
|
55643
55717
|
if (deltaRow < 0) {
|
|
55644
55718
|
const newBottom = this.getNextAvailableRow(deltaRow, refCol, bottom - (n - 1));
|
|
55645
|
-
result =
|
|
55719
|
+
result =
|
|
55720
|
+
refZone.bottom <= bottom - n ? expand({ top, left, bottom: newBottom, right }) : null;
|
|
55646
55721
|
}
|
|
55647
55722
|
if (deltaRow > 0) {
|
|
55648
55723
|
const newTop = this.getNextAvailableRow(deltaRow, refCol, top + (n - 1));
|
|
55649
|
-
result = top + n <=
|
|
55724
|
+
result = top + n <= refZone.top ? expand({ top: newTop, left, bottom, right }) : null;
|
|
55650
55725
|
}
|
|
55651
55726
|
result = result ? organizeZone(result) : result;
|
|
55652
55727
|
if (result && !isEqual(result, anchor.zone)) {
|
|
@@ -55875,18 +55950,26 @@ class SelectionStreamProcessorImpl {
|
|
|
55875
55950
|
* If the anchor is hidden, browses from left to right and top to bottom to
|
|
55876
55951
|
* find a visible cell.
|
|
55877
55952
|
*/
|
|
55878
|
-
|
|
55953
|
+
getReferenceAnchor() {
|
|
55879
55954
|
const sheetId = this.getters.getActiveSheetId();
|
|
55880
55955
|
const anchor = this.anchor;
|
|
55881
55956
|
const { left, right, top, bottom } = anchor.zone;
|
|
55882
55957
|
const { col: anchorCol, row: anchorRow } = anchor.cell;
|
|
55958
|
+
const col = this.getters.isColHidden(sheetId, anchorCol)
|
|
55959
|
+
? this.getters.findVisibleHeader(sheetId, "COL", left, right) || anchorCol
|
|
55960
|
+
: anchorCol;
|
|
55961
|
+
const row = this.getters.isRowHidden(sheetId, anchorRow)
|
|
55962
|
+
? this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) || anchorRow
|
|
55963
|
+
: anchorRow;
|
|
55964
|
+
const zone = this.getters.expandZone(sheetId, {
|
|
55965
|
+
left: col,
|
|
55966
|
+
right: col,
|
|
55967
|
+
top: row,
|
|
55968
|
+
bottom: row,
|
|
55969
|
+
});
|
|
55883
55970
|
return {
|
|
55884
|
-
|
|
55885
|
-
|
|
55886
|
-
: anchorCol,
|
|
55887
|
-
row: this.getters.isRowHidden(sheetId, anchorRow)
|
|
55888
|
-
? this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) || anchorRow
|
|
55889
|
-
: anchorRow,
|
|
55971
|
+
cell: { col, row },
|
|
55972
|
+
zone,
|
|
55890
55973
|
};
|
|
55891
55974
|
}
|
|
55892
55975
|
deltaToTarget(position, direction, step) {
|
|
@@ -58316,6 +58399,6 @@ const constants = {
|
|
|
58316
58399
|
export { AbstractChart, 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 };
|
|
58317
58400
|
|
|
58318
58401
|
|
|
58319
|
-
__info__.version = "17.0.
|
|
58320
|
-
__info__.date = "2025-
|
|
58321
|
-
__info__.hash = "
|
|
58402
|
+
__info__.version = "17.0.69";
|
|
58403
|
+
__info__.date = "2025-07-11T11:06:35.446Z";
|
|
58404
|
+
__info__.hash = "8c0d3da";
|