@odoo/o-spreadsheet 16.0.72 → 16.0.74
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.
|
@@ -5327,6 +5327,10 @@ const REMOVE_ROWS_ACTION = (env) => {
|
|
|
5327
5327
|
});
|
|
5328
5328
|
};
|
|
5329
5329
|
const CAN_REMOVE_COLUMNS_ROWS = (dimension, env) => {
|
|
5330
|
+
if ((dimension === "COL" && env.model.getters.getActiveRows().size > 0) ||
|
|
5331
|
+
(dimension === "ROW" && env.model.getters.getActiveCols().size > 0)) {
|
|
5332
|
+
return false;
|
|
5333
|
+
}
|
|
5330
5334
|
const sheetId = env.model.getters.getActiveSheetId();
|
|
5331
5335
|
const selectedElements = env.model.getters.getElementsFromSelection(dimension);
|
|
5332
5336
|
const includesAllVisibleHeaders = env.model.getters.checkElementsIncludeAllVisibleHeaders(sheetId, dimension, selectedElements);
|
|
@@ -6675,11 +6679,11 @@ class OTRegistry extends Registry {
|
|
|
6675
6679
|
* transformation function given
|
|
6676
6680
|
*/
|
|
6677
6681
|
addTransformation(executed, toTransforms, fn) {
|
|
6678
|
-
|
|
6679
|
-
|
|
6680
|
-
|
|
6681
|
-
|
|
6682
|
-
this.content[
|
|
6682
|
+
if (!this.content[executed]) {
|
|
6683
|
+
this.content[executed] = new Map();
|
|
6684
|
+
}
|
|
6685
|
+
for (const toTransform of toTransforms) {
|
|
6686
|
+
this.content[executed].set(toTransform, fn);
|
|
6683
6687
|
}
|
|
6684
6688
|
return this;
|
|
6685
6689
|
}
|
|
@@ -6688,7 +6692,7 @@ class OTRegistry extends Registry {
|
|
|
6688
6692
|
* that the executed command happened.
|
|
6689
6693
|
*/
|
|
6690
6694
|
getTransformation(toTransform, executed) {
|
|
6691
|
-
return this.content[
|
|
6695
|
+
return this.content[executed] && this.content[executed].get(toTransform);
|
|
6692
6696
|
}
|
|
6693
6697
|
}
|
|
6694
6698
|
const otRegistry = new OTRegistry();
|
|
@@ -36388,10 +36392,20 @@ function transform(toTransform, executed) {
|
|
|
36388
36392
|
*/
|
|
36389
36393
|
function transformAll(toTransform, executed) {
|
|
36390
36394
|
let transformedCommands = [...toTransform];
|
|
36395
|
+
const possibleTransformations = new Set(otRegistry.getKeys());
|
|
36391
36396
|
for (const executedCommand of executed) {
|
|
36392
|
-
|
|
36393
|
-
|
|
36394
|
-
|
|
36397
|
+
// If the executed command is not in the registry, we skip it
|
|
36398
|
+
// because we know there won't be any transformation impacting the
|
|
36399
|
+
// commands to transform.
|
|
36400
|
+
if (possibleTransformations.has(executedCommand.type)) {
|
|
36401
|
+
transformedCommands = transformedCommands.reduce((acc, cmd) => {
|
|
36402
|
+
const transformed = transform(cmd, executedCommand);
|
|
36403
|
+
if (transformed) {
|
|
36404
|
+
acc.push(transformed);
|
|
36405
|
+
}
|
|
36406
|
+
return acc;
|
|
36407
|
+
}, []);
|
|
36408
|
+
}
|
|
36395
36409
|
}
|
|
36396
36410
|
return transformedCommands;
|
|
36397
36411
|
}
|
|
@@ -36851,7 +36865,6 @@ class Session extends EventBus {
|
|
|
36851
36865
|
if (this.waitingAck) {
|
|
36852
36866
|
return;
|
|
36853
36867
|
}
|
|
36854
|
-
this.waitingAck = true;
|
|
36855
36868
|
this.sendPendingMessage();
|
|
36856
36869
|
}
|
|
36857
36870
|
/**
|
|
@@ -36881,6 +36894,7 @@ class Session extends EventBus {
|
|
|
36881
36894
|
throw new Error(`Trying to send a new revision while replaying initial revision. This can lead to endless dispatches every time the spreadsheet is open.
|
|
36882
36895
|
${JSON.stringify(message)}`);
|
|
36883
36896
|
}
|
|
36897
|
+
this.waitingAck = true;
|
|
36884
36898
|
this.transportService.sendMessage({
|
|
36885
36899
|
...message,
|
|
36886
36900
|
serverRevisionId: this.serverRevisionId,
|
|
@@ -41473,26 +41487,28 @@ class SelectionStreamProcessor {
|
|
|
41473
41487
|
bottom: Math.min(this.getters.getNumberRows(sheetId) - 1, bottom),
|
|
41474
41488
|
};
|
|
41475
41489
|
};
|
|
41476
|
-
const {
|
|
41490
|
+
const { cell: refCell, zone: refZone } = this.getReferenceAnchor();
|
|
41491
|
+
const { col: refCol, row: refRow } = refCell;
|
|
41477
41492
|
// check if we can shrink selection
|
|
41478
41493
|
let n = 0;
|
|
41479
41494
|
while (result !== null) {
|
|
41480
41495
|
n++;
|
|
41481
41496
|
if (deltaCol < 0) {
|
|
41482
41497
|
const newRight = this.getNextAvailableCol(deltaCol, right - (n - 1), refRow);
|
|
41483
|
-
result =
|
|
41498
|
+
result = refZone.right <= right - n ? expand({ top, left, bottom, right: newRight }) : null;
|
|
41484
41499
|
}
|
|
41485
41500
|
if (deltaCol > 0) {
|
|
41486
41501
|
const newLeft = this.getNextAvailableCol(deltaCol, left + (n - 1), refRow);
|
|
41487
|
-
result = left + n <=
|
|
41502
|
+
result = left + n <= refZone.left ? expand({ top, left: newLeft, bottom, right }) : null;
|
|
41488
41503
|
}
|
|
41489
41504
|
if (deltaRow < 0) {
|
|
41490
41505
|
const newBottom = this.getNextAvailableRow(deltaRow, refCol, bottom - (n - 1));
|
|
41491
|
-
result =
|
|
41506
|
+
result =
|
|
41507
|
+
refZone.bottom <= bottom - n ? expand({ top, left, bottom: newBottom, right }) : null;
|
|
41492
41508
|
}
|
|
41493
41509
|
if (deltaRow > 0) {
|
|
41494
41510
|
const newTop = this.getNextAvailableRow(deltaRow, refCol, top + (n - 1));
|
|
41495
|
-
result = top + n <=
|
|
41511
|
+
result = top + n <= refZone.top ? expand({ top: newTop, left, bottom, right }) : null;
|
|
41496
41512
|
}
|
|
41497
41513
|
result = result ? organizeZone(result) : result;
|
|
41498
41514
|
if (result && !isEqual(result, anchor.zone)) {
|
|
@@ -41728,18 +41744,26 @@ class SelectionStreamProcessor {
|
|
|
41728
41744
|
* If the anchor is hidden, browses from left to right and top to bottom to
|
|
41729
41745
|
* find a visible cell.
|
|
41730
41746
|
*/
|
|
41731
|
-
|
|
41747
|
+
getReferenceAnchor() {
|
|
41732
41748
|
const sheetId = this.getters.getActiveSheetId();
|
|
41733
41749
|
const anchor = this.anchor;
|
|
41734
41750
|
const { left, right, top, bottom } = anchor.zone;
|
|
41735
41751
|
const { col: anchorCol, row: anchorRow } = anchor.cell;
|
|
41752
|
+
const col = this.getters.isColHidden(sheetId, anchorCol)
|
|
41753
|
+
? this.getters.findVisibleHeader(sheetId, "COL", left, right) || anchorCol
|
|
41754
|
+
: anchorCol;
|
|
41755
|
+
const row = this.getters.isRowHidden(sheetId, anchorRow)
|
|
41756
|
+
? this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) || anchorRow
|
|
41757
|
+
: anchorRow;
|
|
41758
|
+
const zone = this.getters.expandZone(sheetId, {
|
|
41759
|
+
left: col,
|
|
41760
|
+
right: col,
|
|
41761
|
+
top: row,
|
|
41762
|
+
bottom: row,
|
|
41763
|
+
});
|
|
41736
41764
|
return {
|
|
41737
|
-
|
|
41738
|
-
|
|
41739
|
-
: anchorCol,
|
|
41740
|
-
row: this.getters.isRowHidden(sheetId, anchorRow)
|
|
41741
|
-
? this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) || anchorRow
|
|
41742
|
-
: anchorRow,
|
|
41765
|
+
cell: { col, row },
|
|
41766
|
+
zone,
|
|
41743
41767
|
};
|
|
41744
41768
|
}
|
|
41745
41769
|
deltaToTarget(position, direction, step) {
|
|
@@ -43866,6 +43890,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
43866
43890
|
exports.tokenize = tokenize;
|
|
43867
43891
|
|
|
43868
43892
|
|
|
43869
|
-
__info__.version = '16.0.
|
|
43870
|
-
__info__.date = '2025-06-
|
|
43871
|
-
__info__.hash = '
|
|
43893
|
+
__info__.version = '16.0.74';
|
|
43894
|
+
__info__.date = '2025-06-27T09:02:46.788Z';
|
|
43895
|
+
__info__.hash = 'a1d6303';
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -522,7 +522,7 @@ declare class SelectionStreamProcessor implements SelectionProcessor, StatefulSt
|
|
|
522
522
|
* If the anchor is hidden, browses from left to right and top to bottom to
|
|
523
523
|
* find a visible cell.
|
|
524
524
|
*/
|
|
525
|
-
private
|
|
525
|
+
private getReferenceAnchor;
|
|
526
526
|
private deltaToTarget;
|
|
527
527
|
private getStartingPosition;
|
|
528
528
|
/**
|
|
@@ -5323,6 +5323,10 @@ const REMOVE_ROWS_ACTION = (env) => {
|
|
|
5323
5323
|
});
|
|
5324
5324
|
};
|
|
5325
5325
|
const CAN_REMOVE_COLUMNS_ROWS = (dimension, env) => {
|
|
5326
|
+
if ((dimension === "COL" && env.model.getters.getActiveRows().size > 0) ||
|
|
5327
|
+
(dimension === "ROW" && env.model.getters.getActiveCols().size > 0)) {
|
|
5328
|
+
return false;
|
|
5329
|
+
}
|
|
5326
5330
|
const sheetId = env.model.getters.getActiveSheetId();
|
|
5327
5331
|
const selectedElements = env.model.getters.getElementsFromSelection(dimension);
|
|
5328
5332
|
const includesAllVisibleHeaders = env.model.getters.checkElementsIncludeAllVisibleHeaders(sheetId, dimension, selectedElements);
|
|
@@ -6671,11 +6675,11 @@ class OTRegistry extends Registry {
|
|
|
6671
6675
|
* transformation function given
|
|
6672
6676
|
*/
|
|
6673
6677
|
addTransformation(executed, toTransforms, fn) {
|
|
6674
|
-
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
|
|
6678
|
-
this.content[
|
|
6678
|
+
if (!this.content[executed]) {
|
|
6679
|
+
this.content[executed] = new Map();
|
|
6680
|
+
}
|
|
6681
|
+
for (const toTransform of toTransforms) {
|
|
6682
|
+
this.content[executed].set(toTransform, fn);
|
|
6679
6683
|
}
|
|
6680
6684
|
return this;
|
|
6681
6685
|
}
|
|
@@ -6684,7 +6688,7 @@ class OTRegistry extends Registry {
|
|
|
6684
6688
|
* that the executed command happened.
|
|
6685
6689
|
*/
|
|
6686
6690
|
getTransformation(toTransform, executed) {
|
|
6687
|
-
return this.content[
|
|
6691
|
+
return this.content[executed] && this.content[executed].get(toTransform);
|
|
6688
6692
|
}
|
|
6689
6693
|
}
|
|
6690
6694
|
const otRegistry = new OTRegistry();
|
|
@@ -36384,10 +36388,20 @@ function transform(toTransform, executed) {
|
|
|
36384
36388
|
*/
|
|
36385
36389
|
function transformAll(toTransform, executed) {
|
|
36386
36390
|
let transformedCommands = [...toTransform];
|
|
36391
|
+
const possibleTransformations = new Set(otRegistry.getKeys());
|
|
36387
36392
|
for (const executedCommand of executed) {
|
|
36388
|
-
|
|
36389
|
-
|
|
36390
|
-
|
|
36393
|
+
// If the executed command is not in the registry, we skip it
|
|
36394
|
+
// because we know there won't be any transformation impacting the
|
|
36395
|
+
// commands to transform.
|
|
36396
|
+
if (possibleTransformations.has(executedCommand.type)) {
|
|
36397
|
+
transformedCommands = transformedCommands.reduce((acc, cmd) => {
|
|
36398
|
+
const transformed = transform(cmd, executedCommand);
|
|
36399
|
+
if (transformed) {
|
|
36400
|
+
acc.push(transformed);
|
|
36401
|
+
}
|
|
36402
|
+
return acc;
|
|
36403
|
+
}, []);
|
|
36404
|
+
}
|
|
36391
36405
|
}
|
|
36392
36406
|
return transformedCommands;
|
|
36393
36407
|
}
|
|
@@ -36847,7 +36861,6 @@ class Session extends EventBus {
|
|
|
36847
36861
|
if (this.waitingAck) {
|
|
36848
36862
|
return;
|
|
36849
36863
|
}
|
|
36850
|
-
this.waitingAck = true;
|
|
36851
36864
|
this.sendPendingMessage();
|
|
36852
36865
|
}
|
|
36853
36866
|
/**
|
|
@@ -36877,6 +36890,7 @@ class Session extends EventBus {
|
|
|
36877
36890
|
throw new Error(`Trying to send a new revision while replaying initial revision. This can lead to endless dispatches every time the spreadsheet is open.
|
|
36878
36891
|
${JSON.stringify(message)}`);
|
|
36879
36892
|
}
|
|
36893
|
+
this.waitingAck = true;
|
|
36880
36894
|
this.transportService.sendMessage({
|
|
36881
36895
|
...message,
|
|
36882
36896
|
serverRevisionId: this.serverRevisionId,
|
|
@@ -41469,26 +41483,28 @@ class SelectionStreamProcessor {
|
|
|
41469
41483
|
bottom: Math.min(this.getters.getNumberRows(sheetId) - 1, bottom),
|
|
41470
41484
|
};
|
|
41471
41485
|
};
|
|
41472
|
-
const {
|
|
41486
|
+
const { cell: refCell, zone: refZone } = this.getReferenceAnchor();
|
|
41487
|
+
const { col: refCol, row: refRow } = refCell;
|
|
41473
41488
|
// check if we can shrink selection
|
|
41474
41489
|
let n = 0;
|
|
41475
41490
|
while (result !== null) {
|
|
41476
41491
|
n++;
|
|
41477
41492
|
if (deltaCol < 0) {
|
|
41478
41493
|
const newRight = this.getNextAvailableCol(deltaCol, right - (n - 1), refRow);
|
|
41479
|
-
result =
|
|
41494
|
+
result = refZone.right <= right - n ? expand({ top, left, bottom, right: newRight }) : null;
|
|
41480
41495
|
}
|
|
41481
41496
|
if (deltaCol > 0) {
|
|
41482
41497
|
const newLeft = this.getNextAvailableCol(deltaCol, left + (n - 1), refRow);
|
|
41483
|
-
result = left + n <=
|
|
41498
|
+
result = left + n <= refZone.left ? expand({ top, left: newLeft, bottom, right }) : null;
|
|
41484
41499
|
}
|
|
41485
41500
|
if (deltaRow < 0) {
|
|
41486
41501
|
const newBottom = this.getNextAvailableRow(deltaRow, refCol, bottom - (n - 1));
|
|
41487
|
-
result =
|
|
41502
|
+
result =
|
|
41503
|
+
refZone.bottom <= bottom - n ? expand({ top, left, bottom: newBottom, right }) : null;
|
|
41488
41504
|
}
|
|
41489
41505
|
if (deltaRow > 0) {
|
|
41490
41506
|
const newTop = this.getNextAvailableRow(deltaRow, refCol, top + (n - 1));
|
|
41491
|
-
result = top + n <=
|
|
41507
|
+
result = top + n <= refZone.top ? expand({ top: newTop, left, bottom, right }) : null;
|
|
41492
41508
|
}
|
|
41493
41509
|
result = result ? organizeZone(result) : result;
|
|
41494
41510
|
if (result && !isEqual(result, anchor.zone)) {
|
|
@@ -41724,18 +41740,26 @@ class SelectionStreamProcessor {
|
|
|
41724
41740
|
* If the anchor is hidden, browses from left to right and top to bottom to
|
|
41725
41741
|
* find a visible cell.
|
|
41726
41742
|
*/
|
|
41727
|
-
|
|
41743
|
+
getReferenceAnchor() {
|
|
41728
41744
|
const sheetId = this.getters.getActiveSheetId();
|
|
41729
41745
|
const anchor = this.anchor;
|
|
41730
41746
|
const { left, right, top, bottom } = anchor.zone;
|
|
41731
41747
|
const { col: anchorCol, row: anchorRow } = anchor.cell;
|
|
41748
|
+
const col = this.getters.isColHidden(sheetId, anchorCol)
|
|
41749
|
+
? this.getters.findVisibleHeader(sheetId, "COL", left, right) || anchorCol
|
|
41750
|
+
: anchorCol;
|
|
41751
|
+
const row = this.getters.isRowHidden(sheetId, anchorRow)
|
|
41752
|
+
? this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) || anchorRow
|
|
41753
|
+
: anchorRow;
|
|
41754
|
+
const zone = this.getters.expandZone(sheetId, {
|
|
41755
|
+
left: col,
|
|
41756
|
+
right: col,
|
|
41757
|
+
top: row,
|
|
41758
|
+
bottom: row,
|
|
41759
|
+
});
|
|
41732
41760
|
return {
|
|
41733
|
-
|
|
41734
|
-
|
|
41735
|
-
: anchorCol,
|
|
41736
|
-
row: this.getters.isRowHidden(sheetId, anchorRow)
|
|
41737
|
-
? this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) || anchorRow
|
|
41738
|
-
: anchorRow,
|
|
41761
|
+
cell: { col, row },
|
|
41762
|
+
zone,
|
|
41739
41763
|
};
|
|
41740
41764
|
}
|
|
41741
41765
|
deltaToTarget(position, direction, step) {
|
|
@@ -43834,6 +43858,6 @@ function addFunction(functionName, functionDescription) {
|
|
|
43834
43858
|
export { AbstractChart, CommandResult, CorePlugin, DATETIME_FORMAT, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, cellTypes, compile, components, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, invalidateEvaluationCommands, load, parse, readonlyAllowedCommands, registries, setTranslationMethod, tokenize };
|
|
43835
43859
|
|
|
43836
43860
|
|
|
43837
|
-
__info__.version = '16.0.
|
|
43838
|
-
__info__.date = '2025-06-
|
|
43839
|
-
__info__.hash = '
|
|
43861
|
+
__info__.version = '16.0.74';
|
|
43862
|
+
__info__.date = '2025-06-27T09:02:46.788Z';
|
|
43863
|
+
__info__.hash = 'a1d6303';
|
|
@@ -5324,6 +5324,10 @@
|
|
|
5324
5324
|
});
|
|
5325
5325
|
};
|
|
5326
5326
|
const CAN_REMOVE_COLUMNS_ROWS = (dimension, env) => {
|
|
5327
|
+
if ((dimension === "COL" && env.model.getters.getActiveRows().size > 0) ||
|
|
5328
|
+
(dimension === "ROW" && env.model.getters.getActiveCols().size > 0)) {
|
|
5329
|
+
return false;
|
|
5330
|
+
}
|
|
5327
5331
|
const sheetId = env.model.getters.getActiveSheetId();
|
|
5328
5332
|
const selectedElements = env.model.getters.getElementsFromSelection(dimension);
|
|
5329
5333
|
const includesAllVisibleHeaders = env.model.getters.checkElementsIncludeAllVisibleHeaders(sheetId, dimension, selectedElements);
|
|
@@ -6672,11 +6676,11 @@
|
|
|
6672
6676
|
* transformation function given
|
|
6673
6677
|
*/
|
|
6674
6678
|
addTransformation(executed, toTransforms, fn) {
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
|
|
6678
|
-
|
|
6679
|
-
this.content[
|
|
6679
|
+
if (!this.content[executed]) {
|
|
6680
|
+
this.content[executed] = new Map();
|
|
6681
|
+
}
|
|
6682
|
+
for (const toTransform of toTransforms) {
|
|
6683
|
+
this.content[executed].set(toTransform, fn);
|
|
6680
6684
|
}
|
|
6681
6685
|
return this;
|
|
6682
6686
|
}
|
|
@@ -6685,7 +6689,7 @@
|
|
|
6685
6689
|
* that the executed command happened.
|
|
6686
6690
|
*/
|
|
6687
6691
|
getTransformation(toTransform, executed) {
|
|
6688
|
-
return this.content[
|
|
6692
|
+
return this.content[executed] && this.content[executed].get(toTransform);
|
|
6689
6693
|
}
|
|
6690
6694
|
}
|
|
6691
6695
|
const otRegistry = new OTRegistry();
|
|
@@ -36385,10 +36389,20 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
36385
36389
|
*/
|
|
36386
36390
|
function transformAll(toTransform, executed) {
|
|
36387
36391
|
let transformedCommands = [...toTransform];
|
|
36392
|
+
const possibleTransformations = new Set(otRegistry.getKeys());
|
|
36388
36393
|
for (const executedCommand of executed) {
|
|
36389
|
-
|
|
36390
|
-
|
|
36391
|
-
|
|
36394
|
+
// If the executed command is not in the registry, we skip it
|
|
36395
|
+
// because we know there won't be any transformation impacting the
|
|
36396
|
+
// commands to transform.
|
|
36397
|
+
if (possibleTransformations.has(executedCommand.type)) {
|
|
36398
|
+
transformedCommands = transformedCommands.reduce((acc, cmd) => {
|
|
36399
|
+
const transformed = transform(cmd, executedCommand);
|
|
36400
|
+
if (transformed) {
|
|
36401
|
+
acc.push(transformed);
|
|
36402
|
+
}
|
|
36403
|
+
return acc;
|
|
36404
|
+
}, []);
|
|
36405
|
+
}
|
|
36392
36406
|
}
|
|
36393
36407
|
return transformedCommands;
|
|
36394
36408
|
}
|
|
@@ -36848,7 +36862,6 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
36848
36862
|
if (this.waitingAck) {
|
|
36849
36863
|
return;
|
|
36850
36864
|
}
|
|
36851
|
-
this.waitingAck = true;
|
|
36852
36865
|
this.sendPendingMessage();
|
|
36853
36866
|
}
|
|
36854
36867
|
/**
|
|
@@ -36878,6 +36891,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
36878
36891
|
throw new Error(`Trying to send a new revision while replaying initial revision. This can lead to endless dispatches every time the spreadsheet is open.
|
|
36879
36892
|
${JSON.stringify(message)}`);
|
|
36880
36893
|
}
|
|
36894
|
+
this.waitingAck = true;
|
|
36881
36895
|
this.transportService.sendMessage({
|
|
36882
36896
|
...message,
|
|
36883
36897
|
serverRevisionId: this.serverRevisionId,
|
|
@@ -41470,26 +41484,28 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
41470
41484
|
bottom: Math.min(this.getters.getNumberRows(sheetId) - 1, bottom),
|
|
41471
41485
|
};
|
|
41472
41486
|
};
|
|
41473
|
-
const {
|
|
41487
|
+
const { cell: refCell, zone: refZone } = this.getReferenceAnchor();
|
|
41488
|
+
const { col: refCol, row: refRow } = refCell;
|
|
41474
41489
|
// check if we can shrink selection
|
|
41475
41490
|
let n = 0;
|
|
41476
41491
|
while (result !== null) {
|
|
41477
41492
|
n++;
|
|
41478
41493
|
if (deltaCol < 0) {
|
|
41479
41494
|
const newRight = this.getNextAvailableCol(deltaCol, right - (n - 1), refRow);
|
|
41480
|
-
result =
|
|
41495
|
+
result = refZone.right <= right - n ? expand({ top, left, bottom, right: newRight }) : null;
|
|
41481
41496
|
}
|
|
41482
41497
|
if (deltaCol > 0) {
|
|
41483
41498
|
const newLeft = this.getNextAvailableCol(deltaCol, left + (n - 1), refRow);
|
|
41484
|
-
result = left + n <=
|
|
41499
|
+
result = left + n <= refZone.left ? expand({ top, left: newLeft, bottom, right }) : null;
|
|
41485
41500
|
}
|
|
41486
41501
|
if (deltaRow < 0) {
|
|
41487
41502
|
const newBottom = this.getNextAvailableRow(deltaRow, refCol, bottom - (n - 1));
|
|
41488
|
-
result =
|
|
41503
|
+
result =
|
|
41504
|
+
refZone.bottom <= bottom - n ? expand({ top, left, bottom: newBottom, right }) : null;
|
|
41489
41505
|
}
|
|
41490
41506
|
if (deltaRow > 0) {
|
|
41491
41507
|
const newTop = this.getNextAvailableRow(deltaRow, refCol, top + (n - 1));
|
|
41492
|
-
result = top + n <=
|
|
41508
|
+
result = top + n <= refZone.top ? expand({ top: newTop, left, bottom, right }) : null;
|
|
41493
41509
|
}
|
|
41494
41510
|
result = result ? organizeZone(result) : result;
|
|
41495
41511
|
if (result && !isEqual(result, anchor.zone)) {
|
|
@@ -41725,18 +41741,26 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
41725
41741
|
* If the anchor is hidden, browses from left to right and top to bottom to
|
|
41726
41742
|
* find a visible cell.
|
|
41727
41743
|
*/
|
|
41728
|
-
|
|
41744
|
+
getReferenceAnchor() {
|
|
41729
41745
|
const sheetId = this.getters.getActiveSheetId();
|
|
41730
41746
|
const anchor = this.anchor;
|
|
41731
41747
|
const { left, right, top, bottom } = anchor.zone;
|
|
41732
41748
|
const { col: anchorCol, row: anchorRow } = anchor.cell;
|
|
41749
|
+
const col = this.getters.isColHidden(sheetId, anchorCol)
|
|
41750
|
+
? this.getters.findVisibleHeader(sheetId, "COL", left, right) || anchorCol
|
|
41751
|
+
: anchorCol;
|
|
41752
|
+
const row = this.getters.isRowHidden(sheetId, anchorRow)
|
|
41753
|
+
? this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) || anchorRow
|
|
41754
|
+
: anchorRow;
|
|
41755
|
+
const zone = this.getters.expandZone(sheetId, {
|
|
41756
|
+
left: col,
|
|
41757
|
+
right: col,
|
|
41758
|
+
top: row,
|
|
41759
|
+
bottom: row,
|
|
41760
|
+
});
|
|
41733
41761
|
return {
|
|
41734
|
-
|
|
41735
|
-
|
|
41736
|
-
: anchorCol,
|
|
41737
|
-
row: this.getters.isRowHidden(sheetId, anchorRow)
|
|
41738
|
-
? this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) || anchorRow
|
|
41739
|
-
: anchorRow,
|
|
41762
|
+
cell: { col, row },
|
|
41763
|
+
zone,
|
|
41740
41764
|
};
|
|
41741
41765
|
}
|
|
41742
41766
|
deltaToTarget(position, direction, step) {
|
|
@@ -43865,9 +43889,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
43865
43889
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
43866
43890
|
|
|
43867
43891
|
|
|
43868
|
-
__info__.version = '16.0.
|
|
43869
|
-
__info__.date = '2025-06-
|
|
43870
|
-
__info__.hash = '
|
|
43892
|
+
__info__.version = '16.0.74';
|
|
43893
|
+
__info__.date = '2025-06-27T09:02:46.788Z';
|
|
43894
|
+
__info__.hash = 'a1d6303';
|
|
43871
43895
|
|
|
43872
43896
|
|
|
43873
43897
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|