@odoo/o-spreadsheet 18.0.77 → 18.0.78
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.
|
@@ -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.0.
|
|
6
|
-
* @date 2026-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.0.78
|
|
6
|
+
* @date 2026-08-10T12:30:26.634Z
|
|
7
|
+
* @hash 3fdaa53
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { Component, markRaw, onMounted, onPatched, onWillPatch, onWillStart, onWillUnmount, onWillUpdateProps, status, toRaw, useChildSubEnv, useComponent, useEffect, useEnv, useExternalListener, useRef, useState, useSubEnv, xml } from "@odoo/owl";
|
|
@@ -3461,19 +3461,58 @@ function applyVectorization(formula, args, acceptToVectorize = void 0) {
|
|
|
3461
3461
|
}
|
|
3462
3462
|
}
|
|
3463
3463
|
if (countVectorizedCol === 1 && countVectorizedRow === 1) return formula(...args);
|
|
3464
|
-
const
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3464
|
+
const argsBuffer = new Array(args.length);
|
|
3465
|
+
const argGetters = [];
|
|
3466
|
+
const vectorizedIndices = [];
|
|
3467
|
+
for (let k = 0; k < args.length; k++) {
|
|
3468
|
+
const arg = args[k];
|
|
3469
|
+
switch (vectorArgsType?.[k]) {
|
|
3470
|
+
case "matrix":
|
|
3471
|
+
argGetters.push((i, j) => arg[i][j]);
|
|
3472
|
+
vectorizedIndices.push(k);
|
|
3473
|
+
break;
|
|
3474
|
+
case "horizontal":
|
|
3475
|
+
argGetters.push((i) => arg[i][0]);
|
|
3476
|
+
vectorizedIndices.push(k);
|
|
3477
|
+
break;
|
|
3478
|
+
case "vertical":
|
|
3479
|
+
argGetters.push((_i, j) => arg[0][j]);
|
|
3480
|
+
vectorizedIndices.push(k);
|
|
3481
|
+
break;
|
|
3482
|
+
case void 0:
|
|
3483
|
+
argsBuffer[k] = arg;
|
|
3484
|
+
break;
|
|
3470
3485
|
}
|
|
3471
|
-
}
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3486
|
+
}
|
|
3487
|
+
const nbVectorized = vectorizedIndices.length;
|
|
3488
|
+
let callFormula;
|
|
3489
|
+
switch (argsBuffer.length) {
|
|
3490
|
+
case 1:
|
|
3491
|
+
callFormula = () => formula(argsBuffer[0]);
|
|
3492
|
+
break;
|
|
3493
|
+
case 2:
|
|
3494
|
+
callFormula = () => formula(argsBuffer[0], argsBuffer[1]);
|
|
3495
|
+
break;
|
|
3496
|
+
case 3:
|
|
3497
|
+
callFormula = () => formula(argsBuffer[0], argsBuffer[1], argsBuffer[2]);
|
|
3498
|
+
break;
|
|
3499
|
+
default: callFormula = () => formula(...argsBuffer);
|
|
3500
|
+
}
|
|
3501
|
+
const result = new Array(countVectorizedCol);
|
|
3502
|
+
for (let col = 0; col < countVectorizedCol; col++) {
|
|
3503
|
+
const column = new Array(countVectorizedRow);
|
|
3504
|
+
result[col] = column;
|
|
3505
|
+
for (let row = 0; row < countVectorizedRow; row++) {
|
|
3506
|
+
if (col > vectorizedColLimit - 1 || row > vectorizedRowLimit - 1) {
|
|
3507
|
+
column[row] = new NotAvailableError(_t("Array arguments to [[FUNCTION_NAME]] are of different size."));
|
|
3508
|
+
continue;
|
|
3509
|
+
}
|
|
3510
|
+
for (let k = 0; k < nbVectorized; k++) argsBuffer[vectorizedIndices[k]] = argGetters[k](col, row);
|
|
3511
|
+
const singleCellComputeResult = callFormula();
|
|
3512
|
+
column[row] = isMatrix(singleCellComputeResult) ? singleCellComputeResult[0][0] : singleCellComputeResult;
|
|
3513
|
+
}
|
|
3514
|
+
}
|
|
3515
|
+
return result;
|
|
3477
3516
|
}
|
|
3478
3517
|
/**
|
|
3479
3518
|
* This function allows to visit arguments and stop the visit if necessary.
|
|
@@ -22848,10 +22887,13 @@ for (const category of categories) {
|
|
|
22848
22887
|
}
|
|
22849
22888
|
}
|
|
22850
22889
|
function createComputeFunction(descr, functionName) {
|
|
22890
|
+
let currentArgDefinitions = [];
|
|
22851
22891
|
function vectorizedCompute(...args) {
|
|
22852
22892
|
const acceptToVectorize = [];
|
|
22893
|
+
currentArgDefinitions = new Array(args.length);
|
|
22853
22894
|
for (let i = 0; i < args.length; i++) {
|
|
22854
22895
|
const argDefinition = descr.args[descr.getArgToFocus(i + 1) - 1];
|
|
22896
|
+
currentArgDefinitions[i] = argDefinition;
|
|
22855
22897
|
const arg = args[i];
|
|
22856
22898
|
if (!isMatrix(arg) && argDefinition.acceptMatrixOnly) throw new BadExpressionError(_t("Function %s expects the parameter '%s' to be reference to a cell or range.", functionName, (i + 1).toString()));
|
|
22857
22899
|
acceptToVectorize.push(!argDefinition.acceptMatrix);
|
|
@@ -22866,7 +22908,7 @@ function createComputeFunction(descr, functionName) {
|
|
|
22866
22908
|
function errorHandlingCompute(...args) {
|
|
22867
22909
|
for (let i = 0; i < args.length; i++) {
|
|
22868
22910
|
const arg = args[i];
|
|
22869
|
-
if (!
|
|
22911
|
+
if (!currentArgDefinitions[i].acceptErrors && !isMatrix(arg) && isEvaluationError(arg?.value)) return arg;
|
|
22870
22912
|
}
|
|
22871
22913
|
try {
|
|
22872
22914
|
return computeFunctionToObject.apply(this, args);
|
|
@@ -66346,6 +66388,6 @@ const constants = {
|
|
|
66346
66388
|
//#endregion
|
|
66347
66389
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
66348
66390
|
|
|
66349
|
-
__info__.version = "18.0.
|
|
66350
|
-
__info__.date = "2026-
|
|
66351
|
-
__info__.hash = "
|
|
66391
|
+
__info__.version = "18.0.78";
|
|
66392
|
+
__info__.date = "2026-08-10T12:30:26.634Z";
|
|
66393
|
+
__info__.hash = "3fdaa53";
|
|
@@ -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.0.
|
|
6
|
-
* @date 2026-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.0.78
|
|
6
|
+
* @date 2026-08-10T12:30:26.634Z
|
|
7
|
+
* @hash 3fdaa53
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function(exports, _odoo_owl) {
|
|
@@ -3463,19 +3463,58 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
3463
3463
|
}
|
|
3464
3464
|
}
|
|
3465
3465
|
if (countVectorizedCol === 1 && countVectorizedRow === 1) return formula(...args);
|
|
3466
|
-
const
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3466
|
+
const argsBuffer = new Array(args.length);
|
|
3467
|
+
const argGetters = [];
|
|
3468
|
+
const vectorizedIndices = [];
|
|
3469
|
+
for (let k = 0; k < args.length; k++) {
|
|
3470
|
+
const arg = args[k];
|
|
3471
|
+
switch (vectorArgsType?.[k]) {
|
|
3472
|
+
case "matrix":
|
|
3473
|
+
argGetters.push((i, j) => arg[i][j]);
|
|
3474
|
+
vectorizedIndices.push(k);
|
|
3475
|
+
break;
|
|
3476
|
+
case "horizontal":
|
|
3477
|
+
argGetters.push((i) => arg[i][0]);
|
|
3478
|
+
vectorizedIndices.push(k);
|
|
3479
|
+
break;
|
|
3480
|
+
case "vertical":
|
|
3481
|
+
argGetters.push((_i, j) => arg[0][j]);
|
|
3482
|
+
vectorizedIndices.push(k);
|
|
3483
|
+
break;
|
|
3484
|
+
case void 0:
|
|
3485
|
+
argsBuffer[k] = arg;
|
|
3486
|
+
break;
|
|
3472
3487
|
}
|
|
3473
|
-
}
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3488
|
+
}
|
|
3489
|
+
const nbVectorized = vectorizedIndices.length;
|
|
3490
|
+
let callFormula;
|
|
3491
|
+
switch (argsBuffer.length) {
|
|
3492
|
+
case 1:
|
|
3493
|
+
callFormula = () => formula(argsBuffer[0]);
|
|
3494
|
+
break;
|
|
3495
|
+
case 2:
|
|
3496
|
+
callFormula = () => formula(argsBuffer[0], argsBuffer[1]);
|
|
3497
|
+
break;
|
|
3498
|
+
case 3:
|
|
3499
|
+
callFormula = () => formula(argsBuffer[0], argsBuffer[1], argsBuffer[2]);
|
|
3500
|
+
break;
|
|
3501
|
+
default: callFormula = () => formula(...argsBuffer);
|
|
3502
|
+
}
|
|
3503
|
+
const result = new Array(countVectorizedCol);
|
|
3504
|
+
for (let col = 0; col < countVectorizedCol; col++) {
|
|
3505
|
+
const column = new Array(countVectorizedRow);
|
|
3506
|
+
result[col] = column;
|
|
3507
|
+
for (let row = 0; row < countVectorizedRow; row++) {
|
|
3508
|
+
if (col > vectorizedColLimit - 1 || row > vectorizedRowLimit - 1) {
|
|
3509
|
+
column[row] = new NotAvailableError(_t("Array arguments to [[FUNCTION_NAME]] are of different size."));
|
|
3510
|
+
continue;
|
|
3511
|
+
}
|
|
3512
|
+
for (let k = 0; k < nbVectorized; k++) argsBuffer[vectorizedIndices[k]] = argGetters[k](col, row);
|
|
3513
|
+
const singleCellComputeResult = callFormula();
|
|
3514
|
+
column[row] = isMatrix(singleCellComputeResult) ? singleCellComputeResult[0][0] : singleCellComputeResult;
|
|
3515
|
+
}
|
|
3516
|
+
}
|
|
3517
|
+
return result;
|
|
3479
3518
|
}
|
|
3480
3519
|
/**
|
|
3481
3520
|
* This function allows to visit arguments and stop the visit if necessary.
|
|
@@ -22850,10 +22889,13 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
22850
22889
|
}
|
|
22851
22890
|
}
|
|
22852
22891
|
function createComputeFunction(descr, functionName) {
|
|
22892
|
+
let currentArgDefinitions = [];
|
|
22853
22893
|
function vectorizedCompute(...args) {
|
|
22854
22894
|
const acceptToVectorize = [];
|
|
22895
|
+
currentArgDefinitions = new Array(args.length);
|
|
22855
22896
|
for (let i = 0; i < args.length; i++) {
|
|
22856
22897
|
const argDefinition = descr.args[descr.getArgToFocus(i + 1) - 1];
|
|
22898
|
+
currentArgDefinitions[i] = argDefinition;
|
|
22857
22899
|
const arg = args[i];
|
|
22858
22900
|
if (!isMatrix(arg) && argDefinition.acceptMatrixOnly) throw new BadExpressionError(_t("Function %s expects the parameter '%s' to be reference to a cell or range.", functionName, (i + 1).toString()));
|
|
22859
22901
|
acceptToVectorize.push(!argDefinition.acceptMatrix);
|
|
@@ -22868,7 +22910,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
22868
22910
|
function errorHandlingCompute(...args) {
|
|
22869
22911
|
for (let i = 0; i < args.length; i++) {
|
|
22870
22912
|
const arg = args[i];
|
|
22871
|
-
if (!
|
|
22913
|
+
if (!currentArgDefinitions[i].acceptErrors && !isMatrix(arg) && isEvaluationError(arg?.value)) return arg;
|
|
22872
22914
|
}
|
|
22873
22915
|
try {
|
|
22874
22916
|
return computeFunctionToObject.apply(this, args);
|
|
@@ -66392,8 +66434,8 @@ exports.stores = stores;
|
|
|
66392
66434
|
exports.tokenColors = tokenColors;
|
|
66393
66435
|
exports.tokenize = tokenize;
|
|
66394
66436
|
|
|
66395
|
-
__info__.version = "18.0.
|
|
66396
|
-
__info__.date = "2026-
|
|
66397
|
-
__info__.hash = "
|
|
66437
|
+
__info__.version = "18.0.78";
|
|
66438
|
+
__info__.date = "2026-08-10T12:30:26.634Z";
|
|
66439
|
+
__info__.hash = "3fdaa53";
|
|
66398
66440
|
|
|
66399
66441
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|