@revolist/revogrid 3.5.2 → 3.6.0
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/revo-grid.js +3 -2
- package/custom-element/revogr-row-headers2.js +4 -3
- package/dist/cjs/revo-grid_11.cjs.entry.js +7 -5
- package/dist/collection/components/revo-grid/revo-grid.js +1 -1
- package/dist/collection/services/dimension.provider.js +2 -1
- package/dist/collection/store/viewPort/viewport.store.js +4 -3
- package/dist/esm/revo-grid_11.entry.js +7 -5
- 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/services/dimension.provider.d.ts +1 -1
- package/package.json +1 -1
|
@@ -616,9 +616,10 @@ class DimensionProvider {
|
|
|
616
616
|
const dimension = this.stores[type].getCurrentState();
|
|
617
617
|
this.viewports.stores[type].setViewport({ virtualSize: dimension.realSize });
|
|
618
618
|
}
|
|
619
|
-
|
|
619
|
+
dropColumns() {
|
|
620
620
|
for (let type of columnTypes) {
|
|
621
621
|
this.stores[type].drop();
|
|
622
|
+
this.viewports.stores[type].clear();
|
|
622
623
|
}
|
|
623
624
|
}
|
|
624
625
|
setColumns(type, newLength, sizes, noVirtual = false) {
|
|
@@ -3351,7 +3352,7 @@ const RevoGridComponent = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
3351
3352
|
}
|
|
3352
3353
|
}
|
|
3353
3354
|
columnChanged(newVal = []) {
|
|
3354
|
-
this.dimensionProvider.
|
|
3355
|
+
this.dimensionProvider.dropColumns();
|
|
3355
3356
|
const columnGather = ColumnDataProvider.getColumns(newVal, 0, this.columnTypes);
|
|
3356
3357
|
this.beforecolumnsset.emit(columnGather);
|
|
3357
3358
|
for (let type of columnTypes) {
|
|
@@ -284,7 +284,7 @@ class ViewportStore {
|
|
|
284
284
|
// left position changed
|
|
285
285
|
if (!isActiveRange(pos, firstItem)) {
|
|
286
286
|
toUpdate = Object.assign(Object.assign({}, toUpdate), getUpdatedItemsByPosition(pos, this.getItems(), this.store.get('realCount'), virtualSize, dimension));
|
|
287
|
-
|
|
287
|
+
this.setViewport(Object.assign({}, toUpdate));
|
|
288
288
|
// right position changed
|
|
289
289
|
}
|
|
290
290
|
else if (firstItem && this.store.get('virtualSize') + pos > (lastItem === null || lastItem === void 0 ? void 0 : lastItem.end)) {
|
|
@@ -298,7 +298,7 @@ class ViewportStore {
|
|
|
298
298
|
};
|
|
299
299
|
updateMissingAndRange(items, missing, range);
|
|
300
300
|
toUpdate = Object.assign(Object.assign(Object.assign({}, toUpdate), { items: [...items] }), range);
|
|
301
|
-
|
|
301
|
+
this.setViewport(Object.assign({}, toUpdate));
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
304
|
}
|
|
@@ -317,6 +317,7 @@ class ViewportStore {
|
|
|
317
317
|
if (dropToOriginalSize) {
|
|
318
318
|
items = setItemSizes(items, start, dropToOriginalSize, this.store.get('lastCoordinate'));
|
|
319
319
|
}
|
|
320
|
+
console.log('items', items);
|
|
320
321
|
// loop through array from initial item after recombination
|
|
321
322
|
while (i < count) {
|
|
322
323
|
const item = items[start];
|
|
@@ -340,7 +341,7 @@ class ViewportStore {
|
|
|
340
341
|
start = 0;
|
|
341
342
|
}
|
|
342
343
|
}
|
|
343
|
-
|
|
344
|
+
this.setViewport({ items: [...items] });
|
|
344
345
|
}
|
|
345
346
|
getItems() {
|
|
346
347
|
return {
|
|
@@ -4464,9 +4464,10 @@ class DimensionProvider {
|
|
|
4464
4464
|
const dimension = this.stores[type].getCurrentState();
|
|
4465
4465
|
this.viewports.stores[type].setViewport({ virtualSize: dimension.realSize });
|
|
4466
4466
|
}
|
|
4467
|
-
|
|
4467
|
+
dropColumns() {
|
|
4468
4468
|
for (let type of columnTypes) {
|
|
4469
4469
|
this.stores[type].drop();
|
|
4470
|
+
this.viewports.stores[type].clear();
|
|
4470
4471
|
}
|
|
4471
4472
|
}
|
|
4472
4473
|
setColumns(type, newLength, sizes, noVirtual = false) {
|
|
@@ -4780,7 +4781,7 @@ class ViewportStore {
|
|
|
4780
4781
|
// left position changed
|
|
4781
4782
|
if (!isActiveRange(pos, firstItem)) {
|
|
4782
4783
|
toUpdate = Object.assign(Object.assign({}, toUpdate), getUpdatedItemsByPosition(pos, this.getItems(), this.store.get('realCount'), virtualSize, dimension));
|
|
4783
|
-
|
|
4784
|
+
this.setViewport(Object.assign({}, toUpdate));
|
|
4784
4785
|
// right position changed
|
|
4785
4786
|
}
|
|
4786
4787
|
else if (firstItem && this.store.get('virtualSize') + pos > (lastItem === null || lastItem === void 0 ? void 0 : lastItem.end)) {
|
|
@@ -4794,7 +4795,7 @@ class ViewportStore {
|
|
|
4794
4795
|
};
|
|
4795
4796
|
updateMissingAndRange(items, missing, range);
|
|
4796
4797
|
toUpdate = Object.assign(Object.assign(Object.assign({}, toUpdate), { items: [...items] }), range);
|
|
4797
|
-
|
|
4798
|
+
this.setViewport(Object.assign({}, toUpdate));
|
|
4798
4799
|
}
|
|
4799
4800
|
}
|
|
4800
4801
|
}
|
|
@@ -4813,6 +4814,7 @@ class ViewportStore {
|
|
|
4813
4814
|
if (dropToOriginalSize) {
|
|
4814
4815
|
items = setItemSizes(items, start, dropToOriginalSize, this.store.get('lastCoordinate'));
|
|
4815
4816
|
}
|
|
4817
|
+
console.log('items', items);
|
|
4816
4818
|
// loop through array from initial item after recombination
|
|
4817
4819
|
while (i < count) {
|
|
4818
4820
|
const item = items[start];
|
|
@@ -4836,7 +4838,7 @@ class ViewportStore {
|
|
|
4836
4838
|
start = 0;
|
|
4837
4839
|
}
|
|
4838
4840
|
}
|
|
4839
|
-
|
|
4841
|
+
this.setViewport({ items: [...items] });
|
|
4840
4842
|
}
|
|
4841
4843
|
getItems() {
|
|
4842
4844
|
return {
|
|
@@ -25269,7 +25271,7 @@ const RevoGridComponent = class {
|
|
|
25269
25271
|
}
|
|
25270
25272
|
}
|
|
25271
25273
|
columnChanged(newVal = []) {
|
|
25272
|
-
this.dimensionProvider.
|
|
25274
|
+
this.dimensionProvider.dropColumns();
|
|
25273
25275
|
const columnGather = ColumnDataProvider.getColumns(newVal, 0, this.columnTypes);
|
|
25274
25276
|
this.beforecolumnsset.emit(columnGather);
|
|
25275
25277
|
for (let type of columnTypes) {
|
|
@@ -387,7 +387,7 @@ export class RevoGridComponent {
|
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
389
|
columnChanged(newVal = []) {
|
|
390
|
-
this.dimensionProvider.
|
|
390
|
+
this.dimensionProvider.dropColumns();
|
|
391
391
|
const columnGather = ColumnDataProvider.getColumns(newVal, 0, this.columnTypes);
|
|
392
392
|
this.beforecolumnsset.emit(columnGather);
|
|
393
393
|
for (let type of columnTypes) {
|
|
@@ -55,9 +55,10 @@ export default class DimensionProvider {
|
|
|
55
55
|
const dimension = this.stores[type].getCurrentState();
|
|
56
56
|
this.viewports.stores[type].setViewport({ virtualSize: dimension.realSize });
|
|
57
57
|
}
|
|
58
|
-
|
|
58
|
+
dropColumns() {
|
|
59
59
|
for (let type of columnTypes) {
|
|
60
60
|
this.stores[type].drop();
|
|
61
|
+
this.viewports.stores[type].clear();
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
64
|
setColumns(type, newLength, sizes, noVirtual = false) {
|
|
@@ -54,7 +54,7 @@ export default class ViewportStore {
|
|
|
54
54
|
// left position changed
|
|
55
55
|
if (!isActiveRange(pos, firstItem)) {
|
|
56
56
|
toUpdate = Object.assign(Object.assign({}, toUpdate), getUpdatedItemsByPosition(pos, this.getItems(), this.store.get('realCount'), virtualSize, dimension));
|
|
57
|
-
|
|
57
|
+
this.setViewport(Object.assign({}, toUpdate));
|
|
58
58
|
// right position changed
|
|
59
59
|
}
|
|
60
60
|
else if (firstItem && this.store.get('virtualSize') + pos > (lastItem === null || lastItem === void 0 ? void 0 : lastItem.end)) {
|
|
@@ -68,7 +68,7 @@ export default class ViewportStore {
|
|
|
68
68
|
};
|
|
69
69
|
updateMissingAndRange(items, missing, range);
|
|
70
70
|
toUpdate = Object.assign(Object.assign(Object.assign({}, toUpdate), { items: [...items] }), range);
|
|
71
|
-
|
|
71
|
+
this.setViewport(Object.assign({}, toUpdate));
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
}
|
|
@@ -87,6 +87,7 @@ export default class ViewportStore {
|
|
|
87
87
|
if (dropToOriginalSize) {
|
|
88
88
|
items = setItemSizes(items, start, dropToOriginalSize, this.store.get('lastCoordinate'));
|
|
89
89
|
}
|
|
90
|
+
console.log('items', items);
|
|
90
91
|
// loop through array from initial item after recombination
|
|
91
92
|
while (i < count) {
|
|
92
93
|
const item = items[start];
|
|
@@ -110,7 +111,7 @@ export default class ViewportStore {
|
|
|
110
111
|
start = 0;
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
|
-
|
|
114
|
+
this.setViewport({ items: [...items] });
|
|
114
115
|
}
|
|
115
116
|
getItems() {
|
|
116
117
|
return {
|
|
@@ -4460,9 +4460,10 @@ class DimensionProvider {
|
|
|
4460
4460
|
const dimension = this.stores[type].getCurrentState();
|
|
4461
4461
|
this.viewports.stores[type].setViewport({ virtualSize: dimension.realSize });
|
|
4462
4462
|
}
|
|
4463
|
-
|
|
4463
|
+
dropColumns() {
|
|
4464
4464
|
for (let type of columnTypes) {
|
|
4465
4465
|
this.stores[type].drop();
|
|
4466
|
+
this.viewports.stores[type].clear();
|
|
4466
4467
|
}
|
|
4467
4468
|
}
|
|
4468
4469
|
setColumns(type, newLength, sizes, noVirtual = false) {
|
|
@@ -4776,7 +4777,7 @@ class ViewportStore {
|
|
|
4776
4777
|
// left position changed
|
|
4777
4778
|
if (!isActiveRange(pos, firstItem)) {
|
|
4778
4779
|
toUpdate = Object.assign(Object.assign({}, toUpdate), getUpdatedItemsByPosition(pos, this.getItems(), this.store.get('realCount'), virtualSize, dimension));
|
|
4779
|
-
|
|
4780
|
+
this.setViewport(Object.assign({}, toUpdate));
|
|
4780
4781
|
// right position changed
|
|
4781
4782
|
}
|
|
4782
4783
|
else if (firstItem && this.store.get('virtualSize') + pos > (lastItem === null || lastItem === void 0 ? void 0 : lastItem.end)) {
|
|
@@ -4790,7 +4791,7 @@ class ViewportStore {
|
|
|
4790
4791
|
};
|
|
4791
4792
|
updateMissingAndRange(items, missing, range);
|
|
4792
4793
|
toUpdate = Object.assign(Object.assign(Object.assign({}, toUpdate), { items: [...items] }), range);
|
|
4793
|
-
|
|
4794
|
+
this.setViewport(Object.assign({}, toUpdate));
|
|
4794
4795
|
}
|
|
4795
4796
|
}
|
|
4796
4797
|
}
|
|
@@ -4809,6 +4810,7 @@ class ViewportStore {
|
|
|
4809
4810
|
if (dropToOriginalSize) {
|
|
4810
4811
|
items = setItemSizes(items, start, dropToOriginalSize, this.store.get('lastCoordinate'));
|
|
4811
4812
|
}
|
|
4813
|
+
console.log('items', items);
|
|
4812
4814
|
// loop through array from initial item after recombination
|
|
4813
4815
|
while (i < count) {
|
|
4814
4816
|
const item = items[start];
|
|
@@ -4832,7 +4834,7 @@ class ViewportStore {
|
|
|
4832
4834
|
start = 0;
|
|
4833
4835
|
}
|
|
4834
4836
|
}
|
|
4835
|
-
|
|
4837
|
+
this.setViewport({ items: [...items] });
|
|
4836
4838
|
}
|
|
4837
4839
|
getItems() {
|
|
4838
4840
|
return {
|
|
@@ -25265,7 +25267,7 @@ const RevoGridComponent = class {
|
|
|
25265
25267
|
}
|
|
25266
25268
|
}
|
|
25267
25269
|
columnChanged(newVal = []) {
|
|
25268
|
-
this.dimensionProvider.
|
|
25270
|
+
this.dimensionProvider.dropColumns();
|
|
25269
25271
|
const columnGather = ColumnDataProvider.getColumns(newVal, 0, this.columnTypes);
|
|
25270
25272
|
this.beforecolumnsset.emit(columnGather);
|
|
25271
25273
|
for (let type of columnTypes) {
|