@odoo/o-spreadsheet 17.2.17 → 17.2.19
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 +75 -73
- package/dist/o-spreadsheet.d.ts +2 -1
- package/dist/o-spreadsheet.esm.js +75 -73
- package/dist/o-spreadsheet.iife.js +75 -73
- package/dist/o-spreadsheet.iife.min.js +223 -223
- package/dist/o_spreadsheet.xml +3 -3
- package/package.json +14 -15
|
@@ -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 2024-
|
|
8
|
-
* @hash
|
|
6
|
+
* @version 17.2.19
|
|
7
|
+
* @date 2024-08-02T08:22:56.367Z
|
|
8
|
+
* @hash c5ae261
|
|
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';
|
|
@@ -485,7 +485,7 @@ function debounce(func, wait, immediate) {
|
|
|
485
485
|
let timeout = undefined;
|
|
486
486
|
const debounced = function () {
|
|
487
487
|
const context = this;
|
|
488
|
-
const args = arguments;
|
|
488
|
+
const args = Array.from(arguments);
|
|
489
489
|
function later() {
|
|
490
490
|
timeout = undefined;
|
|
491
491
|
if (!immediate) {
|
|
@@ -713,7 +713,7 @@ function getSearchRegex(searchStr, searchOptions) {
|
|
|
713
713
|
*/
|
|
714
714
|
function largeMax(array) {
|
|
715
715
|
let len = array.length;
|
|
716
|
-
if (len <
|
|
716
|
+
if (len < 100_000)
|
|
717
717
|
return Math.max(...array);
|
|
718
718
|
let max = -Infinity;
|
|
719
719
|
while (len--) {
|
|
@@ -727,7 +727,7 @@ function largeMax(array) {
|
|
|
727
727
|
*/
|
|
728
728
|
function largeMin(array) {
|
|
729
729
|
let len = array.length;
|
|
730
|
-
if (len <
|
|
730
|
+
if (len < 100_000)
|
|
731
731
|
return Math.min(...array);
|
|
732
732
|
let min = +Infinity;
|
|
733
733
|
while (len--) {
|
|
@@ -2668,13 +2668,16 @@ const wildcardToRegExp = memoize(function wildcardToRegExp(operand) {
|
|
|
2668
2668
|
}
|
|
2669
2669
|
return new RegExp("^" + exp + "$", "i");
|
|
2670
2670
|
});
|
|
2671
|
-
function evaluatePredicate(value = "", criterion) {
|
|
2671
|
+
function evaluatePredicate(value = "", criterion, locale) {
|
|
2672
2672
|
const { operator, operand } = criterion;
|
|
2673
2673
|
if (operand === undefined || value === null || operand === null) {
|
|
2674
2674
|
return false;
|
|
2675
2675
|
}
|
|
2676
2676
|
if (typeof operand === "number" && operator === "=") {
|
|
2677
|
-
|
|
2677
|
+
if (typeof value === "string" && (isNumber(value, locale) || isDateTime(value, locale))) {
|
|
2678
|
+
return toNumber(value, locale) === operand;
|
|
2679
|
+
}
|
|
2680
|
+
return value === operand;
|
|
2678
2681
|
}
|
|
2679
2682
|
if (operator === "<>" || operator === "=") {
|
|
2680
2683
|
let result;
|
|
@@ -2756,7 +2759,7 @@ function visitMatchingRanges(args, cb, locale, isQuery = false) {
|
|
|
2756
2759
|
for (let k = 0; k < countArg - 1; k += 2) {
|
|
2757
2760
|
const criteriaValue = toMatrix(args[k])[i][j].value;
|
|
2758
2761
|
const criterion = predicates[k / 2];
|
|
2759
|
-
validatedPredicates = evaluatePredicate(criteriaValue ?? undefined, criterion);
|
|
2762
|
+
validatedPredicates = evaluatePredicate(criteriaValue ?? undefined, criterion, locale);
|
|
2760
2763
|
if (!validatedPredicates) {
|
|
2761
2764
|
break;
|
|
2762
2765
|
}
|
|
@@ -7180,7 +7183,7 @@ function textCell(value, format, formattedValue) {
|
|
|
7180
7183
|
}
|
|
7181
7184
|
function numberCell(value, format, formattedValue) {
|
|
7182
7185
|
return {
|
|
7183
|
-
value: value || 0,
|
|
7186
|
+
value: value || 0, // necessary to avoid "-0" and NaN values,
|
|
7184
7187
|
format,
|
|
7185
7188
|
formattedValue,
|
|
7186
7189
|
type: CellValueType.number,
|
|
@@ -19628,8 +19631,8 @@ function truncateLabel(label) {
|
|
|
19628
19631
|
function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale, truncateLabels = true }) {
|
|
19629
19632
|
const options = {
|
|
19630
19633
|
// https://www.chartjs.org/docs/latest/general/responsive.html
|
|
19631
|
-
responsive: true,
|
|
19632
|
-
maintainAspectRatio: false,
|
|
19634
|
+
responsive: true, // will resize when its container is resized
|
|
19635
|
+
maintainAspectRatio: false, // doesn't maintain the aspect ration (width/height =2 by default) so the user has the choice of the exact layout
|
|
19633
19636
|
layout: {
|
|
19634
19637
|
padding: { left: 20, right: 20, top: chart.title ? 10 : 25, bottom: 10 },
|
|
19635
19638
|
},
|
|
@@ -19675,7 +19678,7 @@ function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale, tr
|
|
|
19675
19678
|
labels: truncateLabels ? labels.map(truncateLabel) : labels,
|
|
19676
19679
|
datasets: [],
|
|
19677
19680
|
},
|
|
19678
|
-
platform: undefined,
|
|
19681
|
+
platform: undefined, // This key is optional and will be set by chart.js
|
|
19679
19682
|
plugins: [],
|
|
19680
19683
|
};
|
|
19681
19684
|
}
|
|
@@ -19952,7 +19955,7 @@ function getBarConfiguration(chart, labels, localeFormat) {
|
|
|
19952
19955
|
},
|
|
19953
19956
|
y: {
|
|
19954
19957
|
position: chart.verticalAxisPosition,
|
|
19955
|
-
beginAtZero: true,
|
|
19958
|
+
beginAtZero: true, // the origin of the y axis is always zero
|
|
19956
19959
|
ticks: {
|
|
19957
19960
|
color: fontColor,
|
|
19958
19961
|
callback: (value) => {
|
|
@@ -20476,7 +20479,7 @@ function getLineOrScatterConfiguration(chart, labels, options) {
|
|
|
20476
20479
|
},
|
|
20477
20480
|
y: {
|
|
20478
20481
|
position: chart.verticalAxisPosition,
|
|
20479
|
-
beginAtZero: true,
|
|
20482
|
+
beginAtZero: true, // the origin of the y axis is always zero
|
|
20480
20483
|
ticks: {
|
|
20481
20484
|
color: fontColor,
|
|
20482
20485
|
callback: (value) => {
|
|
@@ -20566,7 +20569,7 @@ function createLineOrScatterChartRuntime(chart, getters) {
|
|
|
20566
20569
|
const dataset = {
|
|
20567
20570
|
label,
|
|
20568
20571
|
data,
|
|
20569
|
-
tension: 0,
|
|
20572
|
+
tension: 0, // 0 -> render straight lines, which is much faster
|
|
20570
20573
|
borderColor: color,
|
|
20571
20574
|
backgroundColor,
|
|
20572
20575
|
pointBackgroundColor: color,
|
|
@@ -20788,7 +20791,7 @@ class PieChart extends AbstractChart {
|
|
|
20788
20791
|
...this.getDefinition(),
|
|
20789
20792
|
backgroundColor: toXlsxHexColor(this.background || BACKGROUND_CHART_COLOR),
|
|
20790
20793
|
fontColor: toXlsxHexColor(chartFontColor(this.background)),
|
|
20791
|
-
verticalAxisPosition: "left",
|
|
20794
|
+
verticalAxisPosition: "left", //TODO ExcelChartDefinition should be adapted, but can be done later
|
|
20792
20795
|
dataSets,
|
|
20793
20796
|
labelRange,
|
|
20794
20797
|
};
|
|
@@ -23355,7 +23358,7 @@ const lightTemplateWithHeader = (colorSet) => ({
|
|
|
23355
23358
|
style: { fillColor: colorSet.highlight, textColor: "#FFFFFF" },
|
|
23356
23359
|
border: { bottom: { color: colorSet.highlight, style: "thin" } },
|
|
23357
23360
|
},
|
|
23358
|
-
totalRow: { border: { top: { color: colorSet.highlight, style: "medium" } } },
|
|
23361
|
+
totalRow: { border: { top: { color: colorSet.highlight, style: "medium" } } }, // @compatibility: should be double line
|
|
23359
23362
|
firstRowStripe: { border: { bottom: { color: colorSet.highlight, style: "thin" } } },
|
|
23360
23363
|
secondRowStripe: { border: { bottom: { color: colorSet.highlight, style: "thin" } } },
|
|
23361
23364
|
});
|
|
@@ -23373,7 +23376,7 @@ const lightTemplateAllBorders = (colorSet) => ({
|
|
|
23373
23376
|
},
|
|
23374
23377
|
},
|
|
23375
23378
|
headerRow: { border: { bottom: { color: colorSet.highlight, style: "medium" } } },
|
|
23376
|
-
totalRow: { border: { top: { color: colorSet.highlight, style: "medium" } } },
|
|
23379
|
+
totalRow: { border: { top: { color: colorSet.highlight, style: "medium" } } }, // @compatibility: should be double line
|
|
23377
23380
|
firstRowStripe: { style: { fillColor: colorSet.light } },
|
|
23378
23381
|
firstColumnStripe: { style: { fillColor: colorSet.light } },
|
|
23379
23382
|
});
|
|
@@ -23392,7 +23395,7 @@ const mediumTemplateBandedBorders = (colorSet) => ({
|
|
|
23392
23395
|
headerRow: {
|
|
23393
23396
|
style: { fillColor: colorSet.highlight, textColor: "#FFFFFF" },
|
|
23394
23397
|
},
|
|
23395
|
-
totalRow: { border: { top: { color: colorSet.highlight, style: "medium" } } },
|
|
23398
|
+
totalRow: { border: { top: { color: colorSet.highlight, style: "medium" } } }, // @compatibility: should be double line
|
|
23396
23399
|
firstRowStripe: { style: { fillColor: colorSet.light } },
|
|
23397
23400
|
firstColumnStripe: { style: { fillColor: colorSet.light } },
|
|
23398
23401
|
});
|
|
@@ -23428,7 +23431,7 @@ const mediumTemplateMinimalBorders = (colorSet) => ({
|
|
|
23428
23431
|
bottom: { color: "#000000", style: "medium" },
|
|
23429
23432
|
},
|
|
23430
23433
|
},
|
|
23431
|
-
totalRow: { border: { top: { color: "#000000", style: "medium" } } },
|
|
23434
|
+
totalRow: { border: { top: { color: "#000000", style: "medium" } } }, // @compatibility: should be double line
|
|
23432
23435
|
headerRow: {
|
|
23433
23436
|
style: { fillColor: colorSet.highlight, textColor: "#FFFFFF" },
|
|
23434
23437
|
border: { bottom: { color: "#000000", style: "medium" } },
|
|
@@ -23452,7 +23455,7 @@ const mediumTemplateAllBorders = (colorSet) => ({
|
|
|
23452
23455
|
},
|
|
23453
23456
|
style: { fillColor: colorSet.light },
|
|
23454
23457
|
},
|
|
23455
|
-
totalRow: { border: { top: { color: colorSet.highlight, style: "medium" } } },
|
|
23458
|
+
totalRow: { border: { top: { color: colorSet.highlight, style: "medium" } } }, // @compatibility: should be double line
|
|
23456
23459
|
firstRowStripe: { style: { fillColor: colorSet.medium } },
|
|
23457
23460
|
firstColumnStripe: { style: { fillColor: colorSet.medium } },
|
|
23458
23461
|
});
|
|
@@ -23483,7 +23486,7 @@ const darkTemplateNoBorders = (colorSet) => ({
|
|
|
23483
23486
|
category: "dark",
|
|
23484
23487
|
colorName: colorSet.name,
|
|
23485
23488
|
wholeTable: { style: { fillColor: colorSet.light } },
|
|
23486
|
-
totalRow: { border: { top: { color: "#000000", style: "medium" } } },
|
|
23489
|
+
totalRow: { border: { top: { color: "#000000", style: "medium" } } }, // @compatibility: should be double line
|
|
23487
23490
|
headerRow: { style: { fillColor: colorSet.highlight, textColor: "#FFFFFF" } },
|
|
23488
23491
|
firstRowStripe: { style: { fillColor: colorSet.medium } },
|
|
23489
23492
|
firstColumnStripe: { style: { fillColor: colorSet.medium } },
|
|
@@ -32255,7 +32258,9 @@ class Composer extends Component {
|
|
|
32255
32258
|
argToFocus: 0,
|
|
32256
32259
|
});
|
|
32257
32260
|
compositionActive = false;
|
|
32261
|
+
spreadsheetRect = useSpreadsheetRect();
|
|
32258
32262
|
get assistantStyle() {
|
|
32263
|
+
const composerRect = this.composerRef.el.getBoundingClientRect();
|
|
32259
32264
|
const assistantStyle = {};
|
|
32260
32265
|
assistantStyle["min-width"] = `${this.props.rect?.width || ASSISTANT_WIDTH}px`;
|
|
32261
32266
|
const proposals = this.autoCompleteState.provider?.proposals;
|
|
@@ -32282,6 +32287,9 @@ class Composer extends Component {
|
|
|
32282
32287
|
}
|
|
32283
32288
|
else if (this.props.delimitation) {
|
|
32284
32289
|
assistantStyle["max-height"] = `${this.props.delimitation.height}px`;
|
|
32290
|
+
if (composerRect.left + ASSISTANT_WIDTH > this.spreadsheetRect.width) {
|
|
32291
|
+
assistantStyle.right = `0px`;
|
|
32292
|
+
}
|
|
32285
32293
|
}
|
|
32286
32294
|
return cssPropertiesToCss(assistantStyle);
|
|
32287
32295
|
}
|
|
@@ -33844,10 +33852,13 @@ function useCellHovered(env, gridRef, callback) {
|
|
|
33844
33852
|
row: undefined,
|
|
33845
33853
|
};
|
|
33846
33854
|
const { Date } = window;
|
|
33847
|
-
let x =
|
|
33848
|
-
let y =
|
|
33855
|
+
let x = undefined;
|
|
33856
|
+
let y = undefined;
|
|
33849
33857
|
let lastMoved = 0;
|
|
33850
33858
|
function getPosition() {
|
|
33859
|
+
if (x === undefined || y === undefined) {
|
|
33860
|
+
return { col: -1, row: -1 };
|
|
33861
|
+
}
|
|
33851
33862
|
const col = env.model.getters.getColIndex(x);
|
|
33852
33863
|
const row = env.model.getters.getRowIndex(y);
|
|
33853
33864
|
return { col, row };
|
|
@@ -35678,7 +35689,7 @@ class VerticalScrollBar extends Component {
|
|
|
35678
35689
|
onScroll(offset) {
|
|
35679
35690
|
const { scrollX } = this.env.model.getters.getActiveSheetDOMScrollInfo();
|
|
35680
35691
|
this.env.model.dispatch("SET_VIEWPORT_OFFSET", {
|
|
35681
|
-
offsetX: scrollX,
|
|
35692
|
+
offsetX: scrollX, // offsetX is the same
|
|
35682
35693
|
offsetY: offset,
|
|
35683
35694
|
});
|
|
35684
35695
|
}
|
|
@@ -35967,8 +35978,8 @@ class Grid extends Component {
|
|
|
35967
35978
|
"Ctrl+Shift+L": () => this.setHorizontalAlign("left"),
|
|
35968
35979
|
"Ctrl+Shift+R": () => this.setHorizontalAlign("right"),
|
|
35969
35980
|
"Ctrl+Shift+V": () => PASTE_AS_VALUE_ACTION(this.env),
|
|
35970
|
-
"Ctrl+Shift+<": () => this.clearFormatting(),
|
|
35971
|
-
"Ctrl+<": () => this.clearFormatting(),
|
|
35981
|
+
"Ctrl+Shift+<": () => this.clearFormatting(), // for qwerty
|
|
35982
|
+
"Ctrl+<": () => this.clearFormatting(), // for azerty
|
|
35972
35983
|
"Ctrl+Shift+ ": () => {
|
|
35973
35984
|
this.env.model.selection.selectAll();
|
|
35974
35985
|
},
|
|
@@ -36769,10 +36780,10 @@ function convertCFCellIsOperator(xlsxCfOperator) {
|
|
|
36769
36780
|
const CF_TYPE_CONVERSION_MAP = {
|
|
36770
36781
|
aboveAverage: undefined,
|
|
36771
36782
|
expression: undefined,
|
|
36772
|
-
cellIs: undefined,
|
|
36773
|
-
colorScale: undefined,
|
|
36783
|
+
cellIs: undefined, // exist but isn't an operator in o_spreadsheet
|
|
36784
|
+
colorScale: undefined, // exist but isn't an operator in o_spreadsheet
|
|
36774
36785
|
dataBar: undefined,
|
|
36775
|
-
iconSet: undefined,
|
|
36786
|
+
iconSet: undefined, // exist but isn't an operator in o_spreadsheet
|
|
36776
36787
|
top10: undefined,
|
|
36777
36788
|
uniqueValues: undefined,
|
|
36778
36789
|
duplicateValues: undefined,
|
|
@@ -37007,7 +37018,7 @@ const XLSX_INDEXED_COLORS = {
|
|
|
37007
37018
|
61: "993366",
|
|
37008
37019
|
62: "333399",
|
|
37009
37020
|
63: "333333",
|
|
37010
|
-
64: "000000",
|
|
37021
|
+
64: "000000", // system foreground
|
|
37011
37022
|
65: "FFFFFF", // system background
|
|
37012
37023
|
};
|
|
37013
37024
|
const IMAGE_MIMETYPE_TO_EXTENSION_MAPPING = {
|
|
@@ -40650,12 +40661,13 @@ class BordersPlugin extends CorePlugin {
|
|
|
40650
40661
|
this.clearBorders(cmd.sheetId, cmd.target);
|
|
40651
40662
|
break;
|
|
40652
40663
|
case "REMOVE_COLUMNS_ROWS":
|
|
40653
|
-
|
|
40664
|
+
const elements = [...cmd.elements].sort((a, b) => b - a);
|
|
40665
|
+
for (const group of groupConsecutive(elements)) {
|
|
40654
40666
|
if (cmd.dimension === "COL") {
|
|
40655
|
-
this.shiftBordersHorizontally(cmd.sheetId,
|
|
40667
|
+
this.shiftBordersHorizontally(cmd.sheetId, group[group.length - 1] + 1, -group.length);
|
|
40656
40668
|
}
|
|
40657
40669
|
else {
|
|
40658
|
-
this.shiftBordersVertically(cmd.sheetId,
|
|
40670
|
+
this.shiftBordersVertically(cmd.sheetId, group[group.length - 1] + 1, -group.length);
|
|
40659
40671
|
}
|
|
40660
40672
|
}
|
|
40661
40673
|
break;
|
|
@@ -45020,12 +45032,7 @@ class SheetPlugin extends CorePlugin {
|
|
|
45020
45032
|
});
|
|
45021
45033
|
}
|
|
45022
45034
|
if (colIndex > deletedColumn) {
|
|
45023
|
-
this.
|
|
45024
|
-
sheetId: sheet.id,
|
|
45025
|
-
cellId: cellId,
|
|
45026
|
-
col: colIndex - 1,
|
|
45027
|
-
row: rowIndex,
|
|
45028
|
-
});
|
|
45035
|
+
this.setNewPosition(cellId, sheet.id, colIndex - 1, rowIndex);
|
|
45029
45036
|
}
|
|
45030
45037
|
}
|
|
45031
45038
|
}
|
|
@@ -45035,7 +45042,7 @@ class SheetPlugin extends CorePlugin {
|
|
|
45035
45042
|
* Move the cells after a column or rows insertion
|
|
45036
45043
|
*/
|
|
45037
45044
|
moveCellsOnAddition(sheet, addedElement, quantity, dimension) {
|
|
45038
|
-
const
|
|
45045
|
+
const updates = [];
|
|
45039
45046
|
for (let rowIndex = 0; rowIndex < sheet.rows.length; rowIndex++) {
|
|
45040
45047
|
const row = sheet.rows[rowIndex];
|
|
45041
45048
|
if (dimension !== "rows" || rowIndex >= addedElement) {
|
|
@@ -45044,20 +45051,20 @@ class SheetPlugin extends CorePlugin {
|
|
|
45044
45051
|
const cellId = row.cells[i];
|
|
45045
45052
|
if (cellId) {
|
|
45046
45053
|
if (dimension === "rows" || colIndex >= addedElement) {
|
|
45047
|
-
|
|
45048
|
-
type: "UPDATE_CELL_POSITION",
|
|
45054
|
+
updates.push({
|
|
45049
45055
|
sheetId: sheet.id,
|
|
45050
45056
|
cellId: cellId,
|
|
45051
45057
|
col: colIndex + (dimension === "columns" ? quantity : 0),
|
|
45052
45058
|
row: rowIndex + (dimension === "rows" ? quantity : 0),
|
|
45059
|
+
type: "UPDATE_CELL_POSITION",
|
|
45053
45060
|
});
|
|
45054
45061
|
}
|
|
45055
45062
|
}
|
|
45056
45063
|
}
|
|
45057
45064
|
}
|
|
45058
45065
|
}
|
|
45059
|
-
for (let
|
|
45060
|
-
this.
|
|
45066
|
+
for (let update of updates.reverse()) {
|
|
45067
|
+
this.updateCellPosition(update);
|
|
45061
45068
|
}
|
|
45062
45069
|
}
|
|
45063
45070
|
/**
|
|
@@ -45090,12 +45097,7 @@ class SheetPlugin extends CorePlugin {
|
|
|
45090
45097
|
const colIndex = Number(i);
|
|
45091
45098
|
const cellId = row.cells[i];
|
|
45092
45099
|
if (cellId) {
|
|
45093
|
-
this.
|
|
45094
|
-
sheetId: sheet.id,
|
|
45095
|
-
cellId: cellId,
|
|
45096
|
-
col: colIndex,
|
|
45097
|
-
row: rowIndex - numberRows,
|
|
45098
|
-
});
|
|
45100
|
+
this.setNewPosition(cellId, sheet.id, colIndex, rowIndex - numberRows);
|
|
45099
45101
|
}
|
|
45100
45102
|
}
|
|
45101
45103
|
}
|
|
@@ -48288,17 +48290,17 @@ function isBadExpression(tokens) {
|
|
|
48288
48290
|
*/
|
|
48289
48291
|
function sortWithClusters(colorsToSort) {
|
|
48290
48292
|
const clusters = [
|
|
48291
|
-
{ leadColor: rgba(255, 0, 0), colors: [] },
|
|
48292
|
-
{ leadColor: rgba(255, 128, 0), colors: [] },
|
|
48293
|
-
{ leadColor: rgba(128, 128, 0), colors: [] },
|
|
48294
|
-
{ leadColor: rgba(128, 255, 0), colors: [] },
|
|
48295
|
-
{ leadColor: rgba(0, 255, 0), colors: [] },
|
|
48296
|
-
{ leadColor: rgba(0, 255, 128), colors: [] },
|
|
48297
|
-
{ leadColor: rgba(0, 255, 255), colors: [] },
|
|
48298
|
-
{ leadColor: rgba(0, 127, 255), colors: [] },
|
|
48299
|
-
{ leadColor: rgba(0, 0, 255), colors: [] },
|
|
48300
|
-
{ leadColor: rgba(127, 0, 255), colors: [] },
|
|
48301
|
-
{ leadColor: rgba(128, 0, 128), colors: [] },
|
|
48293
|
+
{ leadColor: rgba(255, 0, 0), colors: [] }, // red
|
|
48294
|
+
{ leadColor: rgba(255, 128, 0), colors: [] }, // orange
|
|
48295
|
+
{ leadColor: rgba(128, 128, 0), colors: [] }, // yellow
|
|
48296
|
+
{ leadColor: rgba(128, 255, 0), colors: [] }, // chartreuse
|
|
48297
|
+
{ leadColor: rgba(0, 255, 0), colors: [] }, // green
|
|
48298
|
+
{ leadColor: rgba(0, 255, 128), colors: [] }, // spring green
|
|
48299
|
+
{ leadColor: rgba(0, 255, 255), colors: [] }, // cyan
|
|
48300
|
+
{ leadColor: rgba(0, 127, 255), colors: [] }, // azure
|
|
48301
|
+
{ leadColor: rgba(0, 0, 255), colors: [] }, // blue
|
|
48302
|
+
{ leadColor: rgba(127, 0, 255), colors: [] }, // violet
|
|
48303
|
+
{ leadColor: rgba(128, 0, 128), colors: [] }, // magenta
|
|
48302
48304
|
{ leadColor: rgba(255, 0, 128), colors: [] }, // rose
|
|
48303
48305
|
];
|
|
48304
48306
|
for (const color of colorsToSort.map(colorToRGBA)) {
|
|
@@ -55419,7 +55421,7 @@ class BottomBar extends Component {
|
|
|
55419
55421
|
.map((sheetEl) => sheetEl.getBoundingClientRect())
|
|
55420
55422
|
.map((rect) => ({
|
|
55421
55423
|
x: rect.x,
|
|
55422
|
-
width: rect.width - 1,
|
|
55424
|
+
width: rect.width - 1, // -1 to compensate negative margin
|
|
55423
55425
|
y: rect.y,
|
|
55424
55426
|
height: rect.height,
|
|
55425
55427
|
}));
|
|
@@ -55641,7 +55643,7 @@ class RowGroup extends AbstractHeaderGroup {
|
|
|
55641
55643
|
}
|
|
55642
55644
|
return cssPropertiesToCss({
|
|
55643
55645
|
top: `${groupBox.headerRect.height / 2}px`,
|
|
55644
|
-
left: `calc(50% - 1px)`,
|
|
55646
|
+
left: `calc(50% - 1px)`, // -1px: we want the border to be on the center
|
|
55645
55647
|
width: `30%`,
|
|
55646
55648
|
height: `calc(100% - ${groupBox.headerRect.height / 2}px)`,
|
|
55647
55649
|
"border-left": `1px solid ${HEADER_GROUPING_BORDER_COLOR}`,
|
|
@@ -55693,7 +55695,7 @@ class ColGroup extends AbstractHeaderGroup {
|
|
|
55693
55695
|
return "";
|
|
55694
55696
|
}
|
|
55695
55697
|
return cssPropertiesToCss({
|
|
55696
|
-
top: `calc(50% - 1px)`,
|
|
55698
|
+
top: `calc(50% - 1px)`, // -1px: we want the border to be on the center
|
|
55697
55699
|
left: `${groupBox.headerRect.width / 2}px`,
|
|
55698
55700
|
width: `calc(100% - ${groupBox.headerRect.width / 2}px)`,
|
|
55699
55701
|
height: `30%`,
|
|
@@ -57111,7 +57113,7 @@ class Spreadsheet extends Component {
|
|
|
57111
57113
|
const gridColSize = GROUP_LAYER_WIDTH * this.rowLayers.length;
|
|
57112
57114
|
const gridRowSize = GROUP_LAYER_WIDTH * this.colLayers.length;
|
|
57113
57115
|
return cssPropertiesToCss({
|
|
57114
|
-
"grid-template-columns": `${gridColSize ? gridColSize + 2 : 0}px auto`,
|
|
57116
|
+
"grid-template-columns": `${gridColSize ? gridColSize + 2 : 0}px auto`, // +2: margins
|
|
57115
57117
|
"grid-template-rows": `${gridRowSize ? gridRowSize + 2 : 0}px auto`,
|
|
57116
57118
|
});
|
|
57117
57119
|
}
|
|
@@ -58561,7 +58563,7 @@ class SelectionStreamProcessorImpl {
|
|
|
58561
58563
|
}
|
|
58562
58564
|
|
|
58563
58565
|
class StateObserver {
|
|
58564
|
-
changes
|
|
58566
|
+
changes;
|
|
58565
58567
|
commands = [];
|
|
58566
58568
|
/**
|
|
58567
58569
|
* Record the changes which could happen in the given callback, save them in a
|
|
@@ -58593,7 +58595,7 @@ class StateObserver {
|
|
|
58593
58595
|
if (value[key] === val) {
|
|
58594
58596
|
return;
|
|
58595
58597
|
}
|
|
58596
|
-
this.changes
|
|
58598
|
+
this.changes?.push({
|
|
58597
58599
|
path: args,
|
|
58598
58600
|
before: value[key],
|
|
58599
58601
|
after: val,
|
|
@@ -59724,7 +59726,7 @@ function addTableColumns(table, sheetData) {
|
|
|
59724
59726
|
const colHeaderXc = toXC(tableZone.left + i, tableZone.top);
|
|
59725
59727
|
const colName = sheetData.cells[colHeaderXc]?.content || `col${i}`;
|
|
59726
59728
|
const colAttributes = [
|
|
59727
|
-
["id", i + 1],
|
|
59729
|
+
["id", i + 1], // id cannot be 0
|
|
59728
59730
|
["name", colName],
|
|
59729
59731
|
];
|
|
59730
59732
|
columns.push(escapeXml /*xml*/ `<tableColumn ${formatAttributes(colAttributes)}/>`);
|
|
@@ -60840,6 +60842,6 @@ const constants = {
|
|
|
60840
60842
|
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 };
|
|
60841
60843
|
|
|
60842
60844
|
|
|
60843
|
-
__info__.version = "17.2.
|
|
60844
|
-
__info__.date = "2024-
|
|
60845
|
-
__info__.hash = "
|
|
60845
|
+
__info__.version = "17.2.19";
|
|
60846
|
+
__info__.date = "2024-08-02T08:22:56.367Z";
|
|
60847
|
+
__info__.hash = "c5ae261";
|