@odoo/o-spreadsheet 17.0.61 → 17.0.62
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 +36 -15
- package/dist/o-spreadsheet.esm.js +36 -15
- package/dist/o-spreadsheet.iife.js +36 -15
- package/dist/o-spreadsheet.iife.min.js +262 -262
- package/dist/o_spreadsheet.xml +3 -3
- package/package.json +1 -1
|
@@ -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-05-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.62
|
|
6
|
+
* @date 2025-05-13T17:48:40.925Z
|
|
7
|
+
* @hash 23805e7
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -1815,7 +1815,7 @@ function isDateAfter(date, dateAfter) {
|
|
|
1815
1815
|
*/
|
|
1816
1816
|
const getFormulaNumberRegex = memoize(function getFormulaNumberRegex(decimalSeparator) {
|
|
1817
1817
|
decimalSeparator = escapeRegExp(decimalSeparator);
|
|
1818
|
-
return new RegExp(`(^-?\\d+(${decimalSeparator}?\\d*(e
|
|
1818
|
+
return new RegExp(`(^-?\\d+(${decimalSeparator}?\\d*(e(\\+|-)?\\d+)?)?|^-?${decimalSeparator}\\d+)(?!\\w|!)`);
|
|
1819
1819
|
});
|
|
1820
1820
|
const getNumberRegex = memoize(function getNumberRegex(locale) {
|
|
1821
1821
|
const decimalSeparator = escapeRegExp(locale.decimalSeparator);
|
|
@@ -4505,6 +4505,13 @@ function getDuplicateSheetName(nameToDuplicate, existingNames) {
|
|
|
4505
4505
|
}
|
|
4506
4506
|
return name;
|
|
4507
4507
|
}
|
|
4508
|
+
function isSheetNameEqual(name1, name2) {
|
|
4509
|
+
if (name1 === undefined || name2 === undefined) {
|
|
4510
|
+
return false;
|
|
4511
|
+
}
|
|
4512
|
+
return (getUnquotedSheetName(name1.trim().toUpperCase()) ===
|
|
4513
|
+
getUnquotedSheetName(name2.trim().toUpperCase()));
|
|
4514
|
+
}
|
|
4508
4515
|
|
|
4509
4516
|
function computeTextLinesHeight(textLineHeight, numberOfLines = 1) {
|
|
4510
4517
|
return numberOfLines * (textLineHeight + MIN_CELL_TEXT_MARGIN) - MIN_CELL_TEXT_MARGIN;
|
|
@@ -18985,6 +18992,9 @@ function isEmpty(value) {
|
|
|
18985
18992
|
return value === null || value === undefined;
|
|
18986
18993
|
}
|
|
18987
18994
|
const getNeutral = { number: 0, string: "", boolean: false };
|
|
18995
|
+
function areAlmostEqual(value1, value2, epsilon = 2e-16) {
|
|
18996
|
+
return Math.abs(value1 - value2) < epsilon;
|
|
18997
|
+
}
|
|
18988
18998
|
const EQ = {
|
|
18989
18999
|
description: _t("Equal."),
|
|
18990
19000
|
args: [
|
|
@@ -19001,6 +19011,9 @@ const EQ = {
|
|
|
19001
19011
|
if (typeof value2 === "string") {
|
|
19002
19012
|
value2 = value2.toUpperCase();
|
|
19003
19013
|
}
|
|
19014
|
+
if (typeof value1 === "number" && typeof value2 === "number") {
|
|
19015
|
+
return areAlmostEqual(value1, value2);
|
|
19016
|
+
}
|
|
19004
19017
|
return value1 === value2;
|
|
19005
19018
|
},
|
|
19006
19019
|
};
|
|
@@ -19035,6 +19048,9 @@ const GT = {
|
|
|
19035
19048
|
returns: ["BOOLEAN"],
|
|
19036
19049
|
compute: function (value1, value2) {
|
|
19037
19050
|
return applyRelationalOperator(value1, value2, (v1, v2) => {
|
|
19051
|
+
if (typeof v1 === "number" && typeof v2 === "number") {
|
|
19052
|
+
return !areAlmostEqual(v1, v2) && v1 > v2;
|
|
19053
|
+
}
|
|
19038
19054
|
return v1 > v2;
|
|
19039
19055
|
});
|
|
19040
19056
|
},
|
|
@@ -19051,6 +19067,9 @@ const GTE = {
|
|
|
19051
19067
|
returns: ["BOOLEAN"],
|
|
19052
19068
|
compute: function (value1, value2) {
|
|
19053
19069
|
return applyRelationalOperator(value1, value2, (v1, v2) => {
|
|
19070
|
+
if (typeof v1 === "number" && typeof v2 === "number") {
|
|
19071
|
+
return areAlmostEqual(v1, v2) || v1 > v2;
|
|
19072
|
+
}
|
|
19054
19073
|
return v1 >= v2;
|
|
19055
19074
|
});
|
|
19056
19075
|
},
|
|
@@ -27091,7 +27110,6 @@ class Composer extends owl.Component {
|
|
|
27091
27110
|
searchTermUpperCase === "FALSE") {
|
|
27092
27111
|
return;
|
|
27093
27112
|
}
|
|
27094
|
-
this.autoCompleteState.showProvider = true;
|
|
27095
27113
|
this.autoCompleteState.type = "function";
|
|
27096
27114
|
let values = Object.entries(functionRegistry.content)
|
|
27097
27115
|
.filter(([_, { hidden }]) => !hidden)
|
|
@@ -27107,6 +27125,9 @@ class Composer extends owl.Component {
|
|
|
27107
27125
|
if (searchTerm) {
|
|
27108
27126
|
values = fuzzyLookup(searchTerm, values, (t) => t.text).slice(0, AUTOCOMPLETE_ENTRIES);
|
|
27109
27127
|
}
|
|
27128
|
+
if (values.length) {
|
|
27129
|
+
this.autoCompleteState.showProvider = true;
|
|
27130
|
+
}
|
|
27110
27131
|
this.autoCompleteState.values = values.slice(0, AUTOCOMPLETE_ENTRIES);
|
|
27111
27132
|
this.autoCompleteState.getHtmlContent = (value) => getHtmlContentFromPattern(searchTerm, value, COMPOSER_ASSISTANT_COLOR, "o-semi-bold");
|
|
27112
27133
|
this.autoCompleteState.selectedIndex = 0;
|
|
@@ -31769,7 +31790,7 @@ function getRangeSize(reference, defaultSheetIndex, data) {
|
|
|
31769
31790
|
({ xc, sheetName } = splitReference(reference));
|
|
31770
31791
|
let rangeSheetIndex;
|
|
31771
31792
|
if (sheetName) {
|
|
31772
|
-
const index = data.sheets.findIndex((sheet) => sheet.name
|
|
31793
|
+
const index = data.sheets.findIndex((sheet) => isSheetNameEqual(sheet.name, sheetName));
|
|
31773
31794
|
if (index < 0) {
|
|
31774
31795
|
throw new Error("Unable to find a sheet with the name " + sheetName);
|
|
31775
31796
|
}
|
|
@@ -31975,7 +31996,7 @@ function convertFormula(formula, data) {
|
|
|
31975
31996
|
formula = formula.replace(externalReferenceRegex, (match, externalRefId, sheetName, cellRef) => {
|
|
31976
31997
|
externalRefId = Number(externalRefId) - 1;
|
|
31977
31998
|
cellRef = cellRef.replace(/\$/g, "");
|
|
31978
|
-
const sheetIndex = data.externalBooks[externalRefId].sheetNames.findIndex((name) => name
|
|
31999
|
+
const sheetIndex = data.externalBooks[externalRefId].sheetNames.findIndex((name) => isSheetNameEqual(name, sheetName));
|
|
31979
32000
|
if (sheetIndex === -1) {
|
|
31980
32001
|
return match;
|
|
31981
32002
|
}
|
|
@@ -32310,7 +32331,7 @@ function applyStyleToZone(appliedStyle, zone, cells, styles) {
|
|
|
32310
32331
|
*/
|
|
32311
32332
|
function convertTableFormulaReferences(convertedSheets, xlsxSheets) {
|
|
32312
32333
|
for (let tableSheet of convertedSheets) {
|
|
32313
|
-
const tables = xlsxSheets.find((s) => s.sheetName
|
|
32334
|
+
const tables = xlsxSheets.find((s) => isSheetNameEqual(s.sheetName, tableSheet.name)).tables;
|
|
32314
32335
|
for (let table of tables) {
|
|
32315
32336
|
const tabRef = table.name + "[";
|
|
32316
32337
|
for (let sheet of convertedSheets) {
|
|
@@ -39278,7 +39299,7 @@ class RangeAdapter {
|
|
|
39278
39299
|
if (range.sheetId === cmd.sheetId) {
|
|
39279
39300
|
return { changeType: "CHANGE", range };
|
|
39280
39301
|
}
|
|
39281
|
-
if (
|
|
39302
|
+
if (isSheetNameEqual(range.invalidSheetName, cmd.name)) {
|
|
39282
39303
|
const invalidSheetName = undefined;
|
|
39283
39304
|
const sheetId = cmd.sheetId;
|
|
39284
39305
|
const newRange = range.clone({ sheetId, invalidSheetName });
|
|
@@ -39807,7 +39828,7 @@ class SheetPlugin extends CorePlugin {
|
|
|
39807
39828
|
if (name) {
|
|
39808
39829
|
const unquotedName = getUnquotedSheetName(name);
|
|
39809
39830
|
for (const key in this.sheetIdsMapName) {
|
|
39810
|
-
if (key
|
|
39831
|
+
if (isSheetNameEqual(key, unquotedName)) {
|
|
39811
39832
|
return this.sheetIdsMapName[key];
|
|
39812
39833
|
}
|
|
39813
39834
|
}
|
|
@@ -40079,7 +40100,7 @@ class SheetPlugin extends CorePlugin {
|
|
|
40079
40100
|
}
|
|
40080
40101
|
const { orderedSheetIds, sheets } = this;
|
|
40081
40102
|
const name = cmd.name && cmd.name.trim().toLowerCase();
|
|
40082
|
-
if (orderedSheetIds.find((id) => sheets[id]?.name
|
|
40103
|
+
if (orderedSheetIds.find((id) => isSheetNameEqual(sheets[id]?.name, name) && id !== cmd.sheetId)) {
|
|
40083
40104
|
return "DuplicatedSheetName" /* CommandResult.DuplicatedSheetName */;
|
|
40084
40105
|
}
|
|
40085
40106
|
if (FORBIDDEN_IN_EXCEL_REGEX.test(name)) {
|
|
@@ -49803,7 +49824,7 @@ class EditionPlugin extends UIPlugin {
|
|
|
49803
49824
|
.find((token) => {
|
|
49804
49825
|
const { xc, sheetName: sheet } = splitReference(token.value);
|
|
49805
49826
|
const sheetName = sheet || this.getters.getSheetName(this.sheetId);
|
|
49806
|
-
if (this.getters.getSheetName(activeSheetId)
|
|
49827
|
+
if (!isSheetNameEqual(this.getters.getSheetName(activeSheetId), sheetName)) {
|
|
49807
49828
|
return false;
|
|
49808
49829
|
}
|
|
49809
49830
|
const refRange = this.getters.getRangeFromSheetXC(activeSheetId, xc);
|
|
@@ -58308,6 +58329,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
58308
58329
|
exports.tokenize = tokenize;
|
|
58309
58330
|
|
|
58310
58331
|
|
|
58311
|
-
__info__.version = "17.0.
|
|
58312
|
-
__info__.date = "2025-05-
|
|
58313
|
-
__info__.hash = "
|
|
58332
|
+
__info__.version = "17.0.62";
|
|
58333
|
+
__info__.date = "2025-05-13T17:48:40.925Z";
|
|
58334
|
+
__info__.hash = "23805e7";
|
|
@@ -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-05-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.62
|
|
6
|
+
* @date 2025-05-13T17:48:40.925Z
|
|
7
|
+
* @hash 23805e7
|
|
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';
|
|
@@ -1813,7 +1813,7 @@ function isDateAfter(date, dateAfter) {
|
|
|
1813
1813
|
*/
|
|
1814
1814
|
const getFormulaNumberRegex = memoize(function getFormulaNumberRegex(decimalSeparator) {
|
|
1815
1815
|
decimalSeparator = escapeRegExp(decimalSeparator);
|
|
1816
|
-
return new RegExp(`(^-?\\d+(${decimalSeparator}?\\d*(e
|
|
1816
|
+
return new RegExp(`(^-?\\d+(${decimalSeparator}?\\d*(e(\\+|-)?\\d+)?)?|^-?${decimalSeparator}\\d+)(?!\\w|!)`);
|
|
1817
1817
|
});
|
|
1818
1818
|
const getNumberRegex = memoize(function getNumberRegex(locale) {
|
|
1819
1819
|
const decimalSeparator = escapeRegExp(locale.decimalSeparator);
|
|
@@ -4503,6 +4503,13 @@ function getDuplicateSheetName(nameToDuplicate, existingNames) {
|
|
|
4503
4503
|
}
|
|
4504
4504
|
return name;
|
|
4505
4505
|
}
|
|
4506
|
+
function isSheetNameEqual(name1, name2) {
|
|
4507
|
+
if (name1 === undefined || name2 === undefined) {
|
|
4508
|
+
return false;
|
|
4509
|
+
}
|
|
4510
|
+
return (getUnquotedSheetName(name1.trim().toUpperCase()) ===
|
|
4511
|
+
getUnquotedSheetName(name2.trim().toUpperCase()));
|
|
4512
|
+
}
|
|
4506
4513
|
|
|
4507
4514
|
function computeTextLinesHeight(textLineHeight, numberOfLines = 1) {
|
|
4508
4515
|
return numberOfLines * (textLineHeight + MIN_CELL_TEXT_MARGIN) - MIN_CELL_TEXT_MARGIN;
|
|
@@ -18983,6 +18990,9 @@ function isEmpty(value) {
|
|
|
18983
18990
|
return value === null || value === undefined;
|
|
18984
18991
|
}
|
|
18985
18992
|
const getNeutral = { number: 0, string: "", boolean: false };
|
|
18993
|
+
function areAlmostEqual(value1, value2, epsilon = 2e-16) {
|
|
18994
|
+
return Math.abs(value1 - value2) < epsilon;
|
|
18995
|
+
}
|
|
18986
18996
|
const EQ = {
|
|
18987
18997
|
description: _t("Equal."),
|
|
18988
18998
|
args: [
|
|
@@ -18999,6 +19009,9 @@ const EQ = {
|
|
|
18999
19009
|
if (typeof value2 === "string") {
|
|
19000
19010
|
value2 = value2.toUpperCase();
|
|
19001
19011
|
}
|
|
19012
|
+
if (typeof value1 === "number" && typeof value2 === "number") {
|
|
19013
|
+
return areAlmostEqual(value1, value2);
|
|
19014
|
+
}
|
|
19002
19015
|
return value1 === value2;
|
|
19003
19016
|
},
|
|
19004
19017
|
};
|
|
@@ -19033,6 +19046,9 @@ const GT = {
|
|
|
19033
19046
|
returns: ["BOOLEAN"],
|
|
19034
19047
|
compute: function (value1, value2) {
|
|
19035
19048
|
return applyRelationalOperator(value1, value2, (v1, v2) => {
|
|
19049
|
+
if (typeof v1 === "number" && typeof v2 === "number") {
|
|
19050
|
+
return !areAlmostEqual(v1, v2) && v1 > v2;
|
|
19051
|
+
}
|
|
19036
19052
|
return v1 > v2;
|
|
19037
19053
|
});
|
|
19038
19054
|
},
|
|
@@ -19049,6 +19065,9 @@ const GTE = {
|
|
|
19049
19065
|
returns: ["BOOLEAN"],
|
|
19050
19066
|
compute: function (value1, value2) {
|
|
19051
19067
|
return applyRelationalOperator(value1, value2, (v1, v2) => {
|
|
19068
|
+
if (typeof v1 === "number" && typeof v2 === "number") {
|
|
19069
|
+
return areAlmostEqual(v1, v2) || v1 > v2;
|
|
19070
|
+
}
|
|
19052
19071
|
return v1 >= v2;
|
|
19053
19072
|
});
|
|
19054
19073
|
},
|
|
@@ -27089,7 +27108,6 @@ class Composer extends Component {
|
|
|
27089
27108
|
searchTermUpperCase === "FALSE") {
|
|
27090
27109
|
return;
|
|
27091
27110
|
}
|
|
27092
|
-
this.autoCompleteState.showProvider = true;
|
|
27093
27111
|
this.autoCompleteState.type = "function";
|
|
27094
27112
|
let values = Object.entries(functionRegistry.content)
|
|
27095
27113
|
.filter(([_, { hidden }]) => !hidden)
|
|
@@ -27105,6 +27123,9 @@ class Composer extends Component {
|
|
|
27105
27123
|
if (searchTerm) {
|
|
27106
27124
|
values = fuzzyLookup(searchTerm, values, (t) => t.text).slice(0, AUTOCOMPLETE_ENTRIES);
|
|
27107
27125
|
}
|
|
27126
|
+
if (values.length) {
|
|
27127
|
+
this.autoCompleteState.showProvider = true;
|
|
27128
|
+
}
|
|
27108
27129
|
this.autoCompleteState.values = values.slice(0, AUTOCOMPLETE_ENTRIES);
|
|
27109
27130
|
this.autoCompleteState.getHtmlContent = (value) => getHtmlContentFromPattern(searchTerm, value, COMPOSER_ASSISTANT_COLOR, "o-semi-bold");
|
|
27110
27131
|
this.autoCompleteState.selectedIndex = 0;
|
|
@@ -31767,7 +31788,7 @@ function getRangeSize(reference, defaultSheetIndex, data) {
|
|
|
31767
31788
|
({ xc, sheetName } = splitReference(reference));
|
|
31768
31789
|
let rangeSheetIndex;
|
|
31769
31790
|
if (sheetName) {
|
|
31770
|
-
const index = data.sheets.findIndex((sheet) => sheet.name
|
|
31791
|
+
const index = data.sheets.findIndex((sheet) => isSheetNameEqual(sheet.name, sheetName));
|
|
31771
31792
|
if (index < 0) {
|
|
31772
31793
|
throw new Error("Unable to find a sheet with the name " + sheetName);
|
|
31773
31794
|
}
|
|
@@ -31973,7 +31994,7 @@ function convertFormula(formula, data) {
|
|
|
31973
31994
|
formula = formula.replace(externalReferenceRegex, (match, externalRefId, sheetName, cellRef) => {
|
|
31974
31995
|
externalRefId = Number(externalRefId) - 1;
|
|
31975
31996
|
cellRef = cellRef.replace(/\$/g, "");
|
|
31976
|
-
const sheetIndex = data.externalBooks[externalRefId].sheetNames.findIndex((name) => name
|
|
31997
|
+
const sheetIndex = data.externalBooks[externalRefId].sheetNames.findIndex((name) => isSheetNameEqual(name, sheetName));
|
|
31977
31998
|
if (sheetIndex === -1) {
|
|
31978
31999
|
return match;
|
|
31979
32000
|
}
|
|
@@ -32308,7 +32329,7 @@ function applyStyleToZone(appliedStyle, zone, cells, styles) {
|
|
|
32308
32329
|
*/
|
|
32309
32330
|
function convertTableFormulaReferences(convertedSheets, xlsxSheets) {
|
|
32310
32331
|
for (let tableSheet of convertedSheets) {
|
|
32311
|
-
const tables = xlsxSheets.find((s) => s.sheetName
|
|
32332
|
+
const tables = xlsxSheets.find((s) => isSheetNameEqual(s.sheetName, tableSheet.name)).tables;
|
|
32312
32333
|
for (let table of tables) {
|
|
32313
32334
|
const tabRef = table.name + "[";
|
|
32314
32335
|
for (let sheet of convertedSheets) {
|
|
@@ -39276,7 +39297,7 @@ class RangeAdapter {
|
|
|
39276
39297
|
if (range.sheetId === cmd.sheetId) {
|
|
39277
39298
|
return { changeType: "CHANGE", range };
|
|
39278
39299
|
}
|
|
39279
|
-
if (
|
|
39300
|
+
if (isSheetNameEqual(range.invalidSheetName, cmd.name)) {
|
|
39280
39301
|
const invalidSheetName = undefined;
|
|
39281
39302
|
const sheetId = cmd.sheetId;
|
|
39282
39303
|
const newRange = range.clone({ sheetId, invalidSheetName });
|
|
@@ -39805,7 +39826,7 @@ class SheetPlugin extends CorePlugin {
|
|
|
39805
39826
|
if (name) {
|
|
39806
39827
|
const unquotedName = getUnquotedSheetName(name);
|
|
39807
39828
|
for (const key in this.sheetIdsMapName) {
|
|
39808
|
-
if (key
|
|
39829
|
+
if (isSheetNameEqual(key, unquotedName)) {
|
|
39809
39830
|
return this.sheetIdsMapName[key];
|
|
39810
39831
|
}
|
|
39811
39832
|
}
|
|
@@ -40077,7 +40098,7 @@ class SheetPlugin extends CorePlugin {
|
|
|
40077
40098
|
}
|
|
40078
40099
|
const { orderedSheetIds, sheets } = this;
|
|
40079
40100
|
const name = cmd.name && cmd.name.trim().toLowerCase();
|
|
40080
|
-
if (orderedSheetIds.find((id) => sheets[id]?.name
|
|
40101
|
+
if (orderedSheetIds.find((id) => isSheetNameEqual(sheets[id]?.name, name) && id !== cmd.sheetId)) {
|
|
40081
40102
|
return "DuplicatedSheetName" /* CommandResult.DuplicatedSheetName */;
|
|
40082
40103
|
}
|
|
40083
40104
|
if (FORBIDDEN_IN_EXCEL_REGEX.test(name)) {
|
|
@@ -49801,7 +49822,7 @@ class EditionPlugin extends UIPlugin {
|
|
|
49801
49822
|
.find((token) => {
|
|
49802
49823
|
const { xc, sheetName: sheet } = splitReference(token.value);
|
|
49803
49824
|
const sheetName = sheet || this.getters.getSheetName(this.sheetId);
|
|
49804
|
-
if (this.getters.getSheetName(activeSheetId)
|
|
49825
|
+
if (!isSheetNameEqual(this.getters.getSheetName(activeSheetId), sheetName)) {
|
|
49805
49826
|
return false;
|
|
49806
49827
|
}
|
|
49807
49828
|
const refRange = this.getters.getRangeFromSheetXC(activeSheetId, xc);
|
|
@@ -58271,6 +58292,6 @@ const constants = {
|
|
|
58271
58292
|
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 };
|
|
58272
58293
|
|
|
58273
58294
|
|
|
58274
|
-
__info__.version = "17.0.
|
|
58275
|
-
__info__.date = "2025-05-
|
|
58276
|
-
__info__.hash = "
|
|
58295
|
+
__info__.version = "17.0.62";
|
|
58296
|
+
__info__.date = "2025-05-13T17:48:40.925Z";
|
|
58297
|
+
__info__.hash = "23805e7";
|
|
@@ -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-05-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.62
|
|
6
|
+
* @date 2025-05-13T17:48:40.925Z
|
|
7
|
+
* @hash 23805e7
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -1814,7 +1814,7 @@
|
|
|
1814
1814
|
*/
|
|
1815
1815
|
const getFormulaNumberRegex = memoize(function getFormulaNumberRegex(decimalSeparator) {
|
|
1816
1816
|
decimalSeparator = escapeRegExp(decimalSeparator);
|
|
1817
|
-
return new RegExp(`(^-?\\d+(${decimalSeparator}?\\d*(e
|
|
1817
|
+
return new RegExp(`(^-?\\d+(${decimalSeparator}?\\d*(e(\\+|-)?\\d+)?)?|^-?${decimalSeparator}\\d+)(?!\\w|!)`);
|
|
1818
1818
|
});
|
|
1819
1819
|
const getNumberRegex = memoize(function getNumberRegex(locale) {
|
|
1820
1820
|
const decimalSeparator = escapeRegExp(locale.decimalSeparator);
|
|
@@ -4504,6 +4504,13 @@
|
|
|
4504
4504
|
}
|
|
4505
4505
|
return name;
|
|
4506
4506
|
}
|
|
4507
|
+
function isSheetNameEqual(name1, name2) {
|
|
4508
|
+
if (name1 === undefined || name2 === undefined) {
|
|
4509
|
+
return false;
|
|
4510
|
+
}
|
|
4511
|
+
return (getUnquotedSheetName(name1.trim().toUpperCase()) ===
|
|
4512
|
+
getUnquotedSheetName(name2.trim().toUpperCase()));
|
|
4513
|
+
}
|
|
4507
4514
|
|
|
4508
4515
|
function computeTextLinesHeight(textLineHeight, numberOfLines = 1) {
|
|
4509
4516
|
return numberOfLines * (textLineHeight + MIN_CELL_TEXT_MARGIN) - MIN_CELL_TEXT_MARGIN;
|
|
@@ -18984,6 +18991,9 @@
|
|
|
18984
18991
|
return value === null || value === undefined;
|
|
18985
18992
|
}
|
|
18986
18993
|
const getNeutral = { number: 0, string: "", boolean: false };
|
|
18994
|
+
function areAlmostEqual(value1, value2, epsilon = 2e-16) {
|
|
18995
|
+
return Math.abs(value1 - value2) < epsilon;
|
|
18996
|
+
}
|
|
18987
18997
|
const EQ = {
|
|
18988
18998
|
description: _t("Equal."),
|
|
18989
18999
|
args: [
|
|
@@ -19000,6 +19010,9 @@
|
|
|
19000
19010
|
if (typeof value2 === "string") {
|
|
19001
19011
|
value2 = value2.toUpperCase();
|
|
19002
19012
|
}
|
|
19013
|
+
if (typeof value1 === "number" && typeof value2 === "number") {
|
|
19014
|
+
return areAlmostEqual(value1, value2);
|
|
19015
|
+
}
|
|
19003
19016
|
return value1 === value2;
|
|
19004
19017
|
},
|
|
19005
19018
|
};
|
|
@@ -19034,6 +19047,9 @@
|
|
|
19034
19047
|
returns: ["BOOLEAN"],
|
|
19035
19048
|
compute: function (value1, value2) {
|
|
19036
19049
|
return applyRelationalOperator(value1, value2, (v1, v2) => {
|
|
19050
|
+
if (typeof v1 === "number" && typeof v2 === "number") {
|
|
19051
|
+
return !areAlmostEqual(v1, v2) && v1 > v2;
|
|
19052
|
+
}
|
|
19037
19053
|
return v1 > v2;
|
|
19038
19054
|
});
|
|
19039
19055
|
},
|
|
@@ -19050,6 +19066,9 @@
|
|
|
19050
19066
|
returns: ["BOOLEAN"],
|
|
19051
19067
|
compute: function (value1, value2) {
|
|
19052
19068
|
return applyRelationalOperator(value1, value2, (v1, v2) => {
|
|
19069
|
+
if (typeof v1 === "number" && typeof v2 === "number") {
|
|
19070
|
+
return areAlmostEqual(v1, v2) || v1 > v2;
|
|
19071
|
+
}
|
|
19053
19072
|
return v1 >= v2;
|
|
19054
19073
|
});
|
|
19055
19074
|
},
|
|
@@ -27090,7 +27109,6 @@
|
|
|
27090
27109
|
searchTermUpperCase === "FALSE") {
|
|
27091
27110
|
return;
|
|
27092
27111
|
}
|
|
27093
|
-
this.autoCompleteState.showProvider = true;
|
|
27094
27112
|
this.autoCompleteState.type = "function";
|
|
27095
27113
|
let values = Object.entries(functionRegistry.content)
|
|
27096
27114
|
.filter(([_, { hidden }]) => !hidden)
|
|
@@ -27106,6 +27124,9 @@
|
|
|
27106
27124
|
if (searchTerm) {
|
|
27107
27125
|
values = fuzzyLookup(searchTerm, values, (t) => t.text).slice(0, AUTOCOMPLETE_ENTRIES);
|
|
27108
27126
|
}
|
|
27127
|
+
if (values.length) {
|
|
27128
|
+
this.autoCompleteState.showProvider = true;
|
|
27129
|
+
}
|
|
27109
27130
|
this.autoCompleteState.values = values.slice(0, AUTOCOMPLETE_ENTRIES);
|
|
27110
27131
|
this.autoCompleteState.getHtmlContent = (value) => getHtmlContentFromPattern(searchTerm, value, COMPOSER_ASSISTANT_COLOR, "o-semi-bold");
|
|
27111
27132
|
this.autoCompleteState.selectedIndex = 0;
|
|
@@ -31768,7 +31789,7 @@
|
|
|
31768
31789
|
({ xc, sheetName } = splitReference(reference));
|
|
31769
31790
|
let rangeSheetIndex;
|
|
31770
31791
|
if (sheetName) {
|
|
31771
|
-
const index = data.sheets.findIndex((sheet) => sheet.name
|
|
31792
|
+
const index = data.sheets.findIndex((sheet) => isSheetNameEqual(sheet.name, sheetName));
|
|
31772
31793
|
if (index < 0) {
|
|
31773
31794
|
throw new Error("Unable to find a sheet with the name " + sheetName);
|
|
31774
31795
|
}
|
|
@@ -31974,7 +31995,7 @@
|
|
|
31974
31995
|
formula = formula.replace(externalReferenceRegex, (match, externalRefId, sheetName, cellRef) => {
|
|
31975
31996
|
externalRefId = Number(externalRefId) - 1;
|
|
31976
31997
|
cellRef = cellRef.replace(/\$/g, "");
|
|
31977
|
-
const sheetIndex = data.externalBooks[externalRefId].sheetNames.findIndex((name) => name
|
|
31998
|
+
const sheetIndex = data.externalBooks[externalRefId].sheetNames.findIndex((name) => isSheetNameEqual(name, sheetName));
|
|
31978
31999
|
if (sheetIndex === -1) {
|
|
31979
32000
|
return match;
|
|
31980
32001
|
}
|
|
@@ -32309,7 +32330,7 @@
|
|
|
32309
32330
|
*/
|
|
32310
32331
|
function convertTableFormulaReferences(convertedSheets, xlsxSheets) {
|
|
32311
32332
|
for (let tableSheet of convertedSheets) {
|
|
32312
|
-
const tables = xlsxSheets.find((s) => s.sheetName
|
|
32333
|
+
const tables = xlsxSheets.find((s) => isSheetNameEqual(s.sheetName, tableSheet.name)).tables;
|
|
32313
32334
|
for (let table of tables) {
|
|
32314
32335
|
const tabRef = table.name + "[";
|
|
32315
32336
|
for (let sheet of convertedSheets) {
|
|
@@ -39277,7 +39298,7 @@
|
|
|
39277
39298
|
if (range.sheetId === cmd.sheetId) {
|
|
39278
39299
|
return { changeType: "CHANGE", range };
|
|
39279
39300
|
}
|
|
39280
|
-
if (
|
|
39301
|
+
if (isSheetNameEqual(range.invalidSheetName, cmd.name)) {
|
|
39281
39302
|
const invalidSheetName = undefined;
|
|
39282
39303
|
const sheetId = cmd.sheetId;
|
|
39283
39304
|
const newRange = range.clone({ sheetId, invalidSheetName });
|
|
@@ -39806,7 +39827,7 @@
|
|
|
39806
39827
|
if (name) {
|
|
39807
39828
|
const unquotedName = getUnquotedSheetName(name);
|
|
39808
39829
|
for (const key in this.sheetIdsMapName) {
|
|
39809
|
-
if (key
|
|
39830
|
+
if (isSheetNameEqual(key, unquotedName)) {
|
|
39810
39831
|
return this.sheetIdsMapName[key];
|
|
39811
39832
|
}
|
|
39812
39833
|
}
|
|
@@ -40078,7 +40099,7 @@
|
|
|
40078
40099
|
}
|
|
40079
40100
|
const { orderedSheetIds, sheets } = this;
|
|
40080
40101
|
const name = cmd.name && cmd.name.trim().toLowerCase();
|
|
40081
|
-
if (orderedSheetIds.find((id) => sheets[id]?.name
|
|
40102
|
+
if (orderedSheetIds.find((id) => isSheetNameEqual(sheets[id]?.name, name) && id !== cmd.sheetId)) {
|
|
40082
40103
|
return "DuplicatedSheetName" /* CommandResult.DuplicatedSheetName */;
|
|
40083
40104
|
}
|
|
40084
40105
|
if (FORBIDDEN_IN_EXCEL_REGEX.test(name)) {
|
|
@@ -49802,7 +49823,7 @@
|
|
|
49802
49823
|
.find((token) => {
|
|
49803
49824
|
const { xc, sheetName: sheet } = splitReference(token.value);
|
|
49804
49825
|
const sheetName = sheet || this.getters.getSheetName(this.sheetId);
|
|
49805
|
-
if (this.getters.getSheetName(activeSheetId)
|
|
49826
|
+
if (!isSheetNameEqual(this.getters.getSheetName(activeSheetId), sheetName)) {
|
|
49806
49827
|
return false;
|
|
49807
49828
|
}
|
|
49808
49829
|
const refRange = this.getters.getRangeFromSheetXC(activeSheetId, xc);
|
|
@@ -58307,9 +58328,9 @@
|
|
|
58307
58328
|
exports.tokenize = tokenize;
|
|
58308
58329
|
|
|
58309
58330
|
|
|
58310
|
-
__info__.version = "17.0.
|
|
58311
|
-
__info__.date = "2025-05-
|
|
58312
|
-
__info__.hash = "
|
|
58331
|
+
__info__.version = "17.0.62";
|
|
58332
|
+
__info__.date = "2025-05-13T17:48:40.925Z";
|
|
58333
|
+
__info__.hash = "23805e7";
|
|
58313
58334
|
|
|
58314
58335
|
|
|
58315
58336
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|