@coreui/angular-pro 4.7.7 → 4.7.9
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/esm2022/lib/backdrop/backdrop.service.mjs +3 -2
- package/esm2022/lib/carousel/carousel/carousel.component.mjs +34 -34
- package/esm2022/lib/date-range-picker/date-range-picker/date-range-picker.component.mjs +7 -4
- package/esm2022/lib/multi-select/multi-select/multi-select.component.mjs +7 -7
- package/esm2022/lib/navbar/navbar.component.mjs +2 -2
- package/esm2022/lib/offcanvas/offcanvas/offcanvas.component.mjs +4 -4
- package/esm2022/lib/popover/popover.directive.mjs +19 -21
- package/esm2022/lib/services/intersection.service.mjs +29 -12
- package/esm2022/lib/sidebar/sidebar/sidebar.component.mjs +11 -12
- package/esm2022/lib/tooltip/tooltip.directive.mjs +16 -17
- package/fesm2022/coreui-angular-pro.mjs +133 -119
- package/fesm2022/coreui-angular-pro.mjs.map +1 -1
- package/lib/carousel/carousel/carousel.component.d.ts +1 -2
- package/lib/popover/popover.directive.d.ts +1 -1
- package/lib/services/intersection.service.d.ts +7 -9
- package/lib/tooltip/tooltip.directive.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, Input, NgModule, HostBinding, Injectable, Component, EventEmitter, Output, booleanAttribute, ContentChildren, HostListener, inject, RendererFactory2, Pipe, ViewChildren, Inject, ViewChild, forwardRef, Optional, ElementRef, ContentChild,
|
|
2
|
+
import { Directive, Input, NgModule, HostBinding, Injectable, Component, EventEmitter, Output, booleanAttribute, ContentChildren, HostListener, inject, RendererFactory2, Pipe, ViewChildren, PLATFORM_ID, DestroyRef, Inject, ViewChild, forwardRef, Optional, ElementRef, ContentChild, ChangeDetectionStrategy, signal, computed, NgZone, numberAttribute, effect, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
3
3
|
import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
|
|
4
4
|
import * as i1$2 from '@angular/common';
|
|
5
|
-
import { NgTemplateOutlet, NgIf, NgClass, DOCUMENT, NgForOf, AsyncPipe, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, CommonModule, formatDate, I18nPluralPipe, isPlatformBrowser } from '@angular/common';
|
|
5
|
+
import { NgTemplateOutlet, NgIf, NgClass, DOCUMENT, NgForOf, AsyncPipe, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, isPlatformServer, CommonModule, formatDate, I18nPluralPipe, isPlatformBrowser } from '@angular/common';
|
|
6
6
|
import * as i1 from '@angular/animations';
|
|
7
7
|
import { animate, animation, style, useAnimation, state, transition, trigger, query, group } from '@angular/animations';
|
|
8
|
-
import { Subject, BehaviorSubject, Observable, fromEvent,
|
|
8
|
+
import { Subject, BehaviorSubject, Observable, fromEvent, skip, distinctUntilChanged as distinctUntilChanged$1, map as map$1, debounceTime as debounceTime$1 } from 'rxjs';
|
|
9
9
|
import * as i1$1 from '@angular/router';
|
|
10
10
|
import { RouterModule, NavigationEnd, RouterLink } from '@angular/router';
|
|
11
11
|
import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
|
|
12
|
-
import { filter, tap, distinctUntilChanged, debounceTime, map, delay, combineLatestWith, take } from 'rxjs/operators';
|
|
12
|
+
import { filter, finalize, withLatestFrom, zipWith, tap, distinctUntilChanged, debounceTime, map, delay, combineLatestWith, take } from 'rxjs/operators';
|
|
13
13
|
import * as i1$3 from '@angular/forms';
|
|
14
14
|
import { Validators, FormControl, FormGroup, NG_VALUE_ACCESSOR, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
15
15
|
import { createPopper } from '@popperjs/core';
|
|
@@ -1087,7 +1087,8 @@ class BackdropService {
|
|
|
1087
1087
|
get #scrollbarWidth() {
|
|
1088
1088
|
// https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
|
|
1089
1089
|
const documentWidth = this.#document.documentElement.clientWidth;
|
|
1090
|
-
const scrollbarWidth = Math.abs((window?.innerWidth ?? documentWidth) - documentWidth);
|
|
1090
|
+
// const scrollbarWidth = Math.abs((window?.innerWidth ?? documentWidth) - documentWidth);
|
|
1091
|
+
const scrollbarWidth = Math.abs((this.#document.defaultView?.innerWidth ?? documentWidth) - documentWidth);
|
|
1091
1092
|
return `${scrollbarWidth}px`;
|
|
1092
1093
|
}
|
|
1093
1094
|
setBackdrop(type = 'modal') {
|
|
@@ -3162,37 +3163,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImpor
|
|
|
3162
3163
|
}]
|
|
3163
3164
|
}] });
|
|
3164
3165
|
|
|
3165
|
-
class IntersectionService {
|
|
3166
|
-
constructor() {
|
|
3167
|
-
this.intersecting = new BehaviorSubject(false);
|
|
3168
|
-
this.intersecting$ = this.intersecting.asObservable();
|
|
3169
|
-
this.defaultObserverOptions = {
|
|
3170
|
-
root: null,
|
|
3171
|
-
rootMargin: '0px',
|
|
3172
|
-
threshold: 0.2
|
|
3173
|
-
};
|
|
3174
|
-
}
|
|
3175
|
-
createIntersectionObserver(hostElement, observerOptions = this.defaultObserverOptions) {
|
|
3176
|
-
const options = { ...this.defaultObserverOptions, ...observerOptions };
|
|
3177
|
-
this.hostElement = hostElement;
|
|
3178
|
-
const handleIntersect = (entries, observer) => {
|
|
3179
|
-
entries.forEach((entry) => {
|
|
3180
|
-
this.intersecting.next(entry.isIntersecting);
|
|
3181
|
-
});
|
|
3182
|
-
};
|
|
3183
|
-
this.intersectionObserver = new IntersectionObserver(handleIntersect, options);
|
|
3184
|
-
this.intersectionObserver.observe(hostElement.nativeElement);
|
|
3185
|
-
}
|
|
3186
|
-
ngOnDestroy() {
|
|
3187
|
-
this.intersectionObserver?.unobserve(this.hostElement?.nativeElement);
|
|
3188
|
-
}
|
|
3189
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: IntersectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3190
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: IntersectionService }); }
|
|
3191
|
-
}
|
|
3192
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: IntersectionService, decorators: [{
|
|
3193
|
-
type: Injectable
|
|
3194
|
-
}], ctorParameters: () => [] });
|
|
3195
|
-
|
|
3196
3166
|
class ListenersService {
|
|
3197
3167
|
constructor(renderer) {
|
|
3198
3168
|
this.renderer = renderer;
|
|
@@ -3341,6 +3311,53 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImpor
|
|
|
3341
3311
|
type: Injectable
|
|
3342
3312
|
}] });
|
|
3343
3313
|
|
|
3314
|
+
class IntersectionService {
|
|
3315
|
+
constructor() {
|
|
3316
|
+
this.platformId = inject(PLATFORM_ID);
|
|
3317
|
+
this.#intersecting = new BehaviorSubject({ isIntersecting: false });
|
|
3318
|
+
this.intersecting$ = this.#intersecting.asObservable();
|
|
3319
|
+
this.defaultObserverOptions = {
|
|
3320
|
+
root: null,
|
|
3321
|
+
rootMargin: '0px',
|
|
3322
|
+
threshold: 0.2
|
|
3323
|
+
};
|
|
3324
|
+
this.hostElementRefs = new Map();
|
|
3325
|
+
}
|
|
3326
|
+
#intersecting;
|
|
3327
|
+
createIntersectionObserver(hostElement, observerOptions = this.defaultObserverOptions) {
|
|
3328
|
+
if (isPlatformServer(this.platformId)) {
|
|
3329
|
+
this.#intersecting.next({ isIntersecting: true, hostElement });
|
|
3330
|
+
return;
|
|
3331
|
+
}
|
|
3332
|
+
const options = { ...this.defaultObserverOptions, ...observerOptions };
|
|
3333
|
+
const handleIntersect = (entries, observer) => {
|
|
3334
|
+
entries.forEach((entry) => {
|
|
3335
|
+
this.#intersecting.next({ isIntersecting: entry.isIntersecting, hostElement });
|
|
3336
|
+
});
|
|
3337
|
+
};
|
|
3338
|
+
this.hostElementRefs.set(hostElement, new IntersectionObserver(handleIntersect, options));
|
|
3339
|
+
this.hostElementRefs.get(hostElement)?.observe(hostElement.nativeElement);
|
|
3340
|
+
}
|
|
3341
|
+
unobserve(elementRef) {
|
|
3342
|
+
this.hostElementRefs.get(elementRef)?.unobserve(elementRef.nativeElement);
|
|
3343
|
+
this.hostElementRefs.set(elementRef, null);
|
|
3344
|
+
this.hostElementRefs.delete(elementRef);
|
|
3345
|
+
}
|
|
3346
|
+
ngOnDestroy() {
|
|
3347
|
+
this.hostElementRefs.forEach((observer, elementRef) => {
|
|
3348
|
+
observer?.unobserve(elementRef.nativeElement);
|
|
3349
|
+
});
|
|
3350
|
+
}
|
|
3351
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: IntersectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3352
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: IntersectionService, providedIn: 'root' }); }
|
|
3353
|
+
}
|
|
3354
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: IntersectionService, decorators: [{
|
|
3355
|
+
type: Injectable,
|
|
3356
|
+
args: [{
|
|
3357
|
+
providedIn: 'root'
|
|
3358
|
+
}]
|
|
3359
|
+
}] });
|
|
3360
|
+
|
|
3344
3361
|
class CarouselComponent {
|
|
3345
3362
|
get hostClasses() {
|
|
3346
3363
|
return {
|
|
@@ -3350,6 +3367,7 @@ class CarouselComponent {
|
|
|
3350
3367
|
'carousel-fade': this.transition === 'crossfade'
|
|
3351
3368
|
};
|
|
3352
3369
|
}
|
|
3370
|
+
#destroyRef;
|
|
3353
3371
|
constructor(config, hostElement, carouselService, carouselState, intersectionService, listenersService) {
|
|
3354
3372
|
this.config = config;
|
|
3355
3373
|
this.hostElement = hostElement;
|
|
@@ -3406,7 +3424,9 @@ class CarouselComponent {
|
|
|
3406
3424
|
* @type number
|
|
3407
3425
|
*/
|
|
3408
3426
|
this.itemChange = new EventEmitter();
|
|
3427
|
+
this.timerId = undefined;
|
|
3409
3428
|
this.activeItemInterval = 0;
|
|
3429
|
+
this.#destroyRef = inject(DestroyRef);
|
|
3410
3430
|
this._visible = true;
|
|
3411
3431
|
Object.assign(this, config);
|
|
3412
3432
|
}
|
|
@@ -3414,13 +3434,11 @@ class CarouselComponent {
|
|
|
3414
3434
|
this.carouselStateSubscribe();
|
|
3415
3435
|
}
|
|
3416
3436
|
ngOnDestroy() {
|
|
3437
|
+
this.resetTimer();
|
|
3417
3438
|
this.clearListeners();
|
|
3418
|
-
this.carouselStateSubscribe(false);
|
|
3419
|
-
this.intersectionServiceSubscribe(false);
|
|
3420
3439
|
this.swipeSubscribe(false);
|
|
3421
3440
|
}
|
|
3422
3441
|
ngAfterContentInit() {
|
|
3423
|
-
this.intersectionService.createIntersectionObserver(this.hostElement);
|
|
3424
3442
|
this.intersectionServiceSubscribe();
|
|
3425
3443
|
this.carouselState.state = { activeItemIndex: this.activeIndex, animate: this.animate };
|
|
3426
3444
|
this.setListeners();
|
|
@@ -3460,32 +3478,30 @@ class CarouselComponent {
|
|
|
3460
3478
|
}
|
|
3461
3479
|
resetTimer() {
|
|
3462
3480
|
clearTimeout(this.timerId);
|
|
3481
|
+
this.timerId = undefined;
|
|
3463
3482
|
}
|
|
3464
|
-
carouselStateSubscribe(
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
}
|
|
3475
|
-
else {
|
|
3476
|
-
this.carouselIndexSubscription?.unsubscribe();
|
|
3477
|
-
}
|
|
3483
|
+
carouselStateSubscribe() {
|
|
3484
|
+
this.carouselService.carouselIndex$
|
|
3485
|
+
.pipe(takeUntilDestroyed(this.#destroyRef))
|
|
3486
|
+
.subscribe((nextItem) => {
|
|
3487
|
+
if ('active' in nextItem) {
|
|
3488
|
+
this.itemChange.emit(nextItem.active);
|
|
3489
|
+
}
|
|
3490
|
+
this.activeItemInterval = typeof nextItem.interval === 'number' && nextItem.interval > -1 ? nextItem.interval : this.interval;
|
|
3491
|
+
const isLastItem = ((nextItem.active === nextItem.lastItemIndex) && this.direction === 'next') || ((nextItem.active === 0) && this.direction === 'prev');
|
|
3492
|
+
!this.wrap && isLastItem ? this.resetTimer() : this.setTimer();
|
|
3493
|
+
});
|
|
3478
3494
|
}
|
|
3479
|
-
intersectionServiceSubscribe(
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
this.
|
|
3488
|
-
}
|
|
3495
|
+
intersectionServiceSubscribe() {
|
|
3496
|
+
this.intersectionService.createIntersectionObserver(this.hostElement);
|
|
3497
|
+
this.intersectionService.intersecting$
|
|
3498
|
+
.pipe(filter(next => next.hostElement === this.hostElement), finalize(() => {
|
|
3499
|
+
this.intersectionService.unobserve(this.hostElement);
|
|
3500
|
+
}), takeUntilDestroyed(this.#destroyRef))
|
|
3501
|
+
.subscribe(next => {
|
|
3502
|
+
this.visible = next.isIntersecting;
|
|
3503
|
+
next.isIntersecting ? this.setTimer() : this.resetTimer();
|
|
3504
|
+
});
|
|
3489
3505
|
}
|
|
3490
3506
|
swipeSubscribe(subscribe = true) {
|
|
3491
3507
|
if (this.touch && subscribe) {
|
|
@@ -3493,7 +3509,7 @@ class CarouselComponent {
|
|
|
3493
3509
|
const touchStart$ = fromEvent(carouselElement, 'touchstart');
|
|
3494
3510
|
const touchEnd$ = fromEvent(carouselElement, 'touchend');
|
|
3495
3511
|
const touchMove$ = fromEvent(carouselElement, 'touchmove');
|
|
3496
|
-
this.swipeSubscription = touchStart$.pipe(zipWith(touchEnd$.pipe(withLatestFrom(touchMove$))))
|
|
3512
|
+
this.swipeSubscription = touchStart$.pipe(zipWith(touchEnd$.pipe(withLatestFrom(touchMove$))), takeUntilDestroyed(this.#destroyRef))
|
|
3497
3513
|
.subscribe(([touchstart, [touchend, touchmove]]) => {
|
|
3498
3514
|
touchstart.stopPropagation();
|
|
3499
3515
|
touchmove.stopPropagation();
|
|
@@ -3509,11 +3525,11 @@ class CarouselComponent {
|
|
|
3509
3525
|
}
|
|
3510
3526
|
}
|
|
3511
3527
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: CarouselComponent, deps: [{ token: CarouselConfig }, { token: i0.ElementRef }, { token: CarouselService }, { token: CarouselState }, { token: IntersectionService }, { token: ListenersService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3512
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", type: CarouselComponent, isStandalone: true, selector: "c-carousel", inputs: { activeIndex: "activeIndex", animate: "animate", dark: "dark", direction: "direction", interval: "interval", pause: "pause", touch: "touch", transition: "transition", wrap: "wrap" }, outputs: { itemChange: "itemChange" }, host: { properties: { "class": "this.hostClasses" } }, providers: [CarouselService, CarouselState, CarouselConfig,
|
|
3528
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", type: CarouselComponent, isStandalone: true, selector: "c-carousel", inputs: { activeIndex: "activeIndex", animate: "animate", dark: "dark", direction: "direction", interval: "interval", pause: "pause", touch: "touch", transition: "transition", wrap: "wrap" }, outputs: { itemChange: "itemChange" }, host: { properties: { "class": "this.hostClasses" } }, providers: [CarouselService, CarouselState, CarouselConfig, ListenersService], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{display:block}\n"] }); }
|
|
3513
3529
|
}
|
|
3514
3530
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: CarouselComponent, decorators: [{
|
|
3515
3531
|
type: Component,
|
|
3516
|
-
args: [{ selector: 'c-carousel', template: '<ng-content></ng-content>', providers: [CarouselService, CarouselState, CarouselConfig,
|
|
3532
|
+
args: [{ selector: 'c-carousel', template: '<ng-content></ng-content>', providers: [CarouselService, CarouselState, CarouselConfig, ListenersService], standalone: true, styles: [":host{display:block}\n"] }]
|
|
3517
3533
|
}], ctorParameters: () => [{ type: CarouselConfig, decorators: [{
|
|
3518
3534
|
type: Inject,
|
|
3519
3535
|
args: [CarouselConfig]
|
|
@@ -7114,7 +7130,7 @@ class DateRangePickerComponent {
|
|
|
7114
7130
|
this.endDate = time ?? this.endDate;
|
|
7115
7131
|
}
|
|
7116
7132
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: DateRangePickerComponent, deps: [{ token: i1$4.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7117
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", type: DateRangePickerComponent, isStandalone: true, selector: "c-date-range-picker", inputs: { dayFormat: "dayFormat", calendars: "calendars", cleaner: "cleaner", closeOnSelect: "closeOnSelect", format: "format", indicator: "indicator", inputReadOnly: "inputReadOnly", navYearFirst: "navYearFirst", placeholder: "placeholder", ranges: "ranges", rangesButtonsColor: "rangesButtonsColor", rangesButtonsSize: "rangesButtonsSize", rangesButtonsVariant: "rangesButtonsVariant", separator: "separator", size: "size", timepicker: "timepicker", valid: "valid", visible: "visible", startDate: "startDate", endDate: "endDate", calendarDate: "calendarDate", disabledDates: "disabledDates", firstDayOfWeek: "firstDayOfWeek", locale: "locale", maxDate: "maxDate", minDate: "minDate", navigation: "navigation", range: "range", dateFilter: "dateFilter", disabled: "disabled", value: "value", weekdayFormat: "weekdayFormat", popperjsOptions: ["popperOptions", "popperjsOptions"], selectAdjacentDays: "selectAdjacentDays", showAdjacentDays: "showAdjacentDays" }, outputs: { valueChange: "valueChange", calendarCellHover: "calendarCellHover", calendarDateChange: "calendarDateChange", endDateChange: "endDateChange", startDateChange: "startDateChange" }, host: { listeners: { "
|
|
7133
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", type: DateRangePickerComponent, isStandalone: true, selector: "c-date-range-picker", inputs: { dayFormat: "dayFormat", calendars: "calendars", cleaner: "cleaner", closeOnSelect: "closeOnSelect", format: "format", indicator: "indicator", inputReadOnly: "inputReadOnly", navYearFirst: "navYearFirst", placeholder: "placeholder", ranges: "ranges", rangesButtonsColor: "rangesButtonsColor", rangesButtonsSize: "rangesButtonsSize", rangesButtonsVariant: "rangesButtonsVariant", separator: "separator", size: "size", timepicker: "timepicker", valid: "valid", visible: "visible", startDate: "startDate", endDate: "endDate", calendarDate: "calendarDate", disabledDates: "disabledDates", firstDayOfWeek: "firstDayOfWeek", locale: "locale", maxDate: "maxDate", minDate: "minDate", navigation: "navigation", range: "range", dateFilter: "dateFilter", disabled: "disabled", value: "value", weekdayFormat: "weekdayFormat", popperjsOptions: ["popperOptions", "popperjsOptions"], selectAdjacentDays: "selectAdjacentDays", showAdjacentDays: "showAdjacentDays" }, outputs: { valueChange: "valueChange", calendarCellHover: "calendarCellHover", calendarDateChange: "calendarDateChange", endDateChange: "endDateChange", startDateChange: "startDateChange" }, host: { listeners: { "focusout": "onBlur()" }, properties: { "class": "this.datePickerClasses" } }, providers: [
|
|
7118
7134
|
{
|
|
7119
7135
|
provide: NG_VALUE_ACCESSOR,
|
|
7120
7136
|
useExisting: forwardRef(() => DateRangePickerComponent),
|
|
@@ -7239,7 +7255,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImpor
|
|
|
7239
7255
|
args: [TemplateIdDirective, { descendants: true }]
|
|
7240
7256
|
}], onBlur: [{
|
|
7241
7257
|
type: HostListener,
|
|
7242
|
-
args: ['
|
|
7258
|
+
args: ['focusout']
|
|
7259
|
+
}], datePickerClasses: [{
|
|
7260
|
+
type: HostBinding,
|
|
7261
|
+
args: ['class']
|
|
7243
7262
|
}] } });
|
|
7244
7263
|
|
|
7245
7264
|
class DateRangePickerModule {
|
|
@@ -8982,10 +9001,10 @@ const observeReferenceModifier = {
|
|
|
8982
9001
|
instance.update();
|
|
8983
9002
|
});
|
|
8984
9003
|
// @ts-ignore
|
|
8985
|
-
reference[RO_PROP]
|
|
9004
|
+
reference[RO_PROP]?.observe(reference);
|
|
8986
9005
|
return () => {
|
|
8987
9006
|
// @ts-ignore
|
|
8988
|
-
reference[RO_PROP]
|
|
9007
|
+
reference[RO_PROP]?.disconnect();
|
|
8989
9008
|
// @ts-ignore
|
|
8990
9009
|
delete reference[RO_PROP];
|
|
8991
9010
|
};
|
|
@@ -9913,8 +9932,8 @@ class MultiSelectComponent {
|
|
|
9913
9932
|
this.scrollViewport = scrollViewport;
|
|
9914
9933
|
const cdkVirtualScrollContentWrapper = this.scrollViewport.getElementRef().nativeElement?.firstElementChild;
|
|
9915
9934
|
if (cdkVirtualScrollContentWrapper) {
|
|
9916
|
-
const style = getComputedStyle(cdkVirtualScrollContentWrapper, null);
|
|
9917
|
-
const padding = parseInt(style
|
|
9935
|
+
const style = getComputedStyle(cdkVirtualScrollContentWrapper, null) ?? undefined;
|
|
9936
|
+
const padding = parseInt(style?.getPropertyValue('padding-left') ?? '12px') * 3;
|
|
9918
9937
|
const observer = new MutationObserver((mutationRecords) => {
|
|
9919
9938
|
mutationRecords.forEach(child => {
|
|
9920
9939
|
child.addedNodes.forEach(node => {
|
|
@@ -9927,9 +9946,9 @@ class MultiSelectComponent {
|
|
|
9927
9946
|
});
|
|
9928
9947
|
});
|
|
9929
9948
|
});
|
|
9930
|
-
observer
|
|
9949
|
+
observer?.observe(cdkVirtualScrollContentWrapper, { childList: true });
|
|
9931
9950
|
this.#destroy$.subscribe(() => {
|
|
9932
|
-
observer
|
|
9951
|
+
observer?.disconnect();
|
|
9933
9952
|
});
|
|
9934
9953
|
}
|
|
9935
9954
|
}
|
|
@@ -10355,7 +10374,7 @@ class NavbarComponent {
|
|
|
10355
10374
|
}
|
|
10356
10375
|
get breakpoint() {
|
|
10357
10376
|
if (typeof this.expand === 'string') {
|
|
10358
|
-
return getComputedStyle(this.hostElement.nativeElement)
|
|
10377
|
+
return getComputedStyle(this.hostElement.nativeElement)?.getPropertyValue(`--cui-breakpoint-${this.expand}`) ?? false;
|
|
10359
10378
|
}
|
|
10360
10379
|
return false;
|
|
10361
10380
|
}
|
|
@@ -11252,7 +11271,7 @@ class OffcanvasComponent {
|
|
|
11252
11271
|
}
|
|
11253
11272
|
const element = this.document.documentElement;
|
|
11254
11273
|
const responsiveBreakpoint = this.responsive;
|
|
11255
|
-
const breakpointValue = getComputedStyle(element)
|
|
11274
|
+
const breakpointValue = getComputedStyle(element)?.getPropertyValue(`--cui-breakpoint-${responsiveBreakpoint.trim()}`) ?? false;
|
|
11256
11275
|
return breakpointValue ? `${parseFloat(breakpointValue.trim()) - 0.02}px` : false;
|
|
11257
11276
|
}
|
|
11258
11277
|
animateStart(event) {
|
|
@@ -11351,7 +11370,7 @@ class OffcanvasComponent {
|
|
|
11351
11370
|
}
|
|
11352
11371
|
}
|
|
11353
11372
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: OffcanvasComponent, deps: [{ token: DOCUMENT }, { token: PLATFORM_ID }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: OffcanvasService }, { token: BackdropService }, { token: i1$4.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11354
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.0.8", type: OffcanvasComponent, isStandalone: true, selector: "c-offcanvas", inputs: { backdrop: "backdrop", keyboard: ["keyboard", "keyboard", booleanAttribute], placement: "placement", responsive: "responsive", id: "id", role: "role", ariaModal: ["ariaModal", "ariaModal", booleanAttribute], scroll: ["scroll", "scroll", booleanAttribute], visible: ["visible", "visible", booleanAttribute] }, outputs: { visibleChange: "visibleChange" }, host: { listeners: { "@showHide.start": "animateStart($event)", "@showHide.done": "animateDone($event)", "document:keydown": "onKeyDownHandler($event)" }, properties: { "attr.role": "this.role", "attr.aria-modal": "this.ariaModal", "class": "this.hostClasses", "attr.aria-hidden": "this.ariaHidden", "attr.tabindex": "this.tabIndex", "@showHide": "this.animateTrigger" } }, exportAs: ["cOffcanvas"], ngImport: i0, template: "<div cdkTrapFocus cdkTrapFocusAutoCapture>\n <ng-content></ng-content>\n</div>\n\n", styles: [":host{display:none}\n"], dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1$5.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }], animations: [
|
|
11373
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.0.8", type: OffcanvasComponent, isStandalone: true, selector: "c-offcanvas", inputs: { backdrop: "backdrop", keyboard: ["keyboard", "keyboard", booleanAttribute], placement: "placement", responsive: "responsive", id: "id", role: "role", ariaModal: ["ariaModal", "ariaModal", booleanAttribute], scroll: ["scroll", "scroll", booleanAttribute], visible: ["visible", "visible", booleanAttribute] }, outputs: { visibleChange: "visibleChange" }, host: { attributes: { "ngSkipHydration": "true" }, listeners: { "@showHide.start": "animateStart($event)", "@showHide.done": "animateDone($event)", "document:keydown": "onKeyDownHandler($event)" }, properties: { "attr.role": "this.role", "attr.aria-modal": "this.ariaModal", "class": "this.hostClasses", "attr.aria-hidden": "this.ariaHidden", "attr.tabindex": "this.tabIndex", "@showHide": "this.animateTrigger" } }, exportAs: ["cOffcanvas"], ngImport: i0, template: "<div cdkTrapFocus cdkTrapFocusAutoCapture>\n <ng-content></ng-content>\n</div>\n\n", styles: [":host{display:none}\n"], dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1$5.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }], animations: [
|
|
11355
11374
|
trigger('showHide', [
|
|
11356
11375
|
state('visible', style({
|
|
11357
11376
|
// visibility: 'visible'
|
|
@@ -11375,7 +11394,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImpor
|
|
|
11375
11394
|
})),
|
|
11376
11395
|
transition('visible <=> *', [animate('300ms')])
|
|
11377
11396
|
])
|
|
11378
|
-
], exportAs: 'cOffcanvas', standalone: true, imports: [A11yModule], template: "<div cdkTrapFocus cdkTrapFocusAutoCapture>\n <ng-content></ng-content>\n</div>\n\n", styles: [":host{display:none}\n"] }]
|
|
11397
|
+
], exportAs: 'cOffcanvas', standalone: true, imports: [A11yModule], host: { ngSkipHydration: 'true' }, template: "<div cdkTrapFocus cdkTrapFocusAutoCapture>\n <ng-content></ng-content>\n</div>\n\n", styles: [":host{display:none}\n"] }]
|
|
11379
11398
|
}], ctorParameters: () => [{ type: Document, decorators: [{
|
|
11380
11399
|
type: Inject,
|
|
11381
11400
|
args: [DOCUMENT]
|
|
@@ -11954,6 +11973,7 @@ class PopoverDirective {
|
|
|
11954
11973
|
get ariaDescribedBy() {
|
|
11955
11974
|
return this.popoverId ? this.popoverId : null;
|
|
11956
11975
|
}
|
|
11976
|
+
#destroyRef;
|
|
11957
11977
|
constructor(document, renderer, hostElement, viewContainerRef, listenersService, changeDetectorRef, intersectionService) {
|
|
11958
11978
|
this.document = document;
|
|
11959
11979
|
this.renderer = renderer;
|
|
@@ -11987,9 +12007,9 @@ class PopoverDirective {
|
|
|
11987
12007
|
}
|
|
11988
12008
|
]
|
|
11989
12009
|
};
|
|
12010
|
+
this.#destroyRef = inject(DestroyRef);
|
|
11990
12011
|
}
|
|
11991
12012
|
ngAfterViewInit() {
|
|
11992
|
-
this.intersectionService.createIntersectionObserver(this.hostElement);
|
|
11993
12013
|
this.intersectionServiceSubscribe();
|
|
11994
12014
|
}
|
|
11995
12015
|
ngOnChanges(changes) {
|
|
@@ -12000,7 +12020,6 @@ class PopoverDirective {
|
|
|
12000
12020
|
ngOnDestroy() {
|
|
12001
12021
|
this.clearListeners();
|
|
12002
12022
|
this.destroyPopoverElement();
|
|
12003
|
-
this.intersectionServiceSubscribe(false);
|
|
12004
12023
|
}
|
|
12005
12024
|
ngOnInit() {
|
|
12006
12025
|
this.setListeners();
|
|
@@ -12027,18 +12046,16 @@ class PopoverDirective {
|
|
|
12027
12046
|
clearListeners() {
|
|
12028
12047
|
this.listenersService.clearListeners();
|
|
12029
12048
|
}
|
|
12030
|
-
intersectionServiceSubscribe(
|
|
12031
|
-
|
|
12032
|
-
|
|
12033
|
-
|
|
12034
|
-
|
|
12035
|
-
|
|
12036
|
-
|
|
12037
|
-
|
|
12038
|
-
|
|
12039
|
-
|
|
12040
|
-
this.intersectingSubscription?.unsubscribe();
|
|
12041
|
-
}
|
|
12049
|
+
intersectionServiceSubscribe() {
|
|
12050
|
+
this.intersectionService.createIntersectionObserver(this.hostElement);
|
|
12051
|
+
this.intersectionService.intersecting$
|
|
12052
|
+
.pipe(filter(next => next.hostElement === this.hostElement), debounceTime(100), finalize(() => {
|
|
12053
|
+
this.intersectionService.unobserve(this.hostElement);
|
|
12054
|
+
}), takeUntilDestroyed(this.#destroyRef))
|
|
12055
|
+
.subscribe(next => {
|
|
12056
|
+
this.visible = next.isIntersecting ? this.visible : false;
|
|
12057
|
+
!this.visible && this.removePopoverElement();
|
|
12058
|
+
});
|
|
12042
12059
|
}
|
|
12043
12060
|
getUID(prefix) {
|
|
12044
12061
|
let uid = prefix ?? 'random-id';
|
|
@@ -12102,18 +12119,18 @@ class PopoverDirective {
|
|
|
12102
12119
|
this.popoverRef.instance.id = undefined;
|
|
12103
12120
|
this.changeDetectorRef.markForCheck();
|
|
12104
12121
|
setTimeout(() => {
|
|
12105
|
-
this.viewContainerRef
|
|
12122
|
+
this.viewContainerRef?.detach();
|
|
12106
12123
|
}, 300);
|
|
12107
12124
|
}
|
|
12108
12125
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: PopoverDirective, deps: [{ token: DOCUMENT }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: ListenersService }, { token: i0.ChangeDetectorRef }, { token: IntersectionService }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
12109
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.8", type: PopoverDirective, isStandalone: true, selector: "[cPopover]", inputs: { content: ["cPopover", "content"], popperOptions: ["cPopoverOptions", "popperOptions"], placement: ["cPopoverPlacement", "placement"], trigger: ["cPopoverTrigger", "trigger"], visible: ["cPopoverVisible", "visible"] }, host: { properties: { "attr.aria-describedby": "this.ariaDescribedBy" } }, providers: [ListenersService
|
|
12126
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.8", type: PopoverDirective, isStandalone: true, selector: "[cPopover]", inputs: { content: ["cPopover", "content"], popperOptions: ["cPopoverOptions", "popperOptions"], placement: ["cPopoverPlacement", "placement"], trigger: ["cPopoverTrigger", "trigger"], visible: ["cPopoverVisible", "visible"] }, host: { properties: { "attr.aria-describedby": "this.ariaDescribedBy" } }, providers: [ListenersService], exportAs: ["cPopover"], usesOnChanges: true, ngImport: i0 }); }
|
|
12110
12127
|
}
|
|
12111
12128
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: PopoverDirective, decorators: [{
|
|
12112
12129
|
type: Directive,
|
|
12113
12130
|
args: [{
|
|
12114
12131
|
selector: '[cPopover]',
|
|
12115
12132
|
exportAs: 'cPopover',
|
|
12116
|
-
providers: [ListenersService
|
|
12133
|
+
providers: [ListenersService],
|
|
12117
12134
|
standalone: true
|
|
12118
12135
|
}]
|
|
12119
12136
|
}], ctorParameters: () => [{ type: Document, decorators: [{
|
|
@@ -12479,7 +12496,7 @@ class SidebarComponent {
|
|
|
12479
12496
|
}
|
|
12480
12497
|
this.state = {
|
|
12481
12498
|
...this.state,
|
|
12482
|
-
...newState
|
|
12499
|
+
...newState
|
|
12483
12500
|
};
|
|
12484
12501
|
this.state.mobile && this.state.visible
|
|
12485
12502
|
? this.backdropService.setBackdrop(this)
|
|
@@ -12490,9 +12507,8 @@ class SidebarComponent {
|
|
|
12490
12507
|
}
|
|
12491
12508
|
get getMobileBreakpoint() {
|
|
12492
12509
|
const element = this.document.documentElement;
|
|
12493
|
-
const mobileBreakpoint = getComputedStyle(element)
|
|
12494
|
-
|
|
12495
|
-
const breakpointValue = getComputedStyle(element).getPropertyValue(`--cui-breakpoint-${mobileBreakpoint.trim()}`) || '768px';
|
|
12510
|
+
const mobileBreakpoint = this.document.defaultView?.getComputedStyle(element)?.getPropertyValue('--cui-mobile-breakpoint') ?? 'md';
|
|
12511
|
+
const breakpointValue = this.document.defaultView?.getComputedStyle(element)?.getPropertyValue(`--cui-breakpoint-${mobileBreakpoint.trim()}`) ?? '768px';
|
|
12496
12512
|
return `${parseFloat(breakpointValue.trim()) - 0.02}px` || '767.98px';
|
|
12497
12513
|
}
|
|
12498
12514
|
constructor(document, renderer, breakpointObserver, sidebarService, backdropService) {
|
|
@@ -12507,12 +12523,12 @@ class SidebarComponent {
|
|
|
12507
12523
|
this.#visible = false;
|
|
12508
12524
|
this.#onMobile = false;
|
|
12509
12525
|
this.state = {
|
|
12510
|
-
sidebar: this
|
|
12526
|
+
sidebar: this
|
|
12511
12527
|
};
|
|
12512
12528
|
this.#stateInitial = {
|
|
12513
12529
|
narrow: false,
|
|
12514
12530
|
visible: false,
|
|
12515
|
-
unfoldable: false
|
|
12531
|
+
unfoldable: false
|
|
12516
12532
|
};
|
|
12517
12533
|
/**
|
|
12518
12534
|
* Place sidebar in non-static positions. [docs]
|
|
@@ -12538,7 +12554,7 @@ class SidebarComponent {
|
|
|
12538
12554
|
[`sidebar-${this.colorScheme}`]: !!this.colorScheme,
|
|
12539
12555
|
[`sidebar-${this.size}`]: !!this.size,
|
|
12540
12556
|
show: visible && this.#onMobile,
|
|
12541
|
-
hide: !visible
|
|
12557
|
+
hide: !visible
|
|
12542
12558
|
};
|
|
12543
12559
|
}
|
|
12544
12560
|
ngOnInit() {
|
|
@@ -12574,11 +12590,11 @@ class SidebarComponent {
|
|
|
12574
12590
|
this.#stateInitial = {
|
|
12575
12591
|
narrow: this.narrow,
|
|
12576
12592
|
visible: this.visible,
|
|
12577
|
-
unfoldable: this.unfoldable
|
|
12593
|
+
unfoldable: this.unfoldable
|
|
12578
12594
|
};
|
|
12579
12595
|
this.sidebarService.toggle({
|
|
12580
12596
|
...this.#stateInitial,
|
|
12581
|
-
sidebar: this
|
|
12597
|
+
sidebar: this
|
|
12582
12598
|
});
|
|
12583
12599
|
}
|
|
12584
12600
|
stateToggleSubscribe(subscribe = true) {
|
|
@@ -12607,7 +12623,7 @@ class SidebarComponent {
|
|
|
12607
12623
|
mobile: isOnMobile,
|
|
12608
12624
|
unfoldable: isUnfoldable,
|
|
12609
12625
|
visible: isOnMobile ? !isOnMobile : this.#stateInitial.visible,
|
|
12610
|
-
sidebar: this
|
|
12626
|
+
sidebar: this
|
|
12611
12627
|
});
|
|
12612
12628
|
}
|
|
12613
12629
|
});
|
|
@@ -15948,6 +15964,7 @@ class TooltipDirective {
|
|
|
15948
15964
|
get ariaDescribedBy() {
|
|
15949
15965
|
return this.tooltipId ? this.tooltipId : null;
|
|
15950
15966
|
}
|
|
15967
|
+
#destroyRef;
|
|
15951
15968
|
constructor(document, renderer, hostElement, viewContainerRef, listenersService, changeDetectorRef, intersectionService) {
|
|
15952
15969
|
this.document = document;
|
|
15953
15970
|
this.renderer = renderer;
|
|
@@ -15981,9 +15998,9 @@ class TooltipDirective {
|
|
|
15981
15998
|
}
|
|
15982
15999
|
]
|
|
15983
16000
|
};
|
|
16001
|
+
this.#destroyRef = inject(DestroyRef);
|
|
15984
16002
|
}
|
|
15985
16003
|
ngAfterViewInit() {
|
|
15986
|
-
this.intersectionService.createIntersectionObserver(this.hostElement);
|
|
15987
16004
|
this.intersectionServiceSubscribe();
|
|
15988
16005
|
}
|
|
15989
16006
|
ngOnChanges(changes) {
|
|
@@ -15994,7 +16011,6 @@ class TooltipDirective {
|
|
|
15994
16011
|
ngOnDestroy() {
|
|
15995
16012
|
this.clearListeners();
|
|
15996
16013
|
this.destroyTooltipElement();
|
|
15997
|
-
this.intersectionServiceSubscribe(false);
|
|
15998
16014
|
}
|
|
15999
16015
|
ngOnInit() {
|
|
16000
16016
|
this.setListeners();
|
|
@@ -16021,18 +16037,16 @@ class TooltipDirective {
|
|
|
16021
16037
|
clearListeners() {
|
|
16022
16038
|
this.listenersService.clearListeners();
|
|
16023
16039
|
}
|
|
16024
|
-
intersectionServiceSubscribe(
|
|
16025
|
-
|
|
16026
|
-
|
|
16027
|
-
|
|
16028
|
-
|
|
16029
|
-
|
|
16030
|
-
|
|
16031
|
-
|
|
16032
|
-
|
|
16033
|
-
|
|
16034
|
-
this.intersectingSubscription?.unsubscribe();
|
|
16035
|
-
}
|
|
16040
|
+
intersectionServiceSubscribe() {
|
|
16041
|
+
this.intersectionService.createIntersectionObserver(this.hostElement);
|
|
16042
|
+
this.intersectionService.intersecting$
|
|
16043
|
+
.pipe(filter(next => next.hostElement === this.hostElement), debounceTime(100), finalize(() => {
|
|
16044
|
+
this.intersectionService.unobserve(this.hostElement);
|
|
16045
|
+
}), takeUntilDestroyed(this.#destroyRef))
|
|
16046
|
+
.subscribe(next => {
|
|
16047
|
+
this.visible = next.isIntersecting ? this.visible : false;
|
|
16048
|
+
!this.visible && this.removeTooltipElement();
|
|
16049
|
+
});
|
|
16036
16050
|
}
|
|
16037
16051
|
getUID(prefix) {
|
|
16038
16052
|
let uid = prefix ?? 'random-id';
|