@odoo/o-spreadsheet 18.2.28 → 18.2.29
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.2.
|
|
6
|
-
* @date 2025-09-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.2.29
|
|
6
|
+
* @date 2025-09-11T08:44:31.801Z
|
|
7
|
+
* @hash 665bc43
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -6905,7 +6905,7 @@ class ClipboardHandler {
|
|
|
6905
6905
|
this.getters = getters;
|
|
6906
6906
|
this.dispatch = dispatch;
|
|
6907
6907
|
}
|
|
6908
|
-
copy(data) {
|
|
6908
|
+
copy(data, mode = "copyPaste") {
|
|
6909
6909
|
return;
|
|
6910
6910
|
}
|
|
6911
6911
|
paste(target, clippedContent, options) { }
|
|
@@ -6924,7 +6924,7 @@ class ClipboardHandler {
|
|
|
6924
6924
|
}
|
|
6925
6925
|
|
|
6926
6926
|
class AbstractCellClipboardHandler extends ClipboardHandler {
|
|
6927
|
-
copy(data) {
|
|
6927
|
+
copy(data, mode = "copyPaste") {
|
|
6928
6928
|
return;
|
|
6929
6929
|
}
|
|
6930
6930
|
pasteFromCopy(sheetId, target, content, options) {
|
|
@@ -8641,7 +8641,7 @@ class CellClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
8641
8641
|
}
|
|
8642
8642
|
return "Success" /* CommandResult.Success */;
|
|
8643
8643
|
}
|
|
8644
|
-
copy(data) {
|
|
8644
|
+
copy(data, mode = "copyPaste") {
|
|
8645
8645
|
const sheetId = data.sheetId;
|
|
8646
8646
|
const { clippedZones, rowsIndexes, columnsIndexes } = data;
|
|
8647
8647
|
const clippedCells = [];
|
|
@@ -8654,7 +8654,7 @@ class CellClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
8654
8654
|
const evaluatedCell = this.getters.getEvaluatedCell(position);
|
|
8655
8655
|
const pivotId = this.getters.getPivotIdFromPosition(position);
|
|
8656
8656
|
const spreader = this.getters.getArrayFormulaSpreadingOn(position);
|
|
8657
|
-
if (pivotId && spreader) {
|
|
8657
|
+
if (mode !== "shiftCells" && pivotId && spreader) {
|
|
8658
8658
|
const pivotZone = this.getters.getSpreadZone(spreader);
|
|
8659
8659
|
if ((!deepEquals(spreader, position) || !isCopyingOneCell) &&
|
|
8660
8660
|
pivotZone &&
|
|
@@ -8672,7 +8672,7 @@ class CellClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
8672
8672
|
};
|
|
8673
8673
|
}
|
|
8674
8674
|
}
|
|
8675
|
-
else {
|
|
8675
|
+
else if (mode !== "shiftCells") {
|
|
8676
8676
|
if (spreader && !deepEquals(spreader, position)) {
|
|
8677
8677
|
const isSpreaderCopied = rowsIndexes.includes(spreader.row) && columnsIndexes.includes(spreader.col);
|
|
8678
8678
|
const content = isSpreaderCopied
|
|
@@ -9365,7 +9365,7 @@ class SheetClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
9365
9365
|
}
|
|
9366
9366
|
|
|
9367
9367
|
class TableClipboardHandler extends AbstractCellClipboardHandler {
|
|
9368
|
-
copy(data) {
|
|
9368
|
+
copy(data, mode = "copyPaste") {
|
|
9369
9369
|
const sheetId = data.sheetId;
|
|
9370
9370
|
const { rowsIndexes, columnsIndexes, zones } = data;
|
|
9371
9371
|
const copiedTablesIds = new Set();
|
|
@@ -9395,11 +9395,13 @@ class TableClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
9395
9395
|
type: coreTable.type,
|
|
9396
9396
|
};
|
|
9397
9397
|
}
|
|
9398
|
-
|
|
9399
|
-
|
|
9400
|
-
|
|
9401
|
-
|
|
9402
|
-
|
|
9398
|
+
if (mode !== "shiftCells") {
|
|
9399
|
+
tableCellsInRow.push({
|
|
9400
|
+
table: copiedTable,
|
|
9401
|
+
style: this.getTableStyleToCopy(position),
|
|
9402
|
+
isWholeTableCopied: copiedTablesIds.has(table.id),
|
|
9403
|
+
});
|
|
9404
|
+
}
|
|
9403
9405
|
}
|
|
9404
9406
|
}
|
|
9405
9407
|
return {
|
|
@@ -23795,7 +23797,7 @@ const SUPPORTED_HORIZONTAL_ALIGNMENTS = [
|
|
|
23795
23797
|
];
|
|
23796
23798
|
const SUPPORTED_VERTICAL_ALIGNMENTS = ["top", "center", "bottom"];
|
|
23797
23799
|
const SUPPORTED_FONTS = ["Arial"];
|
|
23798
|
-
const SUPPORTED_FILL_PATTERNS = ["solid"];
|
|
23800
|
+
const SUPPORTED_FILL_PATTERNS = ["solid", "none"];
|
|
23799
23801
|
const SUPPORTED_CF_TYPES = [
|
|
23800
23802
|
"expression",
|
|
23801
23803
|
"cellIs",
|
|
@@ -23980,7 +23982,7 @@ const SUBTOTAL_FUNCTION_CONVERSION_MAP = {
|
|
|
23980
23982
|
};
|
|
23981
23983
|
/** Mapping between Excel format indexes (see XLSX_FORMAT_MAP) and some supported formats */
|
|
23982
23984
|
const XLSX_FORMATS_CONVERSION_MAP = {
|
|
23983
|
-
0: "",
|
|
23985
|
+
0: "General",
|
|
23984
23986
|
1: "0",
|
|
23985
23987
|
2: "0.00",
|
|
23986
23988
|
3: "#,#00",
|
|
@@ -24306,11 +24308,11 @@ const XLSX_DATE_FORMAT_REGEX = /^(yy|yyyy|m{1,5}|d{1,4}|h{1,2}|s{1,2}|am\/pm|a\/
|
|
|
24306
24308
|
* Excel format are defined in openXML §18.8.31
|
|
24307
24309
|
*/
|
|
24308
24310
|
function convertXlsxFormat(numFmtId, formats, warningManager) {
|
|
24309
|
-
if (numFmtId === 0) {
|
|
24310
|
-
return undefined;
|
|
24311
|
-
}
|
|
24312
24311
|
// Format is either defined in the imported data, or the formatId is defined in openXML §18.8.30
|
|
24313
24312
|
let format = XLSX_FORMATS_CONVERSION_MAP[numFmtId] || formats.find((f) => f.id === numFmtId)?.format;
|
|
24313
|
+
if (format === "General") {
|
|
24314
|
+
return undefined;
|
|
24315
|
+
}
|
|
24314
24316
|
if (format) {
|
|
24315
24317
|
try {
|
|
24316
24318
|
let convertedFormat = format.replace(/\[(.*)-[A-Z0-9]{3}\]/g, "[$1]"); // remove currency and locale/date system/number system info (ECMA §18.8.31)
|
|
@@ -27271,10 +27273,11 @@ class XlsxSheetExtractor extends XlsxBaseExtractor {
|
|
|
27271
27273
|
});
|
|
27272
27274
|
}
|
|
27273
27275
|
extractRows(worksheet) {
|
|
27276
|
+
const spilledCells = new Set();
|
|
27274
27277
|
return this.mapOnElements({ parent: worksheet, query: "sheetData row" }, (rowElement) => {
|
|
27275
27278
|
return {
|
|
27276
27279
|
index: this.extractAttr(rowElement, "r", { required: true })?.asNum(),
|
|
27277
|
-
cells: this.extractCells(rowElement),
|
|
27280
|
+
cells: this.extractCells(rowElement, spilledCells),
|
|
27278
27281
|
height: this.extractAttr(rowElement, "ht")?.asNum(),
|
|
27279
27282
|
customHeight: this.extractAttr(rowElement, "customHeight")?.asBool(),
|
|
27280
27283
|
hidden: this.extractAttr(rowElement, "hidden")?.asBool(),
|
|
@@ -27284,14 +27287,26 @@ class XlsxSheetExtractor extends XlsxBaseExtractor {
|
|
|
27284
27287
|
};
|
|
27285
27288
|
});
|
|
27286
27289
|
}
|
|
27287
|
-
extractCells(row) {
|
|
27290
|
+
extractCells(row, spilledCells) {
|
|
27288
27291
|
return this.mapOnElements({ parent: row, query: "c" }, (cellElement) => {
|
|
27292
|
+
const xc = this.extractAttr(cellElement, "r", { required: true })?.asString();
|
|
27293
|
+
const formula = this.extractCellFormula(cellElement);
|
|
27294
|
+
if (formula?.ref && formula.sharedIndex === undefined) {
|
|
27295
|
+
const zone = toZone(formula.ref);
|
|
27296
|
+
for (const { col, row } of positions(zone)) {
|
|
27297
|
+
const followerXc = toXC(col, row);
|
|
27298
|
+
if (followerXc !== xc) {
|
|
27299
|
+
spilledCells.add(followerXc);
|
|
27300
|
+
}
|
|
27301
|
+
}
|
|
27302
|
+
}
|
|
27303
|
+
const isSpilled = spilledCells.has(xc);
|
|
27289
27304
|
return {
|
|
27290
|
-
xc
|
|
27305
|
+
xc,
|
|
27291
27306
|
styleIndex: this.extractAttr(cellElement, "s")?.asNum(),
|
|
27292
27307
|
type: CELL_TYPE_CONVERSION_MAP[this.extractAttr(cellElement, "t", { default: "n" })?.asString()],
|
|
27293
|
-
value: this.extractChildTextContent(cellElement, "v"),
|
|
27294
|
-
formula:
|
|
27308
|
+
value: isSpilled ? undefined : this.extractChildTextContent(cellElement, "v") ?? undefined,
|
|
27309
|
+
formula: isSpilled ? undefined : formula,
|
|
27295
27310
|
};
|
|
27296
27311
|
});
|
|
27297
27312
|
}
|
|
@@ -27299,11 +27314,14 @@ class XlsxSheetExtractor extends XlsxBaseExtractor {
|
|
|
27299
27314
|
const formulaElement = this.querySelector(cellElement, "f");
|
|
27300
27315
|
if (!formulaElement)
|
|
27301
27316
|
return undefined;
|
|
27302
|
-
|
|
27303
|
-
|
|
27304
|
-
|
|
27305
|
-
|
|
27306
|
-
|
|
27317
|
+
const content = this.extractTextContent(formulaElement);
|
|
27318
|
+
const sharedIndex = this.extractAttr(formulaElement, "si")?.asNum();
|
|
27319
|
+
const ref = this.extractAttr(formulaElement, "ref")?.asString();
|
|
27320
|
+
// This is the case of spilled cells of array formulas where <f> is empty
|
|
27321
|
+
if ((content === undefined || content.trim() === "") && sharedIndex === undefined) {
|
|
27322
|
+
return undefined;
|
|
27323
|
+
}
|
|
27324
|
+
return { content, sharedIndex, ref };
|
|
27307
27325
|
}
|
|
27308
27326
|
extractHyperLinks(worksheet) {
|
|
27309
27327
|
return this.mapOnElements({ parent: worksheet, query: "hyperlink" }, (linkElement) => {
|
|
@@ -67808,12 +67826,12 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
67808
67826
|
}
|
|
67809
67827
|
case "INSERT_CELL": {
|
|
67810
67828
|
const { cut, paste } = this.getInsertCellsTargets(cmd.zone, cmd.shiftDimension);
|
|
67811
|
-
const copiedData = this.copy(cut);
|
|
67829
|
+
const copiedData = this.copy(cut, "shiftCells");
|
|
67812
67830
|
return this.isPasteAllowed(paste, copiedData, { isCutOperation: true });
|
|
67813
67831
|
}
|
|
67814
67832
|
case "DELETE_CELL": {
|
|
67815
67833
|
const { cut, paste } = this.getDeleteCellsTargets(cmd.zone, cmd.shiftDimension);
|
|
67816
|
-
const copiedData = this.copy(cut);
|
|
67834
|
+
const copiedData = this.copy(cut, "shiftCells");
|
|
67817
67835
|
return this.isPasteAllowed(paste, copiedData, { isCutOperation: true });
|
|
67818
67836
|
}
|
|
67819
67837
|
}
|
|
@@ -67903,13 +67921,13 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
67903
67921
|
});
|
|
67904
67922
|
break;
|
|
67905
67923
|
}
|
|
67906
|
-
const copiedData = this.copy(cut);
|
|
67924
|
+
const copiedData = this.copy(cut, "shiftCells");
|
|
67907
67925
|
this.paste(paste, copiedData, { isCutOperation: true });
|
|
67908
67926
|
break;
|
|
67909
67927
|
}
|
|
67910
67928
|
case "INSERT_CELL": {
|
|
67911
67929
|
const { cut, paste } = this.getInsertCellsTargets(cmd.zone, cmd.shiftDimension);
|
|
67912
|
-
const copiedData = this.copy(cut);
|
|
67930
|
+
const copiedData = this.copy(cut, "shiftCells");
|
|
67913
67931
|
this.paste(paste, copiedData, { isCutOperation: true });
|
|
67914
67932
|
break;
|
|
67915
67933
|
}
|
|
@@ -68024,11 +68042,11 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
68024
68042
|
}
|
|
68025
68043
|
return false;
|
|
68026
68044
|
}
|
|
68027
|
-
copy(zones) {
|
|
68045
|
+
copy(zones, mode = "copyPaste") {
|
|
68028
68046
|
let copiedData = {};
|
|
68029
68047
|
const clipboardData = this.getClipboardData(zones);
|
|
68030
68048
|
for (const { handlerName, handler } of this.selectClipboardHandlers(clipboardData)) {
|
|
68031
|
-
const data = handler.copy(clipboardData);
|
|
68049
|
+
const data = handler.copy(clipboardData, mode);
|
|
68032
68050
|
copiedData[handlerName] = data;
|
|
68033
68051
|
const minimalKeys = ["sheetId", "cells", "zones", "figureId"];
|
|
68034
68052
|
for (const key of minimalKeys) {
|
|
@@ -68892,7 +68910,7 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
68892
68910
|
];
|
|
68893
68911
|
for (const Handler of clipboardHandlersRegistries.cellHandlers.getAll()) {
|
|
68894
68912
|
const handler = new Handler(this.getters, this.dispatch);
|
|
68895
|
-
const data = handler.copy(getClipboardDataPositions(sheetId, target));
|
|
68913
|
+
const data = handler.copy(getClipboardDataPositions(sheetId, target), "shiftCells");
|
|
68896
68914
|
if (!data) {
|
|
68897
68915
|
continue;
|
|
68898
68916
|
}
|
|
@@ -76580,7 +76598,7 @@ class Model extends EventBus {
|
|
|
76580
76598
|
handlers = [];
|
|
76581
76599
|
uiHandlers = [];
|
|
76582
76600
|
coreHandlers = [];
|
|
76583
|
-
constructor(data = {}, config = {}, stateUpdateMessages = [], uuidGenerator = new UuidGenerator(), verboseImport =
|
|
76601
|
+
constructor(data = {}, config = {}, stateUpdateMessages = [], uuidGenerator = new UuidGenerator(), verboseImport = false) {
|
|
76584
76602
|
const start = performance.now();
|
|
76585
76603
|
console.debug("##### Model creation #####");
|
|
76586
76604
|
super();
|
|
@@ -77316,6 +77334,6 @@ exports.tokenColors = tokenColors;
|
|
|
77316
77334
|
exports.tokenize = tokenize;
|
|
77317
77335
|
|
|
77318
77336
|
|
|
77319
|
-
__info__.version = "18.2.
|
|
77320
|
-
__info__.date = "2025-09-
|
|
77321
|
-
__info__.hash = "
|
|
77337
|
+
__info__.version = "18.2.29";
|
|
77338
|
+
__info__.date = "2025-09-11T08:44:31.801Z";
|
|
77339
|
+
__info__.hash = "665bc43";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -2338,6 +2338,7 @@ interface ClipboardOptions {
|
|
|
2338
2338
|
selectTarget?: boolean;
|
|
2339
2339
|
}
|
|
2340
2340
|
type ClipboardPasteOptions = "onlyFormat" | "asValue";
|
|
2341
|
+
type ClipboardCopyOptions = "copyPaste" | "shiftCells";
|
|
2341
2342
|
type ClipboardOperation = "CUT" | "COPY";
|
|
2342
2343
|
type ClipboardCellData = {
|
|
2343
2344
|
sheetId: UID;
|
|
@@ -6373,7 +6374,7 @@ declare class ClipboardHandler<T> {
|
|
|
6373
6374
|
protected getters: Getters;
|
|
6374
6375
|
protected dispatch: CommandDispatcher["dispatch"];
|
|
6375
6376
|
constructor(getters: Getters, dispatch: CommandDispatcher["dispatch"]);
|
|
6376
|
-
copy(data: ClipboardData): T | undefined;
|
|
6377
|
+
copy(data: ClipboardData, mode?: ClipboardCopyOptions): T | undefined;
|
|
6377
6378
|
paste(target: ClipboardPasteTarget, clippedContent: T, options: ClipboardOptions): void;
|
|
6378
6379
|
isPasteAllowed(sheetId: UID, target: Zone[], content: T, option: ClipboardOptions): CommandResult;
|
|
6379
6380
|
isCutAllowed(data: ClipboardData): CommandResult;
|
|
@@ -6382,7 +6383,7 @@ declare class ClipboardHandler<T> {
|
|
|
6382
6383
|
}
|
|
6383
6384
|
|
|
6384
6385
|
declare class AbstractCellClipboardHandler<T, T1> extends ClipboardHandler<T> {
|
|
6385
|
-
copy(data: ClipboardCellData): T | undefined;
|
|
6386
|
+
copy(data: ClipboardCellData, mode?: ClipboardCopyOptions): T | undefined;
|
|
6386
6387
|
pasteFromCopy(sheetId: UID, target: Zone[], content: T1[][], options?: ClipboardOptions): void;
|
|
6387
6388
|
protected pasteZone(sheetId: UID, col: HeaderIndex, row: HeaderIndex, data: T1[][], clipboardOptions?: ClipboardOptions): void;
|
|
6388
6389
|
}
|
|
@@ -13507,4 +13508,4 @@ declare const chartHelpers: {
|
|
|
13507
13508
|
WaterfallChart: typeof WaterfallChart;
|
|
13508
13509
|
};
|
|
13509
13510
|
|
|
13510
|
-
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, BorderPosition, BorderStyle, Box, BoxTextContent, CHART_TYPES, CSSProperties, CancelledReason, Cell, CellErrorType, CellIsRule, CellPosition, CellValue, CellValueType, ChangeType, ChartAxisFormats, ChartCreationContext, ChartDefinition, ChartJSRuntime, ChartRuntime, ChartRuntimeGenerationArgs, ChartType, ChartWithDataSetDefinition, 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, CoreViewPlugin, 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, EvaluateChartsCommand, EvaluatedCell, EvaluationError, 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, GenericDefinition, 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, PivotSortedColumn, 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, 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, chartHelpers, 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 };
|
|
13511
|
+
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, BorderPosition, BorderStyle, Box, BoxTextContent, CHART_TYPES, CSSProperties, CancelledReason, Cell, CellErrorType, CellIsRule, CellPosition, CellValue, CellValueType, ChangeType, ChartAxisFormats, ChartCreationContext, ChartDefinition, ChartJSRuntime, ChartRuntime, ChartRuntimeGenerationArgs, ChartType, ChartWithDataSetDefinition, 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, CoreViewPlugin, 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, EvaluateChartsCommand, EvaluatedCell, EvaluationError, 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, GenericDefinition, 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, PivotSortedColumn, 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, 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, chartHelpers, 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.2.
|
|
6
|
-
* @date 2025-09-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.2.29
|
|
6
|
+
* @date 2025-09-11T08:44:31.801Z
|
|
7
|
+
* @hash 665bc43
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, App, blockDom, useState, onPatched, onWillPatch, onWillUpdateProps, useExternalListener, onWillStart, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
|
|
@@ -6903,7 +6903,7 @@ class ClipboardHandler {
|
|
|
6903
6903
|
this.getters = getters;
|
|
6904
6904
|
this.dispatch = dispatch;
|
|
6905
6905
|
}
|
|
6906
|
-
copy(data) {
|
|
6906
|
+
copy(data, mode = "copyPaste") {
|
|
6907
6907
|
return;
|
|
6908
6908
|
}
|
|
6909
6909
|
paste(target, clippedContent, options) { }
|
|
@@ -6922,7 +6922,7 @@ class ClipboardHandler {
|
|
|
6922
6922
|
}
|
|
6923
6923
|
|
|
6924
6924
|
class AbstractCellClipboardHandler extends ClipboardHandler {
|
|
6925
|
-
copy(data) {
|
|
6925
|
+
copy(data, mode = "copyPaste") {
|
|
6926
6926
|
return;
|
|
6927
6927
|
}
|
|
6928
6928
|
pasteFromCopy(sheetId, target, content, options) {
|
|
@@ -8639,7 +8639,7 @@ class CellClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
8639
8639
|
}
|
|
8640
8640
|
return "Success" /* CommandResult.Success */;
|
|
8641
8641
|
}
|
|
8642
|
-
copy(data) {
|
|
8642
|
+
copy(data, mode = "copyPaste") {
|
|
8643
8643
|
const sheetId = data.sheetId;
|
|
8644
8644
|
const { clippedZones, rowsIndexes, columnsIndexes } = data;
|
|
8645
8645
|
const clippedCells = [];
|
|
@@ -8652,7 +8652,7 @@ class CellClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
8652
8652
|
const evaluatedCell = this.getters.getEvaluatedCell(position);
|
|
8653
8653
|
const pivotId = this.getters.getPivotIdFromPosition(position);
|
|
8654
8654
|
const spreader = this.getters.getArrayFormulaSpreadingOn(position);
|
|
8655
|
-
if (pivotId && spreader) {
|
|
8655
|
+
if (mode !== "shiftCells" && pivotId && spreader) {
|
|
8656
8656
|
const pivotZone = this.getters.getSpreadZone(spreader);
|
|
8657
8657
|
if ((!deepEquals(spreader, position) || !isCopyingOneCell) &&
|
|
8658
8658
|
pivotZone &&
|
|
@@ -8670,7 +8670,7 @@ class CellClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
8670
8670
|
};
|
|
8671
8671
|
}
|
|
8672
8672
|
}
|
|
8673
|
-
else {
|
|
8673
|
+
else if (mode !== "shiftCells") {
|
|
8674
8674
|
if (spreader && !deepEquals(spreader, position)) {
|
|
8675
8675
|
const isSpreaderCopied = rowsIndexes.includes(spreader.row) && columnsIndexes.includes(spreader.col);
|
|
8676
8676
|
const content = isSpreaderCopied
|
|
@@ -9363,7 +9363,7 @@ class SheetClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
9363
9363
|
}
|
|
9364
9364
|
|
|
9365
9365
|
class TableClipboardHandler extends AbstractCellClipboardHandler {
|
|
9366
|
-
copy(data) {
|
|
9366
|
+
copy(data, mode = "copyPaste") {
|
|
9367
9367
|
const sheetId = data.sheetId;
|
|
9368
9368
|
const { rowsIndexes, columnsIndexes, zones } = data;
|
|
9369
9369
|
const copiedTablesIds = new Set();
|
|
@@ -9393,11 +9393,13 @@ class TableClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
9393
9393
|
type: coreTable.type,
|
|
9394
9394
|
};
|
|
9395
9395
|
}
|
|
9396
|
-
|
|
9397
|
-
|
|
9398
|
-
|
|
9399
|
-
|
|
9400
|
-
|
|
9396
|
+
if (mode !== "shiftCells") {
|
|
9397
|
+
tableCellsInRow.push({
|
|
9398
|
+
table: copiedTable,
|
|
9399
|
+
style: this.getTableStyleToCopy(position),
|
|
9400
|
+
isWholeTableCopied: copiedTablesIds.has(table.id),
|
|
9401
|
+
});
|
|
9402
|
+
}
|
|
9401
9403
|
}
|
|
9402
9404
|
}
|
|
9403
9405
|
return {
|
|
@@ -23793,7 +23795,7 @@ const SUPPORTED_HORIZONTAL_ALIGNMENTS = [
|
|
|
23793
23795
|
];
|
|
23794
23796
|
const SUPPORTED_VERTICAL_ALIGNMENTS = ["top", "center", "bottom"];
|
|
23795
23797
|
const SUPPORTED_FONTS = ["Arial"];
|
|
23796
|
-
const SUPPORTED_FILL_PATTERNS = ["solid"];
|
|
23798
|
+
const SUPPORTED_FILL_PATTERNS = ["solid", "none"];
|
|
23797
23799
|
const SUPPORTED_CF_TYPES = [
|
|
23798
23800
|
"expression",
|
|
23799
23801
|
"cellIs",
|
|
@@ -23978,7 +23980,7 @@ const SUBTOTAL_FUNCTION_CONVERSION_MAP = {
|
|
|
23978
23980
|
};
|
|
23979
23981
|
/** Mapping between Excel format indexes (see XLSX_FORMAT_MAP) and some supported formats */
|
|
23980
23982
|
const XLSX_FORMATS_CONVERSION_MAP = {
|
|
23981
|
-
0: "",
|
|
23983
|
+
0: "General",
|
|
23982
23984
|
1: "0",
|
|
23983
23985
|
2: "0.00",
|
|
23984
23986
|
3: "#,#00",
|
|
@@ -24304,11 +24306,11 @@ const XLSX_DATE_FORMAT_REGEX = /^(yy|yyyy|m{1,5}|d{1,4}|h{1,2}|s{1,2}|am\/pm|a\/
|
|
|
24304
24306
|
* Excel format are defined in openXML §18.8.31
|
|
24305
24307
|
*/
|
|
24306
24308
|
function convertXlsxFormat(numFmtId, formats, warningManager) {
|
|
24307
|
-
if (numFmtId === 0) {
|
|
24308
|
-
return undefined;
|
|
24309
|
-
}
|
|
24310
24309
|
// Format is either defined in the imported data, or the formatId is defined in openXML §18.8.30
|
|
24311
24310
|
let format = XLSX_FORMATS_CONVERSION_MAP[numFmtId] || formats.find((f) => f.id === numFmtId)?.format;
|
|
24311
|
+
if (format === "General") {
|
|
24312
|
+
return undefined;
|
|
24313
|
+
}
|
|
24312
24314
|
if (format) {
|
|
24313
24315
|
try {
|
|
24314
24316
|
let convertedFormat = format.replace(/\[(.*)-[A-Z0-9]{3}\]/g, "[$1]"); // remove currency and locale/date system/number system info (ECMA §18.8.31)
|
|
@@ -27269,10 +27271,11 @@ class XlsxSheetExtractor extends XlsxBaseExtractor {
|
|
|
27269
27271
|
});
|
|
27270
27272
|
}
|
|
27271
27273
|
extractRows(worksheet) {
|
|
27274
|
+
const spilledCells = new Set();
|
|
27272
27275
|
return this.mapOnElements({ parent: worksheet, query: "sheetData row" }, (rowElement) => {
|
|
27273
27276
|
return {
|
|
27274
27277
|
index: this.extractAttr(rowElement, "r", { required: true })?.asNum(),
|
|
27275
|
-
cells: this.extractCells(rowElement),
|
|
27278
|
+
cells: this.extractCells(rowElement, spilledCells),
|
|
27276
27279
|
height: this.extractAttr(rowElement, "ht")?.asNum(),
|
|
27277
27280
|
customHeight: this.extractAttr(rowElement, "customHeight")?.asBool(),
|
|
27278
27281
|
hidden: this.extractAttr(rowElement, "hidden")?.asBool(),
|
|
@@ -27282,14 +27285,26 @@ class XlsxSheetExtractor extends XlsxBaseExtractor {
|
|
|
27282
27285
|
};
|
|
27283
27286
|
});
|
|
27284
27287
|
}
|
|
27285
|
-
extractCells(row) {
|
|
27288
|
+
extractCells(row, spilledCells) {
|
|
27286
27289
|
return this.mapOnElements({ parent: row, query: "c" }, (cellElement) => {
|
|
27290
|
+
const xc = this.extractAttr(cellElement, "r", { required: true })?.asString();
|
|
27291
|
+
const formula = this.extractCellFormula(cellElement);
|
|
27292
|
+
if (formula?.ref && formula.sharedIndex === undefined) {
|
|
27293
|
+
const zone = toZone(formula.ref);
|
|
27294
|
+
for (const { col, row } of positions(zone)) {
|
|
27295
|
+
const followerXc = toXC(col, row);
|
|
27296
|
+
if (followerXc !== xc) {
|
|
27297
|
+
spilledCells.add(followerXc);
|
|
27298
|
+
}
|
|
27299
|
+
}
|
|
27300
|
+
}
|
|
27301
|
+
const isSpilled = spilledCells.has(xc);
|
|
27287
27302
|
return {
|
|
27288
|
-
xc
|
|
27303
|
+
xc,
|
|
27289
27304
|
styleIndex: this.extractAttr(cellElement, "s")?.asNum(),
|
|
27290
27305
|
type: CELL_TYPE_CONVERSION_MAP[this.extractAttr(cellElement, "t", { default: "n" })?.asString()],
|
|
27291
|
-
value: this.extractChildTextContent(cellElement, "v"),
|
|
27292
|
-
formula:
|
|
27306
|
+
value: isSpilled ? undefined : this.extractChildTextContent(cellElement, "v") ?? undefined,
|
|
27307
|
+
formula: isSpilled ? undefined : formula,
|
|
27293
27308
|
};
|
|
27294
27309
|
});
|
|
27295
27310
|
}
|
|
@@ -27297,11 +27312,14 @@ class XlsxSheetExtractor extends XlsxBaseExtractor {
|
|
|
27297
27312
|
const formulaElement = this.querySelector(cellElement, "f");
|
|
27298
27313
|
if (!formulaElement)
|
|
27299
27314
|
return undefined;
|
|
27300
|
-
|
|
27301
|
-
|
|
27302
|
-
|
|
27303
|
-
|
|
27304
|
-
|
|
27315
|
+
const content = this.extractTextContent(formulaElement);
|
|
27316
|
+
const sharedIndex = this.extractAttr(formulaElement, "si")?.asNum();
|
|
27317
|
+
const ref = this.extractAttr(formulaElement, "ref")?.asString();
|
|
27318
|
+
// This is the case of spilled cells of array formulas where <f> is empty
|
|
27319
|
+
if ((content === undefined || content.trim() === "") && sharedIndex === undefined) {
|
|
27320
|
+
return undefined;
|
|
27321
|
+
}
|
|
27322
|
+
return { content, sharedIndex, ref };
|
|
27305
27323
|
}
|
|
27306
27324
|
extractHyperLinks(worksheet) {
|
|
27307
27325
|
return this.mapOnElements({ parent: worksheet, query: "hyperlink" }, (linkElement) => {
|
|
@@ -67806,12 +67824,12 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
67806
67824
|
}
|
|
67807
67825
|
case "INSERT_CELL": {
|
|
67808
67826
|
const { cut, paste } = this.getInsertCellsTargets(cmd.zone, cmd.shiftDimension);
|
|
67809
|
-
const copiedData = this.copy(cut);
|
|
67827
|
+
const copiedData = this.copy(cut, "shiftCells");
|
|
67810
67828
|
return this.isPasteAllowed(paste, copiedData, { isCutOperation: true });
|
|
67811
67829
|
}
|
|
67812
67830
|
case "DELETE_CELL": {
|
|
67813
67831
|
const { cut, paste } = this.getDeleteCellsTargets(cmd.zone, cmd.shiftDimension);
|
|
67814
|
-
const copiedData = this.copy(cut);
|
|
67832
|
+
const copiedData = this.copy(cut, "shiftCells");
|
|
67815
67833
|
return this.isPasteAllowed(paste, copiedData, { isCutOperation: true });
|
|
67816
67834
|
}
|
|
67817
67835
|
}
|
|
@@ -67901,13 +67919,13 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
67901
67919
|
});
|
|
67902
67920
|
break;
|
|
67903
67921
|
}
|
|
67904
|
-
const copiedData = this.copy(cut);
|
|
67922
|
+
const copiedData = this.copy(cut, "shiftCells");
|
|
67905
67923
|
this.paste(paste, copiedData, { isCutOperation: true });
|
|
67906
67924
|
break;
|
|
67907
67925
|
}
|
|
67908
67926
|
case "INSERT_CELL": {
|
|
67909
67927
|
const { cut, paste } = this.getInsertCellsTargets(cmd.zone, cmd.shiftDimension);
|
|
67910
|
-
const copiedData = this.copy(cut);
|
|
67928
|
+
const copiedData = this.copy(cut, "shiftCells");
|
|
67911
67929
|
this.paste(paste, copiedData, { isCutOperation: true });
|
|
67912
67930
|
break;
|
|
67913
67931
|
}
|
|
@@ -68022,11 +68040,11 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
68022
68040
|
}
|
|
68023
68041
|
return false;
|
|
68024
68042
|
}
|
|
68025
|
-
copy(zones) {
|
|
68043
|
+
copy(zones, mode = "copyPaste") {
|
|
68026
68044
|
let copiedData = {};
|
|
68027
68045
|
const clipboardData = this.getClipboardData(zones);
|
|
68028
68046
|
for (const { handlerName, handler } of this.selectClipboardHandlers(clipboardData)) {
|
|
68029
|
-
const data = handler.copy(clipboardData);
|
|
68047
|
+
const data = handler.copy(clipboardData, mode);
|
|
68030
68048
|
copiedData[handlerName] = data;
|
|
68031
68049
|
const minimalKeys = ["sheetId", "cells", "zones", "figureId"];
|
|
68032
68050
|
for (const key of minimalKeys) {
|
|
@@ -68890,7 +68908,7 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
68890
68908
|
];
|
|
68891
68909
|
for (const Handler of clipboardHandlersRegistries.cellHandlers.getAll()) {
|
|
68892
68910
|
const handler = new Handler(this.getters, this.dispatch);
|
|
68893
|
-
const data = handler.copy(getClipboardDataPositions(sheetId, target));
|
|
68911
|
+
const data = handler.copy(getClipboardDataPositions(sheetId, target), "shiftCells");
|
|
68894
68912
|
if (!data) {
|
|
68895
68913
|
continue;
|
|
68896
68914
|
}
|
|
@@ -76578,7 +76596,7 @@ class Model extends EventBus {
|
|
|
76578
76596
|
handlers = [];
|
|
76579
76597
|
uiHandlers = [];
|
|
76580
76598
|
coreHandlers = [];
|
|
76581
|
-
constructor(data = {}, config = {}, stateUpdateMessages = [], uuidGenerator = new UuidGenerator(), verboseImport =
|
|
76599
|
+
constructor(data = {}, config = {}, stateUpdateMessages = [], uuidGenerator = new UuidGenerator(), verboseImport = false) {
|
|
76582
76600
|
const start = performance.now();
|
|
76583
76601
|
console.debug("##### Model creation #####");
|
|
76584
76602
|
super();
|
|
@@ -77269,6 +77287,6 @@ const chartHelpers = { ...CHART_HELPERS, ...CHART_RUNTIME_HELPERS };
|
|
|
77269
77287
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, CoreViewPlugin, DispatchResult, EvaluationError, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, chartHelpers, 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 };
|
|
77270
77288
|
|
|
77271
77289
|
|
|
77272
|
-
__info__.version = "18.2.
|
|
77273
|
-
__info__.date = "2025-09-
|
|
77274
|
-
__info__.hash = "
|
|
77290
|
+
__info__.version = "18.2.29";
|
|
77291
|
+
__info__.date = "2025-09-11T08:44:31.801Z";
|
|
77292
|
+
__info__.hash = "665bc43";
|