@odoo/o-spreadsheet 16.2.16 → 16.2.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 +54 -52
- package/dist/o-spreadsheet.esm.js +54 -52
- package/dist/o-spreadsheet.iife.js +54 -52
- package/dist/o-spreadsheet.iife.min.js +241 -241
- package/package.json +2 -2
|
@@ -4869,6 +4869,9 @@ class FilterMenu extends owl.Component {
|
|
|
4869
4869
|
});
|
|
4870
4870
|
this.state.values = this.getFilterValues(this.props.filterPosition);
|
|
4871
4871
|
}
|
|
4872
|
+
get isReadonly() {
|
|
4873
|
+
return this.env.model.getters.isReadonly();
|
|
4874
|
+
}
|
|
4872
4875
|
getFilterValues(position) {
|
|
4873
4876
|
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
4874
4877
|
const filter = this.env.model.getters.getFilter({ sheetId, ...position });
|
|
@@ -18709,9 +18712,9 @@ class FindAndReplacePanel extends owl.Component {
|
|
|
18709
18712
|
}
|
|
18710
18713
|
setup() {
|
|
18711
18714
|
this.showFormulaState = this.env.model.getters.shouldShowFormulas();
|
|
18712
|
-
this.debouncedUpdateSearch = debounce(this.updateSearch.bind(this), 200);
|
|
18713
18715
|
owl.onMounted(() => this.focusInput());
|
|
18714
18716
|
owl.onWillUnmount(() => {
|
|
18717
|
+
clearTimeout(this.debounceTimeoutId);
|
|
18715
18718
|
this.env.model.dispatch("CLEAR_SEARCH");
|
|
18716
18719
|
this.env.model.dispatch("SET_FORMULA_VISIBILITY", { show: this.showFormulaState });
|
|
18717
18720
|
});
|
|
@@ -18756,6 +18759,13 @@ class FindAndReplacePanel extends owl.Component {
|
|
|
18756
18759
|
searchOptions: this.state.searchOptions,
|
|
18757
18760
|
});
|
|
18758
18761
|
}
|
|
18762
|
+
debouncedUpdateSearch() {
|
|
18763
|
+
clearTimeout(this.debounceTimeoutId);
|
|
18764
|
+
this.debounceTimeoutId = setTimeout(() => {
|
|
18765
|
+
this.updateSearch();
|
|
18766
|
+
this.debounceTimeoutId = undefined;
|
|
18767
|
+
}, 200);
|
|
18768
|
+
}
|
|
18759
18769
|
replace() {
|
|
18760
18770
|
this.env.model.dispatch("REPLACE_SEARCH", {
|
|
18761
18771
|
replaceWith: this.state.replaceWith,
|
|
@@ -29435,7 +29445,11 @@ class HeaderSizePlugin extends CorePlugin {
|
|
|
29435
29445
|
let sizes = [...this.sizes[cmd.sheetId][cmd.dimension]];
|
|
29436
29446
|
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
29437
29447
|
const baseSize = sizes[cmd.base];
|
|
29438
|
-
|
|
29448
|
+
const sizesToInsert = range(0, cmd.quantity).map(() => ({
|
|
29449
|
+
manualSize: baseSize.manualSize,
|
|
29450
|
+
computedSize: lazy(baseSize.computedSize()),
|
|
29451
|
+
}));
|
|
29452
|
+
sizes.splice(addIndex, 0, ...sizesToInsert);
|
|
29439
29453
|
sizes = sizes.map((size, row) => {
|
|
29440
29454
|
if (cmd.dimension === "ROW" && row > cmd.base + cmd.quantity) {
|
|
29441
29455
|
// invalidate sizes
|
|
@@ -32948,30 +32962,26 @@ class InternalViewport {
|
|
|
32948
32962
|
const { end } = this.getters.getColDimensions(sheetId, targetCol);
|
|
32949
32963
|
const maxCol = this.getters.getNumberCols(sheetId);
|
|
32950
32964
|
if (this.offsetX + this.offsetCorrectionX + this.viewportWidth < end) {
|
|
32951
|
-
|
|
32952
|
-
|
|
32953
|
-
|
|
32954
|
-
}
|
|
32955
|
-
if (this.getters.isColHidden(sheetId, col)) {
|
|
32956
|
-
continue;
|
|
32957
|
-
}
|
|
32958
|
-
this.offsetX = this.getters.getColDimensions(sheetId, col).end - this.offsetCorrectionX;
|
|
32959
|
-
this.offsetScrollbarX = this.offsetX;
|
|
32960
|
-
this.adjustViewportZoneX();
|
|
32965
|
+
let finalTarget = targetCol;
|
|
32966
|
+
while (this.getters.isColHidden(sheetId, finalTarget) && targetCol < maxCol) {
|
|
32967
|
+
finalTarget++;
|
|
32961
32968
|
}
|
|
32969
|
+
const finalTargetEnd = this.getters.getColDimensions(sheetId, finalTarget).end;
|
|
32970
|
+
const startIndex = this.searchHeaderIndex("COL", finalTargetEnd - this.viewportWidth - this.offsetCorrectionX, this.boundaries.left, true);
|
|
32971
|
+
this.offsetX =
|
|
32972
|
+
this.getters.getColDimensions(sheetId, startIndex).end - this.offsetCorrectionX;
|
|
32973
|
+
this.offsetScrollbarX = this.offsetX;
|
|
32974
|
+
this.adjustViewportZoneX();
|
|
32962
32975
|
}
|
|
32963
32976
|
else if (this.left > targetCol) {
|
|
32964
|
-
|
|
32965
|
-
|
|
32966
|
-
|
|
32967
|
-
}
|
|
32968
|
-
if (this.getters.isColHidden(sheetId, col)) {
|
|
32969
|
-
continue;
|
|
32970
|
-
}
|
|
32971
|
-
this.offsetX = this.getters.getColDimensions(sheetId, col).start - this.offsetCorrectionX;
|
|
32972
|
-
this.offsetScrollbarX = this.offsetX;
|
|
32973
|
-
this.adjustViewportZoneX();
|
|
32977
|
+
let finalTarget = targetCol;
|
|
32978
|
+
while (this.getters.isColHidden(sheetId, finalTarget) && targetCol > 0) {
|
|
32979
|
+
finalTarget--;
|
|
32974
32980
|
}
|
|
32981
|
+
this.offsetX =
|
|
32982
|
+
this.getters.getColDimensions(sheetId, finalTarget).start - this.offsetCorrectionX;
|
|
32983
|
+
this.offsetScrollbarX = this.offsetX;
|
|
32984
|
+
this.adjustViewportZoneX();
|
|
32975
32985
|
}
|
|
32976
32986
|
}
|
|
32977
32987
|
adjustPositionY(targetRow) {
|
|
@@ -32979,30 +32989,26 @@ class InternalViewport {
|
|
|
32979
32989
|
const { end } = this.getters.getRowDimensions(sheetId, targetRow);
|
|
32980
32990
|
const maxRow = this.getters.getNumberRows(sheetId);
|
|
32981
32991
|
if (this.offsetY + this.viewportHeight + this.offsetCorrectionY < end) {
|
|
32982
|
-
|
|
32983
|
-
|
|
32984
|
-
|
|
32985
|
-
}
|
|
32986
|
-
if (this.getters.isRowHidden(sheetId, row)) {
|
|
32987
|
-
continue;
|
|
32988
|
-
}
|
|
32989
|
-
this.offsetY = this.getters.getRowDimensions(sheetId, row).end - this.offsetCorrectionY;
|
|
32990
|
-
this.offsetScrollbarY = this.offsetY;
|
|
32991
|
-
this.adjustViewportZoneY();
|
|
32992
|
+
let finalTarget = targetRow;
|
|
32993
|
+
while (this.getters.isRowHidden(sheetId, finalTarget) && targetRow < maxRow) {
|
|
32994
|
+
finalTarget++;
|
|
32992
32995
|
}
|
|
32996
|
+
const finalTargetEnd = this.getters.getRowDimensions(sheetId, finalTarget).end;
|
|
32997
|
+
const startIndex = this.searchHeaderIndex("ROW", finalTargetEnd - this.viewportHeight - this.offsetCorrectionY, this.boundaries.top, true);
|
|
32998
|
+
this.offsetY =
|
|
32999
|
+
this.getters.getRowDimensions(sheetId, startIndex).end - this.offsetCorrectionY;
|
|
33000
|
+
this.offsetScrollbarY = this.offsetY;
|
|
33001
|
+
this.adjustViewportZoneY();
|
|
32993
33002
|
}
|
|
32994
33003
|
else if (this.top > targetRow) {
|
|
32995
|
-
|
|
32996
|
-
|
|
32997
|
-
|
|
32998
|
-
}
|
|
32999
|
-
if (this.getters.isRowHidden(sheetId, row)) {
|
|
33000
|
-
continue;
|
|
33001
|
-
}
|
|
33002
|
-
this.offsetY = this.getters.getRowDimensions(sheetId, row).start - this.offsetCorrectionY;
|
|
33003
|
-
this.offsetScrollbarY = this.offsetY;
|
|
33004
|
-
this.adjustViewportZoneY();
|
|
33004
|
+
let finalTarget = targetRow;
|
|
33005
|
+
while (this.getters.isRowHidden(sheetId, finalTarget) && targetRow > 0) {
|
|
33006
|
+
finalTarget--;
|
|
33005
33007
|
}
|
|
33008
|
+
this.offsetY =
|
|
33009
|
+
this.getters.getRowDimensions(sheetId, finalTarget).start - this.offsetCorrectionY;
|
|
33010
|
+
this.offsetScrollbarY = this.offsetY;
|
|
33011
|
+
this.adjustViewportZoneY();
|
|
33006
33012
|
}
|
|
33007
33013
|
}
|
|
33008
33014
|
setViewportOffset(offsetX, offsetY) {
|
|
@@ -34577,14 +34583,10 @@ class FindAndReplacePlugin extends UIPlugin {
|
|
|
34577
34583
|
case "REPLACE_ALL_SEARCH":
|
|
34578
34584
|
this.replaceAll(cmd.replaceWith);
|
|
34579
34585
|
break;
|
|
34580
|
-
case "EVALUATE_CELLS":
|
|
34581
|
-
case "UPDATE_CELL":
|
|
34582
|
-
case "REMOVE_FILTER_TABLE":
|
|
34583
|
-
case "UPDATE_FILTER":
|
|
34584
|
-
this.isSearchDirty = true;
|
|
34585
|
-
break;
|
|
34586
34586
|
case "UNDO":
|
|
34587
34587
|
case "REDO":
|
|
34588
|
+
case "REMOVE_FILTER_TABLE":
|
|
34589
|
+
case "UPDATE_FILTER":
|
|
34588
34590
|
case "REMOVE_COLUMNS_ROWS":
|
|
34589
34591
|
case "HIDE_COLUMNS_ROWS":
|
|
34590
34592
|
case "UNHIDE_COLUMNS_ROWS":
|
|
@@ -37584,7 +37586,7 @@ class ClipboardCellsState extends ClipboardCellsAbstractState {
|
|
|
37584
37586
|
});
|
|
37585
37587
|
for (const filterTable of this.copiedTables) {
|
|
37586
37588
|
this.dispatch("REMOVE_FILTER_TABLE", {
|
|
37587
|
-
sheetId: this.
|
|
37589
|
+
sheetId: this.sheetId,
|
|
37588
37590
|
target: [filterTable.zone],
|
|
37589
37591
|
});
|
|
37590
37592
|
}
|
|
@@ -45458,6 +45460,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
45458
45460
|
exports.tokenize = tokenize;
|
|
45459
45461
|
|
|
45460
45462
|
|
|
45461
|
-
__info__.version = '16.2.
|
|
45462
|
-
__info__.date = '2023-
|
|
45463
|
-
__info__.hash = '
|
|
45463
|
+
__info__.version = '16.2.17';
|
|
45464
|
+
__info__.date = '2023-10-03T12:42:54.642Z';
|
|
45465
|
+
__info__.hash = '146867a';
|
|
@@ -4865,6 +4865,9 @@ class FilterMenu extends Component {
|
|
|
4865
4865
|
});
|
|
4866
4866
|
this.state.values = this.getFilterValues(this.props.filterPosition);
|
|
4867
4867
|
}
|
|
4868
|
+
get isReadonly() {
|
|
4869
|
+
return this.env.model.getters.isReadonly();
|
|
4870
|
+
}
|
|
4868
4871
|
getFilterValues(position) {
|
|
4869
4872
|
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
4870
4873
|
const filter = this.env.model.getters.getFilter({ sheetId, ...position });
|
|
@@ -18705,9 +18708,9 @@ class FindAndReplacePanel extends Component {
|
|
|
18705
18708
|
}
|
|
18706
18709
|
setup() {
|
|
18707
18710
|
this.showFormulaState = this.env.model.getters.shouldShowFormulas();
|
|
18708
|
-
this.debouncedUpdateSearch = debounce(this.updateSearch.bind(this), 200);
|
|
18709
18711
|
onMounted(() => this.focusInput());
|
|
18710
18712
|
onWillUnmount(() => {
|
|
18713
|
+
clearTimeout(this.debounceTimeoutId);
|
|
18711
18714
|
this.env.model.dispatch("CLEAR_SEARCH");
|
|
18712
18715
|
this.env.model.dispatch("SET_FORMULA_VISIBILITY", { show: this.showFormulaState });
|
|
18713
18716
|
});
|
|
@@ -18752,6 +18755,13 @@ class FindAndReplacePanel extends Component {
|
|
|
18752
18755
|
searchOptions: this.state.searchOptions,
|
|
18753
18756
|
});
|
|
18754
18757
|
}
|
|
18758
|
+
debouncedUpdateSearch() {
|
|
18759
|
+
clearTimeout(this.debounceTimeoutId);
|
|
18760
|
+
this.debounceTimeoutId = setTimeout(() => {
|
|
18761
|
+
this.updateSearch();
|
|
18762
|
+
this.debounceTimeoutId = undefined;
|
|
18763
|
+
}, 200);
|
|
18764
|
+
}
|
|
18755
18765
|
replace() {
|
|
18756
18766
|
this.env.model.dispatch("REPLACE_SEARCH", {
|
|
18757
18767
|
replaceWith: this.state.replaceWith,
|
|
@@ -29431,7 +29441,11 @@ class HeaderSizePlugin extends CorePlugin {
|
|
|
29431
29441
|
let sizes = [...this.sizes[cmd.sheetId][cmd.dimension]];
|
|
29432
29442
|
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
29433
29443
|
const baseSize = sizes[cmd.base];
|
|
29434
|
-
|
|
29444
|
+
const sizesToInsert = range(0, cmd.quantity).map(() => ({
|
|
29445
|
+
manualSize: baseSize.manualSize,
|
|
29446
|
+
computedSize: lazy(baseSize.computedSize()),
|
|
29447
|
+
}));
|
|
29448
|
+
sizes.splice(addIndex, 0, ...sizesToInsert);
|
|
29435
29449
|
sizes = sizes.map((size, row) => {
|
|
29436
29450
|
if (cmd.dimension === "ROW" && row > cmd.base + cmd.quantity) {
|
|
29437
29451
|
// invalidate sizes
|
|
@@ -32944,30 +32958,26 @@ class InternalViewport {
|
|
|
32944
32958
|
const { end } = this.getters.getColDimensions(sheetId, targetCol);
|
|
32945
32959
|
const maxCol = this.getters.getNumberCols(sheetId);
|
|
32946
32960
|
if (this.offsetX + this.offsetCorrectionX + this.viewportWidth < end) {
|
|
32947
|
-
|
|
32948
|
-
|
|
32949
|
-
|
|
32950
|
-
}
|
|
32951
|
-
if (this.getters.isColHidden(sheetId, col)) {
|
|
32952
|
-
continue;
|
|
32953
|
-
}
|
|
32954
|
-
this.offsetX = this.getters.getColDimensions(sheetId, col).end - this.offsetCorrectionX;
|
|
32955
|
-
this.offsetScrollbarX = this.offsetX;
|
|
32956
|
-
this.adjustViewportZoneX();
|
|
32961
|
+
let finalTarget = targetCol;
|
|
32962
|
+
while (this.getters.isColHidden(sheetId, finalTarget) && targetCol < maxCol) {
|
|
32963
|
+
finalTarget++;
|
|
32957
32964
|
}
|
|
32965
|
+
const finalTargetEnd = this.getters.getColDimensions(sheetId, finalTarget).end;
|
|
32966
|
+
const startIndex = this.searchHeaderIndex("COL", finalTargetEnd - this.viewportWidth - this.offsetCorrectionX, this.boundaries.left, true);
|
|
32967
|
+
this.offsetX =
|
|
32968
|
+
this.getters.getColDimensions(sheetId, startIndex).end - this.offsetCorrectionX;
|
|
32969
|
+
this.offsetScrollbarX = this.offsetX;
|
|
32970
|
+
this.adjustViewportZoneX();
|
|
32958
32971
|
}
|
|
32959
32972
|
else if (this.left > targetCol) {
|
|
32960
|
-
|
|
32961
|
-
|
|
32962
|
-
|
|
32963
|
-
}
|
|
32964
|
-
if (this.getters.isColHidden(sheetId, col)) {
|
|
32965
|
-
continue;
|
|
32966
|
-
}
|
|
32967
|
-
this.offsetX = this.getters.getColDimensions(sheetId, col).start - this.offsetCorrectionX;
|
|
32968
|
-
this.offsetScrollbarX = this.offsetX;
|
|
32969
|
-
this.adjustViewportZoneX();
|
|
32973
|
+
let finalTarget = targetCol;
|
|
32974
|
+
while (this.getters.isColHidden(sheetId, finalTarget) && targetCol > 0) {
|
|
32975
|
+
finalTarget--;
|
|
32970
32976
|
}
|
|
32977
|
+
this.offsetX =
|
|
32978
|
+
this.getters.getColDimensions(sheetId, finalTarget).start - this.offsetCorrectionX;
|
|
32979
|
+
this.offsetScrollbarX = this.offsetX;
|
|
32980
|
+
this.adjustViewportZoneX();
|
|
32971
32981
|
}
|
|
32972
32982
|
}
|
|
32973
32983
|
adjustPositionY(targetRow) {
|
|
@@ -32975,30 +32985,26 @@ class InternalViewport {
|
|
|
32975
32985
|
const { end } = this.getters.getRowDimensions(sheetId, targetRow);
|
|
32976
32986
|
const maxRow = this.getters.getNumberRows(sheetId);
|
|
32977
32987
|
if (this.offsetY + this.viewportHeight + this.offsetCorrectionY < end) {
|
|
32978
|
-
|
|
32979
|
-
|
|
32980
|
-
|
|
32981
|
-
}
|
|
32982
|
-
if (this.getters.isRowHidden(sheetId, row)) {
|
|
32983
|
-
continue;
|
|
32984
|
-
}
|
|
32985
|
-
this.offsetY = this.getters.getRowDimensions(sheetId, row).end - this.offsetCorrectionY;
|
|
32986
|
-
this.offsetScrollbarY = this.offsetY;
|
|
32987
|
-
this.adjustViewportZoneY();
|
|
32988
|
+
let finalTarget = targetRow;
|
|
32989
|
+
while (this.getters.isRowHidden(sheetId, finalTarget) && targetRow < maxRow) {
|
|
32990
|
+
finalTarget++;
|
|
32988
32991
|
}
|
|
32992
|
+
const finalTargetEnd = this.getters.getRowDimensions(sheetId, finalTarget).end;
|
|
32993
|
+
const startIndex = this.searchHeaderIndex("ROW", finalTargetEnd - this.viewportHeight - this.offsetCorrectionY, this.boundaries.top, true);
|
|
32994
|
+
this.offsetY =
|
|
32995
|
+
this.getters.getRowDimensions(sheetId, startIndex).end - this.offsetCorrectionY;
|
|
32996
|
+
this.offsetScrollbarY = this.offsetY;
|
|
32997
|
+
this.adjustViewportZoneY();
|
|
32989
32998
|
}
|
|
32990
32999
|
else if (this.top > targetRow) {
|
|
32991
|
-
|
|
32992
|
-
|
|
32993
|
-
|
|
32994
|
-
}
|
|
32995
|
-
if (this.getters.isRowHidden(sheetId, row)) {
|
|
32996
|
-
continue;
|
|
32997
|
-
}
|
|
32998
|
-
this.offsetY = this.getters.getRowDimensions(sheetId, row).start - this.offsetCorrectionY;
|
|
32999
|
-
this.offsetScrollbarY = this.offsetY;
|
|
33000
|
-
this.adjustViewportZoneY();
|
|
33000
|
+
let finalTarget = targetRow;
|
|
33001
|
+
while (this.getters.isRowHidden(sheetId, finalTarget) && targetRow > 0) {
|
|
33002
|
+
finalTarget--;
|
|
33001
33003
|
}
|
|
33004
|
+
this.offsetY =
|
|
33005
|
+
this.getters.getRowDimensions(sheetId, finalTarget).start - this.offsetCorrectionY;
|
|
33006
|
+
this.offsetScrollbarY = this.offsetY;
|
|
33007
|
+
this.adjustViewportZoneY();
|
|
33002
33008
|
}
|
|
33003
33009
|
}
|
|
33004
33010
|
setViewportOffset(offsetX, offsetY) {
|
|
@@ -34573,14 +34579,10 @@ class FindAndReplacePlugin extends UIPlugin {
|
|
|
34573
34579
|
case "REPLACE_ALL_SEARCH":
|
|
34574
34580
|
this.replaceAll(cmd.replaceWith);
|
|
34575
34581
|
break;
|
|
34576
|
-
case "EVALUATE_CELLS":
|
|
34577
|
-
case "UPDATE_CELL":
|
|
34578
|
-
case "REMOVE_FILTER_TABLE":
|
|
34579
|
-
case "UPDATE_FILTER":
|
|
34580
|
-
this.isSearchDirty = true;
|
|
34581
|
-
break;
|
|
34582
34582
|
case "UNDO":
|
|
34583
34583
|
case "REDO":
|
|
34584
|
+
case "REMOVE_FILTER_TABLE":
|
|
34585
|
+
case "UPDATE_FILTER":
|
|
34584
34586
|
case "REMOVE_COLUMNS_ROWS":
|
|
34585
34587
|
case "HIDE_COLUMNS_ROWS":
|
|
34586
34588
|
case "UNHIDE_COLUMNS_ROWS":
|
|
@@ -37580,7 +37582,7 @@ class ClipboardCellsState extends ClipboardCellsAbstractState {
|
|
|
37580
37582
|
});
|
|
37581
37583
|
for (const filterTable of this.copiedTables) {
|
|
37582
37584
|
this.dispatch("REMOVE_FILTER_TABLE", {
|
|
37583
|
-
sheetId: this.
|
|
37585
|
+
sheetId: this.sheetId,
|
|
37584
37586
|
target: [filterTable.zone],
|
|
37585
37587
|
});
|
|
37586
37588
|
}
|
|
@@ -45426,6 +45428,6 @@ function addFunction(functionName, functionDescription) {
|
|
|
45426
45428
|
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 };
|
|
45427
45429
|
|
|
45428
45430
|
|
|
45429
|
-
__info__.version = '16.2.
|
|
45430
|
-
__info__.date = '2023-
|
|
45431
|
-
__info__.hash = '
|
|
45431
|
+
__info__.version = '16.2.17';
|
|
45432
|
+
__info__.date = '2023-10-03T12:42:54.642Z';
|
|
45433
|
+
__info__.hash = '146867a';
|
|
@@ -4866,6 +4866,9 @@
|
|
|
4866
4866
|
});
|
|
4867
4867
|
this.state.values = this.getFilterValues(this.props.filterPosition);
|
|
4868
4868
|
}
|
|
4869
|
+
get isReadonly() {
|
|
4870
|
+
return this.env.model.getters.isReadonly();
|
|
4871
|
+
}
|
|
4869
4872
|
getFilterValues(position) {
|
|
4870
4873
|
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
4871
4874
|
const filter = this.env.model.getters.getFilter({ sheetId, ...position });
|
|
@@ -18706,9 +18709,9 @@
|
|
|
18706
18709
|
}
|
|
18707
18710
|
setup() {
|
|
18708
18711
|
this.showFormulaState = this.env.model.getters.shouldShowFormulas();
|
|
18709
|
-
this.debouncedUpdateSearch = debounce(this.updateSearch.bind(this), 200);
|
|
18710
18712
|
owl.onMounted(() => this.focusInput());
|
|
18711
18713
|
owl.onWillUnmount(() => {
|
|
18714
|
+
clearTimeout(this.debounceTimeoutId);
|
|
18712
18715
|
this.env.model.dispatch("CLEAR_SEARCH");
|
|
18713
18716
|
this.env.model.dispatch("SET_FORMULA_VISIBILITY", { show: this.showFormulaState });
|
|
18714
18717
|
});
|
|
@@ -18753,6 +18756,13 @@
|
|
|
18753
18756
|
searchOptions: this.state.searchOptions,
|
|
18754
18757
|
});
|
|
18755
18758
|
}
|
|
18759
|
+
debouncedUpdateSearch() {
|
|
18760
|
+
clearTimeout(this.debounceTimeoutId);
|
|
18761
|
+
this.debounceTimeoutId = setTimeout(() => {
|
|
18762
|
+
this.updateSearch();
|
|
18763
|
+
this.debounceTimeoutId = undefined;
|
|
18764
|
+
}, 200);
|
|
18765
|
+
}
|
|
18756
18766
|
replace() {
|
|
18757
18767
|
this.env.model.dispatch("REPLACE_SEARCH", {
|
|
18758
18768
|
replaceWith: this.state.replaceWith,
|
|
@@ -29432,7 +29442,11 @@
|
|
|
29432
29442
|
let sizes = [...this.sizes[cmd.sheetId][cmd.dimension]];
|
|
29433
29443
|
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
29434
29444
|
const baseSize = sizes[cmd.base];
|
|
29435
|
-
|
|
29445
|
+
const sizesToInsert = range(0, cmd.quantity).map(() => ({
|
|
29446
|
+
manualSize: baseSize.manualSize,
|
|
29447
|
+
computedSize: lazy(baseSize.computedSize()),
|
|
29448
|
+
}));
|
|
29449
|
+
sizes.splice(addIndex, 0, ...sizesToInsert);
|
|
29436
29450
|
sizes = sizes.map((size, row) => {
|
|
29437
29451
|
if (cmd.dimension === "ROW" && row > cmd.base + cmd.quantity) {
|
|
29438
29452
|
// invalidate sizes
|
|
@@ -32945,30 +32959,26 @@
|
|
|
32945
32959
|
const { end } = this.getters.getColDimensions(sheetId, targetCol);
|
|
32946
32960
|
const maxCol = this.getters.getNumberCols(sheetId);
|
|
32947
32961
|
if (this.offsetX + this.offsetCorrectionX + this.viewportWidth < end) {
|
|
32948
|
-
|
|
32949
|
-
|
|
32950
|
-
|
|
32951
|
-
}
|
|
32952
|
-
if (this.getters.isColHidden(sheetId, col)) {
|
|
32953
|
-
continue;
|
|
32954
|
-
}
|
|
32955
|
-
this.offsetX = this.getters.getColDimensions(sheetId, col).end - this.offsetCorrectionX;
|
|
32956
|
-
this.offsetScrollbarX = this.offsetX;
|
|
32957
|
-
this.adjustViewportZoneX();
|
|
32962
|
+
let finalTarget = targetCol;
|
|
32963
|
+
while (this.getters.isColHidden(sheetId, finalTarget) && targetCol < maxCol) {
|
|
32964
|
+
finalTarget++;
|
|
32958
32965
|
}
|
|
32966
|
+
const finalTargetEnd = this.getters.getColDimensions(sheetId, finalTarget).end;
|
|
32967
|
+
const startIndex = this.searchHeaderIndex("COL", finalTargetEnd - this.viewportWidth - this.offsetCorrectionX, this.boundaries.left, true);
|
|
32968
|
+
this.offsetX =
|
|
32969
|
+
this.getters.getColDimensions(sheetId, startIndex).end - this.offsetCorrectionX;
|
|
32970
|
+
this.offsetScrollbarX = this.offsetX;
|
|
32971
|
+
this.adjustViewportZoneX();
|
|
32959
32972
|
}
|
|
32960
32973
|
else if (this.left > targetCol) {
|
|
32961
|
-
|
|
32962
|
-
|
|
32963
|
-
|
|
32964
|
-
}
|
|
32965
|
-
if (this.getters.isColHidden(sheetId, col)) {
|
|
32966
|
-
continue;
|
|
32967
|
-
}
|
|
32968
|
-
this.offsetX = this.getters.getColDimensions(sheetId, col).start - this.offsetCorrectionX;
|
|
32969
|
-
this.offsetScrollbarX = this.offsetX;
|
|
32970
|
-
this.adjustViewportZoneX();
|
|
32974
|
+
let finalTarget = targetCol;
|
|
32975
|
+
while (this.getters.isColHidden(sheetId, finalTarget) && targetCol > 0) {
|
|
32976
|
+
finalTarget--;
|
|
32971
32977
|
}
|
|
32978
|
+
this.offsetX =
|
|
32979
|
+
this.getters.getColDimensions(sheetId, finalTarget).start - this.offsetCorrectionX;
|
|
32980
|
+
this.offsetScrollbarX = this.offsetX;
|
|
32981
|
+
this.adjustViewportZoneX();
|
|
32972
32982
|
}
|
|
32973
32983
|
}
|
|
32974
32984
|
adjustPositionY(targetRow) {
|
|
@@ -32976,30 +32986,26 @@
|
|
|
32976
32986
|
const { end } = this.getters.getRowDimensions(sheetId, targetRow);
|
|
32977
32987
|
const maxRow = this.getters.getNumberRows(sheetId);
|
|
32978
32988
|
if (this.offsetY + this.viewportHeight + this.offsetCorrectionY < end) {
|
|
32979
|
-
|
|
32980
|
-
|
|
32981
|
-
|
|
32982
|
-
}
|
|
32983
|
-
if (this.getters.isRowHidden(sheetId, row)) {
|
|
32984
|
-
continue;
|
|
32985
|
-
}
|
|
32986
|
-
this.offsetY = this.getters.getRowDimensions(sheetId, row).end - this.offsetCorrectionY;
|
|
32987
|
-
this.offsetScrollbarY = this.offsetY;
|
|
32988
|
-
this.adjustViewportZoneY();
|
|
32989
|
+
let finalTarget = targetRow;
|
|
32990
|
+
while (this.getters.isRowHidden(sheetId, finalTarget) && targetRow < maxRow) {
|
|
32991
|
+
finalTarget++;
|
|
32989
32992
|
}
|
|
32993
|
+
const finalTargetEnd = this.getters.getRowDimensions(sheetId, finalTarget).end;
|
|
32994
|
+
const startIndex = this.searchHeaderIndex("ROW", finalTargetEnd - this.viewportHeight - this.offsetCorrectionY, this.boundaries.top, true);
|
|
32995
|
+
this.offsetY =
|
|
32996
|
+
this.getters.getRowDimensions(sheetId, startIndex).end - this.offsetCorrectionY;
|
|
32997
|
+
this.offsetScrollbarY = this.offsetY;
|
|
32998
|
+
this.adjustViewportZoneY();
|
|
32990
32999
|
}
|
|
32991
33000
|
else if (this.top > targetRow) {
|
|
32992
|
-
|
|
32993
|
-
|
|
32994
|
-
|
|
32995
|
-
}
|
|
32996
|
-
if (this.getters.isRowHidden(sheetId, row)) {
|
|
32997
|
-
continue;
|
|
32998
|
-
}
|
|
32999
|
-
this.offsetY = this.getters.getRowDimensions(sheetId, row).start - this.offsetCorrectionY;
|
|
33000
|
-
this.offsetScrollbarY = this.offsetY;
|
|
33001
|
-
this.adjustViewportZoneY();
|
|
33001
|
+
let finalTarget = targetRow;
|
|
33002
|
+
while (this.getters.isRowHidden(sheetId, finalTarget) && targetRow > 0) {
|
|
33003
|
+
finalTarget--;
|
|
33002
33004
|
}
|
|
33005
|
+
this.offsetY =
|
|
33006
|
+
this.getters.getRowDimensions(sheetId, finalTarget).start - this.offsetCorrectionY;
|
|
33007
|
+
this.offsetScrollbarY = this.offsetY;
|
|
33008
|
+
this.adjustViewportZoneY();
|
|
33003
33009
|
}
|
|
33004
33010
|
}
|
|
33005
33011
|
setViewportOffset(offsetX, offsetY) {
|
|
@@ -34574,14 +34580,10 @@
|
|
|
34574
34580
|
case "REPLACE_ALL_SEARCH":
|
|
34575
34581
|
this.replaceAll(cmd.replaceWith);
|
|
34576
34582
|
break;
|
|
34577
|
-
case "EVALUATE_CELLS":
|
|
34578
|
-
case "UPDATE_CELL":
|
|
34579
|
-
case "REMOVE_FILTER_TABLE":
|
|
34580
|
-
case "UPDATE_FILTER":
|
|
34581
|
-
this.isSearchDirty = true;
|
|
34582
|
-
break;
|
|
34583
34583
|
case "UNDO":
|
|
34584
34584
|
case "REDO":
|
|
34585
|
+
case "REMOVE_FILTER_TABLE":
|
|
34586
|
+
case "UPDATE_FILTER":
|
|
34585
34587
|
case "REMOVE_COLUMNS_ROWS":
|
|
34586
34588
|
case "HIDE_COLUMNS_ROWS":
|
|
34587
34589
|
case "UNHIDE_COLUMNS_ROWS":
|
|
@@ -37581,7 +37583,7 @@
|
|
|
37581
37583
|
});
|
|
37582
37584
|
for (const filterTable of this.copiedTables) {
|
|
37583
37585
|
this.dispatch("REMOVE_FILTER_TABLE", {
|
|
37584
|
-
sheetId: this.
|
|
37586
|
+
sheetId: this.sheetId,
|
|
37585
37587
|
target: [filterTable.zone],
|
|
37586
37588
|
});
|
|
37587
37589
|
}
|
|
@@ -45457,9 +45459,9 @@
|
|
|
45457
45459
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
45458
45460
|
|
|
45459
45461
|
|
|
45460
|
-
__info__.version = '16.2.
|
|
45461
|
-
__info__.date = '2023-
|
|
45462
|
-
__info__.hash = '
|
|
45462
|
+
__info__.version = '16.2.17';
|
|
45463
|
+
__info__.date = '2023-10-03T12:42:54.642Z';
|
|
45464
|
+
__info__.hash = '146867a';
|
|
45463
45465
|
|
|
45464
45466
|
|
|
45465
45467
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|