@odoo/o-spreadsheet 16.1.16 → 16.1.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.js +34 -30
- package/dist/o-spreadsheet.d.ts +1 -0
- package/dist/o-spreadsheet.esm.js +34 -30
- package/dist/o-spreadsheet.iife.js +34 -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
|
}
|
|
@@ -32992,6 +32993,7 @@ class FilterEvaluationPlugin extends UIPlugin {
|
|
|
32992
32993
|
this.filterValues[cmd.sheetId] = {};
|
|
32993
32994
|
break;
|
|
32994
32995
|
case "HIDE_COLUMNS_ROWS":
|
|
32996
|
+
case "UNHIDE_COLUMNS_ROWS":
|
|
32995
32997
|
this.updateHiddenRows();
|
|
32996
32998
|
break;
|
|
32997
32999
|
case "UPDATE_FILTER":
|
|
@@ -34918,9 +34920,17 @@ class FindAndReplacePlugin extends UIPlugin {
|
|
|
34918
34920
|
case "REPLACE_ALL_SEARCH":
|
|
34919
34921
|
this.replaceAll(cmd.replaceWith);
|
|
34920
34922
|
break;
|
|
34923
|
+
case "EVALUATE_CELLS":
|
|
34924
|
+
case "UPDATE_CELL":
|
|
34925
|
+
case "REMOVE_FILTER_TABLE":
|
|
34926
|
+
case "UPDATE_FILTER":
|
|
34927
|
+
this.isSearchDirty = true;
|
|
34928
|
+
break;
|
|
34921
34929
|
case "UNDO":
|
|
34922
34930
|
case "REDO":
|
|
34923
34931
|
case "REMOVE_COLUMNS_ROWS":
|
|
34932
|
+
case "HIDE_COLUMNS_ROWS":
|
|
34933
|
+
case "UNHIDE_COLUMNS_ROWS":
|
|
34924
34934
|
case "ADD_COLUMNS_ROWS":
|
|
34925
34935
|
case "EVALUATE_CELLS":
|
|
34926
34936
|
case "UPDATE_CELL":
|
|
@@ -35056,37 +35066,31 @@ class FindAndReplacePlugin extends UIPlugin {
|
|
|
35056
35066
|
// ---------------------------------------------------------------------------
|
|
35057
35067
|
// Replace
|
|
35058
35068
|
// ---------------------------------------------------------------------------
|
|
35059
|
-
|
|
35060
|
-
|
|
35061
|
-
*/
|
|
35062
|
-
replace(replaceWith) {
|
|
35063
|
-
if (this.selectedMatchIndex === null || !this.currentSearchRegex) {
|
|
35069
|
+
replaceMatch(selectedMatch, replaceWith) {
|
|
35070
|
+
if (!this.currentSearchRegex) {
|
|
35064
35071
|
return;
|
|
35065
35072
|
}
|
|
35066
|
-
const matches = this.searchMatches;
|
|
35067
|
-
const selectedMatch = matches[this.selectedMatchIndex];
|
|
35068
35073
|
const sheetId = this.getters.getActiveSheetId();
|
|
35069
35074
|
const cell = this.getters.getCell({ sheetId, ...selectedMatch });
|
|
35075
|
+
const { col, row } = selectedMatch;
|
|
35070
35076
|
if ((cell === null || cell === void 0 ? void 0 : cell.isFormula) && !this.searchOptions.searchFormulas) {
|
|
35071
|
-
|
|
35077
|
+
return;
|
|
35072
35078
|
}
|
|
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);
|
|
35079
|
+
const replaceRegex = new RegExp(this.currentSearchRegex.source, this.currentSearchRegex.flags + "g");
|
|
35080
|
+
const toReplace = this.getSearchableString({ sheetId, col, row });
|
|
35081
|
+
const content = toReplace.replace(replaceRegex, replaceWith);
|
|
35082
|
+
this.dispatch("UPDATE_CELL", { sheetId, col, row, content });
|
|
35083
|
+
}
|
|
35084
|
+
/**
|
|
35085
|
+
* Replace the value of the currently selected match
|
|
35086
|
+
*/
|
|
35087
|
+
replace(replaceWith) {
|
|
35088
|
+
if (this.selectedMatchIndex === null) {
|
|
35089
|
+
return;
|
|
35089
35090
|
}
|
|
35091
|
+
const selectedMatch = this.searchMatches[this.selectedMatchIndex];
|
|
35092
|
+
this.replaceMatch(selectedMatch, replaceWith);
|
|
35093
|
+
this.selectNextCell(Direction.next);
|
|
35090
35094
|
}
|
|
35091
35095
|
/**
|
|
35092
35096
|
* Apply the replace function to all the matches one time.
|
|
@@ -35094,7 +35098,7 @@ class FindAndReplacePlugin extends UIPlugin {
|
|
|
35094
35098
|
replaceAll(replaceWith) {
|
|
35095
35099
|
const matchCount = this.searchMatches.length;
|
|
35096
35100
|
for (let i = 0; i < matchCount; i++) {
|
|
35097
|
-
this.
|
|
35101
|
+
this.replaceMatch(this.searchMatches[i], replaceWith);
|
|
35098
35102
|
}
|
|
35099
35103
|
}
|
|
35100
35104
|
getSearchableString(position) {
|
|
@@ -44309,6 +44313,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
44309
44313
|
exports.tokenize = tokenize;
|
|
44310
44314
|
|
|
44311
44315
|
|
|
44312
|
-
__info__.version = '16.1.
|
|
44313
|
-
__info__.date = '2023-
|
|
44314
|
-
__info__.hash = '
|
|
44316
|
+
__info__.version = '16.1.18';
|
|
44317
|
+
__info__.date = '2023-08-09T09:09:27.826Z';
|
|
44318
|
+
__info__.hash = '2e594e3';
|
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
|
}
|
|
@@ -32988,6 +32989,7 @@ class FilterEvaluationPlugin extends UIPlugin {
|
|
|
32988
32989
|
this.filterValues[cmd.sheetId] = {};
|
|
32989
32990
|
break;
|
|
32990
32991
|
case "HIDE_COLUMNS_ROWS":
|
|
32992
|
+
case "UNHIDE_COLUMNS_ROWS":
|
|
32991
32993
|
this.updateHiddenRows();
|
|
32992
32994
|
break;
|
|
32993
32995
|
case "UPDATE_FILTER":
|
|
@@ -34914,9 +34916,17 @@ class FindAndReplacePlugin extends UIPlugin {
|
|
|
34914
34916
|
case "REPLACE_ALL_SEARCH":
|
|
34915
34917
|
this.replaceAll(cmd.replaceWith);
|
|
34916
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;
|
|
34917
34925
|
case "UNDO":
|
|
34918
34926
|
case "REDO":
|
|
34919
34927
|
case "REMOVE_COLUMNS_ROWS":
|
|
34928
|
+
case "HIDE_COLUMNS_ROWS":
|
|
34929
|
+
case "UNHIDE_COLUMNS_ROWS":
|
|
34920
34930
|
case "ADD_COLUMNS_ROWS":
|
|
34921
34931
|
case "EVALUATE_CELLS":
|
|
34922
34932
|
case "UPDATE_CELL":
|
|
@@ -35052,37 +35062,31 @@ class FindAndReplacePlugin extends UIPlugin {
|
|
|
35052
35062
|
// ---------------------------------------------------------------------------
|
|
35053
35063
|
// Replace
|
|
35054
35064
|
// ---------------------------------------------------------------------------
|
|
35055
|
-
|
|
35056
|
-
|
|
35057
|
-
*/
|
|
35058
|
-
replace(replaceWith) {
|
|
35059
|
-
if (this.selectedMatchIndex === null || !this.currentSearchRegex) {
|
|
35065
|
+
replaceMatch(selectedMatch, replaceWith) {
|
|
35066
|
+
if (!this.currentSearchRegex) {
|
|
35060
35067
|
return;
|
|
35061
35068
|
}
|
|
35062
|
-
const matches = this.searchMatches;
|
|
35063
|
-
const selectedMatch = matches[this.selectedMatchIndex];
|
|
35064
35069
|
const sheetId = this.getters.getActiveSheetId();
|
|
35065
35070
|
const cell = this.getters.getCell({ sheetId, ...selectedMatch });
|
|
35071
|
+
const { col, row } = selectedMatch;
|
|
35066
35072
|
if ((cell === null || cell === void 0 ? void 0 : cell.isFormula) && !this.searchOptions.searchFormulas) {
|
|
35067
|
-
|
|
35073
|
+
return;
|
|
35068
35074
|
}
|
|
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);
|
|
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;
|
|
35085
35086
|
}
|
|
35087
|
+
const selectedMatch = this.searchMatches[this.selectedMatchIndex];
|
|
35088
|
+
this.replaceMatch(selectedMatch, replaceWith);
|
|
35089
|
+
this.selectNextCell(Direction.next);
|
|
35086
35090
|
}
|
|
35087
35091
|
/**
|
|
35088
35092
|
* Apply the replace function to all the matches one time.
|
|
@@ -35090,7 +35094,7 @@ class FindAndReplacePlugin extends UIPlugin {
|
|
|
35090
35094
|
replaceAll(replaceWith) {
|
|
35091
35095
|
const matchCount = this.searchMatches.length;
|
|
35092
35096
|
for (let i = 0; i < matchCount; i++) {
|
|
35093
|
-
this.
|
|
35097
|
+
this.replaceMatch(this.searchMatches[i], replaceWith);
|
|
35094
35098
|
}
|
|
35095
35099
|
}
|
|
35096
35100
|
getSearchableString(position) {
|
|
@@ -44277,6 +44281,6 @@ function addFunction(functionName, functionDescription) {
|
|
|
44277
44281
|
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
44282
|
|
|
44279
44283
|
|
|
44280
|
-
__info__.version = '16.1.
|
|
44281
|
-
__info__.date = '2023-
|
|
44282
|
-
__info__.hash = '
|
|
44284
|
+
__info__.version = '16.1.18';
|
|
44285
|
+
__info__.date = '2023-08-09T09:09:27.826Z';
|
|
44286
|
+
__info__.hash = '2e594e3';
|
|
@@ -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
|
}
|
|
@@ -32989,6 +32990,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
32989
32990
|
this.filterValues[cmd.sheetId] = {};
|
|
32990
32991
|
break;
|
|
32991
32992
|
case "HIDE_COLUMNS_ROWS":
|
|
32993
|
+
case "UNHIDE_COLUMNS_ROWS":
|
|
32992
32994
|
this.updateHiddenRows();
|
|
32993
32995
|
break;
|
|
32994
32996
|
case "UPDATE_FILTER":
|
|
@@ -34915,9 +34917,17 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
34915
34917
|
case "REPLACE_ALL_SEARCH":
|
|
34916
34918
|
this.replaceAll(cmd.replaceWith);
|
|
34917
34919
|
break;
|
|
34920
|
+
case "EVALUATE_CELLS":
|
|
34921
|
+
case "UPDATE_CELL":
|
|
34922
|
+
case "REMOVE_FILTER_TABLE":
|
|
34923
|
+
case "UPDATE_FILTER":
|
|
34924
|
+
this.isSearchDirty = true;
|
|
34925
|
+
break;
|
|
34918
34926
|
case "UNDO":
|
|
34919
34927
|
case "REDO":
|
|
34920
34928
|
case "REMOVE_COLUMNS_ROWS":
|
|
34929
|
+
case "HIDE_COLUMNS_ROWS":
|
|
34930
|
+
case "UNHIDE_COLUMNS_ROWS":
|
|
34921
34931
|
case "ADD_COLUMNS_ROWS":
|
|
34922
34932
|
case "EVALUATE_CELLS":
|
|
34923
34933
|
case "UPDATE_CELL":
|
|
@@ -35053,37 +35063,31 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
35053
35063
|
// ---------------------------------------------------------------------------
|
|
35054
35064
|
// Replace
|
|
35055
35065
|
// ---------------------------------------------------------------------------
|
|
35056
|
-
|
|
35057
|
-
|
|
35058
|
-
*/
|
|
35059
|
-
replace(replaceWith) {
|
|
35060
|
-
if (this.selectedMatchIndex === null || !this.currentSearchRegex) {
|
|
35066
|
+
replaceMatch(selectedMatch, replaceWith) {
|
|
35067
|
+
if (!this.currentSearchRegex) {
|
|
35061
35068
|
return;
|
|
35062
35069
|
}
|
|
35063
|
-
const matches = this.searchMatches;
|
|
35064
|
-
const selectedMatch = matches[this.selectedMatchIndex];
|
|
35065
35070
|
const sheetId = this.getters.getActiveSheetId();
|
|
35066
35071
|
const cell = this.getters.getCell({ sheetId, ...selectedMatch });
|
|
35072
|
+
const { col, row } = selectedMatch;
|
|
35067
35073
|
if ((cell === null || cell === void 0 ? void 0 : cell.isFormula) && !this.searchOptions.searchFormulas) {
|
|
35068
|
-
|
|
35074
|
+
return;
|
|
35069
35075
|
}
|
|
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);
|
|
35076
|
+
const replaceRegex = new RegExp(this.currentSearchRegex.source, this.currentSearchRegex.flags + "g");
|
|
35077
|
+
const toReplace = this.getSearchableString({ sheetId, col, row });
|
|
35078
|
+
const content = toReplace.replace(replaceRegex, replaceWith);
|
|
35079
|
+
this.dispatch("UPDATE_CELL", { sheetId, col, row, content });
|
|
35080
|
+
}
|
|
35081
|
+
/**
|
|
35082
|
+
* Replace the value of the currently selected match
|
|
35083
|
+
*/
|
|
35084
|
+
replace(replaceWith) {
|
|
35085
|
+
if (this.selectedMatchIndex === null) {
|
|
35086
|
+
return;
|
|
35086
35087
|
}
|
|
35088
|
+
const selectedMatch = this.searchMatches[this.selectedMatchIndex];
|
|
35089
|
+
this.replaceMatch(selectedMatch, replaceWith);
|
|
35090
|
+
this.selectNextCell(Direction.next);
|
|
35087
35091
|
}
|
|
35088
35092
|
/**
|
|
35089
35093
|
* Apply the replace function to all the matches one time.
|
|
@@ -35091,7 +35095,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
35091
35095
|
replaceAll(replaceWith) {
|
|
35092
35096
|
const matchCount = this.searchMatches.length;
|
|
35093
35097
|
for (let i = 0; i < matchCount; i++) {
|
|
35094
|
-
this.
|
|
35098
|
+
this.replaceMatch(this.searchMatches[i], replaceWith);
|
|
35095
35099
|
}
|
|
35096
35100
|
}
|
|
35097
35101
|
getSearchableString(position) {
|
|
@@ -44308,9 +44312,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
44308
44312
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
44309
44313
|
|
|
44310
44314
|
|
|
44311
|
-
__info__.version = '16.1.
|
|
44312
|
-
__info__.date = '2023-
|
|
44313
|
-
__info__.hash = '
|
|
44315
|
+
__info__.version = '16.1.18';
|
|
44316
|
+
__info__.date = '2023-08-09T09:09:27.826Z';
|
|
44317
|
+
__info__.hash = '2e594e3';
|
|
44314
44318
|
|
|
44315
44319
|
|
|
44316
44320
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|