carriera-intern-components 1.1.38 → 1.1.40
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/app/components/sticky-scrollbar/enums/index.d.ts +1 -0
- package/app/components/sticky-scrollbar/enums/scroll-state.enum.d.ts +6 -0
- package/app/components/sticky-scrollbar/sticky-scrollbar.component.d.ts +82 -0
- package/fesm2022/carriera-intern-components.mjs +273 -9
- package/fesm2022/carriera-intern-components.mjs.map +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './scroll-state.enum';
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { AfterViewInit, ElementRef, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { eScrollState } from './enums';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class StickyScrollbarComponent implements AfterViewInit, OnChanges {
|
|
5
|
+
scrollContainer: ElementRef<HTMLDivElement>;
|
|
6
|
+
scrollThumb: ElementRef<HTMLDivElement>;
|
|
7
|
+
/**
|
|
8
|
+
* Input to set scroll position programmatically (for syncing multiple scrollbars)
|
|
9
|
+
*/
|
|
10
|
+
scrollPosition?: number;
|
|
11
|
+
/**
|
|
12
|
+
* Hide the scrollbar track completely
|
|
13
|
+
*/
|
|
14
|
+
hideTrack: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Offset for the sticky position from the bottom (in pixels)
|
|
17
|
+
* @default 0
|
|
18
|
+
*/
|
|
19
|
+
stickyOffset: number;
|
|
20
|
+
/**
|
|
21
|
+
* Output to emit scroll position changes (for syncing multiple scrollbars)
|
|
22
|
+
*/
|
|
23
|
+
scrollPositionChange: EventEmitter<number>;
|
|
24
|
+
/**
|
|
25
|
+
* Output to emit scroll state changes (start, scrolling, end)
|
|
26
|
+
*/
|
|
27
|
+
scrollStateChange: EventEmitter<eScrollState>;
|
|
28
|
+
private readonly renderer;
|
|
29
|
+
private readonly destroyRef;
|
|
30
|
+
isDragging: boolean;
|
|
31
|
+
private dragStartX;
|
|
32
|
+
private scrollStartLeft;
|
|
33
|
+
private isSettingScrollPosition;
|
|
34
|
+
private currentScrollState?;
|
|
35
|
+
private setPositionTimeout?;
|
|
36
|
+
private dragStart$;
|
|
37
|
+
private dragEnd$;
|
|
38
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
39
|
+
ngAfterViewInit(): void;
|
|
40
|
+
/**
|
|
41
|
+
* Applies the scroll position from input (programmatically)
|
|
42
|
+
*/
|
|
43
|
+
private applyScrollPosition;
|
|
44
|
+
/**
|
|
45
|
+
* Updates scrollbar thumb size and position based on content
|
|
46
|
+
*/
|
|
47
|
+
private updateScrollbar;
|
|
48
|
+
/**
|
|
49
|
+
* Observes container resize to update scrollbar
|
|
50
|
+
*/
|
|
51
|
+
private setupResizeObserver;
|
|
52
|
+
/**
|
|
53
|
+
* Updates scroll state and emits the state change event
|
|
54
|
+
*/
|
|
55
|
+
private updateScrollState;
|
|
56
|
+
/**
|
|
57
|
+
* Calculates the scroll state based on current scroll position
|
|
58
|
+
*/
|
|
59
|
+
private calculateScrollState;
|
|
60
|
+
/**
|
|
61
|
+
* Handles scroll event on the container
|
|
62
|
+
*/
|
|
63
|
+
onScroll(): void;
|
|
64
|
+
/**
|
|
65
|
+
* Handles mouse down on scrollbar thumb
|
|
66
|
+
*/
|
|
67
|
+
onThumbMouseDown(event: MouseEvent): void;
|
|
68
|
+
/**
|
|
69
|
+
* Sets up drag event listeners (called once during initialization)
|
|
70
|
+
*/
|
|
71
|
+
private setupDragListeners;
|
|
72
|
+
/**
|
|
73
|
+
* Handles thumb dragging
|
|
74
|
+
*/
|
|
75
|
+
private onThumbDrag;
|
|
76
|
+
/**
|
|
77
|
+
* Handles mouse up to end dragging
|
|
78
|
+
*/
|
|
79
|
+
onThumbMouseUp(): void;
|
|
80
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StickyScrollbarComponent, never>;
|
|
81
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StickyScrollbarComponent, "ca-sticky-scrollbar", never, { "scrollPosition": { "alias": "scrollPosition"; "required": false; }; "hideTrack": { "alias": "hideTrack"; "required": false; }; "stickyOffset": { "alias": "stickyOffset"; "required": false; }; }, { "scrollPositionChange": "scrollPositionChange"; "scrollStateChange": "scrollStateChange"; }, never, ["*"], true, never>;
|
|
82
|
+
}
|