@odoo/o-spreadsheet 17.2.5 → 17.2.6
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.
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
5
5
|
* @see https://github.com/odoo/o-spreadsheet
|
|
6
|
-
* @version 17.2.
|
|
7
|
-
* @date 2024-
|
|
8
|
-
* @hash
|
|
6
|
+
* @version 17.2.6
|
|
7
|
+
* @date 2024-05-07T10:41:20.332Z
|
|
8
|
+
* @hash a4f800c
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
@@ -554,7 +554,7 @@ function getAddHeaderStartIndex(position, base) {
|
|
|
554
554
|
/**
|
|
555
555
|
* Compares two objects.
|
|
556
556
|
*/
|
|
557
|
-
function deepEquals(o1, o2) {
|
|
557
|
+
function deepEquals(o1, o2, ignoreFunctions) {
|
|
558
558
|
if (o1 === o2)
|
|
559
559
|
return true;
|
|
560
560
|
if ((o1 && !o2) || (o2 && !o1))
|
|
@@ -570,13 +570,16 @@ function deepEquals(o1, o2) {
|
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
572
|
for (const key in o1) {
|
|
573
|
-
|
|
573
|
+
const typeOfO1Key = typeof o1[key];
|
|
574
|
+
if (typeOfO1Key !== typeof o2[key])
|
|
574
575
|
return false;
|
|
575
|
-
if (
|
|
576
|
-
if (!deepEquals(o1[key], o2[key]))
|
|
576
|
+
if (typeOfO1Key === "object") {
|
|
577
|
+
if (!deepEquals(o1[key], o2[key], ignoreFunctions))
|
|
577
578
|
return false;
|
|
578
579
|
}
|
|
579
580
|
else {
|
|
581
|
+
if (ignoreFunctions && typeOfO1Key === "function")
|
|
582
|
+
return true;
|
|
580
583
|
if (o1[key] !== o2[key])
|
|
581
584
|
return false;
|
|
582
585
|
}
|
|
@@ -3684,21 +3687,22 @@ function toZoneWithoutBoundaryChanges(xc) {
|
|
|
3684
3687
|
xc = xc.split("!").at(-1);
|
|
3685
3688
|
}
|
|
3686
3689
|
if (xc.includes("$")) {
|
|
3687
|
-
xc = xc.
|
|
3690
|
+
xc = xc.replaceAll("$", "");
|
|
3688
3691
|
}
|
|
3689
|
-
let
|
|
3692
|
+
let firstRangePart = "";
|
|
3693
|
+
let secondRangePart;
|
|
3690
3694
|
if (xc.includes(":")) {
|
|
3691
|
-
|
|
3695
|
+
[firstRangePart, secondRangePart] = xc.split(":");
|
|
3696
|
+
firstRangePart = firstRangePart.trim();
|
|
3697
|
+
secondRangePart = secondRangePart.trim();
|
|
3692
3698
|
}
|
|
3693
3699
|
else {
|
|
3694
|
-
|
|
3700
|
+
firstRangePart = xc.trim();
|
|
3695
3701
|
}
|
|
3696
3702
|
let top, bottom, left, right;
|
|
3697
3703
|
let fullCol = false;
|
|
3698
3704
|
let fullRow = false;
|
|
3699
3705
|
let hasHeader = false;
|
|
3700
|
-
const firstRangePart = ranges[0];
|
|
3701
|
-
const secondRangePart = ranges[1] && ranges[1];
|
|
3702
3706
|
if (isColReference(firstRangePart)) {
|
|
3703
3707
|
left = right = lettersToNumber(firstRangePart);
|
|
3704
3708
|
top = bottom = 0;
|
|
@@ -3715,7 +3719,7 @@ function toZoneWithoutBoundaryChanges(xc) {
|
|
|
3715
3719
|
top = bottom = c.row;
|
|
3716
3720
|
hasHeader = true;
|
|
3717
3721
|
}
|
|
3718
|
-
if (
|
|
3722
|
+
if (secondRangePart) {
|
|
3719
3723
|
if (isColReference(secondRangePart)) {
|
|
3720
3724
|
right = lettersToNumber(secondRangePart);
|
|
3721
3725
|
fullCol = true;
|
|
@@ -8906,8 +8910,7 @@ class ComposerStore extends SpreadsheetStore {
|
|
|
8906
8910
|
const exactMatch = proposals?.find((p) => p.text === tokenAtCursor.value);
|
|
8907
8911
|
// remove tokens that are likely to be other parts of the formula that slipped in the token if it's a string
|
|
8908
8912
|
const searchTerm = tokenAtCursor.value.replace(/[ ,\(\)]/g, "");
|
|
8909
|
-
|
|
8910
|
-
if (exactMatch && exactMatch.text !== initialContent) {
|
|
8913
|
+
if (exactMatch && this._currentContent !== this.initialContent) {
|
|
8911
8914
|
// this means the user has chosen a proposal
|
|
8912
8915
|
return;
|
|
8913
8916
|
}
|
|
@@ -8915,7 +8918,7 @@ class ComposerStore extends SpreadsheetStore {
|
|
|
8915
8918
|
proposals &&
|
|
8916
8919
|
!["ARG_SEPARATOR", "LEFT_PAREN"].includes(tokenAtCursor.type)) {
|
|
8917
8920
|
const filteredProposals = fuzzyLookup(searchTerm, proposals, (p) => p.fuzzySearchKey || p.text);
|
|
8918
|
-
if (!exactMatch) {
|
|
8921
|
+
if (!exactMatch || filteredProposals.length > 1) {
|
|
8919
8922
|
proposals = filteredProposals;
|
|
8920
8923
|
}
|
|
8921
8924
|
}
|
|
@@ -9050,6 +9053,7 @@ class ChartJsComponent extends owl.Component {
|
|
|
9050
9053
|
};
|
|
9051
9054
|
canvas = owl.useRef("graphContainer");
|
|
9052
9055
|
chart;
|
|
9056
|
+
currentRuntime;
|
|
9053
9057
|
get background() {
|
|
9054
9058
|
return this.chartRuntime.background;
|
|
9055
9059
|
}
|
|
@@ -9066,9 +9070,18 @@ class ChartJsComponent extends owl.Component {
|
|
|
9066
9070
|
setup() {
|
|
9067
9071
|
owl.onMounted(() => {
|
|
9068
9072
|
const runtime = this.chartRuntime;
|
|
9069
|
-
this.
|
|
9073
|
+
this.currentRuntime = runtime;
|
|
9074
|
+
// Note: chartJS modify the runtime in place, so it's important to give it a copy
|
|
9075
|
+
this.createChart(deepCopy(runtime.chartJsConfig));
|
|
9076
|
+
});
|
|
9077
|
+
owl.onWillUnmount(() => this.chart?.destroy());
|
|
9078
|
+
owl.useEffect(() => {
|
|
9079
|
+
const runtime = this.chartRuntime;
|
|
9080
|
+
if (!deepEquals(runtime, this.currentRuntime, "ignoreFunctions")) {
|
|
9081
|
+
this.currentRuntime = runtime;
|
|
9082
|
+
this.updateChartJs(deepCopy(runtime));
|
|
9083
|
+
}
|
|
9070
9084
|
});
|
|
9071
|
-
owl.useEffect(() => this.updateChartJs(this.chartRuntime), () => [this.chartRuntime]);
|
|
9072
9085
|
}
|
|
9073
9086
|
createChart(chartData) {
|
|
9074
9087
|
const canvas = this.canvas.el;
|
|
@@ -9090,8 +9103,7 @@ class ChartJsComponent extends owl.Component {
|
|
|
9090
9103
|
this.chart.config.options.plugins.tooltip = chartData.options.plugins.tooltip;
|
|
9091
9104
|
this.chart.config.options.plugins.legend = chartData.options.plugins.legend;
|
|
9092
9105
|
this.chart.config.options.scales = chartData.options?.scales;
|
|
9093
|
-
|
|
9094
|
-
this.chart.update("active");
|
|
9106
|
+
this.chart.update();
|
|
9095
9107
|
}
|
|
9096
9108
|
}
|
|
9097
9109
|
|
|
@@ -19454,7 +19466,7 @@ function truncateLabel(label) {
|
|
|
19454
19466
|
/**
|
|
19455
19467
|
* Get a default chart js configuration
|
|
19456
19468
|
*/
|
|
19457
|
-
function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale }) {
|
|
19469
|
+
function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale, truncateLabels }) {
|
|
19458
19470
|
const options = {
|
|
19459
19471
|
// https://www.chartjs.org/docs/latest/general/responsive.html
|
|
19460
19472
|
responsive: true,
|
|
@@ -19501,7 +19513,7 @@ function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale })
|
|
|
19501
19513
|
type: chart.type,
|
|
19502
19514
|
options,
|
|
19503
19515
|
data: {
|
|
19504
|
-
labels: labels.map(truncateLabel),
|
|
19516
|
+
labels: truncateLabels ? labels.map(truncateLabel) : labels,
|
|
19505
19517
|
datasets: [],
|
|
19506
19518
|
},
|
|
19507
19519
|
platform: undefined,
|
|
@@ -20267,9 +20279,9 @@ function isLuxonTimeAdapterInstalled() {
|
|
|
20267
20279
|
}
|
|
20268
20280
|
return isInstalled;
|
|
20269
20281
|
}
|
|
20270
|
-
function getLineOrScatterConfiguration(chart, labels,
|
|
20282
|
+
function getLineOrScatterConfiguration(chart, labels, options) {
|
|
20271
20283
|
const fontColor = chartFontColor(chart.background);
|
|
20272
|
-
const config = getDefaultChartJsRuntime(chart, labels, fontColor,
|
|
20284
|
+
const config = getDefaultChartJsRuntime(chart, labels, fontColor, options);
|
|
20273
20285
|
const legend = {
|
|
20274
20286
|
labels: {
|
|
20275
20287
|
color: fontColor,
|
|
@@ -20312,7 +20324,7 @@ function getLineOrScatterConfiguration(chart, labels, localeFormat) {
|
|
|
20312
20324
|
value = Number(value);
|
|
20313
20325
|
if (isNaN(value))
|
|
20314
20326
|
return value;
|
|
20315
|
-
const { locale, format } =
|
|
20327
|
+
const { locale, format } = options;
|
|
20316
20328
|
return formatValue(value, {
|
|
20317
20329
|
locale,
|
|
20318
20330
|
format: !format && Math.abs(value) >= 1000 ? "#,##" : format,
|
|
@@ -20345,9 +20357,10 @@ function createLineOrScatterChartRuntime(chart, getters) {
|
|
|
20345
20357
|
({ labels, dataSetsValues } = aggregateDataForLabels(labels, dataSetsValues));
|
|
20346
20358
|
}
|
|
20347
20359
|
const locale = getters.getLocale();
|
|
20360
|
+
const truncateLabels = axisType === "category";
|
|
20348
20361
|
const dataSetFormat = getChartDatasetFormat(getters, chart.dataSets);
|
|
20349
|
-
const
|
|
20350
|
-
const config = getLineOrScatterConfiguration(chart, labels,
|
|
20362
|
+
const options = { format: dataSetFormat, locale, truncateLabels };
|
|
20363
|
+
const config = getLineOrScatterConfiguration(chart, labels, options);
|
|
20351
20364
|
const labelFormat = getChartLabelFormat(getters, chart.labelRange);
|
|
20352
20365
|
if (axisType === "time") {
|
|
20353
20366
|
const axis = {
|
|
@@ -32901,7 +32914,8 @@ class DataValidationOverlay extends owl.Component {
|
|
|
32901
32914
|
get checkBoxCellPositions() {
|
|
32902
32915
|
return this.env.model.getters
|
|
32903
32916
|
.getVisibleCellPositions()
|
|
32904
|
-
.filter(this.env.model.getters.isCellValidCheckbox)
|
|
32917
|
+
.filter((position) => this.env.model.getters.isCellValidCheckbox(position) &&
|
|
32918
|
+
!this.env.model.getters.isFilterHeader(position));
|
|
32905
32919
|
}
|
|
32906
32920
|
get listIconsCellPositions() {
|
|
32907
32921
|
if (this.env.model.getters.isReadonly()) {
|
|
@@ -32909,7 +32923,8 @@ class DataValidationOverlay extends owl.Component {
|
|
|
32909
32923
|
}
|
|
32910
32924
|
return this.env.model.getters
|
|
32911
32925
|
.getVisibleCellPositions()
|
|
32912
|
-
.filter(this.env.model.getters.cellHasListDataValidationIcon)
|
|
32926
|
+
.filter((position) => this.env.model.getters.cellHasListDataValidationIcon(position) &&
|
|
32927
|
+
!this.env.model.getters.isFilterHeader(position));
|
|
32913
32928
|
}
|
|
32914
32929
|
}
|
|
32915
32930
|
|
|
@@ -47929,7 +47944,7 @@ class EvaluationPlugin extends UIPlugin {
|
|
|
47929
47944
|
? getItemId(newFormat, data.formats)
|
|
47930
47945
|
: exportedCellData.format;
|
|
47931
47946
|
let content;
|
|
47932
|
-
if (isFormula && formulaCell instanceof FormulaCellWithDependencies) {
|
|
47947
|
+
if (isExported && isFormula && formulaCell instanceof FormulaCellWithDependencies) {
|
|
47933
47948
|
content = formulaCell.contentWithFixedReferences;
|
|
47934
47949
|
}
|
|
47935
47950
|
else {
|
|
@@ -60600,6 +60615,6 @@ exports.tokenColors = tokenColors;
|
|
|
60600
60615
|
exports.tokenize = tokenize;
|
|
60601
60616
|
|
|
60602
60617
|
|
|
60603
|
-
__info__.version = "17.2.
|
|
60604
|
-
__info__.date = "2024-
|
|
60605
|
-
__info__.hash = "
|
|
60618
|
+
__info__.version = "17.2.6";
|
|
60619
|
+
__info__.date = "2024-05-07T10:41:20.332Z";
|
|
60620
|
+
__info__.hash = "a4f800c";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -4937,7 +4937,7 @@ declare function lazy<T>(fn: (() => T) | T): Lazy<T>;
|
|
|
4937
4937
|
/**
|
|
4938
4938
|
* Compares two objects.
|
|
4939
4939
|
*/
|
|
4940
|
-
declare function deepEquals(o1: any, o2: any): boolean;
|
|
4940
|
+
declare function deepEquals(o1: any, o2: any, ignoreFunctions?: "ignoreFunctions"): boolean;
|
|
4941
4941
|
|
|
4942
4942
|
interface ConstructorArgs {
|
|
4943
4943
|
readonly zone: Readonly<Zone | UnboundedZone>;
|
|
@@ -6858,6 +6858,7 @@ declare class ChartJsComponent extends Component<Props$y, SpreadsheetChildEnv> {
|
|
|
6858
6858
|
};
|
|
6859
6859
|
private canvas;
|
|
6860
6860
|
private chart?;
|
|
6861
|
+
private currentRuntime;
|
|
6861
6862
|
get background(): string;
|
|
6862
6863
|
get canvasStyle(): string;
|
|
6863
6864
|
get chartRuntime(): ChartJSRuntime;
|
|
@@ -8028,7 +8029,9 @@ declare function chartFontColor(backgroundColor: Color | undefined): Color;
|
|
|
8028
8029
|
/**
|
|
8029
8030
|
* Get a default chart js configuration
|
|
8030
8031
|
*/
|
|
8031
|
-
declare function getDefaultChartJsRuntime(chart: AbstractChart, labels: string[], fontColor: Color, { format, locale }: LocaleFormat
|
|
8032
|
+
declare function getDefaultChartJsRuntime(chart: AbstractChart, labels: string[], fontColor: Color, { format, locale, truncateLabels }: LocaleFormat & {
|
|
8033
|
+
truncateLabels?: boolean;
|
|
8034
|
+
}): Required<ChartConfiguration>;
|
|
8032
8035
|
/** See https://www.chartjs.org/docs/latest/charts/area.html#filling-modes */
|
|
8033
8036
|
declare function getFillingMode(index: number): "origin" | number;
|
|
8034
8037
|
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
5
5
|
* @see https://github.com/odoo/o-spreadsheet
|
|
6
|
-
* @version 17.2.
|
|
7
|
-
* @date 2024-
|
|
8
|
-
* @hash
|
|
6
|
+
* @version 17.2.6
|
|
7
|
+
* @date 2024-05-07T10:41:20.332Z
|
|
8
|
+
* @hash a4f800c
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import { reactive, useEnv, useSubEnv, useState, onWillUnmount, markRaw, toRaw, Component, useRef, onMounted, useEffect, onPatched, useComponent, onWillPatch, onWillUpdateProps, useExternalListener, onWillStart, xml, useChildSubEnv } from '@odoo/owl';
|
|
@@ -552,7 +552,7 @@ function getAddHeaderStartIndex(position, base) {
|
|
|
552
552
|
/**
|
|
553
553
|
* Compares two objects.
|
|
554
554
|
*/
|
|
555
|
-
function deepEquals(o1, o2) {
|
|
555
|
+
function deepEquals(o1, o2, ignoreFunctions) {
|
|
556
556
|
if (o1 === o2)
|
|
557
557
|
return true;
|
|
558
558
|
if ((o1 && !o2) || (o2 && !o1))
|
|
@@ -568,13 +568,16 @@ function deepEquals(o1, o2) {
|
|
|
568
568
|
}
|
|
569
569
|
}
|
|
570
570
|
for (const key in o1) {
|
|
571
|
-
|
|
571
|
+
const typeOfO1Key = typeof o1[key];
|
|
572
|
+
if (typeOfO1Key !== typeof o2[key])
|
|
572
573
|
return false;
|
|
573
|
-
if (
|
|
574
|
-
if (!deepEquals(o1[key], o2[key]))
|
|
574
|
+
if (typeOfO1Key === "object") {
|
|
575
|
+
if (!deepEquals(o1[key], o2[key], ignoreFunctions))
|
|
575
576
|
return false;
|
|
576
577
|
}
|
|
577
578
|
else {
|
|
579
|
+
if (ignoreFunctions && typeOfO1Key === "function")
|
|
580
|
+
return true;
|
|
578
581
|
if (o1[key] !== o2[key])
|
|
579
582
|
return false;
|
|
580
583
|
}
|
|
@@ -3682,21 +3685,22 @@ function toZoneWithoutBoundaryChanges(xc) {
|
|
|
3682
3685
|
xc = xc.split("!").at(-1);
|
|
3683
3686
|
}
|
|
3684
3687
|
if (xc.includes("$")) {
|
|
3685
|
-
xc = xc.
|
|
3688
|
+
xc = xc.replaceAll("$", "");
|
|
3686
3689
|
}
|
|
3687
|
-
let
|
|
3690
|
+
let firstRangePart = "";
|
|
3691
|
+
let secondRangePart;
|
|
3688
3692
|
if (xc.includes(":")) {
|
|
3689
|
-
|
|
3693
|
+
[firstRangePart, secondRangePart] = xc.split(":");
|
|
3694
|
+
firstRangePart = firstRangePart.trim();
|
|
3695
|
+
secondRangePart = secondRangePart.trim();
|
|
3690
3696
|
}
|
|
3691
3697
|
else {
|
|
3692
|
-
|
|
3698
|
+
firstRangePart = xc.trim();
|
|
3693
3699
|
}
|
|
3694
3700
|
let top, bottom, left, right;
|
|
3695
3701
|
let fullCol = false;
|
|
3696
3702
|
let fullRow = false;
|
|
3697
3703
|
let hasHeader = false;
|
|
3698
|
-
const firstRangePart = ranges[0];
|
|
3699
|
-
const secondRangePart = ranges[1] && ranges[1];
|
|
3700
3704
|
if (isColReference(firstRangePart)) {
|
|
3701
3705
|
left = right = lettersToNumber(firstRangePart);
|
|
3702
3706
|
top = bottom = 0;
|
|
@@ -3713,7 +3717,7 @@ function toZoneWithoutBoundaryChanges(xc) {
|
|
|
3713
3717
|
top = bottom = c.row;
|
|
3714
3718
|
hasHeader = true;
|
|
3715
3719
|
}
|
|
3716
|
-
if (
|
|
3720
|
+
if (secondRangePart) {
|
|
3717
3721
|
if (isColReference(secondRangePart)) {
|
|
3718
3722
|
right = lettersToNumber(secondRangePart);
|
|
3719
3723
|
fullCol = true;
|
|
@@ -8904,8 +8908,7 @@ class ComposerStore extends SpreadsheetStore {
|
|
|
8904
8908
|
const exactMatch = proposals?.find((p) => p.text === tokenAtCursor.value);
|
|
8905
8909
|
// remove tokens that are likely to be other parts of the formula that slipped in the token if it's a string
|
|
8906
8910
|
const searchTerm = tokenAtCursor.value.replace(/[ ,\(\)]/g, "");
|
|
8907
|
-
|
|
8908
|
-
if (exactMatch && exactMatch.text !== initialContent) {
|
|
8911
|
+
if (exactMatch && this._currentContent !== this.initialContent) {
|
|
8909
8912
|
// this means the user has chosen a proposal
|
|
8910
8913
|
return;
|
|
8911
8914
|
}
|
|
@@ -8913,7 +8916,7 @@ class ComposerStore extends SpreadsheetStore {
|
|
|
8913
8916
|
proposals &&
|
|
8914
8917
|
!["ARG_SEPARATOR", "LEFT_PAREN"].includes(tokenAtCursor.type)) {
|
|
8915
8918
|
const filteredProposals = fuzzyLookup(searchTerm, proposals, (p) => p.fuzzySearchKey || p.text);
|
|
8916
|
-
if (!exactMatch) {
|
|
8919
|
+
if (!exactMatch || filteredProposals.length > 1) {
|
|
8917
8920
|
proposals = filteredProposals;
|
|
8918
8921
|
}
|
|
8919
8922
|
}
|
|
@@ -9048,6 +9051,7 @@ class ChartJsComponent extends Component {
|
|
|
9048
9051
|
};
|
|
9049
9052
|
canvas = useRef("graphContainer");
|
|
9050
9053
|
chart;
|
|
9054
|
+
currentRuntime;
|
|
9051
9055
|
get background() {
|
|
9052
9056
|
return this.chartRuntime.background;
|
|
9053
9057
|
}
|
|
@@ -9064,9 +9068,18 @@ class ChartJsComponent extends Component {
|
|
|
9064
9068
|
setup() {
|
|
9065
9069
|
onMounted(() => {
|
|
9066
9070
|
const runtime = this.chartRuntime;
|
|
9067
|
-
this.
|
|
9071
|
+
this.currentRuntime = runtime;
|
|
9072
|
+
// Note: chartJS modify the runtime in place, so it's important to give it a copy
|
|
9073
|
+
this.createChart(deepCopy(runtime.chartJsConfig));
|
|
9074
|
+
});
|
|
9075
|
+
onWillUnmount(() => this.chart?.destroy());
|
|
9076
|
+
useEffect(() => {
|
|
9077
|
+
const runtime = this.chartRuntime;
|
|
9078
|
+
if (!deepEquals(runtime, this.currentRuntime, "ignoreFunctions")) {
|
|
9079
|
+
this.currentRuntime = runtime;
|
|
9080
|
+
this.updateChartJs(deepCopy(runtime));
|
|
9081
|
+
}
|
|
9068
9082
|
});
|
|
9069
|
-
useEffect(() => this.updateChartJs(this.chartRuntime), () => [this.chartRuntime]);
|
|
9070
9083
|
}
|
|
9071
9084
|
createChart(chartData) {
|
|
9072
9085
|
const canvas = this.canvas.el;
|
|
@@ -9088,8 +9101,7 @@ class ChartJsComponent extends Component {
|
|
|
9088
9101
|
this.chart.config.options.plugins.tooltip = chartData.options.plugins.tooltip;
|
|
9089
9102
|
this.chart.config.options.plugins.legend = chartData.options.plugins.legend;
|
|
9090
9103
|
this.chart.config.options.scales = chartData.options?.scales;
|
|
9091
|
-
|
|
9092
|
-
this.chart.update("active");
|
|
9104
|
+
this.chart.update();
|
|
9093
9105
|
}
|
|
9094
9106
|
}
|
|
9095
9107
|
|
|
@@ -19452,7 +19464,7 @@ function truncateLabel(label) {
|
|
|
19452
19464
|
/**
|
|
19453
19465
|
* Get a default chart js configuration
|
|
19454
19466
|
*/
|
|
19455
|
-
function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale }) {
|
|
19467
|
+
function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale, truncateLabels }) {
|
|
19456
19468
|
const options = {
|
|
19457
19469
|
// https://www.chartjs.org/docs/latest/general/responsive.html
|
|
19458
19470
|
responsive: true,
|
|
@@ -19499,7 +19511,7 @@ function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale })
|
|
|
19499
19511
|
type: chart.type,
|
|
19500
19512
|
options,
|
|
19501
19513
|
data: {
|
|
19502
|
-
labels: labels.map(truncateLabel),
|
|
19514
|
+
labels: truncateLabels ? labels.map(truncateLabel) : labels,
|
|
19503
19515
|
datasets: [],
|
|
19504
19516
|
},
|
|
19505
19517
|
platform: undefined,
|
|
@@ -20265,9 +20277,9 @@ function isLuxonTimeAdapterInstalled() {
|
|
|
20265
20277
|
}
|
|
20266
20278
|
return isInstalled;
|
|
20267
20279
|
}
|
|
20268
|
-
function getLineOrScatterConfiguration(chart, labels,
|
|
20280
|
+
function getLineOrScatterConfiguration(chart, labels, options) {
|
|
20269
20281
|
const fontColor = chartFontColor(chart.background);
|
|
20270
|
-
const config = getDefaultChartJsRuntime(chart, labels, fontColor,
|
|
20282
|
+
const config = getDefaultChartJsRuntime(chart, labels, fontColor, options);
|
|
20271
20283
|
const legend = {
|
|
20272
20284
|
labels: {
|
|
20273
20285
|
color: fontColor,
|
|
@@ -20310,7 +20322,7 @@ function getLineOrScatterConfiguration(chart, labels, localeFormat) {
|
|
|
20310
20322
|
value = Number(value);
|
|
20311
20323
|
if (isNaN(value))
|
|
20312
20324
|
return value;
|
|
20313
|
-
const { locale, format } =
|
|
20325
|
+
const { locale, format } = options;
|
|
20314
20326
|
return formatValue(value, {
|
|
20315
20327
|
locale,
|
|
20316
20328
|
format: !format && Math.abs(value) >= 1000 ? "#,##" : format,
|
|
@@ -20343,9 +20355,10 @@ function createLineOrScatterChartRuntime(chart, getters) {
|
|
|
20343
20355
|
({ labels, dataSetsValues } = aggregateDataForLabels(labels, dataSetsValues));
|
|
20344
20356
|
}
|
|
20345
20357
|
const locale = getters.getLocale();
|
|
20358
|
+
const truncateLabels = axisType === "category";
|
|
20346
20359
|
const dataSetFormat = getChartDatasetFormat(getters, chart.dataSets);
|
|
20347
|
-
const
|
|
20348
|
-
const config = getLineOrScatterConfiguration(chart, labels,
|
|
20360
|
+
const options = { format: dataSetFormat, locale, truncateLabels };
|
|
20361
|
+
const config = getLineOrScatterConfiguration(chart, labels, options);
|
|
20349
20362
|
const labelFormat = getChartLabelFormat(getters, chart.labelRange);
|
|
20350
20363
|
if (axisType === "time") {
|
|
20351
20364
|
const axis = {
|
|
@@ -32899,7 +32912,8 @@ class DataValidationOverlay extends Component {
|
|
|
32899
32912
|
get checkBoxCellPositions() {
|
|
32900
32913
|
return this.env.model.getters
|
|
32901
32914
|
.getVisibleCellPositions()
|
|
32902
|
-
.filter(this.env.model.getters.isCellValidCheckbox)
|
|
32915
|
+
.filter((position) => this.env.model.getters.isCellValidCheckbox(position) &&
|
|
32916
|
+
!this.env.model.getters.isFilterHeader(position));
|
|
32903
32917
|
}
|
|
32904
32918
|
get listIconsCellPositions() {
|
|
32905
32919
|
if (this.env.model.getters.isReadonly()) {
|
|
@@ -32907,7 +32921,8 @@ class DataValidationOverlay extends Component {
|
|
|
32907
32921
|
}
|
|
32908
32922
|
return this.env.model.getters
|
|
32909
32923
|
.getVisibleCellPositions()
|
|
32910
|
-
.filter(this.env.model.getters.cellHasListDataValidationIcon)
|
|
32924
|
+
.filter((position) => this.env.model.getters.cellHasListDataValidationIcon(position) &&
|
|
32925
|
+
!this.env.model.getters.isFilterHeader(position));
|
|
32911
32926
|
}
|
|
32912
32927
|
}
|
|
32913
32928
|
|
|
@@ -47927,7 +47942,7 @@ class EvaluationPlugin extends UIPlugin {
|
|
|
47927
47942
|
? getItemId(newFormat, data.formats)
|
|
47928
47943
|
: exportedCellData.format;
|
|
47929
47944
|
let content;
|
|
47930
|
-
if (isFormula && formulaCell instanceof FormulaCellWithDependencies) {
|
|
47945
|
+
if (isExported && isFormula && formulaCell instanceof FormulaCellWithDependencies) {
|
|
47931
47946
|
content = formulaCell.contentWithFixedReferences;
|
|
47932
47947
|
}
|
|
47933
47948
|
else {
|
|
@@ -60557,6 +60572,6 @@ const constants = {
|
|
|
60557
60572
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, 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 };
|
|
60558
60573
|
|
|
60559
60574
|
|
|
60560
|
-
__info__.version = "17.2.
|
|
60561
|
-
__info__.date = "2024-
|
|
60562
|
-
__info__.hash = "
|
|
60575
|
+
__info__.version = "17.2.6";
|
|
60576
|
+
__info__.date = "2024-05-07T10:41:20.332Z";
|
|
60577
|
+
__info__.hash = "a4f800c";
|