@odoo/o-spreadsheet 17.0.20 → 17.0.22
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.
|
@@ -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-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.22
|
|
6
|
+
* @date 2024-05-15T09:18:36.212Z
|
|
7
|
+
* @hash 1f90749
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -642,7 +642,7 @@ function getAddHeaderStartIndex(position, base) {
|
|
|
642
642
|
/**
|
|
643
643
|
* Compares two objects.
|
|
644
644
|
*/
|
|
645
|
-
function deepEquals(o1, o2) {
|
|
645
|
+
function deepEquals(o1, o2, ignoreFunctions) {
|
|
646
646
|
if (o1 === o2)
|
|
647
647
|
return true;
|
|
648
648
|
if ((o1 && !o2) || (o2 && !o1))
|
|
@@ -658,13 +658,16 @@ function deepEquals(o1, o2) {
|
|
|
658
658
|
}
|
|
659
659
|
}
|
|
660
660
|
for (const key in o1) {
|
|
661
|
-
|
|
661
|
+
const typeOfO1Key = typeof o1[key];
|
|
662
|
+
if (typeOfO1Key !== typeof o2[key])
|
|
662
663
|
return false;
|
|
663
|
-
if (
|
|
664
|
-
if (!deepEquals(o1[key], o2[key]))
|
|
664
|
+
if (typeOfO1Key === "object") {
|
|
665
|
+
if (!deepEquals(o1[key], o2[key], ignoreFunctions))
|
|
665
666
|
return false;
|
|
666
667
|
}
|
|
667
668
|
else {
|
|
669
|
+
if (ignoreFunctions && typeOfO1Key === "function")
|
|
670
|
+
return true;
|
|
668
671
|
if (o1[key] !== o2[key])
|
|
669
672
|
return false;
|
|
670
673
|
}
|
|
@@ -3559,21 +3562,22 @@ function toZoneWithoutBoundaryChanges(xc) {
|
|
|
3559
3562
|
xc = xc.split("!").at(-1);
|
|
3560
3563
|
}
|
|
3561
3564
|
if (xc.includes("$")) {
|
|
3562
|
-
xc = xc.
|
|
3565
|
+
xc = xc.replaceAll("$", "");
|
|
3563
3566
|
}
|
|
3564
|
-
let
|
|
3567
|
+
let firstRangePart = "";
|
|
3568
|
+
let secondRangePart;
|
|
3565
3569
|
if (xc.includes(":")) {
|
|
3566
|
-
|
|
3570
|
+
[firstRangePart, secondRangePart] = xc.split(":");
|
|
3571
|
+
firstRangePart = firstRangePart.trim();
|
|
3572
|
+
secondRangePart = secondRangePart.trim();
|
|
3567
3573
|
}
|
|
3568
3574
|
else {
|
|
3569
|
-
|
|
3575
|
+
firstRangePart = xc.trim();
|
|
3570
3576
|
}
|
|
3571
3577
|
let top, bottom, left, right;
|
|
3572
3578
|
let fullCol = false;
|
|
3573
3579
|
let fullRow = false;
|
|
3574
3580
|
let hasHeader = false;
|
|
3575
|
-
const firstRangePart = ranges[0];
|
|
3576
|
-
const secondRangePart = ranges[1] && ranges[1];
|
|
3577
3581
|
if (isColReference(firstRangePart)) {
|
|
3578
3582
|
left = right = lettersToNumber(firstRangePart);
|
|
3579
3583
|
top = bottom = 0;
|
|
@@ -3590,7 +3594,7 @@ function toZoneWithoutBoundaryChanges(xc) {
|
|
|
3590
3594
|
top = bottom = c.row;
|
|
3591
3595
|
hasHeader = true;
|
|
3592
3596
|
}
|
|
3593
|
-
if (
|
|
3597
|
+
if (secondRangePart) {
|
|
3594
3598
|
if (isColReference(secondRangePart)) {
|
|
3595
3599
|
right = lettersToNumber(secondRangePart);
|
|
3596
3600
|
fullCol = true;
|
|
@@ -4759,6 +4763,7 @@ class ChartJsComponent extends owl.Component {
|
|
|
4759
4763
|
static template = "o-spreadsheet-ChartJsComponent";
|
|
4760
4764
|
canvas = owl.useRef("graphContainer");
|
|
4761
4765
|
chart;
|
|
4766
|
+
currentRuntime;
|
|
4762
4767
|
get background() {
|
|
4763
4768
|
return this.chartRuntime.background;
|
|
4764
4769
|
}
|
|
@@ -4775,9 +4780,17 @@ class ChartJsComponent extends owl.Component {
|
|
|
4775
4780
|
setup() {
|
|
4776
4781
|
owl.onMounted(() => {
|
|
4777
4782
|
const runtime = this.chartRuntime;
|
|
4778
|
-
this.
|
|
4783
|
+
this.currentRuntime = runtime;
|
|
4784
|
+
// Note: chartJS modify the runtime in place, so it's important to give it a copy
|
|
4785
|
+
this.createChart(deepCopy(runtime.chartJsConfig));
|
|
4786
|
+
});
|
|
4787
|
+
owl.useEffect(() => {
|
|
4788
|
+
const runtime = this.chartRuntime;
|
|
4789
|
+
if (!deepEquals(runtime, this.currentRuntime, "ignoreFunctions")) {
|
|
4790
|
+
this.currentRuntime = runtime;
|
|
4791
|
+
this.updateChartJs(deepCopy(runtime));
|
|
4792
|
+
}
|
|
4779
4793
|
});
|
|
4780
|
-
owl.useEffect(() => this.updateChartJs(this.chartRuntime), () => [this.chartRuntime]);
|
|
4781
4794
|
}
|
|
4782
4795
|
createChart(chartData) {
|
|
4783
4796
|
const canvas = this.canvas.el;
|
|
@@ -4805,8 +4818,7 @@ class ChartJsComponent extends owl.Component {
|
|
|
4805
4818
|
this.chart.config.options.plugins.tooltip = chartData.options.plugins.tooltip;
|
|
4806
4819
|
this.chart.config.options.plugins.legend = chartData.options.plugins.legend;
|
|
4807
4820
|
this.chart.config.options.scales = chartData.options?.scales;
|
|
4808
|
-
|
|
4809
|
-
this.chart.update("active");
|
|
4821
|
+
this.chart.update();
|
|
4810
4822
|
}
|
|
4811
4823
|
}
|
|
4812
4824
|
ChartJsComponent.props = {
|
|
@@ -7500,7 +7512,7 @@ function tokenizeString(chars) {
|
|
|
7500
7512
|
}
|
|
7501
7513
|
return null;
|
|
7502
7514
|
}
|
|
7503
|
-
const
|
|
7515
|
+
const SYMBOL_CHARS = new Set("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.!$");
|
|
7504
7516
|
/**
|
|
7505
7517
|
* A "Symbol" is just basically any word-like element that can appear in a
|
|
7506
7518
|
* formula, which is not a string. So:
|
|
@@ -7540,11 +7552,8 @@ function tokenizeSymbol(chars) {
|
|
|
7540
7552
|
};
|
|
7541
7553
|
}
|
|
7542
7554
|
}
|
|
7543
|
-
|
|
7544
|
-
|
|
7545
|
-
const value = match[0];
|
|
7546
|
-
result += value;
|
|
7547
|
-
chars.advanceBy(value.length);
|
|
7555
|
+
while (chars.current && SYMBOL_CHARS.has(chars.current)) {
|
|
7556
|
+
result += chars.shift();
|
|
7548
7557
|
}
|
|
7549
7558
|
if (result.length) {
|
|
7550
7559
|
const value = result;
|
|
@@ -8375,7 +8384,7 @@ function truncateLabel(label) {
|
|
|
8375
8384
|
/**
|
|
8376
8385
|
* Get a default chart js configuration
|
|
8377
8386
|
*/
|
|
8378
|
-
function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale }) {
|
|
8387
|
+
function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale, truncateLabels }) {
|
|
8379
8388
|
const options = {
|
|
8380
8389
|
// https://www.chartjs.org/docs/latest/general/responsive.html
|
|
8381
8390
|
responsive: true,
|
|
@@ -8422,7 +8431,7 @@ function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale })
|
|
|
8422
8431
|
type: chart.type,
|
|
8423
8432
|
options,
|
|
8424
8433
|
data: {
|
|
8425
|
-
labels: labels.map(truncateLabel),
|
|
8434
|
+
labels: truncateLabels ? labels.map(truncateLabel) : labels,
|
|
8426
8435
|
datasets: [],
|
|
8427
8436
|
},
|
|
8428
8437
|
plugins: [],
|
|
@@ -9304,9 +9313,9 @@ function canBeLinearChart(labelRange, getters) {
|
|
|
9304
9313
|
}
|
|
9305
9314
|
return true;
|
|
9306
9315
|
}
|
|
9307
|
-
function getLineConfiguration(chart, labels,
|
|
9316
|
+
function getLineConfiguration(chart, labels, options) {
|
|
9308
9317
|
const fontColor = chartFontColor(chart.background);
|
|
9309
|
-
const config = getDefaultChartJsRuntime(chart, labels, fontColor,
|
|
9318
|
+
const config = getDefaultChartJsRuntime(chart, labels, fontColor, options);
|
|
9310
9319
|
const legend = {
|
|
9311
9320
|
labels: {
|
|
9312
9321
|
color: fontColor,
|
|
@@ -9349,7 +9358,7 @@ function getLineConfiguration(chart, labels, localeFormat) {
|
|
|
9349
9358
|
value = Number(value);
|
|
9350
9359
|
if (isNaN(value))
|
|
9351
9360
|
return value;
|
|
9352
|
-
const { locale, format } =
|
|
9361
|
+
const { locale, format } = options;
|
|
9353
9362
|
return formatValue(value, {
|
|
9354
9363
|
locale,
|
|
9355
9364
|
format: !format && Math.abs(value) >= 1000 ? "#,##" : format,
|
|
@@ -9382,9 +9391,10 @@ function createLineChartRuntime(chart, getters) {
|
|
|
9382
9391
|
({ labels, dataSetsValues } = aggregateDataForLabels(labels, dataSetsValues));
|
|
9383
9392
|
}
|
|
9384
9393
|
const locale = getters.getLocale();
|
|
9394
|
+
const truncateLabels = axisType === "category";
|
|
9385
9395
|
const dataSetFormat = getChartDatasetFormat(getters, chart.dataSets);
|
|
9386
|
-
const
|
|
9387
|
-
const config = getLineConfiguration(chart, labels,
|
|
9396
|
+
const options = { format: dataSetFormat, locale, truncateLabels };
|
|
9397
|
+
const config = getLineConfiguration(chart, labels, options);
|
|
9388
9398
|
const labelFormat = getChartLabelFormat(getters, chart.labelRange);
|
|
9389
9399
|
if (axisType === "time") {
|
|
9390
9400
|
const axis = {
|
|
@@ -27544,7 +27554,8 @@ class DataValidationOverlay extends owl.Component {
|
|
|
27544
27554
|
get checkBoxCellPositions() {
|
|
27545
27555
|
return this.env.model.getters
|
|
27546
27556
|
.getVisibleCellPositions()
|
|
27547
|
-
.filter(this.env.model.getters.isCellValidCheckbox)
|
|
27557
|
+
.filter((position) => this.env.model.getters.isCellValidCheckbox(position) &&
|
|
27558
|
+
!this.env.model.getters.isFilterHeader(position));
|
|
27548
27559
|
}
|
|
27549
27560
|
get listIconsCellPositions() {
|
|
27550
27561
|
if (this.env.model.getters.isReadonly()) {
|
|
@@ -27552,7 +27563,8 @@ class DataValidationOverlay extends owl.Component {
|
|
|
27552
27563
|
}
|
|
27553
27564
|
return this.env.model.getters
|
|
27554
27565
|
.getVisibleCellPositions()
|
|
27555
|
-
.filter(this.env.model.getters.cellHasListDataValidationIcon)
|
|
27566
|
+
.filter((position) => this.env.model.getters.cellHasListDataValidationIcon(position) &&
|
|
27567
|
+
!this.env.model.getters.isFilterHeader(position));
|
|
27556
27568
|
}
|
|
27557
27569
|
}
|
|
27558
27570
|
DataValidationOverlay.props = {};
|
|
@@ -33567,7 +33579,7 @@ const machine = {
|
|
|
33567
33579
|
function matchReference(tokens) {
|
|
33568
33580
|
let head = 0;
|
|
33569
33581
|
let transitions = machine[State.LeftRef];
|
|
33570
|
-
|
|
33582
|
+
let matchedTokens = "";
|
|
33571
33583
|
while (transitions !== undefined) {
|
|
33572
33584
|
const token = tokens[head++];
|
|
33573
33585
|
if (!token) {
|
|
@@ -33579,15 +33591,15 @@ function matchReference(tokens) {
|
|
|
33579
33591
|
case undefined:
|
|
33580
33592
|
return null;
|
|
33581
33593
|
case State.Found:
|
|
33582
|
-
matchedTokens.
|
|
33594
|
+
matchedTokens += token.value;
|
|
33583
33595
|
tokens.splice(0, head);
|
|
33584
33596
|
return {
|
|
33585
33597
|
type: "REFERENCE",
|
|
33586
|
-
value:
|
|
33598
|
+
value: matchedTokens,
|
|
33587
33599
|
};
|
|
33588
33600
|
default:
|
|
33589
33601
|
transitions = machine[nextState];
|
|
33590
|
-
matchedTokens.
|
|
33602
|
+
matchedTokens += token.value;
|
|
33591
33603
|
break;
|
|
33592
33604
|
}
|
|
33593
33605
|
}
|
|
@@ -42019,7 +42031,7 @@ class EvaluationPlugin extends UIPlugin {
|
|
|
42019
42031
|
? getItemId(newFormat, data.formats)
|
|
42020
42032
|
: exportedCellData.format;
|
|
42021
42033
|
let content;
|
|
42022
|
-
if (isFormula && formulaCell
|
|
42034
|
+
if (isExported && isFormula && formulaCell?.compiledFormula.dependencies.length) {
|
|
42023
42035
|
content = this.getters.getFormulaCellContent(exportedSheetData.id, formulaCell.compiledFormula, formulaCell.compiledFormula.dependencies, true);
|
|
42024
42036
|
}
|
|
42025
42037
|
else {
|
|
@@ -57392,6 +57404,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
57392
57404
|
exports.tokenize = tokenize;
|
|
57393
57405
|
|
|
57394
57406
|
|
|
57395
|
-
__info__.version = "17.0.
|
|
57396
|
-
__info__.date = "2024-
|
|
57397
|
-
__info__.hash = "
|
|
57407
|
+
__info__.version = "17.0.22";
|
|
57408
|
+
__info__.date = "2024-05-15T09:18:36.212Z";
|
|
57409
|
+
__info__.hash = "1f90749";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -5952,6 +5952,7 @@ declare class ChartJsComponent extends Component<Props$B, SpreadsheetChildEnv> {
|
|
|
5952
5952
|
static template: string;
|
|
5953
5953
|
private canvas;
|
|
5954
5954
|
private chart?;
|
|
5955
|
+
private currentRuntime;
|
|
5955
5956
|
get background(): string;
|
|
5956
5957
|
get canvasStyle(): string;
|
|
5957
5958
|
get chartRuntime(): ChartJSRuntime;
|
|
@@ -7793,7 +7794,9 @@ declare function chartFontColor(backgroundColor: Color | undefined): Color;
|
|
|
7793
7794
|
/**
|
|
7794
7795
|
* Get a default chart js configuration
|
|
7795
7796
|
*/
|
|
7796
|
-
declare function getDefaultChartJsRuntime(chart: AbstractChart, labels: string[], fontColor: Color, { format, locale }: LocaleFormat
|
|
7797
|
+
declare function getDefaultChartJsRuntime(chart: AbstractChart, labels: string[], fontColor: Color, { format, locale, truncateLabels }: LocaleFormat & {
|
|
7798
|
+
truncateLabels?: boolean;
|
|
7799
|
+
}): Required<ChartConfiguration>;
|
|
7797
7800
|
/** See https://www.chartjs.org/docs/latest/charts/area.html#filling-modes */
|
|
7798
7801
|
declare function getFillingMode(index: number): "origin" | number;
|
|
7799
7802
|
|
|
@@ -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-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.22
|
|
6
|
+
* @date 2024-05-15T09:18:36.212Z
|
|
7
|
+
* @hash 1f90749
|
|
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';
|
|
@@ -640,7 +640,7 @@ function getAddHeaderStartIndex(position, base) {
|
|
|
640
640
|
/**
|
|
641
641
|
* Compares two objects.
|
|
642
642
|
*/
|
|
643
|
-
function deepEquals(o1, o2) {
|
|
643
|
+
function deepEquals(o1, o2, ignoreFunctions) {
|
|
644
644
|
if (o1 === o2)
|
|
645
645
|
return true;
|
|
646
646
|
if ((o1 && !o2) || (o2 && !o1))
|
|
@@ -656,13 +656,16 @@ function deepEquals(o1, o2) {
|
|
|
656
656
|
}
|
|
657
657
|
}
|
|
658
658
|
for (const key in o1) {
|
|
659
|
-
|
|
659
|
+
const typeOfO1Key = typeof o1[key];
|
|
660
|
+
if (typeOfO1Key !== typeof o2[key])
|
|
660
661
|
return false;
|
|
661
|
-
if (
|
|
662
|
-
if (!deepEquals(o1[key], o2[key]))
|
|
662
|
+
if (typeOfO1Key === "object") {
|
|
663
|
+
if (!deepEquals(o1[key], o2[key], ignoreFunctions))
|
|
663
664
|
return false;
|
|
664
665
|
}
|
|
665
666
|
else {
|
|
667
|
+
if (ignoreFunctions && typeOfO1Key === "function")
|
|
668
|
+
return true;
|
|
666
669
|
if (o1[key] !== o2[key])
|
|
667
670
|
return false;
|
|
668
671
|
}
|
|
@@ -3557,21 +3560,22 @@ function toZoneWithoutBoundaryChanges(xc) {
|
|
|
3557
3560
|
xc = xc.split("!").at(-1);
|
|
3558
3561
|
}
|
|
3559
3562
|
if (xc.includes("$")) {
|
|
3560
|
-
xc = xc.
|
|
3563
|
+
xc = xc.replaceAll("$", "");
|
|
3561
3564
|
}
|
|
3562
|
-
let
|
|
3565
|
+
let firstRangePart = "";
|
|
3566
|
+
let secondRangePart;
|
|
3563
3567
|
if (xc.includes(":")) {
|
|
3564
|
-
|
|
3568
|
+
[firstRangePart, secondRangePart] = xc.split(":");
|
|
3569
|
+
firstRangePart = firstRangePart.trim();
|
|
3570
|
+
secondRangePart = secondRangePart.trim();
|
|
3565
3571
|
}
|
|
3566
3572
|
else {
|
|
3567
|
-
|
|
3573
|
+
firstRangePart = xc.trim();
|
|
3568
3574
|
}
|
|
3569
3575
|
let top, bottom, left, right;
|
|
3570
3576
|
let fullCol = false;
|
|
3571
3577
|
let fullRow = false;
|
|
3572
3578
|
let hasHeader = false;
|
|
3573
|
-
const firstRangePart = ranges[0];
|
|
3574
|
-
const secondRangePart = ranges[1] && ranges[1];
|
|
3575
3579
|
if (isColReference(firstRangePart)) {
|
|
3576
3580
|
left = right = lettersToNumber(firstRangePart);
|
|
3577
3581
|
top = bottom = 0;
|
|
@@ -3588,7 +3592,7 @@ function toZoneWithoutBoundaryChanges(xc) {
|
|
|
3588
3592
|
top = bottom = c.row;
|
|
3589
3593
|
hasHeader = true;
|
|
3590
3594
|
}
|
|
3591
|
-
if (
|
|
3595
|
+
if (secondRangePart) {
|
|
3592
3596
|
if (isColReference(secondRangePart)) {
|
|
3593
3597
|
right = lettersToNumber(secondRangePart);
|
|
3594
3598
|
fullCol = true;
|
|
@@ -4757,6 +4761,7 @@ class ChartJsComponent extends Component {
|
|
|
4757
4761
|
static template = "o-spreadsheet-ChartJsComponent";
|
|
4758
4762
|
canvas = useRef("graphContainer");
|
|
4759
4763
|
chart;
|
|
4764
|
+
currentRuntime;
|
|
4760
4765
|
get background() {
|
|
4761
4766
|
return this.chartRuntime.background;
|
|
4762
4767
|
}
|
|
@@ -4773,9 +4778,17 @@ class ChartJsComponent extends Component {
|
|
|
4773
4778
|
setup() {
|
|
4774
4779
|
onMounted(() => {
|
|
4775
4780
|
const runtime = this.chartRuntime;
|
|
4776
|
-
this.
|
|
4781
|
+
this.currentRuntime = runtime;
|
|
4782
|
+
// Note: chartJS modify the runtime in place, so it's important to give it a copy
|
|
4783
|
+
this.createChart(deepCopy(runtime.chartJsConfig));
|
|
4784
|
+
});
|
|
4785
|
+
useEffect(() => {
|
|
4786
|
+
const runtime = this.chartRuntime;
|
|
4787
|
+
if (!deepEquals(runtime, this.currentRuntime, "ignoreFunctions")) {
|
|
4788
|
+
this.currentRuntime = runtime;
|
|
4789
|
+
this.updateChartJs(deepCopy(runtime));
|
|
4790
|
+
}
|
|
4777
4791
|
});
|
|
4778
|
-
useEffect(() => this.updateChartJs(this.chartRuntime), () => [this.chartRuntime]);
|
|
4779
4792
|
}
|
|
4780
4793
|
createChart(chartData) {
|
|
4781
4794
|
const canvas = this.canvas.el;
|
|
@@ -4803,8 +4816,7 @@ class ChartJsComponent extends Component {
|
|
|
4803
4816
|
this.chart.config.options.plugins.tooltip = chartData.options.plugins.tooltip;
|
|
4804
4817
|
this.chart.config.options.plugins.legend = chartData.options.plugins.legend;
|
|
4805
4818
|
this.chart.config.options.scales = chartData.options?.scales;
|
|
4806
|
-
|
|
4807
|
-
this.chart.update("active");
|
|
4819
|
+
this.chart.update();
|
|
4808
4820
|
}
|
|
4809
4821
|
}
|
|
4810
4822
|
ChartJsComponent.props = {
|
|
@@ -7498,7 +7510,7 @@ function tokenizeString(chars) {
|
|
|
7498
7510
|
}
|
|
7499
7511
|
return null;
|
|
7500
7512
|
}
|
|
7501
|
-
const
|
|
7513
|
+
const SYMBOL_CHARS = new Set("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.!$");
|
|
7502
7514
|
/**
|
|
7503
7515
|
* A "Symbol" is just basically any word-like element that can appear in a
|
|
7504
7516
|
* formula, which is not a string. So:
|
|
@@ -7538,11 +7550,8 @@ function tokenizeSymbol(chars) {
|
|
|
7538
7550
|
};
|
|
7539
7551
|
}
|
|
7540
7552
|
}
|
|
7541
|
-
|
|
7542
|
-
|
|
7543
|
-
const value = match[0];
|
|
7544
|
-
result += value;
|
|
7545
|
-
chars.advanceBy(value.length);
|
|
7553
|
+
while (chars.current && SYMBOL_CHARS.has(chars.current)) {
|
|
7554
|
+
result += chars.shift();
|
|
7546
7555
|
}
|
|
7547
7556
|
if (result.length) {
|
|
7548
7557
|
const value = result;
|
|
@@ -8373,7 +8382,7 @@ function truncateLabel(label) {
|
|
|
8373
8382
|
/**
|
|
8374
8383
|
* Get a default chart js configuration
|
|
8375
8384
|
*/
|
|
8376
|
-
function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale }) {
|
|
8385
|
+
function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale, truncateLabels }) {
|
|
8377
8386
|
const options = {
|
|
8378
8387
|
// https://www.chartjs.org/docs/latest/general/responsive.html
|
|
8379
8388
|
responsive: true,
|
|
@@ -8420,7 +8429,7 @@ function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale })
|
|
|
8420
8429
|
type: chart.type,
|
|
8421
8430
|
options,
|
|
8422
8431
|
data: {
|
|
8423
|
-
labels: labels.map(truncateLabel),
|
|
8432
|
+
labels: truncateLabels ? labels.map(truncateLabel) : labels,
|
|
8424
8433
|
datasets: [],
|
|
8425
8434
|
},
|
|
8426
8435
|
plugins: [],
|
|
@@ -9302,9 +9311,9 @@ function canBeLinearChart(labelRange, getters) {
|
|
|
9302
9311
|
}
|
|
9303
9312
|
return true;
|
|
9304
9313
|
}
|
|
9305
|
-
function getLineConfiguration(chart, labels,
|
|
9314
|
+
function getLineConfiguration(chart, labels, options) {
|
|
9306
9315
|
const fontColor = chartFontColor(chart.background);
|
|
9307
|
-
const config = getDefaultChartJsRuntime(chart, labels, fontColor,
|
|
9316
|
+
const config = getDefaultChartJsRuntime(chart, labels, fontColor, options);
|
|
9308
9317
|
const legend = {
|
|
9309
9318
|
labels: {
|
|
9310
9319
|
color: fontColor,
|
|
@@ -9347,7 +9356,7 @@ function getLineConfiguration(chart, labels, localeFormat) {
|
|
|
9347
9356
|
value = Number(value);
|
|
9348
9357
|
if (isNaN(value))
|
|
9349
9358
|
return value;
|
|
9350
|
-
const { locale, format } =
|
|
9359
|
+
const { locale, format } = options;
|
|
9351
9360
|
return formatValue(value, {
|
|
9352
9361
|
locale,
|
|
9353
9362
|
format: !format && Math.abs(value) >= 1000 ? "#,##" : format,
|
|
@@ -9380,9 +9389,10 @@ function createLineChartRuntime(chart, getters) {
|
|
|
9380
9389
|
({ labels, dataSetsValues } = aggregateDataForLabels(labels, dataSetsValues));
|
|
9381
9390
|
}
|
|
9382
9391
|
const locale = getters.getLocale();
|
|
9392
|
+
const truncateLabels = axisType === "category";
|
|
9383
9393
|
const dataSetFormat = getChartDatasetFormat(getters, chart.dataSets);
|
|
9384
|
-
const
|
|
9385
|
-
const config = getLineConfiguration(chart, labels,
|
|
9394
|
+
const options = { format: dataSetFormat, locale, truncateLabels };
|
|
9395
|
+
const config = getLineConfiguration(chart, labels, options);
|
|
9386
9396
|
const labelFormat = getChartLabelFormat(getters, chart.labelRange);
|
|
9387
9397
|
if (axisType === "time") {
|
|
9388
9398
|
const axis = {
|
|
@@ -27542,7 +27552,8 @@ class DataValidationOverlay extends Component {
|
|
|
27542
27552
|
get checkBoxCellPositions() {
|
|
27543
27553
|
return this.env.model.getters
|
|
27544
27554
|
.getVisibleCellPositions()
|
|
27545
|
-
.filter(this.env.model.getters.isCellValidCheckbox)
|
|
27555
|
+
.filter((position) => this.env.model.getters.isCellValidCheckbox(position) &&
|
|
27556
|
+
!this.env.model.getters.isFilterHeader(position));
|
|
27546
27557
|
}
|
|
27547
27558
|
get listIconsCellPositions() {
|
|
27548
27559
|
if (this.env.model.getters.isReadonly()) {
|
|
@@ -27550,7 +27561,8 @@ class DataValidationOverlay extends Component {
|
|
|
27550
27561
|
}
|
|
27551
27562
|
return this.env.model.getters
|
|
27552
27563
|
.getVisibleCellPositions()
|
|
27553
|
-
.filter(this.env.model.getters.cellHasListDataValidationIcon)
|
|
27564
|
+
.filter((position) => this.env.model.getters.cellHasListDataValidationIcon(position) &&
|
|
27565
|
+
!this.env.model.getters.isFilterHeader(position));
|
|
27554
27566
|
}
|
|
27555
27567
|
}
|
|
27556
27568
|
DataValidationOverlay.props = {};
|
|
@@ -33565,7 +33577,7 @@ const machine = {
|
|
|
33565
33577
|
function matchReference(tokens) {
|
|
33566
33578
|
let head = 0;
|
|
33567
33579
|
let transitions = machine[State.LeftRef];
|
|
33568
|
-
|
|
33580
|
+
let matchedTokens = "";
|
|
33569
33581
|
while (transitions !== undefined) {
|
|
33570
33582
|
const token = tokens[head++];
|
|
33571
33583
|
if (!token) {
|
|
@@ -33577,15 +33589,15 @@ function matchReference(tokens) {
|
|
|
33577
33589
|
case undefined:
|
|
33578
33590
|
return null;
|
|
33579
33591
|
case State.Found:
|
|
33580
|
-
matchedTokens.
|
|
33592
|
+
matchedTokens += token.value;
|
|
33581
33593
|
tokens.splice(0, head);
|
|
33582
33594
|
return {
|
|
33583
33595
|
type: "REFERENCE",
|
|
33584
|
-
value:
|
|
33596
|
+
value: matchedTokens,
|
|
33585
33597
|
};
|
|
33586
33598
|
default:
|
|
33587
33599
|
transitions = machine[nextState];
|
|
33588
|
-
matchedTokens.
|
|
33600
|
+
matchedTokens += token.value;
|
|
33589
33601
|
break;
|
|
33590
33602
|
}
|
|
33591
33603
|
}
|
|
@@ -42017,7 +42029,7 @@ class EvaluationPlugin extends UIPlugin {
|
|
|
42017
42029
|
? getItemId(newFormat, data.formats)
|
|
42018
42030
|
: exportedCellData.format;
|
|
42019
42031
|
let content;
|
|
42020
|
-
if (isFormula && formulaCell
|
|
42032
|
+
if (isExported && isFormula && formulaCell?.compiledFormula.dependencies.length) {
|
|
42021
42033
|
content = this.getters.getFormulaCellContent(exportedSheetData.id, formulaCell.compiledFormula, formulaCell.compiledFormula.dependencies, true);
|
|
42022
42034
|
}
|
|
42023
42035
|
else {
|
|
@@ -57355,6 +57367,6 @@ const constants = {
|
|
|
57355
57367
|
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 };
|
|
57356
57368
|
|
|
57357
57369
|
|
|
57358
|
-
__info__.version = "17.0.
|
|
57359
|
-
__info__.date = "2024-
|
|
57360
|
-
__info__.hash = "
|
|
57370
|
+
__info__.version = "17.0.22";
|
|
57371
|
+
__info__.date = "2024-05-15T09:18:36.212Z";
|
|
57372
|
+
__info__.hash = "1f90749";
|