@odoo/o-spreadsheet 17.0.22 → 17.0.23
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 +179 -179
- 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.0.
|
|
6
|
-
* @date 2024-05-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.23
|
|
6
|
+
* @date 2024-05-24T11:27:27.416Z
|
|
7
|
+
* @hash 6c10fec
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -47,7 +47,7 @@ class LazyTranslatedString extends String {
|
|
|
47
47
|
}
|
|
48
48
|
valueOf() {
|
|
49
49
|
const str = super.valueOf();
|
|
50
|
-
return _loaded() ? sprintf(_translate(str), ...this.values) : str;
|
|
50
|
+
return _loaded() ? sprintf(_translate(str), ...this.values) : sprintf(str, ...this.values);
|
|
51
51
|
}
|
|
52
52
|
toString() {
|
|
53
53
|
return this.valueOf();
|
|
@@ -666,8 +666,9 @@ function deepEquals(o1, o2, ignoreFunctions) {
|
|
|
666
666
|
return false;
|
|
667
667
|
}
|
|
668
668
|
else {
|
|
669
|
-
if (ignoreFunctions && typeOfO1Key === "function")
|
|
670
|
-
|
|
669
|
+
if (ignoreFunctions && typeOfO1Key === "function") {
|
|
670
|
+
continue;
|
|
671
|
+
}
|
|
671
672
|
if (o1[key] !== o2[key])
|
|
672
673
|
return false;
|
|
673
674
|
}
|
|
@@ -26665,7 +26666,7 @@ class Composer extends owl.Component {
|
|
|
26665
26666
|
Enter: this.processEnterKey,
|
|
26666
26667
|
Escape: this.processEscapeKey,
|
|
26667
26668
|
F2: () => console.warn("Not implemented"),
|
|
26668
|
-
F4: this.processF4Key,
|
|
26669
|
+
F4: (ev) => this.processF4Key(ev),
|
|
26669
26670
|
Tab: (ev) => this.processTabKey(ev),
|
|
26670
26671
|
};
|
|
26671
26672
|
keyCodeMapping = {
|
|
@@ -26770,9 +26771,10 @@ class Composer extends owl.Component {
|
|
|
26770
26771
|
processEscapeKey() {
|
|
26771
26772
|
this.env.model.dispatch("CANCEL_EDITION");
|
|
26772
26773
|
}
|
|
26773
|
-
processF4Key() {
|
|
26774
|
+
processF4Key(ev) {
|
|
26774
26775
|
this.env.model.dispatch("CYCLE_EDITION_REFERENCES");
|
|
26775
26776
|
this.processContent();
|
|
26777
|
+
ev.stopPropagation();
|
|
26776
26778
|
}
|
|
26777
26779
|
processNumpadDecimal(ev) {
|
|
26778
26780
|
ev.stopPropagation();
|
|
@@ -37964,7 +37966,12 @@ class MergePlugin extends CorePlugin {
|
|
|
37964
37966
|
* if they have at least a common cell
|
|
37965
37967
|
*/
|
|
37966
37968
|
doesIntersectMerge(sheetId, zone) {
|
|
37967
|
-
|
|
37969
|
+
for (const merge of this.getMerges(sheetId)) {
|
|
37970
|
+
if (overlap(zone, merge)) {
|
|
37971
|
+
return true;
|
|
37972
|
+
}
|
|
37973
|
+
}
|
|
37974
|
+
return false;
|
|
37968
37975
|
}
|
|
37969
37976
|
/**
|
|
37970
37977
|
* Returns true if two columns have at least one merge in common
|
|
@@ -48326,7 +48333,7 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
48326
48333
|
case "ADD_COLUMNS_ROWS": {
|
|
48327
48334
|
this.status = "invisible";
|
|
48328
48335
|
// If we add a col/row inside or before the cut area, we invalidate the clipboard
|
|
48329
|
-
if (this.state?.operation !== "CUT") {
|
|
48336
|
+
if (this.state?.operation !== "CUT" || cmd.sheetId !== this.state?.sheetId) {
|
|
48330
48337
|
return;
|
|
48331
48338
|
}
|
|
48332
48339
|
const isClipboardDirty = this.state.isColRowDirtyingClipboard(cmd.position === "before" ? cmd.base : cmd.base + 1, cmd.dimension);
|
|
@@ -48338,7 +48345,7 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
48338
48345
|
case "REMOVE_COLUMNS_ROWS": {
|
|
48339
48346
|
this.status = "invisible";
|
|
48340
48347
|
// If we remove a col/row inside or before the cut area, we invalidate the clipboard
|
|
48341
|
-
if (this.state?.operation !== "CUT") {
|
|
48348
|
+
if (this.state?.operation !== "CUT" || cmd.sheetId !== this.state?.sheetId) {
|
|
48342
48349
|
return;
|
|
48343
48350
|
}
|
|
48344
48351
|
for (let el of cmd.elements) {
|
|
@@ -53521,6 +53528,10 @@ class Spreadsheet extends owl.Component {
|
|
|
53521
53528
|
});
|
|
53522
53529
|
owl.useExternalListener(window, "resize", () => this.render(true));
|
|
53523
53530
|
owl.useExternalListener(window, "beforeunload", this.unbindModelEvents.bind(this));
|
|
53531
|
+
// For some reason, the wheel event is not properly registered inside templates
|
|
53532
|
+
// in Chromium-based browsers based on chromium 125
|
|
53533
|
+
// This hack ensures the event declared in the template is properly registered/working
|
|
53534
|
+
owl.useExternalListener(document.body, "wheel", () => { });
|
|
53524
53535
|
this.bindModelEvents();
|
|
53525
53536
|
owl.onWillUpdateProps((nextProps) => {
|
|
53526
53537
|
if (nextProps.model !== this.props.model) {
|
|
@@ -57404,6 +57415,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
57404
57415
|
exports.tokenize = tokenize;
|
|
57405
57416
|
|
|
57406
57417
|
|
|
57407
|
-
__info__.version = "17.0.
|
|
57408
|
-
__info__.date = "2024-05-
|
|
57409
|
-
__info__.hash = "
|
|
57418
|
+
__info__.version = "17.0.23";
|
|
57419
|
+
__info__.date = "2024-05-24T11:27:27.416Z";
|
|
57420
|
+
__info__.hash = "6c10fec";
|
|
@@ -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.0.
|
|
6
|
-
* @date 2024-05-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.23
|
|
6
|
+
* @date 2024-05-24T11:27:27.416Z
|
|
7
|
+
* @hash 6c10fec
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { Component, useRef, onMounted, useEffect, onWillPatch, useState, onWillUpdateProps, onPatched, useComponent, useExternalListener, onWillUnmount, onWillStart, xml, useChildSubEnv, useSubEnv, markRaw } from '@odoo/owl';
|
|
@@ -45,7 +45,7 @@ class LazyTranslatedString extends String {
|
|
|
45
45
|
}
|
|
46
46
|
valueOf() {
|
|
47
47
|
const str = super.valueOf();
|
|
48
|
-
return _loaded() ? sprintf(_translate(str), ...this.values) : str;
|
|
48
|
+
return _loaded() ? sprintf(_translate(str), ...this.values) : sprintf(str, ...this.values);
|
|
49
49
|
}
|
|
50
50
|
toString() {
|
|
51
51
|
return this.valueOf();
|
|
@@ -664,8 +664,9 @@ function deepEquals(o1, o2, ignoreFunctions) {
|
|
|
664
664
|
return false;
|
|
665
665
|
}
|
|
666
666
|
else {
|
|
667
|
-
if (ignoreFunctions && typeOfO1Key === "function")
|
|
668
|
-
|
|
667
|
+
if (ignoreFunctions && typeOfO1Key === "function") {
|
|
668
|
+
continue;
|
|
669
|
+
}
|
|
669
670
|
if (o1[key] !== o2[key])
|
|
670
671
|
return false;
|
|
671
672
|
}
|
|
@@ -26663,7 +26664,7 @@ class Composer extends Component {
|
|
|
26663
26664
|
Enter: this.processEnterKey,
|
|
26664
26665
|
Escape: this.processEscapeKey,
|
|
26665
26666
|
F2: () => console.warn("Not implemented"),
|
|
26666
|
-
F4: this.processF4Key,
|
|
26667
|
+
F4: (ev) => this.processF4Key(ev),
|
|
26667
26668
|
Tab: (ev) => this.processTabKey(ev),
|
|
26668
26669
|
};
|
|
26669
26670
|
keyCodeMapping = {
|
|
@@ -26768,9 +26769,10 @@ class Composer extends Component {
|
|
|
26768
26769
|
processEscapeKey() {
|
|
26769
26770
|
this.env.model.dispatch("CANCEL_EDITION");
|
|
26770
26771
|
}
|
|
26771
|
-
processF4Key() {
|
|
26772
|
+
processF4Key(ev) {
|
|
26772
26773
|
this.env.model.dispatch("CYCLE_EDITION_REFERENCES");
|
|
26773
26774
|
this.processContent();
|
|
26775
|
+
ev.stopPropagation();
|
|
26774
26776
|
}
|
|
26775
26777
|
processNumpadDecimal(ev) {
|
|
26776
26778
|
ev.stopPropagation();
|
|
@@ -37962,7 +37964,12 @@ class MergePlugin extends CorePlugin {
|
|
|
37962
37964
|
* if they have at least a common cell
|
|
37963
37965
|
*/
|
|
37964
37966
|
doesIntersectMerge(sheetId, zone) {
|
|
37965
|
-
|
|
37967
|
+
for (const merge of this.getMerges(sheetId)) {
|
|
37968
|
+
if (overlap(zone, merge)) {
|
|
37969
|
+
return true;
|
|
37970
|
+
}
|
|
37971
|
+
}
|
|
37972
|
+
return false;
|
|
37966
37973
|
}
|
|
37967
37974
|
/**
|
|
37968
37975
|
* Returns true if two columns have at least one merge in common
|
|
@@ -48324,7 +48331,7 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
48324
48331
|
case "ADD_COLUMNS_ROWS": {
|
|
48325
48332
|
this.status = "invisible";
|
|
48326
48333
|
// If we add a col/row inside or before the cut area, we invalidate the clipboard
|
|
48327
|
-
if (this.state?.operation !== "CUT") {
|
|
48334
|
+
if (this.state?.operation !== "CUT" || cmd.sheetId !== this.state?.sheetId) {
|
|
48328
48335
|
return;
|
|
48329
48336
|
}
|
|
48330
48337
|
const isClipboardDirty = this.state.isColRowDirtyingClipboard(cmd.position === "before" ? cmd.base : cmd.base + 1, cmd.dimension);
|
|
@@ -48336,7 +48343,7 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
48336
48343
|
case "REMOVE_COLUMNS_ROWS": {
|
|
48337
48344
|
this.status = "invisible";
|
|
48338
48345
|
// If we remove a col/row inside or before the cut area, we invalidate the clipboard
|
|
48339
|
-
if (this.state?.operation !== "CUT") {
|
|
48346
|
+
if (this.state?.operation !== "CUT" || cmd.sheetId !== this.state?.sheetId) {
|
|
48340
48347
|
return;
|
|
48341
48348
|
}
|
|
48342
48349
|
for (let el of cmd.elements) {
|
|
@@ -53519,6 +53526,10 @@ class Spreadsheet extends Component {
|
|
|
53519
53526
|
});
|
|
53520
53527
|
useExternalListener(window, "resize", () => this.render(true));
|
|
53521
53528
|
useExternalListener(window, "beforeunload", this.unbindModelEvents.bind(this));
|
|
53529
|
+
// For some reason, the wheel event is not properly registered inside templates
|
|
53530
|
+
// in Chromium-based browsers based on chromium 125
|
|
53531
|
+
// This hack ensures the event declared in the template is properly registered/working
|
|
53532
|
+
useExternalListener(document.body, "wheel", () => { });
|
|
53522
53533
|
this.bindModelEvents();
|
|
53523
53534
|
onWillUpdateProps((nextProps) => {
|
|
53524
53535
|
if (nextProps.model !== this.props.model) {
|
|
@@ -57367,6 +57378,6 @@ const constants = {
|
|
|
57367
57378
|
export { AbstractChart, 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 };
|
|
57368
57379
|
|
|
57369
57380
|
|
|
57370
|
-
__info__.version = "17.0.
|
|
57371
|
-
__info__.date = "2024-05-
|
|
57372
|
-
__info__.hash = "
|
|
57381
|
+
__info__.version = "17.0.23";
|
|
57382
|
+
__info__.date = "2024-05-24T11:27:27.416Z";
|
|
57383
|
+
__info__.hash = "6c10fec";
|
|
@@ -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.0.
|
|
6
|
-
* @date 2024-05-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.23
|
|
6
|
+
* @date 2024-05-24T11:27:27.416Z
|
|
7
|
+
* @hash 6c10fec
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
}
|
|
47
47
|
valueOf() {
|
|
48
48
|
const str = super.valueOf();
|
|
49
|
-
return _loaded() ? sprintf(_translate(str), ...this.values) : str;
|
|
49
|
+
return _loaded() ? sprintf(_translate(str), ...this.values) : sprintf(str, ...this.values);
|
|
50
50
|
}
|
|
51
51
|
toString() {
|
|
52
52
|
return this.valueOf();
|
|
@@ -665,8 +665,9 @@
|
|
|
665
665
|
return false;
|
|
666
666
|
}
|
|
667
667
|
else {
|
|
668
|
-
if (ignoreFunctions && typeOfO1Key === "function")
|
|
669
|
-
|
|
668
|
+
if (ignoreFunctions && typeOfO1Key === "function") {
|
|
669
|
+
continue;
|
|
670
|
+
}
|
|
670
671
|
if (o1[key] !== o2[key])
|
|
671
672
|
return false;
|
|
672
673
|
}
|
|
@@ -26664,7 +26665,7 @@
|
|
|
26664
26665
|
Enter: this.processEnterKey,
|
|
26665
26666
|
Escape: this.processEscapeKey,
|
|
26666
26667
|
F2: () => console.warn("Not implemented"),
|
|
26667
|
-
F4: this.processF4Key,
|
|
26668
|
+
F4: (ev) => this.processF4Key(ev),
|
|
26668
26669
|
Tab: (ev) => this.processTabKey(ev),
|
|
26669
26670
|
};
|
|
26670
26671
|
keyCodeMapping = {
|
|
@@ -26769,9 +26770,10 @@
|
|
|
26769
26770
|
processEscapeKey() {
|
|
26770
26771
|
this.env.model.dispatch("CANCEL_EDITION");
|
|
26771
26772
|
}
|
|
26772
|
-
processF4Key() {
|
|
26773
|
+
processF4Key(ev) {
|
|
26773
26774
|
this.env.model.dispatch("CYCLE_EDITION_REFERENCES");
|
|
26774
26775
|
this.processContent();
|
|
26776
|
+
ev.stopPropagation();
|
|
26775
26777
|
}
|
|
26776
26778
|
processNumpadDecimal(ev) {
|
|
26777
26779
|
ev.stopPropagation();
|
|
@@ -37963,7 +37965,12 @@
|
|
|
37963
37965
|
* if they have at least a common cell
|
|
37964
37966
|
*/
|
|
37965
37967
|
doesIntersectMerge(sheetId, zone) {
|
|
37966
|
-
|
|
37968
|
+
for (const merge of this.getMerges(sheetId)) {
|
|
37969
|
+
if (overlap(zone, merge)) {
|
|
37970
|
+
return true;
|
|
37971
|
+
}
|
|
37972
|
+
}
|
|
37973
|
+
return false;
|
|
37967
37974
|
}
|
|
37968
37975
|
/**
|
|
37969
37976
|
* Returns true if two columns have at least one merge in common
|
|
@@ -48325,7 +48332,7 @@
|
|
|
48325
48332
|
case "ADD_COLUMNS_ROWS": {
|
|
48326
48333
|
this.status = "invisible";
|
|
48327
48334
|
// If we add a col/row inside or before the cut area, we invalidate the clipboard
|
|
48328
|
-
if (this.state?.operation !== "CUT") {
|
|
48335
|
+
if (this.state?.operation !== "CUT" || cmd.sheetId !== this.state?.sheetId) {
|
|
48329
48336
|
return;
|
|
48330
48337
|
}
|
|
48331
48338
|
const isClipboardDirty = this.state.isColRowDirtyingClipboard(cmd.position === "before" ? cmd.base : cmd.base + 1, cmd.dimension);
|
|
@@ -48337,7 +48344,7 @@
|
|
|
48337
48344
|
case "REMOVE_COLUMNS_ROWS": {
|
|
48338
48345
|
this.status = "invisible";
|
|
48339
48346
|
// If we remove a col/row inside or before the cut area, we invalidate the clipboard
|
|
48340
|
-
if (this.state?.operation !== "CUT") {
|
|
48347
|
+
if (this.state?.operation !== "CUT" || cmd.sheetId !== this.state?.sheetId) {
|
|
48341
48348
|
return;
|
|
48342
48349
|
}
|
|
48343
48350
|
for (let el of cmd.elements) {
|
|
@@ -53520,6 +53527,10 @@
|
|
|
53520
53527
|
});
|
|
53521
53528
|
owl.useExternalListener(window, "resize", () => this.render(true));
|
|
53522
53529
|
owl.useExternalListener(window, "beforeunload", this.unbindModelEvents.bind(this));
|
|
53530
|
+
// For some reason, the wheel event is not properly registered inside templates
|
|
53531
|
+
// in Chromium-based browsers based on chromium 125
|
|
53532
|
+
// This hack ensures the event declared in the template is properly registered/working
|
|
53533
|
+
owl.useExternalListener(document.body, "wheel", () => { });
|
|
53523
53534
|
this.bindModelEvents();
|
|
53524
53535
|
owl.onWillUpdateProps((nextProps) => {
|
|
53525
53536
|
if (nextProps.model !== this.props.model) {
|
|
@@ -57403,9 +57414,9 @@
|
|
|
57403
57414
|
exports.tokenize = tokenize;
|
|
57404
57415
|
|
|
57405
57416
|
|
|
57406
|
-
__info__.version = "17.0.
|
|
57407
|
-
__info__.date = "2024-05-
|
|
57408
|
-
__info__.hash = "
|
|
57417
|
+
__info__.version = "17.0.23";
|
|
57418
|
+
__info__.date = "2024-05-24T11:27:27.416Z";
|
|
57419
|
+
__info__.hash = "6c10fec";
|
|
57409
57420
|
|
|
57410
57421
|
|
|
57411
57422
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|