@revolist/revogrid 4.2.0-next.5 → 4.2.0-next.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/revo-grid.js +7 -10
- package/custom-element/revogr-row-headers2.js +4 -2
- package/custom-element/revogr-viewport-scroll2.js +1 -3
- package/dist/cjs/revo-grid_11.cjs.entry.js +12 -15
- package/dist/collection/components/rowHeaders/revogr-row-headers.js +1 -1
- package/dist/collection/components/scroll/revogr-viewport-scroll.js +1 -3
- package/dist/collection/services/dimension.provider.d.ts +1 -1
- package/dist/collection/services/dimension.provider.js +6 -9
- package/dist/collection/services/viewport.provider.js +1 -1
- package/dist/collection/store/viewPort/viewport.store.d.ts +1 -1
- package/dist/collection/store/viewPort/viewport.store.js +3 -1
- package/dist/esm/revo-grid_11.entry.js +12 -15
- package/dist/revo-grid/revo-grid_11.entry.js +1 -1
- package/dist/types/services/dimension.provider.d.ts +1 -1
- package/dist/types/store/viewPort/viewport.store.d.ts +1 -1
- package/package.json +1 -1
|
@@ -678,14 +678,14 @@ class DimensionProvider {
|
|
|
678
678
|
this.stores[t].drop();
|
|
679
679
|
// after we done with drop trigger viewport recalculaction
|
|
680
680
|
this.viewports.stores[t].setOriginalSizes(this.stores[t].store.get('originItemSize'));
|
|
681
|
-
this.
|
|
681
|
+
this.setItemCount(count, t);
|
|
682
682
|
}
|
|
683
683
|
setDimensionSize(type, sizes) {
|
|
684
684
|
this.stores[type].setDimensionSize(sizes);
|
|
685
685
|
this.viewports.stores[type].setViewPortDimension(sizes);
|
|
686
686
|
}
|
|
687
|
-
|
|
688
|
-
this.viewports.stores[type].setViewport({ realCount }
|
|
687
|
+
setItemCount(realCount, type) {
|
|
688
|
+
this.viewports.stores[type].setViewport({ realCount });
|
|
689
689
|
this.stores[type].setStore({ count: realCount });
|
|
690
690
|
}
|
|
691
691
|
setTrimmed(trimmed, type) {
|
|
@@ -699,7 +699,7 @@ class DimensionProvider {
|
|
|
699
699
|
* @param type - dimension type
|
|
700
700
|
*/
|
|
701
701
|
setData(itemCount, type, noVirtual = false) {
|
|
702
|
-
this.
|
|
702
|
+
this.setItemCount(itemCount, type);
|
|
703
703
|
if (noVirtual) {
|
|
704
704
|
this.setNoVirtual(type);
|
|
705
705
|
}
|
|
@@ -707,7 +707,7 @@ class DimensionProvider {
|
|
|
707
707
|
}
|
|
708
708
|
setNoVirtual(type) {
|
|
709
709
|
const dimension = this.stores[type].getCurrentState();
|
|
710
|
-
this.viewports.stores[type].setViewport({ virtualSize: dimension.realSize }
|
|
710
|
+
this.viewports.stores[type].setViewport({ virtualSize: dimension.realSize });
|
|
711
711
|
}
|
|
712
712
|
drop() {
|
|
713
713
|
for (let type of columnTypes) {
|
|
@@ -727,10 +727,7 @@ class DimensionProvider {
|
|
|
727
727
|
return { y, x };
|
|
728
728
|
}
|
|
729
729
|
setNewColumns(type, newLength, sizes, noVirtual = false) {
|
|
730
|
-
|
|
731
|
-
// we need this because of if we apply pinned columns new size will arise
|
|
732
|
-
this.viewports.stores[type].setViewport({ virtualSize: 0 }, type);
|
|
733
|
-
this.setRealSize(newLength, type);
|
|
730
|
+
this.setItemCount(newLength, type);
|
|
734
731
|
this.setDimensionSize(type, sizes);
|
|
735
732
|
if (noVirtual) {
|
|
736
733
|
this.setNoVirtual(type);
|
|
@@ -776,7 +773,7 @@ class ViewportProvider {
|
|
|
776
773
|
}, {});
|
|
777
774
|
}
|
|
778
775
|
setViewport(type, data) {
|
|
779
|
-
this.stores[type].setViewport(data
|
|
776
|
+
this.stores[type].setViewport(data);
|
|
780
777
|
}
|
|
781
778
|
}
|
|
782
779
|
|
|
@@ -210,6 +210,8 @@ class ViewportStore {
|
|
|
210
210
|
constructor(type) {
|
|
211
211
|
this.store = createStore(initialState(type));
|
|
212
212
|
this.store.onChange('realCount', () => this.clearItems());
|
|
213
|
+
// drop items on virtual size change, require a new item set
|
|
214
|
+
this.store.onChange('virtualSize', () => this.setViewport({ items: [] }));
|
|
213
215
|
}
|
|
214
216
|
/**
|
|
215
217
|
* Render viewport based on coordinate
|
|
@@ -333,7 +335,7 @@ class ViewportStore {
|
|
|
333
335
|
end: this.store.get('end'),
|
|
334
336
|
};
|
|
335
337
|
}
|
|
336
|
-
setViewport(data
|
|
338
|
+
setViewport(data) {
|
|
337
339
|
setStore(this.store, data);
|
|
338
340
|
}
|
|
339
341
|
clearItems() {
|
|
@@ -385,7 +387,7 @@ const RevogrRowHeaders = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
385
387
|
itemIndex: 0,
|
|
386
388
|
},
|
|
387
389
|
],
|
|
388
|
-
}
|
|
390
|
+
});
|
|
389
391
|
const parent = `${this.uiid}-rowHeaders`;
|
|
390
392
|
const viewportScroll = {
|
|
391
393
|
[UUID]: parent,
|
|
@@ -200,9 +200,7 @@ const RevogrViewportScroll = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
200
200
|
});
|
|
201
201
|
}
|
|
202
202
|
componentDidLoad() {
|
|
203
|
-
|
|
204
|
-
* Track horizontal viewport resize
|
|
205
|
-
*/
|
|
203
|
+
// track horizontal viewport resize
|
|
206
204
|
this.resizeService = new GridResizeService(this.horizontalScroll, {
|
|
207
205
|
resize: entries => {
|
|
208
206
|
var _a, _b;
|
|
@@ -21675,14 +21675,14 @@ class DimensionProvider {
|
|
|
21675
21675
|
this.stores[t].drop();
|
|
21676
21676
|
// after we done with drop trigger viewport recalculaction
|
|
21677
21677
|
this.viewports.stores[t].setOriginalSizes(this.stores[t].store.get('originItemSize'));
|
|
21678
|
-
this.
|
|
21678
|
+
this.setItemCount(count, t);
|
|
21679
21679
|
}
|
|
21680
21680
|
setDimensionSize(type, sizes) {
|
|
21681
21681
|
this.stores[type].setDimensionSize(sizes);
|
|
21682
21682
|
this.viewports.stores[type].setViewPortDimension(sizes);
|
|
21683
21683
|
}
|
|
21684
|
-
|
|
21685
|
-
this.viewports.stores[type].setViewport({ realCount }
|
|
21684
|
+
setItemCount(realCount, type) {
|
|
21685
|
+
this.viewports.stores[type].setViewport({ realCount });
|
|
21686
21686
|
this.stores[type].setStore({ count: realCount });
|
|
21687
21687
|
}
|
|
21688
21688
|
setTrimmed(trimmed, type) {
|
|
@@ -21696,7 +21696,7 @@ class DimensionProvider {
|
|
|
21696
21696
|
* @param type - dimension type
|
|
21697
21697
|
*/
|
|
21698
21698
|
setData(itemCount, type, noVirtual = false) {
|
|
21699
|
-
this.
|
|
21699
|
+
this.setItemCount(itemCount, type);
|
|
21700
21700
|
if (noVirtual) {
|
|
21701
21701
|
this.setNoVirtual(type);
|
|
21702
21702
|
}
|
|
@@ -21704,7 +21704,7 @@ class DimensionProvider {
|
|
|
21704
21704
|
}
|
|
21705
21705
|
setNoVirtual(type) {
|
|
21706
21706
|
const dimension = this.stores[type].getCurrentState();
|
|
21707
|
-
this.viewports.stores[type].setViewport({ virtualSize: dimension.realSize }
|
|
21707
|
+
this.viewports.stores[type].setViewport({ virtualSize: dimension.realSize });
|
|
21708
21708
|
}
|
|
21709
21709
|
drop() {
|
|
21710
21710
|
for (let type of columnTypes) {
|
|
@@ -21724,10 +21724,7 @@ class DimensionProvider {
|
|
|
21724
21724
|
return { y, x };
|
|
21725
21725
|
}
|
|
21726
21726
|
setNewColumns(type, newLength, sizes, noVirtual = false) {
|
|
21727
|
-
|
|
21728
|
-
// we need this because of if we apply pinned columns new size will arise
|
|
21729
|
-
this.viewports.stores[type].setViewport({ virtualSize: 0 }, type);
|
|
21730
|
-
this.setRealSize(newLength, type);
|
|
21727
|
+
this.setItemCount(newLength, type);
|
|
21731
21728
|
this.setDimensionSize(type, sizes);
|
|
21732
21729
|
if (noVirtual) {
|
|
21733
21730
|
this.setNoVirtual(type);
|
|
@@ -21966,6 +21963,8 @@ class ViewportStore {
|
|
|
21966
21963
|
constructor(type) {
|
|
21967
21964
|
this.store = createStore(initialState(type));
|
|
21968
21965
|
this.store.onChange('realCount', () => this.clearItems());
|
|
21966
|
+
// drop items on virtual size change, require a new item set
|
|
21967
|
+
this.store.onChange('virtualSize', () => this.setViewport({ items: [] }));
|
|
21969
21968
|
}
|
|
21970
21969
|
/**
|
|
21971
21970
|
* Render viewport based on coordinate
|
|
@@ -22089,7 +22088,7 @@ class ViewportStore {
|
|
|
22089
22088
|
end: this.store.get('end'),
|
|
22090
22089
|
};
|
|
22091
22090
|
}
|
|
22092
|
-
setViewport(data
|
|
22091
|
+
setViewport(data) {
|
|
22093
22092
|
setStore(this.store, data);
|
|
22094
22093
|
}
|
|
22095
22094
|
clearItems() {
|
|
@@ -22105,7 +22104,7 @@ class ViewportProvider {
|
|
|
22105
22104
|
}, {});
|
|
22106
22105
|
}
|
|
22107
22106
|
setViewport(type, data) {
|
|
22108
|
-
this.stores[type].setViewport(data
|
|
22107
|
+
this.stores[type].setViewport(data);
|
|
22109
22108
|
}
|
|
22110
22109
|
}
|
|
22111
22110
|
|
|
@@ -28209,7 +28208,7 @@ const RevogrRowHeaders = class {
|
|
|
28209
28208
|
itemIndex: 0,
|
|
28210
28209
|
},
|
|
28211
28210
|
],
|
|
28212
|
-
}
|
|
28211
|
+
});
|
|
28213
28212
|
const parent = `${this.uiid}-rowHeaders`;
|
|
28214
28213
|
const viewportScroll = {
|
|
28215
28214
|
[UUID]: parent,
|
|
@@ -28657,9 +28656,7 @@ const RevogrViewportScroll = class {
|
|
|
28657
28656
|
});
|
|
28658
28657
|
}
|
|
28659
28658
|
componentDidLoad() {
|
|
28660
|
-
|
|
28661
|
-
* Track horizontal viewport resize
|
|
28662
|
-
*/
|
|
28659
|
+
// track horizontal viewport resize
|
|
28663
28660
|
this.resizeService = new GridResizeService(this.horizontalScroll, {
|
|
28664
28661
|
resize: entries => {
|
|
28665
28662
|
var _a, _b;
|
|
@@ -89,9 +89,7 @@ export class RevogrViewportScroll {
|
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
91
|
componentDidLoad() {
|
|
92
|
-
|
|
93
|
-
* Track horizontal viewport resize
|
|
94
|
-
*/
|
|
92
|
+
// track horizontal viewport resize
|
|
95
93
|
this.resizeService = new GridResizeService(this.horizontalScroll, {
|
|
96
94
|
resize: entries => {
|
|
97
95
|
var _a, _b;
|
|
@@ -15,7 +15,7 @@ export default class DimensionProvider {
|
|
|
15
15
|
constructor(viewports: ViewportProvider, config: DimensionConfig);
|
|
16
16
|
clearSize(t: RevoGrid.MultiDimensionType, count: number): void;
|
|
17
17
|
setDimensionSize(type: RevoGrid.MultiDimensionType, sizes: RevoGrid.ViewSettingSizeProp): void;
|
|
18
|
-
|
|
18
|
+
setItemCount(realCount: number, type: RevoGrid.MultiDimensionType): void;
|
|
19
19
|
setTrimmed(trimmed: Partial<Trimmed>, type: RevoGrid.MultiDimensionType): void;
|
|
20
20
|
/**
|
|
21
21
|
* Sets dimension data and view port coordinate
|
|
@@ -22,14 +22,14 @@ export default class DimensionProvider {
|
|
|
22
22
|
this.stores[t].drop();
|
|
23
23
|
// after we done with drop trigger viewport recalculaction
|
|
24
24
|
this.viewports.stores[t].setOriginalSizes(this.stores[t].store.get('originItemSize'));
|
|
25
|
-
this.
|
|
25
|
+
this.setItemCount(count, t);
|
|
26
26
|
}
|
|
27
27
|
setDimensionSize(type, sizes) {
|
|
28
28
|
this.stores[type].setDimensionSize(sizes);
|
|
29
29
|
this.viewports.stores[type].setViewPortDimension(sizes);
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
this.viewports.stores[type].setViewport({ realCount }
|
|
31
|
+
setItemCount(realCount, type) {
|
|
32
|
+
this.viewports.stores[type].setViewport({ realCount });
|
|
33
33
|
this.stores[type].setStore({ count: realCount });
|
|
34
34
|
}
|
|
35
35
|
setTrimmed(trimmed, type) {
|
|
@@ -43,7 +43,7 @@ export default class DimensionProvider {
|
|
|
43
43
|
* @param type - dimension type
|
|
44
44
|
*/
|
|
45
45
|
setData(itemCount, type, noVirtual = false) {
|
|
46
|
-
this.
|
|
46
|
+
this.setItemCount(itemCount, type);
|
|
47
47
|
if (noVirtual) {
|
|
48
48
|
this.setNoVirtual(type);
|
|
49
49
|
}
|
|
@@ -51,7 +51,7 @@ export default class DimensionProvider {
|
|
|
51
51
|
}
|
|
52
52
|
setNoVirtual(type) {
|
|
53
53
|
const dimension = this.stores[type].getCurrentState();
|
|
54
|
-
this.viewports.stores[type].setViewport({ virtualSize: dimension.realSize }
|
|
54
|
+
this.viewports.stores[type].setViewport({ virtualSize: dimension.realSize });
|
|
55
55
|
}
|
|
56
56
|
drop() {
|
|
57
57
|
for (let type of columnTypes) {
|
|
@@ -71,10 +71,7 @@ export default class DimensionProvider {
|
|
|
71
71
|
return { y, x };
|
|
72
72
|
}
|
|
73
73
|
setNewColumns(type, newLength, sizes, noVirtual = false) {
|
|
74
|
-
|
|
75
|
-
// we need this because of if we apply pinned columns new size will arise
|
|
76
|
-
this.viewports.stores[type].setViewport({ virtualSize: 0 }, type);
|
|
77
|
-
this.setRealSize(newLength, type);
|
|
74
|
+
this.setItemCount(newLength, type);
|
|
78
75
|
this.setDimensionSize(type, sizes);
|
|
79
76
|
if (noVirtual) {
|
|
80
77
|
this.setNoVirtual(type);
|
|
@@ -22,6 +22,6 @@ export default class ViewportStore {
|
|
|
22
22
|
*/
|
|
23
23
|
setOriginalSizes(size: number): void;
|
|
24
24
|
getItems(): Pick<RevoGrid.ViewportStateItems, 'items' | 'start' | 'end'>;
|
|
25
|
-
setViewport(data: Partial<RevoGrid.ViewportState
|
|
25
|
+
setViewport(data: Partial<RevoGrid.ViewportState>): void;
|
|
26
26
|
clearItems(): void;
|
|
27
27
|
}
|
|
@@ -29,6 +29,8 @@ export default class ViewportStore {
|
|
|
29
29
|
constructor(type) {
|
|
30
30
|
this.store = createStore(initialState(type));
|
|
31
31
|
this.store.onChange('realCount', () => this.clearItems());
|
|
32
|
+
// drop items on virtual size change, require a new item set
|
|
33
|
+
this.store.onChange('virtualSize', () => this.setViewport({ items: [] }));
|
|
32
34
|
}
|
|
33
35
|
/**
|
|
34
36
|
* Render viewport based on coordinate
|
|
@@ -152,7 +154,7 @@ export default class ViewportStore {
|
|
|
152
154
|
end: this.store.get('end'),
|
|
153
155
|
};
|
|
154
156
|
}
|
|
155
|
-
setViewport(data
|
|
157
|
+
setViewport(data) {
|
|
156
158
|
setStore(this.store, data);
|
|
157
159
|
}
|
|
158
160
|
clearItems() {
|
|
@@ -21671,14 +21671,14 @@ class DimensionProvider {
|
|
|
21671
21671
|
this.stores[t].drop();
|
|
21672
21672
|
// after we done with drop trigger viewport recalculaction
|
|
21673
21673
|
this.viewports.stores[t].setOriginalSizes(this.stores[t].store.get('originItemSize'));
|
|
21674
|
-
this.
|
|
21674
|
+
this.setItemCount(count, t);
|
|
21675
21675
|
}
|
|
21676
21676
|
setDimensionSize(type, sizes) {
|
|
21677
21677
|
this.stores[type].setDimensionSize(sizes);
|
|
21678
21678
|
this.viewports.stores[type].setViewPortDimension(sizes);
|
|
21679
21679
|
}
|
|
21680
|
-
|
|
21681
|
-
this.viewports.stores[type].setViewport({ realCount }
|
|
21680
|
+
setItemCount(realCount, type) {
|
|
21681
|
+
this.viewports.stores[type].setViewport({ realCount });
|
|
21682
21682
|
this.stores[type].setStore({ count: realCount });
|
|
21683
21683
|
}
|
|
21684
21684
|
setTrimmed(trimmed, type) {
|
|
@@ -21692,7 +21692,7 @@ class DimensionProvider {
|
|
|
21692
21692
|
* @param type - dimension type
|
|
21693
21693
|
*/
|
|
21694
21694
|
setData(itemCount, type, noVirtual = false) {
|
|
21695
|
-
this.
|
|
21695
|
+
this.setItemCount(itemCount, type);
|
|
21696
21696
|
if (noVirtual) {
|
|
21697
21697
|
this.setNoVirtual(type);
|
|
21698
21698
|
}
|
|
@@ -21700,7 +21700,7 @@ class DimensionProvider {
|
|
|
21700
21700
|
}
|
|
21701
21701
|
setNoVirtual(type) {
|
|
21702
21702
|
const dimension = this.stores[type].getCurrentState();
|
|
21703
|
-
this.viewports.stores[type].setViewport({ virtualSize: dimension.realSize }
|
|
21703
|
+
this.viewports.stores[type].setViewport({ virtualSize: dimension.realSize });
|
|
21704
21704
|
}
|
|
21705
21705
|
drop() {
|
|
21706
21706
|
for (let type of columnTypes) {
|
|
@@ -21720,10 +21720,7 @@ class DimensionProvider {
|
|
|
21720
21720
|
return { y, x };
|
|
21721
21721
|
}
|
|
21722
21722
|
setNewColumns(type, newLength, sizes, noVirtual = false) {
|
|
21723
|
-
|
|
21724
|
-
// we need this because of if we apply pinned columns new size will arise
|
|
21725
|
-
this.viewports.stores[type].setViewport({ virtualSize: 0 }, type);
|
|
21726
|
-
this.setRealSize(newLength, type);
|
|
21723
|
+
this.setItemCount(newLength, type);
|
|
21727
21724
|
this.setDimensionSize(type, sizes);
|
|
21728
21725
|
if (noVirtual) {
|
|
21729
21726
|
this.setNoVirtual(type);
|
|
@@ -21962,6 +21959,8 @@ class ViewportStore {
|
|
|
21962
21959
|
constructor(type) {
|
|
21963
21960
|
this.store = createStore(initialState(type));
|
|
21964
21961
|
this.store.onChange('realCount', () => this.clearItems());
|
|
21962
|
+
// drop items on virtual size change, require a new item set
|
|
21963
|
+
this.store.onChange('virtualSize', () => this.setViewport({ items: [] }));
|
|
21965
21964
|
}
|
|
21966
21965
|
/**
|
|
21967
21966
|
* Render viewport based on coordinate
|
|
@@ -22085,7 +22084,7 @@ class ViewportStore {
|
|
|
22085
22084
|
end: this.store.get('end'),
|
|
22086
22085
|
};
|
|
22087
22086
|
}
|
|
22088
|
-
setViewport(data
|
|
22087
|
+
setViewport(data) {
|
|
22089
22088
|
setStore(this.store, data);
|
|
22090
22089
|
}
|
|
22091
22090
|
clearItems() {
|
|
@@ -22101,7 +22100,7 @@ class ViewportProvider {
|
|
|
22101
22100
|
}, {});
|
|
22102
22101
|
}
|
|
22103
22102
|
setViewport(type, data) {
|
|
22104
|
-
this.stores[type].setViewport(data
|
|
22103
|
+
this.stores[type].setViewport(data);
|
|
22105
22104
|
}
|
|
22106
22105
|
}
|
|
22107
22106
|
|
|
@@ -28205,7 +28204,7 @@ const RevogrRowHeaders = class {
|
|
|
28205
28204
|
itemIndex: 0,
|
|
28206
28205
|
},
|
|
28207
28206
|
],
|
|
28208
|
-
}
|
|
28207
|
+
});
|
|
28209
28208
|
const parent = `${this.uiid}-rowHeaders`;
|
|
28210
28209
|
const viewportScroll = {
|
|
28211
28210
|
[UUID]: parent,
|
|
@@ -28653,9 +28652,7 @@ const RevogrViewportScroll = class {
|
|
|
28653
28652
|
});
|
|
28654
28653
|
}
|
|
28655
28654
|
componentDidLoad() {
|
|
28656
|
-
|
|
28657
|
-
* Track horizontal viewport resize
|
|
28658
|
-
*/
|
|
28655
|
+
// track horizontal viewport resize
|
|
28659
28656
|
this.resizeService = new GridResizeService(this.horizontalScroll, {
|
|
28660
28657
|
resize: entries => {
|
|
28661
28658
|
var _a, _b;
|