@odoo/o-spreadsheet 18.2.15 → 18.2.17
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 +156 -52
- package/dist/o-spreadsheet.d.ts +5 -2
- package/dist/o-spreadsheet.esm.js +156 -52
- package/dist/o-spreadsheet.iife.js +156 -52
- package/dist/o-spreadsheet.iife.min.js +227 -227
- 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.2.
|
|
6
|
-
* @date 2025-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.2.17
|
|
6
|
+
* @date 2025-06-12T09:52:15.050Z
|
|
7
|
+
* @hash ea64209
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -5856,7 +5856,9 @@ function isTextFormat(format) {
|
|
|
5856
5856
|
}
|
|
5857
5857
|
|
|
5858
5858
|
function evaluateLiteral(literalCell, localeFormat) {
|
|
5859
|
-
const value = isTextFormat(localeFormat.format)
|
|
5859
|
+
const value = isTextFormat(localeFormat.format) && literalCell.parsedValue !== null
|
|
5860
|
+
? literalCell.content
|
|
5861
|
+
: literalCell.parsedValue;
|
|
5860
5862
|
const functionResult = { value, format: localeFormat.format };
|
|
5861
5863
|
return createEvaluatedCell(functionResult, localeFormat.locale);
|
|
5862
5864
|
}
|
|
@@ -5905,6 +5907,9 @@ function _createEvaluatedCell(functionResult, locale, cell) {
|
|
|
5905
5907
|
if (isEvaluationError(value)) {
|
|
5906
5908
|
return errorCell(value, message);
|
|
5907
5909
|
}
|
|
5910
|
+
if (value === null) {
|
|
5911
|
+
return emptyCell(format);
|
|
5912
|
+
}
|
|
5908
5913
|
if (isTextFormat(format)) {
|
|
5909
5914
|
// TO DO:
|
|
5910
5915
|
// with the next line, the value of the cell is transformed depending on the format.
|
|
@@ -5912,9 +5917,6 @@ function _createEvaluatedCell(functionResult, locale, cell) {
|
|
|
5912
5917
|
// to interpret the value as a number.
|
|
5913
5918
|
return textCell(toString(value), format, formattedValue);
|
|
5914
5919
|
}
|
|
5915
|
-
if (value === null) {
|
|
5916
|
-
return emptyCell(format);
|
|
5917
|
-
}
|
|
5918
5920
|
if (typeof value === "number") {
|
|
5919
5921
|
if (isDateTimeFormat(format || "")) {
|
|
5920
5922
|
return dateTimeCell(value, format, formattedValue);
|
|
@@ -10372,8 +10374,6 @@ function drawLineOrBarOrRadarChartValues(chart, options, ctx) {
|
|
|
10372
10374
|
if (isNaN(value)) {
|
|
10373
10375
|
continue;
|
|
10374
10376
|
}
|
|
10375
|
-
const axisId = chart.config.type === "radar" ? dataset.rAxisID : dataset.yAxisID;
|
|
10376
|
-
const displayValue = options.callback(Number(value), axisId);
|
|
10377
10377
|
const point = dataset.data[i];
|
|
10378
10378
|
const xPosition = point.x;
|
|
10379
10379
|
let yPosition = 0;
|
|
@@ -10397,7 +10397,8 @@ function drawLineOrBarOrRadarChartValues(chart, options, ctx) {
|
|
|
10397
10397
|
textsPositions[xPosition].push(yPosition);
|
|
10398
10398
|
ctx.fillStyle = point.options.backgroundColor;
|
|
10399
10399
|
ctx.strokeStyle = options.background || "#ffffff";
|
|
10400
|
-
|
|
10400
|
+
const valueToDisplay = options.callback(Number(value), dataset, i);
|
|
10401
|
+
drawTextWithBackground(valueToDisplay, xPosition, yPosition, ctx);
|
|
10401
10402
|
}
|
|
10402
10403
|
}
|
|
10403
10404
|
}
|
|
@@ -10414,7 +10415,7 @@ function drawHorizontalBarChartValues(chart, options, ctx) {
|
|
|
10414
10415
|
if (isNaN(value)) {
|
|
10415
10416
|
continue;
|
|
10416
10417
|
}
|
|
10417
|
-
const displayValue = options.callback(value, dataset
|
|
10418
|
+
const displayValue = options.callback(value, dataset, i);
|
|
10418
10419
|
const point = dataset.data[i];
|
|
10419
10420
|
const yPosition = point.y;
|
|
10420
10421
|
let xPosition = value < 0 ? point.x + point.width / 2 : point.x - point.width / 2;
|
|
@@ -10449,10 +10450,22 @@ function drawPieChartValues(chart, options, ctx) {
|
|
|
10449
10450
|
const midAngle = (startAngle + endAngle) / 2;
|
|
10450
10451
|
const midRadius = (innerRadius + outerRadius) / 2;
|
|
10451
10452
|
const x = bar.x + midRadius * Math.cos(midAngle);
|
|
10452
|
-
const y = bar.y + midRadius * Math.sin(midAngle)
|
|
10453
|
+
const y = bar.y + midRadius * Math.sin(midAngle);
|
|
10454
|
+
const displayValue = options.callback(value, dataset, i);
|
|
10455
|
+
const textHeight = 12; // ChartJS default
|
|
10456
|
+
const textWidth = computeTextWidth(ctx, displayValue, { fontSize: textHeight }, "px");
|
|
10457
|
+
const radius = outerRadius - innerRadius;
|
|
10458
|
+
// Check if the text fits in the slice. Not perfect, but good enough heuristic.
|
|
10459
|
+
if (textWidth >= radius || radius < textHeight) {
|
|
10460
|
+
continue;
|
|
10461
|
+
}
|
|
10462
|
+
const sliceAngle = endAngle - startAngle;
|
|
10463
|
+
const midWidth = 2 * midRadius * Math.tan(sliceAngle / 2);
|
|
10464
|
+
if (sliceAngle < Math.PI / 2 && (textWidth >= midWidth || midWidth < textHeight)) {
|
|
10465
|
+
continue;
|
|
10466
|
+
}
|
|
10453
10467
|
ctx.fillStyle = chartFontColor(options.background);
|
|
10454
10468
|
ctx.strokeStyle = options.background || "#ffffff";
|
|
10455
|
-
const displayValue = options.callback(value, "y");
|
|
10456
10469
|
drawTextWithBackground(displayValue, x, y, ctx);
|
|
10457
10470
|
}
|
|
10458
10471
|
}
|
|
@@ -26218,7 +26231,7 @@ class XlsxBaseExtractor {
|
|
|
26218
26231
|
*/
|
|
26219
26232
|
handleMissingValue(parentElement, missingElementName, optionalArgs) {
|
|
26220
26233
|
if (optionalArgs?.required) {
|
|
26221
|
-
if (optionalArgs?.default) {
|
|
26234
|
+
if (optionalArgs?.default !== undefined) {
|
|
26222
26235
|
this.warningManager.addParsingWarning(`Missing required ${missingElementName} in element <${parentElement.tagName}> of ${this.currentFile}, replacing it by the default value ${optionalArgs.default}`);
|
|
26223
26236
|
}
|
|
26224
26237
|
else {
|
|
@@ -30085,9 +30098,51 @@ function getChartShowValues(definition, args) {
|
|
|
30085
30098
|
horizontal: "horizontal" in definition && definition.horizontal,
|
|
30086
30099
|
showValues: "showValues" in definition ? !!definition.showValues : false,
|
|
30087
30100
|
background: definition.background,
|
|
30088
|
-
callback:
|
|
30101
|
+
callback: (value, dataset) => {
|
|
30102
|
+
const axisId = getDatasetAxisId(definition, dataset);
|
|
30103
|
+
return formatChartDatasetValue(axisFormats, locale)(value, axisId);
|
|
30104
|
+
},
|
|
30089
30105
|
};
|
|
30090
30106
|
}
|
|
30107
|
+
function getPyramidChartShowValues(definition, args) {
|
|
30108
|
+
const { axisFormats, locale } = args;
|
|
30109
|
+
return {
|
|
30110
|
+
horizontal: true,
|
|
30111
|
+
showValues: "showValues" in definition ? !!definition.showValues : false,
|
|
30112
|
+
background: definition.background,
|
|
30113
|
+
callback: (value, dataset) => {
|
|
30114
|
+
value = Math.abs(Number(value));
|
|
30115
|
+
return formatChartDatasetValue(axisFormats, locale)(value, dataset.xAxisID || "x");
|
|
30116
|
+
},
|
|
30117
|
+
};
|
|
30118
|
+
}
|
|
30119
|
+
function getWaterfallChartShowValues(definition, args) {
|
|
30120
|
+
const { axisFormats, locale, dataSetsValues } = args;
|
|
30121
|
+
const subtotalIndexes = dataSetsValues.reduce((subtotalIndexes, ds) => {
|
|
30122
|
+
subtotalIndexes.push((subtotalIndexes.at(-1) || -1) + ds.data.length + 1);
|
|
30123
|
+
return subtotalIndexes;
|
|
30124
|
+
}, []);
|
|
30125
|
+
return {
|
|
30126
|
+
showValues: "showValues" in definition ? !!definition.showValues : false,
|
|
30127
|
+
background: definition.background,
|
|
30128
|
+
callback: (value, dataset, index) => {
|
|
30129
|
+
const raw = dataset._dataset.data[index];
|
|
30130
|
+
const delta = raw[1] - raw[0];
|
|
30131
|
+
let sign = delta >= 0 ? "+" : "";
|
|
30132
|
+
if (definition.showSubTotals && subtotalIndexes.includes(index) && sign === "+") {
|
|
30133
|
+
sign = "";
|
|
30134
|
+
}
|
|
30135
|
+
return `${sign}${formatChartDatasetValue(axisFormats, locale)(delta, dataset.yAxisID)}`;
|
|
30136
|
+
},
|
|
30137
|
+
};
|
|
30138
|
+
}
|
|
30139
|
+
function getDatasetAxisId(definition, dataset) {
|
|
30140
|
+
if (dataset.rAxisID) {
|
|
30141
|
+
return dataset.rAxisID;
|
|
30142
|
+
}
|
|
30143
|
+
const axisId = "horizontal" in definition && definition.horizontal ? dataset.xAxisID : dataset.yAxisID;
|
|
30144
|
+
return axisId || "y";
|
|
30145
|
+
}
|
|
30091
30146
|
|
|
30092
30147
|
function getChartTitle(definition) {
|
|
30093
30148
|
const chartTitle = definition.title;
|
|
@@ -30411,6 +30466,7 @@ var CHART_RUNTIME_HELPERS = /*#__PURE__*/Object.freeze({
|
|
|
30411
30466
|
getPieChartTooltip: getPieChartTooltip,
|
|
30412
30467
|
getPyramidChartData: getPyramidChartData,
|
|
30413
30468
|
getPyramidChartScales: getPyramidChartScales,
|
|
30469
|
+
getPyramidChartShowValues: getPyramidChartShowValues,
|
|
30414
30470
|
getPyramidChartTooltip: getPyramidChartTooltip,
|
|
30415
30471
|
getRadarChartData: getRadarChartData,
|
|
30416
30472
|
getRadarChartDatasets: getRadarChartDatasets,
|
|
@@ -30424,6 +30480,7 @@ var CHART_RUNTIME_HELPERS = /*#__PURE__*/Object.freeze({
|
|
|
30424
30480
|
getTrendDatasetForLineChart: getTrendDatasetForLineChart,
|
|
30425
30481
|
getWaterfallChartLegend: getWaterfallChartLegend,
|
|
30426
30482
|
getWaterfallChartScales: getWaterfallChartScales,
|
|
30483
|
+
getWaterfallChartShowValues: getWaterfallChartShowValues,
|
|
30427
30484
|
getWaterfallChartTooltip: getWaterfallChartTooltip,
|
|
30428
30485
|
getWaterfallDatasetAndLabels: getWaterfallDatasetAndLabels
|
|
30429
30486
|
});
|
|
@@ -31556,7 +31613,7 @@ function createPyramidChartRuntime(chart, getters) {
|
|
|
31556
31613
|
title: getChartTitle(definition),
|
|
31557
31614
|
legend: getBarChartLegend(definition),
|
|
31558
31615
|
tooltip: getPyramidChartTooltip(definition, chartData),
|
|
31559
|
-
chartShowValuesPlugin:
|
|
31616
|
+
chartShowValuesPlugin: getPyramidChartShowValues(definition, chartData),
|
|
31560
31617
|
},
|
|
31561
31618
|
},
|
|
31562
31619
|
};
|
|
@@ -32019,7 +32076,7 @@ function createWaterfallChartRuntime(chart, getters) {
|
|
|
32019
32076
|
title: getChartTitle(definition),
|
|
32020
32077
|
legend: getWaterfallChartLegend(definition),
|
|
32021
32078
|
tooltip: getWaterfallChartTooltip(definition, chartData),
|
|
32022
|
-
chartShowValuesPlugin:
|
|
32079
|
+
chartShowValuesPlugin: getWaterfallChartShowValues(definition, chartData),
|
|
32023
32080
|
waterfallLinesPlugin: { showConnectorLines: definition.showConnectorLines },
|
|
32024
32081
|
},
|
|
32025
32082
|
},
|
|
@@ -33371,19 +33428,26 @@ class FilterMenu extends owl.Component {
|
|
|
33371
33428
|
.filter(({ row }) => !this.env.model.getters.isRowHidden(sheetId, row))
|
|
33372
33429
|
.map(({ col, row }) => this.env.model.getters.getEvaluatedCell({ sheetId, col, row }).formattedValue);
|
|
33373
33430
|
const filterValues = this.env.model.getters.getFilterHiddenValues({ sheetId, ...position });
|
|
33374
|
-
const
|
|
33375
|
-
const
|
|
33376
|
-
|
|
33377
|
-
const
|
|
33378
|
-
|
|
33379
|
-
|
|
33380
|
-
|
|
33381
|
-
|
|
33382
|
-
|
|
33383
|
-
|
|
33384
|
-
|
|
33385
|
-
|
|
33386
|
-
|
|
33431
|
+
const normalizedFilteredValues = new Set(filterValues.map(toLowerCase));
|
|
33432
|
+
const set = new Set();
|
|
33433
|
+
const values = [];
|
|
33434
|
+
const addValue = (value) => {
|
|
33435
|
+
const normalizedValue = toLowerCase(value);
|
|
33436
|
+
if (!set.has(normalizedValue)) {
|
|
33437
|
+
values.push({
|
|
33438
|
+
string: value || "",
|
|
33439
|
+
checked: !normalizedFilteredValues.has(normalizedValue),
|
|
33440
|
+
normalizedValue,
|
|
33441
|
+
});
|
|
33442
|
+
set.add(normalizedValue);
|
|
33443
|
+
}
|
|
33444
|
+
};
|
|
33445
|
+
cellValues.forEach(addValue);
|
|
33446
|
+
filterValues.forEach(addValue);
|
|
33447
|
+
return values.sort((val1, val2) => val1.normalizedValue.localeCompare(val2.normalizedValue, undefined, {
|
|
33448
|
+
numeric: true,
|
|
33449
|
+
sensitivity: "base",
|
|
33450
|
+
}));
|
|
33387
33451
|
}
|
|
33388
33452
|
checkValue(value) {
|
|
33389
33453
|
this.state.selectedValue = value.string;
|
|
@@ -44665,13 +44729,15 @@ class FindAndReplaceStore extends SpreadsheetStore {
|
|
|
44665
44729
|
if (this.selectedMatchIndex === null) {
|
|
44666
44730
|
return;
|
|
44667
44731
|
}
|
|
44732
|
+
this.preserveSelectedMatchIndex = true;
|
|
44733
|
+
this.shouldFinalizeUpdateSelection = true;
|
|
44668
44734
|
this.model.dispatch("REPLACE_SEARCH", {
|
|
44669
44735
|
searchString: this.toSearch,
|
|
44670
44736
|
replaceWith: this.toReplace,
|
|
44671
44737
|
matches: [this.searchMatches[this.selectedMatchIndex]],
|
|
44672
44738
|
searchOptions: this.searchOptions,
|
|
44673
44739
|
});
|
|
44674
|
-
this.
|
|
44740
|
+
this.preserveSelectedMatchIndex = false;
|
|
44675
44741
|
}
|
|
44676
44742
|
/**
|
|
44677
44743
|
* Apply the replace function to all the matches one time.
|
|
@@ -52272,6 +52338,9 @@ function useTouchScroll(ref, updateScroll, canMoveUp) {
|
|
|
52272
52338
|
let deltaX = lastX - clientX;
|
|
52273
52339
|
let deltaY = lastY - clientY;
|
|
52274
52340
|
const elapsedTime = currentTime - lastTime;
|
|
52341
|
+
if (!elapsedTime) {
|
|
52342
|
+
return;
|
|
52343
|
+
}
|
|
52275
52344
|
velocityX = deltaX / elapsedTime;
|
|
52276
52345
|
velocityY = deltaY / elapsedTime;
|
|
52277
52346
|
lastX = clientX;
|
|
@@ -52292,6 +52361,11 @@ function useTouchScroll(ref, updateScroll, canMoveUp) {
|
|
|
52292
52361
|
function onTouchEnd(ev) {
|
|
52293
52362
|
isMouseDown = false;
|
|
52294
52363
|
lastX = lastY = 0;
|
|
52364
|
+
if (resetTimeout) {
|
|
52365
|
+
clearTimeout(resetTimeout);
|
|
52366
|
+
}
|
|
52367
|
+
velocityX *= 1.2;
|
|
52368
|
+
velocityY *= 1.2;
|
|
52295
52369
|
requestAnimationFrame(scroll);
|
|
52296
52370
|
}
|
|
52297
52371
|
function scroll() {
|
|
@@ -58540,7 +58614,9 @@ class TablePlugin extends CorePlugin {
|
|
|
58540
58614
|
const ranges = cmd.ranges.map((rangeData) => this.getters.getRangeFromRangeData(rangeData));
|
|
58541
58615
|
const union = this.getters.getRangesUnion(ranges);
|
|
58542
58616
|
const mergesInTarget = this.getters.getMergesInZone(cmd.sheetId, union.zone);
|
|
58543
|
-
|
|
58617
|
+
if (mergesInTarget.length) {
|
|
58618
|
+
this.dispatch("REMOVE_MERGE", { sheetId: cmd.sheetId, target: mergesInTarget });
|
|
58619
|
+
}
|
|
58544
58620
|
const id = this.consumeNextId();
|
|
58545
58621
|
const config = cmd.config || DEFAULT_TABLE_CONFIG;
|
|
58546
58622
|
const newTable = cmd.tableType === "dynamic"
|
|
@@ -58639,14 +58715,16 @@ class TablePlugin extends CorePlugin {
|
|
|
58639
58715
|
const zoneToCheckIfEmpty = direction === "down"
|
|
58640
58716
|
? { ...zone, bottom: zone.bottom + 1, top: zone.bottom + 1 }
|
|
58641
58717
|
: { ...zone, right: zone.right + 1, left: zone.right + 1 };
|
|
58642
|
-
for (
|
|
58643
|
-
|
|
58644
|
-
|
|
58645
|
-
|
|
58646
|
-
|
|
58647
|
-
|
|
58648
|
-
|
|
58649
|
-
|
|
58718
|
+
for (let row = zoneToCheckIfEmpty.top; row <= zoneToCheckIfEmpty.bottom; row++) {
|
|
58719
|
+
for (let col = zoneToCheckIfEmpty.left; col <= zoneToCheckIfEmpty.right; col++) {
|
|
58720
|
+
const cellPosition = { sheetId, col, row };
|
|
58721
|
+
// Since this plugin is loaded before CellPlugin, the getters still give us the old cell content
|
|
58722
|
+
const cellContent = this.getters.getCell(cellPosition)?.content;
|
|
58723
|
+
if (cellContent ||
|
|
58724
|
+
this.getters.isInMerge(cellPosition) ||
|
|
58725
|
+
this.getTablesOverlappingZones(sheetId, [positionToZone(cellPosition)]).length) {
|
|
58726
|
+
return "none";
|
|
58727
|
+
}
|
|
58650
58728
|
}
|
|
58651
58729
|
}
|
|
58652
58730
|
return direction;
|
|
@@ -59432,7 +59510,7 @@ class PivotCorePlugin extends CorePlugin {
|
|
|
59432
59510
|
break;
|
|
59433
59511
|
}
|
|
59434
59512
|
case "UPDATE_PIVOT": {
|
|
59435
|
-
this.history.update("pivots", cmd.pivotId, "definition", deepCopy(cmd.pivot));
|
|
59513
|
+
this.history.update("pivots", cmd.pivotId, "definition", this.repairSortedColumn(deepCopy(cmd.pivot)));
|
|
59436
59514
|
this.compileCalculatedMeasures(cmd.pivot.measures);
|
|
59437
59515
|
break;
|
|
59438
59516
|
}
|
|
@@ -59503,7 +59581,10 @@ class PivotCorePlugin extends CorePlugin {
|
|
|
59503
59581
|
// Private
|
|
59504
59582
|
// -------------------------------------------------------------------------
|
|
59505
59583
|
addPivot(pivotId, pivot, formulaId = this.nextFormulaId.toString()) {
|
|
59506
|
-
this.history.update("pivots", pivotId, {
|
|
59584
|
+
this.history.update("pivots", pivotId, {
|
|
59585
|
+
definition: this.repairSortedColumn(deepCopy(pivot)),
|
|
59586
|
+
formulaId,
|
|
59587
|
+
});
|
|
59507
59588
|
this.compileCalculatedMeasures(pivot.measures);
|
|
59508
59589
|
this.history.update("formulaIds", formulaId, pivotId);
|
|
59509
59590
|
this.history.update("nextFormulaId", this.nextFormulaId + 1);
|
|
@@ -59596,6 +59677,26 @@ class PivotCorePlugin extends CorePlugin {
|
|
|
59596
59677
|
}
|
|
59597
59678
|
return "Success" /* CommandResult.Success */;
|
|
59598
59679
|
}
|
|
59680
|
+
repairSortedColumn(definition) {
|
|
59681
|
+
if (definition.sortedColumn) {
|
|
59682
|
+
// Fix for an upgrade issue: the sortedColumn measure was not updated
|
|
59683
|
+
// from using fieldName to using id. If the sortedColumn measure matches
|
|
59684
|
+
// a measure fieldName in the definition, update it to use the measure's id instead
|
|
59685
|
+
// of its fieldName.
|
|
59686
|
+
// TODO: add an upgrade step to fix this in master and remove this code
|
|
59687
|
+
const sortedMeasure = definition.measures.find((measure) => measure.fieldName === definition.sortedColumn?.measure);
|
|
59688
|
+
if (sortedMeasure) {
|
|
59689
|
+
return {
|
|
59690
|
+
...definition,
|
|
59691
|
+
sortedColumn: {
|
|
59692
|
+
...definition.sortedColumn,
|
|
59693
|
+
measure: sortedMeasure.id,
|
|
59694
|
+
},
|
|
59695
|
+
};
|
|
59696
|
+
}
|
|
59697
|
+
}
|
|
59698
|
+
return definition;
|
|
59699
|
+
}
|
|
59599
59700
|
// ---------------------------------------------------------------------
|
|
59600
59701
|
// Import/Export
|
|
59601
59702
|
// ---------------------------------------------------------------------
|
|
@@ -67997,9 +68098,10 @@ class FilterEvaluationPlugin extends UIPlugin {
|
|
|
67997
68098
|
const filteredZone = filter.filteredRange?.zone;
|
|
67998
68099
|
if (!filteredValues || !filteredZone)
|
|
67999
68100
|
continue;
|
|
68101
|
+
const filteredValuesSet = new Set(filteredValues);
|
|
68000
68102
|
for (let row = filteredZone.top; row <= filteredZone.bottom; row++) {
|
|
68001
68103
|
const value = this.getCellValueAsString(sheetId, filter.col, row);
|
|
68002
|
-
if (
|
|
68104
|
+
if (filteredValuesSet.has(value)) {
|
|
68003
68105
|
hiddenRows.add(row);
|
|
68004
68106
|
}
|
|
68005
68107
|
}
|
|
@@ -68507,11 +68609,6 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
68507
68609
|
},
|
|
68508
68610
|
];
|
|
68509
68611
|
const sheetId = this.getActiveSheetId();
|
|
68510
|
-
const handler = new CellClipboardHandler(this.getters, this.dispatch);
|
|
68511
|
-
const data = handler.copy(getClipboardDataPositions(sheetId, target));
|
|
68512
|
-
if (!data) {
|
|
68513
|
-
return;
|
|
68514
|
-
}
|
|
68515
68612
|
const base = isBasedBefore ? cmd.base : cmd.base + 1;
|
|
68516
68613
|
const pasteTarget = [
|
|
68517
68614
|
{
|
|
@@ -68521,7 +68618,14 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
68521
68618
|
bottom: !isCol ? base + thickness - 1 : this.getters.getNumberRows(cmd.sheetId) - 1,
|
|
68522
68619
|
},
|
|
68523
68620
|
];
|
|
68524
|
-
|
|
68621
|
+
for (const Handler of clipboardHandlersRegistries.cellHandlers.getAll()) {
|
|
68622
|
+
const handler = new Handler(this.getters, this.dispatch);
|
|
68623
|
+
const data = handler.copy(getClipboardDataPositions(sheetId, target));
|
|
68624
|
+
if (!data) {
|
|
68625
|
+
continue;
|
|
68626
|
+
}
|
|
68627
|
+
handler.paste({ zones: pasteTarget, sheetId }, data, { isCutOperation: true });
|
|
68628
|
+
}
|
|
68525
68629
|
const selection = pasteTarget[0];
|
|
68526
68630
|
const col = selection.left;
|
|
68527
68631
|
const row = selection.top;
|
|
@@ -76911,6 +77015,6 @@ exports.tokenColors = tokenColors;
|
|
|
76911
77015
|
exports.tokenize = tokenize;
|
|
76912
77016
|
|
|
76913
77017
|
|
|
76914
|
-
__info__.version = "18.2.
|
|
76915
|
-
__info__.date = "2025-
|
|
76916
|
-
__info__.hash = "
|
|
77018
|
+
__info__.version = "18.2.17";
|
|
77019
|
+
__info__.date = "2025-06-12T09:52:15.050Z";
|
|
77020
|
+
__info__.hash = "ea64209";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as chart_js from 'chart.js';
|
|
2
|
-
import { ChartConfiguration, Point, Chart, Color as Color$1, ChartType as ChartType$1 } from 'chart.js';
|
|
2
|
+
import { ChartConfiguration, Point, Chart, Color as Color$1, 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';
|
|
@@ -4834,6 +4834,7 @@ declare class PivotCorePlugin extends CorePlugin<CoreState> implements CoreState
|
|
|
4834
4834
|
private compileMeasureFormula;
|
|
4835
4835
|
private replaceMeasureFormula;
|
|
4836
4836
|
private checkDuplicatedMeasureIds;
|
|
4837
|
+
private repairSortedColumn;
|
|
4837
4838
|
/**
|
|
4838
4839
|
* Import the pivots
|
|
4839
4840
|
*/
|
|
@@ -6286,7 +6287,7 @@ interface ChartShowValuesPluginOptions {
|
|
|
6286
6287
|
showValues: boolean;
|
|
6287
6288
|
background?: Color;
|
|
6288
6289
|
horizontal?: boolean;
|
|
6289
|
-
callback: (value: number | string,
|
|
6290
|
+
callback: (value: number | string, dataset: ChartMeta, index: number) => string;
|
|
6290
6291
|
}
|
|
6291
6292
|
declare module "chart.js" {
|
|
6292
6293
|
interface PluginOptionsByType<TType extends ChartType$1> {
|
|
@@ -13433,6 +13434,8 @@ declare const chartHelpers: {
|
|
|
13433
13434
|
[key: string]: chart_js.ScaleOptionsByType<"projection" | keyof chart_js.ColorScaleTypeRegistry>;
|
|
13434
13435
|
}>;
|
|
13435
13436
|
getChartShowValues(definition: ChartWithDataSetDefinition, args: ChartRuntimeGenerationArgs): ChartShowValuesPluginOptions;
|
|
13437
|
+
getPyramidChartShowValues(definition: ChartWithDataSetDefinition, args: ChartRuntimeGenerationArgs): ChartShowValuesPluginOptions;
|
|
13438
|
+
getWaterfallChartShowValues(definition: WaterfallChartDefinition, args: ChartRuntimeGenerationArgs): ChartShowValuesPluginOptions;
|
|
13436
13439
|
getChartTitle(definition: ChartWithDataSetDefinition): chart_js_dist_types_utils._DeepPartialObject<chart_js.TitleOptions>;
|
|
13437
13440
|
getBarChartTooltip(definition: GenericDefinition<BarChartDefinition>, args: ChartRuntimeGenerationArgs): chart_js_dist_types_utils._DeepPartialObject<chart_js.TooltipOptions<any>>;
|
|
13438
13441
|
getLineChartTooltip(definition: GenericDefinition<LineChartDefinition>, args: ChartRuntimeGenerationArgs): chart_js_dist_types_utils._DeepPartialObject<chart_js.TooltipOptions<any>>;
|