@odoo/o-spreadsheet 16.0.66 → 16.0.68
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 +46 -23
- package/dist/o-spreadsheet.esm.js +46 -23
- package/dist/o-spreadsheet.iife.js +46 -23
- package/dist/o-spreadsheet.iife.min.js +230 -230
- package/dist/o_spreadsheet.xml +3 -3
- package/package.json +1 -1
|
@@ -2373,6 +2373,13 @@ function createDefaultRows(rowNumber) {
|
|
|
2373
2373
|
rows.push(row);
|
|
2374
2374
|
}
|
|
2375
2375
|
return rows;
|
|
2376
|
+
}
|
|
2377
|
+
function isSheetNameEqual(name1, name2) {
|
|
2378
|
+
if (name1 === undefined || name2 === undefined) {
|
|
2379
|
+
return false;
|
|
2380
|
+
}
|
|
2381
|
+
return (getUnquotedSheetName(name1.trim().toUpperCase()) ===
|
|
2382
|
+
getUnquotedSheetName(name2.trim().toUpperCase()));
|
|
2376
2383
|
}
|
|
2377
2384
|
|
|
2378
2385
|
/*
|
|
@@ -6956,7 +6963,7 @@ function transformZone(zone, executed) {
|
|
|
6956
6963
|
if (executed.type === "ADD_COLUMNS_ROWS") {
|
|
6957
6964
|
return expandZoneOnInsertion(zone, executed.dimension === "COL" ? "left" : "top", executed.base, executed.position, executed.quantity);
|
|
6958
6965
|
}
|
|
6959
|
-
return
|
|
6966
|
+
return zone;
|
|
6960
6967
|
}
|
|
6961
6968
|
|
|
6962
6969
|
/**
|
|
@@ -18419,7 +18426,13 @@ function tokenizeString(chars) {
|
|
|
18419
18426
|
}
|
|
18420
18427
|
return null;
|
|
18421
18428
|
}
|
|
18422
|
-
|
|
18429
|
+
/**
|
|
18430
|
+
- \p{L} is for any letter (from any language)
|
|
18431
|
+
- \p{N} is for any number
|
|
18432
|
+
- the u flag at the end is for unicode, which enables the `\p{...}` syntax
|
|
18433
|
+
*/
|
|
18434
|
+
const unicodeSymbolCharRegexp = /\p{L}|\p{N}|_|\.|!|\$/u;
|
|
18435
|
+
const SYMBOL_CHARS = new Set("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.!$");
|
|
18423
18436
|
/**
|
|
18424
18437
|
* A "Symbol" is just basically any word-like element that can appear in a
|
|
18425
18438
|
* formula, which is not a string. So:
|
|
@@ -18459,7 +18472,7 @@ function tokenizeSymbol(chars) {
|
|
|
18459
18472
|
};
|
|
18460
18473
|
}
|
|
18461
18474
|
}
|
|
18462
|
-
while (chars[0] && chars[0].match(
|
|
18475
|
+
while (chars[0] && (SYMBOL_CHARS.has(chars[0]) || chars[0].match(unicodeSymbolCharRegexp))) {
|
|
18463
18476
|
result += chars.shift();
|
|
18464
18477
|
}
|
|
18465
18478
|
if (result.length) {
|
|
@@ -19631,7 +19644,7 @@ class EditionPlugin extends UIPlugin {
|
|
|
19631
19644
|
const { xc, sheetName: sheet } = splitReference(token.value);
|
|
19632
19645
|
const sheetName = sheet || this.getters.getSheetName(this.sheetId);
|
|
19633
19646
|
const activeSheetId = this.getters.getActiveSheetId();
|
|
19634
|
-
if (this.getters.getSheetName(activeSheetId)
|
|
19647
|
+
if (!isSheetNameEqual(this.getters.getSheetName(activeSheetId), sheetName)) {
|
|
19635
19648
|
return false;
|
|
19636
19649
|
}
|
|
19637
19650
|
const refRange = this.getters.getRangeFromSheetXC(activeSheetId, xc);
|
|
@@ -21710,18 +21723,28 @@ figureRegistry.add("chart", { Component: ChartFigure, SidePanelComponent: "Chart
|
|
|
21710
21723
|
function useInterval(callback, delay) {
|
|
21711
21724
|
let intervalId;
|
|
21712
21725
|
const { setInterval, clearInterval } = window;
|
|
21726
|
+
const pause = () => {
|
|
21727
|
+
clearInterval(intervalId);
|
|
21728
|
+
intervalId = undefined;
|
|
21729
|
+
};
|
|
21730
|
+
const safeCallback = () => {
|
|
21731
|
+
try {
|
|
21732
|
+
callback();
|
|
21733
|
+
}
|
|
21734
|
+
catch (e) {
|
|
21735
|
+
pause();
|
|
21736
|
+
throw e;
|
|
21737
|
+
}
|
|
21738
|
+
};
|
|
21713
21739
|
owl.useEffect(() => {
|
|
21714
|
-
intervalId = setInterval(
|
|
21740
|
+
intervalId = setInterval(safeCallback, delay);
|
|
21715
21741
|
return () => clearInterval(intervalId);
|
|
21716
21742
|
}, () => [delay]);
|
|
21717
21743
|
return {
|
|
21718
|
-
pause
|
|
21719
|
-
clearInterval(intervalId);
|
|
21720
|
-
intervalId = undefined;
|
|
21721
|
-
},
|
|
21744
|
+
pause,
|
|
21722
21745
|
resume: () => {
|
|
21723
21746
|
if (intervalId === undefined) {
|
|
21724
|
-
intervalId = setInterval(
|
|
21747
|
+
intervalId = setInterval(safeCallback, delay);
|
|
21725
21748
|
}
|
|
21726
21749
|
},
|
|
21727
21750
|
};
|
|
@@ -25026,7 +25049,7 @@ function getRangeSize(reference, defaultSheetIndex, data) {
|
|
|
25026
25049
|
({ xc, sheetName } = splitReference(reference));
|
|
25027
25050
|
let rangeSheetIndex;
|
|
25028
25051
|
if (sheetName) {
|
|
25029
|
-
const index = data.sheets.findIndex((sheet) => sheet.name
|
|
25052
|
+
const index = data.sheets.findIndex((sheet) => isSheetNameEqual(sheet.name, sheetName));
|
|
25030
25053
|
if (index < 0) {
|
|
25031
25054
|
throw new Error("Unable to find a sheet with the name " + sheetName);
|
|
25032
25055
|
}
|
|
@@ -25198,7 +25221,7 @@ function convertFormula(formula, data) {
|
|
|
25198
25221
|
var _a;
|
|
25199
25222
|
externalRefId = Number(externalRefId) - 1;
|
|
25200
25223
|
cellRef = cellRef.replace(/\$/g, "");
|
|
25201
|
-
const sheetIndex = data.externalBooks[externalRefId].sheetNames.findIndex((name) => name
|
|
25224
|
+
const sheetIndex = data.externalBooks[externalRefId].sheetNames.findIndex((name) => isSheetNameEqual(name, sheetName));
|
|
25202
25225
|
if (sheetIndex === -1) {
|
|
25203
25226
|
return match;
|
|
25204
25227
|
}
|
|
@@ -25537,7 +25560,7 @@ function applyStyleToZone(appliedStyle, zone, cells, styles) {
|
|
|
25537
25560
|
*/
|
|
25538
25561
|
function convertTableFormulaReferences(convertedSheets, xlsxSheets) {
|
|
25539
25562
|
for (let tableSheet of convertedSheets) {
|
|
25540
|
-
const tables = xlsxSheets.find((s) => s.sheetName
|
|
25563
|
+
const tables = xlsxSheets.find((s) => isSheetNameEqual(s.sheetName, tableSheet.name)).tables;
|
|
25541
25564
|
for (let table of tables) {
|
|
25542
25565
|
const tabRef = table.name + "[";
|
|
25543
25566
|
for (let sheet of convertedSheets) {
|
|
@@ -30735,7 +30758,7 @@ class SheetPlugin extends CorePlugin {
|
|
|
30735
30758
|
if (name) {
|
|
30736
30759
|
const unquotedName = getUnquotedSheetName(name);
|
|
30737
30760
|
for (const key in this.sheetIdsMapName) {
|
|
30738
|
-
if (key
|
|
30761
|
+
if (isSheetNameEqual(key, unquotedName)) {
|
|
30739
30762
|
return this.sheetIdsMapName[key];
|
|
30740
30763
|
}
|
|
30741
30764
|
}
|
|
@@ -30990,7 +31013,7 @@ class SheetPlugin extends CorePlugin {
|
|
|
30990
31013
|
checkSheetName(cmd) {
|
|
30991
31014
|
const { orderedSheetIds, sheets } = this;
|
|
30992
31015
|
const name = cmd.name && cmd.name.trim().toLowerCase();
|
|
30993
|
-
if (orderedSheetIds.find((id) => { var _a; return ((_a = sheets[id]) === null || _a === void 0 ? void 0 : _a.name
|
|
31016
|
+
if (orderedSheetIds.find((id) => { var _a; return isSheetNameEqual((_a = sheets[id]) === null || _a === void 0 ? void 0 : _a.name, name); })) {
|
|
30994
31017
|
return 11 /* CommandResult.DuplicatedSheetName */;
|
|
30995
31018
|
}
|
|
30996
31019
|
if (FORBIDDEN_IN_EXCEL_REGEX.test(name)) {
|
|
@@ -35255,6 +35278,8 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
35255
35278
|
const { col, row } = this.getters.getNextVisibleCellPosition(cmd.sheetIdTo, 0, 0);
|
|
35256
35279
|
this.selectCell(col, row);
|
|
35257
35280
|
}
|
|
35281
|
+
const { col, row } = this.gridSelection.anchor.cell;
|
|
35282
|
+
this.moveClient({ sheetId: this.activeSheet.id, col, row });
|
|
35258
35283
|
break;
|
|
35259
35284
|
}
|
|
35260
35285
|
case "REMOVE_COLUMNS_ROWS": {
|
|
@@ -36216,10 +36241,8 @@ function mergeTransformation(cmd, executed) {
|
|
|
36216
36241
|
}
|
|
36217
36242
|
const target = [];
|
|
36218
36243
|
for (const zone1 of cmd.target) {
|
|
36219
|
-
|
|
36220
|
-
|
|
36221
|
-
target.push({ ...zone1 });
|
|
36222
|
-
}
|
|
36244
|
+
if (executed.target.every((zone2) => !overlap(zone1, zone2))) {
|
|
36245
|
+
target.push(zone1);
|
|
36223
36246
|
}
|
|
36224
36247
|
}
|
|
36225
36248
|
if (target.length) {
|
|
@@ -40871,7 +40894,7 @@ class RangeAdapter {
|
|
|
40871
40894
|
if (range.sheetId === cmd.sheetId) {
|
|
40872
40895
|
return { changeType: "CHANGE", range };
|
|
40873
40896
|
}
|
|
40874
|
-
if (
|
|
40897
|
+
if (isSheetNameEqual(range.invalidSheetName, cmd.name)) {
|
|
40875
40898
|
const invalidSheetName = undefined;
|
|
40876
40899
|
const sheetId = cmd.sheetId;
|
|
40877
40900
|
const newRange = range.clone({ sheetId, invalidSheetName });
|
|
@@ -43778,6 +43801,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
43778
43801
|
exports.tokenize = tokenize;
|
|
43779
43802
|
|
|
43780
43803
|
|
|
43781
|
-
__info__.version = '16.0.
|
|
43782
|
-
__info__.date = '2025-
|
|
43783
|
-
__info__.hash = '
|
|
43804
|
+
__info__.version = '16.0.68';
|
|
43805
|
+
__info__.date = '2025-04-25T08:02:52.716Z';
|
|
43806
|
+
__info__.hash = '682d48e';
|
|
@@ -2369,6 +2369,13 @@ function createDefaultRows(rowNumber) {
|
|
|
2369
2369
|
rows.push(row);
|
|
2370
2370
|
}
|
|
2371
2371
|
return rows;
|
|
2372
|
+
}
|
|
2373
|
+
function isSheetNameEqual(name1, name2) {
|
|
2374
|
+
if (name1 === undefined || name2 === undefined) {
|
|
2375
|
+
return false;
|
|
2376
|
+
}
|
|
2377
|
+
return (getUnquotedSheetName(name1.trim().toUpperCase()) ===
|
|
2378
|
+
getUnquotedSheetName(name2.trim().toUpperCase()));
|
|
2372
2379
|
}
|
|
2373
2380
|
|
|
2374
2381
|
/*
|
|
@@ -6952,7 +6959,7 @@ function transformZone(zone, executed) {
|
|
|
6952
6959
|
if (executed.type === "ADD_COLUMNS_ROWS") {
|
|
6953
6960
|
return expandZoneOnInsertion(zone, executed.dimension === "COL" ? "left" : "top", executed.base, executed.position, executed.quantity);
|
|
6954
6961
|
}
|
|
6955
|
-
return
|
|
6962
|
+
return zone;
|
|
6956
6963
|
}
|
|
6957
6964
|
|
|
6958
6965
|
/**
|
|
@@ -18415,7 +18422,13 @@ function tokenizeString(chars) {
|
|
|
18415
18422
|
}
|
|
18416
18423
|
return null;
|
|
18417
18424
|
}
|
|
18418
|
-
|
|
18425
|
+
/**
|
|
18426
|
+
- \p{L} is for any letter (from any language)
|
|
18427
|
+
- \p{N} is for any number
|
|
18428
|
+
- the u flag at the end is for unicode, which enables the `\p{...}` syntax
|
|
18429
|
+
*/
|
|
18430
|
+
const unicodeSymbolCharRegexp = /\p{L}|\p{N}|_|\.|!|\$/u;
|
|
18431
|
+
const SYMBOL_CHARS = new Set("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.!$");
|
|
18419
18432
|
/**
|
|
18420
18433
|
* A "Symbol" is just basically any word-like element that can appear in a
|
|
18421
18434
|
* formula, which is not a string. So:
|
|
@@ -18455,7 +18468,7 @@ function tokenizeSymbol(chars) {
|
|
|
18455
18468
|
};
|
|
18456
18469
|
}
|
|
18457
18470
|
}
|
|
18458
|
-
while (chars[0] && chars[0].match(
|
|
18471
|
+
while (chars[0] && (SYMBOL_CHARS.has(chars[0]) || chars[0].match(unicodeSymbolCharRegexp))) {
|
|
18459
18472
|
result += chars.shift();
|
|
18460
18473
|
}
|
|
18461
18474
|
if (result.length) {
|
|
@@ -19627,7 +19640,7 @@ class EditionPlugin extends UIPlugin {
|
|
|
19627
19640
|
const { xc, sheetName: sheet } = splitReference(token.value);
|
|
19628
19641
|
const sheetName = sheet || this.getters.getSheetName(this.sheetId);
|
|
19629
19642
|
const activeSheetId = this.getters.getActiveSheetId();
|
|
19630
|
-
if (this.getters.getSheetName(activeSheetId)
|
|
19643
|
+
if (!isSheetNameEqual(this.getters.getSheetName(activeSheetId), sheetName)) {
|
|
19631
19644
|
return false;
|
|
19632
19645
|
}
|
|
19633
19646
|
const refRange = this.getters.getRangeFromSheetXC(activeSheetId, xc);
|
|
@@ -21706,18 +21719,28 @@ figureRegistry.add("chart", { Component: ChartFigure, SidePanelComponent: "Chart
|
|
|
21706
21719
|
function useInterval(callback, delay) {
|
|
21707
21720
|
let intervalId;
|
|
21708
21721
|
const { setInterval, clearInterval } = window;
|
|
21722
|
+
const pause = () => {
|
|
21723
|
+
clearInterval(intervalId);
|
|
21724
|
+
intervalId = undefined;
|
|
21725
|
+
};
|
|
21726
|
+
const safeCallback = () => {
|
|
21727
|
+
try {
|
|
21728
|
+
callback();
|
|
21729
|
+
}
|
|
21730
|
+
catch (e) {
|
|
21731
|
+
pause();
|
|
21732
|
+
throw e;
|
|
21733
|
+
}
|
|
21734
|
+
};
|
|
21709
21735
|
useEffect(() => {
|
|
21710
|
-
intervalId = setInterval(
|
|
21736
|
+
intervalId = setInterval(safeCallback, delay);
|
|
21711
21737
|
return () => clearInterval(intervalId);
|
|
21712
21738
|
}, () => [delay]);
|
|
21713
21739
|
return {
|
|
21714
|
-
pause
|
|
21715
|
-
clearInterval(intervalId);
|
|
21716
|
-
intervalId = undefined;
|
|
21717
|
-
},
|
|
21740
|
+
pause,
|
|
21718
21741
|
resume: () => {
|
|
21719
21742
|
if (intervalId === undefined) {
|
|
21720
|
-
intervalId = setInterval(
|
|
21743
|
+
intervalId = setInterval(safeCallback, delay);
|
|
21721
21744
|
}
|
|
21722
21745
|
},
|
|
21723
21746
|
};
|
|
@@ -25022,7 +25045,7 @@ function getRangeSize(reference, defaultSheetIndex, data) {
|
|
|
25022
25045
|
({ xc, sheetName } = splitReference(reference));
|
|
25023
25046
|
let rangeSheetIndex;
|
|
25024
25047
|
if (sheetName) {
|
|
25025
|
-
const index = data.sheets.findIndex((sheet) => sheet.name
|
|
25048
|
+
const index = data.sheets.findIndex((sheet) => isSheetNameEqual(sheet.name, sheetName));
|
|
25026
25049
|
if (index < 0) {
|
|
25027
25050
|
throw new Error("Unable to find a sheet with the name " + sheetName);
|
|
25028
25051
|
}
|
|
@@ -25194,7 +25217,7 @@ function convertFormula(formula, data) {
|
|
|
25194
25217
|
var _a;
|
|
25195
25218
|
externalRefId = Number(externalRefId) - 1;
|
|
25196
25219
|
cellRef = cellRef.replace(/\$/g, "");
|
|
25197
|
-
const sheetIndex = data.externalBooks[externalRefId].sheetNames.findIndex((name) => name
|
|
25220
|
+
const sheetIndex = data.externalBooks[externalRefId].sheetNames.findIndex((name) => isSheetNameEqual(name, sheetName));
|
|
25198
25221
|
if (sheetIndex === -1) {
|
|
25199
25222
|
return match;
|
|
25200
25223
|
}
|
|
@@ -25533,7 +25556,7 @@ function applyStyleToZone(appliedStyle, zone, cells, styles) {
|
|
|
25533
25556
|
*/
|
|
25534
25557
|
function convertTableFormulaReferences(convertedSheets, xlsxSheets) {
|
|
25535
25558
|
for (let tableSheet of convertedSheets) {
|
|
25536
|
-
const tables = xlsxSheets.find((s) => s.sheetName
|
|
25559
|
+
const tables = xlsxSheets.find((s) => isSheetNameEqual(s.sheetName, tableSheet.name)).tables;
|
|
25537
25560
|
for (let table of tables) {
|
|
25538
25561
|
const tabRef = table.name + "[";
|
|
25539
25562
|
for (let sheet of convertedSheets) {
|
|
@@ -30731,7 +30754,7 @@ class SheetPlugin extends CorePlugin {
|
|
|
30731
30754
|
if (name) {
|
|
30732
30755
|
const unquotedName = getUnquotedSheetName(name);
|
|
30733
30756
|
for (const key in this.sheetIdsMapName) {
|
|
30734
|
-
if (key
|
|
30757
|
+
if (isSheetNameEqual(key, unquotedName)) {
|
|
30735
30758
|
return this.sheetIdsMapName[key];
|
|
30736
30759
|
}
|
|
30737
30760
|
}
|
|
@@ -30986,7 +31009,7 @@ class SheetPlugin extends CorePlugin {
|
|
|
30986
31009
|
checkSheetName(cmd) {
|
|
30987
31010
|
const { orderedSheetIds, sheets } = this;
|
|
30988
31011
|
const name = cmd.name && cmd.name.trim().toLowerCase();
|
|
30989
|
-
if (orderedSheetIds.find((id) => { var _a; return ((_a = sheets[id]) === null || _a === void 0 ? void 0 : _a.name
|
|
31012
|
+
if (orderedSheetIds.find((id) => { var _a; return isSheetNameEqual((_a = sheets[id]) === null || _a === void 0 ? void 0 : _a.name, name); })) {
|
|
30990
31013
|
return 11 /* CommandResult.DuplicatedSheetName */;
|
|
30991
31014
|
}
|
|
30992
31015
|
if (FORBIDDEN_IN_EXCEL_REGEX.test(name)) {
|
|
@@ -35251,6 +35274,8 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
35251
35274
|
const { col, row } = this.getters.getNextVisibleCellPosition(cmd.sheetIdTo, 0, 0);
|
|
35252
35275
|
this.selectCell(col, row);
|
|
35253
35276
|
}
|
|
35277
|
+
const { col, row } = this.gridSelection.anchor.cell;
|
|
35278
|
+
this.moveClient({ sheetId: this.activeSheet.id, col, row });
|
|
35254
35279
|
break;
|
|
35255
35280
|
}
|
|
35256
35281
|
case "REMOVE_COLUMNS_ROWS": {
|
|
@@ -36212,10 +36237,8 @@ function mergeTransformation(cmd, executed) {
|
|
|
36212
36237
|
}
|
|
36213
36238
|
const target = [];
|
|
36214
36239
|
for (const zone1 of cmd.target) {
|
|
36215
|
-
|
|
36216
|
-
|
|
36217
|
-
target.push({ ...zone1 });
|
|
36218
|
-
}
|
|
36240
|
+
if (executed.target.every((zone2) => !overlap(zone1, zone2))) {
|
|
36241
|
+
target.push(zone1);
|
|
36219
36242
|
}
|
|
36220
36243
|
}
|
|
36221
36244
|
if (target.length) {
|
|
@@ -40867,7 +40890,7 @@ class RangeAdapter {
|
|
|
40867
40890
|
if (range.sheetId === cmd.sheetId) {
|
|
40868
40891
|
return { changeType: "CHANGE", range };
|
|
40869
40892
|
}
|
|
40870
|
-
if (
|
|
40893
|
+
if (isSheetNameEqual(range.invalidSheetName, cmd.name)) {
|
|
40871
40894
|
const invalidSheetName = undefined;
|
|
40872
40895
|
const sheetId = cmd.sheetId;
|
|
40873
40896
|
const newRange = range.clone({ sheetId, invalidSheetName });
|
|
@@ -43746,6 +43769,6 @@ function addFunction(functionName, functionDescription) {
|
|
|
43746
43769
|
export { AbstractChart, CommandResult, CorePlugin, DATETIME_FORMAT, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, cellTypes, compile, components, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, invalidateEvaluationCommands, load, parse, readonlyAllowedCommands, registries, setTranslationMethod, tokenize };
|
|
43747
43770
|
|
|
43748
43771
|
|
|
43749
|
-
__info__.version = '16.0.
|
|
43750
|
-
__info__.date = '2025-
|
|
43751
|
-
__info__.hash = '
|
|
43772
|
+
__info__.version = '16.0.68';
|
|
43773
|
+
__info__.date = '2025-04-25T08:02:52.716Z';
|
|
43774
|
+
__info__.hash = '682d48e';
|
|
@@ -2370,6 +2370,13 @@
|
|
|
2370
2370
|
rows.push(row);
|
|
2371
2371
|
}
|
|
2372
2372
|
return rows;
|
|
2373
|
+
}
|
|
2374
|
+
function isSheetNameEqual(name1, name2) {
|
|
2375
|
+
if (name1 === undefined || name2 === undefined) {
|
|
2376
|
+
return false;
|
|
2377
|
+
}
|
|
2378
|
+
return (getUnquotedSheetName(name1.trim().toUpperCase()) ===
|
|
2379
|
+
getUnquotedSheetName(name2.trim().toUpperCase()));
|
|
2373
2380
|
}
|
|
2374
2381
|
|
|
2375
2382
|
/*
|
|
@@ -6953,7 +6960,7 @@
|
|
|
6953
6960
|
if (executed.type === "ADD_COLUMNS_ROWS") {
|
|
6954
6961
|
return expandZoneOnInsertion(zone, executed.dimension === "COL" ? "left" : "top", executed.base, executed.position, executed.quantity);
|
|
6955
6962
|
}
|
|
6956
|
-
return
|
|
6963
|
+
return zone;
|
|
6957
6964
|
}
|
|
6958
6965
|
|
|
6959
6966
|
/**
|
|
@@ -18416,7 +18423,13 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
18416
18423
|
}
|
|
18417
18424
|
return null;
|
|
18418
18425
|
}
|
|
18419
|
-
|
|
18426
|
+
/**
|
|
18427
|
+
- \p{L} is for any letter (from any language)
|
|
18428
|
+
- \p{N} is for any number
|
|
18429
|
+
- the u flag at the end is for unicode, which enables the `\p{...}` syntax
|
|
18430
|
+
*/
|
|
18431
|
+
const unicodeSymbolCharRegexp = /\p{L}|\p{N}|_|\.|!|\$/u;
|
|
18432
|
+
const SYMBOL_CHARS = new Set("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.!$");
|
|
18420
18433
|
/**
|
|
18421
18434
|
* A "Symbol" is just basically any word-like element that can appear in a
|
|
18422
18435
|
* formula, which is not a string. So:
|
|
@@ -18456,7 +18469,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
18456
18469
|
};
|
|
18457
18470
|
}
|
|
18458
18471
|
}
|
|
18459
|
-
while (chars[0] && chars[0].match(
|
|
18472
|
+
while (chars[0] && (SYMBOL_CHARS.has(chars[0]) || chars[0].match(unicodeSymbolCharRegexp))) {
|
|
18460
18473
|
result += chars.shift();
|
|
18461
18474
|
}
|
|
18462
18475
|
if (result.length) {
|
|
@@ -19628,7 +19641,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
19628
19641
|
const { xc, sheetName: sheet } = splitReference(token.value);
|
|
19629
19642
|
const sheetName = sheet || this.getters.getSheetName(this.sheetId);
|
|
19630
19643
|
const activeSheetId = this.getters.getActiveSheetId();
|
|
19631
|
-
if (this.getters.getSheetName(activeSheetId)
|
|
19644
|
+
if (!isSheetNameEqual(this.getters.getSheetName(activeSheetId), sheetName)) {
|
|
19632
19645
|
return false;
|
|
19633
19646
|
}
|
|
19634
19647
|
const refRange = this.getters.getRangeFromSheetXC(activeSheetId, xc);
|
|
@@ -21707,18 +21720,28 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
21707
21720
|
function useInterval(callback, delay) {
|
|
21708
21721
|
let intervalId;
|
|
21709
21722
|
const { setInterval, clearInterval } = window;
|
|
21723
|
+
const pause = () => {
|
|
21724
|
+
clearInterval(intervalId);
|
|
21725
|
+
intervalId = undefined;
|
|
21726
|
+
};
|
|
21727
|
+
const safeCallback = () => {
|
|
21728
|
+
try {
|
|
21729
|
+
callback();
|
|
21730
|
+
}
|
|
21731
|
+
catch (e) {
|
|
21732
|
+
pause();
|
|
21733
|
+
throw e;
|
|
21734
|
+
}
|
|
21735
|
+
};
|
|
21710
21736
|
owl.useEffect(() => {
|
|
21711
|
-
intervalId = setInterval(
|
|
21737
|
+
intervalId = setInterval(safeCallback, delay);
|
|
21712
21738
|
return () => clearInterval(intervalId);
|
|
21713
21739
|
}, () => [delay]);
|
|
21714
21740
|
return {
|
|
21715
|
-
pause
|
|
21716
|
-
clearInterval(intervalId);
|
|
21717
|
-
intervalId = undefined;
|
|
21718
|
-
},
|
|
21741
|
+
pause,
|
|
21719
21742
|
resume: () => {
|
|
21720
21743
|
if (intervalId === undefined) {
|
|
21721
|
-
intervalId = setInterval(
|
|
21744
|
+
intervalId = setInterval(safeCallback, delay);
|
|
21722
21745
|
}
|
|
21723
21746
|
},
|
|
21724
21747
|
};
|
|
@@ -25023,7 +25046,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
25023
25046
|
({ xc, sheetName } = splitReference(reference));
|
|
25024
25047
|
let rangeSheetIndex;
|
|
25025
25048
|
if (sheetName) {
|
|
25026
|
-
const index = data.sheets.findIndex((sheet) => sheet.name
|
|
25049
|
+
const index = data.sheets.findIndex((sheet) => isSheetNameEqual(sheet.name, sheetName));
|
|
25027
25050
|
if (index < 0) {
|
|
25028
25051
|
throw new Error("Unable to find a sheet with the name " + sheetName);
|
|
25029
25052
|
}
|
|
@@ -25195,7 +25218,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
25195
25218
|
var _a;
|
|
25196
25219
|
externalRefId = Number(externalRefId) - 1;
|
|
25197
25220
|
cellRef = cellRef.replace(/\$/g, "");
|
|
25198
|
-
const sheetIndex = data.externalBooks[externalRefId].sheetNames.findIndex((name) => name
|
|
25221
|
+
const sheetIndex = data.externalBooks[externalRefId].sheetNames.findIndex((name) => isSheetNameEqual(name, sheetName));
|
|
25199
25222
|
if (sheetIndex === -1) {
|
|
25200
25223
|
return match;
|
|
25201
25224
|
}
|
|
@@ -25534,7 +25557,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
25534
25557
|
*/
|
|
25535
25558
|
function convertTableFormulaReferences(convertedSheets, xlsxSheets) {
|
|
25536
25559
|
for (let tableSheet of convertedSheets) {
|
|
25537
|
-
const tables = xlsxSheets.find((s) => s.sheetName
|
|
25560
|
+
const tables = xlsxSheets.find((s) => isSheetNameEqual(s.sheetName, tableSheet.name)).tables;
|
|
25538
25561
|
for (let table of tables) {
|
|
25539
25562
|
const tabRef = table.name + "[";
|
|
25540
25563
|
for (let sheet of convertedSheets) {
|
|
@@ -30732,7 +30755,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
30732
30755
|
if (name) {
|
|
30733
30756
|
const unquotedName = getUnquotedSheetName(name);
|
|
30734
30757
|
for (const key in this.sheetIdsMapName) {
|
|
30735
|
-
if (key
|
|
30758
|
+
if (isSheetNameEqual(key, unquotedName)) {
|
|
30736
30759
|
return this.sheetIdsMapName[key];
|
|
30737
30760
|
}
|
|
30738
30761
|
}
|
|
@@ -30987,7 +31010,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
30987
31010
|
checkSheetName(cmd) {
|
|
30988
31011
|
const { orderedSheetIds, sheets } = this;
|
|
30989
31012
|
const name = cmd.name && cmd.name.trim().toLowerCase();
|
|
30990
|
-
if (orderedSheetIds.find((id) => { var _a; return ((_a = sheets[id]) === null || _a === void 0 ? void 0 : _a.name
|
|
31013
|
+
if (orderedSheetIds.find((id) => { var _a; return isSheetNameEqual((_a = sheets[id]) === null || _a === void 0 ? void 0 : _a.name, name); })) {
|
|
30991
31014
|
return 11 /* CommandResult.DuplicatedSheetName */;
|
|
30992
31015
|
}
|
|
30993
31016
|
if (FORBIDDEN_IN_EXCEL_REGEX.test(name)) {
|
|
@@ -35252,6 +35275,8 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
35252
35275
|
const { col, row } = this.getters.getNextVisibleCellPosition(cmd.sheetIdTo, 0, 0);
|
|
35253
35276
|
this.selectCell(col, row);
|
|
35254
35277
|
}
|
|
35278
|
+
const { col, row } = this.gridSelection.anchor.cell;
|
|
35279
|
+
this.moveClient({ sheetId: this.activeSheet.id, col, row });
|
|
35255
35280
|
break;
|
|
35256
35281
|
}
|
|
35257
35282
|
case "REMOVE_COLUMNS_ROWS": {
|
|
@@ -36213,10 +36238,8 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
36213
36238
|
}
|
|
36214
36239
|
const target = [];
|
|
36215
36240
|
for (const zone1 of cmd.target) {
|
|
36216
|
-
|
|
36217
|
-
|
|
36218
|
-
target.push({ ...zone1 });
|
|
36219
|
-
}
|
|
36241
|
+
if (executed.target.every((zone2) => !overlap(zone1, zone2))) {
|
|
36242
|
+
target.push(zone1);
|
|
36220
36243
|
}
|
|
36221
36244
|
}
|
|
36222
36245
|
if (target.length) {
|
|
@@ -40868,7 +40891,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
40868
40891
|
if (range.sheetId === cmd.sheetId) {
|
|
40869
40892
|
return { changeType: "CHANGE", range };
|
|
40870
40893
|
}
|
|
40871
|
-
if (
|
|
40894
|
+
if (isSheetNameEqual(range.invalidSheetName, cmd.name)) {
|
|
40872
40895
|
const invalidSheetName = undefined;
|
|
40873
40896
|
const sheetId = cmd.sheetId;
|
|
40874
40897
|
const newRange = range.clone({ sheetId, invalidSheetName });
|
|
@@ -43777,9 +43800,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
43777
43800
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
43778
43801
|
|
|
43779
43802
|
|
|
43780
|
-
__info__.version = '16.0.
|
|
43781
|
-
__info__.date = '2025-
|
|
43782
|
-
__info__.hash = '
|
|
43803
|
+
__info__.version = '16.0.68';
|
|
43804
|
+
__info__.date = '2025-04-25T08:02:52.716Z';
|
|
43805
|
+
__info__.hash = '682d48e';
|
|
43783
43806
|
|
|
43784
43807
|
|
|
43785
43808
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|