@odoo/o-spreadsheet 16.2.2 → 16.2.3
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.
|
@@ -32643,48 +32643,66 @@ class InternalViewport {
|
|
|
32643
32643
|
this.adjustPositionY(row);
|
|
32644
32644
|
}
|
|
32645
32645
|
}
|
|
32646
|
-
adjustPositionX(
|
|
32646
|
+
adjustPositionX(targetCol) {
|
|
32647
32647
|
const sheetId = this.sheetId;
|
|
32648
|
-
const {
|
|
32649
|
-
|
|
32650
|
-
|
|
32651
|
-
|
|
32652
|
-
|
|
32653
|
-
this.adjustViewportZoneX();
|
|
32654
|
-
}
|
|
32655
|
-
while (col < this.left) {
|
|
32656
|
-
let leftCol;
|
|
32657
|
-
for (leftCol = this.left; leftCol >= 0; leftCol--) {
|
|
32658
|
-
if (!this.getters.isColHidden(sheetId, leftCol)) {
|
|
32648
|
+
const { end } = this.getters.getColDimensions(sheetId, targetCol);
|
|
32649
|
+
const maxCol = this.getters.getNumberCols(sheetId);
|
|
32650
|
+
if (this.offsetX + this.offsetCorrectionX + this.viewportWidth < end) {
|
|
32651
|
+
for (let col = this.left; this.offsetX + this.offsetCorrectionX + this.viewportWidth < end; col++) {
|
|
32652
|
+
if (col > maxCol) {
|
|
32659
32653
|
break;
|
|
32660
32654
|
}
|
|
32655
|
+
if (this.getters.isColHidden(sheetId, col)) {
|
|
32656
|
+
continue;
|
|
32657
|
+
}
|
|
32658
|
+
this.offsetX = this.getters.getColDimensions(sheetId, col).end - this.offsetCorrectionX;
|
|
32659
|
+
this.offsetScrollbarX = this.offsetX;
|
|
32660
|
+
this.adjustViewportZoneX();
|
|
32661
|
+
}
|
|
32662
|
+
}
|
|
32663
|
+
else if (this.left > targetCol) {
|
|
32664
|
+
for (let col = this.left; col >= targetCol; col--) {
|
|
32665
|
+
if (col < 0) {
|
|
32666
|
+
break;
|
|
32667
|
+
}
|
|
32668
|
+
if (this.getters.isColHidden(sheetId, col)) {
|
|
32669
|
+
continue;
|
|
32670
|
+
}
|
|
32671
|
+
this.offsetX = this.getters.getColDimensions(sheetId, col).start - this.offsetCorrectionX;
|
|
32672
|
+
this.offsetScrollbarX = this.offsetX;
|
|
32673
|
+
this.adjustViewportZoneX();
|
|
32661
32674
|
}
|
|
32662
|
-
this.offsetX =
|
|
32663
|
-
this.getters.getColDimensions(sheetId, leftCol - 1).start - this.offsetCorrectionX;
|
|
32664
|
-
this.offsetScrollbarX = this.offsetX;
|
|
32665
|
-
this.adjustViewportZoneX();
|
|
32666
32675
|
}
|
|
32667
32676
|
}
|
|
32668
|
-
adjustPositionY(
|
|
32677
|
+
adjustPositionY(targetRow) {
|
|
32669
32678
|
const sheetId = this.sheetId;
|
|
32670
|
-
|
|
32671
|
-
|
|
32672
|
-
|
|
32673
|
-
|
|
32674
|
-
|
|
32675
|
-
this.adjustViewportZoneY();
|
|
32676
|
-
}
|
|
32677
|
-
while (row < this.top) {
|
|
32678
|
-
let topRow;
|
|
32679
|
-
for (topRow = this.top; topRow >= 0; topRow--) {
|
|
32680
|
-
if (!this.getters.isRowHidden(sheetId, topRow)) {
|
|
32679
|
+
const { end } = this.getters.getRowDimensions(sheetId, targetRow);
|
|
32680
|
+
const maxRow = this.getters.getNumberRows(sheetId);
|
|
32681
|
+
if (this.offsetY + this.viewportHeight + this.offsetCorrectionY < end) {
|
|
32682
|
+
for (let row = this.top; this.offsetY + this.viewportHeight + this.offsetCorrectionY < end; row++) {
|
|
32683
|
+
if (row > maxRow) {
|
|
32681
32684
|
break;
|
|
32682
32685
|
}
|
|
32686
|
+
if (this.getters.isRowHidden(sheetId, row)) {
|
|
32687
|
+
continue;
|
|
32688
|
+
}
|
|
32689
|
+
this.offsetY = this.getters.getRowDimensions(sheetId, row).end - this.offsetCorrectionY;
|
|
32690
|
+
this.offsetScrollbarY = this.offsetY;
|
|
32691
|
+
this.adjustViewportZoneY();
|
|
32692
|
+
}
|
|
32693
|
+
}
|
|
32694
|
+
else if (this.top > targetRow) {
|
|
32695
|
+
for (let row = this.top; row >= targetRow; row--) {
|
|
32696
|
+
if (row < 0) {
|
|
32697
|
+
break;
|
|
32698
|
+
}
|
|
32699
|
+
if (this.getters.isRowHidden(sheetId, row)) {
|
|
32700
|
+
continue;
|
|
32701
|
+
}
|
|
32702
|
+
this.offsetY = this.getters.getRowDimensions(sheetId, row).start - this.offsetCorrectionY;
|
|
32703
|
+
this.offsetScrollbarY = this.offsetY;
|
|
32704
|
+
this.adjustViewportZoneY();
|
|
32683
32705
|
}
|
|
32684
|
-
this.offsetY =
|
|
32685
|
-
this.getters.getRowDimensions(sheetId, topRow - 1).start - this.offsetCorrectionY;
|
|
32686
|
-
this.offsetScrollbarY = this.offsetY;
|
|
32687
|
-
this.adjustViewportZoneY();
|
|
32688
32706
|
}
|
|
32689
32707
|
}
|
|
32690
32708
|
setViewportOffset(offsetX, offsetY) {
|
|
@@ -45074,6 +45092,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
45074
45092
|
exports.tokenize = tokenize;
|
|
45075
45093
|
|
|
45076
45094
|
|
|
45077
|
-
__info__.version = '16.2.
|
|
45078
|
-
__info__.date = '2023-04-
|
|
45079
|
-
__info__.hash = '
|
|
45095
|
+
__info__.version = '16.2.3';
|
|
45096
|
+
__info__.date = '2023-04-14T12:47:50.453Z';
|
|
45097
|
+
__info__.hash = '4514375';
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -3844,8 +3844,8 @@ declare class InternalViewport {
|
|
|
3844
3844
|
* until it contains the cell completely.
|
|
3845
3845
|
*/
|
|
3846
3846
|
adjustPosition(position?: Position$1): void;
|
|
3847
|
-
adjustPositionX(
|
|
3848
|
-
adjustPositionY(
|
|
3847
|
+
adjustPositionX(targetCol: HeaderIndex): void;
|
|
3848
|
+
adjustPositionY(targetRow: HeaderIndex): void;
|
|
3849
3849
|
setViewportOffset(offsetX: Pixel, offsetY: Pixel): void;
|
|
3850
3850
|
adjustViewportZone(): void;
|
|
3851
3851
|
/**
|
|
@@ -32639,48 +32639,66 @@ class InternalViewport {
|
|
|
32639
32639
|
this.adjustPositionY(row);
|
|
32640
32640
|
}
|
|
32641
32641
|
}
|
|
32642
|
-
adjustPositionX(
|
|
32642
|
+
adjustPositionX(targetCol) {
|
|
32643
32643
|
const sheetId = this.sheetId;
|
|
32644
|
-
const {
|
|
32645
|
-
|
|
32646
|
-
|
|
32647
|
-
|
|
32648
|
-
|
|
32649
|
-
this.adjustViewportZoneX();
|
|
32650
|
-
}
|
|
32651
|
-
while (col < this.left) {
|
|
32652
|
-
let leftCol;
|
|
32653
|
-
for (leftCol = this.left; leftCol >= 0; leftCol--) {
|
|
32654
|
-
if (!this.getters.isColHidden(sheetId, leftCol)) {
|
|
32644
|
+
const { end } = this.getters.getColDimensions(sheetId, targetCol);
|
|
32645
|
+
const maxCol = this.getters.getNumberCols(sheetId);
|
|
32646
|
+
if (this.offsetX + this.offsetCorrectionX + this.viewportWidth < end) {
|
|
32647
|
+
for (let col = this.left; this.offsetX + this.offsetCorrectionX + this.viewportWidth < end; col++) {
|
|
32648
|
+
if (col > maxCol) {
|
|
32655
32649
|
break;
|
|
32656
32650
|
}
|
|
32651
|
+
if (this.getters.isColHidden(sheetId, col)) {
|
|
32652
|
+
continue;
|
|
32653
|
+
}
|
|
32654
|
+
this.offsetX = this.getters.getColDimensions(sheetId, col).end - this.offsetCorrectionX;
|
|
32655
|
+
this.offsetScrollbarX = this.offsetX;
|
|
32656
|
+
this.adjustViewportZoneX();
|
|
32657
|
+
}
|
|
32658
|
+
}
|
|
32659
|
+
else if (this.left > targetCol) {
|
|
32660
|
+
for (let col = this.left; col >= targetCol; col--) {
|
|
32661
|
+
if (col < 0) {
|
|
32662
|
+
break;
|
|
32663
|
+
}
|
|
32664
|
+
if (this.getters.isColHidden(sheetId, col)) {
|
|
32665
|
+
continue;
|
|
32666
|
+
}
|
|
32667
|
+
this.offsetX = this.getters.getColDimensions(sheetId, col).start - this.offsetCorrectionX;
|
|
32668
|
+
this.offsetScrollbarX = this.offsetX;
|
|
32669
|
+
this.adjustViewportZoneX();
|
|
32657
32670
|
}
|
|
32658
|
-
this.offsetX =
|
|
32659
|
-
this.getters.getColDimensions(sheetId, leftCol - 1).start - this.offsetCorrectionX;
|
|
32660
|
-
this.offsetScrollbarX = this.offsetX;
|
|
32661
|
-
this.adjustViewportZoneX();
|
|
32662
32671
|
}
|
|
32663
32672
|
}
|
|
32664
|
-
adjustPositionY(
|
|
32673
|
+
adjustPositionY(targetRow) {
|
|
32665
32674
|
const sheetId = this.sheetId;
|
|
32666
|
-
|
|
32667
|
-
|
|
32668
|
-
|
|
32669
|
-
|
|
32670
|
-
|
|
32671
|
-
this.adjustViewportZoneY();
|
|
32672
|
-
}
|
|
32673
|
-
while (row < this.top) {
|
|
32674
|
-
let topRow;
|
|
32675
|
-
for (topRow = this.top; topRow >= 0; topRow--) {
|
|
32676
|
-
if (!this.getters.isRowHidden(sheetId, topRow)) {
|
|
32675
|
+
const { end } = this.getters.getRowDimensions(sheetId, targetRow);
|
|
32676
|
+
const maxRow = this.getters.getNumberRows(sheetId);
|
|
32677
|
+
if (this.offsetY + this.viewportHeight + this.offsetCorrectionY < end) {
|
|
32678
|
+
for (let row = this.top; this.offsetY + this.viewportHeight + this.offsetCorrectionY < end; row++) {
|
|
32679
|
+
if (row > maxRow) {
|
|
32677
32680
|
break;
|
|
32678
32681
|
}
|
|
32682
|
+
if (this.getters.isRowHidden(sheetId, row)) {
|
|
32683
|
+
continue;
|
|
32684
|
+
}
|
|
32685
|
+
this.offsetY = this.getters.getRowDimensions(sheetId, row).end - this.offsetCorrectionY;
|
|
32686
|
+
this.offsetScrollbarY = this.offsetY;
|
|
32687
|
+
this.adjustViewportZoneY();
|
|
32688
|
+
}
|
|
32689
|
+
}
|
|
32690
|
+
else if (this.top > targetRow) {
|
|
32691
|
+
for (let row = this.top; row >= targetRow; row--) {
|
|
32692
|
+
if (row < 0) {
|
|
32693
|
+
break;
|
|
32694
|
+
}
|
|
32695
|
+
if (this.getters.isRowHidden(sheetId, row)) {
|
|
32696
|
+
continue;
|
|
32697
|
+
}
|
|
32698
|
+
this.offsetY = this.getters.getRowDimensions(sheetId, row).start - this.offsetCorrectionY;
|
|
32699
|
+
this.offsetScrollbarY = this.offsetY;
|
|
32700
|
+
this.adjustViewportZoneY();
|
|
32679
32701
|
}
|
|
32680
|
-
this.offsetY =
|
|
32681
|
-
this.getters.getRowDimensions(sheetId, topRow - 1).start - this.offsetCorrectionY;
|
|
32682
|
-
this.offsetScrollbarY = this.offsetY;
|
|
32683
|
-
this.adjustViewportZoneY();
|
|
32684
32702
|
}
|
|
32685
32703
|
}
|
|
32686
32704
|
setViewportOffset(offsetX, offsetY) {
|
|
@@ -45042,6 +45060,6 @@ function addFunction(functionName, functionDescription) {
|
|
|
45042
45060
|
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 };
|
|
45043
45061
|
|
|
45044
45062
|
|
|
45045
|
-
__info__.version = '16.2.
|
|
45046
|
-
__info__.date = '2023-04-
|
|
45047
|
-
__info__.hash = '
|
|
45063
|
+
__info__.version = '16.2.3';
|
|
45064
|
+
__info__.date = '2023-04-14T12:47:50.453Z';
|
|
45065
|
+
__info__.hash = '4514375';
|
|
@@ -32640,48 +32640,66 @@
|
|
|
32640
32640
|
this.adjustPositionY(row);
|
|
32641
32641
|
}
|
|
32642
32642
|
}
|
|
32643
|
-
adjustPositionX(
|
|
32643
|
+
adjustPositionX(targetCol) {
|
|
32644
32644
|
const sheetId = this.sheetId;
|
|
32645
|
-
const {
|
|
32646
|
-
|
|
32647
|
-
|
|
32648
|
-
|
|
32649
|
-
|
|
32650
|
-
this.adjustViewportZoneX();
|
|
32651
|
-
}
|
|
32652
|
-
while (col < this.left) {
|
|
32653
|
-
let leftCol;
|
|
32654
|
-
for (leftCol = this.left; leftCol >= 0; leftCol--) {
|
|
32655
|
-
if (!this.getters.isColHidden(sheetId, leftCol)) {
|
|
32645
|
+
const { end } = this.getters.getColDimensions(sheetId, targetCol);
|
|
32646
|
+
const maxCol = this.getters.getNumberCols(sheetId);
|
|
32647
|
+
if (this.offsetX + this.offsetCorrectionX + this.viewportWidth < end) {
|
|
32648
|
+
for (let col = this.left; this.offsetX + this.offsetCorrectionX + this.viewportWidth < end; col++) {
|
|
32649
|
+
if (col > maxCol) {
|
|
32656
32650
|
break;
|
|
32657
32651
|
}
|
|
32652
|
+
if (this.getters.isColHidden(sheetId, col)) {
|
|
32653
|
+
continue;
|
|
32654
|
+
}
|
|
32655
|
+
this.offsetX = this.getters.getColDimensions(sheetId, col).end - this.offsetCorrectionX;
|
|
32656
|
+
this.offsetScrollbarX = this.offsetX;
|
|
32657
|
+
this.adjustViewportZoneX();
|
|
32658
|
+
}
|
|
32659
|
+
}
|
|
32660
|
+
else if (this.left > targetCol) {
|
|
32661
|
+
for (let col = this.left; col >= targetCol; col--) {
|
|
32662
|
+
if (col < 0) {
|
|
32663
|
+
break;
|
|
32664
|
+
}
|
|
32665
|
+
if (this.getters.isColHidden(sheetId, col)) {
|
|
32666
|
+
continue;
|
|
32667
|
+
}
|
|
32668
|
+
this.offsetX = this.getters.getColDimensions(sheetId, col).start - this.offsetCorrectionX;
|
|
32669
|
+
this.offsetScrollbarX = this.offsetX;
|
|
32670
|
+
this.adjustViewportZoneX();
|
|
32658
32671
|
}
|
|
32659
|
-
this.offsetX =
|
|
32660
|
-
this.getters.getColDimensions(sheetId, leftCol - 1).start - this.offsetCorrectionX;
|
|
32661
|
-
this.offsetScrollbarX = this.offsetX;
|
|
32662
|
-
this.adjustViewportZoneX();
|
|
32663
32672
|
}
|
|
32664
32673
|
}
|
|
32665
|
-
adjustPositionY(
|
|
32674
|
+
adjustPositionY(targetRow) {
|
|
32666
32675
|
const sheetId = this.sheetId;
|
|
32667
|
-
|
|
32668
|
-
|
|
32669
|
-
|
|
32670
|
-
|
|
32671
|
-
|
|
32672
|
-
this.adjustViewportZoneY();
|
|
32673
|
-
}
|
|
32674
|
-
while (row < this.top) {
|
|
32675
|
-
let topRow;
|
|
32676
|
-
for (topRow = this.top; topRow >= 0; topRow--) {
|
|
32677
|
-
if (!this.getters.isRowHidden(sheetId, topRow)) {
|
|
32676
|
+
const { end } = this.getters.getRowDimensions(sheetId, targetRow);
|
|
32677
|
+
const maxRow = this.getters.getNumberRows(sheetId);
|
|
32678
|
+
if (this.offsetY + this.viewportHeight + this.offsetCorrectionY < end) {
|
|
32679
|
+
for (let row = this.top; this.offsetY + this.viewportHeight + this.offsetCorrectionY < end; row++) {
|
|
32680
|
+
if (row > maxRow) {
|
|
32678
32681
|
break;
|
|
32679
32682
|
}
|
|
32683
|
+
if (this.getters.isRowHidden(sheetId, row)) {
|
|
32684
|
+
continue;
|
|
32685
|
+
}
|
|
32686
|
+
this.offsetY = this.getters.getRowDimensions(sheetId, row).end - this.offsetCorrectionY;
|
|
32687
|
+
this.offsetScrollbarY = this.offsetY;
|
|
32688
|
+
this.adjustViewportZoneY();
|
|
32689
|
+
}
|
|
32690
|
+
}
|
|
32691
|
+
else if (this.top > targetRow) {
|
|
32692
|
+
for (let row = this.top; row >= targetRow; row--) {
|
|
32693
|
+
if (row < 0) {
|
|
32694
|
+
break;
|
|
32695
|
+
}
|
|
32696
|
+
if (this.getters.isRowHidden(sheetId, row)) {
|
|
32697
|
+
continue;
|
|
32698
|
+
}
|
|
32699
|
+
this.offsetY = this.getters.getRowDimensions(sheetId, row).start - this.offsetCorrectionY;
|
|
32700
|
+
this.offsetScrollbarY = this.offsetY;
|
|
32701
|
+
this.adjustViewportZoneY();
|
|
32680
32702
|
}
|
|
32681
|
-
this.offsetY =
|
|
32682
|
-
this.getters.getRowDimensions(sheetId, topRow - 1).start - this.offsetCorrectionY;
|
|
32683
|
-
this.offsetScrollbarY = this.offsetY;
|
|
32684
|
-
this.adjustViewportZoneY();
|
|
32685
32703
|
}
|
|
32686
32704
|
}
|
|
32687
32705
|
setViewportOffset(offsetX, offsetY) {
|
|
@@ -45073,9 +45091,9 @@
|
|
|
45073
45091
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
45074
45092
|
|
|
45075
45093
|
|
|
45076
|
-
__info__.version = '16.2.
|
|
45077
|
-
__info__.date = '2023-04-
|
|
45078
|
-
__info__.hash = '
|
|
45094
|
+
__info__.version = '16.2.3';
|
|
45095
|
+
__info__.date = '2023-04-14T12:47:50.453Z';
|
|
45096
|
+
__info__.hash = '4514375';
|
|
45079
45097
|
|
|
45080
45098
|
|
|
45081
45099
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|