@odoo/o-spreadsheet 18.2.32 → 18.2.34
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 +142 -110
- package/dist/o-spreadsheet.d.ts +10 -10
- package/dist/o-spreadsheet.esm.js +142 -110
- package/dist/o-spreadsheet.iife.js +142 -110
- package/dist/o-spreadsheet.iife.min.js +382 -381
- package/dist/o_spreadsheet.xml +7 -6
- package/package.json +2 -2
|
@@ -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.34
|
|
6
|
+
* @date 2025-11-12T14:15:32.431Z
|
|
7
|
+
* @hash 9ca0c4c
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -3915,7 +3915,17 @@
|
|
|
3915
3915
|
return toMatrix(data).map((row) => {
|
|
3916
3916
|
return row.map((cell) => {
|
|
3917
3917
|
if (typeof cell.value !== "number") {
|
|
3918
|
-
|
|
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);
|
|
3919
3929
|
}
|
|
3920
3930
|
return cell.value;
|
|
3921
3931
|
});
|
|
@@ -8817,7 +8827,7 @@
|
|
|
8817
8827
|
pasteCell(origin, target, clipboardOption) {
|
|
8818
8828
|
const { sheetId, col, row } = target;
|
|
8819
8829
|
const targetCell = this.getters.getEvaluatedCell(target);
|
|
8820
|
-
const originFormat = origin?.format
|
|
8830
|
+
const originFormat = origin?.format || origin.evaluatedCell.format;
|
|
8821
8831
|
if (clipboardOption?.pasteOption === "asValue") {
|
|
8822
8832
|
this.dispatch("UPDATE_CELL", {
|
|
8823
8833
|
...target,
|
|
@@ -10438,6 +10448,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
10438
10448
|
}
|
|
10439
10449
|
const ctx = chart.ctx;
|
|
10440
10450
|
ctx.save();
|
|
10451
|
+
const { left, top, height, width } = chart.chartArea;
|
|
10452
|
+
ctx.beginPath();
|
|
10453
|
+
ctx.rect(left, top, width, height);
|
|
10454
|
+
ctx.clip();
|
|
10441
10455
|
ctx.textAlign = "center";
|
|
10442
10456
|
ctx.textBaseline = "middle";
|
|
10443
10457
|
ctx.miterLimit = 1; // Avoid sharp artifacts on strokeText
|
|
@@ -10886,7 +10900,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
10886
10900
|
return {
|
|
10887
10901
|
background: context.background,
|
|
10888
10902
|
type: "scorecard",
|
|
10889
|
-
keyValue: context.range
|
|
10903
|
+
keyValue: context.range?.[0]?.dataRange,
|
|
10890
10904
|
title: context.title || { text: "" },
|
|
10891
10905
|
baselineMode: DEFAULT_SCORECARD_BASELINE_MODE,
|
|
10892
10906
|
baselineColorUp: DEFAULT_SCORECARD_BASELINE_COLOR_UP,
|
|
@@ -13643,7 +13657,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
13643
13657
|
],
|
|
13644
13658
|
compute: function (knownDataY, knownDataX = [[]], newDataX = [[]], b = { value: true }) {
|
|
13645
13659
|
assertNonEmptyMatrix(knownDataY, "known_data_y");
|
|
13646
|
-
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)));
|
|
13647
13661
|
},
|
|
13648
13662
|
};
|
|
13649
13663
|
// -----------------------------------------------------------------------------
|
|
@@ -13708,7 +13722,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
13708
13722
|
],
|
|
13709
13723
|
compute: function (dataY, dataX = [[]], calculateB = { value: true }, verbose = { value: false }) {
|
|
13710
13724
|
assertNonEmptyMatrix(dataY, "data_y");
|
|
13711
|
-
return fullLinearRegression(toNumberMatrix(dataX, "
|
|
13725
|
+
return fullLinearRegression(toNumberMatrix(dataX, "data_x"), toNumberMatrix(dataY, "data_y"), toBoolean(calculateB), toBoolean(verbose));
|
|
13712
13726
|
},
|
|
13713
13727
|
isExported: true,
|
|
13714
13728
|
};
|
|
@@ -13725,7 +13739,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
13725
13739
|
],
|
|
13726
13740
|
compute: function (dataY, dataX = [[]], calculateB = { value: true }, verbose = { value: false }) {
|
|
13727
13741
|
assertNonEmptyMatrix(dataY, "data_y");
|
|
13728
|
-
const coeffs = fullLinearRegression(toNumberMatrix(dataX, "
|
|
13742
|
+
const coeffs = fullLinearRegression(toNumberMatrix(dataX, "data_x"), logM(toNumberMatrix(dataY, "data_y")), toBoolean(calculateB), toBoolean(verbose));
|
|
13729
13743
|
for (let i = 0; i < coeffs.length; i++) {
|
|
13730
13744
|
coeffs[i][0] = Math.exp(coeffs[i][0]);
|
|
13731
13745
|
}
|
|
@@ -14315,7 +14329,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
14315
14329
|
],
|
|
14316
14330
|
compute: function (knownDataY, knownDataX = [[]], newDataX = [[]], b = { value: true }) {
|
|
14317
14331
|
assertNonEmptyMatrix(knownDataY, "known_data_y");
|
|
14318
|
-
return predictLinearValues(toNumberMatrix(knownDataY, "
|
|
14332
|
+
return predictLinearValues(toNumberMatrix(knownDataY, "known_data_y"), toNumberMatrix(knownDataX, "known_data_x"), toNumberMatrix(newDataX, "new_data_y"), toBoolean(b));
|
|
14319
14333
|
},
|
|
14320
14334
|
};
|
|
14321
14335
|
// -----------------------------------------------------------------------------
|
|
@@ -18571,28 +18585,38 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
18571
18585
|
return xc;
|
|
18572
18586
|
}
|
|
18573
18587
|
/**
|
|
18574
|
-
* Returns the given XC with the given reference type.
|
|
18588
|
+
* Returns the given XC with the given reference type.
|
|
18575
18589
|
*/
|
|
18576
18590
|
function setXcToFixedReferenceType(xc, referenceType) {
|
|
18577
|
-
|
|
18578
|
-
|
|
18579
|
-
|
|
18591
|
+
let sheetName;
|
|
18592
|
+
({ sheetName, xc } = splitReference(xc));
|
|
18593
|
+
sheetName = sheetName ? sheetName + "!" : "";
|
|
18580
18594
|
xc = xc.replace(/\$/g, "");
|
|
18581
|
-
|
|
18595
|
+
const splitIndex = xc.indexOf(":");
|
|
18596
|
+
if (splitIndex >= 0) {
|
|
18597
|
+
return `${sheetName}${_setXcToFixedReferenceType(xc.slice(0, splitIndex), referenceType)}:${_setXcToFixedReferenceType(xc.slice(splitIndex + 1), referenceType)}`;
|
|
18598
|
+
}
|
|
18599
|
+
else {
|
|
18600
|
+
return sheetName + _setXcToFixedReferenceType(xc, referenceType);
|
|
18601
|
+
}
|
|
18602
|
+
}
|
|
18603
|
+
function _setXcToFixedReferenceType(xc, referenceType) {
|
|
18604
|
+
const indexOfNumber = xc.search(/[0-9]/);
|
|
18605
|
+
const hasCol = indexOfNumber !== 0;
|
|
18606
|
+
const hasRow = indexOfNumber >= 0;
|
|
18582
18607
|
switch (referenceType) {
|
|
18583
18608
|
case "col":
|
|
18609
|
+
if (!hasCol)
|
|
18610
|
+
return xc;
|
|
18584
18611
|
return "$" + xc;
|
|
18585
18612
|
case "row":
|
|
18586
|
-
|
|
18613
|
+
if (!hasRow)
|
|
18614
|
+
return xc;
|
|
18587
18615
|
return xc.slice(0, indexOfNumber) + "$" + xc.slice(indexOfNumber);
|
|
18588
18616
|
case "colrow":
|
|
18589
|
-
|
|
18590
|
-
if (indexOfNumber === -1 || indexOfNumber === 0) {
|
|
18591
|
-
// no row number (eg. A) or no column (eg. 1)
|
|
18617
|
+
if (!hasRow || !hasCol)
|
|
18592
18618
|
return "$" + xc;
|
|
18593
|
-
|
|
18594
|
-
xc = xc.slice(0, indexOfNumber) + "$" + xc.slice(indexOfNumber);
|
|
18595
|
-
return "$" + xc;
|
|
18619
|
+
return "$" + xc.slice(0, indexOfNumber) + "$" + xc.slice(indexOfNumber);
|
|
18596
18620
|
case "none":
|
|
18597
18621
|
return xc;
|
|
18598
18622
|
}
|
|
@@ -21107,6 +21131,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
21107
21131
|
this.highlightStore.register(this);
|
|
21108
21132
|
this.onDispose(() => {
|
|
21109
21133
|
this.highlightStore.unRegister(this);
|
|
21134
|
+
this._cancelEdition();
|
|
21110
21135
|
});
|
|
21111
21136
|
}
|
|
21112
21137
|
handleEvent(event) {
|
|
@@ -23746,6 +23771,74 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
23746
23771
|
}
|
|
23747
23772
|
});
|
|
23748
23773
|
|
|
23774
|
+
/**
|
|
23775
|
+
* Get the relative path between two files
|
|
23776
|
+
*
|
|
23777
|
+
* Eg.:
|
|
23778
|
+
* from "folder1/file1.txt" to "folder2/file2.txt" => "../folder2/file2.txt"
|
|
23779
|
+
*/
|
|
23780
|
+
function getRelativePath(from, to) {
|
|
23781
|
+
const fromPathParts = from.split("/");
|
|
23782
|
+
const toPathParts = to.split("/");
|
|
23783
|
+
let relPath = "";
|
|
23784
|
+
let startIndex = 0;
|
|
23785
|
+
for (let i = 0; i < fromPathParts.length - 1; i++) {
|
|
23786
|
+
if (fromPathParts[i] === toPathParts[i]) {
|
|
23787
|
+
startIndex++;
|
|
23788
|
+
}
|
|
23789
|
+
else {
|
|
23790
|
+
relPath += "../";
|
|
23791
|
+
}
|
|
23792
|
+
}
|
|
23793
|
+
relPath += toPathParts.slice(startIndex).join("/");
|
|
23794
|
+
return relPath;
|
|
23795
|
+
}
|
|
23796
|
+
/**
|
|
23797
|
+
* Convert an array of element into an object where the objects keys were the elements position in the array.
|
|
23798
|
+
* Can give an offset as argument, and all the array indexes will we shifted by this offset in the returned object.
|
|
23799
|
+
*
|
|
23800
|
+
* eg. : ["a", "b"] => {0:"a", 1:"b"}
|
|
23801
|
+
*/
|
|
23802
|
+
function arrayToObject(array, indexOffset = 0) {
|
|
23803
|
+
const obj = {};
|
|
23804
|
+
for (let i = 0; i < array.length; i++) {
|
|
23805
|
+
if (array[i]) {
|
|
23806
|
+
obj[i + indexOffset] = array[i];
|
|
23807
|
+
}
|
|
23808
|
+
}
|
|
23809
|
+
return obj;
|
|
23810
|
+
}
|
|
23811
|
+
/**
|
|
23812
|
+
* In xlsx we can have string with unicode characters with the format _x00fa_.
|
|
23813
|
+
* Replace with characters understandable by JS
|
|
23814
|
+
*/
|
|
23815
|
+
function fixXlsxUnicode(str) {
|
|
23816
|
+
return str.replace(/_x([0-9a-zA-Z]{4})_/g, (match, code) => {
|
|
23817
|
+
return String.fromCharCode(parseInt(code, 16));
|
|
23818
|
+
});
|
|
23819
|
+
}
|
|
23820
|
+
/** Get a header in the SheetData. Create the header if it doesn't exist in the SheetData */
|
|
23821
|
+
function getSheetDataHeader(sheetData, dimension, index) {
|
|
23822
|
+
if (dimension === "COL") {
|
|
23823
|
+
if (!sheetData.cols[index]) {
|
|
23824
|
+
sheetData.cols[index] = {};
|
|
23825
|
+
}
|
|
23826
|
+
return sheetData.cols[index];
|
|
23827
|
+
}
|
|
23828
|
+
if (!sheetData.rows[index]) {
|
|
23829
|
+
sheetData.rows[index] = {};
|
|
23830
|
+
}
|
|
23831
|
+
return sheetData.rows[index];
|
|
23832
|
+
}
|
|
23833
|
+
/** Prefix the string by "=" if the string looks like a formula */
|
|
23834
|
+
function prefixFormulaWithEqual(formula) {
|
|
23835
|
+
if (formula[0] === "=") {
|
|
23836
|
+
return formula;
|
|
23837
|
+
}
|
|
23838
|
+
const tokens = tokenize(formula);
|
|
23839
|
+
return tokens.length === 1 && tokens[0].type !== "REFERENCE" ? formula : "=" + formula;
|
|
23840
|
+
}
|
|
23841
|
+
|
|
23749
23842
|
/**
|
|
23750
23843
|
* Map of the different types of conversions warnings and their name in error messages
|
|
23751
23844
|
*/
|
|
@@ -24253,66 +24346,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
24253
24346
|
*/
|
|
24254
24347
|
const DEFAULT_SYSTEM_COLOR = "FF000000";
|
|
24255
24348
|
|
|
24256
|
-
/**
|
|
24257
|
-
* Get the relative path between two files
|
|
24258
|
-
*
|
|
24259
|
-
* Eg.:
|
|
24260
|
-
* from "folder1/file1.txt" to "folder2/file2.txt" => "../folder2/file2.txt"
|
|
24261
|
-
*/
|
|
24262
|
-
function getRelativePath(from, to) {
|
|
24263
|
-
const fromPathParts = from.split("/");
|
|
24264
|
-
const toPathParts = to.split("/");
|
|
24265
|
-
let relPath = "";
|
|
24266
|
-
let startIndex = 0;
|
|
24267
|
-
for (let i = 0; i < fromPathParts.length - 1; i++) {
|
|
24268
|
-
if (fromPathParts[i] === toPathParts[i]) {
|
|
24269
|
-
startIndex++;
|
|
24270
|
-
}
|
|
24271
|
-
else {
|
|
24272
|
-
relPath += "../";
|
|
24273
|
-
}
|
|
24274
|
-
}
|
|
24275
|
-
relPath += toPathParts.slice(startIndex).join("/");
|
|
24276
|
-
return relPath;
|
|
24277
|
-
}
|
|
24278
|
-
/**
|
|
24279
|
-
* Convert an array of element into an object where the objects keys were the elements position in the array.
|
|
24280
|
-
* Can give an offset as argument, and all the array indexes will we shifted by this offset in the returned object.
|
|
24281
|
-
*
|
|
24282
|
-
* eg. : ["a", "b"] => {0:"a", 1:"b"}
|
|
24283
|
-
*/
|
|
24284
|
-
function arrayToObject(array, indexOffset = 0) {
|
|
24285
|
-
const obj = {};
|
|
24286
|
-
for (let i = 0; i < array.length; i++) {
|
|
24287
|
-
if (array[i]) {
|
|
24288
|
-
obj[i + indexOffset] = array[i];
|
|
24289
|
-
}
|
|
24290
|
-
}
|
|
24291
|
-
return obj;
|
|
24292
|
-
}
|
|
24293
|
-
/**
|
|
24294
|
-
* In xlsx we can have string with unicode characters with the format _x00fa_.
|
|
24295
|
-
* Replace with characters understandable by JS
|
|
24296
|
-
*/
|
|
24297
|
-
function fixXlsxUnicode(str) {
|
|
24298
|
-
return str.replace(/_x([0-9a-zA-Z]{4})_/g, (match, code) => {
|
|
24299
|
-
return String.fromCharCode(parseInt(code, 16));
|
|
24300
|
-
});
|
|
24301
|
-
}
|
|
24302
|
-
/** Get a header in the SheetData. Create the header if it doesn't exist in the SheetData */
|
|
24303
|
-
function getSheetDataHeader(sheetData, dimension, index) {
|
|
24304
|
-
if (dimension === "COL") {
|
|
24305
|
-
if (!sheetData.cols[index]) {
|
|
24306
|
-
sheetData.cols[index] = {};
|
|
24307
|
-
}
|
|
24308
|
-
return sheetData.cols[index];
|
|
24309
|
-
}
|
|
24310
|
-
if (!sheetData.rows[index]) {
|
|
24311
|
-
sheetData.rows[index] = {};
|
|
24312
|
-
}
|
|
24313
|
-
return sheetData.rows[index];
|
|
24314
|
-
}
|
|
24315
|
-
|
|
24316
24349
|
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;
|
|
24317
24350
|
/**
|
|
24318
24351
|
* Convert excel format to o_spreadsheet format
|
|
@@ -24522,9 +24555,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
24522
24555
|
if (!rule.operator || !rule.formula || rule.formula.length === 0)
|
|
24523
24556
|
continue;
|
|
24524
24557
|
operator = convertCFCellIsOperator(rule.operator);
|
|
24525
|
-
values.push(
|
|
24558
|
+
values.push(prefixFormulaWithEqual(rule.formula[0]));
|
|
24526
24559
|
if (rule.formula.length === 2) {
|
|
24527
|
-
values.push(
|
|
24560
|
+
values.push(prefixFormulaWithEqual(rule.formula[1]));
|
|
24528
24561
|
}
|
|
24529
24562
|
break;
|
|
24530
24563
|
}
|
|
@@ -24682,11 +24715,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
24682
24715
|
? ICON_SETS[iconSet].neutral
|
|
24683
24716
|
: ICON_SETS[iconSet].good;
|
|
24684
24717
|
}
|
|
24685
|
-
/** Prefix the string by "=" if the string looks like a formula */
|
|
24686
|
-
function prefixFormula(formula) {
|
|
24687
|
-
const tokens = tokenize(formula);
|
|
24688
|
-
return tokens.length === 1 && tokens[0].type !== "REFERENCE" ? formula : "=" + formula;
|
|
24689
|
-
}
|
|
24690
24718
|
// ---------------------------------------------------------------------------
|
|
24691
24719
|
// Warnings
|
|
24692
24720
|
// ---------------------------------------------------------------------------
|
|
@@ -25107,7 +25135,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
25107
25135
|
dvRules.push(decimalRule);
|
|
25108
25136
|
break;
|
|
25109
25137
|
case "list":
|
|
25110
|
-
const listRule =
|
|
25138
|
+
const listRule = convertListRule(dvId++, dv);
|
|
25111
25139
|
dvRules.push(listRule);
|
|
25112
25140
|
break;
|
|
25113
25141
|
case "date":
|
|
@@ -25127,9 +25155,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
25127
25155
|
return dvRules;
|
|
25128
25156
|
}
|
|
25129
25157
|
function convertDecimalRule(id, dv) {
|
|
25130
|
-
const values = [dv.formula1.toString()];
|
|
25158
|
+
const values = [prefixFormulaWithEqual(dv.formula1.toString())];
|
|
25131
25159
|
if (dv.formula2) {
|
|
25132
|
-
values.push(dv.formula2.toString());
|
|
25160
|
+
values.push(prefixFormulaWithEqual(dv.formula2.toString()));
|
|
25133
25161
|
}
|
|
25134
25162
|
return {
|
|
25135
25163
|
id: id.toString(),
|
|
@@ -25141,7 +25169,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
25141
25169
|
},
|
|
25142
25170
|
};
|
|
25143
25171
|
}
|
|
25144
|
-
function
|
|
25172
|
+
function convertListRule(id, dv) {
|
|
25145
25173
|
const formula1 = dv.formula1.toString();
|
|
25146
25174
|
const isRangeRule = rangeReference.test(formula1);
|
|
25147
25175
|
return {
|
|
@@ -25157,9 +25185,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
25157
25185
|
}
|
|
25158
25186
|
function convertDateRule(id, dv) {
|
|
25159
25187
|
let criterion;
|
|
25160
|
-
const values = [dv.formula1.toString()];
|
|
25188
|
+
const values = [prefixFormulaWithEqual(dv.formula1.toString())];
|
|
25161
25189
|
if (dv.formula2) {
|
|
25162
|
-
values.push(dv.formula2.toString());
|
|
25190
|
+
values.push(prefixFormulaWithEqual(dv.formula2.toString()));
|
|
25163
25191
|
criterion = {
|
|
25164
25192
|
type: XLSX_DV_DATE_OPERATOR_TO_DV_TYPE_MAPPING[dv.operator],
|
|
25165
25193
|
values: getDateCriterionFormattedValues(values, DEFAULT_LOCALE),
|
|
@@ -25186,7 +25214,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
25186
25214
|
isBlocking: dv.errorStyle !== "warning",
|
|
25187
25215
|
criterion: {
|
|
25188
25216
|
type: "customFormula",
|
|
25189
|
-
values: [
|
|
25217
|
+
values: [prefixFormulaWithEqual(dv.formula1.toString())],
|
|
25190
25218
|
},
|
|
25191
25219
|
};
|
|
25192
25220
|
}
|
|
@@ -28918,6 +28946,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
28918
28946
|
parser: luxonFormat,
|
|
28919
28947
|
displayFormats,
|
|
28920
28948
|
unit: timeUnit ?? false,
|
|
28949
|
+
tooltipFormat: luxonFormat,
|
|
28921
28950
|
};
|
|
28922
28951
|
}
|
|
28923
28952
|
/**
|
|
@@ -30096,6 +30125,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
30096
30125
|
};
|
|
30097
30126
|
Object.assign(scales.x, axis);
|
|
30098
30127
|
scales.x.ticks.maxTicksLimit = 15;
|
|
30128
|
+
delete scales?.x?.ticks?.callback;
|
|
30099
30129
|
}
|
|
30100
30130
|
else if (axisType === "linear") {
|
|
30101
30131
|
scales.x.type = "linear";
|
|
@@ -31124,7 +31154,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
31124
31154
|
background: context.background,
|
|
31125
31155
|
title: context.title || { text: "" },
|
|
31126
31156
|
type: "gauge",
|
|
31127
|
-
dataRange: context.range
|
|
31157
|
+
dataRange: context.range?.[0]?.dataRange,
|
|
31128
31158
|
sectionRule: {
|
|
31129
31159
|
colors: {
|
|
31130
31160
|
lowerColor: DEFAULT_GAUGE_LOWER_COLOR,
|
|
@@ -44207,6 +44237,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
44207
44237
|
placeholder: this.placeholder,
|
|
44208
44238
|
class: "o-sidePanel-composer",
|
|
44209
44239
|
defaultRangeSheetId: this.env.model.getters.getActiveSheetId(),
|
|
44240
|
+
defaultStatic: true,
|
|
44210
44241
|
};
|
|
44211
44242
|
}
|
|
44212
44243
|
get errorMessage() {
|
|
@@ -44551,12 +44582,13 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
44551
44582
|
onCloseSidePanel: { type: Function, optional: true },
|
|
44552
44583
|
};
|
|
44553
44584
|
state = owl.useState({ rule: this.defaultDataValidationRule, errors: [] });
|
|
44585
|
+
editingSheetId;
|
|
44554
44586
|
setup() {
|
|
44587
|
+
this.editingSheetId = this.env.model.getters.getActiveSheetId();
|
|
44555
44588
|
if (this.props.rule) {
|
|
44556
|
-
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
44557
44589
|
this.state.rule = {
|
|
44558
44590
|
...this.props.rule,
|
|
44559
|
-
ranges: this.props.rule.ranges.map((range) => this.env.model.getters.getRangeString(range,
|
|
44591
|
+
ranges: this.props.rule.ranges.map((range) => this.env.model.getters.getRangeString(range, this.editingSheetId)),
|
|
44560
44592
|
};
|
|
44561
44593
|
this.state.rule.criterion.type = this.props.rule.criterion.type;
|
|
44562
44594
|
}
|
|
@@ -44590,7 +44622,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
44590
44622
|
const locale = this.env.model.getters.getLocale();
|
|
44591
44623
|
const criterion = rule.criterion;
|
|
44592
44624
|
const criterionEvaluator = dataValidationEvaluatorRegistry.get(criterion.type);
|
|
44593
|
-
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
44594
44625
|
const values = criterion.values
|
|
44595
44626
|
.slice(0, criterionEvaluator.numberOfValues(criterion))
|
|
44596
44627
|
.map((value) => value?.trim())
|
|
@@ -44598,8 +44629,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
44598
44629
|
.map((value) => canonicalizeContent(value, locale));
|
|
44599
44630
|
rule.criterion = { ...criterion, values };
|
|
44600
44631
|
return {
|
|
44601
|
-
sheetId,
|
|
44602
|
-
ranges: this.state.rule.ranges.map((xc) => this.env.model.getters.getRangeDataFromXc(
|
|
44632
|
+
sheetId: this.editingSheetId,
|
|
44633
|
+
ranges: this.state.rule.ranges.map((xc) => this.env.model.getters.getRangeDataFromXc(this.editingSheetId, xc)),
|
|
44603
44634
|
rule,
|
|
44604
44635
|
};
|
|
44605
44636
|
}
|
|
@@ -45129,6 +45160,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
45129
45160
|
.o-button {
|
|
45130
45161
|
height: 19px;
|
|
45131
45162
|
width: 19px;
|
|
45163
|
+
box-sizing: content-box;
|
|
45132
45164
|
.o-icon {
|
|
45133
45165
|
height: 14px;
|
|
45134
45166
|
width: 14px;
|
|
@@ -57833,7 +57865,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
57833
57865
|
let sheetName = "";
|
|
57834
57866
|
if (prefixSheet) {
|
|
57835
57867
|
if (rangeImpl.invalidSheetName) {
|
|
57836
|
-
sheetName = rangeImpl.invalidSheetName;
|
|
57868
|
+
sheetName = getCanonicalSymbolName(rangeImpl.invalidSheetName);
|
|
57837
57869
|
}
|
|
57838
57870
|
else {
|
|
57839
57871
|
sheetName = getCanonicalSymbolName(this.getters.getSheetName(rangeImpl.sheetId));
|
|
@@ -61138,7 +61170,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
61138
61170
|
* in the correct order they should be evaluated.
|
|
61139
61171
|
* This is called a topological ordering (excluding cycles)
|
|
61140
61172
|
*/
|
|
61141
|
-
getCellsDependingOn(ranges) {
|
|
61173
|
+
getCellsDependingOn(ranges, ignore) {
|
|
61142
61174
|
const visited = this.createEmptyPositionSet();
|
|
61143
61175
|
const queue = Array.from(ranges).reverse();
|
|
61144
61176
|
while (queue.length > 0) {
|
|
@@ -61153,7 +61185,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
61153
61185
|
const impactedPositions = this.rTree.search(range).map((dep) => dep.data);
|
|
61154
61186
|
const nextInQueue = {};
|
|
61155
61187
|
for (const position of impactedPositions) {
|
|
61156
|
-
if (!visited.has(position)) {
|
|
61188
|
+
if (!visited.has(position) && !ignore.has(position)) {
|
|
61157
61189
|
if (!nextInQueue[position.sheetId]) {
|
|
61158
61190
|
nextInQueue[position.sheetId] = [];
|
|
61159
61191
|
}
|
|
@@ -61710,7 +61742,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
61710
61742
|
}
|
|
61711
61743
|
invalidatePositionsDependingOnSpread(sheetId, resultZone) {
|
|
61712
61744
|
// 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 })));
|
|
61745
|
+
const invalidatedPositions = this.formulaDependencies().getCellsDependingOn(excludeTopLeft(resultZone).map((zone) => ({ sheetId, zone })), this.nextPositionsToUpdate);
|
|
61714
61746
|
invalidatedPositions.delete({ sheetId, col: resultZone.left, row: resultZone.top });
|
|
61715
61747
|
this.nextPositionsToUpdate.addMany(invalidatedPositions);
|
|
61716
61748
|
}
|
|
@@ -61828,7 +61860,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
61828
61860
|
for (const sheetId in zonesBySheetIds) {
|
|
61829
61861
|
ranges.push(...zonesBySheetIds[sheetId].map((zone) => ({ sheetId, zone })));
|
|
61830
61862
|
}
|
|
61831
|
-
return this.formulaDependencies().getCellsDependingOn(ranges);
|
|
61863
|
+
return this.formulaDependencies().getCellsDependingOn(ranges, this.nextPositionsToUpdate);
|
|
61832
61864
|
}
|
|
61833
61865
|
}
|
|
61834
61866
|
function forEachSpreadPositionInMatrix(nbColumns, nbRows, callback) {
|
|
@@ -77352,9 +77384,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
77352
77384
|
exports.tokenize = tokenize;
|
|
77353
77385
|
|
|
77354
77386
|
|
|
77355
|
-
__info__.version = "18.2.
|
|
77356
|
-
__info__.date = "2025-
|
|
77357
|
-
__info__.hash = "
|
|
77387
|
+
__info__.version = "18.2.34";
|
|
77388
|
+
__info__.date = "2025-11-12T14:15:32.431Z";
|
|
77389
|
+
__info__.hash = "9ca0c4c";
|
|
77358
77390
|
|
|
77359
77391
|
|
|
77360
77392
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|