@odoo/o-spreadsheet 18.0.21 → 18.0.23
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 +189 -91
- package/dist/o-spreadsheet.d.ts +33 -16
- package/dist/o-spreadsheet.esm.js +189 -91
- package/dist/o-spreadsheet.iife.js +189 -91
- package/dist/o-spreadsheet.iife.min.js +353 -352
- 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-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.0.23
|
|
6
|
+
* @date 2025-04-14T17:16:35.374Z
|
|
7
|
+
* @hash f560133
|
|
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';
|
|
@@ -800,8 +800,7 @@ function removeFalsyAttributes(obj) {
|
|
|
800
800
|
*
|
|
801
801
|
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Character_Classes
|
|
802
802
|
*/
|
|
803
|
-
const
|
|
804
|
-
" ",
|
|
803
|
+
const specialWhiteSpaceSpecialCharacters = [
|
|
805
804
|
"\t",
|
|
806
805
|
"\f",
|
|
807
806
|
"\v",
|
|
@@ -816,7 +815,7 @@ const whiteSpaceSpecialCharacters = [
|
|
|
816
815
|
String.fromCharCode(parseInt("3000", 16)),
|
|
817
816
|
String.fromCharCode(parseInt("feff", 16)),
|
|
818
817
|
];
|
|
819
|
-
const
|
|
818
|
+
const specialWhiteSpaceRegexp = new RegExp(specialWhiteSpaceSpecialCharacters.join("|"), "g");
|
|
820
819
|
const newLineRegexp = /(\r\n|\r)/g;
|
|
821
820
|
/**
|
|
822
821
|
* Replace all different newlines characters by \n
|
|
@@ -3396,6 +3395,7 @@ const coreTypes = new Set([
|
|
|
3396
3395
|
"CLEAR_FORMATTING",
|
|
3397
3396
|
"SET_BORDER",
|
|
3398
3397
|
"SET_ZONE_BORDERS",
|
|
3398
|
+
"SET_BORDERS_ON_TARGET",
|
|
3399
3399
|
/** CHART */
|
|
3400
3400
|
"CREATE_CHART",
|
|
3401
3401
|
"UPDATE_CHART",
|
|
@@ -6559,6 +6559,7 @@ class AbstractCellClipboardHandler extends ClipboardHandler {
|
|
|
6559
6559
|
}
|
|
6560
6560
|
|
|
6561
6561
|
class BorderClipboardHandler extends AbstractCellClipboardHandler {
|
|
6562
|
+
queuedBordersToAdd = {};
|
|
6562
6563
|
copy(data) {
|
|
6563
6564
|
const sheetId = data.sheetId;
|
|
6564
6565
|
if (data.zones.length === 0) {
|
|
@@ -6589,6 +6590,7 @@ class BorderClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
6589
6590
|
const { left, top } = zones[0];
|
|
6590
6591
|
this.pasteZone(sheetId, left, top, content.borders);
|
|
6591
6592
|
}
|
|
6593
|
+
this.executeQueuedChanges(sheetId);
|
|
6592
6594
|
}
|
|
6593
6595
|
pasteZone(sheetId, col, row, borders) {
|
|
6594
6596
|
for (const [r, rowBorders] of borders.entries()) {
|
|
@@ -6607,7 +6609,20 @@ class BorderClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
6607
6609
|
...targetBorders,
|
|
6608
6610
|
...originBorders,
|
|
6609
6611
|
};
|
|
6610
|
-
|
|
6612
|
+
const borderKey = JSON.stringify(border);
|
|
6613
|
+
if (!this.queuedBordersToAdd[borderKey]) {
|
|
6614
|
+
this.queuedBordersToAdd[borderKey] = [];
|
|
6615
|
+
}
|
|
6616
|
+
this.queuedBordersToAdd[borderKey].push(positionToZone(target));
|
|
6617
|
+
}
|
|
6618
|
+
executeQueuedChanges(pasteSheetTarget) {
|
|
6619
|
+
for (const borderKey in this.queuedBordersToAdd) {
|
|
6620
|
+
const zones = this.queuedBordersToAdd[borderKey];
|
|
6621
|
+
const border = JSON.parse(borderKey);
|
|
6622
|
+
const target = recomputeZones(zones, []);
|
|
6623
|
+
this.dispatch("SET_BORDERS_ON_TARGET", { sheetId: pasteSheetTarget, target, border });
|
|
6624
|
+
}
|
|
6625
|
+
this.queuedBordersToAdd = {};
|
|
6611
6626
|
}
|
|
6612
6627
|
}
|
|
6613
6628
|
|
|
@@ -6633,8 +6648,12 @@ function tokenize(str, locale = DEFAULT_LOCALE) {
|
|
|
6633
6648
|
str = replaceNewLines(str);
|
|
6634
6649
|
const chars = new TokenizingChars(str);
|
|
6635
6650
|
const result = [];
|
|
6651
|
+
const tokenizeSpace = specialWhiteSpaceRegexp.test(str)
|
|
6652
|
+
? tokenizeSpecialCharacterSpace
|
|
6653
|
+
: tokenizeSimpleSpace;
|
|
6636
6654
|
while (!chars.isOver()) {
|
|
6637
|
-
let token =
|
|
6655
|
+
let token = tokenizeNewLine(chars) ||
|
|
6656
|
+
tokenizeSpace(chars) ||
|
|
6638
6657
|
tokenizeArgsSeparator(chars, locale) ||
|
|
6639
6658
|
tokenizeParenthesis(chars) ||
|
|
6640
6659
|
tokenizeOperator(chars) ||
|
|
@@ -6768,17 +6787,19 @@ function tokenizeSymbol(chars) {
|
|
|
6768
6787
|
}
|
|
6769
6788
|
return null;
|
|
6770
6789
|
}
|
|
6771
|
-
function
|
|
6772
|
-
let
|
|
6773
|
-
while (chars.current ===
|
|
6774
|
-
|
|
6775
|
-
chars.shift();
|
|
6790
|
+
function tokenizeSpecialCharacterSpace(chars) {
|
|
6791
|
+
let spaces = "";
|
|
6792
|
+
while (chars.current === " " || (chars.current && chars.current.match(specialWhiteSpaceRegexp))) {
|
|
6793
|
+
spaces += chars.shift();
|
|
6776
6794
|
}
|
|
6777
|
-
if (
|
|
6778
|
-
return { type: "SPACE", value:
|
|
6795
|
+
if (spaces) {
|
|
6796
|
+
return { type: "SPACE", value: spaces };
|
|
6779
6797
|
}
|
|
6798
|
+
return null;
|
|
6799
|
+
}
|
|
6800
|
+
function tokenizeSimpleSpace(chars) {
|
|
6780
6801
|
let spaces = "";
|
|
6781
|
-
while (chars.current
|
|
6802
|
+
while (chars.current === " ") {
|
|
6782
6803
|
spaces += chars.shift();
|
|
6783
6804
|
}
|
|
6784
6805
|
if (spaces) {
|
|
@@ -6786,6 +6807,17 @@ function tokenizeSpace(chars) {
|
|
|
6786
6807
|
}
|
|
6787
6808
|
return null;
|
|
6788
6809
|
}
|
|
6810
|
+
function tokenizeNewLine(chars) {
|
|
6811
|
+
let length = 0;
|
|
6812
|
+
while (chars.current === NEWLINE) {
|
|
6813
|
+
length++;
|
|
6814
|
+
chars.shift();
|
|
6815
|
+
}
|
|
6816
|
+
if (length) {
|
|
6817
|
+
return { type: "SPACE", value: NEWLINE.repeat(length) };
|
|
6818
|
+
}
|
|
6819
|
+
return null;
|
|
6820
|
+
}
|
|
6789
6821
|
function tokenizeInvalidRange(chars) {
|
|
6790
6822
|
if (chars.currentStartsWith(CellErrorType.InvalidReference)) {
|
|
6791
6823
|
chars.advanceBy(CellErrorType.InvalidReference.length);
|
|
@@ -8482,12 +8514,13 @@ class ConditionalFormatClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
8482
8514
|
}
|
|
8483
8515
|
pasteCf(origin, target, isCutOperation) {
|
|
8484
8516
|
if (origin?.rules && origin.rules.length > 0) {
|
|
8517
|
+
const originZone = positionToZone(origin.position);
|
|
8485
8518
|
const zone = positionToZone(target);
|
|
8486
8519
|
for (const rule of origin.rules) {
|
|
8487
8520
|
const toRemoveZones = [];
|
|
8488
8521
|
if (isCutOperation) {
|
|
8489
8522
|
//remove from current rule
|
|
8490
|
-
toRemoveZones.push(
|
|
8523
|
+
toRemoveZones.push(originZone);
|
|
8491
8524
|
}
|
|
8492
8525
|
if (origin.position.sheetId === target.sheetId) {
|
|
8493
8526
|
this.adaptCFRules(origin.position.sheetId, rule, [zone], toRemoveZones);
|
|
@@ -8601,6 +8634,7 @@ class DataValidationClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
8601
8634
|
pasteDataValidation(origin, target, isCutOperation) {
|
|
8602
8635
|
if (origin) {
|
|
8603
8636
|
const zone = positionToZone(target);
|
|
8637
|
+
const originZone = positionToZone(origin.position);
|
|
8604
8638
|
const rule = origin.rule;
|
|
8605
8639
|
if (!rule) {
|
|
8606
8640
|
const targetRule = this.getters.getValidationRuleForCell(target);
|
|
@@ -8612,7 +8646,7 @@ class DataValidationClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
8612
8646
|
}
|
|
8613
8647
|
const toRemoveZone = [];
|
|
8614
8648
|
if (isCutOperation) {
|
|
8615
|
-
toRemoveZone.push(
|
|
8649
|
+
toRemoveZone.push(originZone);
|
|
8616
8650
|
}
|
|
8617
8651
|
if (origin.position.sheetId === target.sheetId) {
|
|
8618
8652
|
const copyToRule = this.getDataValidationRuleToCopyTo(target.sheetId, rule, false);
|
|
@@ -8672,7 +8706,7 @@ class DataValidationClipboardHandler extends AbstractCellClipboardHandler {
|
|
|
8672
8706
|
continue;
|
|
8673
8707
|
}
|
|
8674
8708
|
this.dispatch("ADD_DATA_VALIDATION_RULE", {
|
|
8675
|
-
rule: dv,
|
|
8709
|
+
rule: { id: dv.id, criterion: dv.criterion, isBlocking: dv.isBlocking },
|
|
8676
8710
|
ranges: newDvZones.map((zone) => this.getters.getRangeDataFromZone(sheetId, zone)),
|
|
8677
8711
|
sheetId,
|
|
8678
8712
|
});
|
|
@@ -42785,7 +42819,8 @@ css /* scss */ `
|
|
|
42785
42819
|
&.pivot-dimension-invalid {
|
|
42786
42820
|
background-color: #ffdddd;
|
|
42787
42821
|
border-color: red !important;
|
|
42788
|
-
select
|
|
42822
|
+
select,
|
|
42823
|
+
input {
|
|
42789
42824
|
background-color: #ffdddd;
|
|
42790
42825
|
}
|
|
42791
42826
|
}
|
|
@@ -44532,7 +44567,7 @@ class PivotSidePanelStore extends SpreadsheetStore {
|
|
|
44532
44567
|
this.notification.notifyUser({
|
|
44533
44568
|
type: "info",
|
|
44534
44569
|
text: _t("Pivot updates only work with dynamic pivot tables. Use %s or re-insert the static pivot from the Data menu.", pivotExample),
|
|
44535
|
-
sticky:
|
|
44570
|
+
sticky: true,
|
|
44536
44571
|
});
|
|
44537
44572
|
}
|
|
44538
44573
|
}
|
|
@@ -50772,6 +50807,15 @@ class BordersPlugin extends CorePlugin {
|
|
|
50772
50807
|
case "SET_BORDER":
|
|
50773
50808
|
this.setBorder(cmd.sheetId, cmd.col, cmd.row, cmd.border);
|
|
50774
50809
|
break;
|
|
50810
|
+
case "SET_BORDERS_ON_TARGET":
|
|
50811
|
+
for (const zone of cmd.target) {
|
|
50812
|
+
for (let row = zone.top; row <= zone.bottom; row++) {
|
|
50813
|
+
for (let col = zone.left; col <= zone.right; col++) {
|
|
50814
|
+
this.setBorder(cmd.sheetId, col, row, cmd.border);
|
|
50815
|
+
}
|
|
50816
|
+
}
|
|
50817
|
+
}
|
|
50818
|
+
break;
|
|
50775
50819
|
case "SET_ZONE_BORDERS":
|
|
50776
50820
|
if (cmd.border) {
|
|
50777
50821
|
const target = cmd.target.map((zone) => this.getters.expandZone(cmd.sheetId, zone));
|
|
@@ -60590,25 +60634,6 @@ class AutofillPlugin extends UIPlugin {
|
|
|
60590
60634
|
case "AUTOFILL_AUTO":
|
|
60591
60635
|
this.autofillAuto();
|
|
60592
60636
|
break;
|
|
60593
|
-
case "AUTOFILL_CELL":
|
|
60594
|
-
this.autoFillMerge(cmd.originCol, cmd.originRow, cmd.col, cmd.row);
|
|
60595
|
-
const sheetId = this.getters.getActiveSheetId();
|
|
60596
|
-
this.dispatch("UPDATE_CELL", {
|
|
60597
|
-
sheetId,
|
|
60598
|
-
col: cmd.col,
|
|
60599
|
-
row: cmd.row,
|
|
60600
|
-
style: cmd.style || null,
|
|
60601
|
-
content: cmd.content || "",
|
|
60602
|
-
format: cmd.format || "",
|
|
60603
|
-
});
|
|
60604
|
-
this.dispatch("SET_BORDER", {
|
|
60605
|
-
sheetId,
|
|
60606
|
-
col: cmd.col,
|
|
60607
|
-
row: cmd.row,
|
|
60608
|
-
border: cmd.border,
|
|
60609
|
-
});
|
|
60610
|
-
this.autofillCF(cmd.originCol, cmd.originRow, cmd.col, cmd.row);
|
|
60611
|
-
this.autofillDV(cmd.originCol, cmd.originRow, cmd.col, cmd.row);
|
|
60612
60637
|
}
|
|
60613
60638
|
}
|
|
60614
60639
|
// ---------------------------------------------------------------------------
|
|
@@ -60632,6 +60657,7 @@ class AutofillPlugin extends UIPlugin {
|
|
|
60632
60657
|
}
|
|
60633
60658
|
const source = this.getters.getSelectedZone();
|
|
60634
60659
|
const target = this.autofillZone;
|
|
60660
|
+
const autofillCellsData = [];
|
|
60635
60661
|
switch (this.direction) {
|
|
60636
60662
|
case "down" /* DIRECTION.DOWN */:
|
|
60637
60663
|
for (let col = source.left; col <= source.right; col++) {
|
|
@@ -60641,7 +60667,7 @@ class AutofillPlugin extends UIPlugin {
|
|
|
60641
60667
|
}
|
|
60642
60668
|
const generator = this.createGenerator(xcs);
|
|
60643
60669
|
for (let row = target.top; row <= target.bottom; row++) {
|
|
60644
|
-
this.computeNewCell(generator, col, row
|
|
60670
|
+
autofillCellsData.push(this.computeNewCell(generator, col, row));
|
|
60645
60671
|
}
|
|
60646
60672
|
}
|
|
60647
60673
|
break;
|
|
@@ -60653,7 +60679,7 @@ class AutofillPlugin extends UIPlugin {
|
|
|
60653
60679
|
}
|
|
60654
60680
|
const generator = this.createGenerator(xcs);
|
|
60655
60681
|
for (let row = target.bottom; row >= target.top; row--) {
|
|
60656
|
-
this.computeNewCell(generator, col, row
|
|
60682
|
+
autofillCellsData.push(this.computeNewCell(generator, col, row));
|
|
60657
60683
|
}
|
|
60658
60684
|
}
|
|
60659
60685
|
break;
|
|
@@ -60665,7 +60691,7 @@ class AutofillPlugin extends UIPlugin {
|
|
|
60665
60691
|
}
|
|
60666
60692
|
const generator = this.createGenerator(xcs);
|
|
60667
60693
|
for (let col = target.right; col >= target.left; col--) {
|
|
60668
|
-
this.computeNewCell(generator, col, row
|
|
60694
|
+
autofillCellsData.push(this.computeNewCell(generator, col, row));
|
|
60669
60695
|
}
|
|
60670
60696
|
}
|
|
60671
60697
|
break;
|
|
@@ -60677,12 +60703,26 @@ class AutofillPlugin extends UIPlugin {
|
|
|
60677
60703
|
}
|
|
60678
60704
|
const generator = this.createGenerator(xcs);
|
|
60679
60705
|
for (let col = target.left; col <= target.right; col++) {
|
|
60680
|
-
this.computeNewCell(generator, col, row
|
|
60706
|
+
autofillCellsData.push(this.computeNewCell(generator, col, row));
|
|
60681
60707
|
}
|
|
60682
60708
|
}
|
|
60683
60709
|
break;
|
|
60684
60710
|
}
|
|
60685
60711
|
if (apply) {
|
|
60712
|
+
const bordersZones = {};
|
|
60713
|
+
const cfNewRanges = {};
|
|
60714
|
+
const dvNewZones = {};
|
|
60715
|
+
const sheetId = this.getters.getActiveSheetId();
|
|
60716
|
+
for (const data of autofillCellsData) {
|
|
60717
|
+
this.collectBordersData(data, bordersZones);
|
|
60718
|
+
this.autofillMerge(sheetId, data);
|
|
60719
|
+
this.autofillCell(sheetId, data);
|
|
60720
|
+
this.collectConditionalFormatsData(sheetId, data, cfNewRanges);
|
|
60721
|
+
this.collectDataValidationsData(sheetId, data, dvNewZones);
|
|
60722
|
+
}
|
|
60723
|
+
this.autofillBorders(sheetId, bordersZones);
|
|
60724
|
+
this.autofillConditionalFormats(sheetId, cfNewRanges);
|
|
60725
|
+
this.autofillDataValidations(sheetId, dvNewZones);
|
|
60686
60726
|
this.autofillZone = undefined;
|
|
60687
60727
|
this.selection.resizeAnchorZone(this.direction, this.steps);
|
|
60688
60728
|
this.lastCellSelected = {};
|
|
@@ -60691,6 +60731,95 @@ class AutofillPlugin extends UIPlugin {
|
|
|
60691
60731
|
this.tooltip = undefined;
|
|
60692
60732
|
}
|
|
60693
60733
|
}
|
|
60734
|
+
collectBordersData(data, bordersPositions) {
|
|
60735
|
+
const key = JSON.stringify(data.border);
|
|
60736
|
+
if (!(key in bordersPositions)) {
|
|
60737
|
+
bordersPositions[key] = [];
|
|
60738
|
+
}
|
|
60739
|
+
bordersPositions[key].push(positionToZone({ col: data.col, row: data.row }));
|
|
60740
|
+
}
|
|
60741
|
+
collectConditionalFormatsData(sheetId, data, cfNewRanges) {
|
|
60742
|
+
const { originCol, originRow, col, row } = data;
|
|
60743
|
+
const cfsAtOrigin = this.getters.getRulesByCell(sheetId, originCol, originRow);
|
|
60744
|
+
const xc = toXC(col, row);
|
|
60745
|
+
for (const cf of cfsAtOrigin) {
|
|
60746
|
+
if (!(cf.id in cfNewRanges)) {
|
|
60747
|
+
cfNewRanges[cf.id] = [];
|
|
60748
|
+
}
|
|
60749
|
+
cfNewRanges[cf.id].push(xc);
|
|
60750
|
+
}
|
|
60751
|
+
}
|
|
60752
|
+
collectDataValidationsData(sheetId, data, dvNewZones) {
|
|
60753
|
+
const { originCol, originRow, col, row } = data;
|
|
60754
|
+
const cellPosition = { sheetId, col: originCol, row: originRow };
|
|
60755
|
+
const dvsAtOrigin = this.getters.getValidationRuleForCell(cellPosition);
|
|
60756
|
+
if (!dvsAtOrigin) {
|
|
60757
|
+
return;
|
|
60758
|
+
}
|
|
60759
|
+
if (!(dvsAtOrigin.id in dvNewZones)) {
|
|
60760
|
+
dvNewZones[dvsAtOrigin.id] = [];
|
|
60761
|
+
}
|
|
60762
|
+
dvNewZones[dvsAtOrigin.id].push(positionToZone({ col, row }));
|
|
60763
|
+
}
|
|
60764
|
+
autofillCell(sheetId, data) {
|
|
60765
|
+
this.dispatch("UPDATE_CELL", {
|
|
60766
|
+
sheetId,
|
|
60767
|
+
col: data.col,
|
|
60768
|
+
row: data.row,
|
|
60769
|
+
content: data.content || "",
|
|
60770
|
+
style: data.style || null,
|
|
60771
|
+
format: data.format || "",
|
|
60772
|
+
});
|
|
60773
|
+
// Still usefull in odoo ATM to autofill field sync
|
|
60774
|
+
this.dispatch("AUTOFILL_CELL", data);
|
|
60775
|
+
}
|
|
60776
|
+
autofillBorders(sheetId, bordersPositions) {
|
|
60777
|
+
for (const stringifiedBorder in bordersPositions) {
|
|
60778
|
+
const border = stringifiedBorder === "undefined" ? undefined : JSON.parse(stringifiedBorder);
|
|
60779
|
+
this.dispatch("SET_BORDERS_ON_TARGET", {
|
|
60780
|
+
sheetId,
|
|
60781
|
+
border,
|
|
60782
|
+
target: recomputeZones(bordersPositions[stringifiedBorder]),
|
|
60783
|
+
});
|
|
60784
|
+
}
|
|
60785
|
+
}
|
|
60786
|
+
autofillConditionalFormats(sheetId, cfNewRanges) {
|
|
60787
|
+
for (const cfId in cfNewRanges) {
|
|
60788
|
+
const changes = cfNewRanges[cfId];
|
|
60789
|
+
const cf = this.getters.getConditionalFormats(sheetId).find((cf) => cf.id === cfId);
|
|
60790
|
+
if (!cf) {
|
|
60791
|
+
continue;
|
|
60792
|
+
}
|
|
60793
|
+
const newCfRanges = this.getters.getAdaptedCfRanges(sheetId, cf, changes.map(toZone), []);
|
|
60794
|
+
if (newCfRanges) {
|
|
60795
|
+
this.dispatch("ADD_CONDITIONAL_FORMAT", {
|
|
60796
|
+
cf: {
|
|
60797
|
+
id: cf.id,
|
|
60798
|
+
rule: cf.rule,
|
|
60799
|
+
stopIfTrue: cf.stopIfTrue,
|
|
60800
|
+
},
|
|
60801
|
+
ranges: newCfRanges,
|
|
60802
|
+
sheetId,
|
|
60803
|
+
});
|
|
60804
|
+
}
|
|
60805
|
+
}
|
|
60806
|
+
}
|
|
60807
|
+
autofillDataValidations(sheetId, dvNewZones) {
|
|
60808
|
+
for (const dvId in dvNewZones) {
|
|
60809
|
+
const changes = dvNewZones[dvId];
|
|
60810
|
+
const dvOrigin = this.getters.getDataValidationRule(sheetId, dvId);
|
|
60811
|
+
if (!dvOrigin) {
|
|
60812
|
+
continue;
|
|
60813
|
+
}
|
|
60814
|
+
const dvRangesXcs = dvOrigin.ranges.map((range) => range.zone);
|
|
60815
|
+
const newDvRanges = recomputeZones(dvRangesXcs.concat(changes), []);
|
|
60816
|
+
this.dispatch("ADD_DATA_VALIDATION_RULE", {
|
|
60817
|
+
rule: dvOrigin,
|
|
60818
|
+
ranges: newDvRanges.map((zone) => this.getters.getRangeDataFromZone(sheetId, zone)),
|
|
60819
|
+
sheetId,
|
|
60820
|
+
});
|
|
60821
|
+
}
|
|
60822
|
+
}
|
|
60694
60823
|
/**
|
|
60695
60824
|
* Select a cell which becomes the last cell of the autofillZone
|
|
60696
60825
|
*/
|
|
@@ -60769,22 +60898,20 @@ class AutofillPlugin extends UIPlugin {
|
|
|
60769
60898
|
/**
|
|
60770
60899
|
* Generate the next cell
|
|
60771
60900
|
*/
|
|
60772
|
-
computeNewCell(generator, col, row
|
|
60901
|
+
computeNewCell(generator, col, row) {
|
|
60773
60902
|
const { cellData, tooltip, origin } = generator.next();
|
|
60774
60903
|
const { content, style, border, format } = cellData;
|
|
60775
60904
|
this.tooltip = tooltip;
|
|
60776
|
-
|
|
60777
|
-
|
|
60778
|
-
|
|
60779
|
-
|
|
60780
|
-
|
|
60781
|
-
|
|
60782
|
-
|
|
60783
|
-
|
|
60784
|
-
|
|
60785
|
-
|
|
60786
|
-
});
|
|
60787
|
-
}
|
|
60905
|
+
return {
|
|
60906
|
+
originCol: origin.col,
|
|
60907
|
+
originRow: origin.row,
|
|
60908
|
+
col,
|
|
60909
|
+
row,
|
|
60910
|
+
content,
|
|
60911
|
+
style,
|
|
60912
|
+
border,
|
|
60913
|
+
format,
|
|
60914
|
+
};
|
|
60788
60915
|
}
|
|
60789
60916
|
/**
|
|
60790
60917
|
* Get the rule associated to the current cell
|
|
@@ -60852,8 +60979,8 @@ class AutofillPlugin extends UIPlugin {
|
|
|
60852
60979
|
? position[first].value
|
|
60853
60980
|
: position[second].value;
|
|
60854
60981
|
}
|
|
60855
|
-
|
|
60856
|
-
const
|
|
60982
|
+
autofillMerge(sheetId, data) {
|
|
60983
|
+
const { originCol, originRow, col, row } = data;
|
|
60857
60984
|
const position = { sheetId, col, row };
|
|
60858
60985
|
const originPosition = { sheetId, col: originCol, row: originRow };
|
|
60859
60986
|
if (this.getters.isInMerge(position) && !this.getters.isInMerge(originPosition)) {
|
|
@@ -60880,35 +61007,6 @@ class AutofillPlugin extends UIPlugin {
|
|
|
60880
61007
|
});
|
|
60881
61008
|
}
|
|
60882
61009
|
}
|
|
60883
|
-
autofillCF(originCol, originRow, col, row) {
|
|
60884
|
-
const sheetId = this.getters.getActiveSheetId();
|
|
60885
|
-
const cfOrigin = this.getters.getRulesByCell(sheetId, originCol, originRow);
|
|
60886
|
-
for (const cf of cfOrigin) {
|
|
60887
|
-
const newCfRanges = this.getters.getAdaptedCfRanges(sheetId, cf, [positionToZone({ col, row })], []);
|
|
60888
|
-
if (newCfRanges) {
|
|
60889
|
-
this.dispatch("ADD_CONDITIONAL_FORMAT", {
|
|
60890
|
-
cf: deepCopy(cf),
|
|
60891
|
-
ranges: newCfRanges,
|
|
60892
|
-
sheetId,
|
|
60893
|
-
});
|
|
60894
|
-
}
|
|
60895
|
-
}
|
|
60896
|
-
}
|
|
60897
|
-
autofillDV(originCol, originRow, col, row) {
|
|
60898
|
-
const sheetId = this.getters.getActiveSheetId();
|
|
60899
|
-
const cellPosition = { sheetId, col: originCol, row: originRow };
|
|
60900
|
-
const dvOrigin = this.getters.getValidationRuleForCell(cellPosition);
|
|
60901
|
-
if (!dvOrigin) {
|
|
60902
|
-
return;
|
|
60903
|
-
}
|
|
60904
|
-
const dvRangesZones = dvOrigin.ranges.map((range) => range.zone);
|
|
60905
|
-
const newDvRanges = recomputeZones(dvRangesZones.concat(positionToZone({ col, row })), []);
|
|
60906
|
-
this.dispatch("ADD_DATA_VALIDATION_RULE", {
|
|
60907
|
-
rule: dvOrigin,
|
|
60908
|
-
ranges: newDvRanges.map((zone) => this.getters.getRangeDataFromZone(sheetId, zone)),
|
|
60909
|
-
sheetId,
|
|
60910
|
-
});
|
|
60911
|
-
}
|
|
60912
61010
|
// ---------------------------------------------------------------------------
|
|
60913
61011
|
// Grid rendering
|
|
60914
61012
|
// ---------------------------------------------------------------------------
|
|
@@ -73571,6 +73669,6 @@ const constants = {
|
|
|
73571
73669
|
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 };
|
|
73572
73670
|
|
|
73573
73671
|
|
|
73574
|
-
__info__.version = "18.0.
|
|
73575
|
-
__info__.date = "2025-
|
|
73576
|
-
__info__.hash = "
|
|
73672
|
+
__info__.version = "18.0.23";
|
|
73673
|
+
__info__.date = "2025-04-14T17:16:35.374Z";
|
|
73674
|
+
__info__.hash = "f560133";
|