carriera-intern 1.1.93 → 1.1.94
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/fesm2022/carriera-intern.mjs +226 -3
- package/fesm2022/carriera-intern.mjs.map +1 -1
- package/index.d.ts +43 -1
- package/package.json +1 -1
|
@@ -9942,11 +9942,11 @@ class StickyScrollbarComponent {
|
|
|
9942
9942
|
this.updateScrollState(this.calculateScrollState());
|
|
9943
9943
|
}
|
|
9944
9944
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: StickyScrollbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9945
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: StickyScrollbarComponent, isStandalone: true, selector: "ca-sticky-scrollbar", inputs: { hideThumb: "hideThumb", hideTrack: "hideTrack", alwaysVisible: "alwaysVisible", stickyOffset: "stickyOffset" }, outputs: { scrollStateChange: "scrollStateChange" }, viewQueries: [{ propertyName: "scrollContainer", first: true, predicate: ["scrollContainer"], descendants: true }, { propertyName: "scrollThumb", first: true, predicate: ["scrollThumb"], descendants: true }], ngImport: i0, template: "<div class=\"sticky-scrollbar-wrapper\">\n <div\n #scrollContainer\n class=\"sticky-scrollbar-container\"\n cdkScrollable\n tabindex=\"-1\"\n >\n <ng-content></ng-content>\n </div>\n @if (alwaysVisible && !isContainerInView()) {\n <div class=\"sticky-scrollbar-placeholder\"></div>\n }\n <div\n class=\"sticky-scrollbar-track\"\n [class.hidden]=\"hideTrack\"\n [class.always-visible]=\"alwaysVisible\"\n [class.fixed-mode]=\"alwaysVisible && !isContainerInView()\"\n [style.bottom.px]=\"stickyOffset\"\n >\n <div\n #scrollThumb\n class=\"sticky-scrollbar-thumb\"\n [class.dragging]=\"isDragging\"\n [class.hidden-thumb]=\"hideThumb\"\n (mousedown)=\"onThumbMouseDown($event)\"\n (mouseup)=\"onThumbMouseUp()\"\n ></div>\n </div>\n</div>\n", styles: [".sticky-scrollbar-wrapper{position:relative;height:100%;width:100%;display:flex;flex-direction:column;overscroll-behavior-x:none}.sticky-scrollbar-container{flex:1;width:fit-content;max-width:100%;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:none;contain:layout style paint;-ms-overflow-style:none;scrollbar-width:none}.sticky-scrollbar-container::-webkit-scrollbar{display:none}.sticky-scrollbar-container:focus-visible{outline:none!important}.sticky-scrollbar-placeholder{height:14px;visibility:hidden;pointer-events:none}.sticky-scrollbar-track{position:sticky;bottom:0;width:100%;height:14px;display:flex;align-items:center;border-radius:2px;margin-top:0;margin-bottom:0;transition:opacity .1s ease-in-out;z-index:10}.sticky-scrollbar-track.hidden{display:none}.sticky-scrollbar-track.always-visible{z-index:1000}.sticky-scrollbar-track.always-visible.fixed-mode{margin:0}.sticky-scrollbar-track:hover .sticky-scrollbar-thumb{height:6px;background-color:#
|
|
9945
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: StickyScrollbarComponent, isStandalone: true, selector: "ca-sticky-scrollbar", inputs: { hideThumb: "hideThumb", hideTrack: "hideTrack", alwaysVisible: "alwaysVisible", stickyOffset: "stickyOffset" }, outputs: { scrollStateChange: "scrollStateChange" }, viewQueries: [{ propertyName: "scrollContainer", first: true, predicate: ["scrollContainer"], descendants: true }, { propertyName: "scrollThumb", first: true, predicate: ["scrollThumb"], descendants: true }], ngImport: i0, template: "<div class=\"sticky-scrollbar-wrapper\">\n <div\n #scrollContainer\n class=\"sticky-scrollbar-container\"\n cdkScrollable\n tabindex=\"-1\"\n >\n <ng-content></ng-content>\n </div>\n @if (alwaysVisible && !isContainerInView()) {\n <div class=\"sticky-scrollbar-placeholder\"></div>\n }\n <div\n class=\"sticky-scrollbar-track\"\n [class.hidden]=\"hideTrack\"\n [class.always-visible]=\"alwaysVisible\"\n [class.fixed-mode]=\"alwaysVisible && !isContainerInView()\"\n [style.bottom.px]=\"stickyOffset\"\n >\n <div\n #scrollThumb\n class=\"sticky-scrollbar-thumb\"\n [class.dragging]=\"isDragging\"\n [class.hidden-thumb]=\"hideThumb\"\n (mousedown)=\"onThumbMouseDown($event)\"\n (mouseup)=\"onThumbMouseUp()\"\n ></div>\n </div>\n</div>\n", styles: [".sticky-scrollbar-wrapper{position:relative;height:100%;width:100%;display:flex;flex-direction:column;overscroll-behavior-x:none}.sticky-scrollbar-container{flex:1;width:fit-content;max-width:100%;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:none;contain:layout style paint;-ms-overflow-style:none;scrollbar-width:none}.sticky-scrollbar-container::-webkit-scrollbar{display:none}.sticky-scrollbar-container:focus-visible{outline:none!important}.sticky-scrollbar-placeholder{height:14px;visibility:hidden;pointer-events:none}.sticky-scrollbar-track{position:sticky;bottom:0;width:100%;height:14px;display:flex;align-items:center;border-radius:2px;margin-top:0;margin-bottom:0;transition:opacity .1s ease-in-out;z-index:10}.sticky-scrollbar-track.hidden{display:none}.sticky-scrollbar-track.always-visible{z-index:1000}.sticky-scrollbar-track.always-visible.fixed-mode{margin:0}.sticky-scrollbar-track:hover .sticky-scrollbar-thumb{height:6px;background-color:#00000080}.sticky-scrollbar-thumb{position:relative;height:2px;background-color:#0003;border-radius:2px;transition:background-color .1s ease-in-out,opacity .1s ease-in-out,height .1s ease-in-out;min-width:30px;will-change:transform,width,opacity;transform:translateZ(0);opacity:1}@starting-style{.sticky-scrollbar-thumb{opacity:0}}.sticky-scrollbar-thumb.hidden-thumb{opacity:0}.sticky-scrollbar-thumb:before{content:\"\";position:absolute;inset:-6px -4px;pointer-events:auto}.sticky-scrollbar-thumb:hover,.sticky-scrollbar-thumb.dragging{background-color:#00000080;height:6px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: CdkScrollable, selector: "[cdk-scrollable], [cdkScrollable]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9946
9946
|
}
|
|
9947
9947
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: StickyScrollbarComponent, decorators: [{
|
|
9948
9948
|
type: Component,
|
|
9949
|
-
args: [{ selector: 'ca-sticky-scrollbar', imports: [CommonModule, CdkScrollable], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"sticky-scrollbar-wrapper\">\n <div\n #scrollContainer\n class=\"sticky-scrollbar-container\"\n cdkScrollable\n tabindex=\"-1\"\n >\n <ng-content></ng-content>\n </div>\n @if (alwaysVisible && !isContainerInView()) {\n <div class=\"sticky-scrollbar-placeholder\"></div>\n }\n <div\n class=\"sticky-scrollbar-track\"\n [class.hidden]=\"hideTrack\"\n [class.always-visible]=\"alwaysVisible\"\n [class.fixed-mode]=\"alwaysVisible && !isContainerInView()\"\n [style.bottom.px]=\"stickyOffset\"\n >\n <div\n #scrollThumb\n class=\"sticky-scrollbar-thumb\"\n [class.dragging]=\"isDragging\"\n [class.hidden-thumb]=\"hideThumb\"\n (mousedown)=\"onThumbMouseDown($event)\"\n (mouseup)=\"onThumbMouseUp()\"\n ></div>\n </div>\n</div>\n", styles: [".sticky-scrollbar-wrapper{position:relative;height:100%;width:100%;display:flex;flex-direction:column;overscroll-behavior-x:none}.sticky-scrollbar-container{flex:1;width:fit-content;max-width:100%;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:none;contain:layout style paint;-ms-overflow-style:none;scrollbar-width:none}.sticky-scrollbar-container::-webkit-scrollbar{display:none}.sticky-scrollbar-container:focus-visible{outline:none!important}.sticky-scrollbar-placeholder{height:14px;visibility:hidden;pointer-events:none}.sticky-scrollbar-track{position:sticky;bottom:0;width:100%;height:14px;display:flex;align-items:center;border-radius:2px;margin-top:0;margin-bottom:0;transition:opacity .1s ease-in-out;z-index:10}.sticky-scrollbar-track.hidden{display:none}.sticky-scrollbar-track.always-visible{z-index:1000}.sticky-scrollbar-track.always-visible.fixed-mode{margin:0}.sticky-scrollbar-track:hover .sticky-scrollbar-thumb{height:6px;background-color:#
|
|
9949
|
+
args: [{ selector: 'ca-sticky-scrollbar', imports: [CommonModule, CdkScrollable], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"sticky-scrollbar-wrapper\">\n <div\n #scrollContainer\n class=\"sticky-scrollbar-container\"\n cdkScrollable\n tabindex=\"-1\"\n >\n <ng-content></ng-content>\n </div>\n @if (alwaysVisible && !isContainerInView()) {\n <div class=\"sticky-scrollbar-placeholder\"></div>\n }\n <div\n class=\"sticky-scrollbar-track\"\n [class.hidden]=\"hideTrack\"\n [class.always-visible]=\"alwaysVisible\"\n [class.fixed-mode]=\"alwaysVisible && !isContainerInView()\"\n [style.bottom.px]=\"stickyOffset\"\n >\n <div\n #scrollThumb\n class=\"sticky-scrollbar-thumb\"\n [class.dragging]=\"isDragging\"\n [class.hidden-thumb]=\"hideThumb\"\n (mousedown)=\"onThumbMouseDown($event)\"\n (mouseup)=\"onThumbMouseUp()\"\n ></div>\n </div>\n</div>\n", styles: [".sticky-scrollbar-wrapper{position:relative;height:100%;width:100%;display:flex;flex-direction:column;overscroll-behavior-x:none}.sticky-scrollbar-container{flex:1;width:fit-content;max-width:100%;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:none;contain:layout style paint;-ms-overflow-style:none;scrollbar-width:none}.sticky-scrollbar-container::-webkit-scrollbar{display:none}.sticky-scrollbar-container:focus-visible{outline:none!important}.sticky-scrollbar-placeholder{height:14px;visibility:hidden;pointer-events:none}.sticky-scrollbar-track{position:sticky;bottom:0;width:100%;height:14px;display:flex;align-items:center;border-radius:2px;margin-top:0;margin-bottom:0;transition:opacity .1s ease-in-out;z-index:10}.sticky-scrollbar-track.hidden{display:none}.sticky-scrollbar-track.always-visible{z-index:1000}.sticky-scrollbar-track.always-visible.fixed-mode{margin:0}.sticky-scrollbar-track:hover .sticky-scrollbar-thumb{height:6px;background-color:#00000080}.sticky-scrollbar-thumb{position:relative;height:2px;background-color:#0003;border-radius:2px;transition:background-color .1s ease-in-out,opacity .1s ease-in-out,height .1s ease-in-out;min-width:30px;will-change:transform,width,opacity;transform:translateZ(0);opacity:1}@starting-style{.sticky-scrollbar-thumb{opacity:0}}.sticky-scrollbar-thumb.hidden-thumb{opacity:0}.sticky-scrollbar-thumb:before{content:\"\";position:absolute;inset:-6px -4px;pointer-events:auto}.sticky-scrollbar-thumb:hover,.sticky-scrollbar-thumb.dragging{background-color:#00000080;height:6px}\n"] }]
|
|
9950
9950
|
}], propDecorators: { scrollContainer: [{
|
|
9951
9951
|
type: ViewChild,
|
|
9952
9952
|
args: ['scrollContainer', { static: false }]
|
|
@@ -9965,6 +9965,229 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
9965
9965
|
type: Output
|
|
9966
9966
|
}] } });
|
|
9967
9967
|
|
|
9968
|
+
class CaScrollableComponent {
|
|
9969
|
+
scrollContainer;
|
|
9970
|
+
horizontalTrack;
|
|
9971
|
+
horizontalThumb;
|
|
9972
|
+
verticalTrack;
|
|
9973
|
+
verticalThumb;
|
|
9974
|
+
isLight = false;
|
|
9975
|
+
set hideHorizontalScrollbar(value) {
|
|
9976
|
+
this._hideHorizontalScrollbar = value;
|
|
9977
|
+
this.refreshScrollbars();
|
|
9978
|
+
}
|
|
9979
|
+
get hideHorizontalScrollbar() {
|
|
9980
|
+
return this._hideHorizontalScrollbar;
|
|
9981
|
+
}
|
|
9982
|
+
set hideVerticalScrollbar(value) {
|
|
9983
|
+
this._hideVerticalScrollbar = value;
|
|
9984
|
+
this.refreshScrollbars();
|
|
9985
|
+
}
|
|
9986
|
+
get hideVerticalScrollbar() {
|
|
9987
|
+
return this._hideVerticalScrollbar;
|
|
9988
|
+
}
|
|
9989
|
+
renderer = inject(Renderer2);
|
|
9990
|
+
destroyRef = inject(DestroyRef);
|
|
9991
|
+
ngZone = inject(NgZone);
|
|
9992
|
+
_hideHorizontalScrollbar = false;
|
|
9993
|
+
_hideVerticalScrollbar = false;
|
|
9994
|
+
isInitialized = false;
|
|
9995
|
+
isDraggingHorizontal = false;
|
|
9996
|
+
isDraggingVertical = false;
|
|
9997
|
+
dragStartX = 0;
|
|
9998
|
+
dragStartY = 0;
|
|
9999
|
+
scrollStartLeft = 0;
|
|
10000
|
+
scrollStartTop = 0;
|
|
10001
|
+
removeMouseMoveListener;
|
|
10002
|
+
removeMouseUpListener;
|
|
10003
|
+
removeMouseLeaveListener;
|
|
10004
|
+
removeScrollListener;
|
|
10005
|
+
ngAfterViewInit() {
|
|
10006
|
+
this.isInitialized = true;
|
|
10007
|
+
this.updateScrollbars();
|
|
10008
|
+
this.setupScrollListener();
|
|
10009
|
+
this.setupResizeObserver();
|
|
10010
|
+
this.setupGlobalMouseListeners();
|
|
10011
|
+
this.destroyRef.onDestroy(() => {
|
|
10012
|
+
this.removeMouseMoveListener?.();
|
|
10013
|
+
this.removeMouseUpListener?.();
|
|
10014
|
+
this.removeMouseLeaveListener?.();
|
|
10015
|
+
this.removeScrollListener?.();
|
|
10016
|
+
});
|
|
10017
|
+
}
|
|
10018
|
+
onHorizontalThumbMouseDown(event) {
|
|
10019
|
+
event.preventDefault();
|
|
10020
|
+
event.stopPropagation();
|
|
10021
|
+
this.isDraggingHorizontal = true;
|
|
10022
|
+
this.renderer.addClass(this.horizontalThumb.nativeElement, 'dragging');
|
|
10023
|
+
this.dragStartX = event.clientX;
|
|
10024
|
+
this.scrollStartLeft = this.scrollContainer.nativeElement.scrollLeft;
|
|
10025
|
+
}
|
|
10026
|
+
onVerticalThumbMouseDown(event) {
|
|
10027
|
+
event.preventDefault();
|
|
10028
|
+
event.stopPropagation();
|
|
10029
|
+
this.isDraggingVertical = true;
|
|
10030
|
+
this.renderer.addClass(this.verticalThumb.nativeElement, 'dragging');
|
|
10031
|
+
this.dragStartY = event.clientY;
|
|
10032
|
+
this.scrollStartTop = this.scrollContainer.nativeElement.scrollTop;
|
|
10033
|
+
}
|
|
10034
|
+
setupScrollListener() {
|
|
10035
|
+
this.ngZone.runOutsideAngular(() => {
|
|
10036
|
+
const container = this.scrollContainer.nativeElement;
|
|
10037
|
+
const onScroll = () => this.handleContainerScroll();
|
|
10038
|
+
container.addEventListener('scroll', onScroll, { passive: true });
|
|
10039
|
+
this.removeScrollListener = () => container.removeEventListener('scroll', onScroll);
|
|
10040
|
+
});
|
|
10041
|
+
}
|
|
10042
|
+
handleContainerScroll() {
|
|
10043
|
+
if (!this.isDraggingHorizontal && !this.isDraggingVertical) {
|
|
10044
|
+
this.updateScrollbars();
|
|
10045
|
+
}
|
|
10046
|
+
}
|
|
10047
|
+
setupResizeObserver() {
|
|
10048
|
+
this.ngZone.runOutsideAngular(() => {
|
|
10049
|
+
const resizeObserver = new ResizeObserver(() => this.updateScrollbars());
|
|
10050
|
+
const container = this.scrollContainer.nativeElement;
|
|
10051
|
+
resizeObserver.observe(container);
|
|
10052
|
+
if (container.firstElementChild) {
|
|
10053
|
+
resizeObserver.observe(container.firstElementChild);
|
|
10054
|
+
}
|
|
10055
|
+
this.destroyRef.onDestroy(() => {
|
|
10056
|
+
resizeObserver.disconnect();
|
|
10057
|
+
});
|
|
10058
|
+
});
|
|
10059
|
+
}
|
|
10060
|
+
setupGlobalMouseListeners() {
|
|
10061
|
+
this.ngZone.runOutsideAngular(() => {
|
|
10062
|
+
const onMouseMove = (event) => this.onThumbDrag(event);
|
|
10063
|
+
const onMouseUp = () => this.onThumbMouseUp();
|
|
10064
|
+
const onMouseLeave = () => this.onThumbMouseUp();
|
|
10065
|
+
window.addEventListener('mousemove', onMouseMove, { passive: true });
|
|
10066
|
+
window.addEventListener('mouseup', onMouseUp);
|
|
10067
|
+
window.addEventListener('mouseleave', onMouseLeave);
|
|
10068
|
+
this.removeMouseMoveListener = () => window.removeEventListener('mousemove', onMouseMove);
|
|
10069
|
+
this.removeMouseUpListener = () => window.removeEventListener('mouseup', onMouseUp);
|
|
10070
|
+
this.removeMouseLeaveListener = () => window.removeEventListener('mouseleave', onMouseLeave);
|
|
10071
|
+
});
|
|
10072
|
+
}
|
|
10073
|
+
onThumbDrag(event) {
|
|
10074
|
+
const container = this.scrollContainer.nativeElement;
|
|
10075
|
+
if (this.isDraggingHorizontal) {
|
|
10076
|
+
const deltaX = event.clientX - this.dragStartX;
|
|
10077
|
+
const maxScrollX = Math.max(container.scrollWidth - container.clientWidth, 0);
|
|
10078
|
+
const trackWidth = this.horizontalTrack.nativeElement.clientWidth;
|
|
10079
|
+
const thumbWidth = this.horizontalThumb.nativeElement.offsetWidth;
|
|
10080
|
+
const maxThumbTravelX = Math.max(trackWidth - thumbWidth, 1);
|
|
10081
|
+
const scrollDeltaX = (deltaX / maxThumbTravelX) * maxScrollX;
|
|
10082
|
+
container.scrollLeft = this.scrollStartLeft + scrollDeltaX;
|
|
10083
|
+
}
|
|
10084
|
+
if (this.isDraggingVertical) {
|
|
10085
|
+
const deltaY = event.clientY - this.dragStartY;
|
|
10086
|
+
const maxScrollY = Math.max(container.scrollHeight - container.clientHeight, 0);
|
|
10087
|
+
const trackHeight = this.verticalTrack.nativeElement.clientHeight;
|
|
10088
|
+
const thumbHeight = this.verticalThumb.nativeElement.offsetHeight;
|
|
10089
|
+
const maxThumbTravelY = Math.max(trackHeight - thumbHeight, 1);
|
|
10090
|
+
const scrollDeltaY = (deltaY / maxThumbTravelY) * maxScrollY;
|
|
10091
|
+
container.scrollTop = this.scrollStartTop + scrollDeltaY;
|
|
10092
|
+
}
|
|
10093
|
+
this.updateScrollbars();
|
|
10094
|
+
}
|
|
10095
|
+
onThumbMouseUp() {
|
|
10096
|
+
if (this.isDraggingHorizontal) {
|
|
10097
|
+
this.renderer.removeClass(this.horizontalThumb.nativeElement, 'dragging');
|
|
10098
|
+
}
|
|
10099
|
+
if (this.isDraggingVertical) {
|
|
10100
|
+
this.renderer.removeClass(this.verticalThumb.nativeElement, 'dragging');
|
|
10101
|
+
}
|
|
10102
|
+
this.isDraggingHorizontal = false;
|
|
10103
|
+
this.isDraggingVertical = false;
|
|
10104
|
+
}
|
|
10105
|
+
updateScrollbars() {
|
|
10106
|
+
const container = this.scrollContainer.nativeElement;
|
|
10107
|
+
const horizontalTrack = this.horizontalTrack.nativeElement;
|
|
10108
|
+
const verticalTrack = this.verticalTrack.nativeElement;
|
|
10109
|
+
const horizontalThumb = this.horizontalThumb.nativeElement;
|
|
10110
|
+
const verticalThumb = this.verticalThumb.nativeElement;
|
|
10111
|
+
const containerWidth = container.clientWidth;
|
|
10112
|
+
const containerHeight = container.clientHeight;
|
|
10113
|
+
const contentWidth = container.scrollWidth;
|
|
10114
|
+
const contentHeight = container.scrollHeight;
|
|
10115
|
+
const maxScrollX = Math.max(contentWidth - containerWidth, 0);
|
|
10116
|
+
const maxScrollY = Math.max(contentHeight - containerHeight, 0);
|
|
10117
|
+
const horizontalTrackLength = horizontalTrack.clientWidth;
|
|
10118
|
+
const verticalTrackLength = verticalTrack.clientHeight;
|
|
10119
|
+
const hasHorizontalOverflow = maxScrollX > 0;
|
|
10120
|
+
const hasVerticalOverflow = maxScrollY > 0;
|
|
10121
|
+
const shouldShowHorizontal = hasHorizontalOverflow && !this.hideHorizontalScrollbar;
|
|
10122
|
+
const shouldShowVertical = hasVerticalOverflow && !this.hideVerticalScrollbar;
|
|
10123
|
+
this.renderer.setStyle(horizontalTrack, 'opacity', shouldShowHorizontal ? '1' : '0');
|
|
10124
|
+
this.renderer.setStyle(horizontalTrack, 'pointer-events', shouldShowHorizontal ? 'auto' : 'none');
|
|
10125
|
+
if (shouldShowHorizontal) {
|
|
10126
|
+
this.renderer.removeClass(horizontalTrack, 'hidden');
|
|
10127
|
+
}
|
|
10128
|
+
else {
|
|
10129
|
+
this.renderer.addClass(horizontalTrack, 'hidden');
|
|
10130
|
+
this.renderer.removeClass(horizontalThumb, 'dragging');
|
|
10131
|
+
}
|
|
10132
|
+
this.renderer.setStyle(verticalTrack, 'opacity', shouldShowVertical ? '1' : '0');
|
|
10133
|
+
this.renderer.setStyle(verticalTrack, 'pointer-events', shouldShowVertical ? 'auto' : 'none');
|
|
10134
|
+
if (shouldShowVertical) {
|
|
10135
|
+
this.renderer.removeClass(verticalTrack, 'hidden');
|
|
10136
|
+
}
|
|
10137
|
+
else {
|
|
10138
|
+
this.renderer.addClass(verticalTrack, 'hidden');
|
|
10139
|
+
this.renderer.removeClass(verticalThumb, 'dragging');
|
|
10140
|
+
}
|
|
10141
|
+
if (shouldShowHorizontal) {
|
|
10142
|
+
const thumbWidth = Math.min(horizontalTrackLength, Math.max((containerWidth / contentWidth) * horizontalTrackLength, 24));
|
|
10143
|
+
const maxThumbTravelX = Math.max(horizontalTrackLength - thumbWidth, 1);
|
|
10144
|
+
const thumbPositionX = (container.scrollLeft / maxScrollX) * maxThumbTravelX;
|
|
10145
|
+
this.renderer.setStyle(horizontalThumb, 'width', `${thumbWidth}px`);
|
|
10146
|
+
this.renderer.setStyle(horizontalThumb, 'transform', `translateX(${thumbPositionX}px)`);
|
|
10147
|
+
}
|
|
10148
|
+
if (shouldShowVertical) {
|
|
10149
|
+
const thumbHeight = Math.min(verticalTrackLength, Math.max((containerHeight / contentHeight) * verticalTrackLength, 24));
|
|
10150
|
+
const maxThumbTravelY = Math.max(verticalTrackLength - thumbHeight, 1);
|
|
10151
|
+
const thumbPositionY = (container.scrollTop / maxScrollY) * maxThumbTravelY;
|
|
10152
|
+
this.renderer.setStyle(verticalThumb, 'height', `${thumbHeight}px`);
|
|
10153
|
+
this.renderer.setStyle(verticalThumb, 'transform', `translateY(${thumbPositionY}px)`);
|
|
10154
|
+
}
|
|
10155
|
+
}
|
|
10156
|
+
refreshScrollbars() {
|
|
10157
|
+
if (!this.isInitialized) {
|
|
10158
|
+
return;
|
|
10159
|
+
}
|
|
10160
|
+
this.updateScrollbars();
|
|
10161
|
+
}
|
|
10162
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: CaScrollableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10163
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", type: CaScrollableComponent, isStandalone: true, selector: "ca-scrollable", inputs: { isLight: "isLight", hideHorizontalScrollbar: "hideHorizontalScrollbar", hideVerticalScrollbar: "hideVerticalScrollbar" }, viewQueries: [{ propertyName: "scrollContainer", first: true, predicate: ["scrollContainer"], descendants: true }, { propertyName: "horizontalTrack", first: true, predicate: ["horizontalTrack"], descendants: true }, { propertyName: "horizontalThumb", first: true, predicate: ["horizontalThumb"], descendants: true }, { propertyName: "verticalTrack", first: true, predicate: ["verticalTrack"], descendants: true }, { propertyName: "verticalThumb", first: true, predicate: ["verticalThumb"], descendants: true }], ngImport: i0, template: "<div class=\"ca-scrollable-wrapper\" [class.light]=\"isLight\">\n <div\n #scrollContainer\n class=\"ca-scrollable-container\"\n tabindex=\"-1\"\n cdkScrollable\n >\n <ng-content></ng-content>\n </div>\n\n <div #horizontalTrack class=\"ca-scrollbar-track horizontal\">\n <div\n #horizontalThumb\n class=\"ca-scrollbar-thumb\"\n (mousedown)=\"onHorizontalThumbMouseDown($event)\"\n ></div>\n </div>\n\n <div #verticalTrack class=\"ca-scrollbar-track vertical\">\n <div\n #verticalThumb\n class=\"ca-scrollbar-thumb\"\n (mousedown)=\"onVerticalThumbMouseDown($event)\"\n ></div>\n </div>\n</div>\n", styles: [".ca-scrollable-wrapper{--ca-scrollbar-thumb-color: rgba(0, 0, 0, .2);--ca-scrollbar-thumb-hover-color: rgba(0, 0, 0, .5);--ca-scrollbar-thumb-dragging-color: rgba(0, 0, 0, .5);position:relative;width:100%;height:100%;overscroll-behavior:none}.ca-scrollable-wrapper.light{--ca-scrollbar-thumb-color: rgba(255, 255, 255, .4);--ca-scrollbar-thumb-hover-color: rgba(255, 255, 255, .5);--ca-scrollbar-thumb-dragging-color: rgba(255, 255, 255, .5)}.ca-scrollable-container{width:100%;height:100%;overflow:auto;overscroll-behavior:none;-ms-overflow-style:none;scrollbar-width:none}.ca-scrollable-container::-webkit-scrollbar{display:none}.ca-scrollable-container:focus-visible{outline:none!important}.ca-scrollbar-track{position:absolute;z-index:1;display:flex;box-sizing:border-box;opacity:0;pointer-events:none;transition:opacity .1s ease-in-out}.ca-scrollbar-track.hidden .ca-scrollbar-thumb:before{pointer-events:none}.ca-scrollbar-track.horizontal{left:4px;right:4px;bottom:12px;height:14px;align-items:center}.ca-scrollbar-track.horizontal .ca-scrollbar-thumb{width:100%;height:2px}.ca-scrollbar-track.horizontal:hover .ca-scrollbar-thumb,.ca-scrollbar-track.horizontal .ca-scrollbar-thumb.dragging{height:6px;background-color:var(--ca-scrollbar-thumb-hover-color)}.ca-scrollbar-track.vertical{top:4px;right:0;bottom:4px;width:12px;justify-content:center}.ca-scrollbar-track.vertical .ca-scrollbar-thumb{width:2px;height:100%}.ca-scrollbar-track.vertical:hover .ca-scrollbar-thumb,.ca-scrollbar-track.vertical .ca-scrollbar-thumb.dragging{width:6px;background-color:var(--ca-scrollbar-thumb-hover-color)}.ca-scrollbar-thumb{position:relative;background-color:var(--ca-scrollbar-thumb-color);border-radius:2px;transition:background-color .1s ease-in-out,height .1s ease-in-out,width .1s ease-in-out}.ca-scrollbar-thumb:hover{background-color:var(--ca-scrollbar-thumb-hover-color)}.ca-scrollbar-thumb:before{content:\"\";position:absolute;inset:-6px -4px;pointer-events:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: CdkScrollable, selector: "[cdk-scrollable], [cdkScrollable]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
10164
|
+
}
|
|
10165
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: CaScrollableComponent, decorators: [{
|
|
10166
|
+
type: Component,
|
|
10167
|
+
args: [{ selector: 'ca-scrollable', changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, CdkScrollable], template: "<div class=\"ca-scrollable-wrapper\" [class.light]=\"isLight\">\n <div\n #scrollContainer\n class=\"ca-scrollable-container\"\n tabindex=\"-1\"\n cdkScrollable\n >\n <ng-content></ng-content>\n </div>\n\n <div #horizontalTrack class=\"ca-scrollbar-track horizontal\">\n <div\n #horizontalThumb\n class=\"ca-scrollbar-thumb\"\n (mousedown)=\"onHorizontalThumbMouseDown($event)\"\n ></div>\n </div>\n\n <div #verticalTrack class=\"ca-scrollbar-track vertical\">\n <div\n #verticalThumb\n class=\"ca-scrollbar-thumb\"\n (mousedown)=\"onVerticalThumbMouseDown($event)\"\n ></div>\n </div>\n</div>\n", styles: [".ca-scrollable-wrapper{--ca-scrollbar-thumb-color: rgba(0, 0, 0, .2);--ca-scrollbar-thumb-hover-color: rgba(0, 0, 0, .5);--ca-scrollbar-thumb-dragging-color: rgba(0, 0, 0, .5);position:relative;width:100%;height:100%;overscroll-behavior:none}.ca-scrollable-wrapper.light{--ca-scrollbar-thumb-color: rgba(255, 255, 255, .4);--ca-scrollbar-thumb-hover-color: rgba(255, 255, 255, .5);--ca-scrollbar-thumb-dragging-color: rgba(255, 255, 255, .5)}.ca-scrollable-container{width:100%;height:100%;overflow:auto;overscroll-behavior:none;-ms-overflow-style:none;scrollbar-width:none}.ca-scrollable-container::-webkit-scrollbar{display:none}.ca-scrollable-container:focus-visible{outline:none!important}.ca-scrollbar-track{position:absolute;z-index:1;display:flex;box-sizing:border-box;opacity:0;pointer-events:none;transition:opacity .1s ease-in-out}.ca-scrollbar-track.hidden .ca-scrollbar-thumb:before{pointer-events:none}.ca-scrollbar-track.horizontal{left:4px;right:4px;bottom:12px;height:14px;align-items:center}.ca-scrollbar-track.horizontal .ca-scrollbar-thumb{width:100%;height:2px}.ca-scrollbar-track.horizontal:hover .ca-scrollbar-thumb,.ca-scrollbar-track.horizontal .ca-scrollbar-thumb.dragging{height:6px;background-color:var(--ca-scrollbar-thumb-hover-color)}.ca-scrollbar-track.vertical{top:4px;right:0;bottom:4px;width:12px;justify-content:center}.ca-scrollbar-track.vertical .ca-scrollbar-thumb{width:2px;height:100%}.ca-scrollbar-track.vertical:hover .ca-scrollbar-thumb,.ca-scrollbar-track.vertical .ca-scrollbar-thumb.dragging{width:6px;background-color:var(--ca-scrollbar-thumb-hover-color)}.ca-scrollbar-thumb{position:relative;background-color:var(--ca-scrollbar-thumb-color);border-radius:2px;transition:background-color .1s ease-in-out,height .1s ease-in-out,width .1s ease-in-out}.ca-scrollbar-thumb:hover{background-color:var(--ca-scrollbar-thumb-hover-color)}.ca-scrollbar-thumb:before{content:\"\";position:absolute;inset:-6px -4px;pointer-events:auto}\n"] }]
|
|
10168
|
+
}], propDecorators: { scrollContainer: [{
|
|
10169
|
+
type: ViewChild,
|
|
10170
|
+
args: ['scrollContainer']
|
|
10171
|
+
}], horizontalTrack: [{
|
|
10172
|
+
type: ViewChild,
|
|
10173
|
+
args: ['horizontalTrack']
|
|
10174
|
+
}], horizontalThumb: [{
|
|
10175
|
+
type: ViewChild,
|
|
10176
|
+
args: ['horizontalThumb']
|
|
10177
|
+
}], verticalTrack: [{
|
|
10178
|
+
type: ViewChild,
|
|
10179
|
+
args: ['verticalTrack']
|
|
10180
|
+
}], verticalThumb: [{
|
|
10181
|
+
type: ViewChild,
|
|
10182
|
+
args: ['verticalThumb']
|
|
10183
|
+
}], isLight: [{
|
|
10184
|
+
type: Input
|
|
10185
|
+
}], hideHorizontalScrollbar: [{
|
|
10186
|
+
type: Input
|
|
10187
|
+
}], hideVerticalScrollbar: [{
|
|
10188
|
+
type: Input
|
|
10189
|
+
}] } });
|
|
10190
|
+
|
|
9968
10191
|
class DispatchDropdownHelper {
|
|
9969
10192
|
/**
|
|
9970
10193
|
* Calculate the max height for grouped options dropdown menu
|
|
@@ -10981,5 +11204,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
10981
11204
|
* Generated bundle index. Do not edit.
|
|
10982
11205
|
*/
|
|
10983
11206
|
|
|
10984
|
-
export { AvatarComponent, CaiInputDatetimePickerComponent, CopyComponent, CounterComponent, DispatchDropdownComponent, DispatchLocationComponent, DropZoneComponent, DropdownTypes, INPUT_CHARACTER_SETS, InputAddressComponent, InputComponent, IntervalDropdownComponent, ListContactDropdownComponent, PmComponent, RatingReviewComponent, ReviewModalComponent, SelectedBusinessFieldComponent, StickyScrollbarComponent, TabOptionDropdownComponent, TextAreaComponent, eScrollState, ignoreWhenAutofilled, sizes };
|
|
11207
|
+
export { AvatarComponent, CaScrollableComponent, CaiInputDatetimePickerComponent, CopyComponent, CounterComponent, DispatchDropdownComponent, DispatchLocationComponent, DropZoneComponent, DropdownTypes, INPUT_CHARACTER_SETS, InputAddressComponent, InputComponent, IntervalDropdownComponent, ListContactDropdownComponent, PmComponent, RatingReviewComponent, ReviewModalComponent, SelectedBusinessFieldComponent, StickyScrollbarComponent, TabOptionDropdownComponent, TextAreaComponent, eScrollState, ignoreWhenAutofilled, sizes };
|
|
10985
11208
|
//# sourceMappingURL=carriera-intern.mjs.map
|