@simple-table/angular 3.6.7 → 3.6.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.
@@ -1,7 +1,14 @@
1
1
  export type SectionId = "pinned-left" | "main" | "pinned-right";
2
2
  export type SectionPaneRole = "sticky" | "scrollbar" | "header" | "body";
3
3
  export interface SectionScrollControllerConfig {
4
+ /** Heavy body virtualization. Throttled to every {@link VIRTUALIZATION_THRESHOLD_PX}px. */
4
5
  onMainSectionScrollLeft?: (scrollLeft: number) => void;
6
+ /**
7
+ * Lightweight header re-render, run on every main-section scroll frame (not throttled) so the
8
+ * header tracks the body fluidly during momentum. Re-rendering only the (few) header cells each
9
+ * frame avoids the stepwise "stagger" that throttled header virtualization produces.
10
+ */
11
+ onMainSectionHeaderFrame?: (scrollLeft: number) => void;
5
12
  }
6
13
  /**
7
14
  * Single controller for horizontal scroll sync across all four panes per section:
@@ -18,6 +25,15 @@ export declare class SectionScrollController {
18
25
  private isSyncing;
19
26
  /** Last scrollLeft at which we ran main-section virtualization; used to run heavy ops only every N px. */
20
27
  private lastMainVirtualizationScrollLeft;
28
+ /**
29
+ * True while a touch-driven scroll (including post-release momentum) is in progress on a body
30
+ * pane. While true, we must not write scrollLeft to scroll-container followers (the horizontal
31
+ * scrollbar), because on iOS that cancels the body's inertial momentum. Such followers are
32
+ * reconciled once scrolling settles.
33
+ */
34
+ private isTouchScrolling;
35
+ /** Scroll-idle timer used to detect the end of a touch-driven scroll (incl. momentum). */
36
+ private touchSettleTimeoutId;
21
37
  constructor(config?: SectionScrollControllerConfig);
22
38
  updateConfig(config: Partial<SectionScrollControllerConfig>): void;
23
39
  /**
@@ -45,6 +61,18 @@ export declare class SectionScrollController {
45
61
  */
46
62
  restoreAll(): void;
47
63
  private addScrollListener;
64
+ /**
65
+ * Track touch-driven scrolling on a body pane. While a touch (and its post-release momentum) is
66
+ * active, scroll-container followers (the horizontal scrollbar) are not written, to preserve iOS
67
+ * momentum; they are reconciled when scrolling settles.
68
+ */
69
+ private addTouchTracking;
70
+ /**
71
+ * (Re)arm the scroll-idle timer that marks the end of a touch-driven scroll. When it fires (no
72
+ * scroll for the idle window, i.e. momentum has stopped), reconcile scroll-container followers
73
+ * (the scrollbar) to the final position, which we deliberately skipped during the touch scroll.
74
+ */
75
+ private scheduleTouchSettle;
48
76
  private removeScrollListener;
49
77
  destroy(): void;
50
78
  }
@@ -19,7 +19,7 @@ export interface CachedHeaderPosition {
19
19
  height: number;
20
20
  }
21
21
  export declare const getHeaderPositionCache: (container: HTMLElement) => Map<string, CachedHeaderPosition>;
22
- export declare const REVERT_TO_PREVIOUS_HEADERS_DELAY = 1500;
22
+ export declare const REVERT_TO_PREVIOUS_HEADERS_DELAY = 150;
23
23
  export declare const throttle: (callback: () => void, limit: number) => void;
24
24
  export declare const addTrackedEventListener: (element: HTMLElement, event: string, handler: EventListener, options?: AddEventListenerOptions) => void;
25
25
  /** Header tooltips are portaled under .simple-table-root; remove them when header DOM is torn down
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simple-table/angular",
3
- "version": "3.6.7",
3
+ "version": "3.6.8",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/index.es.js",
6
6
  "types": "dist/types/angular/src/index.d.ts",
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "tslib": "^2.8.1",
33
- "simple-table-core": "3.6.7"
33
+ "simple-table-core": "3.6.8"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@angular/common": "^20.0.0",