@odoo/o-spreadsheet 16.0.55 → 16.0.57
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 +84 -23
- package/dist/o-spreadsheet.d.ts +5 -0
- package/dist/o-spreadsheet.esm.js +84 -23
- package/dist/o-spreadsheet.iife.js +84 -23
- package/dist/o-spreadsheet.iife.min.js +104 -104
- package/dist/o_spreadsheet.xml +4 -4
- package/package.json +2 -2
|
@@ -10688,15 +10688,23 @@ class ChartFigure extends owl.Component {
|
|
|
10688
10688
|
ChartFigure.template = "o-spreadsheet-ChartFigure";
|
|
10689
10689
|
ChartFigure.components = { Menu };
|
|
10690
10690
|
|
|
10691
|
+
/**
|
|
10692
|
+
* Start listening to pointer events and apply the given callbacks.
|
|
10693
|
+
*
|
|
10694
|
+
* @returns A function to remove the listeners.
|
|
10695
|
+
*/
|
|
10691
10696
|
function startDnd(onMouseMove, onMouseUp, onMouseDown = () => { }) {
|
|
10692
|
-
const
|
|
10693
|
-
onMouseUp(ev);
|
|
10697
|
+
const removeListeners = () => {
|
|
10694
10698
|
window.removeEventListener("mousedown", onMouseDown);
|
|
10695
10699
|
window.removeEventListener("mouseup", _onMouseUp);
|
|
10696
10700
|
window.removeEventListener("dragstart", _onDragStart);
|
|
10697
10701
|
window.removeEventListener("mousemove", onMouseMove);
|
|
10698
10702
|
window.removeEventListener("wheel", onMouseMove);
|
|
10699
10703
|
};
|
|
10704
|
+
const _onMouseUp = (ev) => {
|
|
10705
|
+
onMouseUp(ev);
|
|
10706
|
+
removeListeners();
|
|
10707
|
+
};
|
|
10700
10708
|
function _onDragStart(ev) {
|
|
10701
10709
|
ev.preventDefault();
|
|
10702
10710
|
}
|
|
@@ -10705,6 +10713,7 @@ function startDnd(onMouseMove, onMouseUp, onMouseDown = () => { }) {
|
|
|
10705
10713
|
window.addEventListener("dragstart", _onDragStart);
|
|
10706
10714
|
window.addEventListener("mousemove", onMouseMove);
|
|
10707
10715
|
window.addEventListener("wheel", onMouseMove);
|
|
10716
|
+
return removeListeners;
|
|
10708
10717
|
}
|
|
10709
10718
|
/**
|
|
10710
10719
|
* Function to be used during a mousedown event, this function allows to
|
|
@@ -18399,13 +18408,12 @@ function tokenizeSymbol(chars) {
|
|
|
18399
18408
|
}
|
|
18400
18409
|
const whiteSpaceRegexp = /\s/;
|
|
18401
18410
|
function tokenizeSpace(chars) {
|
|
18402
|
-
let
|
|
18411
|
+
let spaces = "";
|
|
18403
18412
|
while (chars[0] && chars[0].match(whiteSpaceRegexp)) {
|
|
18404
|
-
|
|
18405
|
-
chars.shift();
|
|
18413
|
+
spaces += chars.shift();
|
|
18406
18414
|
}
|
|
18407
|
-
if (
|
|
18408
|
-
return { type: "SPACE", value:
|
|
18415
|
+
if (spaces) {
|
|
18416
|
+
return { type: "SPACE", value: spaces };
|
|
18409
18417
|
}
|
|
18410
18418
|
return null;
|
|
18411
18419
|
}
|
|
@@ -20432,11 +20440,11 @@ css /* scss */ `
|
|
|
20432
20440
|
}
|
|
20433
20441
|
|
|
20434
20442
|
/* Custom css to highlight topbar composer on focus */
|
|
20435
|
-
.o-topbar-toolbar .o-composer-container
|
|
20436
|
-
border: 1px solid ${SELECTION_BORDER_COLOR};
|
|
20443
|
+
.o-topbar-toolbar .o-composer-container[active] {
|
|
20444
|
+
border: 1px solid ${SELECTION_BORDER_COLOR} !important;
|
|
20437
20445
|
}
|
|
20438
20446
|
|
|
20439
|
-
.o-topbar-toolbar .o-composer-container {
|
|
20447
|
+
.o-topbar-toolbar .o-composer-container[active] {
|
|
20440
20448
|
z-index: ${ComponentsImportance.TopBarComposer};
|
|
20441
20449
|
}
|
|
20442
20450
|
`;
|
|
@@ -21385,6 +21393,7 @@ class FiguresContainer extends owl.Component {
|
|
|
21385
21393
|
y: 0,
|
|
21386
21394
|
width: 0,
|
|
21387
21395
|
height: 0,
|
|
21396
|
+
cancelDnd: undefined,
|
|
21388
21397
|
});
|
|
21389
21398
|
}
|
|
21390
21399
|
setup() {
|
|
@@ -21398,11 +21407,24 @@ class FiguresContainer extends owl.Component {
|
|
|
21398
21407
|
// new rendering
|
|
21399
21408
|
this.render();
|
|
21400
21409
|
});
|
|
21410
|
+
owl.onWillUpdateProps(() => {
|
|
21411
|
+
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
21412
|
+
if (this.dnd.figId && !this.env.model.getters.getFigure(sheetId, this.dnd.figId)) {
|
|
21413
|
+
if (this.dnd.cancelDnd) {
|
|
21414
|
+
this.dnd.cancelDnd();
|
|
21415
|
+
}
|
|
21416
|
+
this.dnd.figId = undefined;
|
|
21417
|
+
this.dnd.cancelDnd = undefined;
|
|
21418
|
+
}
|
|
21419
|
+
});
|
|
21401
21420
|
}
|
|
21402
21421
|
getVisibleFigures() {
|
|
21403
21422
|
const visibleFigures = this.env.model.getters.getVisibleFigures();
|
|
21404
21423
|
if (this.dnd.figId && !visibleFigures.some((figure) => figure.id === this.dnd.figId)) {
|
|
21405
|
-
|
|
21424
|
+
const draggedFigure = this.env.model.getters.getFigure(this.env.model.getters.getActiveSheetId(), this.dnd.figId);
|
|
21425
|
+
if (draggedFigure) {
|
|
21426
|
+
visibleFigures.push(draggedFigure);
|
|
21427
|
+
}
|
|
21406
21428
|
}
|
|
21407
21429
|
return visibleFigures;
|
|
21408
21430
|
}
|
|
@@ -21515,7 +21537,7 @@ class FiguresContainer extends owl.Component {
|
|
|
21515
21537
|
this.dnd.figId = undefined;
|
|
21516
21538
|
this.env.model.dispatch("UPDATE_FIGURE", { sheetId, id: figure.id, x, y });
|
|
21517
21539
|
};
|
|
21518
|
-
startDnd(onMouseMove, onMouseUp);
|
|
21540
|
+
this.dnd.cancelDnd = startDnd(onMouseMove, onMouseUp);
|
|
21519
21541
|
}
|
|
21520
21542
|
startResize(figure, dirX, dirY, ev) {
|
|
21521
21543
|
ev.stopPropagation();
|
|
@@ -21569,7 +21591,7 @@ class FiguresContainer extends owl.Component {
|
|
|
21569
21591
|
...update,
|
|
21570
21592
|
});
|
|
21571
21593
|
};
|
|
21572
|
-
startDnd(onMouseMove, onMouseUp);
|
|
21594
|
+
this.dnd.cancelDnd = startDnd(onMouseMove, onMouseUp);
|
|
21573
21595
|
}
|
|
21574
21596
|
getDndFigure() {
|
|
21575
21597
|
const figure = this.getVisibleFigures().find((fig) => fig.id === this.dnd.figId);
|
|
@@ -25017,6 +25039,9 @@ function convertFigure(figure, id, sheetData) {
|
|
|
25017
25039
|
}
|
|
25018
25040
|
function convertChartData(chartData) {
|
|
25019
25041
|
var _a;
|
|
25042
|
+
if (chartData.dataSets.length === 0) {
|
|
25043
|
+
return undefined;
|
|
25044
|
+
}
|
|
25020
25045
|
const labelRange = (_a = chartData.dataSets[0].label) === null || _a === void 0 ? void 0 : _a.replace(/\$/g, "");
|
|
25021
25046
|
let dataSets = chartData.dataSets.map((data) => data.range.replace(/\$/g, ""));
|
|
25022
25047
|
// For doughnut charts, in chartJS first dataset = outer dataset, in excel first dataset = inner dataset
|
|
@@ -27488,10 +27513,34 @@ class BordersPlugin extends CorePlugin {
|
|
|
27488
27513
|
const elements = [...cmd.elements].sort((a, b) => b - a);
|
|
27489
27514
|
for (const group of groupConsecutive(elements)) {
|
|
27490
27515
|
if (cmd.dimension === "COL") {
|
|
27491
|
-
|
|
27516
|
+
if (group[0] >= this.getters.getNumberCols(cmd.sheetId)) {
|
|
27517
|
+
for (let row = 0; row < this.getters.getNumberRows(cmd.sheetId); row++) {
|
|
27518
|
+
this.history.update("borders", cmd.sheetId, group[0] + 1, row, "vertical", undefined);
|
|
27519
|
+
}
|
|
27520
|
+
}
|
|
27521
|
+
if (group[group.length - 1] === 0) {
|
|
27522
|
+
for (let row = 0; row < this.getters.getNumberRows(cmd.sheetId); row++) {
|
|
27523
|
+
this.history.update("borders", cmd.sheetId, 0, row, "vertical", undefined);
|
|
27524
|
+
}
|
|
27525
|
+
}
|
|
27526
|
+
const zone = this.getters.getColsZone(cmd.sheetId, group[group.length - 1] + 1, group[0]);
|
|
27527
|
+
this.clearInsideBorders(cmd.sheetId, [zone]);
|
|
27528
|
+
this.shiftBordersHorizontally(cmd.sheetId, group[0] + 1, -group.length);
|
|
27492
27529
|
}
|
|
27493
27530
|
else {
|
|
27494
|
-
|
|
27531
|
+
if (group[0] >= this.getters.getNumberRows(cmd.sheetId)) {
|
|
27532
|
+
for (let col = 0; col < this.getters.getNumberCols(cmd.sheetId); col++) {
|
|
27533
|
+
this.history.update("borders", cmd.sheetId, col, group[0] + 1, "horizontal", undefined);
|
|
27534
|
+
}
|
|
27535
|
+
}
|
|
27536
|
+
if (group[group.length - 1] === 0) {
|
|
27537
|
+
for (let col = 0; col < this.getters.getNumberCols(cmd.sheetId); col++) {
|
|
27538
|
+
this.history.update("borders", cmd.sheetId, col, 0, "horizontal", undefined);
|
|
27539
|
+
}
|
|
27540
|
+
}
|
|
27541
|
+
const zone = this.getters.getRowsZone(cmd.sheetId, group[group.length - 1] + 1, group[0]);
|
|
27542
|
+
this.clearInsideBorders(cmd.sheetId, [zone]);
|
|
27543
|
+
this.shiftBordersVertically(cmd.sheetId, group[0] + 1, -group.length);
|
|
27495
27544
|
}
|
|
27496
27545
|
}
|
|
27497
27546
|
break;
|
|
@@ -27786,6 +27835,18 @@ class BordersPlugin extends CorePlugin {
|
|
|
27786
27835
|
}
|
|
27787
27836
|
}
|
|
27788
27837
|
}
|
|
27838
|
+
/**
|
|
27839
|
+
* Remove the borders inside of a zone
|
|
27840
|
+
*/
|
|
27841
|
+
clearInsideBorders(sheetId, zones) {
|
|
27842
|
+
for (let zone of zones) {
|
|
27843
|
+
for (let row = zone.top; row <= zone.bottom; row++) {
|
|
27844
|
+
for (let col = zone.left; col <= zone.right; col++) {
|
|
27845
|
+
this.history.update("borders", sheetId, col, row, undefined);
|
|
27846
|
+
}
|
|
27847
|
+
}
|
|
27848
|
+
}
|
|
27849
|
+
}
|
|
27789
27850
|
/**
|
|
27790
27851
|
* Add a border to the existing one to a cell
|
|
27791
27852
|
*/
|
|
@@ -27938,7 +27999,6 @@ class BordersPlugin extends CorePlugin {
|
|
|
27938
27999
|
}
|
|
27939
28000
|
BordersPlugin.getters = ["getCellBorder"];
|
|
27940
28001
|
|
|
27941
|
-
const nbspRegexp = new RegExp(String.fromCharCode(160), "g");
|
|
27942
28002
|
const LINK_STYLE = { textColor: LINK_COLOR };
|
|
27943
28003
|
/**
|
|
27944
28004
|
* Core Plugin
|
|
@@ -28272,13 +28332,10 @@ class CellPlugin extends CorePlugin {
|
|
|
28272
28332
|
return id;
|
|
28273
28333
|
}
|
|
28274
28334
|
updateCell(sheetId, col, row, after) {
|
|
28275
|
-
var _a;
|
|
28276
28335
|
const before = this.getters.getCell(sheetId, col, row);
|
|
28277
28336
|
const hasContent = "content" in after || "formula" in after;
|
|
28278
28337
|
// Compute the new cell properties
|
|
28279
|
-
const afterContent = hasContent
|
|
28280
|
-
? ((_a = after.content) === null || _a === void 0 ? void 0 : _a.replace(nbspRegexp, "")) || ""
|
|
28281
|
-
: (before === null || before === void 0 ? void 0 : before.content) || "";
|
|
28338
|
+
const afterContent = (hasContent ? after.content : before === null || before === void 0 ? void 0 : before.content) || "";
|
|
28282
28339
|
let style;
|
|
28283
28340
|
if (after.style !== undefined) {
|
|
28284
28341
|
style = after.style || undefined;
|
|
@@ -37162,6 +37219,7 @@ class SheetViewPlugin extends UIPlugin {
|
|
|
37162
37219
|
break;
|
|
37163
37220
|
case "DELETE_SHEET":
|
|
37164
37221
|
this.cleanViewports();
|
|
37222
|
+
this.sheetsWithDirtyViewports.delete(cmd.sheetId);
|
|
37165
37223
|
break;
|
|
37166
37224
|
case "ACTIVATE_SHEET":
|
|
37167
37225
|
this.setViewports();
|
|
@@ -37514,6 +37572,9 @@ class SheetViewPlugin extends UIPlugin {
|
|
|
37514
37572
|
};
|
|
37515
37573
|
}
|
|
37516
37574
|
resetViewports(sheetId) {
|
|
37575
|
+
if (!this.getters.tryGetSheet(sheetId)) {
|
|
37576
|
+
return;
|
|
37577
|
+
}
|
|
37517
37578
|
const { xSplit, ySplit } = this.getters.getPaneDivisions(sheetId);
|
|
37518
37579
|
const nCols = this.getters.getNumberCols(sheetId);
|
|
37519
37580
|
const nRows = this.getters.getNumberRows(sheetId);
|
|
@@ -43462,6 +43523,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
43462
43523
|
exports.tokenize = tokenize;
|
|
43463
43524
|
|
|
43464
43525
|
|
|
43465
|
-
__info__.version = '16.0.
|
|
43466
|
-
__info__.date = '
|
|
43467
|
-
__info__.hash = '
|
|
43526
|
+
__info__.version = '16.0.57';
|
|
43527
|
+
__info__.date = '2025-01-14T11:28:51.212Z';
|
|
43528
|
+
__info__.hash = '5c7bf6e';
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -3081,6 +3081,10 @@ declare class BordersPlugin extends CorePlugin<BordersPluginState> implements Bo
|
|
|
3081
3081
|
* Remove the borders of a zone
|
|
3082
3082
|
*/
|
|
3083
3083
|
private clearBorders;
|
|
3084
|
+
/**
|
|
3085
|
+
* Remove the borders inside of a zone
|
|
3086
|
+
*/
|
|
3087
|
+
private clearInsideBorders;
|
|
3084
3088
|
/**
|
|
3085
3089
|
* Add a border to the existing one to a cell
|
|
3086
3090
|
*/
|
|
@@ -5721,6 +5725,7 @@ interface DndState {
|
|
|
5721
5725
|
y: Pixel;
|
|
5722
5726
|
width: Pixel;
|
|
5723
5727
|
height: Pixel;
|
|
5728
|
+
cancelDnd: (() => void) | undefined;
|
|
5724
5729
|
}
|
|
5725
5730
|
interface Props$e {
|
|
5726
5731
|
sidePanelIsOpen: Boolean;
|
|
@@ -10684,15 +10684,23 @@ class ChartFigure extends Component {
|
|
|
10684
10684
|
ChartFigure.template = "o-spreadsheet-ChartFigure";
|
|
10685
10685
|
ChartFigure.components = { Menu };
|
|
10686
10686
|
|
|
10687
|
+
/**
|
|
10688
|
+
* Start listening to pointer events and apply the given callbacks.
|
|
10689
|
+
*
|
|
10690
|
+
* @returns A function to remove the listeners.
|
|
10691
|
+
*/
|
|
10687
10692
|
function startDnd(onMouseMove, onMouseUp, onMouseDown = () => { }) {
|
|
10688
|
-
const
|
|
10689
|
-
onMouseUp(ev);
|
|
10693
|
+
const removeListeners = () => {
|
|
10690
10694
|
window.removeEventListener("mousedown", onMouseDown);
|
|
10691
10695
|
window.removeEventListener("mouseup", _onMouseUp);
|
|
10692
10696
|
window.removeEventListener("dragstart", _onDragStart);
|
|
10693
10697
|
window.removeEventListener("mousemove", onMouseMove);
|
|
10694
10698
|
window.removeEventListener("wheel", onMouseMove);
|
|
10695
10699
|
};
|
|
10700
|
+
const _onMouseUp = (ev) => {
|
|
10701
|
+
onMouseUp(ev);
|
|
10702
|
+
removeListeners();
|
|
10703
|
+
};
|
|
10696
10704
|
function _onDragStart(ev) {
|
|
10697
10705
|
ev.preventDefault();
|
|
10698
10706
|
}
|
|
@@ -10701,6 +10709,7 @@ function startDnd(onMouseMove, onMouseUp, onMouseDown = () => { }) {
|
|
|
10701
10709
|
window.addEventListener("dragstart", _onDragStart);
|
|
10702
10710
|
window.addEventListener("mousemove", onMouseMove);
|
|
10703
10711
|
window.addEventListener("wheel", onMouseMove);
|
|
10712
|
+
return removeListeners;
|
|
10704
10713
|
}
|
|
10705
10714
|
/**
|
|
10706
10715
|
* Function to be used during a mousedown event, this function allows to
|
|
@@ -18395,13 +18404,12 @@ function tokenizeSymbol(chars) {
|
|
|
18395
18404
|
}
|
|
18396
18405
|
const whiteSpaceRegexp = /\s/;
|
|
18397
18406
|
function tokenizeSpace(chars) {
|
|
18398
|
-
let
|
|
18407
|
+
let spaces = "";
|
|
18399
18408
|
while (chars[0] && chars[0].match(whiteSpaceRegexp)) {
|
|
18400
|
-
|
|
18401
|
-
chars.shift();
|
|
18409
|
+
spaces += chars.shift();
|
|
18402
18410
|
}
|
|
18403
|
-
if (
|
|
18404
|
-
return { type: "SPACE", value:
|
|
18411
|
+
if (spaces) {
|
|
18412
|
+
return { type: "SPACE", value: spaces };
|
|
18405
18413
|
}
|
|
18406
18414
|
return null;
|
|
18407
18415
|
}
|
|
@@ -20428,11 +20436,11 @@ css /* scss */ `
|
|
|
20428
20436
|
}
|
|
20429
20437
|
|
|
20430
20438
|
/* Custom css to highlight topbar composer on focus */
|
|
20431
|
-
.o-topbar-toolbar .o-composer-container
|
|
20432
|
-
border: 1px solid ${SELECTION_BORDER_COLOR};
|
|
20439
|
+
.o-topbar-toolbar .o-composer-container[active] {
|
|
20440
|
+
border: 1px solid ${SELECTION_BORDER_COLOR} !important;
|
|
20433
20441
|
}
|
|
20434
20442
|
|
|
20435
|
-
.o-topbar-toolbar .o-composer-container {
|
|
20443
|
+
.o-topbar-toolbar .o-composer-container[active] {
|
|
20436
20444
|
z-index: ${ComponentsImportance.TopBarComposer};
|
|
20437
20445
|
}
|
|
20438
20446
|
`;
|
|
@@ -21381,6 +21389,7 @@ class FiguresContainer extends Component {
|
|
|
21381
21389
|
y: 0,
|
|
21382
21390
|
width: 0,
|
|
21383
21391
|
height: 0,
|
|
21392
|
+
cancelDnd: undefined,
|
|
21384
21393
|
});
|
|
21385
21394
|
}
|
|
21386
21395
|
setup() {
|
|
@@ -21394,11 +21403,24 @@ class FiguresContainer extends Component {
|
|
|
21394
21403
|
// new rendering
|
|
21395
21404
|
this.render();
|
|
21396
21405
|
});
|
|
21406
|
+
onWillUpdateProps(() => {
|
|
21407
|
+
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
21408
|
+
if (this.dnd.figId && !this.env.model.getters.getFigure(sheetId, this.dnd.figId)) {
|
|
21409
|
+
if (this.dnd.cancelDnd) {
|
|
21410
|
+
this.dnd.cancelDnd();
|
|
21411
|
+
}
|
|
21412
|
+
this.dnd.figId = undefined;
|
|
21413
|
+
this.dnd.cancelDnd = undefined;
|
|
21414
|
+
}
|
|
21415
|
+
});
|
|
21397
21416
|
}
|
|
21398
21417
|
getVisibleFigures() {
|
|
21399
21418
|
const visibleFigures = this.env.model.getters.getVisibleFigures();
|
|
21400
21419
|
if (this.dnd.figId && !visibleFigures.some((figure) => figure.id === this.dnd.figId)) {
|
|
21401
|
-
|
|
21420
|
+
const draggedFigure = this.env.model.getters.getFigure(this.env.model.getters.getActiveSheetId(), this.dnd.figId);
|
|
21421
|
+
if (draggedFigure) {
|
|
21422
|
+
visibleFigures.push(draggedFigure);
|
|
21423
|
+
}
|
|
21402
21424
|
}
|
|
21403
21425
|
return visibleFigures;
|
|
21404
21426
|
}
|
|
@@ -21511,7 +21533,7 @@ class FiguresContainer extends Component {
|
|
|
21511
21533
|
this.dnd.figId = undefined;
|
|
21512
21534
|
this.env.model.dispatch("UPDATE_FIGURE", { sheetId, id: figure.id, x, y });
|
|
21513
21535
|
};
|
|
21514
|
-
startDnd(onMouseMove, onMouseUp);
|
|
21536
|
+
this.dnd.cancelDnd = startDnd(onMouseMove, onMouseUp);
|
|
21515
21537
|
}
|
|
21516
21538
|
startResize(figure, dirX, dirY, ev) {
|
|
21517
21539
|
ev.stopPropagation();
|
|
@@ -21565,7 +21587,7 @@ class FiguresContainer extends Component {
|
|
|
21565
21587
|
...update,
|
|
21566
21588
|
});
|
|
21567
21589
|
};
|
|
21568
|
-
startDnd(onMouseMove, onMouseUp);
|
|
21590
|
+
this.dnd.cancelDnd = startDnd(onMouseMove, onMouseUp);
|
|
21569
21591
|
}
|
|
21570
21592
|
getDndFigure() {
|
|
21571
21593
|
const figure = this.getVisibleFigures().find((fig) => fig.id === this.dnd.figId);
|
|
@@ -25013,6 +25035,9 @@ function convertFigure(figure, id, sheetData) {
|
|
|
25013
25035
|
}
|
|
25014
25036
|
function convertChartData(chartData) {
|
|
25015
25037
|
var _a;
|
|
25038
|
+
if (chartData.dataSets.length === 0) {
|
|
25039
|
+
return undefined;
|
|
25040
|
+
}
|
|
25016
25041
|
const labelRange = (_a = chartData.dataSets[0].label) === null || _a === void 0 ? void 0 : _a.replace(/\$/g, "");
|
|
25017
25042
|
let dataSets = chartData.dataSets.map((data) => data.range.replace(/\$/g, ""));
|
|
25018
25043
|
// For doughnut charts, in chartJS first dataset = outer dataset, in excel first dataset = inner dataset
|
|
@@ -27484,10 +27509,34 @@ class BordersPlugin extends CorePlugin {
|
|
|
27484
27509
|
const elements = [...cmd.elements].sort((a, b) => b - a);
|
|
27485
27510
|
for (const group of groupConsecutive(elements)) {
|
|
27486
27511
|
if (cmd.dimension === "COL") {
|
|
27487
|
-
|
|
27512
|
+
if (group[0] >= this.getters.getNumberCols(cmd.sheetId)) {
|
|
27513
|
+
for (let row = 0; row < this.getters.getNumberRows(cmd.sheetId); row++) {
|
|
27514
|
+
this.history.update("borders", cmd.sheetId, group[0] + 1, row, "vertical", undefined);
|
|
27515
|
+
}
|
|
27516
|
+
}
|
|
27517
|
+
if (group[group.length - 1] === 0) {
|
|
27518
|
+
for (let row = 0; row < this.getters.getNumberRows(cmd.sheetId); row++) {
|
|
27519
|
+
this.history.update("borders", cmd.sheetId, 0, row, "vertical", undefined);
|
|
27520
|
+
}
|
|
27521
|
+
}
|
|
27522
|
+
const zone = this.getters.getColsZone(cmd.sheetId, group[group.length - 1] + 1, group[0]);
|
|
27523
|
+
this.clearInsideBorders(cmd.sheetId, [zone]);
|
|
27524
|
+
this.shiftBordersHorizontally(cmd.sheetId, group[0] + 1, -group.length);
|
|
27488
27525
|
}
|
|
27489
27526
|
else {
|
|
27490
|
-
|
|
27527
|
+
if (group[0] >= this.getters.getNumberRows(cmd.sheetId)) {
|
|
27528
|
+
for (let col = 0; col < this.getters.getNumberCols(cmd.sheetId); col++) {
|
|
27529
|
+
this.history.update("borders", cmd.sheetId, col, group[0] + 1, "horizontal", undefined);
|
|
27530
|
+
}
|
|
27531
|
+
}
|
|
27532
|
+
if (group[group.length - 1] === 0) {
|
|
27533
|
+
for (let col = 0; col < this.getters.getNumberCols(cmd.sheetId); col++) {
|
|
27534
|
+
this.history.update("borders", cmd.sheetId, col, 0, "horizontal", undefined);
|
|
27535
|
+
}
|
|
27536
|
+
}
|
|
27537
|
+
const zone = this.getters.getRowsZone(cmd.sheetId, group[group.length - 1] + 1, group[0]);
|
|
27538
|
+
this.clearInsideBorders(cmd.sheetId, [zone]);
|
|
27539
|
+
this.shiftBordersVertically(cmd.sheetId, group[0] + 1, -group.length);
|
|
27491
27540
|
}
|
|
27492
27541
|
}
|
|
27493
27542
|
break;
|
|
@@ -27782,6 +27831,18 @@ class BordersPlugin extends CorePlugin {
|
|
|
27782
27831
|
}
|
|
27783
27832
|
}
|
|
27784
27833
|
}
|
|
27834
|
+
/**
|
|
27835
|
+
* Remove the borders inside of a zone
|
|
27836
|
+
*/
|
|
27837
|
+
clearInsideBorders(sheetId, zones) {
|
|
27838
|
+
for (let zone of zones) {
|
|
27839
|
+
for (let row = zone.top; row <= zone.bottom; row++) {
|
|
27840
|
+
for (let col = zone.left; col <= zone.right; col++) {
|
|
27841
|
+
this.history.update("borders", sheetId, col, row, undefined);
|
|
27842
|
+
}
|
|
27843
|
+
}
|
|
27844
|
+
}
|
|
27845
|
+
}
|
|
27785
27846
|
/**
|
|
27786
27847
|
* Add a border to the existing one to a cell
|
|
27787
27848
|
*/
|
|
@@ -27934,7 +27995,6 @@ class BordersPlugin extends CorePlugin {
|
|
|
27934
27995
|
}
|
|
27935
27996
|
BordersPlugin.getters = ["getCellBorder"];
|
|
27936
27997
|
|
|
27937
|
-
const nbspRegexp = new RegExp(String.fromCharCode(160), "g");
|
|
27938
27998
|
const LINK_STYLE = { textColor: LINK_COLOR };
|
|
27939
27999
|
/**
|
|
27940
28000
|
* Core Plugin
|
|
@@ -28268,13 +28328,10 @@ class CellPlugin extends CorePlugin {
|
|
|
28268
28328
|
return id;
|
|
28269
28329
|
}
|
|
28270
28330
|
updateCell(sheetId, col, row, after) {
|
|
28271
|
-
var _a;
|
|
28272
28331
|
const before = this.getters.getCell(sheetId, col, row);
|
|
28273
28332
|
const hasContent = "content" in after || "formula" in after;
|
|
28274
28333
|
// Compute the new cell properties
|
|
28275
|
-
const afterContent = hasContent
|
|
28276
|
-
? ((_a = after.content) === null || _a === void 0 ? void 0 : _a.replace(nbspRegexp, "")) || ""
|
|
28277
|
-
: (before === null || before === void 0 ? void 0 : before.content) || "";
|
|
28334
|
+
const afterContent = (hasContent ? after.content : before === null || before === void 0 ? void 0 : before.content) || "";
|
|
28278
28335
|
let style;
|
|
28279
28336
|
if (after.style !== undefined) {
|
|
28280
28337
|
style = after.style || undefined;
|
|
@@ -37158,6 +37215,7 @@ class SheetViewPlugin extends UIPlugin {
|
|
|
37158
37215
|
break;
|
|
37159
37216
|
case "DELETE_SHEET":
|
|
37160
37217
|
this.cleanViewports();
|
|
37218
|
+
this.sheetsWithDirtyViewports.delete(cmd.sheetId);
|
|
37161
37219
|
break;
|
|
37162
37220
|
case "ACTIVATE_SHEET":
|
|
37163
37221
|
this.setViewports();
|
|
@@ -37510,6 +37568,9 @@ class SheetViewPlugin extends UIPlugin {
|
|
|
37510
37568
|
};
|
|
37511
37569
|
}
|
|
37512
37570
|
resetViewports(sheetId) {
|
|
37571
|
+
if (!this.getters.tryGetSheet(sheetId)) {
|
|
37572
|
+
return;
|
|
37573
|
+
}
|
|
37513
37574
|
const { xSplit, ySplit } = this.getters.getPaneDivisions(sheetId);
|
|
37514
37575
|
const nCols = this.getters.getNumberCols(sheetId);
|
|
37515
37576
|
const nRows = this.getters.getNumberRows(sheetId);
|
|
@@ -43430,6 +43491,6 @@ function addFunction(functionName, functionDescription) {
|
|
|
43430
43491
|
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 };
|
|
43431
43492
|
|
|
43432
43493
|
|
|
43433
|
-
__info__.version = '16.0.
|
|
43434
|
-
__info__.date = '
|
|
43435
|
-
__info__.hash = '
|
|
43494
|
+
__info__.version = '16.0.57';
|
|
43495
|
+
__info__.date = '2025-01-14T11:28:51.212Z';
|
|
43496
|
+
__info__.hash = '5c7bf6e';
|