@odoo/o-spreadsheet 16.0.8 → 16.0.9
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.
|
@@ -3273,6 +3273,8 @@ exports.CommandResult = void 0;
|
|
|
3273
3273
|
CommandResult[CommandResult["InvalidSelectionStep"] = 82] = "InvalidSelectionStep";
|
|
3274
3274
|
CommandResult[CommandResult["DuplicatedChartId"] = 83] = "DuplicatedChartId";
|
|
3275
3275
|
CommandResult[CommandResult["ChartDoesNotExist"] = 84] = "ChartDoesNotExist";
|
|
3276
|
+
CommandResult[CommandResult["InvalidHeaderIndex"] = 85] = "InvalidHeaderIndex";
|
|
3277
|
+
CommandResult[CommandResult["InvalidQuantity"] = 86] = "InvalidQuantity";
|
|
3276
3278
|
})(exports.CommandResult || (exports.CommandResult = {}));
|
|
3277
3279
|
|
|
3278
3280
|
var DIRECTION;
|
|
@@ -17411,7 +17413,7 @@ const POW = {
|
|
|
17411
17413
|
base (number) ${_lt("The number to raise to the exponent power.")}
|
|
17412
17414
|
exponent (number) ${_lt("The exponent to raise base to.")}
|
|
17413
17415
|
`),
|
|
17414
|
-
returns: ["
|
|
17416
|
+
returns: ["NUMBER"],
|
|
17415
17417
|
compute: function (base, exponent) {
|
|
17416
17418
|
return POWER.compute(base, exponent);
|
|
17417
17419
|
},
|
|
@@ -24355,7 +24357,7 @@ function extractStyle(cell, data) {
|
|
|
24355
24357
|
if (cell.style) {
|
|
24356
24358
|
style = data.styles[cell.style];
|
|
24357
24359
|
}
|
|
24358
|
-
const format = cell
|
|
24360
|
+
const format = extractFormat(cell, data);
|
|
24359
24361
|
const exportedBorder = {};
|
|
24360
24362
|
if (cell.border) {
|
|
24361
24363
|
const border = data.borders[cell.border];
|
|
@@ -24389,6 +24391,22 @@ function extractStyle(cell, data) {
|
|
|
24389
24391
|
styles.font["italic"] = !!(style === null || style === void 0 ? void 0 : style.italic) || undefined;
|
|
24390
24392
|
return styles;
|
|
24391
24393
|
}
|
|
24394
|
+
function extractFormat(cell, data) {
|
|
24395
|
+
if (cell.format) {
|
|
24396
|
+
return data.formats[cell.format];
|
|
24397
|
+
}
|
|
24398
|
+
if (cell.isFormula) {
|
|
24399
|
+
const tokens = tokenize(cell.content || "");
|
|
24400
|
+
const functions = functionRegistry.content;
|
|
24401
|
+
const isExported = tokens
|
|
24402
|
+
.filter((tk) => tk.type === "FUNCTION")
|
|
24403
|
+
.every((tk) => functions[tk.value.toUpperCase()].isExported);
|
|
24404
|
+
if (!isExported) {
|
|
24405
|
+
return cell.computedFormat;
|
|
24406
|
+
}
|
|
24407
|
+
}
|
|
24408
|
+
return undefined;
|
|
24409
|
+
}
|
|
24392
24410
|
function normalizeStyle(construct, styles) {
|
|
24393
24411
|
const { id: fontId } = pushElement(styles["font"], construct.fonts);
|
|
24394
24412
|
const { id: fillId } = pushElement(styles["fill"], construct.fills);
|
|
@@ -27611,6 +27629,9 @@ class CellPlugin extends CorePlugin {
|
|
|
27611
27629
|
const exportedCellData = sheet.cells[xc];
|
|
27612
27630
|
exportedCellData.value = cell.evaluated.value;
|
|
27613
27631
|
exportedCellData.isFormula = cell.isFormula();
|
|
27632
|
+
if (cell.format !== cell.evaluated.format) {
|
|
27633
|
+
exportedCellData.computedFormat = cell.evaluated.format;
|
|
27634
|
+
}
|
|
27614
27635
|
}
|
|
27615
27636
|
}
|
|
27616
27637
|
}
|
|
@@ -29063,9 +29084,16 @@ class HeaderVisibilityPlugin extends CorePlugin {
|
|
|
29063
29084
|
const elements = cmd.dimension === "COL"
|
|
29064
29085
|
? this.getters.getNumberCols(cmd.sheetId)
|
|
29065
29086
|
: this.getters.getNumberRows(cmd.sheetId);
|
|
29066
|
-
|
|
29067
|
-
|
|
29068
|
-
|
|
29087
|
+
const hiddenElements = new Set((hiddenGroup || []).flat().concat(cmd.elements));
|
|
29088
|
+
if (hiddenElements.size >= elements) {
|
|
29089
|
+
return 65 /* CommandResult.TooManyHiddenElements */;
|
|
29090
|
+
}
|
|
29091
|
+
else if (Math.min(...cmd.elements) < 0 || Math.max(...cmd.elements) > elements) {
|
|
29092
|
+
return 85 /* CommandResult.InvalidHeaderIndex */;
|
|
29093
|
+
}
|
|
29094
|
+
else {
|
|
29095
|
+
return 0 /* CommandResult.Success */;
|
|
29096
|
+
}
|
|
29069
29097
|
}
|
|
29070
29098
|
case "REMOVE_COLUMNS_ROWS":
|
|
29071
29099
|
if (!this.getters.tryGetSheet(cmd.sheetId)) {
|
|
@@ -29720,6 +29748,28 @@ class SheetPlugin extends CorePlugin {
|
|
|
29720
29748
|
return this.orderedSheetIds.length > 1
|
|
29721
29749
|
? 0 /* CommandResult.Success */
|
|
29722
29750
|
: 9 /* CommandResult.NotEnoughSheets */;
|
|
29751
|
+
case "ADD_COLUMNS_ROWS":
|
|
29752
|
+
const elements = cmd.dimension === "COL"
|
|
29753
|
+
? this.getNumberCols(cmd.sheetId)
|
|
29754
|
+
: this.getNumberRows(cmd.sheetId);
|
|
29755
|
+
if (cmd.base < 0 || cmd.base > elements) {
|
|
29756
|
+
return 85 /* CommandResult.InvalidHeaderIndex */;
|
|
29757
|
+
}
|
|
29758
|
+
else if (cmd.quantity <= 0) {
|
|
29759
|
+
return 86 /* CommandResult.InvalidQuantity */;
|
|
29760
|
+
}
|
|
29761
|
+
return 0 /* CommandResult.Success */;
|
|
29762
|
+
case "REMOVE_COLUMNS_ROWS": {
|
|
29763
|
+
const elements = cmd.dimension === "COL"
|
|
29764
|
+
? this.getNumberCols(cmd.sheetId)
|
|
29765
|
+
: this.getNumberRows(cmd.sheetId);
|
|
29766
|
+
if (Math.min(...cmd.elements) < 0 || Math.max(...cmd.elements) > elements) {
|
|
29767
|
+
return 85 /* CommandResult.InvalidHeaderIndex */;
|
|
29768
|
+
}
|
|
29769
|
+
else {
|
|
29770
|
+
return 0 /* CommandResult.Success */;
|
|
29771
|
+
}
|
|
29772
|
+
}
|
|
29723
29773
|
case "FREEZE_ROWS": {
|
|
29724
29774
|
return this.checkValidations(cmd, this.checkRowFreezeQuantity, this.checkRowFreezeOverlapMerge);
|
|
29725
29775
|
}
|
|
@@ -41167,12 +41217,9 @@ function addFormula(cell) {
|
|
|
41167
41217
|
else {
|
|
41168
41218
|
// Shouldn't we always output the value then ?
|
|
41169
41219
|
const value = cell.value;
|
|
41170
|
-
|
|
41171
|
-
|
|
41172
|
-
|
|
41173
|
-
attrs.push(["t", type]);
|
|
41174
|
-
node = escapeXml /*xml*/ `<v>${value}</v>`;
|
|
41175
|
-
}
|
|
41220
|
+
const type = getCellType(value);
|
|
41221
|
+
attrs.push(["t", type]);
|
|
41222
|
+
node = escapeXml /*xml*/ `<v>${value}</v>`;
|
|
41176
41223
|
return { attrs, node };
|
|
41177
41224
|
}
|
|
41178
41225
|
}
|
|
@@ -42732,6 +42779,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
42732
42779
|
exports.tokenize = tokenize;
|
|
42733
42780
|
|
|
42734
42781
|
|
|
42735
|
-
__info__.version = '16.0.
|
|
42736
|
-
__info__.date = '2023-04-
|
|
42737
|
-
__info__.hash = '
|
|
42782
|
+
__info__.version = '16.0.9';
|
|
42783
|
+
__info__.date = '2023-04-28T12:25:41.572Z';
|
|
42784
|
+
__info__.hash = 'e06ca83';
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -818,6 +818,7 @@ interface ExcelWorkbookData extends WorkbookData {
|
|
|
818
818
|
interface ExcelCellData extends CellData {
|
|
819
819
|
value: CellValue;
|
|
820
820
|
isFormula: Boolean;
|
|
821
|
+
computedFormat?: Format;
|
|
821
822
|
}
|
|
822
823
|
interface ExcelSheetData extends Omit<SheetData, "figureTables"> {
|
|
823
824
|
cells: {
|
|
@@ -2178,7 +2179,9 @@ declare const enum CommandResult {
|
|
|
2178
2179
|
DuplicatedFigureId = 81,
|
|
2179
2180
|
InvalidSelectionStep = 82,
|
|
2180
2181
|
DuplicatedChartId = 83,
|
|
2181
|
-
ChartDoesNotExist = 84
|
|
2182
|
+
ChartDoesNotExist = 84,
|
|
2183
|
+
InvalidHeaderIndex = 85,
|
|
2184
|
+
InvalidQuantity = 86
|
|
2182
2185
|
}
|
|
2183
2186
|
interface CommandHandler<T> {
|
|
2184
2187
|
allowDispatch(command: T): CommandResult | CommandResult[];
|
|
@@ -3389,7 +3392,7 @@ declare class HeaderSizePlugin extends CorePlugin<HeaderSizeState> implements He
|
|
|
3389
3392
|
declare class HeaderVisibilityPlugin extends CorePlugin {
|
|
3390
3393
|
static getters: readonly ["canRemoveHeaders", "getHiddenColsGroups", "getHiddenRowsGroups", "isRowHiddenByUser", "isColHiddenByUser"];
|
|
3391
3394
|
private readonly hiddenHeaders;
|
|
3392
|
-
allowDispatch(cmd: Command): CommandResult.Success | CommandResult.NotEnoughElements | CommandResult.InvalidSheetId | CommandResult.TooManyHiddenElements;
|
|
3395
|
+
allowDispatch(cmd: Command): CommandResult.Success | CommandResult.NotEnoughElements | CommandResult.InvalidSheetId | CommandResult.TooManyHiddenElements | CommandResult.InvalidHeaderIndex;
|
|
3393
3396
|
handle(cmd: Command): void;
|
|
3394
3397
|
canRemoveHeaders(sheetId: UID, dimension: Dimension, elements: HeaderIndex[]): boolean;
|
|
3395
3398
|
isRowHiddenByUser(sheetId: UID, index: HeaderIndex): boolean;
|
|
@@ -3269,6 +3269,8 @@ var CommandResult;
|
|
|
3269
3269
|
CommandResult[CommandResult["InvalidSelectionStep"] = 82] = "InvalidSelectionStep";
|
|
3270
3270
|
CommandResult[CommandResult["DuplicatedChartId"] = 83] = "DuplicatedChartId";
|
|
3271
3271
|
CommandResult[CommandResult["ChartDoesNotExist"] = 84] = "ChartDoesNotExist";
|
|
3272
|
+
CommandResult[CommandResult["InvalidHeaderIndex"] = 85] = "InvalidHeaderIndex";
|
|
3273
|
+
CommandResult[CommandResult["InvalidQuantity"] = 86] = "InvalidQuantity";
|
|
3272
3274
|
})(CommandResult || (CommandResult = {}));
|
|
3273
3275
|
|
|
3274
3276
|
var DIRECTION;
|
|
@@ -17407,7 +17409,7 @@ const POW = {
|
|
|
17407
17409
|
base (number) ${_lt("The number to raise to the exponent power.")}
|
|
17408
17410
|
exponent (number) ${_lt("The exponent to raise base to.")}
|
|
17409
17411
|
`),
|
|
17410
|
-
returns: ["
|
|
17412
|
+
returns: ["NUMBER"],
|
|
17411
17413
|
compute: function (base, exponent) {
|
|
17412
17414
|
return POWER.compute(base, exponent);
|
|
17413
17415
|
},
|
|
@@ -24351,7 +24353,7 @@ function extractStyle(cell, data) {
|
|
|
24351
24353
|
if (cell.style) {
|
|
24352
24354
|
style = data.styles[cell.style];
|
|
24353
24355
|
}
|
|
24354
|
-
const format = cell
|
|
24356
|
+
const format = extractFormat(cell, data);
|
|
24355
24357
|
const exportedBorder = {};
|
|
24356
24358
|
if (cell.border) {
|
|
24357
24359
|
const border = data.borders[cell.border];
|
|
@@ -24385,6 +24387,22 @@ function extractStyle(cell, data) {
|
|
|
24385
24387
|
styles.font["italic"] = !!(style === null || style === void 0 ? void 0 : style.italic) || undefined;
|
|
24386
24388
|
return styles;
|
|
24387
24389
|
}
|
|
24390
|
+
function extractFormat(cell, data) {
|
|
24391
|
+
if (cell.format) {
|
|
24392
|
+
return data.formats[cell.format];
|
|
24393
|
+
}
|
|
24394
|
+
if (cell.isFormula) {
|
|
24395
|
+
const tokens = tokenize(cell.content || "");
|
|
24396
|
+
const functions = functionRegistry.content;
|
|
24397
|
+
const isExported = tokens
|
|
24398
|
+
.filter((tk) => tk.type === "FUNCTION")
|
|
24399
|
+
.every((tk) => functions[tk.value.toUpperCase()].isExported);
|
|
24400
|
+
if (!isExported) {
|
|
24401
|
+
return cell.computedFormat;
|
|
24402
|
+
}
|
|
24403
|
+
}
|
|
24404
|
+
return undefined;
|
|
24405
|
+
}
|
|
24388
24406
|
function normalizeStyle(construct, styles) {
|
|
24389
24407
|
const { id: fontId } = pushElement(styles["font"], construct.fonts);
|
|
24390
24408
|
const { id: fillId } = pushElement(styles["fill"], construct.fills);
|
|
@@ -27607,6 +27625,9 @@ class CellPlugin extends CorePlugin {
|
|
|
27607
27625
|
const exportedCellData = sheet.cells[xc];
|
|
27608
27626
|
exportedCellData.value = cell.evaluated.value;
|
|
27609
27627
|
exportedCellData.isFormula = cell.isFormula();
|
|
27628
|
+
if (cell.format !== cell.evaluated.format) {
|
|
27629
|
+
exportedCellData.computedFormat = cell.evaluated.format;
|
|
27630
|
+
}
|
|
27610
27631
|
}
|
|
27611
27632
|
}
|
|
27612
27633
|
}
|
|
@@ -29059,9 +29080,16 @@ class HeaderVisibilityPlugin extends CorePlugin {
|
|
|
29059
29080
|
const elements = cmd.dimension === "COL"
|
|
29060
29081
|
? this.getters.getNumberCols(cmd.sheetId)
|
|
29061
29082
|
: this.getters.getNumberRows(cmd.sheetId);
|
|
29062
|
-
|
|
29063
|
-
|
|
29064
|
-
|
|
29083
|
+
const hiddenElements = new Set((hiddenGroup || []).flat().concat(cmd.elements));
|
|
29084
|
+
if (hiddenElements.size >= elements) {
|
|
29085
|
+
return 65 /* CommandResult.TooManyHiddenElements */;
|
|
29086
|
+
}
|
|
29087
|
+
else if (Math.min(...cmd.elements) < 0 || Math.max(...cmd.elements) > elements) {
|
|
29088
|
+
return 85 /* CommandResult.InvalidHeaderIndex */;
|
|
29089
|
+
}
|
|
29090
|
+
else {
|
|
29091
|
+
return 0 /* CommandResult.Success */;
|
|
29092
|
+
}
|
|
29065
29093
|
}
|
|
29066
29094
|
case "REMOVE_COLUMNS_ROWS":
|
|
29067
29095
|
if (!this.getters.tryGetSheet(cmd.sheetId)) {
|
|
@@ -29716,6 +29744,28 @@ class SheetPlugin extends CorePlugin {
|
|
|
29716
29744
|
return this.orderedSheetIds.length > 1
|
|
29717
29745
|
? 0 /* CommandResult.Success */
|
|
29718
29746
|
: 9 /* CommandResult.NotEnoughSheets */;
|
|
29747
|
+
case "ADD_COLUMNS_ROWS":
|
|
29748
|
+
const elements = cmd.dimension === "COL"
|
|
29749
|
+
? this.getNumberCols(cmd.sheetId)
|
|
29750
|
+
: this.getNumberRows(cmd.sheetId);
|
|
29751
|
+
if (cmd.base < 0 || cmd.base > elements) {
|
|
29752
|
+
return 85 /* CommandResult.InvalidHeaderIndex */;
|
|
29753
|
+
}
|
|
29754
|
+
else if (cmd.quantity <= 0) {
|
|
29755
|
+
return 86 /* CommandResult.InvalidQuantity */;
|
|
29756
|
+
}
|
|
29757
|
+
return 0 /* CommandResult.Success */;
|
|
29758
|
+
case "REMOVE_COLUMNS_ROWS": {
|
|
29759
|
+
const elements = cmd.dimension === "COL"
|
|
29760
|
+
? this.getNumberCols(cmd.sheetId)
|
|
29761
|
+
: this.getNumberRows(cmd.sheetId);
|
|
29762
|
+
if (Math.min(...cmd.elements) < 0 || Math.max(...cmd.elements) > elements) {
|
|
29763
|
+
return 85 /* CommandResult.InvalidHeaderIndex */;
|
|
29764
|
+
}
|
|
29765
|
+
else {
|
|
29766
|
+
return 0 /* CommandResult.Success */;
|
|
29767
|
+
}
|
|
29768
|
+
}
|
|
29719
29769
|
case "FREEZE_ROWS": {
|
|
29720
29770
|
return this.checkValidations(cmd, this.checkRowFreezeQuantity, this.checkRowFreezeOverlapMerge);
|
|
29721
29771
|
}
|
|
@@ -41163,12 +41213,9 @@ function addFormula(cell) {
|
|
|
41163
41213
|
else {
|
|
41164
41214
|
// Shouldn't we always output the value then ?
|
|
41165
41215
|
const value = cell.value;
|
|
41166
|
-
|
|
41167
|
-
|
|
41168
|
-
|
|
41169
|
-
attrs.push(["t", type]);
|
|
41170
|
-
node = escapeXml /*xml*/ `<v>${value}</v>`;
|
|
41171
|
-
}
|
|
41216
|
+
const type = getCellType(value);
|
|
41217
|
+
attrs.push(["t", type]);
|
|
41218
|
+
node = escapeXml /*xml*/ `<v>${value}</v>`;
|
|
41172
41219
|
return { attrs, node };
|
|
41173
41220
|
}
|
|
41174
41221
|
}
|
|
@@ -42700,6 +42747,6 @@ function addFunction(functionName, functionDescription) {
|
|
|
42700
42747
|
export { AbstractChart, CommandResult, CorePlugin, DATETIME_FORMAT, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, cellTypes, compile, components, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, invalidateEvaluationCommands, load, parse, readonlyAllowedCommands, registries, setTranslationMethod, tokenize };
|
|
42701
42748
|
|
|
42702
42749
|
|
|
42703
|
-
__info__.version = '16.0.
|
|
42704
|
-
__info__.date = '2023-04-
|
|
42705
|
-
__info__.hash = '
|
|
42750
|
+
__info__.version = '16.0.9';
|
|
42751
|
+
__info__.date = '2023-04-28T12:25:41.572Z';
|
|
42752
|
+
__info__.hash = 'e06ca83';
|
|
@@ -3270,6 +3270,8 @@
|
|
|
3270
3270
|
CommandResult[CommandResult["InvalidSelectionStep"] = 82] = "InvalidSelectionStep";
|
|
3271
3271
|
CommandResult[CommandResult["DuplicatedChartId"] = 83] = "DuplicatedChartId";
|
|
3272
3272
|
CommandResult[CommandResult["ChartDoesNotExist"] = 84] = "ChartDoesNotExist";
|
|
3273
|
+
CommandResult[CommandResult["InvalidHeaderIndex"] = 85] = "InvalidHeaderIndex";
|
|
3274
|
+
CommandResult[CommandResult["InvalidQuantity"] = 86] = "InvalidQuantity";
|
|
3273
3275
|
})(exports.CommandResult || (exports.CommandResult = {}));
|
|
3274
3276
|
|
|
3275
3277
|
var DIRECTION;
|
|
@@ -17408,7 +17410,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
17408
17410
|
base (number) ${_lt("The number to raise to the exponent power.")}
|
|
17409
17411
|
exponent (number) ${_lt("The exponent to raise base to.")}
|
|
17410
17412
|
`),
|
|
17411
|
-
returns: ["
|
|
17413
|
+
returns: ["NUMBER"],
|
|
17412
17414
|
compute: function (base, exponent) {
|
|
17413
17415
|
return POWER.compute(base, exponent);
|
|
17414
17416
|
},
|
|
@@ -24352,7 +24354,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
24352
24354
|
if (cell.style) {
|
|
24353
24355
|
style = data.styles[cell.style];
|
|
24354
24356
|
}
|
|
24355
|
-
const format = cell
|
|
24357
|
+
const format = extractFormat(cell, data);
|
|
24356
24358
|
const exportedBorder = {};
|
|
24357
24359
|
if (cell.border) {
|
|
24358
24360
|
const border = data.borders[cell.border];
|
|
@@ -24386,6 +24388,22 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
24386
24388
|
styles.font["italic"] = !!(style === null || style === void 0 ? void 0 : style.italic) || undefined;
|
|
24387
24389
|
return styles;
|
|
24388
24390
|
}
|
|
24391
|
+
function extractFormat(cell, data) {
|
|
24392
|
+
if (cell.format) {
|
|
24393
|
+
return data.formats[cell.format];
|
|
24394
|
+
}
|
|
24395
|
+
if (cell.isFormula) {
|
|
24396
|
+
const tokens = tokenize(cell.content || "");
|
|
24397
|
+
const functions = functionRegistry.content;
|
|
24398
|
+
const isExported = tokens
|
|
24399
|
+
.filter((tk) => tk.type === "FUNCTION")
|
|
24400
|
+
.every((tk) => functions[tk.value.toUpperCase()].isExported);
|
|
24401
|
+
if (!isExported) {
|
|
24402
|
+
return cell.computedFormat;
|
|
24403
|
+
}
|
|
24404
|
+
}
|
|
24405
|
+
return undefined;
|
|
24406
|
+
}
|
|
24389
24407
|
function normalizeStyle(construct, styles) {
|
|
24390
24408
|
const { id: fontId } = pushElement(styles["font"], construct.fonts);
|
|
24391
24409
|
const { id: fillId } = pushElement(styles["fill"], construct.fills);
|
|
@@ -27608,6 +27626,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
27608
27626
|
const exportedCellData = sheet.cells[xc];
|
|
27609
27627
|
exportedCellData.value = cell.evaluated.value;
|
|
27610
27628
|
exportedCellData.isFormula = cell.isFormula();
|
|
27629
|
+
if (cell.format !== cell.evaluated.format) {
|
|
27630
|
+
exportedCellData.computedFormat = cell.evaluated.format;
|
|
27631
|
+
}
|
|
27611
27632
|
}
|
|
27612
27633
|
}
|
|
27613
27634
|
}
|
|
@@ -29060,9 +29081,16 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
29060
29081
|
const elements = cmd.dimension === "COL"
|
|
29061
29082
|
? this.getters.getNumberCols(cmd.sheetId)
|
|
29062
29083
|
: this.getters.getNumberRows(cmd.sheetId);
|
|
29063
|
-
|
|
29064
|
-
|
|
29065
|
-
|
|
29084
|
+
const hiddenElements = new Set((hiddenGroup || []).flat().concat(cmd.elements));
|
|
29085
|
+
if (hiddenElements.size >= elements) {
|
|
29086
|
+
return 65 /* CommandResult.TooManyHiddenElements */;
|
|
29087
|
+
}
|
|
29088
|
+
else if (Math.min(...cmd.elements) < 0 || Math.max(...cmd.elements) > elements) {
|
|
29089
|
+
return 85 /* CommandResult.InvalidHeaderIndex */;
|
|
29090
|
+
}
|
|
29091
|
+
else {
|
|
29092
|
+
return 0 /* CommandResult.Success */;
|
|
29093
|
+
}
|
|
29066
29094
|
}
|
|
29067
29095
|
case "REMOVE_COLUMNS_ROWS":
|
|
29068
29096
|
if (!this.getters.tryGetSheet(cmd.sheetId)) {
|
|
@@ -29717,6 +29745,28 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
29717
29745
|
return this.orderedSheetIds.length > 1
|
|
29718
29746
|
? 0 /* CommandResult.Success */
|
|
29719
29747
|
: 9 /* CommandResult.NotEnoughSheets */;
|
|
29748
|
+
case "ADD_COLUMNS_ROWS":
|
|
29749
|
+
const elements = cmd.dimension === "COL"
|
|
29750
|
+
? this.getNumberCols(cmd.sheetId)
|
|
29751
|
+
: this.getNumberRows(cmd.sheetId);
|
|
29752
|
+
if (cmd.base < 0 || cmd.base > elements) {
|
|
29753
|
+
return 85 /* CommandResult.InvalidHeaderIndex */;
|
|
29754
|
+
}
|
|
29755
|
+
else if (cmd.quantity <= 0) {
|
|
29756
|
+
return 86 /* CommandResult.InvalidQuantity */;
|
|
29757
|
+
}
|
|
29758
|
+
return 0 /* CommandResult.Success */;
|
|
29759
|
+
case "REMOVE_COLUMNS_ROWS": {
|
|
29760
|
+
const elements = cmd.dimension === "COL"
|
|
29761
|
+
? this.getNumberCols(cmd.sheetId)
|
|
29762
|
+
: this.getNumberRows(cmd.sheetId);
|
|
29763
|
+
if (Math.min(...cmd.elements) < 0 || Math.max(...cmd.elements) > elements) {
|
|
29764
|
+
return 85 /* CommandResult.InvalidHeaderIndex */;
|
|
29765
|
+
}
|
|
29766
|
+
else {
|
|
29767
|
+
return 0 /* CommandResult.Success */;
|
|
29768
|
+
}
|
|
29769
|
+
}
|
|
29720
29770
|
case "FREEZE_ROWS": {
|
|
29721
29771
|
return this.checkValidations(cmd, this.checkRowFreezeQuantity, this.checkRowFreezeOverlapMerge);
|
|
29722
29772
|
}
|
|
@@ -41164,12 +41214,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
41164
41214
|
else {
|
|
41165
41215
|
// Shouldn't we always output the value then ?
|
|
41166
41216
|
const value = cell.value;
|
|
41167
|
-
|
|
41168
|
-
|
|
41169
|
-
|
|
41170
|
-
attrs.push(["t", type]);
|
|
41171
|
-
node = escapeXml /*xml*/ `<v>${value}</v>`;
|
|
41172
|
-
}
|
|
41217
|
+
const type = getCellType(value);
|
|
41218
|
+
attrs.push(["t", type]);
|
|
41219
|
+
node = escapeXml /*xml*/ `<v>${value}</v>`;
|
|
41173
41220
|
return { attrs, node };
|
|
41174
41221
|
}
|
|
41175
41222
|
}
|
|
@@ -42731,9 +42778,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
42731
42778
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
42732
42779
|
|
|
42733
42780
|
|
|
42734
|
-
__info__.version = '16.0.
|
|
42735
|
-
__info__.date = '2023-04-
|
|
42736
|
-
__info__.hash = '
|
|
42781
|
+
__info__.version = '16.0.9';
|
|
42782
|
+
__info__.date = '2023-04-28T12:25:41.572Z';
|
|
42783
|
+
__info__.hash = 'e06ca83';
|
|
42737
42784
|
|
|
42738
42785
|
|
|
42739
42786
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|