@odoo/o-spreadsheet 16.4.7 → 16.4.8
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 +49 -52
- package/dist/o-spreadsheet.esm.js +49 -52
- package/dist/o-spreadsheet.iife.js +49 -52
- package/dist/o-spreadsheet.iife.min.js +254 -254
- package/package.json +2 -2
|
@@ -5449,6 +5449,9 @@ class FilterMenu extends owl.Component {
|
|
|
5449
5449
|
});
|
|
5450
5450
|
this.state.values = this.getFilterValues(this.props.filterPosition);
|
|
5451
5451
|
}
|
|
5452
|
+
get isReadonly() {
|
|
5453
|
+
return this.env.model.getters.isReadonly();
|
|
5454
|
+
}
|
|
5452
5455
|
getFilterValues(position) {
|
|
5453
5456
|
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
5454
5457
|
const filter = this.env.model.getters.getFilter({ sheetId, ...position });
|
|
@@ -22798,7 +22801,6 @@ class FindAndReplacePanel extends owl.Component {
|
|
|
22798
22801
|
state = owl.useState(this.initialState());
|
|
22799
22802
|
debounceTimeoutId;
|
|
22800
22803
|
showFormulaState = false;
|
|
22801
|
-
debouncedUpdateSearch;
|
|
22802
22804
|
findAndReplaceRef = owl.useRef("findAndReplace");
|
|
22803
22805
|
get hasSearchResult() {
|
|
22804
22806
|
return this.env.model.getters.getCurrentSelectedMatchIndex() !== null;
|
|
@@ -22808,9 +22810,9 @@ class FindAndReplacePanel extends owl.Component {
|
|
|
22808
22810
|
}
|
|
22809
22811
|
setup() {
|
|
22810
22812
|
this.showFormulaState = this.env.model.getters.shouldShowFormulas();
|
|
22811
|
-
this.debouncedUpdateSearch = debounce(this.updateSearch.bind(this), 200);
|
|
22812
22813
|
owl.onMounted(() => this.focusInput());
|
|
22813
22814
|
owl.onWillUnmount(() => {
|
|
22815
|
+
clearTimeout(this.debounceTimeoutId);
|
|
22814
22816
|
this.env.model.dispatch("CLEAR_SEARCH");
|
|
22815
22817
|
this.env.model.dispatch("SET_FORMULA_VISIBILITY", { show: this.showFormulaState });
|
|
22816
22818
|
});
|
|
@@ -22855,6 +22857,13 @@ class FindAndReplacePanel extends owl.Component {
|
|
|
22855
22857
|
searchOptions: this.state.searchOptions,
|
|
22856
22858
|
});
|
|
22857
22859
|
}
|
|
22860
|
+
debouncedUpdateSearch() {
|
|
22861
|
+
clearTimeout(this.debounceTimeoutId);
|
|
22862
|
+
this.debounceTimeoutId = setTimeout(() => {
|
|
22863
|
+
this.updateSearch();
|
|
22864
|
+
this.debounceTimeoutId = undefined;
|
|
22865
|
+
}, 200);
|
|
22866
|
+
}
|
|
22858
22867
|
replace() {
|
|
22859
22868
|
this.env.model.dispatch("REPLACE_SEARCH", {
|
|
22860
22869
|
replaceWith: this.state.replaceWith,
|
|
@@ -38694,14 +38703,10 @@ class FindAndReplacePlugin extends UIPlugin {
|
|
|
38694
38703
|
case "REPLACE_ALL_SEARCH":
|
|
38695
38704
|
this.replaceAll(cmd.replaceWith);
|
|
38696
38705
|
break;
|
|
38697
|
-
case "EVALUATE_CELLS":
|
|
38698
|
-
case "UPDATE_CELL":
|
|
38699
|
-
case "REMOVE_FILTER_TABLE":
|
|
38700
|
-
case "UPDATE_FILTER":
|
|
38701
|
-
this.isSearchDirty = true;
|
|
38702
|
-
break;
|
|
38703
38706
|
case "UNDO":
|
|
38704
38707
|
case "REDO":
|
|
38708
|
+
case "REMOVE_FILTER_TABLE":
|
|
38709
|
+
case "UPDATE_FILTER":
|
|
38705
38710
|
case "REMOVE_COLUMNS_ROWS":
|
|
38706
38711
|
case "HIDE_COLUMNS_ROWS":
|
|
38707
38712
|
case "UNHIDE_COLUMNS_ROWS":
|
|
@@ -41362,7 +41367,7 @@ class ClipboardCellsState extends ClipboardCellsAbstractState {
|
|
|
41362
41367
|
});
|
|
41363
41368
|
for (const filterTable of this.copiedTables) {
|
|
41364
41369
|
this.dispatch("REMOVE_FILTER_TABLE", {
|
|
41365
|
-
sheetId: this.
|
|
41370
|
+
sheetId: this.sheetId,
|
|
41366
41371
|
target: [filterTable.zone],
|
|
41367
41372
|
});
|
|
41368
41373
|
}
|
|
@@ -43903,30 +43908,26 @@ class InternalViewport {
|
|
|
43903
43908
|
const { end } = this.getters.getColDimensions(sheetId, targetCol);
|
|
43904
43909
|
const maxCol = this.getters.getNumberCols(sheetId);
|
|
43905
43910
|
if (this.offsetX + this.offsetCorrectionX + this.viewportWidth < end) {
|
|
43906
|
-
|
|
43907
|
-
|
|
43908
|
-
|
|
43909
|
-
}
|
|
43910
|
-
if (this.getters.isColHidden(sheetId, col)) {
|
|
43911
|
-
continue;
|
|
43912
|
-
}
|
|
43913
|
-
this.offsetX = this.getters.getColDimensions(sheetId, col).end - this.offsetCorrectionX;
|
|
43914
|
-
this.offsetScrollbarX = this.offsetX;
|
|
43915
|
-
this.adjustViewportZoneX();
|
|
43911
|
+
let finalTarget = targetCol;
|
|
43912
|
+
while (this.getters.isColHidden(sheetId, finalTarget) && targetCol < maxCol) {
|
|
43913
|
+
finalTarget++;
|
|
43916
43914
|
}
|
|
43915
|
+
const finalTargetEnd = this.getters.getColDimensions(sheetId, finalTarget).end;
|
|
43916
|
+
const startIndex = this.searchHeaderIndex("COL", finalTargetEnd - this.viewportWidth - this.offsetCorrectionX, this.boundaries.left, true);
|
|
43917
|
+
this.offsetX =
|
|
43918
|
+
this.getters.getColDimensions(sheetId, startIndex).end - this.offsetCorrectionX;
|
|
43919
|
+
this.offsetScrollbarX = this.offsetX;
|
|
43920
|
+
this.adjustViewportZoneX();
|
|
43917
43921
|
}
|
|
43918
43922
|
else if (this.left > targetCol) {
|
|
43919
|
-
|
|
43920
|
-
|
|
43921
|
-
|
|
43922
|
-
}
|
|
43923
|
-
if (this.getters.isColHidden(sheetId, col)) {
|
|
43924
|
-
continue;
|
|
43925
|
-
}
|
|
43926
|
-
this.offsetX = this.getters.getColDimensions(sheetId, col).start - this.offsetCorrectionX;
|
|
43927
|
-
this.offsetScrollbarX = this.offsetX;
|
|
43928
|
-
this.adjustViewportZoneX();
|
|
43923
|
+
let finalTarget = targetCol;
|
|
43924
|
+
while (this.getters.isColHidden(sheetId, finalTarget) && targetCol > 0) {
|
|
43925
|
+
finalTarget--;
|
|
43929
43926
|
}
|
|
43927
|
+
this.offsetX =
|
|
43928
|
+
this.getters.getColDimensions(sheetId, finalTarget).start - this.offsetCorrectionX;
|
|
43929
|
+
this.offsetScrollbarX = this.offsetX;
|
|
43930
|
+
this.adjustViewportZoneX();
|
|
43930
43931
|
}
|
|
43931
43932
|
}
|
|
43932
43933
|
adjustPositionY(targetRow) {
|
|
@@ -43934,30 +43935,26 @@ class InternalViewport {
|
|
|
43934
43935
|
const { end } = this.getters.getRowDimensions(sheetId, targetRow);
|
|
43935
43936
|
const maxRow = this.getters.getNumberRows(sheetId);
|
|
43936
43937
|
if (this.offsetY + this.viewportHeight + this.offsetCorrectionY < end) {
|
|
43937
|
-
|
|
43938
|
-
|
|
43939
|
-
|
|
43940
|
-
}
|
|
43941
|
-
if (this.getters.isRowHidden(sheetId, row)) {
|
|
43942
|
-
continue;
|
|
43943
|
-
}
|
|
43944
|
-
this.offsetY = this.getters.getRowDimensions(sheetId, row).end - this.offsetCorrectionY;
|
|
43945
|
-
this.offsetScrollbarY = this.offsetY;
|
|
43946
|
-
this.adjustViewportZoneY();
|
|
43938
|
+
let finalTarget = targetRow;
|
|
43939
|
+
while (this.getters.isRowHidden(sheetId, finalTarget) && targetRow < maxRow) {
|
|
43940
|
+
finalTarget++;
|
|
43947
43941
|
}
|
|
43942
|
+
const finalTargetEnd = this.getters.getRowDimensions(sheetId, finalTarget).end;
|
|
43943
|
+
const startIndex = this.searchHeaderIndex("ROW", finalTargetEnd - this.viewportHeight - this.offsetCorrectionY, this.boundaries.top, true);
|
|
43944
|
+
this.offsetY =
|
|
43945
|
+
this.getters.getRowDimensions(sheetId, startIndex).end - this.offsetCorrectionY;
|
|
43946
|
+
this.offsetScrollbarY = this.offsetY;
|
|
43947
|
+
this.adjustViewportZoneY();
|
|
43948
43948
|
}
|
|
43949
43949
|
else if (this.top > targetRow) {
|
|
43950
|
-
|
|
43951
|
-
|
|
43952
|
-
|
|
43953
|
-
}
|
|
43954
|
-
if (this.getters.isRowHidden(sheetId, row)) {
|
|
43955
|
-
continue;
|
|
43956
|
-
}
|
|
43957
|
-
this.offsetY = this.getters.getRowDimensions(sheetId, row).start - this.offsetCorrectionY;
|
|
43958
|
-
this.offsetScrollbarY = this.offsetY;
|
|
43959
|
-
this.adjustViewportZoneY();
|
|
43950
|
+
let finalTarget = targetRow;
|
|
43951
|
+
while (this.getters.isRowHidden(sheetId, finalTarget) && targetRow > 0) {
|
|
43952
|
+
finalTarget--;
|
|
43960
43953
|
}
|
|
43954
|
+
this.offsetY =
|
|
43955
|
+
this.getters.getRowDimensions(sheetId, finalTarget).start - this.offsetCorrectionY;
|
|
43956
|
+
this.offsetScrollbarY = this.offsetY;
|
|
43957
|
+
this.adjustViewportZoneY();
|
|
43961
43958
|
}
|
|
43962
43959
|
}
|
|
43963
43960
|
setViewportOffset(offsetX, offsetY) {
|
|
@@ -50696,6 +50693,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
50696
50693
|
exports.tokenize = tokenize;
|
|
50697
50694
|
|
|
50698
50695
|
|
|
50699
|
-
__info__.version = '16.4.
|
|
50700
|
-
__info__.date = '2023-
|
|
50701
|
-
__info__.hash = '
|
|
50696
|
+
__info__.version = '16.4.8';
|
|
50697
|
+
__info__.date = '2023-10-03T12:45:33.807Z';
|
|
50698
|
+
__info__.hash = 'c614d64';
|
|
@@ -5445,6 +5445,9 @@ class FilterMenu extends Component {
|
|
|
5445
5445
|
});
|
|
5446
5446
|
this.state.values = this.getFilterValues(this.props.filterPosition);
|
|
5447
5447
|
}
|
|
5448
|
+
get isReadonly() {
|
|
5449
|
+
return this.env.model.getters.isReadonly();
|
|
5450
|
+
}
|
|
5448
5451
|
getFilterValues(position) {
|
|
5449
5452
|
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
5450
5453
|
const filter = this.env.model.getters.getFilter({ sheetId, ...position });
|
|
@@ -22794,7 +22797,6 @@ class FindAndReplacePanel extends Component {
|
|
|
22794
22797
|
state = useState(this.initialState());
|
|
22795
22798
|
debounceTimeoutId;
|
|
22796
22799
|
showFormulaState = false;
|
|
22797
|
-
debouncedUpdateSearch;
|
|
22798
22800
|
findAndReplaceRef = useRef("findAndReplace");
|
|
22799
22801
|
get hasSearchResult() {
|
|
22800
22802
|
return this.env.model.getters.getCurrentSelectedMatchIndex() !== null;
|
|
@@ -22804,9 +22806,9 @@ class FindAndReplacePanel extends Component {
|
|
|
22804
22806
|
}
|
|
22805
22807
|
setup() {
|
|
22806
22808
|
this.showFormulaState = this.env.model.getters.shouldShowFormulas();
|
|
22807
|
-
this.debouncedUpdateSearch = debounce(this.updateSearch.bind(this), 200);
|
|
22808
22809
|
onMounted(() => this.focusInput());
|
|
22809
22810
|
onWillUnmount(() => {
|
|
22811
|
+
clearTimeout(this.debounceTimeoutId);
|
|
22810
22812
|
this.env.model.dispatch("CLEAR_SEARCH");
|
|
22811
22813
|
this.env.model.dispatch("SET_FORMULA_VISIBILITY", { show: this.showFormulaState });
|
|
22812
22814
|
});
|
|
@@ -22851,6 +22853,13 @@ class FindAndReplacePanel extends Component {
|
|
|
22851
22853
|
searchOptions: this.state.searchOptions,
|
|
22852
22854
|
});
|
|
22853
22855
|
}
|
|
22856
|
+
debouncedUpdateSearch() {
|
|
22857
|
+
clearTimeout(this.debounceTimeoutId);
|
|
22858
|
+
this.debounceTimeoutId = setTimeout(() => {
|
|
22859
|
+
this.updateSearch();
|
|
22860
|
+
this.debounceTimeoutId = undefined;
|
|
22861
|
+
}, 200);
|
|
22862
|
+
}
|
|
22854
22863
|
replace() {
|
|
22855
22864
|
this.env.model.dispatch("REPLACE_SEARCH", {
|
|
22856
22865
|
replaceWith: this.state.replaceWith,
|
|
@@ -38690,14 +38699,10 @@ class FindAndReplacePlugin extends UIPlugin {
|
|
|
38690
38699
|
case "REPLACE_ALL_SEARCH":
|
|
38691
38700
|
this.replaceAll(cmd.replaceWith);
|
|
38692
38701
|
break;
|
|
38693
|
-
case "EVALUATE_CELLS":
|
|
38694
|
-
case "UPDATE_CELL":
|
|
38695
|
-
case "REMOVE_FILTER_TABLE":
|
|
38696
|
-
case "UPDATE_FILTER":
|
|
38697
|
-
this.isSearchDirty = true;
|
|
38698
|
-
break;
|
|
38699
38702
|
case "UNDO":
|
|
38700
38703
|
case "REDO":
|
|
38704
|
+
case "REMOVE_FILTER_TABLE":
|
|
38705
|
+
case "UPDATE_FILTER":
|
|
38701
38706
|
case "REMOVE_COLUMNS_ROWS":
|
|
38702
38707
|
case "HIDE_COLUMNS_ROWS":
|
|
38703
38708
|
case "UNHIDE_COLUMNS_ROWS":
|
|
@@ -41358,7 +41363,7 @@ class ClipboardCellsState extends ClipboardCellsAbstractState {
|
|
|
41358
41363
|
});
|
|
41359
41364
|
for (const filterTable of this.copiedTables) {
|
|
41360
41365
|
this.dispatch("REMOVE_FILTER_TABLE", {
|
|
41361
|
-
sheetId: this.
|
|
41366
|
+
sheetId: this.sheetId,
|
|
41362
41367
|
target: [filterTable.zone],
|
|
41363
41368
|
});
|
|
41364
41369
|
}
|
|
@@ -43899,30 +43904,26 @@ class InternalViewport {
|
|
|
43899
43904
|
const { end } = this.getters.getColDimensions(sheetId, targetCol);
|
|
43900
43905
|
const maxCol = this.getters.getNumberCols(sheetId);
|
|
43901
43906
|
if (this.offsetX + this.offsetCorrectionX + this.viewportWidth < end) {
|
|
43902
|
-
|
|
43903
|
-
|
|
43904
|
-
|
|
43905
|
-
}
|
|
43906
|
-
if (this.getters.isColHidden(sheetId, col)) {
|
|
43907
|
-
continue;
|
|
43908
|
-
}
|
|
43909
|
-
this.offsetX = this.getters.getColDimensions(sheetId, col).end - this.offsetCorrectionX;
|
|
43910
|
-
this.offsetScrollbarX = this.offsetX;
|
|
43911
|
-
this.adjustViewportZoneX();
|
|
43907
|
+
let finalTarget = targetCol;
|
|
43908
|
+
while (this.getters.isColHidden(sheetId, finalTarget) && targetCol < maxCol) {
|
|
43909
|
+
finalTarget++;
|
|
43912
43910
|
}
|
|
43911
|
+
const finalTargetEnd = this.getters.getColDimensions(sheetId, finalTarget).end;
|
|
43912
|
+
const startIndex = this.searchHeaderIndex("COL", finalTargetEnd - this.viewportWidth - this.offsetCorrectionX, this.boundaries.left, true);
|
|
43913
|
+
this.offsetX =
|
|
43914
|
+
this.getters.getColDimensions(sheetId, startIndex).end - this.offsetCorrectionX;
|
|
43915
|
+
this.offsetScrollbarX = this.offsetX;
|
|
43916
|
+
this.adjustViewportZoneX();
|
|
43913
43917
|
}
|
|
43914
43918
|
else if (this.left > targetCol) {
|
|
43915
|
-
|
|
43916
|
-
|
|
43917
|
-
|
|
43918
|
-
}
|
|
43919
|
-
if (this.getters.isColHidden(sheetId, col)) {
|
|
43920
|
-
continue;
|
|
43921
|
-
}
|
|
43922
|
-
this.offsetX = this.getters.getColDimensions(sheetId, col).start - this.offsetCorrectionX;
|
|
43923
|
-
this.offsetScrollbarX = this.offsetX;
|
|
43924
|
-
this.adjustViewportZoneX();
|
|
43919
|
+
let finalTarget = targetCol;
|
|
43920
|
+
while (this.getters.isColHidden(sheetId, finalTarget) && targetCol > 0) {
|
|
43921
|
+
finalTarget--;
|
|
43925
43922
|
}
|
|
43923
|
+
this.offsetX =
|
|
43924
|
+
this.getters.getColDimensions(sheetId, finalTarget).start - this.offsetCorrectionX;
|
|
43925
|
+
this.offsetScrollbarX = this.offsetX;
|
|
43926
|
+
this.adjustViewportZoneX();
|
|
43926
43927
|
}
|
|
43927
43928
|
}
|
|
43928
43929
|
adjustPositionY(targetRow) {
|
|
@@ -43930,30 +43931,26 @@ class InternalViewport {
|
|
|
43930
43931
|
const { end } = this.getters.getRowDimensions(sheetId, targetRow);
|
|
43931
43932
|
const maxRow = this.getters.getNumberRows(sheetId);
|
|
43932
43933
|
if (this.offsetY + this.viewportHeight + this.offsetCorrectionY < end) {
|
|
43933
|
-
|
|
43934
|
-
|
|
43935
|
-
|
|
43936
|
-
}
|
|
43937
|
-
if (this.getters.isRowHidden(sheetId, row)) {
|
|
43938
|
-
continue;
|
|
43939
|
-
}
|
|
43940
|
-
this.offsetY = this.getters.getRowDimensions(sheetId, row).end - this.offsetCorrectionY;
|
|
43941
|
-
this.offsetScrollbarY = this.offsetY;
|
|
43942
|
-
this.adjustViewportZoneY();
|
|
43934
|
+
let finalTarget = targetRow;
|
|
43935
|
+
while (this.getters.isRowHidden(sheetId, finalTarget) && targetRow < maxRow) {
|
|
43936
|
+
finalTarget++;
|
|
43943
43937
|
}
|
|
43938
|
+
const finalTargetEnd = this.getters.getRowDimensions(sheetId, finalTarget).end;
|
|
43939
|
+
const startIndex = this.searchHeaderIndex("ROW", finalTargetEnd - this.viewportHeight - this.offsetCorrectionY, this.boundaries.top, true);
|
|
43940
|
+
this.offsetY =
|
|
43941
|
+
this.getters.getRowDimensions(sheetId, startIndex).end - this.offsetCorrectionY;
|
|
43942
|
+
this.offsetScrollbarY = this.offsetY;
|
|
43943
|
+
this.adjustViewportZoneY();
|
|
43944
43944
|
}
|
|
43945
43945
|
else if (this.top > targetRow) {
|
|
43946
|
-
|
|
43947
|
-
|
|
43948
|
-
|
|
43949
|
-
}
|
|
43950
|
-
if (this.getters.isRowHidden(sheetId, row)) {
|
|
43951
|
-
continue;
|
|
43952
|
-
}
|
|
43953
|
-
this.offsetY = this.getters.getRowDimensions(sheetId, row).start - this.offsetCorrectionY;
|
|
43954
|
-
this.offsetScrollbarY = this.offsetY;
|
|
43955
|
-
this.adjustViewportZoneY();
|
|
43946
|
+
let finalTarget = targetRow;
|
|
43947
|
+
while (this.getters.isRowHidden(sheetId, finalTarget) && targetRow > 0) {
|
|
43948
|
+
finalTarget--;
|
|
43956
43949
|
}
|
|
43950
|
+
this.offsetY =
|
|
43951
|
+
this.getters.getRowDimensions(sheetId, finalTarget).start - this.offsetCorrectionY;
|
|
43952
|
+
this.offsetScrollbarY = this.offsetY;
|
|
43953
|
+
this.adjustViewportZoneY();
|
|
43957
43954
|
}
|
|
43958
43955
|
}
|
|
43959
43956
|
setViewportOffset(offsetX, offsetY) {
|
|
@@ -50660,6 +50657,6 @@ const constants = {
|
|
|
50660
50657
|
export { AbstractChart, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, compile, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, tokenize };
|
|
50661
50658
|
|
|
50662
50659
|
|
|
50663
|
-
__info__.version = '16.4.
|
|
50664
|
-
__info__.date = '2023-
|
|
50665
|
-
__info__.hash = '
|
|
50660
|
+
__info__.version = '16.4.8';
|
|
50661
|
+
__info__.date = '2023-10-03T12:45:33.807Z';
|
|
50662
|
+
__info__.hash = 'c614d64';
|
|
@@ -5446,6 +5446,9 @@
|
|
|
5446
5446
|
});
|
|
5447
5447
|
this.state.values = this.getFilterValues(this.props.filterPosition);
|
|
5448
5448
|
}
|
|
5449
|
+
get isReadonly() {
|
|
5450
|
+
return this.env.model.getters.isReadonly();
|
|
5451
|
+
}
|
|
5449
5452
|
getFilterValues(position) {
|
|
5450
5453
|
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
5451
5454
|
const filter = this.env.model.getters.getFilter({ sheetId, ...position });
|
|
@@ -22795,7 +22798,6 @@
|
|
|
22795
22798
|
state = owl.useState(this.initialState());
|
|
22796
22799
|
debounceTimeoutId;
|
|
22797
22800
|
showFormulaState = false;
|
|
22798
|
-
debouncedUpdateSearch;
|
|
22799
22801
|
findAndReplaceRef = owl.useRef("findAndReplace");
|
|
22800
22802
|
get hasSearchResult() {
|
|
22801
22803
|
return this.env.model.getters.getCurrentSelectedMatchIndex() !== null;
|
|
@@ -22805,9 +22807,9 @@
|
|
|
22805
22807
|
}
|
|
22806
22808
|
setup() {
|
|
22807
22809
|
this.showFormulaState = this.env.model.getters.shouldShowFormulas();
|
|
22808
|
-
this.debouncedUpdateSearch = debounce(this.updateSearch.bind(this), 200);
|
|
22809
22810
|
owl.onMounted(() => this.focusInput());
|
|
22810
22811
|
owl.onWillUnmount(() => {
|
|
22812
|
+
clearTimeout(this.debounceTimeoutId);
|
|
22811
22813
|
this.env.model.dispatch("CLEAR_SEARCH");
|
|
22812
22814
|
this.env.model.dispatch("SET_FORMULA_VISIBILITY", { show: this.showFormulaState });
|
|
22813
22815
|
});
|
|
@@ -22852,6 +22854,13 @@
|
|
|
22852
22854
|
searchOptions: this.state.searchOptions,
|
|
22853
22855
|
});
|
|
22854
22856
|
}
|
|
22857
|
+
debouncedUpdateSearch() {
|
|
22858
|
+
clearTimeout(this.debounceTimeoutId);
|
|
22859
|
+
this.debounceTimeoutId = setTimeout(() => {
|
|
22860
|
+
this.updateSearch();
|
|
22861
|
+
this.debounceTimeoutId = undefined;
|
|
22862
|
+
}, 200);
|
|
22863
|
+
}
|
|
22855
22864
|
replace() {
|
|
22856
22865
|
this.env.model.dispatch("REPLACE_SEARCH", {
|
|
22857
22866
|
replaceWith: this.state.replaceWith,
|
|
@@ -38691,14 +38700,10 @@
|
|
|
38691
38700
|
case "REPLACE_ALL_SEARCH":
|
|
38692
38701
|
this.replaceAll(cmd.replaceWith);
|
|
38693
38702
|
break;
|
|
38694
|
-
case "EVALUATE_CELLS":
|
|
38695
|
-
case "UPDATE_CELL":
|
|
38696
|
-
case "REMOVE_FILTER_TABLE":
|
|
38697
|
-
case "UPDATE_FILTER":
|
|
38698
|
-
this.isSearchDirty = true;
|
|
38699
|
-
break;
|
|
38700
38703
|
case "UNDO":
|
|
38701
38704
|
case "REDO":
|
|
38705
|
+
case "REMOVE_FILTER_TABLE":
|
|
38706
|
+
case "UPDATE_FILTER":
|
|
38702
38707
|
case "REMOVE_COLUMNS_ROWS":
|
|
38703
38708
|
case "HIDE_COLUMNS_ROWS":
|
|
38704
38709
|
case "UNHIDE_COLUMNS_ROWS":
|
|
@@ -41359,7 +41364,7 @@
|
|
|
41359
41364
|
});
|
|
41360
41365
|
for (const filterTable of this.copiedTables) {
|
|
41361
41366
|
this.dispatch("REMOVE_FILTER_TABLE", {
|
|
41362
|
-
sheetId: this.
|
|
41367
|
+
sheetId: this.sheetId,
|
|
41363
41368
|
target: [filterTable.zone],
|
|
41364
41369
|
});
|
|
41365
41370
|
}
|
|
@@ -43900,30 +43905,26 @@
|
|
|
43900
43905
|
const { end } = this.getters.getColDimensions(sheetId, targetCol);
|
|
43901
43906
|
const maxCol = this.getters.getNumberCols(sheetId);
|
|
43902
43907
|
if (this.offsetX + this.offsetCorrectionX + this.viewportWidth < end) {
|
|
43903
|
-
|
|
43904
|
-
|
|
43905
|
-
|
|
43906
|
-
}
|
|
43907
|
-
if (this.getters.isColHidden(sheetId, col)) {
|
|
43908
|
-
continue;
|
|
43909
|
-
}
|
|
43910
|
-
this.offsetX = this.getters.getColDimensions(sheetId, col).end - this.offsetCorrectionX;
|
|
43911
|
-
this.offsetScrollbarX = this.offsetX;
|
|
43912
|
-
this.adjustViewportZoneX();
|
|
43908
|
+
let finalTarget = targetCol;
|
|
43909
|
+
while (this.getters.isColHidden(sheetId, finalTarget) && targetCol < maxCol) {
|
|
43910
|
+
finalTarget++;
|
|
43913
43911
|
}
|
|
43912
|
+
const finalTargetEnd = this.getters.getColDimensions(sheetId, finalTarget).end;
|
|
43913
|
+
const startIndex = this.searchHeaderIndex("COL", finalTargetEnd - this.viewportWidth - this.offsetCorrectionX, this.boundaries.left, true);
|
|
43914
|
+
this.offsetX =
|
|
43915
|
+
this.getters.getColDimensions(sheetId, startIndex).end - this.offsetCorrectionX;
|
|
43916
|
+
this.offsetScrollbarX = this.offsetX;
|
|
43917
|
+
this.adjustViewportZoneX();
|
|
43914
43918
|
}
|
|
43915
43919
|
else if (this.left > targetCol) {
|
|
43916
|
-
|
|
43917
|
-
|
|
43918
|
-
|
|
43919
|
-
}
|
|
43920
|
-
if (this.getters.isColHidden(sheetId, col)) {
|
|
43921
|
-
continue;
|
|
43922
|
-
}
|
|
43923
|
-
this.offsetX = this.getters.getColDimensions(sheetId, col).start - this.offsetCorrectionX;
|
|
43924
|
-
this.offsetScrollbarX = this.offsetX;
|
|
43925
|
-
this.adjustViewportZoneX();
|
|
43920
|
+
let finalTarget = targetCol;
|
|
43921
|
+
while (this.getters.isColHidden(sheetId, finalTarget) && targetCol > 0) {
|
|
43922
|
+
finalTarget--;
|
|
43926
43923
|
}
|
|
43924
|
+
this.offsetX =
|
|
43925
|
+
this.getters.getColDimensions(sheetId, finalTarget).start - this.offsetCorrectionX;
|
|
43926
|
+
this.offsetScrollbarX = this.offsetX;
|
|
43927
|
+
this.adjustViewportZoneX();
|
|
43927
43928
|
}
|
|
43928
43929
|
}
|
|
43929
43930
|
adjustPositionY(targetRow) {
|
|
@@ -43931,30 +43932,26 @@
|
|
|
43931
43932
|
const { end } = this.getters.getRowDimensions(sheetId, targetRow);
|
|
43932
43933
|
const maxRow = this.getters.getNumberRows(sheetId);
|
|
43933
43934
|
if (this.offsetY + this.viewportHeight + this.offsetCorrectionY < end) {
|
|
43934
|
-
|
|
43935
|
-
|
|
43936
|
-
|
|
43937
|
-
}
|
|
43938
|
-
if (this.getters.isRowHidden(sheetId, row)) {
|
|
43939
|
-
continue;
|
|
43940
|
-
}
|
|
43941
|
-
this.offsetY = this.getters.getRowDimensions(sheetId, row).end - this.offsetCorrectionY;
|
|
43942
|
-
this.offsetScrollbarY = this.offsetY;
|
|
43943
|
-
this.adjustViewportZoneY();
|
|
43935
|
+
let finalTarget = targetRow;
|
|
43936
|
+
while (this.getters.isRowHidden(sheetId, finalTarget) && targetRow < maxRow) {
|
|
43937
|
+
finalTarget++;
|
|
43944
43938
|
}
|
|
43939
|
+
const finalTargetEnd = this.getters.getRowDimensions(sheetId, finalTarget).end;
|
|
43940
|
+
const startIndex = this.searchHeaderIndex("ROW", finalTargetEnd - this.viewportHeight - this.offsetCorrectionY, this.boundaries.top, true);
|
|
43941
|
+
this.offsetY =
|
|
43942
|
+
this.getters.getRowDimensions(sheetId, startIndex).end - this.offsetCorrectionY;
|
|
43943
|
+
this.offsetScrollbarY = this.offsetY;
|
|
43944
|
+
this.adjustViewportZoneY();
|
|
43945
43945
|
}
|
|
43946
43946
|
else if (this.top > targetRow) {
|
|
43947
|
-
|
|
43948
|
-
|
|
43949
|
-
|
|
43950
|
-
}
|
|
43951
|
-
if (this.getters.isRowHidden(sheetId, row)) {
|
|
43952
|
-
continue;
|
|
43953
|
-
}
|
|
43954
|
-
this.offsetY = this.getters.getRowDimensions(sheetId, row).start - this.offsetCorrectionY;
|
|
43955
|
-
this.offsetScrollbarY = this.offsetY;
|
|
43956
|
-
this.adjustViewportZoneY();
|
|
43947
|
+
let finalTarget = targetRow;
|
|
43948
|
+
while (this.getters.isRowHidden(sheetId, finalTarget) && targetRow > 0) {
|
|
43949
|
+
finalTarget--;
|
|
43957
43950
|
}
|
|
43951
|
+
this.offsetY =
|
|
43952
|
+
this.getters.getRowDimensions(sheetId, finalTarget).start - this.offsetCorrectionY;
|
|
43953
|
+
this.offsetScrollbarY = this.offsetY;
|
|
43954
|
+
this.adjustViewportZoneY();
|
|
43958
43955
|
}
|
|
43959
43956
|
}
|
|
43960
43957
|
setViewportOffset(offsetX, offsetY) {
|
|
@@ -50695,9 +50692,9 @@
|
|
|
50695
50692
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
50696
50693
|
|
|
50697
50694
|
|
|
50698
|
-
__info__.version = '16.4.
|
|
50699
|
-
__info__.date = '2023-
|
|
50700
|
-
__info__.hash = '
|
|
50695
|
+
__info__.version = '16.4.8';
|
|
50696
|
+
__info__.date = '2023-10-03T12:45:33.807Z';
|
|
50697
|
+
__info__.hash = 'c614d64';
|
|
50701
50698
|
|
|
50702
50699
|
|
|
50703
50700
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|