@odoo/o-spreadsheet 18.3.22 → 18.3.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/o-spreadsheet.cjs.js +128 -107
- package/dist/o-spreadsheet.esm.js +128 -107
- package/dist/o-spreadsheet.iife.js +128 -107
- package/dist/o-spreadsheet.iife.min.js +13 -12
- 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.3.
|
|
6
|
-
* @date 2025-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.3.24
|
|
6
|
+
* @date 2025-10-16T06:38:12.942Z
|
|
7
|
+
* @hash f13dd1c
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -878,9 +878,7 @@
|
|
|
878
878
|
return newArray;
|
|
879
879
|
}
|
|
880
880
|
function insertItemsAtIndex(array, items, index) {
|
|
881
|
-
|
|
882
|
-
newArray.splice(index, 0, ...items);
|
|
883
|
-
return newArray;
|
|
881
|
+
return array.slice(0, index).concat(items).concat(array.slice(index));
|
|
884
882
|
}
|
|
885
883
|
function replaceItemAtIndex(array, newItem, index) {
|
|
886
884
|
const newArray = [...array];
|
|
@@ -3944,7 +3942,17 @@
|
|
|
3944
3942
|
return toMatrix(data).map((row) => {
|
|
3945
3943
|
return row.map((cell) => {
|
|
3946
3944
|
if (typeof cell.value !== "number") {
|
|
3947
|
-
|
|
3945
|
+
let message = "";
|
|
3946
|
+
if (typeof cell === "object") {
|
|
3947
|
+
message = _t("Function [[FUNCTION_NAME]] expects number values for %s, but got an empty value.", argName);
|
|
3948
|
+
}
|
|
3949
|
+
else if (typeof cell === "string") {
|
|
3950
|
+
message = _t("Function [[FUNCTION_NAME]] expects number values for %s, but got a string.", argName);
|
|
3951
|
+
}
|
|
3952
|
+
else if (typeof cell === "boolean") {
|
|
3953
|
+
message = _t("Function [[FUNCTION_NAME]] expects number values for %s, but got a boolean.", argName);
|
|
3954
|
+
}
|
|
3955
|
+
throw new EvaluationError(message);
|
|
3948
3956
|
}
|
|
3949
3957
|
return cell.value;
|
|
3950
3958
|
});
|
|
@@ -5144,7 +5152,7 @@
|
|
|
5144
5152
|
* Replace in place tokens "mm" and "m" that denote minutes in date format with "MM" to avoid confusion with months.
|
|
5145
5153
|
*
|
|
5146
5154
|
* As per OpenXML specification, in date formats if a date token "m" or "mm" is followed by a date token "s" or
|
|
5147
|
-
* preceded by a data token "h", then it's not a month but
|
|
5155
|
+
* preceded by a data token "h", then it's not a month but a minute.
|
|
5148
5156
|
*/
|
|
5149
5157
|
function convertTokensToMinutesInDateFormat(tokens) {
|
|
5150
5158
|
const dateParts = tokens.filter((token) => token.type === "DATE_PART");
|
|
@@ -5187,6 +5195,9 @@
|
|
|
5187
5195
|
case "REPEATED_CHAR":
|
|
5188
5196
|
format += "*" + token.value;
|
|
5189
5197
|
break;
|
|
5198
|
+
case "DATE_PART":
|
|
5199
|
+
format += token.value === "MM" ? "mm" : token.value; // Convert "MM" back to "mm" for minutes
|
|
5200
|
+
break;
|
|
5190
5201
|
default:
|
|
5191
5202
|
format += token.value;
|
|
5192
5203
|
}
|
|
@@ -9126,7 +9137,7 @@
|
|
|
9126
9137
|
pasteCell(origin, target, clipboardOption) {
|
|
9127
9138
|
const { sheetId, col, row } = target;
|
|
9128
9139
|
const targetCell = this.getters.getEvaluatedCell(target);
|
|
9129
|
-
const originFormat = origin?.format
|
|
9140
|
+
const originFormat = origin?.format || origin.evaluatedCell.format;
|
|
9130
9141
|
if (clipboardOption?.pasteOption === "asValue") {
|
|
9131
9142
|
this.dispatch("UPDATE_CELL", {
|
|
9132
9143
|
...target,
|
|
@@ -12832,7 +12843,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
12832
12843
|
],
|
|
12833
12844
|
compute: function (knownDataY, knownDataX = [[]], newDataX = [[]], b = { value: true }) {
|
|
12834
12845
|
assertNonEmptyMatrix(knownDataY, "known_data_y");
|
|
12835
|
-
return expM(predictLinearValues(logM(toNumberMatrix(knownDataY, "
|
|
12846
|
+
return expM(predictLinearValues(logM(toNumberMatrix(knownDataY, "known_data_y")), toNumberMatrix(knownDataX, "known_data_x"), toNumberMatrix(newDataX, "new_data_y"), toBoolean(b)));
|
|
12836
12847
|
},
|
|
12837
12848
|
};
|
|
12838
12849
|
// -----------------------------------------------------------------------------
|
|
@@ -12897,7 +12908,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
12897
12908
|
],
|
|
12898
12909
|
compute: function (dataY, dataX = [[]], calculateB = { value: true }, verbose = { value: false }) {
|
|
12899
12910
|
assertNonEmptyMatrix(dataY, "data_y");
|
|
12900
|
-
return fullLinearRegression(toNumberMatrix(dataX, "
|
|
12911
|
+
return fullLinearRegression(toNumberMatrix(dataX, "data_x"), toNumberMatrix(dataY, "data_y"), toBoolean(calculateB), toBoolean(verbose));
|
|
12901
12912
|
},
|
|
12902
12913
|
isExported: true,
|
|
12903
12914
|
};
|
|
@@ -12914,7 +12925,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
12914
12925
|
],
|
|
12915
12926
|
compute: function (dataY, dataX = [[]], calculateB = { value: true }, verbose = { value: false }) {
|
|
12916
12927
|
assertNonEmptyMatrix(dataY, "data_y");
|
|
12917
|
-
const coeffs = fullLinearRegression(toNumberMatrix(dataX, "
|
|
12928
|
+
const coeffs = fullLinearRegression(toNumberMatrix(dataX, "data_x"), logM(toNumberMatrix(dataY, "data_y")), toBoolean(calculateB), toBoolean(verbose));
|
|
12918
12929
|
for (let i = 0; i < coeffs.length; i++) {
|
|
12919
12930
|
coeffs[i][0] = Math.exp(coeffs[i][0]);
|
|
12920
12931
|
}
|
|
@@ -13504,7 +13515,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
13504
13515
|
],
|
|
13505
13516
|
compute: function (knownDataY, knownDataX = [[]], newDataX = [[]], b = { value: true }) {
|
|
13506
13517
|
assertNonEmptyMatrix(knownDataY, "known_data_y");
|
|
13507
|
-
return predictLinearValues(toNumberMatrix(knownDataY, "
|
|
13518
|
+
return predictLinearValues(toNumberMatrix(knownDataY, "known_data_y"), toNumberMatrix(knownDataX, "known_data_x"), toNumberMatrix(newDataX, "new_data_y"), toBoolean(b));
|
|
13508
13519
|
},
|
|
13509
13520
|
};
|
|
13510
13521
|
// -----------------------------------------------------------------------------
|
|
@@ -21046,6 +21057,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
21046
21057
|
}
|
|
21047
21058
|
const ctx = chart.ctx;
|
|
21048
21059
|
ctx.save();
|
|
21060
|
+
const { left, top, height, width } = chart.chartArea;
|
|
21061
|
+
ctx.beginPath();
|
|
21062
|
+
ctx.rect(left, top, width, height);
|
|
21063
|
+
ctx.clip();
|
|
21049
21064
|
ctx.textAlign = "center";
|
|
21050
21065
|
ctx.textBaseline = "middle";
|
|
21051
21066
|
ctx.miterLimit = 1; // Avoid sharp artifacts on strokeText
|
|
@@ -25174,6 +25189,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
25174
25189
|
parser: luxonFormat,
|
|
25175
25190
|
displayFormats,
|
|
25176
25191
|
unit: timeUnit ?? false,
|
|
25192
|
+
tooltipFormat: luxonFormat,
|
|
25177
25193
|
};
|
|
25178
25194
|
}
|
|
25179
25195
|
/**
|
|
@@ -26243,6 +26259,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
26243
26259
|
};
|
|
26244
26260
|
Object.assign(scales.x, axis);
|
|
26245
26261
|
scales.x.ticks.maxTicksLimit = 15;
|
|
26262
|
+
delete scales?.x?.ticks?.callback;
|
|
26246
26263
|
}
|
|
26247
26264
|
else if (axisType === "linear") {
|
|
26248
26265
|
scales.x.type = "linear";
|
|
@@ -30836,6 +30853,74 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
30836
30853
|
return undefined;
|
|
30837
30854
|
});
|
|
30838
30855
|
|
|
30856
|
+
/**
|
|
30857
|
+
* Get the relative path between two files
|
|
30858
|
+
*
|
|
30859
|
+
* Eg.:
|
|
30860
|
+
* from "folder1/file1.txt" to "folder2/file2.txt" => "../folder2/file2.txt"
|
|
30861
|
+
*/
|
|
30862
|
+
function getRelativePath(from, to) {
|
|
30863
|
+
const fromPathParts = from.split("/");
|
|
30864
|
+
const toPathParts = to.split("/");
|
|
30865
|
+
let relPath = "";
|
|
30866
|
+
let startIndex = 0;
|
|
30867
|
+
for (let i = 0; i < fromPathParts.length - 1; i++) {
|
|
30868
|
+
if (fromPathParts[i] === toPathParts[i]) {
|
|
30869
|
+
startIndex++;
|
|
30870
|
+
}
|
|
30871
|
+
else {
|
|
30872
|
+
relPath += "../";
|
|
30873
|
+
}
|
|
30874
|
+
}
|
|
30875
|
+
relPath += toPathParts.slice(startIndex).join("/");
|
|
30876
|
+
return relPath;
|
|
30877
|
+
}
|
|
30878
|
+
/**
|
|
30879
|
+
* Convert an array of element into an object where the objects keys were the elements position in the array.
|
|
30880
|
+
* Can give an offset as argument, and all the array indexes will we shifted by this offset in the returned object.
|
|
30881
|
+
*
|
|
30882
|
+
* eg. : ["a", "b"] => {0:"a", 1:"b"}
|
|
30883
|
+
*/
|
|
30884
|
+
function arrayToObject(array, indexOffset = 0) {
|
|
30885
|
+
const obj = {};
|
|
30886
|
+
for (let i = 0; i < array.length; i++) {
|
|
30887
|
+
if (array[i]) {
|
|
30888
|
+
obj[i + indexOffset] = array[i];
|
|
30889
|
+
}
|
|
30890
|
+
}
|
|
30891
|
+
return obj;
|
|
30892
|
+
}
|
|
30893
|
+
/**
|
|
30894
|
+
* In xlsx we can have string with unicode characters with the format _x00fa_.
|
|
30895
|
+
* Replace with characters understandable by JS
|
|
30896
|
+
*/
|
|
30897
|
+
function fixXlsxUnicode(str) {
|
|
30898
|
+
return str.replace(/_x([0-9a-zA-Z]{4})_/g, (match, code) => {
|
|
30899
|
+
return String.fromCharCode(parseInt(code, 16));
|
|
30900
|
+
});
|
|
30901
|
+
}
|
|
30902
|
+
/** Get a header in the SheetData. Create the header if it doesn't exist in the SheetData */
|
|
30903
|
+
function getSheetDataHeader(sheetData, dimension, index) {
|
|
30904
|
+
if (dimension === "COL") {
|
|
30905
|
+
if (!sheetData.cols[index]) {
|
|
30906
|
+
sheetData.cols[index] = {};
|
|
30907
|
+
}
|
|
30908
|
+
return sheetData.cols[index];
|
|
30909
|
+
}
|
|
30910
|
+
if (!sheetData.rows[index]) {
|
|
30911
|
+
sheetData.rows[index] = {};
|
|
30912
|
+
}
|
|
30913
|
+
return sheetData.rows[index];
|
|
30914
|
+
}
|
|
30915
|
+
/** Prefix the string by "=" if the string looks like a formula */
|
|
30916
|
+
function prefixFormulaWithEqual(formula) {
|
|
30917
|
+
if (formula[0] === "=") {
|
|
30918
|
+
return formula;
|
|
30919
|
+
}
|
|
30920
|
+
const tokens = tokenize(formula);
|
|
30921
|
+
return tokens.length === 1 && tokens[0].type !== "REFERENCE" ? formula : "=" + formula;
|
|
30922
|
+
}
|
|
30923
|
+
|
|
30839
30924
|
/**
|
|
30840
30925
|
* Map of the different types of conversions warnings and their name in error messages
|
|
30841
30926
|
*/
|
|
@@ -31343,66 +31428,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
31343
31428
|
*/
|
|
31344
31429
|
const DEFAULT_SYSTEM_COLOR = "FF000000";
|
|
31345
31430
|
|
|
31346
|
-
/**
|
|
31347
|
-
* Get the relative path between two files
|
|
31348
|
-
*
|
|
31349
|
-
* Eg.:
|
|
31350
|
-
* from "folder1/file1.txt" to "folder2/file2.txt" => "../folder2/file2.txt"
|
|
31351
|
-
*/
|
|
31352
|
-
function getRelativePath(from, to) {
|
|
31353
|
-
const fromPathParts = from.split("/");
|
|
31354
|
-
const toPathParts = to.split("/");
|
|
31355
|
-
let relPath = "";
|
|
31356
|
-
let startIndex = 0;
|
|
31357
|
-
for (let i = 0; i < fromPathParts.length - 1; i++) {
|
|
31358
|
-
if (fromPathParts[i] === toPathParts[i]) {
|
|
31359
|
-
startIndex++;
|
|
31360
|
-
}
|
|
31361
|
-
else {
|
|
31362
|
-
relPath += "../";
|
|
31363
|
-
}
|
|
31364
|
-
}
|
|
31365
|
-
relPath += toPathParts.slice(startIndex).join("/");
|
|
31366
|
-
return relPath;
|
|
31367
|
-
}
|
|
31368
|
-
/**
|
|
31369
|
-
* Convert an array of element into an object where the objects keys were the elements position in the array.
|
|
31370
|
-
* Can give an offset as argument, and all the array indexes will we shifted by this offset in the returned object.
|
|
31371
|
-
*
|
|
31372
|
-
* eg. : ["a", "b"] => {0:"a", 1:"b"}
|
|
31373
|
-
*/
|
|
31374
|
-
function arrayToObject(array, indexOffset = 0) {
|
|
31375
|
-
const obj = {};
|
|
31376
|
-
for (let i = 0; i < array.length; i++) {
|
|
31377
|
-
if (array[i]) {
|
|
31378
|
-
obj[i + indexOffset] = array[i];
|
|
31379
|
-
}
|
|
31380
|
-
}
|
|
31381
|
-
return obj;
|
|
31382
|
-
}
|
|
31383
|
-
/**
|
|
31384
|
-
* In xlsx we can have string with unicode characters with the format _x00fa_.
|
|
31385
|
-
* Replace with characters understandable by JS
|
|
31386
|
-
*/
|
|
31387
|
-
function fixXlsxUnicode(str) {
|
|
31388
|
-
return str.replace(/_x([0-9a-zA-Z]{4})_/g, (match, code) => {
|
|
31389
|
-
return String.fromCharCode(parseInt(code, 16));
|
|
31390
|
-
});
|
|
31391
|
-
}
|
|
31392
|
-
/** Get a header in the SheetData. Create the header if it doesn't exist in the SheetData */
|
|
31393
|
-
function getSheetDataHeader(sheetData, dimension, index) {
|
|
31394
|
-
if (dimension === "COL") {
|
|
31395
|
-
if (!sheetData.cols[index]) {
|
|
31396
|
-
sheetData.cols[index] = {};
|
|
31397
|
-
}
|
|
31398
|
-
return sheetData.cols[index];
|
|
31399
|
-
}
|
|
31400
|
-
if (!sheetData.rows[index]) {
|
|
31401
|
-
sheetData.rows[index] = {};
|
|
31402
|
-
}
|
|
31403
|
-
return sheetData.rows[index];
|
|
31404
|
-
}
|
|
31405
|
-
|
|
31406
31431
|
const XLSX_DATE_FORMAT_REGEX = /^(yy|yyyy|m{1,5}|d{1,4}|h{1,2}|s{1,2}|am\/pm|a\/m|\s|-|\/|\.|:)+$/i;
|
|
31407
31432
|
/**
|
|
31408
31433
|
* Convert excel format to o_spreadsheet format
|
|
@@ -31612,9 +31637,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
31612
31637
|
if (!rule.operator || !rule.formula || rule.formula.length === 0)
|
|
31613
31638
|
continue;
|
|
31614
31639
|
operator = convertCFCellIsOperator(rule.operator);
|
|
31615
|
-
values.push(
|
|
31640
|
+
values.push(prefixFormulaWithEqual(rule.formula[0]));
|
|
31616
31641
|
if (rule.formula.length === 2) {
|
|
31617
|
-
values.push(
|
|
31642
|
+
values.push(prefixFormulaWithEqual(rule.formula[1]));
|
|
31618
31643
|
}
|
|
31619
31644
|
break;
|
|
31620
31645
|
}
|
|
@@ -31772,11 +31797,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
31772
31797
|
? ICON_SETS[iconSet].neutral
|
|
31773
31798
|
: ICON_SETS[iconSet].good;
|
|
31774
31799
|
}
|
|
31775
|
-
/** Prefix the string by "=" if the string looks like a formula */
|
|
31776
|
-
function prefixFormula(formula) {
|
|
31777
|
-
const tokens = tokenize(formula);
|
|
31778
|
-
return tokens.length === 1 && tokens[0].type !== "REFERENCE" ? formula : "=" + formula;
|
|
31779
|
-
}
|
|
31780
31800
|
// ---------------------------------------------------------------------------
|
|
31781
31801
|
// Warnings
|
|
31782
31802
|
// ---------------------------------------------------------------------------
|
|
@@ -32213,7 +32233,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
32213
32233
|
dvRules.push(decimalRule);
|
|
32214
32234
|
break;
|
|
32215
32235
|
case "list":
|
|
32216
|
-
const listRule =
|
|
32236
|
+
const listRule = convertListRule(dvId++, dv);
|
|
32217
32237
|
dvRules.push(listRule);
|
|
32218
32238
|
break;
|
|
32219
32239
|
case "date":
|
|
@@ -32233,9 +32253,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
32233
32253
|
return dvRules;
|
|
32234
32254
|
}
|
|
32235
32255
|
function convertDecimalRule(id, dv) {
|
|
32236
|
-
const values = [dv.formula1.toString()];
|
|
32256
|
+
const values = [prefixFormulaWithEqual(dv.formula1.toString())];
|
|
32237
32257
|
if (dv.formula2) {
|
|
32238
|
-
values.push(dv.formula2.toString());
|
|
32258
|
+
values.push(prefixFormulaWithEqual(dv.formula2.toString()));
|
|
32239
32259
|
}
|
|
32240
32260
|
return {
|
|
32241
32261
|
id: id.toString(),
|
|
@@ -32247,7 +32267,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
32247
32267
|
},
|
|
32248
32268
|
};
|
|
32249
32269
|
}
|
|
32250
|
-
function
|
|
32270
|
+
function convertListRule(id, dv) {
|
|
32251
32271
|
const formula1 = dv.formula1.toString();
|
|
32252
32272
|
const isRangeRule = rangeReference.test(formula1);
|
|
32253
32273
|
return {
|
|
@@ -32263,9 +32283,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
32263
32283
|
}
|
|
32264
32284
|
function convertDateRule(id, dv) {
|
|
32265
32285
|
let criterion;
|
|
32266
|
-
const values = [dv.formula1.toString()];
|
|
32286
|
+
const values = [prefixFormulaWithEqual(dv.formula1.toString())];
|
|
32267
32287
|
if (dv.formula2) {
|
|
32268
|
-
values.push(dv.formula2.toString());
|
|
32288
|
+
values.push(prefixFormulaWithEqual(dv.formula2.toString()));
|
|
32269
32289
|
criterion = {
|
|
32270
32290
|
type: XLSX_DV_DATE_OPERATOR_TO_DV_TYPE_MAPPING[dv.operator],
|
|
32271
32291
|
values: getDateCriterionFormattedValues(values, DEFAULT_LOCALE),
|
|
@@ -32292,7 +32312,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
32292
32312
|
isBlocking: dv.errorStyle !== "warning",
|
|
32293
32313
|
criterion: {
|
|
32294
32314
|
type: "customFormula",
|
|
32295
|
-
values: [
|
|
32315
|
+
values: [prefixFormulaWithEqual(dv.formula1.toString())],
|
|
32296
32316
|
},
|
|
32297
32317
|
};
|
|
32298
32318
|
}
|
|
@@ -47291,12 +47311,13 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
47291
47311
|
onCloseSidePanel: { type: Function, optional: true },
|
|
47292
47312
|
};
|
|
47293
47313
|
state = owl.useState({ rule: this.defaultDataValidationRule, errors: [] });
|
|
47314
|
+
editingSheetId;
|
|
47294
47315
|
setup() {
|
|
47316
|
+
this.editingSheetId = this.env.model.getters.getActiveSheetId();
|
|
47295
47317
|
if (this.props.rule) {
|
|
47296
|
-
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
47297
47318
|
this.state.rule = {
|
|
47298
47319
|
...this.props.rule,
|
|
47299
|
-
ranges: this.props.rule.ranges.map((range) => this.env.model.getters.getRangeString(range,
|
|
47320
|
+
ranges: this.props.rule.ranges.map((range) => this.env.model.getters.getRangeString(range, this.editingSheetId)),
|
|
47300
47321
|
};
|
|
47301
47322
|
this.state.rule.criterion.type = this.props.rule.criterion.type;
|
|
47302
47323
|
}
|
|
@@ -47330,7 +47351,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
47330
47351
|
const locale = this.env.model.getters.getLocale();
|
|
47331
47352
|
const criterion = rule.criterion;
|
|
47332
47353
|
const criterionEvaluator = dataValidationEvaluatorRegistry.get(criterion.type);
|
|
47333
|
-
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
47334
47354
|
const values = criterion.values
|
|
47335
47355
|
.slice(0, criterionEvaluator.numberOfValues(criterion))
|
|
47336
47356
|
.map((value) => value?.trim())
|
|
@@ -47338,8 +47358,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
47338
47358
|
.map((value) => canonicalizeContent(value, locale));
|
|
47339
47359
|
rule.criterion = { ...criterion, values };
|
|
47340
47360
|
return {
|
|
47341
|
-
sheetId,
|
|
47342
|
-
ranges: this.state.rule.ranges.map((xc) => this.env.model.getters.getRangeDataFromXc(
|
|
47361
|
+
sheetId: this.editingSheetId,
|
|
47362
|
+
ranges: this.state.rule.ranges.map((xc) => this.env.model.getters.getRangeDataFromXc(this.editingSheetId, xc)),
|
|
47343
47363
|
rule,
|
|
47344
47364
|
};
|
|
47345
47365
|
}
|
|
@@ -47869,6 +47889,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
47869
47889
|
.o-button {
|
|
47870
47890
|
height: 19px;
|
|
47871
47891
|
width: 19px;
|
|
47892
|
+
box-sizing: content-box;
|
|
47872
47893
|
.o-icon {
|
|
47873
47894
|
height: 14px;
|
|
47874
47895
|
width: 14px;
|
|
@@ -48632,7 +48653,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
48632
48653
|
return undefined;
|
|
48633
48654
|
}
|
|
48634
48655
|
get isCalculatedMeasureInvalid() {
|
|
48635
|
-
return
|
|
48656
|
+
return compile(this.props.measure.computedBy?.formula ?? "").isBadExpression;
|
|
48636
48657
|
}
|
|
48637
48658
|
}
|
|
48638
48659
|
|
|
@@ -59764,7 +59785,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
59764
59785
|
let sizes = [...this.sizes[cmd.sheetId][cmd.dimension]];
|
|
59765
59786
|
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
59766
59787
|
const baseSize = sizes[cmd.base];
|
|
59767
|
-
sizes
|
|
59788
|
+
sizes = insertItemsAtIndex(sizes, Array(cmd.quantity).fill(baseSize), addIndex);
|
|
59768
59789
|
this.history.update("sizes", cmd.sheetId, cmd.dimension, sizes);
|
|
59769
59790
|
break;
|
|
59770
59791
|
}
|
|
@@ -59916,9 +59937,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
59916
59937
|
break;
|
|
59917
59938
|
}
|
|
59918
59939
|
case "ADD_COLUMNS_ROWS": {
|
|
59919
|
-
const hiddenHeaders = [...this.hiddenHeaders[cmd.sheetId][cmd.dimension]];
|
|
59920
59940
|
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
59921
|
-
hiddenHeaders.
|
|
59941
|
+
const hiddenHeaders = insertItemsAtIndex([...this.hiddenHeaders[cmd.sheetId][cmd.dimension]], Array(cmd.quantity).fill(false), addIndex);
|
|
59922
59942
|
this.history.update("hiddenHeaders", cmd.sheetId, cmd.dimension, hiddenHeaders);
|
|
59923
59943
|
break;
|
|
59924
59944
|
}
|
|
@@ -63982,12 +64002,12 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
63982
64002
|
this.rTrees[sheetId].remove(item, this.rtreeItemComparer);
|
|
63983
64003
|
}
|
|
63984
64004
|
rtreeItemComparer(left, right) {
|
|
63985
|
-
return (left.
|
|
63986
|
-
left.boundingBox.sheetId === right.boundingBox.sheetId &&
|
|
64005
|
+
return (left.boundingBox.sheetId === right.boundingBox.sheetId &&
|
|
63987
64006
|
left.boundingBox?.zone.left === right.boundingBox.zone.left &&
|
|
63988
64007
|
left.boundingBox?.zone.top === right.boundingBox.zone.top &&
|
|
63989
64008
|
left.boundingBox?.zone.right === right.boundingBox.zone.right &&
|
|
63990
|
-
left.boundingBox?.zone.bottom === right.boundingBox.zone.bottom
|
|
64009
|
+
left.boundingBox?.zone.bottom === right.boundingBox.zone.bottom &&
|
|
64010
|
+
deepEquals(left.data, right.data));
|
|
63991
64011
|
}
|
|
63992
64012
|
}
|
|
63993
64013
|
/**
|
|
@@ -64060,7 +64080,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
64060
64080
|
* in the correct order they should be evaluated.
|
|
64061
64081
|
* This is called a topological ordering (excluding cycles)
|
|
64062
64082
|
*/
|
|
64063
|
-
getCellsDependingOn(ranges) {
|
|
64083
|
+
getCellsDependingOn(ranges, ignore) {
|
|
64064
64084
|
const visited = this.createEmptyPositionSet();
|
|
64065
64085
|
const queue = Array.from(ranges).reverse();
|
|
64066
64086
|
while (queue.length > 0) {
|
|
@@ -64075,7 +64095,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
64075
64095
|
const impactedPositions = this.rTree.search(range).map((dep) => dep.data);
|
|
64076
64096
|
const nextInQueue = {};
|
|
64077
64097
|
for (const position of impactedPositions) {
|
|
64078
|
-
if (!visited.has(position)) {
|
|
64098
|
+
if (!visited.has(position) && !ignore.has(position)) {
|
|
64079
64099
|
if (!nextInQueue[position.sheetId]) {
|
|
64080
64100
|
nextInQueue[position.sheetId] = [];
|
|
64081
64101
|
}
|
|
@@ -64632,7 +64652,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
64632
64652
|
}
|
|
64633
64653
|
invalidatePositionsDependingOnSpread(sheetId, resultZone) {
|
|
64634
64654
|
// the result matrix is split in 2 zones to exclude the array formula position
|
|
64635
|
-
const invalidatedPositions = this.formulaDependencies().getCellsDependingOn(excludeTopLeft(resultZone).map((zone) => ({ sheetId, zone })));
|
|
64655
|
+
const invalidatedPositions = this.formulaDependencies().getCellsDependingOn(excludeTopLeft(resultZone).map((zone) => ({ sheetId, zone })), this.nextPositionsToUpdate);
|
|
64636
64656
|
invalidatedPositions.delete({ sheetId, col: resultZone.left, row: resultZone.top });
|
|
64637
64657
|
this.nextPositionsToUpdate.addMany(invalidatedPositions);
|
|
64638
64658
|
}
|
|
@@ -64750,7 +64770,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
64750
64770
|
for (const sheetId in zonesBySheetIds) {
|
|
64751
64771
|
ranges.push(...zonesBySheetIds[sheetId].map((zone) => ({ sheetId, zone })));
|
|
64752
64772
|
}
|
|
64753
|
-
return this.formulaDependencies().getCellsDependingOn(ranges);
|
|
64773
|
+
return this.formulaDependencies().getCellsDependingOn(ranges, this.nextPositionsToUpdate);
|
|
64754
64774
|
}
|
|
64755
64775
|
}
|
|
64756
64776
|
function forEachSpreadPositionInMatrix(nbColumns, nbRows, callback) {
|
|
@@ -65962,7 +65982,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
65962
65982
|
const topLeft = { col: unionZone.left, row: unionZone.top, sheetId };
|
|
65963
65983
|
const parentSpreadingCell = this.getters.getArrayFormulaSpreadingOn(topLeft);
|
|
65964
65984
|
if (!parentSpreadingCell) {
|
|
65965
|
-
|
|
65985
|
+
const evaluatedCell = this.getters.getEvaluatedCell(topLeft);
|
|
65986
|
+
return (evaluatedCell.value === CellErrorType.SpilledBlocked && !evaluatedCell.errorOriginPosition);
|
|
65966
65987
|
}
|
|
65967
65988
|
else if (deepEquals(parentSpreadingCell, topLeft) && getZoneArea(unionZone) === 1) {
|
|
65968
65989
|
return true;
|
|
@@ -81033,9 +81054,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
81033
81054
|
exports.tokenize = tokenize;
|
|
81034
81055
|
|
|
81035
81056
|
|
|
81036
|
-
__info__.version = "18.3.
|
|
81037
|
-
__info__.date = "2025-
|
|
81038
|
-
__info__.hash = "
|
|
81057
|
+
__info__.version = "18.3.24";
|
|
81058
|
+
__info__.date = "2025-10-16T06:38:12.942Z";
|
|
81059
|
+
__info__.hash = "f13dd1c";
|
|
81039
81060
|
|
|
81040
81061
|
|
|
81041
81062
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|