@odoo/o-spreadsheet 16.0.39 → 16.0.40
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.
|
@@ -7244,7 +7244,7 @@ function truncateLabel(label) {
|
|
|
7244
7244
|
/**
|
|
7245
7245
|
* Get a default chart js configuration
|
|
7246
7246
|
*/
|
|
7247
|
-
function getDefaultChartJsRuntime(chart, labels, fontColor) {
|
|
7247
|
+
function getDefaultChartJsRuntime(chart, labels, fontColor, truncateLabels = true) {
|
|
7248
7248
|
return {
|
|
7249
7249
|
type: chart.type,
|
|
7250
7250
|
options: {
|
|
@@ -7283,7 +7283,7 @@ function getDefaultChartJsRuntime(chart, labels, fontColor) {
|
|
|
7283
7283
|
},
|
|
7284
7284
|
},
|
|
7285
7285
|
data: {
|
|
7286
|
-
labels: labels.map(truncateLabel),
|
|
7286
|
+
labels: truncateLabels ? labels.map(truncateLabel) : labels,
|
|
7287
7287
|
datasets: [],
|
|
7288
7288
|
},
|
|
7289
7289
|
};
|
|
@@ -8143,10 +8143,10 @@ function canBeLinearChart(chart, getters) {
|
|
|
8143
8143
|
}
|
|
8144
8144
|
return true;
|
|
8145
8145
|
}
|
|
8146
|
-
function getLineConfiguration(chart, labels) {
|
|
8146
|
+
function getLineConfiguration(chart, labels, truncateLabels) {
|
|
8147
8147
|
var _a;
|
|
8148
8148
|
const fontColor = chartFontColor(chart.background);
|
|
8149
|
-
const config = getDefaultChartJsRuntime(chart, labels, fontColor);
|
|
8149
|
+
const config = getDefaultChartJsRuntime(chart, labels, fontColor, truncateLabels);
|
|
8150
8150
|
const legend = {
|
|
8151
8151
|
labels: {
|
|
8152
8152
|
fontColor,
|
|
@@ -8208,7 +8208,8 @@ function createLineChartRuntime(chart, getters) {
|
|
|
8208
8208
|
if (axisType === "time") {
|
|
8209
8209
|
({ labels, dataSetsValues } = fixEmptyLabelsForDateCharts(labels, dataSetsValues));
|
|
8210
8210
|
}
|
|
8211
|
-
const
|
|
8211
|
+
const truncateLabels = axisType === "category";
|
|
8212
|
+
const config = getLineConfiguration(chart, labels, truncateLabels);
|
|
8212
8213
|
const labelFormat = getLabelFormat(getters, chart.labelRange);
|
|
8213
8214
|
if (axisType === "time") {
|
|
8214
8215
|
config.options.scales.xAxes[0].type = "time";
|
|
@@ -27390,7 +27391,7 @@ class BordersPlugin extends CorePlugin {
|
|
|
27390
27391
|
this.clearBorders(cmd.sheetId, cmd.target);
|
|
27391
27392
|
break;
|
|
27392
27393
|
case "REMOVE_COLUMNS_ROWS":
|
|
27393
|
-
for (let el of cmd.elements) {
|
|
27394
|
+
for (let el of [...cmd.elements].sort((a, b) => b - a)) {
|
|
27394
27395
|
if (cmd.dimension === "COL") {
|
|
27395
27396
|
this.shiftBordersHorizontally(cmd.sheetId, el + 1, -1);
|
|
27396
27397
|
}
|
|
@@ -43322,6 +43323,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
43322
43323
|
exports.tokenize = tokenize;
|
|
43323
43324
|
|
|
43324
43325
|
|
|
43325
|
-
__info__.version = '16.0.
|
|
43326
|
-
__info__.date = '2024-04-
|
|
43327
|
-
__info__.hash = '
|
|
43326
|
+
__info__.version = '16.0.40';
|
|
43327
|
+
__info__.date = '2024-04-26T07:39:46.758Z';
|
|
43328
|
+
__info__.hash = '70a6783';
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -6242,7 +6242,7 @@ declare function chartFontColor(backgroundColor: Color | undefined): Color;
|
|
|
6242
6242
|
/**
|
|
6243
6243
|
* Get a default chart js configuration
|
|
6244
6244
|
*/
|
|
6245
|
-
declare function getDefaultChartJsRuntime(chart: AbstractChart, labels: string[], fontColor: Color): ChartConfiguration;
|
|
6245
|
+
declare function getDefaultChartJsRuntime(chart: AbstractChart, labels: string[], fontColor: Color, truncateLabels?: boolean): ChartConfiguration;
|
|
6246
6246
|
/** See https://www.chartjs.org/docs/latest/charts/area.html#filling-modes */
|
|
6247
6247
|
declare function getFillingMode(index: number): "origin" | number;
|
|
6248
6248
|
|
|
@@ -7240,7 +7240,7 @@ function truncateLabel(label) {
|
|
|
7240
7240
|
/**
|
|
7241
7241
|
* Get a default chart js configuration
|
|
7242
7242
|
*/
|
|
7243
|
-
function getDefaultChartJsRuntime(chart, labels, fontColor) {
|
|
7243
|
+
function getDefaultChartJsRuntime(chart, labels, fontColor, truncateLabels = true) {
|
|
7244
7244
|
return {
|
|
7245
7245
|
type: chart.type,
|
|
7246
7246
|
options: {
|
|
@@ -7279,7 +7279,7 @@ function getDefaultChartJsRuntime(chart, labels, fontColor) {
|
|
|
7279
7279
|
},
|
|
7280
7280
|
},
|
|
7281
7281
|
data: {
|
|
7282
|
-
labels: labels.map(truncateLabel),
|
|
7282
|
+
labels: truncateLabels ? labels.map(truncateLabel) : labels,
|
|
7283
7283
|
datasets: [],
|
|
7284
7284
|
},
|
|
7285
7285
|
};
|
|
@@ -8139,10 +8139,10 @@ function canBeLinearChart(chart, getters) {
|
|
|
8139
8139
|
}
|
|
8140
8140
|
return true;
|
|
8141
8141
|
}
|
|
8142
|
-
function getLineConfiguration(chart, labels) {
|
|
8142
|
+
function getLineConfiguration(chart, labels, truncateLabels) {
|
|
8143
8143
|
var _a;
|
|
8144
8144
|
const fontColor = chartFontColor(chart.background);
|
|
8145
|
-
const config = getDefaultChartJsRuntime(chart, labels, fontColor);
|
|
8145
|
+
const config = getDefaultChartJsRuntime(chart, labels, fontColor, truncateLabels);
|
|
8146
8146
|
const legend = {
|
|
8147
8147
|
labels: {
|
|
8148
8148
|
fontColor,
|
|
@@ -8204,7 +8204,8 @@ function createLineChartRuntime(chart, getters) {
|
|
|
8204
8204
|
if (axisType === "time") {
|
|
8205
8205
|
({ labels, dataSetsValues } = fixEmptyLabelsForDateCharts(labels, dataSetsValues));
|
|
8206
8206
|
}
|
|
8207
|
-
const
|
|
8207
|
+
const truncateLabels = axisType === "category";
|
|
8208
|
+
const config = getLineConfiguration(chart, labels, truncateLabels);
|
|
8208
8209
|
const labelFormat = getLabelFormat(getters, chart.labelRange);
|
|
8209
8210
|
if (axisType === "time") {
|
|
8210
8211
|
config.options.scales.xAxes[0].type = "time";
|
|
@@ -27386,7 +27387,7 @@ class BordersPlugin extends CorePlugin {
|
|
|
27386
27387
|
this.clearBorders(cmd.sheetId, cmd.target);
|
|
27387
27388
|
break;
|
|
27388
27389
|
case "REMOVE_COLUMNS_ROWS":
|
|
27389
|
-
for (let el of cmd.elements) {
|
|
27390
|
+
for (let el of [...cmd.elements].sort((a, b) => b - a)) {
|
|
27390
27391
|
if (cmd.dimension === "COL") {
|
|
27391
27392
|
this.shiftBordersHorizontally(cmd.sheetId, el + 1, -1);
|
|
27392
27393
|
}
|
|
@@ -43290,6 +43291,6 @@ function addFunction(functionName, functionDescription) {
|
|
|
43290
43291
|
export { AbstractChart, CommandResult, CorePlugin, DATETIME_FORMAT, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, cellTypes, compile, components, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, invalidateEvaluationCommands, load, parse, readonlyAllowedCommands, registries, setTranslationMethod, tokenize };
|
|
43291
43292
|
|
|
43292
43293
|
|
|
43293
|
-
__info__.version = '16.0.
|
|
43294
|
-
__info__.date = '2024-04-
|
|
43295
|
-
__info__.hash = '
|
|
43294
|
+
__info__.version = '16.0.40';
|
|
43295
|
+
__info__.date = '2024-04-26T07:39:46.758Z';
|
|
43296
|
+
__info__.hash = '70a6783';
|
|
@@ -7241,7 +7241,7 @@
|
|
|
7241
7241
|
/**
|
|
7242
7242
|
* Get a default chart js configuration
|
|
7243
7243
|
*/
|
|
7244
|
-
function getDefaultChartJsRuntime(chart, labels, fontColor) {
|
|
7244
|
+
function getDefaultChartJsRuntime(chart, labels, fontColor, truncateLabels = true) {
|
|
7245
7245
|
return {
|
|
7246
7246
|
type: chart.type,
|
|
7247
7247
|
options: {
|
|
@@ -7280,7 +7280,7 @@
|
|
|
7280
7280
|
},
|
|
7281
7281
|
},
|
|
7282
7282
|
data: {
|
|
7283
|
-
labels: labels.map(truncateLabel),
|
|
7283
|
+
labels: truncateLabels ? labels.map(truncateLabel) : labels,
|
|
7284
7284
|
datasets: [],
|
|
7285
7285
|
},
|
|
7286
7286
|
};
|
|
@@ -8140,10 +8140,10 @@
|
|
|
8140
8140
|
}
|
|
8141
8141
|
return true;
|
|
8142
8142
|
}
|
|
8143
|
-
function getLineConfiguration(chart, labels) {
|
|
8143
|
+
function getLineConfiguration(chart, labels, truncateLabels) {
|
|
8144
8144
|
var _a;
|
|
8145
8145
|
const fontColor = chartFontColor(chart.background);
|
|
8146
|
-
const config = getDefaultChartJsRuntime(chart, labels, fontColor);
|
|
8146
|
+
const config = getDefaultChartJsRuntime(chart, labels, fontColor, truncateLabels);
|
|
8147
8147
|
const legend = {
|
|
8148
8148
|
labels: {
|
|
8149
8149
|
fontColor,
|
|
@@ -8205,7 +8205,8 @@
|
|
|
8205
8205
|
if (axisType === "time") {
|
|
8206
8206
|
({ labels, dataSetsValues } = fixEmptyLabelsForDateCharts(labels, dataSetsValues));
|
|
8207
8207
|
}
|
|
8208
|
-
const
|
|
8208
|
+
const truncateLabels = axisType === "category";
|
|
8209
|
+
const config = getLineConfiguration(chart, labels, truncateLabels);
|
|
8209
8210
|
const labelFormat = getLabelFormat(getters, chart.labelRange);
|
|
8210
8211
|
if (axisType === "time") {
|
|
8211
8212
|
config.options.scales.xAxes[0].type = "time";
|
|
@@ -27387,7 +27388,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
27387
27388
|
this.clearBorders(cmd.sheetId, cmd.target);
|
|
27388
27389
|
break;
|
|
27389
27390
|
case "REMOVE_COLUMNS_ROWS":
|
|
27390
|
-
for (let el of cmd.elements) {
|
|
27391
|
+
for (let el of [...cmd.elements].sort((a, b) => b - a)) {
|
|
27391
27392
|
if (cmd.dimension === "COL") {
|
|
27392
27393
|
this.shiftBordersHorizontally(cmd.sheetId, el + 1, -1);
|
|
27393
27394
|
}
|
|
@@ -43321,9 +43322,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
43321
43322
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
43322
43323
|
|
|
43323
43324
|
|
|
43324
|
-
__info__.version = '16.0.
|
|
43325
|
-
__info__.date = '2024-04-
|
|
43326
|
-
__info__.hash = '
|
|
43325
|
+
__info__.version = '16.0.40';
|
|
43326
|
+
__info__.date = '2024-04-26T07:39:46.758Z';
|
|
43327
|
+
__info__.hash = '70a6783';
|
|
43327
43328
|
|
|
43328
43329
|
|
|
43329
43330
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|