cat-documents-ng 1.0.28 → 1.0.29
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.
|
@@ -4,7 +4,7 @@ import * as i6 from '@angular/common';
|
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import { firstValueFrom, EMPTY, tap, catchError, throwError, of, combineLatest, Subject, Observable, takeUntil, Subscription, debounceTime as debounceTime$1, distinctUntilChanged as distinctUntilChanged$1, BehaviorSubject } from 'rxjs';
|
|
6
6
|
import * as i2 from '@angular/common/http';
|
|
7
|
-
import { HttpParams,
|
|
7
|
+
import { HttpParams, HttpClientModule, HttpHeaders } from '@angular/common/http';
|
|
8
8
|
import { __decorate } from 'tslib';
|
|
9
9
|
import { EntityStore, StoreConfig, QueryEntity } from '@datorama/akita';
|
|
10
10
|
import { debounceTime, distinctUntilChanged, switchMap, map, catchError as catchError$1 } from 'rxjs/operators';
|
|
@@ -2695,10 +2695,7 @@ class DocumentService {
|
|
|
2695
2695
|
* @returns {Observable<any>} Observable that emits the newly created document.
|
|
2696
2696
|
*/
|
|
2697
2697
|
create(entity) {
|
|
2698
|
-
|
|
2699
|
-
'Authorization': `Bearer 3def65bf-2dfc-466b-85a3-13cd1db0960e`
|
|
2700
|
-
});
|
|
2701
|
-
return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}`, entity, { headers }).pipe(tap((newEntity) => this.documentStore.add(newEntity)));
|
|
2698
|
+
return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}`, entity).pipe(tap((newEntity) => this.documentStore.add(newEntity)));
|
|
2702
2699
|
}
|
|
2703
2700
|
/**
|
|
2704
2701
|
* Fetches all documents from the backend.
|
|
@@ -4782,11 +4779,11 @@ class DocumentSearchComponent {
|
|
|
4782
4779
|
}
|
|
4783
4780
|
};
|
|
4784
4781
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentSearchComponent, deps: [{ token: DocumentHelperService }, { token: DocumentQuery }], target: i0.ɵɵFactoryTarget.Component });
|
|
4785
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentSearchComponent, isStandalone: false, selector: "document-search", inputs: { contextId: "contextId" }, outputs: { onActionClick: "onActionClick", onRequestClick: "onRequestClick" }, ngImport: i0, template: "<div class=\"search-container\">\r\n <div class=\"search-header\">\r\n <h2 class=\"ml-3 document-heading\">Documents</h2> \r\n </div>\r\n <div class=\"search-input-wrapper\">\r\n <i class=\"pi pi-search search-icon\"></i
|
|
4782
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentSearchComponent, isStandalone: false, selector: "document-search", inputs: { contextId: "contextId" }, outputs: { onActionClick: "onActionClick", onRequestClick: "onRequestClick" }, ngImport: i0, template: "<div class=\"search-container\">\r\n <div class=\"search-header\">\r\n <h2 class=\"ml-3 document-heading\">Documents</h2> \r\n </div>\r\n <div class=\"search-input-wrapper\">\r\n <!-- <i class=\"pi pi-search search-icon\"></i> -->\r\n <input \r\n type=\"text\" \r\n [(ngModel)]=\"searchTerm\"\r\n (ngModelChange)=\"onSearchInputChange($event)\"\r\n class=\"search-input\"\r\n placeholder=\"Search by document name, category, type, status or applicant name...\"\r\n [attr.aria-label]=\"'Search documents'\"\r\n />\r\n <button \r\n *ngIf=\"searchTerm\"\r\n type=\"button\"\r\n class=\"clear-button\"\r\n (click)=\"onClearSearch()\"\r\n [attr.aria-label]=\"'Clear search'\"\r\n >\r\n <i class=\"pi pi-times\"></i>\r\n </button>\r\n </div>\r\n\r\n <button \r\n *ngIf=\"shouldShowClearAll\"\r\n type=\"button\"\r\n class=\"clear-all-filters-link\"\r\n (click)=\"onClearAllFilters()\"\r\n [attr.aria-label]=\"'Clear all'\"\r\n >\r\n Clear All\r\n <i class=\"pi pi-times\"></i>\r\n </button>\r\n\r\n <div class=\"filters-section\">\r\n <div class=\"actions-menu\">\r\n <button \r\n type=\"button\"\r\n class=\"actions-btn\" \r\n (click)=\"toggleActionsMenu()\" \r\n [class.active]=\"showActionsMenu\"\r\n [attr.aria-label]=\"'Open actions menu'\"\r\n [attr.aria-expanded]=\"showActionsMenu\"\r\n >\r\n Actions\r\n <i class=\"pi pi-chevron-down\" [class.rotated]=\"showActionsMenu\"></i>\r\n </button>\r\n\r\n <!-- Actions Dropdown Menu -->\r\n <div class=\"actions-dropdown\" *ngIf=\"showActionsMenu\">\r\n <div class=\"dropdown-item\" (click)=\"handleUploadDocument()\">\r\n <i class=\"pi pi-upload\"></i>\r\n <span>Upload Document</span>\r\n </div>\r\n <div class=\"dropdown-item\" (click)=\"handleRequestDocument()\">\r\n <i class=\"pi pi-file\"></i>\r\n <span>Request Document</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div> ", styles: [".search-container{display:flex;align-items:center;gap:1rem;width:100%;justify-content:flex-start;padding:10px}.search-input-wrapper{position:relative;flex:1;display:flex;align-items:center;max-width:50%;min-width:300px}.clear-all-filters-link{background:none;border:none;color:#0f8bfd;cursor:pointer;padding:8px 12px;border-radius:4px;font-size:16px;font-weight:500;text-decoration:none!important;transition:background-color .2s ease,color .2s ease;white-space:nowrap;flex-shrink:0;display:flex;justify-content:center;align-items:center;gap:4px}.filters-section{display:flex;align-items:center;gap:1rem;flex-shrink:0;margin-left:auto}.filters-section .actions-menu{position:relative}.filters-section .actions-menu .actions-btn{background:#0f8bfd;border:none;border-radius:8px;padding:8px 10px;color:#fff;font-size:12px;font-weight:700;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s ease;white-space:nowrap}.filters-section .actions-menu .actions-btn:hover{background:#0d7ae6;transform:translateY(-1px)}.filters-section .actions-menu .actions-btn:active{transform:translateY(0)}.filters-section .actions-menu .actions-btn.active{background:#0d7ae6}.filters-section .actions-menu .actions-btn:focus{outline:none;box-shadow:0 0 0 3px #0f8bfd4d}.filters-section .actions-menu .actions-btn i{font-size:.75rem;transition:transform .2s}.filters-section .actions-menu .actions-btn i.rotated{transform:rotate(180deg)}.filters-section .actions-menu .actions-dropdown{position:absolute;top:calc(100% + .5rem);right:0;background:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;z-index:1000;min-width:200px;overflow:hidden}.filters-section .actions-menu .actions-dropdown .dropdown-item{padding:.75rem 1rem;cursor:pointer;color:#374151;font-size:.875rem;transition:background-color .2s;display:flex;align-items:center;gap:.75rem}.filters-section .actions-menu .actions-dropdown .dropdown-item i{font-size:1rem;color:#6b7280}.filters-section .actions-menu .actions-dropdown .dropdown-item:hover{background-color:#f3f4f6}.filters-section .actions-menu .actions-dropdown .dropdown-item:not(:last-child){border-bottom:1px solid #f3f4f6}.filters-section .actions-menu .actions-dropdown .dropdown-item:active{background-color:#e5e7eb}.search-icon{position:absolute;left:12px;color:#6c757d;z-index:1}.search-input{width:100%;padding:10px 12px;border:1px solid #dee2e6;border-radius:8px;font-size:14px;outline:none;transition:border-color .2s ease,box-shadow .2s ease}.search-input:focus{border-color:#0f8bfd;box-shadow:0 0 0 3px #0f8bfd1a}.search-input::placeholder{color:#6c757d}.clear-button{position:absolute;right:12px;background:none;border:none;color:#6c757d;cursor:pointer;padding:4px;border-radius:4px;transition:background-color .2s ease,color .2s ease}.clear-button:hover{background-color:#f8f9fa;color:#495057}@media (max-width: 768px){.search-container{flex-direction:column;gap:.75rem}.search-input-wrapper{max-width:100%}.filters-section{width:100%;justify-content:center;gap:.5rem}.filters-section .actions-menu .actions-btn{width:auto;justify-content:center}.filters-section .actions-menu .actions-dropdown{left:50%;transform:translate(-50%);right:auto}}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i9$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i9$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i9$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
4786
4783
|
}
|
|
4787
4784
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentSearchComponent, decorators: [{
|
|
4788
4785
|
type: Component,
|
|
4789
|
-
args: [{ selector: 'document-search', standalone: false, template: "<div class=\"search-container\">\r\n <div class=\"search-header\">\r\n <h2 class=\"ml-3 document-heading\">Documents</h2> \r\n </div>\r\n <div class=\"search-input-wrapper\">\r\n <i class=\"pi pi-search search-icon\"></i
|
|
4786
|
+
args: [{ selector: 'document-search', standalone: false, template: "<div class=\"search-container\">\r\n <div class=\"search-header\">\r\n <h2 class=\"ml-3 document-heading\">Documents</h2> \r\n </div>\r\n <div class=\"search-input-wrapper\">\r\n <!-- <i class=\"pi pi-search search-icon\"></i> -->\r\n <input \r\n type=\"text\" \r\n [(ngModel)]=\"searchTerm\"\r\n (ngModelChange)=\"onSearchInputChange($event)\"\r\n class=\"search-input\"\r\n placeholder=\"Search by document name, category, type, status or applicant name...\"\r\n [attr.aria-label]=\"'Search documents'\"\r\n />\r\n <button \r\n *ngIf=\"searchTerm\"\r\n type=\"button\"\r\n class=\"clear-button\"\r\n (click)=\"onClearSearch()\"\r\n [attr.aria-label]=\"'Clear search'\"\r\n >\r\n <i class=\"pi pi-times\"></i>\r\n </button>\r\n </div>\r\n\r\n <button \r\n *ngIf=\"shouldShowClearAll\"\r\n type=\"button\"\r\n class=\"clear-all-filters-link\"\r\n (click)=\"onClearAllFilters()\"\r\n [attr.aria-label]=\"'Clear all'\"\r\n >\r\n Clear All\r\n <i class=\"pi pi-times\"></i>\r\n </button>\r\n\r\n <div class=\"filters-section\">\r\n <div class=\"actions-menu\">\r\n <button \r\n type=\"button\"\r\n class=\"actions-btn\" \r\n (click)=\"toggleActionsMenu()\" \r\n [class.active]=\"showActionsMenu\"\r\n [attr.aria-label]=\"'Open actions menu'\"\r\n [attr.aria-expanded]=\"showActionsMenu\"\r\n >\r\n Actions\r\n <i class=\"pi pi-chevron-down\" [class.rotated]=\"showActionsMenu\"></i>\r\n </button>\r\n\r\n <!-- Actions Dropdown Menu -->\r\n <div class=\"actions-dropdown\" *ngIf=\"showActionsMenu\">\r\n <div class=\"dropdown-item\" (click)=\"handleUploadDocument()\">\r\n <i class=\"pi pi-upload\"></i>\r\n <span>Upload Document</span>\r\n </div>\r\n <div class=\"dropdown-item\" (click)=\"handleRequestDocument()\">\r\n <i class=\"pi pi-file\"></i>\r\n <span>Request Document</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div> ", styles: [".search-container{display:flex;align-items:center;gap:1rem;width:100%;justify-content:flex-start;padding:10px}.search-input-wrapper{position:relative;flex:1;display:flex;align-items:center;max-width:50%;min-width:300px}.clear-all-filters-link{background:none;border:none;color:#0f8bfd;cursor:pointer;padding:8px 12px;border-radius:4px;font-size:16px;font-weight:500;text-decoration:none!important;transition:background-color .2s ease,color .2s ease;white-space:nowrap;flex-shrink:0;display:flex;justify-content:center;align-items:center;gap:4px}.filters-section{display:flex;align-items:center;gap:1rem;flex-shrink:0;margin-left:auto}.filters-section .actions-menu{position:relative}.filters-section .actions-menu .actions-btn{background:#0f8bfd;border:none;border-radius:8px;padding:8px 10px;color:#fff;font-size:12px;font-weight:700;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s ease;white-space:nowrap}.filters-section .actions-menu .actions-btn:hover{background:#0d7ae6;transform:translateY(-1px)}.filters-section .actions-menu .actions-btn:active{transform:translateY(0)}.filters-section .actions-menu .actions-btn.active{background:#0d7ae6}.filters-section .actions-menu .actions-btn:focus{outline:none;box-shadow:0 0 0 3px #0f8bfd4d}.filters-section .actions-menu .actions-btn i{font-size:.75rem;transition:transform .2s}.filters-section .actions-menu .actions-btn i.rotated{transform:rotate(180deg)}.filters-section .actions-menu .actions-dropdown{position:absolute;top:calc(100% + .5rem);right:0;background:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;z-index:1000;min-width:200px;overflow:hidden}.filters-section .actions-menu .actions-dropdown .dropdown-item{padding:.75rem 1rem;cursor:pointer;color:#374151;font-size:.875rem;transition:background-color .2s;display:flex;align-items:center;gap:.75rem}.filters-section .actions-menu .actions-dropdown .dropdown-item i{font-size:1rem;color:#6b7280}.filters-section .actions-menu .actions-dropdown .dropdown-item:hover{background-color:#f3f4f6}.filters-section .actions-menu .actions-dropdown .dropdown-item:not(:last-child){border-bottom:1px solid #f3f4f6}.filters-section .actions-menu .actions-dropdown .dropdown-item:active{background-color:#e5e7eb}.search-icon{position:absolute;left:12px;color:#6c757d;z-index:1}.search-input{width:100%;padding:10px 12px;border:1px solid #dee2e6;border-radius:8px;font-size:14px;outline:none;transition:border-color .2s ease,box-shadow .2s ease}.search-input:focus{border-color:#0f8bfd;box-shadow:0 0 0 3px #0f8bfd1a}.search-input::placeholder{color:#6c757d}.clear-button{position:absolute;right:12px;background:none;border:none;color:#6c757d;cursor:pointer;padding:4px;border-radius:4px;transition:background-color .2s ease,color .2s ease}.clear-button:hover{background-color:#f8f9fa;color:#495057}@media (max-width: 768px){.search-container{flex-direction:column;gap:.75rem}.search-input-wrapper{max-width:100%}.filters-section{width:100%;justify-content:center;gap:.5rem}.filters-section .actions-menu .actions-btn{width:auto;justify-content:center}.filters-section .actions-menu .actions-dropdown{left:50%;transform:translate(-50%);right:auto}}\n"] }]
|
|
4790
4787
|
}], ctorParameters: () => [{ type: DocumentHelperService }, { type: DocumentQuery }], propDecorators: { contextId: [{
|
|
4791
4788
|
type: Input
|
|
4792
4789
|
}], onActionClick: [{
|
|
@@ -5690,70 +5687,86 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
5690
5687
|
}]
|
|
5691
5688
|
}], ctorParameters: () => [{ type: DocumentUploadService }, { type: DocumentHttpService }, { type: DocumentQuery }, { type: DocumentStore }, { type: DocumentTableBuilderService }, { type: DocumentHelperService }] });
|
|
5692
5689
|
|
|
5690
|
+
/**
|
|
5691
|
+
* Service to observe section visibility and scroll state; deselects menu item when section scrolls out of view.
|
|
5692
|
+
*/
|
|
5693
5693
|
class DocumentScrollService {
|
|
5694
5694
|
documentStore;
|
|
5695
5695
|
sectionObserver = null;
|
|
5696
5696
|
currentObservedSection = null;
|
|
5697
5697
|
isScrolling = false;
|
|
5698
|
+
/** @type {(() => void) | null} */
|
|
5698
5699
|
scrollHandler = null;
|
|
5699
5700
|
scrollTimeout = null;
|
|
5701
|
+
/** Pending deselect scheduled on ratio=0. Cancelled when ratio>0 so we don't deselect after a stale ratio=0. */
|
|
5702
|
+
deselectTimeoutId = null;
|
|
5700
5703
|
constructor(documentStore) {
|
|
5701
5704
|
this.documentStore = documentStore;
|
|
5702
5705
|
}
|
|
5703
5706
|
/**
|
|
5704
|
-
* Sets up scroll event listeners to track scrolling state
|
|
5705
|
-
* @param containerElement - The container element to monitor for scroll events
|
|
5707
|
+
* Sets up scroll event listeners to track scrolling state.
|
|
5708
|
+
* @param {HTMLElement} containerElement - The container element to monitor for scroll events
|
|
5706
5709
|
*/
|
|
5707
5710
|
setupScrollListeners(containerElement) {
|
|
5708
5711
|
if (containerElement) {
|
|
5712
|
+
/** Scroll handler: sets isScrolling and resets after 150ms */
|
|
5709
5713
|
this.scrollHandler = () => {
|
|
5710
5714
|
this.isScrolling = true;
|
|
5711
|
-
if (this.scrollTimeout)
|
|
5715
|
+
if (this.scrollTimeout)
|
|
5712
5716
|
clearTimeout(this.scrollTimeout);
|
|
5713
|
-
}
|
|
5714
|
-
this.scrollTimeout = setTimeout(() => {
|
|
5715
|
-
this.isScrolling = false;
|
|
5716
|
-
}, 150);
|
|
5717
|
+
this.scrollTimeout = setTimeout(() => { this.isScrolling = false; }, 150);
|
|
5717
5718
|
};
|
|
5718
5719
|
containerElement.addEventListener('scroll', this.scrollHandler);
|
|
5719
5720
|
}
|
|
5720
5721
|
}
|
|
5721
5722
|
/**
|
|
5722
|
-
* Sets up intersection observer to
|
|
5723
|
-
* @param sectionElement - The section element to observe
|
|
5724
|
-
* @param menuItemId - The ID of the selected menu item
|
|
5723
|
+
* Sets up intersection observer to deselect when the selected section scrolls out of view.
|
|
5724
|
+
* @param {Element} sectionElement - The section element to observe
|
|
5725
|
+
* @param {string} menuItemId - The ID of the selected menu item
|
|
5725
5726
|
*/
|
|
5726
5727
|
setupSectionObserver(sectionElement, menuItemId) {
|
|
5728
|
+
this.cancelPendingDeselect();
|
|
5727
5729
|
this.disconnectSectionObserver();
|
|
5728
5730
|
setTimeout(() => {
|
|
5729
|
-
if (!menuItemId || this.isScrolling)
|
|
5731
|
+
if (!menuItemId || this.isScrolling)
|
|
5730
5732
|
return;
|
|
5731
|
-
}
|
|
5732
|
-
this.sectionObserver = new IntersectionObserver((entries) => {
|
|
5733
|
-
entries.forEach(entry => {
|
|
5734
|
-
if (entry.intersectionRatio === 0) {
|
|
5735
|
-
setTimeout(() => {
|
|
5736
|
-
if (this.sectionObserver && menuItemId && entry.intersectionRatio === 0) {
|
|
5737
|
-
this.documentStore.setSelectedMenuItem(null);
|
|
5738
|
-
this.disconnectSectionObserver();
|
|
5739
|
-
}
|
|
5740
|
-
}, 200);
|
|
5741
|
-
}
|
|
5742
|
-
});
|
|
5743
|
-
}, {
|
|
5744
|
-
threshold: [0, 0.1, 0.5, 1],
|
|
5745
|
-
rootMargin: '0px'
|
|
5746
|
-
});
|
|
5747
|
-
// Always start observing regardless of current visibility
|
|
5748
|
-
// The IntersectionObserver will handle visibility changes automatically
|
|
5733
|
+
this.sectionObserver = new IntersectionObserver((entries) => this.handleIntersectionEntries(entries, menuItemId), { threshold: [0, 0.1, 0.5, 1], rootMargin: '0px' });
|
|
5749
5734
|
this.sectionObserver.observe(sectionElement);
|
|
5750
5735
|
this.currentObservedSection = sectionElement;
|
|
5751
5736
|
}, 1200);
|
|
5752
5737
|
}
|
|
5738
|
+
/**
|
|
5739
|
+
* Handles IntersectionObserver entries: cancel pending deselect when visible, schedule deselect when ratio=0.
|
|
5740
|
+
* @param {IntersectionObserverEntry[]} entries - Observer entries
|
|
5741
|
+
* @param {string} menuItemId - Selected menu item id
|
|
5742
|
+
*/
|
|
5743
|
+
handleIntersectionEntries(entries, menuItemId) {
|
|
5744
|
+
entries.forEach(entry => {
|
|
5745
|
+
const ratio = entry.intersectionRatio;
|
|
5746
|
+
if (ratio > 0)
|
|
5747
|
+
this.cancelPendingDeselect();
|
|
5748
|
+
if (ratio === 0) {
|
|
5749
|
+
this.cancelPendingDeselect();
|
|
5750
|
+
this.deselectTimeoutId = setTimeout(() => {
|
|
5751
|
+
this.deselectTimeoutId = null;
|
|
5752
|
+
if (this.sectionObserver && menuItemId)
|
|
5753
|
+
this.documentStore.setSelectedMenuItem(null);
|
|
5754
|
+
this.disconnectSectionObserver();
|
|
5755
|
+
}, 200);
|
|
5756
|
+
}
|
|
5757
|
+
});
|
|
5758
|
+
}
|
|
5759
|
+
cancelPendingDeselect() {
|
|
5760
|
+
if (this.deselectTimeoutId != null) {
|
|
5761
|
+
clearTimeout(this.deselectTimeoutId);
|
|
5762
|
+
this.deselectTimeoutId = null;
|
|
5763
|
+
}
|
|
5764
|
+
}
|
|
5753
5765
|
/**
|
|
5754
5766
|
* Disconnects the section observer
|
|
5755
5767
|
*/
|
|
5756
5768
|
disconnectSectionObserver() {
|
|
5769
|
+
this.cancelPendingDeselect();
|
|
5757
5770
|
if (this.sectionObserver) {
|
|
5758
5771
|
this.sectionObserver.disconnect();
|
|
5759
5772
|
this.sectionObserver = null;
|
|
@@ -5767,8 +5780,8 @@ class DocumentScrollService {
|
|
|
5767
5780
|
this.isScrolling = true;
|
|
5768
5781
|
}
|
|
5769
5782
|
/**
|
|
5770
|
-
* Resets the scrolling flag after a specified delay
|
|
5771
|
-
* @param delay - Delay in milliseconds before resetting the flag
|
|
5783
|
+
* Resets the scrolling flag after a specified delay.
|
|
5784
|
+
* @param {number} [delay=1200] - Delay in milliseconds before resetting the flag
|
|
5772
5785
|
*/
|
|
5773
5786
|
resetScrollingAfterDelay(delay = 1200) {
|
|
5774
5787
|
setTimeout(() => {
|
|
@@ -5776,7 +5789,8 @@ class DocumentScrollService {
|
|
|
5776
5789
|
}, delay);
|
|
5777
5790
|
}
|
|
5778
5791
|
/**
|
|
5779
|
-
* Gets the current scrolling state
|
|
5792
|
+
* Gets the current scrolling state.
|
|
5793
|
+
* @returns {boolean} True when a scroll is in progress
|
|
5780
5794
|
*/
|
|
5781
5795
|
get isCurrentlyScrolling() {
|
|
5782
5796
|
return this.isScrolling;
|
|
@@ -5789,8 +5803,8 @@ class DocumentScrollService {
|
|
|
5789
5803
|
this.cleanupScrollListeners();
|
|
5790
5804
|
}
|
|
5791
5805
|
/**
|
|
5792
|
-
* Removes scroll event listeners
|
|
5793
|
-
* @param containerElement - The container element to remove listeners from
|
|
5806
|
+
* Removes scroll event listeners.
|
|
5807
|
+
* @param {HTMLElement} [containerElement] - The container element to remove listeners from
|
|
5794
5808
|
*/
|
|
5795
5809
|
cleanupScrollListeners(containerElement) {
|
|
5796
5810
|
if (containerElement && this.scrollHandler) {
|