@odoo/o-spreadsheet 18.3.9 → 18.3.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.
- package/dist/o-spreadsheet.cjs.js +116 -69
- package/dist/o-spreadsheet.d.ts +8 -8
- package/dist/o-spreadsheet.esm.js +116 -69
- package/dist/o-spreadsheet.iife.js +116 -69
- package/dist/o-spreadsheet.iife.min.js +179 -179
- 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.3.
|
|
6
|
-
* @date 2025-06-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.3.10
|
|
6
|
+
* @date 2025-06-23T15:05:03.747Z
|
|
7
|
+
* @hash 748e300
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -143,6 +143,7 @@ const FROZEN_PANE_HEADER_BORDER_COLOR = "#BCBCBC";
|
|
|
143
143
|
const FROZEN_PANE_BORDER_COLOR = "#DADFE8";
|
|
144
144
|
const COMPOSER_ASSISTANT_COLOR = "#9B359B";
|
|
145
145
|
const COLOR_TRANSPARENT = "#00000000";
|
|
146
|
+
const TABLE_HOVER_BACKGROUND_COLOR = "#017E8414";
|
|
146
147
|
const CHART_WATERFALL_POSITIVE_COLOR = "#4EA7F2";
|
|
147
148
|
const CHART_WATERFALL_NEGATIVE_COLOR = "#EA6175";
|
|
148
149
|
const CHART_WATERFALL_SUBTOTAL_COLOR = "#AAAAAA";
|
|
@@ -7122,6 +7123,63 @@ function parseOSClipboardContent(content, clipboardId) {
|
|
|
7122
7123
|
};
|
|
7123
7124
|
return osClipboardContent;
|
|
7124
7125
|
}
|
|
7126
|
+
/**
|
|
7127
|
+
* Applies each clipboard handler to paste its corresponding data into the target.
|
|
7128
|
+
*/
|
|
7129
|
+
const applyClipboardHandlersPaste = (handlers, copiedData, target, options) => {
|
|
7130
|
+
handlers.forEach(({ handlerName, handler }) => {
|
|
7131
|
+
const data = copiedData[handlerName];
|
|
7132
|
+
if (data) {
|
|
7133
|
+
handler.paste(target, data, options);
|
|
7134
|
+
}
|
|
7135
|
+
});
|
|
7136
|
+
};
|
|
7137
|
+
/**
|
|
7138
|
+
* Returns the paste target based on clipboard handlers.
|
|
7139
|
+
* Also includes the full affected zone and the list of pasted zones for selection.
|
|
7140
|
+
*/
|
|
7141
|
+
function getPasteTargetFromHandlers(sheetId, zones, copiedData, handlers, options) {
|
|
7142
|
+
let zone = undefined;
|
|
7143
|
+
let selectedZones = [];
|
|
7144
|
+
let target = {
|
|
7145
|
+
sheetId,
|
|
7146
|
+
zones,
|
|
7147
|
+
};
|
|
7148
|
+
for (const { handlerName, handler } of handlers) {
|
|
7149
|
+
const handlerData = copiedData[handlerName];
|
|
7150
|
+
if (!handlerData) {
|
|
7151
|
+
continue;
|
|
7152
|
+
}
|
|
7153
|
+
const currentTarget = handler.getPasteTarget(sheetId, zones, handlerData, options);
|
|
7154
|
+
if (currentTarget.figureId) {
|
|
7155
|
+
target.figureId = currentTarget.figureId;
|
|
7156
|
+
}
|
|
7157
|
+
for (const targetZone of currentTarget.zones) {
|
|
7158
|
+
selectedZones.push(targetZone);
|
|
7159
|
+
if (zone === undefined) {
|
|
7160
|
+
zone = targetZone;
|
|
7161
|
+
continue;
|
|
7162
|
+
}
|
|
7163
|
+
zone = union(zone, targetZone);
|
|
7164
|
+
}
|
|
7165
|
+
}
|
|
7166
|
+
return {
|
|
7167
|
+
target,
|
|
7168
|
+
zone,
|
|
7169
|
+
selectedZones,
|
|
7170
|
+
};
|
|
7171
|
+
}
|
|
7172
|
+
/**
|
|
7173
|
+
* Updates the selection after a paste operation.
|
|
7174
|
+
*/
|
|
7175
|
+
const selectPastedZone = (selection, sourceZones, pastedZones) => {
|
|
7176
|
+
const anchorCell = {
|
|
7177
|
+
col: sourceZones[0].left,
|
|
7178
|
+
row: sourceZones[0].top,
|
|
7179
|
+
};
|
|
7180
|
+
selection.getBackToDefault();
|
|
7181
|
+
selection.selectZone({ cell: anchorCell, zone: union(...pastedZones) }, { scrollIntoView: false });
|
|
7182
|
+
};
|
|
7125
7183
|
|
|
7126
7184
|
class ClipboardHandler {
|
|
7127
7185
|
getters;
|
|
@@ -49823,7 +49881,7 @@ class SpreadsheetPivot {
|
|
|
49823
49881
|
}
|
|
49824
49882
|
getTypeFromZone(sheetId, zone) {
|
|
49825
49883
|
const cells = this.getters.getEvaluatedCellsInZone(sheetId, zone);
|
|
49826
|
-
const nonEmptyCells = cells.filter((cell) => cell.type
|
|
49884
|
+
const nonEmptyCells = cells.filter((cell) => !(cell.type === CellValueType.empty || cell.value === ""));
|
|
49827
49885
|
if (nonEmptyCells.length === 0) {
|
|
49828
49886
|
return "integer";
|
|
49829
49887
|
}
|
|
@@ -53540,15 +53598,16 @@ class GridAddRowsFooter extends owl.Component {
|
|
|
53540
53598
|
}
|
|
53541
53599
|
}
|
|
53542
53600
|
|
|
53601
|
+
const PAINT_FORMAT_HANDLER_KEYS = [
|
|
53602
|
+
"cell",
|
|
53603
|
+
"border",
|
|
53604
|
+
"table",
|
|
53605
|
+
"conditionalFormat",
|
|
53606
|
+
"merge",
|
|
53607
|
+
];
|
|
53543
53608
|
class PaintFormatStore extends SpreadsheetStore {
|
|
53544
53609
|
mutators = ["activate", "cancel", "pasteFormat"];
|
|
53545
53610
|
highlightStore = this.get(HighlightStore);
|
|
53546
|
-
clipboardHandlers = [
|
|
53547
|
-
new CellClipboardHandler(this.getters, this.model.dispatch),
|
|
53548
|
-
new BorderClipboardHandler(this.getters, this.model.dispatch),
|
|
53549
|
-
new TableClipboardHandler(this.getters, this.model.dispatch),
|
|
53550
|
-
new ConditionalFormatClipboardHandler(this.getters, this.model.dispatch),
|
|
53551
|
-
];
|
|
53552
53611
|
status = "inactive";
|
|
53553
53612
|
copiedData;
|
|
53554
53613
|
constructor(get) {
|
|
@@ -53579,24 +53638,38 @@ class PaintFormatStore extends SpreadsheetStore {
|
|
|
53579
53638
|
get isActive() {
|
|
53580
53639
|
return this.status !== "inactive";
|
|
53581
53640
|
}
|
|
53641
|
+
get clipboardHandlers() {
|
|
53642
|
+
return PAINT_FORMAT_HANDLER_KEYS.map((handlerName) => {
|
|
53643
|
+
const HandlerClass = clipboardHandlersRegistries.cellHandlers.get(handlerName);
|
|
53644
|
+
return {
|
|
53645
|
+
handlerName,
|
|
53646
|
+
handler: new HandlerClass(this.getters, this.model.dispatch),
|
|
53647
|
+
};
|
|
53648
|
+
});
|
|
53649
|
+
}
|
|
53582
53650
|
copyFormats() {
|
|
53583
53651
|
const sheetId = this.getters.getActiveSheetId();
|
|
53584
53652
|
const zones = this.getters.getSelectedZones();
|
|
53585
|
-
const copiedData = {};
|
|
53586
|
-
for (const handler of this.clipboardHandlers) {
|
|
53587
|
-
|
|
53653
|
+
const copiedData = { zones, sheetId };
|
|
53654
|
+
for (const { handlerName, handler } of this.clipboardHandlers) {
|
|
53655
|
+
const handlerResult = handler.copy(getClipboardDataPositions(sheetId, zones), false);
|
|
53656
|
+
if (handlerResult !== undefined) {
|
|
53657
|
+
copiedData[handlerName] = handlerResult;
|
|
53658
|
+
}
|
|
53588
53659
|
}
|
|
53589
53660
|
return copiedData;
|
|
53590
53661
|
}
|
|
53591
53662
|
paintFormat(sheetId, target) {
|
|
53592
|
-
if (this.copiedData) {
|
|
53593
|
-
|
|
53594
|
-
handler.paste({ zones: target, sheetId }, this.copiedData, {
|
|
53595
|
-
isCutOperation: false,
|
|
53596
|
-
pasteOption: "onlyFormat",
|
|
53597
|
-
});
|
|
53598
|
-
}
|
|
53663
|
+
if (!this.copiedData) {
|
|
53664
|
+
return;
|
|
53599
53665
|
}
|
|
53666
|
+
const options = {
|
|
53667
|
+
isCutOperation: false,
|
|
53668
|
+
pasteOption: "onlyFormat",
|
|
53669
|
+
};
|
|
53670
|
+
const { target: pasteTarget, selectedZones } = getPasteTargetFromHandlers(sheetId, target, this.copiedData, this.clipboardHandlers, options);
|
|
53671
|
+
applyClipboardHandlersPaste(this.clipboardHandlers, this.copiedData, pasteTarget, options);
|
|
53672
|
+
selectPastedZone(this.model.selection, target, selectedZones);
|
|
53600
53673
|
if (this.status === "oneOff") {
|
|
53601
53674
|
this.cancel();
|
|
53602
53675
|
}
|
|
@@ -53643,12 +53716,8 @@ class HoveredTableStore extends SpreadsheetStore {
|
|
|
53643
53716
|
this.row = undefined;
|
|
53644
53717
|
}
|
|
53645
53718
|
computeOverlay() {
|
|
53646
|
-
if (!this.getters.isDashboard()) {
|
|
53647
|
-
return;
|
|
53648
|
-
}
|
|
53649
53719
|
this.overlayColors = new PositionMap();
|
|
53650
|
-
const col = this
|
|
53651
|
-
const row = this.row;
|
|
53720
|
+
const { col, row } = this;
|
|
53652
53721
|
if (col === undefined || row === undefined) {
|
|
53653
53722
|
return;
|
|
53654
53723
|
}
|
|
@@ -53657,9 +53726,16 @@ class HoveredTableStore extends SpreadsheetStore {
|
|
|
53657
53726
|
if (!table) {
|
|
53658
53727
|
return;
|
|
53659
53728
|
}
|
|
53660
|
-
const { left, right } = table.range.zone;
|
|
53661
|
-
|
|
53662
|
-
|
|
53729
|
+
const { left, right, top } = table.range.zone;
|
|
53730
|
+
const isTableHeader = row < top + table.config.numberOfHeaders;
|
|
53731
|
+
const doesTableRowHaveContent = range(left, right + 1).some((col) => {
|
|
53732
|
+
return (!this.getters.isColHidden(sheetId, col) &&
|
|
53733
|
+
this.getters.getEvaluatedCell({ sheetId, col, row }).formattedValue);
|
|
53734
|
+
});
|
|
53735
|
+
if (!isTableHeader && doesTableRowHaveContent) {
|
|
53736
|
+
for (let col = left; col <= right; col++) {
|
|
53737
|
+
this.overlayColors.set({ sheetId, col, row }, TABLE_HOVER_BACKGROUND_COLOR);
|
|
53738
|
+
}
|
|
53663
53739
|
}
|
|
53664
53740
|
}
|
|
53665
53741
|
}
|
|
@@ -59006,7 +59082,7 @@ class DataValidationPlugin extends CorePlugin {
|
|
|
59006
59082
|
else if (newRule.criterion.type === "isValueInList") {
|
|
59007
59083
|
newRule.criterion.values = Array.from(new Set(newRule.criterion.values));
|
|
59008
59084
|
}
|
|
59009
|
-
const adaptedRules = this.removeRangesFromRules(sheetId, newRule.ranges, rules);
|
|
59085
|
+
const adaptedRules = this.removeRangesFromRules(sheetId, newRule.ranges, rules, newRule.id);
|
|
59010
59086
|
const ruleIndex = adaptedRules.findIndex((rule) => rule.id === newRule.id);
|
|
59011
59087
|
if (ruleIndex !== -1) {
|
|
59012
59088
|
adaptedRules[ruleIndex] = newRule;
|
|
@@ -59016,9 +59092,12 @@ class DataValidationPlugin extends CorePlugin {
|
|
|
59016
59092
|
this.history.update("rules", sheetId, [...adaptedRules, newRule]);
|
|
59017
59093
|
}
|
|
59018
59094
|
}
|
|
59019
|
-
removeRangesFromRules(sheetId, ranges, rules) {
|
|
59095
|
+
removeRangesFromRules(sheetId, ranges, rules, editingRuleId) {
|
|
59020
59096
|
rules = deepCopy(rules);
|
|
59021
59097
|
for (const rule of rules) {
|
|
59098
|
+
if (rule.id === editingRuleId) {
|
|
59099
|
+
continue; // Skip the rule being edited to preserve its place in the list
|
|
59100
|
+
}
|
|
59022
59101
|
rule.ranges = this.getters.recomputeRanges(rule.ranges, ranges);
|
|
59023
59102
|
}
|
|
59024
59103
|
return rules.filter((rule) => rule.ranges.length > 0);
|
|
@@ -70846,49 +70925,17 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
70846
70925
|
if (!copiedData) {
|
|
70847
70926
|
return;
|
|
70848
70927
|
}
|
|
70849
|
-
let zone = undefined;
|
|
70850
|
-
let selectedZones = [];
|
|
70851
70928
|
const sheetId = this.getters.getActiveSheetId();
|
|
70852
|
-
let target = {
|
|
70853
|
-
sheetId,
|
|
70854
|
-
zones,
|
|
70855
|
-
};
|
|
70856
70929
|
const handlers = this.selectClipboardHandlers(copiedData);
|
|
70857
|
-
|
|
70858
|
-
const handlerData = copiedData[handlerName];
|
|
70859
|
-
if (!handlerData) {
|
|
70860
|
-
continue;
|
|
70861
|
-
}
|
|
70862
|
-
const currentTarget = handler.getPasteTarget(sheetId, zones, handlerData, options);
|
|
70863
|
-
if (currentTarget.figureId) {
|
|
70864
|
-
target.figureId = currentTarget.figureId;
|
|
70865
|
-
}
|
|
70866
|
-
for (const targetZone of currentTarget.zones) {
|
|
70867
|
-
selectedZones.push(targetZone);
|
|
70868
|
-
if (zone === undefined) {
|
|
70869
|
-
zone = targetZone;
|
|
70870
|
-
continue;
|
|
70871
|
-
}
|
|
70872
|
-
zone = union(zone, targetZone);
|
|
70873
|
-
}
|
|
70874
|
-
}
|
|
70930
|
+
const { target, zone, selectedZones } = getPasteTargetFromHandlers(sheetId, zones, copiedData, handlers, options);
|
|
70875
70931
|
if (zone !== undefined) {
|
|
70876
|
-
this.addMissingDimensions(
|
|
70932
|
+
this.addMissingDimensions(sheetId, zone.right - zone.left + 1, zone.bottom - zone.top + 1, zone.left, zone.top);
|
|
70877
70933
|
}
|
|
70878
|
-
handlers
|
|
70879
|
-
const handlerData = copiedData[handlerName];
|
|
70880
|
-
if (handlerData) {
|
|
70881
|
-
handler.paste(target, handlerData, options);
|
|
70882
|
-
}
|
|
70883
|
-
});
|
|
70934
|
+
applyClipboardHandlersPaste(handlers, copiedData, target, options);
|
|
70884
70935
|
if (!options?.selectTarget) {
|
|
70885
70936
|
return;
|
|
70886
70937
|
}
|
|
70887
|
-
|
|
70888
|
-
const col = selection.left;
|
|
70889
|
-
const row = selection.top;
|
|
70890
|
-
this.selection.getBackToDefault();
|
|
70891
|
-
this.selection.selectZone({ cell: { col, row }, zone: union(...selectedZones) }, { scrollIntoView: false });
|
|
70938
|
+
selectPastedZone(this.selection, zones, selectedZones);
|
|
70892
70939
|
}
|
|
70893
70940
|
/**
|
|
70894
70941
|
* Add columns and/or rows to ensure that col + width and row + height are still
|
|
@@ -80711,6 +80758,6 @@ exports.tokenColors = tokenColors;
|
|
|
80711
80758
|
exports.tokenize = tokenize;
|
|
80712
80759
|
|
|
80713
80760
|
|
|
80714
|
-
__info__.version = "18.3.
|
|
80715
|
-
__info__.date = "2025-06-
|
|
80716
|
-
__info__.hash = "
|
|
80761
|
+
__info__.version = "18.3.10";
|
|
80762
|
+
__info__.date = "2025-06-23T15:05:03.747Z";
|
|
80763
|
+
__info__.hash = "748e300";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -2102,13 +2102,6 @@ declare class UIPlugin<State = any> extends BasePlugin<State, Command> {
|
|
|
2102
2102
|
drawLayer(ctx: GridRenderingContext, layer: LayerName): void;
|
|
2103
2103
|
}
|
|
2104
2104
|
|
|
2105
|
-
type MinimalClipboardData = {
|
|
2106
|
-
sheetId?: UID;
|
|
2107
|
-
cells?: ClipboardCell[][];
|
|
2108
|
-
zones?: Zone[];
|
|
2109
|
-
figureId?: UID;
|
|
2110
|
-
[key: string]: unknown;
|
|
2111
|
-
};
|
|
2112
2105
|
interface SpreadsheetClipboardData extends MinimalClipboardData {
|
|
2113
2106
|
version?: string;
|
|
2114
2107
|
clipboardId?: string;
|
|
@@ -2582,6 +2575,13 @@ type ClipboardPasteTarget = {
|
|
|
2582
2575
|
zones: Zone[];
|
|
2583
2576
|
figureId?: UID;
|
|
2584
2577
|
};
|
|
2578
|
+
type MinimalClipboardData = {
|
|
2579
|
+
sheetId?: UID;
|
|
2580
|
+
cells?: ClipboardCell[][];
|
|
2581
|
+
zones?: Zone[];
|
|
2582
|
+
figureId?: UID;
|
|
2583
|
+
[key: string]: unknown;
|
|
2584
|
+
};
|
|
2585
2585
|
|
|
2586
2586
|
/**
|
|
2587
2587
|
* There are two kinds of commands: CoreCommands and LocalCommands
|
|
@@ -12595,4 +12595,4 @@ declare const chartHelpers: {
|
|
|
12595
12595
|
WaterfallChart: typeof WaterfallChart;
|
|
12596
12596
|
};
|
|
12597
12597
|
|
|
12598
|
-
export { AST, ASTFuncall, AboveAverageRule, AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, ActivateNextSheetCommand, ActivatePreviousSheetCommand, ActivateSheetCommand, 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, BorderPosition, BorderStyle, Box, BoxTextContent, CHART_TYPES, CSSProperties, CancelledReason, Cell, CellErrorType, CellIsRule, CellPosition, CellValue, CellValueType, ChangeType, ChartAxisFormats, ChartCreationContext, ChartDefinition, ChartJSRuntime, ChartRuntime, ChartRuntimeGenerationArgs, ChartStyle, ChartType, ChartWithAxisDefinition, ChartWithDataSetDefinition, CleanClipBoardHighlightCommand, ClearCellCommand, ClearCellsCommand, ClearFormattingCommand, Client, ClientId, ClientJoinedMessage, ClientLeftMessage, ClientMovedMessage, ClientPosition, ClipboardCell, ClipboardCellData, ClipboardData, ClipboardFigureData, ClipboardMIMEType, ClipboardOperation, ClipboardOptions, ClipboardPasteOptions, ClipboardPasteTarget, Cloneable, CollaborationMessage, CollaborativeEvent, CollaborativeEventReceived, CollaborativeEventTypes, Color, ColorScaleMidPointThreshold, ColorScaleRule, ColorScaleThreshold, ColorSheetCommand, Command, CommandDispatcher, CommandHandler, CommandResult, CommandTypes, CommonPivotCoreDefinition, CompiledFormula, ComposerFocusType, ComputeFunction, ComputedTableStyle, ConditionalFormat, ConditionalFormatInternal, ConditionalFormatRule, ConditionalFormatRuleInternal, ConditionalFormattingOperatorValues, ConsecutiveIndexes, ContainsTextRule, CopyCommand, CopyModifier, CopyPasteCellsAboveCommand, CopyPasteCellsOnLeftCommand, CoreCommand, CoreCommandDispatcher, CoreCommandTypes, CoreGetters, CorePlugin, CoreTable, CoreTableType, CoreViewCommand, CoreViewCommandTypes, CoreViewPlugin, CreateChartCommand, CreateFigureCommand, CreateImageOverCommand, CreateRevisionOptions, CreateSheetCommand, CreateTableCommand, CreateTableStyleCommand, Currency, CustomFormulaCriterion, CustomizedDataSet, CutCommand, DEFAULT_LOCALE, DEFAULT_LOCALES, DIRECTION, DOMCoordinates, DOMDimension, DataBarFill, DataBarRule, DataBarRuleInternal, DataSet, DataValidationCriterion, DataValidationCriterionType, DataValidationDateCriterion, DataValidationRule, DataValidationRuleData, DatasetDesign, DatasetValues, DateCriterionValue, DateIncrementModifier, DateIsAfterCriterion, DateIsBeforeCriterion, DateIsBetweenCriterion, DateIsCriterion, DateIsNotBetweenCriterion, DateIsOnOrAfterCriterion, DateIsOnOrBeforeCriterion, DateIsValidCriterion, DebouncedFunction, DeleteCellCommand, DeleteContentCommand, DeleteFigureCommand, DeleteSheetCommand, 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, EvaluationError, ExcelChartDataset, ExcelChartDefinition, ExcelChartType, ExcelFigureSize, ExcelFilterData, ExcelHeaderData, ExcelSheetData, ExcelTableData, ExcelWorkbookData, ExpressionRule, Figure, FigureData, FigureInfo, FigureSize, FigureUI, Filter, FilterId, FoldAllHeaderGroupsCommand, FoldHeaderGroupCommand, FoldHeaderGroupsInZoneCommand, Format, FormattedValue, FormulaCell, FormulaModifier, FormulaToExecute, FreezeColumnsCommand, FreezeRowsCommand, FunctionDescription, FunctionRegistry, FunctionResultNumber, FunctionResultObject, GeneratorCell, GenericDefinition, GetSymbolValue, Getters, Granularity, GridClickModifiers, GridRenderingContext, GroupHeadersCommand, HSLA, HeaderData, HeaderDimensions, HeaderGroup, HeaderIndex, HeadersDependentCommand, HideColumnsRowsCommand, HideSheetCommand, Highlight$1 as Highlight, HistoryChange, IconSet, IconSetRule, IconThreshold, Image, Immutable, Increment, IncrementModifier, InformationNotification, InitPivotParams, InsertCellCommand, InsertNewPivotCommand, InsertPivotCommand, InsertPivotWithTableCommand, IsBetweenCriterion, IsCheckboxCriterion, IsEqualCriterion, IsGreaterOrEqualToCriterion, IsGreaterThanCriterion, IsLessOrEqualToCriterion, IsLessThanCriterion, IsNotBetweenCriterion, IsNotEqualCriterion, IsValueInListCriterion, IsValueInRangeCriterion, LabelValues, LayerName, Lazy, Link, LiteralCell, LocalCommand, Locale, LocaleCode, LocaleFormat, LookupCaches, Matrix, Maybe, MenuMouseEvent, Merge, Model, MoveColumnsRowsCommand, MoveConditionalFormatCommand, MoveRangeCommand, MoveSheetCommand, MoveViewportDownCommand, MoveViewportToCellCommand, MoveViewportUpCommand, NewLocalStateUpdateEvent, NotContainsTextRule, NotificationType, NumberCell, OSClipboardContent, Offset, OperationSequenceNode, OrderedLayers, PaintFormat, PaneDivision, ParsedOSClipboardContent, ParsedOsClipboardContentWithImageData, PasteCommand, PasteFromOSClipboardCommand, Pivot, PivotColRowDomain, PivotCoreDefinition, PivotCoreDimension, PivotCoreMeasure, PivotDimension$1 as PivotDimension, PivotDomain, PivotEmptyCell, PivotField, PivotFields, PivotHeaderCell, PivotMeasure, PivotMeasureDisplay, PivotMeasureDisplayType, PivotMeasureHeaderCell, PivotNode, PivotRuntimeDefinition, PivotSortedColumn, PivotStartPresenceTracking, PivotStopPresenceTracking, PivotTableCell, PivotTableColumn, PivotTableData, PivotTableRow, PivotTimeAdapter, PivotTimeAdapterNotNull, PivotValueCell, Pixel, PixelPosition, Position$1 as Position, PositionDependentCommand, PropsOf, RGBA, Range, 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, 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, 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, Token, Tooltip, Top10Rule, Transformation, TransformationFactory, TransportService, TrendConfiguration, TrendType, TrimWhitespaceCommand, UID, UIPlugin, UnGroupHeadersCommand, UnboundedZone, UndoCommand, UnexpectedRevisionIdEvent, UnfoldAllHeaderGroupsCommand, UnfoldHeaderGroupCommand, UnfoldHeaderGroupsInZoneCommand, UnfreezeColumnsCommand, UnfreezeColumnsRowsCommand, UnfreezeRowsCommand, UnhideColumnsRowsCommand, UpdateCellCommand, UpdateCellData, UpdateCellPositionCommand, UpdateChartCommand, UpdateFigureCommand, UpdateFilterCommand, UpdateLocaleCommand, UpdatePivotCommand, UpdateTableCommand, Validation, VerticalAlign, Viewport, WorkbookData, WorkbookHistory, Wrapping, Zone, ZoneDependentCommand, ZoneDimension, __info__, addFunction, addRenderingLayer, astToFormula, borderStyles, canExecuteInReadonly, chartHelpers, compile, compileTokens, components, constants, containsBlanksRule, containsErrorsRule, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateBordersCommands, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, isCoreCommand, isHeadersDependant, isMatrix, isPositionDependent, isRangeDependant, isSheetDependent, isTargetDependent, isZoneDependent, iterateAstNodes, links, load, notContainsBlanksRule, notContainsErrorsRule, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
12598
|
+
export { AST, ASTFuncall, AboveAverageRule, AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, ActivateNextSheetCommand, ActivatePreviousSheetCommand, ActivateSheetCommand, 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, BorderPosition, BorderStyle, Box, BoxTextContent, CHART_TYPES, CSSProperties, CancelledReason, Cell, CellErrorType, CellIsRule, CellPosition, CellValue, CellValueType, ChangeType, ChartAxisFormats, ChartCreationContext, ChartDefinition, ChartJSRuntime, ChartRuntime, ChartRuntimeGenerationArgs, ChartStyle, ChartType, ChartWithAxisDefinition, ChartWithDataSetDefinition, CleanClipBoardHighlightCommand, ClearCellCommand, ClearCellsCommand, ClearFormattingCommand, Client, ClientId, ClientJoinedMessage, ClientLeftMessage, ClientMovedMessage, ClientPosition, ClipboardCell, ClipboardCellData, ClipboardData, ClipboardFigureData, ClipboardMIMEType, ClipboardOperation, ClipboardOptions, ClipboardPasteOptions, ClipboardPasteTarget, Cloneable, CollaborationMessage, CollaborativeEvent, CollaborativeEventReceived, CollaborativeEventTypes, Color, ColorScaleMidPointThreshold, ColorScaleRule, ColorScaleThreshold, ColorSheetCommand, Command, CommandDispatcher, CommandHandler, CommandResult, CommandTypes, CommonPivotCoreDefinition, CompiledFormula, ComposerFocusType, ComputeFunction, ComputedTableStyle, ConditionalFormat, ConditionalFormatInternal, ConditionalFormatRule, ConditionalFormatRuleInternal, ConditionalFormattingOperatorValues, ConsecutiveIndexes, ContainsTextRule, CopyCommand, CopyModifier, CopyPasteCellsAboveCommand, CopyPasteCellsOnLeftCommand, CoreCommand, CoreCommandDispatcher, CoreCommandTypes, CoreGetters, CorePlugin, CoreTable, CoreTableType, CoreViewCommand, CoreViewCommandTypes, CoreViewPlugin, CreateChartCommand, CreateFigureCommand, CreateImageOverCommand, CreateRevisionOptions, CreateSheetCommand, CreateTableCommand, CreateTableStyleCommand, Currency, CustomFormulaCriterion, CustomizedDataSet, CutCommand, DEFAULT_LOCALE, DEFAULT_LOCALES, DIRECTION, DOMCoordinates, DOMDimension, DataBarFill, DataBarRule, DataBarRuleInternal, DataSet, DataValidationCriterion, DataValidationCriterionType, DataValidationDateCriterion, DataValidationRule, DataValidationRuleData, DatasetDesign, DatasetValues, DateCriterionValue, DateIncrementModifier, DateIsAfterCriterion, DateIsBeforeCriterion, DateIsBetweenCriterion, DateIsCriterion, DateIsNotBetweenCriterion, DateIsOnOrAfterCriterion, DateIsOnOrBeforeCriterion, DateIsValidCriterion, DebouncedFunction, DeleteCellCommand, DeleteContentCommand, DeleteFigureCommand, DeleteSheetCommand, 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, EvaluationError, ExcelChartDataset, ExcelChartDefinition, ExcelChartType, ExcelFigureSize, ExcelFilterData, ExcelHeaderData, ExcelSheetData, ExcelTableData, ExcelWorkbookData, ExpressionRule, Figure, FigureData, FigureInfo, FigureSize, FigureUI, Filter, FilterId, FoldAllHeaderGroupsCommand, FoldHeaderGroupCommand, FoldHeaderGroupsInZoneCommand, Format, FormattedValue, FormulaCell, FormulaModifier, FormulaToExecute, FreezeColumnsCommand, FreezeRowsCommand, FunctionDescription, FunctionRegistry, FunctionResultNumber, FunctionResultObject, GeneratorCell, GenericDefinition, GetSymbolValue, Getters, Granularity, GridClickModifiers, GridRenderingContext, GroupHeadersCommand, HSLA, HeaderData, HeaderDimensions, HeaderGroup, HeaderIndex, HeadersDependentCommand, HideColumnsRowsCommand, HideSheetCommand, Highlight$1 as Highlight, HistoryChange, IconSet, IconSetRule, IconThreshold, Image, Immutable, Increment, IncrementModifier, InformationNotification, InitPivotParams, InsertCellCommand, InsertNewPivotCommand, InsertPivotCommand, InsertPivotWithTableCommand, IsBetweenCriterion, IsCheckboxCriterion, IsEqualCriterion, IsGreaterOrEqualToCriterion, IsGreaterThanCriterion, IsLessOrEqualToCriterion, IsLessThanCriterion, IsNotBetweenCriterion, IsNotEqualCriterion, IsValueInListCriterion, IsValueInRangeCriterion, LabelValues, LayerName, Lazy, Link, LiteralCell, LocalCommand, Locale, LocaleCode, LocaleFormat, LookupCaches, Matrix, Maybe, MenuMouseEvent, Merge, MinimalClipboardData, Model, MoveColumnsRowsCommand, MoveConditionalFormatCommand, MoveRangeCommand, MoveSheetCommand, MoveViewportDownCommand, MoveViewportToCellCommand, MoveViewportUpCommand, NewLocalStateUpdateEvent, NotContainsTextRule, NotificationType, NumberCell, OSClipboardContent, Offset, OperationSequenceNode, OrderedLayers, PaintFormat, PaneDivision, ParsedOSClipboardContent, ParsedOsClipboardContentWithImageData, PasteCommand, PasteFromOSClipboardCommand, Pivot, PivotColRowDomain, PivotCoreDefinition, PivotCoreDimension, PivotCoreMeasure, PivotDimension$1 as PivotDimension, PivotDomain, PivotEmptyCell, PivotField, PivotFields, PivotHeaderCell, PivotMeasure, PivotMeasureDisplay, PivotMeasureDisplayType, PivotMeasureHeaderCell, PivotNode, PivotRuntimeDefinition, PivotSortedColumn, PivotStartPresenceTracking, PivotStopPresenceTracking, PivotTableCell, PivotTableColumn, PivotTableData, PivotTableRow, PivotTimeAdapter, PivotTimeAdapterNotNull, PivotValueCell, Pixel, PixelPosition, Position$1 as Position, PositionDependentCommand, PropsOf, RGBA, Range, 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, 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, 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, Token, Tooltip, Top10Rule, Transformation, TransformationFactory, TransportService, TrendConfiguration, TrendType, TrimWhitespaceCommand, UID, UIPlugin, UnGroupHeadersCommand, UnboundedZone, UndoCommand, UnexpectedRevisionIdEvent, UnfoldAllHeaderGroupsCommand, UnfoldHeaderGroupCommand, UnfoldHeaderGroupsInZoneCommand, UnfreezeColumnsCommand, UnfreezeColumnsRowsCommand, UnfreezeRowsCommand, UnhideColumnsRowsCommand, UpdateCellCommand, UpdateCellData, UpdateCellPositionCommand, UpdateChartCommand, UpdateFigureCommand, UpdateFilterCommand, UpdateLocaleCommand, UpdatePivotCommand, UpdateTableCommand, Validation, VerticalAlign, Viewport, WorkbookData, WorkbookHistory, Wrapping, Zone, ZoneDependentCommand, ZoneDimension, __info__, addFunction, addRenderingLayer, astToFormula, borderStyles, canExecuteInReadonly, chartHelpers, compile, compileTokens, components, constants, containsBlanksRule, containsErrorsRule, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateBordersCommands, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, isCoreCommand, isHeadersDependant, isMatrix, isPositionDependent, isRangeDependant, isSheetDependent, isTargetDependent, isZoneDependent, iterateAstNodes, links, load, notContainsBlanksRule, notContainsErrorsRule, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 18.3.
|
|
6
|
-
* @date 2025-06-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.3.10
|
|
6
|
+
* @date 2025-06-23T15:05:03.747Z
|
|
7
|
+
* @hash 748e300
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, App, blockDom, useState, onPatched, onWillPatch, onWillUpdateProps, useExternalListener, onWillStart, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
|
|
@@ -141,6 +141,7 @@ const FROZEN_PANE_HEADER_BORDER_COLOR = "#BCBCBC";
|
|
|
141
141
|
const FROZEN_PANE_BORDER_COLOR = "#DADFE8";
|
|
142
142
|
const COMPOSER_ASSISTANT_COLOR = "#9B359B";
|
|
143
143
|
const COLOR_TRANSPARENT = "#00000000";
|
|
144
|
+
const TABLE_HOVER_BACKGROUND_COLOR = "#017E8414";
|
|
144
145
|
const CHART_WATERFALL_POSITIVE_COLOR = "#4EA7F2";
|
|
145
146
|
const CHART_WATERFALL_NEGATIVE_COLOR = "#EA6175";
|
|
146
147
|
const CHART_WATERFALL_SUBTOTAL_COLOR = "#AAAAAA";
|
|
@@ -7120,6 +7121,63 @@ function parseOSClipboardContent(content, clipboardId) {
|
|
|
7120
7121
|
};
|
|
7121
7122
|
return osClipboardContent;
|
|
7122
7123
|
}
|
|
7124
|
+
/**
|
|
7125
|
+
* Applies each clipboard handler to paste its corresponding data into the target.
|
|
7126
|
+
*/
|
|
7127
|
+
const applyClipboardHandlersPaste = (handlers, copiedData, target, options) => {
|
|
7128
|
+
handlers.forEach(({ handlerName, handler }) => {
|
|
7129
|
+
const data = copiedData[handlerName];
|
|
7130
|
+
if (data) {
|
|
7131
|
+
handler.paste(target, data, options);
|
|
7132
|
+
}
|
|
7133
|
+
});
|
|
7134
|
+
};
|
|
7135
|
+
/**
|
|
7136
|
+
* Returns the paste target based on clipboard handlers.
|
|
7137
|
+
* Also includes the full affected zone and the list of pasted zones for selection.
|
|
7138
|
+
*/
|
|
7139
|
+
function getPasteTargetFromHandlers(sheetId, zones, copiedData, handlers, options) {
|
|
7140
|
+
let zone = undefined;
|
|
7141
|
+
let selectedZones = [];
|
|
7142
|
+
let target = {
|
|
7143
|
+
sheetId,
|
|
7144
|
+
zones,
|
|
7145
|
+
};
|
|
7146
|
+
for (const { handlerName, handler } of handlers) {
|
|
7147
|
+
const handlerData = copiedData[handlerName];
|
|
7148
|
+
if (!handlerData) {
|
|
7149
|
+
continue;
|
|
7150
|
+
}
|
|
7151
|
+
const currentTarget = handler.getPasteTarget(sheetId, zones, handlerData, options);
|
|
7152
|
+
if (currentTarget.figureId) {
|
|
7153
|
+
target.figureId = currentTarget.figureId;
|
|
7154
|
+
}
|
|
7155
|
+
for (const targetZone of currentTarget.zones) {
|
|
7156
|
+
selectedZones.push(targetZone);
|
|
7157
|
+
if (zone === undefined) {
|
|
7158
|
+
zone = targetZone;
|
|
7159
|
+
continue;
|
|
7160
|
+
}
|
|
7161
|
+
zone = union(zone, targetZone);
|
|
7162
|
+
}
|
|
7163
|
+
}
|
|
7164
|
+
return {
|
|
7165
|
+
target,
|
|
7166
|
+
zone,
|
|
7167
|
+
selectedZones,
|
|
7168
|
+
};
|
|
7169
|
+
}
|
|
7170
|
+
/**
|
|
7171
|
+
* Updates the selection after a paste operation.
|
|
7172
|
+
*/
|
|
7173
|
+
const selectPastedZone = (selection, sourceZones, pastedZones) => {
|
|
7174
|
+
const anchorCell = {
|
|
7175
|
+
col: sourceZones[0].left,
|
|
7176
|
+
row: sourceZones[0].top,
|
|
7177
|
+
};
|
|
7178
|
+
selection.getBackToDefault();
|
|
7179
|
+
selection.selectZone({ cell: anchorCell, zone: union(...pastedZones) }, { scrollIntoView: false });
|
|
7180
|
+
};
|
|
7123
7181
|
|
|
7124
7182
|
class ClipboardHandler {
|
|
7125
7183
|
getters;
|
|
@@ -49821,7 +49879,7 @@ class SpreadsheetPivot {
|
|
|
49821
49879
|
}
|
|
49822
49880
|
getTypeFromZone(sheetId, zone) {
|
|
49823
49881
|
const cells = this.getters.getEvaluatedCellsInZone(sheetId, zone);
|
|
49824
|
-
const nonEmptyCells = cells.filter((cell) => cell.type
|
|
49882
|
+
const nonEmptyCells = cells.filter((cell) => !(cell.type === CellValueType.empty || cell.value === ""));
|
|
49825
49883
|
if (nonEmptyCells.length === 0) {
|
|
49826
49884
|
return "integer";
|
|
49827
49885
|
}
|
|
@@ -53538,15 +53596,16 @@ class GridAddRowsFooter extends Component {
|
|
|
53538
53596
|
}
|
|
53539
53597
|
}
|
|
53540
53598
|
|
|
53599
|
+
const PAINT_FORMAT_HANDLER_KEYS = [
|
|
53600
|
+
"cell",
|
|
53601
|
+
"border",
|
|
53602
|
+
"table",
|
|
53603
|
+
"conditionalFormat",
|
|
53604
|
+
"merge",
|
|
53605
|
+
];
|
|
53541
53606
|
class PaintFormatStore extends SpreadsheetStore {
|
|
53542
53607
|
mutators = ["activate", "cancel", "pasteFormat"];
|
|
53543
53608
|
highlightStore = this.get(HighlightStore);
|
|
53544
|
-
clipboardHandlers = [
|
|
53545
|
-
new CellClipboardHandler(this.getters, this.model.dispatch),
|
|
53546
|
-
new BorderClipboardHandler(this.getters, this.model.dispatch),
|
|
53547
|
-
new TableClipboardHandler(this.getters, this.model.dispatch),
|
|
53548
|
-
new ConditionalFormatClipboardHandler(this.getters, this.model.dispatch),
|
|
53549
|
-
];
|
|
53550
53609
|
status = "inactive";
|
|
53551
53610
|
copiedData;
|
|
53552
53611
|
constructor(get) {
|
|
@@ -53577,24 +53636,38 @@ class PaintFormatStore extends SpreadsheetStore {
|
|
|
53577
53636
|
get isActive() {
|
|
53578
53637
|
return this.status !== "inactive";
|
|
53579
53638
|
}
|
|
53639
|
+
get clipboardHandlers() {
|
|
53640
|
+
return PAINT_FORMAT_HANDLER_KEYS.map((handlerName) => {
|
|
53641
|
+
const HandlerClass = clipboardHandlersRegistries.cellHandlers.get(handlerName);
|
|
53642
|
+
return {
|
|
53643
|
+
handlerName,
|
|
53644
|
+
handler: new HandlerClass(this.getters, this.model.dispatch),
|
|
53645
|
+
};
|
|
53646
|
+
});
|
|
53647
|
+
}
|
|
53580
53648
|
copyFormats() {
|
|
53581
53649
|
const sheetId = this.getters.getActiveSheetId();
|
|
53582
53650
|
const zones = this.getters.getSelectedZones();
|
|
53583
|
-
const copiedData = {};
|
|
53584
|
-
for (const handler of this.clipboardHandlers) {
|
|
53585
|
-
|
|
53651
|
+
const copiedData = { zones, sheetId };
|
|
53652
|
+
for (const { handlerName, handler } of this.clipboardHandlers) {
|
|
53653
|
+
const handlerResult = handler.copy(getClipboardDataPositions(sheetId, zones), false);
|
|
53654
|
+
if (handlerResult !== undefined) {
|
|
53655
|
+
copiedData[handlerName] = handlerResult;
|
|
53656
|
+
}
|
|
53586
53657
|
}
|
|
53587
53658
|
return copiedData;
|
|
53588
53659
|
}
|
|
53589
53660
|
paintFormat(sheetId, target) {
|
|
53590
|
-
if (this.copiedData) {
|
|
53591
|
-
|
|
53592
|
-
handler.paste({ zones: target, sheetId }, this.copiedData, {
|
|
53593
|
-
isCutOperation: false,
|
|
53594
|
-
pasteOption: "onlyFormat",
|
|
53595
|
-
});
|
|
53596
|
-
}
|
|
53661
|
+
if (!this.copiedData) {
|
|
53662
|
+
return;
|
|
53597
53663
|
}
|
|
53664
|
+
const options = {
|
|
53665
|
+
isCutOperation: false,
|
|
53666
|
+
pasteOption: "onlyFormat",
|
|
53667
|
+
};
|
|
53668
|
+
const { target: pasteTarget, selectedZones } = getPasteTargetFromHandlers(sheetId, target, this.copiedData, this.clipboardHandlers, options);
|
|
53669
|
+
applyClipboardHandlersPaste(this.clipboardHandlers, this.copiedData, pasteTarget, options);
|
|
53670
|
+
selectPastedZone(this.model.selection, target, selectedZones);
|
|
53598
53671
|
if (this.status === "oneOff") {
|
|
53599
53672
|
this.cancel();
|
|
53600
53673
|
}
|
|
@@ -53641,12 +53714,8 @@ class HoveredTableStore extends SpreadsheetStore {
|
|
|
53641
53714
|
this.row = undefined;
|
|
53642
53715
|
}
|
|
53643
53716
|
computeOverlay() {
|
|
53644
|
-
if (!this.getters.isDashboard()) {
|
|
53645
|
-
return;
|
|
53646
|
-
}
|
|
53647
53717
|
this.overlayColors = new PositionMap();
|
|
53648
|
-
const col = this
|
|
53649
|
-
const row = this.row;
|
|
53718
|
+
const { col, row } = this;
|
|
53650
53719
|
if (col === undefined || row === undefined) {
|
|
53651
53720
|
return;
|
|
53652
53721
|
}
|
|
@@ -53655,9 +53724,16 @@ class HoveredTableStore extends SpreadsheetStore {
|
|
|
53655
53724
|
if (!table) {
|
|
53656
53725
|
return;
|
|
53657
53726
|
}
|
|
53658
|
-
const { left, right } = table.range.zone;
|
|
53659
|
-
|
|
53660
|
-
|
|
53727
|
+
const { left, right, top } = table.range.zone;
|
|
53728
|
+
const isTableHeader = row < top + table.config.numberOfHeaders;
|
|
53729
|
+
const doesTableRowHaveContent = range(left, right + 1).some((col) => {
|
|
53730
|
+
return (!this.getters.isColHidden(sheetId, col) &&
|
|
53731
|
+
this.getters.getEvaluatedCell({ sheetId, col, row }).formattedValue);
|
|
53732
|
+
});
|
|
53733
|
+
if (!isTableHeader && doesTableRowHaveContent) {
|
|
53734
|
+
for (let col = left; col <= right; col++) {
|
|
53735
|
+
this.overlayColors.set({ sheetId, col, row }, TABLE_HOVER_BACKGROUND_COLOR);
|
|
53736
|
+
}
|
|
53661
53737
|
}
|
|
53662
53738
|
}
|
|
53663
53739
|
}
|
|
@@ -59004,7 +59080,7 @@ class DataValidationPlugin extends CorePlugin {
|
|
|
59004
59080
|
else if (newRule.criterion.type === "isValueInList") {
|
|
59005
59081
|
newRule.criterion.values = Array.from(new Set(newRule.criterion.values));
|
|
59006
59082
|
}
|
|
59007
|
-
const adaptedRules = this.removeRangesFromRules(sheetId, newRule.ranges, rules);
|
|
59083
|
+
const adaptedRules = this.removeRangesFromRules(sheetId, newRule.ranges, rules, newRule.id);
|
|
59008
59084
|
const ruleIndex = adaptedRules.findIndex((rule) => rule.id === newRule.id);
|
|
59009
59085
|
if (ruleIndex !== -1) {
|
|
59010
59086
|
adaptedRules[ruleIndex] = newRule;
|
|
@@ -59014,9 +59090,12 @@ class DataValidationPlugin extends CorePlugin {
|
|
|
59014
59090
|
this.history.update("rules", sheetId, [...adaptedRules, newRule]);
|
|
59015
59091
|
}
|
|
59016
59092
|
}
|
|
59017
|
-
removeRangesFromRules(sheetId, ranges, rules) {
|
|
59093
|
+
removeRangesFromRules(sheetId, ranges, rules, editingRuleId) {
|
|
59018
59094
|
rules = deepCopy(rules);
|
|
59019
59095
|
for (const rule of rules) {
|
|
59096
|
+
if (rule.id === editingRuleId) {
|
|
59097
|
+
continue; // Skip the rule being edited to preserve its place in the list
|
|
59098
|
+
}
|
|
59020
59099
|
rule.ranges = this.getters.recomputeRanges(rule.ranges, ranges);
|
|
59021
59100
|
}
|
|
59022
59101
|
return rules.filter((rule) => rule.ranges.length > 0);
|
|
@@ -70844,49 +70923,17 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
70844
70923
|
if (!copiedData) {
|
|
70845
70924
|
return;
|
|
70846
70925
|
}
|
|
70847
|
-
let zone = undefined;
|
|
70848
|
-
let selectedZones = [];
|
|
70849
70926
|
const sheetId = this.getters.getActiveSheetId();
|
|
70850
|
-
let target = {
|
|
70851
|
-
sheetId,
|
|
70852
|
-
zones,
|
|
70853
|
-
};
|
|
70854
70927
|
const handlers = this.selectClipboardHandlers(copiedData);
|
|
70855
|
-
|
|
70856
|
-
const handlerData = copiedData[handlerName];
|
|
70857
|
-
if (!handlerData) {
|
|
70858
|
-
continue;
|
|
70859
|
-
}
|
|
70860
|
-
const currentTarget = handler.getPasteTarget(sheetId, zones, handlerData, options);
|
|
70861
|
-
if (currentTarget.figureId) {
|
|
70862
|
-
target.figureId = currentTarget.figureId;
|
|
70863
|
-
}
|
|
70864
|
-
for (const targetZone of currentTarget.zones) {
|
|
70865
|
-
selectedZones.push(targetZone);
|
|
70866
|
-
if (zone === undefined) {
|
|
70867
|
-
zone = targetZone;
|
|
70868
|
-
continue;
|
|
70869
|
-
}
|
|
70870
|
-
zone = union(zone, targetZone);
|
|
70871
|
-
}
|
|
70872
|
-
}
|
|
70928
|
+
const { target, zone, selectedZones } = getPasteTargetFromHandlers(sheetId, zones, copiedData, handlers, options);
|
|
70873
70929
|
if (zone !== undefined) {
|
|
70874
|
-
this.addMissingDimensions(
|
|
70930
|
+
this.addMissingDimensions(sheetId, zone.right - zone.left + 1, zone.bottom - zone.top + 1, zone.left, zone.top);
|
|
70875
70931
|
}
|
|
70876
|
-
handlers
|
|
70877
|
-
const handlerData = copiedData[handlerName];
|
|
70878
|
-
if (handlerData) {
|
|
70879
|
-
handler.paste(target, handlerData, options);
|
|
70880
|
-
}
|
|
70881
|
-
});
|
|
70932
|
+
applyClipboardHandlersPaste(handlers, copiedData, target, options);
|
|
70882
70933
|
if (!options?.selectTarget) {
|
|
70883
70934
|
return;
|
|
70884
70935
|
}
|
|
70885
|
-
|
|
70886
|
-
const col = selection.left;
|
|
70887
|
-
const row = selection.top;
|
|
70888
|
-
this.selection.getBackToDefault();
|
|
70889
|
-
this.selection.selectZone({ cell: { col, row }, zone: union(...selectedZones) }, { scrollIntoView: false });
|
|
70936
|
+
selectPastedZone(this.selection, zones, selectedZones);
|
|
70890
70937
|
}
|
|
70891
70938
|
/**
|
|
70892
70939
|
* Add columns and/or rows to ensure that col + width and row + height are still
|
|
@@ -80663,6 +80710,6 @@ const chartHelpers = { ...CHART_HELPERS, ...CHART_RUNTIME_HELPERS };
|
|
|
80663
80710
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, CoreViewPlugin, DispatchResult, EvaluationError, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, chartHelpers, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
80664
80711
|
|
|
80665
80712
|
|
|
80666
|
-
__info__.version = "18.3.
|
|
80667
|
-
__info__.date = "2025-06-
|
|
80668
|
-
__info__.hash = "
|
|
80713
|
+
__info__.version = "18.3.10";
|
|
80714
|
+
__info__.date = "2025-06-23T15:05:03.747Z";
|
|
80715
|
+
__info__.hash = "748e300";
|