@odoo/o-spreadsheet 17.2.30 → 17.2.32
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 +63 -25
- package/dist/o-spreadsheet.d.ts +14 -0
- package/dist/o-spreadsheet.esm.js +63 -25
- package/dist/o-spreadsheet.iife.js +63 -25
- package/dist/o-spreadsheet.iife.min.js +7 -7
- package/dist/o_spreadsheet.xml +3 -3
- package/package.json +2 -2
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
5
5
|
* @see https://github.com/odoo/o-spreadsheet
|
|
6
|
-
* @version 17.2.
|
|
7
|
-
* @date
|
|
8
|
-
* @hash
|
|
6
|
+
* @version 17.2.32
|
|
7
|
+
* @date 2025-01-15T08:03:19.290Z
|
|
8
|
+
* @hash e12286d
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
@@ -20245,7 +20245,7 @@ function createGaugeChartRuntime(chart, getters) {
|
|
|
20245
20245
|
colors.push(chartColors.upperColor);
|
|
20246
20246
|
return {
|
|
20247
20247
|
background: getters.getStyleOfSingleCellChart(chart.background, dataRange).background,
|
|
20248
|
-
title: chart.title,
|
|
20248
|
+
title: _t(chart.title),
|
|
20249
20249
|
minValue: {
|
|
20250
20250
|
value: minValue,
|
|
20251
20251
|
label: formatValue(minValue, { locale, format }),
|
|
@@ -31582,14 +31582,11 @@ unGroupHeadersMenuRegistry
|
|
|
31582
31582
|
});
|
|
31583
31583
|
|
|
31584
31584
|
class DOMFocusableElementStore {
|
|
31585
|
-
mutators = ["setFocusableElement"
|
|
31585
|
+
mutators = ["setFocusableElement"];
|
|
31586
31586
|
focusableElement = undefined;
|
|
31587
31587
|
setFocusableElement(element) {
|
|
31588
31588
|
this.focusableElement = element;
|
|
31589
31589
|
}
|
|
31590
|
-
focus() {
|
|
31591
|
-
this.focusableElement?.focus();
|
|
31592
|
-
}
|
|
31593
31590
|
}
|
|
31594
31591
|
|
|
31595
31592
|
// -----------------------------------------------------------------------------
|
|
@@ -32929,7 +32926,7 @@ class GridComposer extends owl.Component {
|
|
|
32929
32926
|
this.isEditing = isEditing;
|
|
32930
32927
|
if (!isEditing) {
|
|
32931
32928
|
this.rect = this.defaultRect;
|
|
32932
|
-
this.DOMFocusableElementStore.focus();
|
|
32929
|
+
this.DOMFocusableElementStore.focusableElement?.focus();
|
|
32933
32930
|
return;
|
|
32934
32931
|
}
|
|
32935
32932
|
const position = this.env.model.getters.getActivePosition();
|
|
@@ -35865,7 +35862,7 @@ class Grid extends owl.Component {
|
|
|
35865
35862
|
this.cellPopovers = useStore(CellPopoverStore);
|
|
35866
35863
|
owl.useEffect(() => {
|
|
35867
35864
|
if (!this.sidePanel.isOpen) {
|
|
35868
|
-
this.DOMFocusableElementStore.focus();
|
|
35865
|
+
this.DOMFocusableElementStore.focusableElement?.focus();
|
|
35869
35866
|
}
|
|
35870
35867
|
}, () => [this.sidePanel.isOpen]);
|
|
35871
35868
|
}
|
|
@@ -36069,7 +36066,7 @@ class Grid extends owl.Component {
|
|
|
36069
36066
|
focusDefaultElement() {
|
|
36070
36067
|
if (!this.env.model.getters.getSelectedFigureId() &&
|
|
36071
36068
|
this.composerStore.editionMode === "inactive") {
|
|
36072
|
-
this.DOMFocusableElementStore.focus();
|
|
36069
|
+
this.DOMFocusableElementStore.focusableElement?.focus();
|
|
36073
36070
|
}
|
|
36074
36071
|
}
|
|
36075
36072
|
get gridEl() {
|
|
@@ -37911,7 +37908,7 @@ function convertFigure(figure, id, sheetData) {
|
|
|
37911
37908
|
return undefined;
|
|
37912
37909
|
}
|
|
37913
37910
|
function isChartData(data) {
|
|
37914
|
-
return "dataSets" in data;
|
|
37911
|
+
return "dataSets" in data && data.dataSets.length > 0;
|
|
37915
37912
|
}
|
|
37916
37913
|
function isImageData(data) {
|
|
37917
37914
|
return "imageSrc" in data;
|
|
@@ -40708,10 +40705,34 @@ class BordersPlugin extends CorePlugin {
|
|
|
40708
40705
|
const elements = [...cmd.elements].sort((a, b) => b - a);
|
|
40709
40706
|
for (const group of groupConsecutive(elements)) {
|
|
40710
40707
|
if (cmd.dimension === "COL") {
|
|
40711
|
-
|
|
40708
|
+
if (group[0] >= this.getters.getNumberCols(cmd.sheetId)) {
|
|
40709
|
+
for (let row = 0; row < this.getters.getNumberRows(cmd.sheetId); row++) {
|
|
40710
|
+
this.history.update("borders", cmd.sheetId, group[0] + 1, row, "vertical", undefined);
|
|
40711
|
+
}
|
|
40712
|
+
}
|
|
40713
|
+
if (group[group.length - 1] === 0) {
|
|
40714
|
+
for (let row = 0; row < this.getters.getNumberRows(cmd.sheetId); row++) {
|
|
40715
|
+
this.history.update("borders", cmd.sheetId, 0, row, "vertical", undefined);
|
|
40716
|
+
}
|
|
40717
|
+
}
|
|
40718
|
+
const zone = this.getters.getColsZone(cmd.sheetId, group[group.length - 1] + 1, group[0]);
|
|
40719
|
+
this.clearInsideBorders(cmd.sheetId, [zone]);
|
|
40720
|
+
this.shiftBordersHorizontally(cmd.sheetId, group[0] + 1, -group.length);
|
|
40712
40721
|
}
|
|
40713
40722
|
else {
|
|
40714
|
-
|
|
40723
|
+
if (group[0] >= this.getters.getNumberRows(cmd.sheetId)) {
|
|
40724
|
+
for (let col = 0; col < this.getters.getNumberCols(cmd.sheetId); col++) {
|
|
40725
|
+
this.history.update("borders", cmd.sheetId, col, group[0] + 1, "horizontal", undefined);
|
|
40726
|
+
}
|
|
40727
|
+
}
|
|
40728
|
+
if (group[group.length - 1] === 0) {
|
|
40729
|
+
for (let col = 0; col < this.getters.getNumberCols(cmd.sheetId); col++) {
|
|
40730
|
+
this.history.update("borders", cmd.sheetId, col, 0, "horizontal", undefined);
|
|
40731
|
+
}
|
|
40732
|
+
}
|
|
40733
|
+
const zone = this.getters.getRowsZone(cmd.sheetId, group[group.length - 1] + 1, group[0]);
|
|
40734
|
+
this.clearInsideBorders(cmd.sheetId, [zone]);
|
|
40735
|
+
this.shiftBordersVertically(cmd.sheetId, group[0] + 1, -group.length);
|
|
40715
40736
|
}
|
|
40716
40737
|
}
|
|
40717
40738
|
break;
|
|
@@ -41018,6 +41039,18 @@ class BordersPlugin extends CorePlugin {
|
|
|
41018
41039
|
}
|
|
41019
41040
|
}
|
|
41020
41041
|
}
|
|
41042
|
+
/**
|
|
41043
|
+
* Remove the borders inside of a zone
|
|
41044
|
+
*/
|
|
41045
|
+
clearInsideBorders(sheetId, zones) {
|
|
41046
|
+
for (let zone of zones) {
|
|
41047
|
+
for (let row = zone.top; row <= zone.bottom; row++) {
|
|
41048
|
+
for (let col = zone.left; col <= zone.right; col++) {
|
|
41049
|
+
this.history.update("borders", sheetId, col, row, undefined);
|
|
41050
|
+
}
|
|
41051
|
+
}
|
|
41052
|
+
}
|
|
41053
|
+
}
|
|
41021
41054
|
/**
|
|
41022
41055
|
* Add a border to the existing one to a cell
|
|
41023
41056
|
*/
|
|
@@ -55150,11 +55183,6 @@ class BottomBarSheet extends owl.Component {
|
|
|
55150
55183
|
editionState = "initializing";
|
|
55151
55184
|
DOMFocusableElementStore;
|
|
55152
55185
|
setup() {
|
|
55153
|
-
owl.onMounted(() => {
|
|
55154
|
-
if (this.isSheetActive) {
|
|
55155
|
-
this.scrollToSheet();
|
|
55156
|
-
}
|
|
55157
|
-
});
|
|
55158
55186
|
owl.onPatched(() => {
|
|
55159
55187
|
if (this.sheetNameRef.el && this.state.isEditing && this.editionState === "initializing") {
|
|
55160
55188
|
this.editionState = "editing";
|
|
@@ -55162,6 +55190,11 @@ class BottomBarSheet extends owl.Component {
|
|
|
55162
55190
|
}
|
|
55163
55191
|
});
|
|
55164
55192
|
this.DOMFocusableElementStore = useStore(DOMFocusableElementStore);
|
|
55193
|
+
owl.useEffect((sheetId) => {
|
|
55194
|
+
if (this.props.sheetId === sheetId) {
|
|
55195
|
+
this.scrollToSheet();
|
|
55196
|
+
}
|
|
55197
|
+
}, () => [this.env.model.getters.getActiveSheetId()]);
|
|
55165
55198
|
}
|
|
55166
55199
|
focusInputAndSelectContent() {
|
|
55167
55200
|
if (!this.state.isEditing || !this.sheetNameRef.el)
|
|
@@ -55173,7 +55206,10 @@ class BottomBarSheet extends owl.Component {
|
|
|
55173
55206
|
}
|
|
55174
55207
|
}
|
|
55175
55208
|
scrollToSheet() {
|
|
55176
|
-
this.sheetDivRef.el?.scrollIntoView?.(
|
|
55209
|
+
this.sheetDivRef.el?.scrollIntoView?.({
|
|
55210
|
+
behavior: "smooth",
|
|
55211
|
+
inline: "nearest",
|
|
55212
|
+
});
|
|
55177
55213
|
}
|
|
55178
55214
|
onFocusOut() {
|
|
55179
55215
|
if (this.state.isEditing && this.editionState !== "initializing") {
|
|
@@ -55203,11 +55239,11 @@ class BottomBarSheet extends owl.Component {
|
|
|
55203
55239
|
if (ev.key === "Enter") {
|
|
55204
55240
|
ev.preventDefault();
|
|
55205
55241
|
this.stopEdition();
|
|
55206
|
-
this.DOMFocusableElementStore.focus();
|
|
55242
|
+
this.DOMFocusableElementStore.focusableElement?.focus();
|
|
55207
55243
|
}
|
|
55208
55244
|
if (ev.key === "Escape") {
|
|
55209
55245
|
this.cancelEdition();
|
|
55210
|
-
this.DOMFocusableElementStore.focus();
|
|
55246
|
+
this.DOMFocusableElementStore.focusableElement?.focus();
|
|
55211
55247
|
}
|
|
55212
55248
|
}
|
|
55213
55249
|
onMouseEventSheetName(ev) {
|
|
@@ -60921,6 +60957,8 @@ const helpers = {
|
|
|
60921
60957
|
expandZoneOnInsertion,
|
|
60922
60958
|
reduceZoneOnDeletion,
|
|
60923
60959
|
unquote,
|
|
60960
|
+
isNumber,
|
|
60961
|
+
isDateTime,
|
|
60924
60962
|
};
|
|
60925
60963
|
const links = {
|
|
60926
60964
|
isMarkdownLink,
|
|
@@ -61035,6 +61073,6 @@ exports.tokenColors = tokenColors;
|
|
|
61035
61073
|
exports.tokenize = tokenize;
|
|
61036
61074
|
|
|
61037
61075
|
|
|
61038
|
-
__info__.version = "17.2.
|
|
61039
|
-
__info__.date = "
|
|
61040
|
-
__info__.hash = "
|
|
61076
|
+
__info__.version = "17.2.32";
|
|
61077
|
+
__info__.date = "2025-01-15T08:03:19.290Z";
|
|
61078
|
+
__info__.hash = "e12286d";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -2334,6 +2334,10 @@ declare class BordersPlugin extends CorePlugin<BordersPluginState> implements Bo
|
|
|
2334
2334
|
* Remove the borders of a zone
|
|
2335
2335
|
*/
|
|
2336
2336
|
private clearBorders;
|
|
2337
|
+
/**
|
|
2338
|
+
* Remove the borders inside of a zone
|
|
2339
|
+
*/
|
|
2340
|
+
private clearInsideBorders;
|
|
2337
2341
|
/**
|
|
2338
2342
|
* Add a border to the existing one to a cell
|
|
2339
2343
|
*/
|
|
@@ -4918,6 +4922,7 @@ declare class DateTime {
|
|
|
4918
4922
|
setMinutes(minutes: number): number;
|
|
4919
4923
|
setSeconds(seconds: number): number;
|
|
4920
4924
|
}
|
|
4925
|
+
declare function isDateTime(str: string, locale: Locale): boolean;
|
|
4921
4926
|
|
|
4922
4927
|
/**
|
|
4923
4928
|
* Formats a cell value with its format.
|
|
@@ -4955,6 +4960,13 @@ declare function lazy<T>(fn: (() => T) | T): Lazy<T>;
|
|
|
4955
4960
|
*/
|
|
4956
4961
|
declare function deepEquals(o1: any, o2: any): boolean;
|
|
4957
4962
|
|
|
4963
|
+
/**
|
|
4964
|
+
* Return true if the argument is a "number string".
|
|
4965
|
+
*
|
|
4966
|
+
* Note that "" (empty string) does not count as a number string
|
|
4967
|
+
*/
|
|
4968
|
+
declare function isNumber(value: string | undefined, locale: Locale): boolean;
|
|
4969
|
+
|
|
4958
4970
|
interface ConstructorArgs {
|
|
4959
4971
|
readonly zone: Readonly<Zone | UnboundedZone>;
|
|
4960
4972
|
readonly parts: readonly RangePart[];
|
|
@@ -10025,6 +10037,8 @@ declare const helpers: {
|
|
|
10025
10037
|
expandZoneOnInsertion: typeof expandZoneOnInsertion;
|
|
10026
10038
|
reduceZoneOnDeletion: typeof reduceZoneOnDeletion;
|
|
10027
10039
|
unquote: typeof unquote;
|
|
10040
|
+
isNumber: typeof isNumber;
|
|
10041
|
+
isDateTime: typeof isDateTime;
|
|
10028
10042
|
};
|
|
10029
10043
|
declare const links: {
|
|
10030
10044
|
isMarkdownLink: typeof isMarkdownLink;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
5
5
|
* @see https://github.com/odoo/o-spreadsheet
|
|
6
|
-
* @version 17.2.
|
|
7
|
-
* @date
|
|
8
|
-
* @hash
|
|
6
|
+
* @version 17.2.32
|
|
7
|
+
* @date 2025-01-15T08:03:19.290Z
|
|
8
|
+
* @hash e12286d
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, useState, onPatched, onWillPatch, onWillUpdateProps, useExternalListener, onWillStart, xml, useChildSubEnv, markRaw } from '@odoo/owl';
|
|
@@ -20243,7 +20243,7 @@ function createGaugeChartRuntime(chart, getters) {
|
|
|
20243
20243
|
colors.push(chartColors.upperColor);
|
|
20244
20244
|
return {
|
|
20245
20245
|
background: getters.getStyleOfSingleCellChart(chart.background, dataRange).background,
|
|
20246
|
-
title: chart.title,
|
|
20246
|
+
title: _t(chart.title),
|
|
20247
20247
|
minValue: {
|
|
20248
20248
|
value: minValue,
|
|
20249
20249
|
label: formatValue(minValue, { locale, format }),
|
|
@@ -31580,14 +31580,11 @@ unGroupHeadersMenuRegistry
|
|
|
31580
31580
|
});
|
|
31581
31581
|
|
|
31582
31582
|
class DOMFocusableElementStore {
|
|
31583
|
-
mutators = ["setFocusableElement"
|
|
31583
|
+
mutators = ["setFocusableElement"];
|
|
31584
31584
|
focusableElement = undefined;
|
|
31585
31585
|
setFocusableElement(element) {
|
|
31586
31586
|
this.focusableElement = element;
|
|
31587
31587
|
}
|
|
31588
|
-
focus() {
|
|
31589
|
-
this.focusableElement?.focus();
|
|
31590
|
-
}
|
|
31591
31588
|
}
|
|
31592
31589
|
|
|
31593
31590
|
// -----------------------------------------------------------------------------
|
|
@@ -32927,7 +32924,7 @@ class GridComposer extends Component {
|
|
|
32927
32924
|
this.isEditing = isEditing;
|
|
32928
32925
|
if (!isEditing) {
|
|
32929
32926
|
this.rect = this.defaultRect;
|
|
32930
|
-
this.DOMFocusableElementStore.focus();
|
|
32927
|
+
this.DOMFocusableElementStore.focusableElement?.focus();
|
|
32931
32928
|
return;
|
|
32932
32929
|
}
|
|
32933
32930
|
const position = this.env.model.getters.getActivePosition();
|
|
@@ -35863,7 +35860,7 @@ class Grid extends Component {
|
|
|
35863
35860
|
this.cellPopovers = useStore(CellPopoverStore);
|
|
35864
35861
|
useEffect(() => {
|
|
35865
35862
|
if (!this.sidePanel.isOpen) {
|
|
35866
|
-
this.DOMFocusableElementStore.focus();
|
|
35863
|
+
this.DOMFocusableElementStore.focusableElement?.focus();
|
|
35867
35864
|
}
|
|
35868
35865
|
}, () => [this.sidePanel.isOpen]);
|
|
35869
35866
|
}
|
|
@@ -36067,7 +36064,7 @@ class Grid extends Component {
|
|
|
36067
36064
|
focusDefaultElement() {
|
|
36068
36065
|
if (!this.env.model.getters.getSelectedFigureId() &&
|
|
36069
36066
|
this.composerStore.editionMode === "inactive") {
|
|
36070
|
-
this.DOMFocusableElementStore.focus();
|
|
36067
|
+
this.DOMFocusableElementStore.focusableElement?.focus();
|
|
36071
36068
|
}
|
|
36072
36069
|
}
|
|
36073
36070
|
get gridEl() {
|
|
@@ -37909,7 +37906,7 @@ function convertFigure(figure, id, sheetData) {
|
|
|
37909
37906
|
return undefined;
|
|
37910
37907
|
}
|
|
37911
37908
|
function isChartData(data) {
|
|
37912
|
-
return "dataSets" in data;
|
|
37909
|
+
return "dataSets" in data && data.dataSets.length > 0;
|
|
37913
37910
|
}
|
|
37914
37911
|
function isImageData(data) {
|
|
37915
37912
|
return "imageSrc" in data;
|
|
@@ -40706,10 +40703,34 @@ class BordersPlugin extends CorePlugin {
|
|
|
40706
40703
|
const elements = [...cmd.elements].sort((a, b) => b - a);
|
|
40707
40704
|
for (const group of groupConsecutive(elements)) {
|
|
40708
40705
|
if (cmd.dimension === "COL") {
|
|
40709
|
-
|
|
40706
|
+
if (group[0] >= this.getters.getNumberCols(cmd.sheetId)) {
|
|
40707
|
+
for (let row = 0; row < this.getters.getNumberRows(cmd.sheetId); row++) {
|
|
40708
|
+
this.history.update("borders", cmd.sheetId, group[0] + 1, row, "vertical", undefined);
|
|
40709
|
+
}
|
|
40710
|
+
}
|
|
40711
|
+
if (group[group.length - 1] === 0) {
|
|
40712
|
+
for (let row = 0; row < this.getters.getNumberRows(cmd.sheetId); row++) {
|
|
40713
|
+
this.history.update("borders", cmd.sheetId, 0, row, "vertical", undefined);
|
|
40714
|
+
}
|
|
40715
|
+
}
|
|
40716
|
+
const zone = this.getters.getColsZone(cmd.sheetId, group[group.length - 1] + 1, group[0]);
|
|
40717
|
+
this.clearInsideBorders(cmd.sheetId, [zone]);
|
|
40718
|
+
this.shiftBordersHorizontally(cmd.sheetId, group[0] + 1, -group.length);
|
|
40710
40719
|
}
|
|
40711
40720
|
else {
|
|
40712
|
-
|
|
40721
|
+
if (group[0] >= this.getters.getNumberRows(cmd.sheetId)) {
|
|
40722
|
+
for (let col = 0; col < this.getters.getNumberCols(cmd.sheetId); col++) {
|
|
40723
|
+
this.history.update("borders", cmd.sheetId, col, group[0] + 1, "horizontal", undefined);
|
|
40724
|
+
}
|
|
40725
|
+
}
|
|
40726
|
+
if (group[group.length - 1] === 0) {
|
|
40727
|
+
for (let col = 0; col < this.getters.getNumberCols(cmd.sheetId); col++) {
|
|
40728
|
+
this.history.update("borders", cmd.sheetId, col, 0, "horizontal", undefined);
|
|
40729
|
+
}
|
|
40730
|
+
}
|
|
40731
|
+
const zone = this.getters.getRowsZone(cmd.sheetId, group[group.length - 1] + 1, group[0]);
|
|
40732
|
+
this.clearInsideBorders(cmd.sheetId, [zone]);
|
|
40733
|
+
this.shiftBordersVertically(cmd.sheetId, group[0] + 1, -group.length);
|
|
40713
40734
|
}
|
|
40714
40735
|
}
|
|
40715
40736
|
break;
|
|
@@ -41016,6 +41037,18 @@ class BordersPlugin extends CorePlugin {
|
|
|
41016
41037
|
}
|
|
41017
41038
|
}
|
|
41018
41039
|
}
|
|
41040
|
+
/**
|
|
41041
|
+
* Remove the borders inside of a zone
|
|
41042
|
+
*/
|
|
41043
|
+
clearInsideBorders(sheetId, zones) {
|
|
41044
|
+
for (let zone of zones) {
|
|
41045
|
+
for (let row = zone.top; row <= zone.bottom; row++) {
|
|
41046
|
+
for (let col = zone.left; col <= zone.right; col++) {
|
|
41047
|
+
this.history.update("borders", sheetId, col, row, undefined);
|
|
41048
|
+
}
|
|
41049
|
+
}
|
|
41050
|
+
}
|
|
41051
|
+
}
|
|
41019
41052
|
/**
|
|
41020
41053
|
* Add a border to the existing one to a cell
|
|
41021
41054
|
*/
|
|
@@ -55148,11 +55181,6 @@ class BottomBarSheet extends Component {
|
|
|
55148
55181
|
editionState = "initializing";
|
|
55149
55182
|
DOMFocusableElementStore;
|
|
55150
55183
|
setup() {
|
|
55151
|
-
onMounted(() => {
|
|
55152
|
-
if (this.isSheetActive) {
|
|
55153
|
-
this.scrollToSheet();
|
|
55154
|
-
}
|
|
55155
|
-
});
|
|
55156
55184
|
onPatched(() => {
|
|
55157
55185
|
if (this.sheetNameRef.el && this.state.isEditing && this.editionState === "initializing") {
|
|
55158
55186
|
this.editionState = "editing";
|
|
@@ -55160,6 +55188,11 @@ class BottomBarSheet extends Component {
|
|
|
55160
55188
|
}
|
|
55161
55189
|
});
|
|
55162
55190
|
this.DOMFocusableElementStore = useStore(DOMFocusableElementStore);
|
|
55191
|
+
useEffect((sheetId) => {
|
|
55192
|
+
if (this.props.sheetId === sheetId) {
|
|
55193
|
+
this.scrollToSheet();
|
|
55194
|
+
}
|
|
55195
|
+
}, () => [this.env.model.getters.getActiveSheetId()]);
|
|
55163
55196
|
}
|
|
55164
55197
|
focusInputAndSelectContent() {
|
|
55165
55198
|
if (!this.state.isEditing || !this.sheetNameRef.el)
|
|
@@ -55171,7 +55204,10 @@ class BottomBarSheet extends Component {
|
|
|
55171
55204
|
}
|
|
55172
55205
|
}
|
|
55173
55206
|
scrollToSheet() {
|
|
55174
|
-
this.sheetDivRef.el?.scrollIntoView?.(
|
|
55207
|
+
this.sheetDivRef.el?.scrollIntoView?.({
|
|
55208
|
+
behavior: "smooth",
|
|
55209
|
+
inline: "nearest",
|
|
55210
|
+
});
|
|
55175
55211
|
}
|
|
55176
55212
|
onFocusOut() {
|
|
55177
55213
|
if (this.state.isEditing && this.editionState !== "initializing") {
|
|
@@ -55201,11 +55237,11 @@ class BottomBarSheet extends Component {
|
|
|
55201
55237
|
if (ev.key === "Enter") {
|
|
55202
55238
|
ev.preventDefault();
|
|
55203
55239
|
this.stopEdition();
|
|
55204
|
-
this.DOMFocusableElementStore.focus();
|
|
55240
|
+
this.DOMFocusableElementStore.focusableElement?.focus();
|
|
55205
55241
|
}
|
|
55206
55242
|
if (ev.key === "Escape") {
|
|
55207
55243
|
this.cancelEdition();
|
|
55208
|
-
this.DOMFocusableElementStore.focus();
|
|
55244
|
+
this.DOMFocusableElementStore.focusableElement?.focus();
|
|
55209
55245
|
}
|
|
55210
55246
|
}
|
|
55211
55247
|
onMouseEventSheetName(ev) {
|
|
@@ -60919,6 +60955,8 @@ const helpers = {
|
|
|
60919
60955
|
expandZoneOnInsertion,
|
|
60920
60956
|
reduceZoneOnDeletion,
|
|
60921
60957
|
unquote,
|
|
60958
|
+
isNumber,
|
|
60959
|
+
isDateTime,
|
|
60922
60960
|
};
|
|
60923
60961
|
const links = {
|
|
60924
60962
|
isMarkdownLink,
|
|
@@ -60992,6 +61030,6 @@ const constants = {
|
|
|
60992
61030
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, 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 };
|
|
60993
61031
|
|
|
60994
61032
|
|
|
60995
|
-
__info__.version = "17.2.
|
|
60996
|
-
__info__.date = "
|
|
60997
|
-
__info__.hash = "
|
|
61033
|
+
__info__.version = "17.2.32";
|
|
61034
|
+
__info__.date = "2025-01-15T08:03:19.290Z";
|
|
61035
|
+
__info__.hash = "e12286d";
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
5
5
|
* @see https://github.com/odoo/o-spreadsheet
|
|
6
|
-
* @version 17.2.
|
|
7
|
-
* @date
|
|
8
|
-
* @hash
|
|
6
|
+
* @version 17.2.32
|
|
7
|
+
* @date 2025-01-15T08:03:19.290Z
|
|
8
|
+
* @hash e12286d
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
(function (exports, owl) {
|
|
@@ -20244,7 +20244,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
20244
20244
|
colors.push(chartColors.upperColor);
|
|
20245
20245
|
return {
|
|
20246
20246
|
background: getters.getStyleOfSingleCellChart(chart.background, dataRange).background,
|
|
20247
|
-
title: chart.title,
|
|
20247
|
+
title: _t(chart.title),
|
|
20248
20248
|
minValue: {
|
|
20249
20249
|
value: minValue,
|
|
20250
20250
|
label: formatValue(minValue, { locale, format }),
|
|
@@ -31581,14 +31581,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
31581
31581
|
});
|
|
31582
31582
|
|
|
31583
31583
|
class DOMFocusableElementStore {
|
|
31584
|
-
mutators = ["setFocusableElement"
|
|
31584
|
+
mutators = ["setFocusableElement"];
|
|
31585
31585
|
focusableElement = undefined;
|
|
31586
31586
|
setFocusableElement(element) {
|
|
31587
31587
|
this.focusableElement = element;
|
|
31588
31588
|
}
|
|
31589
|
-
focus() {
|
|
31590
|
-
this.focusableElement?.focus();
|
|
31591
|
-
}
|
|
31592
31589
|
}
|
|
31593
31590
|
|
|
31594
31591
|
// -----------------------------------------------------------------------------
|
|
@@ -32928,7 +32925,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
32928
32925
|
this.isEditing = isEditing;
|
|
32929
32926
|
if (!isEditing) {
|
|
32930
32927
|
this.rect = this.defaultRect;
|
|
32931
|
-
this.DOMFocusableElementStore.focus();
|
|
32928
|
+
this.DOMFocusableElementStore.focusableElement?.focus();
|
|
32932
32929
|
return;
|
|
32933
32930
|
}
|
|
32934
32931
|
const position = this.env.model.getters.getActivePosition();
|
|
@@ -35864,7 +35861,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
35864
35861
|
this.cellPopovers = useStore(CellPopoverStore);
|
|
35865
35862
|
owl.useEffect(() => {
|
|
35866
35863
|
if (!this.sidePanel.isOpen) {
|
|
35867
|
-
this.DOMFocusableElementStore.focus();
|
|
35864
|
+
this.DOMFocusableElementStore.focusableElement?.focus();
|
|
35868
35865
|
}
|
|
35869
35866
|
}, () => [this.sidePanel.isOpen]);
|
|
35870
35867
|
}
|
|
@@ -36068,7 +36065,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
36068
36065
|
focusDefaultElement() {
|
|
36069
36066
|
if (!this.env.model.getters.getSelectedFigureId() &&
|
|
36070
36067
|
this.composerStore.editionMode === "inactive") {
|
|
36071
|
-
this.DOMFocusableElementStore.focus();
|
|
36068
|
+
this.DOMFocusableElementStore.focusableElement?.focus();
|
|
36072
36069
|
}
|
|
36073
36070
|
}
|
|
36074
36071
|
get gridEl() {
|
|
@@ -37910,7 +37907,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
37910
37907
|
return undefined;
|
|
37911
37908
|
}
|
|
37912
37909
|
function isChartData(data) {
|
|
37913
|
-
return "dataSets" in data;
|
|
37910
|
+
return "dataSets" in data && data.dataSets.length > 0;
|
|
37914
37911
|
}
|
|
37915
37912
|
function isImageData(data) {
|
|
37916
37913
|
return "imageSrc" in data;
|
|
@@ -40707,10 +40704,34 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
40707
40704
|
const elements = [...cmd.elements].sort((a, b) => b - a);
|
|
40708
40705
|
for (const group of groupConsecutive(elements)) {
|
|
40709
40706
|
if (cmd.dimension === "COL") {
|
|
40710
|
-
|
|
40707
|
+
if (group[0] >= this.getters.getNumberCols(cmd.sheetId)) {
|
|
40708
|
+
for (let row = 0; row < this.getters.getNumberRows(cmd.sheetId); row++) {
|
|
40709
|
+
this.history.update("borders", cmd.sheetId, group[0] + 1, row, "vertical", undefined);
|
|
40710
|
+
}
|
|
40711
|
+
}
|
|
40712
|
+
if (group[group.length - 1] === 0) {
|
|
40713
|
+
for (let row = 0; row < this.getters.getNumberRows(cmd.sheetId); row++) {
|
|
40714
|
+
this.history.update("borders", cmd.sheetId, 0, row, "vertical", undefined);
|
|
40715
|
+
}
|
|
40716
|
+
}
|
|
40717
|
+
const zone = this.getters.getColsZone(cmd.sheetId, group[group.length - 1] + 1, group[0]);
|
|
40718
|
+
this.clearInsideBorders(cmd.sheetId, [zone]);
|
|
40719
|
+
this.shiftBordersHorizontally(cmd.sheetId, group[0] + 1, -group.length);
|
|
40711
40720
|
}
|
|
40712
40721
|
else {
|
|
40713
|
-
|
|
40722
|
+
if (group[0] >= this.getters.getNumberRows(cmd.sheetId)) {
|
|
40723
|
+
for (let col = 0; col < this.getters.getNumberCols(cmd.sheetId); col++) {
|
|
40724
|
+
this.history.update("borders", cmd.sheetId, col, group[0] + 1, "horizontal", undefined);
|
|
40725
|
+
}
|
|
40726
|
+
}
|
|
40727
|
+
if (group[group.length - 1] === 0) {
|
|
40728
|
+
for (let col = 0; col < this.getters.getNumberCols(cmd.sheetId); col++) {
|
|
40729
|
+
this.history.update("borders", cmd.sheetId, col, 0, "horizontal", undefined);
|
|
40730
|
+
}
|
|
40731
|
+
}
|
|
40732
|
+
const zone = this.getters.getRowsZone(cmd.sheetId, group[group.length - 1] + 1, group[0]);
|
|
40733
|
+
this.clearInsideBorders(cmd.sheetId, [zone]);
|
|
40734
|
+
this.shiftBordersVertically(cmd.sheetId, group[0] + 1, -group.length);
|
|
40714
40735
|
}
|
|
40715
40736
|
}
|
|
40716
40737
|
break;
|
|
@@ -41017,6 +41038,18 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
41017
41038
|
}
|
|
41018
41039
|
}
|
|
41019
41040
|
}
|
|
41041
|
+
/**
|
|
41042
|
+
* Remove the borders inside of a zone
|
|
41043
|
+
*/
|
|
41044
|
+
clearInsideBorders(sheetId, zones) {
|
|
41045
|
+
for (let zone of zones) {
|
|
41046
|
+
for (let row = zone.top; row <= zone.bottom; row++) {
|
|
41047
|
+
for (let col = zone.left; col <= zone.right; col++) {
|
|
41048
|
+
this.history.update("borders", sheetId, col, row, undefined);
|
|
41049
|
+
}
|
|
41050
|
+
}
|
|
41051
|
+
}
|
|
41052
|
+
}
|
|
41020
41053
|
/**
|
|
41021
41054
|
* Add a border to the existing one to a cell
|
|
41022
41055
|
*/
|
|
@@ -55149,11 +55182,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
55149
55182
|
editionState = "initializing";
|
|
55150
55183
|
DOMFocusableElementStore;
|
|
55151
55184
|
setup() {
|
|
55152
|
-
owl.onMounted(() => {
|
|
55153
|
-
if (this.isSheetActive) {
|
|
55154
|
-
this.scrollToSheet();
|
|
55155
|
-
}
|
|
55156
|
-
});
|
|
55157
55185
|
owl.onPatched(() => {
|
|
55158
55186
|
if (this.sheetNameRef.el && this.state.isEditing && this.editionState === "initializing") {
|
|
55159
55187
|
this.editionState = "editing";
|
|
@@ -55161,6 +55189,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
55161
55189
|
}
|
|
55162
55190
|
});
|
|
55163
55191
|
this.DOMFocusableElementStore = useStore(DOMFocusableElementStore);
|
|
55192
|
+
owl.useEffect((sheetId) => {
|
|
55193
|
+
if (this.props.sheetId === sheetId) {
|
|
55194
|
+
this.scrollToSheet();
|
|
55195
|
+
}
|
|
55196
|
+
}, () => [this.env.model.getters.getActiveSheetId()]);
|
|
55164
55197
|
}
|
|
55165
55198
|
focusInputAndSelectContent() {
|
|
55166
55199
|
if (!this.state.isEditing || !this.sheetNameRef.el)
|
|
@@ -55172,7 +55205,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
55172
55205
|
}
|
|
55173
55206
|
}
|
|
55174
55207
|
scrollToSheet() {
|
|
55175
|
-
this.sheetDivRef.el?.scrollIntoView?.(
|
|
55208
|
+
this.sheetDivRef.el?.scrollIntoView?.({
|
|
55209
|
+
behavior: "smooth",
|
|
55210
|
+
inline: "nearest",
|
|
55211
|
+
});
|
|
55176
55212
|
}
|
|
55177
55213
|
onFocusOut() {
|
|
55178
55214
|
if (this.state.isEditing && this.editionState !== "initializing") {
|
|
@@ -55202,11 +55238,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
55202
55238
|
if (ev.key === "Enter") {
|
|
55203
55239
|
ev.preventDefault();
|
|
55204
55240
|
this.stopEdition();
|
|
55205
|
-
this.DOMFocusableElementStore.focus();
|
|
55241
|
+
this.DOMFocusableElementStore.focusableElement?.focus();
|
|
55206
55242
|
}
|
|
55207
55243
|
if (ev.key === "Escape") {
|
|
55208
55244
|
this.cancelEdition();
|
|
55209
|
-
this.DOMFocusableElementStore.focus();
|
|
55245
|
+
this.DOMFocusableElementStore.focusableElement?.focus();
|
|
55210
55246
|
}
|
|
55211
55247
|
}
|
|
55212
55248
|
onMouseEventSheetName(ev) {
|
|
@@ -60920,6 +60956,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
60920
60956
|
expandZoneOnInsertion,
|
|
60921
60957
|
reduceZoneOnDeletion,
|
|
60922
60958
|
unquote,
|
|
60959
|
+
isNumber,
|
|
60960
|
+
isDateTime,
|
|
60923
60961
|
};
|
|
60924
60962
|
const links = {
|
|
60925
60963
|
isMarkdownLink,
|
|
@@ -61034,9 +61072,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
61034
61072
|
exports.tokenize = tokenize;
|
|
61035
61073
|
|
|
61036
61074
|
|
|
61037
|
-
__info__.version = "17.2.
|
|
61038
|
-
__info__.date = "
|
|
61039
|
-
__info__.hash = "
|
|
61075
|
+
__info__.version = "17.2.32";
|
|
61076
|
+
__info__.date = "2025-01-15T08:03:19.290Z";
|
|
61077
|
+
__info__.hash = "e12286d";
|
|
61040
61078
|
|
|
61041
61079
|
|
|
61042
61080
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|