@odoo/o-spreadsheet 17.0.74 → 17.0.76
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 +30 -22
- package/dist/o-spreadsheet.esm.js +30 -22
- package/dist/o-spreadsheet.iife.js +30 -22
- package/dist/o-spreadsheet.iife.min.js +260 -260
- 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 17.0.
|
|
6
|
-
* @date 2025-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.76
|
|
6
|
+
* @date 2025-10-16T06:36:18.137Z
|
|
7
|
+
* @hash 5c3234b
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -793,9 +793,7 @@ function removeIndexesFromArray(array, indexes) {
|
|
|
793
793
|
return newArray;
|
|
794
794
|
}
|
|
795
795
|
function insertItemsAtIndex(array, items, index) {
|
|
796
|
-
|
|
797
|
-
newArray.splice(index, 0, ...items);
|
|
798
|
-
return newArray;
|
|
796
|
+
return array.slice(0, index).concat(items).concat(array.slice(index));
|
|
799
797
|
}
|
|
800
798
|
function trimContent(content) {
|
|
801
799
|
const contentLines = content.split("\n");
|
|
@@ -2286,7 +2284,17 @@ function tryCastAsNumberMatrix(data, argName) {
|
|
|
2286
2284
|
data.forEach((row) => {
|
|
2287
2285
|
row.forEach((cell) => {
|
|
2288
2286
|
if (typeof cell !== "number") {
|
|
2289
|
-
|
|
2287
|
+
let message = "";
|
|
2288
|
+
if (typeof cell === "object") {
|
|
2289
|
+
message = _t("Function [[FUNCTION_NAME]] expects number values for %s, but got an empty value.", argName);
|
|
2290
|
+
}
|
|
2291
|
+
else if (typeof cell === "string") {
|
|
2292
|
+
message = _t("Function [[FUNCTION_NAME]] expects number values for %s, but got a string.", argName);
|
|
2293
|
+
}
|
|
2294
|
+
else if (typeof cell === "boolean") {
|
|
2295
|
+
message = _t("Function [[FUNCTION_NAME]] expects number values for %s, but got a boolean.", argName);
|
|
2296
|
+
}
|
|
2297
|
+
throw new Error(message);
|
|
2290
2298
|
}
|
|
2291
2299
|
});
|
|
2292
2300
|
});
|
|
@@ -9251,6 +9259,7 @@ function getChartTimeOptions(labels, labelFormat, locale) {
|
|
|
9251
9259
|
parser: luxonFormat,
|
|
9252
9260
|
displayFormats,
|
|
9253
9261
|
unit: timeUnit ?? false,
|
|
9262
|
+
tooltipFormat: luxonFormat,
|
|
9254
9263
|
};
|
|
9255
9264
|
}
|
|
9256
9265
|
/**
|
|
@@ -13827,7 +13836,7 @@ const GROWTH = {
|
|
|
13827
13836
|
returns: ["NUMBER"],
|
|
13828
13837
|
compute: function (knownDataY, knownDataX = [], newDataX = [], b = true) {
|
|
13829
13838
|
assertNonEmptyMatrix(knownDataY, "known_data_y");
|
|
13830
|
-
return expM(predictLinearValues(logM(tryCastAsNumberMatrix(knownDataY, "
|
|
13839
|
+
return expM(predictLinearValues(logM(tryCastAsNumberMatrix(knownDataY, "known_data_y")), tryCastAsNumberMatrix(knownDataX, "known_data_x"), tryCastAsNumberMatrix(newDataX, "new_data_y"), toBoolean(b)));
|
|
13831
13840
|
},
|
|
13832
13841
|
};
|
|
13833
13842
|
// -----------------------------------------------------------------------------
|
|
@@ -13895,7 +13904,7 @@ const LINEST = {
|
|
|
13895
13904
|
returns: ["NUMBER"],
|
|
13896
13905
|
compute: function (dataY, dataX = [], calculateB = true, verbose = false) {
|
|
13897
13906
|
assertNonEmptyMatrix(dataY, "data_y");
|
|
13898
|
-
return fullLinearRegression(tryCastAsNumberMatrix(dataX, "
|
|
13907
|
+
return fullLinearRegression(tryCastAsNumberMatrix(dataX, "data_x"), tryCastAsNumberMatrix(dataY, "data_y"), toBoolean(calculateB), toBoolean(verbose));
|
|
13899
13908
|
},
|
|
13900
13909
|
isExported: true,
|
|
13901
13910
|
};
|
|
@@ -13913,7 +13922,7 @@ const LOGEST = {
|
|
|
13913
13922
|
returns: ["NUMBER"],
|
|
13914
13923
|
compute: function (dataY, dataX = [], calculateB = true, verbose = false) {
|
|
13915
13924
|
assertNonEmptyMatrix(dataY, "data_y");
|
|
13916
|
-
const coeffs = fullLinearRegression(tryCastAsNumberMatrix(dataX, "
|
|
13925
|
+
const coeffs = fullLinearRegression(tryCastAsNumberMatrix(dataX, "data_x"), logM(tryCastAsNumberMatrix(dataY, "data_y")), toBoolean(calculateB), toBoolean(verbose));
|
|
13917
13926
|
for (let i = 0; i < coeffs.length; i++) {
|
|
13918
13927
|
coeffs[i][0] = Math.exp(coeffs[i][0]);
|
|
13919
13928
|
}
|
|
@@ -14551,7 +14560,7 @@ const TREND = {
|
|
|
14551
14560
|
returns: ["NUMBER"],
|
|
14552
14561
|
compute: function (knownDataY, knownDataX = [], newDataX = [], b = true) {
|
|
14553
14562
|
assertNonEmptyMatrix(knownDataY, "known_data_y");
|
|
14554
|
-
return predictLinearValues(tryCastAsNumberMatrix(knownDataY, "
|
|
14563
|
+
return predictLinearValues(tryCastAsNumberMatrix(knownDataY, "known_data_y"), tryCastAsNumberMatrix(knownDataX, "known_data_x"), tryCastAsNumberMatrix(newDataX, "new_data_y"), toBoolean(b));
|
|
14555
14564
|
},
|
|
14556
14565
|
};
|
|
14557
14566
|
// -----------------------------------------------------------------------------
|
|
@@ -25667,12 +25676,13 @@ class DataValidationEditor extends owl.Component {
|
|
|
25667
25676
|
static template = "o-spreadsheet-DataValidationEditor";
|
|
25668
25677
|
static components = { SelectionInput, SelectMenu };
|
|
25669
25678
|
state = owl.useState({ rule: this.defaultDataValidationRule });
|
|
25679
|
+
editingSheetId;
|
|
25670
25680
|
setup() {
|
|
25681
|
+
this.editingSheetId = this.env.model.getters.getActiveSheetId();
|
|
25671
25682
|
if (this.props.rule) {
|
|
25672
|
-
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
25673
25683
|
this.state.rule = {
|
|
25674
25684
|
...this.props.rule,
|
|
25675
|
-
ranges: this.props.rule.ranges.map((range) => this.env.model.getters.getRangeString(range,
|
|
25685
|
+
ranges: this.props.rule.ranges.map((range) => this.env.model.getters.getRangeString(range, this.editingSheetId)),
|
|
25676
25686
|
};
|
|
25677
25687
|
this.state.rule.criterion.type = this.props.rule.criterion.type;
|
|
25678
25688
|
}
|
|
@@ -25706,7 +25716,6 @@ class DataValidationEditor extends owl.Component {
|
|
|
25706
25716
|
const locale = this.env.model.getters.getLocale();
|
|
25707
25717
|
const criterion = rule.criterion;
|
|
25708
25718
|
const criterionEvaluator = dataValidationEvaluatorRegistry.get(criterion.type);
|
|
25709
|
-
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
25710
25719
|
const values = criterion.values
|
|
25711
25720
|
.slice(0, criterionEvaluator.numberOfValues(criterion))
|
|
25712
25721
|
.map((value) => value?.trim())
|
|
@@ -25714,8 +25723,8 @@ class DataValidationEditor extends owl.Component {
|
|
|
25714
25723
|
.map((value) => canonicalizeContent(value, locale));
|
|
25715
25724
|
rule.criterion = { ...criterion, values };
|
|
25716
25725
|
return {
|
|
25717
|
-
sheetId,
|
|
25718
|
-
ranges: this.state.rule.ranges.map((xc) => this.env.model.getters.getRangeDataFromXc(
|
|
25726
|
+
sheetId: this.editingSheetId,
|
|
25727
|
+
ranges: this.state.rule.ranges.map((xc) => this.env.model.getters.getRangeDataFromXc(this.editingSheetId, xc)),
|
|
25719
25728
|
rule,
|
|
25720
25729
|
};
|
|
25721
25730
|
}
|
|
@@ -38424,7 +38433,7 @@ class HeaderSizePlugin extends CorePlugin {
|
|
|
38424
38433
|
let sizes = [...this.sizes[cmd.sheetId][cmd.dimension]];
|
|
38425
38434
|
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
38426
38435
|
const baseSize = sizes[cmd.base];
|
|
38427
|
-
sizes
|
|
38436
|
+
sizes = insertItemsAtIndex(sizes, Array(cmd.quantity).fill(baseSize), addIndex);
|
|
38428
38437
|
this.history.update("sizes", cmd.sheetId, cmd.dimension, sizes);
|
|
38429
38438
|
break;
|
|
38430
38439
|
}
|
|
@@ -38576,9 +38585,8 @@ class HeaderVisibilityPlugin extends CorePlugin {
|
|
|
38576
38585
|
break;
|
|
38577
38586
|
}
|
|
38578
38587
|
case "ADD_COLUMNS_ROWS": {
|
|
38579
|
-
const hiddenHeaders = [...this.hiddenHeaders[cmd.sheetId][cmd.dimension]];
|
|
38580
38588
|
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
38581
|
-
hiddenHeaders.
|
|
38589
|
+
const hiddenHeaders = insertItemsAtIndex([...this.hiddenHeaders[cmd.sheetId][cmd.dimension]], Array(cmd.quantity).fill(false), addIndex);
|
|
38582
38590
|
this.history.update("hiddenHeaders", cmd.sheetId, cmd.dimension, hiddenHeaders);
|
|
38583
38591
|
break;
|
|
38584
38592
|
}
|
|
@@ -58503,6 +58511,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
58503
58511
|
exports.tokenize = tokenize;
|
|
58504
58512
|
|
|
58505
58513
|
|
|
58506
|
-
__info__.version = "17.0.
|
|
58507
|
-
__info__.date = "2025-
|
|
58508
|
-
__info__.hash = "
|
|
58514
|
+
__info__.version = "17.0.76";
|
|
58515
|
+
__info__.date = "2025-10-16T06:36:18.137Z";
|
|
58516
|
+
__info__.hash = "5c3234b";
|
|
@@ -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 17.0.
|
|
6
|
-
* @date 2025-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.76
|
|
6
|
+
* @date 2025-10-16T06:36:18.137Z
|
|
7
|
+
* @hash 5c3234b
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { Component, useRef, onMounted, useEffect, onWillPatch, useState, onWillUpdateProps, onPatched, useComponent, useExternalListener, onWillUnmount, onWillStart, xml, useChildSubEnv, useSubEnv, markRaw } from '@odoo/owl';
|
|
@@ -791,9 +791,7 @@ function removeIndexesFromArray(array, indexes) {
|
|
|
791
791
|
return newArray;
|
|
792
792
|
}
|
|
793
793
|
function insertItemsAtIndex(array, items, index) {
|
|
794
|
-
|
|
795
|
-
newArray.splice(index, 0, ...items);
|
|
796
|
-
return newArray;
|
|
794
|
+
return array.slice(0, index).concat(items).concat(array.slice(index));
|
|
797
795
|
}
|
|
798
796
|
function trimContent(content) {
|
|
799
797
|
const contentLines = content.split("\n");
|
|
@@ -2284,7 +2282,17 @@ function tryCastAsNumberMatrix(data, argName) {
|
|
|
2284
2282
|
data.forEach((row) => {
|
|
2285
2283
|
row.forEach((cell) => {
|
|
2286
2284
|
if (typeof cell !== "number") {
|
|
2287
|
-
|
|
2285
|
+
let message = "";
|
|
2286
|
+
if (typeof cell === "object") {
|
|
2287
|
+
message = _t("Function [[FUNCTION_NAME]] expects number values for %s, but got an empty value.", argName);
|
|
2288
|
+
}
|
|
2289
|
+
else if (typeof cell === "string") {
|
|
2290
|
+
message = _t("Function [[FUNCTION_NAME]] expects number values for %s, but got a string.", argName);
|
|
2291
|
+
}
|
|
2292
|
+
else if (typeof cell === "boolean") {
|
|
2293
|
+
message = _t("Function [[FUNCTION_NAME]] expects number values for %s, but got a boolean.", argName);
|
|
2294
|
+
}
|
|
2295
|
+
throw new Error(message);
|
|
2288
2296
|
}
|
|
2289
2297
|
});
|
|
2290
2298
|
});
|
|
@@ -9249,6 +9257,7 @@ function getChartTimeOptions(labels, labelFormat, locale) {
|
|
|
9249
9257
|
parser: luxonFormat,
|
|
9250
9258
|
displayFormats,
|
|
9251
9259
|
unit: timeUnit ?? false,
|
|
9260
|
+
tooltipFormat: luxonFormat,
|
|
9252
9261
|
};
|
|
9253
9262
|
}
|
|
9254
9263
|
/**
|
|
@@ -13825,7 +13834,7 @@ const GROWTH = {
|
|
|
13825
13834
|
returns: ["NUMBER"],
|
|
13826
13835
|
compute: function (knownDataY, knownDataX = [], newDataX = [], b = true) {
|
|
13827
13836
|
assertNonEmptyMatrix(knownDataY, "known_data_y");
|
|
13828
|
-
return expM(predictLinearValues(logM(tryCastAsNumberMatrix(knownDataY, "
|
|
13837
|
+
return expM(predictLinearValues(logM(tryCastAsNumberMatrix(knownDataY, "known_data_y")), tryCastAsNumberMatrix(knownDataX, "known_data_x"), tryCastAsNumberMatrix(newDataX, "new_data_y"), toBoolean(b)));
|
|
13829
13838
|
},
|
|
13830
13839
|
};
|
|
13831
13840
|
// -----------------------------------------------------------------------------
|
|
@@ -13893,7 +13902,7 @@ const LINEST = {
|
|
|
13893
13902
|
returns: ["NUMBER"],
|
|
13894
13903
|
compute: function (dataY, dataX = [], calculateB = true, verbose = false) {
|
|
13895
13904
|
assertNonEmptyMatrix(dataY, "data_y");
|
|
13896
|
-
return fullLinearRegression(tryCastAsNumberMatrix(dataX, "
|
|
13905
|
+
return fullLinearRegression(tryCastAsNumberMatrix(dataX, "data_x"), tryCastAsNumberMatrix(dataY, "data_y"), toBoolean(calculateB), toBoolean(verbose));
|
|
13897
13906
|
},
|
|
13898
13907
|
isExported: true,
|
|
13899
13908
|
};
|
|
@@ -13911,7 +13920,7 @@ const LOGEST = {
|
|
|
13911
13920
|
returns: ["NUMBER"],
|
|
13912
13921
|
compute: function (dataY, dataX = [], calculateB = true, verbose = false) {
|
|
13913
13922
|
assertNonEmptyMatrix(dataY, "data_y");
|
|
13914
|
-
const coeffs = fullLinearRegression(tryCastAsNumberMatrix(dataX, "
|
|
13923
|
+
const coeffs = fullLinearRegression(tryCastAsNumberMatrix(dataX, "data_x"), logM(tryCastAsNumberMatrix(dataY, "data_y")), toBoolean(calculateB), toBoolean(verbose));
|
|
13915
13924
|
for (let i = 0; i < coeffs.length; i++) {
|
|
13916
13925
|
coeffs[i][0] = Math.exp(coeffs[i][0]);
|
|
13917
13926
|
}
|
|
@@ -14549,7 +14558,7 @@ const TREND = {
|
|
|
14549
14558
|
returns: ["NUMBER"],
|
|
14550
14559
|
compute: function (knownDataY, knownDataX = [], newDataX = [], b = true) {
|
|
14551
14560
|
assertNonEmptyMatrix(knownDataY, "known_data_y");
|
|
14552
|
-
return predictLinearValues(tryCastAsNumberMatrix(knownDataY, "
|
|
14561
|
+
return predictLinearValues(tryCastAsNumberMatrix(knownDataY, "known_data_y"), tryCastAsNumberMatrix(knownDataX, "known_data_x"), tryCastAsNumberMatrix(newDataX, "new_data_y"), toBoolean(b));
|
|
14553
14562
|
},
|
|
14554
14563
|
};
|
|
14555
14564
|
// -----------------------------------------------------------------------------
|
|
@@ -25665,12 +25674,13 @@ class DataValidationEditor extends Component {
|
|
|
25665
25674
|
static template = "o-spreadsheet-DataValidationEditor";
|
|
25666
25675
|
static components = { SelectionInput, SelectMenu };
|
|
25667
25676
|
state = useState({ rule: this.defaultDataValidationRule });
|
|
25677
|
+
editingSheetId;
|
|
25668
25678
|
setup() {
|
|
25679
|
+
this.editingSheetId = this.env.model.getters.getActiveSheetId();
|
|
25669
25680
|
if (this.props.rule) {
|
|
25670
|
-
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
25671
25681
|
this.state.rule = {
|
|
25672
25682
|
...this.props.rule,
|
|
25673
|
-
ranges: this.props.rule.ranges.map((range) => this.env.model.getters.getRangeString(range,
|
|
25683
|
+
ranges: this.props.rule.ranges.map((range) => this.env.model.getters.getRangeString(range, this.editingSheetId)),
|
|
25674
25684
|
};
|
|
25675
25685
|
this.state.rule.criterion.type = this.props.rule.criterion.type;
|
|
25676
25686
|
}
|
|
@@ -25704,7 +25714,6 @@ class DataValidationEditor extends Component {
|
|
|
25704
25714
|
const locale = this.env.model.getters.getLocale();
|
|
25705
25715
|
const criterion = rule.criterion;
|
|
25706
25716
|
const criterionEvaluator = dataValidationEvaluatorRegistry.get(criterion.type);
|
|
25707
|
-
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
25708
25717
|
const values = criterion.values
|
|
25709
25718
|
.slice(0, criterionEvaluator.numberOfValues(criterion))
|
|
25710
25719
|
.map((value) => value?.trim())
|
|
@@ -25712,8 +25721,8 @@ class DataValidationEditor extends Component {
|
|
|
25712
25721
|
.map((value) => canonicalizeContent(value, locale));
|
|
25713
25722
|
rule.criterion = { ...criterion, values };
|
|
25714
25723
|
return {
|
|
25715
|
-
sheetId,
|
|
25716
|
-
ranges: this.state.rule.ranges.map((xc) => this.env.model.getters.getRangeDataFromXc(
|
|
25724
|
+
sheetId: this.editingSheetId,
|
|
25725
|
+
ranges: this.state.rule.ranges.map((xc) => this.env.model.getters.getRangeDataFromXc(this.editingSheetId, xc)),
|
|
25717
25726
|
rule,
|
|
25718
25727
|
};
|
|
25719
25728
|
}
|
|
@@ -38422,7 +38431,7 @@ class HeaderSizePlugin extends CorePlugin {
|
|
|
38422
38431
|
let sizes = [...this.sizes[cmd.sheetId][cmd.dimension]];
|
|
38423
38432
|
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
38424
38433
|
const baseSize = sizes[cmd.base];
|
|
38425
|
-
sizes
|
|
38434
|
+
sizes = insertItemsAtIndex(sizes, Array(cmd.quantity).fill(baseSize), addIndex);
|
|
38426
38435
|
this.history.update("sizes", cmd.sheetId, cmd.dimension, sizes);
|
|
38427
38436
|
break;
|
|
38428
38437
|
}
|
|
@@ -38574,9 +38583,8 @@ class HeaderVisibilityPlugin extends CorePlugin {
|
|
|
38574
38583
|
break;
|
|
38575
38584
|
}
|
|
38576
38585
|
case "ADD_COLUMNS_ROWS": {
|
|
38577
|
-
const hiddenHeaders = [...this.hiddenHeaders[cmd.sheetId][cmd.dimension]];
|
|
38578
38586
|
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
38579
|
-
hiddenHeaders.
|
|
38587
|
+
const hiddenHeaders = insertItemsAtIndex([...this.hiddenHeaders[cmd.sheetId][cmd.dimension]], Array(cmd.quantity).fill(false), addIndex);
|
|
38580
38588
|
this.history.update("hiddenHeaders", cmd.sheetId, cmd.dimension, hiddenHeaders);
|
|
38581
38589
|
break;
|
|
38582
38590
|
}
|
|
@@ -58466,6 +58474,6 @@ const constants = {
|
|
|
58466
58474
|
export { AbstractChart, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, tokenize };
|
|
58467
58475
|
|
|
58468
58476
|
|
|
58469
|
-
__info__.version = "17.0.
|
|
58470
|
-
__info__.date = "2025-
|
|
58471
|
-
__info__.hash = "
|
|
58477
|
+
__info__.version = "17.0.76";
|
|
58478
|
+
__info__.date = "2025-10-16T06:36:18.137Z";
|
|
58479
|
+
__info__.hash = "5c3234b";
|
|
@@ -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 17.0.
|
|
6
|
-
* @date 2025-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.76
|
|
6
|
+
* @date 2025-10-16T06:36:18.137Z
|
|
7
|
+
* @hash 5c3234b
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -792,9 +792,7 @@
|
|
|
792
792
|
return newArray;
|
|
793
793
|
}
|
|
794
794
|
function insertItemsAtIndex(array, items, index) {
|
|
795
|
-
|
|
796
|
-
newArray.splice(index, 0, ...items);
|
|
797
|
-
return newArray;
|
|
795
|
+
return array.slice(0, index).concat(items).concat(array.slice(index));
|
|
798
796
|
}
|
|
799
797
|
function trimContent(content) {
|
|
800
798
|
const contentLines = content.split("\n");
|
|
@@ -2285,7 +2283,17 @@
|
|
|
2285
2283
|
data.forEach((row) => {
|
|
2286
2284
|
row.forEach((cell) => {
|
|
2287
2285
|
if (typeof cell !== "number") {
|
|
2288
|
-
|
|
2286
|
+
let message = "";
|
|
2287
|
+
if (typeof cell === "object") {
|
|
2288
|
+
message = _t("Function [[FUNCTION_NAME]] expects number values for %s, but got an empty value.", argName);
|
|
2289
|
+
}
|
|
2290
|
+
else if (typeof cell === "string") {
|
|
2291
|
+
message = _t("Function [[FUNCTION_NAME]] expects number values for %s, but got a string.", argName);
|
|
2292
|
+
}
|
|
2293
|
+
else if (typeof cell === "boolean") {
|
|
2294
|
+
message = _t("Function [[FUNCTION_NAME]] expects number values for %s, but got a boolean.", argName);
|
|
2295
|
+
}
|
|
2296
|
+
throw new Error(message);
|
|
2289
2297
|
}
|
|
2290
2298
|
});
|
|
2291
2299
|
});
|
|
@@ -9250,6 +9258,7 @@
|
|
|
9250
9258
|
parser: luxonFormat,
|
|
9251
9259
|
displayFormats,
|
|
9252
9260
|
unit: timeUnit ?? false,
|
|
9261
|
+
tooltipFormat: luxonFormat,
|
|
9253
9262
|
};
|
|
9254
9263
|
}
|
|
9255
9264
|
/**
|
|
@@ -13826,7 +13835,7 @@
|
|
|
13826
13835
|
returns: ["NUMBER"],
|
|
13827
13836
|
compute: function (knownDataY, knownDataX = [], newDataX = [], b = true) {
|
|
13828
13837
|
assertNonEmptyMatrix(knownDataY, "known_data_y");
|
|
13829
|
-
return expM(predictLinearValues(logM(tryCastAsNumberMatrix(knownDataY, "
|
|
13838
|
+
return expM(predictLinearValues(logM(tryCastAsNumberMatrix(knownDataY, "known_data_y")), tryCastAsNumberMatrix(knownDataX, "known_data_x"), tryCastAsNumberMatrix(newDataX, "new_data_y"), toBoolean(b)));
|
|
13830
13839
|
},
|
|
13831
13840
|
};
|
|
13832
13841
|
// -----------------------------------------------------------------------------
|
|
@@ -13894,7 +13903,7 @@
|
|
|
13894
13903
|
returns: ["NUMBER"],
|
|
13895
13904
|
compute: function (dataY, dataX = [], calculateB = true, verbose = false) {
|
|
13896
13905
|
assertNonEmptyMatrix(dataY, "data_y");
|
|
13897
|
-
return fullLinearRegression(tryCastAsNumberMatrix(dataX, "
|
|
13906
|
+
return fullLinearRegression(tryCastAsNumberMatrix(dataX, "data_x"), tryCastAsNumberMatrix(dataY, "data_y"), toBoolean(calculateB), toBoolean(verbose));
|
|
13898
13907
|
},
|
|
13899
13908
|
isExported: true,
|
|
13900
13909
|
};
|
|
@@ -13912,7 +13921,7 @@
|
|
|
13912
13921
|
returns: ["NUMBER"],
|
|
13913
13922
|
compute: function (dataY, dataX = [], calculateB = true, verbose = false) {
|
|
13914
13923
|
assertNonEmptyMatrix(dataY, "data_y");
|
|
13915
|
-
const coeffs = fullLinearRegression(tryCastAsNumberMatrix(dataX, "
|
|
13924
|
+
const coeffs = fullLinearRegression(tryCastAsNumberMatrix(dataX, "data_x"), logM(tryCastAsNumberMatrix(dataY, "data_y")), toBoolean(calculateB), toBoolean(verbose));
|
|
13916
13925
|
for (let i = 0; i < coeffs.length; i++) {
|
|
13917
13926
|
coeffs[i][0] = Math.exp(coeffs[i][0]);
|
|
13918
13927
|
}
|
|
@@ -14550,7 +14559,7 @@
|
|
|
14550
14559
|
returns: ["NUMBER"],
|
|
14551
14560
|
compute: function (knownDataY, knownDataX = [], newDataX = [], b = true) {
|
|
14552
14561
|
assertNonEmptyMatrix(knownDataY, "known_data_y");
|
|
14553
|
-
return predictLinearValues(tryCastAsNumberMatrix(knownDataY, "
|
|
14562
|
+
return predictLinearValues(tryCastAsNumberMatrix(knownDataY, "known_data_y"), tryCastAsNumberMatrix(knownDataX, "known_data_x"), tryCastAsNumberMatrix(newDataX, "new_data_y"), toBoolean(b));
|
|
14554
14563
|
},
|
|
14555
14564
|
};
|
|
14556
14565
|
// -----------------------------------------------------------------------------
|
|
@@ -25666,12 +25675,13 @@
|
|
|
25666
25675
|
static template = "o-spreadsheet-DataValidationEditor";
|
|
25667
25676
|
static components = { SelectionInput, SelectMenu };
|
|
25668
25677
|
state = owl.useState({ rule: this.defaultDataValidationRule });
|
|
25678
|
+
editingSheetId;
|
|
25669
25679
|
setup() {
|
|
25680
|
+
this.editingSheetId = this.env.model.getters.getActiveSheetId();
|
|
25670
25681
|
if (this.props.rule) {
|
|
25671
|
-
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
25672
25682
|
this.state.rule = {
|
|
25673
25683
|
...this.props.rule,
|
|
25674
|
-
ranges: this.props.rule.ranges.map((range) => this.env.model.getters.getRangeString(range,
|
|
25684
|
+
ranges: this.props.rule.ranges.map((range) => this.env.model.getters.getRangeString(range, this.editingSheetId)),
|
|
25675
25685
|
};
|
|
25676
25686
|
this.state.rule.criterion.type = this.props.rule.criterion.type;
|
|
25677
25687
|
}
|
|
@@ -25705,7 +25715,6 @@
|
|
|
25705
25715
|
const locale = this.env.model.getters.getLocale();
|
|
25706
25716
|
const criterion = rule.criterion;
|
|
25707
25717
|
const criterionEvaluator = dataValidationEvaluatorRegistry.get(criterion.type);
|
|
25708
|
-
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
25709
25718
|
const values = criterion.values
|
|
25710
25719
|
.slice(0, criterionEvaluator.numberOfValues(criterion))
|
|
25711
25720
|
.map((value) => value?.trim())
|
|
@@ -25713,8 +25722,8 @@
|
|
|
25713
25722
|
.map((value) => canonicalizeContent(value, locale));
|
|
25714
25723
|
rule.criterion = { ...criterion, values };
|
|
25715
25724
|
return {
|
|
25716
|
-
sheetId,
|
|
25717
|
-
ranges: this.state.rule.ranges.map((xc) => this.env.model.getters.getRangeDataFromXc(
|
|
25725
|
+
sheetId: this.editingSheetId,
|
|
25726
|
+
ranges: this.state.rule.ranges.map((xc) => this.env.model.getters.getRangeDataFromXc(this.editingSheetId, xc)),
|
|
25718
25727
|
rule,
|
|
25719
25728
|
};
|
|
25720
25729
|
}
|
|
@@ -38423,7 +38432,7 @@
|
|
|
38423
38432
|
let sizes = [...this.sizes[cmd.sheetId][cmd.dimension]];
|
|
38424
38433
|
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
38425
38434
|
const baseSize = sizes[cmd.base];
|
|
38426
|
-
sizes
|
|
38435
|
+
sizes = insertItemsAtIndex(sizes, Array(cmd.quantity).fill(baseSize), addIndex);
|
|
38427
38436
|
this.history.update("sizes", cmd.sheetId, cmd.dimension, sizes);
|
|
38428
38437
|
break;
|
|
38429
38438
|
}
|
|
@@ -38575,9 +38584,8 @@
|
|
|
38575
38584
|
break;
|
|
38576
38585
|
}
|
|
38577
38586
|
case "ADD_COLUMNS_ROWS": {
|
|
38578
|
-
const hiddenHeaders = [...this.hiddenHeaders[cmd.sheetId][cmd.dimension]];
|
|
38579
38587
|
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
38580
|
-
hiddenHeaders.
|
|
38588
|
+
const hiddenHeaders = insertItemsAtIndex([...this.hiddenHeaders[cmd.sheetId][cmd.dimension]], Array(cmd.quantity).fill(false), addIndex);
|
|
38581
38589
|
this.history.update("hiddenHeaders", cmd.sheetId, cmd.dimension, hiddenHeaders);
|
|
38582
38590
|
break;
|
|
38583
38591
|
}
|
|
@@ -58502,9 +58510,9 @@
|
|
|
58502
58510
|
exports.tokenize = tokenize;
|
|
58503
58511
|
|
|
58504
58512
|
|
|
58505
|
-
__info__.version = "17.0.
|
|
58506
|
-
__info__.date = "2025-
|
|
58507
|
-
__info__.hash = "
|
|
58513
|
+
__info__.version = "17.0.76";
|
|
58514
|
+
__info__.date = "2025-10-16T06:36:18.137Z";
|
|
58515
|
+
__info__.hash = "5c3234b";
|
|
58508
58516
|
|
|
58509
58517
|
|
|
58510
58518
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|