@odoo/o-spreadsheet 17.4.31 → 17.4.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 +22 -14
- package/dist/o-spreadsheet.esm.js +22 -14
- package/dist/o-spreadsheet.iife.js +22 -14
- package/dist/o-spreadsheet.iife.min.js +4 -4
- 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.4.
|
|
6
|
-
* @date 2025-04-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.4.32
|
|
6
|
+
* @date 2025-04-25T08:06:59.937Z
|
|
7
|
+
* @hash c370ddf
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -10947,9 +10947,11 @@ const GAUGE_TITLE_PADDING_LEFT = DEFAULT_CHART_PADDING;
|
|
|
10947
10947
|
const GAUGE_TITLE_PADDING_TOP = DEFAULT_CHART_PADDING;
|
|
10948
10948
|
function drawGaugeChart(canvas, runtime) {
|
|
10949
10949
|
const canvasBoundingRect = canvas.getBoundingClientRect();
|
|
10950
|
-
|
|
10951
|
-
canvas.
|
|
10950
|
+
const dpr = window.devicePixelRatio || 1;
|
|
10951
|
+
canvas.width = dpr * canvasBoundingRect.width;
|
|
10952
|
+
canvas.height = dpr * canvasBoundingRect.height;
|
|
10952
10953
|
const ctx = canvas.getContext("2d");
|
|
10954
|
+
ctx.scale(dpr, dpr);
|
|
10953
10955
|
const config = getGaugeRenderingConfig(canvasBoundingRect, runtime, ctx);
|
|
10954
10956
|
drawBackground(ctx, config);
|
|
10955
10957
|
drawGauge(ctx, config);
|
|
@@ -11506,9 +11508,11 @@ let ScorecardChart$1 = class ScorecardChart extends AbstractChart {
|
|
|
11506
11508
|
};
|
|
11507
11509
|
function drawScoreChart(structure, canvas) {
|
|
11508
11510
|
const ctx = canvas.getContext("2d");
|
|
11509
|
-
|
|
11510
|
-
|
|
11511
|
-
canvas.height = structure.canvas.height;
|
|
11511
|
+
const dpr = window.devicePixelRatio || 1;
|
|
11512
|
+
canvas.width = dpr * structure.canvas.width;
|
|
11513
|
+
canvas.height = dpr * structure.canvas.height;
|
|
11514
|
+
ctx.scale(dpr, dpr);
|
|
11515
|
+
const availableWidth = structure.canvas.width - DEFAULT_CHART_PADDING;
|
|
11512
11516
|
ctx.fillStyle = structure.canvas.backgroundColor;
|
|
11513
11517
|
ctx.fillRect(0, 0, structure.canvas.width, structure.canvas.height);
|
|
11514
11518
|
if (structure.title) {
|
|
@@ -12273,6 +12277,10 @@ class ChartJsComponent extends owl.Component {
|
|
|
12273
12277
|
this.currentRuntime = runtime;
|
|
12274
12278
|
}
|
|
12275
12279
|
});
|
|
12280
|
+
owl.useEffect(() => {
|
|
12281
|
+
this.currentRuntime = this.chartRuntime;
|
|
12282
|
+
this.updateChartJs(deepCopy(this.currentRuntime));
|
|
12283
|
+
}, () => [window.devicePixelRatio]);
|
|
12276
12284
|
}
|
|
12277
12285
|
createChart(chartData) {
|
|
12278
12286
|
const canvas = this.canvas.el;
|
|
@@ -12314,7 +12322,7 @@ class ScorecardChart extends owl.Component {
|
|
|
12314
12322
|
owl.useEffect(this.createChart.bind(this), () => {
|
|
12315
12323
|
const canvas = this.canvas.el;
|
|
12316
12324
|
const rect = canvas.getBoundingClientRect();
|
|
12317
|
-
return [rect.width, rect.height, this.runtime, this.canvas.el];
|
|
12325
|
+
return [rect.width, rect.height, this.runtime, this.canvas.el, window.devicePixelRatio];
|
|
12318
12326
|
});
|
|
12319
12327
|
}
|
|
12320
12328
|
createChart() {
|
|
@@ -25203,7 +25211,7 @@ class GaugeChartComponent extends owl.Component {
|
|
|
25203
25211
|
owl.useEffect(() => drawGaugeChart(this.canvas.el, this.runtime), () => {
|
|
25204
25212
|
const canvas = this.canvas.el;
|
|
25205
25213
|
const rect = canvas.getBoundingClientRect();
|
|
25206
|
-
return [rect.width, rect.height, this.runtime, this.canvas.el];
|
|
25214
|
+
return [rect.width, rect.height, this.runtime, this.canvas.el, window.devicePixelRatio];
|
|
25207
25215
|
});
|
|
25208
25216
|
}
|
|
25209
25217
|
}
|
|
@@ -32369,7 +32377,7 @@ class ColorPicker extends owl.Component {
|
|
|
32369
32377
|
}
|
|
32370
32378
|
setHexColor(ev) {
|
|
32371
32379
|
// only support HEX code input
|
|
32372
|
-
const val = ev.target.value.slice(0, 7);
|
|
32380
|
+
const val = ev.target.value.replace("##", "#").slice(0, 7);
|
|
32373
32381
|
this.state.customHexColor = val;
|
|
32374
32382
|
if (!isColorValid(val)) ;
|
|
32375
32383
|
else {
|
|
@@ -69381,6 +69389,6 @@ exports.tokenColors = tokenColors;
|
|
|
69381
69389
|
exports.tokenize = tokenize;
|
|
69382
69390
|
|
|
69383
69391
|
|
|
69384
|
-
__info__.version = "17.4.
|
|
69385
|
-
__info__.date = "2025-04-
|
|
69386
|
-
__info__.hash = "
|
|
69392
|
+
__info__.version = "17.4.32";
|
|
69393
|
+
__info__.date = "2025-04-25T08:06:59.937Z";
|
|
69394
|
+
__info__.hash = "c370ddf";
|
|
@@ -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.4.
|
|
6
|
-
* @date 2025-04-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.4.32
|
|
6
|
+
* @date 2025-04-25T08:06:59.937Z
|
|
7
|
+
* @hash c370ddf
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, useState, onPatched, onWillPatch, onWillUpdateProps, useExternalListener, onWillStart, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
|
|
@@ -10945,9 +10945,11 @@ const GAUGE_TITLE_PADDING_LEFT = DEFAULT_CHART_PADDING;
|
|
|
10945
10945
|
const GAUGE_TITLE_PADDING_TOP = DEFAULT_CHART_PADDING;
|
|
10946
10946
|
function drawGaugeChart(canvas, runtime) {
|
|
10947
10947
|
const canvasBoundingRect = canvas.getBoundingClientRect();
|
|
10948
|
-
|
|
10949
|
-
canvas.
|
|
10948
|
+
const dpr = window.devicePixelRatio || 1;
|
|
10949
|
+
canvas.width = dpr * canvasBoundingRect.width;
|
|
10950
|
+
canvas.height = dpr * canvasBoundingRect.height;
|
|
10950
10951
|
const ctx = canvas.getContext("2d");
|
|
10952
|
+
ctx.scale(dpr, dpr);
|
|
10951
10953
|
const config = getGaugeRenderingConfig(canvasBoundingRect, runtime, ctx);
|
|
10952
10954
|
drawBackground(ctx, config);
|
|
10953
10955
|
drawGauge(ctx, config);
|
|
@@ -11504,9 +11506,11 @@ let ScorecardChart$1 = class ScorecardChart extends AbstractChart {
|
|
|
11504
11506
|
};
|
|
11505
11507
|
function drawScoreChart(structure, canvas) {
|
|
11506
11508
|
const ctx = canvas.getContext("2d");
|
|
11507
|
-
|
|
11508
|
-
|
|
11509
|
-
canvas.height = structure.canvas.height;
|
|
11509
|
+
const dpr = window.devicePixelRatio || 1;
|
|
11510
|
+
canvas.width = dpr * structure.canvas.width;
|
|
11511
|
+
canvas.height = dpr * structure.canvas.height;
|
|
11512
|
+
ctx.scale(dpr, dpr);
|
|
11513
|
+
const availableWidth = structure.canvas.width - DEFAULT_CHART_PADDING;
|
|
11510
11514
|
ctx.fillStyle = structure.canvas.backgroundColor;
|
|
11511
11515
|
ctx.fillRect(0, 0, structure.canvas.width, structure.canvas.height);
|
|
11512
11516
|
if (structure.title) {
|
|
@@ -12271,6 +12275,10 @@ class ChartJsComponent extends Component {
|
|
|
12271
12275
|
this.currentRuntime = runtime;
|
|
12272
12276
|
}
|
|
12273
12277
|
});
|
|
12278
|
+
useEffect(() => {
|
|
12279
|
+
this.currentRuntime = this.chartRuntime;
|
|
12280
|
+
this.updateChartJs(deepCopy(this.currentRuntime));
|
|
12281
|
+
}, () => [window.devicePixelRatio]);
|
|
12274
12282
|
}
|
|
12275
12283
|
createChart(chartData) {
|
|
12276
12284
|
const canvas = this.canvas.el;
|
|
@@ -12312,7 +12320,7 @@ class ScorecardChart extends Component {
|
|
|
12312
12320
|
useEffect(this.createChart.bind(this), () => {
|
|
12313
12321
|
const canvas = this.canvas.el;
|
|
12314
12322
|
const rect = canvas.getBoundingClientRect();
|
|
12315
|
-
return [rect.width, rect.height, this.runtime, this.canvas.el];
|
|
12323
|
+
return [rect.width, rect.height, this.runtime, this.canvas.el, window.devicePixelRatio];
|
|
12316
12324
|
});
|
|
12317
12325
|
}
|
|
12318
12326
|
createChart() {
|
|
@@ -25201,7 +25209,7 @@ class GaugeChartComponent extends Component {
|
|
|
25201
25209
|
useEffect(() => drawGaugeChart(this.canvas.el, this.runtime), () => {
|
|
25202
25210
|
const canvas = this.canvas.el;
|
|
25203
25211
|
const rect = canvas.getBoundingClientRect();
|
|
25204
|
-
return [rect.width, rect.height, this.runtime, this.canvas.el];
|
|
25212
|
+
return [rect.width, rect.height, this.runtime, this.canvas.el, window.devicePixelRatio];
|
|
25205
25213
|
});
|
|
25206
25214
|
}
|
|
25207
25215
|
}
|
|
@@ -32367,7 +32375,7 @@ class ColorPicker extends Component {
|
|
|
32367
32375
|
}
|
|
32368
32376
|
setHexColor(ev) {
|
|
32369
32377
|
// only support HEX code input
|
|
32370
|
-
const val = ev.target.value.slice(0, 7);
|
|
32378
|
+
const val = ev.target.value.replace("##", "#").slice(0, 7);
|
|
32371
32379
|
this.state.customHexColor = val;
|
|
32372
32380
|
if (!isColorValid(val)) ;
|
|
32373
32381
|
else {
|
|
@@ -69336,6 +69344,6 @@ const constants = {
|
|
|
69336
69344
|
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 };
|
|
69337
69345
|
|
|
69338
69346
|
|
|
69339
|
-
__info__.version = "17.4.
|
|
69340
|
-
__info__.date = "2025-04-
|
|
69341
|
-
__info__.hash = "
|
|
69347
|
+
__info__.version = "17.4.32";
|
|
69348
|
+
__info__.date = "2025-04-25T08:06:59.937Z";
|
|
69349
|
+
__info__.hash = "c370ddf";
|
|
@@ -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.4.
|
|
6
|
-
* @date 2025-04-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.4.32
|
|
6
|
+
* @date 2025-04-25T08:06:59.937Z
|
|
7
|
+
* @hash c370ddf
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -10946,9 +10946,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
10946
10946
|
const GAUGE_TITLE_PADDING_TOP = DEFAULT_CHART_PADDING;
|
|
10947
10947
|
function drawGaugeChart(canvas, runtime) {
|
|
10948
10948
|
const canvasBoundingRect = canvas.getBoundingClientRect();
|
|
10949
|
-
|
|
10950
|
-
canvas.
|
|
10949
|
+
const dpr = window.devicePixelRatio || 1;
|
|
10950
|
+
canvas.width = dpr * canvasBoundingRect.width;
|
|
10951
|
+
canvas.height = dpr * canvasBoundingRect.height;
|
|
10951
10952
|
const ctx = canvas.getContext("2d");
|
|
10953
|
+
ctx.scale(dpr, dpr);
|
|
10952
10954
|
const config = getGaugeRenderingConfig(canvasBoundingRect, runtime, ctx);
|
|
10953
10955
|
drawBackground(ctx, config);
|
|
10954
10956
|
drawGauge(ctx, config);
|
|
@@ -11505,9 +11507,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
11505
11507
|
};
|
|
11506
11508
|
function drawScoreChart(structure, canvas) {
|
|
11507
11509
|
const ctx = canvas.getContext("2d");
|
|
11508
|
-
|
|
11509
|
-
|
|
11510
|
-
canvas.height = structure.canvas.height;
|
|
11510
|
+
const dpr = window.devicePixelRatio || 1;
|
|
11511
|
+
canvas.width = dpr * structure.canvas.width;
|
|
11512
|
+
canvas.height = dpr * structure.canvas.height;
|
|
11513
|
+
ctx.scale(dpr, dpr);
|
|
11514
|
+
const availableWidth = structure.canvas.width - DEFAULT_CHART_PADDING;
|
|
11511
11515
|
ctx.fillStyle = structure.canvas.backgroundColor;
|
|
11512
11516
|
ctx.fillRect(0, 0, structure.canvas.width, structure.canvas.height);
|
|
11513
11517
|
if (structure.title) {
|
|
@@ -12272,6 +12276,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
12272
12276
|
this.currentRuntime = runtime;
|
|
12273
12277
|
}
|
|
12274
12278
|
});
|
|
12279
|
+
owl.useEffect(() => {
|
|
12280
|
+
this.currentRuntime = this.chartRuntime;
|
|
12281
|
+
this.updateChartJs(deepCopy(this.currentRuntime));
|
|
12282
|
+
}, () => [window.devicePixelRatio]);
|
|
12275
12283
|
}
|
|
12276
12284
|
createChart(chartData) {
|
|
12277
12285
|
const canvas = this.canvas.el;
|
|
@@ -12313,7 +12321,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
12313
12321
|
owl.useEffect(this.createChart.bind(this), () => {
|
|
12314
12322
|
const canvas = this.canvas.el;
|
|
12315
12323
|
const rect = canvas.getBoundingClientRect();
|
|
12316
|
-
return [rect.width, rect.height, this.runtime, this.canvas.el];
|
|
12324
|
+
return [rect.width, rect.height, this.runtime, this.canvas.el, window.devicePixelRatio];
|
|
12317
12325
|
});
|
|
12318
12326
|
}
|
|
12319
12327
|
createChart() {
|
|
@@ -25202,7 +25210,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
25202
25210
|
owl.useEffect(() => drawGaugeChart(this.canvas.el, this.runtime), () => {
|
|
25203
25211
|
const canvas = this.canvas.el;
|
|
25204
25212
|
const rect = canvas.getBoundingClientRect();
|
|
25205
|
-
return [rect.width, rect.height, this.runtime, this.canvas.el];
|
|
25213
|
+
return [rect.width, rect.height, this.runtime, this.canvas.el, window.devicePixelRatio];
|
|
25206
25214
|
});
|
|
25207
25215
|
}
|
|
25208
25216
|
}
|
|
@@ -32368,7 +32376,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
32368
32376
|
}
|
|
32369
32377
|
setHexColor(ev) {
|
|
32370
32378
|
// only support HEX code input
|
|
32371
|
-
const val = ev.target.value.slice(0, 7);
|
|
32379
|
+
const val = ev.target.value.replace("##", "#").slice(0, 7);
|
|
32372
32380
|
this.state.customHexColor = val;
|
|
32373
32381
|
if (!isColorValid(val)) ;
|
|
32374
32382
|
else {
|
|
@@ -69380,9 +69388,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
69380
69388
|
exports.tokenize = tokenize;
|
|
69381
69389
|
|
|
69382
69390
|
|
|
69383
|
-
__info__.version = "17.4.
|
|
69384
|
-
__info__.date = "2025-04-
|
|
69385
|
-
__info__.hash = "
|
|
69391
|
+
__info__.version = "17.4.32";
|
|
69392
|
+
__info__.date = "2025-04-25T08:06:59.937Z";
|
|
69393
|
+
__info__.hash = "c370ddf";
|
|
69386
69394
|
|
|
69387
69395
|
|
|
69388
69396
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|