@odoo/o-spreadsheet 18.2.31 → 18.2.33
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 +126 -106
- package/dist/o-spreadsheet.d.ts +10 -10
- package/dist/o-spreadsheet.esm.js +126 -106
- package/dist/o-spreadsheet.iife.js +126 -106
- package/dist/o-spreadsheet.iife.min.js +237 -236
- 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.2.
|
|
6
|
-
* @date 2025-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.2.33
|
|
6
|
+
* @date 2025-10-16T06:39:40.421Z
|
|
7
|
+
* @hash 280596c
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -874,9 +874,7 @@
|
|
|
874
874
|
return newArray;
|
|
875
875
|
}
|
|
876
876
|
function insertItemsAtIndex(array, items, index) {
|
|
877
|
-
|
|
878
|
-
newArray.splice(index, 0, ...items);
|
|
879
|
-
return newArray;
|
|
877
|
+
return array.slice(0, index).concat(items).concat(array.slice(index));
|
|
880
878
|
}
|
|
881
879
|
function replaceItemAtIndex(array, newItem, index) {
|
|
882
880
|
const newArray = [...array];
|
|
@@ -3917,7 +3915,17 @@
|
|
|
3917
3915
|
return toMatrix(data).map((row) => {
|
|
3918
3916
|
return row.map((cell) => {
|
|
3919
3917
|
if (typeof cell.value !== "number") {
|
|
3920
|
-
|
|
3918
|
+
let message = "";
|
|
3919
|
+
if (typeof cell === "object") {
|
|
3920
|
+
message = _t("Function [[FUNCTION_NAME]] expects number values for %s, but got an empty value.", argName);
|
|
3921
|
+
}
|
|
3922
|
+
else if (typeof cell === "string") {
|
|
3923
|
+
message = _t("Function [[FUNCTION_NAME]] expects number values for %s, but got a string.", argName);
|
|
3924
|
+
}
|
|
3925
|
+
else if (typeof cell === "boolean") {
|
|
3926
|
+
message = _t("Function [[FUNCTION_NAME]] expects number values for %s, but got a boolean.", argName);
|
|
3927
|
+
}
|
|
3928
|
+
throw new EvaluationError(message);
|
|
3921
3929
|
}
|
|
3922
3930
|
return cell.value;
|
|
3923
3931
|
});
|
|
@@ -5117,7 +5125,7 @@
|
|
|
5117
5125
|
* Replace in place tokens "mm" and "m" that denote minutes in date format with "MM" to avoid confusion with months.
|
|
5118
5126
|
*
|
|
5119
5127
|
* As per OpenXML specification, in date formats if a date token "m" or "mm" is followed by a date token "s" or
|
|
5120
|
-
* preceded by a data token "h", then it's not a month but
|
|
5128
|
+
* preceded by a data token "h", then it's not a month but a minute.
|
|
5121
5129
|
*/
|
|
5122
5130
|
function convertTokensToMinutesInDateFormat(tokens) {
|
|
5123
5131
|
const dateParts = tokens.filter((token) => token.type === "DATE_PART");
|
|
@@ -5160,6 +5168,9 @@
|
|
|
5160
5168
|
case "REPEATED_CHAR":
|
|
5161
5169
|
format += "*" + token.value;
|
|
5162
5170
|
break;
|
|
5171
|
+
case "DATE_PART":
|
|
5172
|
+
format += token.value === "MM" ? "mm" : token.value; // Convert "MM" back to "mm" for minutes
|
|
5173
|
+
break;
|
|
5163
5174
|
default:
|
|
5164
5175
|
format += token.value;
|
|
5165
5176
|
}
|
|
@@ -8816,7 +8827,7 @@
|
|
|
8816
8827
|
pasteCell(origin, target, clipboardOption) {
|
|
8817
8828
|
const { sheetId, col, row } = target;
|
|
8818
8829
|
const targetCell = this.getters.getEvaluatedCell(target);
|
|
8819
|
-
const originFormat = origin?.format
|
|
8830
|
+
const originFormat = origin?.format || origin.evaluatedCell.format;
|
|
8820
8831
|
if (clipboardOption?.pasteOption === "asValue") {
|
|
8821
8832
|
this.dispatch("UPDATE_CELL", {
|
|
8822
8833
|
...target,
|
|
@@ -10437,6 +10448,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
10437
10448
|
}
|
|
10438
10449
|
const ctx = chart.ctx;
|
|
10439
10450
|
ctx.save();
|
|
10451
|
+
const { left, top, height, width } = chart.chartArea;
|
|
10452
|
+
ctx.beginPath();
|
|
10453
|
+
ctx.rect(left, top, width, height);
|
|
10454
|
+
ctx.clip();
|
|
10440
10455
|
ctx.textAlign = "center";
|
|
10441
10456
|
ctx.textBaseline = "middle";
|
|
10442
10457
|
ctx.miterLimit = 1; // Avoid sharp artifacts on strokeText
|
|
@@ -13642,7 +13657,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
13642
13657
|
],
|
|
13643
13658
|
compute: function (knownDataY, knownDataX = [[]], newDataX = [[]], b = { value: true }) {
|
|
13644
13659
|
assertNonEmptyMatrix(knownDataY, "known_data_y");
|
|
13645
|
-
return expM(predictLinearValues(logM(toNumberMatrix(knownDataY, "
|
|
13660
|
+
return expM(predictLinearValues(logM(toNumberMatrix(knownDataY, "known_data_y")), toNumberMatrix(knownDataX, "known_data_x"), toNumberMatrix(newDataX, "new_data_y"), toBoolean(b)));
|
|
13646
13661
|
},
|
|
13647
13662
|
};
|
|
13648
13663
|
// -----------------------------------------------------------------------------
|
|
@@ -13707,7 +13722,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
13707
13722
|
],
|
|
13708
13723
|
compute: function (dataY, dataX = [[]], calculateB = { value: true }, verbose = { value: false }) {
|
|
13709
13724
|
assertNonEmptyMatrix(dataY, "data_y");
|
|
13710
|
-
return fullLinearRegression(toNumberMatrix(dataX, "
|
|
13725
|
+
return fullLinearRegression(toNumberMatrix(dataX, "data_x"), toNumberMatrix(dataY, "data_y"), toBoolean(calculateB), toBoolean(verbose));
|
|
13711
13726
|
},
|
|
13712
13727
|
isExported: true,
|
|
13713
13728
|
};
|
|
@@ -13724,7 +13739,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
13724
13739
|
],
|
|
13725
13740
|
compute: function (dataY, dataX = [[]], calculateB = { value: true }, verbose = { value: false }) {
|
|
13726
13741
|
assertNonEmptyMatrix(dataY, "data_y");
|
|
13727
|
-
const coeffs = fullLinearRegression(toNumberMatrix(dataX, "
|
|
13742
|
+
const coeffs = fullLinearRegression(toNumberMatrix(dataX, "data_x"), logM(toNumberMatrix(dataY, "data_y")), toBoolean(calculateB), toBoolean(verbose));
|
|
13728
13743
|
for (let i = 0; i < coeffs.length; i++) {
|
|
13729
13744
|
coeffs[i][0] = Math.exp(coeffs[i][0]);
|
|
13730
13745
|
}
|
|
@@ -14314,7 +14329,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
14314
14329
|
],
|
|
14315
14330
|
compute: function (knownDataY, knownDataX = [[]], newDataX = [[]], b = { value: true }) {
|
|
14316
14331
|
assertNonEmptyMatrix(knownDataY, "known_data_y");
|
|
14317
|
-
return predictLinearValues(toNumberMatrix(knownDataY, "
|
|
14332
|
+
return predictLinearValues(toNumberMatrix(knownDataY, "known_data_y"), toNumberMatrix(knownDataX, "known_data_x"), toNumberMatrix(newDataX, "new_data_y"), toBoolean(b));
|
|
14318
14333
|
},
|
|
14319
14334
|
};
|
|
14320
14335
|
// -----------------------------------------------------------------------------
|
|
@@ -23745,6 +23760,74 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
23745
23760
|
}
|
|
23746
23761
|
});
|
|
23747
23762
|
|
|
23763
|
+
/**
|
|
23764
|
+
* Get the relative path between two files
|
|
23765
|
+
*
|
|
23766
|
+
* Eg.:
|
|
23767
|
+
* from "folder1/file1.txt" to "folder2/file2.txt" => "../folder2/file2.txt"
|
|
23768
|
+
*/
|
|
23769
|
+
function getRelativePath(from, to) {
|
|
23770
|
+
const fromPathParts = from.split("/");
|
|
23771
|
+
const toPathParts = to.split("/");
|
|
23772
|
+
let relPath = "";
|
|
23773
|
+
let startIndex = 0;
|
|
23774
|
+
for (let i = 0; i < fromPathParts.length - 1; i++) {
|
|
23775
|
+
if (fromPathParts[i] === toPathParts[i]) {
|
|
23776
|
+
startIndex++;
|
|
23777
|
+
}
|
|
23778
|
+
else {
|
|
23779
|
+
relPath += "../";
|
|
23780
|
+
}
|
|
23781
|
+
}
|
|
23782
|
+
relPath += toPathParts.slice(startIndex).join("/");
|
|
23783
|
+
return relPath;
|
|
23784
|
+
}
|
|
23785
|
+
/**
|
|
23786
|
+
* Convert an array of element into an object where the objects keys were the elements position in the array.
|
|
23787
|
+
* Can give an offset as argument, and all the array indexes will we shifted by this offset in the returned object.
|
|
23788
|
+
*
|
|
23789
|
+
* eg. : ["a", "b"] => {0:"a", 1:"b"}
|
|
23790
|
+
*/
|
|
23791
|
+
function arrayToObject(array, indexOffset = 0) {
|
|
23792
|
+
const obj = {};
|
|
23793
|
+
for (let i = 0; i < array.length; i++) {
|
|
23794
|
+
if (array[i]) {
|
|
23795
|
+
obj[i + indexOffset] = array[i];
|
|
23796
|
+
}
|
|
23797
|
+
}
|
|
23798
|
+
return obj;
|
|
23799
|
+
}
|
|
23800
|
+
/**
|
|
23801
|
+
* In xlsx we can have string with unicode characters with the format _x00fa_.
|
|
23802
|
+
* Replace with characters understandable by JS
|
|
23803
|
+
*/
|
|
23804
|
+
function fixXlsxUnicode(str) {
|
|
23805
|
+
return str.replace(/_x([0-9a-zA-Z]{4})_/g, (match, code) => {
|
|
23806
|
+
return String.fromCharCode(parseInt(code, 16));
|
|
23807
|
+
});
|
|
23808
|
+
}
|
|
23809
|
+
/** Get a header in the SheetData. Create the header if it doesn't exist in the SheetData */
|
|
23810
|
+
function getSheetDataHeader(sheetData, dimension, index) {
|
|
23811
|
+
if (dimension === "COL") {
|
|
23812
|
+
if (!sheetData.cols[index]) {
|
|
23813
|
+
sheetData.cols[index] = {};
|
|
23814
|
+
}
|
|
23815
|
+
return sheetData.cols[index];
|
|
23816
|
+
}
|
|
23817
|
+
if (!sheetData.rows[index]) {
|
|
23818
|
+
sheetData.rows[index] = {};
|
|
23819
|
+
}
|
|
23820
|
+
return sheetData.rows[index];
|
|
23821
|
+
}
|
|
23822
|
+
/** Prefix the string by "=" if the string looks like a formula */
|
|
23823
|
+
function prefixFormulaWithEqual(formula) {
|
|
23824
|
+
if (formula[0] === "=") {
|
|
23825
|
+
return formula;
|
|
23826
|
+
}
|
|
23827
|
+
const tokens = tokenize(formula);
|
|
23828
|
+
return tokens.length === 1 && tokens[0].type !== "REFERENCE" ? formula : "=" + formula;
|
|
23829
|
+
}
|
|
23830
|
+
|
|
23748
23831
|
/**
|
|
23749
23832
|
* Map of the different types of conversions warnings and their name in error messages
|
|
23750
23833
|
*/
|
|
@@ -24252,66 +24335,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
24252
24335
|
*/
|
|
24253
24336
|
const DEFAULT_SYSTEM_COLOR = "FF000000";
|
|
24254
24337
|
|
|
24255
|
-
/**
|
|
24256
|
-
* Get the relative path between two files
|
|
24257
|
-
*
|
|
24258
|
-
* Eg.:
|
|
24259
|
-
* from "folder1/file1.txt" to "folder2/file2.txt" => "../folder2/file2.txt"
|
|
24260
|
-
*/
|
|
24261
|
-
function getRelativePath(from, to) {
|
|
24262
|
-
const fromPathParts = from.split("/");
|
|
24263
|
-
const toPathParts = to.split("/");
|
|
24264
|
-
let relPath = "";
|
|
24265
|
-
let startIndex = 0;
|
|
24266
|
-
for (let i = 0; i < fromPathParts.length - 1; i++) {
|
|
24267
|
-
if (fromPathParts[i] === toPathParts[i]) {
|
|
24268
|
-
startIndex++;
|
|
24269
|
-
}
|
|
24270
|
-
else {
|
|
24271
|
-
relPath += "../";
|
|
24272
|
-
}
|
|
24273
|
-
}
|
|
24274
|
-
relPath += toPathParts.slice(startIndex).join("/");
|
|
24275
|
-
return relPath;
|
|
24276
|
-
}
|
|
24277
|
-
/**
|
|
24278
|
-
* Convert an array of element into an object where the objects keys were the elements position in the array.
|
|
24279
|
-
* Can give an offset as argument, and all the array indexes will we shifted by this offset in the returned object.
|
|
24280
|
-
*
|
|
24281
|
-
* eg. : ["a", "b"] => {0:"a", 1:"b"}
|
|
24282
|
-
*/
|
|
24283
|
-
function arrayToObject(array, indexOffset = 0) {
|
|
24284
|
-
const obj = {};
|
|
24285
|
-
for (let i = 0; i < array.length; i++) {
|
|
24286
|
-
if (array[i]) {
|
|
24287
|
-
obj[i + indexOffset] = array[i];
|
|
24288
|
-
}
|
|
24289
|
-
}
|
|
24290
|
-
return obj;
|
|
24291
|
-
}
|
|
24292
|
-
/**
|
|
24293
|
-
* In xlsx we can have string with unicode characters with the format _x00fa_.
|
|
24294
|
-
* Replace with characters understandable by JS
|
|
24295
|
-
*/
|
|
24296
|
-
function fixXlsxUnicode(str) {
|
|
24297
|
-
return str.replace(/_x([0-9a-zA-Z]{4})_/g, (match, code) => {
|
|
24298
|
-
return String.fromCharCode(parseInt(code, 16));
|
|
24299
|
-
});
|
|
24300
|
-
}
|
|
24301
|
-
/** Get a header in the SheetData. Create the header if it doesn't exist in the SheetData */
|
|
24302
|
-
function getSheetDataHeader(sheetData, dimension, index) {
|
|
24303
|
-
if (dimension === "COL") {
|
|
24304
|
-
if (!sheetData.cols[index]) {
|
|
24305
|
-
sheetData.cols[index] = {};
|
|
24306
|
-
}
|
|
24307
|
-
return sheetData.cols[index];
|
|
24308
|
-
}
|
|
24309
|
-
if (!sheetData.rows[index]) {
|
|
24310
|
-
sheetData.rows[index] = {};
|
|
24311
|
-
}
|
|
24312
|
-
return sheetData.rows[index];
|
|
24313
|
-
}
|
|
24314
|
-
|
|
24315
24338
|
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;
|
|
24316
24339
|
/**
|
|
24317
24340
|
* Convert excel format to o_spreadsheet format
|
|
@@ -24521,9 +24544,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
24521
24544
|
if (!rule.operator || !rule.formula || rule.formula.length === 0)
|
|
24522
24545
|
continue;
|
|
24523
24546
|
operator = convertCFCellIsOperator(rule.operator);
|
|
24524
|
-
values.push(
|
|
24547
|
+
values.push(prefixFormulaWithEqual(rule.formula[0]));
|
|
24525
24548
|
if (rule.formula.length === 2) {
|
|
24526
|
-
values.push(
|
|
24549
|
+
values.push(prefixFormulaWithEqual(rule.formula[1]));
|
|
24527
24550
|
}
|
|
24528
24551
|
break;
|
|
24529
24552
|
}
|
|
@@ -24681,11 +24704,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
24681
24704
|
? ICON_SETS[iconSet].neutral
|
|
24682
24705
|
: ICON_SETS[iconSet].good;
|
|
24683
24706
|
}
|
|
24684
|
-
/** Prefix the string by "=" if the string looks like a formula */
|
|
24685
|
-
function prefixFormula(formula) {
|
|
24686
|
-
const tokens = tokenize(formula);
|
|
24687
|
-
return tokens.length === 1 && tokens[0].type !== "REFERENCE" ? formula : "=" + formula;
|
|
24688
|
-
}
|
|
24689
24707
|
// ---------------------------------------------------------------------------
|
|
24690
24708
|
// Warnings
|
|
24691
24709
|
// ---------------------------------------------------------------------------
|
|
@@ -25106,7 +25124,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
25106
25124
|
dvRules.push(decimalRule);
|
|
25107
25125
|
break;
|
|
25108
25126
|
case "list":
|
|
25109
|
-
const listRule =
|
|
25127
|
+
const listRule = convertListRule(dvId++, dv);
|
|
25110
25128
|
dvRules.push(listRule);
|
|
25111
25129
|
break;
|
|
25112
25130
|
case "date":
|
|
@@ -25126,9 +25144,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
25126
25144
|
return dvRules;
|
|
25127
25145
|
}
|
|
25128
25146
|
function convertDecimalRule(id, dv) {
|
|
25129
|
-
const values = [dv.formula1.toString()];
|
|
25147
|
+
const values = [prefixFormulaWithEqual(dv.formula1.toString())];
|
|
25130
25148
|
if (dv.formula2) {
|
|
25131
|
-
values.push(dv.formula2.toString());
|
|
25149
|
+
values.push(prefixFormulaWithEqual(dv.formula2.toString()));
|
|
25132
25150
|
}
|
|
25133
25151
|
return {
|
|
25134
25152
|
id: id.toString(),
|
|
@@ -25140,7 +25158,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
25140
25158
|
},
|
|
25141
25159
|
};
|
|
25142
25160
|
}
|
|
25143
|
-
function
|
|
25161
|
+
function convertListRule(id, dv) {
|
|
25144
25162
|
const formula1 = dv.formula1.toString();
|
|
25145
25163
|
const isRangeRule = rangeReference.test(formula1);
|
|
25146
25164
|
return {
|
|
@@ -25156,9 +25174,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
25156
25174
|
}
|
|
25157
25175
|
function convertDateRule(id, dv) {
|
|
25158
25176
|
let criterion;
|
|
25159
|
-
const values = [dv.formula1.toString()];
|
|
25177
|
+
const values = [prefixFormulaWithEqual(dv.formula1.toString())];
|
|
25160
25178
|
if (dv.formula2) {
|
|
25161
|
-
values.push(dv.formula2.toString());
|
|
25179
|
+
values.push(prefixFormulaWithEqual(dv.formula2.toString()));
|
|
25162
25180
|
criterion = {
|
|
25163
25181
|
type: XLSX_DV_DATE_OPERATOR_TO_DV_TYPE_MAPPING[dv.operator],
|
|
25164
25182
|
values: getDateCriterionFormattedValues(values, DEFAULT_LOCALE),
|
|
@@ -25185,7 +25203,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
25185
25203
|
isBlocking: dv.errorStyle !== "warning",
|
|
25186
25204
|
criterion: {
|
|
25187
25205
|
type: "customFormula",
|
|
25188
|
-
values: [
|
|
25206
|
+
values: [prefixFormulaWithEqual(dv.formula1.toString())],
|
|
25189
25207
|
},
|
|
25190
25208
|
};
|
|
25191
25209
|
}
|
|
@@ -28917,6 +28935,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
28917
28935
|
parser: luxonFormat,
|
|
28918
28936
|
displayFormats,
|
|
28919
28937
|
unit: timeUnit ?? false,
|
|
28938
|
+
tooltipFormat: luxonFormat,
|
|
28920
28939
|
};
|
|
28921
28940
|
}
|
|
28922
28941
|
/**
|
|
@@ -30095,6 +30114,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
30095
30114
|
};
|
|
30096
30115
|
Object.assign(scales.x, axis);
|
|
30097
30116
|
scales.x.ticks.maxTicksLimit = 15;
|
|
30117
|
+
delete scales?.x?.ticks?.callback;
|
|
30098
30118
|
}
|
|
30099
30119
|
else if (axisType === "linear") {
|
|
30100
30120
|
scales.x.type = "linear";
|
|
@@ -44550,12 +44570,13 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
44550
44570
|
onCloseSidePanel: { type: Function, optional: true },
|
|
44551
44571
|
};
|
|
44552
44572
|
state = owl.useState({ rule: this.defaultDataValidationRule, errors: [] });
|
|
44573
|
+
editingSheetId;
|
|
44553
44574
|
setup() {
|
|
44575
|
+
this.editingSheetId = this.env.model.getters.getActiveSheetId();
|
|
44554
44576
|
if (this.props.rule) {
|
|
44555
|
-
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
44556
44577
|
this.state.rule = {
|
|
44557
44578
|
...this.props.rule,
|
|
44558
|
-
ranges: this.props.rule.ranges.map((range) => this.env.model.getters.getRangeString(range,
|
|
44579
|
+
ranges: this.props.rule.ranges.map((range) => this.env.model.getters.getRangeString(range, this.editingSheetId)),
|
|
44559
44580
|
};
|
|
44560
44581
|
this.state.rule.criterion.type = this.props.rule.criterion.type;
|
|
44561
44582
|
}
|
|
@@ -44589,7 +44610,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
44589
44610
|
const locale = this.env.model.getters.getLocale();
|
|
44590
44611
|
const criterion = rule.criterion;
|
|
44591
44612
|
const criterionEvaluator = dataValidationEvaluatorRegistry.get(criterion.type);
|
|
44592
|
-
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
44593
44613
|
const values = criterion.values
|
|
44594
44614
|
.slice(0, criterionEvaluator.numberOfValues(criterion))
|
|
44595
44615
|
.map((value) => value?.trim())
|
|
@@ -44597,8 +44617,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
44597
44617
|
.map((value) => canonicalizeContent(value, locale));
|
|
44598
44618
|
rule.criterion = { ...criterion, values };
|
|
44599
44619
|
return {
|
|
44600
|
-
sheetId,
|
|
44601
|
-
ranges: this.state.rule.ranges.map((xc) => this.env.model.getters.getRangeDataFromXc(
|
|
44620
|
+
sheetId: this.editingSheetId,
|
|
44621
|
+
ranges: this.state.rule.ranges.map((xc) => this.env.model.getters.getRangeDataFromXc(this.editingSheetId, xc)),
|
|
44602
44622
|
rule,
|
|
44603
44623
|
};
|
|
44604
44624
|
}
|
|
@@ -45128,6 +45148,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
45128
45148
|
.o-button {
|
|
45129
45149
|
height: 19px;
|
|
45130
45150
|
width: 19px;
|
|
45151
|
+
box-sizing: content-box;
|
|
45131
45152
|
.o-icon {
|
|
45132
45153
|
height: 14px;
|
|
45133
45154
|
width: 14px;
|
|
@@ -45885,7 +45906,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
45885
45906
|
return undefined;
|
|
45886
45907
|
}
|
|
45887
45908
|
get isCalculatedMeasureInvalid() {
|
|
45888
|
-
return
|
|
45909
|
+
return compile(this.props.measure.computedBy?.formula ?? "").isBadExpression;
|
|
45889
45910
|
}
|
|
45890
45911
|
}
|
|
45891
45912
|
|
|
@@ -56623,7 +56644,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
56623
56644
|
let sizes = [...this.sizes[cmd.sheetId][cmd.dimension]];
|
|
56624
56645
|
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
56625
56646
|
const baseSize = sizes[cmd.base];
|
|
56626
|
-
sizes
|
|
56647
|
+
sizes = insertItemsAtIndex(sizes, Array(cmd.quantity).fill(baseSize), addIndex);
|
|
56627
56648
|
this.history.update("sizes", cmd.sheetId, cmd.dimension, sizes);
|
|
56628
56649
|
break;
|
|
56629
56650
|
}
|
|
@@ -56775,9 +56796,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
56775
56796
|
break;
|
|
56776
56797
|
}
|
|
56777
56798
|
case "ADD_COLUMNS_ROWS": {
|
|
56778
|
-
const hiddenHeaders = [...this.hiddenHeaders[cmd.sheetId][cmd.dimension]];
|
|
56779
56799
|
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
56780
|
-
hiddenHeaders.
|
|
56800
|
+
const hiddenHeaders = insertItemsAtIndex([...this.hiddenHeaders[cmd.sheetId][cmd.dimension]], Array(cmd.quantity).fill(false), addIndex);
|
|
56781
56801
|
this.history.update("hiddenHeaders", cmd.sheetId, cmd.dimension, hiddenHeaders);
|
|
56782
56802
|
break;
|
|
56783
56803
|
}
|
|
@@ -61060,12 +61080,12 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
61060
61080
|
this.rTrees[sheetId].remove(item, this.rtreeItemComparer);
|
|
61061
61081
|
}
|
|
61062
61082
|
rtreeItemComparer(left, right) {
|
|
61063
|
-
return (left.
|
|
61064
|
-
left.boundingBox.sheetId === right.boundingBox.sheetId &&
|
|
61083
|
+
return (left.boundingBox.sheetId === right.boundingBox.sheetId &&
|
|
61065
61084
|
left.boundingBox?.zone.left === right.boundingBox.zone.left &&
|
|
61066
61085
|
left.boundingBox?.zone.top === right.boundingBox.zone.top &&
|
|
61067
61086
|
left.boundingBox?.zone.right === right.boundingBox.zone.right &&
|
|
61068
|
-
left.boundingBox?.zone.bottom === right.boundingBox.zone.bottom
|
|
61087
|
+
left.boundingBox?.zone.bottom === right.boundingBox.zone.bottom &&
|
|
61088
|
+
deepEquals(left.data, right.data));
|
|
61069
61089
|
}
|
|
61070
61090
|
}
|
|
61071
61091
|
/**
|
|
@@ -61138,7 +61158,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
61138
61158
|
* in the correct order they should be evaluated.
|
|
61139
61159
|
* This is called a topological ordering (excluding cycles)
|
|
61140
61160
|
*/
|
|
61141
|
-
getCellsDependingOn(ranges) {
|
|
61161
|
+
getCellsDependingOn(ranges, ignore) {
|
|
61142
61162
|
const visited = this.createEmptyPositionSet();
|
|
61143
61163
|
const queue = Array.from(ranges).reverse();
|
|
61144
61164
|
while (queue.length > 0) {
|
|
@@ -61153,7 +61173,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
61153
61173
|
const impactedPositions = this.rTree.search(range).map((dep) => dep.data);
|
|
61154
61174
|
const nextInQueue = {};
|
|
61155
61175
|
for (const position of impactedPositions) {
|
|
61156
|
-
if (!visited.has(position)) {
|
|
61176
|
+
if (!visited.has(position) && !ignore.has(position)) {
|
|
61157
61177
|
if (!nextInQueue[position.sheetId]) {
|
|
61158
61178
|
nextInQueue[position.sheetId] = [];
|
|
61159
61179
|
}
|
|
@@ -61710,7 +61730,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
61710
61730
|
}
|
|
61711
61731
|
invalidatePositionsDependingOnSpread(sheetId, resultZone) {
|
|
61712
61732
|
// the result matrix is split in 2 zones to exclude the array formula position
|
|
61713
|
-
const invalidatedPositions = this.formulaDependencies().getCellsDependingOn(excludeTopLeft(resultZone).map((zone) => ({ sheetId, zone })));
|
|
61733
|
+
const invalidatedPositions = this.formulaDependencies().getCellsDependingOn(excludeTopLeft(resultZone).map((zone) => ({ sheetId, zone })), this.nextPositionsToUpdate);
|
|
61714
61734
|
invalidatedPositions.delete({ sheetId, col: resultZone.left, row: resultZone.top });
|
|
61715
61735
|
this.nextPositionsToUpdate.addMany(invalidatedPositions);
|
|
61716
61736
|
}
|
|
@@ -61828,7 +61848,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
61828
61848
|
for (const sheetId in zonesBySheetIds) {
|
|
61829
61849
|
ranges.push(...zonesBySheetIds[sheetId].map((zone) => ({ sheetId, zone })));
|
|
61830
61850
|
}
|
|
61831
|
-
return this.formulaDependencies().getCellsDependingOn(ranges);
|
|
61851
|
+
return this.formulaDependencies().getCellsDependingOn(ranges, this.nextPositionsToUpdate);
|
|
61832
61852
|
}
|
|
61833
61853
|
}
|
|
61834
61854
|
function forEachSpreadPositionInMatrix(nbColumns, nbRows, callback) {
|
|
@@ -77352,9 +77372,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
77352
77372
|
exports.tokenize = tokenize;
|
|
77353
77373
|
|
|
77354
77374
|
|
|
77355
|
-
__info__.version = "18.2.
|
|
77356
|
-
__info__.date = "2025-
|
|
77357
|
-
__info__.hash = "
|
|
77375
|
+
__info__.version = "18.2.33";
|
|
77376
|
+
__info__.date = "2025-10-16T06:39:40.421Z";
|
|
77377
|
+
__info__.hash = "280596c";
|
|
77358
77378
|
|
|
77359
77379
|
|
|
77360
77380
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|