@odoo/o-spreadsheet 18.1.20 → 18.1.21
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 +41 -40
- package/dist/o-spreadsheet.esm.js +158 -135
- package/dist/o-spreadsheet.iife.js +158 -135
- package/dist/o-spreadsheet.iife.min.js +380 -380
- 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.1.
|
|
6
|
-
* @date 2025-05-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.1.21
|
|
6
|
+
* @date 2025-05-20T05:54:45.398Z
|
|
7
|
+
* @hash 89ed6a9
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -1608,18 +1608,53 @@ function lettersToNumber(letters) {
|
|
|
1608
1608
|
let result = 0;
|
|
1609
1609
|
const l = letters.length;
|
|
1610
1610
|
for (let i = 0; i < l; i++) {
|
|
1611
|
-
const
|
|
1612
|
-
const colIndex = charCode >= 65 && charCode <= 90 ? charCode - 64 : charCode - 96;
|
|
1611
|
+
const colIndex = charToNumber(letters[i]);
|
|
1613
1612
|
result = result * 26 + colIndex;
|
|
1614
1613
|
}
|
|
1615
1614
|
return result - 1;
|
|
1616
1615
|
}
|
|
1616
|
+
function charToNumber(char) {
|
|
1617
|
+
const charCode = char.charCodeAt(0);
|
|
1618
|
+
return charCode >= 65 && charCode <= 90 ? charCode - 64 : charCode - 96;
|
|
1619
|
+
}
|
|
1617
1620
|
function isCharALetter(char) {
|
|
1618
1621
|
return (char >= "A" && char <= "Z") || (char >= "a" && char <= "z");
|
|
1619
1622
|
}
|
|
1620
1623
|
function isCharADigit(char) {
|
|
1621
1624
|
return char >= "0" && char <= "9";
|
|
1622
1625
|
}
|
|
1626
|
+
// we limit the max column to 3 letters and max row to 7 digits for performance reasons
|
|
1627
|
+
const MAX_COL = lettersToNumber("ZZZ");
|
|
1628
|
+
const MAX_ROW = 9999998;
|
|
1629
|
+
function consumeSpaces(chars) {
|
|
1630
|
+
while (chars.current === " ") {
|
|
1631
|
+
chars.advanceBy(1);
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1634
|
+
function consumeLetters(chars) {
|
|
1635
|
+
if (chars.current === "$")
|
|
1636
|
+
chars.advanceBy(1);
|
|
1637
|
+
if (!chars.current || !isCharALetter(chars.current)) {
|
|
1638
|
+
return -1;
|
|
1639
|
+
}
|
|
1640
|
+
let colCoordinate = 0;
|
|
1641
|
+
while (chars.current && isCharALetter(chars.current)) {
|
|
1642
|
+
colCoordinate = colCoordinate * 26 + charToNumber(chars.shift());
|
|
1643
|
+
}
|
|
1644
|
+
return colCoordinate;
|
|
1645
|
+
}
|
|
1646
|
+
function consumeDigits(chars) {
|
|
1647
|
+
if (chars.current === "$")
|
|
1648
|
+
chars.advanceBy(1);
|
|
1649
|
+
if (!chars.current || !isCharADigit(chars.current)) {
|
|
1650
|
+
return -1;
|
|
1651
|
+
}
|
|
1652
|
+
let num = 0;
|
|
1653
|
+
while (chars.current && isCharADigit(chars.current)) {
|
|
1654
|
+
num = num * 10 + Number(chars.shift());
|
|
1655
|
+
}
|
|
1656
|
+
return num;
|
|
1657
|
+
}
|
|
1623
1658
|
/**
|
|
1624
1659
|
* Convert a "XC" coordinate to cartesian coordinates.
|
|
1625
1660
|
*
|
|
@@ -1630,33 +1665,17 @@ function isCharADigit(char) {
|
|
|
1630
1665
|
* Note: it also accepts lowercase coordinates, but not fixed references
|
|
1631
1666
|
*/
|
|
1632
1667
|
function toCartesian(xc) {
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
// Process letter part
|
|
1638
|
-
if (xc[i] === "$")
|
|
1639
|
-
i++;
|
|
1640
|
-
while (i < xc.length && isCharALetter(xc[i])) {
|
|
1641
|
-
letterPart += xc[i++];
|
|
1642
|
-
}
|
|
1643
|
-
if (letterPart.length === 0 || letterPart.length > 3) {
|
|
1644
|
-
// limit to max 3 letters for performance reasons
|
|
1668
|
+
const chars = new TokenizingChars(xc);
|
|
1669
|
+
consumeSpaces(chars);
|
|
1670
|
+
const letterPart = consumeLetters(chars);
|
|
1671
|
+
if (letterPart === -1 || !chars.current) {
|
|
1645
1672
|
throw new Error(`Invalid cell description: ${xc}`);
|
|
1646
1673
|
}
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
}
|
|
1653
|
-
if (i !== xc.length || numberPart.length === 0 || numberPart.length > 7) {
|
|
1654
|
-
// limit to max 7 numbers for performance reasons
|
|
1655
|
-
throw new Error(`Invalid cell description: ${xc}`);
|
|
1656
|
-
}
|
|
1657
|
-
const col = lettersToNumber(letterPart);
|
|
1658
|
-
const row = Number(numberPart) - 1;
|
|
1659
|
-
if (isNaN(row)) {
|
|
1674
|
+
const num = consumeDigits(chars);
|
|
1675
|
+
consumeSpaces(chars);
|
|
1676
|
+
const col = letterPart - 1;
|
|
1677
|
+
const row = num - 1;
|
|
1678
|
+
if (!chars.isOver() || col > MAX_COL || row > MAX_ROW) {
|
|
1660
1679
|
throw new Error(`Invalid cell description: ${xc}`);
|
|
1661
1680
|
}
|
|
1662
1681
|
return { col, row };
|
|
@@ -2068,67 +2087,6 @@ class LazyTranslatedString extends String {
|
|
|
2068
2087
|
}
|
|
2069
2088
|
}
|
|
2070
2089
|
|
|
2071
|
-
/** Reference of a cell (eg. A1, $B$5) */
|
|
2072
|
-
const cellReference = new RegExp(/\$?([A-Z]{1,3})\$?([0-9]{1,7})/, "i");
|
|
2073
|
-
// Same as above, but matches the exact string (nothing before or after)
|
|
2074
|
-
const singleCellReference = new RegExp(/^\$?([A-Z]{1,3})\$?([0-9]{1,7})$/, "i");
|
|
2075
|
-
/** Reference of a column header (eg. A, AB, $A) */
|
|
2076
|
-
const colHeader = new RegExp(/^\$?([A-Z]{1,3})+$/, "i");
|
|
2077
|
-
/** Reference of a row header (eg. 1, $1) */
|
|
2078
|
-
const rowHeader = new RegExp(/^\$?([0-9]{1,7})+$/, "i");
|
|
2079
|
-
/** Reference of a column (eg. A, $CA, Sheet1!B) */
|
|
2080
|
-
const colReference = new RegExp(/^\s*('.+'!|[^']+!)?\$?([A-Z]{1,3})$/, "i");
|
|
2081
|
-
/** Reference of a row (eg. 1, 59, Sheet1!9) */
|
|
2082
|
-
const rowReference = new RegExp(/^\s*('.+'!|[^']+!)?\$?([0-9]{1,7})$/, "i");
|
|
2083
|
-
/** Reference of a normal range or a full row range (eg. A1:B1, 1:$5, $A2:5) */
|
|
2084
|
-
const fullRowXc = /(\$?[A-Z]{1,3})?\$?[0-9]{1,7}\s*:\s*(\$?[A-Z]{1,3})?\$?[0-9]{1,7}\s*/i;
|
|
2085
|
-
/** Reference of a normal range or a column row range (eg. A1:B1, A:$B, $A1:C) */
|
|
2086
|
-
const fullColXc = /\$?[A-Z]{1,3}(\$?[0-9]{1,7})?\s*:\s*\$?[A-Z]{1,3}(\$?[0-9]{1,7})?\s*/i;
|
|
2087
|
-
/** Reference of a cell or a range, it can be a bounded range, a full row or a full column */
|
|
2088
|
-
const rangeReference = new RegExp(/^\s*('.+'!|[^']+!)?/.source +
|
|
2089
|
-
"(" +
|
|
2090
|
-
[cellReference.source, fullRowXc.source, fullColXc.source].join("|") +
|
|
2091
|
-
")" +
|
|
2092
|
-
/$/.source, "i");
|
|
2093
|
-
/**
|
|
2094
|
-
* Return true if the given xc is the reference of a column (e.g. A or AC or Sheet1!A)
|
|
2095
|
-
*/
|
|
2096
|
-
function isColReference(xc) {
|
|
2097
|
-
return colReference.test(xc);
|
|
2098
|
-
}
|
|
2099
|
-
/**
|
|
2100
|
-
* Return true if the given xc is the reference of a column (e.g. 1 or Sheet1!1)
|
|
2101
|
-
*/
|
|
2102
|
-
function isRowReference(xc) {
|
|
2103
|
-
return rowReference.test(xc);
|
|
2104
|
-
}
|
|
2105
|
-
function isColHeader(str) {
|
|
2106
|
-
return colHeader.test(str);
|
|
2107
|
-
}
|
|
2108
|
-
function isRowHeader(str) {
|
|
2109
|
-
return rowHeader.test(str);
|
|
2110
|
-
}
|
|
2111
|
-
/**
|
|
2112
|
-
* Return true if the given xc is the reference of a single cell,
|
|
2113
|
-
* without any specified sheet (e.g. A1)
|
|
2114
|
-
*/
|
|
2115
|
-
function isSingleCellReference(xc) {
|
|
2116
|
-
return singleCellReference.test(xc);
|
|
2117
|
-
}
|
|
2118
|
-
function splitReference(ref) {
|
|
2119
|
-
if (!ref.includes("!")) {
|
|
2120
|
-
return { xc: ref };
|
|
2121
|
-
}
|
|
2122
|
-
const parts = ref.split("!");
|
|
2123
|
-
const xc = parts.pop();
|
|
2124
|
-
const sheetName = getUnquotedSheetName(parts.join("!")) || undefined;
|
|
2125
|
-
return { sheetName, xc };
|
|
2126
|
-
}
|
|
2127
|
-
/** Return a reference SheetName!xc from the given arguments */
|
|
2128
|
-
function getFullReference(sheetName, xc) {
|
|
2129
|
-
return sheetName !== undefined ? `${getCanonicalSymbolName(sheetName)}!${xc}` : xc;
|
|
2130
|
-
}
|
|
2131
|
-
|
|
2132
2090
|
/**
|
|
2133
2091
|
* Convert from a cartesian reference to a Zone
|
|
2134
2092
|
* The range boundaries will be kept in the same order as the
|
|
@@ -2146,63 +2104,55 @@ function getFullReference(sheetName, xc) {
|
|
|
2146
2104
|
*
|
|
2147
2105
|
*/
|
|
2148
2106
|
function toZoneWithoutBoundaryChanges(xc) {
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
if (
|
|
2153
|
-
|
|
2154
|
-
}
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
if (xc.includes(":")) {
|
|
2158
|
-
[firstRangePart, secondRangePart] = xc.split(":");
|
|
2159
|
-
firstRangePart = firstRangePart.trim();
|
|
2160
|
-
secondRangePart = secondRangePart.trim();
|
|
2161
|
-
}
|
|
2162
|
-
else {
|
|
2163
|
-
firstRangePart = xc.trim();
|
|
2164
|
-
}
|
|
2107
|
+
const chars = new TokenizingChars(xc);
|
|
2108
|
+
consumeSpaces(chars);
|
|
2109
|
+
const sheetSeparatorIndex = xc.indexOf("!");
|
|
2110
|
+
if (sheetSeparatorIndex !== -1) {
|
|
2111
|
+
chars.advanceBy(sheetSeparatorIndex + 1);
|
|
2112
|
+
}
|
|
2113
|
+
const leftLetters = consumeLetters(chars);
|
|
2114
|
+
const leftNumbers = consumeDigits(chars);
|
|
2165
2115
|
let top, bottom, left, right;
|
|
2166
2116
|
let fullCol = false;
|
|
2167
2117
|
let fullRow = false;
|
|
2168
2118
|
let hasHeader = false;
|
|
2169
|
-
if (
|
|
2170
|
-
left = right =
|
|
2119
|
+
if (leftNumbers === -1) {
|
|
2120
|
+
left = right = leftLetters - 1;
|
|
2171
2121
|
top = bottom = 0;
|
|
2172
2122
|
fullCol = true;
|
|
2173
2123
|
}
|
|
2174
|
-
else if (
|
|
2175
|
-
top = bottom =
|
|
2124
|
+
else if (leftLetters === -1) {
|
|
2125
|
+
top = bottom = leftNumbers - 1;
|
|
2176
2126
|
left = right = 0;
|
|
2177
2127
|
fullRow = true;
|
|
2178
2128
|
}
|
|
2179
2129
|
else {
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
top = bottom = c.row;
|
|
2130
|
+
left = right = leftLetters - 1;
|
|
2131
|
+
top = bottom = leftNumbers - 1;
|
|
2183
2132
|
hasHeader = true;
|
|
2184
2133
|
}
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2134
|
+
consumeSpaces(chars);
|
|
2135
|
+
if (chars.current === ":") {
|
|
2136
|
+
chars.advanceBy(1);
|
|
2137
|
+
consumeSpaces(chars);
|
|
2138
|
+
const rightLetters = consumeLetters(chars);
|
|
2139
|
+
const rightNumbers = consumeDigits(chars);
|
|
2140
|
+
if (rightNumbers === -1) {
|
|
2141
|
+
right = rightLetters - 1;
|
|
2188
2142
|
fullCol = true;
|
|
2189
2143
|
}
|
|
2190
|
-
else if (
|
|
2191
|
-
bottom =
|
|
2144
|
+
else if (rightLetters === -1) {
|
|
2145
|
+
bottom = rightNumbers - 1;
|
|
2192
2146
|
fullRow = true;
|
|
2193
2147
|
}
|
|
2194
2148
|
else {
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
bottom = c.row;
|
|
2149
|
+
right = rightLetters - 1;
|
|
2150
|
+
bottom = rightNumbers - 1;
|
|
2198
2151
|
top = fullCol ? bottom : top;
|
|
2199
2152
|
left = fullRow ? right : left;
|
|
2200
2153
|
hasHeader = true;
|
|
2201
2154
|
}
|
|
2202
2155
|
}
|
|
2203
|
-
if (fullCol && fullRow) {
|
|
2204
|
-
throw new Error("Wrong zone xc. The zone cannot be at the same time a full column and a full row");
|
|
2205
|
-
}
|
|
2206
2156
|
const zone = {
|
|
2207
2157
|
top,
|
|
2208
2158
|
left,
|
|
@@ -2231,7 +2181,16 @@ function toZoneWithoutBoundaryChanges(xc) {
|
|
|
2231
2181
|
*/
|
|
2232
2182
|
function toUnboundedZone(xc) {
|
|
2233
2183
|
const zone = toZoneWithoutBoundaryChanges(xc);
|
|
2234
|
-
|
|
2184
|
+
const orderedZone = reorderZone(zone);
|
|
2185
|
+
const bottom = orderedZone.bottom;
|
|
2186
|
+
const right = orderedZone.right;
|
|
2187
|
+
if ((bottom !== undefined && bottom > MAX_ROW) || (right !== undefined && right > MAX_COL)) {
|
|
2188
|
+
throw new Error(`Range string out of bounds: ${xc}`); // limit the size of the zone for performance
|
|
2189
|
+
}
|
|
2190
|
+
if (bottom === undefined && right === undefined) {
|
|
2191
|
+
throw new Error("Wrong zone xc. The zone cannot be at the same time a full column and a full row");
|
|
2192
|
+
}
|
|
2193
|
+
return orderedZone;
|
|
2235
2194
|
}
|
|
2236
2195
|
/**
|
|
2237
2196
|
* Convert from a cartesian reference to a Zone.
|
|
@@ -5967,6 +5926,67 @@ function scrollDelay(value) {
|
|
|
5967
5926
|
return MIN_DELAY + (MAX_DELAY - MIN_DELAY) * Math.exp(-ACCELERATION * (value - 1));
|
|
5968
5927
|
}
|
|
5969
5928
|
|
|
5929
|
+
/** Reference of a cell (eg. A1, $B$5) */
|
|
5930
|
+
const cellReference = new RegExp(/\$?([A-Z]{1,3})\$?([0-9]{1,7})/, "i");
|
|
5931
|
+
// Same as above, but matches the exact string (nothing before or after)
|
|
5932
|
+
const singleCellReference = new RegExp(/^\$?([A-Z]{1,3})\$?([0-9]{1,7})$/, "i");
|
|
5933
|
+
/** Reference of a column header (eg. A, AB, $A) */
|
|
5934
|
+
const colHeader = new RegExp(/^\$?([A-Z]{1,3})+$/, "i");
|
|
5935
|
+
/** Reference of a row header (eg. 1, $1) */
|
|
5936
|
+
const rowHeader = new RegExp(/^\$?([0-9]{1,7})+$/, "i");
|
|
5937
|
+
/** Reference of a column (eg. A, $CA, Sheet1!B) */
|
|
5938
|
+
const colReference = new RegExp(/^\s*('.+'!|[^']+!)?\$?([A-Z]{1,3})$/, "i");
|
|
5939
|
+
/** Reference of a row (eg. 1, 59, Sheet1!9) */
|
|
5940
|
+
const rowReference = new RegExp(/^\s*('.+'!|[^']+!)?\$?([0-9]{1,7})$/, "i");
|
|
5941
|
+
/** Reference of a normal range or a full row range (eg. A1:B1, 1:$5, $A2:5) */
|
|
5942
|
+
const fullRowXc = /(\$?[A-Z]{1,3})?\$?[0-9]{1,7}\s*:\s*(\$?[A-Z]{1,3})?\$?[0-9]{1,7}\s*/i;
|
|
5943
|
+
/** Reference of a normal range or a column row range (eg. A1:B1, A:$B, $A1:C) */
|
|
5944
|
+
const fullColXc = /\$?[A-Z]{1,3}(\$?[0-9]{1,7})?\s*:\s*\$?[A-Z]{1,3}(\$?[0-9]{1,7})?\s*/i;
|
|
5945
|
+
/** Reference of a cell or a range, it can be a bounded range, a full row or a full column */
|
|
5946
|
+
const rangeReference = new RegExp(/^\s*('.+'!|[^']+!)?/.source +
|
|
5947
|
+
"(" +
|
|
5948
|
+
[cellReference.source, fullRowXc.source, fullColXc.source].join("|") +
|
|
5949
|
+
")" +
|
|
5950
|
+
/$/.source, "i");
|
|
5951
|
+
/**
|
|
5952
|
+
* Return true if the given xc is the reference of a column (e.g. A or AC or Sheet1!A)
|
|
5953
|
+
*/
|
|
5954
|
+
function isColReference(xc) {
|
|
5955
|
+
return colReference.test(xc);
|
|
5956
|
+
}
|
|
5957
|
+
/**
|
|
5958
|
+
* Return true if the given xc is the reference of a column (e.g. 1 or Sheet1!1)
|
|
5959
|
+
*/
|
|
5960
|
+
function isRowReference(xc) {
|
|
5961
|
+
return rowReference.test(xc);
|
|
5962
|
+
}
|
|
5963
|
+
function isColHeader(str) {
|
|
5964
|
+
return colHeader.test(str);
|
|
5965
|
+
}
|
|
5966
|
+
function isRowHeader(str) {
|
|
5967
|
+
return rowHeader.test(str);
|
|
5968
|
+
}
|
|
5969
|
+
/**
|
|
5970
|
+
* Return true if the given xc is the reference of a single cell,
|
|
5971
|
+
* without any specified sheet (e.g. A1)
|
|
5972
|
+
*/
|
|
5973
|
+
function isSingleCellReference(xc) {
|
|
5974
|
+
return singleCellReference.test(xc);
|
|
5975
|
+
}
|
|
5976
|
+
function splitReference(ref) {
|
|
5977
|
+
if (!ref.includes("!")) {
|
|
5978
|
+
return { xc: ref };
|
|
5979
|
+
}
|
|
5980
|
+
const parts = ref.split("!");
|
|
5981
|
+
const xc = parts.pop();
|
|
5982
|
+
const sheetName = getUnquotedSheetName(parts.join("!")) || undefined;
|
|
5983
|
+
return { sheetName, xc };
|
|
5984
|
+
}
|
|
5985
|
+
/** Return a reference SheetName!xc from the given arguments */
|
|
5986
|
+
function getFullReference(sheetName, xc) {
|
|
5987
|
+
return sheetName !== undefined ? `${getCanonicalSymbolName(sheetName)}!${xc}` : xc;
|
|
5988
|
+
}
|
|
5989
|
+
|
|
5970
5990
|
class RangeImpl {
|
|
5971
5991
|
getSheetSize;
|
|
5972
5992
|
_zone;
|
|
@@ -41346,12 +41366,13 @@ class StandaloneComposerStore extends AbstractComposerStore {
|
|
|
41346
41366
|
return providersDefinitions;
|
|
41347
41367
|
}
|
|
41348
41368
|
getComposerContent() {
|
|
41369
|
+
let content = this._currentContent;
|
|
41349
41370
|
if (this.editionMode === "inactive") {
|
|
41350
41371
|
// References in the content might not be linked to the current active sheet
|
|
41351
41372
|
// We here force the sheet name prefix for all references that are not in
|
|
41352
41373
|
// the current active sheet
|
|
41353
41374
|
const defaultRangeSheetId = this.args().defaultRangeSheetId;
|
|
41354
|
-
|
|
41375
|
+
content = rangeTokenize(this.args().content)
|
|
41355
41376
|
.map((token) => {
|
|
41356
41377
|
if (token.type === "REFERENCE") {
|
|
41357
41378
|
const range = this.getters.getRangeFromSheetXC(defaultRangeSheetId, token.value);
|
|
@@ -41361,7 +41382,7 @@ class StandaloneComposerStore extends AbstractComposerStore {
|
|
|
41361
41382
|
})
|
|
41362
41383
|
.join("");
|
|
41363
41384
|
}
|
|
41364
|
-
return this.
|
|
41385
|
+
return localizeContent(content, this.getters.getLocale());
|
|
41365
41386
|
}
|
|
41366
41387
|
stopEdition() {
|
|
41367
41388
|
this._stopEdition();
|
|
@@ -45107,6 +45128,9 @@ class PivotMeasureEditor extends owl.Component {
|
|
|
45107
45128
|
}
|
|
45108
45129
|
return undefined;
|
|
45109
45130
|
}
|
|
45131
|
+
get isCalculatedMeasureInvalid() {
|
|
45132
|
+
return this.env.model.getters.getMeasureCompiledFormula(this.props.measure).isBadExpression;
|
|
45133
|
+
}
|
|
45110
45134
|
}
|
|
45111
45135
|
|
|
45112
45136
|
css /* scss */ `
|
|
@@ -60479,10 +60503,9 @@ class Evaluator {
|
|
|
60479
60503
|
return this.evaluatedCells.keysForSheet(sheetId);
|
|
60480
60504
|
}
|
|
60481
60505
|
getArrayFormulaSpreadingOn(position) {
|
|
60482
|
-
const
|
|
60483
|
-
|
|
60484
|
-
|
|
60485
|
-
return this.spreadingRelations.isArrayFormula(position) ? position : undefined;
|
|
60506
|
+
const isEmpty = this.getEvaluatedCell(position).type === CellValueType.empty;
|
|
60507
|
+
if (isEmpty) {
|
|
60508
|
+
return undefined;
|
|
60486
60509
|
}
|
|
60487
60510
|
const arrayFormulas = this.spreadingRelations.searchFormulaPositionsSpreadingOn(position.sheetId, positionToZone(position));
|
|
60488
60511
|
return Array.from(arrayFormulas).find((position) => !this.blockedArrayFormulas.has(position));
|
|
@@ -76326,6 +76349,6 @@ exports.tokenColors = tokenColors;
|
|
|
76326
76349
|
exports.tokenize = tokenize;
|
|
76327
76350
|
|
|
76328
76351
|
|
|
76329
|
-
__info__.version = "18.1.
|
|
76330
|
-
__info__.date = "2025-05-
|
|
76331
|
-
__info__.hash = "
|
|
76352
|
+
__info__.version = "18.1.21";
|
|
76353
|
+
__info__.date = "2025-05-20T05:54:45.398Z";
|
|
76354
|
+
__info__.hash = "89ed6a9";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -1275,6 +1275,46 @@ declare class ColorGenerator {
|
|
|
1275
1275
|
next(): string;
|
|
1276
1276
|
}
|
|
1277
1277
|
|
|
1278
|
+
interface SearchOptions {
|
|
1279
|
+
matchCase: boolean;
|
|
1280
|
+
exactMatch: boolean;
|
|
1281
|
+
searchFormulas: boolean;
|
|
1282
|
+
searchScope: "allSheets" | "activeSheet" | "specificRange";
|
|
1283
|
+
specificRange?: Range;
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
/**
|
|
1287
|
+
* Deep copy arrays, plain objects and primitive values.
|
|
1288
|
+
* Throws an error for other types such as class instances.
|
|
1289
|
+
* Sparse arrays remain sparse.
|
|
1290
|
+
*/
|
|
1291
|
+
declare function deepCopy<T>(obj: T): T;
|
|
1292
|
+
declare function unquote(string: string, quoteChar?: "'" | '"'): string;
|
|
1293
|
+
/** Replace the excel-excluded characters of a sheetName */
|
|
1294
|
+
declare function sanitizeSheetName(sheetName: string, replacementChar?: string): string;
|
|
1295
|
+
declare function isMarkdownLink(str: string): boolean;
|
|
1296
|
+
/**
|
|
1297
|
+
* Build a markdown link from a label and an url
|
|
1298
|
+
*/
|
|
1299
|
+
declare function markdownLink(label: string, url: string): string;
|
|
1300
|
+
declare function parseMarkdownLink(str: string): {
|
|
1301
|
+
url: string;
|
|
1302
|
+
label: string;
|
|
1303
|
+
};
|
|
1304
|
+
/**
|
|
1305
|
+
* This helper function can be used as a type guard when filtering arrays.
|
|
1306
|
+
* const foo: number[] = [1, 2, undefined, 4].filter(isDefined)
|
|
1307
|
+
*/
|
|
1308
|
+
declare function isDefined<T>(argument: T | undefined): argument is T;
|
|
1309
|
+
/**
|
|
1310
|
+
* Lazy value computed by the provided function.
|
|
1311
|
+
*/
|
|
1312
|
+
declare function lazy<T>(fn: (() => T) | T): Lazy<T>;
|
|
1313
|
+
/**
|
|
1314
|
+
* Compares two objects.
|
|
1315
|
+
*/
|
|
1316
|
+
declare function deepEquals(o1: any, o2: any): boolean;
|
|
1317
|
+
|
|
1278
1318
|
/**
|
|
1279
1319
|
* Convert a (col) number to the corresponding letter.
|
|
1280
1320
|
*
|
|
@@ -1351,46 +1391,6 @@ declare function formatValue(value: CellValue, { format, locale, formatWidth }:
|
|
|
1351
1391
|
}): FormattedValue;
|
|
1352
1392
|
declare function createCurrencyFormat(currency: Partial<Currency>): Format;
|
|
1353
1393
|
|
|
1354
|
-
interface SearchOptions {
|
|
1355
|
-
matchCase: boolean;
|
|
1356
|
-
exactMatch: boolean;
|
|
1357
|
-
searchFormulas: boolean;
|
|
1358
|
-
searchScope: "allSheets" | "activeSheet" | "specificRange";
|
|
1359
|
-
specificRange?: Range;
|
|
1360
|
-
}
|
|
1361
|
-
|
|
1362
|
-
/**
|
|
1363
|
-
* Deep copy arrays, plain objects and primitive values.
|
|
1364
|
-
* Throws an error for other types such as class instances.
|
|
1365
|
-
* Sparse arrays remain sparse.
|
|
1366
|
-
*/
|
|
1367
|
-
declare function deepCopy<T>(obj: T): T;
|
|
1368
|
-
declare function unquote(string: string, quoteChar?: "'" | '"'): string;
|
|
1369
|
-
/** Replace the excel-excluded characters of a sheetName */
|
|
1370
|
-
declare function sanitizeSheetName(sheetName: string, replacementChar?: string): string;
|
|
1371
|
-
declare function isMarkdownLink(str: string): boolean;
|
|
1372
|
-
/**
|
|
1373
|
-
* Build a markdown link from a label and an url
|
|
1374
|
-
*/
|
|
1375
|
-
declare function markdownLink(label: string, url: string): string;
|
|
1376
|
-
declare function parseMarkdownLink(str: string): {
|
|
1377
|
-
url: string;
|
|
1378
|
-
label: string;
|
|
1379
|
-
};
|
|
1380
|
-
/**
|
|
1381
|
-
* This helper function can be used as a type guard when filtering arrays.
|
|
1382
|
-
* const foo: number[] = [1, 2, undefined, 4].filter(isDefined)
|
|
1383
|
-
*/
|
|
1384
|
-
declare function isDefined<T>(argument: T | undefined): argument is T;
|
|
1385
|
-
/**
|
|
1386
|
-
* Lazy value computed by the provided function.
|
|
1387
|
-
*/
|
|
1388
|
-
declare function lazy<T>(fn: (() => T) | T): Lazy<T>;
|
|
1389
|
-
/**
|
|
1390
|
-
* Compares two objects.
|
|
1391
|
-
*/
|
|
1392
|
-
declare function deepEquals(o1: any, o2: any): boolean;
|
|
1393
|
-
|
|
1394
1394
|
/**
|
|
1395
1395
|
* Return true if the argument is a "number string".
|
|
1396
1396
|
*
|
|
@@ -10096,6 +10096,7 @@ declare class PivotMeasureEditor extends Component<Props$i> {
|
|
|
10096
10096
|
toggleMeasureVisibility(): void;
|
|
10097
10097
|
openShowValuesAs(): void;
|
|
10098
10098
|
getColoredSymbolToken(token: Token): Color | undefined;
|
|
10099
|
+
get isCalculatedMeasureInvalid(): boolean;
|
|
10099
10100
|
}
|
|
10100
10101
|
|
|
10101
10102
|
interface Props$h {
|