@odoo/o-spreadsheet 16.2.11 → 16.2.13
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.
|
@@ -20716,6 +20716,14 @@ class FiguresContainer extends owl.Component {
|
|
|
20716
20716
|
if (dirY < 0) {
|
|
20717
20717
|
this.dnd.y = dndInitialY + figure.height * fraction;
|
|
20718
20718
|
}
|
|
20719
|
+
if (this.dnd.x < 0) {
|
|
20720
|
+
this.dnd.width += this.dnd.x;
|
|
20721
|
+
this.dnd.x = 0;
|
|
20722
|
+
}
|
|
20723
|
+
if (this.dnd.y < 0) {
|
|
20724
|
+
this.dnd.height += this.dnd.y;
|
|
20725
|
+
this.dnd.y = 0;
|
|
20726
|
+
}
|
|
20719
20727
|
};
|
|
20720
20728
|
}
|
|
20721
20729
|
else {
|
|
@@ -20731,6 +20739,14 @@ class FiguresContainer extends owl.Component {
|
|
|
20731
20739
|
if (dirY < 0) {
|
|
20732
20740
|
this.dnd.y = dndInitialY - deltaY;
|
|
20733
20741
|
}
|
|
20742
|
+
if (this.dnd.x < 0) {
|
|
20743
|
+
this.dnd.width += this.dnd.x;
|
|
20744
|
+
this.dnd.x = 0;
|
|
20745
|
+
}
|
|
20746
|
+
if (this.dnd.y < 0) {
|
|
20747
|
+
this.dnd.height += this.dnd.y;
|
|
20748
|
+
this.dnd.y = 0;
|
|
20749
|
+
}
|
|
20734
20750
|
};
|
|
20735
20751
|
}
|
|
20736
20752
|
const onMouseUp = (ev) => {
|
|
@@ -29344,7 +29360,7 @@ class HeaderSizePlugin extends CorePlugin {
|
|
|
29344
29360
|
this.sizes = {};
|
|
29345
29361
|
}
|
|
29346
29362
|
handle(cmd) {
|
|
29347
|
-
var _a, _b
|
|
29363
|
+
var _a, _b;
|
|
29348
29364
|
switch (cmd.type) {
|
|
29349
29365
|
case "CREATE_SHEET": {
|
|
29350
29366
|
const computedSizes = this.computeSheetSizes(cmd.sheetId);
|
|
@@ -29432,7 +29448,8 @@ class HeaderSizePlugin extends CorePlugin {
|
|
|
29432
29448
|
}
|
|
29433
29449
|
break;
|
|
29434
29450
|
case "UPDATE_CELL":
|
|
29435
|
-
|
|
29451
|
+
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];
|
|
29452
|
+
if (row && !row.manualSize) {
|
|
29436
29453
|
const { sheetId, row } = cmd;
|
|
29437
29454
|
this.history.update("sizes", sheetId, "ROW", row, "computedSize", lazy(() => this.getRowTallestCellSize(sheetId, row)));
|
|
29438
29455
|
}
|
|
@@ -32580,6 +32597,7 @@ class FilterEvaluationPlugin extends UIPlugin {
|
|
|
32580
32597
|
this.filterValues[cmd.sheetId] = {};
|
|
32581
32598
|
break;
|
|
32582
32599
|
case "HIDE_COLUMNS_ROWS":
|
|
32600
|
+
case "UNHIDE_COLUMNS_ROWS":
|
|
32583
32601
|
this.updateHiddenRows();
|
|
32584
32602
|
break;
|
|
32585
32603
|
case "UPDATE_FILTER":
|
|
@@ -34507,9 +34525,17 @@ class FindAndReplacePlugin extends UIPlugin {
|
|
|
34507
34525
|
case "REPLACE_ALL_SEARCH":
|
|
34508
34526
|
this.replaceAll(cmd.replaceWith);
|
|
34509
34527
|
break;
|
|
34528
|
+
case "EVALUATE_CELLS":
|
|
34529
|
+
case "UPDATE_CELL":
|
|
34530
|
+
case "REMOVE_FILTER_TABLE":
|
|
34531
|
+
case "UPDATE_FILTER":
|
|
34532
|
+
this.isSearchDirty = true;
|
|
34533
|
+
break;
|
|
34510
34534
|
case "UNDO":
|
|
34511
34535
|
case "REDO":
|
|
34512
34536
|
case "REMOVE_COLUMNS_ROWS":
|
|
34537
|
+
case "HIDE_COLUMNS_ROWS":
|
|
34538
|
+
case "UNHIDE_COLUMNS_ROWS":
|
|
34513
34539
|
case "ADD_COLUMNS_ROWS":
|
|
34514
34540
|
case "EVALUATE_CELLS":
|
|
34515
34541
|
case "UPDATE_CELL":
|
|
@@ -34645,37 +34671,31 @@ class FindAndReplacePlugin extends UIPlugin {
|
|
|
34645
34671
|
// ---------------------------------------------------------------------------
|
|
34646
34672
|
// Replace
|
|
34647
34673
|
// ---------------------------------------------------------------------------
|
|
34648
|
-
|
|
34649
|
-
|
|
34650
|
-
*/
|
|
34651
|
-
replace(replaceWith) {
|
|
34652
|
-
if (this.selectedMatchIndex === null || !this.currentSearchRegex) {
|
|
34674
|
+
replaceMatch(selectedMatch, replaceWith) {
|
|
34675
|
+
if (!this.currentSearchRegex) {
|
|
34653
34676
|
return;
|
|
34654
34677
|
}
|
|
34655
|
-
const matches = this.searchMatches;
|
|
34656
|
-
const selectedMatch = matches[this.selectedMatchIndex];
|
|
34657
34678
|
const sheetId = this.getters.getActiveSheetId();
|
|
34658
34679
|
const cell = this.getters.getCell({ sheetId, ...selectedMatch });
|
|
34680
|
+
const { col, row } = selectedMatch;
|
|
34659
34681
|
if ((cell === null || cell === void 0 ? void 0 : cell.isFormula) && !this.searchOptions.searchFormulas) {
|
|
34660
|
-
|
|
34682
|
+
return;
|
|
34661
34683
|
}
|
|
34662
|
-
|
|
34663
|
-
|
|
34664
|
-
|
|
34665
|
-
|
|
34666
|
-
|
|
34667
|
-
|
|
34668
|
-
|
|
34669
|
-
|
|
34670
|
-
|
|
34671
|
-
|
|
34672
|
-
|
|
34673
|
-
row: selectedMatch.row,
|
|
34674
|
-
content: newContent,
|
|
34675
|
-
});
|
|
34676
|
-
this.searchMatches.splice(this.selectedMatchIndex, 1);
|
|
34677
|
-
this.selectNextCell(Direction.current);
|
|
34684
|
+
const replaceRegex = new RegExp(this.currentSearchRegex.source, this.currentSearchRegex.flags + "g");
|
|
34685
|
+
const toReplace = this.getSearchableString({ sheetId, col, row });
|
|
34686
|
+
const content = toReplace.replace(replaceRegex, replaceWith);
|
|
34687
|
+
this.dispatch("UPDATE_CELL", { sheetId, col, row, content });
|
|
34688
|
+
}
|
|
34689
|
+
/**
|
|
34690
|
+
* Replace the value of the currently selected match
|
|
34691
|
+
*/
|
|
34692
|
+
replace(replaceWith) {
|
|
34693
|
+
if (this.selectedMatchIndex === null) {
|
|
34694
|
+
return;
|
|
34678
34695
|
}
|
|
34696
|
+
const selectedMatch = this.searchMatches[this.selectedMatchIndex];
|
|
34697
|
+
this.replaceMatch(selectedMatch, replaceWith);
|
|
34698
|
+
this.selectNextCell(Direction.next);
|
|
34679
34699
|
}
|
|
34680
34700
|
/**
|
|
34681
34701
|
* Apply the replace function to all the matches one time.
|
|
@@ -34683,7 +34703,7 @@ class FindAndReplacePlugin extends UIPlugin {
|
|
|
34683
34703
|
replaceAll(replaceWith) {
|
|
34684
34704
|
const matchCount = this.searchMatches.length;
|
|
34685
34705
|
for (let i = 0; i < matchCount; i++) {
|
|
34686
|
-
this.
|
|
34706
|
+
this.replaceMatch(this.searchMatches[i], replaceWith);
|
|
34687
34707
|
}
|
|
34688
34708
|
}
|
|
34689
34709
|
getSearchableString(position) {
|
|
@@ -45388,6 +45408,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
45388
45408
|
exports.tokenize = tokenize;
|
|
45389
45409
|
|
|
45390
45410
|
|
|
45391
|
-
__info__.version = '16.2.
|
|
45392
|
-
__info__.date = '2023-
|
|
45393
|
-
__info__.hash = '
|
|
45411
|
+
__info__.version = '16.2.13';
|
|
45412
|
+
__info__.date = '2023-08-09T09:09:10.050Z';
|
|
45413
|
+
__info__.hash = '5620a2e';
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -20712,6 +20712,14 @@ class FiguresContainer extends Component {
|
|
|
20712
20712
|
if (dirY < 0) {
|
|
20713
20713
|
this.dnd.y = dndInitialY + figure.height * fraction;
|
|
20714
20714
|
}
|
|
20715
|
+
if (this.dnd.x < 0) {
|
|
20716
|
+
this.dnd.width += this.dnd.x;
|
|
20717
|
+
this.dnd.x = 0;
|
|
20718
|
+
}
|
|
20719
|
+
if (this.dnd.y < 0) {
|
|
20720
|
+
this.dnd.height += this.dnd.y;
|
|
20721
|
+
this.dnd.y = 0;
|
|
20722
|
+
}
|
|
20715
20723
|
};
|
|
20716
20724
|
}
|
|
20717
20725
|
else {
|
|
@@ -20727,6 +20735,14 @@ class FiguresContainer extends Component {
|
|
|
20727
20735
|
if (dirY < 0) {
|
|
20728
20736
|
this.dnd.y = dndInitialY - deltaY;
|
|
20729
20737
|
}
|
|
20738
|
+
if (this.dnd.x < 0) {
|
|
20739
|
+
this.dnd.width += this.dnd.x;
|
|
20740
|
+
this.dnd.x = 0;
|
|
20741
|
+
}
|
|
20742
|
+
if (this.dnd.y < 0) {
|
|
20743
|
+
this.dnd.height += this.dnd.y;
|
|
20744
|
+
this.dnd.y = 0;
|
|
20745
|
+
}
|
|
20730
20746
|
};
|
|
20731
20747
|
}
|
|
20732
20748
|
const onMouseUp = (ev) => {
|
|
@@ -29340,7 +29356,7 @@ class HeaderSizePlugin extends CorePlugin {
|
|
|
29340
29356
|
this.sizes = {};
|
|
29341
29357
|
}
|
|
29342
29358
|
handle(cmd) {
|
|
29343
|
-
var _a, _b
|
|
29359
|
+
var _a, _b;
|
|
29344
29360
|
switch (cmd.type) {
|
|
29345
29361
|
case "CREATE_SHEET": {
|
|
29346
29362
|
const computedSizes = this.computeSheetSizes(cmd.sheetId);
|
|
@@ -29428,7 +29444,8 @@ class HeaderSizePlugin extends CorePlugin {
|
|
|
29428
29444
|
}
|
|
29429
29445
|
break;
|
|
29430
29446
|
case "UPDATE_CELL":
|
|
29431
|
-
|
|
29447
|
+
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];
|
|
29448
|
+
if (row && !row.manualSize) {
|
|
29432
29449
|
const { sheetId, row } = cmd;
|
|
29433
29450
|
this.history.update("sizes", sheetId, "ROW", row, "computedSize", lazy(() => this.getRowTallestCellSize(sheetId, row)));
|
|
29434
29451
|
}
|
|
@@ -32576,6 +32593,7 @@ class FilterEvaluationPlugin extends UIPlugin {
|
|
|
32576
32593
|
this.filterValues[cmd.sheetId] = {};
|
|
32577
32594
|
break;
|
|
32578
32595
|
case "HIDE_COLUMNS_ROWS":
|
|
32596
|
+
case "UNHIDE_COLUMNS_ROWS":
|
|
32579
32597
|
this.updateHiddenRows();
|
|
32580
32598
|
break;
|
|
32581
32599
|
case "UPDATE_FILTER":
|
|
@@ -34503,9 +34521,17 @@ class FindAndReplacePlugin extends UIPlugin {
|
|
|
34503
34521
|
case "REPLACE_ALL_SEARCH":
|
|
34504
34522
|
this.replaceAll(cmd.replaceWith);
|
|
34505
34523
|
break;
|
|
34524
|
+
case "EVALUATE_CELLS":
|
|
34525
|
+
case "UPDATE_CELL":
|
|
34526
|
+
case "REMOVE_FILTER_TABLE":
|
|
34527
|
+
case "UPDATE_FILTER":
|
|
34528
|
+
this.isSearchDirty = true;
|
|
34529
|
+
break;
|
|
34506
34530
|
case "UNDO":
|
|
34507
34531
|
case "REDO":
|
|
34508
34532
|
case "REMOVE_COLUMNS_ROWS":
|
|
34533
|
+
case "HIDE_COLUMNS_ROWS":
|
|
34534
|
+
case "UNHIDE_COLUMNS_ROWS":
|
|
34509
34535
|
case "ADD_COLUMNS_ROWS":
|
|
34510
34536
|
case "EVALUATE_CELLS":
|
|
34511
34537
|
case "UPDATE_CELL":
|
|
@@ -34641,37 +34667,31 @@ class FindAndReplacePlugin extends UIPlugin {
|
|
|
34641
34667
|
// ---------------------------------------------------------------------------
|
|
34642
34668
|
// Replace
|
|
34643
34669
|
// ---------------------------------------------------------------------------
|
|
34644
|
-
|
|
34645
|
-
|
|
34646
|
-
*/
|
|
34647
|
-
replace(replaceWith) {
|
|
34648
|
-
if (this.selectedMatchIndex === null || !this.currentSearchRegex) {
|
|
34670
|
+
replaceMatch(selectedMatch, replaceWith) {
|
|
34671
|
+
if (!this.currentSearchRegex) {
|
|
34649
34672
|
return;
|
|
34650
34673
|
}
|
|
34651
|
-
const matches = this.searchMatches;
|
|
34652
|
-
const selectedMatch = matches[this.selectedMatchIndex];
|
|
34653
34674
|
const sheetId = this.getters.getActiveSheetId();
|
|
34654
34675
|
const cell = this.getters.getCell({ sheetId, ...selectedMatch });
|
|
34676
|
+
const { col, row } = selectedMatch;
|
|
34655
34677
|
if ((cell === null || cell === void 0 ? void 0 : cell.isFormula) && !this.searchOptions.searchFormulas) {
|
|
34656
|
-
|
|
34678
|
+
return;
|
|
34657
34679
|
}
|
|
34658
|
-
|
|
34659
|
-
|
|
34660
|
-
|
|
34661
|
-
|
|
34662
|
-
|
|
34663
|
-
|
|
34664
|
-
|
|
34665
|
-
|
|
34666
|
-
|
|
34667
|
-
|
|
34668
|
-
|
|
34669
|
-
row: selectedMatch.row,
|
|
34670
|
-
content: newContent,
|
|
34671
|
-
});
|
|
34672
|
-
this.searchMatches.splice(this.selectedMatchIndex, 1);
|
|
34673
|
-
this.selectNextCell(Direction.current);
|
|
34680
|
+
const replaceRegex = new RegExp(this.currentSearchRegex.source, this.currentSearchRegex.flags + "g");
|
|
34681
|
+
const toReplace = this.getSearchableString({ sheetId, col, row });
|
|
34682
|
+
const content = toReplace.replace(replaceRegex, replaceWith);
|
|
34683
|
+
this.dispatch("UPDATE_CELL", { sheetId, col, row, content });
|
|
34684
|
+
}
|
|
34685
|
+
/**
|
|
34686
|
+
* Replace the value of the currently selected match
|
|
34687
|
+
*/
|
|
34688
|
+
replace(replaceWith) {
|
|
34689
|
+
if (this.selectedMatchIndex === null) {
|
|
34690
|
+
return;
|
|
34674
34691
|
}
|
|
34692
|
+
const selectedMatch = this.searchMatches[this.selectedMatchIndex];
|
|
34693
|
+
this.replaceMatch(selectedMatch, replaceWith);
|
|
34694
|
+
this.selectNextCell(Direction.next);
|
|
34675
34695
|
}
|
|
34676
34696
|
/**
|
|
34677
34697
|
* Apply the replace function to all the matches one time.
|
|
@@ -34679,7 +34699,7 @@ class FindAndReplacePlugin extends UIPlugin {
|
|
|
34679
34699
|
replaceAll(replaceWith) {
|
|
34680
34700
|
const matchCount = this.searchMatches.length;
|
|
34681
34701
|
for (let i = 0; i < matchCount; i++) {
|
|
34682
|
-
this.
|
|
34702
|
+
this.replaceMatch(this.searchMatches[i], replaceWith);
|
|
34683
34703
|
}
|
|
34684
34704
|
}
|
|
34685
34705
|
getSearchableString(position) {
|
|
@@ -45356,6 +45376,6 @@ function addFunction(functionName, functionDescription) {
|
|
|
45356
45376
|
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 };
|
|
45357
45377
|
|
|
45358
45378
|
|
|
45359
|
-
__info__.version = '16.2.
|
|
45360
|
-
__info__.date = '2023-
|
|
45361
|
-
__info__.hash = '
|
|
45379
|
+
__info__.version = '16.2.13';
|
|
45380
|
+
__info__.date = '2023-08-09T09:09:10.050Z';
|
|
45381
|
+
__info__.hash = '5620a2e';
|
|
@@ -20713,6 +20713,14 @@
|
|
|
20713
20713
|
if (dirY < 0) {
|
|
20714
20714
|
this.dnd.y = dndInitialY + figure.height * fraction;
|
|
20715
20715
|
}
|
|
20716
|
+
if (this.dnd.x < 0) {
|
|
20717
|
+
this.dnd.width += this.dnd.x;
|
|
20718
|
+
this.dnd.x = 0;
|
|
20719
|
+
}
|
|
20720
|
+
if (this.dnd.y < 0) {
|
|
20721
|
+
this.dnd.height += this.dnd.y;
|
|
20722
|
+
this.dnd.y = 0;
|
|
20723
|
+
}
|
|
20716
20724
|
};
|
|
20717
20725
|
}
|
|
20718
20726
|
else {
|
|
@@ -20728,6 +20736,14 @@
|
|
|
20728
20736
|
if (dirY < 0) {
|
|
20729
20737
|
this.dnd.y = dndInitialY - deltaY;
|
|
20730
20738
|
}
|
|
20739
|
+
if (this.dnd.x < 0) {
|
|
20740
|
+
this.dnd.width += this.dnd.x;
|
|
20741
|
+
this.dnd.x = 0;
|
|
20742
|
+
}
|
|
20743
|
+
if (this.dnd.y < 0) {
|
|
20744
|
+
this.dnd.height += this.dnd.y;
|
|
20745
|
+
this.dnd.y = 0;
|
|
20746
|
+
}
|
|
20731
20747
|
};
|
|
20732
20748
|
}
|
|
20733
20749
|
const onMouseUp = (ev) => {
|
|
@@ -29341,7 +29357,7 @@
|
|
|
29341
29357
|
this.sizes = {};
|
|
29342
29358
|
}
|
|
29343
29359
|
handle(cmd) {
|
|
29344
|
-
var _a, _b
|
|
29360
|
+
var _a, _b;
|
|
29345
29361
|
switch (cmd.type) {
|
|
29346
29362
|
case "CREATE_SHEET": {
|
|
29347
29363
|
const computedSizes = this.computeSheetSizes(cmd.sheetId);
|
|
@@ -29429,7 +29445,8 @@
|
|
|
29429
29445
|
}
|
|
29430
29446
|
break;
|
|
29431
29447
|
case "UPDATE_CELL":
|
|
29432
|
-
|
|
29448
|
+
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];
|
|
29449
|
+
if (row && !row.manualSize) {
|
|
29433
29450
|
const { sheetId, row } = cmd;
|
|
29434
29451
|
this.history.update("sizes", sheetId, "ROW", row, "computedSize", lazy(() => this.getRowTallestCellSize(sheetId, row)));
|
|
29435
29452
|
}
|
|
@@ -32577,6 +32594,7 @@
|
|
|
32577
32594
|
this.filterValues[cmd.sheetId] = {};
|
|
32578
32595
|
break;
|
|
32579
32596
|
case "HIDE_COLUMNS_ROWS":
|
|
32597
|
+
case "UNHIDE_COLUMNS_ROWS":
|
|
32580
32598
|
this.updateHiddenRows();
|
|
32581
32599
|
break;
|
|
32582
32600
|
case "UPDATE_FILTER":
|
|
@@ -34504,9 +34522,17 @@
|
|
|
34504
34522
|
case "REPLACE_ALL_SEARCH":
|
|
34505
34523
|
this.replaceAll(cmd.replaceWith);
|
|
34506
34524
|
break;
|
|
34525
|
+
case "EVALUATE_CELLS":
|
|
34526
|
+
case "UPDATE_CELL":
|
|
34527
|
+
case "REMOVE_FILTER_TABLE":
|
|
34528
|
+
case "UPDATE_FILTER":
|
|
34529
|
+
this.isSearchDirty = true;
|
|
34530
|
+
break;
|
|
34507
34531
|
case "UNDO":
|
|
34508
34532
|
case "REDO":
|
|
34509
34533
|
case "REMOVE_COLUMNS_ROWS":
|
|
34534
|
+
case "HIDE_COLUMNS_ROWS":
|
|
34535
|
+
case "UNHIDE_COLUMNS_ROWS":
|
|
34510
34536
|
case "ADD_COLUMNS_ROWS":
|
|
34511
34537
|
case "EVALUATE_CELLS":
|
|
34512
34538
|
case "UPDATE_CELL":
|
|
@@ -34642,37 +34668,31 @@
|
|
|
34642
34668
|
// ---------------------------------------------------------------------------
|
|
34643
34669
|
// Replace
|
|
34644
34670
|
// ---------------------------------------------------------------------------
|
|
34645
|
-
|
|
34646
|
-
|
|
34647
|
-
*/
|
|
34648
|
-
replace(replaceWith) {
|
|
34649
|
-
if (this.selectedMatchIndex === null || !this.currentSearchRegex) {
|
|
34671
|
+
replaceMatch(selectedMatch, replaceWith) {
|
|
34672
|
+
if (!this.currentSearchRegex) {
|
|
34650
34673
|
return;
|
|
34651
34674
|
}
|
|
34652
|
-
const matches = this.searchMatches;
|
|
34653
|
-
const selectedMatch = matches[this.selectedMatchIndex];
|
|
34654
34675
|
const sheetId = this.getters.getActiveSheetId();
|
|
34655
34676
|
const cell = this.getters.getCell({ sheetId, ...selectedMatch });
|
|
34677
|
+
const { col, row } = selectedMatch;
|
|
34656
34678
|
if ((cell === null || cell === void 0 ? void 0 : cell.isFormula) && !this.searchOptions.searchFormulas) {
|
|
34657
|
-
|
|
34679
|
+
return;
|
|
34658
34680
|
}
|
|
34659
|
-
|
|
34660
|
-
|
|
34661
|
-
|
|
34662
|
-
|
|
34663
|
-
|
|
34664
|
-
|
|
34665
|
-
|
|
34666
|
-
|
|
34667
|
-
|
|
34668
|
-
|
|
34669
|
-
|
|
34670
|
-
row: selectedMatch.row,
|
|
34671
|
-
content: newContent,
|
|
34672
|
-
});
|
|
34673
|
-
this.searchMatches.splice(this.selectedMatchIndex, 1);
|
|
34674
|
-
this.selectNextCell(Direction.current);
|
|
34681
|
+
const replaceRegex = new RegExp(this.currentSearchRegex.source, this.currentSearchRegex.flags + "g");
|
|
34682
|
+
const toReplace = this.getSearchableString({ sheetId, col, row });
|
|
34683
|
+
const content = toReplace.replace(replaceRegex, replaceWith);
|
|
34684
|
+
this.dispatch("UPDATE_CELL", { sheetId, col, row, content });
|
|
34685
|
+
}
|
|
34686
|
+
/**
|
|
34687
|
+
* Replace the value of the currently selected match
|
|
34688
|
+
*/
|
|
34689
|
+
replace(replaceWith) {
|
|
34690
|
+
if (this.selectedMatchIndex === null) {
|
|
34691
|
+
return;
|
|
34675
34692
|
}
|
|
34693
|
+
const selectedMatch = this.searchMatches[this.selectedMatchIndex];
|
|
34694
|
+
this.replaceMatch(selectedMatch, replaceWith);
|
|
34695
|
+
this.selectNextCell(Direction.next);
|
|
34676
34696
|
}
|
|
34677
34697
|
/**
|
|
34678
34698
|
* Apply the replace function to all the matches one time.
|
|
@@ -34680,7 +34700,7 @@
|
|
|
34680
34700
|
replaceAll(replaceWith) {
|
|
34681
34701
|
const matchCount = this.searchMatches.length;
|
|
34682
34702
|
for (let i = 0; i < matchCount; i++) {
|
|
34683
|
-
this.
|
|
34703
|
+
this.replaceMatch(this.searchMatches[i], replaceWith);
|
|
34684
34704
|
}
|
|
34685
34705
|
}
|
|
34686
34706
|
getSearchableString(position) {
|
|
@@ -45387,9 +45407,9 @@
|
|
|
45387
45407
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
45388
45408
|
|
|
45389
45409
|
|
|
45390
|
-
__info__.version = '16.2.
|
|
45391
|
-
__info__.date = '2023-
|
|
45392
|
-
__info__.hash = '
|
|
45410
|
+
__info__.version = '16.2.13';
|
|
45411
|
+
__info__.date = '2023-08-09T09:09:10.050Z';
|
|
45412
|
+
__info__.hash = '5620a2e';
|
|
45393
45413
|
|
|
45394
45414
|
|
|
45395
45415
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|