@odoo/o-spreadsheet 18.4.9 → 18.4.10
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.4.
|
|
6
|
-
* @date 2025-09-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.4.10
|
|
6
|
+
* @date 2025-09-11T08:45:39.178Z
|
|
7
|
+
* @hash 15a11a4
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -7356,7 +7356,7 @@ class ClipboardHandler {
|
|
|
7356
7356
|
this.getters = getters;
|
|
7357
7357
|
this.dispatch = dispatch;
|
|
7358
7358
|
}
|
|
7359
|
-
copy(data, isCutOperation) {
|
|
7359
|
+
copy(data, isCutOperation, mode = "copyPaste") {
|
|
7360
7360
|
return;
|
|
7361
7361
|
}
|
|
7362
7362
|
paste(target, clippedContent, options) { }
|
|
@@ -7375,7 +7375,7 @@ class ClipboardHandler {
|
|
|
7375
7375
|
}
|
|
7376
7376
|
|
|
7377
7377
|
class AbstractCellClipboardHandler extends ClipboardHandler {
|
|
7378
|
-
copy(data) {
|
|
7378
|
+
copy(data, isCutOperation, mode = "copyPaste") {
|
|
7379
7379
|
return;
|
|
7380
7380
|
}
|
|
7381
7381
|
pasteFromCopy(sheetId, target, content, options) {
|
|
@@ -8905,7 +8905,7 @@ class CellClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
8905
8905
|
}
|
|
8906
8906
|
return "Success" /* CommandResult.Success */;
|
|
8907
8907
|
}
|
|
8908
|
-
copy(data) {
|
|
8908
|
+
copy(data, isCutOperation, mode = "copyPaste") {
|
|
8909
8909
|
const sheetId = data.sheetId;
|
|
8910
8910
|
const { clippedZones, rowsIndexes, columnsIndexes } = data;
|
|
8911
8911
|
const clippedCells = [];
|
|
@@ -8918,7 +8918,7 @@ class CellClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
8918
8918
|
const evaluatedCell = this.getters.getEvaluatedCell(position);
|
|
8919
8919
|
const pivotId = this.getters.getPivotIdFromPosition(position);
|
|
8920
8920
|
const spreader = this.getters.getArrayFormulaSpreadingOn(position);
|
|
8921
|
-
if (pivotId && spreader) {
|
|
8921
|
+
if (mode !== "shiftCells" && pivotId && spreader) {
|
|
8922
8922
|
const pivotZone = this.getters.getSpreadZone(spreader);
|
|
8923
8923
|
if ((!deepEquals(spreader, position) || !isCopyingOneCell) &&
|
|
8924
8924
|
pivotZone &&
|
|
@@ -8936,7 +8936,7 @@ class CellClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
8936
8936
|
};
|
|
8937
8937
|
}
|
|
8938
8938
|
}
|
|
8939
|
-
else {
|
|
8939
|
+
else if (mode !== "shiftCells") {
|
|
8940
8940
|
if (spreader && !deepEquals(spreader, position)) {
|
|
8941
8941
|
const isSpreaderCopied = rowsIndexes.includes(spreader.row) && columnsIndexes.includes(spreader.col);
|
|
8942
8942
|
const content = isSpreaderCopied
|
|
@@ -9634,7 +9634,7 @@ class SheetClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
9634
9634
|
}
|
|
9635
9635
|
|
|
9636
9636
|
class TableClipboardHandler extends AbstractCellClipboardHandler {
|
|
9637
|
-
copy(data, isCutOperation) {
|
|
9637
|
+
copy(data, isCutOperation, mode = "copyPaste") {
|
|
9638
9638
|
const sheetId = data.sheetId;
|
|
9639
9639
|
const { rowsIndexes, columnsIndexes, zones } = data;
|
|
9640
9640
|
const copiedTablesIds = new Set();
|
|
@@ -9672,11 +9672,13 @@ class TableClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
9672
9672
|
type: coreTable.type,
|
|
9673
9673
|
};
|
|
9674
9674
|
}
|
|
9675
|
-
|
|
9676
|
-
|
|
9677
|
-
|
|
9678
|
-
|
|
9679
|
-
|
|
9675
|
+
if (mode !== "shiftCells") {
|
|
9676
|
+
tableCellsInRow.push({
|
|
9677
|
+
table: copiedTable,
|
|
9678
|
+
style: this.getTableStyleToCopy(position),
|
|
9679
|
+
isWholeTableCopied: copiedTablesIds.has(table.id),
|
|
9680
|
+
});
|
|
9681
|
+
}
|
|
9680
9682
|
}
|
|
9681
9683
|
}
|
|
9682
9684
|
return {
|
|
@@ -37514,7 +37516,7 @@ const SUPPORTED_HORIZONTAL_ALIGNMENTS = [
|
|
|
37514
37516
|
];
|
|
37515
37517
|
const SUPPORTED_VERTICAL_ALIGNMENTS = ["top", "center", "bottom"];
|
|
37516
37518
|
const SUPPORTED_FONTS = ["Arial"];
|
|
37517
|
-
const SUPPORTED_FILL_PATTERNS = ["solid"];
|
|
37519
|
+
const SUPPORTED_FILL_PATTERNS = ["solid", "none"];
|
|
37518
37520
|
const SUPPORTED_CF_TYPES = [
|
|
37519
37521
|
"expression",
|
|
37520
37522
|
"cellIs",
|
|
@@ -37714,7 +37716,7 @@ const SUBTOTAL_FUNCTION_CONVERSION_MAP = {
|
|
|
37714
37716
|
};
|
|
37715
37717
|
/** Mapping between Excel format indexes (see XLSX_FORMAT_MAP) and some supported formats */
|
|
37716
37718
|
const XLSX_FORMATS_CONVERSION_MAP = {
|
|
37717
|
-
0: "",
|
|
37719
|
+
0: "General",
|
|
37718
37720
|
1: "0",
|
|
37719
37721
|
2: "0.00",
|
|
37720
37722
|
3: "#,#00",
|
|
@@ -38040,11 +38042,11 @@ const XLSX_DATE_FORMAT_REGEX = /^(yy|yyyy|m{1,5}|d{1,4}|h{1,2}|s{1,2}|am\/pm|a\/
|
|
|
38040
38042
|
* Excel format are defined in openXML §18.8.31
|
|
38041
38043
|
*/
|
|
38042
38044
|
function convertXlsxFormat(numFmtId, formats, warningManager) {
|
|
38043
|
-
if (numFmtId === 0) {
|
|
38044
|
-
return undefined;
|
|
38045
|
-
}
|
|
38046
38045
|
// Format is either defined in the imported data, or the formatId is defined in openXML §18.8.30
|
|
38047
38046
|
const format = XLSX_FORMATS_CONVERSION_MAP[numFmtId] || formats.find((f) => f.id === numFmtId)?.format;
|
|
38047
|
+
if (format === "General") {
|
|
38048
|
+
return undefined;
|
|
38049
|
+
}
|
|
38048
38050
|
if (format) {
|
|
38049
38051
|
try {
|
|
38050
38052
|
let convertedFormat = format.replace(/\[(.*)-[A-Z0-9]{3}\]/g, "[$1]"); // remove currency and locale/date system/number system info (ECMA §18.8.31)
|
|
@@ -40622,10 +40624,11 @@ class XlsxSheetExtractor extends XlsxBaseExtractor {
|
|
|
40622
40624
|
});
|
|
40623
40625
|
}
|
|
40624
40626
|
extractRows(worksheet) {
|
|
40627
|
+
const spilledCells = new Set();
|
|
40625
40628
|
return this.mapOnElements({ parent: worksheet, query: "sheetData row" }, (rowElement) => {
|
|
40626
40629
|
return {
|
|
40627
40630
|
index: this.extractAttr(rowElement, "r", { required: true })?.asNum(),
|
|
40628
|
-
cells: this.extractCells(rowElement),
|
|
40631
|
+
cells: this.extractCells(rowElement, spilledCells),
|
|
40629
40632
|
height: this.extractAttr(rowElement, "ht")?.asNum(),
|
|
40630
40633
|
customHeight: this.extractAttr(rowElement, "customHeight")?.asBool(),
|
|
40631
40634
|
hidden: this.extractAttr(rowElement, "hidden")?.asBool(),
|
|
@@ -40635,14 +40638,26 @@ class XlsxSheetExtractor extends XlsxBaseExtractor {
|
|
|
40635
40638
|
};
|
|
40636
40639
|
});
|
|
40637
40640
|
}
|
|
40638
|
-
extractCells(row) {
|
|
40641
|
+
extractCells(row, spilledCells) {
|
|
40639
40642
|
return this.mapOnElements({ parent: row, query: "c" }, (cellElement) => {
|
|
40643
|
+
const xc = this.extractAttr(cellElement, "r", { required: true })?.asString();
|
|
40644
|
+
const formula = this.extractCellFormula(cellElement);
|
|
40645
|
+
if (formula?.ref && formula.sharedIndex === undefined) {
|
|
40646
|
+
const zone = toZone(formula.ref);
|
|
40647
|
+
for (const { col, row } of positions(zone)) {
|
|
40648
|
+
const followerXc = toXC(col, row);
|
|
40649
|
+
if (followerXc !== xc) {
|
|
40650
|
+
spilledCells.add(followerXc);
|
|
40651
|
+
}
|
|
40652
|
+
}
|
|
40653
|
+
}
|
|
40654
|
+
const isSpilled = spilledCells.has(xc);
|
|
40640
40655
|
return {
|
|
40641
|
-
xc
|
|
40656
|
+
xc,
|
|
40642
40657
|
styleIndex: this.extractAttr(cellElement, "s")?.asNum(),
|
|
40643
40658
|
type: CELL_TYPE_CONVERSION_MAP[this.extractAttr(cellElement, "t", { default: "n" })?.asString()],
|
|
40644
|
-
value: this.extractChildTextContent(cellElement, "v"),
|
|
40645
|
-
formula:
|
|
40659
|
+
value: isSpilled ? undefined : this.extractChildTextContent(cellElement, "v") ?? undefined,
|
|
40660
|
+
formula: isSpilled ? undefined : formula,
|
|
40646
40661
|
};
|
|
40647
40662
|
});
|
|
40648
40663
|
}
|
|
@@ -40650,11 +40665,14 @@ class XlsxSheetExtractor extends XlsxBaseExtractor {
|
|
|
40650
40665
|
const formulaElement = this.querySelector(cellElement, "f");
|
|
40651
40666
|
if (!formulaElement)
|
|
40652
40667
|
return undefined;
|
|
40653
|
-
|
|
40654
|
-
|
|
40655
|
-
|
|
40656
|
-
|
|
40657
|
-
|
|
40668
|
+
const content = this.extractTextContent(formulaElement);
|
|
40669
|
+
const sharedIndex = this.extractAttr(formulaElement, "si")?.asNum();
|
|
40670
|
+
const ref = this.extractAttr(formulaElement, "ref")?.asString();
|
|
40671
|
+
// This is the case of spilled cells of array formulas where <f> is empty
|
|
40672
|
+
if ((content === undefined || content.trim() === "") && sharedIndex === undefined) {
|
|
40673
|
+
return undefined;
|
|
40674
|
+
}
|
|
40675
|
+
return { content, sharedIndex, ref };
|
|
40658
40676
|
}
|
|
40659
40677
|
extractHyperLinks(worksheet) {
|
|
40660
40678
|
return this.mapOnElements({ parent: worksheet, query: "hyperlink" }, (linkElement) => {
|
|
@@ -70992,7 +71010,7 @@ class DataCleanupPlugin extends UIPlugin {
|
|
|
70992
71010
|
bottom: rowIndex,
|
|
70993
71011
|
}));
|
|
70994
71012
|
const handler = new CellClipboardHandler(this.getters, this.dispatch);
|
|
70995
|
-
const data = handler.copy(getClipboardDataPositions(sheetId, rowsToKeep));
|
|
71013
|
+
const data = handler.copy(getClipboardDataPositions(sheetId, rowsToKeep), false);
|
|
70996
71014
|
if (!data) {
|
|
70997
71015
|
return;
|
|
70998
71016
|
}
|
|
@@ -73077,12 +73095,12 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
73077
73095
|
}
|
|
73078
73096
|
case "INSERT_CELL": {
|
|
73079
73097
|
const { cut, paste } = this.getInsertCellsTargets(cmd.zone, cmd.shiftDimension);
|
|
73080
|
-
const copiedData = this.copy(cut);
|
|
73098
|
+
const copiedData = this.copy(cut, "shiftCells");
|
|
73081
73099
|
return this.isPasteAllowed(paste, copiedData, { isCutOperation: true });
|
|
73082
73100
|
}
|
|
73083
73101
|
case "DELETE_CELL": {
|
|
73084
73102
|
const { cut, paste } = this.getDeleteCellsTargets(cmd.zone, cmd.shiftDimension);
|
|
73085
|
-
const copiedData = this.copy(cut);
|
|
73103
|
+
const copiedData = this.copy(cut, "shiftCells");
|
|
73086
73104
|
return this.isPasteAllowed(paste, copiedData, { isCutOperation: true });
|
|
73087
73105
|
}
|
|
73088
73106
|
}
|
|
@@ -73193,13 +73211,13 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
73193
73211
|
});
|
|
73194
73212
|
break;
|
|
73195
73213
|
}
|
|
73196
|
-
const copiedData = this.copy(cut);
|
|
73214
|
+
const copiedData = this.copy(cut, "shiftCells");
|
|
73197
73215
|
this.paste(paste, copiedData, { isCutOperation: true });
|
|
73198
73216
|
break;
|
|
73199
73217
|
}
|
|
73200
73218
|
case "INSERT_CELL": {
|
|
73201
73219
|
const { cut, paste } = this.getInsertCellsTargets(cmd.zone, cmd.shiftDimension);
|
|
73202
|
-
const copiedData = this.copy(cut);
|
|
73220
|
+
const copiedData = this.copy(cut, "shiftCells");
|
|
73203
73221
|
this.paste(paste, copiedData, { isCutOperation: true });
|
|
73204
73222
|
break;
|
|
73205
73223
|
}
|
|
@@ -73314,11 +73332,11 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
73314
73332
|
}
|
|
73315
73333
|
return false;
|
|
73316
73334
|
}
|
|
73317
|
-
copy(zones) {
|
|
73335
|
+
copy(zones, mode = "copyPaste") {
|
|
73318
73336
|
const copiedData = {};
|
|
73319
73337
|
const clipboardData = this.getClipboardData(zones);
|
|
73320
73338
|
for (const { handlerName, handler } of this.selectClipboardHandlers(clipboardData)) {
|
|
73321
|
-
const data = handler.copy(clipboardData, this._isCutOperation);
|
|
73339
|
+
const data = handler.copy(clipboardData, this._isCutOperation, mode);
|
|
73322
73340
|
copiedData[handlerName] = data;
|
|
73323
73341
|
const minimalKeys = ["sheetId", "cells", "zones", "figureId"];
|
|
73324
73342
|
for (const key of minimalKeys) {
|
|
@@ -74332,7 +74350,7 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
74332
74350
|
];
|
|
74333
74351
|
for (const Handler of clipboardHandlersRegistries.cellHandlers.getAll()) {
|
|
74334
74352
|
const handler = new Handler(this.getters, this.dispatch);
|
|
74335
|
-
const data = handler.copy(getClipboardDataPositions(sheetId, target));
|
|
74353
|
+
const data = handler.copy(getClipboardDataPositions(sheetId, target), false, "shiftCells");
|
|
74336
74354
|
if (!data) {
|
|
74337
74355
|
continue;
|
|
74338
74356
|
}
|
|
@@ -84072,7 +84090,7 @@ class Model extends EventBus {
|
|
|
84072
84090
|
handlers = [];
|
|
84073
84091
|
uiHandlers = [];
|
|
84074
84092
|
coreHandlers = [];
|
|
84075
|
-
constructor(data = {}, config = {}, stateUpdateMessages = [], uuidGenerator = new UuidGenerator(), verboseImport =
|
|
84093
|
+
constructor(data = {}, config = {}, stateUpdateMessages = [], uuidGenerator = new UuidGenerator(), verboseImport = false) {
|
|
84076
84094
|
const start = performance.now();
|
|
84077
84095
|
console.debug("##### Model creation #####");
|
|
84078
84096
|
super();
|
|
@@ -84822,6 +84840,6 @@ exports.tokenColors = tokenColors;
|
|
|
84822
84840
|
exports.tokenize = tokenize;
|
|
84823
84841
|
|
|
84824
84842
|
|
|
84825
|
-
__info__.version = "18.4.
|
|
84826
|
-
__info__.date = "2025-09-
|
|
84827
|
-
__info__.hash = "
|
|
84843
|
+
__info__.version = "18.4.10";
|
|
84844
|
+
__info__.date = "2025-09-11T08:45:39.178Z";
|
|
84845
|
+
__info__.hash = "15a11a4";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -2670,6 +2670,7 @@ interface ClipboardOptions {
|
|
|
2670
2670
|
selectTarget?: boolean;
|
|
2671
2671
|
}
|
|
2672
2672
|
type ClipboardPasteOptions = "onlyFormat" | "asValue";
|
|
2673
|
+
type ClipboardCopyOptions = "copyPaste" | "shiftCells";
|
|
2673
2674
|
type ClipboardOperation = "CUT" | "COPY";
|
|
2674
2675
|
type ClipboardCellData = {
|
|
2675
2676
|
sheetId: UID;
|
|
@@ -6773,7 +6774,7 @@ declare class ClipboardHandler<T> {
|
|
|
6773
6774
|
protected getters: Getters;
|
|
6774
6775
|
protected dispatch: CommandDispatcher["dispatch"];
|
|
6775
6776
|
constructor(getters: Getters, dispatch: CommandDispatcher["dispatch"]);
|
|
6776
|
-
copy(data: ClipboardData, isCutOperation: boolean): T | undefined;
|
|
6777
|
+
copy(data: ClipboardData, isCutOperation: boolean, mode?: ClipboardCopyOptions): T | undefined;
|
|
6777
6778
|
paste(target: ClipboardPasteTarget, clippedContent: T, options: ClipboardOptions): void;
|
|
6778
6779
|
isPasteAllowed(sheetId: UID, target: Zone[], content: T, option: ClipboardOptions): CommandResult;
|
|
6779
6780
|
isCutAllowed(data: ClipboardData): CommandResult;
|
|
@@ -6782,7 +6783,7 @@ declare class ClipboardHandler<T> {
|
|
|
6782
6783
|
}
|
|
6783
6784
|
|
|
6784
6785
|
declare class AbstractCellClipboardHandler<T, T1> extends ClipboardHandler<T> {
|
|
6785
|
-
copy(data: ClipboardCellData): T | undefined;
|
|
6786
|
+
copy(data: ClipboardCellData, isCutOperation: boolean, mode?: ClipboardCopyOptions): T | undefined;
|
|
6786
6787
|
pasteFromCopy(sheetId: UID, target: Zone[], content: T1[][], options?: ClipboardOptions): void;
|
|
6787
6788
|
protected pasteZone(sheetId: UID, col: HeaderIndex, row: HeaderIndex, data: T1[][], clipboardOptions?: ClipboardOptions): void;
|
|
6788
6789
|
}
|
|
@@ -13213,4 +13214,4 @@ declare const chartHelpers: {
|
|
|
13213
13214
|
WaterfallChart: typeof WaterfallChart;
|
|
13214
13215
|
};
|
|
13215
13216
|
|
|
13216
|
-
export { AST, ASTFuncall, AboveAverageRule, AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, ActivateNextSheetCommand, ActivatePreviousSheetCommand, ActivateSheetCommand, AdaptSheetName, AddColumnsRowsCommand, AddConditionalFormatCommand, AddDataValidationCommand, AddFunctionDescription, AddMergeCommand, AddPivotCommand, Aggregator, Alias, Align, AlphanumericIncrementModifier, AnchorOffset, 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, BorderDescrWithOpacity, BorderPosition, BorderStyle, Box, BoxTextContent, CHART_TYPES, CSSProperties, CancelledReason, Cell, CellErrorType, CellIsRule, CellPosition, CellValue, CellValueType, ChangeType, ChartAxisFormats, ChartCreationContext, ChartDatasetOrientation, ChartDefinition, ChartJSRuntime, ChartRuntime, ChartRuntimeGenerationArgs, ChartStyle, ChartType, ChartWithAxisDefinition, ChartWithDataSetDefinition, CleanClipBoardHighlightCommand, ClearCellCommand, ClearCellsCommand, ClearFormattingCommand, Client, ClientDisconnectedError, ClientId, ClientJoinedMessage, ClientLeftMessage, ClientMovedMessage, ClientPosition, ClientWithColor, ClientWithPosition, 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, CriterionFilter, Currency, CustomFormulaCriterion, CustomizedDataSet, CutCommand, DEFAULT_LOCALE, DEFAULT_LOCALES, DIRECTION, DOMCoordinates, DOMDimension, DataBarFill, DataBarRule, DataBarRuleInternal, DataFilterValue, DataSet, DataValidationCriterion, DataValidationCriterionType, DataValidationDateCriterion, DataValidationRule, DataValidationRuleData, DatasetDesign, DatasetValues, DateCriterionValue, DateIncrementModifier, DateIsAfterCriterion, DateIsBeforeCriterion, DateIsBetweenCriterion, DateIsCriterion, DateIsNotBetweenCriterion, DateIsOnOrAfterCriterion, DateIsOnOrBeforeCriterion, DateIsValidCriterion, DebouncedFunction, DeleteCellCommand, DeleteContentCommand, DeleteFigureCommand, DeleteSheetCommand, DeleteUnfilteredContentCommand, 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, EvaluatedCriterion, EvaluatedDateCriterion, EvaluationError, ExcelChartDataset, ExcelChartDefinition, ExcelChartTrendConfiguration, ExcelChartType, ExcelFigureSize, ExcelFilterData, ExcelHeaderData, ExcelSheetData, ExcelTableData, ExcelTrendlineType, ExcelWorkbookData, ExpressionRule, Figure, FigureData, FigureInfo, FigureSize, FigureUI, Filter, FilterCriterionType, FilterId, FoldAllHeaderGroupsCommand, FoldHeaderGroupCommand, FoldHeaderGroupsInZoneCommand, Format, FormattedValue, FormulaCell, FormulaModifier, FormulaToExecute, FreezeColumnsCommand, FreezeRowsCommand, FunctionDescription, FunctionRegistry, FunctionResultNumber, FunctionResultObject, GeneratorCell, GenericCriterion, GenericCriterionType, GenericDateCriterion, 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, LocalTransportService, 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, ParsedOsClipboardContentWithImageData, PasteCommand, PasteFromOSClipboardCommand, Pivot, PivotColRowDomain, PivotCollapsedDomains, 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, PivotVisibilityOptions, Pixel, PixelPosition, Position$1 as Position, PositionDependentCommand, PropsOf, RGBA, Range, RangeAdapter$1 as RangeAdapter, RangeCompiledFormula, RangeData, RangePart, RangeProvider, RangeStringOptions, RangesDependentCommand, Rect, RedoCommand, Ref, ReferenceDenormalizer, RefreshPivotCommand, Registry, RemoteRevisionMessage, RemoteRevisionReceivedEvent, RemoveColumnsRowsCommand, RemoveConditionalFormatCommand, RemoveDataValidationCommand, RemoveDuplicatesCommand, RemoveMergeCommand, RemovePivotCommand, RemoveTableCommand, RemoveTableStyleCommand, RenamePivotCommand, RenameSheetCommand, RenderingBorder, RenderingBox, RenderingGridIcon, RepeatPasteCommand, ReplaceSearchCommand, RequestRedoCommand, RequestUndoCommand, ResizeColumnsRowsCommand, ResizeDirection, ResizeTableCommand, ResizeViewportCommand, Revision, RevisionAcknowledgedEvent, RevisionData, RevisionRedone, RevisionRedoneMessage, RevisionUndone, RevisionUndoneMessage, Row, SPREADSHEET_DIMENSIONS, ScrollDirection$1 as ScrollDirection, SelectFigureCommand, Selection$1 as Selection, SelectionStep, SetBorderCommand, SetBorderTargetCommand, SetContextualFormatCommand, SetDecimalCommand, SetDecimalStep, SetFormattingCommand, SetGridLinesVisibilityCommand, SetViewportOffsetCommand, SetZoneBordersCommand, Sheet, SheetDOMScrollInfo, SheetData, SheetDependentCommand, SheetEditingCommand, 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, ToggleCheckboxCommand, 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, ValuesFilter, VerticalAlign, Viewport, WorkbookData, WorkbookHistory, Wrapping, Zone, ZoneDependentCommand, ZoneDimension, __info__, addFunction, addRenderingLayer, astToFormula, availableConditionalFormatOperators, availableDataValidationOperators, availableFiltersOperators, borderStyles, canExecuteInReadonly, chartHelpers, compile, compileTokens, components, constants, containsBlanksRule, containsErrorsRule, convertAstNodes, coreTypes, filterDateCriterionOperators, filterNumberCriterionOperators, filterTextCriterionOperators, 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 };
|
|
13217
|
+
export { AST, ASTFuncall, AboveAverageRule, AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, ActivateNextSheetCommand, ActivatePreviousSheetCommand, ActivateSheetCommand, AdaptSheetName, AddColumnsRowsCommand, AddConditionalFormatCommand, AddDataValidationCommand, AddFunctionDescription, AddMergeCommand, AddPivotCommand, Aggregator, Alias, Align, AlphanumericIncrementModifier, AnchorOffset, 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, BorderDescrWithOpacity, BorderPosition, BorderStyle, Box, BoxTextContent, CHART_TYPES, CSSProperties, CancelledReason, Cell, CellErrorType, CellIsRule, CellPosition, CellValue, CellValueType, ChangeType, ChartAxisFormats, ChartCreationContext, ChartDatasetOrientation, ChartDefinition, ChartJSRuntime, ChartRuntime, ChartRuntimeGenerationArgs, ChartStyle, ChartType, ChartWithAxisDefinition, ChartWithDataSetDefinition, CleanClipBoardHighlightCommand, ClearCellCommand, ClearCellsCommand, ClearFormattingCommand, Client, ClientDisconnectedError, ClientId, ClientJoinedMessage, ClientLeftMessage, ClientMovedMessage, ClientPosition, ClientWithColor, ClientWithPosition, 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, CriterionFilter, Currency, CustomFormulaCriterion, CustomizedDataSet, CutCommand, DEFAULT_LOCALE, DEFAULT_LOCALES, DIRECTION, DOMCoordinates, DOMDimension, DataBarFill, DataBarRule, DataBarRuleInternal, DataFilterValue, DataSet, DataValidationCriterion, DataValidationCriterionType, DataValidationDateCriterion, DataValidationRule, DataValidationRuleData, DatasetDesign, DatasetValues, DateCriterionValue, DateIncrementModifier, DateIsAfterCriterion, DateIsBeforeCriterion, DateIsBetweenCriterion, DateIsCriterion, DateIsNotBetweenCriterion, DateIsOnOrAfterCriterion, DateIsOnOrBeforeCriterion, DateIsValidCriterion, DebouncedFunction, DeleteCellCommand, DeleteContentCommand, DeleteFigureCommand, DeleteSheetCommand, DeleteUnfilteredContentCommand, 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, EvaluatedCriterion, EvaluatedDateCriterion, EvaluationError, ExcelChartDataset, ExcelChartDefinition, ExcelChartTrendConfiguration, ExcelChartType, ExcelFigureSize, ExcelFilterData, ExcelHeaderData, ExcelSheetData, ExcelTableData, ExcelTrendlineType, ExcelWorkbookData, ExpressionRule, Figure, FigureData, FigureInfo, FigureSize, FigureUI, Filter, FilterCriterionType, FilterId, FoldAllHeaderGroupsCommand, FoldHeaderGroupCommand, FoldHeaderGroupsInZoneCommand, Format, FormattedValue, FormulaCell, FormulaModifier, FormulaToExecute, FreezeColumnsCommand, FreezeRowsCommand, FunctionDescription, FunctionRegistry, FunctionResultNumber, FunctionResultObject, GeneratorCell, GenericCriterion, GenericCriterionType, GenericDateCriterion, 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, LocalTransportService, 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, ParsedOsClipboardContentWithImageData, PasteCommand, PasteFromOSClipboardCommand, Pivot, PivotColRowDomain, PivotCollapsedDomains, 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, PivotVisibilityOptions, Pixel, PixelPosition, Position$1 as Position, PositionDependentCommand, PropsOf, RGBA, Range, RangeAdapter$1 as RangeAdapter, RangeCompiledFormula, RangeData, RangePart, RangeProvider, RangeStringOptions, RangesDependentCommand, Rect, RedoCommand, Ref, ReferenceDenormalizer, RefreshPivotCommand, Registry, RemoteRevisionMessage, RemoteRevisionReceivedEvent, RemoveColumnsRowsCommand, RemoveConditionalFormatCommand, RemoveDataValidationCommand, RemoveDuplicatesCommand, RemoveMergeCommand, RemovePivotCommand, RemoveTableCommand, RemoveTableStyleCommand, RenamePivotCommand, RenameSheetCommand, RenderingBorder, RenderingBox, RenderingGridIcon, RepeatPasteCommand, ReplaceSearchCommand, RequestRedoCommand, RequestUndoCommand, ResizeColumnsRowsCommand, ResizeDirection, ResizeTableCommand, ResizeViewportCommand, Revision, RevisionAcknowledgedEvent, RevisionData, RevisionRedone, RevisionRedoneMessage, RevisionUndone, RevisionUndoneMessage, Row, SPREADSHEET_DIMENSIONS, ScrollDirection$1 as ScrollDirection, SelectFigureCommand, Selection$1 as Selection, SelectionStep, SetBorderCommand, SetBorderTargetCommand, SetContextualFormatCommand, SetDecimalCommand, SetDecimalStep, SetFormattingCommand, SetGridLinesVisibilityCommand, SetViewportOffsetCommand, SetZoneBordersCommand, Sheet, SheetDOMScrollInfo, SheetData, SheetDependentCommand, SheetEditingCommand, 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, ToggleCheckboxCommand, 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, ValuesFilter, VerticalAlign, Viewport, WorkbookData, WorkbookHistory, Wrapping, Zone, ZoneDependentCommand, ZoneDimension, __info__, addFunction, addRenderingLayer, astToFormula, availableConditionalFormatOperators, availableDataValidationOperators, availableFiltersOperators, borderStyles, canExecuteInReadonly, chartHelpers, compile, compileTokens, components, constants, containsBlanksRule, containsErrorsRule, convertAstNodes, coreTypes, filterDateCriterionOperators, filterNumberCriterionOperators, filterTextCriterionOperators, 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.4.
|
|
6
|
-
* @date 2025-09-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.4.10
|
|
6
|
+
* @date 2025-09-11T08:45:39.178Z
|
|
7
|
+
* @hash 15a11a4
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, App, blockDom, useState, onPatched, useExternalListener, onWillUpdateProps, onWillStart, onWillPatch, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
|
|
@@ -7354,7 +7354,7 @@ class ClipboardHandler {
|
|
|
7354
7354
|
this.getters = getters;
|
|
7355
7355
|
this.dispatch = dispatch;
|
|
7356
7356
|
}
|
|
7357
|
-
copy(data, isCutOperation) {
|
|
7357
|
+
copy(data, isCutOperation, mode = "copyPaste") {
|
|
7358
7358
|
return;
|
|
7359
7359
|
}
|
|
7360
7360
|
paste(target, clippedContent, options) { }
|
|
@@ -7373,7 +7373,7 @@ class ClipboardHandler {
|
|
|
7373
7373
|
}
|
|
7374
7374
|
|
|
7375
7375
|
class AbstractCellClipboardHandler extends ClipboardHandler {
|
|
7376
|
-
copy(data) {
|
|
7376
|
+
copy(data, isCutOperation, mode = "copyPaste") {
|
|
7377
7377
|
return;
|
|
7378
7378
|
}
|
|
7379
7379
|
pasteFromCopy(sheetId, target, content, options) {
|
|
@@ -8903,7 +8903,7 @@ class CellClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
8903
8903
|
}
|
|
8904
8904
|
return "Success" /* CommandResult.Success */;
|
|
8905
8905
|
}
|
|
8906
|
-
copy(data) {
|
|
8906
|
+
copy(data, isCutOperation, mode = "copyPaste") {
|
|
8907
8907
|
const sheetId = data.sheetId;
|
|
8908
8908
|
const { clippedZones, rowsIndexes, columnsIndexes } = data;
|
|
8909
8909
|
const clippedCells = [];
|
|
@@ -8916,7 +8916,7 @@ class CellClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
8916
8916
|
const evaluatedCell = this.getters.getEvaluatedCell(position);
|
|
8917
8917
|
const pivotId = this.getters.getPivotIdFromPosition(position);
|
|
8918
8918
|
const spreader = this.getters.getArrayFormulaSpreadingOn(position);
|
|
8919
|
-
if (pivotId && spreader) {
|
|
8919
|
+
if (mode !== "shiftCells" && pivotId && spreader) {
|
|
8920
8920
|
const pivotZone = this.getters.getSpreadZone(spreader);
|
|
8921
8921
|
if ((!deepEquals(spreader, position) || !isCopyingOneCell) &&
|
|
8922
8922
|
pivotZone &&
|
|
@@ -8934,7 +8934,7 @@ class CellClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
8934
8934
|
};
|
|
8935
8935
|
}
|
|
8936
8936
|
}
|
|
8937
|
-
else {
|
|
8937
|
+
else if (mode !== "shiftCells") {
|
|
8938
8938
|
if (spreader && !deepEquals(spreader, position)) {
|
|
8939
8939
|
const isSpreaderCopied = rowsIndexes.includes(spreader.row) && columnsIndexes.includes(spreader.col);
|
|
8940
8940
|
const content = isSpreaderCopied
|
|
@@ -9632,7 +9632,7 @@ class SheetClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
9632
9632
|
}
|
|
9633
9633
|
|
|
9634
9634
|
class TableClipboardHandler extends AbstractCellClipboardHandler {
|
|
9635
|
-
copy(data, isCutOperation) {
|
|
9635
|
+
copy(data, isCutOperation, mode = "copyPaste") {
|
|
9636
9636
|
const sheetId = data.sheetId;
|
|
9637
9637
|
const { rowsIndexes, columnsIndexes, zones } = data;
|
|
9638
9638
|
const copiedTablesIds = new Set();
|
|
@@ -9670,11 +9670,13 @@ class TableClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
9670
9670
|
type: coreTable.type,
|
|
9671
9671
|
};
|
|
9672
9672
|
}
|
|
9673
|
-
|
|
9674
|
-
|
|
9675
|
-
|
|
9676
|
-
|
|
9677
|
-
|
|
9673
|
+
if (mode !== "shiftCells") {
|
|
9674
|
+
tableCellsInRow.push({
|
|
9675
|
+
table: copiedTable,
|
|
9676
|
+
style: this.getTableStyleToCopy(position),
|
|
9677
|
+
isWholeTableCopied: copiedTablesIds.has(table.id),
|
|
9678
|
+
});
|
|
9679
|
+
}
|
|
9678
9680
|
}
|
|
9679
9681
|
}
|
|
9680
9682
|
return {
|
|
@@ -37512,7 +37514,7 @@ const SUPPORTED_HORIZONTAL_ALIGNMENTS = [
|
|
|
37512
37514
|
];
|
|
37513
37515
|
const SUPPORTED_VERTICAL_ALIGNMENTS = ["top", "center", "bottom"];
|
|
37514
37516
|
const SUPPORTED_FONTS = ["Arial"];
|
|
37515
|
-
const SUPPORTED_FILL_PATTERNS = ["solid"];
|
|
37517
|
+
const SUPPORTED_FILL_PATTERNS = ["solid", "none"];
|
|
37516
37518
|
const SUPPORTED_CF_TYPES = [
|
|
37517
37519
|
"expression",
|
|
37518
37520
|
"cellIs",
|
|
@@ -37712,7 +37714,7 @@ const SUBTOTAL_FUNCTION_CONVERSION_MAP = {
|
|
|
37712
37714
|
};
|
|
37713
37715
|
/** Mapping between Excel format indexes (see XLSX_FORMAT_MAP) and some supported formats */
|
|
37714
37716
|
const XLSX_FORMATS_CONVERSION_MAP = {
|
|
37715
|
-
0: "",
|
|
37717
|
+
0: "General",
|
|
37716
37718
|
1: "0",
|
|
37717
37719
|
2: "0.00",
|
|
37718
37720
|
3: "#,#00",
|
|
@@ -38038,11 +38040,11 @@ const XLSX_DATE_FORMAT_REGEX = /^(yy|yyyy|m{1,5}|d{1,4}|h{1,2}|s{1,2}|am\/pm|a\/
|
|
|
38038
38040
|
* Excel format are defined in openXML §18.8.31
|
|
38039
38041
|
*/
|
|
38040
38042
|
function convertXlsxFormat(numFmtId, formats, warningManager) {
|
|
38041
|
-
if (numFmtId === 0) {
|
|
38042
|
-
return undefined;
|
|
38043
|
-
}
|
|
38044
38043
|
// Format is either defined in the imported data, or the formatId is defined in openXML §18.8.30
|
|
38045
38044
|
const format = XLSX_FORMATS_CONVERSION_MAP[numFmtId] || formats.find((f) => f.id === numFmtId)?.format;
|
|
38045
|
+
if (format === "General") {
|
|
38046
|
+
return undefined;
|
|
38047
|
+
}
|
|
38046
38048
|
if (format) {
|
|
38047
38049
|
try {
|
|
38048
38050
|
let convertedFormat = format.replace(/\[(.*)-[A-Z0-9]{3}\]/g, "[$1]"); // remove currency and locale/date system/number system info (ECMA §18.8.31)
|
|
@@ -40620,10 +40622,11 @@ class XlsxSheetExtractor extends XlsxBaseExtractor {
|
|
|
40620
40622
|
});
|
|
40621
40623
|
}
|
|
40622
40624
|
extractRows(worksheet) {
|
|
40625
|
+
const spilledCells = new Set();
|
|
40623
40626
|
return this.mapOnElements({ parent: worksheet, query: "sheetData row" }, (rowElement) => {
|
|
40624
40627
|
return {
|
|
40625
40628
|
index: this.extractAttr(rowElement, "r", { required: true })?.asNum(),
|
|
40626
|
-
cells: this.extractCells(rowElement),
|
|
40629
|
+
cells: this.extractCells(rowElement, spilledCells),
|
|
40627
40630
|
height: this.extractAttr(rowElement, "ht")?.asNum(),
|
|
40628
40631
|
customHeight: this.extractAttr(rowElement, "customHeight")?.asBool(),
|
|
40629
40632
|
hidden: this.extractAttr(rowElement, "hidden")?.asBool(),
|
|
@@ -40633,14 +40636,26 @@ class XlsxSheetExtractor extends XlsxBaseExtractor {
|
|
|
40633
40636
|
};
|
|
40634
40637
|
});
|
|
40635
40638
|
}
|
|
40636
|
-
extractCells(row) {
|
|
40639
|
+
extractCells(row, spilledCells) {
|
|
40637
40640
|
return this.mapOnElements({ parent: row, query: "c" }, (cellElement) => {
|
|
40641
|
+
const xc = this.extractAttr(cellElement, "r", { required: true })?.asString();
|
|
40642
|
+
const formula = this.extractCellFormula(cellElement);
|
|
40643
|
+
if (formula?.ref && formula.sharedIndex === undefined) {
|
|
40644
|
+
const zone = toZone(formula.ref);
|
|
40645
|
+
for (const { col, row } of positions(zone)) {
|
|
40646
|
+
const followerXc = toXC(col, row);
|
|
40647
|
+
if (followerXc !== xc) {
|
|
40648
|
+
spilledCells.add(followerXc);
|
|
40649
|
+
}
|
|
40650
|
+
}
|
|
40651
|
+
}
|
|
40652
|
+
const isSpilled = spilledCells.has(xc);
|
|
40638
40653
|
return {
|
|
40639
|
-
xc
|
|
40654
|
+
xc,
|
|
40640
40655
|
styleIndex: this.extractAttr(cellElement, "s")?.asNum(),
|
|
40641
40656
|
type: CELL_TYPE_CONVERSION_MAP[this.extractAttr(cellElement, "t", { default: "n" })?.asString()],
|
|
40642
|
-
value: this.extractChildTextContent(cellElement, "v"),
|
|
40643
|
-
formula:
|
|
40657
|
+
value: isSpilled ? undefined : this.extractChildTextContent(cellElement, "v") ?? undefined,
|
|
40658
|
+
formula: isSpilled ? undefined : formula,
|
|
40644
40659
|
};
|
|
40645
40660
|
});
|
|
40646
40661
|
}
|
|
@@ -40648,11 +40663,14 @@ class XlsxSheetExtractor extends XlsxBaseExtractor {
|
|
|
40648
40663
|
const formulaElement = this.querySelector(cellElement, "f");
|
|
40649
40664
|
if (!formulaElement)
|
|
40650
40665
|
return undefined;
|
|
40651
|
-
|
|
40652
|
-
|
|
40653
|
-
|
|
40654
|
-
|
|
40655
|
-
|
|
40666
|
+
const content = this.extractTextContent(formulaElement);
|
|
40667
|
+
const sharedIndex = this.extractAttr(formulaElement, "si")?.asNum();
|
|
40668
|
+
const ref = this.extractAttr(formulaElement, "ref")?.asString();
|
|
40669
|
+
// This is the case of spilled cells of array formulas where <f> is empty
|
|
40670
|
+
if ((content === undefined || content.trim() === "") && sharedIndex === undefined) {
|
|
40671
|
+
return undefined;
|
|
40672
|
+
}
|
|
40673
|
+
return { content, sharedIndex, ref };
|
|
40656
40674
|
}
|
|
40657
40675
|
extractHyperLinks(worksheet) {
|
|
40658
40676
|
return this.mapOnElements({ parent: worksheet, query: "hyperlink" }, (linkElement) => {
|
|
@@ -70990,7 +71008,7 @@ class DataCleanupPlugin extends UIPlugin {
|
|
|
70990
71008
|
bottom: rowIndex,
|
|
70991
71009
|
}));
|
|
70992
71010
|
const handler = new CellClipboardHandler(this.getters, this.dispatch);
|
|
70993
|
-
const data = handler.copy(getClipboardDataPositions(sheetId, rowsToKeep));
|
|
71011
|
+
const data = handler.copy(getClipboardDataPositions(sheetId, rowsToKeep), false);
|
|
70994
71012
|
if (!data) {
|
|
70995
71013
|
return;
|
|
70996
71014
|
}
|
|
@@ -73075,12 +73093,12 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
73075
73093
|
}
|
|
73076
73094
|
case "INSERT_CELL": {
|
|
73077
73095
|
const { cut, paste } = this.getInsertCellsTargets(cmd.zone, cmd.shiftDimension);
|
|
73078
|
-
const copiedData = this.copy(cut);
|
|
73096
|
+
const copiedData = this.copy(cut, "shiftCells");
|
|
73079
73097
|
return this.isPasteAllowed(paste, copiedData, { isCutOperation: true });
|
|
73080
73098
|
}
|
|
73081
73099
|
case "DELETE_CELL": {
|
|
73082
73100
|
const { cut, paste } = this.getDeleteCellsTargets(cmd.zone, cmd.shiftDimension);
|
|
73083
|
-
const copiedData = this.copy(cut);
|
|
73101
|
+
const copiedData = this.copy(cut, "shiftCells");
|
|
73084
73102
|
return this.isPasteAllowed(paste, copiedData, { isCutOperation: true });
|
|
73085
73103
|
}
|
|
73086
73104
|
}
|
|
@@ -73191,13 +73209,13 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
73191
73209
|
});
|
|
73192
73210
|
break;
|
|
73193
73211
|
}
|
|
73194
|
-
const copiedData = this.copy(cut);
|
|
73212
|
+
const copiedData = this.copy(cut, "shiftCells");
|
|
73195
73213
|
this.paste(paste, copiedData, { isCutOperation: true });
|
|
73196
73214
|
break;
|
|
73197
73215
|
}
|
|
73198
73216
|
case "INSERT_CELL": {
|
|
73199
73217
|
const { cut, paste } = this.getInsertCellsTargets(cmd.zone, cmd.shiftDimension);
|
|
73200
|
-
const copiedData = this.copy(cut);
|
|
73218
|
+
const copiedData = this.copy(cut, "shiftCells");
|
|
73201
73219
|
this.paste(paste, copiedData, { isCutOperation: true });
|
|
73202
73220
|
break;
|
|
73203
73221
|
}
|
|
@@ -73312,11 +73330,11 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
73312
73330
|
}
|
|
73313
73331
|
return false;
|
|
73314
73332
|
}
|
|
73315
|
-
copy(zones) {
|
|
73333
|
+
copy(zones, mode = "copyPaste") {
|
|
73316
73334
|
const copiedData = {};
|
|
73317
73335
|
const clipboardData = this.getClipboardData(zones);
|
|
73318
73336
|
for (const { handlerName, handler } of this.selectClipboardHandlers(clipboardData)) {
|
|
73319
|
-
const data = handler.copy(clipboardData, this._isCutOperation);
|
|
73337
|
+
const data = handler.copy(clipboardData, this._isCutOperation, mode);
|
|
73320
73338
|
copiedData[handlerName] = data;
|
|
73321
73339
|
const minimalKeys = ["sheetId", "cells", "zones", "figureId"];
|
|
73322
73340
|
for (const key of minimalKeys) {
|
|
@@ -74330,7 +74348,7 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
74330
74348
|
];
|
|
74331
74349
|
for (const Handler of clipboardHandlersRegistries.cellHandlers.getAll()) {
|
|
74332
74350
|
const handler = new Handler(this.getters, this.dispatch);
|
|
74333
|
-
const data = handler.copy(getClipboardDataPositions(sheetId, target));
|
|
74351
|
+
const data = handler.copy(getClipboardDataPositions(sheetId, target), false, "shiftCells");
|
|
74334
74352
|
if (!data) {
|
|
74335
74353
|
continue;
|
|
74336
74354
|
}
|
|
@@ -84070,7 +84088,7 @@ class Model extends EventBus {
|
|
|
84070
84088
|
handlers = [];
|
|
84071
84089
|
uiHandlers = [];
|
|
84072
84090
|
coreHandlers = [];
|
|
84073
|
-
constructor(data = {}, config = {}, stateUpdateMessages = [], uuidGenerator = new UuidGenerator(), verboseImport =
|
|
84091
|
+
constructor(data = {}, config = {}, stateUpdateMessages = [], uuidGenerator = new UuidGenerator(), verboseImport = false) {
|
|
84074
84092
|
const start = performance.now();
|
|
84075
84093
|
console.debug("##### Model creation #####");
|
|
84076
84094
|
super();
|
|
@@ -84772,6 +84790,6 @@ const chartHelpers = { ...CHART_HELPERS, ...CHART_RUNTIME_HELPERS };
|
|
|
84772
84790
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, ClientDisconnectedError, CommandResult, CorePlugin, CoreViewPlugin, DispatchResult, EvaluationError, LocalTransportService, 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, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
84773
84791
|
|
|
84774
84792
|
|
|
84775
|
-
__info__.version = "18.4.
|
|
84776
|
-
__info__.date = "2025-09-
|
|
84777
|
-
__info__.hash = "
|
|
84793
|
+
__info__.version = "18.4.10";
|
|
84794
|
+
__info__.date = "2025-09-11T08:45:39.178Z";
|
|
84795
|
+
__info__.hash = "15a11a4";
|