@odoo/o-spreadsheet 17.1.15 → 17.1.16
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 +25 -14
- package/dist/o-spreadsheet.esm.js +25 -14
- package/dist/o-spreadsheet.iife.js +25 -14
- package/dist/o-spreadsheet.iife.min.js +5 -5
- package/dist/o_spreadsheet.xml +3 -3
- package/package.json +1 -1
|
@@ -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.1.
|
|
6
|
-
* @date 2024-05-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.1.16
|
|
6
|
+
* @date 2024-05-24T11:27:23.083Z
|
|
7
|
+
* @hash 3a41c3a
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -567,8 +567,9 @@ function deepEquals(o1, o2, ignoreFunctions) {
|
|
|
567
567
|
return false;
|
|
568
568
|
}
|
|
569
569
|
else {
|
|
570
|
-
if (ignoreFunctions && typeOfO1Key === "function")
|
|
571
|
-
|
|
570
|
+
if (ignoreFunctions && typeOfO1Key === "function") {
|
|
571
|
+
continue;
|
|
572
|
+
}
|
|
572
573
|
if (o1[key] !== o2[key])
|
|
573
574
|
return false;
|
|
574
575
|
}
|
|
@@ -1802,7 +1803,7 @@ class LazyTranslatedString extends String {
|
|
|
1802
1803
|
}
|
|
1803
1804
|
valueOf() {
|
|
1804
1805
|
const str = super.valueOf();
|
|
1805
|
-
return _loaded() ? sprintf(_translate(str), ...this.values) : str;
|
|
1806
|
+
return _loaded() ? sprintf(_translate(str), ...this.values) : sprintf(str, ...this.values);
|
|
1806
1807
|
}
|
|
1807
1808
|
toString() {
|
|
1808
1809
|
return this.valueOf();
|
|
@@ -27177,7 +27178,7 @@ class Composer extends owl.Component {
|
|
|
27177
27178
|
"Ctrl+Enter": this.processNewLineEvent,
|
|
27178
27179
|
Escape: this.processEscapeKey,
|
|
27179
27180
|
F2: () => console.warn("Not implemented"),
|
|
27180
|
-
F4: this.processF4Key,
|
|
27181
|
+
F4: (ev) => this.processF4Key(ev),
|
|
27181
27182
|
Tab: (ev) => this.processTabKey(ev, "right"),
|
|
27182
27183
|
"Shift+Tab": (ev) => this.processTabKey(ev, "left"),
|
|
27183
27184
|
};
|
|
@@ -27291,9 +27292,10 @@ class Composer extends owl.Component {
|
|
|
27291
27292
|
processEscapeKey() {
|
|
27292
27293
|
this.env.model.dispatch("CANCEL_EDITION");
|
|
27293
27294
|
}
|
|
27294
|
-
processF4Key() {
|
|
27295
|
+
processF4Key(ev) {
|
|
27295
27296
|
this.env.model.dispatch("CYCLE_EDITION_REFERENCES");
|
|
27296
27297
|
this.processContent();
|
|
27298
|
+
ev.stopPropagation();
|
|
27297
27299
|
}
|
|
27298
27300
|
processNumpadDecimal(ev) {
|
|
27299
27301
|
ev.stopPropagation();
|
|
@@ -38454,7 +38456,12 @@ class MergePlugin extends CorePlugin {
|
|
|
38454
38456
|
* if they have at least a common cell
|
|
38455
38457
|
*/
|
|
38456
38458
|
doesIntersectMerge(sheetId, zone) {
|
|
38457
|
-
|
|
38459
|
+
for (const merge of this.getMerges(sheetId)) {
|
|
38460
|
+
if (overlap(zone, merge)) {
|
|
38461
|
+
return true;
|
|
38462
|
+
}
|
|
38463
|
+
}
|
|
38464
|
+
return false;
|
|
38458
38465
|
}
|
|
38459
38466
|
/**
|
|
38460
38467
|
* Returns true if two columns have at least one merge in common
|
|
@@ -48813,7 +48820,7 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
48813
48820
|
case "ADD_COLUMNS_ROWS": {
|
|
48814
48821
|
this.status = "invisible";
|
|
48815
48822
|
// If we add a col/row inside or before the cut area, we invalidate the clipboard
|
|
48816
|
-
if (this.state?.operation !== "CUT") {
|
|
48823
|
+
if (this.state?.operation !== "CUT" || cmd.sheetId !== this.state?.sheetId) {
|
|
48817
48824
|
return;
|
|
48818
48825
|
}
|
|
48819
48826
|
const isClipboardDirty = this.state.isColRowDirtyingClipboard(cmd.position === "before" ? cmd.base : cmd.base + 1, cmd.dimension);
|
|
@@ -48825,7 +48832,7 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
48825
48832
|
case "REMOVE_COLUMNS_ROWS": {
|
|
48826
48833
|
this.status = "invisible";
|
|
48827
48834
|
// If we remove a col/row inside or before the cut area, we invalidate the clipboard
|
|
48828
|
-
if (this.state?.operation !== "CUT") {
|
|
48835
|
+
if (this.state?.operation !== "CUT" || cmd.sheetId !== this.state?.sheetId) {
|
|
48829
48836
|
return;
|
|
48830
48837
|
}
|
|
48831
48838
|
for (let el of cmd.elements) {
|
|
@@ -53896,6 +53903,10 @@ class Spreadsheet extends owl.Component {
|
|
|
53896
53903
|
}, () => [this.env.model.getters.getActiveSheetId()]);
|
|
53897
53904
|
owl.useExternalListener(window, "resize", () => this.render(true));
|
|
53898
53905
|
owl.useExternalListener(window, "beforeunload", this.unbindModelEvents.bind(this));
|
|
53906
|
+
// For some reason, the wheel event is not properly registered inside templates
|
|
53907
|
+
// in Chromium-based browsers based on chromium 125
|
|
53908
|
+
// This hack ensures the event declared in the template is properly registered/working
|
|
53909
|
+
owl.useExternalListener(document.body, "wheel", () => { });
|
|
53899
53910
|
this.bindModelEvents();
|
|
53900
53911
|
owl.onWillUpdateProps((nextProps) => {
|
|
53901
53912
|
if (nextProps.model !== this.props.model) {
|
|
@@ -57731,6 +57742,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
57731
57742
|
exports.tokenize = tokenize;
|
|
57732
57743
|
|
|
57733
57744
|
|
|
57734
|
-
__info__.version = "17.1.
|
|
57735
|
-
__info__.date = "2024-05-
|
|
57736
|
-
__info__.hash = "
|
|
57745
|
+
__info__.version = "17.1.16";
|
|
57746
|
+
__info__.date = "2024-05-24T11:27:23.083Z";
|
|
57747
|
+
__info__.hash = "3a41c3a";
|
|
@@ -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.1.
|
|
6
|
-
* @date 2024-05-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.1.16
|
|
6
|
+
* @date 2024-05-24T11:27:23.083Z
|
|
7
|
+
* @hash 3a41c3a
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { Component, useRef, onMounted, onWillUnmount, useEffect, onWillPatch, useState, onWillUpdateProps, onPatched, useComponent, useExternalListener, onWillStart, xml, useChildSubEnv, useSubEnv, markRaw } from '@odoo/owl';
|
|
@@ -565,8 +565,9 @@ function deepEquals(o1, o2, ignoreFunctions) {
|
|
|
565
565
|
return false;
|
|
566
566
|
}
|
|
567
567
|
else {
|
|
568
|
-
if (ignoreFunctions && typeOfO1Key === "function")
|
|
569
|
-
|
|
568
|
+
if (ignoreFunctions && typeOfO1Key === "function") {
|
|
569
|
+
continue;
|
|
570
|
+
}
|
|
570
571
|
if (o1[key] !== o2[key])
|
|
571
572
|
return false;
|
|
572
573
|
}
|
|
@@ -1800,7 +1801,7 @@ class LazyTranslatedString extends String {
|
|
|
1800
1801
|
}
|
|
1801
1802
|
valueOf() {
|
|
1802
1803
|
const str = super.valueOf();
|
|
1803
|
-
return _loaded() ? sprintf(_translate(str), ...this.values) : str;
|
|
1804
|
+
return _loaded() ? sprintf(_translate(str), ...this.values) : sprintf(str, ...this.values);
|
|
1804
1805
|
}
|
|
1805
1806
|
toString() {
|
|
1806
1807
|
return this.valueOf();
|
|
@@ -27175,7 +27176,7 @@ class Composer extends Component {
|
|
|
27175
27176
|
"Ctrl+Enter": this.processNewLineEvent,
|
|
27176
27177
|
Escape: this.processEscapeKey,
|
|
27177
27178
|
F2: () => console.warn("Not implemented"),
|
|
27178
|
-
F4: this.processF4Key,
|
|
27179
|
+
F4: (ev) => this.processF4Key(ev),
|
|
27179
27180
|
Tab: (ev) => this.processTabKey(ev, "right"),
|
|
27180
27181
|
"Shift+Tab": (ev) => this.processTabKey(ev, "left"),
|
|
27181
27182
|
};
|
|
@@ -27289,9 +27290,10 @@ class Composer extends Component {
|
|
|
27289
27290
|
processEscapeKey() {
|
|
27290
27291
|
this.env.model.dispatch("CANCEL_EDITION");
|
|
27291
27292
|
}
|
|
27292
|
-
processF4Key() {
|
|
27293
|
+
processF4Key(ev) {
|
|
27293
27294
|
this.env.model.dispatch("CYCLE_EDITION_REFERENCES");
|
|
27294
27295
|
this.processContent();
|
|
27296
|
+
ev.stopPropagation();
|
|
27295
27297
|
}
|
|
27296
27298
|
processNumpadDecimal(ev) {
|
|
27297
27299
|
ev.stopPropagation();
|
|
@@ -38452,7 +38454,12 @@ class MergePlugin extends CorePlugin {
|
|
|
38452
38454
|
* if they have at least a common cell
|
|
38453
38455
|
*/
|
|
38454
38456
|
doesIntersectMerge(sheetId, zone) {
|
|
38455
|
-
|
|
38457
|
+
for (const merge of this.getMerges(sheetId)) {
|
|
38458
|
+
if (overlap(zone, merge)) {
|
|
38459
|
+
return true;
|
|
38460
|
+
}
|
|
38461
|
+
}
|
|
38462
|
+
return false;
|
|
38456
38463
|
}
|
|
38457
38464
|
/**
|
|
38458
38465
|
* Returns true if two columns have at least one merge in common
|
|
@@ -48811,7 +48818,7 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
48811
48818
|
case "ADD_COLUMNS_ROWS": {
|
|
48812
48819
|
this.status = "invisible";
|
|
48813
48820
|
// If we add a col/row inside or before the cut area, we invalidate the clipboard
|
|
48814
|
-
if (this.state?.operation !== "CUT") {
|
|
48821
|
+
if (this.state?.operation !== "CUT" || cmd.sheetId !== this.state?.sheetId) {
|
|
48815
48822
|
return;
|
|
48816
48823
|
}
|
|
48817
48824
|
const isClipboardDirty = this.state.isColRowDirtyingClipboard(cmd.position === "before" ? cmd.base : cmd.base + 1, cmd.dimension);
|
|
@@ -48823,7 +48830,7 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
48823
48830
|
case "REMOVE_COLUMNS_ROWS": {
|
|
48824
48831
|
this.status = "invisible";
|
|
48825
48832
|
// If we remove a col/row inside or before the cut area, we invalidate the clipboard
|
|
48826
|
-
if (this.state?.operation !== "CUT") {
|
|
48833
|
+
if (this.state?.operation !== "CUT" || cmd.sheetId !== this.state?.sheetId) {
|
|
48827
48834
|
return;
|
|
48828
48835
|
}
|
|
48829
48836
|
for (let el of cmd.elements) {
|
|
@@ -53894,6 +53901,10 @@ class Spreadsheet extends Component {
|
|
|
53894
53901
|
}, () => [this.env.model.getters.getActiveSheetId()]);
|
|
53895
53902
|
useExternalListener(window, "resize", () => this.render(true));
|
|
53896
53903
|
useExternalListener(window, "beforeunload", this.unbindModelEvents.bind(this));
|
|
53904
|
+
// For some reason, the wheel event is not properly registered inside templates
|
|
53905
|
+
// in Chromium-based browsers based on chromium 125
|
|
53906
|
+
// This hack ensures the event declared in the template is properly registered/working
|
|
53907
|
+
useExternalListener(document.body, "wheel", () => { });
|
|
53897
53908
|
this.bindModelEvents();
|
|
53898
53909
|
onWillUpdateProps((nextProps) => {
|
|
53899
53910
|
if (nextProps.model !== this.props.model) {
|
|
@@ -57693,6 +57704,6 @@ const constants = {
|
|
|
57693
57704
|
export { AbstractChart, CellErrorType, 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 };
|
|
57694
57705
|
|
|
57695
57706
|
|
|
57696
|
-
__info__.version = "17.1.
|
|
57697
|
-
__info__.date = "2024-05-
|
|
57698
|
-
__info__.hash = "
|
|
57707
|
+
__info__.version = "17.1.16";
|
|
57708
|
+
__info__.date = "2024-05-24T11:27:23.083Z";
|
|
57709
|
+
__info__.hash = "3a41c3a";
|
|
@@ -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.1.
|
|
6
|
-
* @date 2024-05-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.1.16
|
|
6
|
+
* @date 2024-05-24T11:27:23.083Z
|
|
7
|
+
* @hash 3a41c3a
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -566,8 +566,9 @@
|
|
|
566
566
|
return false;
|
|
567
567
|
}
|
|
568
568
|
else {
|
|
569
|
-
if (ignoreFunctions && typeOfO1Key === "function")
|
|
570
|
-
|
|
569
|
+
if (ignoreFunctions && typeOfO1Key === "function") {
|
|
570
|
+
continue;
|
|
571
|
+
}
|
|
571
572
|
if (o1[key] !== o2[key])
|
|
572
573
|
return false;
|
|
573
574
|
}
|
|
@@ -1801,7 +1802,7 @@
|
|
|
1801
1802
|
}
|
|
1802
1803
|
valueOf() {
|
|
1803
1804
|
const str = super.valueOf();
|
|
1804
|
-
return _loaded() ? sprintf(_translate(str), ...this.values) : str;
|
|
1805
|
+
return _loaded() ? sprintf(_translate(str), ...this.values) : sprintf(str, ...this.values);
|
|
1805
1806
|
}
|
|
1806
1807
|
toString() {
|
|
1807
1808
|
return this.valueOf();
|
|
@@ -27176,7 +27177,7 @@
|
|
|
27176
27177
|
"Ctrl+Enter": this.processNewLineEvent,
|
|
27177
27178
|
Escape: this.processEscapeKey,
|
|
27178
27179
|
F2: () => console.warn("Not implemented"),
|
|
27179
|
-
F4: this.processF4Key,
|
|
27180
|
+
F4: (ev) => this.processF4Key(ev),
|
|
27180
27181
|
Tab: (ev) => this.processTabKey(ev, "right"),
|
|
27181
27182
|
"Shift+Tab": (ev) => this.processTabKey(ev, "left"),
|
|
27182
27183
|
};
|
|
@@ -27290,9 +27291,10 @@
|
|
|
27290
27291
|
processEscapeKey() {
|
|
27291
27292
|
this.env.model.dispatch("CANCEL_EDITION");
|
|
27292
27293
|
}
|
|
27293
|
-
processF4Key() {
|
|
27294
|
+
processF4Key(ev) {
|
|
27294
27295
|
this.env.model.dispatch("CYCLE_EDITION_REFERENCES");
|
|
27295
27296
|
this.processContent();
|
|
27297
|
+
ev.stopPropagation();
|
|
27296
27298
|
}
|
|
27297
27299
|
processNumpadDecimal(ev) {
|
|
27298
27300
|
ev.stopPropagation();
|
|
@@ -38453,7 +38455,12 @@
|
|
|
38453
38455
|
* if they have at least a common cell
|
|
38454
38456
|
*/
|
|
38455
38457
|
doesIntersectMerge(sheetId, zone) {
|
|
38456
|
-
|
|
38458
|
+
for (const merge of this.getMerges(sheetId)) {
|
|
38459
|
+
if (overlap(zone, merge)) {
|
|
38460
|
+
return true;
|
|
38461
|
+
}
|
|
38462
|
+
}
|
|
38463
|
+
return false;
|
|
38457
38464
|
}
|
|
38458
38465
|
/**
|
|
38459
38466
|
* Returns true if two columns have at least one merge in common
|
|
@@ -48812,7 +48819,7 @@
|
|
|
48812
48819
|
case "ADD_COLUMNS_ROWS": {
|
|
48813
48820
|
this.status = "invisible";
|
|
48814
48821
|
// If we add a col/row inside or before the cut area, we invalidate the clipboard
|
|
48815
|
-
if (this.state?.operation !== "CUT") {
|
|
48822
|
+
if (this.state?.operation !== "CUT" || cmd.sheetId !== this.state?.sheetId) {
|
|
48816
48823
|
return;
|
|
48817
48824
|
}
|
|
48818
48825
|
const isClipboardDirty = this.state.isColRowDirtyingClipboard(cmd.position === "before" ? cmd.base : cmd.base + 1, cmd.dimension);
|
|
@@ -48824,7 +48831,7 @@
|
|
|
48824
48831
|
case "REMOVE_COLUMNS_ROWS": {
|
|
48825
48832
|
this.status = "invisible";
|
|
48826
48833
|
// If we remove a col/row inside or before the cut area, we invalidate the clipboard
|
|
48827
|
-
if (this.state?.operation !== "CUT") {
|
|
48834
|
+
if (this.state?.operation !== "CUT" || cmd.sheetId !== this.state?.sheetId) {
|
|
48828
48835
|
return;
|
|
48829
48836
|
}
|
|
48830
48837
|
for (let el of cmd.elements) {
|
|
@@ -53895,6 +53902,10 @@
|
|
|
53895
53902
|
}, () => [this.env.model.getters.getActiveSheetId()]);
|
|
53896
53903
|
owl.useExternalListener(window, "resize", () => this.render(true));
|
|
53897
53904
|
owl.useExternalListener(window, "beforeunload", this.unbindModelEvents.bind(this));
|
|
53905
|
+
// For some reason, the wheel event is not properly registered inside templates
|
|
53906
|
+
// in Chromium-based browsers based on chromium 125
|
|
53907
|
+
// This hack ensures the event declared in the template is properly registered/working
|
|
53908
|
+
owl.useExternalListener(document.body, "wheel", () => { });
|
|
53898
53909
|
this.bindModelEvents();
|
|
53899
53910
|
owl.onWillUpdateProps((nextProps) => {
|
|
53900
53911
|
if (nextProps.model !== this.props.model) {
|
|
@@ -57730,9 +57741,9 @@
|
|
|
57730
57741
|
exports.tokenize = tokenize;
|
|
57731
57742
|
|
|
57732
57743
|
|
|
57733
|
-
__info__.version = "17.1.
|
|
57734
|
-
__info__.date = "2024-05-
|
|
57735
|
-
__info__.hash = "
|
|
57744
|
+
__info__.version = "17.1.16";
|
|
57745
|
+
__info__.date = "2024-05-24T11:27:23.083Z";
|
|
57746
|
+
__info__.hash = "3a41c3a";
|
|
57736
57747
|
|
|
57737
57748
|
|
|
57738
57749
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|