From cf49fd2643fe7e2a3c4dafa01517a129591bcfb8 Mon Sep 17 00:00:00 2001 From: Pierre Rousseau Date: Mon, 10 Oct 2022 07:43:38 +0000 Subject: [PATCH] [IMP] spreadsheet: update o_spreadsheet to latest version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/1af8ad34 [IMP] filters: allow to update a filter in readonly mode https://github.com/odoo/o-spreadsheet/commit/706cc8ee [FIX] model: ensure that two getters cannot have the same name https://github.com/odoo/o-spreadsheet/commit/96067749 [IMP] grid: allow to remove content of a cell with backspace closes odoo/odoo#102807 Signed-off-by: Lucas Lefèvre (lul) --- .../static/src/o_spreadsheet/o_spreadsheet.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/addons/spreadsheet/static/src/o_spreadsheet/o_spreadsheet.js b/addons/spreadsheet/static/src/o_spreadsheet/o_spreadsheet.js index e034a3d839e..d52bb7221d2 100644 --- a/addons/spreadsheet/static/src/o_spreadsheet/o_spreadsheet.js +++ b/addons/spreadsheet/static/src/o_spreadsheet/o_spreadsheet.js @@ -2831,6 +2831,7 @@ "SET_FORMULA_VISIBILITY", "OPEN_CELL_POPOVER", "CLOSE_CELL_POPOVER", + "UPDATE_FILTER", ]); const coreTypes = new Set([ /** CELLS */ @@ -20422,6 +20423,12 @@ target: this.env.model.getters.getSelectedZones(), }); }, + BACKSPACE: () => { + this.env.model.dispatch("DELETE_CONTENT", { + sheetId: this.env.model.getters.getActiveSheetId(), + target: this.env.model.getters.getSelectedZones(), + }); + }, "CTRL+A": () => this.env.model.selection.loopSelection(), "CTRL+S": () => { var _a, _b; @@ -31196,7 +31203,6 @@ } } HeaderVisibilityUIPlugin.getters = [ - "getNextVisibleCellPosition", "getNextVisibleCellPosition", "findVisibleHeader", "findLastVisibleColRowIndex", @@ -39828,6 +39834,9 @@ if (!(name in plugin)) { throw new Error(`Invalid getter name: ${name} for plugin ${plugin.constructor}`); } + if (name in this.getters) { + throw new Error(`Getter "${name}" is already defined.`); + } this.getters[name] = plugin[name].bind(plugin); } this.uiPlugins.push(plugin); @@ -39847,6 +39856,9 @@ if (!(name in plugin)) { throw new Error(`Invalid getter name: ${name} for plugin ${plugin.constructor}`); } + if (name in this.coreGetters) { + throw new Error(`Getter "${name}" is already defined.`); + } this.coreGetters[name] = plugin[name].bind(plugin); } plugin.import(data); @@ -40116,8 +40128,8 @@ Object.defineProperty(exports, '__esModule', { value: true }); exports.__info__.version = '2.0.0'; - exports.__info__.date = '2022-10-07T17:05:50.112Z'; - exports.__info__.hash = '3558537'; + exports.__info__.date = '2022-10-10T07:43:36.847Z'; + exports.__info__.hash = '1af8ad3'; })(this.o_spreadsheet = this.o_spreadsheet || {}, owl); //# sourceMappingURL=o_spreadsheet.js.map