@odoo/o-spreadsheet 16.4.19 → 16.4.21
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 +325 -309
- package/dist/o-spreadsheet.d.ts +70 -69
- package/dist/o-spreadsheet.esm.js +325 -309
- package/dist/o-spreadsheet.iife.js +325 -309
- package/dist/o-spreadsheet.iife.min.js +17 -24
- package/dist/o_spreadsheet.xml +5 -5
- package/package.json +1 -1
|
@@ -2215,27 +2215,30 @@ function roundFormat(format) {
|
|
|
2215
2215
|
}
|
|
2216
2216
|
function createLargeNumberFormat(format, magnitude, postFix, locale) {
|
|
2217
2217
|
const internalFormat = parseFormat(format || "#,##0");
|
|
2218
|
-
const largeNumberFormat =
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
format: {
|
|
2225
|
-
...formatPart.format,
|
|
2226
|
-
magnitude,
|
|
2227
|
-
decimalPart: undefined,
|
|
2228
|
-
},
|
|
2229
|
-
},
|
|
2230
|
-
{
|
|
2231
|
-
type: "STRING",
|
|
2232
|
-
format: postFix,
|
|
2233
|
-
},
|
|
2234
|
-
];
|
|
2218
|
+
const largeNumberFormat = [];
|
|
2219
|
+
for (let i = 0; i < internalFormat.length; i++) {
|
|
2220
|
+
const formatPart = internalFormat[i];
|
|
2221
|
+
if (formatPart.type !== "NUMBER") {
|
|
2222
|
+
largeNumberFormat.push(formatPart);
|
|
2223
|
+
continue;
|
|
2235
2224
|
}
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2225
|
+
largeNumberFormat.push({
|
|
2226
|
+
...formatPart,
|
|
2227
|
+
format: {
|
|
2228
|
+
...formatPart.format,
|
|
2229
|
+
magnitude,
|
|
2230
|
+
decimalPart: undefined,
|
|
2231
|
+
},
|
|
2232
|
+
});
|
|
2233
|
+
largeNumberFormat.push({
|
|
2234
|
+
type: "STRING",
|
|
2235
|
+
format: postFix,
|
|
2236
|
+
});
|
|
2237
|
+
const nextFormatPart = internalFormat[i + 1];
|
|
2238
|
+
if (nextFormatPart?.type === "STRING" && ["k", "m", "b"].includes(nextFormatPart.format)) {
|
|
2239
|
+
i++;
|
|
2240
|
+
}
|
|
2241
|
+
}
|
|
2239
2242
|
return convertInternalFormatToFormat(largeNumberFormat);
|
|
2240
2243
|
}
|
|
2241
2244
|
function changeDecimalPlaces(format, step, locale) {
|
|
@@ -4254,71 +4257,72 @@ var CommandResult;
|
|
|
4254
4257
|
CommandResult[CommandResult["InputAlreadyFocused"] = 30] = "InputAlreadyFocused";
|
|
4255
4258
|
CommandResult[CommandResult["MaximumRangesReached"] = 31] = "MaximumRangesReached";
|
|
4256
4259
|
CommandResult[CommandResult["MinimumRangesReached"] = 32] = "MinimumRangesReached";
|
|
4257
|
-
CommandResult[CommandResult["
|
|
4258
|
-
CommandResult[CommandResult["
|
|
4259
|
-
CommandResult[CommandResult["
|
|
4260
|
-
CommandResult[CommandResult["
|
|
4261
|
-
CommandResult[CommandResult["
|
|
4262
|
-
CommandResult[CommandResult["
|
|
4263
|
-
CommandResult[CommandResult["
|
|
4264
|
-
CommandResult[CommandResult["
|
|
4265
|
-
CommandResult[CommandResult["
|
|
4266
|
-
CommandResult[CommandResult["
|
|
4267
|
-
CommandResult[CommandResult["
|
|
4268
|
-
CommandResult[CommandResult["
|
|
4269
|
-
CommandResult[CommandResult["
|
|
4270
|
-
CommandResult[CommandResult["
|
|
4271
|
-
CommandResult[CommandResult["
|
|
4272
|
-
CommandResult[CommandResult["
|
|
4273
|
-
CommandResult[CommandResult["
|
|
4274
|
-
CommandResult[CommandResult["
|
|
4275
|
-
CommandResult[CommandResult["
|
|
4276
|
-
CommandResult[CommandResult["
|
|
4277
|
-
CommandResult[CommandResult["
|
|
4278
|
-
CommandResult[CommandResult["
|
|
4279
|
-
CommandResult[CommandResult["
|
|
4280
|
-
CommandResult[CommandResult["
|
|
4281
|
-
CommandResult[CommandResult["
|
|
4282
|
-
CommandResult[CommandResult["
|
|
4283
|
-
CommandResult[CommandResult["
|
|
4284
|
-
CommandResult[CommandResult["
|
|
4285
|
-
CommandResult[CommandResult["
|
|
4286
|
-
CommandResult[CommandResult["
|
|
4287
|
-
CommandResult[CommandResult["
|
|
4288
|
-
CommandResult[CommandResult["
|
|
4289
|
-
CommandResult[CommandResult["
|
|
4290
|
-
CommandResult[CommandResult["
|
|
4291
|
-
CommandResult[CommandResult["
|
|
4292
|
-
CommandResult[CommandResult["
|
|
4293
|
-
CommandResult[CommandResult["
|
|
4294
|
-
CommandResult[CommandResult["
|
|
4295
|
-
CommandResult[CommandResult["
|
|
4296
|
-
CommandResult[CommandResult["
|
|
4297
|
-
CommandResult[CommandResult["
|
|
4298
|
-
CommandResult[CommandResult["
|
|
4299
|
-
CommandResult[CommandResult["
|
|
4300
|
-
CommandResult[CommandResult["
|
|
4301
|
-
CommandResult[CommandResult["
|
|
4302
|
-
CommandResult[CommandResult["
|
|
4303
|
-
CommandResult[CommandResult["
|
|
4304
|
-
CommandResult[CommandResult["
|
|
4305
|
-
CommandResult[CommandResult["
|
|
4306
|
-
CommandResult[CommandResult["
|
|
4307
|
-
CommandResult[CommandResult["
|
|
4308
|
-
CommandResult[CommandResult["
|
|
4309
|
-
CommandResult[CommandResult["
|
|
4310
|
-
CommandResult[CommandResult["
|
|
4311
|
-
CommandResult[CommandResult["
|
|
4312
|
-
CommandResult[CommandResult["
|
|
4313
|
-
CommandResult[CommandResult["
|
|
4314
|
-
CommandResult[CommandResult["
|
|
4315
|
-
CommandResult[CommandResult["
|
|
4316
|
-
CommandResult[CommandResult["
|
|
4317
|
-
CommandResult[CommandResult["
|
|
4318
|
-
CommandResult[CommandResult["
|
|
4319
|
-
CommandResult[CommandResult["
|
|
4320
|
-
CommandResult[CommandResult["
|
|
4321
|
-
CommandResult[CommandResult["
|
|
4260
|
+
CommandResult[CommandResult["InvalidInputId"] = 33] = "InvalidInputId";
|
|
4261
|
+
CommandResult[CommandResult["InvalidChartDefinition"] = 34] = "InvalidChartDefinition";
|
|
4262
|
+
CommandResult[CommandResult["InvalidDataSet"] = 35] = "InvalidDataSet";
|
|
4263
|
+
CommandResult[CommandResult["InvalidLabelRange"] = 36] = "InvalidLabelRange";
|
|
4264
|
+
CommandResult[CommandResult["InvalidScorecardKeyValue"] = 37] = "InvalidScorecardKeyValue";
|
|
4265
|
+
CommandResult[CommandResult["InvalidScorecardBaseline"] = 38] = "InvalidScorecardBaseline";
|
|
4266
|
+
CommandResult[CommandResult["InvalidGaugeDataRange"] = 39] = "InvalidGaugeDataRange";
|
|
4267
|
+
CommandResult[CommandResult["EmptyGaugeRangeMin"] = 40] = "EmptyGaugeRangeMin";
|
|
4268
|
+
CommandResult[CommandResult["GaugeRangeMinNaN"] = 41] = "GaugeRangeMinNaN";
|
|
4269
|
+
CommandResult[CommandResult["EmptyGaugeRangeMax"] = 42] = "EmptyGaugeRangeMax";
|
|
4270
|
+
CommandResult[CommandResult["GaugeRangeMaxNaN"] = 43] = "GaugeRangeMaxNaN";
|
|
4271
|
+
CommandResult[CommandResult["GaugeRangeMinBiggerThanRangeMax"] = 44] = "GaugeRangeMinBiggerThanRangeMax";
|
|
4272
|
+
CommandResult[CommandResult["GaugeLowerInflectionPointNaN"] = 45] = "GaugeLowerInflectionPointNaN";
|
|
4273
|
+
CommandResult[CommandResult["GaugeUpperInflectionPointNaN"] = 46] = "GaugeUpperInflectionPointNaN";
|
|
4274
|
+
CommandResult[CommandResult["GaugeLowerBiggerThanUpper"] = 47] = "GaugeLowerBiggerThanUpper";
|
|
4275
|
+
CommandResult[CommandResult["InvalidAutofillSelection"] = 48] = "InvalidAutofillSelection";
|
|
4276
|
+
CommandResult[CommandResult["WrongComposerSelection"] = 49] = "WrongComposerSelection";
|
|
4277
|
+
CommandResult[CommandResult["MinBiggerThanMax"] = 50] = "MinBiggerThanMax";
|
|
4278
|
+
CommandResult[CommandResult["LowerBiggerThanUpper"] = 51] = "LowerBiggerThanUpper";
|
|
4279
|
+
CommandResult[CommandResult["MidBiggerThanMax"] = 52] = "MidBiggerThanMax";
|
|
4280
|
+
CommandResult[CommandResult["MinBiggerThanMid"] = 53] = "MinBiggerThanMid";
|
|
4281
|
+
CommandResult[CommandResult["FirstArgMissing"] = 54] = "FirstArgMissing";
|
|
4282
|
+
CommandResult[CommandResult["SecondArgMissing"] = 55] = "SecondArgMissing";
|
|
4283
|
+
CommandResult[CommandResult["MinNaN"] = 56] = "MinNaN";
|
|
4284
|
+
CommandResult[CommandResult["MidNaN"] = 57] = "MidNaN";
|
|
4285
|
+
CommandResult[CommandResult["MaxNaN"] = 58] = "MaxNaN";
|
|
4286
|
+
CommandResult[CommandResult["ValueUpperInflectionNaN"] = 59] = "ValueUpperInflectionNaN";
|
|
4287
|
+
CommandResult[CommandResult["ValueLowerInflectionNaN"] = 60] = "ValueLowerInflectionNaN";
|
|
4288
|
+
CommandResult[CommandResult["MinInvalidFormula"] = 61] = "MinInvalidFormula";
|
|
4289
|
+
CommandResult[CommandResult["MidInvalidFormula"] = 62] = "MidInvalidFormula";
|
|
4290
|
+
CommandResult[CommandResult["MaxInvalidFormula"] = 63] = "MaxInvalidFormula";
|
|
4291
|
+
CommandResult[CommandResult["ValueUpperInvalidFormula"] = 64] = "ValueUpperInvalidFormula";
|
|
4292
|
+
CommandResult[CommandResult["ValueLowerInvalidFormula"] = 65] = "ValueLowerInvalidFormula";
|
|
4293
|
+
CommandResult[CommandResult["InvalidSortZone"] = 66] = "InvalidSortZone";
|
|
4294
|
+
CommandResult[CommandResult["WaitingSessionConfirmation"] = 67] = "WaitingSessionConfirmation";
|
|
4295
|
+
CommandResult[CommandResult["MergeOverlap"] = 68] = "MergeOverlap";
|
|
4296
|
+
CommandResult[CommandResult["TooManyHiddenElements"] = 69] = "TooManyHiddenElements";
|
|
4297
|
+
CommandResult[CommandResult["Readonly"] = 70] = "Readonly";
|
|
4298
|
+
CommandResult[CommandResult["InvalidViewportSize"] = 71] = "InvalidViewportSize";
|
|
4299
|
+
CommandResult[CommandResult["InvalidScrollingDirection"] = 72] = "InvalidScrollingDirection";
|
|
4300
|
+
CommandResult[CommandResult["FigureDoesNotExist"] = 73] = "FigureDoesNotExist";
|
|
4301
|
+
CommandResult[CommandResult["InvalidConditionalFormatId"] = 74] = "InvalidConditionalFormatId";
|
|
4302
|
+
CommandResult[CommandResult["InvalidCellPopover"] = 75] = "InvalidCellPopover";
|
|
4303
|
+
CommandResult[CommandResult["EmptyTarget"] = 76] = "EmptyTarget";
|
|
4304
|
+
CommandResult[CommandResult["InvalidFreezeQuantity"] = 77] = "InvalidFreezeQuantity";
|
|
4305
|
+
CommandResult[CommandResult["FrozenPaneOverlap"] = 78] = "FrozenPaneOverlap";
|
|
4306
|
+
CommandResult[CommandResult["ValuesNotChanged"] = 79] = "ValuesNotChanged";
|
|
4307
|
+
CommandResult[CommandResult["InvalidFilterZone"] = 80] = "InvalidFilterZone";
|
|
4308
|
+
CommandResult[CommandResult["FilterOverlap"] = 81] = "FilterOverlap";
|
|
4309
|
+
CommandResult[CommandResult["FilterNotFound"] = 82] = "FilterNotFound";
|
|
4310
|
+
CommandResult[CommandResult["MergeInFilter"] = 83] = "MergeInFilter";
|
|
4311
|
+
CommandResult[CommandResult["NonContinuousTargets"] = 84] = "NonContinuousTargets";
|
|
4312
|
+
CommandResult[CommandResult["DuplicatedFigureId"] = 85] = "DuplicatedFigureId";
|
|
4313
|
+
CommandResult[CommandResult["InvalidSelectionStep"] = 86] = "InvalidSelectionStep";
|
|
4314
|
+
CommandResult[CommandResult["DuplicatedChartId"] = 87] = "DuplicatedChartId";
|
|
4315
|
+
CommandResult[CommandResult["ChartDoesNotExist"] = 88] = "ChartDoesNotExist";
|
|
4316
|
+
CommandResult[CommandResult["InvalidHeaderIndex"] = 89] = "InvalidHeaderIndex";
|
|
4317
|
+
CommandResult[CommandResult["InvalidQuantity"] = 90] = "InvalidQuantity";
|
|
4318
|
+
CommandResult[CommandResult["MoreThanOneColumnSelected"] = 91] = "MoreThanOneColumnSelected";
|
|
4319
|
+
CommandResult[CommandResult["EmptySplitSeparator"] = 92] = "EmptySplitSeparator";
|
|
4320
|
+
CommandResult[CommandResult["SplitWillOverwriteContent"] = 93] = "SplitWillOverwriteContent";
|
|
4321
|
+
CommandResult[CommandResult["NoSplitSeparatorInSelection"] = 94] = "NoSplitSeparatorInSelection";
|
|
4322
|
+
CommandResult[CommandResult["NoActiveSheet"] = 95] = "NoActiveSheet";
|
|
4323
|
+
CommandResult[CommandResult["InvalidLocale"] = 96] = "InvalidLocale";
|
|
4324
|
+
CommandResult[CommandResult["AlreadyInPaintingFormatMode"] = 97] = "AlreadyInPaintingFormatMode";
|
|
4325
|
+
CommandResult[CommandResult["NoChanges"] = 98] = "NoChanges";
|
|
4322
4326
|
})(CommandResult || (CommandResult = {}));
|
|
4323
4327
|
|
|
4324
4328
|
const borderStyles = ["thin", "medium", "thick", "dashed", "dotted"];
|
|
@@ -15967,14 +15971,8 @@ function createDataSets(getters, dataSetsString, sheetId, dataSetsHaveTitle) {
|
|
|
15967
15971
|
: undefined));
|
|
15968
15972
|
}
|
|
15969
15973
|
}
|
|
15970
|
-
else if (zone.left === zone.right && zone.top === zone.bottom) {
|
|
15971
|
-
// A single cell. If it's only the title, the dataset is not added.
|
|
15972
|
-
if (!dataSetsHaveTitle) {
|
|
15973
|
-
dataSets.push(createDataSet(getters, dataSetSheetId, zone, undefined));
|
|
15974
|
-
}
|
|
15975
|
-
}
|
|
15976
15974
|
else {
|
|
15977
|
-
/* 1 row or 1 column */
|
|
15975
|
+
/* 1 cell, 1 row or 1 column */
|
|
15978
15976
|
dataSets.push(createDataSet(getters, dataSetSheetId, zone, dataSetsHaveTitle
|
|
15979
15977
|
? {
|
|
15980
15978
|
top: zone.top,
|
|
@@ -16023,8 +16021,10 @@ function toExcelDataset(getters, ds) {
|
|
|
16023
16021
|
}
|
|
16024
16022
|
const dataRange = ds.dataRange.clone({ zone: dataZone });
|
|
16025
16023
|
return {
|
|
16026
|
-
label: ds.labelCell
|
|
16027
|
-
|
|
16024
|
+
label: ds.labelCell
|
|
16025
|
+
? getters.getRangeString(ds.labelCell, "forceSheetReference", true)
|
|
16026
|
+
: undefined,
|
|
16027
|
+
range: getters.getRangeString(dataRange, "forceSheetReference", true),
|
|
16028
16028
|
};
|
|
16029
16029
|
}
|
|
16030
16030
|
function toExcelLabelRange(getters, labelRange, shouldRemoveFirstLabel) {
|
|
@@ -16037,7 +16037,7 @@ function toExcelLabelRange(getters, labelRange, shouldRemoveFirstLabel) {
|
|
|
16037
16037
|
zone.top = zone.top + 1;
|
|
16038
16038
|
}
|
|
16039
16039
|
const range = labelRange.clone({ zone });
|
|
16040
|
-
return getters.getRangeString(range, "forceSheetReference");
|
|
16040
|
+
return getters.getRangeString(range, "forceSheetReference", true);
|
|
16041
16041
|
}
|
|
16042
16042
|
/**
|
|
16043
16043
|
* Transform a chart definition which supports dataSets (dataSets and LabelRange)
|
|
@@ -16103,11 +16103,11 @@ function checkDataset(definition) {
|
|
|
16103
16103
|
if (definition.dataSets) {
|
|
16104
16104
|
const invalidRanges = definition.dataSets.find((range) => !rangeReference.test(range)) !== undefined;
|
|
16105
16105
|
if (invalidRanges) {
|
|
16106
|
-
return
|
|
16106
|
+
return 35 /* CommandResult.InvalidDataSet */;
|
|
16107
16107
|
}
|
|
16108
16108
|
const zones = definition.dataSets.map(toUnboundedZone);
|
|
16109
16109
|
if (zones.some((zone) => zone.top !== zone.bottom && isFullRow(zone))) {
|
|
16110
|
-
return
|
|
16110
|
+
return 35 /* CommandResult.InvalidDataSet */;
|
|
16111
16111
|
}
|
|
16112
16112
|
}
|
|
16113
16113
|
return 0 /* CommandResult.Success */;
|
|
@@ -16116,7 +16116,7 @@ function checkLabelRange(definition) {
|
|
|
16116
16116
|
if (definition.labelRange) {
|
|
16117
16117
|
const invalidLabels = !rangeReference.test(definition.labelRange || "");
|
|
16118
16118
|
if (invalidLabels) {
|
|
16119
|
-
return
|
|
16119
|
+
return 36 /* CommandResult.InvalidLabelRange */;
|
|
16120
16120
|
}
|
|
16121
16121
|
}
|
|
16122
16122
|
return 0 /* CommandResult.Success */;
|
|
@@ -16203,22 +16203,22 @@ function getChartPositionAtCenterOfViewport(getters, chartSize) {
|
|
|
16203
16203
|
const CfTerms = {
|
|
16204
16204
|
Errors: {
|
|
16205
16205
|
[26 /* CommandResult.InvalidRange */]: _lt("The range is invalid"),
|
|
16206
|
-
[
|
|
16207
|
-
[
|
|
16208
|
-
[
|
|
16209
|
-
[
|
|
16210
|
-
[
|
|
16211
|
-
[
|
|
16212
|
-
[
|
|
16213
|
-
[
|
|
16214
|
-
[
|
|
16215
|
-
[
|
|
16216
|
-
[
|
|
16217
|
-
[
|
|
16218
|
-
[
|
|
16219
|
-
[
|
|
16220
|
-
[
|
|
16221
|
-
[
|
|
16206
|
+
[54 /* CommandResult.FirstArgMissing */]: _lt("The argument is missing. Please provide a value"),
|
|
16207
|
+
[55 /* CommandResult.SecondArgMissing */]: _lt("The second argument is missing. Please provide a value"),
|
|
16208
|
+
[56 /* CommandResult.MinNaN */]: _lt("The minpoint must be a number"),
|
|
16209
|
+
[57 /* CommandResult.MidNaN */]: _lt("The midpoint must be a number"),
|
|
16210
|
+
[58 /* CommandResult.MaxNaN */]: _lt("The maxpoint must be a number"),
|
|
16211
|
+
[59 /* CommandResult.ValueUpperInflectionNaN */]: _lt("The first value must be a number"),
|
|
16212
|
+
[60 /* CommandResult.ValueLowerInflectionNaN */]: _lt("The second value must be a number"),
|
|
16213
|
+
[50 /* CommandResult.MinBiggerThanMax */]: _lt("Minimum must be smaller then Maximum"),
|
|
16214
|
+
[53 /* CommandResult.MinBiggerThanMid */]: _lt("Minimum must be smaller then Midpoint"),
|
|
16215
|
+
[52 /* CommandResult.MidBiggerThanMax */]: _lt("Midpoint must be smaller then Maximum"),
|
|
16216
|
+
[51 /* CommandResult.LowerBiggerThanUpper */]: _lt("Lower inflection point must be smaller than upper inflection point"),
|
|
16217
|
+
[61 /* CommandResult.MinInvalidFormula */]: _lt("Invalid Minpoint formula"),
|
|
16218
|
+
[63 /* CommandResult.MaxInvalidFormula */]: _lt("Invalid Maxpoint formula"),
|
|
16219
|
+
[62 /* CommandResult.MidInvalidFormula */]: _lt("Invalid Midpoint formula"),
|
|
16220
|
+
[64 /* CommandResult.ValueUpperInvalidFormula */]: _lt("Invalid upper inflection point formula"),
|
|
16221
|
+
[65 /* CommandResult.ValueLowerInvalidFormula */]: _lt("Invalid lower inflection point formula"),
|
|
16222
16222
|
[25 /* CommandResult.EmptyRange */]: _lt("A range needs to be defined"),
|
|
16223
16223
|
Unexpected: _lt("The rule is invalid for an unknown reason"),
|
|
16224
16224
|
},
|
|
@@ -16246,20 +16246,20 @@ const ChartTerms = {
|
|
|
16246
16246
|
Errors: {
|
|
16247
16247
|
Unexpected: _lt("The chart definition is invalid for an unknown reason"),
|
|
16248
16248
|
// BASIC CHART ERRORS (LINE | BAR | PIE)
|
|
16249
|
-
[
|
|
16250
|
-
[
|
|
16249
|
+
[35 /* CommandResult.InvalidDataSet */]: _lt("The dataset is invalid"),
|
|
16250
|
+
[36 /* CommandResult.InvalidLabelRange */]: _lt("Labels are invalid"),
|
|
16251
16251
|
// SCORECARD CHART ERRORS
|
|
16252
|
-
[
|
|
16253
|
-
[
|
|
16252
|
+
[37 /* CommandResult.InvalidScorecardKeyValue */]: _lt("The key value is invalid"),
|
|
16253
|
+
[38 /* CommandResult.InvalidScorecardBaseline */]: _lt("The baseline value is invalid"),
|
|
16254
16254
|
// GAUGE CHART ERRORS
|
|
16255
|
-
[
|
|
16256
|
-
[
|
|
16257
|
-
[
|
|
16258
|
-
[
|
|
16259
|
-
[
|
|
16260
|
-
[
|
|
16261
|
-
[
|
|
16262
|
-
[
|
|
16255
|
+
[39 /* CommandResult.InvalidGaugeDataRange */]: _lt("The data range is invalid"),
|
|
16256
|
+
[40 /* CommandResult.EmptyGaugeRangeMin */]: _lt("A minimum range limit value is needed"),
|
|
16257
|
+
[41 /* CommandResult.GaugeRangeMinNaN */]: _lt("The minimum range limit value must be a number"),
|
|
16258
|
+
[42 /* CommandResult.EmptyGaugeRangeMax */]: _lt("A maximum range limit value is needed"),
|
|
16259
|
+
[43 /* CommandResult.GaugeRangeMaxNaN */]: _lt("The maximum range limit value must be a number"),
|
|
16260
|
+
[44 /* CommandResult.GaugeRangeMinBiggerThanRangeMax */]: _lt("Minimum range limit must be smaller than maximum range limit"),
|
|
16261
|
+
[45 /* CommandResult.GaugeLowerInflectionPointNaN */]: _lt("The lower inflection point value must be a number"),
|
|
16262
|
+
[46 /* CommandResult.GaugeUpperInflectionPointNaN */]: _lt("The upper inflection point value must be a number"),
|
|
16263
16263
|
},
|
|
16264
16264
|
};
|
|
16265
16265
|
const CustomCurrencyTerms = {
|
|
@@ -16269,9 +16269,9 @@ const MergeErrorMessage = _lt("Merged cells are preventing this operation. Unmer
|
|
|
16269
16269
|
const SplitToColumnsTerms = {
|
|
16270
16270
|
Errors: {
|
|
16271
16271
|
Unexpected: _lt("Cannot split the selection for an unknown reason"),
|
|
16272
|
-
[
|
|
16273
|
-
[
|
|
16274
|
-
[
|
|
16272
|
+
[94 /* CommandResult.NoSplitSeparatorInSelection */]: _lt("There is no match for the selected separator in the selection"),
|
|
16273
|
+
[91 /* CommandResult.MoreThanOneColumnSelected */]: _lt("Only a selection from a single column can be split"),
|
|
16274
|
+
[93 /* CommandResult.SplitWillOverwriteContent */]: _lt("Splitting will overwrite existing content"),
|
|
16275
16275
|
},
|
|
16276
16276
|
};
|
|
16277
16277
|
|
|
@@ -16574,7 +16574,7 @@ class BarChart extends AbstractChart {
|
|
|
16574
16574
|
return undefined;
|
|
16575
16575
|
const dataSets = this.dataSets
|
|
16576
16576
|
.map((ds) => toExcelDataset(this.getters, ds))
|
|
16577
|
-
.filter((ds) => ds.range !== ""
|
|
16577
|
+
.filter((ds) => ds.range !== "" && ds.range !== INCORRECT_RANGE_STRING);
|
|
16578
16578
|
const labelRange = toExcelLabelRange(this.getters, this.labelRange, shouldRemoveFirstLabel(this.labelRange, this.dataSets[0], this.dataSetsHaveTitle));
|
|
16579
16579
|
return {
|
|
16580
16580
|
...this.getDefinition(),
|
|
@@ -16676,7 +16676,7 @@ function createBarChartRuntime(chart, getters) {
|
|
|
16676
16676
|
|
|
16677
16677
|
function isDataRangeValid(definition) {
|
|
16678
16678
|
return definition.dataRange && !rangeReference.test(definition.dataRange)
|
|
16679
|
-
?
|
|
16679
|
+
? 39 /* CommandResult.InvalidGaugeDataRange */
|
|
16680
16680
|
: 0 /* CommandResult.Success */;
|
|
16681
16681
|
}
|
|
16682
16682
|
function checkRangeLimits(check, batchValidations) {
|
|
@@ -16708,7 +16708,7 @@ function checkInflectionPointsValue(check, batchValidations) {
|
|
|
16708
16708
|
function checkRangeMinBiggerThanRangeMax(definition) {
|
|
16709
16709
|
if (definition.sectionRule) {
|
|
16710
16710
|
if (Number(definition.sectionRule.rangeMin) >= Number(definition.sectionRule.rangeMax)) {
|
|
16711
|
-
return
|
|
16711
|
+
return 44 /* CommandResult.GaugeRangeMinBiggerThanRangeMax */;
|
|
16712
16712
|
}
|
|
16713
16713
|
}
|
|
16714
16714
|
return 0 /* CommandResult.Success */;
|
|
@@ -16717,9 +16717,9 @@ function checkEmpty(value, valueName) {
|
|
|
16717
16717
|
if (value === "") {
|
|
16718
16718
|
switch (valueName) {
|
|
16719
16719
|
case "rangeMin":
|
|
16720
|
-
return
|
|
16720
|
+
return 40 /* CommandResult.EmptyGaugeRangeMin */;
|
|
16721
16721
|
case "rangeMax":
|
|
16722
|
-
return
|
|
16722
|
+
return 42 /* CommandResult.EmptyGaugeRangeMax */;
|
|
16723
16723
|
}
|
|
16724
16724
|
}
|
|
16725
16725
|
return 0 /* CommandResult.Success */;
|
|
@@ -16728,13 +16728,13 @@ function checkNaN(value, valueName) {
|
|
|
16728
16728
|
if (isNaN(value)) {
|
|
16729
16729
|
switch (valueName) {
|
|
16730
16730
|
case "rangeMin":
|
|
16731
|
-
return
|
|
16731
|
+
return 41 /* CommandResult.GaugeRangeMinNaN */;
|
|
16732
16732
|
case "rangeMax":
|
|
16733
|
-
return
|
|
16733
|
+
return 43 /* CommandResult.GaugeRangeMaxNaN */;
|
|
16734
16734
|
case "lowerInflectionPointValue":
|
|
16735
|
-
return
|
|
16735
|
+
return 45 /* CommandResult.GaugeLowerInflectionPointNaN */;
|
|
16736
16736
|
case "upperInflectionPointValue":
|
|
16737
|
-
return
|
|
16737
|
+
return 46 /* CommandResult.GaugeUpperInflectionPointNaN */;
|
|
16738
16738
|
}
|
|
16739
16739
|
}
|
|
16740
16740
|
return 0 /* CommandResult.Success */;
|
|
@@ -17162,7 +17162,7 @@ class LineChart extends AbstractChart {
|
|
|
17162
17162
|
return undefined;
|
|
17163
17163
|
const dataSets = this.dataSets
|
|
17164
17164
|
.map((ds) => toExcelDataset(this.getters, ds))
|
|
17165
|
-
.filter((ds) => ds.range !== ""
|
|
17165
|
+
.filter((ds) => ds.range !== "" && ds.range !== INCORRECT_RANGE_STRING);
|
|
17166
17166
|
const labelRange = toExcelLabelRange(this.getters, this.labelRange, shouldRemoveFirstLabel(this.labelRange, this.dataSets[0], this.dataSetsHaveTitle));
|
|
17167
17167
|
return {
|
|
17168
17168
|
...this.getDefinition(),
|
|
@@ -17449,7 +17449,7 @@ class PieChart extends AbstractChart {
|
|
|
17449
17449
|
return undefined;
|
|
17450
17450
|
const dataSets = this.dataSets
|
|
17451
17451
|
.map((ds) => toExcelDataset(this.getters, ds))
|
|
17452
|
-
.filter((ds) => ds.range !== ""
|
|
17452
|
+
.filter((ds) => ds.range !== "" && ds.range !== INCORRECT_RANGE_STRING);
|
|
17453
17453
|
const labelRange = toExcelLabelRange(this.getters, this.labelRange, shouldRemoveFirstLabel(this.labelRange, this.dataSets[0], this.dataSetsHaveTitle));
|
|
17454
17454
|
return {
|
|
17455
17455
|
...this.getDefinition(),
|
|
@@ -17530,12 +17530,12 @@ function createPieChartRuntime(chart, getters) {
|
|
|
17530
17530
|
|
|
17531
17531
|
function checkKeyValue(definition) {
|
|
17532
17532
|
return definition.keyValue && !rangeReference.test(definition.keyValue)
|
|
17533
|
-
?
|
|
17533
|
+
? 37 /* CommandResult.InvalidScorecardKeyValue */
|
|
17534
17534
|
: 0 /* CommandResult.Success */;
|
|
17535
17535
|
}
|
|
17536
17536
|
function checkBaseline(definition) {
|
|
17537
17537
|
return definition.baseline && !rangeReference.test(definition.baseline)
|
|
17538
|
-
?
|
|
17538
|
+
? 38 /* CommandResult.InvalidScorecardBaseline */
|
|
17539
17539
|
: 0 /* CommandResult.Success */;
|
|
17540
17540
|
}
|
|
17541
17541
|
class ScorecardChart extends AbstractChart {
|
|
@@ -18062,7 +18062,7 @@ const AddMergeInteractiveContent = {
|
|
|
18062
18062
|
};
|
|
18063
18063
|
function interactiveAddMerge(env, sheetId, target) {
|
|
18064
18064
|
const result = env.model.dispatch("ADD_MERGE", { sheetId, target });
|
|
18065
|
-
if (result.isCancelledBecause(
|
|
18065
|
+
if (result.isCancelledBecause(83 /* CommandResult.MergeInFilter */)) {
|
|
18066
18066
|
env.raiseError(AddMergeInteractiveContent.MergeInFilter);
|
|
18067
18067
|
}
|
|
18068
18068
|
else if (result.isCancelledBecause(3 /* CommandResult.MergeIsDestructive */)) {
|
|
@@ -18089,7 +18089,7 @@ function handlePasteResult(env, result) {
|
|
|
18089
18089
|
else if (result.reasons.includes(23 /* CommandResult.WrongFigurePasteOption */)) {
|
|
18090
18090
|
env.raiseError(PasteInteractiveContent.wrongFigurePasteOption);
|
|
18091
18091
|
}
|
|
18092
|
-
else if (result.reasons.includes(
|
|
18092
|
+
else if (result.reasons.includes(78 /* CommandResult.FrozenPaneOverlap */)) {
|
|
18093
18093
|
env.raiseError(PasteInteractiveContent.frozenPaneOverlap);
|
|
18094
18094
|
}
|
|
18095
18095
|
}
|
|
@@ -19264,7 +19264,7 @@ function interactiveSortSelection(env, sheetId, anchor, zone, sortDirection) {
|
|
|
19264
19264
|
});
|
|
19265
19265
|
}
|
|
19266
19266
|
}
|
|
19267
|
-
if (result.isCancelledBecause(
|
|
19267
|
+
if (result.isCancelledBecause(66 /* CommandResult.InvalidSortZone */)) {
|
|
19268
19268
|
const { col, row } = anchor;
|
|
19269
19269
|
env.model.selection.selectZone({ cell: { col, row }, zone });
|
|
19270
19270
|
env.raiseError(_lt("Cannot sort. To sort, select only cells or only merges that have the same size."));
|
|
@@ -19278,13 +19278,13 @@ const AddFilterInteractiveContent = {
|
|
|
19278
19278
|
};
|
|
19279
19279
|
function interactiveAddFilter(env, sheetId, target) {
|
|
19280
19280
|
const result = env.model.dispatch("CREATE_FILTER_TABLE", { target, sheetId });
|
|
19281
|
-
if (result.isCancelledBecause(
|
|
19281
|
+
if (result.isCancelledBecause(81 /* CommandResult.FilterOverlap */)) {
|
|
19282
19282
|
env.raiseError(AddFilterInteractiveContent.filterOverlap);
|
|
19283
19283
|
}
|
|
19284
|
-
else if (result.isCancelledBecause(
|
|
19284
|
+
else if (result.isCancelledBecause(83 /* CommandResult.MergeInFilter */)) {
|
|
19285
19285
|
env.raiseError(AddFilterInteractiveContent.mergeInFilter);
|
|
19286
19286
|
}
|
|
19287
|
-
else if (result.isCancelledBecause(
|
|
19287
|
+
else if (result.isCancelledBecause(84 /* CommandResult.NonContinuousTargets */)) {
|
|
19288
19288
|
env.raiseError(AddFilterInteractiveContent.nonContinuousTargets);
|
|
19289
19289
|
}
|
|
19290
19290
|
}
|
|
@@ -19721,7 +19721,7 @@ function interactiveFreezeColumnsRows(env, dimension, base) {
|
|
|
19721
19721
|
const sheetId = env.model.getters.getActiveSheetId();
|
|
19722
19722
|
const cmd = dimension === "COL" ? "FREEZE_COLUMNS" : "FREEZE_ROWS";
|
|
19723
19723
|
const result = env.model.dispatch(cmd, { sheetId, quantity: base });
|
|
19724
|
-
if (result.isCancelledBecause(
|
|
19724
|
+
if (result.isCancelledBecause(68 /* CommandResult.MergeOverlap */)) {
|
|
19725
19725
|
env.raiseError(MergeErrorMessage);
|
|
19726
19726
|
}
|
|
19727
19727
|
}
|
|
@@ -20861,10 +20861,10 @@ class LineBarPieConfigPanel extends Component {
|
|
|
20861
20861
|
return cancelledReasons.map((error) => ChartTerms.Errors[error] || ChartTerms.Errors.Unexpected);
|
|
20862
20862
|
}
|
|
20863
20863
|
get isDatasetInvalid() {
|
|
20864
|
-
return !!this.state.datasetDispatchResult?.isCancelledBecause(
|
|
20864
|
+
return !!this.state.datasetDispatchResult?.isCancelledBecause(35 /* CommandResult.InvalidDataSet */);
|
|
20865
20865
|
}
|
|
20866
20866
|
get isLabelInvalid() {
|
|
20867
|
-
return !!this.state.labelsDispatchResult?.isCancelledBecause(
|
|
20867
|
+
return !!this.state.labelsDispatchResult?.isCancelledBecause(36 /* CommandResult.InvalidLabelRange */);
|
|
20868
20868
|
}
|
|
20869
20869
|
onUpdateDataSetsHaveTitle(ev) {
|
|
20870
20870
|
this.props.updateChart(this.props.figureId, {
|
|
@@ -21538,7 +21538,7 @@ class GaugeChartConfigPanel extends Component {
|
|
|
21538
21538
|
return cancelledReasons.map((error) => ChartTerms.Errors[error] || ChartTerms.Errors.Unexpected);
|
|
21539
21539
|
}
|
|
21540
21540
|
get isDataRangeInvalid() {
|
|
21541
|
-
return !!this.state.dataRangeDispatchResult?.isCancelledBecause(
|
|
21541
|
+
return !!this.state.dataRangeDispatchResult?.isCancelledBecause(39 /* CommandResult.InvalidGaugeDataRange */);
|
|
21542
21542
|
}
|
|
21543
21543
|
onDataRangeChanged(ranges) {
|
|
21544
21544
|
this.dataRange = ranges[0];
|
|
@@ -21622,25 +21622,25 @@ class GaugeChartDesignPanel extends Component {
|
|
|
21622
21622
|
});
|
|
21623
21623
|
}
|
|
21624
21624
|
isRangeMinInvalid() {
|
|
21625
|
-
return !!(this.state.sectionRuleDispatchResult?.isCancelledBecause(
|
|
21626
|
-
this.state.sectionRuleDispatchResult?.isCancelledBecause(
|
|
21627
|
-
this.state.sectionRuleDispatchResult?.isCancelledBecause(
|
|
21625
|
+
return !!(this.state.sectionRuleDispatchResult?.isCancelledBecause(40 /* CommandResult.EmptyGaugeRangeMin */) ||
|
|
21626
|
+
this.state.sectionRuleDispatchResult?.isCancelledBecause(41 /* CommandResult.GaugeRangeMinNaN */) ||
|
|
21627
|
+
this.state.sectionRuleDispatchResult?.isCancelledBecause(44 /* CommandResult.GaugeRangeMinBiggerThanRangeMax */));
|
|
21628
21628
|
}
|
|
21629
21629
|
isRangeMaxInvalid() {
|
|
21630
|
-
return !!(this.state.sectionRuleDispatchResult?.isCancelledBecause(
|
|
21631
|
-
this.state.sectionRuleDispatchResult?.isCancelledBecause(
|
|
21632
|
-
this.state.sectionRuleDispatchResult?.isCancelledBecause(
|
|
21630
|
+
return !!(this.state.sectionRuleDispatchResult?.isCancelledBecause(42 /* CommandResult.EmptyGaugeRangeMax */) ||
|
|
21631
|
+
this.state.sectionRuleDispatchResult?.isCancelledBecause(43 /* CommandResult.GaugeRangeMaxNaN */) ||
|
|
21632
|
+
this.state.sectionRuleDispatchResult?.isCancelledBecause(44 /* CommandResult.GaugeRangeMinBiggerThanRangeMax */));
|
|
21633
21633
|
}
|
|
21634
21634
|
// ---------------------------------------------------------------------------
|
|
21635
21635
|
// COLOR_SECTION_TEMPLATE
|
|
21636
21636
|
// ---------------------------------------------------------------------------
|
|
21637
21637
|
get isLowerInflectionPointInvalid() {
|
|
21638
|
-
return !!(this.state.sectionRuleDispatchResult?.isCancelledBecause(
|
|
21639
|
-
this.state.sectionRuleDispatchResult?.isCancelledBecause(
|
|
21638
|
+
return !!(this.state.sectionRuleDispatchResult?.isCancelledBecause(45 /* CommandResult.GaugeLowerInflectionPointNaN */) ||
|
|
21639
|
+
this.state.sectionRuleDispatchResult?.isCancelledBecause(47 /* CommandResult.GaugeLowerBiggerThanUpper */));
|
|
21640
21640
|
}
|
|
21641
21641
|
get isUpperInflectionPointInvalid() {
|
|
21642
|
-
return !!(this.state.sectionRuleDispatchResult?.isCancelledBecause(
|
|
21643
|
-
this.state.sectionRuleDispatchResult?.isCancelledBecause(
|
|
21642
|
+
return !!(this.state.sectionRuleDispatchResult?.isCancelledBecause(46 /* CommandResult.GaugeUpperInflectionPointNaN */) ||
|
|
21643
|
+
this.state.sectionRuleDispatchResult?.isCancelledBecause(47 /* CommandResult.GaugeLowerBiggerThanUpper */));
|
|
21644
21644
|
}
|
|
21645
21645
|
updateSectionColor(target, color) {
|
|
21646
21646
|
const sectionRule = deepCopy(this.state.sectionRule);
|
|
@@ -21728,10 +21728,10 @@ class ScorecardChartConfigPanel extends Component {
|
|
|
21728
21728
|
return cancelledReasons.map((error) => ChartTerms.Errors[error] || ChartTerms.Errors.Unexpected);
|
|
21729
21729
|
}
|
|
21730
21730
|
get isKeyValueInvalid() {
|
|
21731
|
-
return !!this.state.keyValueDispatchResult?.isCancelledBecause(
|
|
21731
|
+
return !!this.state.keyValueDispatchResult?.isCancelledBecause(37 /* CommandResult.InvalidScorecardKeyValue */);
|
|
21732
21732
|
}
|
|
21733
21733
|
get isBaselineInvalid() {
|
|
21734
|
-
return !!this.state.keyValueDispatchResult?.isCancelledBecause(
|
|
21734
|
+
return !!this.state.keyValueDispatchResult?.isCancelledBecause(38 /* CommandResult.InvalidScorecardBaseline */);
|
|
21735
21735
|
}
|
|
21736
21736
|
onKeyValueRangeChanged(ranges) {
|
|
21737
21737
|
this.keyValue = ranges[0];
|
|
@@ -22626,10 +22626,10 @@ class ConditionalFormattingPanel extends Component {
|
|
|
22626
22626
|
* Cell Is Rule
|
|
22627
22627
|
****************************************************************************/
|
|
22628
22628
|
get isValue1Invalid() {
|
|
22629
|
-
return !!this.state.errors?.includes(
|
|
22629
|
+
return !!this.state.errors?.includes(54 /* CommandResult.FirstArgMissing */);
|
|
22630
22630
|
}
|
|
22631
22631
|
get isValue2Invalid() {
|
|
22632
|
-
return !!this.state.errors?.includes(
|
|
22632
|
+
return !!this.state.errors?.includes(55 /* CommandResult.SecondArgMissing */);
|
|
22633
22633
|
}
|
|
22634
22634
|
toggleStyle(tool) {
|
|
22635
22635
|
const style = this.state.rules.cellIs.style;
|
|
@@ -22646,17 +22646,17 @@ class ConditionalFormattingPanel extends Component {
|
|
|
22646
22646
|
isValueInvalid(threshold) {
|
|
22647
22647
|
switch (threshold) {
|
|
22648
22648
|
case "minimum":
|
|
22649
|
-
return (this.state.errors.includes(
|
|
22650
|
-
this.state.errors.includes(
|
|
22651
|
-
this.state.errors.includes(
|
|
22652
|
-
this.state.errors.includes(
|
|
22649
|
+
return (this.state.errors.includes(61 /* CommandResult.MinInvalidFormula */) ||
|
|
22650
|
+
this.state.errors.includes(53 /* CommandResult.MinBiggerThanMid */) ||
|
|
22651
|
+
this.state.errors.includes(50 /* CommandResult.MinBiggerThanMax */) ||
|
|
22652
|
+
this.state.errors.includes(56 /* CommandResult.MinNaN */));
|
|
22653
22653
|
case "midpoint":
|
|
22654
|
-
return (this.state.errors.includes(
|
|
22655
|
-
this.state.errors.includes(
|
|
22656
|
-
this.state.errors.includes(
|
|
22654
|
+
return (this.state.errors.includes(62 /* CommandResult.MidInvalidFormula */) ||
|
|
22655
|
+
this.state.errors.includes(57 /* CommandResult.MidNaN */) ||
|
|
22656
|
+
this.state.errors.includes(52 /* CommandResult.MidBiggerThanMax */));
|
|
22657
22657
|
case "maximum":
|
|
22658
|
-
return (this.state.errors.includes(
|
|
22659
|
-
this.state.errors.includes(
|
|
22658
|
+
return (this.state.errors.includes(63 /* CommandResult.MaxInvalidFormula */) ||
|
|
22659
|
+
this.state.errors.includes(58 /* CommandResult.MaxNaN */));
|
|
22660
22660
|
default:
|
|
22661
22661
|
return false;
|
|
22662
22662
|
}
|
|
@@ -22704,13 +22704,13 @@ class ConditionalFormattingPanel extends Component {
|
|
|
22704
22704
|
isInflectionPointInvalid(inflectionPoint) {
|
|
22705
22705
|
switch (inflectionPoint) {
|
|
22706
22706
|
case "lowerInflectionPoint":
|
|
22707
|
-
return (this.state.errors.includes(
|
|
22708
|
-
this.state.errors.includes(
|
|
22709
|
-
this.state.errors.includes(
|
|
22707
|
+
return (this.state.errors.includes(60 /* CommandResult.ValueLowerInflectionNaN */) ||
|
|
22708
|
+
this.state.errors.includes(65 /* CommandResult.ValueLowerInvalidFormula */) ||
|
|
22709
|
+
this.state.errors.includes(51 /* CommandResult.LowerBiggerThanUpper */));
|
|
22710
22710
|
case "upperInflectionPoint":
|
|
22711
|
-
return (this.state.errors.includes(
|
|
22712
|
-
this.state.errors.includes(
|
|
22713
|
-
this.state.errors.includes(
|
|
22711
|
+
return (this.state.errors.includes(59 /* CommandResult.ValueUpperInflectionNaN */) ||
|
|
22712
|
+
this.state.errors.includes(64 /* CommandResult.ValueUpperInvalidFormula */) ||
|
|
22713
|
+
this.state.errors.includes(51 /* CommandResult.LowerBiggerThanUpper */));
|
|
22714
22714
|
default:
|
|
22715
22715
|
return true;
|
|
22716
22716
|
}
|
|
@@ -23073,7 +23073,7 @@ const SplitToColumnsInteractiveContent = {
|
|
|
23073
23073
|
};
|
|
23074
23074
|
function interactiveSplitToColumns(env, separator, addNewColumns) {
|
|
23075
23075
|
let result = env.model.dispatch("SPLIT_TEXT_INTO_COLUMNS", { separator, addNewColumns });
|
|
23076
|
-
if (result.isCancelledBecause(
|
|
23076
|
+
if (result.isCancelledBecause(93 /* CommandResult.SplitWillOverwriteContent */)) {
|
|
23077
23077
|
env.askConfirmation(SplitToColumnsInteractiveContent.SplitIsDestructive, () => {
|
|
23078
23078
|
result = env.model.dispatch("SPLIT_TEXT_INTO_COLUMNS", {
|
|
23079
23079
|
separator,
|
|
@@ -23137,8 +23137,8 @@ class SplitIntoColumnsPanel extends Component {
|
|
|
23137
23137
|
const errors = new Set();
|
|
23138
23138
|
for (const reason of cancelledReasons) {
|
|
23139
23139
|
switch (reason) {
|
|
23140
|
-
case
|
|
23141
|
-
case
|
|
23140
|
+
case 93 /* CommandResult.SplitWillOverwriteContent */:
|
|
23141
|
+
case 92 /* CommandResult.EmptySplitSeparator */:
|
|
23142
23142
|
break;
|
|
23143
23143
|
default:
|
|
23144
23144
|
errors.add(SplitToColumnsTerms.Errors[reason] || SplitToColumnsTerms.Errors.Unexpected);
|
|
@@ -23153,8 +23153,8 @@ class SplitIntoColumnsPanel extends Component {
|
|
|
23153
23153
|
addNewColumns: this.state.addNewColumns,
|
|
23154
23154
|
force: false,
|
|
23155
23155
|
}).reasons;
|
|
23156
|
-
if (cancelledReasons.includes(
|
|
23157
|
-
warnings.push(SplitToColumnsTerms.Errors[
|
|
23156
|
+
if (cancelledReasons.includes(93 /* CommandResult.SplitWillOverwriteContent */)) {
|
|
23157
|
+
warnings.push(SplitToColumnsTerms.Errors[93 /* CommandResult.SplitWillOverwriteContent */]);
|
|
23158
23158
|
}
|
|
23159
23159
|
return warnings;
|
|
23160
23160
|
}
|
|
@@ -24374,6 +24374,9 @@ class Composer extends Component {
|
|
|
24374
24374
|
const token = tokens.filter((token) => token.value.includes(currentSelectedText) &&
|
|
24375
24375
|
token.start <= currentSelection.start &&
|
|
24376
24376
|
token.end >= currentSelection.end)[0];
|
|
24377
|
+
if (!token) {
|
|
24378
|
+
return;
|
|
24379
|
+
}
|
|
24377
24380
|
if (token.type === "REFERENCE") {
|
|
24378
24381
|
this.env.model.dispatch("CHANGE_COMPOSER_CURSOR_SELECTION", {
|
|
24379
24382
|
start: token.start,
|
|
@@ -31678,7 +31681,7 @@ class BordersPlugin extends CorePlugin {
|
|
|
31678
31681
|
const currentBorder = this.getCellBorder(cmd);
|
|
31679
31682
|
const areAllNewBordersUndefined = !cmd.border?.bottom && !cmd.border?.left && !cmd.border?.right && !cmd.border?.top;
|
|
31680
31683
|
if ((!currentBorder && areAllNewBordersUndefined) || deepEquals(currentBorder, cmd.border)) {
|
|
31681
|
-
return
|
|
31684
|
+
return 98 /* CommandResult.NoChanges */;
|
|
31682
31685
|
}
|
|
31683
31686
|
return 0 /* CommandResult.Success */;
|
|
31684
31687
|
}
|
|
@@ -31923,6 +31926,10 @@ class CellPlugin extends CorePlugin {
|
|
|
31923
31926
|
format: cell.format ? getItemId(cell.format, formats) : undefined,
|
|
31924
31927
|
content: cell.content || undefined,
|
|
31925
31928
|
};
|
|
31929
|
+
// if there is a formula but no dependencies (maybe because the cell is in error), no need to recompute the formula text
|
|
31930
|
+
if (cell.isFormula && cell.dependencies.length) {
|
|
31931
|
+
cells[xc].content = this.buildFormulaContent(_sheet.id, cell, cell.dependencies, true);
|
|
31932
|
+
}
|
|
31926
31933
|
}
|
|
31927
31934
|
_sheet.cells = cells;
|
|
31928
31935
|
}
|
|
@@ -31957,13 +31964,13 @@ class CellPlugin extends CorePlugin {
|
|
|
31957
31964
|
/*
|
|
31958
31965
|
* Reconstructs the original formula string based on a normalized form and its dependencies
|
|
31959
31966
|
*/
|
|
31960
|
-
buildFormulaContent(sheetId, cell, dependencies) {
|
|
31967
|
+
buildFormulaContent(sheetId, cell, dependencies, useFixedZone = false) {
|
|
31961
31968
|
const ranges = dependencies || cell.dependencies;
|
|
31962
31969
|
let rangeIndex = 0;
|
|
31963
31970
|
return concat(cell.compiledFormula.tokens.map((token) => {
|
|
31964
31971
|
if (token.type === "REFERENCE") {
|
|
31965
31972
|
const range = ranges[rangeIndex++];
|
|
31966
|
-
return this.getters.getRangeString(range, sheetId);
|
|
31973
|
+
return this.getters.getRangeString(range, sheetId, useFixedZone);
|
|
31967
31974
|
}
|
|
31968
31975
|
return token.value;
|
|
31969
31976
|
}));
|
|
@@ -32189,9 +32196,9 @@ class CellPlugin extends CorePlugin {
|
|
|
32189
32196
|
checkUselessClearCell(cmd) {
|
|
32190
32197
|
const cell = this.getters.getCell(cmd);
|
|
32191
32198
|
if (!cell)
|
|
32192
|
-
return
|
|
32199
|
+
return 98 /* CommandResult.NoChanges */;
|
|
32193
32200
|
if (!cell.content && !cell.style && !cell.format) {
|
|
32194
|
-
return
|
|
32201
|
+
return 98 /* CommandResult.NoChanges */;
|
|
32195
32202
|
}
|
|
32196
32203
|
return 0 /* CommandResult.Success */;
|
|
32197
32204
|
}
|
|
@@ -32416,13 +32423,13 @@ class ChartPlugin extends CorePlugin {
|
|
|
32416
32423
|
}
|
|
32417
32424
|
checkChartDuplicate(cmd) {
|
|
32418
32425
|
return this.getters.getFigureSheetId(cmd.id)
|
|
32419
|
-
?
|
|
32426
|
+
? 87 /* CommandResult.DuplicatedChartId */
|
|
32420
32427
|
: 0 /* CommandResult.Success */;
|
|
32421
32428
|
}
|
|
32422
32429
|
checkChartExists(cmd) {
|
|
32423
32430
|
return this.getters.getFigureSheetId(cmd.id)
|
|
32424
32431
|
? 0 /* CommandResult.Success */
|
|
32425
|
-
:
|
|
32432
|
+
: 88 /* CommandResult.ChartDoesNotExist */;
|
|
32426
32433
|
}
|
|
32427
32434
|
}
|
|
32428
32435
|
|
|
@@ -32532,7 +32539,13 @@ class ConditionalFormatPlugin extends CorePlugin {
|
|
|
32532
32539
|
}
|
|
32533
32540
|
}
|
|
32534
32541
|
exportForExcel(data) {
|
|
32535
|
-
|
|
32542
|
+
if (data.sheets) {
|
|
32543
|
+
for (let sheet of data.sheets) {
|
|
32544
|
+
if (this.cfRules[sheet.id]) {
|
|
32545
|
+
sheet.conditionalFormats = this.cfRules[sheet.id].map((rule) => this.mapToConditionalFormat(sheet.id, rule, { useFixedReference: true }));
|
|
32546
|
+
}
|
|
32547
|
+
}
|
|
32548
|
+
}
|
|
32536
32549
|
}
|
|
32537
32550
|
// ---------------------------------------------------------------------------
|
|
32538
32551
|
// Getters
|
|
@@ -32597,11 +32610,11 @@ class ConditionalFormatPlugin extends CorePlugin {
|
|
|
32597
32610
|
// ---------------------------------------------------------------------------
|
|
32598
32611
|
// Private
|
|
32599
32612
|
// ---------------------------------------------------------------------------
|
|
32600
|
-
mapToConditionalFormat(sheetId, cf) {
|
|
32613
|
+
mapToConditionalFormat(sheetId, cf, options = { useFixedReference: false }) {
|
|
32601
32614
|
return {
|
|
32602
32615
|
...cf,
|
|
32603
32616
|
ranges: cf.ranges.map((range) => {
|
|
32604
|
-
return this.getters.getRangeString(range, sheetId);
|
|
32617
|
+
return this.getters.getRangeString(range, sheetId, options.useFixedReference);
|
|
32605
32618
|
}),
|
|
32606
32619
|
};
|
|
32607
32620
|
}
|
|
@@ -32634,10 +32647,10 @@ class ConditionalFormatPlugin extends CorePlugin {
|
|
|
32634
32647
|
return 28 /* CommandResult.InvalidSheetId */;
|
|
32635
32648
|
const ruleIndex = this.cfRules[sheetId].findIndex((cf) => cf.id === cfId);
|
|
32636
32649
|
if (ruleIndex === -1)
|
|
32637
|
-
return
|
|
32650
|
+
return 74 /* CommandResult.InvalidConditionalFormatId */;
|
|
32638
32651
|
const cfIndex2 = direction === "up" ? ruleIndex - 1 : ruleIndex + 1;
|
|
32639
32652
|
if (cfIndex2 < 0 || cfIndex2 >= this.cfRules[sheetId].length) {
|
|
32640
|
-
return
|
|
32653
|
+
return 74 /* CommandResult.InvalidConditionalFormatId */;
|
|
32641
32654
|
}
|
|
32642
32655
|
return 0 /* CommandResult.Success */;
|
|
32643
32656
|
}
|
|
@@ -32678,10 +32691,10 @@ class ConditionalFormatPlugin extends CorePlugin {
|
|
|
32678
32691
|
const errors = [];
|
|
32679
32692
|
const isEmpty = (value) => value === undefined || value === "";
|
|
32680
32693
|
if (expectedNumber >= 1 && isEmpty(rule.values[0])) {
|
|
32681
|
-
errors.push(
|
|
32694
|
+
errors.push(54 /* CommandResult.FirstArgMissing */);
|
|
32682
32695
|
}
|
|
32683
32696
|
if (expectedNumber >= 2 && isEmpty(rule.values[1])) {
|
|
32684
|
-
errors.push(
|
|
32697
|
+
errors.push(55 /* CommandResult.SecondArgMissing */);
|
|
32685
32698
|
}
|
|
32686
32699
|
return errors.length ? errors : 0 /* CommandResult.Success */;
|
|
32687
32700
|
}
|
|
@@ -32693,15 +32706,15 @@ class ConditionalFormatPlugin extends CorePlugin {
|
|
|
32693
32706
|
(threshold.value === "" || isNaN(threshold.value))) {
|
|
32694
32707
|
switch (thresholdName) {
|
|
32695
32708
|
case "min":
|
|
32696
|
-
return
|
|
32709
|
+
return 56 /* CommandResult.MinNaN */;
|
|
32697
32710
|
case "max":
|
|
32698
|
-
return
|
|
32711
|
+
return 58 /* CommandResult.MaxNaN */;
|
|
32699
32712
|
case "mid":
|
|
32700
|
-
return
|
|
32713
|
+
return 57 /* CommandResult.MidNaN */;
|
|
32701
32714
|
case "upperInflectionPoint":
|
|
32702
|
-
return
|
|
32715
|
+
return 59 /* CommandResult.ValueUpperInflectionNaN */;
|
|
32703
32716
|
case "lowerInflectionPoint":
|
|
32704
|
-
return
|
|
32717
|
+
return 60 /* CommandResult.ValueLowerInflectionNaN */;
|
|
32705
32718
|
}
|
|
32706
32719
|
}
|
|
32707
32720
|
return 0 /* CommandResult.Success */;
|
|
@@ -32715,15 +32728,15 @@ class ConditionalFormatPlugin extends CorePlugin {
|
|
|
32715
32728
|
catch (error) {
|
|
32716
32729
|
switch (thresholdName) {
|
|
32717
32730
|
case "min":
|
|
32718
|
-
return
|
|
32731
|
+
return 61 /* CommandResult.MinInvalidFormula */;
|
|
32719
32732
|
case "max":
|
|
32720
|
-
return
|
|
32733
|
+
return 63 /* CommandResult.MaxInvalidFormula */;
|
|
32721
32734
|
case "mid":
|
|
32722
|
-
return
|
|
32735
|
+
return 62 /* CommandResult.MidInvalidFormula */;
|
|
32723
32736
|
case "upperInflectionPoint":
|
|
32724
|
-
return
|
|
32737
|
+
return 64 /* CommandResult.ValueUpperInvalidFormula */;
|
|
32725
32738
|
case "lowerInflectionPoint":
|
|
32726
|
-
return
|
|
32739
|
+
return 65 /* CommandResult.ValueLowerInvalidFormula */;
|
|
32727
32740
|
}
|
|
32728
32741
|
}
|
|
32729
32742
|
return 0 /* CommandResult.Success */;
|
|
@@ -32740,7 +32753,7 @@ class ConditionalFormatPlugin extends CorePlugin {
|
|
|
32740
32753
|
if (["number", "percentage", "percentile"].includes(rule.lowerInflectionPoint.type) &&
|
|
32741
32754
|
rule.lowerInflectionPoint.type === rule.upperInflectionPoint.type &&
|
|
32742
32755
|
Number(minValue) > Number(maxValue)) {
|
|
32743
|
-
return
|
|
32756
|
+
return 51 /* CommandResult.LowerBiggerThanUpper */;
|
|
32744
32757
|
}
|
|
32745
32758
|
return 0 /* CommandResult.Success */;
|
|
32746
32759
|
}
|
|
@@ -32750,7 +32763,7 @@ class ConditionalFormatPlugin extends CorePlugin {
|
|
|
32750
32763
|
if (["number", "percentage", "percentile"].includes(rule.minimum.type) &&
|
|
32751
32764
|
rule.minimum.type === rule.maximum.type &&
|
|
32752
32765
|
stringToNumber(minValue) >= stringToNumber(maxValue)) {
|
|
32753
|
-
return
|
|
32766
|
+
return 50 /* CommandResult.MinBiggerThanMax */;
|
|
32754
32767
|
}
|
|
32755
32768
|
return 0 /* CommandResult.Success */;
|
|
32756
32769
|
}
|
|
@@ -32761,7 +32774,7 @@ class ConditionalFormatPlugin extends CorePlugin {
|
|
|
32761
32774
|
["number", "percentage", "percentile"].includes(rule.midpoint.type) &&
|
|
32762
32775
|
rule.midpoint.type === rule.maximum.type &&
|
|
32763
32776
|
stringToNumber(midValue) >= stringToNumber(maxValue)) {
|
|
32764
|
-
return
|
|
32777
|
+
return 52 /* CommandResult.MidBiggerThanMax */;
|
|
32765
32778
|
}
|
|
32766
32779
|
return 0 /* CommandResult.Success */;
|
|
32767
32780
|
}
|
|
@@ -32772,7 +32785,7 @@ class ConditionalFormatPlugin extends CorePlugin {
|
|
|
32772
32785
|
["number", "percentage", "percentile"].includes(rule.midpoint.type) &&
|
|
32773
32786
|
rule.minimum.type === rule.midpoint.type &&
|
|
32774
32787
|
stringToNumber(minValue) >= stringToNumber(midValue)) {
|
|
32775
|
-
return
|
|
32788
|
+
return 53 /* CommandResult.MinBiggerThanMid */;
|
|
32776
32789
|
}
|
|
32777
32790
|
return 0 /* CommandResult.Success */;
|
|
32778
32791
|
}
|
|
@@ -32904,13 +32917,13 @@ class FigurePlugin extends CorePlugin {
|
|
|
32904
32917
|
}
|
|
32905
32918
|
checkFigureExists(sheetId, figureId) {
|
|
32906
32919
|
if (this.figures[sheetId]?.[figureId] === undefined) {
|
|
32907
|
-
return
|
|
32920
|
+
return 73 /* CommandResult.FigureDoesNotExist */;
|
|
32908
32921
|
}
|
|
32909
32922
|
return 0 /* CommandResult.Success */;
|
|
32910
32923
|
}
|
|
32911
32924
|
checkFigureDuplicate(figureId) {
|
|
32912
32925
|
if (Object.values(this.figures).find((sheet) => sheet?.[figureId])) {
|
|
32913
|
-
return
|
|
32926
|
+
return 85 /* CommandResult.DuplicatedFigureId */;
|
|
32914
32927
|
}
|
|
32915
32928
|
return 0 /* CommandResult.Success */;
|
|
32916
32929
|
}
|
|
@@ -33022,12 +33035,12 @@ class FiltersPlugin extends CorePlugin {
|
|
|
33022
33035
|
switch (cmd.type) {
|
|
33023
33036
|
case "CREATE_FILTER_TABLE":
|
|
33024
33037
|
if (!areZonesContinuous(...cmd.target)) {
|
|
33025
|
-
return
|
|
33038
|
+
return 84 /* CommandResult.NonContinuousTargets */;
|
|
33026
33039
|
}
|
|
33027
33040
|
const zone = union(...cmd.target);
|
|
33028
33041
|
const checkFilterOverlap = () => {
|
|
33029
33042
|
if (this.getFilterTables(cmd.sheetId).some((filter) => overlap(filter.zone, zone))) {
|
|
33030
|
-
return
|
|
33043
|
+
return 81 /* CommandResult.FilterOverlap */;
|
|
33031
33044
|
}
|
|
33032
33045
|
return 0 /* CommandResult.Success */;
|
|
33033
33046
|
};
|
|
@@ -33035,7 +33048,7 @@ class FiltersPlugin extends CorePlugin {
|
|
|
33035
33048
|
const mergesInTarget = this.getters.getMergesInZone(cmd.sheetId, zone);
|
|
33036
33049
|
for (let merge of mergesInTarget) {
|
|
33037
33050
|
if (overlap(zone, merge)) {
|
|
33038
|
-
return
|
|
33051
|
+
return 83 /* CommandResult.MergeInFilter */;
|
|
33039
33052
|
}
|
|
33040
33053
|
}
|
|
33041
33054
|
return 0 /* CommandResult.Success */;
|
|
@@ -33045,7 +33058,7 @@ class FiltersPlugin extends CorePlugin {
|
|
|
33045
33058
|
for (let merge of cmd.target) {
|
|
33046
33059
|
for (let filterTable of this.getFilterTables(cmd.sheetId)) {
|
|
33047
33060
|
if (overlap(filterTable.zone, merge)) {
|
|
33048
|
-
return
|
|
33061
|
+
return 83 /* CommandResult.MergeInFilter */;
|
|
33049
33062
|
}
|
|
33050
33063
|
}
|
|
33051
33064
|
}
|
|
@@ -33414,10 +33427,10 @@ class HeaderVisibilityPlugin extends CorePlugin {
|
|
|
33414
33427
|
: this.getters.getNumberRows(cmd.sheetId);
|
|
33415
33428
|
const hiddenElements = new Set((hiddenGroup || []).flat().concat(cmd.elements));
|
|
33416
33429
|
if (hiddenElements.size >= elements) {
|
|
33417
|
-
return
|
|
33430
|
+
return 69 /* CommandResult.TooManyHiddenElements */;
|
|
33418
33431
|
}
|
|
33419
33432
|
else if (Math.min(...cmd.elements) < 0 || Math.max(...cmd.elements) > elements) {
|
|
33420
|
-
return
|
|
33433
|
+
return 89 /* CommandResult.InvalidHeaderIndex */;
|
|
33421
33434
|
}
|
|
33422
33435
|
else {
|
|
33423
33436
|
return 0 /* CommandResult.Success */;
|
|
@@ -33981,7 +33994,7 @@ class MergePlugin extends CorePlugin {
|
|
|
33981
33994
|
for (const zone of target) {
|
|
33982
33995
|
for (const zone2 of target) {
|
|
33983
33996
|
if (zone !== zone2 && overlap(zone, zone2)) {
|
|
33984
|
-
return
|
|
33997
|
+
return 68 /* CommandResult.MergeOverlap */;
|
|
33985
33998
|
}
|
|
33986
33999
|
}
|
|
33987
34000
|
}
|
|
@@ -33995,7 +34008,7 @@ class MergePlugin extends CorePlugin {
|
|
|
33995
34008
|
for (const zone of target) {
|
|
33996
34009
|
if ((zone.left < xSplit && zone.right >= xSplit) ||
|
|
33997
34010
|
(zone.top < ySplit && zone.bottom >= ySplit)) {
|
|
33998
|
-
return
|
|
34011
|
+
return 78 /* CommandResult.FrozenPaneOverlap */;
|
|
33999
34012
|
}
|
|
34000
34013
|
}
|
|
34001
34014
|
return 0 /* CommandResult.Success */;
|
|
@@ -34438,8 +34451,9 @@ class RangeAdapter {
|
|
|
34438
34451
|
*
|
|
34439
34452
|
* @param range the range (received from getRangeFromXC or getRangeFromZone)
|
|
34440
34453
|
* @param forSheetId the id of the sheet where the range string is supposed to be used.
|
|
34454
|
+
* @param [useFixedZone=false] if true, the range will be returned with fixed row and column
|
|
34441
34455
|
*/
|
|
34442
|
-
getRangeString(range, forSheetId) {
|
|
34456
|
+
getRangeString(range, forSheetId, useFixedZone = false) {
|
|
34443
34457
|
if (!range) {
|
|
34444
34458
|
return INCORRECT_RANGE_STRING;
|
|
34445
34459
|
}
|
|
@@ -34466,7 +34480,7 @@ class RangeAdapter {
|
|
|
34466
34480
|
if (prefixSheet && !sheetName) {
|
|
34467
34481
|
return INCORRECT_RANGE_STRING;
|
|
34468
34482
|
}
|
|
34469
|
-
let rangeString = this.getRangePartString(rangeImpl, 0);
|
|
34483
|
+
let rangeString = this.getRangePartString(rangeImpl, 0, useFixedZone);
|
|
34470
34484
|
if (rangeImpl.parts && rangeImpl.parts.length === 2) {
|
|
34471
34485
|
// this if converts A2:A2 into A2 except if any part of the original range had fixed row or column (with $)
|
|
34472
34486
|
if (rangeImpl.zone.top !== rangeImpl.zone.bottom ||
|
|
@@ -34476,7 +34490,7 @@ class RangeAdapter {
|
|
|
34476
34490
|
rangeImpl.parts[1].rowFixed ||
|
|
34477
34491
|
rangeImpl.parts[1].colFixed) {
|
|
34478
34492
|
rangeString += ":";
|
|
34479
|
-
rangeString += this.getRangePartString(rangeImpl, 1);
|
|
34493
|
+
rangeString += this.getRangePartString(rangeImpl, 1, useFixedZone);
|
|
34480
34494
|
}
|
|
34481
34495
|
}
|
|
34482
34496
|
return `${prefixSheet ? sheetName + "!" : ""}${rangeString}`;
|
|
@@ -34517,13 +34531,13 @@ class RangeAdapter {
|
|
|
34517
34531
|
/**
|
|
34518
34532
|
* Get a Xc string that represent a part of a range
|
|
34519
34533
|
*/
|
|
34520
|
-
getRangePartString(range, part) {
|
|
34534
|
+
getRangePartString(range, part, useFixedZone = false) {
|
|
34521
34535
|
const colFixed = range.parts && range.parts[part]?.colFixed ? "$" : "";
|
|
34522
34536
|
const col = part === 0 ? numberToLetters(range.zone.left) : numberToLetters(range.zone.right);
|
|
34523
34537
|
const rowFixed = range.parts && range.parts[part]?.rowFixed ? "$" : "";
|
|
34524
34538
|
const row = part === 0 ? String(range.zone.top + 1) : String(range.zone.bottom + 1);
|
|
34525
34539
|
let str = "";
|
|
34526
|
-
if (range.isFullCol) {
|
|
34540
|
+
if (range.isFullCol && !useFixedZone) {
|
|
34527
34541
|
if (part === 0 && range.unboundedZone.hasHeader) {
|
|
34528
34542
|
str = colFixed + col + rowFixed + row;
|
|
34529
34543
|
}
|
|
@@ -34531,7 +34545,7 @@ class RangeAdapter {
|
|
|
34531
34545
|
str = colFixed + col;
|
|
34532
34546
|
}
|
|
34533
34547
|
}
|
|
34534
|
-
else if (range.isFullRow) {
|
|
34548
|
+
else if (range.isFullRow && !useFixedZone) {
|
|
34535
34549
|
if (part === 0 && range.unboundedZone.hasHeader) {
|
|
34536
34550
|
str = colFixed + col + rowFixed + row;
|
|
34537
34551
|
}
|
|
@@ -34628,10 +34642,10 @@ class SheetPlugin extends CorePlugin {
|
|
|
34628
34642
|
? this.getNumberCols(cmd.sheetId)
|
|
34629
34643
|
: this.getNumberRows(cmd.sheetId);
|
|
34630
34644
|
if (cmd.base < 0 || cmd.base >= elements) {
|
|
34631
|
-
return
|
|
34645
|
+
return 89 /* CommandResult.InvalidHeaderIndex */;
|
|
34632
34646
|
}
|
|
34633
34647
|
else if (cmd.quantity <= 0) {
|
|
34634
|
-
return
|
|
34648
|
+
return 90 /* CommandResult.InvalidQuantity */;
|
|
34635
34649
|
}
|
|
34636
34650
|
return 0 /* CommandResult.Success */;
|
|
34637
34651
|
case "REMOVE_COLUMNS_ROWS": {
|
|
@@ -34639,7 +34653,7 @@ class SheetPlugin extends CorePlugin {
|
|
|
34639
34653
|
? this.getNumberCols(cmd.sheetId)
|
|
34640
34654
|
: this.getNumberRows(cmd.sheetId);
|
|
34641
34655
|
if (Math.min(...cmd.elements) < 0 || Math.max(...cmd.elements) > elements) {
|
|
34642
|
-
return
|
|
34656
|
+
return 89 /* CommandResult.InvalidHeaderIndex */;
|
|
34643
34657
|
}
|
|
34644
34658
|
else if (this.checkElementsIncludeAllNonFrozenHeaders(cmd.sheetId, cmd.dimension, cmd.elements)) {
|
|
34645
34659
|
return 8 /* CommandResult.NotEnoughElements */;
|
|
@@ -35119,18 +35133,18 @@ class SheetPlugin extends CorePlugin {
|
|
|
35119
35133
|
checkRowFreezeQuantity(cmd) {
|
|
35120
35134
|
return cmd.quantity >= 1 && cmd.quantity < this.getNumberRows(cmd.sheetId)
|
|
35121
35135
|
? 0 /* CommandResult.Success */
|
|
35122
|
-
:
|
|
35136
|
+
: 77 /* CommandResult.InvalidFreezeQuantity */;
|
|
35123
35137
|
}
|
|
35124
35138
|
checkColFreezeQuantity(cmd) {
|
|
35125
35139
|
return cmd.quantity >= 1 && cmd.quantity < this.getNumberCols(cmd.sheetId)
|
|
35126
35140
|
? 0 /* CommandResult.Success */
|
|
35127
|
-
:
|
|
35141
|
+
: 77 /* CommandResult.InvalidFreezeQuantity */;
|
|
35128
35142
|
}
|
|
35129
35143
|
checkRowFreezeOverlapMerge(cmd) {
|
|
35130
35144
|
const merges = this.getters.getMerges(cmd.sheetId);
|
|
35131
35145
|
for (let merge of merges) {
|
|
35132
35146
|
if (merge.top < cmd.quantity && cmd.quantity <= merge.bottom) {
|
|
35133
|
-
return
|
|
35147
|
+
return 68 /* CommandResult.MergeOverlap */;
|
|
35134
35148
|
}
|
|
35135
35149
|
}
|
|
35136
35150
|
return 0 /* CommandResult.Success */;
|
|
@@ -35139,7 +35153,7 @@ class SheetPlugin extends CorePlugin {
|
|
|
35139
35153
|
const merges = this.getters.getMerges(cmd.sheetId);
|
|
35140
35154
|
for (let merge of merges) {
|
|
35141
35155
|
if (merge.left < cmd.quantity && cmd.quantity <= merge.right) {
|
|
35142
|
-
return
|
|
35156
|
+
return 68 /* CommandResult.MergeOverlap */;
|
|
35143
35157
|
}
|
|
35144
35158
|
}
|
|
35145
35159
|
return 0 /* CommandResult.Success */;
|
|
@@ -35460,7 +35474,7 @@ class SettingsPlugin extends CorePlugin {
|
|
|
35460
35474
|
allowDispatch(cmd) {
|
|
35461
35475
|
switch (cmd.type) {
|
|
35462
35476
|
case "UPDATE_LOCALE":
|
|
35463
|
-
return isValidLocale(cmd.locale) ? 0 /* CommandResult.Success */ :
|
|
35477
|
+
return isValidLocale(cmd.locale) ? 0 /* CommandResult.Success */ : 96 /* CommandResult.InvalidLocale */;
|
|
35464
35478
|
}
|
|
35465
35479
|
return 0 /* CommandResult.Success */;
|
|
35466
35480
|
}
|
|
@@ -35541,22 +35555,17 @@ class CompilationParametersBuilder {
|
|
|
35541
35555
|
* The `compute` of the formula's function must process it completely
|
|
35542
35556
|
*/
|
|
35543
35557
|
refFn(range, isMeta, functionName, paramNumber) {
|
|
35558
|
+
this.assertRangeValid(range);
|
|
35544
35559
|
if (isMeta) {
|
|
35545
35560
|
// Use zoneToXc of zone instead of getRangeString to avoid sending unbounded ranges
|
|
35546
35561
|
return { value: zoneToXc(range.zone) };
|
|
35547
35562
|
}
|
|
35548
|
-
if (!isZoneValid(range.zone)) {
|
|
35549
|
-
throw new InvalidReferenceError();
|
|
35550
|
-
}
|
|
35551
35563
|
// if the formula definition could have accepted a range, we would pass through the _range function and not here
|
|
35552
35564
|
if (range.zone.bottom !== range.zone.top || range.zone.left !== range.zone.right) {
|
|
35553
35565
|
throw new Error(paramNumber
|
|
35554
35566
|
? _lt("Function %s expects the parameter %s to be a single value or a single cell reference, not a range.", functionName.toString(), paramNumber.toString())
|
|
35555
35567
|
: _lt("Function %s expects its parameters to be single values or single cell references, not ranges.", functionName.toString()));
|
|
35556
35568
|
}
|
|
35557
|
-
if (range.invalidSheetName) {
|
|
35558
|
-
throw new Error(_lt("Invalid sheet name: %s", range.invalidSheetName));
|
|
35559
|
-
}
|
|
35560
35569
|
return this.readCell(range);
|
|
35561
35570
|
}
|
|
35562
35571
|
readCell(range) {
|
|
@@ -35591,10 +35600,10 @@ class CompilationParametersBuilder {
|
|
|
35591
35600
|
* Note that each col is possibly sparse: it only contain the values of cells
|
|
35592
35601
|
* that are actually present in the grid.
|
|
35593
35602
|
*/
|
|
35594
|
-
range(
|
|
35595
|
-
|
|
35596
|
-
|
|
35597
|
-
|
|
35603
|
+
range(range) {
|
|
35604
|
+
this.assertRangeValid(range);
|
|
35605
|
+
const sheetId = range.sheetId;
|
|
35606
|
+
const zone = range.zone;
|
|
35598
35607
|
// Performance issue: Avoid fetching data on positions that are out of the spreadsheet
|
|
35599
35608
|
// e.g. A1:ZZZ9999 in a sheet with 10 cols and 10 rows should ignore everything past J10 and return a 10x10 array
|
|
35600
35609
|
const sheetZone = this.getters.getSheetZone(sheetId);
|
|
@@ -35637,6 +35646,14 @@ class CompilationParametersBuilder {
|
|
|
35637
35646
|
this.rangeCache[cacheKey] = result;
|
|
35638
35647
|
return result;
|
|
35639
35648
|
}
|
|
35649
|
+
assertRangeValid(range) {
|
|
35650
|
+
if (!isZoneValid(range.zone)) {
|
|
35651
|
+
throw new InvalidReferenceError();
|
|
35652
|
+
}
|
|
35653
|
+
if (range.invalidSheetName) {
|
|
35654
|
+
throw new Error(_lt("Invalid sheet name: %s", range.invalidSheetName));
|
|
35655
|
+
}
|
|
35656
|
+
}
|
|
35640
35657
|
}
|
|
35641
35658
|
|
|
35642
35659
|
function quickselect(arr, k, left, right, compare) {
|
|
@@ -37915,7 +37932,7 @@ class AutofillPlugin extends UIPlugin {
|
|
|
37915
37932
|
if (this.lastCellSelected.col !== undefined && this.lastCellSelected.row !== undefined) {
|
|
37916
37933
|
return 0 /* CommandResult.Success */;
|
|
37917
37934
|
}
|
|
37918
|
-
return
|
|
37935
|
+
return 48 /* CommandResult.InvalidAutofillSelection */;
|
|
37919
37936
|
case "AUTOFILL_AUTO":
|
|
37920
37937
|
const zone = this.getters.getSelectedZone();
|
|
37921
37938
|
return zone.top === zone.bottom
|
|
@@ -38534,7 +38551,7 @@ class CellPopoverPlugin extends UIPlugin {
|
|
|
38534
38551
|
cellPopoverRegistry.get(cmd.popoverType);
|
|
38535
38552
|
}
|
|
38536
38553
|
catch (error) {
|
|
38537
|
-
return
|
|
38554
|
+
return 75 /* CommandResult.InvalidCellPopover */;
|
|
38538
38555
|
}
|
|
38539
38556
|
return 0 /* CommandResult.Success */;
|
|
38540
38557
|
default:
|
|
@@ -40674,27 +40691,6 @@ class SelectionInputPlugin extends UIPlugin {
|
|
|
40674
40691
|
// ---------------------------------------------------------------------------
|
|
40675
40692
|
// Command Handling
|
|
40676
40693
|
// ---------------------------------------------------------------------------
|
|
40677
|
-
allowDispatch(cmd) {
|
|
40678
|
-
switch (cmd.type) {
|
|
40679
|
-
case "ADD_RANGE":
|
|
40680
|
-
case "ADD_EMPTY_RANGE":
|
|
40681
|
-
if (this.inputHasSingleRange && this.ranges.length === 1) {
|
|
40682
|
-
return 31 /* CommandResult.MaximumRangesReached */;
|
|
40683
|
-
}
|
|
40684
|
-
break;
|
|
40685
|
-
case "REMOVE_RANGE":
|
|
40686
|
-
if (this.ranges.length === 1) {
|
|
40687
|
-
return 32 /* CommandResult.MinimumRangesReached */;
|
|
40688
|
-
}
|
|
40689
|
-
break;
|
|
40690
|
-
case "CHANGE_RANGE":
|
|
40691
|
-
if (this.inputHasSingleRange && cmd.value.split(",").length > 1) {
|
|
40692
|
-
return 31 /* CommandResult.MaximumRangesReached */;
|
|
40693
|
-
}
|
|
40694
|
-
break;
|
|
40695
|
-
}
|
|
40696
|
-
return 0 /* CommandResult.Success */;
|
|
40697
|
-
}
|
|
40698
40694
|
handleEvent(event) {
|
|
40699
40695
|
const inputSheetId = this.activeSheet;
|
|
40700
40696
|
const sheetId = this.getters.getActiveSheetId();
|
|
@@ -40914,6 +40910,15 @@ class SelectionInputsManagerPlugin extends UIPlugin {
|
|
|
40914
40910
|
// Command Handling
|
|
40915
40911
|
// ---------------------------------------------------------------------------
|
|
40916
40912
|
allowDispatch(cmd) {
|
|
40913
|
+
switch (cmd.type) {
|
|
40914
|
+
case "FOCUS_RANGE":
|
|
40915
|
+
case "CHANGE_RANGE":
|
|
40916
|
+
case "ADD_EMPTY_RANGE":
|
|
40917
|
+
case "REMOVE_RANGE":
|
|
40918
|
+
if (!this.inputs[cmd.id]) {
|
|
40919
|
+
return 33 /* CommandResult.InvalidInputId */;
|
|
40920
|
+
}
|
|
40921
|
+
}
|
|
40917
40922
|
switch (cmd.type) {
|
|
40918
40923
|
case "FOCUS_RANGE":
|
|
40919
40924
|
const index = this.currentInput?.getIndex(cmd.rangeId);
|
|
@@ -40921,9 +40926,25 @@ class SelectionInputsManagerPlugin extends UIPlugin {
|
|
|
40921
40926
|
return 30 /* CommandResult.InputAlreadyFocused */;
|
|
40922
40927
|
}
|
|
40923
40928
|
break;
|
|
40924
|
-
|
|
40925
|
-
|
|
40926
|
-
|
|
40929
|
+
case "ADD_RANGE":
|
|
40930
|
+
case "ADD_EMPTY_RANGE":
|
|
40931
|
+
const input = this.inputs[cmd.id];
|
|
40932
|
+
if (input.inputHasSingleRange && input.ranges.length === 1) {
|
|
40933
|
+
return 31 /* CommandResult.MaximumRangesReached */;
|
|
40934
|
+
}
|
|
40935
|
+
break;
|
|
40936
|
+
case "REMOVE_RANGE":
|
|
40937
|
+
if (this.inputs[cmd.id].ranges.length === 1) {
|
|
40938
|
+
return 32 /* CommandResult.MinimumRangesReached */;
|
|
40939
|
+
}
|
|
40940
|
+
break;
|
|
40941
|
+
case "CHANGE_RANGE": {
|
|
40942
|
+
const input = this.inputs[cmd.id];
|
|
40943
|
+
if (input.inputHasSingleRange && cmd.value.split(",").length > 1) {
|
|
40944
|
+
return 31 /* CommandResult.MaximumRangesReached */;
|
|
40945
|
+
}
|
|
40946
|
+
break;
|
|
40947
|
+
}
|
|
40927
40948
|
}
|
|
40928
40949
|
return 0 /* CommandResult.Success */;
|
|
40929
40950
|
}
|
|
@@ -41053,7 +41074,7 @@ class SortPlugin extends UIPlugin {
|
|
|
41053
41074
|
/*Test the presence of single cells*/
|
|
41054
41075
|
const singleCells = positions(zone).some(({ col, row }) => !this.getters.isInMerge({ sheetId, col, row }));
|
|
41055
41076
|
if (singleCells) {
|
|
41056
|
-
return
|
|
41077
|
+
return 66 /* CommandResult.InvalidSortZone */;
|
|
41057
41078
|
}
|
|
41058
41079
|
return 0 /* CommandResult.Success */;
|
|
41059
41080
|
}
|
|
@@ -41072,7 +41093,7 @@ class SortPlugin extends UIPlugin {
|
|
|
41072
41093
|
];
|
|
41073
41094
|
return widthCurrent === widthFirst && heightCurrent === heightFirst;
|
|
41074
41095
|
})) {
|
|
41075
|
-
return
|
|
41096
|
+
return 66 /* CommandResult.InvalidSortZone */;
|
|
41076
41097
|
}
|
|
41077
41098
|
return 0 /* CommandResult.Success */;
|
|
41078
41099
|
}
|
|
@@ -41510,7 +41531,7 @@ class SheetUIPlugin extends UIPlugin {
|
|
|
41510
41531
|
const sheetId = "sheetId" in cmd ? cmd.sheetId : this.getters.tryGetActiveSheetId();
|
|
41511
41532
|
const zones = this.getters.getCommandZones(cmd);
|
|
41512
41533
|
if (!sheetId && zones.length > 0) {
|
|
41513
|
-
return
|
|
41534
|
+
return 95 /* CommandResult.NoActiveSheet */;
|
|
41514
41535
|
}
|
|
41515
41536
|
if (sheetId && zones.length > 0) {
|
|
41516
41537
|
return this.getters.checkZonesExistInSheet(sheetId, zones);
|
|
@@ -41992,13 +42013,13 @@ class SplitToColumnsPlugin extends UIPlugin {
|
|
|
41992
42013
|
}
|
|
41993
42014
|
checkSingleColSelected() {
|
|
41994
42015
|
if (!this.getters.isSingleColSelected()) {
|
|
41995
|
-
return
|
|
42016
|
+
return 91 /* CommandResult.MoreThanOneColumnSelected */;
|
|
41996
42017
|
}
|
|
41997
42018
|
return 0 /* CommandResult.Success */;
|
|
41998
42019
|
}
|
|
41999
42020
|
checkNonEmptySelector(cmd) {
|
|
42000
42021
|
if (cmd.separator === "") {
|
|
42001
|
-
return
|
|
42022
|
+
return 92 /* CommandResult.EmptySplitSeparator */;
|
|
42002
42023
|
}
|
|
42003
42024
|
return 0 /* CommandResult.Success */;
|
|
42004
42025
|
}
|
|
@@ -42009,7 +42030,7 @@ class SplitToColumnsPlugin extends UIPlugin {
|
|
|
42009
42030
|
const selection = this.getters.getSelectedZones()[0];
|
|
42010
42031
|
const splitted = this.getSplittedCols(selection, cmd.separator);
|
|
42011
42032
|
if (this.willSplittedColsOverwriteContent(selection, splitted)) {
|
|
42012
|
-
return
|
|
42033
|
+
return 93 /* CommandResult.SplitWillOverwriteContent */;
|
|
42013
42034
|
}
|
|
42014
42035
|
return 0 /* CommandResult.Success */;
|
|
42015
42036
|
}
|
|
@@ -42020,7 +42041,7 @@ class SplitToColumnsPlugin extends UIPlugin {
|
|
|
42020
42041
|
return 0 /* CommandResult.Success */;
|
|
42021
42042
|
}
|
|
42022
42043
|
}
|
|
42023
|
-
return
|
|
42044
|
+
return 94 /* CommandResult.NoSplitSeparatorInSelection */;
|
|
42024
42045
|
}
|
|
42025
42046
|
}
|
|
42026
42047
|
|
|
@@ -42168,7 +42189,7 @@ class ClipboardCellsState extends ClipboardCellsAbstractState {
|
|
|
42168
42189
|
for (const zone of this.getPasteZones(target)) {
|
|
42169
42190
|
if ((zone.left < xSplit && zone.right >= xSplit) ||
|
|
42170
42191
|
(zone.top < ySplit && zone.bottom >= ySplit)) {
|
|
42171
|
-
return
|
|
42192
|
+
return 78 /* CommandResult.FrozenPaneOverlap */;
|
|
42172
42193
|
}
|
|
42173
42194
|
}
|
|
42174
42195
|
return 0 /* CommandResult.Success */;
|
|
@@ -42620,7 +42641,7 @@ class ClipboardFigureState {
|
|
|
42620
42641
|
}
|
|
42621
42642
|
isPasteAllowed(target, option) {
|
|
42622
42643
|
if (target.length === 0) {
|
|
42623
|
-
return
|
|
42644
|
+
return 76 /* CommandResult.EmptyTarget */;
|
|
42624
42645
|
}
|
|
42625
42646
|
if (option?.pasteOption !== undefined) {
|
|
42626
42647
|
return 23 /* CommandResult.WrongFigurePasteOption */;
|
|
@@ -42853,7 +42874,7 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
42853
42874
|
}
|
|
42854
42875
|
case "ACTIVATE_PAINT_FORMAT": {
|
|
42855
42876
|
if (this.paintFormatStatus !== "inactive") {
|
|
42856
|
-
return
|
|
42877
|
+
return 97 /* CommandResult.AlreadyInPaintingFormatMode */;
|
|
42857
42878
|
}
|
|
42858
42879
|
}
|
|
42859
42880
|
}
|
|
@@ -43431,7 +43452,7 @@ class EditionPlugin extends UIPlugin {
|
|
|
43431
43452
|
validateSelection(length, start, end) {
|
|
43432
43453
|
return start >= 0 && start <= length && end >= 0 && end <= length
|
|
43433
43454
|
? 0 /* CommandResult.Success */
|
|
43434
|
-
:
|
|
43455
|
+
: 49 /* CommandResult.WrongComposerSelection */;
|
|
43435
43456
|
}
|
|
43436
43457
|
onColumnsRemoved(cmd) {
|
|
43437
43458
|
if (cmd.elements.includes(this.col) && this.mode !== "inactive") {
|
|
@@ -43743,9 +43764,10 @@ class EditionPlugin extends UIPlugin {
|
|
|
43743
43764
|
*/
|
|
43744
43765
|
getReferencedRanges() {
|
|
43745
43766
|
const editionSheetId = this.getters.getCurrentEditedCell().sheetId;
|
|
43746
|
-
|
|
43767
|
+
const referenceRanges = this.currentTokens
|
|
43747
43768
|
.filter((token) => token.type === "REFERENCE")
|
|
43748
43769
|
.map((token) => this.getters.getRangeFromSheetXC(editionSheetId, token.value));
|
|
43770
|
+
return referenceRanges.filter((range) => !range.invalidSheetName && !range.invalidXc);
|
|
43749
43771
|
}
|
|
43750
43772
|
/**
|
|
43751
43773
|
* Function used to determine when composer selection can start.
|
|
@@ -43812,7 +43834,7 @@ class FilterEvaluationPlugin extends UIPlugin {
|
|
|
43812
43834
|
switch (cmd.type) {
|
|
43813
43835
|
case "UPDATE_FILTER":
|
|
43814
43836
|
if (!this.getters.getFilterId(cmd)) {
|
|
43815
|
-
return
|
|
43837
|
+
return 82 /* CommandResult.FilterNotFound */;
|
|
43816
43838
|
}
|
|
43817
43839
|
break;
|
|
43818
43840
|
}
|
|
@@ -44607,7 +44629,7 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
44607
44629
|
const headers = [cmd.base, ...cmd.elements];
|
|
44608
44630
|
const maxHeaderValue = isCol ? this.getters.getNumberCols(id) : this.getters.getNumberRows(id);
|
|
44609
44631
|
if (headers.some((h) => h < 0 || h >= maxHeaderValue)) {
|
|
44610
|
-
return
|
|
44632
|
+
return 89 /* CommandResult.InvalidHeaderIndex */;
|
|
44611
44633
|
}
|
|
44612
44634
|
return 0 /* CommandResult.Success */;
|
|
44613
44635
|
}
|
|
@@ -45423,7 +45445,7 @@ class SheetViewPlugin extends UIPlugin {
|
|
|
45423
45445
|
}
|
|
45424
45446
|
checkPositiveDimension(cmd) {
|
|
45425
45447
|
if (cmd.width < 0 || cmd.height < 0) {
|
|
45426
|
-
return
|
|
45448
|
+
return 71 /* CommandResult.InvalidViewportSize */;
|
|
45427
45449
|
}
|
|
45428
45450
|
return 0 /* CommandResult.Success */;
|
|
45429
45451
|
}
|
|
@@ -45433,7 +45455,7 @@ class SheetViewPlugin extends UIPlugin {
|
|
|
45433
45455
|
cmd.gridOffsetY === this.gridOffsetY &&
|
|
45434
45456
|
cmd.width === width &&
|
|
45435
45457
|
cmd.height === height) {
|
|
45436
|
-
return
|
|
45458
|
+
return 79 /* CommandResult.ValuesNotChanged */;
|
|
45437
45459
|
}
|
|
45438
45460
|
return 0 /* CommandResult.Success */;
|
|
45439
45461
|
}
|
|
@@ -45441,7 +45463,7 @@ class SheetViewPlugin extends UIPlugin {
|
|
|
45441
45463
|
const pane = this.getMainInternalViewport(this.getters.getActiveSheetId());
|
|
45442
45464
|
if ((!pane.canScrollHorizontally && offsetX > 0) ||
|
|
45443
45465
|
(!pane.canScrollVertically && offsetY > 0)) {
|
|
45444
|
-
return
|
|
45466
|
+
return 72 /* CommandResult.InvalidScrollingDirection */;
|
|
45445
45467
|
}
|
|
45446
45468
|
return 0 /* CommandResult.Success */;
|
|
45447
45469
|
}
|
|
@@ -48900,7 +48922,7 @@ class SelectionStreamProcessorImpl {
|
|
|
48900
48922
|
*/
|
|
48901
48923
|
moveAnchorCell(direction, step = 1) {
|
|
48902
48924
|
if (step !== "end" && step <= 0) {
|
|
48903
|
-
return new DispatchResult(
|
|
48925
|
+
return new DispatchResult(86 /* CommandResult.InvalidSelectionStep */);
|
|
48904
48926
|
}
|
|
48905
48927
|
const { col, row } = this.getNextAvailablePosition(direction, step);
|
|
48906
48928
|
return this.selectCell(col, row);
|
|
@@ -48946,7 +48968,7 @@ class SelectionStreamProcessorImpl {
|
|
|
48946
48968
|
*/
|
|
48947
48969
|
resizeAnchorZone(direction, step = 1) {
|
|
48948
48970
|
if (step !== "end" && step <= 0) {
|
|
48949
|
-
return new DispatchResult(
|
|
48971
|
+
return new DispatchResult(86 /* CommandResult.InvalidSelectionStep */);
|
|
48950
48972
|
}
|
|
48951
48973
|
const sheetId = this.getters.getActiveSheetId();
|
|
48952
48974
|
const anchor = this.anchor;
|
|
@@ -49784,12 +49806,7 @@ function addFormula(cell) {
|
|
|
49784
49806
|
attrs.push(["t", "str"]);
|
|
49785
49807
|
cycle = escapeXml /*xml*/ `<v>${cell.value}</v>`;
|
|
49786
49808
|
}
|
|
49787
|
-
node = escapeXml /*xml*/ `
|
|
49788
|
-
<f>
|
|
49789
|
-
${XlsxFormula}
|
|
49790
|
-
</f>
|
|
49791
|
-
${cycle}
|
|
49792
|
-
`;
|
|
49809
|
+
node = escapeXml /*xml*/ ` <f> ${XlsxFormula} </f> ${cycle} `;
|
|
49793
49810
|
return { attrs, node };
|
|
49794
49811
|
}
|
|
49795
49812
|
function addContent(content, sharedStrings, forceString = false) {
|
|
@@ -50608,11 +50625,10 @@ function addRows(construct, data, sheet) {
|
|
|
50608
50625
|
({ attrs: additionalAttrs, node: cellNode } = addContent(cell.content, construct.sharedStrings, isTableHeader));
|
|
50609
50626
|
}
|
|
50610
50627
|
attributes.push(...additionalAttrs);
|
|
50611
|
-
|
|
50612
|
-
|
|
50613
|
-
|
|
50614
|
-
|
|
50615
|
-
`);
|
|
50628
|
+
// prettier-ignore
|
|
50629
|
+
cellNodes.push(escapeXml /*xml*/ `<c ${formatAttributes(attributes)}>
|
|
50630
|
+
${cellNode}
|
|
50631
|
+
</c>`);
|
|
50616
50632
|
}
|
|
50617
50633
|
}
|
|
50618
50634
|
if (cellNodes.length || row.size !== DEFAULT_CELL_HEIGHT || row.isHidden) {
|
|
@@ -51303,10 +51319,10 @@ class Model extends EventBus {
|
|
|
51303
51319
|
const command = createCommand(type, payload);
|
|
51304
51320
|
let status = this.status;
|
|
51305
51321
|
if (this.getters.isReadonly() && !canExecuteInReadonly(command)) {
|
|
51306
|
-
return new DispatchResult(
|
|
51322
|
+
return new DispatchResult(70 /* CommandResult.Readonly */);
|
|
51307
51323
|
}
|
|
51308
51324
|
if (!this.session.canApplyOptimisticUpdate()) {
|
|
51309
|
-
return new DispatchResult(
|
|
51325
|
+
return new DispatchResult(67 /* CommandResult.WaitingSessionConfirmation */);
|
|
51310
51326
|
}
|
|
51311
51327
|
switch (status) {
|
|
51312
51328
|
case 0 /* Status.Ready */:
|
|
@@ -51561,6 +51577,6 @@ const constants = {
|
|
|
51561
51577
|
export { AbstractChart, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, compile, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, tokenize };
|
|
51562
51578
|
|
|
51563
51579
|
|
|
51564
|
-
__info__.version = '16.4.
|
|
51565
|
-
__info__.date = '2024-
|
|
51566
|
-
__info__.hash = '
|
|
51580
|
+
__info__.version = '16.4.21';
|
|
51581
|
+
__info__.date = '2024-02-02T13:45:48.276Z';
|
|
51582
|
+
__info__.hash = '73662b1';
|