@odoo/o-spreadsheet 17.0.12 → 17.0.13
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 +68 -43
- package/dist/o-spreadsheet.esm.js +68 -43
- package/dist/o-spreadsheet.iife.js +68 -43
- package/dist/o-spreadsheet.iife.min.js +250 -250
- 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-02-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.13
|
|
6
|
+
* @date 2024-02-28T12:28:44.914Z
|
|
7
|
+
* @hash ed67be7
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -6284,11 +6284,14 @@ function cellTextStyleToCss(style) {
|
|
|
6284
6284
|
* Transform CSS properties into a CSS string.
|
|
6285
6285
|
*/
|
|
6286
6286
|
function cssPropertiesToCss(attributes) {
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6287
|
+
let styleStr = "";
|
|
6288
|
+
for (const attName in attributes) {
|
|
6289
|
+
if (!attributes[attName]) {
|
|
6290
|
+
continue;
|
|
6291
|
+
}
|
|
6292
|
+
styleStr += `${attName}:${attributes[attName]}; `;
|
|
6293
|
+
}
|
|
6294
|
+
return styleStr;
|
|
6292
6295
|
}
|
|
6293
6296
|
function getElementMargins(el) {
|
|
6294
6297
|
const style = window.getComputedStyle(el);
|
|
@@ -12925,6 +12928,18 @@ const TRUNC = {
|
|
|
12925
12928
|
},
|
|
12926
12929
|
isExported: true,
|
|
12927
12930
|
};
|
|
12931
|
+
// -----------------------------------------------------------------------------
|
|
12932
|
+
// INT
|
|
12933
|
+
// -----------------------------------------------------------------------------
|
|
12934
|
+
const INT = {
|
|
12935
|
+
description: _t("Rounds a number down to the nearest integer that is less than or equal to it."),
|
|
12936
|
+
args: [arg("value (number)", _t("The number to round down to the nearest integer."))],
|
|
12937
|
+
returns: ["NUMBER"],
|
|
12938
|
+
compute: function (value) {
|
|
12939
|
+
return Math.floor(toNumber(value, this.locale));
|
|
12940
|
+
},
|
|
12941
|
+
isExported: true,
|
|
12942
|
+
};
|
|
12928
12943
|
|
|
12929
12944
|
var math = /*#__PURE__*/Object.freeze({
|
|
12930
12945
|
__proto__: null,
|
|
@@ -12958,6 +12973,7 @@ var math = /*#__PURE__*/Object.freeze({
|
|
|
12958
12973
|
FLOOR: FLOOR,
|
|
12959
12974
|
FLOOR_MATH: FLOOR_MATH,
|
|
12960
12975
|
FLOOR_PRECISE: FLOOR_PRECISE,
|
|
12976
|
+
INT: INT,
|
|
12961
12977
|
ISEVEN: ISEVEN,
|
|
12962
12978
|
ISODD: ISODD,
|
|
12963
12979
|
ISO_CEILING: ISO_CEILING,
|
|
@@ -21396,7 +21412,7 @@ class SelectionInput extends owl.Component {
|
|
|
21396
21412
|
? existingSelectionRanges
|
|
21397
21413
|
: this.props.ranges().map((xc, id) => ({
|
|
21398
21414
|
xc,
|
|
21399
|
-
id,
|
|
21415
|
+
id: id + 1,
|
|
21400
21416
|
isFocused: false,
|
|
21401
21417
|
}));
|
|
21402
21418
|
return ranges.map((range) => ({
|
|
@@ -33829,29 +33845,12 @@ const MIGRATIONS = [
|
|
|
33829
33845
|
from: 12,
|
|
33830
33846
|
to: 12.5,
|
|
33831
33847
|
applyMigration(data) {
|
|
33832
|
-
|
|
33833
|
-
let knownDataFilterZones = [];
|
|
33834
|
-
for (let filterTable of sheet.filterTables || []) {
|
|
33835
|
-
const zone = toZone(filterTable.range);
|
|
33836
|
-
// See commit message for the details
|
|
33837
|
-
const intersectZoneIndex = knownDataFilterZones.findIndex((knownZone) => overlap(knownZone, zone));
|
|
33838
|
-
if (intersectZoneIndex !== -1) {
|
|
33839
|
-
knownDataFilterZones[intersectZoneIndex] = zone;
|
|
33840
|
-
}
|
|
33841
|
-
else {
|
|
33842
|
-
knownDataFilterZones.push(zone);
|
|
33843
|
-
}
|
|
33844
|
-
}
|
|
33845
|
-
sheet.filterTables = knownDataFilterZones.map((zone) => ({
|
|
33846
|
-
range: zoneToXc(zone),
|
|
33847
|
-
}));
|
|
33848
|
-
}
|
|
33849
|
-
return data;
|
|
33848
|
+
return fixOverlappingFilters(data);
|
|
33850
33849
|
},
|
|
33851
33850
|
},
|
|
33852
33851
|
{
|
|
33853
33852
|
description: "Change Border description structure",
|
|
33854
|
-
from: 12,
|
|
33853
|
+
from: 12.5,
|
|
33855
33854
|
to: 13,
|
|
33856
33855
|
applyMigration(data) {
|
|
33857
33856
|
for (const borderId in data.borders) {
|
|
@@ -33882,6 +33881,14 @@ const MIGRATIONS = [
|
|
|
33882
33881
|
return data;
|
|
33883
33882
|
},
|
|
33884
33883
|
},
|
|
33884
|
+
{
|
|
33885
|
+
description: "Fix datafilter duplication (post saas-16.4)",
|
|
33886
|
+
from: 14,
|
|
33887
|
+
to: 14.5,
|
|
33888
|
+
applyMigration(data) {
|
|
33889
|
+
return fixOverlappingFilters(data);
|
|
33890
|
+
},
|
|
33891
|
+
},
|
|
33885
33892
|
];
|
|
33886
33893
|
/**
|
|
33887
33894
|
* This function is used to repair faulty data independently of the migration.
|
|
@@ -34039,6 +34046,26 @@ function fixChartDefinitions(data, initialMessages) {
|
|
|
34039
34046
|
}
|
|
34040
34047
|
return messages;
|
|
34041
34048
|
}
|
|
34049
|
+
function fixOverlappingFilters(data) {
|
|
34050
|
+
for (let sheet of data.sheets || []) {
|
|
34051
|
+
let knownDataFilterZones = [];
|
|
34052
|
+
for (let filterTable of sheet.filterTables || []) {
|
|
34053
|
+
const zone = toZone(filterTable.range);
|
|
34054
|
+
// See commit message of https://github.com/odoo/o-spreadsheet/pull/3632 of more details
|
|
34055
|
+
const intersectZoneIndex = knownDataFilterZones.findIndex((knownZone) => overlap(knownZone, zone));
|
|
34056
|
+
if (intersectZoneIndex !== -1) {
|
|
34057
|
+
knownDataFilterZones[intersectZoneIndex] = zone;
|
|
34058
|
+
}
|
|
34059
|
+
else {
|
|
34060
|
+
knownDataFilterZones.push(zone);
|
|
34061
|
+
}
|
|
34062
|
+
}
|
|
34063
|
+
sheet.filterTables = knownDataFilterZones.map((zone) => ({
|
|
34064
|
+
range: zoneToXc(zone),
|
|
34065
|
+
}));
|
|
34066
|
+
}
|
|
34067
|
+
return data;
|
|
34068
|
+
}
|
|
34042
34069
|
// -----------------------------------------------------------------------------
|
|
34043
34070
|
// Helpers
|
|
34044
34071
|
// -----------------------------------------------------------------------------
|
|
@@ -46429,19 +46456,17 @@ class SelectionInputsManagerPlugin extends UIPlugin {
|
|
|
46429
46456
|
break;
|
|
46430
46457
|
case "FOCUS_RANGE":
|
|
46431
46458
|
case "CHANGE_RANGE":
|
|
46432
|
-
|
|
46433
|
-
|
|
46434
|
-
|
|
46435
|
-
|
|
46436
|
-
|
|
46437
|
-
|
|
46438
|
-
|
|
46439
|
-
|
|
46440
|
-
|
|
46441
|
-
});
|
|
46442
|
-
}
|
|
46443
|
-
this.focusedInputId = cmd.id;
|
|
46459
|
+
const input = this.inputs[cmd.id];
|
|
46460
|
+
const range = input.ranges.find((range) => range.id === cmd.rangeId);
|
|
46461
|
+
if (range) {
|
|
46462
|
+
const sheetId = this.getters.getActiveSheetId();
|
|
46463
|
+
const zone = this.getters.getRangeFromSheetXC(sheetId, range?.xc || "A1").zone;
|
|
46464
|
+
this.selection.capture(input, { cell: { col: zone.left, row: zone.top }, zone }, {
|
|
46465
|
+
handleEvent: input.handleEvent.bind(input),
|
|
46466
|
+
release: () => (this.focusedInputId = null),
|
|
46467
|
+
});
|
|
46444
46468
|
}
|
|
46469
|
+
this.focusedInputId = cmd.id;
|
|
46445
46470
|
break;
|
|
46446
46471
|
}
|
|
46447
46472
|
this.currentInput?.handle(cmd);
|
|
@@ -56916,6 +56941,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
56916
56941
|
exports.tokenize = tokenize;
|
|
56917
56942
|
|
|
56918
56943
|
|
|
56919
|
-
__info__.version = "17.0.
|
|
56920
|
-
__info__.date = "2024-02-
|
|
56921
|
-
__info__.hash = "
|
|
56944
|
+
__info__.version = "17.0.13";
|
|
56945
|
+
__info__.date = "2024-02-28T12:28:44.914Z";
|
|
56946
|
+
__info__.hash = "ed67be7";
|
|
@@ -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-02-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.13
|
|
6
|
+
* @date 2024-02-28T12:28:44.914Z
|
|
7
|
+
* @hash ed67be7
|
|
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';
|
|
@@ -6282,11 +6282,14 @@ function cellTextStyleToCss(style) {
|
|
|
6282
6282
|
* Transform CSS properties into a CSS string.
|
|
6283
6283
|
*/
|
|
6284
6284
|
function cssPropertiesToCss(attributes) {
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6285
|
+
let styleStr = "";
|
|
6286
|
+
for (const attName in attributes) {
|
|
6287
|
+
if (!attributes[attName]) {
|
|
6288
|
+
continue;
|
|
6289
|
+
}
|
|
6290
|
+
styleStr += `${attName}:${attributes[attName]}; `;
|
|
6291
|
+
}
|
|
6292
|
+
return styleStr;
|
|
6290
6293
|
}
|
|
6291
6294
|
function getElementMargins(el) {
|
|
6292
6295
|
const style = window.getComputedStyle(el);
|
|
@@ -12923,6 +12926,18 @@ const TRUNC = {
|
|
|
12923
12926
|
},
|
|
12924
12927
|
isExported: true,
|
|
12925
12928
|
};
|
|
12929
|
+
// -----------------------------------------------------------------------------
|
|
12930
|
+
// INT
|
|
12931
|
+
// -----------------------------------------------------------------------------
|
|
12932
|
+
const INT = {
|
|
12933
|
+
description: _t("Rounds a number down to the nearest integer that is less than or equal to it."),
|
|
12934
|
+
args: [arg("value (number)", _t("The number to round down to the nearest integer."))],
|
|
12935
|
+
returns: ["NUMBER"],
|
|
12936
|
+
compute: function (value) {
|
|
12937
|
+
return Math.floor(toNumber(value, this.locale));
|
|
12938
|
+
},
|
|
12939
|
+
isExported: true,
|
|
12940
|
+
};
|
|
12926
12941
|
|
|
12927
12942
|
var math = /*#__PURE__*/Object.freeze({
|
|
12928
12943
|
__proto__: null,
|
|
@@ -12956,6 +12971,7 @@ var math = /*#__PURE__*/Object.freeze({
|
|
|
12956
12971
|
FLOOR: FLOOR,
|
|
12957
12972
|
FLOOR_MATH: FLOOR_MATH,
|
|
12958
12973
|
FLOOR_PRECISE: FLOOR_PRECISE,
|
|
12974
|
+
INT: INT,
|
|
12959
12975
|
ISEVEN: ISEVEN,
|
|
12960
12976
|
ISODD: ISODD,
|
|
12961
12977
|
ISO_CEILING: ISO_CEILING,
|
|
@@ -21394,7 +21410,7 @@ class SelectionInput extends Component {
|
|
|
21394
21410
|
? existingSelectionRanges
|
|
21395
21411
|
: this.props.ranges().map((xc, id) => ({
|
|
21396
21412
|
xc,
|
|
21397
|
-
id,
|
|
21413
|
+
id: id + 1,
|
|
21398
21414
|
isFocused: false,
|
|
21399
21415
|
}));
|
|
21400
21416
|
return ranges.map((range) => ({
|
|
@@ -33827,29 +33843,12 @@ const MIGRATIONS = [
|
|
|
33827
33843
|
from: 12,
|
|
33828
33844
|
to: 12.5,
|
|
33829
33845
|
applyMigration(data) {
|
|
33830
|
-
|
|
33831
|
-
let knownDataFilterZones = [];
|
|
33832
|
-
for (let filterTable of sheet.filterTables || []) {
|
|
33833
|
-
const zone = toZone(filterTable.range);
|
|
33834
|
-
// See commit message for the details
|
|
33835
|
-
const intersectZoneIndex = knownDataFilterZones.findIndex((knownZone) => overlap(knownZone, zone));
|
|
33836
|
-
if (intersectZoneIndex !== -1) {
|
|
33837
|
-
knownDataFilterZones[intersectZoneIndex] = zone;
|
|
33838
|
-
}
|
|
33839
|
-
else {
|
|
33840
|
-
knownDataFilterZones.push(zone);
|
|
33841
|
-
}
|
|
33842
|
-
}
|
|
33843
|
-
sheet.filterTables = knownDataFilterZones.map((zone) => ({
|
|
33844
|
-
range: zoneToXc(zone),
|
|
33845
|
-
}));
|
|
33846
|
-
}
|
|
33847
|
-
return data;
|
|
33846
|
+
return fixOverlappingFilters(data);
|
|
33848
33847
|
},
|
|
33849
33848
|
},
|
|
33850
33849
|
{
|
|
33851
33850
|
description: "Change Border description structure",
|
|
33852
|
-
from: 12,
|
|
33851
|
+
from: 12.5,
|
|
33853
33852
|
to: 13,
|
|
33854
33853
|
applyMigration(data) {
|
|
33855
33854
|
for (const borderId in data.borders) {
|
|
@@ -33880,6 +33879,14 @@ const MIGRATIONS = [
|
|
|
33880
33879
|
return data;
|
|
33881
33880
|
},
|
|
33882
33881
|
},
|
|
33882
|
+
{
|
|
33883
|
+
description: "Fix datafilter duplication (post saas-16.4)",
|
|
33884
|
+
from: 14,
|
|
33885
|
+
to: 14.5,
|
|
33886
|
+
applyMigration(data) {
|
|
33887
|
+
return fixOverlappingFilters(data);
|
|
33888
|
+
},
|
|
33889
|
+
},
|
|
33883
33890
|
];
|
|
33884
33891
|
/**
|
|
33885
33892
|
* This function is used to repair faulty data independently of the migration.
|
|
@@ -34037,6 +34044,26 @@ function fixChartDefinitions(data, initialMessages) {
|
|
|
34037
34044
|
}
|
|
34038
34045
|
return messages;
|
|
34039
34046
|
}
|
|
34047
|
+
function fixOverlappingFilters(data) {
|
|
34048
|
+
for (let sheet of data.sheets || []) {
|
|
34049
|
+
let knownDataFilterZones = [];
|
|
34050
|
+
for (let filterTable of sheet.filterTables || []) {
|
|
34051
|
+
const zone = toZone(filterTable.range);
|
|
34052
|
+
// See commit message of https://github.com/odoo/o-spreadsheet/pull/3632 of more details
|
|
34053
|
+
const intersectZoneIndex = knownDataFilterZones.findIndex((knownZone) => overlap(knownZone, zone));
|
|
34054
|
+
if (intersectZoneIndex !== -1) {
|
|
34055
|
+
knownDataFilterZones[intersectZoneIndex] = zone;
|
|
34056
|
+
}
|
|
34057
|
+
else {
|
|
34058
|
+
knownDataFilterZones.push(zone);
|
|
34059
|
+
}
|
|
34060
|
+
}
|
|
34061
|
+
sheet.filterTables = knownDataFilterZones.map((zone) => ({
|
|
34062
|
+
range: zoneToXc(zone),
|
|
34063
|
+
}));
|
|
34064
|
+
}
|
|
34065
|
+
return data;
|
|
34066
|
+
}
|
|
34040
34067
|
// -----------------------------------------------------------------------------
|
|
34041
34068
|
// Helpers
|
|
34042
34069
|
// -----------------------------------------------------------------------------
|
|
@@ -46427,19 +46454,17 @@ class SelectionInputsManagerPlugin extends UIPlugin {
|
|
|
46427
46454
|
break;
|
|
46428
46455
|
case "FOCUS_RANGE":
|
|
46429
46456
|
case "CHANGE_RANGE":
|
|
46430
|
-
|
|
46431
|
-
|
|
46432
|
-
|
|
46433
|
-
|
|
46434
|
-
|
|
46435
|
-
|
|
46436
|
-
|
|
46437
|
-
|
|
46438
|
-
|
|
46439
|
-
});
|
|
46440
|
-
}
|
|
46441
|
-
this.focusedInputId = cmd.id;
|
|
46457
|
+
const input = this.inputs[cmd.id];
|
|
46458
|
+
const range = input.ranges.find((range) => range.id === cmd.rangeId);
|
|
46459
|
+
if (range) {
|
|
46460
|
+
const sheetId = this.getters.getActiveSheetId();
|
|
46461
|
+
const zone = this.getters.getRangeFromSheetXC(sheetId, range?.xc || "A1").zone;
|
|
46462
|
+
this.selection.capture(input, { cell: { col: zone.left, row: zone.top }, zone }, {
|
|
46463
|
+
handleEvent: input.handleEvent.bind(input),
|
|
46464
|
+
release: () => (this.focusedInputId = null),
|
|
46465
|
+
});
|
|
46442
46466
|
}
|
|
46467
|
+
this.focusedInputId = cmd.id;
|
|
46443
46468
|
break;
|
|
46444
46469
|
}
|
|
46445
46470
|
this.currentInput?.handle(cmd);
|
|
@@ -56879,6 +56904,6 @@ const constants = {
|
|
|
56879
56904
|
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 };
|
|
56880
56905
|
|
|
56881
56906
|
|
|
56882
|
-
__info__.version = "17.0.
|
|
56883
|
-
__info__.date = "2024-02-
|
|
56884
|
-
__info__.hash = "
|
|
56907
|
+
__info__.version = "17.0.13";
|
|
56908
|
+
__info__.date = "2024-02-28T12:28:44.914Z";
|
|
56909
|
+
__info__.hash = "ed67be7";
|
|
@@ -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-02-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.13
|
|
6
|
+
* @date 2024-02-28T12:28:44.914Z
|
|
7
|
+
* @hash ed67be7
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -6283,11 +6283,14 @@
|
|
|
6283
6283
|
* Transform CSS properties into a CSS string.
|
|
6284
6284
|
*/
|
|
6285
6285
|
function cssPropertiesToCss(attributes) {
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6286
|
+
let styleStr = "";
|
|
6287
|
+
for (const attName in attributes) {
|
|
6288
|
+
if (!attributes[attName]) {
|
|
6289
|
+
continue;
|
|
6290
|
+
}
|
|
6291
|
+
styleStr += `${attName}:${attributes[attName]}; `;
|
|
6292
|
+
}
|
|
6293
|
+
return styleStr;
|
|
6291
6294
|
}
|
|
6292
6295
|
function getElementMargins(el) {
|
|
6293
6296
|
const style = window.getComputedStyle(el);
|
|
@@ -12924,6 +12927,18 @@
|
|
|
12924
12927
|
},
|
|
12925
12928
|
isExported: true,
|
|
12926
12929
|
};
|
|
12930
|
+
// -----------------------------------------------------------------------------
|
|
12931
|
+
// INT
|
|
12932
|
+
// -----------------------------------------------------------------------------
|
|
12933
|
+
const INT = {
|
|
12934
|
+
description: _t("Rounds a number down to the nearest integer that is less than or equal to it."),
|
|
12935
|
+
args: [arg("value (number)", _t("The number to round down to the nearest integer."))],
|
|
12936
|
+
returns: ["NUMBER"],
|
|
12937
|
+
compute: function (value) {
|
|
12938
|
+
return Math.floor(toNumber(value, this.locale));
|
|
12939
|
+
},
|
|
12940
|
+
isExported: true,
|
|
12941
|
+
};
|
|
12927
12942
|
|
|
12928
12943
|
var math = /*#__PURE__*/Object.freeze({
|
|
12929
12944
|
__proto__: null,
|
|
@@ -12957,6 +12972,7 @@
|
|
|
12957
12972
|
FLOOR: FLOOR,
|
|
12958
12973
|
FLOOR_MATH: FLOOR_MATH,
|
|
12959
12974
|
FLOOR_PRECISE: FLOOR_PRECISE,
|
|
12975
|
+
INT: INT,
|
|
12960
12976
|
ISEVEN: ISEVEN,
|
|
12961
12977
|
ISODD: ISODD,
|
|
12962
12978
|
ISO_CEILING: ISO_CEILING,
|
|
@@ -21395,7 +21411,7 @@
|
|
|
21395
21411
|
? existingSelectionRanges
|
|
21396
21412
|
: this.props.ranges().map((xc, id) => ({
|
|
21397
21413
|
xc,
|
|
21398
|
-
id,
|
|
21414
|
+
id: id + 1,
|
|
21399
21415
|
isFocused: false,
|
|
21400
21416
|
}));
|
|
21401
21417
|
return ranges.map((range) => ({
|
|
@@ -33828,29 +33844,12 @@
|
|
|
33828
33844
|
from: 12,
|
|
33829
33845
|
to: 12.5,
|
|
33830
33846
|
applyMigration(data) {
|
|
33831
|
-
|
|
33832
|
-
let knownDataFilterZones = [];
|
|
33833
|
-
for (let filterTable of sheet.filterTables || []) {
|
|
33834
|
-
const zone = toZone(filterTable.range);
|
|
33835
|
-
// See commit message for the details
|
|
33836
|
-
const intersectZoneIndex = knownDataFilterZones.findIndex((knownZone) => overlap(knownZone, zone));
|
|
33837
|
-
if (intersectZoneIndex !== -1) {
|
|
33838
|
-
knownDataFilterZones[intersectZoneIndex] = zone;
|
|
33839
|
-
}
|
|
33840
|
-
else {
|
|
33841
|
-
knownDataFilterZones.push(zone);
|
|
33842
|
-
}
|
|
33843
|
-
}
|
|
33844
|
-
sheet.filterTables = knownDataFilterZones.map((zone) => ({
|
|
33845
|
-
range: zoneToXc(zone),
|
|
33846
|
-
}));
|
|
33847
|
-
}
|
|
33848
|
-
return data;
|
|
33847
|
+
return fixOverlappingFilters(data);
|
|
33849
33848
|
},
|
|
33850
33849
|
},
|
|
33851
33850
|
{
|
|
33852
33851
|
description: "Change Border description structure",
|
|
33853
|
-
from: 12,
|
|
33852
|
+
from: 12.5,
|
|
33854
33853
|
to: 13,
|
|
33855
33854
|
applyMigration(data) {
|
|
33856
33855
|
for (const borderId in data.borders) {
|
|
@@ -33881,6 +33880,14 @@
|
|
|
33881
33880
|
return data;
|
|
33882
33881
|
},
|
|
33883
33882
|
},
|
|
33883
|
+
{
|
|
33884
|
+
description: "Fix datafilter duplication (post saas-16.4)",
|
|
33885
|
+
from: 14,
|
|
33886
|
+
to: 14.5,
|
|
33887
|
+
applyMigration(data) {
|
|
33888
|
+
return fixOverlappingFilters(data);
|
|
33889
|
+
},
|
|
33890
|
+
},
|
|
33884
33891
|
];
|
|
33885
33892
|
/**
|
|
33886
33893
|
* This function is used to repair faulty data independently of the migration.
|
|
@@ -34038,6 +34045,26 @@
|
|
|
34038
34045
|
}
|
|
34039
34046
|
return messages;
|
|
34040
34047
|
}
|
|
34048
|
+
function fixOverlappingFilters(data) {
|
|
34049
|
+
for (let sheet of data.sheets || []) {
|
|
34050
|
+
let knownDataFilterZones = [];
|
|
34051
|
+
for (let filterTable of sheet.filterTables || []) {
|
|
34052
|
+
const zone = toZone(filterTable.range);
|
|
34053
|
+
// See commit message of https://github.com/odoo/o-spreadsheet/pull/3632 of more details
|
|
34054
|
+
const intersectZoneIndex = knownDataFilterZones.findIndex((knownZone) => overlap(knownZone, zone));
|
|
34055
|
+
if (intersectZoneIndex !== -1) {
|
|
34056
|
+
knownDataFilterZones[intersectZoneIndex] = zone;
|
|
34057
|
+
}
|
|
34058
|
+
else {
|
|
34059
|
+
knownDataFilterZones.push(zone);
|
|
34060
|
+
}
|
|
34061
|
+
}
|
|
34062
|
+
sheet.filterTables = knownDataFilterZones.map((zone) => ({
|
|
34063
|
+
range: zoneToXc(zone),
|
|
34064
|
+
}));
|
|
34065
|
+
}
|
|
34066
|
+
return data;
|
|
34067
|
+
}
|
|
34041
34068
|
// -----------------------------------------------------------------------------
|
|
34042
34069
|
// Helpers
|
|
34043
34070
|
// -----------------------------------------------------------------------------
|
|
@@ -46428,19 +46455,17 @@
|
|
|
46428
46455
|
break;
|
|
46429
46456
|
case "FOCUS_RANGE":
|
|
46430
46457
|
case "CHANGE_RANGE":
|
|
46431
|
-
|
|
46432
|
-
|
|
46433
|
-
|
|
46434
|
-
|
|
46435
|
-
|
|
46436
|
-
|
|
46437
|
-
|
|
46438
|
-
|
|
46439
|
-
|
|
46440
|
-
});
|
|
46441
|
-
}
|
|
46442
|
-
this.focusedInputId = cmd.id;
|
|
46458
|
+
const input = this.inputs[cmd.id];
|
|
46459
|
+
const range = input.ranges.find((range) => range.id === cmd.rangeId);
|
|
46460
|
+
if (range) {
|
|
46461
|
+
const sheetId = this.getters.getActiveSheetId();
|
|
46462
|
+
const zone = this.getters.getRangeFromSheetXC(sheetId, range?.xc || "A1").zone;
|
|
46463
|
+
this.selection.capture(input, { cell: { col: zone.left, row: zone.top }, zone }, {
|
|
46464
|
+
handleEvent: input.handleEvent.bind(input),
|
|
46465
|
+
release: () => (this.focusedInputId = null),
|
|
46466
|
+
});
|
|
46443
46467
|
}
|
|
46468
|
+
this.focusedInputId = cmd.id;
|
|
46444
46469
|
break;
|
|
46445
46470
|
}
|
|
46446
46471
|
this.currentInput?.handle(cmd);
|
|
@@ -56915,9 +56940,9 @@
|
|
|
56915
56940
|
exports.tokenize = tokenize;
|
|
56916
56941
|
|
|
56917
56942
|
|
|
56918
|
-
__info__.version = "17.0.
|
|
56919
|
-
__info__.date = "2024-02-
|
|
56920
|
-
__info__.hash = "
|
|
56943
|
+
__info__.version = "17.0.13";
|
|
56944
|
+
__info__.date = "2024-02-28T12:28:44.914Z";
|
|
56945
|
+
__info__.hash = "ed67be7";
|
|
56921
56946
|
|
|
56922
56947
|
|
|
56923
56948
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|