@revolist/revogrid 3.7.5 → 3.7.6
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/custom-element/columnService.js +17 -1
- package/custom-element/revogr-overlay-selection2.js +4 -1
- package/dist/cjs/revo-grid_11.cjs.entry.js +21 -2
- package/dist/collection/components/data/columnService.js +17 -1
- package/dist/collection/components/overlay/autofill.service.js +4 -1
- package/dist/collection/components/overlay/revogr-overlay-selection.js +1 -1
- package/dist/collection/components/revo-grid/revo-grid.js +2 -2
- package/dist/esm/revo-grid_11.entry.js +21 -2
- package/dist/esm-es5/revo-grid_11.entry.js +1 -1
- package/dist/revo-grid/revo-grid_11.entry.js +1 -1
- package/dist/revo-grid/revo-grid_11.system.entry.js +1 -1
- package/dist/types/components/data/columnService.d.ts +4 -1
- package/dist/types/interfaces.d.ts +11 -0
- package/package.json +1 -1
|
@@ -615,10 +615,12 @@ class ColumnService {
|
|
|
615
615
|
const copyColLength = d.oldProps.length;
|
|
616
616
|
const copyFrom = this.copyRangeArray(d.oldRange, d.oldProps, this.dataStore);
|
|
617
617
|
const copyRowLength = copyFrom.length;
|
|
618
|
+
const mapping = {};
|
|
618
619
|
// rows
|
|
619
620
|
for (let rowIndex = d.newRange.y, i = 0; rowIndex < d.newRange.y1 + 1; rowIndex++, i++) {
|
|
620
621
|
// copy original data link
|
|
621
622
|
const copyRow = copyFrom[i % copyRowLength];
|
|
623
|
+
const oldRowIndex = d.oldRange.y + (i % copyRowLength);
|
|
622
624
|
// columns
|
|
623
625
|
for (let colIndex = d.newRange.x, j = 0; colIndex < d.newRange.x1 + 1; colIndex++, j++) {
|
|
624
626
|
// check if old range area
|
|
@@ -626,6 +628,8 @@ class ColumnService {
|
|
|
626
628
|
continue;
|
|
627
629
|
}
|
|
628
630
|
const p = this.columns[colIndex].prop;
|
|
631
|
+
const copyColIndex = d.oldRange.x + (j % copyColLength);
|
|
632
|
+
const copyColumnProp = this.columns[copyColIndex].prop;
|
|
629
633
|
const currentCol = j % copyColLength;
|
|
630
634
|
/** if can write */
|
|
631
635
|
if (!this.isReadOnly(rowIndex, colIndex)) {
|
|
@@ -634,10 +638,22 @@ class ColumnService {
|
|
|
634
638
|
changed[rowIndex] = {};
|
|
635
639
|
}
|
|
636
640
|
changed[rowIndex][p] = copyRow[currentCol];
|
|
641
|
+
/** Generate mapping object */
|
|
642
|
+
if (!mapping[rowIndex]) {
|
|
643
|
+
mapping[rowIndex] = {};
|
|
644
|
+
}
|
|
645
|
+
mapping[rowIndex][p] = {
|
|
646
|
+
colIndex: copyColIndex,
|
|
647
|
+
colProp: copyColumnProp,
|
|
648
|
+
rowIndex: oldRowIndex,
|
|
649
|
+
};
|
|
637
650
|
}
|
|
638
651
|
}
|
|
639
652
|
}
|
|
640
|
-
return
|
|
653
|
+
return {
|
|
654
|
+
changed,
|
|
655
|
+
mapping,
|
|
656
|
+
};
|
|
641
657
|
}
|
|
642
658
|
getTransformedDataToApply(start, data) {
|
|
643
659
|
const changed = {};
|
|
@@ -396,8 +396,11 @@ class AutoFillService {
|
|
|
396
396
|
oldRange,
|
|
397
397
|
newProps: slice_1(columns, newRange.x, newRange.x1 + 1).map(v => v.prop),
|
|
398
398
|
oldProps: slice_1(columns, oldRange.x, oldRange.x1 + 1).map(v => v.prop),
|
|
399
|
+
mapping: {},
|
|
399
400
|
};
|
|
400
|
-
|
|
401
|
+
const changesOnRange = this.sv.columnService.getRangeData(rangeData);
|
|
402
|
+
rangeData.newData = changesOnRange.changed;
|
|
403
|
+
rangeData.mapping = changesOnRange.mapping;
|
|
401
404
|
const selectionEndEvent = this.sv.internalSelectionChanged(rangeData);
|
|
402
405
|
if (selectionEndEvent.defaultPrevented) {
|
|
403
406
|
this.sv.setTempRange(null);
|
|
@@ -25671,10 +25671,12 @@ class ColumnService {
|
|
|
25671
25671
|
const copyColLength = d.oldProps.length;
|
|
25672
25672
|
const copyFrom = this.copyRangeArray(d.oldRange, d.oldProps, this.dataStore);
|
|
25673
25673
|
const copyRowLength = copyFrom.length;
|
|
25674
|
+
const mapping = {};
|
|
25674
25675
|
// rows
|
|
25675
25676
|
for (let rowIndex = d.newRange.y, i = 0; rowIndex < d.newRange.y1 + 1; rowIndex++, i++) {
|
|
25676
25677
|
// copy original data link
|
|
25677
25678
|
const copyRow = copyFrom[i % copyRowLength];
|
|
25679
|
+
const oldRowIndex = d.oldRange.y + (i % copyRowLength);
|
|
25678
25680
|
// columns
|
|
25679
25681
|
for (let colIndex = d.newRange.x, j = 0; colIndex < d.newRange.x1 + 1; colIndex++, j++) {
|
|
25680
25682
|
// check if old range area
|
|
@@ -25682,6 +25684,8 @@ class ColumnService {
|
|
|
25682
25684
|
continue;
|
|
25683
25685
|
}
|
|
25684
25686
|
const p = this.columns[colIndex].prop;
|
|
25687
|
+
const copyColIndex = d.oldRange.x + (j % copyColLength);
|
|
25688
|
+
const copyColumnProp = this.columns[copyColIndex].prop;
|
|
25685
25689
|
const currentCol = j % copyColLength;
|
|
25686
25690
|
/** if can write */
|
|
25687
25691
|
if (!this.isReadOnly(rowIndex, colIndex)) {
|
|
@@ -25690,10 +25694,22 @@ class ColumnService {
|
|
|
25690
25694
|
changed[rowIndex] = {};
|
|
25691
25695
|
}
|
|
25692
25696
|
changed[rowIndex][p] = copyRow[currentCol];
|
|
25697
|
+
/** Generate mapping object */
|
|
25698
|
+
if (!mapping[rowIndex]) {
|
|
25699
|
+
mapping[rowIndex] = {};
|
|
25700
|
+
}
|
|
25701
|
+
mapping[rowIndex][p] = {
|
|
25702
|
+
colIndex: copyColIndex,
|
|
25703
|
+
colProp: copyColumnProp,
|
|
25704
|
+
rowIndex: oldRowIndex,
|
|
25705
|
+
};
|
|
25693
25706
|
}
|
|
25694
25707
|
}
|
|
25695
25708
|
}
|
|
25696
|
-
return
|
|
25709
|
+
return {
|
|
25710
|
+
changed,
|
|
25711
|
+
mapping,
|
|
25712
|
+
};
|
|
25697
25713
|
}
|
|
25698
25714
|
getTransformedDataToApply(start, data) {
|
|
25699
25715
|
const changed = {};
|
|
@@ -27473,8 +27489,11 @@ class AutoFillService {
|
|
|
27473
27489
|
oldRange,
|
|
27474
27490
|
newProps: slice_1(columns, newRange.x, newRange.x1 + 1).map(v => v.prop),
|
|
27475
27491
|
oldProps: slice_1(columns, oldRange.x, oldRange.x1 + 1).map(v => v.prop),
|
|
27492
|
+
mapping: {},
|
|
27476
27493
|
};
|
|
27477
|
-
|
|
27494
|
+
const changesOnRange = this.sv.columnService.getRangeData(rangeData);
|
|
27495
|
+
rangeData.newData = changesOnRange.changed;
|
|
27496
|
+
rangeData.mapping = changesOnRange.mapping;
|
|
27478
27497
|
const selectionEndEvent = this.sv.internalSelectionChanged(rangeData);
|
|
27479
27498
|
if (selectionEndEvent.defaultPrevented) {
|
|
27480
27499
|
this.sv.setTempRange(null);
|
|
@@ -132,10 +132,12 @@ export default class ColumnService {
|
|
|
132
132
|
const copyColLength = d.oldProps.length;
|
|
133
133
|
const copyFrom = this.copyRangeArray(d.oldRange, d.oldProps, this.dataStore);
|
|
134
134
|
const copyRowLength = copyFrom.length;
|
|
135
|
+
const mapping = {};
|
|
135
136
|
// rows
|
|
136
137
|
for (let rowIndex = d.newRange.y, i = 0; rowIndex < d.newRange.y1 + 1; rowIndex++, i++) {
|
|
137
138
|
// copy original data link
|
|
138
139
|
const copyRow = copyFrom[i % copyRowLength];
|
|
140
|
+
const oldRowIndex = d.oldRange.y + (i % copyRowLength);
|
|
139
141
|
// columns
|
|
140
142
|
for (let colIndex = d.newRange.x, j = 0; colIndex < d.newRange.x1 + 1; colIndex++, j++) {
|
|
141
143
|
// check if old range area
|
|
@@ -143,6 +145,8 @@ export default class ColumnService {
|
|
|
143
145
|
continue;
|
|
144
146
|
}
|
|
145
147
|
const p = this.columns[colIndex].prop;
|
|
148
|
+
const copyColIndex = d.oldRange.x + (j % copyColLength);
|
|
149
|
+
const copyColumnProp = this.columns[copyColIndex].prop;
|
|
146
150
|
const currentCol = j % copyColLength;
|
|
147
151
|
/** if can write */
|
|
148
152
|
if (!this.isReadOnly(rowIndex, colIndex)) {
|
|
@@ -151,10 +155,22 @@ export default class ColumnService {
|
|
|
151
155
|
changed[rowIndex] = {};
|
|
152
156
|
}
|
|
153
157
|
changed[rowIndex][p] = copyRow[currentCol];
|
|
158
|
+
/** Generate mapping object */
|
|
159
|
+
if (!mapping[rowIndex]) {
|
|
160
|
+
mapping[rowIndex] = {};
|
|
161
|
+
}
|
|
162
|
+
mapping[rowIndex][p] = {
|
|
163
|
+
colIndex: copyColIndex,
|
|
164
|
+
colProp: copyColumnProp,
|
|
165
|
+
rowIndex: oldRowIndex,
|
|
166
|
+
};
|
|
154
167
|
}
|
|
155
168
|
}
|
|
156
169
|
}
|
|
157
|
-
return
|
|
170
|
+
return {
|
|
171
|
+
changed,
|
|
172
|
+
mapping,
|
|
173
|
+
};
|
|
158
174
|
}
|
|
159
175
|
getTransformedDataToApply(start, data) {
|
|
160
176
|
const changed = {};
|
|
@@ -156,8 +156,11 @@ export class AutoFillService {
|
|
|
156
156
|
oldRange,
|
|
157
157
|
newProps: slice(columns, newRange.x, newRange.x1 + 1).map(v => v.prop),
|
|
158
158
|
oldProps: slice(columns, oldRange.x, oldRange.x1 + 1).map(v => v.prop),
|
|
159
|
+
mapping: {},
|
|
159
160
|
};
|
|
160
|
-
|
|
161
|
+
const changesOnRange = this.sv.columnService.getRangeData(rangeData);
|
|
162
|
+
rangeData.newData = changesOnRange.changed;
|
|
163
|
+
rangeData.mapping = changesOnRange.mapping;
|
|
161
164
|
const selectionEndEvent = this.sv.internalSelectionChanged(rangeData);
|
|
162
165
|
if (selectionEndEvent.defaultPrevented) {
|
|
163
166
|
this.sv.setTempRange(null);
|
|
@@ -699,7 +699,7 @@ export class OverlaySelection {
|
|
|
699
699
|
},
|
|
700
700
|
"complexType": {
|
|
701
701
|
"original": "Selection.ChangedRange",
|
|
702
|
-
"resolved": "{ type: DimensionRows; newRange: RangeArea; oldRange: RangeArea; newProps: ColumnProp[]; oldProps: ColumnProp[]; newData: { [key: number]: DataType; }; }",
|
|
702
|
+
"resolved": "{ type: DimensionRows; newRange: RangeArea; oldRange: RangeArea; newProps: ColumnProp[]; oldProps: ColumnProp[]; newData: { [key: number]: DataType; }; mapping: OldNewRangeMapping; }",
|
|
703
703
|
"references": {
|
|
704
704
|
"Selection": {
|
|
705
705
|
"location": "import",
|
|
@@ -1190,7 +1190,7 @@ export class RevoGridComponent {
|
|
|
1190
1190
|
},
|
|
1191
1191
|
"complexType": {
|
|
1192
1192
|
"original": "Selection.ChangedRange",
|
|
1193
|
-
"resolved": "{ type: DimensionRows; newRange: RangeArea; oldRange: RangeArea; newProps: ColumnProp[]; oldProps: ColumnProp[]; newData: { [key: number]: DataType; }; }",
|
|
1193
|
+
"resolved": "{ type: DimensionRows; newRange: RangeArea; oldRange: RangeArea; newProps: ColumnProp[]; oldProps: ColumnProp[]; newData: { [key: number]: DataType; }; mapping: OldNewRangeMapping; }",
|
|
1194
1194
|
"references": {
|
|
1195
1195
|
"Selection": {
|
|
1196
1196
|
"location": "import",
|
|
@@ -1210,7 +1210,7 @@ export class RevoGridComponent {
|
|
|
1210
1210
|
},
|
|
1211
1211
|
"complexType": {
|
|
1212
1212
|
"original": "Selection.ChangedRange",
|
|
1213
|
-
"resolved": "{ type: DimensionRows; newRange: RangeArea; oldRange: RangeArea; newProps: ColumnProp[]; oldProps: ColumnProp[]; newData: { [key: number]: DataType; }; }",
|
|
1213
|
+
"resolved": "{ type: DimensionRows; newRange: RangeArea; oldRange: RangeArea; newProps: ColumnProp[]; oldProps: ColumnProp[]; newData: { [key: number]: DataType; }; mapping: OldNewRangeMapping; }",
|
|
1214
1214
|
"references": {
|
|
1215
1215
|
"Selection": {
|
|
1216
1216
|
"location": "import",
|
|
@@ -25667,10 +25667,12 @@ class ColumnService {
|
|
|
25667
25667
|
const copyColLength = d.oldProps.length;
|
|
25668
25668
|
const copyFrom = this.copyRangeArray(d.oldRange, d.oldProps, this.dataStore);
|
|
25669
25669
|
const copyRowLength = copyFrom.length;
|
|
25670
|
+
const mapping = {};
|
|
25670
25671
|
// rows
|
|
25671
25672
|
for (let rowIndex = d.newRange.y, i = 0; rowIndex < d.newRange.y1 + 1; rowIndex++, i++) {
|
|
25672
25673
|
// copy original data link
|
|
25673
25674
|
const copyRow = copyFrom[i % copyRowLength];
|
|
25675
|
+
const oldRowIndex = d.oldRange.y + (i % copyRowLength);
|
|
25674
25676
|
// columns
|
|
25675
25677
|
for (let colIndex = d.newRange.x, j = 0; colIndex < d.newRange.x1 + 1; colIndex++, j++) {
|
|
25676
25678
|
// check if old range area
|
|
@@ -25678,6 +25680,8 @@ class ColumnService {
|
|
|
25678
25680
|
continue;
|
|
25679
25681
|
}
|
|
25680
25682
|
const p = this.columns[colIndex].prop;
|
|
25683
|
+
const copyColIndex = d.oldRange.x + (j % copyColLength);
|
|
25684
|
+
const copyColumnProp = this.columns[copyColIndex].prop;
|
|
25681
25685
|
const currentCol = j % copyColLength;
|
|
25682
25686
|
/** if can write */
|
|
25683
25687
|
if (!this.isReadOnly(rowIndex, colIndex)) {
|
|
@@ -25686,10 +25690,22 @@ class ColumnService {
|
|
|
25686
25690
|
changed[rowIndex] = {};
|
|
25687
25691
|
}
|
|
25688
25692
|
changed[rowIndex][p] = copyRow[currentCol];
|
|
25693
|
+
/** Generate mapping object */
|
|
25694
|
+
if (!mapping[rowIndex]) {
|
|
25695
|
+
mapping[rowIndex] = {};
|
|
25696
|
+
}
|
|
25697
|
+
mapping[rowIndex][p] = {
|
|
25698
|
+
colIndex: copyColIndex,
|
|
25699
|
+
colProp: copyColumnProp,
|
|
25700
|
+
rowIndex: oldRowIndex,
|
|
25701
|
+
};
|
|
25689
25702
|
}
|
|
25690
25703
|
}
|
|
25691
25704
|
}
|
|
25692
|
-
return
|
|
25705
|
+
return {
|
|
25706
|
+
changed,
|
|
25707
|
+
mapping,
|
|
25708
|
+
};
|
|
25693
25709
|
}
|
|
25694
25710
|
getTransformedDataToApply(start, data) {
|
|
25695
25711
|
const changed = {};
|
|
@@ -27469,8 +27485,11 @@ class AutoFillService {
|
|
|
27469
27485
|
oldRange,
|
|
27470
27486
|
newProps: slice_1(columns, newRange.x, newRange.x1 + 1).map(v => v.prop),
|
|
27471
27487
|
oldProps: slice_1(columns, oldRange.x, oldRange.x1 + 1).map(v => v.prop),
|
|
27488
|
+
mapping: {},
|
|
27472
27489
|
};
|
|
27473
|
-
|
|
27490
|
+
const changesOnRange = this.sv.columnService.getRangeData(rangeData);
|
|
27491
|
+
rangeData.newData = changesOnRange.changed;
|
|
27492
|
+
rangeData.mapping = changesOnRange.mapping;
|
|
27474
27493
|
const selectionEndEvent = this.sv.internalSelectionChanged(rangeData);
|
|
27475
27494
|
if (selectionEndEvent.defaultPrevented) {
|
|
27476
27495
|
this.sv.setTempRange(null);
|