@odoo/o-spreadsheet 18.1.27 → 18.1.28
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 +32 -19
- package/dist/o-spreadsheet.esm.js +32 -19
- package/dist/o-spreadsheet.iife.js +32 -19
- package/dist/o-spreadsheet.iife.min.js +4 -4
- package/dist/o_spreadsheet.xml +3 -3
- package/package.json +1 -1
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 18.1.
|
|
6
|
-
* @date 2025-06-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.1.28
|
|
6
|
+
* @date 2025-06-27T09:12:45.644Z
|
|
7
|
+
* @hash 25dd087
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -21027,7 +21027,7 @@ class AbstractComposerStore extends SpreadsheetStore {
|
|
|
21027
21027
|
}
|
|
21028
21028
|
captureSelection(zone, col, row) {
|
|
21029
21029
|
this.model.selection.capture(this, {
|
|
21030
|
-
cell: { col: col
|
|
21030
|
+
cell: { col: col ?? zone.left, row: row ?? zone.right },
|
|
21031
21031
|
zone,
|
|
21032
21032
|
}, {
|
|
21033
21033
|
handleEvent: this.handleEvent.bind(this),
|
|
@@ -42799,6 +42799,9 @@ class ConditionalFormattingPanel extends owl.Component {
|
|
|
42799
42799
|
this.switchToList();
|
|
42800
42800
|
}
|
|
42801
42801
|
}
|
|
42802
|
+
else if (!this.editedCF) {
|
|
42803
|
+
this.switchToList();
|
|
42804
|
+
}
|
|
42802
42805
|
});
|
|
42803
42806
|
}
|
|
42804
42807
|
get conditionalFormats() {
|
|
@@ -73247,26 +73250,28 @@ class SelectionStreamProcessorImpl {
|
|
|
73247
73250
|
bottom: Math.min(this.getters.getNumberRows(sheetId) - 1, bottom),
|
|
73248
73251
|
};
|
|
73249
73252
|
};
|
|
73250
|
-
const {
|
|
73253
|
+
const { cell: refCell, zone: refZone } = this.getReferenceAnchor();
|
|
73254
|
+
const { col: refCol, row: refRow } = refCell;
|
|
73251
73255
|
// check if we can shrink selection
|
|
73252
73256
|
let n = 0;
|
|
73253
73257
|
while (result !== null) {
|
|
73254
73258
|
n++;
|
|
73255
73259
|
if (deltaCol < 0) {
|
|
73256
73260
|
const newRight = this.getNextAvailableCol(deltaCol, right - (n - 1), refRow);
|
|
73257
|
-
result =
|
|
73261
|
+
result = refZone.right <= right - n ? expand({ top, left, bottom, right: newRight }) : null;
|
|
73258
73262
|
}
|
|
73259
73263
|
if (deltaCol > 0) {
|
|
73260
73264
|
const newLeft = this.getNextAvailableCol(deltaCol, left + (n - 1), refRow);
|
|
73261
|
-
result = left + n <=
|
|
73265
|
+
result = left + n <= refZone.left ? expand({ top, left: newLeft, bottom, right }) : null;
|
|
73262
73266
|
}
|
|
73263
73267
|
if (deltaRow < 0) {
|
|
73264
73268
|
const newBottom = this.getNextAvailableRow(deltaRow, refCol, bottom - (n - 1));
|
|
73265
|
-
result =
|
|
73269
|
+
result =
|
|
73270
|
+
refZone.bottom <= bottom - n ? expand({ top, left, bottom: newBottom, right }) : null;
|
|
73266
73271
|
}
|
|
73267
73272
|
if (deltaRow > 0) {
|
|
73268
73273
|
const newTop = this.getNextAvailableRow(deltaRow, refCol, top + (n - 1));
|
|
73269
|
-
result = top + n <=
|
|
73274
|
+
result = top + n <= refZone.top ? expand({ top: newTop, left, bottom, right }) : null;
|
|
73270
73275
|
}
|
|
73271
73276
|
result = result ? reorderZone(result) : result;
|
|
73272
73277
|
if (result && !isEqual(result, anchor.zone)) {
|
|
@@ -73496,18 +73501,26 @@ class SelectionStreamProcessorImpl {
|
|
|
73496
73501
|
* If the anchor is hidden, browses from left to right and top to bottom to
|
|
73497
73502
|
* find a visible cell.
|
|
73498
73503
|
*/
|
|
73499
|
-
|
|
73504
|
+
getReferenceAnchor() {
|
|
73500
73505
|
const sheetId = this.getters.getActiveSheetId();
|
|
73501
73506
|
const anchor = this.anchor;
|
|
73502
73507
|
const { left, right, top, bottom } = anchor.zone;
|
|
73503
73508
|
const { col: anchorCol, row: anchorRow } = anchor.cell;
|
|
73509
|
+
const col = this.getters.isColHidden(sheetId, anchorCol)
|
|
73510
|
+
? this.getters.findVisibleHeader(sheetId, "COL", left, right) || anchorCol
|
|
73511
|
+
: anchorCol;
|
|
73512
|
+
const row = this.getters.isRowHidden(sheetId, anchorRow)
|
|
73513
|
+
? this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) || anchorRow
|
|
73514
|
+
: anchorRow;
|
|
73515
|
+
const zone = this.getters.expandZone(sheetId, {
|
|
73516
|
+
left: col,
|
|
73517
|
+
right: col,
|
|
73518
|
+
top: row,
|
|
73519
|
+
bottom: row,
|
|
73520
|
+
});
|
|
73504
73521
|
return {
|
|
73505
|
-
|
|
73506
|
-
|
|
73507
|
-
: anchorCol,
|
|
73508
|
-
row: this.getters.isRowHidden(sheetId, anchorRow)
|
|
73509
|
-
? this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) || anchorRow
|
|
73510
|
-
: anchorRow,
|
|
73522
|
+
cell: { col, row },
|
|
73523
|
+
zone,
|
|
73511
73524
|
};
|
|
73512
73525
|
}
|
|
73513
73526
|
deltaToTarget(position, direction, step) {
|
|
@@ -76617,6 +76630,6 @@ exports.tokenColors = tokenColors;
|
|
|
76617
76630
|
exports.tokenize = tokenize;
|
|
76618
76631
|
|
|
76619
76632
|
|
|
76620
|
-
__info__.version = "18.1.
|
|
76621
|
-
__info__.date = "2025-06-
|
|
76622
|
-
__info__.hash = "
|
|
76633
|
+
__info__.version = "18.1.28";
|
|
76634
|
+
__info__.date = "2025-06-27T09:12:45.644Z";
|
|
76635
|
+
__info__.hash = "25dd087";
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 18.1.
|
|
6
|
-
* @date 2025-06-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.1.28
|
|
6
|
+
* @date 2025-06-27T09:12:45.644Z
|
|
7
|
+
* @hash 25dd087
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, useState, onPatched, onWillPatch, onWillUpdateProps, useExternalListener, onWillStart, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
|
|
@@ -21025,7 +21025,7 @@ class AbstractComposerStore extends SpreadsheetStore {
|
|
|
21025
21025
|
}
|
|
21026
21026
|
captureSelection(zone, col, row) {
|
|
21027
21027
|
this.model.selection.capture(this, {
|
|
21028
|
-
cell: { col: col
|
|
21028
|
+
cell: { col: col ?? zone.left, row: row ?? zone.right },
|
|
21029
21029
|
zone,
|
|
21030
21030
|
}, {
|
|
21031
21031
|
handleEvent: this.handleEvent.bind(this),
|
|
@@ -42797,6 +42797,9 @@ class ConditionalFormattingPanel extends Component {
|
|
|
42797
42797
|
this.switchToList();
|
|
42798
42798
|
}
|
|
42799
42799
|
}
|
|
42800
|
+
else if (!this.editedCF) {
|
|
42801
|
+
this.switchToList();
|
|
42802
|
+
}
|
|
42800
42803
|
});
|
|
42801
42804
|
}
|
|
42802
42805
|
get conditionalFormats() {
|
|
@@ -73245,26 +73248,28 @@ class SelectionStreamProcessorImpl {
|
|
|
73245
73248
|
bottom: Math.min(this.getters.getNumberRows(sheetId) - 1, bottom),
|
|
73246
73249
|
};
|
|
73247
73250
|
};
|
|
73248
|
-
const {
|
|
73251
|
+
const { cell: refCell, zone: refZone } = this.getReferenceAnchor();
|
|
73252
|
+
const { col: refCol, row: refRow } = refCell;
|
|
73249
73253
|
// check if we can shrink selection
|
|
73250
73254
|
let n = 0;
|
|
73251
73255
|
while (result !== null) {
|
|
73252
73256
|
n++;
|
|
73253
73257
|
if (deltaCol < 0) {
|
|
73254
73258
|
const newRight = this.getNextAvailableCol(deltaCol, right - (n - 1), refRow);
|
|
73255
|
-
result =
|
|
73259
|
+
result = refZone.right <= right - n ? expand({ top, left, bottom, right: newRight }) : null;
|
|
73256
73260
|
}
|
|
73257
73261
|
if (deltaCol > 0) {
|
|
73258
73262
|
const newLeft = this.getNextAvailableCol(deltaCol, left + (n - 1), refRow);
|
|
73259
|
-
result = left + n <=
|
|
73263
|
+
result = left + n <= refZone.left ? expand({ top, left: newLeft, bottom, right }) : null;
|
|
73260
73264
|
}
|
|
73261
73265
|
if (deltaRow < 0) {
|
|
73262
73266
|
const newBottom = this.getNextAvailableRow(deltaRow, refCol, bottom - (n - 1));
|
|
73263
|
-
result =
|
|
73267
|
+
result =
|
|
73268
|
+
refZone.bottom <= bottom - n ? expand({ top, left, bottom: newBottom, right }) : null;
|
|
73264
73269
|
}
|
|
73265
73270
|
if (deltaRow > 0) {
|
|
73266
73271
|
const newTop = this.getNextAvailableRow(deltaRow, refCol, top + (n - 1));
|
|
73267
|
-
result = top + n <=
|
|
73272
|
+
result = top + n <= refZone.top ? expand({ top: newTop, left, bottom, right }) : null;
|
|
73268
73273
|
}
|
|
73269
73274
|
result = result ? reorderZone(result) : result;
|
|
73270
73275
|
if (result && !isEqual(result, anchor.zone)) {
|
|
@@ -73494,18 +73499,26 @@ class SelectionStreamProcessorImpl {
|
|
|
73494
73499
|
* If the anchor is hidden, browses from left to right and top to bottom to
|
|
73495
73500
|
* find a visible cell.
|
|
73496
73501
|
*/
|
|
73497
|
-
|
|
73502
|
+
getReferenceAnchor() {
|
|
73498
73503
|
const sheetId = this.getters.getActiveSheetId();
|
|
73499
73504
|
const anchor = this.anchor;
|
|
73500
73505
|
const { left, right, top, bottom } = anchor.zone;
|
|
73501
73506
|
const { col: anchorCol, row: anchorRow } = anchor.cell;
|
|
73507
|
+
const col = this.getters.isColHidden(sheetId, anchorCol)
|
|
73508
|
+
? this.getters.findVisibleHeader(sheetId, "COL", left, right) || anchorCol
|
|
73509
|
+
: anchorCol;
|
|
73510
|
+
const row = this.getters.isRowHidden(sheetId, anchorRow)
|
|
73511
|
+
? this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) || anchorRow
|
|
73512
|
+
: anchorRow;
|
|
73513
|
+
const zone = this.getters.expandZone(sheetId, {
|
|
73514
|
+
left: col,
|
|
73515
|
+
right: col,
|
|
73516
|
+
top: row,
|
|
73517
|
+
bottom: row,
|
|
73518
|
+
});
|
|
73502
73519
|
return {
|
|
73503
|
-
|
|
73504
|
-
|
|
73505
|
-
: anchorCol,
|
|
73506
|
-
row: this.getters.isRowHidden(sheetId, anchorRow)
|
|
73507
|
-
? this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) || anchorRow
|
|
73508
|
-
: anchorRow,
|
|
73520
|
+
cell: { col, row },
|
|
73521
|
+
zone,
|
|
73509
73522
|
};
|
|
73510
73523
|
}
|
|
73511
73524
|
deltaToTarget(position, direction, step) {
|
|
@@ -76571,6 +76584,6 @@ const chartHelpers = { ...CHART_HELPERS, ...CHART_RUNTIME_HELPERS };
|
|
|
76571
76584
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, chartHelpers, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
76572
76585
|
|
|
76573
76586
|
|
|
76574
|
-
__info__.version = "18.1.
|
|
76575
|
-
__info__.date = "2025-06-
|
|
76576
|
-
__info__.hash = "
|
|
76587
|
+
__info__.version = "18.1.28";
|
|
76588
|
+
__info__.date = "2025-06-27T09:12:45.644Z";
|
|
76589
|
+
__info__.hash = "25dd087";
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 18.1.
|
|
6
|
-
* @date 2025-06-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.1.28
|
|
6
|
+
* @date 2025-06-27T09:12:45.644Z
|
|
7
|
+
* @hash 25dd087
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -21026,7 +21026,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
21026
21026
|
}
|
|
21027
21027
|
captureSelection(zone, col, row) {
|
|
21028
21028
|
this.model.selection.capture(this, {
|
|
21029
|
-
cell: { col: col
|
|
21029
|
+
cell: { col: col ?? zone.left, row: row ?? zone.right },
|
|
21030
21030
|
zone,
|
|
21031
21031
|
}, {
|
|
21032
21032
|
handleEvent: this.handleEvent.bind(this),
|
|
@@ -42798,6 +42798,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
42798
42798
|
this.switchToList();
|
|
42799
42799
|
}
|
|
42800
42800
|
}
|
|
42801
|
+
else if (!this.editedCF) {
|
|
42802
|
+
this.switchToList();
|
|
42803
|
+
}
|
|
42801
42804
|
});
|
|
42802
42805
|
}
|
|
42803
42806
|
get conditionalFormats() {
|
|
@@ -73246,26 +73249,28 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
73246
73249
|
bottom: Math.min(this.getters.getNumberRows(sheetId) - 1, bottom),
|
|
73247
73250
|
};
|
|
73248
73251
|
};
|
|
73249
|
-
const {
|
|
73252
|
+
const { cell: refCell, zone: refZone } = this.getReferenceAnchor();
|
|
73253
|
+
const { col: refCol, row: refRow } = refCell;
|
|
73250
73254
|
// check if we can shrink selection
|
|
73251
73255
|
let n = 0;
|
|
73252
73256
|
while (result !== null) {
|
|
73253
73257
|
n++;
|
|
73254
73258
|
if (deltaCol < 0) {
|
|
73255
73259
|
const newRight = this.getNextAvailableCol(deltaCol, right - (n - 1), refRow);
|
|
73256
|
-
result =
|
|
73260
|
+
result = refZone.right <= right - n ? expand({ top, left, bottom, right: newRight }) : null;
|
|
73257
73261
|
}
|
|
73258
73262
|
if (deltaCol > 0) {
|
|
73259
73263
|
const newLeft = this.getNextAvailableCol(deltaCol, left + (n - 1), refRow);
|
|
73260
|
-
result = left + n <=
|
|
73264
|
+
result = left + n <= refZone.left ? expand({ top, left: newLeft, bottom, right }) : null;
|
|
73261
73265
|
}
|
|
73262
73266
|
if (deltaRow < 0) {
|
|
73263
73267
|
const newBottom = this.getNextAvailableRow(deltaRow, refCol, bottom - (n - 1));
|
|
73264
|
-
result =
|
|
73268
|
+
result =
|
|
73269
|
+
refZone.bottom <= bottom - n ? expand({ top, left, bottom: newBottom, right }) : null;
|
|
73265
73270
|
}
|
|
73266
73271
|
if (deltaRow > 0) {
|
|
73267
73272
|
const newTop = this.getNextAvailableRow(deltaRow, refCol, top + (n - 1));
|
|
73268
|
-
result = top + n <=
|
|
73273
|
+
result = top + n <= refZone.top ? expand({ top: newTop, left, bottom, right }) : null;
|
|
73269
73274
|
}
|
|
73270
73275
|
result = result ? reorderZone(result) : result;
|
|
73271
73276
|
if (result && !isEqual(result, anchor.zone)) {
|
|
@@ -73495,18 +73500,26 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
73495
73500
|
* If the anchor is hidden, browses from left to right and top to bottom to
|
|
73496
73501
|
* find a visible cell.
|
|
73497
73502
|
*/
|
|
73498
|
-
|
|
73503
|
+
getReferenceAnchor() {
|
|
73499
73504
|
const sheetId = this.getters.getActiveSheetId();
|
|
73500
73505
|
const anchor = this.anchor;
|
|
73501
73506
|
const { left, right, top, bottom } = anchor.zone;
|
|
73502
73507
|
const { col: anchorCol, row: anchorRow } = anchor.cell;
|
|
73508
|
+
const col = this.getters.isColHidden(sheetId, anchorCol)
|
|
73509
|
+
? this.getters.findVisibleHeader(sheetId, "COL", left, right) || anchorCol
|
|
73510
|
+
: anchorCol;
|
|
73511
|
+
const row = this.getters.isRowHidden(sheetId, anchorRow)
|
|
73512
|
+
? this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) || anchorRow
|
|
73513
|
+
: anchorRow;
|
|
73514
|
+
const zone = this.getters.expandZone(sheetId, {
|
|
73515
|
+
left: col,
|
|
73516
|
+
right: col,
|
|
73517
|
+
top: row,
|
|
73518
|
+
bottom: row,
|
|
73519
|
+
});
|
|
73503
73520
|
return {
|
|
73504
|
-
|
|
73505
|
-
|
|
73506
|
-
: anchorCol,
|
|
73507
|
-
row: this.getters.isRowHidden(sheetId, anchorRow)
|
|
73508
|
-
? this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) || anchorRow
|
|
73509
|
-
: anchorRow,
|
|
73521
|
+
cell: { col, row },
|
|
73522
|
+
zone,
|
|
73510
73523
|
};
|
|
73511
73524
|
}
|
|
73512
73525
|
deltaToTarget(position, direction, step) {
|
|
@@ -76616,9 +76629,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
76616
76629
|
exports.tokenize = tokenize;
|
|
76617
76630
|
|
|
76618
76631
|
|
|
76619
|
-
__info__.version = "18.1.
|
|
76620
|
-
__info__.date = "2025-06-
|
|
76621
|
-
__info__.hash = "
|
|
76632
|
+
__info__.version = "18.1.28";
|
|
76633
|
+
__info__.date = "2025-06-27T09:12:45.644Z";
|
|
76634
|
+
__info__.hash = "25dd087";
|
|
76622
76635
|
|
|
76623
76636
|
|
|
76624
76637
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|