@odoo/o-spreadsheet 18.4.0 → 18.4.2
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 +210 -69
- package/dist/o-spreadsheet.d.ts +37 -2
- package/dist/o-spreadsheet.esm.js +210 -69
- package/dist/o-spreadsheet.iife.js +210 -69
- package/dist/o-spreadsheet.iife.min.js +391 -391
- package/dist/o_spreadsheet.xml +3 -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.4.
|
|
6
|
-
* @date 2025-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.4.2
|
|
6
|
+
* @date 2025-07-11T11:11:12.642Z
|
|
7
|
+
* @hash 29b6458
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -853,6 +853,7 @@
|
|
|
853
853
|
];
|
|
854
854
|
const specialWhiteSpaceRegexp = new RegExp(specialWhiteSpaceSpecialCharacters.join("|"), "g");
|
|
855
855
|
const newLineRegexp = /(\r\n|\r)/g;
|
|
856
|
+
const whiteSpaceCharacters = specialWhiteSpaceSpecialCharacters.concat([" "]);
|
|
856
857
|
/**
|
|
857
858
|
* Replace all different newlines characters by \n
|
|
858
859
|
*/
|
|
@@ -1989,8 +1990,9 @@
|
|
|
1989
1990
|
const DATE_JS_1900_OFFSET = INITIAL_JS_DAY.getTime() - INITIAL_1900_DAY.getTime();
|
|
1990
1991
|
const mdyDateRegexp = /^\d{1,2}(\/|-|\s)\d{1,2}((\/|-|\s)\d{1,4})?$/;
|
|
1991
1992
|
const ymdDateRegexp = /^\d{3,4}(\/|-|\s)\d{1,2}(\/|-|\s)\d{1,2}$/;
|
|
1992
|
-
const
|
|
1993
|
-
const
|
|
1993
|
+
const whiteSpaceChars = whiteSpaceCharacters.join("");
|
|
1994
|
+
const dateSeparatorsRegex = new RegExp(`\/|-|${whiteSpaceCharacters.join("|")}`);
|
|
1995
|
+
const dateRegexp = new RegExp(`^(\\d{1,4})[\/${whiteSpaceChars}\-](\\d{1,4})([\/${whiteSpaceChars}\-](\\d{1,4}))?$`);
|
|
1994
1996
|
const timeRegexp = /((\d+(:\d+)?(:\d+)?\s*(AM|PM))|(\d+:\d+(:\d+)?))$/;
|
|
1995
1997
|
/** Convert a value number representing a date, or return undefined if it isn't possible */
|
|
1996
1998
|
function valueToDateNumber(value, locale) {
|
|
@@ -6925,6 +6927,8 @@
|
|
|
6925
6927
|
function splitTextToWidth(ctx, text, style, width) {
|
|
6926
6928
|
if (!style)
|
|
6927
6929
|
style = {};
|
|
6930
|
+
if (isMarkdownLink(text))
|
|
6931
|
+
text = parseMarkdownLink(text).label;
|
|
6928
6932
|
const brokenText = [];
|
|
6929
6933
|
// Checking if text contains NEWLINE before split makes it very slightly slower if text contains it,
|
|
6930
6934
|
// but 5-10x faster if it doesn't
|
|
@@ -8765,6 +8769,10 @@
|
|
|
8765
8769
|
if (groupValue === null || groupValue === "null") {
|
|
8766
8770
|
return null;
|
|
8767
8771
|
}
|
|
8772
|
+
const extractedGroupValue = typeof groupValue === "object" ? groupValue.value : groupValue;
|
|
8773
|
+
if (isEvaluationError(extractedGroupValue)) {
|
|
8774
|
+
return extractedGroupValue;
|
|
8775
|
+
}
|
|
8768
8776
|
const groupValueString = typeof groupValue === "boolean"
|
|
8769
8777
|
? toString(groupValue).toLocaleLowerCase()
|
|
8770
8778
|
: toString(groupValue);
|
|
@@ -26509,6 +26517,51 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
26509
26517
|
Object.assign(animatedBox.style, style);
|
|
26510
26518
|
},
|
|
26511
26519
|
});
|
|
26520
|
+
cellAnimationRegistry.add("iconFadeIn", {
|
|
26521
|
+
id: "iconFadeIn",
|
|
26522
|
+
easingFn: "easeInCubic",
|
|
26523
|
+
hasAnimation: (oldBox, newBox) => {
|
|
26524
|
+
return Boolean((!oldBox?.icons?.left && newBox?.icons?.left) ||
|
|
26525
|
+
(!oldBox?.icons?.right && newBox?.icons?.right) ||
|
|
26526
|
+
(!oldBox?.icons?.center && newBox?.icons?.center));
|
|
26527
|
+
},
|
|
26528
|
+
updateAnimation: function (progress, animatedBox, oldBox, newBox) {
|
|
26529
|
+
const iconOpacity = EASING_FN[this.easingFn](progress);
|
|
26530
|
+
if (animatedBox.icons.left && newBox.icons.left && !oldBox.icons.left) {
|
|
26531
|
+
animatedBox.icons.left.opacity = iconOpacity;
|
|
26532
|
+
}
|
|
26533
|
+
if (animatedBox.icons.right && newBox.icons.right && !oldBox.icons.right) {
|
|
26534
|
+
animatedBox.icons.right.opacity = iconOpacity;
|
|
26535
|
+
}
|
|
26536
|
+
if (animatedBox.icons.center && newBox.icons.center && !oldBox.icons.center) {
|
|
26537
|
+
animatedBox.icons.center.opacity = iconOpacity;
|
|
26538
|
+
}
|
|
26539
|
+
},
|
|
26540
|
+
});
|
|
26541
|
+
cellAnimationRegistry.add("iconFadeOut", {
|
|
26542
|
+
id: "iconFadeOut",
|
|
26543
|
+
easingFn: "easeOutCubic",
|
|
26544
|
+
hasAnimation: (oldBox, newBox) => {
|
|
26545
|
+
return Boolean((oldBox?.icons?.left && !newBox?.icons?.left) ||
|
|
26546
|
+
(oldBox?.icons?.right && !newBox?.icons?.right) ||
|
|
26547
|
+
(oldBox?.icons?.center && !newBox?.icons?.center));
|
|
26548
|
+
},
|
|
26549
|
+
updateAnimation: function (progress, animatedBox, oldBox, newBox) {
|
|
26550
|
+
const iconOpacity = 1 - EASING_FN[this.easingFn](progress);
|
|
26551
|
+
if (!animatedBox.icons) {
|
|
26552
|
+
animatedBox.icons = {};
|
|
26553
|
+
}
|
|
26554
|
+
if (oldBox.icons.left && !newBox.icons.left) {
|
|
26555
|
+
animatedBox.icons.left = { ...oldBox.icons.left, opacity: iconOpacity };
|
|
26556
|
+
}
|
|
26557
|
+
if (oldBox.icons.right && !newBox.icons.right) {
|
|
26558
|
+
animatedBox.icons.right = { ...oldBox.icons.right, opacity: iconOpacity };
|
|
26559
|
+
}
|
|
26560
|
+
if (oldBox.icons.center && !newBox.icons.center) {
|
|
26561
|
+
animatedBox.icons.center = { ...oldBox.icons.center, opacity: iconOpacity };
|
|
26562
|
+
}
|
|
26563
|
+
},
|
|
26564
|
+
});
|
|
26512
26565
|
cellAnimationRegistry.add("textChange", {
|
|
26513
26566
|
id: "textChange",
|
|
26514
26567
|
easingFn: "easeOutCubic",
|
|
@@ -26517,7 +26570,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
26517
26570
|
const newText = newBox?.content?.textLines?.join("\n");
|
|
26518
26571
|
// Note: here, we also animate changes to icons layout (margins/size change, or icon appearing/disappearing)
|
|
26519
26572
|
// because a change to the icon layout will impact where the text is positioned.
|
|
26520
|
-
return
|
|
26573
|
+
return Boolean(oldText && newText && (oldText !== newText || hasIconLayoutChange(newBox, oldBox)));
|
|
26521
26574
|
},
|
|
26522
26575
|
updateAnimation: function (progress, animatedBox, oldBox, newBox) {
|
|
26523
26576
|
const value = EASING_FN[this.easingFn](progress);
|
|
@@ -26532,7 +26585,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
26532
26585
|
height: newBox.height,
|
|
26533
26586
|
style: { ...newBox.style },
|
|
26534
26587
|
skipCellGridLines: true,
|
|
26535
|
-
content: newBox.content,
|
|
26588
|
+
content: newBox.content ? { ...newBox.content } : undefined,
|
|
26536
26589
|
clipRect: newBox.clipRect || {
|
|
26537
26590
|
...newBox,
|
|
26538
26591
|
// large width to avoid clipping the text it it didn't have a clipRect before,
|
|
@@ -26552,7 +26605,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
26552
26605
|
height: newBox.height,
|
|
26553
26606
|
style: { ...oldBox.style },
|
|
26554
26607
|
skipCellGridLines: true,
|
|
26555
|
-
content: oldBox.content,
|
|
26608
|
+
content: oldBox.content ? { ...oldBox.content } : undefined,
|
|
26556
26609
|
clipRect: oldBox.clipRect || {
|
|
26557
26610
|
...newBox,
|
|
26558
26611
|
x: Math.max(0, newBox.x - (oldBox.content?.width || 0)),
|
|
@@ -27402,7 +27455,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
27402
27455
|
}
|
|
27403
27456
|
function getFormulaNumberValue(sheetId, formula, getters) {
|
|
27404
27457
|
const value = getters.evaluateFormula(sheetId, formula);
|
|
27405
|
-
return
|
|
27458
|
+
return isMultipleElementMatrix(value)
|
|
27459
|
+
? undefined
|
|
27460
|
+
: tryToNumber(toScalar(value), getters.getLocale());
|
|
27406
27461
|
}
|
|
27407
27462
|
function getInvalidGaugeRuntime(chart, getters) {
|
|
27408
27463
|
return {
|
|
@@ -31027,6 +31082,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
31027
31082
|
return undefined;
|
|
31028
31083
|
}
|
|
31029
31084
|
get errorOriginPositionString() {
|
|
31085
|
+
if (this.env.model.getters.isDashboard()) {
|
|
31086
|
+
return "";
|
|
31087
|
+
}
|
|
31030
31088
|
const evaluationError = this.evaluationError;
|
|
31031
31089
|
const position = evaluationError?.errorOriginPosition;
|
|
31032
31090
|
if (!position || deepEquals(position, this.props.cellPosition)) {
|
|
@@ -32664,7 +32722,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
32664
32722
|
}
|
|
32665
32723
|
captureSelection(zone, col, row) {
|
|
32666
32724
|
this.model.selection.capture(this, {
|
|
32667
|
-
cell: { col: col
|
|
32725
|
+
cell: { col: col ?? zone.left, row: row ?? zone.right },
|
|
32668
32726
|
zone,
|
|
32669
32727
|
}, {
|
|
32670
32728
|
handleEvent: this.handleEvent.bind(this),
|
|
@@ -39175,40 +39233,112 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
39175
39233
|
* In all the sheets, replace the table-only references in the formula cells with standard references.
|
|
39176
39234
|
*/
|
|
39177
39235
|
function convertTableFormulaReferences(convertedSheets, xlsxSheets) {
|
|
39236
|
+
let deconstructedSheets = null;
|
|
39178
39237
|
for (const tableSheet of convertedSheets) {
|
|
39179
39238
|
const tables = xlsxSheets.find((s) => isSheetNameEqual(s.sheetName, tableSheet.name)).tables;
|
|
39239
|
+
if (!tables || tables.length === 0) {
|
|
39240
|
+
continue;
|
|
39241
|
+
}
|
|
39242
|
+
// Only deconstruct sheets if we are sure there are tables to process
|
|
39243
|
+
if (!deconstructedSheets) {
|
|
39244
|
+
deconstructedSheets = deconstructSheets(convertedSheets);
|
|
39245
|
+
}
|
|
39180
39246
|
for (const table of tables) {
|
|
39181
|
-
const
|
|
39182
|
-
|
|
39183
|
-
for (const xc in
|
|
39184
|
-
const
|
|
39185
|
-
let
|
|
39186
|
-
|
|
39187
|
-
|
|
39188
|
-
|
|
39189
|
-
let endIndex = refIndex + tabRef.length;
|
|
39190
|
-
let openBrackets = 1;
|
|
39191
|
-
while (openBrackets > 0 && endIndex < cellContent.length) {
|
|
39192
|
-
if (cellContent[endIndex] === "[") {
|
|
39193
|
-
openBrackets++;
|
|
39194
|
-
}
|
|
39195
|
-
else if (cellContent[endIndex] === "]") {
|
|
39196
|
-
openBrackets--;
|
|
39197
|
-
}
|
|
39198
|
-
endIndex++;
|
|
39199
|
-
}
|
|
39200
|
-
const reference = cellContent.slice(refIndex + tabRef.length, endIndex - 1);
|
|
39201
|
-
const sheetPrefix = tableSheet.id === sheet.id ? "" : tableSheet.name + "!";
|
|
39202
|
-
const convertedRef = convertTableReference(sheetPrefix, reference, table, xc);
|
|
39203
|
-
cellContent =
|
|
39204
|
-
cellContent.slice(0, refIndex) + convertedRef + cellContent.slice(endIndex);
|
|
39247
|
+
for (const sheetId in deconstructedSheets) {
|
|
39248
|
+
const sheet = convertedSheets.find((s) => s.id === sheetId);
|
|
39249
|
+
for (const xc in deconstructedSheets[sheetId]) {
|
|
39250
|
+
const deconstructedCell = deconstructedSheets[sheetId][xc];
|
|
39251
|
+
for (let i = deconstructedCell.length - 3; i >= 0; i -= 2) {
|
|
39252
|
+
const possibleTable = deconstructedSheets[sheetId][xc][i];
|
|
39253
|
+
if (!possibleTable.endsWith(table.name)) {
|
|
39254
|
+
continue;
|
|
39205
39255
|
}
|
|
39256
|
+
const possibleRef = deconstructedSheets[sheetId][xc][i + 1];
|
|
39257
|
+
const sheetPrefix = tableSheet.id === sheet.id ? "" : tableSheet.name + "!";
|
|
39258
|
+
const convertedRef = convertTableReference(sheetPrefix, possibleRef, table, xc);
|
|
39259
|
+
deconstructedSheets[sheetId][xc][i + 2] =
|
|
39260
|
+
possibleTable.slice(0, possibleTable.indexOf(table.name)) +
|
|
39261
|
+
convertedRef +
|
|
39262
|
+
deconstructedSheets[sheetId][xc][i + 2];
|
|
39263
|
+
deconstructedSheets[sheetId][xc].splice(i, 2);
|
|
39206
39264
|
}
|
|
39207
|
-
sheet.cells[xc] = cellContent;
|
|
39265
|
+
// sheet.cells[xc] = cellContent;
|
|
39208
39266
|
}
|
|
39209
39267
|
}
|
|
39210
39268
|
}
|
|
39211
39269
|
}
|
|
39270
|
+
if (!deconstructedSheets) {
|
|
39271
|
+
return;
|
|
39272
|
+
}
|
|
39273
|
+
for (const sheetId in deconstructedSheets) {
|
|
39274
|
+
const sheet = convertedSheets.find((s) => s.id === sheetId);
|
|
39275
|
+
for (const xc in deconstructedSheets[sheetId]) {
|
|
39276
|
+
const deconstructedCell = deconstructedSheets[sheetId][xc];
|
|
39277
|
+
if (deconstructedCell.length === 1) {
|
|
39278
|
+
sheet.cells[xc] = deconstructedCell[0];
|
|
39279
|
+
continue;
|
|
39280
|
+
}
|
|
39281
|
+
let newContent = "";
|
|
39282
|
+
for (let i = 0; i < deconstructedCell.length; i += 2) {
|
|
39283
|
+
newContent += deconstructedCell[i] + "[" + deconstructedCell[i + 1] + "]";
|
|
39284
|
+
}
|
|
39285
|
+
newContent += deconstructedCell[deconstructedCell.length - 1];
|
|
39286
|
+
sheet.cells[xc] = newContent;
|
|
39287
|
+
}
|
|
39288
|
+
}
|
|
39289
|
+
}
|
|
39290
|
+
/**
|
|
39291
|
+
* Deconstruct the content of the cells in the sheets to extract possible table references.
|
|
39292
|
+
* Example from "=AVERAGE(Table1[colName1])-AVERAGE(Table2[colName2])":
|
|
39293
|
+
* return --> ["=AVERAGE(Table1", "colName1", ")-AVERAGE(Table2", "colName2", ")"]
|
|
39294
|
+
*/
|
|
39295
|
+
function deconstructSheets(convertedSheets) {
|
|
39296
|
+
const deconstructedSheets = {};
|
|
39297
|
+
for (const sheet of convertedSheets) {
|
|
39298
|
+
for (const xc in sheet.cells) {
|
|
39299
|
+
const cellContent = sheet.cells[xc];
|
|
39300
|
+
if (!cellContent || !cellContent.startsWith("=")) {
|
|
39301
|
+
continue;
|
|
39302
|
+
}
|
|
39303
|
+
const startIndex = cellContent.indexOf("[");
|
|
39304
|
+
if (startIndex === -1) {
|
|
39305
|
+
continue;
|
|
39306
|
+
}
|
|
39307
|
+
const deconstructedCell = [];
|
|
39308
|
+
let possibleTable = cellContent.slice(0, startIndex);
|
|
39309
|
+
let possibleRef = "";
|
|
39310
|
+
let openBrackets = 1;
|
|
39311
|
+
let mainPossibleTableIndex = 0;
|
|
39312
|
+
let mainOpenBracketIndex = startIndex;
|
|
39313
|
+
for (let index = startIndex + 1; index < cellContent.length; index++) {
|
|
39314
|
+
if (cellContent[index] === "[") {
|
|
39315
|
+
if (openBrackets === 0) {
|
|
39316
|
+
possibleTable = cellContent.slice(mainPossibleTableIndex, index);
|
|
39317
|
+
mainOpenBracketIndex = index;
|
|
39318
|
+
}
|
|
39319
|
+
openBrackets++;
|
|
39320
|
+
continue;
|
|
39321
|
+
}
|
|
39322
|
+
if (cellContent[index] === "]") {
|
|
39323
|
+
openBrackets--;
|
|
39324
|
+
if (openBrackets === 0) {
|
|
39325
|
+
possibleRef = cellContent.slice(mainOpenBracketIndex + 1, index);
|
|
39326
|
+
deconstructedCell.push(possibleTable);
|
|
39327
|
+
deconstructedCell.push(possibleRef);
|
|
39328
|
+
mainPossibleTableIndex = index + 1;
|
|
39329
|
+
}
|
|
39330
|
+
}
|
|
39331
|
+
}
|
|
39332
|
+
if (deconstructedCell.length) {
|
|
39333
|
+
if (!deconstructedSheets[sheet.id]) {
|
|
39334
|
+
deconstructedSheets[sheet.id] = {};
|
|
39335
|
+
}
|
|
39336
|
+
deconstructedCell.push(cellContent.slice(mainPossibleTableIndex));
|
|
39337
|
+
deconstructedSheets[sheet.id][xc] = [...deconstructedCell];
|
|
39338
|
+
}
|
|
39339
|
+
}
|
|
39340
|
+
}
|
|
39341
|
+
return deconstructedSheets;
|
|
39212
39342
|
}
|
|
39213
39343
|
/**
|
|
39214
39344
|
* Convert table-specific references in formulas into standard references. A table reference is composed of columns names,
|
|
@@ -45520,10 +45650,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
45520
45650
|
const cellValue = isFormula(content)
|
|
45521
45651
|
? this.getters.evaluateFormula(this.sheetId, content)
|
|
45522
45652
|
: parseLiteral(content, this.getters.getLocale());
|
|
45523
|
-
if (
|
|
45653
|
+
if (isMultipleElementMatrix(cellValue)) {
|
|
45524
45654
|
return true;
|
|
45525
45655
|
}
|
|
45526
|
-
const validationResult = this.getters.getValidationResultForCellValue(cellValue, cellPosition);
|
|
45656
|
+
const validationResult = this.getters.getValidationResultForCellValue(toScalar(cellValue), cellPosition);
|
|
45527
45657
|
if (!validationResult.isValid && validationResult.rule.isBlocking) {
|
|
45528
45658
|
return false;
|
|
45529
45659
|
}
|
|
@@ -47944,6 +48074,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
47944
48074
|
continue;
|
|
47945
48075
|
}
|
|
47946
48076
|
ctx.save();
|
|
48077
|
+
ctx.globalAlpha = icon.opacity ?? 1;
|
|
47947
48078
|
ctx.beginPath();
|
|
47948
48079
|
const clipRect = icon.clipRect || box;
|
|
47949
48080
|
ctx.rect(clipRect.x, clipRect.y, clipRect.width, clipRect.height);
|
|
@@ -50634,10 +50765,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
50634
50765
|
return tryToNumber(value, locale) !== undefined;
|
|
50635
50766
|
}
|
|
50636
50767
|
const evaluatedValue = this.env.model.getters.evaluateFormula(this.sheetId, value);
|
|
50637
|
-
if (
|
|
50768
|
+
if (isMultipleElementMatrix(evaluatedValue)) {
|
|
50638
50769
|
return false;
|
|
50639
50770
|
}
|
|
50640
|
-
return tryToNumber(evaluatedValue, locale) !== undefined;
|
|
50771
|
+
return tryToNumber(toScalar(evaluatedValue), locale) !== undefined;
|
|
50641
50772
|
}
|
|
50642
50773
|
get sheetId() {
|
|
50643
50774
|
const chart = this.env.model.getters.getChart(this.props.figureId);
|
|
@@ -52332,6 +52463,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
52332
52463
|
this.switchToList();
|
|
52333
52464
|
}
|
|
52334
52465
|
}
|
|
52466
|
+
else if (!this.editedCF) {
|
|
52467
|
+
this.switchToList();
|
|
52468
|
+
}
|
|
52335
52469
|
});
|
|
52336
52470
|
}
|
|
52337
52471
|
get conditionalFormats() {
|
|
@@ -55445,10 +55579,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
55445
55579
|
if (finalCell.value === null) {
|
|
55446
55580
|
return { value: _t("(Undefined)") };
|
|
55447
55581
|
}
|
|
55448
|
-
return
|
|
55449
|
-
value: finalCell.value,
|
|
55450
|
-
format: finalCell.format,
|
|
55451
|
-
};
|
|
55582
|
+
return finalCell;
|
|
55452
55583
|
}
|
|
55453
55584
|
getPivotCellValueAndFormat(measureId, domain) {
|
|
55454
55585
|
const dataEntries = this.filterDataEntriesFromDomain(this.dataEntries, domain);
|
|
@@ -55686,7 +55817,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
55686
55817
|
ui: SpreadsheetPivot,
|
|
55687
55818
|
definition: SpreadsheetPivotRuntimeDefinition,
|
|
55688
55819
|
externalData: false,
|
|
55689
|
-
onIterationEndEvaluation: (pivot) => pivot.markAsDirtyForEvaluation(),
|
|
55690
55820
|
dateGranularities: [...dateGranularities],
|
|
55691
55821
|
datetimeGranularities: [...dateGranularities, "hour_number", "minute_number", "second_number"],
|
|
55692
55822
|
isMeasureCandidate: (field) => field.type !== "boolean",
|
|
@@ -64337,7 +64467,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
64337
64467
|
onIterationEndEvaluationRegistry.add("pivots", (getters) => {
|
|
64338
64468
|
for (const pivotId of getters.getPivotIds()) {
|
|
64339
64469
|
const pivot = getters.getPivot(pivotId);
|
|
64340
|
-
|
|
64470
|
+
pivot.markAsDirtyForEvaluation?.();
|
|
64341
64471
|
}
|
|
64342
64472
|
});
|
|
64343
64473
|
|
|
@@ -66801,12 +66931,12 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
66801
66931
|
}
|
|
66802
66932
|
return this.getters.evaluateFormula(sheetId, value) ?? "";
|
|
66803
66933
|
});
|
|
66804
|
-
if (evaluatedCriterionValues.some(
|
|
66934
|
+
if (evaluatedCriterionValues.some(isMultipleElementMatrix)) {
|
|
66805
66935
|
return false;
|
|
66806
66936
|
}
|
|
66807
66937
|
const evaluatedCriterion = {
|
|
66808
66938
|
type: rule.operator,
|
|
66809
|
-
values: evaluatedCriterionValues,
|
|
66939
|
+
values: evaluatedCriterionValues.map(toScalar),
|
|
66810
66940
|
};
|
|
66811
66941
|
return evaluator.isValueValid(cell.value ?? "", evaluatedCriterion, this.getters, sheetId);
|
|
66812
66942
|
}
|
|
@@ -66966,10 +67096,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
66966
67096
|
const evaluator = criterionEvaluatorRegistry.get(criterion.type);
|
|
66967
67097
|
const offset = this.getCellOffsetInRule(cellPosition, rule);
|
|
66968
67098
|
const evaluatedCriterionValues = this.getEvaluatedCriterionValues(sheetId, offset, criterion);
|
|
66969
|
-
if (evaluatedCriterionValues.some(
|
|
67099
|
+
if (evaluatedCriterionValues.some(isMultipleElementMatrix)) {
|
|
66970
67100
|
return undefined;
|
|
66971
67101
|
}
|
|
66972
|
-
const evaluatedCriterion = { ...criterion, values: evaluatedCriterionValues };
|
|
67102
|
+
const evaluatedCriterion = { ...criterion, values: evaluatedCriterionValues.map(toScalar) };
|
|
66973
67103
|
if (evaluator.isValueValid(cellValue, evaluatedCriterion, this.getters, sheetId)) {
|
|
66974
67104
|
return undefined;
|
|
66975
67105
|
}
|
|
@@ -67612,13 +67742,13 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
67612
67742
|
super(custom, params);
|
|
67613
67743
|
this.getters = params.getters;
|
|
67614
67744
|
}
|
|
67615
|
-
|
|
67745
|
+
markAsDirtyForEvaluation() {
|
|
67616
67746
|
this.cache = {};
|
|
67617
67747
|
this.rankAsc = {};
|
|
67618
67748
|
this.rankDesc = {};
|
|
67619
67749
|
this.runningTotal = {};
|
|
67620
67750
|
this.runningTotalInPercent = {};
|
|
67621
|
-
super.
|
|
67751
|
+
super.markAsDirtyForEvaluation?.();
|
|
67622
67752
|
}
|
|
67623
67753
|
getPivotCellValueAndFormat(measureName, domain) {
|
|
67624
67754
|
return this.getMeasureDisplayValue(measureName, domain);
|
|
@@ -67743,7 +67873,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
67743
67873
|
return this.getSubTreeMatchingDomain(node.children, domain, domainLevel + 1);
|
|
67744
67874
|
}
|
|
67745
67875
|
}
|
|
67746
|
-
return
|
|
67876
|
+
return [];
|
|
67747
67877
|
}
|
|
67748
67878
|
treeToLeafDomains(tree, parentDomain = []) {
|
|
67749
67879
|
const domains = [];
|
|
@@ -73475,12 +73605,12 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
73475
73605
|
}
|
|
73476
73606
|
return this.getters.evaluateFormula(sheetId, value) ?? "";
|
|
73477
73607
|
});
|
|
73478
|
-
if (evaluatedCriterionValues.some(
|
|
73608
|
+
if (evaluatedCriterionValues.some(isMultipleElementMatrix)) {
|
|
73479
73609
|
continue;
|
|
73480
73610
|
}
|
|
73481
73611
|
const evaluatedCriterion = {
|
|
73482
73612
|
type: filterValue.type,
|
|
73483
|
-
values: evaluatedCriterionValues,
|
|
73613
|
+
values: evaluatedCriterionValues.map(toScalar),
|
|
73484
73614
|
dateValue: filterValue.dateValue,
|
|
73485
73615
|
};
|
|
73486
73616
|
for (let row = filteredZone.top; row <= filteredZone.bottom; row++) {
|
|
@@ -80982,26 +81112,28 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
80982
81112
|
bottom: Math.min(this.getters.getNumberRows(sheetId) - 1, bottom),
|
|
80983
81113
|
};
|
|
80984
81114
|
};
|
|
80985
|
-
const {
|
|
81115
|
+
const { cell: refCell, zone: refZone } = this.getReferenceAnchor();
|
|
81116
|
+
const { col: refCol, row: refRow } = refCell;
|
|
80986
81117
|
// check if we can shrink selection
|
|
80987
81118
|
let n = 0;
|
|
80988
81119
|
while (result !== null) {
|
|
80989
81120
|
n++;
|
|
80990
81121
|
if (deltaCol < 0) {
|
|
80991
81122
|
const newRight = this.getNextAvailableCol(deltaCol, right - (n - 1), refRow);
|
|
80992
|
-
result =
|
|
81123
|
+
result = refZone.right <= right - n ? expand({ top, left, bottom, right: newRight }) : null;
|
|
80993
81124
|
}
|
|
80994
81125
|
if (deltaCol > 0) {
|
|
80995
81126
|
const newLeft = this.getNextAvailableCol(deltaCol, left + (n - 1), refRow);
|
|
80996
|
-
result = left + n <=
|
|
81127
|
+
result = left + n <= refZone.left ? expand({ top, left: newLeft, bottom, right }) : null;
|
|
80997
81128
|
}
|
|
80998
81129
|
if (deltaRow < 0) {
|
|
80999
81130
|
const newBottom = this.getNextAvailableRow(deltaRow, refCol, bottom - (n - 1));
|
|
81000
|
-
result =
|
|
81131
|
+
result =
|
|
81132
|
+
refZone.bottom <= bottom - n ? expand({ top, left, bottom: newBottom, right }) : null;
|
|
81001
81133
|
}
|
|
81002
81134
|
if (deltaRow > 0) {
|
|
81003
81135
|
const newTop = this.getNextAvailableRow(deltaRow, refCol, top + (n - 1));
|
|
81004
|
-
result = top + n <=
|
|
81136
|
+
result = top + n <= refZone.top ? expand({ top: newTop, left, bottom, right }) : null;
|
|
81005
81137
|
}
|
|
81006
81138
|
result = result ? reorderZone(result) : result;
|
|
81007
81139
|
if (result && !isEqual(result, anchor.zone)) {
|
|
@@ -81231,18 +81363,26 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
81231
81363
|
* If the anchor is hidden, browses from left to right and top to bottom to
|
|
81232
81364
|
* find a visible cell.
|
|
81233
81365
|
*/
|
|
81234
|
-
|
|
81366
|
+
getReferenceAnchor() {
|
|
81235
81367
|
const sheetId = this.getters.getActiveSheetId();
|
|
81236
81368
|
const anchor = this.anchor;
|
|
81237
81369
|
const { left, right, top, bottom } = anchor.zone;
|
|
81238
81370
|
const { col: anchorCol, row: anchorRow } = anchor.cell;
|
|
81371
|
+
const col = this.getters.isColHidden(sheetId, anchorCol)
|
|
81372
|
+
? this.getters.findVisibleHeader(sheetId, "COL", left, right) || anchorCol
|
|
81373
|
+
: anchorCol;
|
|
81374
|
+
const row = this.getters.isRowHidden(sheetId, anchorRow)
|
|
81375
|
+
? this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) || anchorRow
|
|
81376
|
+
: anchorRow;
|
|
81377
|
+
const zone = this.getters.expandZone(sheetId, {
|
|
81378
|
+
left: col,
|
|
81379
|
+
right: col,
|
|
81380
|
+
top: row,
|
|
81381
|
+
bottom: row,
|
|
81382
|
+
});
|
|
81239
81383
|
return {
|
|
81240
|
-
|
|
81241
|
-
|
|
81242
|
-
: anchorCol,
|
|
81243
|
-
row: this.getters.isRowHidden(sheetId, anchorRow)
|
|
81244
|
-
? this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) || anchorRow
|
|
81245
|
-
: anchorRow,
|
|
81384
|
+
cell: { col, row },
|
|
81385
|
+
zone,
|
|
81246
81386
|
};
|
|
81247
81387
|
}
|
|
81248
81388
|
deltaToTarget(position, direction, step) {
|
|
@@ -84398,6 +84538,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
84398
84538
|
PivotSidePanelStore,
|
|
84399
84539
|
PivotMeasureDisplayPanelStore,
|
|
84400
84540
|
ClientFocusStore,
|
|
84541
|
+
GridRenderer,
|
|
84401
84542
|
};
|
|
84402
84543
|
function addFunction(functionName, functionDescription) {
|
|
84403
84544
|
functionRegistry.add(functionName, functionDescription);
|
|
@@ -84464,9 +84605,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
84464
84605
|
exports.tokenize = tokenize;
|
|
84465
84606
|
|
|
84466
84607
|
|
|
84467
|
-
__info__.version = "18.4.
|
|
84468
|
-
__info__.date = "2025-
|
|
84469
|
-
__info__.hash = "
|
|
84608
|
+
__info__.version = "18.4.2";
|
|
84609
|
+
__info__.date = "2025-07-11T11:11:12.642Z";
|
|
84610
|
+
__info__.hash = "29b6458";
|
|
84470
84611
|
|
|
84471
84612
|
|
|
84472
84613
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|