[FIX] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/e02add99e [REL] 17.0.15 https://github.com/odoo/o-spreadsheet/commit/0695b634e [FIX] figures: deleting a sheet will remove all figures https://github.com/odoo/o-spreadsheet/commit/6d5aea9bd [FIX] FiguresContainer: chart resizing broken https://github.com/odoo/o-spreadsheet/commit/1e7367209 [FIX] sheet_interactive: rename sheet in readonly mode closes odoo/odoo#157855 Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
||||
* @see https://github.com/odoo/o-spreadsheet
|
||||
* @version 17.0.14
|
||||
* @date 2024-03-12T08:05:09.046Z
|
||||
* @hash 6f6e1b9dd
|
||||
* @version 17.0.15
|
||||
* @date 2024-03-15T12:12:08.617Z
|
||||
* @hash e02add99e
|
||||
*/
|
||||
|
||||
(function (exports, owl) {
|
||||
@@ -27543,7 +27543,7 @@
|
||||
function clamp(value, min, max) {
|
||||
return Math.min(Math.max(value, min), max);
|
||||
}
|
||||
function dragFigureForResize(initialFigure, dirX, dirY, { x: mouseX, y: mouseY }, { x: mouseInitialX, y: mouseInitialY }, keepRatio, minFigSize) {
|
||||
function dragFigureForResize(initialFigure, dirX, dirY, { x: mouseX, y: mouseY }, { x: mouseInitialX, y: mouseInitialY }, keepRatio, minFigSize, { scrollX, scrollY }) {
|
||||
let { x, y, width, height } = initialFigure;
|
||||
if (keepRatio && dirX != 0 && dirY != 0) {
|
||||
const deltaX = Math.min(dirX * (mouseInitialX - mouseX), initialFigure.width - minFigSize);
|
||||
@@ -27570,14 +27570,14 @@
|
||||
y = initialFigure.y - deltaY;
|
||||
}
|
||||
}
|
||||
// Restrict resizing if x or y reaches header boundaries
|
||||
if (x < 0) {
|
||||
width += x;
|
||||
x = 0;
|
||||
// Adjusts figure dimensions to ensure it remains within header boundaries and viewport during resizing.
|
||||
if (x + scrollX <= 0) {
|
||||
width = width + x + scrollX;
|
||||
x = -scrollX;
|
||||
}
|
||||
if (y < 0) {
|
||||
height += y;
|
||||
y = 0;
|
||||
if (y + scrollY <= 0) {
|
||||
height = height + y + scrollY;
|
||||
y = -scrollY;
|
||||
}
|
||||
return { ...initialFigure, x, y, width, height };
|
||||
}
|
||||
@@ -27994,7 +27994,7 @@
|
||||
const minFigSize = figureRegistry.get(figure.tag).minFigSize || MIN_FIG_SIZE;
|
||||
const onMouseMove = (ev) => {
|
||||
const currentMousePosition = { x: ev.clientX, y: ev.clientY };
|
||||
const draggedFigure = dragFigureForResize(initialFig, dirX, dirY, currentMousePosition, initialMousePosition, keepRatio, minFigSize);
|
||||
const draggedFigure = dragFigureForResize(initialFig, dirX, dirY, currentMousePosition, initialMousePosition, keepRatio, minFigSize, this.env.model.getters.getActiveSheetScrollInfo());
|
||||
const otherFigures = this.getOtherFigures(figure.id);
|
||||
const snapResult = snapForResize(this.env.model.getters, dirX, dirY, draggedFigure, otherFigures);
|
||||
this.dnd.draggedFigure = snapResult.snappedFigure;
|
||||
@@ -36824,6 +36824,15 @@
|
||||
return "Success" /* CommandResult.Success */;
|
||||
}
|
||||
}
|
||||
beforeHandle(cmd) {
|
||||
switch (cmd.type) {
|
||||
case "DELETE_SHEET":
|
||||
this.getters.getFigures(cmd.sheetId).forEach((figure) => {
|
||||
this.dispatch("DELETE_FIGURE", { id: figure.id, sheetId: cmd.sheetId });
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
handle(cmd) {
|
||||
switch (cmd.type) {
|
||||
case "CREATE_SHEET":
|
||||
@@ -51181,6 +51190,9 @@
|
||||
this.scrollToSheet();
|
||||
}
|
||||
onDblClick() {
|
||||
if (this.env.model.getters.isReadonly()) {
|
||||
return;
|
||||
}
|
||||
this.startEdition();
|
||||
}
|
||||
onKeyDown(ev) {
|
||||
@@ -56955,9 +56967,9 @@
|
||||
exports.tokenize = tokenize;
|
||||
|
||||
|
||||
__info__.version = "17.0.14";
|
||||
__info__.date = "2024-03-12T08:05:09.046Z";
|
||||
__info__.hash = "6f6e1b9dd";
|
||||
__info__.version = "17.0.15";
|
||||
__info__.date = "2024-03-15T12:12:08.617Z";
|
||||
__info__.hash = "e02add99e";
|
||||
|
||||
|
||||
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<!--
|
||||
This file is generated by o-spreadsheet build tools. Do not edit it.
|
||||
@see https://github.com/odoo/o-spreadsheet
|
||||
@version 17.0.14
|
||||
@date 2024-03-12T08:05:11.487Z
|
||||
@hash 6f6e1b9dd
|
||||
@version 17.0.15
|
||||
@date 2024-03-15T12:12:11.192Z
|
||||
@hash e02add99e
|
||||
-->
|
||||
<odoo>
|
||||
<t t-name="o-spreadsheet-ActionButton">
|
||||
|
||||
Reference in New Issue
Block a user