@odoo/o-spreadsheet 16.3.9 → 16.3.11
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 +103 -38
- package/dist/o-spreadsheet.d.ts +13 -5
- package/dist/o-spreadsheet.esm.js +103 -38
- package/dist/o-spreadsheet.iife.js +103 -38
- package/dist/o-spreadsheet.iife.min.js +124 -123
- package/package.json +1 -1
|
@@ -1034,13 +1034,17 @@ function getAddHeaderStartIndex(position, base) {
|
|
|
1034
1034
|
return position === "after" ? base + 1 : base;
|
|
1035
1035
|
}
|
|
1036
1036
|
/**
|
|
1037
|
-
*
|
|
1037
|
+
* Compares two objects.
|
|
1038
1038
|
*/
|
|
1039
1039
|
function deepEquals(o1, o2) {
|
|
1040
1040
|
if (o1 === o2)
|
|
1041
1041
|
return true;
|
|
1042
1042
|
if ((o1 && !o2) || (o2 && !o1))
|
|
1043
1043
|
return false;
|
|
1044
|
+
if (typeof o1 !== typeof o2)
|
|
1045
|
+
return false;
|
|
1046
|
+
if (typeof o1 !== "object")
|
|
1047
|
+
return o1 === o2;
|
|
1044
1048
|
// Objects can have different keys if the values are undefined
|
|
1045
1049
|
const keys = new Set();
|
|
1046
1050
|
Object.keys(o1).forEach((key) => keys.add(key));
|
|
@@ -4806,6 +4810,7 @@ css /* scss */ `
|
|
|
4806
4810
|
padding: 10px;
|
|
4807
4811
|
width: ${ERROR_TOOLTIP_WIDTH}px;
|
|
4808
4812
|
box-sizing: border-box !important;
|
|
4813
|
+
overflow-wrap: break-word;
|
|
4809
4814
|
}
|
|
4810
4815
|
`;
|
|
4811
4816
|
class ErrorToolTip extends owl.Component {
|
|
@@ -7466,6 +7471,7 @@ class LineChart extends AbstractChart {
|
|
|
7466
7471
|
aggregated;
|
|
7467
7472
|
type = "line";
|
|
7468
7473
|
dataSetsHaveTitle;
|
|
7474
|
+
cumulative;
|
|
7469
7475
|
constructor(definition, sheetId, getters) {
|
|
7470
7476
|
super(definition, sheetId, getters);
|
|
7471
7477
|
this.dataSets = createDataSets(this.getters, definition.dataSets, sheetId, definition.dataSetsHaveTitle);
|
|
@@ -7477,6 +7483,7 @@ class LineChart extends AbstractChart {
|
|
|
7477
7483
|
this.stacked = definition.stacked;
|
|
7478
7484
|
this.aggregated = definition.aggregated;
|
|
7479
7485
|
this.dataSetsHaveTitle = definition.dataSetsHaveTitle;
|
|
7486
|
+
this.cumulative = definition.cumulative;
|
|
7480
7487
|
}
|
|
7481
7488
|
static validateChartDefinition(validator, definition) {
|
|
7482
7489
|
return validator.checkValidations(definition, checkDataset, checkLabelRange);
|
|
@@ -7497,6 +7504,7 @@ class LineChart extends AbstractChart {
|
|
|
7497
7504
|
labelRange: context.auxiliaryRange || undefined,
|
|
7498
7505
|
stacked: false,
|
|
7499
7506
|
aggregated: false,
|
|
7507
|
+
cumulative: false,
|
|
7500
7508
|
};
|
|
7501
7509
|
}
|
|
7502
7510
|
getDefinition() {
|
|
@@ -7517,6 +7525,7 @@ class LineChart extends AbstractChart {
|
|
|
7517
7525
|
labelsAsText: this.labelsAsText,
|
|
7518
7526
|
stacked: this.stacked,
|
|
7519
7527
|
aggregated: this.aggregated,
|
|
7528
|
+
cumulative: this.cumulative,
|
|
7520
7529
|
};
|
|
7521
7530
|
}
|
|
7522
7531
|
getContextCreation() {
|
|
@@ -7725,6 +7734,16 @@ function createLineChartRuntime(chart, getters) {
|
|
|
7725
7734
|
if (chart.stacked) {
|
|
7726
7735
|
backgroundRGBA.a = LINE_FILL_TRANSPARENCY;
|
|
7727
7736
|
}
|
|
7737
|
+
if (chart.cumulative) {
|
|
7738
|
+
let accumulator = 0;
|
|
7739
|
+
data = data.map((value) => {
|
|
7740
|
+
if (!isNaN(value)) {
|
|
7741
|
+
accumulator += parseFloat(value);
|
|
7742
|
+
return accumulator;
|
|
7743
|
+
}
|
|
7744
|
+
return value;
|
|
7745
|
+
});
|
|
7746
|
+
}
|
|
7728
7747
|
const backgroundColor = rgbaToHex(backgroundRGBA);
|
|
7729
7748
|
const dataset = {
|
|
7730
7749
|
label,
|
|
@@ -8546,6 +8565,7 @@ function getSmartChartDefinition(zone, getters) {
|
|
|
8546
8565
|
labelsAsText: false,
|
|
8547
8566
|
stacked: false,
|
|
8548
8567
|
aggregated: false,
|
|
8568
|
+
cumulative: false,
|
|
8549
8569
|
labelRange: labelRangeXc,
|
|
8550
8570
|
type: "line",
|
|
8551
8571
|
dataSetsHaveTitle,
|
|
@@ -8908,6 +8928,13 @@ const REMOVE_ROWS_ACTION = (env) => {
|
|
|
8908
8928
|
elements: rows,
|
|
8909
8929
|
});
|
|
8910
8930
|
};
|
|
8931
|
+
const CAN_REMOVE_COLUMNS_ROWS = (dimension, env) => {
|
|
8932
|
+
const sheetId = env.model.getters.getActiveSheetId();
|
|
8933
|
+
const selectedElements = env.model.getters.getElementsFromSelection(dimension);
|
|
8934
|
+
const includesAllVisibleHeaders = env.model.getters.checkElementsIncludeAllVisibleHeaders(sheetId, dimension, selectedElements);
|
|
8935
|
+
const includesAllNonFrozenHeaders = env.model.getters.checkElementsIncludeAllNonFrozenHeaders(sheetId, dimension, selectedElements);
|
|
8936
|
+
return !includesAllVisibleHeaders && !includesAllNonFrozenHeaders;
|
|
8937
|
+
};
|
|
8911
8938
|
const REMOVE_COLUMNS_NAME = (env) => {
|
|
8912
8939
|
if (env.model.getters.getSelectedZones().length > 1) {
|
|
8913
8940
|
return _lt("Delete columns");
|
|
@@ -8932,7 +8959,7 @@ const REMOVE_COLUMNS_NAME = (env) => {
|
|
|
8932
8959
|
const NOT_ALL_VISIBLE_ROWS_SELECTED = (env) => {
|
|
8933
8960
|
const sheetId = env.model.getters.getActiveSheetId();
|
|
8934
8961
|
const selectedRows = env.model.getters.getElementsFromSelection("ROW");
|
|
8935
|
-
return env.model.getters.
|
|
8962
|
+
return !env.model.getters.checkElementsIncludeAllVisibleHeaders(sheetId, "ROW", selectedRows);
|
|
8936
8963
|
};
|
|
8937
8964
|
const REMOVE_COLUMNS_ACTION = (env) => {
|
|
8938
8965
|
let columns = [...env.model.getters.getActiveCols()];
|
|
@@ -8951,7 +8978,7 @@ const REMOVE_COLUMNS_ACTION = (env) => {
|
|
|
8951
8978
|
const NOT_ALL_VISIBLE_COLS_SELECTED = (env) => {
|
|
8952
8979
|
const sheetId = env.model.getters.getActiveSheetId();
|
|
8953
8980
|
const selectedCols = env.model.getters.getElementsFromSelection("COL");
|
|
8954
|
-
return env.model.getters.
|
|
8981
|
+
return !env.model.getters.checkElementsIncludeAllVisibleHeaders(sheetId, "COL", selectedCols);
|
|
8955
8982
|
};
|
|
8956
8983
|
const INSERT_CELL_SHIFT_DOWN = (env) => {
|
|
8957
8984
|
const zone = env.model.getters.getSelectedZone();
|
|
@@ -9408,7 +9435,7 @@ const deleteValues = {
|
|
|
9408
9435
|
const deleteRows = {
|
|
9409
9436
|
name: REMOVE_ROWS_NAME,
|
|
9410
9437
|
execute: REMOVE_ROWS_ACTION,
|
|
9411
|
-
isVisible:
|
|
9438
|
+
isVisible: (env) => CAN_REMOVE_COLUMNS_ROWS("ROW", env),
|
|
9412
9439
|
};
|
|
9413
9440
|
const deleteRow = {
|
|
9414
9441
|
...deleteRows,
|
|
@@ -9421,7 +9448,7 @@ const clearRows = {
|
|
|
9421
9448
|
const deleteCols = {
|
|
9422
9449
|
name: REMOVE_COLUMNS_NAME,
|
|
9423
9450
|
execute: REMOVE_COLUMNS_ACTION,
|
|
9424
|
-
isVisible:
|
|
9451
|
+
isVisible: (env) => CAN_REMOVE_COLUMNS_ROWS("COL", env),
|
|
9425
9452
|
};
|
|
9426
9453
|
const deleteCol = {
|
|
9427
9454
|
...deleteCols,
|
|
@@ -18469,6 +18496,11 @@ class LineConfigPanel extends LineBarPieConfigPanel {
|
|
|
18469
18496
|
aggregated: ev.target.checked,
|
|
18470
18497
|
});
|
|
18471
18498
|
}
|
|
18499
|
+
onUpdateCumulative(ev) {
|
|
18500
|
+
this.props.updateChart(this.props.figureId, {
|
|
18501
|
+
cumulative: ev.target.checked,
|
|
18502
|
+
});
|
|
18503
|
+
}
|
|
18472
18504
|
}
|
|
18473
18505
|
|
|
18474
18506
|
class LineChartDesignPanel extends LineBarPieDesignPanel {
|
|
@@ -22194,9 +22226,11 @@ function useCellHovered(env, gridRef, callback) {
|
|
|
22194
22226
|
}
|
|
22195
22227
|
}
|
|
22196
22228
|
function updateMousePosition(e) {
|
|
22197
|
-
|
|
22198
|
-
|
|
22199
|
-
|
|
22229
|
+
if (gridRef.el === e.target) {
|
|
22230
|
+
x = e.offsetX;
|
|
22231
|
+
y = e.offsetY;
|
|
22232
|
+
lastMoved = Date.now();
|
|
22233
|
+
}
|
|
22200
22234
|
}
|
|
22201
22235
|
function recompute() {
|
|
22202
22236
|
const { col, row } = getPosition();
|
|
@@ -26408,6 +26442,7 @@ function convertChartData(chartData) {
|
|
|
26408
26442
|
legendPosition: chartData.legendPosition,
|
|
26409
26443
|
stacked: chartData.stacked || false,
|
|
26410
26444
|
aggregated: false,
|
|
26445
|
+
cumulative: chartData.cumulative || false,
|
|
26411
26446
|
labelsAsText: false,
|
|
26412
26447
|
};
|
|
26413
26448
|
}
|
|
@@ -31088,7 +31123,7 @@ class HeaderSizePlugin extends CorePlugin {
|
|
|
31088
31123
|
|
|
31089
31124
|
class HeaderVisibilityPlugin extends CorePlugin {
|
|
31090
31125
|
static getters = [
|
|
31091
|
-
"
|
|
31126
|
+
"checkElementsIncludeAllVisibleHeaders",
|
|
31092
31127
|
"getHiddenColsGroups",
|
|
31093
31128
|
"getHiddenRowsGroups",
|
|
31094
31129
|
"isRowHiddenByUser",
|
|
@@ -31122,7 +31157,7 @@ class HeaderVisibilityPlugin extends CorePlugin {
|
|
|
31122
31157
|
if (!this.getters.tryGetSheet(cmd.sheetId)) {
|
|
31123
31158
|
return 27 /* CommandResult.InvalidSheetId */;
|
|
31124
31159
|
}
|
|
31125
|
-
if (
|
|
31160
|
+
if (this.checkElementsIncludeAllVisibleHeaders(cmd.sheetId, cmd.dimension, cmd.elements)) {
|
|
31126
31161
|
return 8 /* CommandResult.NotEnoughElements */;
|
|
31127
31162
|
}
|
|
31128
31163
|
return 0 /* CommandResult.Success */;
|
|
@@ -31172,9 +31207,9 @@ class HeaderVisibilityPlugin extends CorePlugin {
|
|
|
31172
31207
|
}
|
|
31173
31208
|
return;
|
|
31174
31209
|
}
|
|
31175
|
-
|
|
31210
|
+
checkElementsIncludeAllVisibleHeaders(sheetId, dimension, elements) {
|
|
31176
31211
|
const visibleHeaders = this.getAllVisibleHeaders(sheetId, dimension);
|
|
31177
|
-
return
|
|
31212
|
+
return includesAll(elements, visibleHeaders);
|
|
31178
31213
|
}
|
|
31179
31214
|
isRowHiddenByUser(sheetId, index) {
|
|
31180
31215
|
return this.hiddenHeaders[sheetId].ROW[index];
|
|
@@ -32261,6 +32296,7 @@ class SheetPlugin extends CorePlugin {
|
|
|
32261
32296
|
"getPaneDivisions",
|
|
32262
32297
|
"checkZonesExistInSheet",
|
|
32263
32298
|
"getCommandZones",
|
|
32299
|
+
"checkElementsIncludeAllNonFrozenHeaders",
|
|
32264
32300
|
];
|
|
32265
32301
|
sheetIdsMapName = {};
|
|
32266
32302
|
orderedSheetIds = [];
|
|
@@ -32317,6 +32353,9 @@ class SheetPlugin extends CorePlugin {
|
|
|
32317
32353
|
if (Math.min(...cmd.elements) < 0 || Math.max(...cmd.elements) > elements) {
|
|
32318
32354
|
return 86 /* CommandResult.InvalidHeaderIndex */;
|
|
32319
32355
|
}
|
|
32356
|
+
else if (this.checkElementsIncludeAllNonFrozenHeaders(cmd.sheetId, cmd.dimension, cmd.elements)) {
|
|
32357
|
+
return 8 /* CommandResult.NotEnoughElements */;
|
|
32358
|
+
}
|
|
32320
32359
|
else {
|
|
32321
32360
|
return 0 /* CommandResult.Success */;
|
|
32322
32361
|
}
|
|
@@ -32599,6 +32638,20 @@ class SheetPlugin extends CorePlugin {
|
|
|
32599
32638
|
}
|
|
32600
32639
|
this.history.update("sheets", sheetId, "panes", panes);
|
|
32601
32640
|
}
|
|
32641
|
+
/**
|
|
32642
|
+
* Checks if all non-frozen header indices are present in the provided elements of selected rows/columns.
|
|
32643
|
+
* This validation ensures that all rows or columns cannot be deleted when frozen panes exist.
|
|
32644
|
+
*/
|
|
32645
|
+
checkElementsIncludeAllNonFrozenHeaders(sheetId, dimension, elements) {
|
|
32646
|
+
const paneDivisions = this.getters.getPaneDivisions(sheetId);
|
|
32647
|
+
const startIndex = dimension === "ROW" ? paneDivisions.ySplit : paneDivisions.xSplit;
|
|
32648
|
+
const endIndex = this.getters.getNumberHeaders(sheetId, dimension);
|
|
32649
|
+
if (!startIndex) {
|
|
32650
|
+
return false;
|
|
32651
|
+
}
|
|
32652
|
+
const indicesToCheck = range(startIndex, endIndex);
|
|
32653
|
+
return includesAll(elements, indicesToCheck);
|
|
32654
|
+
}
|
|
32602
32655
|
// ---------------------------------------------------------------------------
|
|
32603
32656
|
// Row/Col manipulation
|
|
32604
32657
|
// ---------------------------------------------------------------------------
|
|
@@ -33677,6 +33730,7 @@ class EvaluationConditionalFormatPlugin extends UIPlugin {
|
|
|
33677
33730
|
// stores the computed styles in the format of computedStyles.sheetName[col][row] = Style
|
|
33678
33731
|
computedStyles = {};
|
|
33679
33732
|
computedIcons = {};
|
|
33733
|
+
uuidGenerator = new UuidGenerator();
|
|
33680
33734
|
// ---------------------------------------------------------------------------
|
|
33681
33735
|
// Command Handling
|
|
33682
33736
|
// ---------------------------------------------------------------------------
|
|
@@ -34024,13 +34078,20 @@ class EvaluationConditionalFormatPlugin extends UIPlugin {
|
|
|
34024
34078
|
this.adaptRules(origin.sheetId, cf, [xc], toRemoveRange);
|
|
34025
34079
|
}
|
|
34026
34080
|
else {
|
|
34027
|
-
this.adaptRules(target.sheetId, cf, [xc], []);
|
|
34028
34081
|
this.adaptRules(origin.sheetId, cf, [], toRemoveRange);
|
|
34082
|
+
const cfToCopyTo = this.getCFToCopyTo(target.sheetId, cf);
|
|
34083
|
+
this.adaptRules(target.sheetId, cfToCopyTo, [xc], []);
|
|
34029
34084
|
}
|
|
34030
34085
|
}
|
|
34031
34086
|
}
|
|
34032
34087
|
}
|
|
34033
34088
|
}
|
|
34089
|
+
getCFToCopyTo(targetSheetId, originCF) {
|
|
34090
|
+
const cfInTarget = this.getters
|
|
34091
|
+
.getConditionalFormats(targetSheetId)
|
|
34092
|
+
.find((cf) => cf.stopIfTrue === originCF.stopIfTrue && deepEquals(cf.rule, originCF.rule));
|
|
34093
|
+
return cfInTarget ? cfInTarget : { ...originCF, id: this.uuidGenerator.uuidv4(), ranges: [] };
|
|
34094
|
+
}
|
|
34034
34095
|
}
|
|
34035
34096
|
|
|
34036
34097
|
class FilterEvaluationPlugin extends UIPlugin {
|
|
@@ -34563,6 +34624,9 @@ class InternalViewport {
|
|
|
34563
34624
|
const sheetId = this.sheetId;
|
|
34564
34625
|
this.left = this.searchHeaderIndex("COL", this.offsetScrollbarX, this.boundaries.left);
|
|
34565
34626
|
this.right = Math.min(this.boundaries.right, this.searchHeaderIndex("COL", this.viewportWidth, this.left));
|
|
34627
|
+
if (this.left === -1) {
|
|
34628
|
+
this.left = this.boundaries.left;
|
|
34629
|
+
}
|
|
34566
34630
|
if (this.right === -1) {
|
|
34567
34631
|
this.right = this.getters.getNumberCols(sheetId) - 1;
|
|
34568
34632
|
}
|
|
@@ -34576,6 +34640,9 @@ class InternalViewport {
|
|
|
34576
34640
|
const sheetId = this.sheetId;
|
|
34577
34641
|
this.top = this.searchHeaderIndex("ROW", this.offsetScrollbarY, this.boundaries.top);
|
|
34578
34642
|
this.bottom = Math.min(this.boundaries.bottom, this.searchHeaderIndex("ROW", this.viewportHeight, this.top));
|
|
34643
|
+
if (this.top === -1) {
|
|
34644
|
+
this.top = this.boundaries.top;
|
|
34645
|
+
}
|
|
34579
34646
|
if (this.bottom === -1) {
|
|
34580
34647
|
this.bottom = this.getters.getNumberRows(sheetId) - 1;
|
|
34581
34648
|
}
|
|
@@ -40142,7 +40209,7 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
40142
40209
|
allowDispatch(cmd) {
|
|
40143
40210
|
switch (cmd.type) {
|
|
40144
40211
|
case "CUT":
|
|
40145
|
-
const zones =
|
|
40212
|
+
const zones = this.getters.getSelectedZones();
|
|
40146
40213
|
const state = this.getClipboardState(zones, cmd.type);
|
|
40147
40214
|
return state.isCutAllowed(zones);
|
|
40148
40215
|
case "PASTE":
|
|
@@ -40172,7 +40239,7 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
40172
40239
|
switch (cmd.type) {
|
|
40173
40240
|
case "COPY":
|
|
40174
40241
|
case "CUT":
|
|
40175
|
-
const zones =
|
|
40242
|
+
const zones = this.getters.getSelectedZones();
|
|
40176
40243
|
this.state = this.getClipboardState(zones, cmd.type);
|
|
40177
40244
|
this.status = "visible";
|
|
40178
40245
|
break;
|
|
@@ -41592,26 +41659,24 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
41592
41659
|
const isBasedBefore = cmd.base < start;
|
|
41593
41660
|
const deltaCol = isBasedBefore && isCol ? thickness : 0;
|
|
41594
41661
|
const deltaRow = isBasedBefore && !isCol ? thickness : 0;
|
|
41595
|
-
|
|
41596
|
-
|
|
41597
|
-
|
|
41598
|
-
|
|
41599
|
-
|
|
41600
|
-
|
|
41601
|
-
|
|
41602
|
-
|
|
41603
|
-
|
|
41604
|
-
|
|
41605
|
-
|
|
41606
|
-
|
|
41607
|
-
|
|
41608
|
-
|
|
41609
|
-
|
|
41610
|
-
|
|
41611
|
-
|
|
41612
|
-
|
|
41613
|
-
],
|
|
41614
|
-
});
|
|
41662
|
+
const target = [
|
|
41663
|
+
{
|
|
41664
|
+
left: isCol ? start + deltaCol : 0,
|
|
41665
|
+
right: isCol ? end + deltaCol : this.getters.getNumberCols(cmd.sheetId) - 1,
|
|
41666
|
+
top: !isCol ? start + deltaRow : 0,
|
|
41667
|
+
bottom: !isCol ? end + deltaRow : this.getters.getNumberRows(cmd.sheetId) - 1,
|
|
41668
|
+
},
|
|
41669
|
+
];
|
|
41670
|
+
const state = new ClipboardCellsState(target, "CUT", this.getters, this.dispatch, this.selection);
|
|
41671
|
+
const pasteTarget = [
|
|
41672
|
+
{
|
|
41673
|
+
left: isCol ? cmd.base : 0,
|
|
41674
|
+
right: isCol ? cmd.base + thickness - 1 : this.getters.getNumberCols(cmd.sheetId) - 1,
|
|
41675
|
+
top: !isCol ? cmd.base : 0,
|
|
41676
|
+
bottom: !isCol ? cmd.base + thickness - 1 : this.getters.getNumberRows(cmd.sheetId) - 1,
|
|
41677
|
+
},
|
|
41678
|
+
];
|
|
41679
|
+
state.paste(pasteTarget, { selectTarget: true });
|
|
41615
41680
|
const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
|
|
41616
41681
|
let currentIndex = cmd.base;
|
|
41617
41682
|
for (const element of toRemove) {
|
|
@@ -47655,6 +47720,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
47655
47720
|
exports.tokenize = tokenize;
|
|
47656
47721
|
|
|
47657
47722
|
|
|
47658
|
-
__info__.version = '16.3.
|
|
47659
|
-
__info__.date = '2023-
|
|
47660
|
-
__info__.hash = '
|
|
47723
|
+
__info__.version = '16.3.11';
|
|
47724
|
+
__info__.date = '2023-09-21T15:56:40.754Z';
|
|
47725
|
+
__info__.hash = '245df8c';
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -405,6 +405,7 @@ interface LineChartDefinition {
|
|
|
405
405
|
readonly labelsAsText: boolean;
|
|
406
406
|
readonly stacked: boolean;
|
|
407
407
|
readonly aggregated?: boolean;
|
|
408
|
+
readonly cumulative: boolean;
|
|
408
409
|
}
|
|
409
410
|
type LineChartRuntime = {
|
|
410
411
|
chartJsConfig: ChartConfiguration;
|
|
@@ -471,6 +472,7 @@ interface ExcelChartDefinition {
|
|
|
471
472
|
readonly verticalAxisPosition: VerticalAxisPosition;
|
|
472
473
|
readonly legendPosition: LegendPosition;
|
|
473
474
|
readonly stacked?: boolean;
|
|
475
|
+
readonly cumulative?: boolean;
|
|
474
476
|
}
|
|
475
477
|
interface ChartCreationContext {
|
|
476
478
|
readonly range?: string[];
|
|
@@ -1885,8 +1887,6 @@ interface CopyCommand {
|
|
|
1885
1887
|
}
|
|
1886
1888
|
interface CutCommand {
|
|
1887
1889
|
type: "CUT";
|
|
1888
|
-
/** Zones to cut. If none were given, will copy the zones in the selection*/
|
|
1889
|
-
cutTarget?: Zone[];
|
|
1890
1890
|
}
|
|
1891
1891
|
interface PasteCommand {
|
|
1892
1892
|
type: "PASTE";
|
|
@@ -3420,11 +3420,11 @@ declare class HeaderSizePlugin extends CorePlugin<HeaderSizeState> implements He
|
|
|
3420
3420
|
}
|
|
3421
3421
|
|
|
3422
3422
|
declare class HeaderVisibilityPlugin extends CorePlugin {
|
|
3423
|
-
static getters: readonly ["
|
|
3423
|
+
static getters: readonly ["checkElementsIncludeAllVisibleHeaders", "getHiddenColsGroups", "getHiddenRowsGroups", "isRowHiddenByUser", "isColHiddenByUser"];
|
|
3424
3424
|
private readonly hiddenHeaders;
|
|
3425
3425
|
allowDispatch(cmd: Command): CommandResult.Success | CommandResult.NotEnoughElements | CommandResult.InvalidSheetId | CommandResult.TooManyHiddenElements | CommandResult.InvalidHeaderIndex;
|
|
3426
3426
|
handle(cmd: Command): void;
|
|
3427
|
-
|
|
3427
|
+
checkElementsIncludeAllVisibleHeaders(sheetId: UID, dimension: Dimension, elements: HeaderIndex[]): boolean;
|
|
3428
3428
|
isRowHiddenByUser(sheetId: UID, index: HeaderIndex): boolean;
|
|
3429
3429
|
isColHiddenByUser(sheetId: UID, index: HeaderIndex): boolean;
|
|
3430
3430
|
getHiddenColsGroups(sheetId: UID): ConsecutiveIndexes[];
|
|
@@ -3547,7 +3547,7 @@ interface SheetState$1 {
|
|
|
3547
3547
|
readonly cellPosition: Record<UID, CellPosition | undefined>;
|
|
3548
3548
|
}
|
|
3549
3549
|
declare class SheetPlugin extends CorePlugin<SheetState$1> implements SheetState$1 {
|
|
3550
|
-
static getters: readonly ["getSheetName", "tryGetSheetName", "getSheet", "tryGetSheet", "getSheetIdByName", "getSheetIds", "getVisibleSheetIds", "isSheetVisible", "getEvaluationSheets", "doesHeaderExist", "getCell", "getCellPosition", "getColsZone", "getRowCells", "getRowsZone", "getNumberCols", "getNumberRows", "getNumberHeaders", "getGridLinesVisibility", "getNextSheetName", "isEmpty", "getSheetSize", "getSheetZone", "getPaneDivisions", "checkZonesExistInSheet", "getCommandZones"];
|
|
3550
|
+
static getters: readonly ["getSheetName", "tryGetSheetName", "getSheet", "tryGetSheet", "getSheetIdByName", "getSheetIds", "getVisibleSheetIds", "isSheetVisible", "getEvaluationSheets", "doesHeaderExist", "getCell", "getCellPosition", "getColsZone", "getRowCells", "getRowsZone", "getNumberCols", "getNumberRows", "getNumberHeaders", "getGridLinesVisibility", "getNextSheetName", "isEmpty", "getSheetSize", "getSheetZone", "getPaneDivisions", "checkZonesExistInSheet", "getCommandZones", "checkElementsIncludeAllNonFrozenHeaders"];
|
|
3551
3551
|
readonly sheetIdsMapName: Record<string, UID | undefined>;
|
|
3552
3552
|
readonly orderedSheetIds: UID[];
|
|
3553
3553
|
readonly sheets: Record<UID, Sheet | undefined>;
|
|
@@ -3589,6 +3589,11 @@ declare class SheetPlugin extends CorePlugin<SheetState$1> implements SheetState
|
|
|
3589
3589
|
getSheetZone(sheetId: UID): Zone;
|
|
3590
3590
|
getPaneDivisions(sheetId: UID): Readonly<PaneDivision>;
|
|
3591
3591
|
private setPaneDivisions;
|
|
3592
|
+
/**
|
|
3593
|
+
* Checks if all non-frozen header indices are present in the provided elements of selected rows/columns.
|
|
3594
|
+
* This validation ensures that all rows or columns cannot be deleted when frozen panes exist.
|
|
3595
|
+
*/
|
|
3596
|
+
checkElementsIncludeAllNonFrozenHeaders(sheetId: UID, dimension: Dimension, elements: HeaderIndex[]): boolean;
|
|
3592
3597
|
/**
|
|
3593
3598
|
* Check if a zone only contains empty cells
|
|
3594
3599
|
*/
|
|
@@ -3779,6 +3784,7 @@ declare class EvaluationConditionalFormatPlugin extends UIPlugin {
|
|
|
3779
3784
|
private isStale;
|
|
3780
3785
|
private computedStyles;
|
|
3781
3786
|
private computedIcons;
|
|
3787
|
+
private uuidGenerator;
|
|
3782
3788
|
handle(cmd: Command): void;
|
|
3783
3789
|
finalize(): void;
|
|
3784
3790
|
getCellComputedStyle(position: CellPosition): Style;
|
|
@@ -3809,6 +3815,7 @@ declare class EvaluationConditionalFormatPlugin extends UIPlugin {
|
|
|
3809
3815
|
*/
|
|
3810
3816
|
private adaptRules;
|
|
3811
3817
|
private pasteCf;
|
|
3818
|
+
private getCFToCopyTo;
|
|
3812
3819
|
}
|
|
3813
3820
|
|
|
3814
3821
|
declare class FilterEvaluationPlugin extends UIPlugin {
|
|
@@ -5245,6 +5252,7 @@ declare class LineConfigPanel extends LineBarPieConfigPanel {
|
|
|
5245
5252
|
onUpdateLabelsAsText(ev: any): void;
|
|
5246
5253
|
onUpdateStacked(ev: any): void;
|
|
5247
5254
|
onUpdateAggregated(ev: any): void;
|
|
5255
|
+
onUpdateCumulative(ev: any): void;
|
|
5248
5256
|
}
|
|
5249
5257
|
|
|
5250
5258
|
interface Props$x {
|