@odoo/o-spreadsheet 17.0.69 → 17.0.70
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.
|
@@ -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 17.0.
|
|
6
|
-
* @date 2025-07-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.70
|
|
6
|
+
* @date 2025-07-28T13:26:37.626Z
|
|
7
|
+
* @hash 2ec8d82
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -43471,6 +43471,23 @@ class HeaderSizeUIPlugin extends UIPlugin {
|
|
|
43471
43471
|
static getters = ["getRowSize", "getHeaderSize"];
|
|
43472
43472
|
tallestCellInRow = {};
|
|
43473
43473
|
ctx = document.createElement("canvas").getContext("2d");
|
|
43474
|
+
beforeHandle(cmd) {
|
|
43475
|
+
switch (cmd.type) {
|
|
43476
|
+
// Ensure rows are updated before "UPDATE_CELL" is dispatched from cell plugin.
|
|
43477
|
+
// "UPDATE_CELL" uses the Sheet core plugin to access row data.
|
|
43478
|
+
// If "ADD_COLUMNS_ROWS" has not been processed yet by header_sizes_ui,
|
|
43479
|
+
// size updates may apply to incorrect (pre-insert) rows.
|
|
43480
|
+
case "ADD_COLUMNS_ROWS":
|
|
43481
|
+
if (cmd.dimension === "COL") {
|
|
43482
|
+
return;
|
|
43483
|
+
}
|
|
43484
|
+
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
43485
|
+
const newCells = Array(cmd.quantity).fill(undefined);
|
|
43486
|
+
const newTallestCells = insertItemsAtIndex(this.tallestCellInRow[cmd.sheetId], newCells, addIndex);
|
|
43487
|
+
this.history.update("tallestCellInRow", cmd.sheetId, newTallestCells);
|
|
43488
|
+
break;
|
|
43489
|
+
}
|
|
43490
|
+
}
|
|
43474
43491
|
handle(cmd) {
|
|
43475
43492
|
switch (cmd.type) {
|
|
43476
43493
|
case "START":
|
|
@@ -43500,16 +43517,6 @@ class HeaderSizeUIPlugin extends UIPlugin {
|
|
|
43500
43517
|
this.history.update("tallestCellInRow", cmd.sheetId, tallestCells);
|
|
43501
43518
|
break;
|
|
43502
43519
|
}
|
|
43503
|
-
case "ADD_COLUMNS_ROWS": {
|
|
43504
|
-
if (cmd.dimension === "COL") {
|
|
43505
|
-
return;
|
|
43506
|
-
}
|
|
43507
|
-
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
43508
|
-
const newCells = Array(cmd.quantity).fill(undefined);
|
|
43509
|
-
const newTallestCells = insertItemsAtIndex(this.tallestCellInRow[cmd.sheetId], newCells, addIndex);
|
|
43510
|
-
this.history.update("tallestCellInRow", cmd.sheetId, newTallestCells);
|
|
43511
|
-
break;
|
|
43512
|
-
}
|
|
43513
43520
|
case "RESIZE_COLUMNS_ROWS":
|
|
43514
43521
|
{
|
|
43515
43522
|
const sheetId = cmd.sheetId;
|
|
@@ -50874,6 +50881,14 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
50874
50881
|
const isBasedBefore = cmd.base < start;
|
|
50875
50882
|
const deltaCol = isBasedBefore && isCol ? thickness : 0;
|
|
50876
50883
|
const deltaRow = isBasedBefore && !isCol ? thickness : 0;
|
|
50884
|
+
const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
|
|
50885
|
+
const originalSize = Object.fromEntries(toRemove.map((element) => {
|
|
50886
|
+
const size = isCol
|
|
50887
|
+
? this.getters.getColSize(cmd.sheetId, element)
|
|
50888
|
+
: this.getters.getUserRowSize(cmd.sheetId, element);
|
|
50889
|
+
const isDefaultCol = isCol && size === DEFAULT_CELL_WIDTH;
|
|
50890
|
+
return [element, isDefaultCol || size === undefined ? null : size];
|
|
50891
|
+
}));
|
|
50877
50892
|
const target = [
|
|
50878
50893
|
{
|
|
50879
50894
|
left: isCol ? start + deltaCol : 0,
|
|
@@ -50893,14 +50908,12 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
50893
50908
|
},
|
|
50894
50909
|
];
|
|
50895
50910
|
state.paste(pasteTarget, { selectTarget: true });
|
|
50896
|
-
const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
|
|
50897
50911
|
let currentIndex = isBasedBefore ? cmd.base : cmd.base + 1;
|
|
50898
50912
|
for (const element of toRemove) {
|
|
50899
|
-
const size = this.getters.getHeaderSize(cmd.sheetId, cmd.dimension, element);
|
|
50900
50913
|
this.dispatch("RESIZE_COLUMNS_ROWS", {
|
|
50901
50914
|
dimension: cmd.dimension,
|
|
50902
50915
|
sheetId: cmd.sheetId,
|
|
50903
|
-
size,
|
|
50916
|
+
size: originalSize[element],
|
|
50904
50917
|
elements: [currentIndex],
|
|
50905
50918
|
});
|
|
50906
50919
|
currentIndex += 1;
|
|
@@ -58436,6 +58449,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
58436
58449
|
exports.tokenize = tokenize;
|
|
58437
58450
|
|
|
58438
58451
|
|
|
58439
|
-
__info__.version = "17.0.
|
|
58440
|
-
__info__.date = "2025-07-
|
|
58441
|
-
__info__.hash = "
|
|
58452
|
+
__info__.version = "17.0.70";
|
|
58453
|
+
__info__.date = "2025-07-28T13:26:37.626Z";
|
|
58454
|
+
__info__.hash = "2ec8d82";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -4337,6 +4337,7 @@ declare class HeaderSizeUIPlugin extends UIPlugin<HeaderSizeState> implements He
|
|
|
4337
4337
|
static getters: readonly ["getRowSize", "getHeaderSize"];
|
|
4338
4338
|
readonly tallestCellInRow: Immutable<Record<UID, Array<CellWithSize | undefined>>>;
|
|
4339
4339
|
private ctx;
|
|
4340
|
+
beforeHandle(cmd: Command): void;
|
|
4340
4341
|
handle(cmd: Command): void;
|
|
4341
4342
|
getRowSize(sheetId: UID, row: HeaderIndex): Pixel;
|
|
4342
4343
|
getHeaderSize(sheetId: UID, dimension: Dimension, index: HeaderIndex): Pixel;
|
|
@@ -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 17.0.
|
|
6
|
-
* @date 2025-07-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.70
|
|
6
|
+
* @date 2025-07-28T13:26:37.626Z
|
|
7
|
+
* @hash 2ec8d82
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { Component, useRef, onMounted, useEffect, onWillPatch, useState, onWillUpdateProps, onPatched, useComponent, useExternalListener, onWillUnmount, onWillStart, xml, useChildSubEnv, useSubEnv, markRaw } from '@odoo/owl';
|
|
@@ -43469,6 +43469,23 @@ class HeaderSizeUIPlugin extends UIPlugin {
|
|
|
43469
43469
|
static getters = ["getRowSize", "getHeaderSize"];
|
|
43470
43470
|
tallestCellInRow = {};
|
|
43471
43471
|
ctx = document.createElement("canvas").getContext("2d");
|
|
43472
|
+
beforeHandle(cmd) {
|
|
43473
|
+
switch (cmd.type) {
|
|
43474
|
+
// Ensure rows are updated before "UPDATE_CELL" is dispatched from cell plugin.
|
|
43475
|
+
// "UPDATE_CELL" uses the Sheet core plugin to access row data.
|
|
43476
|
+
// If "ADD_COLUMNS_ROWS" has not been processed yet by header_sizes_ui,
|
|
43477
|
+
// size updates may apply to incorrect (pre-insert) rows.
|
|
43478
|
+
case "ADD_COLUMNS_ROWS":
|
|
43479
|
+
if (cmd.dimension === "COL") {
|
|
43480
|
+
return;
|
|
43481
|
+
}
|
|
43482
|
+
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
43483
|
+
const newCells = Array(cmd.quantity).fill(undefined);
|
|
43484
|
+
const newTallestCells = insertItemsAtIndex(this.tallestCellInRow[cmd.sheetId], newCells, addIndex);
|
|
43485
|
+
this.history.update("tallestCellInRow", cmd.sheetId, newTallestCells);
|
|
43486
|
+
break;
|
|
43487
|
+
}
|
|
43488
|
+
}
|
|
43472
43489
|
handle(cmd) {
|
|
43473
43490
|
switch (cmd.type) {
|
|
43474
43491
|
case "START":
|
|
@@ -43498,16 +43515,6 @@ class HeaderSizeUIPlugin extends UIPlugin {
|
|
|
43498
43515
|
this.history.update("tallestCellInRow", cmd.sheetId, tallestCells);
|
|
43499
43516
|
break;
|
|
43500
43517
|
}
|
|
43501
|
-
case "ADD_COLUMNS_ROWS": {
|
|
43502
|
-
if (cmd.dimension === "COL") {
|
|
43503
|
-
return;
|
|
43504
|
-
}
|
|
43505
|
-
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
43506
|
-
const newCells = Array(cmd.quantity).fill(undefined);
|
|
43507
|
-
const newTallestCells = insertItemsAtIndex(this.tallestCellInRow[cmd.sheetId], newCells, addIndex);
|
|
43508
|
-
this.history.update("tallestCellInRow", cmd.sheetId, newTallestCells);
|
|
43509
|
-
break;
|
|
43510
|
-
}
|
|
43511
43518
|
case "RESIZE_COLUMNS_ROWS":
|
|
43512
43519
|
{
|
|
43513
43520
|
const sheetId = cmd.sheetId;
|
|
@@ -50872,6 +50879,14 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
50872
50879
|
const isBasedBefore = cmd.base < start;
|
|
50873
50880
|
const deltaCol = isBasedBefore && isCol ? thickness : 0;
|
|
50874
50881
|
const deltaRow = isBasedBefore && !isCol ? thickness : 0;
|
|
50882
|
+
const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
|
|
50883
|
+
const originalSize = Object.fromEntries(toRemove.map((element) => {
|
|
50884
|
+
const size = isCol
|
|
50885
|
+
? this.getters.getColSize(cmd.sheetId, element)
|
|
50886
|
+
: this.getters.getUserRowSize(cmd.sheetId, element);
|
|
50887
|
+
const isDefaultCol = isCol && size === DEFAULT_CELL_WIDTH;
|
|
50888
|
+
return [element, isDefaultCol || size === undefined ? null : size];
|
|
50889
|
+
}));
|
|
50875
50890
|
const target = [
|
|
50876
50891
|
{
|
|
50877
50892
|
left: isCol ? start + deltaCol : 0,
|
|
@@ -50891,14 +50906,12 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
50891
50906
|
},
|
|
50892
50907
|
];
|
|
50893
50908
|
state.paste(pasteTarget, { selectTarget: true });
|
|
50894
|
-
const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
|
|
50895
50909
|
let currentIndex = isBasedBefore ? cmd.base : cmd.base + 1;
|
|
50896
50910
|
for (const element of toRemove) {
|
|
50897
|
-
const size = this.getters.getHeaderSize(cmd.sheetId, cmd.dimension, element);
|
|
50898
50911
|
this.dispatch("RESIZE_COLUMNS_ROWS", {
|
|
50899
50912
|
dimension: cmd.dimension,
|
|
50900
50913
|
sheetId: cmd.sheetId,
|
|
50901
|
-
size,
|
|
50914
|
+
size: originalSize[element],
|
|
50902
50915
|
elements: [currentIndex],
|
|
50903
50916
|
});
|
|
50904
50917
|
currentIndex += 1;
|
|
@@ -58399,6 +58412,6 @@ const constants = {
|
|
|
58399
58412
|
export { AbstractChart, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, tokenize };
|
|
58400
58413
|
|
|
58401
58414
|
|
|
58402
|
-
__info__.version = "17.0.
|
|
58403
|
-
__info__.date = "2025-07-
|
|
58404
|
-
__info__.hash = "
|
|
58415
|
+
__info__.version = "17.0.70";
|
|
58416
|
+
__info__.date = "2025-07-28T13:26:37.626Z";
|
|
58417
|
+
__info__.hash = "2ec8d82";
|
|
@@ -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 17.0.
|
|
6
|
-
* @date 2025-07-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.70
|
|
6
|
+
* @date 2025-07-28T13:26:37.626Z
|
|
7
|
+
* @hash 2ec8d82
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -43470,6 +43470,23 @@
|
|
|
43470
43470
|
static getters = ["getRowSize", "getHeaderSize"];
|
|
43471
43471
|
tallestCellInRow = {};
|
|
43472
43472
|
ctx = document.createElement("canvas").getContext("2d");
|
|
43473
|
+
beforeHandle(cmd) {
|
|
43474
|
+
switch (cmd.type) {
|
|
43475
|
+
// Ensure rows are updated before "UPDATE_CELL" is dispatched from cell plugin.
|
|
43476
|
+
// "UPDATE_CELL" uses the Sheet core plugin to access row data.
|
|
43477
|
+
// If "ADD_COLUMNS_ROWS" has not been processed yet by header_sizes_ui,
|
|
43478
|
+
// size updates may apply to incorrect (pre-insert) rows.
|
|
43479
|
+
case "ADD_COLUMNS_ROWS":
|
|
43480
|
+
if (cmd.dimension === "COL") {
|
|
43481
|
+
return;
|
|
43482
|
+
}
|
|
43483
|
+
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
43484
|
+
const newCells = Array(cmd.quantity).fill(undefined);
|
|
43485
|
+
const newTallestCells = insertItemsAtIndex(this.tallestCellInRow[cmd.sheetId], newCells, addIndex);
|
|
43486
|
+
this.history.update("tallestCellInRow", cmd.sheetId, newTallestCells);
|
|
43487
|
+
break;
|
|
43488
|
+
}
|
|
43489
|
+
}
|
|
43473
43490
|
handle(cmd) {
|
|
43474
43491
|
switch (cmd.type) {
|
|
43475
43492
|
case "START":
|
|
@@ -43499,16 +43516,6 @@
|
|
|
43499
43516
|
this.history.update("tallestCellInRow", cmd.sheetId, tallestCells);
|
|
43500
43517
|
break;
|
|
43501
43518
|
}
|
|
43502
|
-
case "ADD_COLUMNS_ROWS": {
|
|
43503
|
-
if (cmd.dimension === "COL") {
|
|
43504
|
-
return;
|
|
43505
|
-
}
|
|
43506
|
-
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
43507
|
-
const newCells = Array(cmd.quantity).fill(undefined);
|
|
43508
|
-
const newTallestCells = insertItemsAtIndex(this.tallestCellInRow[cmd.sheetId], newCells, addIndex);
|
|
43509
|
-
this.history.update("tallestCellInRow", cmd.sheetId, newTallestCells);
|
|
43510
|
-
break;
|
|
43511
|
-
}
|
|
43512
43519
|
case "RESIZE_COLUMNS_ROWS":
|
|
43513
43520
|
{
|
|
43514
43521
|
const sheetId = cmd.sheetId;
|
|
@@ -50873,6 +50880,14 @@
|
|
|
50873
50880
|
const isBasedBefore = cmd.base < start;
|
|
50874
50881
|
const deltaCol = isBasedBefore && isCol ? thickness : 0;
|
|
50875
50882
|
const deltaRow = isBasedBefore && !isCol ? thickness : 0;
|
|
50883
|
+
const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
|
|
50884
|
+
const originalSize = Object.fromEntries(toRemove.map((element) => {
|
|
50885
|
+
const size = isCol
|
|
50886
|
+
? this.getters.getColSize(cmd.sheetId, element)
|
|
50887
|
+
: this.getters.getUserRowSize(cmd.sheetId, element);
|
|
50888
|
+
const isDefaultCol = isCol && size === DEFAULT_CELL_WIDTH;
|
|
50889
|
+
return [element, isDefaultCol || size === undefined ? null : size];
|
|
50890
|
+
}));
|
|
50876
50891
|
const target = [
|
|
50877
50892
|
{
|
|
50878
50893
|
left: isCol ? start + deltaCol : 0,
|
|
@@ -50892,14 +50907,12 @@
|
|
|
50892
50907
|
},
|
|
50893
50908
|
];
|
|
50894
50909
|
state.paste(pasteTarget, { selectTarget: true });
|
|
50895
|
-
const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
|
|
50896
50910
|
let currentIndex = isBasedBefore ? cmd.base : cmd.base + 1;
|
|
50897
50911
|
for (const element of toRemove) {
|
|
50898
|
-
const size = this.getters.getHeaderSize(cmd.sheetId, cmd.dimension, element);
|
|
50899
50912
|
this.dispatch("RESIZE_COLUMNS_ROWS", {
|
|
50900
50913
|
dimension: cmd.dimension,
|
|
50901
50914
|
sheetId: cmd.sheetId,
|
|
50902
|
-
size,
|
|
50915
|
+
size: originalSize[element],
|
|
50903
50916
|
elements: [currentIndex],
|
|
50904
50917
|
});
|
|
50905
50918
|
currentIndex += 1;
|
|
@@ -58435,9 +58448,9 @@
|
|
|
58435
58448
|
exports.tokenize = tokenize;
|
|
58436
58449
|
|
|
58437
58450
|
|
|
58438
|
-
__info__.version = "17.0.
|
|
58439
|
-
__info__.date = "2025-07-
|
|
58440
|
-
__info__.hash = "
|
|
58451
|
+
__info__.version = "17.0.70";
|
|
58452
|
+
__info__.date = "2025-07-28T13:26:37.626Z";
|
|
58453
|
+
__info__.hash = "2ec8d82";
|
|
58441
58454
|
|
|
58442
58455
|
|
|
58443
58456
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|