@odoo/o-spreadsheet 18.4.49 → 18.4.51
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.css
CHANGED
|
@@ -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 2026-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.4.51
|
|
6
|
+
* @date 2026-08-10T12:29:38.748Z
|
|
7
|
+
* @hash fd60cf8
|
|
8
8
|
*/
|
|
9
9
|
/* Originates from src/components/top_bar/top_bar.scss */
|
|
10
10
|
@media (max-width: 1200px) {
|
|
@@ -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 2026-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.4.51
|
|
6
|
+
* @date 2026-08-10T12:29:37.148Z
|
|
7
|
+
* @hash fd60cf8
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { App, Component, blockDom, markRaw, onMounted, onPatched, onWillPatch, onWillStart, onWillUnmount, onWillUpdateProps, status, toRaw, useChildSubEnv, useComponent, useEffect, useEnv, useExternalListener, useRef, useState, useSubEnv, xml } from "@odoo/owl";
|
|
@@ -3037,19 +3037,58 @@ function applyVectorization(formula, args, acceptToVectorize = void 0) {
|
|
|
3037
3037
|
}
|
|
3038
3038
|
}
|
|
3039
3039
|
if (countVectorizedCol === 1 && countVectorizedRow === 1) return formula(...args);
|
|
3040
|
-
const
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3040
|
+
const argsBuffer = new Array(args.length);
|
|
3041
|
+
const argGetters = [];
|
|
3042
|
+
const vectorizedIndices = [];
|
|
3043
|
+
for (let k = 0; k < args.length; k++) {
|
|
3044
|
+
const arg = args[k];
|
|
3045
|
+
switch (vectorArgsType?.[k]) {
|
|
3046
|
+
case "matrix":
|
|
3047
|
+
argGetters.push((i, j) => arg[i][j]);
|
|
3048
|
+
vectorizedIndices.push(k);
|
|
3049
|
+
break;
|
|
3050
|
+
case "horizontal":
|
|
3051
|
+
argGetters.push((i) => arg[i][0]);
|
|
3052
|
+
vectorizedIndices.push(k);
|
|
3053
|
+
break;
|
|
3054
|
+
case "vertical":
|
|
3055
|
+
argGetters.push((_i, j) => arg[0][j]);
|
|
3056
|
+
vectorizedIndices.push(k);
|
|
3057
|
+
break;
|
|
3058
|
+
case void 0:
|
|
3059
|
+
argsBuffer[k] = arg;
|
|
3060
|
+
break;
|
|
3046
3061
|
}
|
|
3047
|
-
}
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3062
|
+
}
|
|
3063
|
+
const nbVectorized = vectorizedIndices.length;
|
|
3064
|
+
let callFormula;
|
|
3065
|
+
switch (argsBuffer.length) {
|
|
3066
|
+
case 1:
|
|
3067
|
+
callFormula = () => formula(argsBuffer[0]);
|
|
3068
|
+
break;
|
|
3069
|
+
case 2:
|
|
3070
|
+
callFormula = () => formula(argsBuffer[0], argsBuffer[1]);
|
|
3071
|
+
break;
|
|
3072
|
+
case 3:
|
|
3073
|
+
callFormula = () => formula(argsBuffer[0], argsBuffer[1], argsBuffer[2]);
|
|
3074
|
+
break;
|
|
3075
|
+
default: callFormula = () => formula(...argsBuffer);
|
|
3076
|
+
}
|
|
3077
|
+
const result = new Array(countVectorizedCol);
|
|
3078
|
+
for (let col = 0; col < countVectorizedCol; col++) {
|
|
3079
|
+
const column = new Array(countVectorizedRow);
|
|
3080
|
+
result[col] = column;
|
|
3081
|
+
for (let row = 0; row < countVectorizedRow; row++) {
|
|
3082
|
+
if (col > vectorizedColLimit - 1 || row > vectorizedRowLimit - 1) {
|
|
3083
|
+
column[row] = new NotAvailableError(_t("Array arguments to [[FUNCTION_NAME]] are of different size."));
|
|
3084
|
+
continue;
|
|
3085
|
+
}
|
|
3086
|
+
for (let k = 0; k < nbVectorized; k++) argsBuffer[vectorizedIndices[k]] = argGetters[k](col, row);
|
|
3087
|
+
const singleCellComputeResult = callFormula();
|
|
3088
|
+
column[row] = isMatrix(singleCellComputeResult) ? singleCellComputeResult[0][0] : singleCellComputeResult;
|
|
3089
|
+
}
|
|
3090
|
+
}
|
|
3091
|
+
return result;
|
|
3053
3092
|
}
|
|
3054
3093
|
/**
|
|
3055
3094
|
* This function allows to visit arguments and stop the visit if necessary.
|
|
@@ -17176,12 +17215,15 @@ for (const category of categories) {
|
|
|
17176
17215
|
}
|
|
17177
17216
|
}
|
|
17178
17217
|
function createComputeFunction(descr) {
|
|
17218
|
+
let currentArgDefinitions = [];
|
|
17179
17219
|
function vectorizedCompute(...args) {
|
|
17180
17220
|
const acceptToVectorize = [];
|
|
17221
|
+
currentArgDefinitions = new Array(args.length);
|
|
17181
17222
|
const getArgToFocus = argTargeting(descr, args.length);
|
|
17182
17223
|
for (let i = 0; i < args.length; i++) {
|
|
17183
17224
|
const argIndex = getArgToFocus(i) ?? -1;
|
|
17184
17225
|
const argDefinition = descr.args[argIndex];
|
|
17226
|
+
currentArgDefinitions[i] = argDefinition;
|
|
17185
17227
|
const arg = args[i];
|
|
17186
17228
|
if (!isMatrix(arg) && argDefinition.acceptMatrixOnly) throw new BadExpressionError(_t("Function %s expects the parameter '%s' to be reference to a cell or range.", descr.name, (i + 1).toString()));
|
|
17187
17229
|
acceptToVectorize.push(!argDefinition.acceptMatrix);
|
|
@@ -17196,8 +17238,7 @@ function createComputeFunction(descr) {
|
|
|
17196
17238
|
function errorHandlingCompute(...args) {
|
|
17197
17239
|
for (let i = 0; i < args.length; i++) {
|
|
17198
17240
|
const arg = args[i];
|
|
17199
|
-
|
|
17200
|
-
if (!descr.args[getArgToFocus(i) || i].acceptErrors && !isMatrix(arg) && isEvaluationError(arg?.value)) return arg;
|
|
17241
|
+
if (!currentArgDefinitions[i].acceptErrors && !isMatrix(arg) && isEvaluationError(arg?.value)) return arg;
|
|
17201
17242
|
}
|
|
17202
17243
|
try {
|
|
17203
17244
|
return computeFunctionToObject.apply(this, args);
|
|
@@ -63378,7 +63419,7 @@ var SheetUIPlugin = class extends UIPlugin {
|
|
|
63378
63419
|
if (contentWidth === 0) return 0;
|
|
63379
63420
|
contentWidth += 2 * 4;
|
|
63380
63421
|
if (style.wrapping === "wrap") {
|
|
63381
|
-
const colWidth = this.getters.getColSize(
|
|
63422
|
+
const colWidth = this.getters.getColSize(position.sheetId, position.col);
|
|
63382
63423
|
return Math.min(colWidth, contentWidth);
|
|
63383
63424
|
}
|
|
63384
63425
|
return contentWidth;
|
|
@@ -69040,6 +69081,7 @@ var SpreadsheetDashboard = class extends Component {
|
|
|
69040
69081
|
return toRaw(this.clickableCellsStore.clickableCells);
|
|
69041
69082
|
}
|
|
69042
69083
|
selectClickableCell(ev, clickableCell) {
|
|
69084
|
+
if (![0, 1].includes(ev.button)) return;
|
|
69043
69085
|
const { position, action } = clickableCell;
|
|
69044
69086
|
action(position, this.env, isMiddleClickOrCtrlClick(ev));
|
|
69045
69087
|
}
|
|
@@ -75379,6 +75421,6 @@ const chartHelpers = {
|
|
|
75379
75421
|
//#endregion
|
|
75380
75422
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, ClientDisconnectedError, CommandResult, CorePlugin, CoreViewPlugin, DispatchResult, EvaluationError, LocalTransportService, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, chartHelpers, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
75381
75423
|
|
|
75382
|
-
__info__.version = "18.4.
|
|
75383
|
-
__info__.date = "2026-
|
|
75384
|
-
__info__.hash = "
|
|
75424
|
+
__info__.version = "18.4.51";
|
|
75425
|
+
__info__.date = "2026-08-10T12:29:37.148Z";
|
|
75426
|
+
__info__.hash = "fd60cf8";
|
|
@@ -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 2026-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.4.51
|
|
6
|
+
* @date 2026-08-10T12:29:37.148Z
|
|
7
|
+
* @hash fd60cf8
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function(exports, _odoo_owl) {
|
|
@@ -3039,19 +3039,58 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
3039
3039
|
}
|
|
3040
3040
|
}
|
|
3041
3041
|
if (countVectorizedCol === 1 && countVectorizedRow === 1) return formula(...args);
|
|
3042
|
-
const
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3042
|
+
const argsBuffer = new Array(args.length);
|
|
3043
|
+
const argGetters = [];
|
|
3044
|
+
const vectorizedIndices = [];
|
|
3045
|
+
for (let k = 0; k < args.length; k++) {
|
|
3046
|
+
const arg = args[k];
|
|
3047
|
+
switch (vectorArgsType?.[k]) {
|
|
3048
|
+
case "matrix":
|
|
3049
|
+
argGetters.push((i, j) => arg[i][j]);
|
|
3050
|
+
vectorizedIndices.push(k);
|
|
3051
|
+
break;
|
|
3052
|
+
case "horizontal":
|
|
3053
|
+
argGetters.push((i) => arg[i][0]);
|
|
3054
|
+
vectorizedIndices.push(k);
|
|
3055
|
+
break;
|
|
3056
|
+
case "vertical":
|
|
3057
|
+
argGetters.push((_i, j) => arg[0][j]);
|
|
3058
|
+
vectorizedIndices.push(k);
|
|
3059
|
+
break;
|
|
3060
|
+
case void 0:
|
|
3061
|
+
argsBuffer[k] = arg;
|
|
3062
|
+
break;
|
|
3048
3063
|
}
|
|
3049
|
-
}
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3064
|
+
}
|
|
3065
|
+
const nbVectorized = vectorizedIndices.length;
|
|
3066
|
+
let callFormula;
|
|
3067
|
+
switch (argsBuffer.length) {
|
|
3068
|
+
case 1:
|
|
3069
|
+
callFormula = () => formula(argsBuffer[0]);
|
|
3070
|
+
break;
|
|
3071
|
+
case 2:
|
|
3072
|
+
callFormula = () => formula(argsBuffer[0], argsBuffer[1]);
|
|
3073
|
+
break;
|
|
3074
|
+
case 3:
|
|
3075
|
+
callFormula = () => formula(argsBuffer[0], argsBuffer[1], argsBuffer[2]);
|
|
3076
|
+
break;
|
|
3077
|
+
default: callFormula = () => formula(...argsBuffer);
|
|
3078
|
+
}
|
|
3079
|
+
const result = new Array(countVectorizedCol);
|
|
3080
|
+
for (let col = 0; col < countVectorizedCol; col++) {
|
|
3081
|
+
const column = new Array(countVectorizedRow);
|
|
3082
|
+
result[col] = column;
|
|
3083
|
+
for (let row = 0; row < countVectorizedRow; row++) {
|
|
3084
|
+
if (col > vectorizedColLimit - 1 || row > vectorizedRowLimit - 1) {
|
|
3085
|
+
column[row] = new NotAvailableError(_t("Array arguments to [[FUNCTION_NAME]] are of different size."));
|
|
3086
|
+
continue;
|
|
3087
|
+
}
|
|
3088
|
+
for (let k = 0; k < nbVectorized; k++) argsBuffer[vectorizedIndices[k]] = argGetters[k](col, row);
|
|
3089
|
+
const singleCellComputeResult = callFormula();
|
|
3090
|
+
column[row] = isMatrix(singleCellComputeResult) ? singleCellComputeResult[0][0] : singleCellComputeResult;
|
|
3091
|
+
}
|
|
3092
|
+
}
|
|
3093
|
+
return result;
|
|
3055
3094
|
}
|
|
3056
3095
|
/**
|
|
3057
3096
|
* This function allows to visit arguments and stop the visit if necessary.
|
|
@@ -17178,12 +17217,15 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
17178
17217
|
}
|
|
17179
17218
|
}
|
|
17180
17219
|
function createComputeFunction(descr) {
|
|
17220
|
+
let currentArgDefinitions = [];
|
|
17181
17221
|
function vectorizedCompute(...args) {
|
|
17182
17222
|
const acceptToVectorize = [];
|
|
17223
|
+
currentArgDefinitions = new Array(args.length);
|
|
17183
17224
|
const getArgToFocus = argTargeting(descr, args.length);
|
|
17184
17225
|
for (let i = 0; i < args.length; i++) {
|
|
17185
17226
|
const argIndex = getArgToFocus(i) ?? -1;
|
|
17186
17227
|
const argDefinition = descr.args[argIndex];
|
|
17228
|
+
currentArgDefinitions[i] = argDefinition;
|
|
17187
17229
|
const arg = args[i];
|
|
17188
17230
|
if (!isMatrix(arg) && argDefinition.acceptMatrixOnly) throw new BadExpressionError(_t("Function %s expects the parameter '%s' to be reference to a cell or range.", descr.name, (i + 1).toString()));
|
|
17189
17231
|
acceptToVectorize.push(!argDefinition.acceptMatrix);
|
|
@@ -17198,8 +17240,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
17198
17240
|
function errorHandlingCompute(...args) {
|
|
17199
17241
|
for (let i = 0; i < args.length; i++) {
|
|
17200
17242
|
const arg = args[i];
|
|
17201
|
-
|
|
17202
|
-
if (!descr.args[getArgToFocus(i) || i].acceptErrors && !isMatrix(arg) && isEvaluationError(arg?.value)) return arg;
|
|
17243
|
+
if (!currentArgDefinitions[i].acceptErrors && !isMatrix(arg) && isEvaluationError(arg?.value)) return arg;
|
|
17203
17244
|
}
|
|
17204
17245
|
try {
|
|
17205
17246
|
return computeFunctionToObject.apply(this, args);
|
|
@@ -63380,7 +63421,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
63380
63421
|
if (contentWidth === 0) return 0;
|
|
63381
63422
|
contentWidth += 2 * 4;
|
|
63382
63423
|
if (style.wrapping === "wrap") {
|
|
63383
|
-
const colWidth = this.getters.getColSize(
|
|
63424
|
+
const colWidth = this.getters.getColSize(position.sheetId, position.col);
|
|
63384
63425
|
return Math.min(colWidth, contentWidth);
|
|
63385
63426
|
}
|
|
63386
63427
|
return contentWidth;
|
|
@@ -69042,6 +69083,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
69042
69083
|
return (0, _odoo_owl.toRaw)(this.clickableCellsStore.clickableCells);
|
|
69043
69084
|
}
|
|
69044
69085
|
selectClickableCell(ev, clickableCell) {
|
|
69086
|
+
if (![0, 1].includes(ev.button)) return;
|
|
69045
69087
|
const { position, action } = clickableCell;
|
|
69046
69088
|
action(position, this.env, isMiddleClickOrCtrlClick(ev));
|
|
69047
69089
|
}
|
|
@@ -75430,8 +75472,8 @@ exports.stores = stores;
|
|
|
75430
75472
|
exports.tokenColors = tokenColors;
|
|
75431
75473
|
exports.tokenize = tokenize;
|
|
75432
75474
|
|
|
75433
|
-
__info__.version = "18.4.
|
|
75434
|
-
__info__.date = "2026-
|
|
75435
|
-
__info__.hash = "
|
|
75475
|
+
__info__.version = "18.4.51";
|
|
75476
|
+
__info__.date = "2026-08-10T12:29:37.148Z";
|
|
75477
|
+
__info__.hash = "fd60cf8";
|
|
75436
75478
|
|
|
75437
75479
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|