@odoo/o-spreadsheet 18.0.43 → 18.0.44
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.
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 18.0.
|
|
6
|
-
* @date 2025-09-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.0.44
|
|
6
|
+
* @date 2025-09-11T08:43:01.459Z
|
|
7
|
+
* @hash 7e6662c
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -6741,7 +6741,7 @@ class ClipboardHandler {
|
|
|
6741
6741
|
this.getters = getters;
|
|
6742
6742
|
this.dispatch = dispatch;
|
|
6743
6743
|
}
|
|
6744
|
-
copy(data) {
|
|
6744
|
+
copy(data, mode = "copyPaste") {
|
|
6745
6745
|
return;
|
|
6746
6746
|
}
|
|
6747
6747
|
paste(target, clippedContent, options) { }
|
|
@@ -6760,7 +6760,7 @@ class ClipboardHandler {
|
|
|
6760
6760
|
}
|
|
6761
6761
|
|
|
6762
6762
|
class AbstractCellClipboardHandler extends ClipboardHandler {
|
|
6763
|
-
copy(data) {
|
|
6763
|
+
copy(data, mode = "copyPaste") {
|
|
6764
6764
|
return;
|
|
6765
6765
|
}
|
|
6766
6766
|
pasteFromCopy(sheetId, target, content, options) {
|
|
@@ -8429,7 +8429,7 @@ class CellClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
8429
8429
|
}
|
|
8430
8430
|
return "Success" /* CommandResult.Success */;
|
|
8431
8431
|
}
|
|
8432
|
-
copy(data) {
|
|
8432
|
+
copy(data, mode = "copyPaste") {
|
|
8433
8433
|
const sheetId = data.sheetId;
|
|
8434
8434
|
const { clippedZones, rowsIndexes, columnsIndexes } = data;
|
|
8435
8435
|
const clippedCells = [];
|
|
@@ -8442,7 +8442,7 @@ class CellClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
8442
8442
|
const evaluatedCell = this.getters.getEvaluatedCell(position);
|
|
8443
8443
|
const pivotId = this.getters.getPivotIdFromPosition(position);
|
|
8444
8444
|
const spreader = this.getters.getArrayFormulaSpreadingOn(position);
|
|
8445
|
-
if (pivotId && spreader) {
|
|
8445
|
+
if (mode !== "shiftCells" && pivotId && spreader) {
|
|
8446
8446
|
const pivotZone = this.getters.getSpreadZone(spreader);
|
|
8447
8447
|
if ((!deepEquals(spreader, position) || !isCopyingOneCell) &&
|
|
8448
8448
|
pivotZone &&
|
|
@@ -8460,7 +8460,7 @@ class CellClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
8460
8460
|
};
|
|
8461
8461
|
}
|
|
8462
8462
|
}
|
|
8463
|
-
else {
|
|
8463
|
+
else if (mode !== "shiftCells") {
|
|
8464
8464
|
if (spreader && !deepEquals(spreader, position)) {
|
|
8465
8465
|
const isSpreaderCopied = rowsIndexes.includes(spreader.row) && columnsIndexes.includes(spreader.col);
|
|
8466
8466
|
const content = isSpreaderCopied
|
|
@@ -9153,7 +9153,7 @@ class SheetClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
9153
9153
|
}
|
|
9154
9154
|
|
|
9155
9155
|
class TableClipboardHandler extends AbstractCellClipboardHandler {
|
|
9156
|
-
copy(data) {
|
|
9156
|
+
copy(data, mode = "copyPaste") {
|
|
9157
9157
|
const sheetId = data.sheetId;
|
|
9158
9158
|
const { rowsIndexes, columnsIndexes, zones } = data;
|
|
9159
9159
|
const copiedTablesIds = new Set();
|
|
@@ -9187,11 +9187,13 @@ class TableClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
9187
9187
|
type: coreTable.type,
|
|
9188
9188
|
};
|
|
9189
9189
|
}
|
|
9190
|
-
|
|
9191
|
-
|
|
9192
|
-
|
|
9193
|
-
|
|
9194
|
-
|
|
9190
|
+
if (mode !== "shiftCells") {
|
|
9191
|
+
tableCellsInRow.push({
|
|
9192
|
+
table: copiedTable,
|
|
9193
|
+
style: this.getTableStyleToCopy(position),
|
|
9194
|
+
isWholeTableCopied: copiedTablesIds.has(table.id),
|
|
9195
|
+
});
|
|
9196
|
+
}
|
|
9195
9197
|
}
|
|
9196
9198
|
}
|
|
9197
9199
|
return {
|
|
@@ -20789,7 +20791,7 @@ const SUPPORTED_HORIZONTAL_ALIGNMENTS = [
|
|
|
20789
20791
|
];
|
|
20790
20792
|
const SUPPORTED_VERTICAL_ALIGNMENTS = ["top", "center", "bottom"];
|
|
20791
20793
|
const SUPPORTED_FONTS = ["Arial"];
|
|
20792
|
-
const SUPPORTED_FILL_PATTERNS = ["solid"];
|
|
20794
|
+
const SUPPORTED_FILL_PATTERNS = ["solid", "none"];
|
|
20793
20795
|
const SUPPORTED_CF_TYPES = [
|
|
20794
20796
|
"expression",
|
|
20795
20797
|
"cellIs",
|
|
@@ -20974,7 +20976,7 @@ const SUBTOTAL_FUNCTION_CONVERSION_MAP = {
|
|
|
20974
20976
|
};
|
|
20975
20977
|
/** Mapping between Excel format indexes (see XLSX_FORMAT_MAP) and some supported formats */
|
|
20976
20978
|
const XLSX_FORMATS_CONVERSION_MAP = {
|
|
20977
|
-
0: "",
|
|
20979
|
+
0: "General",
|
|
20978
20980
|
1: "0",
|
|
20979
20981
|
2: "0.00",
|
|
20980
20982
|
3: "#,#00",
|
|
@@ -21300,11 +21302,11 @@ const XLSX_DATE_FORMAT_REGEX = /^(yy|yyyy|m{1,5}|d{1,4}|h{1,2}|s{1,2}|am\/pm|a\/
|
|
|
21300
21302
|
* Excel format are defined in openXML §18.8.31
|
|
21301
21303
|
*/
|
|
21302
21304
|
function convertXlsxFormat(numFmtId, formats, warningManager) {
|
|
21303
|
-
if (numFmtId === 0) {
|
|
21304
|
-
return undefined;
|
|
21305
|
-
}
|
|
21306
21305
|
// Format is either defined in the imported data, or the formatId is defined in openXML §18.8.30
|
|
21307
21306
|
let format = XLSX_FORMATS_CONVERSION_MAP[numFmtId] || formats.find((f) => f.id === numFmtId)?.format;
|
|
21307
|
+
if (format === "General") {
|
|
21308
|
+
return undefined;
|
|
21309
|
+
}
|
|
21308
21310
|
if (format) {
|
|
21309
21311
|
try {
|
|
21310
21312
|
let convertedFormat = format.replace(/\[(.*)-[A-Z0-9]{3}\]/g, "[$1]"); // remove currency and locale/date system/number system info (ECMA §18.8.31)
|
|
@@ -24262,10 +24264,11 @@ class XlsxSheetExtractor extends XlsxBaseExtractor {
|
|
|
24262
24264
|
});
|
|
24263
24265
|
}
|
|
24264
24266
|
extractRows(worksheet) {
|
|
24267
|
+
const spilledCells = new Set();
|
|
24265
24268
|
return this.mapOnElements({ parent: worksheet, query: "sheetData row" }, (rowElement) => {
|
|
24266
24269
|
return {
|
|
24267
24270
|
index: this.extractAttr(rowElement, "r", { required: true })?.asNum(),
|
|
24268
|
-
cells: this.extractCells(rowElement),
|
|
24271
|
+
cells: this.extractCells(rowElement, spilledCells),
|
|
24269
24272
|
height: this.extractAttr(rowElement, "ht")?.asNum(),
|
|
24270
24273
|
customHeight: this.extractAttr(rowElement, "customHeight")?.asBool(),
|
|
24271
24274
|
hidden: this.extractAttr(rowElement, "hidden")?.asBool(),
|
|
@@ -24275,14 +24278,26 @@ class XlsxSheetExtractor extends XlsxBaseExtractor {
|
|
|
24275
24278
|
};
|
|
24276
24279
|
});
|
|
24277
24280
|
}
|
|
24278
|
-
extractCells(row) {
|
|
24281
|
+
extractCells(row, spilledCells) {
|
|
24279
24282
|
return this.mapOnElements({ parent: row, query: "c" }, (cellElement) => {
|
|
24283
|
+
const xc = this.extractAttr(cellElement, "r", { required: true })?.asString();
|
|
24284
|
+
const formula = this.extractCellFormula(cellElement);
|
|
24285
|
+
if (formula?.ref && formula.sharedIndex === undefined) {
|
|
24286
|
+
const zone = toZone(formula.ref);
|
|
24287
|
+
for (const { col, row } of positions(zone)) {
|
|
24288
|
+
const followerXc = toXC(col, row);
|
|
24289
|
+
if (followerXc !== xc) {
|
|
24290
|
+
spilledCells.add(followerXc);
|
|
24291
|
+
}
|
|
24292
|
+
}
|
|
24293
|
+
}
|
|
24294
|
+
const isSpilled = spilledCells.has(xc);
|
|
24280
24295
|
return {
|
|
24281
|
-
xc
|
|
24296
|
+
xc,
|
|
24282
24297
|
styleIndex: this.extractAttr(cellElement, "s")?.asNum(),
|
|
24283
24298
|
type: CELL_TYPE_CONVERSION_MAP[this.extractAttr(cellElement, "t", { default: "n" })?.asString()],
|
|
24284
|
-
value: this.extractChildTextContent(cellElement, "v"),
|
|
24285
|
-
formula:
|
|
24299
|
+
value: isSpilled ? undefined : this.extractChildTextContent(cellElement, "v") ?? undefined,
|
|
24300
|
+
formula: isSpilled ? undefined : formula,
|
|
24286
24301
|
};
|
|
24287
24302
|
});
|
|
24288
24303
|
}
|
|
@@ -24290,11 +24305,14 @@ class XlsxSheetExtractor extends XlsxBaseExtractor {
|
|
|
24290
24305
|
const formulaElement = this.querySelector(cellElement, "f");
|
|
24291
24306
|
if (!formulaElement)
|
|
24292
24307
|
return undefined;
|
|
24293
|
-
|
|
24294
|
-
|
|
24295
|
-
|
|
24296
|
-
|
|
24297
|
-
|
|
24308
|
+
const content = this.extractTextContent(formulaElement);
|
|
24309
|
+
const sharedIndex = this.extractAttr(formulaElement, "si")?.asNum();
|
|
24310
|
+
const ref = this.extractAttr(formulaElement, "ref")?.asString();
|
|
24311
|
+
// This is the case of spilled cells of array formulas where <f> is empty
|
|
24312
|
+
if ((content === undefined || content.trim() === "") && sharedIndex === undefined) {
|
|
24313
|
+
return undefined;
|
|
24314
|
+
}
|
|
24315
|
+
return { content, sharedIndex, ref };
|
|
24298
24316
|
}
|
|
24299
24317
|
extractHyperLinks(worksheet) {
|
|
24300
24318
|
return this.mapOnElements({ parent: worksheet, query: "hyperlink" }, (linkElement) => {
|
|
@@ -65168,12 +65186,12 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
65168
65186
|
}
|
|
65169
65187
|
case "INSERT_CELL": {
|
|
65170
65188
|
const { cut, paste } = this.getInsertCellsTargets(cmd.zone, cmd.shiftDimension);
|
|
65171
|
-
const copiedData = this.copy(cut);
|
|
65189
|
+
const copiedData = this.copy(cut, "shiftCells");
|
|
65172
65190
|
return this.isPasteAllowed(paste, copiedData, { isCutOperation: true });
|
|
65173
65191
|
}
|
|
65174
65192
|
case "DELETE_CELL": {
|
|
65175
65193
|
const { cut, paste } = this.getDeleteCellsTargets(cmd.zone, cmd.shiftDimension);
|
|
65176
|
-
const copiedData = this.copy(cut);
|
|
65194
|
+
const copiedData = this.copy(cut, "shiftCells");
|
|
65177
65195
|
return this.isPasteAllowed(paste, copiedData, { isCutOperation: true });
|
|
65178
65196
|
}
|
|
65179
65197
|
}
|
|
@@ -65263,13 +65281,13 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
65263
65281
|
});
|
|
65264
65282
|
break;
|
|
65265
65283
|
}
|
|
65266
|
-
const copiedData = this.copy(cut);
|
|
65284
|
+
const copiedData = this.copy(cut, "shiftCells");
|
|
65267
65285
|
this.paste(paste, copiedData, { isCutOperation: true });
|
|
65268
65286
|
break;
|
|
65269
65287
|
}
|
|
65270
65288
|
case "INSERT_CELL": {
|
|
65271
65289
|
const { cut, paste } = this.getInsertCellsTargets(cmd.zone, cmd.shiftDimension);
|
|
65272
|
-
const copiedData = this.copy(cut);
|
|
65290
|
+
const copiedData = this.copy(cut, "shiftCells");
|
|
65273
65291
|
this.paste(paste, copiedData, { isCutOperation: true });
|
|
65274
65292
|
break;
|
|
65275
65293
|
}
|
|
@@ -65384,11 +65402,11 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
65384
65402
|
}
|
|
65385
65403
|
return false;
|
|
65386
65404
|
}
|
|
65387
|
-
copy(zones) {
|
|
65405
|
+
copy(zones, mode = "copyPaste") {
|
|
65388
65406
|
let copiedData = {};
|
|
65389
65407
|
const clipboardData = this.getClipboardData(zones);
|
|
65390
65408
|
for (const { handlerName, handler } of this.selectClipboardHandlers(clipboardData)) {
|
|
65391
|
-
const data = handler.copy(clipboardData);
|
|
65409
|
+
const data = handler.copy(clipboardData, mode);
|
|
65392
65410
|
copiedData[handlerName] = data;
|
|
65393
65411
|
const minimalKeys = ["sheetId", "cells", "zones", "figureId"];
|
|
65394
65412
|
for (const key of minimalKeys) {
|
|
@@ -66259,7 +66277,7 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
66259
66277
|
];
|
|
66260
66278
|
for (const Handler of clipboardHandlersRegistries.cellHandlers.getAll()) {
|
|
66261
66279
|
const handler = new Handler(this.getters, this.dispatch);
|
|
66262
|
-
const data = handler.copy(getClipboardDataPositions(sheetId, target));
|
|
66280
|
+
const data = handler.copy(getClipboardDataPositions(sheetId, target), "shiftCells");
|
|
66263
66281
|
if (!data) {
|
|
66264
66282
|
continue;
|
|
66265
66283
|
}
|
|
@@ -73998,7 +74016,7 @@ class Model extends EventBus {
|
|
|
73998
74016
|
handlers = [];
|
|
73999
74017
|
uiHandlers = [];
|
|
74000
74018
|
coreHandlers = [];
|
|
74001
|
-
constructor(data = {}, config = {}, stateUpdateMessages = [], uuidGenerator = new UuidGenerator(), verboseImport =
|
|
74019
|
+
constructor(data = {}, config = {}, stateUpdateMessages = [], uuidGenerator = new UuidGenerator(), verboseImport = false) {
|
|
74002
74020
|
const start = performance.now();
|
|
74003
74021
|
console.debug("##### Model creation #####");
|
|
74004
74022
|
super();
|
|
@@ -74711,6 +74729,6 @@ exports.tokenColors = tokenColors;
|
|
|
74711
74729
|
exports.tokenize = tokenize;
|
|
74712
74730
|
|
|
74713
74731
|
|
|
74714
|
-
__info__.version = "18.0.
|
|
74715
|
-
__info__.date = "2025-09-
|
|
74716
|
-
__info__.hash = "
|
|
74732
|
+
__info__.version = "18.0.44";
|
|
74733
|
+
__info__.date = "2025-09-11T08:43:01.459Z";
|
|
74734
|
+
__info__.hash = "7e6662c";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -1871,6 +1871,7 @@ interface ClipboardOptions {
|
|
|
1871
1871
|
selectTarget?: boolean;
|
|
1872
1872
|
}
|
|
1873
1873
|
type ClipboardPasteOptions = "onlyFormat" | "asValue";
|
|
1874
|
+
type ClipboardCopyOptions = "copyPaste" | "shiftCells";
|
|
1874
1875
|
type ClipboardOperation = "CUT" | "COPY";
|
|
1875
1876
|
type ClipboardCellData = {
|
|
1876
1877
|
sheetId: UID;
|
|
@@ -6199,7 +6200,7 @@ declare class ClipboardHandler<T> {
|
|
|
6199
6200
|
protected getters: Getters;
|
|
6200
6201
|
protected dispatch: CommandDispatcher["dispatch"];
|
|
6201
6202
|
constructor(getters: Getters, dispatch: CommandDispatcher["dispatch"]);
|
|
6202
|
-
copy(data: ClipboardData): T | undefined;
|
|
6203
|
+
copy(data: ClipboardData, mode?: ClipboardCopyOptions): T | undefined;
|
|
6203
6204
|
paste(target: ClipboardPasteTarget, clippedContent: T, options: ClipboardOptions): void;
|
|
6204
6205
|
isPasteAllowed(sheetId: UID, target: Zone[], content: T, option: ClipboardOptions): CommandResult;
|
|
6205
6206
|
isCutAllowed(data: ClipboardData): CommandResult;
|
|
@@ -6208,7 +6209,7 @@ declare class ClipboardHandler<T> {
|
|
|
6208
6209
|
}
|
|
6209
6210
|
|
|
6210
6211
|
declare class AbstractCellClipboardHandler<T, T1> extends ClipboardHandler<T> {
|
|
6211
|
-
copy(data: ClipboardCellData): T | undefined;
|
|
6212
|
+
copy(data: ClipboardCellData, mode?: ClipboardCopyOptions): T | undefined;
|
|
6212
6213
|
pasteFromCopy(sheetId: UID, target: Zone[], content: T1[][], options?: ClipboardOptions): void;
|
|
6213
6214
|
protected pasteZone(sheetId: UID, col: HeaderIndex, row: HeaderIndex, data: T1[][], clipboardOptions?: ClipboardOptions): void;
|
|
6214
6215
|
}
|
|
@@ -12445,4 +12446,4 @@ declare const constants: {
|
|
|
12445
12446
|
};
|
|
12446
12447
|
};
|
|
12447
12448
|
|
|
12448
|
-
export { AST, ASTFuncall, AboveAverageRule, AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, ActivateNextSheetCommand, ActivatePreviousSheetCommand, ActivateSheetCommand, AddColumnsRowsCommand, AddConditionalFormatCommand, AddDataValidationCommand, AddFunctionDescription, AddMergeCommand, AddPivotCommand, Aggregator, Alias, Align, AlphanumericIncrementModifier, AnchorZone, ApplyRangeChange, ApplyRangeChangeResult, Arg, ArgDefinition, ArgType, AutoFillCellCommand, AutofillAutoCommand, AutofillCellData, AutofillCommand, AutofillData, AutofillModifier, AutofillModifierImplementation, AutofillResult, AutofillSelectCommand, AutofillTableCommand, AutoresizeColumnsCommand, AutoresizeRowsCommand, AxesDesign, AxisDesign, AxisType, BeginsWithRule, BooleanCell, Border$1 as Border, BorderData, BorderDescr, BorderDescription, BorderPosition, BorderStyle, Box, BoxTextContent, CHART_TYPES, CSSProperties, CancelledReason, Cell, CellData, CellErrorType, CellIsRule, CellPosition, CellValue, CellValueType, ChangeType, ChartCreationContext, ChartDefinition, ChartJSRuntime, ChartRuntime, ChartType, ChartWithAxisDefinition, CleanClipBoardHighlightCommand, ClearCellCommand, ClearCellsCommand, ClearFormattingCommand, Client, ClientId, ClientJoinedMessage, ClientLeftMessage, ClientMovedMessage, ClientPosition, ClipboardCell, ClipboardCellData, ClipboardData, ClipboardFigureData, ClipboardMIMEType, ClipboardOperation, ClipboardOptions, ClipboardPasteOptions, ClipboardPasteTarget, Cloneable, CollaborationMessage, CollaborativeEvent, CollaborativeEventReceived, CollaborativeEventTypes, Color, ColorScaleMidPointThreshold, ColorScaleRule, ColorScaleThreshold, ColorSheetCommand, Command, CommandDispatcher, CommandHandler, CommandResult, CommandTypes, CommonPivotCoreDefinition, CompiledFormula, ComposerFocusType, ComputeFunction, ComputedTableStyle, ConditionalFormat, ConditionalFormatInternal, ConditionalFormatRule, ConditionalFormatRuleInternal, ConditionalFormattingOperatorValues, ConsecutiveIndexes, ContainsTextRule, CopyCommand, CopyModifier, CopyPasteCellsAboveCommand, CopyPasteCellsOnLeftCommand, CoreCommand, CoreCommandDispatcher, CoreCommandTypes, CoreGetters, CorePlugin, CoreTable, CoreTableType, CoreViewCommand, CoreViewCommandTypes, CreateChartCommand, CreateFigureCommand, CreateImageOverCommand, CreateRevisionOptions, CreateSheetCommand, CreateTableCommand, CreateTableStyleCommand, Currency, CustomFormulaCriterion, CustomizedDataSet, CutCommand, DEFAULT_LOCALE, DEFAULT_LOCALES, DIRECTION, DOMCoordinates, DOMDimension, DataBarFill, DataBarRule, DataBarRuleInternal, DataSet, DataValidationCriterion, DataValidationCriterionType, DataValidationDateCriterion, DataValidationRule, DataValidationRuleData, DatasetDesign, DatasetValues, DateCriterionValue, DateIncrementModifier, DateIsAfterCriterion, DateIsBeforeCriterion, DateIsBetweenCriterion, DateIsCriterion, DateIsNotBetweenCriterion, DateIsOnOrAfterCriterion, DateIsOnOrBeforeCriterion, DateIsValidCriterion, DebouncedFunction, DeleteCellCommand, DeleteContentCommand, DeleteFigureCommand, DeleteSheetCommand, Dependencies, Dimension, DimensionTree, DimensionTreeNode, Direction$1 as Direction, DispatchResult, DuplicatePivotCommand, DuplicatePivotInNewSheetCommand, DuplicateSheetCommand, DynamicTable, EdgeScrollInfo, EditTextOptions, EditionMode, EmptyCell, EndsWithRule, EnrichedToken, EnsureRange, ErrorCell, EvalContext, EvaluateCellsCommand, EvaluatedCell, EvaluationError, ExcelCellData, ExcelChartDataset, ExcelChartDefinition, ExcelChartType, ExcelFigureSize, ExcelFilterData, ExcelHeaderData, ExcelSheetData, ExcelTableData, ExcelWorkbookData, ExpressionRule, Figure, FigureData, FigureSize, Filter, FilterId, FoldAllHeaderGroupsCommand, FoldHeaderGroupCommand, FoldHeaderGroupsInZoneCommand, Format, FormattedValue, FormulaCell, FormulaModifier, FormulaToExecute, FreezeColumnsCommand, FreezeRowsCommand, FunctionDescription, FunctionRegistry, FunctionResultNumber, FunctionResultObject, GeneratorCell, GetSymbolValue, Getters, Granularity, GridClickModifiers, GridRenderingContext, GroupHeadersCommand, HSLA, HeaderData, HeaderDimensions, HeaderGroup, HeaderIndex, HeadersDependentCommand, HideColumnsRowsCommand, HideSheetCommand, Highlight$1 as Highlight, HistoryChange, IconSet, IconSetRule, IconThreshold, Image, Immutable, Increment, IncrementModifier, InformationNotification, InitPivotParams, InsertCellCommand, InsertNewPivotCommand, InsertPivotCommand, InsertPivotWithTableCommand, IsBetweenCriterion, IsCheckboxCriterion, IsEqualCriterion, IsGreaterOrEqualToCriterion, IsGreaterThanCriterion, IsLessOrEqualToCriterion, IsLessThanCriterion, IsNotBetweenCriterion, IsNotEqualCriterion, IsValueInListCriterion, IsValueInRangeCriterion, LabelValues, LayerName, Lazy, Link, LiteralCell, LocalCommand, Locale, LocaleCode, LocaleFormat, LookupCaches, Matrix, Maybe, MenuMouseEvent, Merge, MinimalClipboardData, Model, MoveColumnsRowsCommand, MoveConditionalFormatCommand, MoveRangeCommand, MoveSheetCommand, MoveViewportDownCommand, MoveViewportToCellCommand, MoveViewportUpCommand, NewLocalStateUpdateEvent, NotContainsTextRule, NotificationType, NumberCell, OSClipboardContent, Offset, OperationSequenceNode, OrderedLayers, PaintFormat, PaneDivision, ParsedOSClipboardContent, PasteCommand, PasteFromOSClipboardCommand, Pivot, PivotColRowDomain, PivotCoreDefinition, PivotCoreDimension, PivotCoreMeasure, PivotDimension$1 as PivotDimension, PivotDomain, PivotEmptyCell, PivotField, PivotFields, PivotHeaderCell, PivotMeasure, PivotMeasureDisplay, PivotMeasureDisplayType, PivotMeasureHeaderCell, PivotNode, PivotRuntimeDefinition, PivotStartPresenceTracking, PivotStopPresenceTracking, PivotTableCell, PivotTableColumn, PivotTableData, PivotTableRow, PivotTimeAdapter, PivotTimeAdapterNotNull, PivotValueCell, Pixel, PixelPosition, Position$1 as Position, PositionDependentCommand, PropsOf, RGBA, Range, RangeCompiledFormula, RangeData, RangePart, RangeProvider, RangesDependentCommand, Rect, RedoCommand, Ref, ReferenceDenormalizer, RefreshPivotCommand, Registry, RemoteRevisionMessage, RemoteRevisionReceivedEvent, RemoveColumnsRowsCommand, RemoveConditionalFormatCommand, RemoveDataValidationCommand, RemoveDuplicatesCommand, RemoveMergeCommand, RemovePivotCommand, RemoveTableCommand, RemoveTableStyleCommand, RenamePivotCommand, RenameSheetCommand, RepeatPasteCommand, ReplaceSearchCommand, RequestRedoCommand, RequestUndoCommand, ResizeColumnsRowsCommand, ResizeDirection, ResizeTableCommand, ResizeViewportCommand, Revision, RevisionAcknowledgedEvent, RevisionData, RevisionRedone, RevisionRedoneMessage, RevisionUndone, RevisionUndoneMessage, Row, SPREADSHEET_DIMENSIONS, ScrollDirection$1 as ScrollDirection, SelectFigureCommand, Selection, SelectionStep, SetBorderCommand, SetBorderTargetCommand, SetContextualFormatCommand, SetDecimalCommand, SetDecimalStep, SetFormattingCommand, SetGridLinesVisibilityCommand, SetViewportOffsetCommand, SetZoneBordersCommand, Sheet, SheetDOMScrollInfo, SheetData, SheetDependentCommand, SheetScrollInfo, ShowFormulaCommand, ShowSheetCommand, SingleColorRule, SingleColorRules, SnapshotEvent, SortCommand, SortDirection, SortOptions, SplitPivotFormulaCommand, SplitTextIntoColumnsCommand, Spreadsheet, SpreadsheetChildEnv, SpreadsheetPivotCoreDefinition, SpreadsheetPivotTable, StartChangeHighlightCommand, StartCommand, StaticTable, StoreConstructor, StoreParams, Style, SumSelectionCommand, Table, TableBorder, TableConfig, TableData$1 as TableData, TableElementStyle, TableId, TableStyle, TableStyleData, TableStyleTemplateName, TargetDependentCommand, TechnicalName, TextCell, TextContainsCriterion, TextIsCriterion, TextIsEmailCriterion, TextIsLinkCriterion, TextNotContainsCriterion, TextRule, ThresholdType, TimePeriodRule, TitleDesign, Token, Tooltip, Top10Rule, Transformation, TransformationFactory, TransportService, TrendConfiguration, TrendType, TrimWhitespaceCommand, UID, UIPlugin, UnGroupHeadersCommand, UnboundedZone, UndoCommand, UnexpectedRevisionIdEvent, UnfoldAllHeaderGroupsCommand, UnfoldHeaderGroupCommand, UnfoldHeaderGroupsInZoneCommand, UnfreezeColumnsCommand, UnfreezeColumnsRowsCommand, UnfreezeRowsCommand, UnhideColumnsRowsCommand, UpdateCellCommand, UpdateCellData, UpdateCellPositionCommand, UpdateChartCommand, UpdateFigureCommand, UpdateFilterCommand, UpdateLocaleCommand, UpdatePivotCommand, UpdateTableCommand, Validation, VerticalAlign, Viewport, WorkbookData, WorkbookHistory, Wrapping, Zone, ZoneDependentCommand, ZoneDimension, __info__, addFunction, addRenderingLayer, astToFormula, borderStyles, canExecuteInReadonly, compile, compileTokens, components, constants, containsBlanksRule, containsErrorsRule, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateBordersCommands, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, isCoreCommand, isHeadersDependant, isMatrix, isPositionDependent, isRangeDependant, isSheetDependent, isTargetDependent, isZoneDependent, iterateAstNodes, links, load, notContainsBlanksRule, notContainsErrorsRule, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
12449
|
+
export { AST, ASTFuncall, AboveAverageRule, AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, ActivateNextSheetCommand, ActivatePreviousSheetCommand, ActivateSheetCommand, AddColumnsRowsCommand, AddConditionalFormatCommand, AddDataValidationCommand, AddFunctionDescription, AddMergeCommand, AddPivotCommand, Aggregator, Alias, Align, AlphanumericIncrementModifier, AnchorZone, ApplyRangeChange, ApplyRangeChangeResult, Arg, ArgDefinition, ArgType, AutoFillCellCommand, AutofillAutoCommand, AutofillCellData, AutofillCommand, AutofillData, AutofillModifier, AutofillModifierImplementation, AutofillResult, AutofillSelectCommand, AutofillTableCommand, AutoresizeColumnsCommand, AutoresizeRowsCommand, AxesDesign, AxisDesign, AxisType, BeginsWithRule, BooleanCell, Border$1 as Border, BorderData, BorderDescr, BorderDescription, BorderPosition, BorderStyle, Box, BoxTextContent, CHART_TYPES, CSSProperties, CancelledReason, Cell, CellData, CellErrorType, CellIsRule, CellPosition, CellValue, CellValueType, ChangeType, ChartCreationContext, ChartDefinition, ChartJSRuntime, ChartRuntime, ChartType, ChartWithAxisDefinition, CleanClipBoardHighlightCommand, ClearCellCommand, ClearCellsCommand, ClearFormattingCommand, Client, ClientId, ClientJoinedMessage, ClientLeftMessage, ClientMovedMessage, ClientPosition, ClipboardCell, ClipboardCellData, ClipboardCopyOptions, ClipboardData, ClipboardFigureData, ClipboardMIMEType, ClipboardOperation, ClipboardOptions, ClipboardPasteOptions, ClipboardPasteTarget, Cloneable, CollaborationMessage, CollaborativeEvent, CollaborativeEventReceived, CollaborativeEventTypes, Color, ColorScaleMidPointThreshold, ColorScaleRule, ColorScaleThreshold, ColorSheetCommand, Command, CommandDispatcher, CommandHandler, CommandResult, CommandTypes, CommonPivotCoreDefinition, CompiledFormula, ComposerFocusType, ComputeFunction, ComputedTableStyle, ConditionalFormat, ConditionalFormatInternal, ConditionalFormatRule, ConditionalFormatRuleInternal, ConditionalFormattingOperatorValues, ConsecutiveIndexes, ContainsTextRule, CopyCommand, CopyModifier, CopyPasteCellsAboveCommand, CopyPasteCellsOnLeftCommand, CoreCommand, CoreCommandDispatcher, CoreCommandTypes, CoreGetters, CorePlugin, CoreTable, CoreTableType, CoreViewCommand, CoreViewCommandTypes, CreateChartCommand, CreateFigureCommand, CreateImageOverCommand, CreateRevisionOptions, CreateSheetCommand, CreateTableCommand, CreateTableStyleCommand, Currency, CustomFormulaCriterion, CustomizedDataSet, CutCommand, DEFAULT_LOCALE, DEFAULT_LOCALES, DIRECTION, DOMCoordinates, DOMDimension, DataBarFill, DataBarRule, DataBarRuleInternal, DataSet, DataValidationCriterion, DataValidationCriterionType, DataValidationDateCriterion, DataValidationRule, DataValidationRuleData, DatasetDesign, DatasetValues, DateCriterionValue, DateIncrementModifier, DateIsAfterCriterion, DateIsBeforeCriterion, DateIsBetweenCriterion, DateIsCriterion, DateIsNotBetweenCriterion, DateIsOnOrAfterCriterion, DateIsOnOrBeforeCriterion, DateIsValidCriterion, DebouncedFunction, DeleteCellCommand, DeleteContentCommand, DeleteFigureCommand, DeleteSheetCommand, Dependencies, Dimension, DimensionTree, DimensionTreeNode, Direction$1 as Direction, DispatchResult, DuplicatePivotCommand, DuplicatePivotInNewSheetCommand, DuplicateSheetCommand, DynamicTable, EdgeScrollInfo, EditTextOptions, EditionMode, EmptyCell, EndsWithRule, EnrichedToken, EnsureRange, ErrorCell, EvalContext, EvaluateCellsCommand, EvaluatedCell, EvaluationError, ExcelCellData, ExcelChartDataset, ExcelChartDefinition, ExcelChartType, ExcelFigureSize, ExcelFilterData, ExcelHeaderData, ExcelSheetData, ExcelTableData, ExcelWorkbookData, ExpressionRule, Figure, FigureData, FigureSize, Filter, FilterId, FoldAllHeaderGroupsCommand, FoldHeaderGroupCommand, FoldHeaderGroupsInZoneCommand, Format, FormattedValue, FormulaCell, FormulaModifier, FormulaToExecute, FreezeColumnsCommand, FreezeRowsCommand, FunctionDescription, FunctionRegistry, FunctionResultNumber, FunctionResultObject, GeneratorCell, GetSymbolValue, Getters, Granularity, GridClickModifiers, GridRenderingContext, GroupHeadersCommand, HSLA, HeaderData, HeaderDimensions, HeaderGroup, HeaderIndex, HeadersDependentCommand, HideColumnsRowsCommand, HideSheetCommand, Highlight$1 as Highlight, HistoryChange, IconSet, IconSetRule, IconThreshold, Image, Immutable, Increment, IncrementModifier, InformationNotification, InitPivotParams, InsertCellCommand, InsertNewPivotCommand, InsertPivotCommand, InsertPivotWithTableCommand, IsBetweenCriterion, IsCheckboxCriterion, IsEqualCriterion, IsGreaterOrEqualToCriterion, IsGreaterThanCriterion, IsLessOrEqualToCriterion, IsLessThanCriterion, IsNotBetweenCriterion, IsNotEqualCriterion, IsValueInListCriterion, IsValueInRangeCriterion, LabelValues, LayerName, Lazy, Link, LiteralCell, LocalCommand, Locale, LocaleCode, LocaleFormat, LookupCaches, Matrix, Maybe, MenuMouseEvent, Merge, MinimalClipboardData, Model, MoveColumnsRowsCommand, MoveConditionalFormatCommand, MoveRangeCommand, MoveSheetCommand, MoveViewportDownCommand, MoveViewportToCellCommand, MoveViewportUpCommand, NewLocalStateUpdateEvent, NotContainsTextRule, NotificationType, NumberCell, OSClipboardContent, Offset, OperationSequenceNode, OrderedLayers, PaintFormat, PaneDivision, ParsedOSClipboardContent, PasteCommand, PasteFromOSClipboardCommand, Pivot, PivotColRowDomain, PivotCoreDefinition, PivotCoreDimension, PivotCoreMeasure, PivotDimension$1 as PivotDimension, PivotDomain, PivotEmptyCell, PivotField, PivotFields, PivotHeaderCell, PivotMeasure, PivotMeasureDisplay, PivotMeasureDisplayType, PivotMeasureHeaderCell, PivotNode, PivotRuntimeDefinition, PivotStartPresenceTracking, PivotStopPresenceTracking, PivotTableCell, PivotTableColumn, PivotTableData, PivotTableRow, PivotTimeAdapter, PivotTimeAdapterNotNull, PivotValueCell, Pixel, PixelPosition, Position$1 as Position, PositionDependentCommand, PropsOf, RGBA, Range, RangeCompiledFormula, RangeData, RangePart, RangeProvider, RangesDependentCommand, Rect, RedoCommand, Ref, ReferenceDenormalizer, RefreshPivotCommand, Registry, RemoteRevisionMessage, RemoteRevisionReceivedEvent, RemoveColumnsRowsCommand, RemoveConditionalFormatCommand, RemoveDataValidationCommand, RemoveDuplicatesCommand, RemoveMergeCommand, RemovePivotCommand, RemoveTableCommand, RemoveTableStyleCommand, RenamePivotCommand, RenameSheetCommand, RepeatPasteCommand, ReplaceSearchCommand, RequestRedoCommand, RequestUndoCommand, ResizeColumnsRowsCommand, ResizeDirection, ResizeTableCommand, ResizeViewportCommand, Revision, RevisionAcknowledgedEvent, RevisionData, RevisionRedone, RevisionRedoneMessage, RevisionUndone, RevisionUndoneMessage, Row, SPREADSHEET_DIMENSIONS, ScrollDirection$1 as ScrollDirection, SelectFigureCommand, Selection, SelectionStep, SetBorderCommand, SetBorderTargetCommand, SetContextualFormatCommand, SetDecimalCommand, SetDecimalStep, SetFormattingCommand, SetGridLinesVisibilityCommand, SetViewportOffsetCommand, SetZoneBordersCommand, Sheet, SheetDOMScrollInfo, SheetData, SheetDependentCommand, SheetScrollInfo, ShowFormulaCommand, ShowSheetCommand, SingleColorRule, SingleColorRules, SnapshotEvent, SortCommand, SortDirection, SortOptions, SplitPivotFormulaCommand, SplitTextIntoColumnsCommand, Spreadsheet, SpreadsheetChildEnv, SpreadsheetPivotCoreDefinition, SpreadsheetPivotTable, StartChangeHighlightCommand, StartCommand, StaticTable, StoreConstructor, StoreParams, Style, SumSelectionCommand, Table, TableBorder, TableConfig, TableData$1 as TableData, TableElementStyle, TableId, TableStyle, TableStyleData, TableStyleTemplateName, TargetDependentCommand, TechnicalName, TextCell, TextContainsCriterion, TextIsCriterion, TextIsEmailCriterion, TextIsLinkCriterion, TextNotContainsCriterion, TextRule, ThresholdType, TimePeriodRule, TitleDesign, Token, Tooltip, Top10Rule, Transformation, TransformationFactory, TransportService, TrendConfiguration, TrendType, TrimWhitespaceCommand, UID, UIPlugin, UnGroupHeadersCommand, UnboundedZone, UndoCommand, UnexpectedRevisionIdEvent, UnfoldAllHeaderGroupsCommand, UnfoldHeaderGroupCommand, UnfoldHeaderGroupsInZoneCommand, UnfreezeColumnsCommand, UnfreezeColumnsRowsCommand, UnfreezeRowsCommand, UnhideColumnsRowsCommand, UpdateCellCommand, UpdateCellData, UpdateCellPositionCommand, UpdateChartCommand, UpdateFigureCommand, UpdateFilterCommand, UpdateLocaleCommand, UpdatePivotCommand, UpdateTableCommand, Validation, VerticalAlign, Viewport, WorkbookData, WorkbookHistory, Wrapping, Zone, ZoneDependentCommand, ZoneDimension, __info__, addFunction, addRenderingLayer, astToFormula, borderStyles, canExecuteInReadonly, compile, compileTokens, components, constants, containsBlanksRule, containsErrorsRule, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateBordersCommands, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, isCoreCommand, isHeadersDependant, isMatrix, isPositionDependent, isRangeDependant, isSheetDependent, isTargetDependent, isZoneDependent, iterateAstNodes, links, load, notContainsBlanksRule, notContainsErrorsRule, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 18.0.
|
|
6
|
-
* @date 2025-09-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.0.44
|
|
6
|
+
* @date 2025-09-11T08:43:01.459Z
|
|
7
|
+
* @hash 7e6662c
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, useState, onPatched, onWillPatch, onWillUpdateProps, useExternalListener, onWillStart, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
|
|
@@ -6739,7 +6739,7 @@ class ClipboardHandler {
|
|
|
6739
6739
|
this.getters = getters;
|
|
6740
6740
|
this.dispatch = dispatch;
|
|
6741
6741
|
}
|
|
6742
|
-
copy(data) {
|
|
6742
|
+
copy(data, mode = "copyPaste") {
|
|
6743
6743
|
return;
|
|
6744
6744
|
}
|
|
6745
6745
|
paste(target, clippedContent, options) { }
|
|
@@ -6758,7 +6758,7 @@ class ClipboardHandler {
|
|
|
6758
6758
|
}
|
|
6759
6759
|
|
|
6760
6760
|
class AbstractCellClipboardHandler extends ClipboardHandler {
|
|
6761
|
-
copy(data) {
|
|
6761
|
+
copy(data, mode = "copyPaste") {
|
|
6762
6762
|
return;
|
|
6763
6763
|
}
|
|
6764
6764
|
pasteFromCopy(sheetId, target, content, options) {
|
|
@@ -8427,7 +8427,7 @@ class CellClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
8427
8427
|
}
|
|
8428
8428
|
return "Success" /* CommandResult.Success */;
|
|
8429
8429
|
}
|
|
8430
|
-
copy(data) {
|
|
8430
|
+
copy(data, mode = "copyPaste") {
|
|
8431
8431
|
const sheetId = data.sheetId;
|
|
8432
8432
|
const { clippedZones, rowsIndexes, columnsIndexes } = data;
|
|
8433
8433
|
const clippedCells = [];
|
|
@@ -8440,7 +8440,7 @@ class CellClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
8440
8440
|
const evaluatedCell = this.getters.getEvaluatedCell(position);
|
|
8441
8441
|
const pivotId = this.getters.getPivotIdFromPosition(position);
|
|
8442
8442
|
const spreader = this.getters.getArrayFormulaSpreadingOn(position);
|
|
8443
|
-
if (pivotId && spreader) {
|
|
8443
|
+
if (mode !== "shiftCells" && pivotId && spreader) {
|
|
8444
8444
|
const pivotZone = this.getters.getSpreadZone(spreader);
|
|
8445
8445
|
if ((!deepEquals(spreader, position) || !isCopyingOneCell) &&
|
|
8446
8446
|
pivotZone &&
|
|
@@ -8458,7 +8458,7 @@ class CellClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
8458
8458
|
};
|
|
8459
8459
|
}
|
|
8460
8460
|
}
|
|
8461
|
-
else {
|
|
8461
|
+
else if (mode !== "shiftCells") {
|
|
8462
8462
|
if (spreader && !deepEquals(spreader, position)) {
|
|
8463
8463
|
const isSpreaderCopied = rowsIndexes.includes(spreader.row) && columnsIndexes.includes(spreader.col);
|
|
8464
8464
|
const content = isSpreaderCopied
|
|
@@ -9151,7 +9151,7 @@ class SheetClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
9151
9151
|
}
|
|
9152
9152
|
|
|
9153
9153
|
class TableClipboardHandler extends AbstractCellClipboardHandler {
|
|
9154
|
-
copy(data) {
|
|
9154
|
+
copy(data, mode = "copyPaste") {
|
|
9155
9155
|
const sheetId = data.sheetId;
|
|
9156
9156
|
const { rowsIndexes, columnsIndexes, zones } = data;
|
|
9157
9157
|
const copiedTablesIds = new Set();
|
|
@@ -9185,11 +9185,13 @@ class TableClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
9185
9185
|
type: coreTable.type,
|
|
9186
9186
|
};
|
|
9187
9187
|
}
|
|
9188
|
-
|
|
9189
|
-
|
|
9190
|
-
|
|
9191
|
-
|
|
9192
|
-
|
|
9188
|
+
if (mode !== "shiftCells") {
|
|
9189
|
+
tableCellsInRow.push({
|
|
9190
|
+
table: copiedTable,
|
|
9191
|
+
style: this.getTableStyleToCopy(position),
|
|
9192
|
+
isWholeTableCopied: copiedTablesIds.has(table.id),
|
|
9193
|
+
});
|
|
9194
|
+
}
|
|
9193
9195
|
}
|
|
9194
9196
|
}
|
|
9195
9197
|
return {
|
|
@@ -20787,7 +20789,7 @@ const SUPPORTED_HORIZONTAL_ALIGNMENTS = [
|
|
|
20787
20789
|
];
|
|
20788
20790
|
const SUPPORTED_VERTICAL_ALIGNMENTS = ["top", "center", "bottom"];
|
|
20789
20791
|
const SUPPORTED_FONTS = ["Arial"];
|
|
20790
|
-
const SUPPORTED_FILL_PATTERNS = ["solid"];
|
|
20792
|
+
const SUPPORTED_FILL_PATTERNS = ["solid", "none"];
|
|
20791
20793
|
const SUPPORTED_CF_TYPES = [
|
|
20792
20794
|
"expression",
|
|
20793
20795
|
"cellIs",
|
|
@@ -20972,7 +20974,7 @@ const SUBTOTAL_FUNCTION_CONVERSION_MAP = {
|
|
|
20972
20974
|
};
|
|
20973
20975
|
/** Mapping between Excel format indexes (see XLSX_FORMAT_MAP) and some supported formats */
|
|
20974
20976
|
const XLSX_FORMATS_CONVERSION_MAP = {
|
|
20975
|
-
0: "",
|
|
20977
|
+
0: "General",
|
|
20976
20978
|
1: "0",
|
|
20977
20979
|
2: "0.00",
|
|
20978
20980
|
3: "#,#00",
|
|
@@ -21298,11 +21300,11 @@ const XLSX_DATE_FORMAT_REGEX = /^(yy|yyyy|m{1,5}|d{1,4}|h{1,2}|s{1,2}|am\/pm|a\/
|
|
|
21298
21300
|
* Excel format are defined in openXML §18.8.31
|
|
21299
21301
|
*/
|
|
21300
21302
|
function convertXlsxFormat(numFmtId, formats, warningManager) {
|
|
21301
|
-
if (numFmtId === 0) {
|
|
21302
|
-
return undefined;
|
|
21303
|
-
}
|
|
21304
21303
|
// Format is either defined in the imported data, or the formatId is defined in openXML §18.8.30
|
|
21305
21304
|
let format = XLSX_FORMATS_CONVERSION_MAP[numFmtId] || formats.find((f) => f.id === numFmtId)?.format;
|
|
21305
|
+
if (format === "General") {
|
|
21306
|
+
return undefined;
|
|
21307
|
+
}
|
|
21306
21308
|
if (format) {
|
|
21307
21309
|
try {
|
|
21308
21310
|
let convertedFormat = format.replace(/\[(.*)-[A-Z0-9]{3}\]/g, "[$1]"); // remove currency and locale/date system/number system info (ECMA §18.8.31)
|
|
@@ -24260,10 +24262,11 @@ class XlsxSheetExtractor extends XlsxBaseExtractor {
|
|
|
24260
24262
|
});
|
|
24261
24263
|
}
|
|
24262
24264
|
extractRows(worksheet) {
|
|
24265
|
+
const spilledCells = new Set();
|
|
24263
24266
|
return this.mapOnElements({ parent: worksheet, query: "sheetData row" }, (rowElement) => {
|
|
24264
24267
|
return {
|
|
24265
24268
|
index: this.extractAttr(rowElement, "r", { required: true })?.asNum(),
|
|
24266
|
-
cells: this.extractCells(rowElement),
|
|
24269
|
+
cells: this.extractCells(rowElement, spilledCells),
|
|
24267
24270
|
height: this.extractAttr(rowElement, "ht")?.asNum(),
|
|
24268
24271
|
customHeight: this.extractAttr(rowElement, "customHeight")?.asBool(),
|
|
24269
24272
|
hidden: this.extractAttr(rowElement, "hidden")?.asBool(),
|
|
@@ -24273,14 +24276,26 @@ class XlsxSheetExtractor extends XlsxBaseExtractor {
|
|
|
24273
24276
|
};
|
|
24274
24277
|
});
|
|
24275
24278
|
}
|
|
24276
|
-
extractCells(row) {
|
|
24279
|
+
extractCells(row, spilledCells) {
|
|
24277
24280
|
return this.mapOnElements({ parent: row, query: "c" }, (cellElement) => {
|
|
24281
|
+
const xc = this.extractAttr(cellElement, "r", { required: true })?.asString();
|
|
24282
|
+
const formula = this.extractCellFormula(cellElement);
|
|
24283
|
+
if (formula?.ref && formula.sharedIndex === undefined) {
|
|
24284
|
+
const zone = toZone(formula.ref);
|
|
24285
|
+
for (const { col, row } of positions(zone)) {
|
|
24286
|
+
const followerXc = toXC(col, row);
|
|
24287
|
+
if (followerXc !== xc) {
|
|
24288
|
+
spilledCells.add(followerXc);
|
|
24289
|
+
}
|
|
24290
|
+
}
|
|
24291
|
+
}
|
|
24292
|
+
const isSpilled = spilledCells.has(xc);
|
|
24278
24293
|
return {
|
|
24279
|
-
xc
|
|
24294
|
+
xc,
|
|
24280
24295
|
styleIndex: this.extractAttr(cellElement, "s")?.asNum(),
|
|
24281
24296
|
type: CELL_TYPE_CONVERSION_MAP[this.extractAttr(cellElement, "t", { default: "n" })?.asString()],
|
|
24282
|
-
value: this.extractChildTextContent(cellElement, "v"),
|
|
24283
|
-
formula:
|
|
24297
|
+
value: isSpilled ? undefined : this.extractChildTextContent(cellElement, "v") ?? undefined,
|
|
24298
|
+
formula: isSpilled ? undefined : formula,
|
|
24284
24299
|
};
|
|
24285
24300
|
});
|
|
24286
24301
|
}
|
|
@@ -24288,11 +24303,14 @@ class XlsxSheetExtractor extends XlsxBaseExtractor {
|
|
|
24288
24303
|
const formulaElement = this.querySelector(cellElement, "f");
|
|
24289
24304
|
if (!formulaElement)
|
|
24290
24305
|
return undefined;
|
|
24291
|
-
|
|
24292
|
-
|
|
24293
|
-
|
|
24294
|
-
|
|
24295
|
-
|
|
24306
|
+
const content = this.extractTextContent(formulaElement);
|
|
24307
|
+
const sharedIndex = this.extractAttr(formulaElement, "si")?.asNum();
|
|
24308
|
+
const ref = this.extractAttr(formulaElement, "ref")?.asString();
|
|
24309
|
+
// This is the case of spilled cells of array formulas where <f> is empty
|
|
24310
|
+
if ((content === undefined || content.trim() === "") && sharedIndex === undefined) {
|
|
24311
|
+
return undefined;
|
|
24312
|
+
}
|
|
24313
|
+
return { content, sharedIndex, ref };
|
|
24296
24314
|
}
|
|
24297
24315
|
extractHyperLinks(worksheet) {
|
|
24298
24316
|
return this.mapOnElements({ parent: worksheet, query: "hyperlink" }, (linkElement) => {
|
|
@@ -65166,12 +65184,12 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
65166
65184
|
}
|
|
65167
65185
|
case "INSERT_CELL": {
|
|
65168
65186
|
const { cut, paste } = this.getInsertCellsTargets(cmd.zone, cmd.shiftDimension);
|
|
65169
|
-
const copiedData = this.copy(cut);
|
|
65187
|
+
const copiedData = this.copy(cut, "shiftCells");
|
|
65170
65188
|
return this.isPasteAllowed(paste, copiedData, { isCutOperation: true });
|
|
65171
65189
|
}
|
|
65172
65190
|
case "DELETE_CELL": {
|
|
65173
65191
|
const { cut, paste } = this.getDeleteCellsTargets(cmd.zone, cmd.shiftDimension);
|
|
65174
|
-
const copiedData = this.copy(cut);
|
|
65192
|
+
const copiedData = this.copy(cut, "shiftCells");
|
|
65175
65193
|
return this.isPasteAllowed(paste, copiedData, { isCutOperation: true });
|
|
65176
65194
|
}
|
|
65177
65195
|
}
|
|
@@ -65261,13 +65279,13 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
65261
65279
|
});
|
|
65262
65280
|
break;
|
|
65263
65281
|
}
|
|
65264
|
-
const copiedData = this.copy(cut);
|
|
65282
|
+
const copiedData = this.copy(cut, "shiftCells");
|
|
65265
65283
|
this.paste(paste, copiedData, { isCutOperation: true });
|
|
65266
65284
|
break;
|
|
65267
65285
|
}
|
|
65268
65286
|
case "INSERT_CELL": {
|
|
65269
65287
|
const { cut, paste } = this.getInsertCellsTargets(cmd.zone, cmd.shiftDimension);
|
|
65270
|
-
const copiedData = this.copy(cut);
|
|
65288
|
+
const copiedData = this.copy(cut, "shiftCells");
|
|
65271
65289
|
this.paste(paste, copiedData, { isCutOperation: true });
|
|
65272
65290
|
break;
|
|
65273
65291
|
}
|
|
@@ -65382,11 +65400,11 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
65382
65400
|
}
|
|
65383
65401
|
return false;
|
|
65384
65402
|
}
|
|
65385
|
-
copy(zones) {
|
|
65403
|
+
copy(zones, mode = "copyPaste") {
|
|
65386
65404
|
let copiedData = {};
|
|
65387
65405
|
const clipboardData = this.getClipboardData(zones);
|
|
65388
65406
|
for (const { handlerName, handler } of this.selectClipboardHandlers(clipboardData)) {
|
|
65389
|
-
const data = handler.copy(clipboardData);
|
|
65407
|
+
const data = handler.copy(clipboardData, mode);
|
|
65390
65408
|
copiedData[handlerName] = data;
|
|
65391
65409
|
const minimalKeys = ["sheetId", "cells", "zones", "figureId"];
|
|
65392
65410
|
for (const key of minimalKeys) {
|
|
@@ -66257,7 +66275,7 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
66257
66275
|
];
|
|
66258
66276
|
for (const Handler of clipboardHandlersRegistries.cellHandlers.getAll()) {
|
|
66259
66277
|
const handler = new Handler(this.getters, this.dispatch);
|
|
66260
|
-
const data = handler.copy(getClipboardDataPositions(sheetId, target));
|
|
66278
|
+
const data = handler.copy(getClipboardDataPositions(sheetId, target), "shiftCells");
|
|
66261
66279
|
if (!data) {
|
|
66262
66280
|
continue;
|
|
66263
66281
|
}
|
|
@@ -73996,7 +74014,7 @@ class Model extends EventBus {
|
|
|
73996
74014
|
handlers = [];
|
|
73997
74015
|
uiHandlers = [];
|
|
73998
74016
|
coreHandlers = [];
|
|
73999
|
-
constructor(data = {}, config = {}, stateUpdateMessages = [], uuidGenerator = new UuidGenerator(), verboseImport =
|
|
74017
|
+
constructor(data = {}, config = {}, stateUpdateMessages = [], uuidGenerator = new UuidGenerator(), verboseImport = false) {
|
|
74000
74018
|
const start = performance.now();
|
|
74001
74019
|
console.debug("##### Model creation #####");
|
|
74002
74020
|
super();
|
|
@@ -74666,6 +74684,6 @@ const constants = {
|
|
|
74666
74684
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
74667
74685
|
|
|
74668
74686
|
|
|
74669
|
-
__info__.version = "18.0.
|
|
74670
|
-
__info__.date = "2025-09-
|
|
74671
|
-
__info__.hash = "
|
|
74687
|
+
__info__.version = "18.0.44";
|
|
74688
|
+
__info__.date = "2025-09-11T08:43:01.459Z";
|
|
74689
|
+
__info__.hash = "7e6662c";
|