@odoo/o-spreadsheet 17.0.31 → 17.0.32
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 +46 -38
- package/dist/o-spreadsheet.esm.js +46 -38
- package/dist/o-spreadsheet.iife.js +46 -38
- package/dist/o-spreadsheet.iife.min.js +3 -3
- 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 17.0.
|
|
6
|
-
* @date 2024-07-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.32
|
|
6
|
+
* @date 2024-07-24T10:26:05.203Z
|
|
7
|
+
* @hash 679a547
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -28371,10 +28371,13 @@ function useCellHovered(env, gridRef, callback) {
|
|
|
28371
28371
|
row: undefined,
|
|
28372
28372
|
};
|
|
28373
28373
|
const { Date } = window;
|
|
28374
|
-
let x =
|
|
28375
|
-
let y =
|
|
28374
|
+
let x = undefined;
|
|
28375
|
+
let y = undefined;
|
|
28376
28376
|
let lastMoved = 0;
|
|
28377
28377
|
function getPosition() {
|
|
28378
|
+
if (x === undefined || y === undefined) {
|
|
28379
|
+
return { col: -1, row: -1 };
|
|
28380
|
+
}
|
|
28378
28381
|
const col = env.model.getters.getColIndex(x);
|
|
28379
28382
|
const row = env.model.getters.getRowIndex(y);
|
|
28380
28383
|
return { col, row };
|
|
@@ -42553,40 +42556,45 @@ class EvaluationConditionalFormatPlugin extends UIPlugin {
|
|
|
42553
42556
|
getComputedStyles(sheetId) {
|
|
42554
42557
|
const computedStyle = {};
|
|
42555
42558
|
for (let cf of this.getters.getConditionalFormats(sheetId).reverse()) {
|
|
42556
|
-
|
|
42557
|
-
|
|
42558
|
-
|
|
42559
|
-
|
|
42560
|
-
|
|
42561
|
-
|
|
42562
|
-
|
|
42563
|
-
|
|
42564
|
-
|
|
42565
|
-
|
|
42566
|
-
|
|
42567
|
-
for (let
|
|
42568
|
-
|
|
42569
|
-
|
|
42570
|
-
|
|
42571
|
-
const
|
|
42572
|
-
|
|
42573
|
-
|
|
42574
|
-
|
|
42575
|
-
|
|
42576
|
-
|
|
42559
|
+
try {
|
|
42560
|
+
switch (cf.rule.type) {
|
|
42561
|
+
case "ColorScaleRule":
|
|
42562
|
+
for (let range of cf.ranges) {
|
|
42563
|
+
this.applyColorScale(sheetId, range, cf.rule, computedStyle);
|
|
42564
|
+
}
|
|
42565
|
+
break;
|
|
42566
|
+
case "CellIsRule":
|
|
42567
|
+
const formulas = cf.rule.values.map((value) => value.startsWith("=") ? compile(value) : undefined);
|
|
42568
|
+
for (let ref of cf.ranges) {
|
|
42569
|
+
const zone = this.getters.getRangeFromSheetXC(sheetId, ref).zone;
|
|
42570
|
+
for (let row = zone.top; row <= zone.bottom; row++) {
|
|
42571
|
+
for (let col = zone.left; col <= zone.right; col++) {
|
|
42572
|
+
const predicate = this.rulePredicate[cf.rule.type];
|
|
42573
|
+
const target = { sheetId, col, row };
|
|
42574
|
+
const values = cf.rule.values.map((value, i) => {
|
|
42575
|
+
const compiledFormula = formulas[i];
|
|
42576
|
+
if (compiledFormula) {
|
|
42577
|
+
return this.getters.getTranslatedCellFormula(sheetId, col - zone.left, row - zone.top, {
|
|
42578
|
+
...compiledFormula,
|
|
42579
|
+
dependencies: compiledFormula.dependencies.map((d) => this.getters.getRangeFromSheetXC(sheetId, d)),
|
|
42580
|
+
});
|
|
42581
|
+
}
|
|
42582
|
+
return value;
|
|
42583
|
+
});
|
|
42584
|
+
if (predicate && predicate(target, { ...cf.rule, values })) {
|
|
42585
|
+
if (!computedStyle[col])
|
|
42586
|
+
computedStyle[col] = [];
|
|
42587
|
+
// we must combine all the properties of all the CF rules applied to the given cell
|
|
42588
|
+
computedStyle[col][row] = Object.assign(computedStyle[col]?.[row] || {}, cf.rule.style);
|
|
42577
42589
|
}
|
|
42578
|
-
return value;
|
|
42579
|
-
});
|
|
42580
|
-
if (predicate && predicate(target, { ...cf.rule, values })) {
|
|
42581
|
-
if (!computedStyle[col])
|
|
42582
|
-
computedStyle[col] = [];
|
|
42583
|
-
// we must combine all the properties of all the CF rules applied to the given cell
|
|
42584
|
-
computedStyle[col][row] = Object.assign(computedStyle[col]?.[row] || {}, cf.rule.style);
|
|
42585
42590
|
}
|
|
42586
42591
|
}
|
|
42587
42592
|
}
|
|
42588
|
-
|
|
42589
|
-
|
|
42593
|
+
break;
|
|
42594
|
+
}
|
|
42595
|
+
}
|
|
42596
|
+
catch (_) {
|
|
42597
|
+
// we ignore the errors within the evaluation of a rule
|
|
42590
42598
|
}
|
|
42591
42599
|
}
|
|
42592
42600
|
return computedStyle;
|
|
@@ -57578,6 +57586,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
57578
57586
|
exports.tokenize = tokenize;
|
|
57579
57587
|
|
|
57580
57588
|
|
|
57581
|
-
__info__.version = "17.0.
|
|
57582
|
-
__info__.date = "2024-07-
|
|
57583
|
-
__info__.hash = "
|
|
57589
|
+
__info__.version = "17.0.32";
|
|
57590
|
+
__info__.date = "2024-07-24T10:26:05.203Z";
|
|
57591
|
+
__info__.hash = "679a547";
|
|
@@ -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 17.0.
|
|
6
|
-
* @date 2024-07-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.32
|
|
6
|
+
* @date 2024-07-24T10:26:05.203Z
|
|
7
|
+
* @hash 679a547
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { Component, useRef, onMounted, useEffect, onWillPatch, useState, onWillUpdateProps, onPatched, useComponent, useExternalListener, onWillUnmount, onWillStart, xml, useChildSubEnv, useSubEnv, markRaw } from '@odoo/owl';
|
|
@@ -28369,10 +28369,13 @@ function useCellHovered(env, gridRef, callback) {
|
|
|
28369
28369
|
row: undefined,
|
|
28370
28370
|
};
|
|
28371
28371
|
const { Date } = window;
|
|
28372
|
-
let x =
|
|
28373
|
-
let y =
|
|
28372
|
+
let x = undefined;
|
|
28373
|
+
let y = undefined;
|
|
28374
28374
|
let lastMoved = 0;
|
|
28375
28375
|
function getPosition() {
|
|
28376
|
+
if (x === undefined || y === undefined) {
|
|
28377
|
+
return { col: -1, row: -1 };
|
|
28378
|
+
}
|
|
28376
28379
|
const col = env.model.getters.getColIndex(x);
|
|
28377
28380
|
const row = env.model.getters.getRowIndex(y);
|
|
28378
28381
|
return { col, row };
|
|
@@ -42551,40 +42554,45 @@ class EvaluationConditionalFormatPlugin extends UIPlugin {
|
|
|
42551
42554
|
getComputedStyles(sheetId) {
|
|
42552
42555
|
const computedStyle = {};
|
|
42553
42556
|
for (let cf of this.getters.getConditionalFormats(sheetId).reverse()) {
|
|
42554
|
-
|
|
42555
|
-
|
|
42556
|
-
|
|
42557
|
-
|
|
42558
|
-
|
|
42559
|
-
|
|
42560
|
-
|
|
42561
|
-
|
|
42562
|
-
|
|
42563
|
-
|
|
42564
|
-
|
|
42565
|
-
for (let
|
|
42566
|
-
|
|
42567
|
-
|
|
42568
|
-
|
|
42569
|
-
const
|
|
42570
|
-
|
|
42571
|
-
|
|
42572
|
-
|
|
42573
|
-
|
|
42574
|
-
|
|
42557
|
+
try {
|
|
42558
|
+
switch (cf.rule.type) {
|
|
42559
|
+
case "ColorScaleRule":
|
|
42560
|
+
for (let range of cf.ranges) {
|
|
42561
|
+
this.applyColorScale(sheetId, range, cf.rule, computedStyle);
|
|
42562
|
+
}
|
|
42563
|
+
break;
|
|
42564
|
+
case "CellIsRule":
|
|
42565
|
+
const formulas = cf.rule.values.map((value) => value.startsWith("=") ? compile(value) : undefined);
|
|
42566
|
+
for (let ref of cf.ranges) {
|
|
42567
|
+
const zone = this.getters.getRangeFromSheetXC(sheetId, ref).zone;
|
|
42568
|
+
for (let row = zone.top; row <= zone.bottom; row++) {
|
|
42569
|
+
for (let col = zone.left; col <= zone.right; col++) {
|
|
42570
|
+
const predicate = this.rulePredicate[cf.rule.type];
|
|
42571
|
+
const target = { sheetId, col, row };
|
|
42572
|
+
const values = cf.rule.values.map((value, i) => {
|
|
42573
|
+
const compiledFormula = formulas[i];
|
|
42574
|
+
if (compiledFormula) {
|
|
42575
|
+
return this.getters.getTranslatedCellFormula(sheetId, col - zone.left, row - zone.top, {
|
|
42576
|
+
...compiledFormula,
|
|
42577
|
+
dependencies: compiledFormula.dependencies.map((d) => this.getters.getRangeFromSheetXC(sheetId, d)),
|
|
42578
|
+
});
|
|
42579
|
+
}
|
|
42580
|
+
return value;
|
|
42581
|
+
});
|
|
42582
|
+
if (predicate && predicate(target, { ...cf.rule, values })) {
|
|
42583
|
+
if (!computedStyle[col])
|
|
42584
|
+
computedStyle[col] = [];
|
|
42585
|
+
// we must combine all the properties of all the CF rules applied to the given cell
|
|
42586
|
+
computedStyle[col][row] = Object.assign(computedStyle[col]?.[row] || {}, cf.rule.style);
|
|
42575
42587
|
}
|
|
42576
|
-
return value;
|
|
42577
|
-
});
|
|
42578
|
-
if (predicate && predicate(target, { ...cf.rule, values })) {
|
|
42579
|
-
if (!computedStyle[col])
|
|
42580
|
-
computedStyle[col] = [];
|
|
42581
|
-
// we must combine all the properties of all the CF rules applied to the given cell
|
|
42582
|
-
computedStyle[col][row] = Object.assign(computedStyle[col]?.[row] || {}, cf.rule.style);
|
|
42583
42588
|
}
|
|
42584
42589
|
}
|
|
42585
42590
|
}
|
|
42586
|
-
|
|
42587
|
-
|
|
42591
|
+
break;
|
|
42592
|
+
}
|
|
42593
|
+
}
|
|
42594
|
+
catch (_) {
|
|
42595
|
+
// we ignore the errors within the evaluation of a rule
|
|
42588
42596
|
}
|
|
42589
42597
|
}
|
|
42590
42598
|
return computedStyle;
|
|
@@ -57541,6 +57549,6 @@ const constants = {
|
|
|
57541
57549
|
export { AbstractChart, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, tokenize };
|
|
57542
57550
|
|
|
57543
57551
|
|
|
57544
|
-
__info__.version = "17.0.
|
|
57545
|
-
__info__.date = "2024-07-
|
|
57546
|
-
__info__.hash = "
|
|
57552
|
+
__info__.version = "17.0.32";
|
|
57553
|
+
__info__.date = "2024-07-24T10:26:05.203Z";
|
|
57554
|
+
__info__.hash = "679a547";
|
|
@@ -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 17.0.
|
|
6
|
-
* @date 2024-07-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.32
|
|
6
|
+
* @date 2024-07-24T10:26:05.203Z
|
|
7
|
+
* @hash 679a547
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -28370,10 +28370,13 @@
|
|
|
28370
28370
|
row: undefined,
|
|
28371
28371
|
};
|
|
28372
28372
|
const { Date } = window;
|
|
28373
|
-
let x =
|
|
28374
|
-
let y =
|
|
28373
|
+
let x = undefined;
|
|
28374
|
+
let y = undefined;
|
|
28375
28375
|
let lastMoved = 0;
|
|
28376
28376
|
function getPosition() {
|
|
28377
|
+
if (x === undefined || y === undefined) {
|
|
28378
|
+
return { col: -1, row: -1 };
|
|
28379
|
+
}
|
|
28377
28380
|
const col = env.model.getters.getColIndex(x);
|
|
28378
28381
|
const row = env.model.getters.getRowIndex(y);
|
|
28379
28382
|
return { col, row };
|
|
@@ -42552,40 +42555,45 @@
|
|
|
42552
42555
|
getComputedStyles(sheetId) {
|
|
42553
42556
|
const computedStyle = {};
|
|
42554
42557
|
for (let cf of this.getters.getConditionalFormats(sheetId).reverse()) {
|
|
42555
|
-
|
|
42556
|
-
|
|
42557
|
-
|
|
42558
|
-
|
|
42559
|
-
|
|
42560
|
-
|
|
42561
|
-
|
|
42562
|
-
|
|
42563
|
-
|
|
42564
|
-
|
|
42565
|
-
|
|
42566
|
-
for (let
|
|
42567
|
-
|
|
42568
|
-
|
|
42569
|
-
|
|
42570
|
-
const
|
|
42571
|
-
|
|
42572
|
-
|
|
42573
|
-
|
|
42574
|
-
|
|
42575
|
-
|
|
42558
|
+
try {
|
|
42559
|
+
switch (cf.rule.type) {
|
|
42560
|
+
case "ColorScaleRule":
|
|
42561
|
+
for (let range of cf.ranges) {
|
|
42562
|
+
this.applyColorScale(sheetId, range, cf.rule, computedStyle);
|
|
42563
|
+
}
|
|
42564
|
+
break;
|
|
42565
|
+
case "CellIsRule":
|
|
42566
|
+
const formulas = cf.rule.values.map((value) => value.startsWith("=") ? compile(value) : undefined);
|
|
42567
|
+
for (let ref of cf.ranges) {
|
|
42568
|
+
const zone = this.getters.getRangeFromSheetXC(sheetId, ref).zone;
|
|
42569
|
+
for (let row = zone.top; row <= zone.bottom; row++) {
|
|
42570
|
+
for (let col = zone.left; col <= zone.right; col++) {
|
|
42571
|
+
const predicate = this.rulePredicate[cf.rule.type];
|
|
42572
|
+
const target = { sheetId, col, row };
|
|
42573
|
+
const values = cf.rule.values.map((value, i) => {
|
|
42574
|
+
const compiledFormula = formulas[i];
|
|
42575
|
+
if (compiledFormula) {
|
|
42576
|
+
return this.getters.getTranslatedCellFormula(sheetId, col - zone.left, row - zone.top, {
|
|
42577
|
+
...compiledFormula,
|
|
42578
|
+
dependencies: compiledFormula.dependencies.map((d) => this.getters.getRangeFromSheetXC(sheetId, d)),
|
|
42579
|
+
});
|
|
42580
|
+
}
|
|
42581
|
+
return value;
|
|
42582
|
+
});
|
|
42583
|
+
if (predicate && predicate(target, { ...cf.rule, values })) {
|
|
42584
|
+
if (!computedStyle[col])
|
|
42585
|
+
computedStyle[col] = [];
|
|
42586
|
+
// we must combine all the properties of all the CF rules applied to the given cell
|
|
42587
|
+
computedStyle[col][row] = Object.assign(computedStyle[col]?.[row] || {}, cf.rule.style);
|
|
42576
42588
|
}
|
|
42577
|
-
return value;
|
|
42578
|
-
});
|
|
42579
|
-
if (predicate && predicate(target, { ...cf.rule, values })) {
|
|
42580
|
-
if (!computedStyle[col])
|
|
42581
|
-
computedStyle[col] = [];
|
|
42582
|
-
// we must combine all the properties of all the CF rules applied to the given cell
|
|
42583
|
-
computedStyle[col][row] = Object.assign(computedStyle[col]?.[row] || {}, cf.rule.style);
|
|
42584
42589
|
}
|
|
42585
42590
|
}
|
|
42586
42591
|
}
|
|
42587
|
-
|
|
42588
|
-
|
|
42592
|
+
break;
|
|
42593
|
+
}
|
|
42594
|
+
}
|
|
42595
|
+
catch (_) {
|
|
42596
|
+
// we ignore the errors within the evaluation of a rule
|
|
42589
42597
|
}
|
|
42590
42598
|
}
|
|
42591
42599
|
return computedStyle;
|
|
@@ -57577,9 +57585,9 @@
|
|
|
57577
57585
|
exports.tokenize = tokenize;
|
|
57578
57586
|
|
|
57579
57587
|
|
|
57580
|
-
__info__.version = "17.0.
|
|
57581
|
-
__info__.date = "2024-07-
|
|
57582
|
-
__info__.hash = "
|
|
57588
|
+
__info__.version = "17.0.32";
|
|
57589
|
+
__info__.date = "2024-07-24T10:26:05.203Z";
|
|
57590
|
+
__info__.hash = "679a547";
|
|
57583
57591
|
|
|
57584
57592
|
|
|
57585
57593
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|