@odoo/o-spreadsheet 17.0.57 → 17.0.59
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 +24 -17
- package/dist/o-spreadsheet.esm.js +24 -17
- package/dist/o-spreadsheet.iife.js +24 -17
- package/dist/o-spreadsheet.iife.min.js +254 -254
- package/dist/o_spreadsheet.xml +3 -4
- 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 2025-04-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.59
|
|
6
|
+
* @date 2025-04-25T08:04:05.375Z
|
|
7
|
+
* @hash eb92388
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -4818,7 +4818,7 @@ function transformZone(zone, executed) {
|
|
|
4818
4818
|
if (executed.type === "ADD_COLUMNS_ROWS") {
|
|
4819
4819
|
return expandZoneOnInsertion(zone, executed.dimension === "COL" ? "left" : "top", executed.base, executed.position, executed.quantity);
|
|
4820
4820
|
}
|
|
4821
|
-
return
|
|
4821
|
+
return zone;
|
|
4822
4822
|
}
|
|
4823
4823
|
function transformRangeData(range, executed) {
|
|
4824
4824
|
const deletedSheet = executed.type === "DELETE_SHEET" && executed.sheetId;
|
|
@@ -4857,7 +4857,7 @@ class ChartJsComponent extends owl.Component {
|
|
|
4857
4857
|
// Note: chartJS modify the runtime in place, so it's important to give it a copy
|
|
4858
4858
|
this.createChart(deepCopy(runtime.chartJsConfig));
|
|
4859
4859
|
});
|
|
4860
|
-
owl.useEffect(() => this.updateChartJs(deepCopy(this.chartRuntime)), () => [this.chartRuntime]);
|
|
4860
|
+
owl.useEffect(() => this.updateChartJs(deepCopy(this.chartRuntime)), () => [this.chartRuntime, window.devicePixelRatio]);
|
|
4861
4861
|
}
|
|
4862
4862
|
createChart(chartData) {
|
|
4863
4863
|
const canvas = this.canvas.el;
|
|
@@ -5395,8 +5395,10 @@ let ScorecardChart$1 = class ScorecardChart extends AbstractChart {
|
|
|
5395
5395
|
};
|
|
5396
5396
|
function drawScoreChart(structure, canvas) {
|
|
5397
5397
|
const ctx = canvas.getContext("2d");
|
|
5398
|
-
|
|
5399
|
-
canvas.
|
|
5398
|
+
const dpr = window.devicePixelRatio || 1;
|
|
5399
|
+
canvas.width = structure.canvas.width * dpr;
|
|
5400
|
+
canvas.height = structure.canvas.height * dpr;
|
|
5401
|
+
ctx.scale(dpr, dpr);
|
|
5400
5402
|
ctx.fillStyle = structure.canvas.backgroundColor;
|
|
5401
5403
|
ctx.fillRect(0, 0, structure.canvas.width, structure.canvas.height);
|
|
5402
5404
|
if (structure.title) {
|
|
@@ -5745,7 +5747,7 @@ class ScorecardChart extends owl.Component {
|
|
|
5745
5747
|
owl.useEffect(this.createChart.bind(this), () => {
|
|
5746
5748
|
const canvas = this.canvas.el;
|
|
5747
5749
|
const rect = canvas.getBoundingClientRect();
|
|
5748
|
-
return [rect.width, rect.height, this.runtime, this.canvas.el];
|
|
5750
|
+
return [rect.width, rect.height, this.runtime, this.canvas.el, window.devicePixelRatio];
|
|
5749
5751
|
});
|
|
5750
5752
|
}
|
|
5751
5753
|
createChart() {
|
|
@@ -7619,6 +7621,12 @@ function tokenizeString(chars) {
|
|
|
7619
7621
|
}
|
|
7620
7622
|
return null;
|
|
7621
7623
|
}
|
|
7624
|
+
/**
|
|
7625
|
+
- \p{L} is for any letter (from any language)
|
|
7626
|
+
- \p{N} is for any number
|
|
7627
|
+
- the u flag at the end is for unicode, which enables the `\p{...}` syntax
|
|
7628
|
+
*/
|
|
7629
|
+
const unicodeSymbolCharRegexp = /\p{L}|\p{N}|_|\.|!|\$/u;
|
|
7622
7630
|
const SYMBOL_CHARS = new Set("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.!$");
|
|
7623
7631
|
/**
|
|
7624
7632
|
* A "Symbol" is just basically any word-like element that can appear in a
|
|
@@ -7659,7 +7667,8 @@ function tokenizeSymbol(chars) {
|
|
|
7659
7667
|
};
|
|
7660
7668
|
}
|
|
7661
7669
|
}
|
|
7662
|
-
while (chars.current &&
|
|
7670
|
+
while (chars.current &&
|
|
7671
|
+
(SYMBOL_CHARS.has(chars.current) || chars.current.match(unicodeSymbolCharRegexp))) {
|
|
7663
7672
|
result += chars.shift();
|
|
7664
7673
|
}
|
|
7665
7674
|
if (result.length) {
|
|
@@ -22376,7 +22385,7 @@ class ColorPicker extends owl.Component {
|
|
|
22376
22385
|
}
|
|
22377
22386
|
setHexColor(ev) {
|
|
22378
22387
|
// only support HEX code input
|
|
22379
|
-
const val = ev.target.value.slice(0, 7);
|
|
22388
|
+
const val = ev.target.value.replace("##", "#").slice(0, 7);
|
|
22380
22389
|
this.state.customHexColor = val;
|
|
22381
22390
|
if (!isColorValid(val)) ;
|
|
22382
22391
|
else {
|
|
@@ -44411,10 +44420,8 @@ function mergeTransformation(toTransform, executed) {
|
|
|
44411
44420
|
}
|
|
44412
44421
|
const target = [];
|
|
44413
44422
|
for (const zone1 of toTransform.target) {
|
|
44414
|
-
|
|
44415
|
-
|
|
44416
|
-
target.push({ ...zone1 });
|
|
44417
|
-
}
|
|
44423
|
+
if (executed.target.every((zone2) => !overlap(zone1, zone2))) {
|
|
44424
|
+
target.push(zone1);
|
|
44418
44425
|
}
|
|
44419
44426
|
}
|
|
44420
44427
|
if (target.length) {
|
|
@@ -58249,6 +58256,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
58249
58256
|
exports.tokenize = tokenize;
|
|
58250
58257
|
|
|
58251
58258
|
|
|
58252
|
-
__info__.version = "17.0.
|
|
58253
|
-
__info__.date = "2025-04-
|
|
58254
|
-
__info__.hash = "
|
|
58259
|
+
__info__.version = "17.0.59";
|
|
58260
|
+
__info__.date = "2025-04-25T08:04:05.375Z";
|
|
58261
|
+
__info__.hash = "eb92388";
|
|
@@ -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 2025-04-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.59
|
|
6
|
+
* @date 2025-04-25T08:04:05.375Z
|
|
7
|
+
* @hash eb92388
|
|
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';
|
|
@@ -4816,7 +4816,7 @@ function transformZone(zone, executed) {
|
|
|
4816
4816
|
if (executed.type === "ADD_COLUMNS_ROWS") {
|
|
4817
4817
|
return expandZoneOnInsertion(zone, executed.dimension === "COL" ? "left" : "top", executed.base, executed.position, executed.quantity);
|
|
4818
4818
|
}
|
|
4819
|
-
return
|
|
4819
|
+
return zone;
|
|
4820
4820
|
}
|
|
4821
4821
|
function transformRangeData(range, executed) {
|
|
4822
4822
|
const deletedSheet = executed.type === "DELETE_SHEET" && executed.sheetId;
|
|
@@ -4855,7 +4855,7 @@ class ChartJsComponent extends Component {
|
|
|
4855
4855
|
// Note: chartJS modify the runtime in place, so it's important to give it a copy
|
|
4856
4856
|
this.createChart(deepCopy(runtime.chartJsConfig));
|
|
4857
4857
|
});
|
|
4858
|
-
useEffect(() => this.updateChartJs(deepCopy(this.chartRuntime)), () => [this.chartRuntime]);
|
|
4858
|
+
useEffect(() => this.updateChartJs(deepCopy(this.chartRuntime)), () => [this.chartRuntime, window.devicePixelRatio]);
|
|
4859
4859
|
}
|
|
4860
4860
|
createChart(chartData) {
|
|
4861
4861
|
const canvas = this.canvas.el;
|
|
@@ -5393,8 +5393,10 @@ let ScorecardChart$1 = class ScorecardChart extends AbstractChart {
|
|
|
5393
5393
|
};
|
|
5394
5394
|
function drawScoreChart(structure, canvas) {
|
|
5395
5395
|
const ctx = canvas.getContext("2d");
|
|
5396
|
-
|
|
5397
|
-
canvas.
|
|
5396
|
+
const dpr = window.devicePixelRatio || 1;
|
|
5397
|
+
canvas.width = structure.canvas.width * dpr;
|
|
5398
|
+
canvas.height = structure.canvas.height * dpr;
|
|
5399
|
+
ctx.scale(dpr, dpr);
|
|
5398
5400
|
ctx.fillStyle = structure.canvas.backgroundColor;
|
|
5399
5401
|
ctx.fillRect(0, 0, structure.canvas.width, structure.canvas.height);
|
|
5400
5402
|
if (structure.title) {
|
|
@@ -5743,7 +5745,7 @@ class ScorecardChart extends Component {
|
|
|
5743
5745
|
useEffect(this.createChart.bind(this), () => {
|
|
5744
5746
|
const canvas = this.canvas.el;
|
|
5745
5747
|
const rect = canvas.getBoundingClientRect();
|
|
5746
|
-
return [rect.width, rect.height, this.runtime, this.canvas.el];
|
|
5748
|
+
return [rect.width, rect.height, this.runtime, this.canvas.el, window.devicePixelRatio];
|
|
5747
5749
|
});
|
|
5748
5750
|
}
|
|
5749
5751
|
createChart() {
|
|
@@ -7617,6 +7619,12 @@ function tokenizeString(chars) {
|
|
|
7617
7619
|
}
|
|
7618
7620
|
return null;
|
|
7619
7621
|
}
|
|
7622
|
+
/**
|
|
7623
|
+
- \p{L} is for any letter (from any language)
|
|
7624
|
+
- \p{N} is for any number
|
|
7625
|
+
- the u flag at the end is for unicode, which enables the `\p{...}` syntax
|
|
7626
|
+
*/
|
|
7627
|
+
const unicodeSymbolCharRegexp = /\p{L}|\p{N}|_|\.|!|\$/u;
|
|
7620
7628
|
const SYMBOL_CHARS = new Set("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.!$");
|
|
7621
7629
|
/**
|
|
7622
7630
|
* A "Symbol" is just basically any word-like element that can appear in a
|
|
@@ -7657,7 +7665,8 @@ function tokenizeSymbol(chars) {
|
|
|
7657
7665
|
};
|
|
7658
7666
|
}
|
|
7659
7667
|
}
|
|
7660
|
-
while (chars.current &&
|
|
7668
|
+
while (chars.current &&
|
|
7669
|
+
(SYMBOL_CHARS.has(chars.current) || chars.current.match(unicodeSymbolCharRegexp))) {
|
|
7661
7670
|
result += chars.shift();
|
|
7662
7671
|
}
|
|
7663
7672
|
if (result.length) {
|
|
@@ -22374,7 +22383,7 @@ class ColorPicker extends Component {
|
|
|
22374
22383
|
}
|
|
22375
22384
|
setHexColor(ev) {
|
|
22376
22385
|
// only support HEX code input
|
|
22377
|
-
const val = ev.target.value.slice(0, 7);
|
|
22386
|
+
const val = ev.target.value.replace("##", "#").slice(0, 7);
|
|
22378
22387
|
this.state.customHexColor = val;
|
|
22379
22388
|
if (!isColorValid(val)) ;
|
|
22380
22389
|
else {
|
|
@@ -44409,10 +44418,8 @@ function mergeTransformation(toTransform, executed) {
|
|
|
44409
44418
|
}
|
|
44410
44419
|
const target = [];
|
|
44411
44420
|
for (const zone1 of toTransform.target) {
|
|
44412
|
-
|
|
44413
|
-
|
|
44414
|
-
target.push({ ...zone1 });
|
|
44415
|
-
}
|
|
44421
|
+
if (executed.target.every((zone2) => !overlap(zone1, zone2))) {
|
|
44422
|
+
target.push(zone1);
|
|
44416
44423
|
}
|
|
44417
44424
|
}
|
|
44418
44425
|
if (target.length) {
|
|
@@ -58212,6 +58219,6 @@ const constants = {
|
|
|
58212
58219
|
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 };
|
|
58213
58220
|
|
|
58214
58221
|
|
|
58215
|
-
__info__.version = "17.0.
|
|
58216
|
-
__info__.date = "2025-04-
|
|
58217
|
-
__info__.hash = "
|
|
58222
|
+
__info__.version = "17.0.59";
|
|
58223
|
+
__info__.date = "2025-04-25T08:04:05.375Z";
|
|
58224
|
+
__info__.hash = "eb92388";
|
|
@@ -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 2025-04-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.59
|
|
6
|
+
* @date 2025-04-25T08:04:05.375Z
|
|
7
|
+
* @hash eb92388
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -4817,7 +4817,7 @@
|
|
|
4817
4817
|
if (executed.type === "ADD_COLUMNS_ROWS") {
|
|
4818
4818
|
return expandZoneOnInsertion(zone, executed.dimension === "COL" ? "left" : "top", executed.base, executed.position, executed.quantity);
|
|
4819
4819
|
}
|
|
4820
|
-
return
|
|
4820
|
+
return zone;
|
|
4821
4821
|
}
|
|
4822
4822
|
function transformRangeData(range, executed) {
|
|
4823
4823
|
const deletedSheet = executed.type === "DELETE_SHEET" && executed.sheetId;
|
|
@@ -4856,7 +4856,7 @@
|
|
|
4856
4856
|
// Note: chartJS modify the runtime in place, so it's important to give it a copy
|
|
4857
4857
|
this.createChart(deepCopy(runtime.chartJsConfig));
|
|
4858
4858
|
});
|
|
4859
|
-
owl.useEffect(() => this.updateChartJs(deepCopy(this.chartRuntime)), () => [this.chartRuntime]);
|
|
4859
|
+
owl.useEffect(() => this.updateChartJs(deepCopy(this.chartRuntime)), () => [this.chartRuntime, window.devicePixelRatio]);
|
|
4860
4860
|
}
|
|
4861
4861
|
createChart(chartData) {
|
|
4862
4862
|
const canvas = this.canvas.el;
|
|
@@ -5394,8 +5394,10 @@
|
|
|
5394
5394
|
};
|
|
5395
5395
|
function drawScoreChart(structure, canvas) {
|
|
5396
5396
|
const ctx = canvas.getContext("2d");
|
|
5397
|
-
|
|
5398
|
-
canvas.
|
|
5397
|
+
const dpr = window.devicePixelRatio || 1;
|
|
5398
|
+
canvas.width = structure.canvas.width * dpr;
|
|
5399
|
+
canvas.height = structure.canvas.height * dpr;
|
|
5400
|
+
ctx.scale(dpr, dpr);
|
|
5399
5401
|
ctx.fillStyle = structure.canvas.backgroundColor;
|
|
5400
5402
|
ctx.fillRect(0, 0, structure.canvas.width, structure.canvas.height);
|
|
5401
5403
|
if (structure.title) {
|
|
@@ -5744,7 +5746,7 @@
|
|
|
5744
5746
|
owl.useEffect(this.createChart.bind(this), () => {
|
|
5745
5747
|
const canvas = this.canvas.el;
|
|
5746
5748
|
const rect = canvas.getBoundingClientRect();
|
|
5747
|
-
return [rect.width, rect.height, this.runtime, this.canvas.el];
|
|
5749
|
+
return [rect.width, rect.height, this.runtime, this.canvas.el, window.devicePixelRatio];
|
|
5748
5750
|
});
|
|
5749
5751
|
}
|
|
5750
5752
|
createChart() {
|
|
@@ -7618,6 +7620,12 @@
|
|
|
7618
7620
|
}
|
|
7619
7621
|
return null;
|
|
7620
7622
|
}
|
|
7623
|
+
/**
|
|
7624
|
+
- \p{L} is for any letter (from any language)
|
|
7625
|
+
- \p{N} is for any number
|
|
7626
|
+
- the u flag at the end is for unicode, which enables the `\p{...}` syntax
|
|
7627
|
+
*/
|
|
7628
|
+
const unicodeSymbolCharRegexp = /\p{L}|\p{N}|_|\.|!|\$/u;
|
|
7621
7629
|
const SYMBOL_CHARS = new Set("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.!$");
|
|
7622
7630
|
/**
|
|
7623
7631
|
* A "Symbol" is just basically any word-like element that can appear in a
|
|
@@ -7658,7 +7666,8 @@
|
|
|
7658
7666
|
};
|
|
7659
7667
|
}
|
|
7660
7668
|
}
|
|
7661
|
-
while (chars.current &&
|
|
7669
|
+
while (chars.current &&
|
|
7670
|
+
(SYMBOL_CHARS.has(chars.current) || chars.current.match(unicodeSymbolCharRegexp))) {
|
|
7662
7671
|
result += chars.shift();
|
|
7663
7672
|
}
|
|
7664
7673
|
if (result.length) {
|
|
@@ -22375,7 +22384,7 @@
|
|
|
22375
22384
|
}
|
|
22376
22385
|
setHexColor(ev) {
|
|
22377
22386
|
// only support HEX code input
|
|
22378
|
-
const val = ev.target.value.slice(0, 7);
|
|
22387
|
+
const val = ev.target.value.replace("##", "#").slice(0, 7);
|
|
22379
22388
|
this.state.customHexColor = val;
|
|
22380
22389
|
if (!isColorValid(val)) ;
|
|
22381
22390
|
else {
|
|
@@ -44410,10 +44419,8 @@
|
|
|
44410
44419
|
}
|
|
44411
44420
|
const target = [];
|
|
44412
44421
|
for (const zone1 of toTransform.target) {
|
|
44413
|
-
|
|
44414
|
-
|
|
44415
|
-
target.push({ ...zone1 });
|
|
44416
|
-
}
|
|
44422
|
+
if (executed.target.every((zone2) => !overlap(zone1, zone2))) {
|
|
44423
|
+
target.push(zone1);
|
|
44417
44424
|
}
|
|
44418
44425
|
}
|
|
44419
44426
|
if (target.length) {
|
|
@@ -58248,9 +58255,9 @@
|
|
|
58248
58255
|
exports.tokenize = tokenize;
|
|
58249
58256
|
|
|
58250
58257
|
|
|
58251
|
-
__info__.version = "17.0.
|
|
58252
|
-
__info__.date = "2025-04-
|
|
58253
|
-
__info__.hash = "
|
|
58258
|
+
__info__.version = "17.0.59";
|
|
58259
|
+
__info__.date = "2025-04-25T08:04:05.375Z";
|
|
58260
|
+
__info__.hash = "eb92388";
|
|
58254
58261
|
|
|
58255
58262
|
|
|
58256
58263
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|