@odoo/o-spreadsheet 19.3.16 → 19.3.18
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 +89 -45
- package/dist/o_spreadsheet.css +11 -3
- package/dist/o_spreadsheet.esm.js +89 -45
- package/dist/o_spreadsheet.iife.js +89 -45
- package/dist/o_spreadsheet.min.iife.js +260 -260
- package/dist/o_spreadsheet.xml +3 -3
- package/dist/types/collaborative/session.d.ts +3 -1
- package/dist/types/functions/helpers.d.ts +4 -0
- package/dist/types/functions/module_operators.d.ts +1 -1
- package/dist/types/functions/module_text.d.ts +11 -11
- package/dist/types/functions/module_web.d.ts +1 -1
- package/dist/types/plugins/core/squisher.d.ts +3 -0
- package/dist/types/types/collaborative/transport_service.d.ts +1 -0
- 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 19.3.
|
|
6
|
-
* @date 2026-08-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.3.18
|
|
6
|
+
* @date 2026-08-29T09:16:28.272Z
|
|
7
|
+
* @hash 1f4b1ae
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function(exports, _odoo_owl) {
|
|
@@ -4071,6 +4071,18 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
4071
4071
|
default: return "";
|
|
4072
4072
|
}
|
|
4073
4073
|
}
|
|
4074
|
+
/**
|
|
4075
|
+
* Only converts the decimal separator, ignore number format such as % or dates
|
|
4076
|
+
*/
|
|
4077
|
+
function toLocaleString(data, locale) {
|
|
4078
|
+
const value = toValue(data);
|
|
4079
|
+
switch (typeof value) {
|
|
4080
|
+
case "string": return value;
|
|
4081
|
+
case "number": return value.toString().replace(".", locale.decimalSeparator);
|
|
4082
|
+
case "boolean": return value ? "TRUE" : "FALSE";
|
|
4083
|
+
default: return "";
|
|
4084
|
+
}
|
|
4085
|
+
}
|
|
4074
4086
|
/** Normalize string by setting it to lowercase and replacing accent letters with plain letters */
|
|
4075
4087
|
const normalizeString = memoize(function normalizeString(str) {
|
|
4076
4088
|
return str.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
|
@@ -10475,6 +10487,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
10475
10487
|
hidden,
|
|
10476
10488
|
borderColor,
|
|
10477
10489
|
backgroundColor: borderColor,
|
|
10490
|
+
pointBackgroundColor: borderColor,
|
|
10478
10491
|
pointRadius: definition.hideDataMarkers ? 0 : 3
|
|
10479
10492
|
};
|
|
10480
10493
|
if (fill) {
|
|
@@ -29089,12 +29102,13 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
29089
29102
|
}
|
|
29090
29103
|
sortFilterZone(sortDirection) {
|
|
29091
29104
|
const filterPosition = this.props.filterPosition;
|
|
29092
|
-
const
|
|
29105
|
+
const table = this.table;
|
|
29106
|
+
const tableZone = table?.range.zone;
|
|
29093
29107
|
if (!filterPosition || !tableZone || tableZone.top === tableZone.bottom) return;
|
|
29094
29108
|
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
29095
29109
|
const contentZone = {
|
|
29096
29110
|
...tableZone,
|
|
29097
|
-
top: tableZone.top +
|
|
29111
|
+
top: tableZone.top + table.config.numberOfHeaders
|
|
29098
29112
|
};
|
|
29099
29113
|
const sortAnchor = {
|
|
29100
29114
|
col: filterPosition.col,
|
|
@@ -49827,6 +49841,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
49827
49841
|
baseFormulaWasTransformed = false;
|
|
49828
49842
|
rangeToStringOptions = { doNotSimplifyRange: true };
|
|
49829
49843
|
baseNumber = void 0;
|
|
49844
|
+
baseNumberFormat = void 0;
|
|
49830
49845
|
constructor(getters) {
|
|
49831
49846
|
this.getters = getters;
|
|
49832
49847
|
}
|
|
@@ -49861,6 +49876,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
49861
49876
|
this.baseFormulaWasTransformed = false;
|
|
49862
49877
|
}
|
|
49863
49878
|
}
|
|
49879
|
+
/** Reset the base number literal chain, so the next literal number cannot be squished as an offset of it */
|
|
49880
|
+
resetBaseNumber() {
|
|
49881
|
+
this.baseNumber = void 0;
|
|
49882
|
+
this.baseNumberFormat = void 0;
|
|
49883
|
+
}
|
|
49864
49884
|
/**
|
|
49865
49885
|
* Takes a cell and squish their formulas against the previous one (in the previous call).
|
|
49866
49886
|
* We should call this method for each cell in the sheet, in order from top to bottom, then from left to right (all cells of a columns, for each columns left to right).
|
|
@@ -49899,8 +49919,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
49899
49919
|
if (typeof cell.parsedValue === "number" && cell.parsedValue % 1 === 0) {
|
|
49900
49920
|
this.resetBaseFormula();
|
|
49901
49921
|
const numberValue = cell.parsedValue;
|
|
49902
|
-
if (this.baseNumber === void 0) {
|
|
49922
|
+
if (this.baseNumber === void 0 || cell.format !== this.baseNumberFormat) {
|
|
49903
49923
|
this.baseNumber = numberValue;
|
|
49924
|
+
this.baseNumberFormat = cell.format;
|
|
49904
49925
|
return cell.content;
|
|
49905
49926
|
}
|
|
49906
49927
|
const numberOffset = numberValue - this.baseNumber;
|
|
@@ -49911,7 +49932,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
49911
49932
|
}
|
|
49912
49933
|
}
|
|
49913
49934
|
this.resetBaseFormula();
|
|
49914
|
-
this.
|
|
49935
|
+
this.resetBaseNumber();
|
|
49915
49936
|
return cell.content;
|
|
49916
49937
|
}
|
|
49917
49938
|
squishCommand(command) {
|
|
@@ -49920,6 +49941,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
49920
49941
|
const squished = this.squish(cell, command.sheetId);
|
|
49921
49942
|
return typeof squished === "string" ? command.content : squished;
|
|
49922
49943
|
}
|
|
49944
|
+
this.resetBaseFormula();
|
|
49945
|
+
this.resetBaseNumber();
|
|
49923
49946
|
return command.content;
|
|
49924
49947
|
}
|
|
49925
49948
|
/**
|
|
@@ -50073,8 +50096,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
50073
50096
|
continue;
|
|
50074
50097
|
}
|
|
50075
50098
|
const current = command.content;
|
|
50076
|
-
if (current === void 0 || current === null || current === "")
|
|
50077
|
-
|
|
50099
|
+
if (current === void 0 || current === null || current === "") {
|
|
50100
|
+
this.rebase();
|
|
50101
|
+
strategy = "NOT_A_FORMULA";
|
|
50102
|
+
} else strategy = this.chooseStrategy(current, strategy, command.sheetId, getters);
|
|
50078
50103
|
let targetPositions;
|
|
50079
50104
|
if (command.type === "SQUISHED_UPDATE_CELL" && "targetRange" in command) {
|
|
50080
50105
|
const [start, end] = command.targetRange.split(":");
|
|
@@ -50119,8 +50144,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
50119
50144
|
let strategy;
|
|
50120
50145
|
for (const { key } of keys) {
|
|
50121
50146
|
const current = squished[key];
|
|
50122
|
-
if (current === void 0 || current === null || current === "")
|
|
50123
|
-
|
|
50147
|
+
if (current === void 0 || current === null || current === "") {
|
|
50148
|
+
this.rebase();
|
|
50149
|
+
strategy = void 0;
|
|
50150
|
+
continue;
|
|
50151
|
+
} else strategy = this.chooseStrategy(current, strategy, sheetId, getters);
|
|
50124
50152
|
const parts = key.split(":");
|
|
50125
50153
|
const targetPositions = parts.length === 1 ? expandXc(key) : expandRange(parts[0], parts[1]);
|
|
50126
50154
|
yield* this.applyStrategy(strategy, targetPositions, current, sheetId, getters);
|
|
@@ -50166,6 +50194,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
50166
50194
|
case "FIRST_OFFSET":
|
|
50167
50195
|
strategy = "COMBINE_OFFSET";
|
|
50168
50196
|
break;
|
|
50197
|
+
case "COMBINE_OFFSET":
|
|
50198
|
+
case "OFFSET_NUMBER": break;
|
|
50199
|
+
default: throw new Error(`Cannot unsquish an offset without a preceding base cell: ${strategy}`);
|
|
50169
50200
|
}
|
|
50170
50201
|
}
|
|
50171
50202
|
return strategy;
|
|
@@ -60764,6 +60795,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
60764
60795
|
transportService;
|
|
60765
60796
|
serverRevisionId;
|
|
60766
60797
|
commandSquisher;
|
|
60798
|
+
shouldVerifySquish;
|
|
60767
60799
|
/**
|
|
60768
60800
|
* Positions of the others client.
|
|
60769
60801
|
*/
|
|
@@ -60798,13 +60830,15 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
60798
60830
|
* between all connected clients
|
|
60799
60831
|
* @param serverRevisionId
|
|
60800
60832
|
* @param commandSquisher used to squish and unsquish commands to reduce the size of messages sent to the server
|
|
60833
|
+
* @param shouldVerifySquish either the commands should be unsquished and verified before being sent to the server
|
|
60801
60834
|
*/
|
|
60802
|
-
constructor(revisions, transportService, serverRevisionId = DEFAULT_REVISION_ID, commandSquisher) {
|
|
60835
|
+
constructor(revisions, transportService, serverRevisionId = DEFAULT_REVISION_ID, commandSquisher, shouldVerifySquish = true) {
|
|
60803
60836
|
super();
|
|
60804
60837
|
this.revisions = revisions;
|
|
60805
60838
|
this.transportService = transportService;
|
|
60806
60839
|
this.serverRevisionId = serverRevisionId;
|
|
60807
60840
|
this.commandSquisher = commandSquisher;
|
|
60841
|
+
this.shouldVerifySquish = shouldVerifySquish;
|
|
60808
60842
|
}
|
|
60809
60843
|
canApplyOptimisticUpdate() {
|
|
60810
60844
|
return !this.waitingUndoRedoAck;
|
|
@@ -61060,10 +61094,20 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
61060
61094
|
this.revisions.rebase(revision.id);
|
|
61061
61095
|
revision = this.revisions.get(message.nextRevisionId);
|
|
61062
61096
|
}
|
|
61063
|
-
|
|
61097
|
+
const squishedCommands = this.commandSquisher.squish(revision.commands);
|
|
61098
|
+
if (!squishedCommands.some((x) => x.type === "SQUISHED_UPDATE_CELL")) message = {
|
|
61064
61099
|
...message,
|
|
61065
61100
|
commands: revision.commands
|
|
61066
61101
|
};
|
|
61102
|
+
else if (this.shouldVerifySquish && !deepEquals(revision.commands, this.commandSquisher.unsquish(squishedCommands))) message = {
|
|
61103
|
+
...message,
|
|
61104
|
+
commands: revision.commands,
|
|
61105
|
+
squishedFailed: true
|
|
61106
|
+
};
|
|
61107
|
+
else message = {
|
|
61108
|
+
...message,
|
|
61109
|
+
commands: squishedCommands
|
|
61110
|
+
};
|
|
61067
61111
|
}
|
|
61068
61112
|
if (this.isReplayingInitialRevisions) throw new Error(`Trying to send a new revision while replaying initial revision. This can lead to endless dispatches every time the spreadsheet is open.
|
|
61069
61113
|
${JSON.stringify(message)}`);
|
|
@@ -77216,7 +77260,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
77216
77260
|
else if (_format === 0) {
|
|
77217
77261
|
const rowSeparator = this.locale.decimalSeparator === "," ? "/" : ",";
|
|
77218
77262
|
return transposeMatrix(_array).flatMap((row) => row.map((value) => {
|
|
77219
|
-
return isEvaluationError(value.value) ? value.value :
|
|
77263
|
+
return isEvaluationError(value.value) ? value.value : toLocaleString(value, this.locale);
|
|
77220
77264
|
})).join(rowSeparator);
|
|
77221
77265
|
} else return new EvaluationError(_t("Format must be 0 or 1"));
|
|
77222
77266
|
},
|
|
@@ -82977,7 +83021,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
82977
83021
|
description: _t("Concatenation of two values."),
|
|
82978
83022
|
args: [arg("value1 (string)", _t("The value to which value2 will be appended.")), arg("value2 (string)", _t("The value to append to value1."))],
|
|
82979
83023
|
compute: function(value1, value2) {
|
|
82980
|
-
return
|
|
83024
|
+
return toLocaleString(value1, this.locale) + toLocaleString(value2, this.locale);
|
|
82981
83025
|
},
|
|
82982
83026
|
isExported: true
|
|
82983
83027
|
};
|
|
@@ -83842,7 +83886,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
83842
83886
|
description: _t("Remove non-printable characters from a piece of text."),
|
|
83843
83887
|
args: [arg("text (string)", _t("The text whose non-printable characters are to be removed."))],
|
|
83844
83888
|
compute: function(text) {
|
|
83845
|
-
const _text =
|
|
83889
|
+
const _text = toLocaleString(text, this.locale);
|
|
83846
83890
|
let cleanedStr = "";
|
|
83847
83891
|
for (const char of _text) if (char && char.charCodeAt(0) > 31) cleanedStr += char;
|
|
83848
83892
|
return cleanedStr;
|
|
@@ -83853,7 +83897,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
83853
83897
|
description: _t("Appends strings to one another."),
|
|
83854
83898
|
args: [arg("string (string, range<string>, repeating)", _t("String to append in sequence."))],
|
|
83855
83899
|
compute: function(...datas) {
|
|
83856
|
-
return reduceAny(datas, (acc, a) => acc +
|
|
83900
|
+
return reduceAny(datas, (acc, a) => acc + toLocaleString(a, this.locale), "");
|
|
83857
83901
|
},
|
|
83858
83902
|
isExported: true
|
|
83859
83903
|
};
|
|
@@ -83861,7 +83905,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
83861
83905
|
description: _t("Tests whether two strings are identical."),
|
|
83862
83906
|
args: [arg("string1 (string)", _t("The first string to compare.")), arg("string2 (string)", _t("The second string to compare."))],
|
|
83863
83907
|
compute: function(string1, string2) {
|
|
83864
|
-
return
|
|
83908
|
+
return toLocaleString(string1, this.locale) === toLocaleString(string2, this.locale);
|
|
83865
83909
|
},
|
|
83866
83910
|
isExported: true
|
|
83867
83911
|
};
|
|
@@ -83873,8 +83917,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
83873
83917
|
arg(`starting_at (number, default=${DEFAULT_STARTING_AT})`, _t("The character within text_to_search at which to start the search."))
|
|
83874
83918
|
],
|
|
83875
83919
|
compute: function(searchFor, textToSearch, startingAt = { value: DEFAULT_STARTING_AT }) {
|
|
83876
|
-
const _searchFor =
|
|
83877
|
-
const _textToSearch =
|
|
83920
|
+
const _searchFor = toLocaleString(searchFor, this.locale);
|
|
83921
|
+
const _textToSearch = toLocaleString(textToSearch, this.locale);
|
|
83878
83922
|
const _startingAt = toNumber(startingAt, this.locale);
|
|
83879
83923
|
if (_textToSearch === "") return new EvaluationError(_t("The text_to_search must be non-empty."));
|
|
83880
83924
|
if (_startingAt < 1) return new EvaluationError(_t("The starting_at (%s) must be greater than or equal to 1.", _startingAt));
|
|
@@ -83911,8 +83955,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
83911
83955
|
description: _t("Concatenates elements of arrays with delimiter."),
|
|
83912
83956
|
args: [arg("delimiter (string)", _t("The character or string to place between each concatenated value.")), arg("value_or_array (string, range<string>, repeating)", _t("Value to be appended using delimiter."))],
|
|
83913
83957
|
compute: function(delimiter, ...valuesOrArrays) {
|
|
83914
|
-
const _delimiter =
|
|
83915
|
-
return reduceAny(valuesOrArrays, (acc, a) => (acc ? acc + _delimiter : "") +
|
|
83958
|
+
const _delimiter = toLocaleString(delimiter, this.locale);
|
|
83959
|
+
return reduceAny(valuesOrArrays, (acc, a) => (acc ? acc + _delimiter : "") + toLocaleString(a, this.locale), "");
|
|
83916
83960
|
}
|
|
83917
83961
|
};
|
|
83918
83962
|
const LEFT = {
|
|
@@ -83921,7 +83965,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
83921
83965
|
compute: function(text, ...args) {
|
|
83922
83966
|
const _numberOfCharacters = args.length ? toNumber(args[0], this.locale) : 1;
|
|
83923
83967
|
if (_numberOfCharacters < 0) return new EvaluationError(_t("The number_of_characters (%s) must be positive or null.", _numberOfCharacters));
|
|
83924
|
-
return
|
|
83968
|
+
return toLocaleString(text, this.locale).substring(0, _numberOfCharacters);
|
|
83925
83969
|
},
|
|
83926
83970
|
isExported: true
|
|
83927
83971
|
};
|
|
@@ -83929,7 +83973,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
83929
83973
|
description: _t("Length of a string."),
|
|
83930
83974
|
args: [arg("text (string)", _t("The string whose length will be returned."))],
|
|
83931
83975
|
compute: function(text) {
|
|
83932
|
-
return
|
|
83976
|
+
return toLocaleString(text, this.locale).length;
|
|
83933
83977
|
},
|
|
83934
83978
|
isExported: true
|
|
83935
83979
|
};
|
|
@@ -83937,7 +83981,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
83937
83981
|
description: _t("Converts a specified string to lowercase."),
|
|
83938
83982
|
args: [arg("text (string)", _t("The string to convert to lowercase."))],
|
|
83939
83983
|
compute: function(text) {
|
|
83940
|
-
return
|
|
83984
|
+
return toLocaleString(text, this.locale).toLowerCase();
|
|
83941
83985
|
},
|
|
83942
83986
|
isExported: true
|
|
83943
83987
|
};
|
|
@@ -83949,7 +83993,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
83949
83993
|
arg("extract_length (number)", _t("The length of the segment to extract."))
|
|
83950
83994
|
],
|
|
83951
83995
|
compute: function(text, starting_at, extract_length) {
|
|
83952
|
-
const _text =
|
|
83996
|
+
const _text = toLocaleString(text, this.locale);
|
|
83953
83997
|
const _starting_at = toNumber(starting_at, this.locale);
|
|
83954
83998
|
const _extract_length = toNumber(extract_length, this.locale);
|
|
83955
83999
|
if (_starting_at < 1) return new EvaluationError(_t("The starting_at argument (%s) must be positive greater than one.", _starting_at.toString()));
|
|
@@ -83962,7 +84006,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
83962
84006
|
description: _t("Capitalizes each word in a specified string."),
|
|
83963
84007
|
args: [arg("text_to_capitalize (string)", _t("The text which will be returned with the first letter of each word in uppercase and all other letters in lowercase."))],
|
|
83964
84008
|
compute: function(text) {
|
|
83965
|
-
return
|
|
84009
|
+
return toLocaleString(text, this.locale).replace(wordRegex, (word) => {
|
|
83966
84010
|
return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
|
|
83967
84011
|
});
|
|
83968
84012
|
},
|
|
@@ -84110,9 +84154,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
84110
84154
|
compute: function(text, position, length, newText) {
|
|
84111
84155
|
const _position = toNumber(position, this.locale);
|
|
84112
84156
|
if (_position < 1) return new EvaluationError(_t("The position (%s) must be greater than or equal to 1.", _position));
|
|
84113
|
-
const _text =
|
|
84157
|
+
const _text = toLocaleString(text, this.locale);
|
|
84114
84158
|
const _length = toNumber(length, this.locale);
|
|
84115
|
-
const _newText =
|
|
84159
|
+
const _newText = toLocaleString(newText, this.locale);
|
|
84116
84160
|
return _text.substring(0, _position - 1) + _newText + _text.substring(_position - 1 + _length);
|
|
84117
84161
|
},
|
|
84118
84162
|
isExported: true
|
|
@@ -84123,7 +84167,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
84123
84167
|
compute: function(text, ...args) {
|
|
84124
84168
|
const _numberOfCharacters = args.length ? toNumber(args[0], this.locale) : 1;
|
|
84125
84169
|
if (_numberOfCharacters < 0) return new EvaluationError(_t("The number_of_characters (%s) must be positive or null.", _numberOfCharacters));
|
|
84126
|
-
const _text =
|
|
84170
|
+
const _text = toLocaleString(text, this.locale);
|
|
84127
84171
|
const stringLength = _text.length;
|
|
84128
84172
|
return _text.substring(stringLength - _numberOfCharacters, stringLength);
|
|
84129
84173
|
},
|
|
@@ -84137,8 +84181,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
84137
84181
|
arg(`starting_at (number, default=${DEFAULT_STARTING_AT})`, _t("The character within text_to_search at which to start the search."))
|
|
84138
84182
|
],
|
|
84139
84183
|
compute: function(searchFor, textToSearch, startingAt = { value: DEFAULT_STARTING_AT }) {
|
|
84140
|
-
const _searchFor =
|
|
84141
|
-
const _textToSearch =
|
|
84184
|
+
const _searchFor = toLocaleString(searchFor, this.locale).toLowerCase();
|
|
84185
|
+
const _textToSearch = toLocaleString(textToSearch, this.locale).toLowerCase();
|
|
84142
84186
|
const _startingAt = toNumber(startingAt, this.locale);
|
|
84143
84187
|
if (_textToSearch === "") return {
|
|
84144
84188
|
value: CellErrorType.GenericError,
|
|
@@ -84168,8 +84212,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
84168
84212
|
arg(`remove_empty_text (boolean, default=${SPLIT_DEFAULT_REMOVE_EMPTY_TEXT})`, _t("Whether or not to remove empty text messages from the split results. The default behavior is to treat consecutive delimiters as one (if TRUE). If FALSE, empty cells values are added between consecutive delimiters."))
|
|
84169
84213
|
],
|
|
84170
84214
|
compute: function(text, delimiter, splitByEach = { value: SPLIT_DEFAULT_SPLIT_BY_EACH }, removeEmptyText = { value: SPLIT_DEFAULT_REMOVE_EMPTY_TEXT }) {
|
|
84171
|
-
const _text =
|
|
84172
|
-
const _delimiter = escapeRegExp(
|
|
84215
|
+
const _text = toLocaleString(text, this.locale);
|
|
84216
|
+
const _delimiter = escapeRegExp(toLocaleString(delimiter, this.locale));
|
|
84173
84217
|
const _splitByEach = toBoolean(splitByEach);
|
|
84174
84218
|
const _removeEmptyText = toBoolean(removeEmptyText);
|
|
84175
84219
|
if (_delimiter.length <= 0) return new EvaluationError(_t("The delimiter (%s) must be not be empty.", _delimiter));
|
|
@@ -84191,10 +84235,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
84191
84235
|
compute: function(textToSearch, searchFor, replaceWith, occurrenceNumber) {
|
|
84192
84236
|
const _occurrenceNumber = toNumber(occurrenceNumber, this.locale);
|
|
84193
84237
|
if (_occurrenceNumber < 0) return new EvaluationError(_t("The occurrenceNumber (%s) must be positive or null.", _occurrenceNumber));
|
|
84194
|
-
const _textToSearch =
|
|
84195
|
-
const _searchFor =
|
|
84238
|
+
const _textToSearch = toLocaleString(textToSearch, this.locale);
|
|
84239
|
+
const _searchFor = toLocaleString(searchFor, this.locale);
|
|
84196
84240
|
if (_searchFor === "") return _textToSearch;
|
|
84197
|
-
const _replaceWith =
|
|
84241
|
+
const _replaceWith = toLocaleString(replaceWith, this.locale);
|
|
84198
84242
|
const reg = new RegExp(escapeRegExp(_searchFor), "g");
|
|
84199
84243
|
if (_occurrenceNumber === 0) return _textToSearch.replace(reg, _replaceWith);
|
|
84200
84244
|
let n = 0;
|
|
@@ -84217,10 +84261,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
84217
84261
|
arg("texts (string, range<string>, repeating)", _t("Text item to join."))
|
|
84218
84262
|
],
|
|
84219
84263
|
compute: function(delimiter, ignoreEmpty = { value: TEXTJOIN_DEFAULT_IGNORE_EMPTY }, ...textsOrArrays) {
|
|
84220
|
-
const _delimiter =
|
|
84264
|
+
const _delimiter = toLocaleString(delimiter, this.locale);
|
|
84221
84265
|
const _ignoreEmpty = toBoolean(ignoreEmpty);
|
|
84222
84266
|
let n = 0;
|
|
84223
|
-
return reduceAny(textsOrArrays, (acc, a) => !(_ignoreEmpty &&
|
|
84267
|
+
return reduceAny(textsOrArrays, (acc, a) => !(_ignoreEmpty && toLocaleString(a, this.locale) === "") ? (n++ ? acc + _delimiter : "") + toLocaleString(a, this.locale) : acc, "");
|
|
84224
84268
|
},
|
|
84225
84269
|
isExported: true
|
|
84226
84270
|
};
|
|
@@ -84273,7 +84317,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
84273
84317
|
description: _t("Removes space characters."),
|
|
84274
84318
|
args: [arg("text (string)", _t("The text or reference to a cell containing text to be trimmed."))],
|
|
84275
84319
|
compute: function(text) {
|
|
84276
|
-
return trimContent(
|
|
84320
|
+
return trimContent(toLocaleString(text, this.locale));
|
|
84277
84321
|
},
|
|
84278
84322
|
isExported: true
|
|
84279
84323
|
};
|
|
@@ -84281,7 +84325,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
84281
84325
|
description: _t("Converts a specified string to uppercase."),
|
|
84282
84326
|
args: [arg("text (string)", _t("The string to convert to uppercase."))],
|
|
84283
84327
|
compute: function(text) {
|
|
84284
|
-
return
|
|
84328
|
+
return toLocaleString(text, this.locale).toUpperCase();
|
|
84285
84329
|
},
|
|
84286
84330
|
isExported: true
|
|
84287
84331
|
};
|
|
@@ -84378,7 +84422,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
84378
84422
|
args: [arg("url (string)", _t("The full URL of the link enclosed in quotation marks.")), arg("link_label (string, optional)", _t("The text to display in the cell, enclosed in quotation marks."))],
|
|
84379
84423
|
compute: function(url, linkLabel) {
|
|
84380
84424
|
const processedUrl = toString(url).trim();
|
|
84381
|
-
const processedLabel =
|
|
84425
|
+
const processedLabel = toLocaleString(linkLabel, this.locale) || processedUrl;
|
|
84382
84426
|
if (processedUrl === "") return processedLabel;
|
|
84383
84427
|
return markdownLink(processedLabel, processedUrl);
|
|
84384
84428
|
},
|
|
@@ -84775,8 +84819,8 @@ exports.stores = stores;
|
|
|
84775
84819
|
exports.tokenColors = tokenColors;
|
|
84776
84820
|
exports.tokenize = tokenize;
|
|
84777
84821
|
|
|
84778
|
-
__info__.version = "19.3.
|
|
84779
|
-
__info__.date = "2026-08-
|
|
84780
|
-
__info__.hash = "
|
|
84822
|
+
__info__.version = "19.3.18";
|
|
84823
|
+
__info__.date = "2026-08-29T09:16:28.272Z";
|
|
84824
|
+
__info__.hash = "1f4b1ae";
|
|
84781
84825
|
|
|
84782
84826
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|