@odoo/o-spreadsheet 18.0.34 → 18.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/o-spreadsheet.cjs.js +104 -61
- package/dist/o-spreadsheet.d.ts +8 -8
- package/dist/o-spreadsheet.esm.js +104 -61
- package/dist/o-spreadsheet.iife.js +104 -61
- package/dist/o-spreadsheet.iife.min.js +169 -169
- package/dist/o_spreadsheet.xml +3 -3
- package/package.json +1 -1
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 18.0.
|
|
6
|
-
* @date 2025-06-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.0.35
|
|
6
|
+
* @date 2025-06-23T15:06:32.032Z
|
|
7
|
+
* @hash a38db25
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -6663,6 +6663,63 @@ function parseOSClipboardContent(content) {
|
|
|
6663
6663
|
data: spreadsheetContent,
|
|
6664
6664
|
};
|
|
6665
6665
|
}
|
|
6666
|
+
/**
|
|
6667
|
+
* Applies each clipboard handler to paste its corresponding data into the target.
|
|
6668
|
+
*/
|
|
6669
|
+
const applyClipboardHandlersPaste = (handlers, copiedData, target, options) => {
|
|
6670
|
+
handlers.forEach(({ handlerName, handler }) => {
|
|
6671
|
+
const data = copiedData[handlerName];
|
|
6672
|
+
if (data) {
|
|
6673
|
+
handler.paste(target, data, options);
|
|
6674
|
+
}
|
|
6675
|
+
});
|
|
6676
|
+
};
|
|
6677
|
+
/**
|
|
6678
|
+
* Returns the paste target based on clipboard handlers.
|
|
6679
|
+
* Also includes the full affected zone and the list of pasted zones for selection.
|
|
6680
|
+
*/
|
|
6681
|
+
function getPasteTargetFromHandlers(sheetId, zones, copiedData, handlers, options) {
|
|
6682
|
+
let zone = undefined;
|
|
6683
|
+
let selectedZones = [];
|
|
6684
|
+
let target = {
|
|
6685
|
+
sheetId,
|
|
6686
|
+
zones,
|
|
6687
|
+
};
|
|
6688
|
+
for (const { handlerName, handler } of handlers) {
|
|
6689
|
+
const handlerData = copiedData[handlerName];
|
|
6690
|
+
if (!handlerData) {
|
|
6691
|
+
continue;
|
|
6692
|
+
}
|
|
6693
|
+
const currentTarget = handler.getPasteTarget(sheetId, zones, handlerData, options);
|
|
6694
|
+
if (currentTarget.figureId) {
|
|
6695
|
+
target.figureId = currentTarget.figureId;
|
|
6696
|
+
}
|
|
6697
|
+
for (const targetZone of currentTarget.zones) {
|
|
6698
|
+
selectedZones.push(targetZone);
|
|
6699
|
+
if (zone === undefined) {
|
|
6700
|
+
zone = targetZone;
|
|
6701
|
+
continue;
|
|
6702
|
+
}
|
|
6703
|
+
zone = union(zone, targetZone);
|
|
6704
|
+
}
|
|
6705
|
+
}
|
|
6706
|
+
return {
|
|
6707
|
+
target,
|
|
6708
|
+
zone,
|
|
6709
|
+
selectedZones,
|
|
6710
|
+
};
|
|
6711
|
+
}
|
|
6712
|
+
/**
|
|
6713
|
+
* Updates the selection after a paste operation.
|
|
6714
|
+
*/
|
|
6715
|
+
const selectPastedZone = (selection, sourceZones, pastedZones) => {
|
|
6716
|
+
const anchorCell = {
|
|
6717
|
+
col: sourceZones[0].left,
|
|
6718
|
+
row: sourceZones[0].top,
|
|
6719
|
+
};
|
|
6720
|
+
selection.getBackToDefault();
|
|
6721
|
+
selection.selectZone({ cell: anchorCell, zone: union(...pastedZones) }, { scrollIntoView: false });
|
|
6722
|
+
};
|
|
6666
6723
|
|
|
6667
6724
|
class ClipboardHandler {
|
|
6668
6725
|
getters;
|
|
@@ -44616,7 +44673,7 @@ class SpreadsheetPivot {
|
|
|
44616
44673
|
}
|
|
44617
44674
|
getTypeFromZone(sheetId, zone) {
|
|
44618
44675
|
const cells = this.getters.getEvaluatedCellsInZone(sheetId, zone);
|
|
44619
|
-
const nonEmptyCells = cells.filter((cell) => cell.type
|
|
44676
|
+
const nonEmptyCells = cells.filter((cell) => !(cell.type === CellValueType.empty || cell.value === ""));
|
|
44620
44677
|
if (nonEmptyCells.length === 0) {
|
|
44621
44678
|
return "integer";
|
|
44622
44679
|
}
|
|
@@ -48149,15 +48206,16 @@ class GridAddRowsFooter extends owl.Component {
|
|
|
48149
48206
|
}
|
|
48150
48207
|
}
|
|
48151
48208
|
|
|
48209
|
+
const PAINT_FORMAT_HANDLER_KEYS = [
|
|
48210
|
+
"cell",
|
|
48211
|
+
"border",
|
|
48212
|
+
"table",
|
|
48213
|
+
"conditionalFormat",
|
|
48214
|
+
"merge",
|
|
48215
|
+
];
|
|
48152
48216
|
class PaintFormatStore extends SpreadsheetStore {
|
|
48153
48217
|
mutators = ["activate", "cancel", "pasteFormat"];
|
|
48154
48218
|
highlightStore = this.get(HighlightStore);
|
|
48155
|
-
clipboardHandlers = [
|
|
48156
|
-
new CellClipboardHandler(this.getters, this.model.dispatch),
|
|
48157
|
-
new BorderClipboardHandler(this.getters, this.model.dispatch),
|
|
48158
|
-
new TableClipboardHandler(this.getters, this.model.dispatch),
|
|
48159
|
-
new ConditionalFormatClipboardHandler(this.getters, this.model.dispatch),
|
|
48160
|
-
];
|
|
48161
48219
|
status = "inactive";
|
|
48162
48220
|
copiedData;
|
|
48163
48221
|
constructor(get) {
|
|
@@ -48188,24 +48246,38 @@ class PaintFormatStore extends SpreadsheetStore {
|
|
|
48188
48246
|
get isActive() {
|
|
48189
48247
|
return this.status !== "inactive";
|
|
48190
48248
|
}
|
|
48249
|
+
get clipboardHandlers() {
|
|
48250
|
+
return PAINT_FORMAT_HANDLER_KEYS.map((handlerName) => {
|
|
48251
|
+
const HandlerClass = clipboardHandlersRegistries.cellHandlers.get(handlerName);
|
|
48252
|
+
return {
|
|
48253
|
+
handlerName,
|
|
48254
|
+
handler: new HandlerClass(this.getters, this.model.dispatch),
|
|
48255
|
+
};
|
|
48256
|
+
});
|
|
48257
|
+
}
|
|
48191
48258
|
copyFormats() {
|
|
48192
48259
|
const sheetId = this.getters.getActiveSheetId();
|
|
48193
48260
|
const zones = this.getters.getSelectedZones();
|
|
48194
|
-
const copiedData = {};
|
|
48195
|
-
for (const handler of this.clipboardHandlers) {
|
|
48196
|
-
|
|
48261
|
+
const copiedData = { zones, sheetId };
|
|
48262
|
+
for (const { handlerName, handler } of this.clipboardHandlers) {
|
|
48263
|
+
const handlerResult = handler.copy(getClipboardDataPositions(sheetId, zones));
|
|
48264
|
+
if (handlerResult !== undefined) {
|
|
48265
|
+
copiedData[handlerName] = handlerResult;
|
|
48266
|
+
}
|
|
48197
48267
|
}
|
|
48198
48268
|
return copiedData;
|
|
48199
48269
|
}
|
|
48200
48270
|
paintFormat(sheetId, target) {
|
|
48201
|
-
if (this.copiedData) {
|
|
48202
|
-
|
|
48203
|
-
handler.paste({ zones: target, sheetId }, this.copiedData, {
|
|
48204
|
-
isCutOperation: false,
|
|
48205
|
-
pasteOption: "onlyFormat",
|
|
48206
|
-
});
|
|
48207
|
-
}
|
|
48271
|
+
if (!this.copiedData) {
|
|
48272
|
+
return;
|
|
48208
48273
|
}
|
|
48274
|
+
const options = {
|
|
48275
|
+
isCutOperation: false,
|
|
48276
|
+
pasteOption: "onlyFormat",
|
|
48277
|
+
};
|
|
48278
|
+
const { target: pasteTarget, selectedZones } = getPasteTargetFromHandlers(sheetId, target, this.copiedData, this.clipboardHandlers, options);
|
|
48279
|
+
applyClipboardHandlersPaste(this.clipboardHandlers, this.copiedData, pasteTarget, options);
|
|
48280
|
+
selectPastedZone(this.model.selection, target, selectedZones);
|
|
48209
48281
|
if (this.status === "oneOff") {
|
|
48210
48282
|
this.cancel();
|
|
48211
48283
|
}
|
|
@@ -53463,7 +53535,7 @@ class DataValidationPlugin extends CorePlugin {
|
|
|
53463
53535
|
else if (newRule.criterion.type === "isValueInList") {
|
|
53464
53536
|
newRule.criterion.values = Array.from(new Set(newRule.criterion.values));
|
|
53465
53537
|
}
|
|
53466
|
-
const adaptedRules = this.removeRangesFromRules(sheetId, newRule.ranges, rules);
|
|
53538
|
+
const adaptedRules = this.removeRangesFromRules(sheetId, newRule.ranges, rules, newRule.id);
|
|
53467
53539
|
const ruleIndex = adaptedRules.findIndex((rule) => rule.id === newRule.id);
|
|
53468
53540
|
if (ruleIndex !== -1) {
|
|
53469
53541
|
adaptedRules[ruleIndex] = newRule;
|
|
@@ -53473,9 +53545,12 @@ class DataValidationPlugin extends CorePlugin {
|
|
|
53473
53545
|
this.history.update("rules", sheetId, [...adaptedRules, newRule]);
|
|
53474
53546
|
}
|
|
53475
53547
|
}
|
|
53476
|
-
removeRangesFromRules(sheetId, ranges, rules) {
|
|
53548
|
+
removeRangesFromRules(sheetId, ranges, rules, editingRuleId) {
|
|
53477
53549
|
rules = deepCopy(rules);
|
|
53478
53550
|
for (const rule of rules) {
|
|
53551
|
+
if (rule.id === editingRuleId) {
|
|
53552
|
+
continue; // Skip the rule being edited to preserve its place in the list
|
|
53553
|
+
}
|
|
53479
53554
|
rule.ranges = this.getters.recomputeRanges(rule.ranges, ranges);
|
|
53480
53555
|
}
|
|
53481
53556
|
return rules.filter((rule) => rule.ranges.length > 0);
|
|
@@ -65160,49 +65235,17 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
65160
65235
|
if (!copiedData) {
|
|
65161
65236
|
return;
|
|
65162
65237
|
}
|
|
65163
|
-
let zone = undefined;
|
|
65164
|
-
let selectedZones = [];
|
|
65165
65238
|
const sheetId = this.getters.getActiveSheetId();
|
|
65166
|
-
let target = {
|
|
65167
|
-
sheetId,
|
|
65168
|
-
zones,
|
|
65169
|
-
};
|
|
65170
65239
|
const handlers = this.selectClipboardHandlers(copiedData);
|
|
65171
|
-
|
|
65172
|
-
const handlerData = copiedData[handlerName];
|
|
65173
|
-
if (!handlerData) {
|
|
65174
|
-
continue;
|
|
65175
|
-
}
|
|
65176
|
-
const currentTarget = handler.getPasteTarget(sheetId, zones, handlerData, options);
|
|
65177
|
-
if (currentTarget.figureId) {
|
|
65178
|
-
target.figureId = currentTarget.figureId;
|
|
65179
|
-
}
|
|
65180
|
-
for (const targetZone of currentTarget.zones) {
|
|
65181
|
-
selectedZones.push(targetZone);
|
|
65182
|
-
if (zone === undefined) {
|
|
65183
|
-
zone = targetZone;
|
|
65184
|
-
continue;
|
|
65185
|
-
}
|
|
65186
|
-
zone = union(zone, targetZone);
|
|
65187
|
-
}
|
|
65188
|
-
}
|
|
65240
|
+
const { target, zone, selectedZones } = getPasteTargetFromHandlers(sheetId, zones, copiedData, handlers, options);
|
|
65189
65241
|
if (zone !== undefined) {
|
|
65190
|
-
this.addMissingDimensions(
|
|
65242
|
+
this.addMissingDimensions(sheetId, zone.right - zone.left + 1, zone.bottom - zone.top + 1, zone.left, zone.top);
|
|
65191
65243
|
}
|
|
65192
|
-
handlers
|
|
65193
|
-
const handlerData = copiedData[handlerName];
|
|
65194
|
-
if (handlerData) {
|
|
65195
|
-
handler.paste(target, handlerData, options);
|
|
65196
|
-
}
|
|
65197
|
-
});
|
|
65244
|
+
applyClipboardHandlersPaste(handlers, copiedData, target, options);
|
|
65198
65245
|
if (!options?.selectTarget) {
|
|
65199
65246
|
return;
|
|
65200
65247
|
}
|
|
65201
|
-
|
|
65202
|
-
const col = selection.left;
|
|
65203
|
-
const row = selection.top;
|
|
65204
|
-
this.selection.getBackToDefault();
|
|
65205
|
-
this.selection.selectZone({ cell: { col, row }, zone: union(...selectedZones) }, { scrollIntoView: false });
|
|
65248
|
+
selectPastedZone(this.selection, zones, selectedZones);
|
|
65206
65249
|
}
|
|
65207
65250
|
/**
|
|
65208
65251
|
* Add columns and/or rows to ensure that col + width and row + height are still
|
|
@@ -74461,6 +74504,6 @@ exports.tokenColors = tokenColors;
|
|
|
74461
74504
|
exports.tokenize = tokenize;
|
|
74462
74505
|
|
|
74463
74506
|
|
|
74464
|
-
__info__.version = "18.0.
|
|
74465
|
-
__info__.date = "2025-06-
|
|
74466
|
-
__info__.hash = "
|
|
74507
|
+
__info__.version = "18.0.35";
|
|
74508
|
+
__info__.date = "2025-06-23T15:06:32.032Z";
|
|
74509
|
+
__info__.hash = "a38db25";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -1448,13 +1448,6 @@ declare class UIPlugin<State = any> extends BasePlugin<State, Command> {
|
|
|
1448
1448
|
drawLayer(ctx: GridRenderingContext, layer: LayerName): void;
|
|
1449
1449
|
}
|
|
1450
1450
|
|
|
1451
|
-
type MinimalClipboardData = {
|
|
1452
|
-
sheetId?: UID;
|
|
1453
|
-
cells?: ClipboardCell[][];
|
|
1454
|
-
zones?: Zone[];
|
|
1455
|
-
figureId?: UID;
|
|
1456
|
-
[key: string]: unknown;
|
|
1457
|
-
};
|
|
1458
1451
|
interface SpreadsheetClipboardData extends MinimalClipboardData {
|
|
1459
1452
|
version?: number;
|
|
1460
1453
|
clipboardId?: string;
|
|
@@ -1895,6 +1888,13 @@ type ClipboardPasteTarget = {
|
|
|
1895
1888
|
zones: Zone[];
|
|
1896
1889
|
figureId?: UID;
|
|
1897
1890
|
};
|
|
1891
|
+
type MinimalClipboardData = {
|
|
1892
|
+
sheetId?: UID;
|
|
1893
|
+
cells?: ClipboardCell[][];
|
|
1894
|
+
zones?: Zone[];
|
|
1895
|
+
figureId?: UID;
|
|
1896
|
+
[key: string]: unknown;
|
|
1897
|
+
};
|
|
1898
1898
|
|
|
1899
1899
|
interface SearchOptions {
|
|
1900
1900
|
matchCase: boolean;
|
|
@@ -12438,4 +12438,4 @@ declare const constants: {
|
|
|
12438
12438
|
};
|
|
12439
12439
|
};
|
|
12440
12440
|
|
|
12441
|
-
export { AST, ASTFuncall, AboveAverageRule, AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, ActivateNextSheetCommand, ActivatePreviousSheetCommand, ActivateSheetCommand, AddColumnsRowsCommand, AddConditionalFormatCommand, AddDataValidationCommand, AddFunctionDescription, AddMergeCommand, AddPivotCommand, Aggregator, Alias, Align, AlphanumericIncrementModifier, AnchorZone, ApplyRangeChange, ApplyRangeChangeResult, Arg, ArgDefinition, ArgType, AutoFillCellCommand, AutofillAutoCommand, AutofillCellData, AutofillCommand, AutofillData, AutofillModifier, AutofillModifierImplementation, AutofillResult, AutofillSelectCommand, AutofillTableCommand, AutoresizeColumnsCommand, AutoresizeRowsCommand, AxesDesign, AxisDesign, AxisType, BeginsWithRule, BooleanCell, Border$1 as Border, BorderData, BorderDescr, BorderDescription, BorderPosition, BorderStyle, Box, BoxTextContent, CHART_TYPES, CSSProperties, CancelledReason, Cell, CellData, CellErrorType, CellIsRule, CellPosition, CellValue, CellValueType, ChangeType, ChartCreationContext, ChartDefinition, ChartJSRuntime, ChartRuntime, ChartType, ChartWithAxisDefinition, CleanClipBoardHighlightCommand, ClearCellCommand, ClearCellsCommand, ClearFormattingCommand, Client, ClientId, ClientJoinedMessage, ClientLeftMessage, ClientMovedMessage, ClientPosition, ClipboardCell, ClipboardCellData, ClipboardData, ClipboardFigureData, ClipboardMIMEType, ClipboardOperation, ClipboardOptions, ClipboardPasteOptions, ClipboardPasteTarget, Cloneable, CollaborationMessage, CollaborativeEvent, CollaborativeEventReceived, CollaborativeEventTypes, Color, ColorScaleMidPointThreshold, ColorScaleRule, ColorScaleThreshold, ColorSheetCommand, Command, CommandDispatcher, CommandHandler, CommandResult, CommandTypes, CommonPivotCoreDefinition, CompiledFormula, ComposerFocusType, ComputeFunction, ComputedTableStyle, ConditionalFormat, ConditionalFormatInternal, ConditionalFormatRule, ConditionalFormatRuleInternal, ConditionalFormattingOperatorValues, ConsecutiveIndexes, ContainsTextRule, CopyCommand, CopyModifier, CopyPasteCellsAboveCommand, CopyPasteCellsOnLeftCommand, CoreCommand, CoreCommandDispatcher, CoreCommandTypes, CoreGetters, CorePlugin, CoreTable, CoreTableType, CoreViewCommand, CoreViewCommandTypes, CreateChartCommand, CreateFigureCommand, CreateImageOverCommand, CreateRevisionOptions, CreateSheetCommand, CreateTableCommand, CreateTableStyleCommand, Currency, CustomFormulaCriterion, CustomizedDataSet, CutCommand, DEFAULT_LOCALE, DEFAULT_LOCALES, DIRECTION, DOMCoordinates, DOMDimension, DataBarFill, DataBarRule, DataBarRuleInternal, DataSet, DataValidationCriterion, DataValidationCriterionType, DataValidationDateCriterion, DataValidationRule, DataValidationRuleData, DatasetDesign, DatasetValues, DateCriterionValue, DateIncrementModifier, DateIsAfterCriterion, DateIsBeforeCriterion, DateIsBetweenCriterion, DateIsCriterion, DateIsNotBetweenCriterion, DateIsOnOrAfterCriterion, DateIsOnOrBeforeCriterion, DateIsValidCriterion, DebouncedFunction, DeleteCellCommand, DeleteContentCommand, DeleteFigureCommand, DeleteSheetCommand, Dependencies, Dimension, DimensionTree, DimensionTreeNode, Direction$1 as Direction, DispatchResult, DuplicatePivotCommand, DuplicatePivotInNewSheetCommand, DuplicateSheetCommand, DynamicTable, EdgeScrollInfo, EditTextOptions, EditionMode, EmptyCell, EndsWithRule, EnrichedToken, EnsureRange, ErrorCell, EvalContext, EvaluateCellsCommand, EvaluatedCell, EvaluationError, ExcelCellData, ExcelChartDataset, ExcelChartDefinition, ExcelChartType, ExcelFigureSize, ExcelFilterData, ExcelHeaderData, ExcelSheetData, ExcelTableData, ExcelWorkbookData, ExpressionRule, Figure, FigureData, FigureSize, Filter, FilterId, FoldAllHeaderGroupsCommand, FoldHeaderGroupCommand, FoldHeaderGroupsInZoneCommand, Format, FormattedValue, FormulaCell, FormulaModifier, FormulaToExecute, FreezeColumnsCommand, FreezeRowsCommand, FunctionDescription, FunctionRegistry, FunctionResultNumber, FunctionResultObject, GeneratorCell, GetSymbolValue, Getters, Granularity, GridClickModifiers, GridRenderingContext, GroupHeadersCommand, HSLA, HeaderData, HeaderDimensions, HeaderGroup, HeaderIndex, HeadersDependentCommand, HideColumnsRowsCommand, HideSheetCommand, Highlight$1 as Highlight, HistoryChange, IconSet, IconSetRule, IconThreshold, Image, Immutable, Increment, IncrementModifier, InformationNotification, InitPivotParams, InsertCellCommand, InsertNewPivotCommand, InsertPivotCommand, InsertPivotWithTableCommand, IsBetweenCriterion, IsCheckboxCriterion, IsEqualCriterion, IsGreaterOrEqualToCriterion, IsGreaterThanCriterion, IsLessOrEqualToCriterion, IsLessThanCriterion, IsNotBetweenCriterion, IsNotEqualCriterion, IsValueInListCriterion, IsValueInRangeCriterion, LabelValues, LayerName, Lazy, Link, LiteralCell, LocalCommand, Locale, LocaleCode, LocaleFormat, LookupCaches, Matrix, Maybe, MenuMouseEvent, Merge, Model, MoveColumnsRowsCommand, MoveConditionalFormatCommand, MoveRangeCommand, MoveSheetCommand, MoveViewportDownCommand, MoveViewportToCellCommand, MoveViewportUpCommand, NewLocalStateUpdateEvent, NotContainsTextRule, NotificationType, NumberCell, OSClipboardContent, Offset, OperationSequenceNode, OrderedLayers, PaintFormat, PaneDivision, ParsedOSClipboardContent, PasteCommand, PasteFromOSClipboardCommand, Pivot, PivotColRowDomain, PivotCoreDefinition, PivotCoreDimension, PivotCoreMeasure, PivotDimension$1 as PivotDimension, PivotDomain, PivotEmptyCell, PivotField, PivotFields, PivotHeaderCell, PivotMeasure, PivotMeasureDisplay, PivotMeasureDisplayType, PivotMeasureHeaderCell, PivotNode, PivotRuntimeDefinition, PivotStartPresenceTracking, PivotStopPresenceTracking, PivotTableCell, PivotTableColumn, PivotTableData, PivotTableRow, PivotTimeAdapter, PivotTimeAdapterNotNull, PivotValueCell, Pixel, PixelPosition, Position$1 as Position, PositionDependentCommand, PropsOf, RGBA, Range, RangeCompiledFormula, RangeData, RangePart, RangeProvider, RangesDependentCommand, Rect, RedoCommand, Ref, ReferenceDenormalizer, RefreshPivotCommand, Registry, RemoteRevisionMessage, RemoteRevisionReceivedEvent, RemoveColumnsRowsCommand, RemoveConditionalFormatCommand, RemoveDataValidationCommand, RemoveDuplicatesCommand, RemoveMergeCommand, RemovePivotCommand, RemoveTableCommand, RemoveTableStyleCommand, RenamePivotCommand, RenameSheetCommand, RepeatPasteCommand, ReplaceSearchCommand, RequestRedoCommand, RequestUndoCommand, ResizeColumnsRowsCommand, ResizeDirection, ResizeTableCommand, ResizeViewportCommand, Revision, RevisionAcknowledgedEvent, RevisionData, RevisionRedone, RevisionRedoneMessage, RevisionUndone, RevisionUndoneMessage, Row, SPREADSHEET_DIMENSIONS, ScrollDirection$1 as ScrollDirection, SelectFigureCommand, Selection, SelectionStep, SetBorderCommand, SetBorderTargetCommand, SetContextualFormatCommand, SetDecimalCommand, SetDecimalStep, SetFormattingCommand, SetGridLinesVisibilityCommand, SetViewportOffsetCommand, SetZoneBordersCommand, Sheet, SheetDOMScrollInfo, SheetData, SheetDependentCommand, SheetScrollInfo, ShowFormulaCommand, ShowSheetCommand, SingleColorRule, SingleColorRules, SnapshotEvent, SortCommand, SortDirection, SortOptions, SplitPivotFormulaCommand, SplitTextIntoColumnsCommand, Spreadsheet, SpreadsheetChildEnv, SpreadsheetPivotCoreDefinition, SpreadsheetPivotTable, StartChangeHighlightCommand, StartCommand, StaticTable, StoreConstructor, StoreParams, Style, SumSelectionCommand, Table, TableBorder, TableConfig, TableData$1 as TableData, TableElementStyle, TableId, TableStyle, TableStyleData, TableStyleTemplateName, TargetDependentCommand, TechnicalName, TextCell, TextContainsCriterion, TextIsCriterion, TextIsEmailCriterion, TextIsLinkCriterion, TextNotContainsCriterion, TextRule, ThresholdType, TimePeriodRule, TitleDesign, Token, Tooltip, Top10Rule, Transformation, TransformationFactory, TransportService, TrendConfiguration, TrendType, TrimWhitespaceCommand, UID, UIPlugin, UnGroupHeadersCommand, UnboundedZone, UndoCommand, UnexpectedRevisionIdEvent, UnfoldAllHeaderGroupsCommand, UnfoldHeaderGroupCommand, UnfoldHeaderGroupsInZoneCommand, UnfreezeColumnsCommand, UnfreezeColumnsRowsCommand, UnfreezeRowsCommand, UnhideColumnsRowsCommand, UpdateCellCommand, UpdateCellData, UpdateCellPositionCommand, UpdateChartCommand, UpdateFigureCommand, UpdateFilterCommand, UpdateLocaleCommand, UpdatePivotCommand, UpdateTableCommand, Validation, VerticalAlign, Viewport, WorkbookData, WorkbookHistory, Wrapping, Zone, ZoneDependentCommand, ZoneDimension, __info__, addFunction, addRenderingLayer, astToFormula, borderStyles, canExecuteInReadonly, compile, compileTokens, components, constants, containsBlanksRule, containsErrorsRule, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateBordersCommands, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, isCoreCommand, isHeadersDependant, isMatrix, isPositionDependent, isRangeDependant, isSheetDependent, isTargetDependent, isZoneDependent, iterateAstNodes, links, load, notContainsBlanksRule, notContainsErrorsRule, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
12441
|
+
export { AST, ASTFuncall, AboveAverageRule, AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, ActivateNextSheetCommand, ActivatePreviousSheetCommand, ActivateSheetCommand, AddColumnsRowsCommand, AddConditionalFormatCommand, AddDataValidationCommand, AddFunctionDescription, AddMergeCommand, AddPivotCommand, Aggregator, Alias, Align, AlphanumericIncrementModifier, AnchorZone, ApplyRangeChange, ApplyRangeChangeResult, Arg, ArgDefinition, ArgType, AutoFillCellCommand, AutofillAutoCommand, AutofillCellData, AutofillCommand, AutofillData, AutofillModifier, AutofillModifierImplementation, AutofillResult, AutofillSelectCommand, AutofillTableCommand, AutoresizeColumnsCommand, AutoresizeRowsCommand, AxesDesign, AxisDesign, AxisType, BeginsWithRule, BooleanCell, Border$1 as Border, BorderData, BorderDescr, BorderDescription, BorderPosition, BorderStyle, Box, BoxTextContent, CHART_TYPES, CSSProperties, CancelledReason, Cell, CellData, CellErrorType, CellIsRule, CellPosition, CellValue, CellValueType, ChangeType, ChartCreationContext, ChartDefinition, ChartJSRuntime, ChartRuntime, ChartType, ChartWithAxisDefinition, CleanClipBoardHighlightCommand, ClearCellCommand, ClearCellsCommand, ClearFormattingCommand, Client, ClientId, ClientJoinedMessage, ClientLeftMessage, ClientMovedMessage, ClientPosition, ClipboardCell, ClipboardCellData, ClipboardData, ClipboardFigureData, ClipboardMIMEType, ClipboardOperation, ClipboardOptions, ClipboardPasteOptions, ClipboardPasteTarget, Cloneable, CollaborationMessage, CollaborativeEvent, CollaborativeEventReceived, CollaborativeEventTypes, Color, ColorScaleMidPointThreshold, ColorScaleRule, ColorScaleThreshold, ColorSheetCommand, Command, CommandDispatcher, CommandHandler, CommandResult, CommandTypes, CommonPivotCoreDefinition, CompiledFormula, ComposerFocusType, ComputeFunction, ComputedTableStyle, ConditionalFormat, ConditionalFormatInternal, ConditionalFormatRule, ConditionalFormatRuleInternal, ConditionalFormattingOperatorValues, ConsecutiveIndexes, ContainsTextRule, CopyCommand, CopyModifier, CopyPasteCellsAboveCommand, CopyPasteCellsOnLeftCommand, CoreCommand, CoreCommandDispatcher, CoreCommandTypes, CoreGetters, CorePlugin, CoreTable, CoreTableType, CoreViewCommand, CoreViewCommandTypes, CreateChartCommand, CreateFigureCommand, CreateImageOverCommand, CreateRevisionOptions, CreateSheetCommand, CreateTableCommand, CreateTableStyleCommand, Currency, CustomFormulaCriterion, CustomizedDataSet, CutCommand, DEFAULT_LOCALE, DEFAULT_LOCALES, DIRECTION, DOMCoordinates, DOMDimension, DataBarFill, DataBarRule, DataBarRuleInternal, DataSet, DataValidationCriterion, DataValidationCriterionType, DataValidationDateCriterion, DataValidationRule, DataValidationRuleData, DatasetDesign, DatasetValues, DateCriterionValue, DateIncrementModifier, DateIsAfterCriterion, DateIsBeforeCriterion, DateIsBetweenCriterion, DateIsCriterion, DateIsNotBetweenCriterion, DateIsOnOrAfterCriterion, DateIsOnOrBeforeCriterion, DateIsValidCriterion, DebouncedFunction, DeleteCellCommand, DeleteContentCommand, DeleteFigureCommand, DeleteSheetCommand, Dependencies, Dimension, DimensionTree, DimensionTreeNode, Direction$1 as Direction, DispatchResult, DuplicatePivotCommand, DuplicatePivotInNewSheetCommand, DuplicateSheetCommand, DynamicTable, EdgeScrollInfo, EditTextOptions, EditionMode, EmptyCell, EndsWithRule, EnrichedToken, EnsureRange, ErrorCell, EvalContext, EvaluateCellsCommand, EvaluatedCell, EvaluationError, ExcelCellData, ExcelChartDataset, ExcelChartDefinition, ExcelChartType, ExcelFigureSize, ExcelFilterData, ExcelHeaderData, ExcelSheetData, ExcelTableData, ExcelWorkbookData, ExpressionRule, Figure, FigureData, FigureSize, Filter, FilterId, FoldAllHeaderGroupsCommand, FoldHeaderGroupCommand, FoldHeaderGroupsInZoneCommand, Format, FormattedValue, FormulaCell, FormulaModifier, FormulaToExecute, FreezeColumnsCommand, FreezeRowsCommand, FunctionDescription, FunctionRegistry, FunctionResultNumber, FunctionResultObject, GeneratorCell, GetSymbolValue, Getters, Granularity, GridClickModifiers, GridRenderingContext, GroupHeadersCommand, HSLA, HeaderData, HeaderDimensions, HeaderGroup, HeaderIndex, HeadersDependentCommand, HideColumnsRowsCommand, HideSheetCommand, Highlight$1 as Highlight, HistoryChange, IconSet, IconSetRule, IconThreshold, Image, Immutable, Increment, IncrementModifier, InformationNotification, InitPivotParams, InsertCellCommand, InsertNewPivotCommand, InsertPivotCommand, InsertPivotWithTableCommand, IsBetweenCriterion, IsCheckboxCriterion, IsEqualCriterion, IsGreaterOrEqualToCriterion, IsGreaterThanCriterion, IsLessOrEqualToCriterion, IsLessThanCriterion, IsNotBetweenCriterion, IsNotEqualCriterion, IsValueInListCriterion, IsValueInRangeCriterion, LabelValues, LayerName, Lazy, Link, LiteralCell, LocalCommand, Locale, LocaleCode, LocaleFormat, LookupCaches, Matrix, Maybe, MenuMouseEvent, Merge, MinimalClipboardData, Model, MoveColumnsRowsCommand, MoveConditionalFormatCommand, MoveRangeCommand, MoveSheetCommand, MoveViewportDownCommand, MoveViewportToCellCommand, MoveViewportUpCommand, NewLocalStateUpdateEvent, NotContainsTextRule, NotificationType, NumberCell, OSClipboardContent, Offset, OperationSequenceNode, OrderedLayers, PaintFormat, PaneDivision, ParsedOSClipboardContent, PasteCommand, PasteFromOSClipboardCommand, Pivot, PivotColRowDomain, PivotCoreDefinition, PivotCoreDimension, PivotCoreMeasure, PivotDimension$1 as PivotDimension, PivotDomain, PivotEmptyCell, PivotField, PivotFields, PivotHeaderCell, PivotMeasure, PivotMeasureDisplay, PivotMeasureDisplayType, PivotMeasureHeaderCell, PivotNode, PivotRuntimeDefinition, PivotStartPresenceTracking, PivotStopPresenceTracking, PivotTableCell, PivotTableColumn, PivotTableData, PivotTableRow, PivotTimeAdapter, PivotTimeAdapterNotNull, PivotValueCell, Pixel, PixelPosition, Position$1 as Position, PositionDependentCommand, PropsOf, RGBA, Range, RangeCompiledFormula, RangeData, RangePart, RangeProvider, RangesDependentCommand, Rect, RedoCommand, Ref, ReferenceDenormalizer, RefreshPivotCommand, Registry, RemoteRevisionMessage, RemoteRevisionReceivedEvent, RemoveColumnsRowsCommand, RemoveConditionalFormatCommand, RemoveDataValidationCommand, RemoveDuplicatesCommand, RemoveMergeCommand, RemovePivotCommand, RemoveTableCommand, RemoveTableStyleCommand, RenamePivotCommand, RenameSheetCommand, RepeatPasteCommand, ReplaceSearchCommand, RequestRedoCommand, RequestUndoCommand, ResizeColumnsRowsCommand, ResizeDirection, ResizeTableCommand, ResizeViewportCommand, Revision, RevisionAcknowledgedEvent, RevisionData, RevisionRedone, RevisionRedoneMessage, RevisionUndone, RevisionUndoneMessage, Row, SPREADSHEET_DIMENSIONS, ScrollDirection$1 as ScrollDirection, SelectFigureCommand, Selection, SelectionStep, SetBorderCommand, SetBorderTargetCommand, SetContextualFormatCommand, SetDecimalCommand, SetDecimalStep, SetFormattingCommand, SetGridLinesVisibilityCommand, SetViewportOffsetCommand, SetZoneBordersCommand, Sheet, SheetDOMScrollInfo, SheetData, SheetDependentCommand, SheetScrollInfo, ShowFormulaCommand, ShowSheetCommand, SingleColorRule, SingleColorRules, SnapshotEvent, SortCommand, SortDirection, SortOptions, SplitPivotFormulaCommand, SplitTextIntoColumnsCommand, Spreadsheet, SpreadsheetChildEnv, SpreadsheetPivotCoreDefinition, SpreadsheetPivotTable, StartChangeHighlightCommand, StartCommand, StaticTable, StoreConstructor, StoreParams, Style, SumSelectionCommand, Table, TableBorder, TableConfig, TableData$1 as TableData, TableElementStyle, TableId, TableStyle, TableStyleData, TableStyleTemplateName, TargetDependentCommand, TechnicalName, TextCell, TextContainsCriterion, TextIsCriterion, TextIsEmailCriterion, TextIsLinkCriterion, TextNotContainsCriterion, TextRule, ThresholdType, TimePeriodRule, TitleDesign, Token, Tooltip, Top10Rule, Transformation, TransformationFactory, TransportService, TrendConfiguration, TrendType, TrimWhitespaceCommand, UID, UIPlugin, UnGroupHeadersCommand, UnboundedZone, UndoCommand, UnexpectedRevisionIdEvent, UnfoldAllHeaderGroupsCommand, UnfoldHeaderGroupCommand, UnfoldHeaderGroupsInZoneCommand, UnfreezeColumnsCommand, UnfreezeColumnsRowsCommand, UnfreezeRowsCommand, UnhideColumnsRowsCommand, UpdateCellCommand, UpdateCellData, UpdateCellPositionCommand, UpdateChartCommand, UpdateFigureCommand, UpdateFilterCommand, UpdateLocaleCommand, UpdatePivotCommand, UpdateTableCommand, Validation, VerticalAlign, Viewport, WorkbookData, WorkbookHistory, Wrapping, Zone, ZoneDependentCommand, ZoneDimension, __info__, addFunction, addRenderingLayer, astToFormula, borderStyles, canExecuteInReadonly, compile, compileTokens, components, constants, containsBlanksRule, containsErrorsRule, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateBordersCommands, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, isCoreCommand, isHeadersDependant, isMatrix, isPositionDependent, isRangeDependant, isSheetDependent, isTargetDependent, isZoneDependent, iterateAstNodes, links, load, notContainsBlanksRule, notContainsErrorsRule, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 18.0.
|
|
6
|
-
* @date 2025-06-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.0.35
|
|
6
|
+
* @date 2025-06-23T15:06:32.032Z
|
|
7
|
+
* @hash a38db25
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, useState, onPatched, onWillPatch, onWillUpdateProps, useExternalListener, onWillStart, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
|
|
@@ -6661,6 +6661,63 @@ function parseOSClipboardContent(content) {
|
|
|
6661
6661
|
data: spreadsheetContent,
|
|
6662
6662
|
};
|
|
6663
6663
|
}
|
|
6664
|
+
/**
|
|
6665
|
+
* Applies each clipboard handler to paste its corresponding data into the target.
|
|
6666
|
+
*/
|
|
6667
|
+
const applyClipboardHandlersPaste = (handlers, copiedData, target, options) => {
|
|
6668
|
+
handlers.forEach(({ handlerName, handler }) => {
|
|
6669
|
+
const data = copiedData[handlerName];
|
|
6670
|
+
if (data) {
|
|
6671
|
+
handler.paste(target, data, options);
|
|
6672
|
+
}
|
|
6673
|
+
});
|
|
6674
|
+
};
|
|
6675
|
+
/**
|
|
6676
|
+
* Returns the paste target based on clipboard handlers.
|
|
6677
|
+
* Also includes the full affected zone and the list of pasted zones for selection.
|
|
6678
|
+
*/
|
|
6679
|
+
function getPasteTargetFromHandlers(sheetId, zones, copiedData, handlers, options) {
|
|
6680
|
+
let zone = undefined;
|
|
6681
|
+
let selectedZones = [];
|
|
6682
|
+
let target = {
|
|
6683
|
+
sheetId,
|
|
6684
|
+
zones,
|
|
6685
|
+
};
|
|
6686
|
+
for (const { handlerName, handler } of handlers) {
|
|
6687
|
+
const handlerData = copiedData[handlerName];
|
|
6688
|
+
if (!handlerData) {
|
|
6689
|
+
continue;
|
|
6690
|
+
}
|
|
6691
|
+
const currentTarget = handler.getPasteTarget(sheetId, zones, handlerData, options);
|
|
6692
|
+
if (currentTarget.figureId) {
|
|
6693
|
+
target.figureId = currentTarget.figureId;
|
|
6694
|
+
}
|
|
6695
|
+
for (const targetZone of currentTarget.zones) {
|
|
6696
|
+
selectedZones.push(targetZone);
|
|
6697
|
+
if (zone === undefined) {
|
|
6698
|
+
zone = targetZone;
|
|
6699
|
+
continue;
|
|
6700
|
+
}
|
|
6701
|
+
zone = union(zone, targetZone);
|
|
6702
|
+
}
|
|
6703
|
+
}
|
|
6704
|
+
return {
|
|
6705
|
+
target,
|
|
6706
|
+
zone,
|
|
6707
|
+
selectedZones,
|
|
6708
|
+
};
|
|
6709
|
+
}
|
|
6710
|
+
/**
|
|
6711
|
+
* Updates the selection after a paste operation.
|
|
6712
|
+
*/
|
|
6713
|
+
const selectPastedZone = (selection, sourceZones, pastedZones) => {
|
|
6714
|
+
const anchorCell = {
|
|
6715
|
+
col: sourceZones[0].left,
|
|
6716
|
+
row: sourceZones[0].top,
|
|
6717
|
+
};
|
|
6718
|
+
selection.getBackToDefault();
|
|
6719
|
+
selection.selectZone({ cell: anchorCell, zone: union(...pastedZones) }, { scrollIntoView: false });
|
|
6720
|
+
};
|
|
6664
6721
|
|
|
6665
6722
|
class ClipboardHandler {
|
|
6666
6723
|
getters;
|
|
@@ -44614,7 +44671,7 @@ class SpreadsheetPivot {
|
|
|
44614
44671
|
}
|
|
44615
44672
|
getTypeFromZone(sheetId, zone) {
|
|
44616
44673
|
const cells = this.getters.getEvaluatedCellsInZone(sheetId, zone);
|
|
44617
|
-
const nonEmptyCells = cells.filter((cell) => cell.type
|
|
44674
|
+
const nonEmptyCells = cells.filter((cell) => !(cell.type === CellValueType.empty || cell.value === ""));
|
|
44618
44675
|
if (nonEmptyCells.length === 0) {
|
|
44619
44676
|
return "integer";
|
|
44620
44677
|
}
|
|
@@ -48147,15 +48204,16 @@ class GridAddRowsFooter extends Component {
|
|
|
48147
48204
|
}
|
|
48148
48205
|
}
|
|
48149
48206
|
|
|
48207
|
+
const PAINT_FORMAT_HANDLER_KEYS = [
|
|
48208
|
+
"cell",
|
|
48209
|
+
"border",
|
|
48210
|
+
"table",
|
|
48211
|
+
"conditionalFormat",
|
|
48212
|
+
"merge",
|
|
48213
|
+
];
|
|
48150
48214
|
class PaintFormatStore extends SpreadsheetStore {
|
|
48151
48215
|
mutators = ["activate", "cancel", "pasteFormat"];
|
|
48152
48216
|
highlightStore = this.get(HighlightStore);
|
|
48153
|
-
clipboardHandlers = [
|
|
48154
|
-
new CellClipboardHandler(this.getters, this.model.dispatch),
|
|
48155
|
-
new BorderClipboardHandler(this.getters, this.model.dispatch),
|
|
48156
|
-
new TableClipboardHandler(this.getters, this.model.dispatch),
|
|
48157
|
-
new ConditionalFormatClipboardHandler(this.getters, this.model.dispatch),
|
|
48158
|
-
];
|
|
48159
48217
|
status = "inactive";
|
|
48160
48218
|
copiedData;
|
|
48161
48219
|
constructor(get) {
|
|
@@ -48186,24 +48244,38 @@ class PaintFormatStore extends SpreadsheetStore {
|
|
|
48186
48244
|
get isActive() {
|
|
48187
48245
|
return this.status !== "inactive";
|
|
48188
48246
|
}
|
|
48247
|
+
get clipboardHandlers() {
|
|
48248
|
+
return PAINT_FORMAT_HANDLER_KEYS.map((handlerName) => {
|
|
48249
|
+
const HandlerClass = clipboardHandlersRegistries.cellHandlers.get(handlerName);
|
|
48250
|
+
return {
|
|
48251
|
+
handlerName,
|
|
48252
|
+
handler: new HandlerClass(this.getters, this.model.dispatch),
|
|
48253
|
+
};
|
|
48254
|
+
});
|
|
48255
|
+
}
|
|
48189
48256
|
copyFormats() {
|
|
48190
48257
|
const sheetId = this.getters.getActiveSheetId();
|
|
48191
48258
|
const zones = this.getters.getSelectedZones();
|
|
48192
|
-
const copiedData = {};
|
|
48193
|
-
for (const handler of this.clipboardHandlers) {
|
|
48194
|
-
|
|
48259
|
+
const copiedData = { zones, sheetId };
|
|
48260
|
+
for (const { handlerName, handler } of this.clipboardHandlers) {
|
|
48261
|
+
const handlerResult = handler.copy(getClipboardDataPositions(sheetId, zones));
|
|
48262
|
+
if (handlerResult !== undefined) {
|
|
48263
|
+
copiedData[handlerName] = handlerResult;
|
|
48264
|
+
}
|
|
48195
48265
|
}
|
|
48196
48266
|
return copiedData;
|
|
48197
48267
|
}
|
|
48198
48268
|
paintFormat(sheetId, target) {
|
|
48199
|
-
if (this.copiedData) {
|
|
48200
|
-
|
|
48201
|
-
handler.paste({ zones: target, sheetId }, this.copiedData, {
|
|
48202
|
-
isCutOperation: false,
|
|
48203
|
-
pasteOption: "onlyFormat",
|
|
48204
|
-
});
|
|
48205
|
-
}
|
|
48269
|
+
if (!this.copiedData) {
|
|
48270
|
+
return;
|
|
48206
48271
|
}
|
|
48272
|
+
const options = {
|
|
48273
|
+
isCutOperation: false,
|
|
48274
|
+
pasteOption: "onlyFormat",
|
|
48275
|
+
};
|
|
48276
|
+
const { target: pasteTarget, selectedZones } = getPasteTargetFromHandlers(sheetId, target, this.copiedData, this.clipboardHandlers, options);
|
|
48277
|
+
applyClipboardHandlersPaste(this.clipboardHandlers, this.copiedData, pasteTarget, options);
|
|
48278
|
+
selectPastedZone(this.model.selection, target, selectedZones);
|
|
48207
48279
|
if (this.status === "oneOff") {
|
|
48208
48280
|
this.cancel();
|
|
48209
48281
|
}
|
|
@@ -53461,7 +53533,7 @@ class DataValidationPlugin extends CorePlugin {
|
|
|
53461
53533
|
else if (newRule.criterion.type === "isValueInList") {
|
|
53462
53534
|
newRule.criterion.values = Array.from(new Set(newRule.criterion.values));
|
|
53463
53535
|
}
|
|
53464
|
-
const adaptedRules = this.removeRangesFromRules(sheetId, newRule.ranges, rules);
|
|
53536
|
+
const adaptedRules = this.removeRangesFromRules(sheetId, newRule.ranges, rules, newRule.id);
|
|
53465
53537
|
const ruleIndex = adaptedRules.findIndex((rule) => rule.id === newRule.id);
|
|
53466
53538
|
if (ruleIndex !== -1) {
|
|
53467
53539
|
adaptedRules[ruleIndex] = newRule;
|
|
@@ -53471,9 +53543,12 @@ class DataValidationPlugin extends CorePlugin {
|
|
|
53471
53543
|
this.history.update("rules", sheetId, [...adaptedRules, newRule]);
|
|
53472
53544
|
}
|
|
53473
53545
|
}
|
|
53474
|
-
removeRangesFromRules(sheetId, ranges, rules) {
|
|
53546
|
+
removeRangesFromRules(sheetId, ranges, rules, editingRuleId) {
|
|
53475
53547
|
rules = deepCopy(rules);
|
|
53476
53548
|
for (const rule of rules) {
|
|
53549
|
+
if (rule.id === editingRuleId) {
|
|
53550
|
+
continue; // Skip the rule being edited to preserve its place in the list
|
|
53551
|
+
}
|
|
53477
53552
|
rule.ranges = this.getters.recomputeRanges(rule.ranges, ranges);
|
|
53478
53553
|
}
|
|
53479
53554
|
return rules.filter((rule) => rule.ranges.length > 0);
|
|
@@ -65158,49 +65233,17 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
65158
65233
|
if (!copiedData) {
|
|
65159
65234
|
return;
|
|
65160
65235
|
}
|
|
65161
|
-
let zone = undefined;
|
|
65162
|
-
let selectedZones = [];
|
|
65163
65236
|
const sheetId = this.getters.getActiveSheetId();
|
|
65164
|
-
let target = {
|
|
65165
|
-
sheetId,
|
|
65166
|
-
zones,
|
|
65167
|
-
};
|
|
65168
65237
|
const handlers = this.selectClipboardHandlers(copiedData);
|
|
65169
|
-
|
|
65170
|
-
const handlerData = copiedData[handlerName];
|
|
65171
|
-
if (!handlerData) {
|
|
65172
|
-
continue;
|
|
65173
|
-
}
|
|
65174
|
-
const currentTarget = handler.getPasteTarget(sheetId, zones, handlerData, options);
|
|
65175
|
-
if (currentTarget.figureId) {
|
|
65176
|
-
target.figureId = currentTarget.figureId;
|
|
65177
|
-
}
|
|
65178
|
-
for (const targetZone of currentTarget.zones) {
|
|
65179
|
-
selectedZones.push(targetZone);
|
|
65180
|
-
if (zone === undefined) {
|
|
65181
|
-
zone = targetZone;
|
|
65182
|
-
continue;
|
|
65183
|
-
}
|
|
65184
|
-
zone = union(zone, targetZone);
|
|
65185
|
-
}
|
|
65186
|
-
}
|
|
65238
|
+
const { target, zone, selectedZones } = getPasteTargetFromHandlers(sheetId, zones, copiedData, handlers, options);
|
|
65187
65239
|
if (zone !== undefined) {
|
|
65188
|
-
this.addMissingDimensions(
|
|
65240
|
+
this.addMissingDimensions(sheetId, zone.right - zone.left + 1, zone.bottom - zone.top + 1, zone.left, zone.top);
|
|
65189
65241
|
}
|
|
65190
|
-
handlers
|
|
65191
|
-
const handlerData = copiedData[handlerName];
|
|
65192
|
-
if (handlerData) {
|
|
65193
|
-
handler.paste(target, handlerData, options);
|
|
65194
|
-
}
|
|
65195
|
-
});
|
|
65242
|
+
applyClipboardHandlersPaste(handlers, copiedData, target, options);
|
|
65196
65243
|
if (!options?.selectTarget) {
|
|
65197
65244
|
return;
|
|
65198
65245
|
}
|
|
65199
|
-
|
|
65200
|
-
const col = selection.left;
|
|
65201
|
-
const row = selection.top;
|
|
65202
|
-
this.selection.getBackToDefault();
|
|
65203
|
-
this.selection.selectZone({ cell: { col, row }, zone: union(...selectedZones) }, { scrollIntoView: false });
|
|
65246
|
+
selectPastedZone(this.selection, zones, selectedZones);
|
|
65204
65247
|
}
|
|
65205
65248
|
/**
|
|
65206
65249
|
* Add columns and/or rows to ensure that col + width and row + height are still
|
|
@@ -74416,6 +74459,6 @@ const constants = {
|
|
|
74416
74459
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
74417
74460
|
|
|
74418
74461
|
|
|
74419
|
-
__info__.version = "18.0.
|
|
74420
|
-
__info__.date = "2025-06-
|
|
74421
|
-
__info__.hash = "
|
|
74462
|
+
__info__.version = "18.0.35";
|
|
74463
|
+
__info__.date = "2025-06-23T15:06:32.032Z";
|
|
74464
|
+
__info__.hash = "a38db25";
|