@coreui/angular-pro 5.0.0-alpha.5 → 5.0.0-alpha.7

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.
Files changed (41) hide show
  1. package/LICENSE +2 -3
  2. package/README.md +2 -2
  3. package/esm2022/lib/avatar/avatar.component.mjs +5 -6
  4. package/esm2022/lib/backdrop/backdrop.service.mjs +2 -2
  5. package/esm2022/lib/carousel/carousel/carousel.component.mjs +58 -60
  6. package/esm2022/lib/date-range-picker/date-range-picker/date-range-picker.component.mjs +7 -4
  7. package/esm2022/lib/header/header/header.component.mjs +4 -4
  8. package/esm2022/lib/multi-select/multi-select/multi-select.component.mjs +10 -10
  9. package/esm2022/lib/navbar/navbar.component.mjs +2 -2
  10. package/esm2022/lib/offcanvas/offcanvas/offcanvas.component.mjs +4 -4
  11. package/esm2022/lib/popover/popover.directive.mjs +19 -21
  12. package/esm2022/lib/services/intersection.service.mjs +29 -12
  13. package/esm2022/lib/sidebar/public_api.mjs +3 -3
  14. package/esm2022/lib/sidebar/sidebar/sidebar.component.mjs +11 -12
  15. package/esm2022/lib/sidebar/sidebar-toggler/sidebar-toggler.directive.mjs +39 -0
  16. package/esm2022/lib/sidebar/sidebar.module.mjs +6 -6
  17. package/esm2022/lib/smart-table/smart-table.type.mjs +1 -1
  18. package/esm2022/lib/toast/toast/toast.component.mjs +5 -5
  19. package/esm2022/lib/tooltip/tooltip.directive.mjs +16 -17
  20. package/esm2022/lib/utilities/public_api.mjs +4 -3
  21. package/esm2022/lib/utilities/shadow-on-scroll.directive.mjs +48 -0
  22. package/esm2022/lib/utilities/utilities.module.mjs +5 -29
  23. package/fesm2022/coreui-angular-pro.mjs +267 -232
  24. package/fesm2022/coreui-angular-pro.mjs.map +1 -1
  25. package/lib/avatar/avatar.component.d.ts +1 -1
  26. package/lib/carousel/carousel/carousel.component.d.ts +9 -10
  27. package/lib/multi-select/multi-select/multi-select.component.d.ts +8 -8
  28. package/lib/popover/popover.directive.d.ts +1 -1
  29. package/lib/services/intersection.service.d.ts +7 -9
  30. package/lib/sidebar/public_api.d.ts +2 -2
  31. package/lib/sidebar/sidebar-toggler/sidebar-toggler.directive.d.ts +9 -0
  32. package/lib/sidebar/sidebar.module.d.ts +2 -2
  33. package/lib/smart-table/smart-table.type.d.ts +2 -0
  34. package/lib/toast/toast/toast.component.d.ts +1 -1
  35. package/lib/tooltip/tooltip.directive.d.ts +1 -1
  36. package/lib/utilities/public_api.d.ts +3 -2
  37. package/lib/utilities/shadow-on-scroll.directive.d.ts +8 -0
  38. package/lib/utilities/utilities.module.d.ts +7 -6
  39. package/package.json +3 -3
  40. package/esm2022/lib/sidebar/sidebar-toggler/sidebar-toggler.component.mjs +0 -36
  41. package/lib/sidebar/sidebar-toggler/sidebar-toggler.component.d.ts +0 -8
@@ -1,15 +1,15 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Directive, Input, ElementRef, inject, Renderer2, booleanAttribute, NgModule, HostBinding, Injectable, Component, EventEmitter, Output, ContentChildren, HostListener, RendererFactory2, DestroyRef, Pipe, signal, computed, numberAttribute, ViewChildren, Inject, ViewChild, forwardRef, Optional, ContentChild, ChangeDetectionStrategy, NgZone, effect, PLATFORM_ID, TemplateRef, ViewContainerRef } from '@angular/core';
2
+ import { Directive, Input, ElementRef, inject, Renderer2, booleanAttribute, NgModule, HostBinding, Injectable, Component, EventEmitter, Output, ContentChildren, HostListener, DestroyRef, signal, effect, RendererFactory2, Pipe, computed, numberAttribute, ViewChildren, PLATFORM_ID, Inject, ViewChild, forwardRef, Optional, ContentChild, ChangeDetectionStrategy, NgZone, TemplateRef, ViewContainerRef } from '@angular/core';
3
3
  import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
4
4
  import * as i3 from '@angular/common';
5
- import { NgTemplateOutlet, NgIf, NgClass, DOCUMENT, NgForOf, AsyncPipe, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, CommonModule, formatDate, I18nPluralPipe, isPlatformBrowser, JsonPipe } from '@angular/common';
5
+ import { NgTemplateOutlet, NgIf, DOCUMENT, NgClass, NgForOf, AsyncPipe, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, isPlatformServer, CommonModule, formatDate, I18nPluralPipe, isPlatformBrowser, JsonPipe } 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, withLatestFrom, zipWith, skip, distinctUntilChanged as distinctUntilChanged$1, map as map$1, debounceTime as debounceTime$1 } from 'rxjs';
8
+ import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
9
+ import { fromEvent, Subject, BehaviorSubject, Observable, skip, distinctUntilChanged as distinctUntilChanged$1, map as map$1, debounceTime as debounceTime$1 } from 'rxjs';
9
10
  import * as i1$1 from '@angular/router';
10
11
  import { RouterModule, NavigationEnd, RouterLink } from '@angular/router';
11
- import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
12
- import { filter, tap, distinctUntilChanged, take, debounceTime, map, delay, combineLatestWith } from 'rxjs/operators';
12
+ import { filter, tap, distinctUntilChanged, take, finalize, withLatestFrom, zipWith, debounceTime, map, delay, combineLatestWith } from 'rxjs/operators';
13
13
  import * as i1$2 from '@angular/cdk/a11y';
14
14
  import { FocusMonitor, A11yModule, FocusKeyManager } from '@angular/cdk/a11y';
15
15
  import * as i1$3 from '@angular/forms';
@@ -979,6 +979,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImpor
979
979
  }]
980
980
  }] });
981
981
 
982
+ class AlignDirective {
983
+ get hostClasses() {
984
+ return {
985
+ [`align-${this.align}`]: !!this.align,
986
+ };
987
+ }
988
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: AlignDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
989
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.8", type: AlignDirective, isStandalone: true, selector: "[cAlign]", inputs: { align: ["cAlign", "align"] }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0 }); }
990
+ }
991
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: AlignDirective, decorators: [{
992
+ type: Directive,
993
+ args: [{
994
+ selector: '[cAlign]',
995
+ standalone: true
996
+ }]
997
+ }], propDecorators: { align: [{
998
+ type: Input,
999
+ args: ['cAlign']
1000
+ }], hostClasses: [{
1001
+ type: HostBinding,
1002
+ args: ['class']
1003
+ }] } });
1004
+
982
1005
  class BgColorDirective {
983
1006
  get hostClasses() {
984
1007
  return {
@@ -1076,37 +1099,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImpor
1076
1099
  args: ['class']
1077
1100
  }] } });
1078
1101
 
1079
- class TextColorDirective {
1080
- get hostClasses() {
1081
- const color = this.color;
1082
- return {
1083
- [`text-${color}`]: !!color
1084
- };
1085
- }
1086
- constructor() {
1087
- /**
1088
- * Set text-color of element
1089
- * @type TextColors
1090
- */
1091
- this.color = '';
1092
- }
1093
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: TextColorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1094
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.8", type: TextColorDirective, isStandalone: true, selector: "[cTextColor]", inputs: { color: ["cTextColor", "color"] }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0 }); }
1095
- }
1096
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: TextColorDirective, decorators: [{
1097
- type: Directive,
1098
- args: [{
1099
- selector: '[cTextColor]',
1100
- standalone: true
1101
- }]
1102
- }], ctorParameters: () => [], propDecorators: { color: [{
1103
- type: Input,
1104
- args: ['cTextColor']
1105
- }], hostClasses: [{
1106
- type: HostBinding,
1107
- args: ['class']
1108
- }] } });
1109
-
1110
1102
  class RoundedDirective {
1111
1103
  constructor() {
1112
1104
  /**
@@ -1171,59 +1163,90 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImpor
1171
1163
  args: ['class']
1172
1164
  }] } });
1173
1165
 
1174
- class AlignDirective {
1166
+ class ShadowOnScrollDirective {
1167
+ #destroyRef = inject(DestroyRef);
1168
+ #document = inject(DOCUMENT);
1169
+ #elementRef = inject(ElementRef);
1170
+ #scrolled = signal(this.#document.documentElement.scrollTop > 0);
1171
+ #scrollEffect = effect(() => {
1172
+ this.#elementRef.nativeElement.classList.toggle(this.#shadowClass, this.#scrolled());
1173
+ });
1174
+ #observable;
1175
+ #shadowClass = 'shadow-sm';
1176
+ constructor() {
1177
+ this.#destroyRef.onDestroy(() => {
1178
+ this.#scrollEffect?.destroy();
1179
+ });
1180
+ }
1181
+ set cShadowOnScroll(value) {
1182
+ this.#scrolled.set(false);
1183
+ if (value) {
1184
+ this.#shadowClass = value === true ? 'shadow' : `shadow-${value}`;
1185
+ this.#observable = fromEvent(this.#document, 'scroll')
1186
+ .pipe(takeUntilDestroyed(this.#destroyRef))
1187
+ .subscribe(scrolled => {
1188
+ this.#scrolled.set(this.#document.documentElement.scrollTop > 0);
1189
+ });
1190
+ }
1191
+ else {
1192
+ this.#observable?.unsubscribe();
1193
+ }
1194
+ }
1195
+ ;
1196
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: ShadowOnScrollDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1197
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.8", type: ShadowOnScrollDirective, isStandalone: true, selector: "[cShadowOnScroll]", inputs: { cShadowOnScroll: "cShadowOnScroll" }, ngImport: i0 }); }
1198
+ }
1199
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: ShadowOnScrollDirective, decorators: [{
1200
+ type: Directive,
1201
+ args: [{
1202
+ selector: '[cShadowOnScroll]',
1203
+ standalone: true
1204
+ }]
1205
+ }], ctorParameters: () => [], propDecorators: { cShadowOnScroll: [{
1206
+ type: Input
1207
+ }] } });
1208
+
1209
+ class TextColorDirective {
1175
1210
  get hostClasses() {
1211
+ const color = this.color;
1176
1212
  return {
1177
- [`align-${this.align}`]: !!this.align,
1213
+ [`text-${color}`]: !!color
1178
1214
  };
1179
1215
  }
1180
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: AlignDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1181
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.8", type: AlignDirective, isStandalone: true, selector: "[cAlign]", inputs: { align: ["cAlign", "align"] }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0 }); }
1216
+ constructor() {
1217
+ /**
1218
+ * Set text-color of element
1219
+ * @type TextColors
1220
+ */
1221
+ this.color = '';
1222
+ }
1223
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: TextColorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1224
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.8", type: TextColorDirective, isStandalone: true, selector: "[cTextColor]", inputs: { color: ["cTextColor", "color"] }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0 }); }
1182
1225
  }
1183
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: AlignDirective, decorators: [{
1226
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: TextColorDirective, decorators: [{
1184
1227
  type: Directive,
1185
1228
  args: [{
1186
- selector: '[cAlign]',
1229
+ selector: '[cTextColor]',
1187
1230
  standalone: true
1188
1231
  }]
1189
- }], propDecorators: { align: [{
1232
+ }], ctorParameters: () => [], propDecorators: { color: [{
1190
1233
  type: Input,
1191
- args: ['cAlign']
1234
+ args: ['cTextColor']
1192
1235
  }], hostClasses: [{
1193
1236
  type: HostBinding,
1194
1237
  args: ['class']
1195
1238
  }] } });
1196
1239
 
1240
+ const UTILITY_DIRECTIVES = [AlignDirective, BgColorDirective, BorderDirective, RoundedDirective, ShadowOnScrollDirective, TextColorDirective];
1197
1241
  class UtilitiesModule {
1198
1242
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: UtilitiesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1199
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.8", ngImport: i0, type: UtilitiesModule, imports: [BgColorDirective,
1200
- BorderDirective,
1201
- RoundedDirective,
1202
- TextColorDirective,
1203
- AlignDirective], exports: [BgColorDirective,
1204
- BorderDirective,
1205
- RoundedDirective,
1206
- TextColorDirective,
1207
- AlignDirective] }); }
1243
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.8", ngImport: i0, type: UtilitiesModule, imports: [AlignDirective, BgColorDirective, BorderDirective, RoundedDirective, ShadowOnScrollDirective, TextColorDirective], exports: [AlignDirective, BgColorDirective, BorderDirective, RoundedDirective, ShadowOnScrollDirective, TextColorDirective] }); }
1208
1244
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: UtilitiesModule }); }
1209
1245
  }
1210
1246
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: UtilitiesModule, decorators: [{
1211
1247
  type: NgModule,
1212
1248
  args: [{
1213
- imports: [
1214
- BgColorDirective,
1215
- BorderDirective,
1216
- RoundedDirective,
1217
- TextColorDirective,
1218
- AlignDirective
1219
- ],
1220
- exports: [
1221
- BgColorDirective,
1222
- BorderDirective,
1223
- RoundedDirective,
1224
- TextColorDirective,
1225
- AlignDirective
1226
- ]
1249
+ imports: [...UTILITY_DIRECTIVES], exports: [...UTILITY_DIRECTIVES]
1227
1250
  }]
1228
1251
  }] });
1229
1252
 
@@ -1250,17 +1273,16 @@ class AvatarComponent {
1250
1273
  };
1251
1274
  }
1252
1275
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: AvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1253
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", type: AvatarComponent, isStandalone: true, selector: "c-avatar", inputs: { color: "color", shape: "shape", size: "size", src: "src", status: "status", textColor: "textColor" }, host: { properties: { "class": "this.hostClasses" } }, hostDirectives: [{ directive: TextColorDirective, inputs: ["cTextColor", "textColor"] }], ngImport: i0, template: "<ng-container>\n <ng-container *ngTemplateOutlet=\"defaultImageTemplate\"></ng-container>\n <span *ngIf=\"!!status\" [ngClass]=\"statusClass\"></span>\n</ng-container>\n\n<ng-template #defaultImageTemplate>\n <img *ngIf=\"!!src; else imageContent\" [src]=\"src\" class=\"avatar-img\" />\n <ng-template #imageContent>\n <ng-content></ng-content>\n </ng-template>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
1276
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.8", type: AvatarComponent, isStandalone: true, selector: "c-avatar", inputs: { color: "color", shape: "shape", size: "size", src: "src", status: "status", textColor: "textColor" }, host: { properties: { "class": "this.hostClasses" } }, hostDirectives: [{ directive: TextColorDirective, inputs: ["cTextColor", "textColor"] }], ngImport: i0, template: "<ng-container>\n <ng-container *ngTemplateOutlet=\"defaultImageTemplate\"></ng-container>\n @if (!!status) {\n <span [ngClass]=\"statusClass\"></span>\n }\n</ng-container>\n\n<ng-template #defaultImageTemplate>\n @if (!!src) {\n <img [src]=\"src\" class=\"avatar-img\" />\n } @else {\n <ng-content></ng-content>\n }\n <ng-template #imageContent>\n <ng-content></ng-content>\n </ng-template>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
1254
1277
  }
1255
1278
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: AvatarComponent, decorators: [{
1256
1279
  type: Component,
1257
1280
  args: [{ selector: 'c-avatar', standalone: true, imports: [
1258
1281
  NgTemplateOutlet,
1259
- NgClass,
1260
- NgIf
1282
+ NgClass
1261
1283
  ], hostDirectives: [{
1262
1284
  directive: TextColorDirective, inputs: ['cTextColor: textColor']
1263
- }], template: "<ng-container>\n <ng-container *ngTemplateOutlet=\"defaultImageTemplate\"></ng-container>\n <span *ngIf=\"!!status\" [ngClass]=\"statusClass\"></span>\n</ng-container>\n\n<ng-template #defaultImageTemplate>\n <img *ngIf=\"!!src; else imageContent\" [src]=\"src\" class=\"avatar-img\" />\n <ng-template #imageContent>\n <ng-content></ng-content>\n </ng-template>\n</ng-template>\n" }]
1285
+ }], template: "<ng-container>\n <ng-container *ngTemplateOutlet=\"defaultImageTemplate\"></ng-container>\n @if (!!status) {\n <span [ngClass]=\"statusClass\"></span>\n }\n</ng-container>\n\n<ng-template #defaultImageTemplate>\n @if (!!src) {\n <img [src]=\"src\" class=\"avatar-img\" />\n } @else {\n <ng-content></ng-content>\n }\n <ng-template #imageContent>\n <ng-content></ng-content>\n </ng-template>\n</ng-template>\n" }]
1264
1286
  }], ctorParameters: () => [], propDecorators: { color: [{
1265
1287
  type: Input
1266
1288
  }], shape: [{
@@ -1376,7 +1398,7 @@ class BackdropService {
1376
1398
  get #scrollbarWidth() {
1377
1399
  // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
1378
1400
  const documentWidth = this.#document.documentElement.clientWidth;
1379
- const scrollbarWidth = Math.abs((window?.innerWidth ?? documentWidth) - documentWidth);
1401
+ const scrollbarWidth = Math.abs((this.#document.defaultView?.innerWidth ?? documentWidth) - documentWidth);
1380
1402
  return `${scrollbarWidth}px`;
1381
1403
  }
1382
1404
  setBackdrop(type = 'modal') {
@@ -3957,34 +3979,50 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImpor
3957
3979
 
3958
3980
  class IntersectionService {
3959
3981
  constructor() {
3960
- this.intersecting = new BehaviorSubject(false);
3961
- this.intersecting$ = this.intersecting.asObservable();
3982
+ this.platformId = inject(PLATFORM_ID);
3983
+ this.#intersecting = new BehaviorSubject({ isIntersecting: false });
3984
+ this.intersecting$ = this.#intersecting.asObservable();
3962
3985
  this.defaultObserverOptions = {
3963
3986
  root: null,
3964
3987
  rootMargin: '0px',
3965
3988
  threshold: 0.2
3966
3989
  };
3990
+ this.hostElementRefs = new Map();
3967
3991
  }
3992
+ #intersecting;
3968
3993
  createIntersectionObserver(hostElement, observerOptions = this.defaultObserverOptions) {
3994
+ if (isPlatformServer(this.platformId)) {
3995
+ this.#intersecting.next({ isIntersecting: true, hostElement });
3996
+ return;
3997
+ }
3969
3998
  const options = { ...this.defaultObserverOptions, ...observerOptions };
3970
- this.hostElement = hostElement;
3971
3999
  const handleIntersect = (entries, observer) => {
3972
4000
  entries.forEach((entry) => {
3973
- this.intersecting.next(entry.isIntersecting);
4001
+ this.#intersecting.next({ isIntersecting: entry.isIntersecting, hostElement });
3974
4002
  });
3975
4003
  };
3976
- this.intersectionObserver = new IntersectionObserver(handleIntersect, options);
3977
- this.intersectionObserver.observe(hostElement.nativeElement);
4004
+ this.hostElementRefs.set(hostElement, new IntersectionObserver(handleIntersect, options));
4005
+ this.hostElementRefs.get(hostElement)?.observe(hostElement.nativeElement);
4006
+ }
4007
+ unobserve(elementRef) {
4008
+ this.hostElementRefs.get(elementRef)?.unobserve(elementRef.nativeElement);
4009
+ this.hostElementRefs.set(elementRef, null);
4010
+ this.hostElementRefs.delete(elementRef);
3978
4011
  }
3979
4012
  ngOnDestroy() {
3980
- this.intersectionObserver?.unobserve(this.hostElement?.nativeElement);
4013
+ this.hostElementRefs.forEach((observer, elementRef) => {
4014
+ observer?.unobserve(elementRef.nativeElement);
4015
+ });
3981
4016
  }
3982
4017
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: IntersectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3983
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: IntersectionService }); }
4018
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: IntersectionService, providedIn: 'root' }); }
3984
4019
  }
3985
4020
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: IntersectionService, decorators: [{
3986
- type: Injectable
3987
- }], ctorParameters: () => [] });
4021
+ type: Injectable,
4022
+ args: [{
4023
+ providedIn: 'root'
4024
+ }]
4025
+ }] });
3988
4026
 
3989
4027
  class ListenersService {
3990
4028
  constructor(renderer) {
@@ -4025,6 +4063,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImpor
4025
4063
  type: Injectable
4026
4064
  }], ctorParameters: () => [{ type: i0.Renderer2 }] });
4027
4065
 
4066
+ class ClassToggleService {
4067
+ constructor(document, rendererFactory) {
4068
+ this.document = document;
4069
+ this.rendererFactory = rendererFactory;
4070
+ this.renderer = rendererFactory.createRenderer(null, null);
4071
+ }
4072
+ toggle(selector, className) {
4073
+ const element = document.querySelector(selector);
4074
+ if (element) {
4075
+ element.classList.contains(className) ?
4076
+ this.renderer.removeClass(element, className) :
4077
+ this.renderer.addClass(element, className);
4078
+ }
4079
+ }
4080
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: ClassToggleService, deps: [{ token: DOCUMENT }, { token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable }); }
4081
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: ClassToggleService, providedIn: 'root' }); }
4082
+ }
4083
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: ClassToggleService, decorators: [{
4084
+ type: Injectable,
4085
+ args: [{
4086
+ providedIn: 'root'
4087
+ }]
4088
+ }], ctorParameters: () => [{ type: Document, decorators: [{
4089
+ type: Inject,
4090
+ args: [DOCUMENT]
4091
+ }] }, { type: i0.RendererFactory2 }] });
4092
+
4028
4093
  class CarouselService {
4029
4094
  constructor() {
4030
4095
  this.carouselIndex = new BehaviorSubject({});
@@ -4192,6 +4257,7 @@ class CarouselComponent {
4192
4257
  */
4193
4258
  this.itemChange = new EventEmitter();
4194
4259
  this.activeItemInterval = 0;
4260
+ this.#destroyRef = inject(DestroyRef);
4195
4261
  this._visible = true;
4196
4262
  Object.assign(this, config);
4197
4263
  }
@@ -4202,41 +4268,21 @@ class CarouselComponent {
4202
4268
  'carousel-fade': this.transition === 'crossfade'
4203
4269
  };
4204
4270
  }
4205
- get visible() {
4206
- return this._visible;
4207
- }
4208
- set visible(value) {
4209
- this._visible = value;
4210
- }
4271
+ #destroyRef;
4211
4272
  ngOnInit() {
4212
4273
  this.carouselStateSubscribe();
4213
4274
  }
4214
4275
  ngOnDestroy() {
4276
+ this.resetTimer();
4215
4277
  this.clearListeners();
4216
- this.carouselStateSubscribe(false);
4217
- this.intersectionServiceSubscribe(false);
4218
4278
  this.swipeSubscribe(false);
4219
4279
  }
4220
4280
  ngAfterContentInit() {
4221
- this.intersectionService.createIntersectionObserver(this.hostElement);
4222
4281
  this.intersectionServiceSubscribe();
4223
4282
  this.carouselState.state = { activeItemIndex: this.activeIndex, animate: this.animate };
4224
4283
  this.setListeners();
4225
4284
  this.swipeSubscribe();
4226
4285
  }
4227
- setTimer() {
4228
- const interval = this.activeItemInterval || 0;
4229
- this.resetTimer();
4230
- if (interval > 0) {
4231
- this.timerId = setTimeout(() => {
4232
- const nextIndex = this.carouselState.direction(this.direction);
4233
- this.carouselState.state = { activeItemIndex: nextIndex };
4234
- }, interval);
4235
- }
4236
- }
4237
- resetTimer() {
4238
- clearTimeout(this.timerId);
4239
- }
4240
4286
  setListeners() {
4241
4287
  const config = {
4242
4288
  hostElement: this.hostElement,
@@ -4253,39 +4299,56 @@ class CarouselComponent {
4253
4299
  clearListeners() {
4254
4300
  this.listenersService.clearListeners();
4255
4301
  }
4256
- carouselStateSubscribe(subscribe = true) {
4257
- if (subscribe) {
4258
- this.carouselIndexSubscription = this.carouselService.carouselIndex$.subscribe((nextItem) => {
4259
- if ('active' in nextItem) {
4260
- this.itemChange.emit(nextItem.active);
4261
- }
4262
- this.activeItemInterval = typeof nextItem.interval === 'number' && nextItem.interval > -1 ? nextItem.interval : this.interval;
4263
- const isLastItem = ((nextItem.active === nextItem.lastItemIndex) && this.direction === 'next') || ((nextItem.active === 0) && this.direction === 'prev');
4264
- !this.wrap && isLastItem ? this.resetTimer() : this.setTimer();
4265
- });
4266
- }
4267
- else {
4268
- this.carouselIndexSubscription?.unsubscribe();
4269
- }
4302
+ set visible(value) {
4303
+ this._visible = value;
4270
4304
  }
4271
- intersectionServiceSubscribe(subscribe = true) {
4272
- if (subscribe) {
4273
- this.intersectingSubscription = this.intersectionService.intersecting$.subscribe(isIntersecting => {
4274
- this.visible = isIntersecting;
4275
- isIntersecting ? this.setTimer() : this.resetTimer();
4276
- });
4277
- }
4278
- else {
4279
- this.intersectingSubscription?.unsubscribe();
4305
+ get visible() {
4306
+ return this._visible;
4307
+ }
4308
+ setTimer() {
4309
+ const interval = this.activeItemInterval || 0;
4310
+ this.resetTimer();
4311
+ if (interval > 0) {
4312
+ this.timerId = setTimeout(() => {
4313
+ const nextIndex = this.carouselState.direction(this.direction);
4314
+ this.carouselState.state = { activeItemIndex: nextIndex };
4315
+ }, interval);
4280
4316
  }
4281
4317
  }
4318
+ resetTimer() {
4319
+ clearTimeout(this.timerId);
4320
+ this.timerId = undefined;
4321
+ }
4322
+ carouselStateSubscribe() {
4323
+ this.carouselService.carouselIndex$
4324
+ .pipe(takeUntilDestroyed(this.#destroyRef))
4325
+ .subscribe((nextItem) => {
4326
+ if ('active' in nextItem) {
4327
+ this.itemChange.emit(nextItem.active);
4328
+ }
4329
+ this.activeItemInterval = typeof nextItem.interval === 'number' && nextItem.interval > -1 ? nextItem.interval : this.interval;
4330
+ const isLastItem = ((nextItem.active === nextItem.lastItemIndex) && this.direction === 'next') || ((nextItem.active === 0) && this.direction === 'prev');
4331
+ !this.wrap && isLastItem ? this.resetTimer() : this.setTimer();
4332
+ });
4333
+ }
4334
+ intersectionServiceSubscribe() {
4335
+ this.intersectionService.createIntersectionObserver(this.hostElement);
4336
+ this.intersectionService.intersecting$
4337
+ .pipe(filter(next => next.hostElement === this.hostElement), finalize(() => {
4338
+ this.intersectionService.unobserve(this.hostElement);
4339
+ }), takeUntilDestroyed(this.#destroyRef))
4340
+ .subscribe(next => {
4341
+ this.visible = next.isIntersecting;
4342
+ next.isIntersecting ? this.setTimer() : this.resetTimer();
4343
+ });
4344
+ }
4282
4345
  swipeSubscribe(subscribe = true) {
4283
4346
  if (this.touch && subscribe) {
4284
4347
  const carouselElement = this.hostElement.nativeElement;
4285
4348
  const touchStart$ = fromEvent(carouselElement, 'touchstart');
4286
4349
  const touchEnd$ = fromEvent(carouselElement, 'touchend');
4287
4350
  const touchMove$ = fromEvent(carouselElement, 'touchmove');
4288
- this.swipeSubscription = touchStart$.pipe(zipWith(touchEnd$.pipe(withLatestFrom(touchMove$))))
4351
+ this.swipeSubscription = touchStart$.pipe(zipWith(touchEnd$.pipe(withLatestFrom(touchMove$))), takeUntilDestroyed(this.#destroyRef))
4289
4352
  .subscribe(([touchstart, [touchend, touchmove]]) => {
4290
4353
  touchstart.stopPropagation();
4291
4354
  touchmove.stopPropagation();
@@ -4301,11 +4364,11 @@ class CarouselComponent {
4301
4364
  }
4302
4365
  }
4303
4366
  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 }); }
4304
- 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", direction: "direction", interval: "interval", pause: "pause", touch: "touch", transition: "transition", wrap: "wrap" }, outputs: { itemChange: "itemChange" }, host: { properties: { "class": "this.hostClasses" } }, providers: [CarouselService, CarouselState, CarouselConfig, IntersectionService, ListenersService], hostDirectives: [{ directive: ThemeDirective, inputs: ["dark", "dark"] }], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{display:block}\n"] }); }
4367
+ 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", 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], hostDirectives: [{ directive: ThemeDirective, inputs: ["dark", "dark"] }], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{display:block}\n"] }); }
4305
4368
  }
4306
4369
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: CarouselComponent, decorators: [{
4307
4370
  type: Component,
4308
- args: [{ selector: 'c-carousel', template: '<ng-content></ng-content>', providers: [CarouselService, CarouselState, CarouselConfig, IntersectionService, ListenersService], standalone: true, hostDirectives: [
4371
+ args: [{ selector: 'c-carousel', template: '<ng-content></ng-content>', providers: [CarouselService, CarouselState, CarouselConfig, ListenersService], standalone: true, hostDirectives: [
4309
4372
  { directive: ThemeDirective, inputs: ['dark'] }
4310
4373
  ], styles: [":host{display:block}\n"] }]
4311
4374
  }], ctorParameters: () => [{ type: CarouselConfig, decorators: [{
@@ -7897,7 +7960,7 @@ class DateRangePickerComponent {
7897
7960
  this.endDate = time ?? this.endDate;
7898
7961
  }
7899
7962
  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 }); }
7900
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.0.8", type: DateRangePickerComponent, isStandalone: true, selector: "c-date-range-picker", inputs: { dayFormat: "dayFormat", calendars: ["calendars", "calendars", numberAttribute], cleaner: ["cleaner", "cleaner", booleanAttribute], closeOnSelect: ["closeOnSelect", "closeOnSelect", booleanAttribute], format: "format", indicator: ["indicator", "indicator", booleanAttribute], inputDateFormat: "inputDateFormat", inputDateParse: "inputDateParse", inputReadOnly: ["inputReadOnly", "inputReadOnly", booleanAttribute], navYearFirst: ["navYearFirst", "navYearFirst", booleanAttribute], placeholder: "placeholder", ranges: "ranges", rangesButtonsColor: "rangesButtonsColor", rangesButtonsSize: "rangesButtonsSize", rangesButtonsVariant: "rangesButtonsVariant", separator: ["separator", "separator", booleanAttribute], size: "size", timepicker: ["timepicker", "timepicker", booleanAttribute], valid: "valid", visible: ["visible", "visible", booleanAttribute], startDate: "startDate", endDate: "endDate", calendarDate: "calendarDate", disabledDates: "disabledDates", firstDayOfWeek: ["firstDayOfWeek", "firstDayOfWeek", numberAttribute], locale: "locale", maxDate: "maxDate", minDate: "minDate", navigation: ["navigation", "navigation", booleanAttribute], range: ["range", "range", booleanAttribute], dateFilter: "dateFilter", disabled: ["disabled", "disabled", booleanAttribute], value: "value", weekdayFormat: "weekdayFormat", popperjsOptions: ["popperOptions", "popperjsOptions"], selectAdjacentDays: ["selectAdjacentDays", "selectAdjacentDays", booleanAttribute], showAdjacentDays: ["showAdjacentDays", "showAdjacentDays", booleanAttribute], selectionType: "selectionType", showWeekNumber: ["showWeekNumber", "showWeekNumber", booleanAttribute], weekNumbersLabel: "weekNumbersLabel" }, outputs: { valueChange: "valueChange", calendarCellHover: "calendarCellHover", calendarDateChange: "calendarDateChange", endDateChange: "endDateChange", startDateChange: "startDateChange" }, host: { listeners: { "blur": "onBlur()" } }, providers: [
7963
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.0.8", type: DateRangePickerComponent, isStandalone: true, selector: "c-date-range-picker", inputs: { dayFormat: "dayFormat", calendars: ["calendars", "calendars", numberAttribute], cleaner: ["cleaner", "cleaner", booleanAttribute], closeOnSelect: ["closeOnSelect", "closeOnSelect", booleanAttribute], format: "format", indicator: ["indicator", "indicator", booleanAttribute], inputDateFormat: "inputDateFormat", inputDateParse: "inputDateParse", inputReadOnly: ["inputReadOnly", "inputReadOnly", booleanAttribute], navYearFirst: ["navYearFirst", "navYearFirst", booleanAttribute], placeholder: "placeholder", ranges: "ranges", rangesButtonsColor: "rangesButtonsColor", rangesButtonsSize: "rangesButtonsSize", rangesButtonsVariant: "rangesButtonsVariant", separator: ["separator", "separator", booleanAttribute], size: "size", timepicker: ["timepicker", "timepicker", booleanAttribute], valid: "valid", visible: ["visible", "visible", booleanAttribute], startDate: "startDate", endDate: "endDate", calendarDate: "calendarDate", disabledDates: "disabledDates", firstDayOfWeek: ["firstDayOfWeek", "firstDayOfWeek", numberAttribute], locale: "locale", maxDate: "maxDate", minDate: "minDate", navigation: ["navigation", "navigation", booleanAttribute], range: ["range", "range", booleanAttribute], dateFilter: "dateFilter", disabled: ["disabled", "disabled", booleanAttribute], value: "value", weekdayFormat: "weekdayFormat", popperjsOptions: ["popperOptions", "popperjsOptions"], selectAdjacentDays: ["selectAdjacentDays", "selectAdjacentDays", booleanAttribute], showAdjacentDays: ["showAdjacentDays", "showAdjacentDays", booleanAttribute], selectionType: "selectionType", showWeekNumber: ["showWeekNumber", "showWeekNumber", booleanAttribute], weekNumbersLabel: "weekNumbersLabel" }, outputs: { valueChange: "valueChange", calendarCellHover: "calendarCellHover", calendarDateChange: "calendarDateChange", endDateChange: "endDateChange", startDateChange: "startDateChange" }, host: { listeners: { "focusout": "onBlur()" }, properties: { "class": "this.datePickerClasses" } }, providers: [
7901
7964
  {
7902
7965
  provide: NG_VALUE_ACCESSOR,
7903
7966
  useExisting: forwardRef(() => DateRangePickerComponent),
@@ -8048,7 +8111,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImpor
8048
8111
  args: [TemplateIdDirective, { descendants: true }]
8049
8112
  }], onBlur: [{
8050
8113
  type: HostListener,
8051
- args: ['blur']
8114
+ args: ['focusout']
8115
+ }], datePickerClasses: [{
8116
+ type: HostBinding,
8117
+ args: ['class']
8052
8118
  }] } });
8053
8119
 
8054
8120
  class DateRangePickerModule {
@@ -8715,11 +8781,11 @@ class HeaderComponent {
8715
8781
  };
8716
8782
  }
8717
8783
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: HeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8718
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", type: HeaderComponent, isStandalone: true, selector: "c-header, [c-header]", inputs: { container: "container", position: "position", role: "role" }, host: { properties: { "attr.role": "this.role", "class": "this.getClasses" } }, ngImport: i0, template: "<div [ngClass]=\"headerClasses\" *ngIf=\"!!container; else elseBlock\">\n <ng-content></ng-content>\n</div>\n<ng-template #elseBlock>\n <ng-content></ng-content>\n</ng-template>\n\n\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
8784
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.8", type: HeaderComponent, isStandalone: true, selector: "c-header, [c-header]", inputs: { container: "container", position: "position", role: "role" }, host: { properties: { "attr.role": "this.role", "class": "this.getClasses" } }, ngImport: i0, template: "@if (!!container) {\n <div [ngClass]=\"headerClasses\">\n <ng-content />\n </div>\n} @else {\n <ng-content />\n}\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
8719
8785
  }
8720
8786
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: HeaderComponent, decorators: [{
8721
8787
  type: Component,
8722
- args: [{ selector: 'c-header, [c-header]', standalone: true, imports: [NgClass, NgIf], template: "<div [ngClass]=\"headerClasses\" *ngIf=\"!!container; else elseBlock\">\n <ng-content></ng-content>\n</div>\n<ng-template #elseBlock>\n <ng-content></ng-content>\n</ng-template>\n\n\n" }]
8788
+ args: [{ selector: 'c-header, [c-header]', standalone: true, imports: [NgClass], template: "@if (!!container) {\n <div [ngClass]=\"headerClasses\">\n <ng-content />\n </div>\n} @else {\n <ng-content />\n}\n" }]
8723
8789
  }], propDecorators: { container: [{
8724
8790
  type: Input
8725
8791
  }], position: [{
@@ -9787,10 +9853,10 @@ const observeReferenceModifier = {
9787
9853
  instance.update();
9788
9854
  });
9789
9855
  // @ts-ignore
9790
- reference[RO_PROP].observe(reference);
9856
+ reference[RO_PROP]?.observe(reference);
9791
9857
  return () => {
9792
9858
  // @ts-ignore
9793
- reference[RO_PROP].disconnect();
9859
+ reference[RO_PROP]?.disconnect();
9794
9860
  // @ts-ignore
9795
9861
  delete reference[RO_PROP];
9796
9862
  };
@@ -9924,7 +9990,7 @@ class MultiSelectComponent {
9924
9990
  this.#value = [];
9925
9991
  /**
9926
9992
  * Emits valueChange
9927
- * @type T | T[]
9993
+ * @type TValue | TValue[]
9928
9994
  */
9929
9995
  this.valueChange = new EventEmitter();
9930
9996
  this._virtualScroller = false;
@@ -10066,7 +10132,7 @@ class MultiSelectComponent {
10066
10132
  }
10067
10133
  /**
10068
10134
  * Initial value of multi-select
10069
- * @type T | T[]
10135
+ * @type TValue | TValue[]
10070
10136
  */
10071
10137
  set value(value) {
10072
10138
  const newValue = Array.isArray(value) ? [...value] : [value];
@@ -10082,7 +10148,7 @@ class MultiSelectComponent {
10082
10148
  }
10083
10149
  get value() {
10084
10150
  const value = this.multiSelectService.selectionModel?.selected ?? [...this.#value];
10085
- return this.multiple ? [...value] : value;
10151
+ return this.multiple ? [...value] : value[0];
10086
10152
  }
10087
10153
  #value;
10088
10154
  /**
@@ -10729,8 +10795,8 @@ class MultiSelectComponent {
10729
10795
  this.scrollViewport = scrollViewport;
10730
10796
  const cdkVirtualScrollContentWrapper = this.scrollViewport.getElementRef().nativeElement?.firstElementChild;
10731
10797
  if (cdkVirtualScrollContentWrapper) {
10732
- const style = getComputedStyle(cdkVirtualScrollContentWrapper, null);
10733
- const padding = parseInt(style.getPropertyValue('padding-left') ?? '12px') * 3;
10798
+ const style = getComputedStyle(cdkVirtualScrollContentWrapper, null) ?? undefined;
10799
+ const padding = parseInt(style?.getPropertyValue('padding-left') ?? '12px') * 3;
10734
10800
  const observer = new MutationObserver((mutationRecords) => {
10735
10801
  mutationRecords.forEach(child => {
10736
10802
  child.addedNodes.forEach(node => {
@@ -10743,9 +10809,9 @@ class MultiSelectComponent {
10743
10809
  });
10744
10810
  });
10745
10811
  });
10746
- observer.observe(cdkVirtualScrollContentWrapper, { childList: true });
10812
+ observer?.observe(cdkVirtualScrollContentWrapper, { childList: true });
10747
10813
  this.#destroy$.subscribe(() => {
10748
- observer.disconnect();
10814
+ observer?.disconnect();
10749
10815
  });
10750
10816
  }
10751
10817
  }
@@ -11170,7 +11236,7 @@ class NavbarComponent {
11170
11236
  }
11171
11237
  get breakpoint() {
11172
11238
  if (typeof this.expand === 'string') {
11173
- return getComputedStyle(this.hostElement.nativeElement).getPropertyValue(`--cui-breakpoint-${this.expand}`);
11239
+ return getComputedStyle(this.hostElement.nativeElement)?.getPropertyValue(`--cui-breakpoint-${this.expand}`) ?? false;
11174
11240
  }
11175
11241
  return false;
11176
11242
  }
@@ -12067,7 +12133,7 @@ class OffcanvasComponent {
12067
12133
  }
12068
12134
  const element = this.document.documentElement;
12069
12135
  const responsiveBreakpoint = this.responsive;
12070
- const breakpointValue = getComputedStyle(element).getPropertyValue(`--cui-breakpoint-${responsiveBreakpoint.trim()}`) || false;
12136
+ const breakpointValue = getComputedStyle(element)?.getPropertyValue(`--cui-breakpoint-${responsiveBreakpoint.trim()}`) ?? false;
12071
12137
  return breakpointValue ? `${parseFloat(breakpointValue.trim()) - 0.02}px` : false;
12072
12138
  }
12073
12139
  animateStart(event) {
@@ -12166,7 +12232,7 @@ class OffcanvasComponent {
12166
12232
  }
12167
12233
  }
12168
12234
  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 }); }
12169
- 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"], hostDirectives: [{ directive: ThemeDirective, inputs: ["dark", "dark"] }], 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$2.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }], animations: [
12235
+ 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"], hostDirectives: [{ directive: ThemeDirective, inputs: ["dark", "dark"] }], 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$2.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }], animations: [
12170
12236
  trigger('showHide', [
12171
12237
  state('visible', style({
12172
12238
  // visibility: 'visible'
@@ -12192,7 +12258,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImpor
12192
12258
  ])
12193
12259
  ], exportAs: 'cOffcanvas', standalone: true, imports: [A11yModule], hostDirectives: [
12194
12260
  { directive: ThemeDirective, inputs: ['dark'] }
12195
- ], template: "<div cdkTrapFocus cdkTrapFocusAutoCapture>\n <ng-content></ng-content>\n</div>\n\n", styles: [":host{display:none}\n"] }]
12261
+ ], host: { ngSkipHydration: 'true' }, template: "<div cdkTrapFocus cdkTrapFocusAutoCapture>\n <ng-content></ng-content>\n</div>\n\n", styles: [":host{display:none}\n"] }]
12196
12262
  }], ctorParameters: () => [{ type: Document, decorators: [{
12197
12263
  type: Inject,
12198
12264
  args: [DOCUMENT]
@@ -12720,33 +12786,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImpor
12720
12786
  args: ['class']
12721
12787
  }] } });
12722
12788
 
12723
- class ClassToggleService {
12724
- constructor(document, rendererFactory) {
12725
- this.document = document;
12726
- this.rendererFactory = rendererFactory;
12727
- this.renderer = rendererFactory.createRenderer(null, null);
12728
- }
12729
- toggle(selector, className) {
12730
- const element = document.querySelector(selector);
12731
- if (element) {
12732
- element.classList.contains(className) ?
12733
- this.renderer.removeClass(element, className) :
12734
- this.renderer.addClass(element, className);
12735
- }
12736
- }
12737
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: ClassToggleService, deps: [{ token: DOCUMENT }, { token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable }); }
12738
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: ClassToggleService, providedIn: 'root' }); }
12739
- }
12740
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: ClassToggleService, decorators: [{
12741
- type: Injectable,
12742
- args: [{
12743
- providedIn: 'root'
12744
- }]
12745
- }], ctorParameters: () => [{ type: Document, decorators: [{
12746
- type: Inject,
12747
- args: [DOCUMENT]
12748
- }] }, { type: i0.RendererFactory2 }] });
12749
-
12750
12789
  class PopoverDirective {
12751
12790
  /**
12752
12791
  * Optional popper Options object, takes precedence over cPopoverPlacement prop
@@ -12771,6 +12810,7 @@ class PopoverDirective {
12771
12810
  get ariaDescribedBy() {
12772
12811
  return this.popoverId ? this.popoverId : null;
12773
12812
  }
12813
+ #destroyRef;
12774
12814
  constructor(document, renderer, hostElement, viewContainerRef, listenersService, changeDetectorRef, intersectionService) {
12775
12815
  this.document = document;
12776
12816
  this.renderer = renderer;
@@ -12804,9 +12844,9 @@ class PopoverDirective {
12804
12844
  }
12805
12845
  ]
12806
12846
  };
12847
+ this.#destroyRef = inject(DestroyRef);
12807
12848
  }
12808
12849
  ngAfterViewInit() {
12809
- this.intersectionService.createIntersectionObserver(this.hostElement);
12810
12850
  this.intersectionServiceSubscribe();
12811
12851
  }
12812
12852
  ngOnChanges(changes) {
@@ -12817,7 +12857,6 @@ class PopoverDirective {
12817
12857
  ngOnDestroy() {
12818
12858
  this.clearListeners();
12819
12859
  this.destroyPopoverElement();
12820
- this.intersectionServiceSubscribe(false);
12821
12860
  }
12822
12861
  ngOnInit() {
12823
12862
  this.setListeners();
@@ -12844,18 +12883,16 @@ class PopoverDirective {
12844
12883
  clearListeners() {
12845
12884
  this.listenersService.clearListeners();
12846
12885
  }
12847
- intersectionServiceSubscribe(subscribe = true) {
12848
- if (subscribe) {
12849
- this.intersectingSubscription = this.intersectionService.intersecting$
12850
- .pipe(debounceTime(100))
12851
- .subscribe(isIntersecting => {
12852
- this.visible = isIntersecting ? this.visible : false;
12853
- !this.visible && this.removePopoverElement();
12854
- });
12855
- }
12856
- else {
12857
- this.intersectingSubscription?.unsubscribe();
12858
- }
12886
+ intersectionServiceSubscribe() {
12887
+ this.intersectionService.createIntersectionObserver(this.hostElement);
12888
+ this.intersectionService.intersecting$
12889
+ .pipe(filter(next => next.hostElement === this.hostElement), debounceTime(100), finalize(() => {
12890
+ this.intersectionService.unobserve(this.hostElement);
12891
+ }), takeUntilDestroyed(this.#destroyRef))
12892
+ .subscribe(next => {
12893
+ this.visible = next.isIntersecting ? this.visible : false;
12894
+ !this.visible && this.removePopoverElement();
12895
+ });
12859
12896
  }
12860
12897
  getUID(prefix) {
12861
12898
  let uid = prefix ?? 'random-id';
@@ -12919,18 +12956,18 @@ class PopoverDirective {
12919
12956
  this.popoverRef.instance.id = undefined;
12920
12957
  this.changeDetectorRef.markForCheck();
12921
12958
  setTimeout(() => {
12922
- this.viewContainerRef.detach();
12959
+ this.viewContainerRef?.detach();
12923
12960
  }, 300);
12924
12961
  }
12925
12962
  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 }); }
12926
- 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, IntersectionService], exportAs: ["cPopover"], usesOnChanges: true, ngImport: i0 }); }
12963
+ 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 }); }
12927
12964
  }
12928
12965
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: PopoverDirective, decorators: [{
12929
12966
  type: Directive,
12930
12967
  args: [{
12931
12968
  selector: '[cPopover]',
12932
12969
  exportAs: 'cPopover',
12933
- providers: [ListenersService, IntersectionService],
12970
+ providers: [ListenersService],
12934
12971
  standalone: true
12935
12972
  }]
12936
12973
  }], ctorParameters: () => [{ type: Document, decorators: [{
@@ -13296,7 +13333,7 @@ class SidebarComponent {
13296
13333
  }
13297
13334
  this.state = {
13298
13335
  ...this.state,
13299
- ...newState,
13336
+ ...newState
13300
13337
  };
13301
13338
  this.state.mobile && this.state.visible
13302
13339
  ? this.backdropService.setBackdrop(this)
@@ -13307,9 +13344,8 @@ class SidebarComponent {
13307
13344
  }
13308
13345
  get getMobileBreakpoint() {
13309
13346
  const element = this.document.documentElement;
13310
- const mobileBreakpoint = getComputedStyle(element).getPropertyValue('--cui-mobile-breakpoint') ||
13311
- 'md';
13312
- const breakpointValue = getComputedStyle(element).getPropertyValue(`--cui-breakpoint-${mobileBreakpoint.trim()}`) || '768px';
13347
+ const mobileBreakpoint = this.document.defaultView?.getComputedStyle(element)?.getPropertyValue('--cui-mobile-breakpoint') ?? 'md';
13348
+ const breakpointValue = this.document.defaultView?.getComputedStyle(element)?.getPropertyValue(`--cui-breakpoint-${mobileBreakpoint.trim()}`) ?? '768px';
13313
13349
  return `${parseFloat(breakpointValue.trim()) - 0.02}px` || '767.98px';
13314
13350
  }
13315
13351
  constructor(document, renderer, breakpointObserver, sidebarService, backdropService) {
@@ -13324,12 +13360,12 @@ class SidebarComponent {
13324
13360
  this.#visible = false;
13325
13361
  this.#onMobile = false;
13326
13362
  this.state = {
13327
- sidebar: this,
13363
+ sidebar: this
13328
13364
  };
13329
13365
  this.#stateInitial = {
13330
13366
  narrow: false,
13331
13367
  visible: false,
13332
- unfoldable: false,
13368
+ unfoldable: false
13333
13369
  };
13334
13370
  /**
13335
13371
  * Place sidebar in non-static positions. [docs]
@@ -13356,7 +13392,7 @@ class SidebarComponent {
13356
13392
  [`sidebar-${this.size}`]: !!this.size,
13357
13393
  show: visible,
13358
13394
  // show: visible && this.#onMobile, //todo: check
13359
- hide: !visible,
13395
+ hide: !visible
13360
13396
  };
13361
13397
  }
13362
13398
  ngOnInit() {
@@ -13392,11 +13428,11 @@ class SidebarComponent {
13392
13428
  this.#stateInitial = {
13393
13429
  narrow: this.narrow,
13394
13430
  visible: this.visible,
13395
- unfoldable: this.unfoldable,
13431
+ unfoldable: this.unfoldable
13396
13432
  };
13397
13433
  this.sidebarService.toggle({
13398
13434
  ...this.#stateInitial,
13399
- sidebar: this,
13435
+ sidebar: this
13400
13436
  });
13401
13437
  }
13402
13438
  stateToggleSubscribe(subscribe = true) {
@@ -13425,7 +13461,7 @@ class SidebarComponent {
13425
13461
  mobile: isOnMobile,
13426
13462
  unfoldable: isUnfoldable,
13427
13463
  visible: isOnMobile ? !isOnMobile : this.#stateInitial.visible,
13428
- sidebar: this,
13464
+ sidebar: this
13429
13465
  });
13430
13466
  }
13431
13467
  });
@@ -13536,7 +13572,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImpor
13536
13572
  args: ['click', ['$event']]
13537
13573
  }] } });
13538
13574
 
13539
- class SidebarTogglerComponent {
13575
+ class SidebarTogglerDirective {
13540
13576
  constructor() {
13541
13577
  this.role = 'button';
13542
13578
  this.sidebarTogglerClass = true;
@@ -13545,17 +13581,18 @@ class SidebarTogglerComponent {
13545
13581
  return {
13546
13582
  appearance: 'button',
13547
13583
  'align-items': 'flex-start',
13584
+ cursor: 'pointer'
13548
13585
  };
13549
13586
  }
13550
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: SidebarTogglerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
13551
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", type: SidebarTogglerComponent, isStandalone: true, selector: "c-sidebar-toggler", inputs: { role: "role" }, host: { properties: { "attr.role": "this.role", "class.sidebar-toggler": "this.sidebarTogglerClass", "style": "this.getStyles" } }, ngImport: i0, template: ``, isInline: true }); }
13587
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: SidebarTogglerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
13588
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.8", type: SidebarTogglerDirective, isStandalone: true, selector: "[cSidebarToggler]", inputs: { role: "role" }, host: { properties: { "attr.role": "this.role", "class.sidebar-toggler": "this.sidebarTogglerClass", "style": "this.getStyles" } }, hostDirectives: [{ directive: SidebarToggleDirective, inputs: ["cSidebarToggle", "cSidebarToggler", "toggle", "toggle"] }], ngImport: i0 }); }
13552
13589
  }
13553
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: SidebarTogglerComponent, decorators: [{
13554
- type: Component,
13590
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: SidebarTogglerDirective, decorators: [{
13591
+ type: Directive,
13555
13592
  args: [{
13556
- selector: 'c-sidebar-toggler',
13557
- template: ``,
13558
- standalone: true
13593
+ selector: '[cSidebarToggler]',
13594
+ standalone: true,
13595
+ hostDirectives: [{ directive: SidebarToggleDirective, inputs: ['cSidebarToggle: cSidebarToggler', 'toggle'] }]
13559
13596
  }]
13560
13597
  }], propDecorators: { role: [{
13561
13598
  type: HostBinding,
@@ -14218,9 +14255,9 @@ class SidebarModule {
14218
14255
  SidebarNavLinkPipe,
14219
14256
  SidebarNavTitleComponent,
14220
14257
  SidebarToggleDirective,
14221
- SidebarTogglerComponent], exports: [SidebarComponent,
14258
+ SidebarTogglerDirective], exports: [SidebarComponent,
14222
14259
  SidebarToggleDirective,
14223
- SidebarTogglerComponent,
14260
+ SidebarTogglerDirective,
14224
14261
  SidebarBrandComponent,
14225
14262
  SidebarNavComponent,
14226
14263
  SidebarHeaderComponent,
@@ -14253,12 +14290,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImpor
14253
14290
  SidebarNavLinkPipe,
14254
14291
  SidebarNavTitleComponent,
14255
14292
  SidebarToggleDirective,
14256
- SidebarTogglerComponent
14293
+ SidebarTogglerDirective
14257
14294
  ],
14258
14295
  exports: [
14259
14296
  SidebarComponent,
14260
14297
  SidebarToggleDirective,
14261
- SidebarTogglerComponent,
14298
+ SidebarTogglerDirective,
14262
14299
  SidebarBrandComponent,
14263
14300
  SidebarNavComponent,
14264
14301
  SidebarHeaderComponent,
@@ -16143,7 +16180,7 @@ class ToastComponent {
16143
16180
  this._visible = false;
16144
16181
  /**
16145
16182
  * Event emitted on visibility change. [docs]
16146
- * @type boolean
16183
+ * @type EventEmitter<boolean>
16147
16184
  */
16148
16185
  this.visibleChange = new EventEmitter();
16149
16186
  /**
@@ -16213,14 +16250,14 @@ class ToastComponent {
16213
16250
  setTimer() {
16214
16251
  this.clearTimer();
16215
16252
  if (this.autohide && this.visible) {
16216
- this.timerId = this.delay > 0 ? setTimeout(() => this.onClose(), this.delay) : null;
16253
+ this.timerId = this.delay > 0 ? setTimeout(() => this.onClose(), this.delay) : undefined;
16217
16254
  this.setClock();
16218
16255
  }
16219
16256
  }
16220
16257
  clearTimer() {
16221
16258
  this.clearClock();
16222
16259
  clearTimeout(this.timerId);
16223
- this.timerId = null;
16260
+ this.timerId = undefined;
16224
16261
  }
16225
16262
  onClose() {
16226
16263
  this.clearTimer();
@@ -16244,7 +16281,7 @@ class ToastComponent {
16244
16281
  clearClock() {
16245
16282
  clearTimeout(this.clockTimerId);
16246
16283
  clearInterval(this.clockId);
16247
- this.clockId = null;
16284
+ this.clockId = undefined;
16248
16285
  }
16249
16286
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: ToastComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: ToasterService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
16250
16287
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", type: ToastComponent, isStandalone: true, selector: "c-toast", inputs: { autohide: "autohide", color: "color", delay: "delay", fade: "fade", visible: "visible", index: "index" }, outputs: { visibleChange: "visibleChange", timer: "timer" }, host: { listeners: { "mouseover": "onMouseOver()", "mouseout": "onMouseOut()" }, properties: { "@.disabled": "this.animationDisabled", "@fadeInOut": "this.animateType", "class": "this.hostClasses" } }, exportAs: ["cToast"], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{display:block;overflow:hidden}\n"], animations: [
@@ -16676,6 +16713,7 @@ class TooltipDirective {
16676
16713
  get ariaDescribedBy() {
16677
16714
  return this.tooltipId ? this.tooltipId : null;
16678
16715
  }
16716
+ #destroyRef;
16679
16717
  constructor(document, renderer, hostElement, viewContainerRef, listenersService, changeDetectorRef, intersectionService) {
16680
16718
  this.document = document;
16681
16719
  this.renderer = renderer;
@@ -16709,9 +16747,9 @@ class TooltipDirective {
16709
16747
  }
16710
16748
  ]
16711
16749
  };
16750
+ this.#destroyRef = inject(DestroyRef);
16712
16751
  }
16713
16752
  ngAfterViewInit() {
16714
- this.intersectionService.createIntersectionObserver(this.hostElement);
16715
16753
  this.intersectionServiceSubscribe();
16716
16754
  }
16717
16755
  ngOnChanges(changes) {
@@ -16722,7 +16760,6 @@ class TooltipDirective {
16722
16760
  ngOnDestroy() {
16723
16761
  this.clearListeners();
16724
16762
  this.destroyTooltipElement();
16725
- this.intersectionServiceSubscribe(false);
16726
16763
  }
16727
16764
  ngOnInit() {
16728
16765
  this.setListeners();
@@ -16749,18 +16786,16 @@ class TooltipDirective {
16749
16786
  clearListeners() {
16750
16787
  this.listenersService.clearListeners();
16751
16788
  }
16752
- intersectionServiceSubscribe(subscribe = true) {
16753
- if (subscribe) {
16754
- this.intersectingSubscription = this.intersectionService.intersecting$
16755
- .pipe(debounceTime(100))
16756
- .subscribe(isIntersecting => {
16757
- this.visible = isIntersecting ? this.visible : false;
16758
- !this.visible && this.removeTooltipElement();
16759
- });
16760
- }
16761
- else {
16762
- this.intersectingSubscription?.unsubscribe();
16763
- }
16789
+ intersectionServiceSubscribe() {
16790
+ this.intersectionService.createIntersectionObserver(this.hostElement);
16791
+ this.intersectionService.intersecting$
16792
+ .pipe(filter(next => next.hostElement === this.hostElement), debounceTime(100), finalize(() => {
16793
+ this.intersectionService.unobserve(this.hostElement);
16794
+ }), takeUntilDestroyed(this.#destroyRef))
16795
+ .subscribe(next => {
16796
+ this.visible = next.isIntersecting ? this.visible : false;
16797
+ !this.visible && this.removeTooltipElement();
16798
+ });
16764
16799
  }
16765
16800
  getUID(prefix) {
16766
16801
  let uid = prefix ?? 'random-id';
@@ -17209,5 +17244,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImpor
17209
17244
  * Generated bundle index. Do not edit.
17210
17245
  */
17211
17246
 
17212
- export { AccordionButtonDirective, AccordionComponent, AccordionItemComponent, AccordionModule, AlertComponent, AlertHeadingDirective, AlertLinkDirective, AlertModule, AlignDirective, AvatarComponent, AvatarModule, BackdropService, BadgeComponent, BadgeModule, BgColorDirective, BorderDirective, BreadcrumbComponent, BreadcrumbItemComponent, BreadcrumbModule, BreadcrumbRouterComponent, BreadcrumbRouterService, BreakpointInfix, ButtonCloseDirective, ButtonDirective, ButtonGroupComponent, ButtonGroupModule, ButtonModule, ButtonToolbarComponent, CalendarComponent, CalendarModule, CalendarMonthComponent, CalendarNavigationComponent, CalloutComponent, CalloutModule, CardBodyComponent, CardComponent, CardFooterComponent, CardGroupComponent, CardHeaderActionsComponent, CardHeaderComponent, CardImgDirective, CardImgOverlayComponent, CardLinkDirective, CardModule, CardSubtitleDirective, CardTextDirective, CardTitleDirective, CarouselCaptionComponent, CarouselComponent, CarouselConfig, CarouselControlComponent, CarouselIndicatorsComponent, CarouselInnerComponent, CarouselItemComponent, CarouselModule, ClassToggleService, ColComponent, ColDirective, CollapseDirective, CollapseModule, ContainerComponent, DatePickerComponent, DatePickerModule, DateRangePickerComponent, DateRangePickerModule, DropdownCloseDirective, DropdownComponent, DropdownDividerDirective, DropdownHeaderDirective, DropdownItemDirective, DropdownItemPlainDirective, DropdownMenuDirective, DropdownModule, DropdownService, DropdownToggleDirective, ElementCoverComponent, ElementCoverModule, FooterComponent, FooterModule, FormCheckComponent, FormCheckInputDirective, FormCheckLabelDirective, FormControlDirective, FormDirective, FormFeedbackComponent, FormFloatingDirective, FormLabelDirective, FormModule, FormSelectDirective, FormTextDirective, GridModule, GutterDirective, HeaderBrandComponent, HeaderComponent, HeaderDividerComponent, HeaderModule, HeaderNavComponent, HeaderTextComponent, HeaderTogglerDirective, HtmlAttributesDirective, ImgDirective, ImgModule, InputGroupComponent, InputGroupTextDirective, IntersectionService, ListGroupDirective, ListGroupItemDirective, ListGroupModule, ListenersService, LoadingButtonComponent, LoadingButtonModule, ModalBodyComponent, ModalComponent, ModalContentComponent, ModalDialogComponent, ModalFooterComponent, ModalHeaderComponent, ModalModule, ModalService, ModalTitleDirective, ModalToggleDirective, MultiSelectComponent, MultiSelectModule, MultiSelectOptgroupComponent, MultiSelectOptgroupLabelComponent, MultiSelectOptionComponent, NavComponent, NavItemComponent, NavLinkDirective, NavModule, NavbarBrandDirective, NavbarComponent, NavbarModule, NavbarNavComponent, NavbarTextComponent, NavbarTogglerDirective, OffcanvasBodyComponent, OffcanvasComponent, OffcanvasHeaderComponent, OffcanvasModule, OffcanvasService, OffcanvasTitleDirective, OffcanvasToggleDirective, PageItemComponent, PageItemDirective, PageLinkDirective, PaginationComponent, PaginationModule, PlaceholderAnimationDirective, PlaceholderDirective, PlaceholderModule, PopoverComponent, PopoverDirective, PopoverModule, ProgressBarComponent, ProgressComponent, ProgressModule, RoundedDirective, RowComponent, RowDirective, SharedModule, SidebarBrandComponent, SidebarComponent, SidebarFooterComponent, SidebarHeaderComponent, SidebarModule, SidebarNavComponent, SidebarService, SidebarToggleDirective, SidebarTogglerComponent, SmartPaginationComponent, SmartPaginationModule, SmartTableComponent, SmartTableFilterComponent, SmartTableModule, SpinnerComponent, SpinnerModule, TabContentComponent, TabContentRefDirective, TabPaneComponent, TabService, TableActiveDirective, TableColorDirective, TableDirective, TableModule, TabsModule, TemplateIdDirective, TextColorDirective, ThemeDirective, TimePickerComponent, TimePickerModule, ToastBodyComponent, ToastCloseDirective, ToastComponent, ToastHeaderComponent, ToastModule, ToasterComponent, ToasterHostDirective, ToasterPlacement, ToasterService, TooltipComponent, TooltipDirective, TooltipModule, UtilitiesModule, WidgetModule, WidgetStatAComponent, WidgetStatBComponent, WidgetStatCComponent, WidgetStatDComponent, WidgetStatEComponent, WidgetStatFComponent };
17247
+ export { AccordionButtonDirective, AccordionComponent, AccordionItemComponent, AccordionModule, AlertComponent, AlertHeadingDirective, AlertLinkDirective, AlertModule, AlignDirective, AvatarComponent, AvatarModule, BackdropService, BadgeComponent, BadgeModule, BgColorDirective, BorderDirective, BreadcrumbComponent, BreadcrumbItemComponent, BreadcrumbModule, BreadcrumbRouterComponent, BreadcrumbRouterService, BreakpointInfix, ButtonCloseDirective, ButtonDirective, ButtonGroupComponent, ButtonGroupModule, ButtonModule, ButtonToolbarComponent, CalendarComponent, CalendarModule, CalendarMonthComponent, CalendarNavigationComponent, CalloutComponent, CalloutModule, CardBodyComponent, CardComponent, CardFooterComponent, CardGroupComponent, CardHeaderActionsComponent, CardHeaderComponent, CardImgDirective, CardImgOverlayComponent, CardLinkDirective, CardModule, CardSubtitleDirective, CardTextDirective, CardTitleDirective, CarouselCaptionComponent, CarouselComponent, CarouselConfig, CarouselControlComponent, CarouselIndicatorsComponent, CarouselInnerComponent, CarouselItemComponent, CarouselModule, ClassToggleService, ColComponent, ColDirective, CollapseDirective, CollapseModule, ContainerComponent, DatePickerComponent, DatePickerModule, DateRangePickerComponent, DateRangePickerModule, DropdownCloseDirective, DropdownComponent, DropdownDividerDirective, DropdownHeaderDirective, DropdownItemDirective, DropdownItemPlainDirective, DropdownMenuDirective, DropdownModule, DropdownService, DropdownToggleDirective, ElementCoverComponent, ElementCoverModule, FooterComponent, FooterModule, FormCheckComponent, FormCheckInputDirective, FormCheckLabelDirective, FormControlDirective, FormDirective, FormFeedbackComponent, FormFloatingDirective, FormLabelDirective, FormModule, FormSelectDirective, FormTextDirective, GridModule, GutterDirective, HeaderBrandComponent, HeaderComponent, HeaderDividerComponent, HeaderModule, HeaderNavComponent, HeaderTextComponent, HeaderTogglerDirective, HtmlAttributesDirective, ImgDirective, ImgModule, InputGroupComponent, InputGroupTextDirective, IntersectionService, ListGroupDirective, ListGroupItemDirective, ListGroupModule, ListenersService, LoadingButtonComponent, LoadingButtonModule, ModalBodyComponent, ModalComponent, ModalContentComponent, ModalDialogComponent, ModalFooterComponent, ModalHeaderComponent, ModalModule, ModalService, ModalTitleDirective, ModalToggleDirective, MultiSelectComponent, MultiSelectModule, MultiSelectOptgroupComponent, MultiSelectOptgroupLabelComponent, MultiSelectOptionComponent, NavComponent, NavItemComponent, NavLinkDirective, NavModule, NavbarBrandDirective, NavbarComponent, NavbarModule, NavbarNavComponent, NavbarTextComponent, NavbarTogglerDirective, OffcanvasBodyComponent, OffcanvasComponent, OffcanvasHeaderComponent, OffcanvasModule, OffcanvasService, OffcanvasTitleDirective, OffcanvasToggleDirective, PageItemComponent, PageItemDirective, PageLinkDirective, PaginationComponent, PaginationModule, PlaceholderAnimationDirective, PlaceholderDirective, PlaceholderModule, PopoverComponent, PopoverDirective, PopoverModule, ProgressBarComponent, ProgressComponent, ProgressModule, RoundedDirective, RowComponent, RowDirective, ShadowOnScrollDirective, SharedModule, SidebarBrandComponent, SidebarComponent, SidebarFooterComponent, SidebarHeaderComponent, SidebarModule, SidebarNavComponent, SidebarNavHelper, SidebarService, SidebarToggleDirective, SidebarTogglerDirective, SmartPaginationComponent, SmartPaginationModule, SmartTableComponent, SmartTableFilterComponent, SmartTableModule, SpinnerComponent, SpinnerModule, TabContentComponent, TabContentRefDirective, TabPaneComponent, TabService, TableActiveDirective, TableColorDirective, TableDirective, TableModule, TabsModule, TemplateIdDirective, TextColorDirective, ThemeDirective, TimePickerComponent, TimePickerModule, ToastBodyComponent, ToastCloseDirective, ToastComponent, ToastHeaderComponent, ToastModule, ToasterComponent, ToasterHostDirective, ToasterPlacement, ToasterService, TooltipComponent, TooltipDirective, TooltipModule, UtilitiesModule, WidgetModule, WidgetStatAComponent, WidgetStatBComponent, WidgetStatCComponent, WidgetStatDComponent, WidgetStatEComponent, WidgetStatFComponent };
17213
17248
  //# sourceMappingURL=coreui-angular-pro.mjs.map