@odoo/o-spreadsheet 18.0.45 → 18.0.47
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 +46 -31
- package/dist/o-spreadsheet.esm.js +46 -31
- package/dist/o-spreadsheet.iife.js +46 -31
- package/dist/o-spreadsheet.iife.min.js +6 -6
- package/dist/o_spreadsheet.xml +4 -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.47
|
|
6
|
+
* @date 2025-10-16T06:38:31.658Z
|
|
7
|
+
* @hash 0216b06
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -871,9 +871,7 @@ function removeIndexesFromArray(array, indexes) {
|
|
|
871
871
|
return newArray;
|
|
872
872
|
}
|
|
873
873
|
function insertItemsAtIndex(array, items, index) {
|
|
874
|
-
|
|
875
|
-
newArray.splice(index, 0, ...items);
|
|
876
|
-
return newArray;
|
|
874
|
+
return array.slice(0, index).concat(items).concat(array.slice(index));
|
|
877
875
|
}
|
|
878
876
|
function replaceItemAtIndex(array, newItem, index) {
|
|
879
877
|
const newArray = [...array];
|
|
@@ -3740,7 +3738,17 @@ function toNumberMatrix(data, argName) {
|
|
|
3740
3738
|
return toMatrix(data).map((row) => {
|
|
3741
3739
|
return row.map((cell) => {
|
|
3742
3740
|
if (typeof cell.value !== "number") {
|
|
3743
|
-
|
|
3741
|
+
let message = "";
|
|
3742
|
+
if (typeof cell === "object") {
|
|
3743
|
+
message = _t("Function [[FUNCTION_NAME]] expects number values for %s, but got an empty value.", argName);
|
|
3744
|
+
}
|
|
3745
|
+
else if (typeof cell === "string") {
|
|
3746
|
+
message = _t("Function [[FUNCTION_NAME]] expects number values for %s, but got a string.", argName);
|
|
3747
|
+
}
|
|
3748
|
+
else if (typeof cell === "boolean") {
|
|
3749
|
+
message = _t("Function [[FUNCTION_NAME]] expects number values for %s, but got a boolean.", argName);
|
|
3750
|
+
}
|
|
3751
|
+
throw new EvaluationError(message);
|
|
3744
3752
|
}
|
|
3745
3753
|
return cell.value;
|
|
3746
3754
|
});
|
|
@@ -4940,7 +4948,7 @@ function tokensToTextInternalFormat(tokens) {
|
|
|
4940
4948
|
* Replace in place tokens "mm" and "m" that denote minutes in date format with "MM" to avoid confusion with months.
|
|
4941
4949
|
*
|
|
4942
4950
|
* As per OpenXML specification, in date formats if a date token "m" or "mm" is followed by a date token "s" or
|
|
4943
|
-
* preceded by a data token "h", then it's not a month but
|
|
4951
|
+
* preceded by a data token "h", then it's not a month but a minute.
|
|
4944
4952
|
*/
|
|
4945
4953
|
function convertTokensToMinutesInDateFormat(tokens) {
|
|
4946
4954
|
const dateParts = tokens.filter((token) => token.type === "DATE_PART");
|
|
@@ -4983,6 +4991,9 @@ function internalFormatPartToFormat(internalFormat) {
|
|
|
4983
4991
|
case "REPEATED_CHAR":
|
|
4984
4992
|
format += "*" + token.value;
|
|
4985
4993
|
break;
|
|
4994
|
+
case "DATE_PART":
|
|
4995
|
+
format += token.value === "MM" ? "mm" : token.value; // Convert "MM" back to "mm" for minutes
|
|
4996
|
+
break;
|
|
4986
4997
|
default:
|
|
4987
4998
|
format += token.value;
|
|
4988
4999
|
}
|
|
@@ -8605,7 +8616,7 @@ class CellClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
8605
8616
|
pasteCell(origin, target, clipboardOption) {
|
|
8606
8617
|
const { sheetId, col, row } = target;
|
|
8607
8618
|
const targetCell = this.getters.getEvaluatedCell(target);
|
|
8608
|
-
const originFormat = origin?.format
|
|
8619
|
+
const originFormat = origin?.format || origin.evaluatedCell.format;
|
|
8609
8620
|
if (clipboardOption?.pasteOption === "asValue") {
|
|
8610
8621
|
this.dispatch("UPDATE_CELL", {
|
|
8611
8622
|
...target,
|
|
@@ -10170,6 +10181,10 @@ const chartShowValuesPlugin = {
|
|
|
10170
10181
|
}
|
|
10171
10182
|
const ctx = chart.ctx;
|
|
10172
10183
|
ctx.save();
|
|
10184
|
+
const { left, top, height, width } = chart.chartArea;
|
|
10185
|
+
ctx.beginPath();
|
|
10186
|
+
ctx.rect(left, top, width, height);
|
|
10187
|
+
ctx.clip();
|
|
10173
10188
|
ctx.textAlign = "center";
|
|
10174
10189
|
ctx.textBaseline = "middle";
|
|
10175
10190
|
ctx.miterLimit = 1; // Avoid sharp artifacts on strokeText
|
|
@@ -13108,7 +13123,7 @@ const GROWTH = {
|
|
|
13108
13123
|
],
|
|
13109
13124
|
compute: function (knownDataY, knownDataX = [[]], newDataX = [[]], b = { value: true }) {
|
|
13110
13125
|
assertNonEmptyMatrix(knownDataY, "known_data_y");
|
|
13111
|
-
return expM(predictLinearValues(logM(toNumberMatrix(knownDataY, "
|
|
13126
|
+
return expM(predictLinearValues(logM(toNumberMatrix(knownDataY, "known_data_y")), toNumberMatrix(knownDataX, "known_data_x"), toNumberMatrix(newDataX, "new_data_y"), toBoolean(b)));
|
|
13112
13127
|
},
|
|
13113
13128
|
};
|
|
13114
13129
|
// -----------------------------------------------------------------------------
|
|
@@ -13173,7 +13188,7 @@ const LINEST = {
|
|
|
13173
13188
|
],
|
|
13174
13189
|
compute: function (dataY, dataX = [[]], calculateB = { value: true }, verbose = { value: false }) {
|
|
13175
13190
|
assertNonEmptyMatrix(dataY, "data_y");
|
|
13176
|
-
return fullLinearRegression(toNumberMatrix(dataX, "
|
|
13191
|
+
return fullLinearRegression(toNumberMatrix(dataX, "data_x"), toNumberMatrix(dataY, "data_y"), toBoolean(calculateB), toBoolean(verbose));
|
|
13177
13192
|
},
|
|
13178
13193
|
isExported: true,
|
|
13179
13194
|
};
|
|
@@ -13190,7 +13205,7 @@ const LOGEST = {
|
|
|
13190
13205
|
],
|
|
13191
13206
|
compute: function (dataY, dataX = [[]], calculateB = { value: true }, verbose = { value: false }) {
|
|
13192
13207
|
assertNonEmptyMatrix(dataY, "data_y");
|
|
13193
|
-
const coeffs = fullLinearRegression(toNumberMatrix(dataX, "
|
|
13208
|
+
const coeffs = fullLinearRegression(toNumberMatrix(dataX, "data_x"), logM(toNumberMatrix(dataY, "data_y")), toBoolean(calculateB), toBoolean(verbose));
|
|
13194
13209
|
for (let i = 0; i < coeffs.length; i++) {
|
|
13195
13210
|
coeffs[i][0] = Math.exp(coeffs[i][0]);
|
|
13196
13211
|
}
|
|
@@ -13780,7 +13795,7 @@ const TREND = {
|
|
|
13780
13795
|
],
|
|
13781
13796
|
compute: function (knownDataY, knownDataX = [[]], newDataX = [[]], b = { value: true }) {
|
|
13782
13797
|
assertNonEmptyMatrix(knownDataY, "known_data_y");
|
|
13783
|
-
return predictLinearValues(toNumberMatrix(knownDataY, "
|
|
13798
|
+
return predictLinearValues(toNumberMatrix(knownDataY, "known_data_y"), toNumberMatrix(knownDataX, "known_data_x"), toNumberMatrix(newDataX, "new_data_y"), toBoolean(b));
|
|
13784
13799
|
},
|
|
13785
13800
|
};
|
|
13786
13801
|
// -----------------------------------------------------------------------------
|
|
@@ -29724,6 +29739,7 @@ function getChartTimeOptions(labels, labelFormat, locale) {
|
|
|
29724
29739
|
parser: luxonFormat,
|
|
29725
29740
|
displayFormats,
|
|
29726
29741
|
unit: timeUnit ?? false,
|
|
29742
|
+
tooltipFormat: luxonFormat,
|
|
29727
29743
|
};
|
|
29728
29744
|
}
|
|
29729
29745
|
/**
|
|
@@ -42176,12 +42192,13 @@ class DataValidationEditor extends owl.Component {
|
|
|
42176
42192
|
onCloseSidePanel: { type: Function, optional: true },
|
|
42177
42193
|
};
|
|
42178
42194
|
state = owl.useState({ rule: this.defaultDataValidationRule });
|
|
42195
|
+
editingSheetId;
|
|
42179
42196
|
setup() {
|
|
42197
|
+
this.editingSheetId = this.env.model.getters.getActiveSheetId();
|
|
42180
42198
|
if (this.props.rule) {
|
|
42181
|
-
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
42182
42199
|
this.state.rule = {
|
|
42183
42200
|
...this.props.rule,
|
|
42184
|
-
ranges: this.props.rule.ranges.map((range) => this.env.model.getters.getRangeString(range,
|
|
42201
|
+
ranges: this.props.rule.ranges.map((range) => this.env.model.getters.getRangeString(range, this.editingSheetId)),
|
|
42185
42202
|
};
|
|
42186
42203
|
this.state.rule.criterion.type = this.props.rule.criterion.type;
|
|
42187
42204
|
}
|
|
@@ -42215,7 +42232,6 @@ class DataValidationEditor extends owl.Component {
|
|
|
42215
42232
|
const locale = this.env.model.getters.getLocale();
|
|
42216
42233
|
const criterion = rule.criterion;
|
|
42217
42234
|
const criterionEvaluator = dataValidationEvaluatorRegistry.get(criterion.type);
|
|
42218
|
-
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
42219
42235
|
const values = criterion.values
|
|
42220
42236
|
.slice(0, criterionEvaluator.numberOfValues(criterion))
|
|
42221
42237
|
.map((value) => value?.trim())
|
|
@@ -42223,8 +42239,8 @@ class DataValidationEditor extends owl.Component {
|
|
|
42223
42239
|
.map((value) => canonicalizeContent(value, locale));
|
|
42224
42240
|
rule.criterion = { ...criterion, values };
|
|
42225
42241
|
return {
|
|
42226
|
-
sheetId,
|
|
42227
|
-
ranges: this.state.rule.ranges.map((xc) => this.env.model.getters.getRangeDataFromXc(
|
|
42242
|
+
sheetId: this.editingSheetId,
|
|
42243
|
+
ranges: this.state.rule.ranges.map((xc) => this.env.model.getters.getRangeDataFromXc(this.editingSheetId, xc)),
|
|
42228
42244
|
rule,
|
|
42229
42245
|
};
|
|
42230
42246
|
}
|
|
@@ -54050,7 +54066,7 @@ class HeaderSizePlugin extends CorePlugin {
|
|
|
54050
54066
|
let sizes = [...this.sizes[cmd.sheetId][cmd.dimension]];
|
|
54051
54067
|
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
54052
54068
|
const baseSize = sizes[cmd.base];
|
|
54053
|
-
sizes
|
|
54069
|
+
sizes = insertItemsAtIndex(sizes, Array(cmd.quantity).fill(baseSize), addIndex);
|
|
54054
54070
|
this.history.update("sizes", cmd.sheetId, cmd.dimension, sizes);
|
|
54055
54071
|
break;
|
|
54056
54072
|
}
|
|
@@ -54202,9 +54218,8 @@ class HeaderVisibilityPlugin extends CorePlugin {
|
|
|
54202
54218
|
break;
|
|
54203
54219
|
}
|
|
54204
54220
|
case "ADD_COLUMNS_ROWS": {
|
|
54205
|
-
const hiddenHeaders = [...this.hiddenHeaders[cmd.sheetId][cmd.dimension]];
|
|
54206
54221
|
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
54207
|
-
hiddenHeaders.
|
|
54222
|
+
const hiddenHeaders = insertItemsAtIndex([...this.hiddenHeaders[cmd.sheetId][cmd.dimension]], Array(cmd.quantity).fill(false), addIndex);
|
|
54208
54223
|
this.history.update("hiddenHeaders", cmd.sheetId, cmd.dimension, hiddenHeaders);
|
|
54209
54224
|
break;
|
|
54210
54225
|
}
|
|
@@ -58461,12 +58476,12 @@ class SpreadsheetRTree {
|
|
|
58461
58476
|
this.rTrees[sheetId].remove(item, this.rtreeItemComparer);
|
|
58462
58477
|
}
|
|
58463
58478
|
rtreeItemComparer(left, right) {
|
|
58464
|
-
return (left.
|
|
58465
|
-
left.boundingBox.sheetId === right.boundingBox.sheetId &&
|
|
58479
|
+
return (left.boundingBox.sheetId === right.boundingBox.sheetId &&
|
|
58466
58480
|
left.boundingBox?.zone.left === right.boundingBox.zone.left &&
|
|
58467
58481
|
left.boundingBox?.zone.top === right.boundingBox.zone.top &&
|
|
58468
58482
|
left.boundingBox?.zone.right === right.boundingBox.zone.right &&
|
|
58469
|
-
left.boundingBox?.zone.bottom === right.boundingBox.zone.bottom
|
|
58483
|
+
left.boundingBox?.zone.bottom === right.boundingBox.zone.bottom &&
|
|
58484
|
+
deepEquals(left.data, right.data));
|
|
58470
58485
|
}
|
|
58471
58486
|
}
|
|
58472
58487
|
/**
|
|
@@ -58539,7 +58554,7 @@ class FormulaDependencyGraph {
|
|
|
58539
58554
|
* in the correct order they should be evaluated.
|
|
58540
58555
|
* This is called a topological ordering (excluding cycles)
|
|
58541
58556
|
*/
|
|
58542
|
-
getCellsDependingOn(ranges) {
|
|
58557
|
+
getCellsDependingOn(ranges, ignore) {
|
|
58543
58558
|
const visited = this.createEmptyPositionSet();
|
|
58544
58559
|
const queue = Array.from(ranges).reverse();
|
|
58545
58560
|
while (queue.length > 0) {
|
|
@@ -58554,7 +58569,7 @@ class FormulaDependencyGraph {
|
|
|
58554
58569
|
const impactedPositions = this.rTree.search(range).map((dep) => dep.data);
|
|
58555
58570
|
const nextInQueue = {};
|
|
58556
58571
|
for (const position of impactedPositions) {
|
|
58557
|
-
if (!visited.has(position)) {
|
|
58572
|
+
if (!visited.has(position) && !ignore.has(position)) {
|
|
58558
58573
|
if (!nextInQueue[position.sheetId]) {
|
|
58559
58574
|
nextInQueue[position.sheetId] = [];
|
|
58560
58575
|
}
|
|
@@ -59107,7 +59122,7 @@ class Evaluator {
|
|
|
59107
59122
|
}
|
|
59108
59123
|
invalidatePositionsDependingOnSpread(sheetId, resultZone) {
|
|
59109
59124
|
// the result matrix is split in 2 zones to exclude the array formula position
|
|
59110
|
-
const invalidatedPositions = this.formulaDependencies().getCellsDependingOn(excludeTopLeft(resultZone).map((zone) => ({ sheetId, zone })));
|
|
59125
|
+
const invalidatedPositions = this.formulaDependencies().getCellsDependingOn(excludeTopLeft(resultZone).map((zone) => ({ sheetId, zone })), this.nextPositionsToUpdate);
|
|
59111
59126
|
invalidatedPositions.delete({ sheetId, col: resultZone.left, row: resultZone.top });
|
|
59112
59127
|
this.nextPositionsToUpdate.addMany(invalidatedPositions);
|
|
59113
59128
|
}
|
|
@@ -59222,7 +59237,7 @@ class Evaluator {
|
|
|
59222
59237
|
for (const sheetId in zonesBySheetIds) {
|
|
59223
59238
|
ranges.push(...zonesBySheetIds[sheetId].map((zone) => ({ sheetId, zone })));
|
|
59224
59239
|
}
|
|
59225
|
-
return this.formulaDependencies().getCellsDependingOn(ranges);
|
|
59240
|
+
return this.formulaDependencies().getCellsDependingOn(ranges, this.nextPositionsToUpdate);
|
|
59226
59241
|
}
|
|
59227
59242
|
}
|
|
59228
59243
|
function forEachSpreadPositionInMatrix(nbColumns, nbRows, callback) {
|
|
@@ -74748,6 +74763,6 @@ exports.tokenColors = tokenColors;
|
|
|
74748
74763
|
exports.tokenize = tokenize;
|
|
74749
74764
|
|
|
74750
74765
|
|
|
74751
|
-
__info__.version = "18.0.
|
|
74752
|
-
__info__.date = "2025-
|
|
74753
|
-
__info__.hash = "
|
|
74766
|
+
__info__.version = "18.0.47";
|
|
74767
|
+
__info__.date = "2025-10-16T06:38:31.658Z";
|
|
74768
|
+
__info__.hash = "0216b06";
|
|
@@ -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.47
|
|
6
|
+
* @date 2025-10-16T06:38:31.658Z
|
|
7
|
+
* @hash 0216b06
|
|
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';
|
|
@@ -869,9 +869,7 @@ function removeIndexesFromArray(array, indexes) {
|
|
|
869
869
|
return newArray;
|
|
870
870
|
}
|
|
871
871
|
function insertItemsAtIndex(array, items, index) {
|
|
872
|
-
|
|
873
|
-
newArray.splice(index, 0, ...items);
|
|
874
|
-
return newArray;
|
|
872
|
+
return array.slice(0, index).concat(items).concat(array.slice(index));
|
|
875
873
|
}
|
|
876
874
|
function replaceItemAtIndex(array, newItem, index) {
|
|
877
875
|
const newArray = [...array];
|
|
@@ -3738,7 +3736,17 @@ function toNumberMatrix(data, argName) {
|
|
|
3738
3736
|
return toMatrix(data).map((row) => {
|
|
3739
3737
|
return row.map((cell) => {
|
|
3740
3738
|
if (typeof cell.value !== "number") {
|
|
3741
|
-
|
|
3739
|
+
let message = "";
|
|
3740
|
+
if (typeof cell === "object") {
|
|
3741
|
+
message = _t("Function [[FUNCTION_NAME]] expects number values for %s, but got an empty value.", argName);
|
|
3742
|
+
}
|
|
3743
|
+
else if (typeof cell === "string") {
|
|
3744
|
+
message = _t("Function [[FUNCTION_NAME]] expects number values for %s, but got a string.", argName);
|
|
3745
|
+
}
|
|
3746
|
+
else if (typeof cell === "boolean") {
|
|
3747
|
+
message = _t("Function [[FUNCTION_NAME]] expects number values for %s, but got a boolean.", argName);
|
|
3748
|
+
}
|
|
3749
|
+
throw new EvaluationError(message);
|
|
3742
3750
|
}
|
|
3743
3751
|
return cell.value;
|
|
3744
3752
|
});
|
|
@@ -4938,7 +4946,7 @@ function tokensToTextInternalFormat(tokens) {
|
|
|
4938
4946
|
* Replace in place tokens "mm" and "m" that denote minutes in date format with "MM" to avoid confusion with months.
|
|
4939
4947
|
*
|
|
4940
4948
|
* As per OpenXML specification, in date formats if a date token "m" or "mm" is followed by a date token "s" or
|
|
4941
|
-
* preceded by a data token "h", then it's not a month but
|
|
4949
|
+
* preceded by a data token "h", then it's not a month but a minute.
|
|
4942
4950
|
*/
|
|
4943
4951
|
function convertTokensToMinutesInDateFormat(tokens) {
|
|
4944
4952
|
const dateParts = tokens.filter((token) => token.type === "DATE_PART");
|
|
@@ -4981,6 +4989,9 @@ function internalFormatPartToFormat(internalFormat) {
|
|
|
4981
4989
|
case "REPEATED_CHAR":
|
|
4982
4990
|
format += "*" + token.value;
|
|
4983
4991
|
break;
|
|
4992
|
+
case "DATE_PART":
|
|
4993
|
+
format += token.value === "MM" ? "mm" : token.value; // Convert "MM" back to "mm" for minutes
|
|
4994
|
+
break;
|
|
4984
4995
|
default:
|
|
4985
4996
|
format += token.value;
|
|
4986
4997
|
}
|
|
@@ -8603,7 +8614,7 @@ class CellClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
8603
8614
|
pasteCell(origin, target, clipboardOption) {
|
|
8604
8615
|
const { sheetId, col, row } = target;
|
|
8605
8616
|
const targetCell = this.getters.getEvaluatedCell(target);
|
|
8606
|
-
const originFormat = origin?.format
|
|
8617
|
+
const originFormat = origin?.format || origin.evaluatedCell.format;
|
|
8607
8618
|
if (clipboardOption?.pasteOption === "asValue") {
|
|
8608
8619
|
this.dispatch("UPDATE_CELL", {
|
|
8609
8620
|
...target,
|
|
@@ -10168,6 +10179,10 @@ const chartShowValuesPlugin = {
|
|
|
10168
10179
|
}
|
|
10169
10180
|
const ctx = chart.ctx;
|
|
10170
10181
|
ctx.save();
|
|
10182
|
+
const { left, top, height, width } = chart.chartArea;
|
|
10183
|
+
ctx.beginPath();
|
|
10184
|
+
ctx.rect(left, top, width, height);
|
|
10185
|
+
ctx.clip();
|
|
10171
10186
|
ctx.textAlign = "center";
|
|
10172
10187
|
ctx.textBaseline = "middle";
|
|
10173
10188
|
ctx.miterLimit = 1; // Avoid sharp artifacts on strokeText
|
|
@@ -13106,7 +13121,7 @@ const GROWTH = {
|
|
|
13106
13121
|
],
|
|
13107
13122
|
compute: function (knownDataY, knownDataX = [[]], newDataX = [[]], b = { value: true }) {
|
|
13108
13123
|
assertNonEmptyMatrix(knownDataY, "known_data_y");
|
|
13109
|
-
return expM(predictLinearValues(logM(toNumberMatrix(knownDataY, "
|
|
13124
|
+
return expM(predictLinearValues(logM(toNumberMatrix(knownDataY, "known_data_y")), toNumberMatrix(knownDataX, "known_data_x"), toNumberMatrix(newDataX, "new_data_y"), toBoolean(b)));
|
|
13110
13125
|
},
|
|
13111
13126
|
};
|
|
13112
13127
|
// -----------------------------------------------------------------------------
|
|
@@ -13171,7 +13186,7 @@ const LINEST = {
|
|
|
13171
13186
|
],
|
|
13172
13187
|
compute: function (dataY, dataX = [[]], calculateB = { value: true }, verbose = { value: false }) {
|
|
13173
13188
|
assertNonEmptyMatrix(dataY, "data_y");
|
|
13174
|
-
return fullLinearRegression(toNumberMatrix(dataX, "
|
|
13189
|
+
return fullLinearRegression(toNumberMatrix(dataX, "data_x"), toNumberMatrix(dataY, "data_y"), toBoolean(calculateB), toBoolean(verbose));
|
|
13175
13190
|
},
|
|
13176
13191
|
isExported: true,
|
|
13177
13192
|
};
|
|
@@ -13188,7 +13203,7 @@ const LOGEST = {
|
|
|
13188
13203
|
],
|
|
13189
13204
|
compute: function (dataY, dataX = [[]], calculateB = { value: true }, verbose = { value: false }) {
|
|
13190
13205
|
assertNonEmptyMatrix(dataY, "data_y");
|
|
13191
|
-
const coeffs = fullLinearRegression(toNumberMatrix(dataX, "
|
|
13206
|
+
const coeffs = fullLinearRegression(toNumberMatrix(dataX, "data_x"), logM(toNumberMatrix(dataY, "data_y")), toBoolean(calculateB), toBoolean(verbose));
|
|
13192
13207
|
for (let i = 0; i < coeffs.length; i++) {
|
|
13193
13208
|
coeffs[i][0] = Math.exp(coeffs[i][0]);
|
|
13194
13209
|
}
|
|
@@ -13778,7 +13793,7 @@ const TREND = {
|
|
|
13778
13793
|
],
|
|
13779
13794
|
compute: function (knownDataY, knownDataX = [[]], newDataX = [[]], b = { value: true }) {
|
|
13780
13795
|
assertNonEmptyMatrix(knownDataY, "known_data_y");
|
|
13781
|
-
return predictLinearValues(toNumberMatrix(knownDataY, "
|
|
13796
|
+
return predictLinearValues(toNumberMatrix(knownDataY, "known_data_y"), toNumberMatrix(knownDataX, "known_data_x"), toNumberMatrix(newDataX, "new_data_y"), toBoolean(b));
|
|
13782
13797
|
},
|
|
13783
13798
|
};
|
|
13784
13799
|
// -----------------------------------------------------------------------------
|
|
@@ -29722,6 +29737,7 @@ function getChartTimeOptions(labels, labelFormat, locale) {
|
|
|
29722
29737
|
parser: luxonFormat,
|
|
29723
29738
|
displayFormats,
|
|
29724
29739
|
unit: timeUnit ?? false,
|
|
29740
|
+
tooltipFormat: luxonFormat,
|
|
29725
29741
|
};
|
|
29726
29742
|
}
|
|
29727
29743
|
/**
|
|
@@ -42174,12 +42190,13 @@ class DataValidationEditor extends Component {
|
|
|
42174
42190
|
onCloseSidePanel: { type: Function, optional: true },
|
|
42175
42191
|
};
|
|
42176
42192
|
state = useState({ rule: this.defaultDataValidationRule });
|
|
42193
|
+
editingSheetId;
|
|
42177
42194
|
setup() {
|
|
42195
|
+
this.editingSheetId = this.env.model.getters.getActiveSheetId();
|
|
42178
42196
|
if (this.props.rule) {
|
|
42179
|
-
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
42180
42197
|
this.state.rule = {
|
|
42181
42198
|
...this.props.rule,
|
|
42182
|
-
ranges: this.props.rule.ranges.map((range) => this.env.model.getters.getRangeString(range,
|
|
42199
|
+
ranges: this.props.rule.ranges.map((range) => this.env.model.getters.getRangeString(range, this.editingSheetId)),
|
|
42183
42200
|
};
|
|
42184
42201
|
this.state.rule.criterion.type = this.props.rule.criterion.type;
|
|
42185
42202
|
}
|
|
@@ -42213,7 +42230,6 @@ class DataValidationEditor extends Component {
|
|
|
42213
42230
|
const locale = this.env.model.getters.getLocale();
|
|
42214
42231
|
const criterion = rule.criterion;
|
|
42215
42232
|
const criterionEvaluator = dataValidationEvaluatorRegistry.get(criterion.type);
|
|
42216
|
-
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
42217
42233
|
const values = criterion.values
|
|
42218
42234
|
.slice(0, criterionEvaluator.numberOfValues(criterion))
|
|
42219
42235
|
.map((value) => value?.trim())
|
|
@@ -42221,8 +42237,8 @@ class DataValidationEditor extends Component {
|
|
|
42221
42237
|
.map((value) => canonicalizeContent(value, locale));
|
|
42222
42238
|
rule.criterion = { ...criterion, values };
|
|
42223
42239
|
return {
|
|
42224
|
-
sheetId,
|
|
42225
|
-
ranges: this.state.rule.ranges.map((xc) => this.env.model.getters.getRangeDataFromXc(
|
|
42240
|
+
sheetId: this.editingSheetId,
|
|
42241
|
+
ranges: this.state.rule.ranges.map((xc) => this.env.model.getters.getRangeDataFromXc(this.editingSheetId, xc)),
|
|
42226
42242
|
rule,
|
|
42227
42243
|
};
|
|
42228
42244
|
}
|
|
@@ -54048,7 +54064,7 @@ class HeaderSizePlugin extends CorePlugin {
|
|
|
54048
54064
|
let sizes = [...this.sizes[cmd.sheetId][cmd.dimension]];
|
|
54049
54065
|
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
54050
54066
|
const baseSize = sizes[cmd.base];
|
|
54051
|
-
sizes
|
|
54067
|
+
sizes = insertItemsAtIndex(sizes, Array(cmd.quantity).fill(baseSize), addIndex);
|
|
54052
54068
|
this.history.update("sizes", cmd.sheetId, cmd.dimension, sizes);
|
|
54053
54069
|
break;
|
|
54054
54070
|
}
|
|
@@ -54200,9 +54216,8 @@ class HeaderVisibilityPlugin extends CorePlugin {
|
|
|
54200
54216
|
break;
|
|
54201
54217
|
}
|
|
54202
54218
|
case "ADD_COLUMNS_ROWS": {
|
|
54203
|
-
const hiddenHeaders = [...this.hiddenHeaders[cmd.sheetId][cmd.dimension]];
|
|
54204
54219
|
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
54205
|
-
hiddenHeaders.
|
|
54220
|
+
const hiddenHeaders = insertItemsAtIndex([...this.hiddenHeaders[cmd.sheetId][cmd.dimension]], Array(cmd.quantity).fill(false), addIndex);
|
|
54206
54221
|
this.history.update("hiddenHeaders", cmd.sheetId, cmd.dimension, hiddenHeaders);
|
|
54207
54222
|
break;
|
|
54208
54223
|
}
|
|
@@ -58459,12 +58474,12 @@ class SpreadsheetRTree {
|
|
|
58459
58474
|
this.rTrees[sheetId].remove(item, this.rtreeItemComparer);
|
|
58460
58475
|
}
|
|
58461
58476
|
rtreeItemComparer(left, right) {
|
|
58462
|
-
return (left.
|
|
58463
|
-
left.boundingBox.sheetId === right.boundingBox.sheetId &&
|
|
58477
|
+
return (left.boundingBox.sheetId === right.boundingBox.sheetId &&
|
|
58464
58478
|
left.boundingBox?.zone.left === right.boundingBox.zone.left &&
|
|
58465
58479
|
left.boundingBox?.zone.top === right.boundingBox.zone.top &&
|
|
58466
58480
|
left.boundingBox?.zone.right === right.boundingBox.zone.right &&
|
|
58467
|
-
left.boundingBox?.zone.bottom === right.boundingBox.zone.bottom
|
|
58481
|
+
left.boundingBox?.zone.bottom === right.boundingBox.zone.bottom &&
|
|
58482
|
+
deepEquals(left.data, right.data));
|
|
58468
58483
|
}
|
|
58469
58484
|
}
|
|
58470
58485
|
/**
|
|
@@ -58537,7 +58552,7 @@ class FormulaDependencyGraph {
|
|
|
58537
58552
|
* in the correct order they should be evaluated.
|
|
58538
58553
|
* This is called a topological ordering (excluding cycles)
|
|
58539
58554
|
*/
|
|
58540
|
-
getCellsDependingOn(ranges) {
|
|
58555
|
+
getCellsDependingOn(ranges, ignore) {
|
|
58541
58556
|
const visited = this.createEmptyPositionSet();
|
|
58542
58557
|
const queue = Array.from(ranges).reverse();
|
|
58543
58558
|
while (queue.length > 0) {
|
|
@@ -58552,7 +58567,7 @@ class FormulaDependencyGraph {
|
|
|
58552
58567
|
const impactedPositions = this.rTree.search(range).map((dep) => dep.data);
|
|
58553
58568
|
const nextInQueue = {};
|
|
58554
58569
|
for (const position of impactedPositions) {
|
|
58555
|
-
if (!visited.has(position)) {
|
|
58570
|
+
if (!visited.has(position) && !ignore.has(position)) {
|
|
58556
58571
|
if (!nextInQueue[position.sheetId]) {
|
|
58557
58572
|
nextInQueue[position.sheetId] = [];
|
|
58558
58573
|
}
|
|
@@ -59105,7 +59120,7 @@ class Evaluator {
|
|
|
59105
59120
|
}
|
|
59106
59121
|
invalidatePositionsDependingOnSpread(sheetId, resultZone) {
|
|
59107
59122
|
// the result matrix is split in 2 zones to exclude the array formula position
|
|
59108
|
-
const invalidatedPositions = this.formulaDependencies().getCellsDependingOn(excludeTopLeft(resultZone).map((zone) => ({ sheetId, zone })));
|
|
59123
|
+
const invalidatedPositions = this.formulaDependencies().getCellsDependingOn(excludeTopLeft(resultZone).map((zone) => ({ sheetId, zone })), this.nextPositionsToUpdate);
|
|
59109
59124
|
invalidatedPositions.delete({ sheetId, col: resultZone.left, row: resultZone.top });
|
|
59110
59125
|
this.nextPositionsToUpdate.addMany(invalidatedPositions);
|
|
59111
59126
|
}
|
|
@@ -59220,7 +59235,7 @@ class Evaluator {
|
|
|
59220
59235
|
for (const sheetId in zonesBySheetIds) {
|
|
59221
59236
|
ranges.push(...zonesBySheetIds[sheetId].map((zone) => ({ sheetId, zone })));
|
|
59222
59237
|
}
|
|
59223
|
-
return this.formulaDependencies().getCellsDependingOn(ranges);
|
|
59238
|
+
return this.formulaDependencies().getCellsDependingOn(ranges, this.nextPositionsToUpdate);
|
|
59224
59239
|
}
|
|
59225
59240
|
}
|
|
59226
59241
|
function forEachSpreadPositionInMatrix(nbColumns, nbRows, callback) {
|
|
@@ -74703,6 +74718,6 @@ const constants = {
|
|
|
74703
74718
|
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 };
|
|
74704
74719
|
|
|
74705
74720
|
|
|
74706
|
-
__info__.version = "18.0.
|
|
74707
|
-
__info__.date = "2025-
|
|
74708
|
-
__info__.hash = "
|
|
74721
|
+
__info__.version = "18.0.47";
|
|
74722
|
+
__info__.date = "2025-10-16T06:38:31.658Z";
|
|
74723
|
+
__info__.hash = "0216b06";
|