@odoo/o-spreadsheet 16.1.16 → 16.1.17
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 +33 -30
- package/dist/o-spreadsheet.d.ts +1 -0
- package/dist/o-spreadsheet.esm.js +33 -30
- package/dist/o-spreadsheet.iife.js +33 -30
- package/dist/o-spreadsheet.iife.min.js +125 -125
- package/package.json +1 -1
|
@@ -29789,7 +29789,7 @@ class HeaderSizePlugin extends CorePlugin {
|
|
|
29789
29789
|
this.sizes = {};
|
|
29790
29790
|
}
|
|
29791
29791
|
handle(cmd) {
|
|
29792
|
-
var _a, _b
|
|
29792
|
+
var _a, _b;
|
|
29793
29793
|
switch (cmd.type) {
|
|
29794
29794
|
case "CREATE_SHEET": {
|
|
29795
29795
|
const computedSizes = this.computeSheetSizes(cmd.sheetId);
|
|
@@ -29877,7 +29877,8 @@ class HeaderSizePlugin extends CorePlugin {
|
|
|
29877
29877
|
}
|
|
29878
29878
|
break;
|
|
29879
29879
|
case "UPDATE_CELL":
|
|
29880
|
-
|
|
29880
|
+
const row = (_b = (_a = this.sizes[cmd.sheetId]) === null || _a === void 0 ? void 0 : _a["ROW"]) === null || _b === void 0 ? void 0 : _b[cmd.row];
|
|
29881
|
+
if (row && !row.manualSize) {
|
|
29881
29882
|
const { sheetId, row } = cmd;
|
|
29882
29883
|
this.history.update("sizes", sheetId, "ROW", row, "computedSize", lazy(() => this.getRowTallestCellSize(sheetId, row)));
|
|
29883
29884
|
}
|
|
@@ -34918,9 +34919,17 @@ class FindAndReplacePlugin extends UIPlugin {
|
|
|
34918
34919
|
case "REPLACE_ALL_SEARCH":
|
|
34919
34920
|
this.replaceAll(cmd.replaceWith);
|
|
34920
34921
|
break;
|
|
34922
|
+
case "EVALUATE_CELLS":
|
|
34923
|
+
case "UPDATE_CELL":
|
|
34924
|
+
case "REMOVE_FILTER_TABLE":
|
|
34925
|
+
case "UPDATE_FILTER":
|
|
34926
|
+
this.isSearchDirty = true;
|
|
34927
|
+
break;
|
|
34921
34928
|
case "UNDO":
|
|
34922
34929
|
case "REDO":
|
|
34923
34930
|
case "REMOVE_COLUMNS_ROWS":
|
|
34931
|
+
case "HIDE_COLUMNS_ROWS":
|
|
34932
|
+
case "UNHIDE_COLUMNS_ROWS":
|
|
34924
34933
|
case "ADD_COLUMNS_ROWS":
|
|
34925
34934
|
case "EVALUATE_CELLS":
|
|
34926
34935
|
case "UPDATE_CELL":
|
|
@@ -35056,37 +35065,31 @@ class FindAndReplacePlugin extends UIPlugin {
|
|
|
35056
35065
|
// ---------------------------------------------------------------------------
|
|
35057
35066
|
// Replace
|
|
35058
35067
|
// ---------------------------------------------------------------------------
|
|
35059
|
-
|
|
35060
|
-
|
|
35061
|
-
*/
|
|
35062
|
-
replace(replaceWith) {
|
|
35063
|
-
if (this.selectedMatchIndex === null || !this.currentSearchRegex) {
|
|
35068
|
+
replaceMatch(selectedMatch, replaceWith) {
|
|
35069
|
+
if (!this.currentSearchRegex) {
|
|
35064
35070
|
return;
|
|
35065
35071
|
}
|
|
35066
|
-
const matches = this.searchMatches;
|
|
35067
|
-
const selectedMatch = matches[this.selectedMatchIndex];
|
|
35068
35072
|
const sheetId = this.getters.getActiveSheetId();
|
|
35069
35073
|
const cell = this.getters.getCell({ sheetId, ...selectedMatch });
|
|
35074
|
+
const { col, row } = selectedMatch;
|
|
35070
35075
|
if ((cell === null || cell === void 0 ? void 0 : cell.isFormula) && !this.searchOptions.searchFormulas) {
|
|
35071
|
-
|
|
35076
|
+
return;
|
|
35072
35077
|
}
|
|
35073
|
-
|
|
35074
|
-
|
|
35075
|
-
|
|
35076
|
-
|
|
35077
|
-
|
|
35078
|
-
|
|
35079
|
-
|
|
35080
|
-
|
|
35081
|
-
|
|
35082
|
-
|
|
35083
|
-
|
|
35084
|
-
row: selectedMatch.row,
|
|
35085
|
-
content: newContent,
|
|
35086
|
-
});
|
|
35087
|
-
this.searchMatches.splice(this.selectedMatchIndex, 1);
|
|
35088
|
-
this.selectNextCell(Direction.current);
|
|
35078
|
+
const replaceRegex = new RegExp(this.currentSearchRegex.source, this.currentSearchRegex.flags + "g");
|
|
35079
|
+
const toReplace = this.getSearchableString({ sheetId, col, row });
|
|
35080
|
+
const content = toReplace.replace(replaceRegex, replaceWith);
|
|
35081
|
+
this.dispatch("UPDATE_CELL", { sheetId, col, row, content });
|
|
35082
|
+
}
|
|
35083
|
+
/**
|
|
35084
|
+
* Replace the value of the currently selected match
|
|
35085
|
+
*/
|
|
35086
|
+
replace(replaceWith) {
|
|
35087
|
+
if (this.selectedMatchIndex === null) {
|
|
35088
|
+
return;
|
|
35089
35089
|
}
|
|
35090
|
+
const selectedMatch = this.searchMatches[this.selectedMatchIndex];
|
|
35091
|
+
this.replaceMatch(selectedMatch, replaceWith);
|
|
35092
|
+
this.selectNextCell(Direction.next);
|
|
35090
35093
|
}
|
|
35091
35094
|
/**
|
|
35092
35095
|
* Apply the replace function to all the matches one time.
|
|
@@ -35094,7 +35097,7 @@ class FindAndReplacePlugin extends UIPlugin {
|
|
|
35094
35097
|
replaceAll(replaceWith) {
|
|
35095
35098
|
const matchCount = this.searchMatches.length;
|
|
35096
35099
|
for (let i = 0; i < matchCount; i++) {
|
|
35097
|
-
this.
|
|
35100
|
+
this.replaceMatch(this.searchMatches[i], replaceWith);
|
|
35098
35101
|
}
|
|
35099
35102
|
}
|
|
35100
35103
|
getSearchableString(position) {
|
|
@@ -44309,6 +44312,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
44309
44312
|
exports.tokenize = tokenize;
|
|
44310
44313
|
|
|
44311
44314
|
|
|
44312
|
-
__info__.version = '16.1.
|
|
44313
|
-
__info__.date = '2023-
|
|
44314
|
-
__info__.hash = '
|
|
44315
|
+
__info__.version = '16.1.17';
|
|
44316
|
+
__info__.date = '2023-08-07T09:00:57.212Z';
|
|
44317
|
+
__info__.hash = '2a79aa8';
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -29785,7 +29785,7 @@ class HeaderSizePlugin extends CorePlugin {
|
|
|
29785
29785
|
this.sizes = {};
|
|
29786
29786
|
}
|
|
29787
29787
|
handle(cmd) {
|
|
29788
|
-
var _a, _b
|
|
29788
|
+
var _a, _b;
|
|
29789
29789
|
switch (cmd.type) {
|
|
29790
29790
|
case "CREATE_SHEET": {
|
|
29791
29791
|
const computedSizes = this.computeSheetSizes(cmd.sheetId);
|
|
@@ -29873,7 +29873,8 @@ class HeaderSizePlugin extends CorePlugin {
|
|
|
29873
29873
|
}
|
|
29874
29874
|
break;
|
|
29875
29875
|
case "UPDATE_CELL":
|
|
29876
|
-
|
|
29876
|
+
const row = (_b = (_a = this.sizes[cmd.sheetId]) === null || _a === void 0 ? void 0 : _a["ROW"]) === null || _b === void 0 ? void 0 : _b[cmd.row];
|
|
29877
|
+
if (row && !row.manualSize) {
|
|
29877
29878
|
const { sheetId, row } = cmd;
|
|
29878
29879
|
this.history.update("sizes", sheetId, "ROW", row, "computedSize", lazy(() => this.getRowTallestCellSize(sheetId, row)));
|
|
29879
29880
|
}
|
|
@@ -34914,9 +34915,17 @@ class FindAndReplacePlugin extends UIPlugin {
|
|
|
34914
34915
|
case "REPLACE_ALL_SEARCH":
|
|
34915
34916
|
this.replaceAll(cmd.replaceWith);
|
|
34916
34917
|
break;
|
|
34918
|
+
case "EVALUATE_CELLS":
|
|
34919
|
+
case "UPDATE_CELL":
|
|
34920
|
+
case "REMOVE_FILTER_TABLE":
|
|
34921
|
+
case "UPDATE_FILTER":
|
|
34922
|
+
this.isSearchDirty = true;
|
|
34923
|
+
break;
|
|
34917
34924
|
case "UNDO":
|
|
34918
34925
|
case "REDO":
|
|
34919
34926
|
case "REMOVE_COLUMNS_ROWS":
|
|
34927
|
+
case "HIDE_COLUMNS_ROWS":
|
|
34928
|
+
case "UNHIDE_COLUMNS_ROWS":
|
|
34920
34929
|
case "ADD_COLUMNS_ROWS":
|
|
34921
34930
|
case "EVALUATE_CELLS":
|
|
34922
34931
|
case "UPDATE_CELL":
|
|
@@ -35052,37 +35061,31 @@ class FindAndReplacePlugin extends UIPlugin {
|
|
|
35052
35061
|
// ---------------------------------------------------------------------------
|
|
35053
35062
|
// Replace
|
|
35054
35063
|
// ---------------------------------------------------------------------------
|
|
35055
|
-
|
|
35056
|
-
|
|
35057
|
-
*/
|
|
35058
|
-
replace(replaceWith) {
|
|
35059
|
-
if (this.selectedMatchIndex === null || !this.currentSearchRegex) {
|
|
35064
|
+
replaceMatch(selectedMatch, replaceWith) {
|
|
35065
|
+
if (!this.currentSearchRegex) {
|
|
35060
35066
|
return;
|
|
35061
35067
|
}
|
|
35062
|
-
const matches = this.searchMatches;
|
|
35063
|
-
const selectedMatch = matches[this.selectedMatchIndex];
|
|
35064
35068
|
const sheetId = this.getters.getActiveSheetId();
|
|
35065
35069
|
const cell = this.getters.getCell({ sheetId, ...selectedMatch });
|
|
35070
|
+
const { col, row } = selectedMatch;
|
|
35066
35071
|
if ((cell === null || cell === void 0 ? void 0 : cell.isFormula) && !this.searchOptions.searchFormulas) {
|
|
35067
|
-
|
|
35072
|
+
return;
|
|
35068
35073
|
}
|
|
35069
|
-
|
|
35070
|
-
|
|
35071
|
-
|
|
35072
|
-
|
|
35073
|
-
|
|
35074
|
-
|
|
35075
|
-
|
|
35076
|
-
|
|
35077
|
-
|
|
35078
|
-
|
|
35079
|
-
|
|
35080
|
-
row: selectedMatch.row,
|
|
35081
|
-
content: newContent,
|
|
35082
|
-
});
|
|
35083
|
-
this.searchMatches.splice(this.selectedMatchIndex, 1);
|
|
35084
|
-
this.selectNextCell(Direction.current);
|
|
35074
|
+
const replaceRegex = new RegExp(this.currentSearchRegex.source, this.currentSearchRegex.flags + "g");
|
|
35075
|
+
const toReplace = this.getSearchableString({ sheetId, col, row });
|
|
35076
|
+
const content = toReplace.replace(replaceRegex, replaceWith);
|
|
35077
|
+
this.dispatch("UPDATE_CELL", { sheetId, col, row, content });
|
|
35078
|
+
}
|
|
35079
|
+
/**
|
|
35080
|
+
* Replace the value of the currently selected match
|
|
35081
|
+
*/
|
|
35082
|
+
replace(replaceWith) {
|
|
35083
|
+
if (this.selectedMatchIndex === null) {
|
|
35084
|
+
return;
|
|
35085
35085
|
}
|
|
35086
|
+
const selectedMatch = this.searchMatches[this.selectedMatchIndex];
|
|
35087
|
+
this.replaceMatch(selectedMatch, replaceWith);
|
|
35088
|
+
this.selectNextCell(Direction.next);
|
|
35086
35089
|
}
|
|
35087
35090
|
/**
|
|
35088
35091
|
* Apply the replace function to all the matches one time.
|
|
@@ -35090,7 +35093,7 @@ class FindAndReplacePlugin extends UIPlugin {
|
|
|
35090
35093
|
replaceAll(replaceWith) {
|
|
35091
35094
|
const matchCount = this.searchMatches.length;
|
|
35092
35095
|
for (let i = 0; i < matchCount; i++) {
|
|
35093
|
-
this.
|
|
35096
|
+
this.replaceMatch(this.searchMatches[i], replaceWith);
|
|
35094
35097
|
}
|
|
35095
35098
|
}
|
|
35096
35099
|
getSearchableString(position) {
|
|
@@ -44277,6 +44280,6 @@ function addFunction(functionName, functionDescription) {
|
|
|
44277
44280
|
export { AbstractChart, CommandResult, CorePlugin, DATETIME_FORMAT, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, compile, components, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, invalidateEvaluationCommands, links, load, parse, readonlyAllowedCommands, registries, setTranslationMethod, tokenize };
|
|
44278
44281
|
|
|
44279
44282
|
|
|
44280
|
-
__info__.version = '16.1.
|
|
44281
|
-
__info__.date = '2023-
|
|
44282
|
-
__info__.hash = '
|
|
44283
|
+
__info__.version = '16.1.17';
|
|
44284
|
+
__info__.date = '2023-08-07T09:00:57.212Z';
|
|
44285
|
+
__info__.hash = '2a79aa8';
|
|
@@ -29786,7 +29786,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
29786
29786
|
this.sizes = {};
|
|
29787
29787
|
}
|
|
29788
29788
|
handle(cmd) {
|
|
29789
|
-
var _a, _b
|
|
29789
|
+
var _a, _b;
|
|
29790
29790
|
switch (cmd.type) {
|
|
29791
29791
|
case "CREATE_SHEET": {
|
|
29792
29792
|
const computedSizes = this.computeSheetSizes(cmd.sheetId);
|
|
@@ -29874,7 +29874,8 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
29874
29874
|
}
|
|
29875
29875
|
break;
|
|
29876
29876
|
case "UPDATE_CELL":
|
|
29877
|
-
|
|
29877
|
+
const row = (_b = (_a = this.sizes[cmd.sheetId]) === null || _a === void 0 ? void 0 : _a["ROW"]) === null || _b === void 0 ? void 0 : _b[cmd.row];
|
|
29878
|
+
if (row && !row.manualSize) {
|
|
29878
29879
|
const { sheetId, row } = cmd;
|
|
29879
29880
|
this.history.update("sizes", sheetId, "ROW", row, "computedSize", lazy(() => this.getRowTallestCellSize(sheetId, row)));
|
|
29880
29881
|
}
|
|
@@ -34915,9 +34916,17 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
34915
34916
|
case "REPLACE_ALL_SEARCH":
|
|
34916
34917
|
this.replaceAll(cmd.replaceWith);
|
|
34917
34918
|
break;
|
|
34919
|
+
case "EVALUATE_CELLS":
|
|
34920
|
+
case "UPDATE_CELL":
|
|
34921
|
+
case "REMOVE_FILTER_TABLE":
|
|
34922
|
+
case "UPDATE_FILTER":
|
|
34923
|
+
this.isSearchDirty = true;
|
|
34924
|
+
break;
|
|
34918
34925
|
case "UNDO":
|
|
34919
34926
|
case "REDO":
|
|
34920
34927
|
case "REMOVE_COLUMNS_ROWS":
|
|
34928
|
+
case "HIDE_COLUMNS_ROWS":
|
|
34929
|
+
case "UNHIDE_COLUMNS_ROWS":
|
|
34921
34930
|
case "ADD_COLUMNS_ROWS":
|
|
34922
34931
|
case "EVALUATE_CELLS":
|
|
34923
34932
|
case "UPDATE_CELL":
|
|
@@ -35053,37 +35062,31 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
35053
35062
|
// ---------------------------------------------------------------------------
|
|
35054
35063
|
// Replace
|
|
35055
35064
|
// ---------------------------------------------------------------------------
|
|
35056
|
-
|
|
35057
|
-
|
|
35058
|
-
*/
|
|
35059
|
-
replace(replaceWith) {
|
|
35060
|
-
if (this.selectedMatchIndex === null || !this.currentSearchRegex) {
|
|
35065
|
+
replaceMatch(selectedMatch, replaceWith) {
|
|
35066
|
+
if (!this.currentSearchRegex) {
|
|
35061
35067
|
return;
|
|
35062
35068
|
}
|
|
35063
|
-
const matches = this.searchMatches;
|
|
35064
|
-
const selectedMatch = matches[this.selectedMatchIndex];
|
|
35065
35069
|
const sheetId = this.getters.getActiveSheetId();
|
|
35066
35070
|
const cell = this.getters.getCell({ sheetId, ...selectedMatch });
|
|
35071
|
+
const { col, row } = selectedMatch;
|
|
35067
35072
|
if ((cell === null || cell === void 0 ? void 0 : cell.isFormula) && !this.searchOptions.searchFormulas) {
|
|
35068
|
-
|
|
35073
|
+
return;
|
|
35069
35074
|
}
|
|
35070
|
-
|
|
35071
|
-
|
|
35072
|
-
|
|
35073
|
-
|
|
35074
|
-
|
|
35075
|
-
|
|
35076
|
-
|
|
35077
|
-
|
|
35078
|
-
|
|
35079
|
-
|
|
35080
|
-
|
|
35081
|
-
row: selectedMatch.row,
|
|
35082
|
-
content: newContent,
|
|
35083
|
-
});
|
|
35084
|
-
this.searchMatches.splice(this.selectedMatchIndex, 1);
|
|
35085
|
-
this.selectNextCell(Direction.current);
|
|
35075
|
+
const replaceRegex = new RegExp(this.currentSearchRegex.source, this.currentSearchRegex.flags + "g");
|
|
35076
|
+
const toReplace = this.getSearchableString({ sheetId, col, row });
|
|
35077
|
+
const content = toReplace.replace(replaceRegex, replaceWith);
|
|
35078
|
+
this.dispatch("UPDATE_CELL", { sheetId, col, row, content });
|
|
35079
|
+
}
|
|
35080
|
+
/**
|
|
35081
|
+
* Replace the value of the currently selected match
|
|
35082
|
+
*/
|
|
35083
|
+
replace(replaceWith) {
|
|
35084
|
+
if (this.selectedMatchIndex === null) {
|
|
35085
|
+
return;
|
|
35086
35086
|
}
|
|
35087
|
+
const selectedMatch = this.searchMatches[this.selectedMatchIndex];
|
|
35088
|
+
this.replaceMatch(selectedMatch, replaceWith);
|
|
35089
|
+
this.selectNextCell(Direction.next);
|
|
35087
35090
|
}
|
|
35088
35091
|
/**
|
|
35089
35092
|
* Apply the replace function to all the matches one time.
|
|
@@ -35091,7 +35094,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
35091
35094
|
replaceAll(replaceWith) {
|
|
35092
35095
|
const matchCount = this.searchMatches.length;
|
|
35093
35096
|
for (let i = 0; i < matchCount; i++) {
|
|
35094
|
-
this.
|
|
35097
|
+
this.replaceMatch(this.searchMatches[i], replaceWith);
|
|
35095
35098
|
}
|
|
35096
35099
|
}
|
|
35097
35100
|
getSearchableString(position) {
|
|
@@ -44308,9 +44311,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
44308
44311
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
44309
44312
|
|
|
44310
44313
|
|
|
44311
|
-
__info__.version = '16.1.
|
|
44312
|
-
__info__.date = '2023-
|
|
44313
|
-
__info__.hash = '
|
|
44314
|
+
__info__.version = '16.1.17';
|
|
44315
|
+
__info__.date = '2023-08-07T09:00:57.212Z';
|
|
44316
|
+
__info__.hash = '2a79aa8';
|
|
44314
44317
|
|
|
44315
44318
|
|
|
44316
44319
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|