@odoo/o-spreadsheet 18.3.6 → 18.3.8
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 +158 -53
- package/dist/o-spreadsheet.d.ts +5 -2
- package/dist/o-spreadsheet.esm.js +158 -53
- package/dist/o-spreadsheet.iife.js +158 -53
- package/dist/o-spreadsheet.iife.min.js +383 -383
- package/dist/o_spreadsheet.xml +3 -3
- 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 18.3.
|
|
6
|
-
* @date 2025-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.3.8
|
|
6
|
+
* @date 2025-06-12T09:51:55.929Z
|
|
7
|
+
* @hash 32dedd1
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -5882,7 +5882,9 @@ function isTextFormat(format) {
|
|
|
5882
5882
|
}
|
|
5883
5883
|
|
|
5884
5884
|
function evaluateLiteral(literalCell, localeFormat) {
|
|
5885
|
-
const value = isTextFormat(localeFormat.format)
|
|
5885
|
+
const value = isTextFormat(localeFormat.format) && literalCell.parsedValue !== null
|
|
5886
|
+
? literalCell.content
|
|
5887
|
+
: literalCell.parsedValue;
|
|
5886
5888
|
const functionResult = { value, format: localeFormat.format };
|
|
5887
5889
|
return createEvaluatedCell(functionResult, localeFormat.locale);
|
|
5888
5890
|
}
|
|
@@ -5931,6 +5933,9 @@ function _createEvaluatedCell(functionResult, locale, cell) {
|
|
|
5931
5933
|
if (isEvaluationError(value)) {
|
|
5932
5934
|
return errorCell(value, message);
|
|
5933
5935
|
}
|
|
5936
|
+
if (value === null) {
|
|
5937
|
+
return emptyCell(format);
|
|
5938
|
+
}
|
|
5934
5939
|
if (isTextFormat(format)) {
|
|
5935
5940
|
// TO DO:
|
|
5936
5941
|
// with the next line, the value of the cell is transformed depending on the format.
|
|
@@ -5938,9 +5943,6 @@ function _createEvaluatedCell(functionResult, locale, cell) {
|
|
|
5938
5943
|
// to interpret the value as a number.
|
|
5939
5944
|
return textCell(toString(value), format, formattedValue);
|
|
5940
5945
|
}
|
|
5941
|
-
if (value === null) {
|
|
5942
|
-
return emptyCell(format);
|
|
5943
|
-
}
|
|
5944
5946
|
if (typeof value === "number") {
|
|
5945
5947
|
if (isDateTimeFormat(format || "")) {
|
|
5946
5948
|
return dateTimeCell(value, format, formattedValue);
|
|
@@ -20957,8 +20959,6 @@ function drawLineOrBarOrRadarChartValues(chart, options, ctx) {
|
|
|
20957
20959
|
if (isNaN(value)) {
|
|
20958
20960
|
continue;
|
|
20959
20961
|
}
|
|
20960
|
-
const axisId = chart.config.type === "radar" ? dataset.rAxisID : dataset.yAxisID;
|
|
20961
|
-
const displayValue = options.callback(Number(value), axisId);
|
|
20962
20962
|
const point = dataset.data[i];
|
|
20963
20963
|
const xPosition = point.x;
|
|
20964
20964
|
let yPosition = 0;
|
|
@@ -20982,7 +20982,8 @@ function drawLineOrBarOrRadarChartValues(chart, options, ctx) {
|
|
|
20982
20982
|
textsPositions[xPosition].push(yPosition);
|
|
20983
20983
|
ctx.fillStyle = point.options.backgroundColor;
|
|
20984
20984
|
ctx.strokeStyle = options.background || "#ffffff";
|
|
20985
|
-
|
|
20985
|
+
const valueToDisplay = options.callback(Number(value), dataset, i);
|
|
20986
|
+
drawTextWithBackground(valueToDisplay, xPosition, yPosition, ctx);
|
|
20986
20987
|
}
|
|
20987
20988
|
}
|
|
20988
20989
|
}
|
|
@@ -20999,7 +21000,7 @@ function drawHorizontalBarChartValues(chart, options, ctx) {
|
|
|
20999
21000
|
if (isNaN(value)) {
|
|
21000
21001
|
continue;
|
|
21001
21002
|
}
|
|
21002
|
-
const displayValue = options.callback(value, dataset
|
|
21003
|
+
const displayValue = options.callback(value, dataset, i);
|
|
21003
21004
|
const point = dataset.data[i];
|
|
21004
21005
|
const yPosition = point.y;
|
|
21005
21006
|
let xPosition = value < 0 ? point.x + point.width / 2 : point.x - point.width / 2;
|
|
@@ -21034,10 +21035,22 @@ function drawPieChartValues(chart, options, ctx) {
|
|
|
21034
21035
|
const midAngle = (startAngle + endAngle) / 2;
|
|
21035
21036
|
const midRadius = (innerRadius + outerRadius) / 2;
|
|
21036
21037
|
const x = bar.x + midRadius * Math.cos(midAngle);
|
|
21037
|
-
const y = bar.y + midRadius * Math.sin(midAngle)
|
|
21038
|
+
const y = bar.y + midRadius * Math.sin(midAngle);
|
|
21039
|
+
const displayValue = options.callback(value, dataset, i);
|
|
21040
|
+
const textHeight = 12; // ChartJS default
|
|
21041
|
+
const textWidth = computeTextWidth(ctx, displayValue, { fontSize: textHeight }, "px");
|
|
21042
|
+
const radius = outerRadius - innerRadius;
|
|
21043
|
+
// Check if the text fits in the slice. Not perfect, but good enough heuristic.
|
|
21044
|
+
if (textWidth >= radius || radius < textHeight) {
|
|
21045
|
+
continue;
|
|
21046
|
+
}
|
|
21047
|
+
const sliceAngle = endAngle - startAngle;
|
|
21048
|
+
const midWidth = 2 * midRadius * Math.tan(sliceAngle / 2);
|
|
21049
|
+
if (sliceAngle < Math.PI / 2 && (textWidth >= midWidth || midWidth < textHeight)) {
|
|
21050
|
+
continue;
|
|
21051
|
+
}
|
|
21038
21052
|
ctx.fillStyle = chartFontColor(options.background);
|
|
21039
21053
|
ctx.strokeStyle = options.background || "#ffffff";
|
|
21040
|
-
const displayValue = options.callback(value, "y");
|
|
21041
21054
|
drawTextWithBackground(displayValue, x, y, ctx);
|
|
21042
21055
|
}
|
|
21043
21056
|
}
|
|
@@ -26358,7 +26371,10 @@ function getChartShowValues(definition, args) {
|
|
|
26358
26371
|
horizontal: "horizontal" in definition && definition.horizontal,
|
|
26359
26372
|
showValues: "showValues" in definition ? !!definition.showValues : false,
|
|
26360
26373
|
background: definition.background,
|
|
26361
|
-
callback:
|
|
26374
|
+
callback: (value, dataset) => {
|
|
26375
|
+
const axisId = getDatasetAxisId(definition, dataset);
|
|
26376
|
+
return formatChartDatasetValue(axisFormats, locale)(value, axisId);
|
|
26377
|
+
},
|
|
26362
26378
|
};
|
|
26363
26379
|
}
|
|
26364
26380
|
function getSunburstShowValues(definition, args) {
|
|
@@ -26376,6 +26392,45 @@ function getSunburstShowValues(definition, args) {
|
|
|
26376
26392
|
},
|
|
26377
26393
|
};
|
|
26378
26394
|
}
|
|
26395
|
+
function getPyramidChartShowValues(definition, args) {
|
|
26396
|
+
const { axisFormats, locale } = args;
|
|
26397
|
+
return {
|
|
26398
|
+
horizontal: true,
|
|
26399
|
+
showValues: "showValues" in definition ? !!definition.showValues : false,
|
|
26400
|
+
background: definition.background,
|
|
26401
|
+
callback: (value, dataset) => {
|
|
26402
|
+
value = Math.abs(Number(value));
|
|
26403
|
+
return formatChartDatasetValue(axisFormats, locale)(value, dataset.xAxisID || "x");
|
|
26404
|
+
},
|
|
26405
|
+
};
|
|
26406
|
+
}
|
|
26407
|
+
function getWaterfallChartShowValues(definition, args) {
|
|
26408
|
+
const { axisFormats, locale, dataSetsValues } = args;
|
|
26409
|
+
const subtotalIndexes = dataSetsValues.reduce((subtotalIndexes, ds) => {
|
|
26410
|
+
subtotalIndexes.push((subtotalIndexes.at(-1) || -1) + ds.data.length + 1);
|
|
26411
|
+
return subtotalIndexes;
|
|
26412
|
+
}, []);
|
|
26413
|
+
return {
|
|
26414
|
+
showValues: "showValues" in definition ? !!definition.showValues : false,
|
|
26415
|
+
background: definition.background,
|
|
26416
|
+
callback: (value, dataset, index) => {
|
|
26417
|
+
const raw = dataset._dataset.data[index];
|
|
26418
|
+
const delta = raw[1] - raw[0];
|
|
26419
|
+
let sign = delta >= 0 ? "+" : "";
|
|
26420
|
+
if (definition.showSubTotals && subtotalIndexes.includes(index) && sign === "+") {
|
|
26421
|
+
sign = "";
|
|
26422
|
+
}
|
|
26423
|
+
return `${sign}${formatChartDatasetValue(axisFormats, locale)(delta, dataset.yAxisID)}`;
|
|
26424
|
+
},
|
|
26425
|
+
};
|
|
26426
|
+
}
|
|
26427
|
+
function getDatasetAxisId(definition, dataset) {
|
|
26428
|
+
if (dataset.rAxisID) {
|
|
26429
|
+
return dataset.rAxisID;
|
|
26430
|
+
}
|
|
26431
|
+
const axisId = "horizontal" in definition && definition.horizontal ? dataset.xAxisID : dataset.yAxisID;
|
|
26432
|
+
return axisId || "y";
|
|
26433
|
+
}
|
|
26379
26434
|
|
|
26380
26435
|
function getChartTitle(definition) {
|
|
26381
26436
|
const chartTitle = definition.title;
|
|
@@ -26778,6 +26833,7 @@ var CHART_RUNTIME_HELPERS = /*#__PURE__*/Object.freeze({
|
|
|
26778
26833
|
getPieChartTooltip: getPieChartTooltip,
|
|
26779
26834
|
getPyramidChartData: getPyramidChartData,
|
|
26780
26835
|
getPyramidChartScales: getPyramidChartScales,
|
|
26836
|
+
getPyramidChartShowValues: getPyramidChartShowValues,
|
|
26781
26837
|
getPyramidChartTooltip: getPyramidChartTooltip,
|
|
26782
26838
|
getRadarChartData: getRadarChartData,
|
|
26783
26839
|
getRadarChartDatasets: getRadarChartDatasets,
|
|
@@ -26797,6 +26853,7 @@ var CHART_RUNTIME_HELPERS = /*#__PURE__*/Object.freeze({
|
|
|
26797
26853
|
getTrendDatasetForLineChart: getTrendDatasetForLineChart,
|
|
26798
26854
|
getWaterfallChartLegend: getWaterfallChartLegend,
|
|
26799
26855
|
getWaterfallChartScales: getWaterfallChartScales,
|
|
26856
|
+
getWaterfallChartShowValues: getWaterfallChartShowValues,
|
|
26800
26857
|
getWaterfallChartTooltip: getWaterfallChartTooltip,
|
|
26801
26858
|
getWaterfallDatasetAndLabels: getWaterfallDatasetAndLabels,
|
|
26802
26859
|
makeDatasetsCumulative: makeDatasetsCumulative
|
|
@@ -28076,7 +28133,7 @@ function createPyramidChartRuntime(chart, getters) {
|
|
|
28076
28133
|
title: getChartTitle(definition),
|
|
28077
28134
|
legend: getBarChartLegend(definition),
|
|
28078
28135
|
tooltip: getPyramidChartTooltip(definition, chartData),
|
|
28079
|
-
chartShowValuesPlugin:
|
|
28136
|
+
chartShowValuesPlugin: getPyramidChartShowValues(definition, chartData),
|
|
28080
28137
|
},
|
|
28081
28138
|
},
|
|
28082
28139
|
};
|
|
@@ -28817,7 +28874,7 @@ function createWaterfallChartRuntime(chart, getters) {
|
|
|
28817
28874
|
title: getChartTitle(definition),
|
|
28818
28875
|
legend: getWaterfallChartLegend(definition),
|
|
28819
28876
|
tooltip: getWaterfallChartTooltip(definition, chartData),
|
|
28820
|
-
chartShowValuesPlugin:
|
|
28877
|
+
chartShowValuesPlugin: getWaterfallChartShowValues(definition, chartData),
|
|
28821
28878
|
waterfallLinesPlugin: { showConnectorLines: definition.showConnectorLines },
|
|
28822
28879
|
},
|
|
28823
28880
|
},
|
|
@@ -33129,7 +33186,7 @@ class XlsxBaseExtractor {
|
|
|
33129
33186
|
*/
|
|
33130
33187
|
handleMissingValue(parentElement, missingElementName, optionalArgs) {
|
|
33131
33188
|
if (optionalArgs?.required) {
|
|
33132
|
-
if (optionalArgs?.default) {
|
|
33189
|
+
if (optionalArgs?.default !== undefined) {
|
|
33133
33190
|
this.warningManager.addParsingWarning(`Missing required ${missingElementName} in element <${parentElement.tagName}> of ${this.currentFile}, replacing it by the default value ${optionalArgs.default}`);
|
|
33134
33191
|
}
|
|
33135
33192
|
else {
|
|
@@ -36082,19 +36139,26 @@ class FilterMenu extends owl.Component {
|
|
|
36082
36139
|
.filter(({ row }) => !this.env.model.getters.isRowHidden(sheetId, row))
|
|
36083
36140
|
.map(({ col, row }) => this.env.model.getters.getEvaluatedCell({ sheetId, col, row }).formattedValue);
|
|
36084
36141
|
const filterValues = this.env.model.getters.getFilterHiddenValues({ sheetId, ...position });
|
|
36085
|
-
const
|
|
36086
|
-
const
|
|
36087
|
-
|
|
36088
|
-
const
|
|
36089
|
-
|
|
36090
|
-
|
|
36091
|
-
|
|
36092
|
-
|
|
36093
|
-
|
|
36094
|
-
|
|
36095
|
-
|
|
36096
|
-
|
|
36097
|
-
|
|
36142
|
+
const normalizedFilteredValues = new Set(filterValues.map(toLowerCase));
|
|
36143
|
+
const set = new Set();
|
|
36144
|
+
const values = [];
|
|
36145
|
+
const addValue = (value) => {
|
|
36146
|
+
const normalizedValue = toLowerCase(value);
|
|
36147
|
+
if (!set.has(normalizedValue)) {
|
|
36148
|
+
values.push({
|
|
36149
|
+
string: value || "",
|
|
36150
|
+
checked: !normalizedFilteredValues.has(normalizedValue),
|
|
36151
|
+
normalizedValue,
|
|
36152
|
+
});
|
|
36153
|
+
set.add(normalizedValue);
|
|
36154
|
+
}
|
|
36155
|
+
};
|
|
36156
|
+
cellValues.forEach(addValue);
|
|
36157
|
+
filterValues.forEach(addValue);
|
|
36158
|
+
return values.sort((val1, val2) => val1.normalizedValue.localeCompare(val2.normalizedValue, undefined, {
|
|
36159
|
+
numeric: true,
|
|
36160
|
+
sensitivity: "base",
|
|
36161
|
+
}));
|
|
36098
36162
|
}
|
|
36099
36163
|
checkValue(value) {
|
|
36100
36164
|
this.state.selectedValue = value.string;
|
|
@@ -47369,13 +47433,15 @@ class FindAndReplaceStore extends SpreadsheetStore {
|
|
|
47369
47433
|
if (this.selectedMatchIndex === null) {
|
|
47370
47434
|
return;
|
|
47371
47435
|
}
|
|
47436
|
+
this.preserveSelectedMatchIndex = true;
|
|
47437
|
+
this.shouldFinalizeUpdateSelection = true;
|
|
47372
47438
|
this.model.dispatch("REPLACE_SEARCH", {
|
|
47373
47439
|
searchString: this.toSearch,
|
|
47374
47440
|
replaceWith: this.toReplace,
|
|
47375
47441
|
matches: [this.searchMatches[this.selectedMatchIndex]],
|
|
47376
47442
|
searchOptions: this.searchOptions,
|
|
47377
47443
|
});
|
|
47378
|
-
this.
|
|
47444
|
+
this.preserveSelectedMatchIndex = false;
|
|
47379
47445
|
}
|
|
47380
47446
|
/**
|
|
47381
47447
|
* Apply the replace function to all the matches one time.
|
|
@@ -53531,7 +53597,7 @@ class HoveredTableStore extends SpreadsheetStore {
|
|
|
53531
53597
|
}
|
|
53532
53598
|
}
|
|
53533
53599
|
hover(position) {
|
|
53534
|
-
if (position.col === this.col && position.row === this.row) {
|
|
53600
|
+
if (!this.getters.isDashboard() || (position.col === this.col && position.row === this.row)) {
|
|
53535
53601
|
return "noStateChange";
|
|
53536
53602
|
}
|
|
53537
53603
|
this.col = position.col;
|
|
@@ -55207,6 +55273,9 @@ function useTouchScroll(ref, updateScroll, canMoveUp) {
|
|
|
55207
55273
|
let deltaX = lastX - clientX;
|
|
55208
55274
|
let deltaY = lastY - clientY;
|
|
55209
55275
|
const elapsedTime = currentTime - lastTime;
|
|
55276
|
+
if (!elapsedTime) {
|
|
55277
|
+
return;
|
|
55278
|
+
}
|
|
55210
55279
|
velocityX = deltaX / elapsedTime;
|
|
55211
55280
|
velocityY = deltaY / elapsedTime;
|
|
55212
55281
|
lastX = clientX;
|
|
@@ -55227,6 +55296,11 @@ function useTouchScroll(ref, updateScroll, canMoveUp) {
|
|
|
55227
55296
|
function onTouchEnd(ev) {
|
|
55228
55297
|
isMouseDown = false;
|
|
55229
55298
|
lastX = lastY = 0;
|
|
55299
|
+
if (resetTimeout) {
|
|
55300
|
+
clearTimeout(resetTimeout);
|
|
55301
|
+
}
|
|
55302
|
+
velocityX *= 1.2;
|
|
55303
|
+
velocityY *= 1.2;
|
|
55230
55304
|
requestAnimationFrame(scroll);
|
|
55231
55305
|
}
|
|
55232
55306
|
function scroll() {
|
|
@@ -61425,7 +61499,9 @@ class TablePlugin extends CorePlugin {
|
|
|
61425
61499
|
const ranges = cmd.ranges.map((rangeData) => this.getters.getRangeFromRangeData(rangeData));
|
|
61426
61500
|
const union = this.getters.getRangesUnion(ranges);
|
|
61427
61501
|
const mergesInTarget = this.getters.getMergesInZone(cmd.sheetId, union.zone);
|
|
61428
|
-
|
|
61502
|
+
if (mergesInTarget.length) {
|
|
61503
|
+
this.dispatch("REMOVE_MERGE", { sheetId: cmd.sheetId, target: mergesInTarget });
|
|
61504
|
+
}
|
|
61429
61505
|
const id = this.consumeNextId();
|
|
61430
61506
|
const config = cmd.config || DEFAULT_TABLE_CONFIG;
|
|
61431
61507
|
const newTable = cmd.tableType === "dynamic"
|
|
@@ -61524,14 +61600,16 @@ class TablePlugin extends CorePlugin {
|
|
|
61524
61600
|
const zoneToCheckIfEmpty = direction === "down"
|
|
61525
61601
|
? { ...zone, bottom: zone.bottom + 1, top: zone.bottom + 1 }
|
|
61526
61602
|
: { ...zone, right: zone.right + 1, left: zone.right + 1 };
|
|
61527
|
-
for (
|
|
61528
|
-
|
|
61529
|
-
|
|
61530
|
-
|
|
61531
|
-
|
|
61532
|
-
|
|
61533
|
-
|
|
61534
|
-
|
|
61603
|
+
for (let row = zoneToCheckIfEmpty.top; row <= zoneToCheckIfEmpty.bottom; row++) {
|
|
61604
|
+
for (let col = zoneToCheckIfEmpty.left; col <= zoneToCheckIfEmpty.right; col++) {
|
|
61605
|
+
const cellPosition = { sheetId, col, row };
|
|
61606
|
+
// Since this plugin is loaded before CellPlugin, the getters still give us the old cell content
|
|
61607
|
+
const cellContent = this.getters.getCell(cellPosition)?.content;
|
|
61608
|
+
if (cellContent ||
|
|
61609
|
+
this.getters.isInMerge(cellPosition) ||
|
|
61610
|
+
this.getTablesOverlappingZones(sheetId, [positionToZone(cellPosition)]).length) {
|
|
61611
|
+
return "none";
|
|
61612
|
+
}
|
|
61535
61613
|
}
|
|
61536
61614
|
}
|
|
61537
61615
|
return direction;
|
|
@@ -62317,7 +62395,7 @@ class PivotCorePlugin extends CorePlugin {
|
|
|
62317
62395
|
break;
|
|
62318
62396
|
}
|
|
62319
62397
|
case "UPDATE_PIVOT": {
|
|
62320
|
-
this.history.update("pivots", cmd.pivotId, "definition", deepCopy(cmd.pivot));
|
|
62398
|
+
this.history.update("pivots", cmd.pivotId, "definition", this.repairSortedColumn(deepCopy(cmd.pivot)));
|
|
62321
62399
|
this.compileCalculatedMeasures(cmd.pivot.measures);
|
|
62322
62400
|
break;
|
|
62323
62401
|
}
|
|
@@ -62388,7 +62466,10 @@ class PivotCorePlugin extends CorePlugin {
|
|
|
62388
62466
|
// Private
|
|
62389
62467
|
// -------------------------------------------------------------------------
|
|
62390
62468
|
addPivot(pivotId, pivot, formulaId = this.nextFormulaId.toString()) {
|
|
62391
|
-
this.history.update("pivots", pivotId, {
|
|
62469
|
+
this.history.update("pivots", pivotId, {
|
|
62470
|
+
definition: this.repairSortedColumn(deepCopy(pivot)),
|
|
62471
|
+
formulaId,
|
|
62472
|
+
});
|
|
62392
62473
|
this.compileCalculatedMeasures(pivot.measures);
|
|
62393
62474
|
this.history.update("formulaIds", formulaId, pivotId);
|
|
62394
62475
|
this.history.update("nextFormulaId", this.nextFormulaId + 1);
|
|
@@ -62477,6 +62558,7 @@ class PivotCorePlugin extends CorePlugin {
|
|
|
62477
62558
|
}
|
|
62478
62559
|
}
|
|
62479
62560
|
checkSortedColumnInMeasures(definition) {
|
|
62561
|
+
definition = this.repairSortedColumn(definition);
|
|
62480
62562
|
const measures = definition.measures.map((measure) => measure.id);
|
|
62481
62563
|
if (definition.sortedColumn && !measures.includes(definition.sortedColumn.measure)) {
|
|
62482
62564
|
return "InvalidDefinition" /* CommandResult.InvalidDefinition */;
|
|
@@ -62490,6 +62572,26 @@ class PivotCorePlugin extends CorePlugin {
|
|
|
62490
62572
|
}
|
|
62491
62573
|
return "Success" /* CommandResult.Success */;
|
|
62492
62574
|
}
|
|
62575
|
+
repairSortedColumn(definition) {
|
|
62576
|
+
if (definition.sortedColumn) {
|
|
62577
|
+
// Fix for an upgrade issue: the sortedColumn measure was not updated
|
|
62578
|
+
// from using fieldName to using id. If the sortedColumn measure matches
|
|
62579
|
+
// a measure fieldName in the definition, update it to use the measure's id instead
|
|
62580
|
+
// of its fieldName.
|
|
62581
|
+
// TODO: add an upgrade step to fix this in master and remove this code
|
|
62582
|
+
const sortedMeasure = definition.measures.find((measure) => measure.fieldName === definition.sortedColumn?.measure);
|
|
62583
|
+
if (sortedMeasure) {
|
|
62584
|
+
return {
|
|
62585
|
+
...definition,
|
|
62586
|
+
sortedColumn: {
|
|
62587
|
+
...definition.sortedColumn,
|
|
62588
|
+
measure: sortedMeasure.id,
|
|
62589
|
+
},
|
|
62590
|
+
};
|
|
62591
|
+
}
|
|
62592
|
+
}
|
|
62593
|
+
return definition;
|
|
62594
|
+
}
|
|
62493
62595
|
// ---------------------------------------------------------------------
|
|
62494
62596
|
// Import/Export
|
|
62495
62597
|
// ---------------------------------------------------------------------
|
|
@@ -71133,9 +71235,10 @@ class FilterEvaluationPlugin extends UIPlugin {
|
|
|
71133
71235
|
const filteredZone = filter.filteredRange?.zone;
|
|
71134
71236
|
if (!filteredValues || !filteredZone)
|
|
71135
71237
|
continue;
|
|
71238
|
+
const filteredValuesSet = new Set(filteredValues);
|
|
71136
71239
|
for (let row = filteredZone.top; row <= filteredZone.bottom; row++) {
|
|
71137
71240
|
const value = this.getCellValueAsString(sheetId, filter.col, row);
|
|
71138
|
-
if (
|
|
71241
|
+
if (filteredValuesSet.has(value)) {
|
|
71139
71242
|
hiddenRows.add(row);
|
|
71140
71243
|
}
|
|
71141
71244
|
}
|
|
@@ -71649,11 +71752,6 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
71649
71752
|
},
|
|
71650
71753
|
];
|
|
71651
71754
|
const sheetId = this.getActiveSheetId();
|
|
71652
|
-
const handler = new CellClipboardHandler(this.getters, this.dispatch);
|
|
71653
|
-
const data = handler.copy(getClipboardDataPositions(sheetId, target));
|
|
71654
|
-
if (!data) {
|
|
71655
|
-
return;
|
|
71656
|
-
}
|
|
71657
71755
|
const base = isBasedBefore ? cmd.base : cmd.base + 1;
|
|
71658
71756
|
const pasteTarget = [
|
|
71659
71757
|
{
|
|
@@ -71663,7 +71761,14 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
71663
71761
|
bottom: !isCol ? base + thickness - 1 : this.getters.getNumberRows(cmd.sheetId) - 1,
|
|
71664
71762
|
},
|
|
71665
71763
|
];
|
|
71666
|
-
|
|
71764
|
+
for (const Handler of clipboardHandlersRegistries.cellHandlers.getAll()) {
|
|
71765
|
+
const handler = new Handler(this.getters, this.dispatch);
|
|
71766
|
+
const data = handler.copy(getClipboardDataPositions(sheetId, target));
|
|
71767
|
+
if (!data) {
|
|
71768
|
+
continue;
|
|
71769
|
+
}
|
|
71770
|
+
handler.paste({ zones: pasteTarget, sheetId }, data, { isCutOperation: true });
|
|
71771
|
+
}
|
|
71667
71772
|
const selection = pasteTarget[0];
|
|
71668
71773
|
const col = selection.left;
|
|
71669
71774
|
const row = selection.top;
|
|
@@ -80563,6 +80668,6 @@ exports.tokenColors = tokenColors;
|
|
|
80563
80668
|
exports.tokenize = tokenize;
|
|
80564
80669
|
|
|
80565
80670
|
|
|
80566
|
-
__info__.version = "18.3.
|
|
80567
|
-
__info__.date = "2025-
|
|
80568
|
-
__info__.hash = "
|
|
80671
|
+
__info__.version = "18.3.8";
|
|
80672
|
+
__info__.date = "2025-06-12T09:51:55.929Z";
|
|
80673
|
+
__info__.hash = "32dedd1";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as chart_js from 'chart.js';
|
|
2
|
-
import { ChartConfiguration, ChartDataset, CoreChartOptions, Scriptable, Color as Color$1, ScriptableContext, FontSpec, Point, ChartType as ChartType$1 } from 'chart.js';
|
|
2
|
+
import { ChartConfiguration, ChartDataset, CoreChartOptions, Scriptable, Color as Color$1, ScriptableContext, FontSpec, Point, ChartType as ChartType$1, ChartMeta } from 'chart.js';
|
|
3
3
|
import * as ChartGeo from 'chartjs-chart-geo';
|
|
4
4
|
import * as GeoJSON$1 from 'geojson';
|
|
5
5
|
import * as _odoo_owl from '@odoo/owl';
|
|
@@ -5064,6 +5064,7 @@ declare class PivotCorePlugin extends CorePlugin<CoreState> implements CoreState
|
|
|
5064
5064
|
private replaceMeasureFormula;
|
|
5065
5065
|
private checkSortedColumnInMeasures;
|
|
5066
5066
|
private checkDuplicatedMeasureIds;
|
|
5067
|
+
private repairSortedColumn;
|
|
5067
5068
|
/**
|
|
5068
5069
|
* Import the pivots
|
|
5069
5070
|
*/
|
|
@@ -6531,7 +6532,7 @@ interface ChartShowValuesPluginOptions {
|
|
|
6531
6532
|
showValues: boolean;
|
|
6532
6533
|
background?: Color;
|
|
6533
6534
|
horizontal?: boolean;
|
|
6534
|
-
callback: (value: number | string,
|
|
6535
|
+
callback: (value: number | string, dataset: ChartMeta, index: number) => string;
|
|
6535
6536
|
}
|
|
6536
6537
|
declare module "chart.js" {
|
|
6537
6538
|
interface PluginOptionsByType<TType extends ChartType$1> {
|
|
@@ -12524,6 +12525,8 @@ declare const chartHelpers: {
|
|
|
12524
12525
|
}>;
|
|
12525
12526
|
getChartShowValues(definition: ChartWithDataSetDefinition, args: ChartRuntimeGenerationArgs): ChartShowValuesPluginOptions;
|
|
12526
12527
|
getSunburstShowValues(definition: SunburstChartDefinition, args: ChartRuntimeGenerationArgs): ChartSunburstLabelsPluginOptions;
|
|
12528
|
+
getPyramidChartShowValues(definition: ChartWithDataSetDefinition, args: ChartRuntimeGenerationArgs): ChartShowValuesPluginOptions;
|
|
12529
|
+
getWaterfallChartShowValues(definition: WaterfallChartDefinition, args: ChartRuntimeGenerationArgs): ChartShowValuesPluginOptions;
|
|
12527
12530
|
getChartTitle(definition: ChartWithDataSetDefinition): chart_js_dist_types_utils._DeepPartialObject<chart_js.TitleOptions>;
|
|
12528
12531
|
getBarChartTooltip(definition: GenericDefinition<BarChartDefinition>, args: ChartRuntimeGenerationArgs): chart_js_dist_types_utils._DeepPartialObject<chart_js.TooltipOptions<any>>;
|
|
12529
12532
|
getLineChartTooltip(definition: GenericDefinition<LineChartDefinition>, args: ChartRuntimeGenerationArgs): chart_js_dist_types_utils._DeepPartialObject<chart_js.TooltipOptions<any>>;
|