@odoo/o-spreadsheet 18.2.0 → 18.2.1
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 +120 -68
- package/dist/o-spreadsheet.d.ts +20 -11
- package/dist/o-spreadsheet.esm.js +120 -68
- package/dist/o-spreadsheet.iife.js +120 -68
- package/dist/o-spreadsheet.iife.min.js +7 -7
- package/dist/o_spreadsheet.xml +3 -3
- package/package.json +2 -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 18.2.
|
|
6
|
-
* @date 2025-02-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.2.1
|
|
6
|
+
* @date 2025-02-25T06:03:13.262Z
|
|
7
|
+
* @hash 3b4b5c9
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -4459,7 +4459,7 @@
|
|
|
4459
4459
|
* @param reverseSearch if true, search in the array starting from the end.
|
|
4460
4460
|
|
|
4461
4461
|
*/
|
|
4462
|
-
function linearSearch(data, target, mode, numberOfValues, getValueInData, reverseSearch = false) {
|
|
4462
|
+
function linearSearch(data, target, mode, numberOfValues, getValueInData, lookupCaches, reverseSearch = false) {
|
|
4463
4463
|
if (target === undefined || target.value === null) {
|
|
4464
4464
|
return -1;
|
|
4465
4465
|
}
|
|
@@ -4468,17 +4468,48 @@
|
|
|
4468
4468
|
}
|
|
4469
4469
|
const _target = normalizeValue(target.value);
|
|
4470
4470
|
const getValue = reverseSearch
|
|
4471
|
-
? (data, i) => getValueInData(data, numberOfValues - i - 1)
|
|
4472
|
-
: getValueInData;
|
|
4471
|
+
? (data, i) => normalizeValue(getValueInData(data, numberOfValues - i - 1))
|
|
4472
|
+
: (data, i) => normalizeValue(getValueInData(data, i));
|
|
4473
|
+
// first check if the target is in the cache
|
|
4474
|
+
const isNotWildcardTarget = mode !== "wildcard" ||
|
|
4475
|
+
typeof _target !== "string" ||
|
|
4476
|
+
!(_target.includes("*") || _target.includes("?"));
|
|
4477
|
+
if (lookupCaches && isNotWildcardTarget) {
|
|
4478
|
+
const searchMode = reverseSearch ? "reverseSearch" : "forwardSearch";
|
|
4479
|
+
let cache = lookupCaches[searchMode].get(data);
|
|
4480
|
+
if (cache === undefined) {
|
|
4481
|
+
// build the cache for all the values
|
|
4482
|
+
cache = new Map();
|
|
4483
|
+
for (let i = 0; i < numberOfValues; i++) {
|
|
4484
|
+
const value = getValue(data, i) ?? null;
|
|
4485
|
+
if (!cache.has(value)) {
|
|
4486
|
+
cache.set(value, i);
|
|
4487
|
+
}
|
|
4488
|
+
}
|
|
4489
|
+
lookupCaches[searchMode].set(data, cache);
|
|
4490
|
+
}
|
|
4491
|
+
if (cache.has(_target)) {
|
|
4492
|
+
const resultIndex = cache.get(_target);
|
|
4493
|
+
return reverseSearch ? numberOfValues - resultIndex - 1 : resultIndex;
|
|
4494
|
+
}
|
|
4495
|
+
if (mode === "strict") {
|
|
4496
|
+
return -1;
|
|
4497
|
+
}
|
|
4498
|
+
}
|
|
4499
|
+
// else perform the linear search
|
|
4500
|
+
const resultIndex = _linearSearch(data, _target, mode, numberOfValues, getValue);
|
|
4501
|
+
return reverseSearch && resultIndex !== -1 ? numberOfValues - resultIndex - 1 : resultIndex;
|
|
4502
|
+
}
|
|
4503
|
+
function _linearSearch(data, _target, mode, numberOfValues, getNormalizeValue) {
|
|
4473
4504
|
let indexMatchTarget = (i) => {
|
|
4474
|
-
return
|
|
4505
|
+
return getNormalizeValue(data, i) === _target;
|
|
4475
4506
|
};
|
|
4476
4507
|
if (mode === "wildcard" &&
|
|
4477
4508
|
typeof _target === "string" &&
|
|
4478
4509
|
(_target.includes("*") || _target.includes("?"))) {
|
|
4479
4510
|
const regExp = wildcardToRegExp(_target);
|
|
4480
4511
|
indexMatchTarget = (i) => {
|
|
4481
|
-
const value =
|
|
4512
|
+
const value = getNormalizeValue(data, i);
|
|
4482
4513
|
if (typeof value === "string") {
|
|
4483
4514
|
return regExp.test(value);
|
|
4484
4515
|
}
|
|
@@ -4489,7 +4520,7 @@
|
|
|
4489
4520
|
let closestMatchIndex = -1;
|
|
4490
4521
|
if (mode === "nextSmaller") {
|
|
4491
4522
|
indexMatchTarget = (i) => {
|
|
4492
|
-
const value =
|
|
4523
|
+
const value = getNormalizeValue(data, i);
|
|
4493
4524
|
if ((!closestMatch && compareCellValues(_target, value) >= 0) ||
|
|
4494
4525
|
(compareCellValues(_target, value) >= 0 && compareCellValues(value, closestMatch) > 0)) {
|
|
4495
4526
|
closestMatch = value;
|
|
@@ -4500,7 +4531,7 @@
|
|
|
4500
4531
|
}
|
|
4501
4532
|
if (mode === "nextGreater") {
|
|
4502
4533
|
indexMatchTarget = (i) => {
|
|
4503
|
-
const value =
|
|
4534
|
+
const value = getNormalizeValue(data, i);
|
|
4504
4535
|
if ((!closestMatch && compareCellValues(_target, value) <= 0) ||
|
|
4505
4536
|
(compareCellValues(_target, value) <= 0 && compareCellValues(value, closestMatch) < 0)) {
|
|
4506
4537
|
closestMatch = value;
|
|
@@ -4511,12 +4542,10 @@
|
|
|
4511
4542
|
}
|
|
4512
4543
|
for (let i = 0; i < numberOfValues; i++) {
|
|
4513
4544
|
if (indexMatchTarget(i)) {
|
|
4514
|
-
return
|
|
4545
|
+
return i;
|
|
4515
4546
|
}
|
|
4516
4547
|
}
|
|
4517
|
-
return
|
|
4518
|
-
? numberOfValues - closestMatchIndex - 1
|
|
4519
|
-
: closestMatchIndex;
|
|
4548
|
+
return closestMatchIndex;
|
|
4520
4549
|
}
|
|
4521
4550
|
/**
|
|
4522
4551
|
* Normalize a value.
|
|
@@ -6490,10 +6519,11 @@
|
|
|
6490
6519
|
*
|
|
6491
6520
|
*/
|
|
6492
6521
|
smallUuid() {
|
|
6493
|
-
|
|
6494
|
-
|
|
6495
|
-
|
|
6496
|
-
|
|
6522
|
+
if (window.crypto) {
|
|
6523
|
+
return "10000000-1000".replace(/[01]/g, (c) => {
|
|
6524
|
+
const n = Number(c);
|
|
6525
|
+
return (n ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (n / 4)))).toString(16);
|
|
6526
|
+
});
|
|
6497
6527
|
}
|
|
6498
6528
|
else {
|
|
6499
6529
|
// mainly for jest and other browsers that do not have the crypto functionality
|
|
@@ -6508,10 +6538,11 @@
|
|
|
6508
6538
|
* This method should be used when you need to avoid collisions at all costs, like the id of a revision.
|
|
6509
6539
|
*/
|
|
6510
6540
|
uuidv4() {
|
|
6511
|
-
|
|
6512
|
-
|
|
6513
|
-
|
|
6514
|
-
|
|
6541
|
+
if (window.crypto) {
|
|
6542
|
+
return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => {
|
|
6543
|
+
const n = Number(c);
|
|
6544
|
+
return (n ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (n / 4)))).toString(16);
|
|
6545
|
+
});
|
|
6515
6546
|
}
|
|
6516
6547
|
else {
|
|
6517
6548
|
// mainly for jest and other browsers that do not have the crypto functionality
|
|
@@ -18685,7 +18716,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
18685
18716
|
const _isSorted = toBoolean(isSorted.value);
|
|
18686
18717
|
const colIndex = _isSorted
|
|
18687
18718
|
? dichotomicSearch(_range, searchKey, "nextSmaller", "asc", _range.length, getValueFromRange)
|
|
18688
|
-
: linearSearch(_range, searchKey, "wildcard", _range.length, getValueFromRange);
|
|
18719
|
+
: linearSearch(_range, searchKey, "wildcard", _range.length, getValueFromRange, this.lookupCaches);
|
|
18689
18720
|
const col = _range[colIndex];
|
|
18690
18721
|
if (col === undefined) {
|
|
18691
18722
|
return valueNotAvailable(searchKey);
|
|
@@ -18840,7 +18871,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
18840
18871
|
index = dichotomicSearch(_range, searchKey, "nextSmaller", "asc", rangeLen, getElement);
|
|
18841
18872
|
break;
|
|
18842
18873
|
case 0:
|
|
18843
|
-
index = linearSearch(_range, searchKey, "wildcard", rangeLen, getElement);
|
|
18874
|
+
index = linearSearch(_range, searchKey, "wildcard", rangeLen, getElement, this.lookupCaches);
|
|
18844
18875
|
break;
|
|
18845
18876
|
case -1:
|
|
18846
18877
|
index = dichotomicSearch(_range, searchKey, "nextGreater", "desc", rangeLen, getElement);
|
|
@@ -18908,7 +18939,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
18908
18939
|
const _isSorted = toBoolean(isSorted.value);
|
|
18909
18940
|
const rowIndex = _isSorted
|
|
18910
18941
|
? dichotomicSearch(_range, searchKey, "nextSmaller", "asc", _range[0].length, getValueFromRange)
|
|
18911
|
-
: linearSearch(_range, searchKey, "wildcard", _range[0].length, getValueFromRange);
|
|
18942
|
+
: linearSearch(_range, searchKey, "wildcard", _range[0].length, getValueFromRange, this.lookupCaches);
|
|
18912
18943
|
const value = _range[_index - 1][rowIndex];
|
|
18913
18944
|
if (value === undefined) {
|
|
18914
18945
|
return valueNotAvailable(searchKey);
|
|
@@ -18964,7 +18995,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
18964
18995
|
const reverseSearch = _searchMode === -1;
|
|
18965
18996
|
const index = _searchMode === 2 || _searchMode === -2
|
|
18966
18997
|
? dichotomicSearch(_lookupRange, searchKey, mode, _searchMode === 2 ? "asc" : "desc", rangeLen, getElement)
|
|
18967
|
-
: linearSearch(_lookupRange, searchKey, mode, rangeLen, getElement, reverseSearch);
|
|
18998
|
+
: linearSearch(_lookupRange, searchKey, mode, rangeLen, getElement, this.lookupCaches, reverseSearch);
|
|
18968
18999
|
if (index !== -1) {
|
|
18969
19000
|
return lookupDirection === "col"
|
|
18970
19001
|
? _returnRange.map((col) => [col[index]])
|
|
@@ -28303,7 +28334,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
28303
28334
|
}
|
|
28304
28335
|
function getPyramidChartData(definition, dataSets, labelRange, getters) {
|
|
28305
28336
|
const barChartData = getBarChartData(definition, dataSets, labelRange, getters);
|
|
28306
|
-
const barDataset = barChartData.dataSetsValues;
|
|
28337
|
+
const barDataset = barChartData.dataSetsValues.filter((ds) => !ds.hidden);
|
|
28307
28338
|
const pyramidDatasetValues = [];
|
|
28308
28339
|
if (barDataset[0]) {
|
|
28309
28340
|
const pyramidData = barDataset[0].data.map((value) => (value > 0 ? value : 0));
|
|
@@ -28780,10 +28811,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
28780
28811
|
function getChartDatasetValues(getters, dataSets) {
|
|
28781
28812
|
const datasetValues = [];
|
|
28782
28813
|
for (const [dsIndex, ds] of Object.entries(dataSets)) {
|
|
28783
|
-
if (getters.isColHidden(ds.dataRange.sheetId, ds.dataRange.zone.left)) {
|
|
28784
|
-
continue;
|
|
28785
|
-
}
|
|
28786
28814
|
let label;
|
|
28815
|
+
let hidden = getters.isColHidden(ds.dataRange.sheetId, ds.dataRange.zone.left);
|
|
28787
28816
|
if (ds.labelCell) {
|
|
28788
28817
|
const labelRange = ds.labelCell;
|
|
28789
28818
|
const cell = labelRange
|
|
@@ -28810,9 +28839,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
28810
28839
|
data.fill(1);
|
|
28811
28840
|
}
|
|
28812
28841
|
else if (data.every((cell) => cell === undefined || cell === null || !isNumber(cell.toString(), DEFAULT_LOCALE))) {
|
|
28813
|
-
|
|
28842
|
+
hidden = true;
|
|
28814
28843
|
}
|
|
28815
|
-
datasetValues.push({ data, label });
|
|
28844
|
+
datasetValues.push({ data, label, hidden });
|
|
28816
28845
|
}
|
|
28817
28846
|
return datasetValues;
|
|
28818
28847
|
}
|
|
@@ -28823,12 +28852,13 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
28823
28852
|
const colors = getChartColorsGenerator(definition, dataSetsValues.length);
|
|
28824
28853
|
const trendDatasets = [];
|
|
28825
28854
|
for (const index in dataSetsValues) {
|
|
28826
|
-
let { label, data } = dataSetsValues[index];
|
|
28855
|
+
let { label, data, hidden } = dataSetsValues[index];
|
|
28827
28856
|
label = definition.dataSets?.[index].label || label;
|
|
28828
28857
|
const backgroundColor = colors.next();
|
|
28829
28858
|
const dataset = {
|
|
28830
28859
|
label,
|
|
28831
28860
|
data,
|
|
28861
|
+
hidden,
|
|
28832
28862
|
borderColor: definition.background || BACKGROUND_CHART_COLOR,
|
|
28833
28863
|
borderWidth: definition.stacked ? 1 : 0,
|
|
28834
28864
|
backgroundColor,
|
|
@@ -28861,6 +28891,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
28861
28891
|
const labelsWithSubTotals = [];
|
|
28862
28892
|
let lastValue = 0;
|
|
28863
28893
|
for (const dataSetsValue of dataSetsValues) {
|
|
28894
|
+
if (dataSetsValue.hidden) {
|
|
28895
|
+
continue;
|
|
28896
|
+
}
|
|
28864
28897
|
for (let i = 0; i < dataSetsValue.data.length; i++) {
|
|
28865
28898
|
const data = dataSetsValue.data[i];
|
|
28866
28899
|
labelsWithSubTotals.push(labels[i]);
|
|
@@ -28896,7 +28929,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
28896
28929
|
const trendDatasets = [];
|
|
28897
28930
|
const colors = getChartColorsGenerator(definition, dataSetsValues.length);
|
|
28898
28931
|
for (let index = 0; index < dataSetsValues.length; index++) {
|
|
28899
|
-
let { label, data } = dataSetsValues[index];
|
|
28932
|
+
let { label, data, hidden } = dataSetsValues[index];
|
|
28900
28933
|
label = definition.dataSets?.[index].label || label;
|
|
28901
28934
|
const color = colors.next();
|
|
28902
28935
|
if (axisType && ["linear", "time"].includes(axisType)) {
|
|
@@ -28906,6 +28939,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
28906
28939
|
const dataset = {
|
|
28907
28940
|
label,
|
|
28908
28941
|
data,
|
|
28942
|
+
hidden,
|
|
28909
28943
|
tension: 0, // 0 -> render straight lines, which is much faster
|
|
28910
28944
|
borderColor: color,
|
|
28911
28945
|
backgroundColor: areaChart ? setColorAlpha(color, LINE_FILL_TRANSPARENCY) : color,
|
|
@@ -28938,7 +28972,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
28938
28972
|
const dataSets = [];
|
|
28939
28973
|
const dataSetsLength = Math.max(0, ...dataSetsValues.map((ds) => ds?.data?.length ?? 0));
|
|
28940
28974
|
const backgroundColor = getPieColors(new ColorGenerator(dataSetsLength), dataSetsValues);
|
|
28941
|
-
for (const { label, data } of dataSetsValues) {
|
|
28975
|
+
for (const { label, data, hidden } of dataSetsValues) {
|
|
28976
|
+
if (hidden)
|
|
28977
|
+
continue;
|
|
28942
28978
|
const dataset = {
|
|
28943
28979
|
label,
|
|
28944
28980
|
data,
|
|
@@ -28956,7 +28992,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
28956
28992
|
const colors = getChartColorsGenerator(definition, dataSetsValues.length);
|
|
28957
28993
|
const trendDatasets = [];
|
|
28958
28994
|
for (let index = 0; index < dataSetsValues.length; index++) {
|
|
28959
|
-
let { label, data } = dataSetsValues[index];
|
|
28995
|
+
let { label, data, hidden } = dataSetsValues[index];
|
|
28960
28996
|
label = definition.dataSets?.[index].label || label;
|
|
28961
28997
|
const design = definition.dataSets?.[index];
|
|
28962
28998
|
const color = colors.next();
|
|
@@ -28964,6 +29000,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
28964
29000
|
const dataset = {
|
|
28965
29001
|
label: label,
|
|
28966
29002
|
data,
|
|
29003
|
+
hidden,
|
|
28967
29004
|
borderColor: color,
|
|
28968
29005
|
backgroundColor: color,
|
|
28969
29006
|
yAxisID: definition.dataSets?.[index].yAxisId || "y",
|
|
@@ -28988,7 +29025,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
28988
29025
|
const fill = definition.fillArea ?? false;
|
|
28989
29026
|
const colors = getChartColorsGenerator(definition, dataSetsValues.length);
|
|
28990
29027
|
for (let i = 0; i < dataSetsValues.length; i++) {
|
|
28991
|
-
let { label, data } = dataSetsValues[i];
|
|
29028
|
+
let { label, data, hidden } = dataSetsValues[i];
|
|
28992
29029
|
if (definition.dataSets?.[i]?.label) {
|
|
28993
29030
|
label = definition.dataSets[i].label;
|
|
28994
29031
|
}
|
|
@@ -28996,6 +29033,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
28996
29033
|
const dataset = {
|
|
28997
29034
|
label,
|
|
28998
29035
|
data,
|
|
29036
|
+
hidden,
|
|
28999
29037
|
borderColor,
|
|
29000
29038
|
backgroundColor: borderColor,
|
|
29001
29039
|
};
|
|
@@ -29141,6 +29179,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
29141
29179
|
hidden: false,
|
|
29142
29180
|
lineWidth: 2,
|
|
29143
29181
|
})),
|
|
29182
|
+
filter: (legendItem, data) => {
|
|
29183
|
+
return "datasetIndex" in legendItem
|
|
29184
|
+
? !data.datasets[legendItem.datasetIndex].hidden
|
|
29185
|
+
: true;
|
|
29186
|
+
},
|
|
29144
29187
|
},
|
|
29145
29188
|
};
|
|
29146
29189
|
}
|
|
@@ -29202,6 +29245,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
29202
29245
|
}
|
|
29203
29246
|
return legendValues;
|
|
29204
29247
|
},
|
|
29248
|
+
filter: (legendItem, data) => {
|
|
29249
|
+
return "datasetIndex" in legendItem
|
|
29250
|
+
? !data.datasets[legendItem.datasetIndex].hidden
|
|
29251
|
+
: true;
|
|
29252
|
+
},
|
|
29205
29253
|
},
|
|
29206
29254
|
onClick: () => { }, // Disables click interaction with the waterfall chart legend items
|
|
29207
29255
|
};
|
|
@@ -29285,6 +29333,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
29285
29333
|
...legendLabelConfig,
|
|
29286
29334
|
};
|
|
29287
29335
|
}),
|
|
29336
|
+
filter: (legendItem, data) => {
|
|
29337
|
+
return "datasetIndex" in legendItem
|
|
29338
|
+
? !data.datasets[legendItem.datasetIndex].hidden
|
|
29339
|
+
: true;
|
|
29340
|
+
},
|
|
29288
29341
|
},
|
|
29289
29342
|
};
|
|
29290
29343
|
}
|
|
@@ -29618,7 +29671,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
29618
29671
|
<div
|
|
29619
29672
|
class="o-chart-custom-tooltip border rounded px-2 py-1 pe-none mw-100 position-absolute text-nowrap shadow opacity-100">
|
|
29620
29673
|
<table class="overflow-hidden m-0">
|
|
29621
|
-
<thead>
|
|
29674
|
+
<thead t-if="title">
|
|
29622
29675
|
<tr>
|
|
29623
29676
|
<th class="o-tooltip-title align-baseline border-0 text-truncate" t-esc="title" t-attf-style="max-width: {{ labelsMaxWidth }}"/>
|
|
29624
29677
|
</tr>
|
|
@@ -29679,8 +29732,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
29679
29732
|
? undefined
|
|
29680
29733
|
: "";
|
|
29681
29734
|
},
|
|
29735
|
+
beforeLabel: (tooltipItem) => tooltipItem.dataset?.label || tooltipItem.label,
|
|
29682
29736
|
label: function (tooltipItem) {
|
|
29683
|
-
const xLabel = tooltipItem.dataset?.label || tooltipItem.label;
|
|
29684
29737
|
const horizontalChart = definition.horizontal;
|
|
29685
29738
|
let yLabel = horizontalChart ? tooltipItem.parsed.x : tooltipItem.parsed.y;
|
|
29686
29739
|
if (yLabel === undefined || yLabel === null) {
|
|
@@ -29688,7 +29741,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
29688
29741
|
}
|
|
29689
29742
|
const axisId = horizontalChart ? tooltipItem.dataset.xAxisID : tooltipItem.dataset.yAxisID;
|
|
29690
29743
|
const yLabelStr = formatChartDatasetValue(args.axisFormats, args.locale)(yLabel, axisId);
|
|
29691
|
-
return
|
|
29744
|
+
return yLabelStr;
|
|
29692
29745
|
},
|
|
29693
29746
|
},
|
|
29694
29747
|
};
|
|
@@ -29713,21 +29766,18 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
29713
29766
|
const formattedX = formatValue(label, { locale, format: labelFormat });
|
|
29714
29767
|
const axisId = tooltipItem.dataset.yAxisID || "y";
|
|
29715
29768
|
const formattedY = formatValue(dataSetPoint, { locale, format: axisFormats?.[axisId] });
|
|
29716
|
-
|
|
29717
|
-
return formattedX
|
|
29718
|
-
? `${dataSetTitle}: (${formattedX}, ${formattedY})`
|
|
29719
|
-
: `${dataSetTitle}: ${formattedY}`;
|
|
29769
|
+
return formattedX ? `(${formattedX}, ${formattedY})` : `${formattedY}`;
|
|
29720
29770
|
};
|
|
29721
29771
|
}
|
|
29722
29772
|
else {
|
|
29723
29773
|
tooltip.callbacks.label = function (tooltipItem) {
|
|
29724
|
-
const xLabel = tooltipItem.dataset?.label || tooltipItem.label;
|
|
29725
29774
|
const yLabel = tooltipItem.parsed.y;
|
|
29726
29775
|
const axisId = tooltipItem.dataset.yAxisID;
|
|
29727
29776
|
const yLabelStr = formatChartDatasetValue(axisFormats, locale)(yLabel, axisId);
|
|
29728
|
-
return
|
|
29777
|
+
return yLabelStr;
|
|
29729
29778
|
};
|
|
29730
29779
|
}
|
|
29780
|
+
tooltip.callbacks.beforeLabel = (tooltipItem) => tooltipItem.dataset?.label || tooltipItem.label;
|
|
29731
29781
|
tooltip.callbacks.title = function (tooltipItems) {
|
|
29732
29782
|
const displayTooltipTitle = axisType !== "linear" &&
|
|
29733
29783
|
tooltipItems.some((item) => item.dataset.xAxisID !== TREND_LINE_XAXIS_ID);
|
|
@@ -29745,17 +29795,15 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
29745
29795
|
title: function (tooltipItems) {
|
|
29746
29796
|
return tooltipItems[0].dataset.label;
|
|
29747
29797
|
},
|
|
29798
|
+
beforeLabel: (tooltipItem) => tooltipItem.label || tooltipItem.dataset.label,
|
|
29748
29799
|
label: function (tooltipItem) {
|
|
29749
29800
|
const data = tooltipItem.dataset.data;
|
|
29750
29801
|
const dataIndex = tooltipItem.dataIndex;
|
|
29751
29802
|
const percentage = calculatePercentage(data, dataIndex);
|
|
29752
|
-
const xLabel = tooltipItem.label || tooltipItem.dataset.label;
|
|
29753
29803
|
const yLabel = tooltipItem.parsed.y ?? tooltipItem.parsed;
|
|
29754
29804
|
const toolTipFormat = !format && yLabel >= 1000 ? "#,##" : format;
|
|
29755
29805
|
const yLabelStr = formatValue(yLabel, { format: toolTipFormat, locale });
|
|
29756
|
-
return
|
|
29757
|
-
? `${xLabel}: ${yLabelStr} (${percentage}%)`
|
|
29758
|
-
: `${yLabelStr} (${percentage}%)`;
|
|
29806
|
+
return `${yLabelStr} (${percentage}%)`;
|
|
29759
29807
|
},
|
|
29760
29808
|
},
|
|
29761
29809
|
};
|
|
@@ -29768,16 +29816,17 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
29768
29816
|
enabled: false,
|
|
29769
29817
|
external: customTooltipHandler,
|
|
29770
29818
|
callbacks: {
|
|
29771
|
-
|
|
29772
|
-
const [lastValue, currentValue] = tooltipItem.raw;
|
|
29773
|
-
const yLabel = currentValue - lastValue;
|
|
29819
|
+
beforeLabel: function (tooltipItem) {
|
|
29774
29820
|
const dataSeriesIndex = labels.length
|
|
29775
29821
|
? Math.floor(tooltipItem.dataIndex / labels.length)
|
|
29776
29822
|
: 0;
|
|
29777
|
-
|
|
29823
|
+
return dataSeriesLabels[dataSeriesIndex];
|
|
29824
|
+
},
|
|
29825
|
+
label: function (tooltipItem) {
|
|
29826
|
+
const [lastValue, currentValue] = tooltipItem.raw;
|
|
29827
|
+
const yLabel = currentValue - lastValue;
|
|
29778
29828
|
const toolTipFormat = !format && Math.abs(yLabel) > 1000 ? "#,##" : format;
|
|
29779
|
-
|
|
29780
|
-
return dataSeriesLabel ? `${dataSeriesLabel}: ${yLabelStr}` : yLabelStr;
|
|
29829
|
+
return formatValue(yLabel, { format: toolTipFormat, locale });
|
|
29781
29830
|
},
|
|
29782
29831
|
},
|
|
29783
29832
|
};
|
|
@@ -29801,11 +29850,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
29801
29850
|
enabled: false,
|
|
29802
29851
|
external: customTooltipHandler,
|
|
29803
29852
|
callbacks: {
|
|
29853
|
+
beforeLabel: (tooltipItem) => tooltipItem.dataset?.label || tooltipItem.label,
|
|
29804
29854
|
label: function (tooltipItem) {
|
|
29805
|
-
const xLabel = tooltipItem.dataset?.label || tooltipItem.label;
|
|
29806
29855
|
const yLabel = tooltipItem.parsed.r;
|
|
29807
|
-
|
|
29808
|
-
return xLabel ? `${xLabel}: ${formattedY}` : formattedY;
|
|
29856
|
+
return formatValue(yLabel, { format: axisFormats?.r, locale });
|
|
29809
29857
|
},
|
|
29810
29858
|
},
|
|
29811
29859
|
};
|
|
@@ -29820,13 +29868,12 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
29820
29868
|
return tooltipItem.raw.value !== undefined;
|
|
29821
29869
|
},
|
|
29822
29870
|
callbacks: {
|
|
29871
|
+
beforeLabel: (tooltipItem) => tooltipItem.raw.feature.properties.name,
|
|
29823
29872
|
label: function (tooltipItem) {
|
|
29824
29873
|
const rawItem = tooltipItem.raw;
|
|
29825
|
-
const xLabel = rawItem.feature.properties.name;
|
|
29826
29874
|
const yLabel = rawItem.value;
|
|
29827
29875
|
const toolTipFormat = !format && Math.abs(yLabel) >= 1000 ? "#,##" : format;
|
|
29828
|
-
|
|
29829
|
-
return xLabel ? `${xLabel}: ${yLabelStr}` : yLabelStr;
|
|
29876
|
+
return formatValue(yLabel, { format: toolTipFormat, locale });
|
|
29830
29877
|
},
|
|
29831
29878
|
},
|
|
29832
29879
|
};
|
|
@@ -29846,7 +29893,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
29846
29893
|
return;
|
|
29847
29894
|
}
|
|
29848
29895
|
const tooltipItems = tooltip.body.map((body, index) => {
|
|
29849
|
-
let
|
|
29896
|
+
let label = body.before[0];
|
|
29897
|
+
let value = body.lines[0];
|
|
29850
29898
|
if (!value) {
|
|
29851
29899
|
value = label;
|
|
29852
29900
|
label = "";
|
|
@@ -51638,8 +51686,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
51638
51686
|
css /* scss */ `
|
|
51639
51687
|
.o-corner {
|
|
51640
51688
|
position: absolute;
|
|
51641
|
-
height:
|
|
51642
|
-
width:
|
|
51689
|
+
height: 8px;
|
|
51690
|
+
width: 8px;
|
|
51643
51691
|
border: 1px solid white;
|
|
51644
51692
|
}
|
|
51645
51693
|
.o-corner-nw,
|
|
@@ -60000,6 +60048,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
60000
60048
|
this.compilationParams = buildCompilationParameters(this.context, this.getters, this.computeAndSave.bind(this));
|
|
60001
60049
|
this.compilationParams.evalContext.updateDependencies = this.updateDependencies.bind(this);
|
|
60002
60050
|
this.compilationParams.evalContext.addDependencies = this.addDependencies.bind(this);
|
|
60051
|
+
this.compilationParams.evalContext.lookupCaches = {
|
|
60052
|
+
forwardSearch: new Map(),
|
|
60053
|
+
reverseSearch: new Map(),
|
|
60054
|
+
};
|
|
60003
60055
|
}
|
|
60004
60056
|
createEmptyPositionSet() {
|
|
60005
60057
|
const sheetSizes = {};
|
|
@@ -75610,9 +75662,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
75610
75662
|
exports.tokenize = tokenize;
|
|
75611
75663
|
|
|
75612
75664
|
|
|
75613
|
-
__info__.version = "18.2.
|
|
75614
|
-
__info__.date = "2025-02-
|
|
75615
|
-
__info__.hash = "
|
|
75665
|
+
__info__.version = "18.2.1";
|
|
75666
|
+
__info__.date = "2025-02-25T06:03:13.262Z";
|
|
75667
|
+
__info__.hash = "3b4b5c9";
|
|
75616
75668
|
|
|
75617
75669
|
|
|
75618
75670
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|