@revolist/revogrid 4.14.7 → 4.14.8

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.
Files changed (56) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/revo-grid.cjs.entry.js +3 -1
  3. package/dist/cjs/revo-grid.cjs.entry.js.map +1 -1
  4. package/dist/cjs/revo-grid.cjs.js +1 -1
  5. package/dist/cjs/revogr-attribution_7.cjs.entry.js +27 -48
  6. package/dist/cjs/revogr-attribution_7.cjs.entry.js.map +1 -1
  7. package/dist/cjs/revogr-data_4.cjs.entry.js +28 -12
  8. package/dist/cjs/revogr-data_4.cjs.entry.js.map +1 -1
  9. package/dist/cjs/{throttle-250327e5.js → throttle-c7ae5154.js} +46 -7
  10. package/dist/cjs/throttle-c7ae5154.js.map +1 -0
  11. package/dist/collection/components/revoGrid/revo-grid.js +3 -1
  12. package/dist/collection/components/revoGrid/revo-grid.js.map +1 -1
  13. package/dist/collection/components/revoGrid/viewport.resize.service.js +4 -1
  14. package/dist/collection/components/revoGrid/viewport.resize.service.js.map +1 -1
  15. package/dist/collection/components/scroll/revogr-viewport-scroll.js +23 -10
  16. package/dist/collection/components/scroll/revogr-viewport-scroll.js.map +1 -1
  17. package/dist/collection/components/scrollable/revogr-scroll-virtual.js +63 -83
  18. package/dist/collection/components/scrollable/revogr-scroll-virtual.js.map +1 -1
  19. package/dist/collection/services/local.scroll.timer.js +45 -6
  20. package/dist/collection/services/local.scroll.timer.js.map +1 -1
  21. package/dist/esm/loader.js +1 -1
  22. package/dist/esm/revo-grid.entry.js +3 -1
  23. package/dist/esm/revo-grid.entry.js.map +1 -1
  24. package/dist/esm/revo-grid.js +1 -1
  25. package/dist/esm/revogr-attribution_7.entry.js +27 -48
  26. package/dist/esm/revogr-attribution_7.entry.js.map +1 -1
  27. package/dist/esm/revogr-data_4.entry.js +28 -12
  28. package/dist/esm/revogr-data_4.entry.js.map +1 -1
  29. package/dist/{revo-grid/throttle-9dcf4e1f.js → esm/throttle-7c83ca69.js} +46 -7
  30. package/dist/esm/throttle-7c83ca69.js.map +1 -0
  31. package/dist/revo-grid/revo-grid.entry.js +3 -1
  32. package/dist/revo-grid/revo-grid.entry.js.map +1 -1
  33. package/dist/revo-grid/revo-grid.esm.js +1 -1
  34. package/dist/revo-grid/revogr-attribution_7.entry.js +27 -48
  35. package/dist/revo-grid/revogr-attribution_7.entry.js.map +1 -1
  36. package/dist/revo-grid/revogr-data_4.entry.js +28 -12
  37. package/dist/revo-grid/revogr-data_4.entry.js.map +1 -1
  38. package/dist/{esm/throttle-9dcf4e1f.js → revo-grid/throttle-7c83ca69.js} +46 -7
  39. package/dist/revo-grid/throttle-7c83ca69.js.map +1 -0
  40. package/dist/types/components/scrollable/revogr-scroll-virtual.d.ts +9 -8
  41. package/dist/types/components.d.ts +17 -9
  42. package/dist/types/services/local.scroll.timer.d.ts +7 -1
  43. package/hydrate/index.js +104 -67
  44. package/hydrate/index.mjs +104 -67
  45. package/package.json +1 -1
  46. package/standalone/local.scroll.timer.js +45 -6
  47. package/standalone/local.scroll.timer.js.map +1 -1
  48. package/standalone/revo-grid.js +3 -1
  49. package/standalone/revo-grid.js.map +1 -1
  50. package/standalone/revogr-scroll-virtual2.js +29 -49
  51. package/standalone/revogr-scroll-virtual2.js.map +1 -1
  52. package/standalone/revogr-viewport-scroll2.js +27 -11
  53. package/standalone/revogr-viewport-scroll2.js.map +1 -1
  54. package/dist/cjs/throttle-250327e5.js.map +0 -1
  55. package/dist/esm/throttle-9dcf4e1f.js.map +0 -1
  56. package/dist/revo-grid/throttle-9dcf4e1f.js.map +0 -1
@@ -1,6 +1,5 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
- import type { DimensionType, ViewportState, DimensionSettingsState, ViewPortScrollEvent } from "../../types/index";
3
- import { type Observable } from '../../utils';
2
+ import type { DimensionType, ViewPortScrollEvent } from "../../types/index";
4
3
  /**
5
4
  * Virtual scroll component
6
5
  */
@@ -10,13 +9,17 @@ export declare class RevogrScrollVirtual {
10
9
  */
11
10
  dimension: DimensionType;
12
11
  /**
13
- * Viewport
12
+ * Dimensions
14
13
  */
15
- viewportStore: Observable<ViewportState>;
14
+ realSize: number;
16
15
  /**
17
- * Dimensions
16
+ * Virtual size
17
+ */
18
+ virtualSize: number;
19
+ /**
20
+ * Client size
18
21
  */
19
- dimensionStore: Observable<DimensionSettingsState>;
22
+ clientSize: number;
20
23
  /**
21
24
  * Scroll event
22
25
  */
@@ -31,8 +34,6 @@ export declare class RevogrScrollVirtual {
31
34
  * Update if `delta` exists in case we don't know current position or if it's external change
32
35
  */
33
36
  changeScroll(e: ViewPortScrollEvent): Promise<ViewPortScrollEvent>;
34
- set size(s: number);
35
- get size(): number;
36
37
  connectedCallback(): void;
37
38
  disconnectedCallback(): void;
38
39
  componentWillLoad(): void;
@@ -674,6 +674,10 @@ export namespace Components {
674
674
  * Update if `delta` exists in case we don't know current position or if it's external change
675
675
  */
676
676
  "changeScroll": (e: ViewPortScrollEvent) => Promise<ViewPortScrollEvent>;
677
+ /**
678
+ * Client size
679
+ */
680
+ "clientSize": number;
677
681
  /**
678
682
  * Scroll dimension (`X` - `rgCol` or `Y` - `rgRow`)
679
683
  */
@@ -681,12 +685,12 @@ export namespace Components {
681
685
  /**
682
686
  * Dimensions
683
687
  */
684
- "dimensionStore": Observable<DimensionSettingsState>;
688
+ "realSize": number;
685
689
  "setScroll": (e: ViewPortScrollEvent) => Promise<void>;
686
690
  /**
687
- * Viewport
691
+ * Virtual size
688
692
  */
689
- "viewportStore": Observable<ViewportState>;
693
+ "virtualSize": number;
690
694
  }
691
695
  /**
692
696
  * Temporary range selection component. Shows temporary range selection.
@@ -2250,21 +2254,25 @@ declare namespace LocalJSX {
2250
2254
  */
2251
2255
  interface RevogrScrollVirtual {
2252
2256
  /**
2253
- * Scroll dimension (`X` - `rgCol` or `Y` - `rgRow`)
2257
+ * Client size
2254
2258
  */
2255
- "dimension"?: DimensionType;
2259
+ "clientSize": number;
2256
2260
  /**
2257
- * Dimensions
2261
+ * Scroll dimension (`X` - `rgCol` or `Y` - `rgRow`)
2258
2262
  */
2259
- "dimensionStore": Observable<DimensionSettingsState>;
2263
+ "dimension"?: DimensionType;
2260
2264
  /**
2261
2265
  * Scroll event
2262
2266
  */
2263
2267
  "onScrollvirtual"?: (event: RevogrScrollVirtualCustomEvent<ViewPortScrollEvent>) => void;
2264
2268
  /**
2265
- * Viewport
2269
+ * Dimensions
2270
+ */
2271
+ "realSize": number;
2272
+ /**
2273
+ * Virtual size
2266
2274
  */
2267
- "viewportStore": Observable<ViewportState>;
2275
+ "virtualSize": number;
2268
2276
  }
2269
2277
  /**
2270
2278
  * Temporary range selection component. Shows temporary range selection.
@@ -19,8 +19,14 @@ export declare class LocalScrollTimer {
19
19
  * Remember last mw event time
20
20
  */
21
21
  latestScrollUpdate(dimension: DimensionType): void;
22
+ isReady(type: DimensionType, coordinate: number): boolean;
23
+ private verifyChange;
22
24
  /**
23
25
  * Check if scroll is ready to accept new value
26
+ * this is an edge case for scroll events
27
+ * when we need to apply scroll after throttling
24
28
  */
25
- isReady(type: DimensionType, coordinate: number): boolean;
29
+ private lastScrollUpdateCallbacks;
30
+ private clearLastScrollUpdate;
31
+ throttleLastScrollUpdate(type: DimensionType, coordinate: number, lastScrollUpdate: () => void): void;
26
32
  }
package/hydrate/index.js CHANGED
@@ -15191,12 +15191,14 @@ class RevoGridComponent {
15191
15191
  const typeCol = 'rgCol';
15192
15192
  const viewports = this.viewportProvider.stores;
15193
15193
  const dimensions = this.dimensionProvider.stores;
15194
+ const verticalScroll = (hAsync("revogr-scroll-virtual", { class: "vertical", dimension: typeRow, clientSize: viewports[typeRow].store.get('clientSize'), virtualSize: viewports[typeRow].store.get('virtualSize'), realSize: dimensions[typeRow].store.get('realSize'), ref: el => this.scrollingService.registerElement(el, 'rowScroll'), onScrollvirtual: e => this.scrollingService.proxyScroll(e.detail) }));
15195
+ const horizontalScroll = (hAsync("revogr-scroll-virtual", { class: "horizontal", dimension: typeCol, clientSize: viewports[typeCol].store.get('clientSize'), virtualSize: viewports[typeCol].store.get('virtualSize'), realSize: dimensions[typeCol].store.get('realSize'), ref: el => this.scrollingService.registerElement(el, 'colScroll'), onScrollvirtual: e => this.scrollingService.proxyScroll(e.detail) }));
15194
15196
  return (hAsync(Host, null, this.hideAttribution ? null : (hAsync("revogr-attribution", { class: "attribution" })), hAsync("slot", { name: "header" }), hAsync("div", { class: "main-viewport", onClick: (e) => {
15195
15197
  var _a;
15196
15198
  if (e.currentTarget === e.target) {
15197
15199
  (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.clearEdit();
15198
15200
  }
15199
- } }, hAsync("div", { class: "viewports" }, hAsync("slot", { name: "viewport" }), viewportSections, hAsync("revogr-scroll-virtual", { class: "vertical", dimension: typeRow, viewportStore: viewports[typeRow].store, dimensionStore: dimensions[typeRow].store, ref: el => this.scrollingService.registerElement(el, 'rowScroll'), onScrollvirtual: e => this.scrollingService.proxyScroll(e.detail) }), hAsync(OrderRenderer, { ref: e => (this.orderService = e) }))), hAsync("revogr-scroll-virtual", { class: "horizontal", dimension: typeCol, viewportStore: viewports[typeCol].store, dimensionStore: dimensions[typeCol].store, ref: el => this.scrollingService.registerElement(el, 'colScroll'), onScrollvirtual: e => this.scrollingService.proxyScroll(e.detail) }), hAsync("revogr-extra", { ref: el => (this.extraService = el), nodes: this.extraElements }), hAsync("slot", { name: "footer" })));
15201
+ } }, hAsync("div", { class: "viewports" }, hAsync("slot", { name: "viewport" }), viewportSections, verticalScroll, hAsync(OrderRenderer, { ref: e => (this.orderService = e) }))), horizontalScroll, hAsync("revogr-extra", { ref: el => (this.extraService = el), nodes: this.extraElements }), hAsync("slot", { name: "footer" })));
15200
15202
  }
15201
15203
  disconnectedCallback() {
15202
15204
  // Remove all plugins, to avoid memory leaks
@@ -16542,6 +16544,12 @@ class LocalScrollTimer {
16542
16544
  rgCol: 0,
16543
16545
  rgRow: 0,
16544
16546
  };
16547
+ /**
16548
+ * Check if scroll is ready to accept new value
16549
+ * this is an edge case for scroll events
16550
+ * when we need to apply scroll after throttling
16551
+ */
16552
+ this.lastScrollUpdateCallbacks = {};
16545
16553
  }
16546
16554
  setCoordinate(e) {
16547
16555
  this.lastKnownScrollCoordinate[e.dimension] = e.coordinate;
@@ -16552,14 +16560,47 @@ class LocalScrollTimer {
16552
16560
  latestScrollUpdate(dimension) {
16553
16561
  this.mouseWheelScrollTimestamp[dimension] = new Date().getTime();
16554
16562
  }
16555
- /**
16556
- * Check if scroll is ready to accept new value
16557
- */
16558
16563
  isReady(type, coordinate) {
16559
- const change = new Date().getTime() - this.mouseWheelScrollTimestamp[type];
16564
+ // if there is a callback, clear it
16565
+ if (this.lastScrollUpdateCallbacks[type]) {
16566
+ this.clearLastScrollUpdate(type);
16567
+ }
16560
16568
  // apply after throttling
16561
- return (change > this.scrollThrottling &&
16562
- coordinate !== this.lastKnownScrollCoordinate[type]);
16569
+ return this.verifyChange(type, coordinate);
16570
+ }
16571
+ verifyChange(type, coordinate) {
16572
+ const now = new Date().getTime();
16573
+ const change = now - this.mouseWheelScrollTimestamp[type];
16574
+ return change > this.scrollThrottling &&
16575
+ coordinate !== this.lastKnownScrollCoordinate[type];
16576
+ }
16577
+ clearLastScrollUpdate(type) {
16578
+ var _a, _b;
16579
+ clearTimeout((_b = (_a = this.lastScrollUpdateCallbacks[type]) === null || _a === void 0 ? void 0 : _a.timeout) !== null && _b !== void 0 ? _b : 0);
16580
+ delete this.lastScrollUpdateCallbacks[type];
16581
+ }
16582
+ throttleLastScrollUpdate(type, coordinate, lastScrollUpdate) {
16583
+ // if scrollThrottling is set
16584
+ // we need to throttle the last scroll event
16585
+ if (this.scrollThrottling) {
16586
+ this.clearLastScrollUpdate(type);
16587
+ // save lastScrollUpdate callback
16588
+ const callback = this.lastScrollUpdateCallbacks[type] = {
16589
+ callback: lastScrollUpdate,
16590
+ timestamp: new Date().getTime(),
16591
+ coordinate,
16592
+ timeout: 0,
16593
+ };
16594
+ callback.timeout = setTimeout(() => {
16595
+ // clear timeout
16596
+ this.clearLastScrollUpdate(type);
16597
+ // if scrollThrottling is set, and the last scroll event happened before the timeout started
16598
+ // we need to throttle the last scroll event
16599
+ if (this.mouseWheelScrollTimestamp[type] < callback.timestamp && this.verifyChange(type, callback.coordinate)) {
16600
+ callback.callback();
16601
+ }
16602
+ }, this.scrollThrottling + 50);
16603
+ }
16563
16604
  }
16564
16605
  }
16565
16606
 
@@ -16575,8 +16616,9 @@ class RevogrScrollVirtual {
16575
16616
  this.scrollVirtual = createEvent(this, "scrollvirtual", 7);
16576
16617
  this.scrollSize = 0;
16577
16618
  this.dimension = 'rgRow';
16578
- this.viewportStore = undefined;
16579
- this.dimensionStore = undefined;
16619
+ this.realSize = undefined;
16620
+ this.virtualSize = undefined;
16621
+ this.clientSize = undefined;
16580
16622
  }
16581
16623
  async setScroll(e) {
16582
16624
  var _a;
@@ -16588,8 +16630,8 @@ class RevogrScrollVirtual {
16588
16630
  if (e.coordinate) {
16589
16631
  this.autohideScrollPlugin.checkScroll({
16590
16632
  scrollSize: this.scrollSize,
16591
- contentSize: this.dimensionStore.get('realSize'),
16592
- virtualSize: this.viewportStore.get('virtualSize'),
16633
+ contentSize: this.realSize,
16634
+ virtualSize: this.virtualSize,
16593
16635
  });
16594
16636
  }
16595
16637
  }
@@ -16610,20 +16652,6 @@ class RevogrScrollVirtual {
16610
16652
  }
16611
16653
  return e;
16612
16654
  }
16613
- set size(s) {
16614
- this.autohideScrollPlugin.setScrollSize(s);
16615
- if (this.dimension === 'rgRow') {
16616
- this.element.style.minWidth = `${s}px`;
16617
- return;
16618
- }
16619
- this.element.style.minHeight = `${s}px`;
16620
- }
16621
- get size() {
16622
- if (this.dimension === 'rgRow') {
16623
- return this.element.clientHeight;
16624
- }
16625
- return this.element.clientWidth;
16626
- }
16627
16655
  connectedCallback() {
16628
16656
  this.autohideScrollPlugin = new AutohideScrollPlugin(this.element);
16629
16657
  this.localScrollTimer = new LocalScrollTimer('ontouchstart' in document.documentElement ? 0 : 10);
@@ -16644,37 +16672,23 @@ class RevogrScrollVirtual {
16644
16672
  this.scrollSize = getScrollbarSize(document);
16645
16673
  }
16646
16674
  componentDidRender() {
16647
- const type = this.dimension === 'rgRow' ? 'scrollHeight' : 'scrollWidth';
16648
- // Get scrollbar size once during component initialization
16649
- const scrollbarSize = this.scrollSize;
16650
- // Calculate if content exceeds viewport size
16651
- // Add scrollbar size to the comparison to account for other dimension's scrollbar
16652
- const hasScroll = this.element[type] > this.size + scrollbarSize;
16653
- // Set scroll size based on whether scroll is needed
16654
- this.size = hasScroll ? this.scrollSize : 0;
16655
- let additionalScrollbarSize = 0;
16675
+ let scrollSize = 0;
16656
16676
  if (this.dimension === 'rgRow') {
16657
- additionalScrollbarSize =
16658
- this.element.scrollWidth > this.element.clientWidth
16659
- ? scrollbarSize
16660
- : 0;
16677
+ scrollSize = this.element.scrollHeight > this.element.clientHeight ? this.scrollSize : 0;
16678
+ this.element.style.minWidth = `${scrollSize}px`;
16661
16679
  }
16662
16680
  else {
16663
- additionalScrollbarSize =
16664
- this.element.scrollHeight > this.element.clientHeight
16665
- ? scrollbarSize
16666
- : 0;
16681
+ scrollSize = this.element.scrollWidth > this.element.clientWidth ? this.scrollSize : 0;
16682
+ this.element.style.minHeight = `${scrollSize}px`;
16667
16683
  }
16668
- const clientSize = this.size + additionalScrollbarSize;
16684
+ this.autohideScrollPlugin.setScrollSize(scrollSize);
16669
16685
  this.localScrollService.setParams({
16670
- contentSize: this.dimensionStore.get('realSize'),
16671
- // Add scrollbar size to clientSize if other dimension has scroll
16672
- clientSize,
16673
- virtualSize: this.viewportStore.get('clientSize'),
16686
+ contentSize: this.realSize,
16687
+ clientSize: this.dimension === 'rgRow' ? this.element.clientHeight : this.element.clientWidth,
16688
+ virtualSize: this.clientSize,
16674
16689
  }, this.dimension);
16675
16690
  }
16676
16691
  onScroll(e) {
16677
- var _a;
16678
16692
  if (!(e.target instanceof Element)) {
16679
16693
  return;
16680
16694
  }
@@ -16683,16 +16697,22 @@ class RevogrScrollVirtual {
16683
16697
  if (this.dimension === 'rgRow') {
16684
16698
  type = 'scrollTop';
16685
16699
  }
16686
- // apply after throttling
16687
- if (this.localScrollTimer.isReady(this.dimension, target[type] || 0)) {
16700
+ const setScroll = () => {
16701
+ var _a;
16688
16702
  (_a = this.localScrollService) === null || _a === void 0 ? void 0 : _a.scroll(target[type] || 0, this.dimension);
16703
+ };
16704
+ // apply after throttling
16705
+ if (this.localScrollTimer.isReady(this.dimension, target[type])) {
16706
+ setScroll();
16707
+ }
16708
+ else {
16709
+ this.localScrollTimer.throttleLastScrollUpdate(this.dimension, target[type] || 0, () => setScroll());
16689
16710
  }
16690
16711
  }
16691
16712
  render() {
16692
- const sizeType = this.dimension === 'rgRow' ? 'height' : 'width';
16693
- const size = getContentSize(this.dimensionStore.get('realSize'), this.size, this.viewportStore.get('clientSize'));
16694
- return (hAsync(Host, { key: '94ccf82880ca9a3b0b1a87e94553f3c6ea6e885a', onScroll: (e) => this.onScroll(e) }, hAsync("div", { key: '3518b4db297114195e4ef9bd3555d08bae08daa9', style: {
16695
- [sizeType]: `${size}px`,
16713
+ const size = getContentSize(this.realSize, this.dimension === 'rgRow' ? this.element.clientHeight : this.element.clientWidth, this.clientSize);
16714
+ return (hAsync(Host, { key: '57f81ec9deb2395e96b283338c03b9ad44f1e929', onScroll: (e) => this.onScroll(e) }, hAsync("div", { key: '1a8c869adab53b362c351dae8d53664f33c4212c', style: {
16715
+ [this.dimension === 'rgRow' ? 'height' : 'width']: `${size}px`,
16696
16716
  } })));
16697
16717
  }
16698
16718
  get element() { return getElement(this); }
@@ -16702,8 +16722,9 @@ class RevogrScrollVirtual {
16702
16722
  "$tagName$": "revogr-scroll-virtual",
16703
16723
  "$members$": {
16704
16724
  "dimension": [1],
16705
- "viewportStore": [16],
16706
- "dimensionStore": [16],
16725
+ "realSize": [2, "real-size"],
16726
+ "virtualSize": [2, "virtual-size"],
16727
+ "clientSize": [2, "client-size"],
16707
16728
  "setScroll": [64],
16708
16729
  "changeScroll": [64]
16709
16730
  },
@@ -16739,7 +16760,10 @@ class GridResizeService {
16739
16760
  };
16740
16761
  (_a = this.resize) === null || _a === void 0 ? void 0 : _a.call(this, entry, this.previousSize);
16741
16762
  this.previousSize = entry;
16742
- }, 10);
16763
+ }, 40, {
16764
+ leading: false,
16765
+ trailing: true,
16766
+ });
16743
16767
  this.init(el);
16744
16768
  }
16745
16769
  async init(el) {
@@ -16870,30 +16894,37 @@ class RevogrViewportScroll {
16870
16894
  this.resizeService = new GridResizeService(this.horizontalScroll, (entry, previousSize) => {
16871
16895
  var _a, _b, _c, _d, _e, _f, _g, _h;
16872
16896
  const els = {};
16897
+ let calculatedHeight = 0;
16873
16898
  if (entry.height !== previousSize.height) {
16874
- let height = entry.height || 0;
16875
- if (height) {
16876
- height -=
16899
+ calculatedHeight = entry.height || 0;
16900
+ if (calculatedHeight) {
16901
+ calculatedHeight -=
16877
16902
  ((_b = (_a = this.header) === null || _a === void 0 ? void 0 : _a.clientHeight) !== null && _b !== void 0 ? _b : 0) +
16878
16903
  ((_d = (_c = this.footer) === null || _c === void 0 ? void 0 : _c.clientHeight) !== null && _d !== void 0 ? _d : 0);
16879
16904
  }
16880
16905
  els.rgRow = {
16881
- size: height,
16906
+ size: calculatedHeight,
16882
16907
  contentSize: this.contentHeight,
16883
16908
  scroll: (_f = (_e = this.verticalScroll) === null || _e === void 0 ? void 0 : _e.scrollTop) !== null && _f !== void 0 ? _f : 0,
16884
16909
  noScroll: false,
16885
16910
  };
16886
16911
  }
16912
+ let calculatedWidth = 0;
16887
16913
  if (entry.width !== previousSize.width) {
16914
+ calculatedWidth = entry.width || 0;
16888
16915
  els.rgCol = {
16889
- size: entry.width || 0,
16916
+ size: calculatedWidth,
16890
16917
  contentSize: this.contentWidth,
16891
16918
  scroll: this.horizontalScroll.scrollLeft,
16892
16919
  noScroll: this.colType !== 'rgCol',
16893
16920
  };
16894
16921
  }
16895
- for (const [dim, item] of Object.entries(els)) {
16896
- const dimension = dim;
16922
+ // Process changes in order: width first, then height
16923
+ const dimensions = ['rgCol', 'rgRow'];
16924
+ for (const dimension of dimensions) {
16925
+ const item = els[dimension];
16926
+ if (!item)
16927
+ continue;
16897
16928
  this.resizeViewport.emit({
16898
16929
  dimension,
16899
16930
  size: item.size,
@@ -16958,7 +16989,7 @@ class RevogrViewportScroll {
16958
16989
  this.setScrollVisibility('rgCol', this.horizontalScroll.clientWidth, this.contentWidth);
16959
16990
  }
16960
16991
  render() {
16961
- return (hAsync(Host, { key: 'c8c94171231164105fad7a6f53743db615dc123a', onWheel: this.horizontalMouseWheel, onScroll: (e) => this.applyScroll('rgCol', e) }, hAsync("div", { key: 'd33774605170a5ba43e41e3d3133130eeda1a6fb', class: "inner-content-table", style: { width: `${this.contentWidth}px` } }, hAsync("div", { key: '3cf14b0fd2fce937f5f28b205fbd2402d0de3cb4', class: "header-wrapper", ref: e => (this.header = e) }, hAsync("slot", { key: '14ce896ee001c614553744c2e4d8d680bf4e6d15', name: HEADER_SLOT })), hAsync("div", { key: '46b937e0fc75a71f983b739e0c8179c2dc8115ac', class: "vertical-inner", ref: el => (this.verticalScroll = el), onWheel: this.verticalMouseWheel, onScroll: (e) => this.applyScroll('rgRow', e) }, hAsync("div", { key: 'cf775690b0eef973f205659973ea23e376bc64d6', class: "content-wrapper", style: { height: `${this.contentHeight}px` } }, hAsync("slot", { key: '63b50bb02edda40839829e7b54825953d3634906', name: CONTENT_SLOT }))), hAsync("div", { key: 'c28e2f9d0524a8d0adc86d6a7d78b1ce15831edd', class: "footer-wrapper", ref: e => (this.footer = e) }, hAsync("slot", { key: 'bd24b24482d201ad91c279d09f3bcc0f2bc58370', name: FOOTER_SLOT })))));
16992
+ return (hAsync(Host, { key: '08e10c135ea0a9089463ae5d81a4a7dc7f9c028c', onWheel: this.horizontalMouseWheel, onScroll: (e) => this.applyScroll('rgCol', e) }, hAsync("div", { key: '2ff353b190f088a005f0fca3ad3eddf9f6728734', class: "inner-content-table", style: { width: `${this.contentWidth}px` } }, hAsync("div", { key: '17d95d8baa8cef75f2b2373d283948b62b891fb3', class: "header-wrapper", ref: e => (this.header = e) }, hAsync("slot", { key: 'cd8606829aaccbb2edad9a2dbe03600284f0af86', name: HEADER_SLOT })), hAsync("div", { key: '77ffa873bb313a8940ef0032f938ce66e8e83e10', class: "vertical-inner", ref: el => (this.verticalScroll = el), onWheel: this.verticalMouseWheel, onScroll: (e) => this.applyScroll('rgRow', e) }, hAsync("div", { key: 'cbf25a96eb5e71eed34f68ec341a8758e0bf213c', class: "content-wrapper", style: { height: `${this.contentHeight}px` } }, hAsync("slot", { key: '5818ff4be234171f0759fcadf70e0bed6fd74f31', name: CONTENT_SLOT }))), hAsync("div", { key: '7ab569e4451fb381f48cc4e03b103866a47b35b6', class: "footer-wrapper", ref: e => (this.footer = e) }, hAsync("slot", { key: 'ce1860fa42d6661dd78fe1609cf50ed93da0c5f7', name: FOOTER_SLOT })))));
16962
16993
  }
16963
16994
  /**
16964
16995
  * Extra layer for scroll event monitoring, where MouseWheel event is not passing
@@ -16988,10 +17019,16 @@ class RevogrViewportScroll {
16988
17019
  * Applies change on scroll event only if mousewheel event happened some time ago
16989
17020
  */
16990
17021
  applyOnScroll(type, coordinate, outside = false) {
16991
- var _a;
17022
+ const lastScrollUpdate = () => {
17023
+ var _a;
17024
+ (_a = this.localScrollService) === null || _a === void 0 ? void 0 : _a.scroll(coordinate, type, undefined, undefined, outside);
17025
+ };
16992
17026
  // apply after throttling
16993
17027
  if (this.localScrollTimer.isReady(type, coordinate)) {
16994
- (_a = this.localScrollService) === null || _a === void 0 ? void 0 : _a.scroll(coordinate, type, undefined, undefined, outside);
17028
+ lastScrollUpdate();
17029
+ }
17030
+ else {
17031
+ this.localScrollTimer.throttleLastScrollUpdate(type, coordinate, () => lastScrollUpdate());
16995
17032
  }
16996
17033
  }
16997
17034
  /**