@odoo/o-spreadsheet 18.0.28 → 18.0.29
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 +158 -135
- package/dist/o-spreadsheet.d.ts +33 -32
- package/dist/o-spreadsheet.esm.js +158 -135
- package/dist/o-spreadsheet.iife.js +158 -135
- package/dist/o-spreadsheet.iife.min.js +364 -364
- package/dist/o_spreadsheet.xml +4 -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 18.0.
|
|
6
|
-
* @date 2025-05-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.0.29
|
|
6
|
+
* @date 2025-05-20T05:54:57.329Z
|
|
7
|
+
* @hash 8213c0e
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -1454,18 +1454,53 @@ function lettersToNumber(letters) {
|
|
|
1454
1454
|
let result = 0;
|
|
1455
1455
|
const l = letters.length;
|
|
1456
1456
|
for (let i = 0; i < l; i++) {
|
|
1457
|
-
const
|
|
1458
|
-
const colIndex = charCode >= 65 && charCode <= 90 ? charCode - 64 : charCode - 96;
|
|
1457
|
+
const colIndex = charToNumber(letters[i]);
|
|
1459
1458
|
result = result * 26 + colIndex;
|
|
1460
1459
|
}
|
|
1461
1460
|
return result - 1;
|
|
1462
1461
|
}
|
|
1462
|
+
function charToNumber(char) {
|
|
1463
|
+
const charCode = char.charCodeAt(0);
|
|
1464
|
+
return charCode >= 65 && charCode <= 90 ? charCode - 64 : charCode - 96;
|
|
1465
|
+
}
|
|
1463
1466
|
function isCharALetter(char) {
|
|
1464
1467
|
return (char >= "A" && char <= "Z") || (char >= "a" && char <= "z");
|
|
1465
1468
|
}
|
|
1466
1469
|
function isCharADigit(char) {
|
|
1467
1470
|
return char >= "0" && char <= "9";
|
|
1468
1471
|
}
|
|
1472
|
+
// we limit the max column to 3 letters and max row to 7 digits for performance reasons
|
|
1473
|
+
const MAX_COL = lettersToNumber("ZZZ");
|
|
1474
|
+
const MAX_ROW = 9999998;
|
|
1475
|
+
function consumeSpaces(chars) {
|
|
1476
|
+
while (chars.current === " ") {
|
|
1477
|
+
chars.advanceBy(1);
|
|
1478
|
+
}
|
|
1479
|
+
}
|
|
1480
|
+
function consumeLetters(chars) {
|
|
1481
|
+
if (chars.current === "$")
|
|
1482
|
+
chars.advanceBy(1);
|
|
1483
|
+
if (!chars.current || !isCharALetter(chars.current)) {
|
|
1484
|
+
return -1;
|
|
1485
|
+
}
|
|
1486
|
+
let colCoordinate = 0;
|
|
1487
|
+
while (chars.current && isCharALetter(chars.current)) {
|
|
1488
|
+
colCoordinate = colCoordinate * 26 + charToNumber(chars.shift());
|
|
1489
|
+
}
|
|
1490
|
+
return colCoordinate;
|
|
1491
|
+
}
|
|
1492
|
+
function consumeDigits(chars) {
|
|
1493
|
+
if (chars.current === "$")
|
|
1494
|
+
chars.advanceBy(1);
|
|
1495
|
+
if (!chars.current || !isCharADigit(chars.current)) {
|
|
1496
|
+
return -1;
|
|
1497
|
+
}
|
|
1498
|
+
let num = 0;
|
|
1499
|
+
while (chars.current && isCharADigit(chars.current)) {
|
|
1500
|
+
num = num * 10 + Number(chars.shift());
|
|
1501
|
+
}
|
|
1502
|
+
return num;
|
|
1503
|
+
}
|
|
1469
1504
|
/**
|
|
1470
1505
|
* Convert a "XC" coordinate to cartesian coordinates.
|
|
1471
1506
|
*
|
|
@@ -1476,33 +1511,17 @@ function isCharADigit(char) {
|
|
|
1476
1511
|
* Note: it also accepts lowercase coordinates, but not fixed references
|
|
1477
1512
|
*/
|
|
1478
1513
|
function toCartesian(xc) {
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
// Process letter part
|
|
1484
|
-
if (xc[i] === "$")
|
|
1485
|
-
i++;
|
|
1486
|
-
while (i < xc.length && isCharALetter(xc[i])) {
|
|
1487
|
-
letterPart += xc[i++];
|
|
1488
|
-
}
|
|
1489
|
-
if (letterPart.length === 0 || letterPart.length > 3) {
|
|
1490
|
-
// limit to max 3 letters for performance reasons
|
|
1514
|
+
const chars = new TokenizingChars(xc);
|
|
1515
|
+
consumeSpaces(chars);
|
|
1516
|
+
const letterPart = consumeLetters(chars);
|
|
1517
|
+
if (letterPart === -1 || !chars.current) {
|
|
1491
1518
|
throw new Error(`Invalid cell description: ${xc}`);
|
|
1492
1519
|
}
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
}
|
|
1499
|
-
if (i !== xc.length || numberPart.length === 0 || numberPart.length > 7) {
|
|
1500
|
-
// limit to max 7 numbers for performance reasons
|
|
1501
|
-
throw new Error(`Invalid cell description: ${xc}`);
|
|
1502
|
-
}
|
|
1503
|
-
const col = lettersToNumber(letterPart);
|
|
1504
|
-
const row = Number(numberPart) - 1;
|
|
1505
|
-
if (isNaN(row)) {
|
|
1520
|
+
const num = consumeDigits(chars);
|
|
1521
|
+
consumeSpaces(chars);
|
|
1522
|
+
const col = letterPart - 1;
|
|
1523
|
+
const row = num - 1;
|
|
1524
|
+
if (!chars.isOver() || col > MAX_COL || row > MAX_ROW) {
|
|
1506
1525
|
throw new Error(`Invalid cell description: ${xc}`);
|
|
1507
1526
|
}
|
|
1508
1527
|
return { col, row };
|
|
@@ -1914,67 +1933,6 @@ class LazyTranslatedString extends String {
|
|
|
1914
1933
|
}
|
|
1915
1934
|
}
|
|
1916
1935
|
|
|
1917
|
-
/** Reference of a cell (eg. A1, $B$5) */
|
|
1918
|
-
const cellReference = new RegExp(/\$?([A-Z]{1,3})\$?([0-9]{1,7})/, "i");
|
|
1919
|
-
// Same as above, but matches the exact string (nothing before or after)
|
|
1920
|
-
const singleCellReference = new RegExp(/^\$?([A-Z]{1,3})\$?([0-9]{1,7})$/, "i");
|
|
1921
|
-
/** Reference of a column header (eg. A, AB, $A) */
|
|
1922
|
-
const colHeader = new RegExp(/^\$?([A-Z]{1,3})+$/, "i");
|
|
1923
|
-
/** Reference of a row header (eg. 1, $1) */
|
|
1924
|
-
const rowHeader = new RegExp(/^\$?([0-9]{1,7})+$/, "i");
|
|
1925
|
-
/** Reference of a column (eg. A, $CA, Sheet1!B) */
|
|
1926
|
-
const colReference = new RegExp(/^\s*('.+'!|[^']+!)?\$?([A-Z]{1,3})$/, "i");
|
|
1927
|
-
/** Reference of a row (eg. 1, 59, Sheet1!9) */
|
|
1928
|
-
const rowReference = new RegExp(/^\s*('.+'!|[^']+!)?\$?([0-9]{1,7})$/, "i");
|
|
1929
|
-
/** Reference of a normal range or a full row range (eg. A1:B1, 1:$5, $A2:5) */
|
|
1930
|
-
const fullRowXc = /(\$?[A-Z]{1,3})?\$?[0-9]{1,7}\s*:\s*(\$?[A-Z]{1,3})?\$?[0-9]{1,7}\s*/i;
|
|
1931
|
-
/** Reference of a normal range or a column row range (eg. A1:B1, A:$B, $A1:C) */
|
|
1932
|
-
const fullColXc = /\$?[A-Z]{1,3}(\$?[0-9]{1,7})?\s*:\s*\$?[A-Z]{1,3}(\$?[0-9]{1,7})?\s*/i;
|
|
1933
|
-
/** Reference of a cell or a range, it can be a bounded range, a full row or a full column */
|
|
1934
|
-
const rangeReference = new RegExp(/^\s*('.+'!|[^']+!)?/.source +
|
|
1935
|
-
"(" +
|
|
1936
|
-
[cellReference.source, fullRowXc.source, fullColXc.source].join("|") +
|
|
1937
|
-
")" +
|
|
1938
|
-
/$/.source, "i");
|
|
1939
|
-
/**
|
|
1940
|
-
* Return true if the given xc is the reference of a column (e.g. A or AC or Sheet1!A)
|
|
1941
|
-
*/
|
|
1942
|
-
function isColReference(xc) {
|
|
1943
|
-
return colReference.test(xc);
|
|
1944
|
-
}
|
|
1945
|
-
/**
|
|
1946
|
-
* Return true if the given xc is the reference of a column (e.g. 1 or Sheet1!1)
|
|
1947
|
-
*/
|
|
1948
|
-
function isRowReference(xc) {
|
|
1949
|
-
return rowReference.test(xc);
|
|
1950
|
-
}
|
|
1951
|
-
function isColHeader(str) {
|
|
1952
|
-
return colHeader.test(str);
|
|
1953
|
-
}
|
|
1954
|
-
function isRowHeader(str) {
|
|
1955
|
-
return rowHeader.test(str);
|
|
1956
|
-
}
|
|
1957
|
-
/**
|
|
1958
|
-
* Return true if the given xc is the reference of a single cell,
|
|
1959
|
-
* without any specified sheet (e.g. A1)
|
|
1960
|
-
*/
|
|
1961
|
-
function isSingleCellReference(xc) {
|
|
1962
|
-
return singleCellReference.test(xc);
|
|
1963
|
-
}
|
|
1964
|
-
function splitReference(ref) {
|
|
1965
|
-
if (!ref.includes("!")) {
|
|
1966
|
-
return { xc: ref };
|
|
1967
|
-
}
|
|
1968
|
-
const parts = ref.split("!");
|
|
1969
|
-
const xc = parts.pop();
|
|
1970
|
-
const sheetName = getUnquotedSheetName(parts.join("!")) || undefined;
|
|
1971
|
-
return { sheetName, xc };
|
|
1972
|
-
}
|
|
1973
|
-
/** Return a reference SheetName!xc from the given arguments */
|
|
1974
|
-
function getFullReference(sheetName, xc) {
|
|
1975
|
-
return sheetName !== undefined ? `${getCanonicalSymbolName(sheetName)}!${xc}` : xc;
|
|
1976
|
-
}
|
|
1977
|
-
|
|
1978
1936
|
/**
|
|
1979
1937
|
* Convert from a cartesian reference to a Zone
|
|
1980
1938
|
* The range boundaries will be kept in the same order as the
|
|
@@ -1992,63 +1950,55 @@ function getFullReference(sheetName, xc) {
|
|
|
1992
1950
|
*
|
|
1993
1951
|
*/
|
|
1994
1952
|
function toZoneWithoutBoundaryChanges(xc) {
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
if (
|
|
1999
|
-
|
|
2000
|
-
}
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
if (xc.includes(":")) {
|
|
2004
|
-
[firstRangePart, secondRangePart] = xc.split(":");
|
|
2005
|
-
firstRangePart = firstRangePart.trim();
|
|
2006
|
-
secondRangePart = secondRangePart.trim();
|
|
2007
|
-
}
|
|
2008
|
-
else {
|
|
2009
|
-
firstRangePart = xc.trim();
|
|
2010
|
-
}
|
|
1953
|
+
const chars = new TokenizingChars(xc);
|
|
1954
|
+
consumeSpaces(chars);
|
|
1955
|
+
const sheetSeparatorIndex = xc.indexOf("!");
|
|
1956
|
+
if (sheetSeparatorIndex !== -1) {
|
|
1957
|
+
chars.advanceBy(sheetSeparatorIndex + 1);
|
|
1958
|
+
}
|
|
1959
|
+
const leftLetters = consumeLetters(chars);
|
|
1960
|
+
const leftNumbers = consumeDigits(chars);
|
|
2011
1961
|
let top, bottom, left, right;
|
|
2012
1962
|
let fullCol = false;
|
|
2013
1963
|
let fullRow = false;
|
|
2014
1964
|
let hasHeader = false;
|
|
2015
|
-
if (
|
|
2016
|
-
left = right =
|
|
1965
|
+
if (leftNumbers === -1) {
|
|
1966
|
+
left = right = leftLetters - 1;
|
|
2017
1967
|
top = bottom = 0;
|
|
2018
1968
|
fullCol = true;
|
|
2019
1969
|
}
|
|
2020
|
-
else if (
|
|
2021
|
-
top = bottom =
|
|
1970
|
+
else if (leftLetters === -1) {
|
|
1971
|
+
top = bottom = leftNumbers - 1;
|
|
2022
1972
|
left = right = 0;
|
|
2023
1973
|
fullRow = true;
|
|
2024
1974
|
}
|
|
2025
1975
|
else {
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
top = bottom = c.row;
|
|
1976
|
+
left = right = leftLetters - 1;
|
|
1977
|
+
top = bottom = leftNumbers - 1;
|
|
2029
1978
|
hasHeader = true;
|
|
2030
1979
|
}
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
1980
|
+
consumeSpaces(chars);
|
|
1981
|
+
if (chars.current === ":") {
|
|
1982
|
+
chars.advanceBy(1);
|
|
1983
|
+
consumeSpaces(chars);
|
|
1984
|
+
const rightLetters = consumeLetters(chars);
|
|
1985
|
+
const rightNumbers = consumeDigits(chars);
|
|
1986
|
+
if (rightNumbers === -1) {
|
|
1987
|
+
right = rightLetters - 1;
|
|
2034
1988
|
fullCol = true;
|
|
2035
1989
|
}
|
|
2036
|
-
else if (
|
|
2037
|
-
bottom =
|
|
1990
|
+
else if (rightLetters === -1) {
|
|
1991
|
+
bottom = rightNumbers - 1;
|
|
2038
1992
|
fullRow = true;
|
|
2039
1993
|
}
|
|
2040
1994
|
else {
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
bottom = c.row;
|
|
1995
|
+
right = rightLetters - 1;
|
|
1996
|
+
bottom = rightNumbers - 1;
|
|
2044
1997
|
top = fullCol ? bottom : top;
|
|
2045
1998
|
left = fullRow ? right : left;
|
|
2046
1999
|
hasHeader = true;
|
|
2047
2000
|
}
|
|
2048
2001
|
}
|
|
2049
|
-
if (fullCol && fullRow) {
|
|
2050
|
-
throw new Error("Wrong zone xc. The zone cannot be at the same time a full column and a full row");
|
|
2051
|
-
}
|
|
2052
2002
|
const zone = {
|
|
2053
2003
|
top,
|
|
2054
2004
|
left,
|
|
@@ -2077,7 +2027,16 @@ function toZoneWithoutBoundaryChanges(xc) {
|
|
|
2077
2027
|
*/
|
|
2078
2028
|
function toUnboundedZone(xc) {
|
|
2079
2029
|
const zone = toZoneWithoutBoundaryChanges(xc);
|
|
2080
|
-
|
|
2030
|
+
const orderedZone = reorderZone(zone);
|
|
2031
|
+
const bottom = orderedZone.bottom;
|
|
2032
|
+
const right = orderedZone.right;
|
|
2033
|
+
if ((bottom !== undefined && bottom > MAX_ROW) || (right !== undefined && right > MAX_COL)) {
|
|
2034
|
+
throw new Error(`Range string out of bounds: ${xc}`); // limit the size of the zone for performance
|
|
2035
|
+
}
|
|
2036
|
+
if (bottom === undefined && right === undefined) {
|
|
2037
|
+
throw new Error("Wrong zone xc. The zone cannot be at the same time a full column and a full row");
|
|
2038
|
+
}
|
|
2039
|
+
return orderedZone;
|
|
2081
2040
|
}
|
|
2082
2041
|
/**
|
|
2083
2042
|
* Convert from a cartesian reference to a Zone.
|
|
@@ -5798,6 +5757,67 @@ function scrollDelay(value) {
|
|
|
5798
5757
|
return MIN_DELAY + (MAX_DELAY - MIN_DELAY) * Math.exp(-ACCELERATION * (value - 1));
|
|
5799
5758
|
}
|
|
5800
5759
|
|
|
5760
|
+
/** Reference of a cell (eg. A1, $B$5) */
|
|
5761
|
+
const cellReference = new RegExp(/\$?([A-Z]{1,3})\$?([0-9]{1,7})/, "i");
|
|
5762
|
+
// Same as above, but matches the exact string (nothing before or after)
|
|
5763
|
+
const singleCellReference = new RegExp(/^\$?([A-Z]{1,3})\$?([0-9]{1,7})$/, "i");
|
|
5764
|
+
/** Reference of a column header (eg. A, AB, $A) */
|
|
5765
|
+
const colHeader = new RegExp(/^\$?([A-Z]{1,3})+$/, "i");
|
|
5766
|
+
/** Reference of a row header (eg. 1, $1) */
|
|
5767
|
+
const rowHeader = new RegExp(/^\$?([0-9]{1,7})+$/, "i");
|
|
5768
|
+
/** Reference of a column (eg. A, $CA, Sheet1!B) */
|
|
5769
|
+
const colReference = new RegExp(/^\s*('.+'!|[^']+!)?\$?([A-Z]{1,3})$/, "i");
|
|
5770
|
+
/** Reference of a row (eg. 1, 59, Sheet1!9) */
|
|
5771
|
+
const rowReference = new RegExp(/^\s*('.+'!|[^']+!)?\$?([0-9]{1,7})$/, "i");
|
|
5772
|
+
/** Reference of a normal range or a full row range (eg. A1:B1, 1:$5, $A2:5) */
|
|
5773
|
+
const fullRowXc = /(\$?[A-Z]{1,3})?\$?[0-9]{1,7}\s*:\s*(\$?[A-Z]{1,3})?\$?[0-9]{1,7}\s*/i;
|
|
5774
|
+
/** Reference of a normal range or a column row range (eg. A1:B1, A:$B, $A1:C) */
|
|
5775
|
+
const fullColXc = /\$?[A-Z]{1,3}(\$?[0-9]{1,7})?\s*:\s*\$?[A-Z]{1,3}(\$?[0-9]{1,7})?\s*/i;
|
|
5776
|
+
/** Reference of a cell or a range, it can be a bounded range, a full row or a full column */
|
|
5777
|
+
const rangeReference = new RegExp(/^\s*('.+'!|[^']+!)?/.source +
|
|
5778
|
+
"(" +
|
|
5779
|
+
[cellReference.source, fullRowXc.source, fullColXc.source].join("|") +
|
|
5780
|
+
")" +
|
|
5781
|
+
/$/.source, "i");
|
|
5782
|
+
/**
|
|
5783
|
+
* Return true if the given xc is the reference of a column (e.g. A or AC or Sheet1!A)
|
|
5784
|
+
*/
|
|
5785
|
+
function isColReference(xc) {
|
|
5786
|
+
return colReference.test(xc);
|
|
5787
|
+
}
|
|
5788
|
+
/**
|
|
5789
|
+
* Return true if the given xc is the reference of a column (e.g. 1 or Sheet1!1)
|
|
5790
|
+
*/
|
|
5791
|
+
function isRowReference(xc) {
|
|
5792
|
+
return rowReference.test(xc);
|
|
5793
|
+
}
|
|
5794
|
+
function isColHeader(str) {
|
|
5795
|
+
return colHeader.test(str);
|
|
5796
|
+
}
|
|
5797
|
+
function isRowHeader(str) {
|
|
5798
|
+
return rowHeader.test(str);
|
|
5799
|
+
}
|
|
5800
|
+
/**
|
|
5801
|
+
* Return true if the given xc is the reference of a single cell,
|
|
5802
|
+
* without any specified sheet (e.g. A1)
|
|
5803
|
+
*/
|
|
5804
|
+
function isSingleCellReference(xc) {
|
|
5805
|
+
return singleCellReference.test(xc);
|
|
5806
|
+
}
|
|
5807
|
+
function splitReference(ref) {
|
|
5808
|
+
if (!ref.includes("!")) {
|
|
5809
|
+
return { xc: ref };
|
|
5810
|
+
}
|
|
5811
|
+
const parts = ref.split("!");
|
|
5812
|
+
const xc = parts.pop();
|
|
5813
|
+
const sheetName = getUnquotedSheetName(parts.join("!")) || undefined;
|
|
5814
|
+
return { sheetName, xc };
|
|
5815
|
+
}
|
|
5816
|
+
/** Return a reference SheetName!xc from the given arguments */
|
|
5817
|
+
function getFullReference(sheetName, xc) {
|
|
5818
|
+
return sheetName !== undefined ? `${getCanonicalSymbolName(sheetName)}!${xc}` : xc;
|
|
5819
|
+
}
|
|
5820
|
+
|
|
5801
5821
|
class RangeImpl {
|
|
5802
5822
|
getSheetSize;
|
|
5803
5823
|
_zone;
|
|
@@ -39495,12 +39515,13 @@ class StandaloneComposerStore extends AbstractComposerStore {
|
|
|
39495
39515
|
return providersDefinitions;
|
|
39496
39516
|
}
|
|
39497
39517
|
getComposerContent() {
|
|
39518
|
+
let content = this._currentContent;
|
|
39498
39519
|
if (this.editionMode === "inactive") {
|
|
39499
39520
|
// References in the content might not be linked to the current active sheet
|
|
39500
39521
|
// We here force the sheet name prefix for all references that are not in
|
|
39501
39522
|
// the current active sheet
|
|
39502
39523
|
const defaultRangeSheetId = this.args().defaultRangeSheetId;
|
|
39503
|
-
|
|
39524
|
+
content = rangeTokenize(this.args().content)
|
|
39504
39525
|
.map((token) => {
|
|
39505
39526
|
if (token.type === "REFERENCE") {
|
|
39506
39527
|
const range = this.getters.getRangeFromSheetXC(defaultRangeSheetId, token.value);
|
|
@@ -39510,7 +39531,7 @@ class StandaloneComposerStore extends AbstractComposerStore {
|
|
|
39510
39531
|
})
|
|
39511
39532
|
.join("");
|
|
39512
39533
|
}
|
|
39513
|
-
return this.
|
|
39534
|
+
return localizeContent(content, this.getters.getLocale());
|
|
39514
39535
|
}
|
|
39515
39536
|
stopEdition() {
|
|
39516
39537
|
this._stopEdition();
|
|
@@ -43113,6 +43134,9 @@ class PivotMeasureEditor extends owl.Component {
|
|
|
43113
43134
|
measure: this.props.measure,
|
|
43114
43135
|
});
|
|
43115
43136
|
}
|
|
43137
|
+
get isCalculatedMeasureInvalid() {
|
|
43138
|
+
return this.env.model.getters.getMeasureCompiledFormula(this.props.measure).isBadExpression;
|
|
43139
|
+
}
|
|
43116
43140
|
}
|
|
43117
43141
|
|
|
43118
43142
|
css /* scss */ `
|
|
@@ -58447,10 +58471,9 @@ class Evaluator {
|
|
|
58447
58471
|
return this.evaluatedCells.keysForSheet(sheetId);
|
|
58448
58472
|
}
|
|
58449
58473
|
getArrayFormulaSpreadingOn(position) {
|
|
58450
|
-
const
|
|
58451
|
-
|
|
58452
|
-
|
|
58453
|
-
return this.spreadingRelations.isArrayFormula(position) ? position : undefined;
|
|
58474
|
+
const isEmpty = this.getEvaluatedCell(position).type === CellValueType.empty;
|
|
58475
|
+
if (isEmpty) {
|
|
58476
|
+
return undefined;
|
|
58454
58477
|
}
|
|
58455
58478
|
const arrayFormulas = this.spreadingRelations.searchFormulaPositionsSpreadingOn(position.sheetId, positionToZone(position));
|
|
58456
58479
|
return Array.from(arrayFormulas).find((position) => !this.blockedArrayFormulas.has(position));
|
|
@@ -74293,6 +74316,6 @@ exports.tokenColors = tokenColors;
|
|
|
74293
74316
|
exports.tokenize = tokenize;
|
|
74294
74317
|
|
|
74295
74318
|
|
|
74296
|
-
__info__.version = "18.0.
|
|
74297
|
-
__info__.date = "2025-05-
|
|
74298
|
-
__info__.hash = "
|
|
74319
|
+
__info__.version = "18.0.29";
|
|
74320
|
+
__info__.date = "2025-05-20T05:54:57.329Z";
|
|
74321
|
+
__info__.hash = "8213c0e";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -5693,6 +5693,38 @@ declare class ColorGenerator {
|
|
|
5693
5693
|
next(): string;
|
|
5694
5694
|
}
|
|
5695
5695
|
|
|
5696
|
+
/**
|
|
5697
|
+
* Deep copy arrays, plain objects and primitive values.
|
|
5698
|
+
* Throws an error for other types such as class instances.
|
|
5699
|
+
* Sparse arrays remain sparse.
|
|
5700
|
+
*/
|
|
5701
|
+
declare function deepCopy<T>(obj: T): T;
|
|
5702
|
+
declare function unquote(string: string, quoteChar?: "'" | '"'): string;
|
|
5703
|
+
/** Replace the excel-excluded characters of a sheetName */
|
|
5704
|
+
declare function sanitizeSheetName(sheetName: string, replacementChar?: string): string;
|
|
5705
|
+
declare function isMarkdownLink(str: string): boolean;
|
|
5706
|
+
/**
|
|
5707
|
+
* Build a markdown link from a label and an url
|
|
5708
|
+
*/
|
|
5709
|
+
declare function markdownLink(label: string, url: string): string;
|
|
5710
|
+
declare function parseMarkdownLink(str: string): {
|
|
5711
|
+
url: string;
|
|
5712
|
+
label: string;
|
|
5713
|
+
};
|
|
5714
|
+
/**
|
|
5715
|
+
* This helper function can be used as a type guard when filtering arrays.
|
|
5716
|
+
* const foo: number[] = [1, 2, undefined, 4].filter(isDefined)
|
|
5717
|
+
*/
|
|
5718
|
+
declare function isDefined<T>(argument: T | undefined): argument is T;
|
|
5719
|
+
/**
|
|
5720
|
+
* Lazy value computed by the provided function.
|
|
5721
|
+
*/
|
|
5722
|
+
declare function lazy<T>(fn: (() => T) | T): Lazy<T>;
|
|
5723
|
+
/**
|
|
5724
|
+
* Compares two objects.
|
|
5725
|
+
*/
|
|
5726
|
+
declare function deepEquals(o1: any, o2: any): boolean;
|
|
5727
|
+
|
|
5696
5728
|
/**
|
|
5697
5729
|
* Convert a (col) number to the corresponding letter.
|
|
5698
5730
|
*
|
|
@@ -5769,38 +5801,6 @@ declare function formatValue(value: CellValue, { format, locale, formatWidth }:
|
|
|
5769
5801
|
}): FormattedValue;
|
|
5770
5802
|
declare function createCurrencyFormat(currency: Partial<Currency>): Format;
|
|
5771
5803
|
|
|
5772
|
-
/**
|
|
5773
|
-
* Deep copy arrays, plain objects and primitive values.
|
|
5774
|
-
* Throws an error for other types such as class instances.
|
|
5775
|
-
* Sparse arrays remain sparse.
|
|
5776
|
-
*/
|
|
5777
|
-
declare function deepCopy<T>(obj: T): T;
|
|
5778
|
-
declare function unquote(string: string, quoteChar?: "'" | '"'): string;
|
|
5779
|
-
/** Replace the excel-excluded characters of a sheetName */
|
|
5780
|
-
declare function sanitizeSheetName(sheetName: string, replacementChar?: string): string;
|
|
5781
|
-
declare function isMarkdownLink(str: string): boolean;
|
|
5782
|
-
/**
|
|
5783
|
-
* Build a markdown link from a label and an url
|
|
5784
|
-
*/
|
|
5785
|
-
declare function markdownLink(label: string, url: string): string;
|
|
5786
|
-
declare function parseMarkdownLink(str: string): {
|
|
5787
|
-
url: string;
|
|
5788
|
-
label: string;
|
|
5789
|
-
};
|
|
5790
|
-
/**
|
|
5791
|
-
* This helper function can be used as a type guard when filtering arrays.
|
|
5792
|
-
* const foo: number[] = [1, 2, undefined, 4].filter(isDefined)
|
|
5793
|
-
*/
|
|
5794
|
-
declare function isDefined<T>(argument: T | undefined): argument is T;
|
|
5795
|
-
/**
|
|
5796
|
-
* Lazy value computed by the provided function.
|
|
5797
|
-
*/
|
|
5798
|
-
declare function lazy<T>(fn: (() => T) | T): Lazy<T>;
|
|
5799
|
-
/**
|
|
5800
|
-
* Compares two objects.
|
|
5801
|
-
*/
|
|
5802
|
-
declare function deepEquals(o1: any, o2: any): boolean;
|
|
5803
|
-
|
|
5804
5804
|
/**
|
|
5805
5805
|
* Return true if the argument is a "number string".
|
|
5806
5806
|
*
|
|
@@ -9847,6 +9847,7 @@ declare class PivotMeasureEditor extends Component<Props$f> {
|
|
|
9847
9847
|
updateName(measure: PivotMeasure, userDefinedName?: string): void;
|
|
9848
9848
|
toggleMeasureVisibility(): void;
|
|
9849
9849
|
openShowValuesAs(): void;
|
|
9850
|
+
get isCalculatedMeasureInvalid(): boolean;
|
|
9850
9851
|
}
|
|
9851
9852
|
|
|
9852
9853
|
interface Props$e {
|