@odoo/o-spreadsheet 16.0.18 → 16.0.19
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.
|
@@ -1010,13 +1010,17 @@ function getAddHeaderStartIndex(position, base) {
|
|
|
1010
1010
|
return position === "after" ? base + 1 : base;
|
|
1011
1011
|
}
|
|
1012
1012
|
/**
|
|
1013
|
-
*
|
|
1013
|
+
* Compares two objects.
|
|
1014
1014
|
*/
|
|
1015
1015
|
function deepEquals(o1, o2) {
|
|
1016
1016
|
if (o1 === o2)
|
|
1017
1017
|
return true;
|
|
1018
1018
|
if ((o1 && !o2) || (o2 && !o1))
|
|
1019
1019
|
return false;
|
|
1020
|
+
if (typeof o1 !== typeof o2)
|
|
1021
|
+
return false;
|
|
1022
|
+
if (typeof o1 !== "object")
|
|
1023
|
+
return o1 === o2;
|
|
1020
1024
|
// Objects can have different keys if the values are undefined
|
|
1021
1025
|
const keys = new Set();
|
|
1022
1026
|
Object.keys(o1).forEach((key) => keys.add(key));
|
|
@@ -21300,9 +21304,11 @@ function useCellHovered(env, gridRef, callback) {
|
|
|
21300
21304
|
}
|
|
21301
21305
|
}
|
|
21302
21306
|
function updateMousePosition(e) {
|
|
21303
|
-
|
|
21304
|
-
|
|
21305
|
-
|
|
21307
|
+
if (gridRef.el === e.target) {
|
|
21308
|
+
x = e.offsetX;
|
|
21309
|
+
y = e.offsetY;
|
|
21310
|
+
lastMoved = Date.now();
|
|
21311
|
+
}
|
|
21306
21312
|
}
|
|
21307
21313
|
function recompute() {
|
|
21308
21314
|
const { col, row } = getPosition();
|
|
@@ -28946,7 +28952,11 @@ class HeaderSizePlugin extends CorePlugin {
|
|
|
28946
28952
|
let sizes = [...this.sizes[cmd.sheetId][cmd.dimension]];
|
|
28947
28953
|
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
28948
28954
|
const baseSize = sizes[cmd.base];
|
|
28949
|
-
|
|
28955
|
+
const sizesToInsert = range(0, cmd.quantity).map(() => ({
|
|
28956
|
+
manualSize: baseSize.manualSize,
|
|
28957
|
+
computedSize: lazy(baseSize.computedSize()),
|
|
28958
|
+
}));
|
|
28959
|
+
sizes.splice(addIndex, 0, ...sizesToInsert);
|
|
28950
28960
|
sizes = sizes.map((size, row) => {
|
|
28951
28961
|
if (cmd.dimension === "ROW" && row > cmd.base + cmd.quantity) {
|
|
28952
28962
|
// invalidate sizes
|
|
@@ -32062,7 +32072,7 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
32062
32072
|
allowDispatch(cmd) {
|
|
32063
32073
|
switch (cmd.type) {
|
|
32064
32074
|
case "CUT":
|
|
32065
|
-
const zones =
|
|
32075
|
+
const zones = this.getters.getSelectedZones();
|
|
32066
32076
|
const state = this.getClipboardState(zones, cmd.type);
|
|
32067
32077
|
return state.isCutAllowed(zones);
|
|
32068
32078
|
case "PASTE":
|
|
@@ -32093,7 +32103,7 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
32093
32103
|
switch (cmd.type) {
|
|
32094
32104
|
case "COPY":
|
|
32095
32105
|
case "CUT":
|
|
32096
|
-
const zones =
|
|
32106
|
+
const zones = this.getters.getSelectedZones();
|
|
32097
32107
|
this.state = this.getClipboardState(zones, cmd.type);
|
|
32098
32108
|
this.status = "visible";
|
|
32099
32109
|
break;
|
|
@@ -32711,6 +32721,7 @@ class EvaluationConditionalFormatPlugin extends UIPlugin {
|
|
|
32711
32721
|
// stores the computed styles in the format of computedStyles.sheetName[col][row] = Style
|
|
32712
32722
|
this.computedStyles = {};
|
|
32713
32723
|
this.computedIcons = {};
|
|
32724
|
+
this.uuidGenerator = new UuidGenerator();
|
|
32714
32725
|
/**
|
|
32715
32726
|
* Execute the predicate to know if a conditional formatting rule should be applied to a cell
|
|
32716
32727
|
*/
|
|
@@ -33062,8 +33073,9 @@ class EvaluationConditionalFormatPlugin extends UIPlugin {
|
|
|
33062
33073
|
this.adaptRules(origin.sheetId, cf, [xc], toRemoveRange);
|
|
33063
33074
|
}
|
|
33064
33075
|
else {
|
|
33065
|
-
this.adaptRules(target.sheetId, cf, [xc], []);
|
|
33066
33076
|
this.adaptRules(origin.sheetId, cf, [], toRemoveRange);
|
|
33077
|
+
const cfToCopyTo = this.getCFToCopyTo(target.sheetId, cf);
|
|
33078
|
+
this.adaptRules(target.sheetId, cfToCopyTo, [xc], []);
|
|
33067
33079
|
}
|
|
33068
33080
|
}
|
|
33069
33081
|
}
|
|
@@ -33072,6 +33084,12 @@ class EvaluationConditionalFormatPlugin extends UIPlugin {
|
|
|
33072
33084
|
isCellValueNumber(value) {
|
|
33073
33085
|
return typeof value === "number";
|
|
33074
33086
|
}
|
|
33087
|
+
getCFToCopyTo(targetSheetId, originCF) {
|
|
33088
|
+
const cfInTarget = this.getters
|
|
33089
|
+
.getConditionalFormats(targetSheetId)
|
|
33090
|
+
.find((cf) => cf.stopIfTrue === originCF.stopIfTrue && deepEquals(cf.rule, originCF.rule));
|
|
33091
|
+
return cfInTarget ? cfInTarget : { ...originCF, id: this.uuidGenerator.uuidv4(), ranges: [] };
|
|
33092
|
+
}
|
|
33075
33093
|
}
|
|
33076
33094
|
EvaluationConditionalFormatPlugin.getters = ["getConditionalIcon", "getCellComputedStyle"];
|
|
33077
33095
|
|
|
@@ -34839,26 +34857,24 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
34839
34857
|
const isBasedBefore = cmd.base < start;
|
|
34840
34858
|
const deltaCol = isBasedBefore && isCol ? thickness : 0;
|
|
34841
34859
|
const deltaRow = isBasedBefore && !isCol ? thickness : 0;
|
|
34842
|
-
|
|
34843
|
-
|
|
34844
|
-
|
|
34845
|
-
|
|
34846
|
-
|
|
34847
|
-
|
|
34848
|
-
|
|
34849
|
-
|
|
34850
|
-
|
|
34851
|
-
|
|
34852
|
-
|
|
34853
|
-
|
|
34854
|
-
|
|
34855
|
-
|
|
34856
|
-
|
|
34857
|
-
|
|
34858
|
-
|
|
34859
|
-
|
|
34860
|
-
],
|
|
34861
|
-
});
|
|
34860
|
+
const target = [
|
|
34861
|
+
{
|
|
34862
|
+
left: isCol ? start + deltaCol : 0,
|
|
34863
|
+
right: isCol ? end + deltaCol : this.getters.getNumberCols(cmd.sheetId) - 1,
|
|
34864
|
+
top: !isCol ? start + deltaRow : 0,
|
|
34865
|
+
bottom: !isCol ? end + deltaRow : this.getters.getNumberRows(cmd.sheetId) - 1,
|
|
34866
|
+
},
|
|
34867
|
+
];
|
|
34868
|
+
const state = new ClipboardCellsState(target, "CUT", this.getters, this.dispatch, this.selection);
|
|
34869
|
+
const pasteTarget = [
|
|
34870
|
+
{
|
|
34871
|
+
left: isCol ? cmd.base : 0,
|
|
34872
|
+
right: isCol ? cmd.base + thickness - 1 : this.getters.getNumberCols(cmd.sheetId) - 1,
|
|
34873
|
+
top: !isCol ? cmd.base : 0,
|
|
34874
|
+
bottom: !isCol ? cmd.base + thickness - 1 : this.getters.getNumberRows(cmd.sheetId) - 1,
|
|
34875
|
+
},
|
|
34876
|
+
];
|
|
34877
|
+
state.paste(pasteTarget, { selectTarget: true });
|
|
34862
34878
|
const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
|
|
34863
34879
|
let currentIndex = cmd.base;
|
|
34864
34880
|
for (const element of toRemove) {
|
|
@@ -42906,6 +42922,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
42906
42922
|
exports.tokenize = tokenize;
|
|
42907
42923
|
|
|
42908
42924
|
|
|
42909
|
-
__info__.version = '16.0.
|
|
42910
|
-
__info__.date = '2023-09-
|
|
42911
|
-
__info__.hash = '
|
|
42925
|
+
__info__.version = '16.0.19';
|
|
42926
|
+
__info__.date = '2023-09-21T15:56:31.776Z';
|
|
42927
|
+
__info__.hash = '229c563';
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -1729,8 +1729,6 @@ interface CopyCommand {
|
|
|
1729
1729
|
}
|
|
1730
1730
|
interface CutCommand {
|
|
1731
1731
|
type: "CUT";
|
|
1732
|
-
/** Zones to cut. If none were given, will copy the zones in the selection*/
|
|
1733
|
-
target?: Zone[];
|
|
1734
1732
|
}
|
|
1735
1733
|
interface PasteCommand {
|
|
1736
1734
|
type: "PASTE";
|
|
@@ -3916,6 +3914,7 @@ declare class EvaluationConditionalFormatPlugin extends UIPlugin {
|
|
|
3916
3914
|
private isStale;
|
|
3917
3915
|
private computedStyles;
|
|
3918
3916
|
private computedIcons;
|
|
3917
|
+
private uuidGenerator;
|
|
3919
3918
|
handle(cmd: Command): void;
|
|
3920
3919
|
finalize(): void;
|
|
3921
3920
|
getCellComputedStyle(sheetId: UID, col: HeaderIndex, row: HeaderIndex): Style;
|
|
@@ -3947,6 +3946,7 @@ declare class EvaluationConditionalFormatPlugin extends UIPlugin {
|
|
|
3947
3946
|
private adaptRules;
|
|
3948
3947
|
private pasteCf;
|
|
3949
3948
|
private isCellValueNumber;
|
|
3949
|
+
private getCFToCopyTo;
|
|
3950
3950
|
}
|
|
3951
3951
|
|
|
3952
3952
|
declare class FilterEvaluationPlugin extends UIPlugin {
|
|
@@ -1006,13 +1006,17 @@ function getAddHeaderStartIndex(position, base) {
|
|
|
1006
1006
|
return position === "after" ? base + 1 : base;
|
|
1007
1007
|
}
|
|
1008
1008
|
/**
|
|
1009
|
-
*
|
|
1009
|
+
* Compares two objects.
|
|
1010
1010
|
*/
|
|
1011
1011
|
function deepEquals(o1, o2) {
|
|
1012
1012
|
if (o1 === o2)
|
|
1013
1013
|
return true;
|
|
1014
1014
|
if ((o1 && !o2) || (o2 && !o1))
|
|
1015
1015
|
return false;
|
|
1016
|
+
if (typeof o1 !== typeof o2)
|
|
1017
|
+
return false;
|
|
1018
|
+
if (typeof o1 !== "object")
|
|
1019
|
+
return o1 === o2;
|
|
1016
1020
|
// Objects can have different keys if the values are undefined
|
|
1017
1021
|
const keys = new Set();
|
|
1018
1022
|
Object.keys(o1).forEach((key) => keys.add(key));
|
|
@@ -21296,9 +21300,11 @@ function useCellHovered(env, gridRef, callback) {
|
|
|
21296
21300
|
}
|
|
21297
21301
|
}
|
|
21298
21302
|
function updateMousePosition(e) {
|
|
21299
|
-
|
|
21300
|
-
|
|
21301
|
-
|
|
21303
|
+
if (gridRef.el === e.target) {
|
|
21304
|
+
x = e.offsetX;
|
|
21305
|
+
y = e.offsetY;
|
|
21306
|
+
lastMoved = Date.now();
|
|
21307
|
+
}
|
|
21302
21308
|
}
|
|
21303
21309
|
function recompute() {
|
|
21304
21310
|
const { col, row } = getPosition();
|
|
@@ -28942,7 +28948,11 @@ class HeaderSizePlugin extends CorePlugin {
|
|
|
28942
28948
|
let sizes = [...this.sizes[cmd.sheetId][cmd.dimension]];
|
|
28943
28949
|
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
28944
28950
|
const baseSize = sizes[cmd.base];
|
|
28945
|
-
|
|
28951
|
+
const sizesToInsert = range(0, cmd.quantity).map(() => ({
|
|
28952
|
+
manualSize: baseSize.manualSize,
|
|
28953
|
+
computedSize: lazy(baseSize.computedSize()),
|
|
28954
|
+
}));
|
|
28955
|
+
sizes.splice(addIndex, 0, ...sizesToInsert);
|
|
28946
28956
|
sizes = sizes.map((size, row) => {
|
|
28947
28957
|
if (cmd.dimension === "ROW" && row > cmd.base + cmd.quantity) {
|
|
28948
28958
|
// invalidate sizes
|
|
@@ -32058,7 +32068,7 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
32058
32068
|
allowDispatch(cmd) {
|
|
32059
32069
|
switch (cmd.type) {
|
|
32060
32070
|
case "CUT":
|
|
32061
|
-
const zones =
|
|
32071
|
+
const zones = this.getters.getSelectedZones();
|
|
32062
32072
|
const state = this.getClipboardState(zones, cmd.type);
|
|
32063
32073
|
return state.isCutAllowed(zones);
|
|
32064
32074
|
case "PASTE":
|
|
@@ -32089,7 +32099,7 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
32089
32099
|
switch (cmd.type) {
|
|
32090
32100
|
case "COPY":
|
|
32091
32101
|
case "CUT":
|
|
32092
|
-
const zones =
|
|
32102
|
+
const zones = this.getters.getSelectedZones();
|
|
32093
32103
|
this.state = this.getClipboardState(zones, cmd.type);
|
|
32094
32104
|
this.status = "visible";
|
|
32095
32105
|
break;
|
|
@@ -32707,6 +32717,7 @@ class EvaluationConditionalFormatPlugin extends UIPlugin {
|
|
|
32707
32717
|
// stores the computed styles in the format of computedStyles.sheetName[col][row] = Style
|
|
32708
32718
|
this.computedStyles = {};
|
|
32709
32719
|
this.computedIcons = {};
|
|
32720
|
+
this.uuidGenerator = new UuidGenerator();
|
|
32710
32721
|
/**
|
|
32711
32722
|
* Execute the predicate to know if a conditional formatting rule should be applied to a cell
|
|
32712
32723
|
*/
|
|
@@ -33058,8 +33069,9 @@ class EvaluationConditionalFormatPlugin extends UIPlugin {
|
|
|
33058
33069
|
this.adaptRules(origin.sheetId, cf, [xc], toRemoveRange);
|
|
33059
33070
|
}
|
|
33060
33071
|
else {
|
|
33061
|
-
this.adaptRules(target.sheetId, cf, [xc], []);
|
|
33062
33072
|
this.adaptRules(origin.sheetId, cf, [], toRemoveRange);
|
|
33073
|
+
const cfToCopyTo = this.getCFToCopyTo(target.sheetId, cf);
|
|
33074
|
+
this.adaptRules(target.sheetId, cfToCopyTo, [xc], []);
|
|
33063
33075
|
}
|
|
33064
33076
|
}
|
|
33065
33077
|
}
|
|
@@ -33068,6 +33080,12 @@ class EvaluationConditionalFormatPlugin extends UIPlugin {
|
|
|
33068
33080
|
isCellValueNumber(value) {
|
|
33069
33081
|
return typeof value === "number";
|
|
33070
33082
|
}
|
|
33083
|
+
getCFToCopyTo(targetSheetId, originCF) {
|
|
33084
|
+
const cfInTarget = this.getters
|
|
33085
|
+
.getConditionalFormats(targetSheetId)
|
|
33086
|
+
.find((cf) => cf.stopIfTrue === originCF.stopIfTrue && deepEquals(cf.rule, originCF.rule));
|
|
33087
|
+
return cfInTarget ? cfInTarget : { ...originCF, id: this.uuidGenerator.uuidv4(), ranges: [] };
|
|
33088
|
+
}
|
|
33071
33089
|
}
|
|
33072
33090
|
EvaluationConditionalFormatPlugin.getters = ["getConditionalIcon", "getCellComputedStyle"];
|
|
33073
33091
|
|
|
@@ -34835,26 +34853,24 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
34835
34853
|
const isBasedBefore = cmd.base < start;
|
|
34836
34854
|
const deltaCol = isBasedBefore && isCol ? thickness : 0;
|
|
34837
34855
|
const deltaRow = isBasedBefore && !isCol ? thickness : 0;
|
|
34838
|
-
|
|
34839
|
-
|
|
34840
|
-
|
|
34841
|
-
|
|
34842
|
-
|
|
34843
|
-
|
|
34844
|
-
|
|
34845
|
-
|
|
34846
|
-
|
|
34847
|
-
|
|
34848
|
-
|
|
34849
|
-
|
|
34850
|
-
|
|
34851
|
-
|
|
34852
|
-
|
|
34853
|
-
|
|
34854
|
-
|
|
34855
|
-
|
|
34856
|
-
],
|
|
34857
|
-
});
|
|
34856
|
+
const target = [
|
|
34857
|
+
{
|
|
34858
|
+
left: isCol ? start + deltaCol : 0,
|
|
34859
|
+
right: isCol ? end + deltaCol : this.getters.getNumberCols(cmd.sheetId) - 1,
|
|
34860
|
+
top: !isCol ? start + deltaRow : 0,
|
|
34861
|
+
bottom: !isCol ? end + deltaRow : this.getters.getNumberRows(cmd.sheetId) - 1,
|
|
34862
|
+
},
|
|
34863
|
+
];
|
|
34864
|
+
const state = new ClipboardCellsState(target, "CUT", this.getters, this.dispatch, this.selection);
|
|
34865
|
+
const pasteTarget = [
|
|
34866
|
+
{
|
|
34867
|
+
left: isCol ? cmd.base : 0,
|
|
34868
|
+
right: isCol ? cmd.base + thickness - 1 : this.getters.getNumberCols(cmd.sheetId) - 1,
|
|
34869
|
+
top: !isCol ? cmd.base : 0,
|
|
34870
|
+
bottom: !isCol ? cmd.base + thickness - 1 : this.getters.getNumberRows(cmd.sheetId) - 1,
|
|
34871
|
+
},
|
|
34872
|
+
];
|
|
34873
|
+
state.paste(pasteTarget, { selectTarget: true });
|
|
34858
34874
|
const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
|
|
34859
34875
|
let currentIndex = cmd.base;
|
|
34860
34876
|
for (const element of toRemove) {
|
|
@@ -42874,6 +42890,6 @@ function addFunction(functionName, functionDescription) {
|
|
|
42874
42890
|
export { AbstractChart, CommandResult, CorePlugin, DATETIME_FORMAT, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, cellTypes, compile, components, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, invalidateEvaluationCommands, load, parse, readonlyAllowedCommands, registries, setTranslationMethod, tokenize };
|
|
42875
42891
|
|
|
42876
42892
|
|
|
42877
|
-
__info__.version = '16.0.
|
|
42878
|
-
__info__.date = '2023-09-
|
|
42879
|
-
__info__.hash = '
|
|
42893
|
+
__info__.version = '16.0.19';
|
|
42894
|
+
__info__.date = '2023-09-21T15:56:31.776Z';
|
|
42895
|
+
__info__.hash = '229c563';
|
|
@@ -1007,13 +1007,17 @@
|
|
|
1007
1007
|
return position === "after" ? base + 1 : base;
|
|
1008
1008
|
}
|
|
1009
1009
|
/**
|
|
1010
|
-
*
|
|
1010
|
+
* Compares two objects.
|
|
1011
1011
|
*/
|
|
1012
1012
|
function deepEquals(o1, o2) {
|
|
1013
1013
|
if (o1 === o2)
|
|
1014
1014
|
return true;
|
|
1015
1015
|
if ((o1 && !o2) || (o2 && !o1))
|
|
1016
1016
|
return false;
|
|
1017
|
+
if (typeof o1 !== typeof o2)
|
|
1018
|
+
return false;
|
|
1019
|
+
if (typeof o1 !== "object")
|
|
1020
|
+
return o1 === o2;
|
|
1017
1021
|
// Objects can have different keys if the values are undefined
|
|
1018
1022
|
const keys = new Set();
|
|
1019
1023
|
Object.keys(o1).forEach((key) => keys.add(key));
|
|
@@ -21297,9 +21301,11 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
21297
21301
|
}
|
|
21298
21302
|
}
|
|
21299
21303
|
function updateMousePosition(e) {
|
|
21300
|
-
|
|
21301
|
-
|
|
21302
|
-
|
|
21304
|
+
if (gridRef.el === e.target) {
|
|
21305
|
+
x = e.offsetX;
|
|
21306
|
+
y = e.offsetY;
|
|
21307
|
+
lastMoved = Date.now();
|
|
21308
|
+
}
|
|
21303
21309
|
}
|
|
21304
21310
|
function recompute() {
|
|
21305
21311
|
const { col, row } = getPosition();
|
|
@@ -28943,7 +28949,11 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
28943
28949
|
let sizes = [...this.sizes[cmd.sheetId][cmd.dimension]];
|
|
28944
28950
|
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
28945
28951
|
const baseSize = sizes[cmd.base];
|
|
28946
|
-
|
|
28952
|
+
const sizesToInsert = range(0, cmd.quantity).map(() => ({
|
|
28953
|
+
manualSize: baseSize.manualSize,
|
|
28954
|
+
computedSize: lazy(baseSize.computedSize()),
|
|
28955
|
+
}));
|
|
28956
|
+
sizes.splice(addIndex, 0, ...sizesToInsert);
|
|
28947
28957
|
sizes = sizes.map((size, row) => {
|
|
28948
28958
|
if (cmd.dimension === "ROW" && row > cmd.base + cmd.quantity) {
|
|
28949
28959
|
// invalidate sizes
|
|
@@ -32059,7 +32069,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
32059
32069
|
allowDispatch(cmd) {
|
|
32060
32070
|
switch (cmd.type) {
|
|
32061
32071
|
case "CUT":
|
|
32062
|
-
const zones =
|
|
32072
|
+
const zones = this.getters.getSelectedZones();
|
|
32063
32073
|
const state = this.getClipboardState(zones, cmd.type);
|
|
32064
32074
|
return state.isCutAllowed(zones);
|
|
32065
32075
|
case "PASTE":
|
|
@@ -32090,7 +32100,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
32090
32100
|
switch (cmd.type) {
|
|
32091
32101
|
case "COPY":
|
|
32092
32102
|
case "CUT":
|
|
32093
|
-
const zones =
|
|
32103
|
+
const zones = this.getters.getSelectedZones();
|
|
32094
32104
|
this.state = this.getClipboardState(zones, cmd.type);
|
|
32095
32105
|
this.status = "visible";
|
|
32096
32106
|
break;
|
|
@@ -32708,6 +32718,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
32708
32718
|
// stores the computed styles in the format of computedStyles.sheetName[col][row] = Style
|
|
32709
32719
|
this.computedStyles = {};
|
|
32710
32720
|
this.computedIcons = {};
|
|
32721
|
+
this.uuidGenerator = new UuidGenerator();
|
|
32711
32722
|
/**
|
|
32712
32723
|
* Execute the predicate to know if a conditional formatting rule should be applied to a cell
|
|
32713
32724
|
*/
|
|
@@ -33059,8 +33070,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
33059
33070
|
this.adaptRules(origin.sheetId, cf, [xc], toRemoveRange);
|
|
33060
33071
|
}
|
|
33061
33072
|
else {
|
|
33062
|
-
this.adaptRules(target.sheetId, cf, [xc], []);
|
|
33063
33073
|
this.adaptRules(origin.sheetId, cf, [], toRemoveRange);
|
|
33074
|
+
const cfToCopyTo = this.getCFToCopyTo(target.sheetId, cf);
|
|
33075
|
+
this.adaptRules(target.sheetId, cfToCopyTo, [xc], []);
|
|
33064
33076
|
}
|
|
33065
33077
|
}
|
|
33066
33078
|
}
|
|
@@ -33069,6 +33081,12 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
33069
33081
|
isCellValueNumber(value) {
|
|
33070
33082
|
return typeof value === "number";
|
|
33071
33083
|
}
|
|
33084
|
+
getCFToCopyTo(targetSheetId, originCF) {
|
|
33085
|
+
const cfInTarget = this.getters
|
|
33086
|
+
.getConditionalFormats(targetSheetId)
|
|
33087
|
+
.find((cf) => cf.stopIfTrue === originCF.stopIfTrue && deepEquals(cf.rule, originCF.rule));
|
|
33088
|
+
return cfInTarget ? cfInTarget : { ...originCF, id: this.uuidGenerator.uuidv4(), ranges: [] };
|
|
33089
|
+
}
|
|
33072
33090
|
}
|
|
33073
33091
|
EvaluationConditionalFormatPlugin.getters = ["getConditionalIcon", "getCellComputedStyle"];
|
|
33074
33092
|
|
|
@@ -34836,26 +34854,24 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
34836
34854
|
const isBasedBefore = cmd.base < start;
|
|
34837
34855
|
const deltaCol = isBasedBefore && isCol ? thickness : 0;
|
|
34838
34856
|
const deltaRow = isBasedBefore && !isCol ? thickness : 0;
|
|
34839
|
-
|
|
34840
|
-
|
|
34841
|
-
|
|
34842
|
-
|
|
34843
|
-
|
|
34844
|
-
|
|
34845
|
-
|
|
34846
|
-
|
|
34847
|
-
|
|
34848
|
-
|
|
34849
|
-
|
|
34850
|
-
|
|
34851
|
-
|
|
34852
|
-
|
|
34853
|
-
|
|
34854
|
-
|
|
34855
|
-
|
|
34856
|
-
|
|
34857
|
-
],
|
|
34858
|
-
});
|
|
34857
|
+
const target = [
|
|
34858
|
+
{
|
|
34859
|
+
left: isCol ? start + deltaCol : 0,
|
|
34860
|
+
right: isCol ? end + deltaCol : this.getters.getNumberCols(cmd.sheetId) - 1,
|
|
34861
|
+
top: !isCol ? start + deltaRow : 0,
|
|
34862
|
+
bottom: !isCol ? end + deltaRow : this.getters.getNumberRows(cmd.sheetId) - 1,
|
|
34863
|
+
},
|
|
34864
|
+
];
|
|
34865
|
+
const state = new ClipboardCellsState(target, "CUT", this.getters, this.dispatch, this.selection);
|
|
34866
|
+
const pasteTarget = [
|
|
34867
|
+
{
|
|
34868
|
+
left: isCol ? cmd.base : 0,
|
|
34869
|
+
right: isCol ? cmd.base + thickness - 1 : this.getters.getNumberCols(cmd.sheetId) - 1,
|
|
34870
|
+
top: !isCol ? cmd.base : 0,
|
|
34871
|
+
bottom: !isCol ? cmd.base + thickness - 1 : this.getters.getNumberRows(cmd.sheetId) - 1,
|
|
34872
|
+
},
|
|
34873
|
+
];
|
|
34874
|
+
state.paste(pasteTarget, { selectTarget: true });
|
|
34859
34875
|
const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
|
|
34860
34876
|
let currentIndex = cmd.base;
|
|
34861
34877
|
for (const element of toRemove) {
|
|
@@ -42905,9 +42921,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
42905
42921
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
42906
42922
|
|
|
42907
42923
|
|
|
42908
|
-
__info__.version = '16.0.
|
|
42909
|
-
__info__.date = '2023-09-
|
|
42910
|
-
__info__.hash = '
|
|
42924
|
+
__info__.version = '16.0.19';
|
|
42925
|
+
__info__.date = '2023-09-21T15:56:31.776Z';
|
|
42926
|
+
__info__.hash = '229c563';
|
|
42911
42927
|
|
|
42912
42928
|
|
|
42913
42929
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|