@odoo/o-spreadsheet 18.0.31 → 18.0.32
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 +44 -23
- package/dist/o-spreadsheet.esm.js +44 -23
- package/dist/o-spreadsheet.iife.js +44 -23
- package/dist/o-spreadsheet.iife.min.js +6 -6
- 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.0.
|
|
6
|
-
* @date 2025-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.0.32
|
|
6
|
+
* @date 2025-06-06T09:29:16.581Z
|
|
7
|
+
* @hash bef1e2b
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -10122,7 +10122,8 @@ function drawLineOrBarChartValues(chart, options, ctx) {
|
|
|
10122
10122
|
textsPositions[xPosition].push(yPosition);
|
|
10123
10123
|
ctx.fillStyle = point.options.backgroundColor;
|
|
10124
10124
|
ctx.strokeStyle = options.background || "#ffffff";
|
|
10125
|
-
|
|
10125
|
+
const valueToDisplay = options.callback(Number(value), dataset, i);
|
|
10126
|
+
drawTextWithBackground(valueToDisplay, xPosition, yPosition, ctx);
|
|
10126
10127
|
}
|
|
10127
10128
|
}
|
|
10128
10129
|
}
|
|
@@ -10136,7 +10137,7 @@ function drawHorizontalBarChartValues(chart, options, ctx) {
|
|
|
10136
10137
|
}
|
|
10137
10138
|
for (let i = 0; i < dataset._parsed.length; i++) {
|
|
10138
10139
|
const value = dataset._parsed[i].x;
|
|
10139
|
-
const displayValue = options.callback(value
|
|
10140
|
+
const displayValue = options.callback(value, dataset, i);
|
|
10140
10141
|
const point = dataset.data[i];
|
|
10141
10142
|
const yPosition = point.y;
|
|
10142
10143
|
let xPosition = value < 0 ? point.x + point.width / 2 : point.x - point.width / 2;
|
|
@@ -10174,7 +10175,7 @@ function drawPieChartValues(chart, options, ctx) {
|
|
|
10174
10175
|
const y = bar.y + midRadius * Math.sin(midAngle) + 7;
|
|
10175
10176
|
ctx.fillStyle = chartFontColor(options.background);
|
|
10176
10177
|
ctx.strokeStyle = options.background || "#ffffff";
|
|
10177
|
-
const displayValue = options.callback(value);
|
|
10178
|
+
const displayValue = options.callback(value, dataset, i);
|
|
10178
10179
|
drawTextWithBackground(displayValue, x, y, ctx);
|
|
10179
10180
|
}
|
|
10180
10181
|
}
|
|
@@ -30891,7 +30892,7 @@ function createPyramidChartRuntime(chart, getters) {
|
|
|
30891
30892
|
return tooltipLabelCallback(tooltipItem);
|
|
30892
30893
|
};
|
|
30893
30894
|
const callback = config.options.plugins.chartShowValuesPlugin.callback;
|
|
30894
|
-
config.options.plugins.chartShowValuesPlugin.callback = (
|
|
30895
|
+
config.options.plugins.chartShowValuesPlugin.callback = (value, dataset, index) => callback(Math.abs(value), dataset, index);
|
|
30895
30896
|
return { chartJsConfig: config, background: chart.background || BACKGROUND_CHART_COLOR };
|
|
30896
30897
|
}
|
|
30897
30898
|
|
|
@@ -31166,7 +31167,7 @@ class WaterfallChart extends AbstractChart {
|
|
|
31166
31167
|
return new WaterfallChart(definition, this.sheetId, this.getters);
|
|
31167
31168
|
}
|
|
31168
31169
|
}
|
|
31169
|
-
function getWaterfallConfiguration(chart, labels, dataSeriesLabels, localeFormat) {
|
|
31170
|
+
function getWaterfallConfiguration(chart, labels, dataSeriesLabels, localeFormat, dataSetsValues) {
|
|
31170
31171
|
const { locale, format } = localeFormat;
|
|
31171
31172
|
const fontColor = chartFontColor(chart.background);
|
|
31172
31173
|
const config = getDefaultChartJsRuntime(chart, labels, fontColor, localeFormat);
|
|
@@ -31259,10 +31260,22 @@ function getWaterfallConfiguration(chart, labels, dataSeriesLabels, localeFormat
|
|
|
31259
31260
|
},
|
|
31260
31261
|
};
|
|
31261
31262
|
config.options.plugins.waterfallLinesPlugin = { showConnectorLines: chart.showConnectorLines };
|
|
31263
|
+
const subtotalIndexes = dataSetsValues.reduce((subtotalIndexes, ds) => {
|
|
31264
|
+
subtotalIndexes.push((subtotalIndexes.at(-1) || -1) + ds.data.length + 1);
|
|
31265
|
+
return subtotalIndexes;
|
|
31266
|
+
}, []);
|
|
31262
31267
|
config.options.plugins.chartShowValuesPlugin = {
|
|
31263
31268
|
showValues: chart.showValues,
|
|
31264
31269
|
background: chart.background,
|
|
31265
|
-
callback:
|
|
31270
|
+
callback: (value, dataset, index) => {
|
|
31271
|
+
const raw = dataset._dataset.data[index];
|
|
31272
|
+
const delta = raw[1] - raw[0];
|
|
31273
|
+
let sign = delta >= 0 ? "+" : "";
|
|
31274
|
+
if (chart.showSubTotals && subtotalIndexes.includes(index) && sign === "+") {
|
|
31275
|
+
sign = "";
|
|
31276
|
+
}
|
|
31277
|
+
return `${sign}${formatTickValue(localeFormat)(delta)}`;
|
|
31278
|
+
},
|
|
31266
31279
|
};
|
|
31267
31280
|
return config;
|
|
31268
31281
|
}
|
|
@@ -31283,10 +31296,7 @@ function createWaterfallChartRuntime(chart, getters) {
|
|
|
31283
31296
|
const dataSetFormat = getChartDatasetFormat(getters, chart.dataSets);
|
|
31284
31297
|
const locale = getters.getLocale();
|
|
31285
31298
|
const dataSeriesLabels = dataSetsValues.map((dataSet) => dataSet.label);
|
|
31286
|
-
const config = getWaterfallConfiguration(chart, labels, dataSeriesLabels, {
|
|
31287
|
-
format: dataSetFormat,
|
|
31288
|
-
locale,
|
|
31289
|
-
});
|
|
31299
|
+
const config = getWaterfallConfiguration(chart, labels, dataSeriesLabels, { format: dataSetFormat, locale }, dataSetsValues);
|
|
31290
31300
|
config.type = "bar";
|
|
31291
31301
|
const negativeColor = chart.negativeValuesColor || CHART_WATERFALL_NEGATIVE_COLOR;
|
|
31292
31302
|
const positiveColor = chart.positiveValuesColor || CHART_WATERFALL_POSITIVE_COLOR;
|
|
@@ -42347,13 +42357,14 @@ class FindAndReplaceStore extends SpreadsheetStore {
|
|
|
42347
42357
|
if (this.selectedMatchIndex === null) {
|
|
42348
42358
|
return;
|
|
42349
42359
|
}
|
|
42360
|
+
this.preserveSelectedMatchIndex = true;
|
|
42350
42361
|
this.model.dispatch("REPLACE_SEARCH", {
|
|
42351
42362
|
searchString: this.toSearch,
|
|
42352
42363
|
replaceWith: this.toReplace,
|
|
42353
42364
|
matches: [this.searchMatches[this.selectedMatchIndex]],
|
|
42354
42365
|
searchOptions: this.searchOptions,
|
|
42355
42366
|
});
|
|
42356
|
-
this.
|
|
42367
|
+
this.preserveSelectedMatchIndex = false;
|
|
42357
42368
|
}
|
|
42358
42369
|
/**
|
|
42359
42370
|
* Apply the replace function to all the matches one time.
|
|
@@ -49698,6 +49709,9 @@ function useTouchScroll(ref, updateScroll, canMoveUp) {
|
|
|
49698
49709
|
let deltaX = lastX - clientX;
|
|
49699
49710
|
let deltaY = lastY - clientY;
|
|
49700
49711
|
const elapsedTime = currentTime - lastTime;
|
|
49712
|
+
if (!elapsedTime) {
|
|
49713
|
+
return;
|
|
49714
|
+
}
|
|
49701
49715
|
velocityX = deltaX / elapsedTime;
|
|
49702
49716
|
velocityY = deltaY / elapsedTime;
|
|
49703
49717
|
lastX = clientX;
|
|
@@ -49718,6 +49732,11 @@ function useTouchScroll(ref, updateScroll, canMoveUp) {
|
|
|
49718
49732
|
function onTouchEnd(ev) {
|
|
49719
49733
|
isMouseDown = false;
|
|
49720
49734
|
lastX = lastY = 0;
|
|
49735
|
+
if (resetTimeout) {
|
|
49736
|
+
clearTimeout(resetTimeout);
|
|
49737
|
+
}
|
|
49738
|
+
velocityX *= 1.2;
|
|
49739
|
+
velocityY *= 1.2;
|
|
49721
49740
|
requestAnimationFrame(scroll);
|
|
49722
49741
|
}
|
|
49723
49742
|
function scroll() {
|
|
@@ -65970,11 +65989,6 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
65970
65989
|
},
|
|
65971
65990
|
];
|
|
65972
65991
|
const sheetId = this.getActiveSheetId();
|
|
65973
|
-
const handler = new CellClipboardHandler(this.getters, this.dispatch);
|
|
65974
|
-
const data = handler.copy(getClipboardDataPositions(sheetId, target));
|
|
65975
|
-
if (!data) {
|
|
65976
|
-
return;
|
|
65977
|
-
}
|
|
65978
65992
|
const base = isBasedBefore ? cmd.base : cmd.base + 1;
|
|
65979
65993
|
const pasteTarget = [
|
|
65980
65994
|
{
|
|
@@ -65984,7 +65998,14 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
65984
65998
|
bottom: !isCol ? base + thickness - 1 : this.getters.getNumberRows(cmd.sheetId) - 1,
|
|
65985
65999
|
},
|
|
65986
66000
|
];
|
|
65987
|
-
|
|
66001
|
+
for (const Handler of clipboardHandlersRegistries.cellHandlers.getAll()) {
|
|
66002
|
+
const handler = new Handler(this.getters, this.dispatch);
|
|
66003
|
+
const data = handler.copy(getClipboardDataPositions(sheetId, target));
|
|
66004
|
+
if (!data) {
|
|
66005
|
+
continue;
|
|
66006
|
+
}
|
|
66007
|
+
handler.paste({ zones: pasteTarget, sheetId }, data, { isCutOperation: true });
|
|
66008
|
+
}
|
|
65988
66009
|
const selection = pasteTarget[0];
|
|
65989
66010
|
const col = selection.left;
|
|
65990
66011
|
const row = selection.top;
|
|
@@ -74400,6 +74421,6 @@ exports.tokenColors = tokenColors;
|
|
|
74400
74421
|
exports.tokenize = tokenize;
|
|
74401
74422
|
|
|
74402
74423
|
|
|
74403
|
-
__info__.version = "18.0.
|
|
74404
|
-
__info__.date = "2025-
|
|
74405
|
-
__info__.hash = "
|
|
74424
|
+
__info__.version = "18.0.32";
|
|
74425
|
+
__info__.date = "2025-06-06T09:29:16.581Z";
|
|
74426
|
+
__info__.hash = "bef1e2b";
|
|
@@ -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.0.
|
|
6
|
-
* @date 2025-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.0.32
|
|
6
|
+
* @date 2025-06-06T09:29:16.581Z
|
|
7
|
+
* @hash bef1e2b
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, useState, onPatched, onWillPatch, onWillUpdateProps, useExternalListener, onWillStart, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
|
|
@@ -10120,7 +10120,8 @@ function drawLineOrBarChartValues(chart, options, ctx) {
|
|
|
10120
10120
|
textsPositions[xPosition].push(yPosition);
|
|
10121
10121
|
ctx.fillStyle = point.options.backgroundColor;
|
|
10122
10122
|
ctx.strokeStyle = options.background || "#ffffff";
|
|
10123
|
-
|
|
10123
|
+
const valueToDisplay = options.callback(Number(value), dataset, i);
|
|
10124
|
+
drawTextWithBackground(valueToDisplay, xPosition, yPosition, ctx);
|
|
10124
10125
|
}
|
|
10125
10126
|
}
|
|
10126
10127
|
}
|
|
@@ -10134,7 +10135,7 @@ function drawHorizontalBarChartValues(chart, options, ctx) {
|
|
|
10134
10135
|
}
|
|
10135
10136
|
for (let i = 0; i < dataset._parsed.length; i++) {
|
|
10136
10137
|
const value = dataset._parsed[i].x;
|
|
10137
|
-
const displayValue = options.callback(value
|
|
10138
|
+
const displayValue = options.callback(value, dataset, i);
|
|
10138
10139
|
const point = dataset.data[i];
|
|
10139
10140
|
const yPosition = point.y;
|
|
10140
10141
|
let xPosition = value < 0 ? point.x + point.width / 2 : point.x - point.width / 2;
|
|
@@ -10172,7 +10173,7 @@ function drawPieChartValues(chart, options, ctx) {
|
|
|
10172
10173
|
const y = bar.y + midRadius * Math.sin(midAngle) + 7;
|
|
10173
10174
|
ctx.fillStyle = chartFontColor(options.background);
|
|
10174
10175
|
ctx.strokeStyle = options.background || "#ffffff";
|
|
10175
|
-
const displayValue = options.callback(value);
|
|
10176
|
+
const displayValue = options.callback(value, dataset, i);
|
|
10176
10177
|
drawTextWithBackground(displayValue, x, y, ctx);
|
|
10177
10178
|
}
|
|
10178
10179
|
}
|
|
@@ -30889,7 +30890,7 @@ function createPyramidChartRuntime(chart, getters) {
|
|
|
30889
30890
|
return tooltipLabelCallback(tooltipItem);
|
|
30890
30891
|
};
|
|
30891
30892
|
const callback = config.options.plugins.chartShowValuesPlugin.callback;
|
|
30892
|
-
config.options.plugins.chartShowValuesPlugin.callback = (
|
|
30893
|
+
config.options.plugins.chartShowValuesPlugin.callback = (value, dataset, index) => callback(Math.abs(value), dataset, index);
|
|
30893
30894
|
return { chartJsConfig: config, background: chart.background || BACKGROUND_CHART_COLOR };
|
|
30894
30895
|
}
|
|
30895
30896
|
|
|
@@ -31164,7 +31165,7 @@ class WaterfallChart extends AbstractChart {
|
|
|
31164
31165
|
return new WaterfallChart(definition, this.sheetId, this.getters);
|
|
31165
31166
|
}
|
|
31166
31167
|
}
|
|
31167
|
-
function getWaterfallConfiguration(chart, labels, dataSeriesLabels, localeFormat) {
|
|
31168
|
+
function getWaterfallConfiguration(chart, labels, dataSeriesLabels, localeFormat, dataSetsValues) {
|
|
31168
31169
|
const { locale, format } = localeFormat;
|
|
31169
31170
|
const fontColor = chartFontColor(chart.background);
|
|
31170
31171
|
const config = getDefaultChartJsRuntime(chart, labels, fontColor, localeFormat);
|
|
@@ -31257,10 +31258,22 @@ function getWaterfallConfiguration(chart, labels, dataSeriesLabels, localeFormat
|
|
|
31257
31258
|
},
|
|
31258
31259
|
};
|
|
31259
31260
|
config.options.plugins.waterfallLinesPlugin = { showConnectorLines: chart.showConnectorLines };
|
|
31261
|
+
const subtotalIndexes = dataSetsValues.reduce((subtotalIndexes, ds) => {
|
|
31262
|
+
subtotalIndexes.push((subtotalIndexes.at(-1) || -1) + ds.data.length + 1);
|
|
31263
|
+
return subtotalIndexes;
|
|
31264
|
+
}, []);
|
|
31260
31265
|
config.options.plugins.chartShowValuesPlugin = {
|
|
31261
31266
|
showValues: chart.showValues,
|
|
31262
31267
|
background: chart.background,
|
|
31263
|
-
callback:
|
|
31268
|
+
callback: (value, dataset, index) => {
|
|
31269
|
+
const raw = dataset._dataset.data[index];
|
|
31270
|
+
const delta = raw[1] - raw[0];
|
|
31271
|
+
let sign = delta >= 0 ? "+" : "";
|
|
31272
|
+
if (chart.showSubTotals && subtotalIndexes.includes(index) && sign === "+") {
|
|
31273
|
+
sign = "";
|
|
31274
|
+
}
|
|
31275
|
+
return `${sign}${formatTickValue(localeFormat)(delta)}`;
|
|
31276
|
+
},
|
|
31264
31277
|
};
|
|
31265
31278
|
return config;
|
|
31266
31279
|
}
|
|
@@ -31281,10 +31294,7 @@ function createWaterfallChartRuntime(chart, getters) {
|
|
|
31281
31294
|
const dataSetFormat = getChartDatasetFormat(getters, chart.dataSets);
|
|
31282
31295
|
const locale = getters.getLocale();
|
|
31283
31296
|
const dataSeriesLabels = dataSetsValues.map((dataSet) => dataSet.label);
|
|
31284
|
-
const config = getWaterfallConfiguration(chart, labels, dataSeriesLabels, {
|
|
31285
|
-
format: dataSetFormat,
|
|
31286
|
-
locale,
|
|
31287
|
-
});
|
|
31297
|
+
const config = getWaterfallConfiguration(chart, labels, dataSeriesLabels, { format: dataSetFormat, locale }, dataSetsValues);
|
|
31288
31298
|
config.type = "bar";
|
|
31289
31299
|
const negativeColor = chart.negativeValuesColor || CHART_WATERFALL_NEGATIVE_COLOR;
|
|
31290
31300
|
const positiveColor = chart.positiveValuesColor || CHART_WATERFALL_POSITIVE_COLOR;
|
|
@@ -42345,13 +42355,14 @@ class FindAndReplaceStore extends SpreadsheetStore {
|
|
|
42345
42355
|
if (this.selectedMatchIndex === null) {
|
|
42346
42356
|
return;
|
|
42347
42357
|
}
|
|
42358
|
+
this.preserveSelectedMatchIndex = true;
|
|
42348
42359
|
this.model.dispatch("REPLACE_SEARCH", {
|
|
42349
42360
|
searchString: this.toSearch,
|
|
42350
42361
|
replaceWith: this.toReplace,
|
|
42351
42362
|
matches: [this.searchMatches[this.selectedMatchIndex]],
|
|
42352
42363
|
searchOptions: this.searchOptions,
|
|
42353
42364
|
});
|
|
42354
|
-
this.
|
|
42365
|
+
this.preserveSelectedMatchIndex = false;
|
|
42355
42366
|
}
|
|
42356
42367
|
/**
|
|
42357
42368
|
* Apply the replace function to all the matches one time.
|
|
@@ -49696,6 +49707,9 @@ function useTouchScroll(ref, updateScroll, canMoveUp) {
|
|
|
49696
49707
|
let deltaX = lastX - clientX;
|
|
49697
49708
|
let deltaY = lastY - clientY;
|
|
49698
49709
|
const elapsedTime = currentTime - lastTime;
|
|
49710
|
+
if (!elapsedTime) {
|
|
49711
|
+
return;
|
|
49712
|
+
}
|
|
49699
49713
|
velocityX = deltaX / elapsedTime;
|
|
49700
49714
|
velocityY = deltaY / elapsedTime;
|
|
49701
49715
|
lastX = clientX;
|
|
@@ -49716,6 +49730,11 @@ function useTouchScroll(ref, updateScroll, canMoveUp) {
|
|
|
49716
49730
|
function onTouchEnd(ev) {
|
|
49717
49731
|
isMouseDown = false;
|
|
49718
49732
|
lastX = lastY = 0;
|
|
49733
|
+
if (resetTimeout) {
|
|
49734
|
+
clearTimeout(resetTimeout);
|
|
49735
|
+
}
|
|
49736
|
+
velocityX *= 1.2;
|
|
49737
|
+
velocityY *= 1.2;
|
|
49719
49738
|
requestAnimationFrame(scroll);
|
|
49720
49739
|
}
|
|
49721
49740
|
function scroll() {
|
|
@@ -65968,11 +65987,6 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
65968
65987
|
},
|
|
65969
65988
|
];
|
|
65970
65989
|
const sheetId = this.getActiveSheetId();
|
|
65971
|
-
const handler = new CellClipboardHandler(this.getters, this.dispatch);
|
|
65972
|
-
const data = handler.copy(getClipboardDataPositions(sheetId, target));
|
|
65973
|
-
if (!data) {
|
|
65974
|
-
return;
|
|
65975
|
-
}
|
|
65976
65990
|
const base = isBasedBefore ? cmd.base : cmd.base + 1;
|
|
65977
65991
|
const pasteTarget = [
|
|
65978
65992
|
{
|
|
@@ -65982,7 +65996,14 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
65982
65996
|
bottom: !isCol ? base + thickness - 1 : this.getters.getNumberRows(cmd.sheetId) - 1,
|
|
65983
65997
|
},
|
|
65984
65998
|
];
|
|
65985
|
-
|
|
65999
|
+
for (const Handler of clipboardHandlersRegistries.cellHandlers.getAll()) {
|
|
66000
|
+
const handler = new Handler(this.getters, this.dispatch);
|
|
66001
|
+
const data = handler.copy(getClipboardDataPositions(sheetId, target));
|
|
66002
|
+
if (!data) {
|
|
66003
|
+
continue;
|
|
66004
|
+
}
|
|
66005
|
+
handler.paste({ zones: pasteTarget, sheetId }, data, { isCutOperation: true });
|
|
66006
|
+
}
|
|
65986
66007
|
const selection = pasteTarget[0];
|
|
65987
66008
|
const col = selection.left;
|
|
65988
66009
|
const row = selection.top;
|
|
@@ -74355,6 +74376,6 @@ const constants = {
|
|
|
74355
74376
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
74356
74377
|
|
|
74357
74378
|
|
|
74358
|
-
__info__.version = "18.0.
|
|
74359
|
-
__info__.date = "2025-
|
|
74360
|
-
__info__.hash = "
|
|
74379
|
+
__info__.version = "18.0.32";
|
|
74380
|
+
__info__.date = "2025-06-06T09:29:16.581Z";
|
|
74381
|
+
__info__.hash = "bef1e2b";
|
|
@@ -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.0.
|
|
6
|
-
* @date 2025-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.0.32
|
|
6
|
+
* @date 2025-06-06T09:29:16.581Z
|
|
7
|
+
* @hash bef1e2b
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -10121,7 +10121,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
10121
10121
|
textsPositions[xPosition].push(yPosition);
|
|
10122
10122
|
ctx.fillStyle = point.options.backgroundColor;
|
|
10123
10123
|
ctx.strokeStyle = options.background || "#ffffff";
|
|
10124
|
-
|
|
10124
|
+
const valueToDisplay = options.callback(Number(value), dataset, i);
|
|
10125
|
+
drawTextWithBackground(valueToDisplay, xPosition, yPosition, ctx);
|
|
10125
10126
|
}
|
|
10126
10127
|
}
|
|
10127
10128
|
}
|
|
@@ -10135,7 +10136,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
10135
10136
|
}
|
|
10136
10137
|
for (let i = 0; i < dataset._parsed.length; i++) {
|
|
10137
10138
|
const value = dataset._parsed[i].x;
|
|
10138
|
-
const displayValue = options.callback(value
|
|
10139
|
+
const displayValue = options.callback(value, dataset, i);
|
|
10139
10140
|
const point = dataset.data[i];
|
|
10140
10141
|
const yPosition = point.y;
|
|
10141
10142
|
let xPosition = value < 0 ? point.x + point.width / 2 : point.x - point.width / 2;
|
|
@@ -10173,7 +10174,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
10173
10174
|
const y = bar.y + midRadius * Math.sin(midAngle) + 7;
|
|
10174
10175
|
ctx.fillStyle = chartFontColor(options.background);
|
|
10175
10176
|
ctx.strokeStyle = options.background || "#ffffff";
|
|
10176
|
-
const displayValue = options.callback(value);
|
|
10177
|
+
const displayValue = options.callback(value, dataset, i);
|
|
10177
10178
|
drawTextWithBackground(displayValue, x, y, ctx);
|
|
10178
10179
|
}
|
|
10179
10180
|
}
|
|
@@ -30890,7 +30891,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
30890
30891
|
return tooltipLabelCallback(tooltipItem);
|
|
30891
30892
|
};
|
|
30892
30893
|
const callback = config.options.plugins.chartShowValuesPlugin.callback;
|
|
30893
|
-
config.options.plugins.chartShowValuesPlugin.callback = (
|
|
30894
|
+
config.options.plugins.chartShowValuesPlugin.callback = (value, dataset, index) => callback(Math.abs(value), dataset, index);
|
|
30894
30895
|
return { chartJsConfig: config, background: chart.background || BACKGROUND_CHART_COLOR };
|
|
30895
30896
|
}
|
|
30896
30897
|
|
|
@@ -31165,7 +31166,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
31165
31166
|
return new WaterfallChart(definition, this.sheetId, this.getters);
|
|
31166
31167
|
}
|
|
31167
31168
|
}
|
|
31168
|
-
function getWaterfallConfiguration(chart, labels, dataSeriesLabels, localeFormat) {
|
|
31169
|
+
function getWaterfallConfiguration(chart, labels, dataSeriesLabels, localeFormat, dataSetsValues) {
|
|
31169
31170
|
const { locale, format } = localeFormat;
|
|
31170
31171
|
const fontColor = chartFontColor(chart.background);
|
|
31171
31172
|
const config = getDefaultChartJsRuntime(chart, labels, fontColor, localeFormat);
|
|
@@ -31258,10 +31259,22 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
31258
31259
|
},
|
|
31259
31260
|
};
|
|
31260
31261
|
config.options.plugins.waterfallLinesPlugin = { showConnectorLines: chart.showConnectorLines };
|
|
31262
|
+
const subtotalIndexes = dataSetsValues.reduce((subtotalIndexes, ds) => {
|
|
31263
|
+
subtotalIndexes.push((subtotalIndexes.at(-1) || -1) + ds.data.length + 1);
|
|
31264
|
+
return subtotalIndexes;
|
|
31265
|
+
}, []);
|
|
31261
31266
|
config.options.plugins.chartShowValuesPlugin = {
|
|
31262
31267
|
showValues: chart.showValues,
|
|
31263
31268
|
background: chart.background,
|
|
31264
|
-
callback:
|
|
31269
|
+
callback: (value, dataset, index) => {
|
|
31270
|
+
const raw = dataset._dataset.data[index];
|
|
31271
|
+
const delta = raw[1] - raw[0];
|
|
31272
|
+
let sign = delta >= 0 ? "+" : "";
|
|
31273
|
+
if (chart.showSubTotals && subtotalIndexes.includes(index) && sign === "+") {
|
|
31274
|
+
sign = "";
|
|
31275
|
+
}
|
|
31276
|
+
return `${sign}${formatTickValue(localeFormat)(delta)}`;
|
|
31277
|
+
},
|
|
31265
31278
|
};
|
|
31266
31279
|
return config;
|
|
31267
31280
|
}
|
|
@@ -31282,10 +31295,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
31282
31295
|
const dataSetFormat = getChartDatasetFormat(getters, chart.dataSets);
|
|
31283
31296
|
const locale = getters.getLocale();
|
|
31284
31297
|
const dataSeriesLabels = dataSetsValues.map((dataSet) => dataSet.label);
|
|
31285
|
-
const config = getWaterfallConfiguration(chart, labels, dataSeriesLabels, {
|
|
31286
|
-
format: dataSetFormat,
|
|
31287
|
-
locale,
|
|
31288
|
-
});
|
|
31298
|
+
const config = getWaterfallConfiguration(chart, labels, dataSeriesLabels, { format: dataSetFormat, locale }, dataSetsValues);
|
|
31289
31299
|
config.type = "bar";
|
|
31290
31300
|
const negativeColor = chart.negativeValuesColor || CHART_WATERFALL_NEGATIVE_COLOR;
|
|
31291
31301
|
const positiveColor = chart.positiveValuesColor || CHART_WATERFALL_POSITIVE_COLOR;
|
|
@@ -42346,13 +42356,14 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
42346
42356
|
if (this.selectedMatchIndex === null) {
|
|
42347
42357
|
return;
|
|
42348
42358
|
}
|
|
42359
|
+
this.preserveSelectedMatchIndex = true;
|
|
42349
42360
|
this.model.dispatch("REPLACE_SEARCH", {
|
|
42350
42361
|
searchString: this.toSearch,
|
|
42351
42362
|
replaceWith: this.toReplace,
|
|
42352
42363
|
matches: [this.searchMatches[this.selectedMatchIndex]],
|
|
42353
42364
|
searchOptions: this.searchOptions,
|
|
42354
42365
|
});
|
|
42355
|
-
this.
|
|
42366
|
+
this.preserveSelectedMatchIndex = false;
|
|
42356
42367
|
}
|
|
42357
42368
|
/**
|
|
42358
42369
|
* Apply the replace function to all the matches one time.
|
|
@@ -49697,6 +49708,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
49697
49708
|
let deltaX = lastX - clientX;
|
|
49698
49709
|
let deltaY = lastY - clientY;
|
|
49699
49710
|
const elapsedTime = currentTime - lastTime;
|
|
49711
|
+
if (!elapsedTime) {
|
|
49712
|
+
return;
|
|
49713
|
+
}
|
|
49700
49714
|
velocityX = deltaX / elapsedTime;
|
|
49701
49715
|
velocityY = deltaY / elapsedTime;
|
|
49702
49716
|
lastX = clientX;
|
|
@@ -49717,6 +49731,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
49717
49731
|
function onTouchEnd(ev) {
|
|
49718
49732
|
isMouseDown = false;
|
|
49719
49733
|
lastX = lastY = 0;
|
|
49734
|
+
if (resetTimeout) {
|
|
49735
|
+
clearTimeout(resetTimeout);
|
|
49736
|
+
}
|
|
49737
|
+
velocityX *= 1.2;
|
|
49738
|
+
velocityY *= 1.2;
|
|
49720
49739
|
requestAnimationFrame(scroll);
|
|
49721
49740
|
}
|
|
49722
49741
|
function scroll() {
|
|
@@ -65969,11 +65988,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
65969
65988
|
},
|
|
65970
65989
|
];
|
|
65971
65990
|
const sheetId = this.getActiveSheetId();
|
|
65972
|
-
const handler = new CellClipboardHandler(this.getters, this.dispatch);
|
|
65973
|
-
const data = handler.copy(getClipboardDataPositions(sheetId, target));
|
|
65974
|
-
if (!data) {
|
|
65975
|
-
return;
|
|
65976
|
-
}
|
|
65977
65991
|
const base = isBasedBefore ? cmd.base : cmd.base + 1;
|
|
65978
65992
|
const pasteTarget = [
|
|
65979
65993
|
{
|
|
@@ -65983,7 +65997,14 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
65983
65997
|
bottom: !isCol ? base + thickness - 1 : this.getters.getNumberRows(cmd.sheetId) - 1,
|
|
65984
65998
|
},
|
|
65985
65999
|
];
|
|
65986
|
-
|
|
66000
|
+
for (const Handler of clipboardHandlersRegistries.cellHandlers.getAll()) {
|
|
66001
|
+
const handler = new Handler(this.getters, this.dispatch);
|
|
66002
|
+
const data = handler.copy(getClipboardDataPositions(sheetId, target));
|
|
66003
|
+
if (!data) {
|
|
66004
|
+
continue;
|
|
66005
|
+
}
|
|
66006
|
+
handler.paste({ zones: pasteTarget, sheetId }, data, { isCutOperation: true });
|
|
66007
|
+
}
|
|
65987
66008
|
const selection = pasteTarget[0];
|
|
65988
66009
|
const col = selection.left;
|
|
65989
66010
|
const row = selection.top;
|
|
@@ -74399,9 +74420,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
74399
74420
|
exports.tokenize = tokenize;
|
|
74400
74421
|
|
|
74401
74422
|
|
|
74402
|
-
__info__.version = "18.0.
|
|
74403
|
-
__info__.date = "2025-
|
|
74404
|
-
__info__.hash = "
|
|
74423
|
+
__info__.version = "18.0.32";
|
|
74424
|
+
__info__.date = "2025-06-06T09:29:16.581Z";
|
|
74425
|
+
__info__.hash = "bef1e2b";
|
|
74405
74426
|
|
|
74406
74427
|
|
|
74407
74428
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|