@odoo/o-spreadsheet 17.1.8 → 17.1.10
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 +138 -69
- package/dist/o-spreadsheet.d.ts +3 -1
- package/dist/o-spreadsheet.esm.js +138 -69
- package/dist/o-spreadsheet.iife.js +138 -69
- package/dist/o-spreadsheet.iife.min.js +279 -283
- package/dist/o_spreadsheet.xml +65 -59
- package/package.json +3 -3
|
@@ -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-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.1.10
|
|
6
|
+
* @date 2024-04-05T14:00:03.890Z
|
|
7
|
+
* @hash edc821c
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -459,7 +459,7 @@
|
|
|
459
459
|
}
|
|
460
460
|
// Generate new Id if the item didn't exist in the dictionary
|
|
461
461
|
const ids = Object.keys(itemsDic);
|
|
462
|
-
const maxId = ids.length === 0 ? 0 :
|
|
462
|
+
const maxId = ids.length === 0 ? 0 : largeMax(ids.map((id) => parseInt(id, 10)));
|
|
463
463
|
itemsDic[maxId + 1] = item;
|
|
464
464
|
return maxId + 1;
|
|
465
465
|
}
|
|
@@ -676,6 +676,34 @@
|
|
|
676
676
|
}
|
|
677
677
|
return value >= min && value <= max;
|
|
678
678
|
}
|
|
679
|
+
/**
|
|
680
|
+
* Alternative to Math.max that works with large arrays.
|
|
681
|
+
* Typically useful for arrays bigger than 100k elements.
|
|
682
|
+
*/
|
|
683
|
+
function largeMax(array) {
|
|
684
|
+
let len = array.length;
|
|
685
|
+
if (len < 100000)
|
|
686
|
+
return Math.max(...array);
|
|
687
|
+
let max = -Infinity;
|
|
688
|
+
while (len--) {
|
|
689
|
+
max = array[len] > max ? array[len] : max;
|
|
690
|
+
}
|
|
691
|
+
return max;
|
|
692
|
+
}
|
|
693
|
+
/**
|
|
694
|
+
* Alternative to Math.min that works with large arrays.
|
|
695
|
+
* Typically useful for arrays bigger than 100k elements.
|
|
696
|
+
*/
|
|
697
|
+
function largeMin(array) {
|
|
698
|
+
let len = array.length;
|
|
699
|
+
if (len < 100000)
|
|
700
|
+
return Math.min(...array);
|
|
701
|
+
let min = +Infinity;
|
|
702
|
+
while (len--) {
|
|
703
|
+
min = array[len] < min ? array[len] : min;
|
|
704
|
+
}
|
|
705
|
+
return min;
|
|
706
|
+
}
|
|
679
707
|
|
|
680
708
|
const RBA_REGEX = /rgba?\(|\s+|\)/gi;
|
|
681
709
|
const HEX_MATCH = /^#([A-F\d]{2}){3,4}$/;
|
|
@@ -4478,8 +4506,9 @@
|
|
|
4478
4506
|
* Get the default height of the cell given its style.
|
|
4479
4507
|
*/
|
|
4480
4508
|
function getDefaultCellHeight(ctx, cell, colSize) {
|
|
4481
|
-
if (!cell || !cell.content)
|
|
4509
|
+
if (!cell || (!cell.isFormula && !cell.content)) {
|
|
4482
4510
|
return DEFAULT_CELL_HEIGHT;
|
|
4511
|
+
}
|
|
4483
4512
|
const maxWidth = cell.style?.wrapping === "wrap" ? colSize - 2 * MIN_CELL_TEXT_MARGIN : undefined;
|
|
4484
4513
|
const numberOfLines = cell.isFormula
|
|
4485
4514
|
? 1
|
|
@@ -8381,10 +8410,10 @@
|
|
|
8381
8410
|
}
|
|
8382
8411
|
}
|
|
8383
8412
|
return {
|
|
8384
|
-
labels:
|
|
8413
|
+
labels: Array.from(labelSet),
|
|
8385
8414
|
dataSetsValues: datasets.map((dataset, indexOfDataset) => ({
|
|
8386
8415
|
...dataset,
|
|
8387
|
-
data:
|
|
8416
|
+
data: Array.from(labelSet).map((label) => labelMap[label][indexOfDataset]),
|
|
8388
8417
|
})),
|
|
8389
8418
|
};
|
|
8390
8419
|
}
|
|
@@ -9136,7 +9165,7 @@
|
|
|
9136
9165
|
return undefined;
|
|
9137
9166
|
}
|
|
9138
9167
|
const labelsTimestamps = labelDates.map((date) => date.getTime());
|
|
9139
|
-
const period =
|
|
9168
|
+
const period = largeMax(labelsTimestamps) - largeMin(labelsTimestamps);
|
|
9140
9169
|
const minUnit = getFormatMinDisplayUnit(format);
|
|
9141
9170
|
if (UNIT_LENGTH.second >= UNIT_LENGTH[minUnit] && Milliseconds.inSeconds(period) < 180) {
|
|
9142
9171
|
return "second";
|
|
@@ -9608,7 +9637,7 @@
|
|
|
9608
9637
|
}
|
|
9609
9638
|
function getPieColors(colors, dataSetsValues) {
|
|
9610
9639
|
const pieColors = [];
|
|
9611
|
-
const maxLength =
|
|
9640
|
+
const maxLength = largeMax(dataSetsValues.map((ds) => ds.data.length));
|
|
9612
9641
|
for (let i = 0; i <= maxLength; i++) {
|
|
9613
9642
|
pieColors.push(colors.next());
|
|
9614
9643
|
}
|
|
@@ -10532,8 +10561,8 @@
|
|
|
10532
10561
|
let last;
|
|
10533
10562
|
const activesRows = env.model.getters.getActiveRows();
|
|
10534
10563
|
if (activesRows.size !== 0) {
|
|
10535
|
-
first =
|
|
10536
|
-
last =
|
|
10564
|
+
first = largeMin([...activesRows]);
|
|
10565
|
+
last = largeMax([...activesRows]);
|
|
10537
10566
|
}
|
|
10538
10567
|
else {
|
|
10539
10568
|
const zone = env.model.getters.getSelectedZones()[0];
|
|
@@ -10561,8 +10590,8 @@
|
|
|
10561
10590
|
let last;
|
|
10562
10591
|
const activeCols = env.model.getters.getActiveCols();
|
|
10563
10592
|
if (activeCols.size !== 0) {
|
|
10564
|
-
first =
|
|
10565
|
-
last =
|
|
10593
|
+
first = largeMin([...activeCols]);
|
|
10594
|
+
last = largeMax([...activeCols]);
|
|
10566
10595
|
}
|
|
10567
10596
|
else {
|
|
10568
10597
|
const zone = env.model.getters.getSelectedZones()[0];
|
|
@@ -10590,8 +10619,8 @@
|
|
|
10590
10619
|
let last;
|
|
10591
10620
|
const activesRows = env.model.getters.getActiveRows();
|
|
10592
10621
|
if (activesRows.size !== 0) {
|
|
10593
|
-
first =
|
|
10594
|
-
last =
|
|
10622
|
+
first = largeMin([...activesRows]);
|
|
10623
|
+
last = largeMax([...activesRows]);
|
|
10595
10624
|
}
|
|
10596
10625
|
else {
|
|
10597
10626
|
const zone = env.model.getters.getSelectedZones()[0];
|
|
@@ -10632,8 +10661,8 @@
|
|
|
10632
10661
|
let last;
|
|
10633
10662
|
const activeCols = env.model.getters.getActiveCols();
|
|
10634
10663
|
if (activeCols.size !== 0) {
|
|
10635
|
-
first =
|
|
10636
|
-
last =
|
|
10664
|
+
first = largeMin([...activeCols]);
|
|
10665
|
+
last = largeMax([...activeCols]);
|
|
10637
10666
|
}
|
|
10638
10667
|
else {
|
|
10639
10668
|
const zone = env.model.getters.getSelectedZones()[0];
|
|
@@ -10674,7 +10703,7 @@
|
|
|
10674
10703
|
let row;
|
|
10675
10704
|
let quantity;
|
|
10676
10705
|
if (activeRows.size) {
|
|
10677
|
-
row =
|
|
10706
|
+
row = largeMin([...activeRows]);
|
|
10678
10707
|
quantity = activeRows.size;
|
|
10679
10708
|
}
|
|
10680
10709
|
else {
|
|
@@ -10695,7 +10724,7 @@
|
|
|
10695
10724
|
let row;
|
|
10696
10725
|
let quantity;
|
|
10697
10726
|
if (activeRows.size) {
|
|
10698
|
-
row =
|
|
10727
|
+
row = largeMax([...activeRows]);
|
|
10699
10728
|
quantity = activeRows.size;
|
|
10700
10729
|
}
|
|
10701
10730
|
else {
|
|
@@ -10716,7 +10745,7 @@
|
|
|
10716
10745
|
let column;
|
|
10717
10746
|
let quantity;
|
|
10718
10747
|
if (activeCols.size) {
|
|
10719
|
-
column =
|
|
10748
|
+
column = largeMin([...activeCols]);
|
|
10720
10749
|
quantity = activeCols.size;
|
|
10721
10750
|
}
|
|
10722
10751
|
else {
|
|
@@ -10737,7 +10766,7 @@
|
|
|
10737
10766
|
let column;
|
|
10738
10767
|
let quantity;
|
|
10739
10768
|
if (activeCols.size) {
|
|
10740
|
-
column =
|
|
10769
|
+
column = largeMax([...activeCols]);
|
|
10741
10770
|
quantity = activeCols.size;
|
|
10742
10771
|
}
|
|
10743
10772
|
else {
|
|
@@ -11128,6 +11157,9 @@
|
|
|
11128
11157
|
result.default = true;
|
|
11129
11158
|
result.defaultValue = defaultValue;
|
|
11130
11159
|
}
|
|
11160
|
+
if (types.some((t) => t.startsWith("RANGE"))) {
|
|
11161
|
+
result.acceptMatrix = true;
|
|
11162
|
+
}
|
|
11131
11163
|
return result;
|
|
11132
11164
|
}
|
|
11133
11165
|
/**
|
|
@@ -19723,11 +19755,27 @@
|
|
|
19723
19755
|
}
|
|
19724
19756
|
const descr = addMetaInfoFromArg(addDescr);
|
|
19725
19757
|
validateArguments(descr.args);
|
|
19726
|
-
this.mapping[name] = addErrorHandling(addResultHandling(descr
|
|
19758
|
+
this.mapping[name] = addErrorHandling(addResultHandling(addInputHandling(descr)), name);
|
|
19727
19759
|
super.add(name, descr);
|
|
19728
19760
|
return this;
|
|
19729
19761
|
}
|
|
19730
19762
|
}
|
|
19763
|
+
function addInputHandling(descr) {
|
|
19764
|
+
function computeWithInputHandling(...args) {
|
|
19765
|
+
for (let i = 0; i < args.length; i++) {
|
|
19766
|
+
const argDefinition = descr.args[descr.getArgToFocus(i + 1) - 1];
|
|
19767
|
+
const arg = args[i];
|
|
19768
|
+
if (isMatrix(arg) && !argDefinition.acceptMatrix) {
|
|
19769
|
+
if (arg.length !== 1 || arg[0].length !== 1) {
|
|
19770
|
+
throw new EvaluationError(_t("Function [[FUNCTION_NAME]] expects the parameter '%s' to be a single value or a single cell reference, not a range.", argDefinition.name));
|
|
19771
|
+
}
|
|
19772
|
+
args[i] = arg[0][0];
|
|
19773
|
+
}
|
|
19774
|
+
}
|
|
19775
|
+
return descr.compute.apply(this, args);
|
|
19776
|
+
}
|
|
19777
|
+
return computeWithInputHandling;
|
|
19778
|
+
}
|
|
19731
19779
|
function addErrorHandling(compute, functionName) {
|
|
19732
19780
|
return function (...args) {
|
|
19733
19781
|
try {
|
|
@@ -19978,14 +20026,19 @@
|
|
|
19978
20026
|
children: [allFunctionListMenuBuilder],
|
|
19979
20027
|
};
|
|
19980
20028
|
function allFunctionListMenuBuilder() {
|
|
19981
|
-
const fnNames = functionRegistry.getKeys();
|
|
20029
|
+
const fnNames = functionRegistry.getKeys().filter((key) => !functionRegistry.get(key).hidden);
|
|
19982
20030
|
return createFormulaFunctions(fnNames);
|
|
19983
20031
|
}
|
|
19984
20032
|
const categoriesFunctionListMenuBuilder = () => {
|
|
19985
20033
|
const functions = functionRegistry.content;
|
|
19986
|
-
const categories = [
|
|
20034
|
+
const categories = [
|
|
20035
|
+
...new Set(functionRegistry
|
|
20036
|
+
.getAll()
|
|
20037
|
+
.filter((fn) => !fn.hidden)
|
|
20038
|
+
.map((fn) => fn.category)),
|
|
20039
|
+
].filter(isDefined$1);
|
|
19987
20040
|
return categories.sort().map((category, i) => {
|
|
19988
|
-
const functionsInCategory = Object.keys(functions).filter((key) => functions[key].category === category);
|
|
20041
|
+
const functionsInCategory = Object.keys(functions).filter((key) => functions[key].category === category && !functions[key].hidden);
|
|
19989
20042
|
return {
|
|
19990
20043
|
name: category,
|
|
19991
20044
|
children: createFormulaFunctions(functionsInCategory),
|
|
@@ -23774,11 +23827,9 @@
|
|
|
23774
23827
|
}
|
|
23775
23828
|
.o-cell-is-operator {
|
|
23776
23829
|
margin-bottom: 5px;
|
|
23777
|
-
width: 96%;
|
|
23778
23830
|
}
|
|
23779
23831
|
.o-cell-is-value {
|
|
23780
23832
|
margin-bottom: 5px;
|
|
23781
|
-
width: 96%;
|
|
23782
23833
|
}
|
|
23783
23834
|
.o-color-picker-widget .o-color-picker-button {
|
|
23784
23835
|
pointer-events: all;
|
|
@@ -26198,6 +26249,9 @@
|
|
|
26198
26249
|
el?.focus({ preventScroll: true });
|
|
26199
26250
|
}
|
|
26200
26251
|
}, () => [this.env.model.getters.getSelectedFigureId(), this.props.figure.id, this.figureRef.el]);
|
|
26252
|
+
owl.onWillUnmount(() => {
|
|
26253
|
+
this.props.onFigureDeleted();
|
|
26254
|
+
});
|
|
26201
26255
|
}
|
|
26202
26256
|
clickAnchor(dirX, dirY, ev) {
|
|
26203
26257
|
this.props.onClickAnchor(dirX, dirY, ev);
|
|
@@ -26216,6 +26270,7 @@
|
|
|
26216
26270
|
this.props.onFigureDeleted();
|
|
26217
26271
|
ev.stopPropagation();
|
|
26218
26272
|
ev.preventDefault();
|
|
26273
|
+
ev.stopPropagation();
|
|
26219
26274
|
break;
|
|
26220
26275
|
case "ArrowDown":
|
|
26221
26276
|
case "ArrowLeft":
|
|
@@ -26236,6 +26291,7 @@
|
|
|
26236
26291
|
});
|
|
26237
26292
|
ev.stopPropagation();
|
|
26238
26293
|
ev.preventDefault();
|
|
26294
|
+
ev.stopPropagation();
|
|
26239
26295
|
break;
|
|
26240
26296
|
}
|
|
26241
26297
|
}
|
|
@@ -26910,6 +26966,7 @@
|
|
|
26910
26966
|
// -----------------------------------------------------------------------------
|
|
26911
26967
|
css /* scss */ `
|
|
26912
26968
|
.o-formula-assistant {
|
|
26969
|
+
background: #ffffff;
|
|
26913
26970
|
.o-formula-assistant-head {
|
|
26914
26971
|
background-color: #f2f2f2;
|
|
26915
26972
|
padding: 10px;
|
|
@@ -26965,6 +27022,9 @@
|
|
|
26965
27022
|
this.assistantState.allowCellSelectionBehind = false;
|
|
26966
27023
|
}, 2000);
|
|
26967
27024
|
}
|
|
27025
|
+
get formulaArgSeparator() {
|
|
27026
|
+
return this.env.model.getters.getLocale().formulaArgSeparator + " ";
|
|
27027
|
+
}
|
|
26968
27028
|
}
|
|
26969
27029
|
|
|
26970
27030
|
const functions$2 = functionRegistry.content;
|
|
@@ -27122,6 +27182,12 @@
|
|
|
27122
27182
|
owl.useEffect(() => {
|
|
27123
27183
|
this.processContent();
|
|
27124
27184
|
});
|
|
27185
|
+
owl.onPatched(() => {
|
|
27186
|
+
// Required because typing '=SUM' and double-clicking another cell leaves ShowProvider/ShowDescription true
|
|
27187
|
+
if (this.env.model.getters.getEditionMode() === "inactive") {
|
|
27188
|
+
this.processTokenAtCursor();
|
|
27189
|
+
}
|
|
27190
|
+
});
|
|
27125
27191
|
}
|
|
27126
27192
|
// ---------------------------------------------------------------------------
|
|
27127
27193
|
// Handlers
|
|
@@ -29181,11 +29247,6 @@
|
|
|
29181
29247
|
height: 10000px;
|
|
29182
29248
|
background-color: ${SELECTION_BORDER_COLOR};
|
|
29183
29249
|
}
|
|
29184
|
-
.o-unhide-buttons {
|
|
29185
|
-
width: fit-content;
|
|
29186
|
-
gap: 5px;
|
|
29187
|
-
transform: translate(-50%, 0);
|
|
29188
|
-
}
|
|
29189
29250
|
.o-unhide:hover {
|
|
29190
29251
|
z-index: ${ComponentsImportance.Grid + 1};
|
|
29191
29252
|
background-color: lightgrey;
|
|
@@ -29347,10 +29408,6 @@
|
|
|
29347
29408
|
height: 1px;
|
|
29348
29409
|
background-color: ${SELECTION_BORDER_COLOR};
|
|
29349
29410
|
}
|
|
29350
|
-
.o-unhide-buttons {
|
|
29351
|
-
height: fit-content;
|
|
29352
|
-
transform: translate(0, -50%);
|
|
29353
|
-
}
|
|
29354
29411
|
.o-unhide:hover {
|
|
29355
29412
|
z-index: ${ComponentsImportance.Grid + 1};
|
|
29356
29413
|
background-color: lightgrey;
|
|
@@ -32291,7 +32348,7 @@
|
|
|
32291
32348
|
function getSheetDims(sheet) {
|
|
32292
32349
|
const dims = [0, 0];
|
|
32293
32350
|
for (let row of sheet.rows) {
|
|
32294
|
-
dims[0] = Math.max(dims[0],
|
|
32351
|
+
dims[0] = Math.max(dims[0], largeMax(row.cells.map((cell) => toCartesian(cell.xc).col)));
|
|
32295
32352
|
dims[1] = Math.max(dims[1], row.index);
|
|
32296
32353
|
}
|
|
32297
32354
|
dims[0] = Math.max(dims[0], EXCEL_IMPORT_DEFAULT_NUMBER_OF_COLS);
|
|
@@ -37191,6 +37248,9 @@
|
|
|
37191
37248
|
if (newRule.criterion.type === "isBoolean") {
|
|
37192
37249
|
this.setCenterStyleToBooleanCells(newRule);
|
|
37193
37250
|
}
|
|
37251
|
+
else if (newRule.criterion.type === "isValueInList") {
|
|
37252
|
+
newRule.criterion.values = Array.from(new Set(newRule.criterion.values));
|
|
37253
|
+
}
|
|
37194
37254
|
const adaptedRules = this.removeRangesFromRules(sheetId, newRule.ranges, rules);
|
|
37195
37255
|
const ruleIndex = adaptedRules.findIndex((rule) => rule.id === newRule.id);
|
|
37196
37256
|
if (ruleIndex !== -1) {
|
|
@@ -37917,7 +37977,7 @@
|
|
|
37917
37977
|
if (hiddenElements.size >= elements) {
|
|
37918
37978
|
return "TooManyHiddenElements" /* CommandResult.TooManyHiddenElements */;
|
|
37919
37979
|
}
|
|
37920
|
-
else if (
|
|
37980
|
+
else if (largeMin(cmd.elements) < 0 || largeMax(cmd.elements) > elements) {
|
|
37921
37981
|
return "InvalidHeaderIndex" /* CommandResult.InvalidHeaderIndex */;
|
|
37922
37982
|
}
|
|
37923
37983
|
else {
|
|
@@ -38732,8 +38792,8 @@
|
|
|
38732
38792
|
let newRange = range;
|
|
38733
38793
|
let changeType = "NONE";
|
|
38734
38794
|
for (let group of groups) {
|
|
38735
|
-
const min =
|
|
38736
|
-
const max =
|
|
38795
|
+
const min = largeMin(group);
|
|
38796
|
+
const max = largeMax(group);
|
|
38737
38797
|
if (range.zone[start] <= min && min <= range.zone[end]) {
|
|
38738
38798
|
const toRemove = Math.min(range.zone[end], max) - min + 1;
|
|
38739
38799
|
changeType = "RESIZE";
|
|
@@ -39156,8 +39216,8 @@
|
|
|
39156
39216
|
}
|
|
39157
39217
|
return "Success" /* CommandResult.Success */;
|
|
39158
39218
|
case "REMOVE_COLUMNS_ROWS": {
|
|
39159
|
-
const min =
|
|
39160
|
-
const max =
|
|
39219
|
+
const min = largeMin(cmd.elements);
|
|
39220
|
+
const max = largeMax(cmd.elements);
|
|
39161
39221
|
if (min < 0 || !this.doesHeaderExist(cmd.sheetId, cmd.dimension, max)) {
|
|
39162
39222
|
return "InvalidHeaderIndex" /* CommandResult.InvalidHeaderIndex */;
|
|
39163
39223
|
}
|
|
@@ -42065,7 +42125,7 @@
|
|
|
42065
42125
|
? getItemId(newFormat, data.formats)
|
|
42066
42126
|
: exportedCellData.format;
|
|
42067
42127
|
let content;
|
|
42068
|
-
if (formulaCell instanceof FormulaCellWithDependencies) {
|
|
42128
|
+
if (isFormula && formulaCell instanceof FormulaCellWithDependencies) {
|
|
42069
42129
|
content = formulaCell.contentWithFixedReferences;
|
|
42070
42130
|
}
|
|
42071
42131
|
else {
|
|
@@ -42486,13 +42546,13 @@
|
|
|
42486
42546
|
.map((cell) => cell.value);
|
|
42487
42547
|
switch (threshold.type) {
|
|
42488
42548
|
case "value":
|
|
42489
|
-
const result = functionName === "max" ?
|
|
42549
|
+
const result = functionName === "max" ? largeMax(rangeValues) : largeMin(rangeValues);
|
|
42490
42550
|
return result;
|
|
42491
42551
|
case "number":
|
|
42492
42552
|
return Number(threshold.value);
|
|
42493
42553
|
case "percentage":
|
|
42494
|
-
const min =
|
|
42495
|
-
const max =
|
|
42554
|
+
const min = largeMin(rangeValues);
|
|
42555
|
+
const max = largeMax(rangeValues);
|
|
42496
42556
|
const delta = max - min;
|
|
42497
42557
|
return min + (delta * Number(threshold.value)) / 100;
|
|
42498
42558
|
case "percentile":
|
|
@@ -43534,13 +43594,13 @@
|
|
|
43534
43594
|
const cells = this.getters.getEvaluatedCellsInZone(sheet.id, zone);
|
|
43535
43595
|
const cellPositions = range(end, -1, -1);
|
|
43536
43596
|
const invalidCells = cellPositions.filter((position) => cells[position] && !cells[position].isAutoSummable);
|
|
43537
|
-
const maxValidPosition =
|
|
43597
|
+
const maxValidPosition = largeMax(invalidCells);
|
|
43538
43598
|
const numberSequences = groupConsecutive(cellPositions.filter((position) => this.isNumber(cells[position])));
|
|
43539
43599
|
const firstSequence = numberSequences[0] || [];
|
|
43540
|
-
if (
|
|
43600
|
+
if (largeMax(firstSequence) < maxValidPosition) {
|
|
43541
43601
|
return Infinity;
|
|
43542
43602
|
}
|
|
43543
|
-
return
|
|
43603
|
+
return largeMin(firstSequence);
|
|
43544
43604
|
}
|
|
43545
43605
|
shouldFindData(sheetId, zone) {
|
|
43546
43606
|
return this.getters.isEmpty(sheetId, zone) || this.getters.isSingleCellOrMerge(sheetId, zone);
|
|
@@ -46033,7 +46093,7 @@
|
|
|
46033
46093
|
* column of the current viewport
|
|
46034
46094
|
*/
|
|
46035
46095
|
getColDimensionsInViewport(sheetId, col) {
|
|
46036
|
-
const left =
|
|
46096
|
+
const left = largeMin(this.getters.getSheetViewVisibleCols());
|
|
46037
46097
|
const start = this.getters.getColRowOffsetInViewport("COL", left, col);
|
|
46038
46098
|
const size = this.getters.getColSize(sheetId, col);
|
|
46039
46099
|
const isColHidden = this.getters.isColHidden(sheetId, col);
|
|
@@ -46048,7 +46108,7 @@
|
|
|
46048
46108
|
* of the current viewport
|
|
46049
46109
|
*/
|
|
46050
46110
|
getRowDimensionsInViewport(sheetId, row) {
|
|
46051
|
-
const top =
|
|
46111
|
+
const top = largeMin(this.getters.getSheetViewVisibleRows());
|
|
46052
46112
|
const start = this.getters.getColRowOffsetInViewport("ROW", top, row);
|
|
46053
46113
|
const size = this.getters.getRowSize(sheetId, row);
|
|
46054
46114
|
const isRowHidden = this.getters.isRowHidden(sheetId, row);
|
|
@@ -47431,7 +47491,7 @@
|
|
|
47431
47491
|
getColMaxWidth(sheetId, index) {
|
|
47432
47492
|
const cellsPositions = positions(this.getters.getColsZone(sheetId, index, index));
|
|
47433
47493
|
const sizes = cellsPositions.map((position) => this.getCellWidth({ sheetId, ...position }));
|
|
47434
|
-
return Math.max(0,
|
|
47494
|
+
return Math.max(0, largeMax(sizes));
|
|
47435
47495
|
}
|
|
47436
47496
|
/**
|
|
47437
47497
|
* Check that any "sheetId" in the command matches an existing
|
|
@@ -48198,7 +48258,7 @@
|
|
|
48198
48258
|
}
|
|
48199
48259
|
getPasteZone(target) {
|
|
48200
48260
|
const height = this.values.length;
|
|
48201
|
-
const width =
|
|
48261
|
+
const width = largeMax(this.values.map((a) => a.length));
|
|
48202
48262
|
const { left: activeCol, top: activeRow } = target[0];
|
|
48203
48263
|
return {
|
|
48204
48264
|
top: activeRow,
|
|
@@ -49144,11 +49204,11 @@
|
|
|
49144
49204
|
}
|
|
49145
49205
|
else {
|
|
49146
49206
|
const range = this.getters.getRangeFromSheetXC(this.sheetId, rule.criterion.values[0]);
|
|
49147
|
-
values = this.getters
|
|
49207
|
+
values = Array.from(new Set(this.getters
|
|
49148
49208
|
.getRangeValues(range)
|
|
49149
49209
|
.filter(isNotNull)
|
|
49150
49210
|
.map((value) => value.toString())
|
|
49151
|
-
.filter((val) => val !== "");
|
|
49211
|
+
.filter((val) => val !== "")));
|
|
49152
49212
|
}
|
|
49153
49213
|
const composerContent = this.getCurrentContent();
|
|
49154
49214
|
if (composerContent && composerContent !== this.getInitialComposerContent()) {
|
|
@@ -49685,6 +49745,7 @@
|
|
|
49685
49745
|
this.gridSelection.zones = this.gridSelection.zones.map((z) => this.getters.expandZone(sheetId, z));
|
|
49686
49746
|
this.gridSelection.anchor.zone = this.getters.expandZone(sheetId, this.gridSelection.anchor.zone);
|
|
49687
49747
|
this.setSelectionMixin(this.gridSelection.anchor, this.gridSelection.zones);
|
|
49748
|
+
this.selectedFigureId = null;
|
|
49688
49749
|
break;
|
|
49689
49750
|
}
|
|
49690
49751
|
/** Any change to the selection has to be reflected in the selection processor. */
|
|
@@ -51579,12 +51640,14 @@
|
|
|
51579
51640
|
this.editionState = "initializing";
|
|
51580
51641
|
}
|
|
51581
51642
|
stopEdition() {
|
|
51582
|
-
|
|
51643
|
+
const input = this.sheetNameRef.el;
|
|
51644
|
+
if (!this.state.isEditing || !input)
|
|
51583
51645
|
return;
|
|
51584
51646
|
this.state.isEditing = false;
|
|
51585
51647
|
this.editionState = "initializing";
|
|
51586
|
-
|
|
51648
|
+
input.blur();
|
|
51587
51649
|
const inputValue = this.getInputContent() || "";
|
|
51650
|
+
input.innerText = inputValue;
|
|
51588
51651
|
interactiveRenameSheet(this.env, this.props.sheetId, inputValue, () => this.startEdition());
|
|
51589
51652
|
}
|
|
51590
51653
|
cancelEdition() {
|
|
@@ -51875,7 +51938,7 @@
|
|
|
51875
51938
|
this.sheetListRef.el.scrollTo({ top: 0, left: scroll, behavior: "smooth" });
|
|
51876
51939
|
}
|
|
51877
51940
|
onSheetMouseDown(sheetId, event) {
|
|
51878
|
-
if (event.button !== 0)
|
|
51941
|
+
if (event.button !== 0 || this.env.model.getters.isReadonly())
|
|
51879
51942
|
return;
|
|
51880
51943
|
this.closeMenu();
|
|
51881
51944
|
const visibleSheets = this.getVisibleSheets();
|
|
@@ -53225,9 +53288,6 @@
|
|
|
53225
53288
|
.text-muted {
|
|
53226
53289
|
color: grey !important;
|
|
53227
53290
|
}
|
|
53228
|
-
button {
|
|
53229
|
-
color: #333;
|
|
53230
|
-
}
|
|
53231
53291
|
.o-disabled {
|
|
53232
53292
|
opacity: 0.4;
|
|
53233
53293
|
pointer: default;
|
|
@@ -53348,17 +53408,17 @@
|
|
|
53348
53408
|
}
|
|
53349
53409
|
|
|
53350
53410
|
.o-button {
|
|
53351
|
-
border: 1px solid
|
|
53411
|
+
border: 1px solid;
|
|
53352
53412
|
padding: 0px 20px 0px 20px;
|
|
53353
53413
|
border-radius: 4px;
|
|
53354
53414
|
font-weight: 500;
|
|
53355
53415
|
font-size: 14px;
|
|
53356
53416
|
height: 30px;
|
|
53357
53417
|
line-height: 16px;
|
|
53358
|
-
background: white;
|
|
53359
53418
|
margin-right: 8px;
|
|
53360
|
-
|
|
53361
|
-
|
|
53419
|
+
|
|
53420
|
+
&:not(:hover) {
|
|
53421
|
+
background-color: transparent;
|
|
53362
53422
|
}
|
|
53363
53423
|
|
|
53364
53424
|
&:enabled {
|
|
@@ -53372,6 +53432,15 @@
|
|
|
53372
53432
|
&:last-child {
|
|
53373
53433
|
margin-right: 0px;
|
|
53374
53434
|
}
|
|
53435
|
+
|
|
53436
|
+
&.o-button-grey {
|
|
53437
|
+
border-color: lightgrey;
|
|
53438
|
+
background: #ffffff;
|
|
53439
|
+
color: #333;
|
|
53440
|
+
&:hover:enabled {
|
|
53441
|
+
background-color: rgba(0, 0, 0, 0.08);
|
|
53442
|
+
}
|
|
53443
|
+
}
|
|
53375
53444
|
}
|
|
53376
53445
|
|
|
53377
53446
|
.o-input {
|
|
@@ -55323,7 +55392,7 @@
|
|
|
55323
55392
|
}
|
|
55324
55393
|
function addDoughnutChart(chart, chartSheetIndex, data, { holeSize } = { holeSize: 50 }) {
|
|
55325
55394
|
const colors = new ChartColors();
|
|
55326
|
-
const maxLength =
|
|
55395
|
+
const maxLength = largeMax(chart.dataSets.map((ds) => getRangeSize(ds.range, chartSheetIndex, data)));
|
|
55327
55396
|
const doughnutColors = range(0, maxLength).map(() => toXlsxHexColor(colors.next()));
|
|
55328
55397
|
const dataSetsNodes = [];
|
|
55329
55398
|
for (const [dsIndex, dataset] of Object.entries(chart.dataSets).reverse()) {
|
|
@@ -57287,9 +57356,9 @@
|
|
|
57287
57356
|
exports.tokenize = tokenize;
|
|
57288
57357
|
|
|
57289
57358
|
|
|
57290
|
-
__info__.version = "17.1.
|
|
57291
|
-
__info__.date = "2024-
|
|
57292
|
-
__info__.hash = "
|
|
57359
|
+
__info__.version = "17.1.10";
|
|
57360
|
+
__info__.date = "2024-04-05T14:00:03.890Z";
|
|
57361
|
+
__info__.hash = "edc821c";
|
|
57293
57362
|
|
|
57294
57363
|
|
|
57295
57364
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|