@odoo/o-spreadsheet 18.1.23 → 18.1.25
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 +217 -217
- 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.1.
|
|
6
|
-
* @date 2025-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.1.25
|
|
6
|
+
* @date 2025-06-12T09:49:08.707Z
|
|
7
|
+
* @hash a232524
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -5847,7 +5847,9 @@ function isTextFormat(format) {
|
|
|
5847
5847
|
}
|
|
5848
5848
|
|
|
5849
5849
|
function evaluateLiteral(literalCell, localeFormat) {
|
|
5850
|
-
const value = isTextFormat(localeFormat.format)
|
|
5850
|
+
const value = isTextFormat(localeFormat.format) && literalCell.parsedValue !== null
|
|
5851
|
+
? literalCell.content
|
|
5852
|
+
: literalCell.parsedValue;
|
|
5851
5853
|
const functionResult = { value, format: localeFormat.format };
|
|
5852
5854
|
return createEvaluatedCell(functionResult, localeFormat.locale);
|
|
5853
5855
|
}
|
|
@@ -5896,6 +5898,9 @@ function _createEvaluatedCell(functionResult, locale, cell) {
|
|
|
5896
5898
|
if (isEvaluationError(value)) {
|
|
5897
5899
|
return errorCell(value, message);
|
|
5898
5900
|
}
|
|
5901
|
+
if (value === null) {
|
|
5902
|
+
return emptyCell(format);
|
|
5903
|
+
}
|
|
5899
5904
|
if (isTextFormat(format)) {
|
|
5900
5905
|
// TO DO:
|
|
5901
5906
|
// with the next line, the value of the cell is transformed depending on the format.
|
|
@@ -5903,9 +5908,6 @@ function _createEvaluatedCell(functionResult, locale, cell) {
|
|
|
5903
5908
|
// to interpret the value as a number.
|
|
5904
5909
|
return textCell(toString(value), format, formattedValue);
|
|
5905
5910
|
}
|
|
5906
|
-
if (value === null) {
|
|
5907
|
-
return emptyCell(format);
|
|
5908
|
-
}
|
|
5909
5911
|
if (typeof value === "number") {
|
|
5910
5912
|
if (isDateTimeFormat(format || "")) {
|
|
5911
5913
|
return dateTimeCell(value, format, formattedValue);
|
|
@@ -10208,8 +10210,6 @@ function drawLineOrBarOrRadarChartValues(chart, options, ctx) {
|
|
|
10208
10210
|
if (isNaN(value)) {
|
|
10209
10211
|
continue;
|
|
10210
10212
|
}
|
|
10211
|
-
const axisId = chart.config.type === "radar" ? dataset.rAxisID : dataset.yAxisID;
|
|
10212
|
-
const displayValue = options.callback(Number(value), axisId);
|
|
10213
10213
|
const point = dataset.data[i];
|
|
10214
10214
|
const xPosition = point.x;
|
|
10215
10215
|
let yPosition = 0;
|
|
@@ -10233,7 +10233,8 @@ function drawLineOrBarOrRadarChartValues(chart, options, ctx) {
|
|
|
10233
10233
|
textsPositions[xPosition].push(yPosition);
|
|
10234
10234
|
ctx.fillStyle = point.options.backgroundColor;
|
|
10235
10235
|
ctx.strokeStyle = options.background || "#ffffff";
|
|
10236
|
-
|
|
10236
|
+
const valueToDisplay = options.callback(Number(value), dataset, i);
|
|
10237
|
+
drawTextWithBackground(valueToDisplay, xPosition, yPosition, ctx);
|
|
10237
10238
|
}
|
|
10238
10239
|
}
|
|
10239
10240
|
}
|
|
@@ -10250,7 +10251,7 @@ function drawHorizontalBarChartValues(chart, options, ctx) {
|
|
|
10250
10251
|
if (isNaN(value)) {
|
|
10251
10252
|
continue;
|
|
10252
10253
|
}
|
|
10253
|
-
const displayValue = options.callback(value, dataset
|
|
10254
|
+
const displayValue = options.callback(value, dataset, i);
|
|
10254
10255
|
const point = dataset.data[i];
|
|
10255
10256
|
const yPosition = point.y;
|
|
10256
10257
|
let xPosition = value < 0 ? point.x + point.width / 2 : point.x - point.width / 2;
|
|
@@ -10285,10 +10286,22 @@ function drawPieChartValues(chart, options, ctx) {
|
|
|
10285
10286
|
const midAngle = (startAngle + endAngle) / 2;
|
|
10286
10287
|
const midRadius = (innerRadius + outerRadius) / 2;
|
|
10287
10288
|
const x = bar.x + midRadius * Math.cos(midAngle);
|
|
10288
|
-
const y = bar.y + midRadius * Math.sin(midAngle)
|
|
10289
|
+
const y = bar.y + midRadius * Math.sin(midAngle);
|
|
10290
|
+
const displayValue = options.callback(value, dataset, i);
|
|
10291
|
+
const textHeight = 12; // ChartJS default
|
|
10292
|
+
const textWidth = computeTextWidth(ctx, displayValue, { fontSize: textHeight }, "px");
|
|
10293
|
+
const radius = outerRadius - innerRadius;
|
|
10294
|
+
// Check if the text fits in the slice. Not perfect, but good enough heuristic.
|
|
10295
|
+
if (textWidth >= radius || radius < textHeight) {
|
|
10296
|
+
continue;
|
|
10297
|
+
}
|
|
10298
|
+
const sliceAngle = endAngle - startAngle;
|
|
10299
|
+
const midWidth = 2 * midRadius * Math.tan(sliceAngle / 2);
|
|
10300
|
+
if (sliceAngle < Math.PI / 2 && (textWidth >= midWidth || midWidth < textHeight)) {
|
|
10301
|
+
continue;
|
|
10302
|
+
}
|
|
10289
10303
|
ctx.fillStyle = chartFontColor(options.background);
|
|
10290
10304
|
ctx.strokeStyle = options.background || "#ffffff";
|
|
10291
|
-
const displayValue = options.callback(value, "y");
|
|
10292
10305
|
drawTextWithBackground(displayValue, x, y, ctx);
|
|
10293
10306
|
}
|
|
10294
10307
|
}
|
|
@@ -26194,7 +26207,7 @@ class XlsxBaseExtractor {
|
|
|
26194
26207
|
*/
|
|
26195
26208
|
handleMissingValue(parentElement, missingElementName, optionalArgs) {
|
|
26196
26209
|
if (optionalArgs?.required) {
|
|
26197
|
-
if (optionalArgs?.default) {
|
|
26210
|
+
if (optionalArgs?.default !== undefined) {
|
|
26198
26211
|
this.warningManager.addParsingWarning(`Missing required ${missingElementName} in element <${parentElement.tagName}> of ${this.currentFile}, replacing it by the default value ${optionalArgs.default}`);
|
|
26199
26212
|
}
|
|
26200
26213
|
else {
|
|
@@ -30053,9 +30066,51 @@ function getChartShowValues(definition, args) {
|
|
|
30053
30066
|
horizontal: "horizontal" in definition && definition.horizontal,
|
|
30054
30067
|
showValues: "showValues" in definition ? !!definition.showValues : false,
|
|
30055
30068
|
background: definition.background,
|
|
30056
|
-
callback:
|
|
30069
|
+
callback: (value, dataset) => {
|
|
30070
|
+
const axisId = getDatasetAxisId(definition, dataset);
|
|
30071
|
+
return formatChartDatasetValue(axisFormats, locale)(value, axisId);
|
|
30072
|
+
},
|
|
30057
30073
|
};
|
|
30058
30074
|
}
|
|
30075
|
+
function getPyramidChartShowValues(definition, args) {
|
|
30076
|
+
const { axisFormats, locale } = args;
|
|
30077
|
+
return {
|
|
30078
|
+
horizontal: true,
|
|
30079
|
+
showValues: "showValues" in definition ? !!definition.showValues : false,
|
|
30080
|
+
background: definition.background,
|
|
30081
|
+
callback: (value, dataset) => {
|
|
30082
|
+
value = Math.abs(Number(value));
|
|
30083
|
+
return formatChartDatasetValue(axisFormats, locale)(value, dataset.xAxisID || "x");
|
|
30084
|
+
},
|
|
30085
|
+
};
|
|
30086
|
+
}
|
|
30087
|
+
function getWaterfallChartShowValues(definition, args) {
|
|
30088
|
+
const { axisFormats, locale, dataSetsValues } = args;
|
|
30089
|
+
const subtotalIndexes = dataSetsValues.reduce((subtotalIndexes, ds) => {
|
|
30090
|
+
subtotalIndexes.push((subtotalIndexes.at(-1) || -1) + ds.data.length + 1);
|
|
30091
|
+
return subtotalIndexes;
|
|
30092
|
+
}, []);
|
|
30093
|
+
return {
|
|
30094
|
+
showValues: "showValues" in definition ? !!definition.showValues : false,
|
|
30095
|
+
background: definition.background,
|
|
30096
|
+
callback: (value, dataset, index) => {
|
|
30097
|
+
const raw = dataset._dataset.data[index];
|
|
30098
|
+
const delta = raw[1] - raw[0];
|
|
30099
|
+
let sign = delta >= 0 ? "+" : "";
|
|
30100
|
+
if (definition.showSubTotals && subtotalIndexes.includes(index) && sign === "+") {
|
|
30101
|
+
sign = "";
|
|
30102
|
+
}
|
|
30103
|
+
return `${sign}${formatChartDatasetValue(axisFormats, locale)(delta, dataset.yAxisID)}`;
|
|
30104
|
+
},
|
|
30105
|
+
};
|
|
30106
|
+
}
|
|
30107
|
+
function getDatasetAxisId(definition, dataset) {
|
|
30108
|
+
if (dataset.rAxisID) {
|
|
30109
|
+
return dataset.rAxisID;
|
|
30110
|
+
}
|
|
30111
|
+
const axisId = "horizontal" in definition && definition.horizontal ? dataset.xAxisID : dataset.yAxisID;
|
|
30112
|
+
return axisId || "y";
|
|
30113
|
+
}
|
|
30059
30114
|
|
|
30060
30115
|
function getChartTitle(definition) {
|
|
30061
30116
|
const chartTitle = definition.title;
|
|
@@ -30264,6 +30319,7 @@ var CHART_RUNTIME_HELPERS = /*#__PURE__*/Object.freeze({
|
|
|
30264
30319
|
getPieChartTooltip: getPieChartTooltip,
|
|
30265
30320
|
getPyramidChartData: getPyramidChartData,
|
|
30266
30321
|
getPyramidChartScales: getPyramidChartScales,
|
|
30322
|
+
getPyramidChartShowValues: getPyramidChartShowValues,
|
|
30267
30323
|
getPyramidChartTooltip: getPyramidChartTooltip,
|
|
30268
30324
|
getRadarChartData: getRadarChartData,
|
|
30269
30325
|
getRadarChartDatasets: getRadarChartDatasets,
|
|
@@ -30277,6 +30333,7 @@ var CHART_RUNTIME_HELPERS = /*#__PURE__*/Object.freeze({
|
|
|
30277
30333
|
getTrendDatasetForLineChart: getTrendDatasetForLineChart,
|
|
30278
30334
|
getWaterfallChartLegend: getWaterfallChartLegend,
|
|
30279
30335
|
getWaterfallChartScales: getWaterfallChartScales,
|
|
30336
|
+
getWaterfallChartShowValues: getWaterfallChartShowValues,
|
|
30280
30337
|
getWaterfallChartTooltip: getWaterfallChartTooltip,
|
|
30281
30338
|
getWaterfallDatasetAndLabels: getWaterfallDatasetAndLabels
|
|
30282
30339
|
});
|
|
@@ -31375,7 +31432,7 @@ function createPyramidChartRuntime(chart, getters) {
|
|
|
31375
31432
|
title: getChartTitle(definition),
|
|
31376
31433
|
legend: getBarChartLegend(definition),
|
|
31377
31434
|
tooltip: getPyramidChartTooltip(definition, chartData),
|
|
31378
|
-
chartShowValuesPlugin:
|
|
31435
|
+
chartShowValuesPlugin: getPyramidChartShowValues(definition, chartData),
|
|
31379
31436
|
},
|
|
31380
31437
|
},
|
|
31381
31438
|
};
|
|
@@ -31838,7 +31895,7 @@ function createWaterfallChartRuntime(chart, getters) {
|
|
|
31838
31895
|
title: getChartTitle(definition),
|
|
31839
31896
|
legend: getWaterfallChartLegend(definition),
|
|
31840
31897
|
tooltip: getWaterfallChartTooltip(definition, chartData),
|
|
31841
|
-
chartShowValuesPlugin:
|
|
31898
|
+
chartShowValuesPlugin: getWaterfallChartShowValues(definition, chartData),
|
|
31842
31899
|
waterfallLinesPlugin: { showConnectorLines: definition.showConnectorLines },
|
|
31843
31900
|
},
|
|
31844
31901
|
},
|
|
@@ -33172,19 +33229,26 @@ class FilterMenu extends owl.Component {
|
|
|
33172
33229
|
.filter(({ row }) => !this.env.model.getters.isRowHidden(sheetId, row))
|
|
33173
33230
|
.map(({ col, row }) => this.env.model.getters.getEvaluatedCell({ sheetId, col, row }).formattedValue);
|
|
33174
33231
|
const filterValues = this.env.model.getters.getFilterHiddenValues({ sheetId, ...position });
|
|
33175
|
-
const
|
|
33176
|
-
const
|
|
33177
|
-
|
|
33178
|
-
const
|
|
33179
|
-
|
|
33180
|
-
|
|
33181
|
-
|
|
33182
|
-
|
|
33183
|
-
|
|
33184
|
-
|
|
33185
|
-
|
|
33186
|
-
|
|
33187
|
-
|
|
33232
|
+
const normalizedFilteredValues = new Set(filterValues.map(toLowerCase));
|
|
33233
|
+
const set = new Set();
|
|
33234
|
+
const values = [];
|
|
33235
|
+
const addValue = (value) => {
|
|
33236
|
+
const normalizedValue = toLowerCase(value);
|
|
33237
|
+
if (!set.has(normalizedValue)) {
|
|
33238
|
+
values.push({
|
|
33239
|
+
string: value || "",
|
|
33240
|
+
checked: !normalizedFilteredValues.has(normalizedValue),
|
|
33241
|
+
normalizedValue,
|
|
33242
|
+
});
|
|
33243
|
+
set.add(normalizedValue);
|
|
33244
|
+
}
|
|
33245
|
+
};
|
|
33246
|
+
cellValues.forEach(addValue);
|
|
33247
|
+
filterValues.forEach(addValue);
|
|
33248
|
+
return values.sort((val1, val2) => val1.normalizedValue.localeCompare(val2.normalizedValue, undefined, {
|
|
33249
|
+
numeric: true,
|
|
33250
|
+
sensitivity: "base",
|
|
33251
|
+
}));
|
|
33188
33252
|
}
|
|
33189
33253
|
checkValue(value) {
|
|
33190
33254
|
this.state.selectedValue = value.string;
|
|
@@ -44321,13 +44385,15 @@ class FindAndReplaceStore extends SpreadsheetStore {
|
|
|
44321
44385
|
if (this.selectedMatchIndex === null) {
|
|
44322
44386
|
return;
|
|
44323
44387
|
}
|
|
44388
|
+
this.preserveSelectedMatchIndex = true;
|
|
44389
|
+
this.shouldFinalizeUpdateSelection = true;
|
|
44324
44390
|
this.model.dispatch("REPLACE_SEARCH", {
|
|
44325
44391
|
searchString: this.toSearch,
|
|
44326
44392
|
replaceWith: this.toReplace,
|
|
44327
44393
|
matches: [this.searchMatches[this.selectedMatchIndex]],
|
|
44328
44394
|
searchOptions: this.searchOptions,
|
|
44329
44395
|
});
|
|
44330
|
-
this.
|
|
44396
|
+
this.preserveSelectedMatchIndex = false;
|
|
44331
44397
|
}
|
|
44332
44398
|
/**
|
|
44333
44399
|
* Apply the replace function to all the matches one time.
|
|
@@ -51823,6 +51889,9 @@ function useTouchScroll(ref, updateScroll, canMoveUp) {
|
|
|
51823
51889
|
let deltaX = lastX - clientX;
|
|
51824
51890
|
let deltaY = lastY - clientY;
|
|
51825
51891
|
const elapsedTime = currentTime - lastTime;
|
|
51892
|
+
if (!elapsedTime) {
|
|
51893
|
+
return;
|
|
51894
|
+
}
|
|
51826
51895
|
velocityX = deltaX / elapsedTime;
|
|
51827
51896
|
velocityY = deltaY / elapsedTime;
|
|
51828
51897
|
lastX = clientX;
|
|
@@ -51843,6 +51912,11 @@ function useTouchScroll(ref, updateScroll, canMoveUp) {
|
|
|
51843
51912
|
function onTouchEnd(ev) {
|
|
51844
51913
|
isMouseDown = false;
|
|
51845
51914
|
lastX = lastY = 0;
|
|
51915
|
+
if (resetTimeout) {
|
|
51916
|
+
clearTimeout(resetTimeout);
|
|
51917
|
+
}
|
|
51918
|
+
velocityX *= 1.2;
|
|
51919
|
+
velocityY *= 1.2;
|
|
51846
51920
|
requestAnimationFrame(scroll);
|
|
51847
51921
|
}
|
|
51848
51922
|
function scroll() {
|
|
@@ -58042,7 +58116,9 @@ class TablePlugin extends CorePlugin {
|
|
|
58042
58116
|
const ranges = cmd.ranges.map((rangeData) => this.getters.getRangeFromRangeData(rangeData));
|
|
58043
58117
|
const union = this.getters.getRangesUnion(ranges);
|
|
58044
58118
|
const mergesInTarget = this.getters.getMergesInZone(cmd.sheetId, union.zone);
|
|
58045
|
-
|
|
58119
|
+
if (mergesInTarget.length) {
|
|
58120
|
+
this.dispatch("REMOVE_MERGE", { sheetId: cmd.sheetId, target: mergesInTarget });
|
|
58121
|
+
}
|
|
58046
58122
|
const id = `${nextTableId++}`;
|
|
58047
58123
|
const config = cmd.config || DEFAULT_TABLE_CONFIG;
|
|
58048
58124
|
const newTable = cmd.tableType === "dynamic"
|
|
@@ -58153,14 +58229,16 @@ class TablePlugin extends CorePlugin {
|
|
|
58153
58229
|
const zoneToCheckIfEmpty = direction === "down"
|
|
58154
58230
|
? { ...zone, bottom: zone.bottom + 1, top: zone.bottom + 1 }
|
|
58155
58231
|
: { ...zone, right: zone.right + 1, left: zone.right + 1 };
|
|
58156
|
-
for (
|
|
58157
|
-
|
|
58158
|
-
|
|
58159
|
-
|
|
58160
|
-
|
|
58161
|
-
|
|
58162
|
-
|
|
58163
|
-
|
|
58232
|
+
for (let row = zoneToCheckIfEmpty.top; row <= zoneToCheckIfEmpty.bottom; row++) {
|
|
58233
|
+
for (let col = zoneToCheckIfEmpty.left; col <= zoneToCheckIfEmpty.right; col++) {
|
|
58234
|
+
const cellPosition = { sheetId, col, row };
|
|
58235
|
+
// Since this plugin is loaded before CellPlugin, the getters still give us the old cell content
|
|
58236
|
+
const cellContent = this.getters.getCell(cellPosition)?.content;
|
|
58237
|
+
if (cellContent ||
|
|
58238
|
+
this.getters.isInMerge(cellPosition) ||
|
|
58239
|
+
this.getTablesOverlappingZones(sheetId, [positionToZone(cellPosition)]).length) {
|
|
58240
|
+
return "none";
|
|
58241
|
+
}
|
|
58164
58242
|
}
|
|
58165
58243
|
}
|
|
58166
58244
|
return direction;
|
|
@@ -58944,7 +59022,7 @@ class PivotCorePlugin extends CorePlugin {
|
|
|
58944
59022
|
break;
|
|
58945
59023
|
}
|
|
58946
59024
|
case "UPDATE_PIVOT": {
|
|
58947
|
-
this.history.update("pivots", cmd.pivotId, "definition", deepCopy(cmd.pivot));
|
|
59025
|
+
this.history.update("pivots", cmd.pivotId, "definition", this.repairSortedColumn(deepCopy(cmd.pivot)));
|
|
58948
59026
|
this.compileCalculatedMeasures(cmd.pivot.measures);
|
|
58949
59027
|
break;
|
|
58950
59028
|
}
|
|
@@ -59015,7 +59093,10 @@ class PivotCorePlugin extends CorePlugin {
|
|
|
59015
59093
|
// Private
|
|
59016
59094
|
// -------------------------------------------------------------------------
|
|
59017
59095
|
addPivot(pivotId, pivot, formulaId = this.nextFormulaId.toString()) {
|
|
59018
|
-
this.history.update("pivots", pivotId, {
|
|
59096
|
+
this.history.update("pivots", pivotId, {
|
|
59097
|
+
definition: this.repairSortedColumn(deepCopy(pivot)),
|
|
59098
|
+
formulaId,
|
|
59099
|
+
});
|
|
59019
59100
|
this.compileCalculatedMeasures(pivot.measures);
|
|
59020
59101
|
this.history.update("formulaIds", formulaId, pivotId);
|
|
59021
59102
|
this.history.update("nextFormulaId", this.nextFormulaId + 1);
|
|
@@ -59108,6 +59189,26 @@ class PivotCorePlugin extends CorePlugin {
|
|
|
59108
59189
|
}
|
|
59109
59190
|
return "Success" /* CommandResult.Success */;
|
|
59110
59191
|
}
|
|
59192
|
+
repairSortedColumn(definition) {
|
|
59193
|
+
if (definition.sortedColumn) {
|
|
59194
|
+
// Fix for an upgrade issue: the sortedColumn measure was not updated
|
|
59195
|
+
// from using fieldName to using id. If the sortedColumn measure matches
|
|
59196
|
+
// a measure fieldName in the definition, update it to use the measure's id instead
|
|
59197
|
+
// of its fieldName.
|
|
59198
|
+
// TODO: add an upgrade step to fix this in master and remove this code
|
|
59199
|
+
const sortedMeasure = definition.measures.find((measure) => measure.fieldName === definition.sortedColumn?.measure);
|
|
59200
|
+
if (sortedMeasure) {
|
|
59201
|
+
return {
|
|
59202
|
+
...definition,
|
|
59203
|
+
sortedColumn: {
|
|
59204
|
+
...definition.sortedColumn,
|
|
59205
|
+
measure: sortedMeasure.id,
|
|
59206
|
+
},
|
|
59207
|
+
};
|
|
59208
|
+
}
|
|
59209
|
+
}
|
|
59210
|
+
return definition;
|
|
59211
|
+
}
|
|
59111
59212
|
// ---------------------------------------------------------------------
|
|
59112
59213
|
// Import/Export
|
|
59113
59214
|
// ---------------------------------------------------------------------
|
|
@@ -67503,9 +67604,10 @@ class FilterEvaluationPlugin extends UIPlugin {
|
|
|
67503
67604
|
const filteredZone = filter.filteredRange?.zone;
|
|
67504
67605
|
if (!filteredValues || !filteredZone)
|
|
67505
67606
|
continue;
|
|
67607
|
+
const filteredValuesSet = new Set(filteredValues);
|
|
67506
67608
|
for (let row = filteredZone.top; row <= filteredZone.bottom; row++) {
|
|
67507
67609
|
const value = this.getCellValueAsString(sheetId, filter.col, row);
|
|
67508
|
-
if (
|
|
67610
|
+
if (filteredValuesSet.has(value)) {
|
|
67509
67611
|
hiddenRows.add(row);
|
|
67510
67612
|
}
|
|
67511
67613
|
}
|
|
@@ -68016,11 +68118,6 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
68016
68118
|
},
|
|
68017
68119
|
];
|
|
68018
68120
|
const sheetId = this.getActiveSheetId();
|
|
68019
|
-
const handler = new CellClipboardHandler(this.getters, this.dispatch);
|
|
68020
|
-
const data = handler.copy(getClipboardDataPositions(sheetId, target));
|
|
68021
|
-
if (!data) {
|
|
68022
|
-
return;
|
|
68023
|
-
}
|
|
68024
68121
|
const base = isBasedBefore ? cmd.base : cmd.base + 1;
|
|
68025
68122
|
const pasteTarget = [
|
|
68026
68123
|
{
|
|
@@ -68030,7 +68127,14 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
68030
68127
|
bottom: !isCol ? base + thickness - 1 : this.getters.getNumberRows(cmd.sheetId) - 1,
|
|
68031
68128
|
},
|
|
68032
68129
|
];
|
|
68033
|
-
|
|
68130
|
+
for (const Handler of clipboardHandlersRegistries.cellHandlers.getAll()) {
|
|
68131
|
+
const handler = new Handler(this.getters, this.dispatch);
|
|
68132
|
+
const data = handler.copy(getClipboardDataPositions(sheetId, target));
|
|
68133
|
+
if (!data) {
|
|
68134
|
+
continue;
|
|
68135
|
+
}
|
|
68136
|
+
handler.paste({ zones: pasteTarget, sheetId }, data, { isCutOperation: true });
|
|
68137
|
+
}
|
|
68034
68138
|
const selection = pasteTarget[0];
|
|
68035
68139
|
const col = selection.left;
|
|
68036
68140
|
const row = selection.top;
|
|
@@ -76433,6 +76537,6 @@ exports.tokenColors = tokenColors;
|
|
|
76433
76537
|
exports.tokenize = tokenize;
|
|
76434
76538
|
|
|
76435
76539
|
|
|
76436
|
-
__info__.version = "18.1.
|
|
76437
|
-
__info__.date = "2025-
|
|
76438
|
-
__info__.hash = "
|
|
76540
|
+
__info__.version = "18.1.25";
|
|
76541
|
+
__info__.date = "2025-06-12T09:49:08.707Z";
|
|
76542
|
+
__info__.hash = "a232524";
|
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';
|
|
@@ -4822,6 +4822,7 @@ declare class PivotCorePlugin extends CorePlugin<CoreState> implements CoreState
|
|
|
4822
4822
|
private compileMeasureFormula;
|
|
4823
4823
|
private replaceMeasureFormula;
|
|
4824
4824
|
private checkDuplicatedMeasureIds;
|
|
4825
|
+
private repairSortedColumn;
|
|
4825
4826
|
/**
|
|
4826
4827
|
* Import the pivots
|
|
4827
4828
|
*/
|
|
@@ -6262,7 +6263,7 @@ interface ChartShowValuesPluginOptions {
|
|
|
6262
6263
|
showValues: boolean;
|
|
6263
6264
|
background?: Color;
|
|
6264
6265
|
horizontal?: boolean;
|
|
6265
|
-
callback: (value: number | string,
|
|
6266
|
+
callback: (value: number | string, dataset: ChartMeta, index: number) => string;
|
|
6266
6267
|
}
|
|
6267
6268
|
declare module "chart.js" {
|
|
6268
6269
|
interface PluginOptionsByType<TType extends ChartType$1> {
|
|
@@ -13276,6 +13277,8 @@ declare const chartHelpers: {
|
|
|
13276
13277
|
[key: string]: chart_js.ScaleOptionsByType<"projection" | keyof chart_js.ColorScaleTypeRegistry>;
|
|
13277
13278
|
}>;
|
|
13278
13279
|
getChartShowValues(definition: ChartWithDataSetDefinition, args: ChartRuntimeGenerationArgs): ChartShowValuesPluginOptions;
|
|
13280
|
+
getPyramidChartShowValues(definition: ChartWithDataSetDefinition, args: ChartRuntimeGenerationArgs): ChartShowValuesPluginOptions;
|
|
13281
|
+
getWaterfallChartShowValues(definition: WaterfallChartDefinition, args: ChartRuntimeGenerationArgs): ChartShowValuesPluginOptions;
|
|
13279
13282
|
getChartTitle(definition: ChartWithDataSetDefinition): chart_js_dist_types_utils._DeepPartialObject<chart_js.TitleOptions>;
|
|
13280
13283
|
getBarChartTooltip(definition: GenericDefinition<BarChartDefinition>, args: ChartRuntimeGenerationArgs): chart_js_dist_types_utils._DeepPartialObject<chart_js.TooltipOptions<any>>;
|
|
13281
13284
|
getLineChartTooltip(definition: GenericDefinition<LineChartDefinition>, args: ChartRuntimeGenerationArgs): chart_js_dist_types_utils._DeepPartialObject<chart_js.TooltipOptions<any>>;
|