quang 20.3.0 → 20.3.2

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 (46) hide show
  1. package/components/date/README.md +3 -3
  2. package/components/input/README.md +11 -10
  3. package/components/select/README.md +2 -2
  4. package/components/shared/index.d.ts +1 -0
  5. package/components/wysiwyg/README.md +1 -1
  6. package/fesm2022/quang-auth-mobile.mjs.map +1 -1
  7. package/fesm2022/quang-auth.mjs +25 -25
  8. package/fesm2022/quang-auth.mjs.map +1 -1
  9. package/fesm2022/quang-components-autocomplete.mjs +27 -27
  10. package/fesm2022/quang-components-autocomplete.mjs.map +1 -1
  11. package/fesm2022/quang-components-checkbox.mjs +7 -7
  12. package/fesm2022/quang-components-checkbox.mjs.map +1 -1
  13. package/fesm2022/quang-components-date.mjs +35 -35
  14. package/fesm2022/quang-components-date.mjs.map +1 -1
  15. package/fesm2022/quang-components-input.mjs +15 -15
  16. package/fesm2022/quang-components-input.mjs.map +1 -1
  17. package/fesm2022/quang-components-paginator.mjs +28 -28
  18. package/fesm2022/quang-components-paginator.mjs.map +1 -1
  19. package/fesm2022/quang-components-select.mjs +15 -15
  20. package/fesm2022/quang-components-select.mjs.map +1 -1
  21. package/fesm2022/quang-components-shared.mjs +62 -52
  22. package/fesm2022/quang-components-shared.mjs.map +1 -1
  23. package/fesm2022/quang-components-table.mjs +16 -16
  24. package/fesm2022/quang-components-table.mjs.map +1 -1
  25. package/fesm2022/quang-components-wysiwyg.mjs +32 -32
  26. package/fesm2022/quang-components-wysiwyg.mjs.map +1 -1
  27. package/fesm2022/quang-data-handling.mjs.map +1 -1
  28. package/fesm2022/quang-device.mjs +3 -3
  29. package/fesm2022/quang-device.mjs.map +1 -1
  30. package/fesm2022/quang-forms.mjs.map +1 -1
  31. package/fesm2022/quang-loader.mjs +8 -8
  32. package/fesm2022/quang-loader.mjs.map +1 -1
  33. package/fesm2022/quang-overlay-modal.mjs +21 -21
  34. package/fesm2022/quang-overlay-modal.mjs.map +1 -1
  35. package/fesm2022/quang-overlay-popover.mjs +12 -12
  36. package/fesm2022/quang-overlay-popover.mjs.map +1 -1
  37. package/fesm2022/quang-overlay-shared.mjs +33 -33
  38. package/fesm2022/quang-overlay-shared.mjs.map +1 -1
  39. package/fesm2022/quang-overlay-toast.mjs +11 -11
  40. package/fesm2022/quang-overlay-toast.mjs.map +1 -1
  41. package/fesm2022/quang-overlay-tooltip.mjs +13 -13
  42. package/fesm2022/quang-overlay-tooltip.mjs.map +1 -1
  43. package/fesm2022/quang-translation.mjs +6 -6
  44. package/fesm2022/quang-translation.mjs.map +1 -1
  45. package/fesm2022/quang.mjs.map +1 -1
  46. package/package.json +22 -22
@@ -40,14 +40,14 @@ class QuangModalComponent {
40
40
  constructor(overlay) {
41
41
  this.overlay = overlay;
42
42
  this.backdropClick = output();
43
- this.position = input.required();
44
- this.height = input('80vh');
45
- this.width = input('80vw');
46
- this.padding = input('0 1rem');
47
- this.containerClass = input('');
48
- this.animationMode = input();
49
- this.backgroundColor = input();
50
- this.showBackdrop = input(true);
43
+ this.position = input.required(...(ngDevMode ? [{ debugName: "position" }] : []));
44
+ this.height = input('80vh', ...(ngDevMode ? [{ debugName: "height" }] : []));
45
+ this.width = input('80vw', ...(ngDevMode ? [{ debugName: "width" }] : []));
46
+ this.padding = input('0 1rem', ...(ngDevMode ? [{ debugName: "padding" }] : []));
47
+ this.containerClass = input('', ...(ngDevMode ? [{ debugName: "containerClass" }] : []));
48
+ this.animationMode = input(...(ngDevMode ? [undefined, { debugName: "animationMode" }] : []));
49
+ this.backgroundColor = input(...(ngDevMode ? [undefined, { debugName: "backgroundColor" }] : []));
50
+ this.showBackdrop = input(true, ...(ngDevMode ? [{ debugName: "showBackdrop" }] : []));
51
51
  this.positionStrategy = computed(() => {
52
52
  switch (this.position()) {
53
53
  case 'right':
@@ -58,7 +58,7 @@ class QuangModalComponent {
58
58
  default:
59
59
  return this.overlay.position().global().centerHorizontally().centerVertically();
60
60
  }
61
- });
61
+ }, ...(ngDevMode ? [{ debugName: "positionStrategy" }] : []));
62
62
  this.animationClassEnter = computed(() => {
63
63
  switch (this.animationMode()) {
64
64
  case 'SLIDE_FROM_LEFT_TO_RIGHT':
@@ -74,7 +74,7 @@ class QuangModalComponent {
74
74
  default:
75
75
  return '';
76
76
  }
77
- });
77
+ }, ...(ngDevMode ? [{ debugName: "animationClassEnter" }] : []));
78
78
  this.destroyRef = inject(DestroyRef);
79
79
  }
80
80
  ngAfterViewInit() {
@@ -100,10 +100,10 @@ class QuangModalComponent {
100
100
  this.overlayRef?.detach();
101
101
  this.overlayRef?.dispose();
102
102
  }
103
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: QuangModalComponent, deps: [{ token: i1.Overlay }], target: i0.ɵɵFactoryTarget.Component }); }
104
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.4", type: QuangModalComponent, isStandalone: true, selector: "quang-modal", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: true, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null }, containerClass: { classPropertyName: "containerClass", publicName: "containerClass", isSignal: true, isRequired: false, transformFunction: null }, animationMode: { classPropertyName: "animationMode", publicName: "animationMode", isSignal: true, isRequired: false, transformFunction: null }, backgroundColor: { classPropertyName: "backgroundColor", publicName: "backgroundColor", isSignal: true, isRequired: false, transformFunction: null }, showBackdrop: { classPropertyName: "showBackdrop", publicName: "showBackdrop", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { backdropClick: "backdropClick" }, viewQueries: [{ propertyName: "portal", first: true, predicate: CdkPortal, descendants: true }], ngImport: i0, template: "<ng-template cdkPortal>\n <div\n [ngStyle]=\"{\n '--quang-modal-panel-width': width(),\n '--quang-modal-panel-height': height(),\n '--quang-modal-panel-background': backgroundColor(),\n '--quang-modal-panel-padding': padding(),\n }\"\n class=\"dialog {{ containerClass() }} {{ animationClassEnter() }}\"\n >\n <div class=\"dialog__header\">\n <ng-content select=\"[header]\"></ng-content>\n </div>\n <div class=\"dialog__body\">\n <ng-content select=\"[body]\"></ng-content>\n </div>\n <div class=\"dialog__footer\">\n <ng-content select=\"[footer]\"></ng-content>\n </div>\n </div>\n</ng-template>\n", styles: [".dialog{background-color:var(--quang-modal-panel-background, var(--bs-body-bg, initial));position:relative;display:flex;flex-direction:column;width:var(--quang-modal-panel-width);height:var(--quang-modal-panel-height);padding:var(--quang-modal-panel-padding)}.dialog__header{display:flex;flex-direction:column;width:100%}.dialog__body{flex:1;overflow:auto}.dialog__footer{display:flex;justify-content:flex-end}::ng-deep .cdk-global-scrollblock{overflow-y:auto}@keyframes left-to-right_enter{0%{transform:translate(-100%)}to{transform:translate(0)}}.left-to-right-enter-active{animation:left-to-right_enter .5s ease-in-out forwards}@keyframes right-to-left_enter{0%{transform:translate(100%)}to{transform:translate(0)}}.right-to-left-enter-active{animation:right-to-left_enter .5s ease-in-out forwards}@keyframes top-to-bottom_enter{0%{transform:translateY(-100%)}to{transform:translateY(0)}}.top-to-bottom-enter-active{animation:top-to-bottom_enter .5s ease-in-out forwards}@keyframes bottom-to-top_enter{0%{transform:translateY(100%)}to{transform:translateY(0)}}.top-to-bottom-enter-active{animation:bottom-to-top_enter .5s ease-in-out forwards}@keyframes fade_enter{0%{opacity:0}to{opacity:1}}.fade-enter-active{animation:fade_enter .5s ease-in-out forwards}\n"], dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i2.CdkPortal, selector: "[cdkPortal]", exportAs: ["cdkPortal"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
103
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: QuangModalComponent, deps: [{ token: i1.Overlay }], target: i0.ɵɵFactoryTarget.Component }); }
104
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.7", type: QuangModalComponent, isStandalone: true, selector: "quang-modal", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: true, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null }, containerClass: { classPropertyName: "containerClass", publicName: "containerClass", isSignal: true, isRequired: false, transformFunction: null }, animationMode: { classPropertyName: "animationMode", publicName: "animationMode", isSignal: true, isRequired: false, transformFunction: null }, backgroundColor: { classPropertyName: "backgroundColor", publicName: "backgroundColor", isSignal: true, isRequired: false, transformFunction: null }, showBackdrop: { classPropertyName: "showBackdrop", publicName: "showBackdrop", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { backdropClick: "backdropClick" }, viewQueries: [{ propertyName: "portal", first: true, predicate: CdkPortal, descendants: true }], ngImport: i0, template: "<ng-template cdkPortal>\n <div\n [ngStyle]=\"{\n '--quang-modal-panel-width': width(),\n '--quang-modal-panel-height': height(),\n '--quang-modal-panel-background': backgroundColor(),\n '--quang-modal-panel-padding': padding(),\n }\"\n class=\"dialog {{ containerClass() }} {{ animationClassEnter() }}\"\n >\n <div class=\"dialog__header\">\n <ng-content select=\"[header]\"></ng-content>\n </div>\n <div class=\"dialog__body\">\n <ng-content select=\"[body]\"></ng-content>\n </div>\n <div class=\"dialog__footer\">\n <ng-content select=\"[footer]\"></ng-content>\n </div>\n </div>\n</ng-template>\n", styles: [".dialog{background-color:var(--quang-modal-panel-background, var(--bs-body-bg, initial));position:relative;display:flex;flex-direction:column;width:var(--quang-modal-panel-width);height:var(--quang-modal-panel-height);padding:var(--quang-modal-panel-padding)}.dialog__header{display:flex;flex-direction:column;width:100%}.dialog__body{flex:1;overflow:auto}.dialog__footer{display:flex;justify-content:flex-end}::ng-deep .cdk-global-scrollblock{overflow-y:auto}@keyframes left-to-right_enter{0%{transform:translate(-100%)}to{transform:translate(0)}}.left-to-right-enter-active{animation:left-to-right_enter .5s ease-in-out forwards}@keyframes right-to-left_enter{0%{transform:translate(100%)}to{transform:translate(0)}}.right-to-left-enter-active{animation:right-to-left_enter .5s ease-in-out forwards}@keyframes top-to-bottom_enter{0%{transform:translateY(-100%)}to{transform:translateY(0)}}.top-to-bottom-enter-active{animation:top-to-bottom_enter .5s ease-in-out forwards}@keyframes bottom-to-top_enter{0%{transform:translateY(100%)}to{transform:translateY(0)}}.top-to-bottom-enter-active{animation:bottom-to-top_enter .5s ease-in-out forwards}@keyframes fade_enter{0%{opacity:0}to{opacity:1}}.fade-enter-active{animation:fade_enter .5s ease-in-out forwards}\n"], dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i2.CdkPortal, selector: "[cdkPortal]", exportAs: ["cdkPortal"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
105
105
  }
106
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: QuangModalComponent, decorators: [{
106
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: QuangModalComponent, decorators: [{
107
107
  type: Component,
108
108
  args: [{ selector: 'quang-modal', imports: [PortalModule, NgStyle], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template cdkPortal>\n <div\n [ngStyle]=\"{\n '--quang-modal-panel-width': width(),\n '--quang-modal-panel-height': height(),\n '--quang-modal-panel-background': backgroundColor(),\n '--quang-modal-panel-padding': padding(),\n }\"\n class=\"dialog {{ containerClass() }} {{ animationClassEnter() }}\"\n >\n <div class=\"dialog__header\">\n <ng-content select=\"[header]\"></ng-content>\n </div>\n <div class=\"dialog__body\">\n <ng-content select=\"[body]\"></ng-content>\n </div>\n <div class=\"dialog__footer\">\n <ng-content select=\"[footer]\"></ng-content>\n </div>\n </div>\n</ng-template>\n", styles: [".dialog{background-color:var(--quang-modal-panel-background, var(--bs-body-bg, initial));position:relative;display:flex;flex-direction:column;width:var(--quang-modal-panel-width);height:var(--quang-modal-panel-height);padding:var(--quang-modal-panel-padding)}.dialog__header{display:flex;flex-direction:column;width:100%}.dialog__body{flex:1;overflow:auto}.dialog__footer{display:flex;justify-content:flex-end}::ng-deep .cdk-global-scrollblock{overflow-y:auto}@keyframes left-to-right_enter{0%{transform:translate(-100%)}to{transform:translate(0)}}.left-to-right-enter-active{animation:left-to-right_enter .5s ease-in-out forwards}@keyframes right-to-left_enter{0%{transform:translate(100%)}to{transform:translate(0)}}.right-to-left-enter-active{animation:right-to-left_enter .5s ease-in-out forwards}@keyframes top-to-bottom_enter{0%{transform:translateY(-100%)}to{transform:translateY(0)}}.top-to-bottom-enter-active{animation:top-to-bottom_enter .5s ease-in-out forwards}@keyframes bottom-to-top_enter{0%{transform:translateY(100%)}to{transform:translateY(0)}}.top-to-bottom-enter-active{animation:bottom-to-top_enter .5s ease-in-out forwards}@keyframes fade_enter{0%{opacity:0}to{opacity:1}}.fade-enter-active{animation:fade_enter .5s ease-in-out forwards}\n"] }]
109
109
  }], ctorParameters: () => [{ type: i1.Overlay }], propDecorators: { portal: [{
@@ -115,12 +115,12 @@ class QuangModalService {
115
115
  constructor() {
116
116
  this.environmentInjector = inject(EnvironmentInjector);
117
117
  this.appRef = inject(ApplicationRef);
118
- this.modalInstances = signal([]);
119
- this.idCounter = signal(0);
118
+ this.modalInstances = signal([], ...(ngDevMode ? [{ debugName: "modalInstances" }] : []));
119
+ this.idCounter = signal(0, ...(ngDevMode ? [{ debugName: "idCounter" }] : []));
120
120
  // Computed properties for easier access
121
- this.modalCount = computed(() => this.modalInstances().length);
122
- this.hasOpenModals = computed(() => this.modalInstances().length > 0);
123
- this.modalIds = computed(() => this.modalInstances().map((instance) => instance.id));
121
+ this.modalCount = computed(() => this.modalInstances().length, ...(ngDevMode ? [{ debugName: "modalCount" }] : []));
122
+ this.hasOpenModals = computed(() => this.modalInstances().length > 0, ...(ngDevMode ? [{ debugName: "hasOpenModals" }] : []));
123
+ this.modalIds = computed(() => this.modalInstances().map((instance) => instance.id), ...(ngDevMode ? [{ debugName: "modalIds" }] : []));
124
124
  // Subject to emit when modals are closed
125
125
  this.modalClosedSubject = new Subject();
126
126
  this.modalClosed$ = this.modalClosedSubject.asObservable();
@@ -223,10 +223,10 @@ class QuangModalService {
223
223
  this.idCounter.update((count) => count + 1);
224
224
  return `modal-${this.idCounter()}-${Date.now()}`;
225
225
  }
226
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: QuangModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
227
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: QuangModalService, providedIn: 'root' }); }
226
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: QuangModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
227
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: QuangModalService, providedIn: 'root' }); }
228
228
  }
229
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: QuangModalService, decorators: [{
229
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: QuangModalService, decorators: [{
230
230
  type: Injectable,
231
231
  args: [{
232
232
  providedIn: 'root',
@@ -1 +1 @@
1
- {"version":3,"file":"quang-overlay-modal.mjs","sources":["../../../projects/quang/overlay/modal/modal.component.ts","../../../projects/quang/overlay/modal/modal.component.html","../../../projects/quang/overlay/modal/modal.service.ts","../../../projects/quang/overlay/modal/quang-overlay-modal.ts"],"sourcesContent":["import { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay'\nimport { CdkPortal, PortalModule } from '@angular/cdk/portal'\nimport { NgStyle } from '@angular/common'\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n OnDestroy,\n ViewChild,\n computed,\n inject,\n input,\n output,\n} from '@angular/core'\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop'\n\nimport { ModalAnimationMode } from './models/ModalAnimationMode'\n\n@Component({\n selector: 'quang-modal',\n imports: [PortalModule, NgStyle],\n templateUrl: './modal.component.html',\n styleUrl: './modal.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\n/**\n * Modal component that leverages Angular CDK's Overlay and Portal modules to create modals with flexible positioning and configurations.\n *\n * @usageNotes\n * The component can be shown by using its selector `quang-modal` with a boolean binded to the Angular directive `*ngIf`.\n *\n * Its structure is divided in 3 `ng-content` to set the header, body and footer.\n * Every section has its own selector and can be used to render custom content in a simple way.\n *\n * `header` section is placed on top, `footer` section is placed on bottom.\n *\n * @example\n * <quang-modal\n * (backdropClick)=\"closeModal()\"\n * *ngIf=\"showModal\"\n * position=\"right\"\n * >\n * <ng-container header>\n * <h2>Modal header</h2>\n * </ng-container>\n * <ng-container body>\n * <h3>Modal body</h3>\n * </ng-container>\n * <ng-container footer>\n * <h3>Modal footer</h3>\n * </ng-container>\n * </quang-modal>\n */\nexport class QuangModalComponent implements AfterViewInit, OnDestroy {\n @ViewChild(CdkPortal) public readonly portal?: CdkPortal\n\n backdropClick = output<void>()\n\n position = input.required<'right' | 'left' | 'center'>()\n\n height = input<string>('80vh')\n\n width = input<string>('80vw')\n\n padding = input<string>('0 1rem')\n\n containerClass = input<string>('')\n\n animationMode = input<ModalAnimationMode>()\n\n backgroundColor = input<string>()\n\n showBackdrop = input<boolean>(true)\n\n positionStrategy = computed(() => {\n switch (this.position()) {\n case 'right':\n return this.overlay.position().global().right().top()\n case 'left':\n return this.overlay.position().global().left().top()\n case 'center':\n default:\n return this.overlay.position().global().centerHorizontally().centerVertically()\n }\n })\n\n animationClassEnter = computed(() => {\n switch (this.animationMode()) {\n case 'SLIDE_FROM_LEFT_TO_RIGHT':\n return 'left-to-right-enter-active'\n case 'SLIDE_FROM_RIGHT_TO_LEFT':\n return 'right-to-left-enter-active'\n case 'SLIDE_TOP_TO_BOTTOM':\n return 'top-to-bottom-enter-active'\n case 'SLIDE_BOTTOM_TO_TOP':\n return 'top-to-bottom-enter-active'\n case 'FADE':\n return 'fade-enter-active'\n default:\n return ''\n }\n })\n\n private readonly destroyRef = inject(DestroyRef)\n\n private overlayConfig?: OverlayConfig\n\n private overlayRef?: OverlayRef\n\n constructor(private readonly overlay: Overlay) {}\n\n ngAfterViewInit(): void {\n this.overlayConfig = new OverlayConfig({\n hasBackdrop: true,\n positionStrategy: this.positionStrategy(),\n scrollStrategy: this.overlay.scrollStrategies.block(),\n backdropClass: this.showBackdrop() ? undefined : '',\n })\n this.overlayRef = this.overlay.create(this.overlayConfig)\n this.overlayRef\n .backdropClick()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.backdropClick.emit()\n })\n this.overlayRef?.attach(this.portal)\n }\n\n ngOnDestroy(): void {\n this.closeModal()\n }\n\n closeModal(): void {\n this.overlayRef?.detach()\n this.overlayRef?.dispose()\n }\n}\n","<ng-template cdkPortal>\n <div\n [ngStyle]=\"{\n '--quang-modal-panel-width': width(),\n '--quang-modal-panel-height': height(),\n '--quang-modal-panel-background': backgroundColor(),\n '--quang-modal-panel-padding': padding(),\n }\"\n class=\"dialog {{ containerClass() }} {{ animationClassEnter() }}\"\n >\n <div class=\"dialog__header\">\n <ng-content select=\"[header]\"></ng-content>\n </div>\n <div class=\"dialog__body\">\n <ng-content select=\"[body]\"></ng-content>\n </div>\n <div class=\"dialog__footer\">\n <ng-content select=\"[footer]\"></ng-content>\n </div>\n </div>\n</ng-template>\n","import {\n ApplicationRef,\n EnvironmentInjector,\n Injectable,\n Type,\n computed,\n createComponent,\n inject,\n signal,\n} from '@angular/core'\n\nimport { Subject } from 'rxjs'\n\nimport { QuangModalComponent } from './modal.component'\n\nimport { ModalInstance } from './models/ModalInstance'\nimport { ModalOptions } from './models/ModalOptions'\n\n@Injectable({\n providedIn: 'root',\n})\nexport class QuangModalService {\n private readonly environmentInjector = inject(EnvironmentInjector)\n private readonly appRef = inject(ApplicationRef)\n\n private modalInstances = signal<ModalInstance[]>([])\n private idCounter = signal(0)\n\n // Computed properties for easier access\n public modalCount = computed(() => this.modalInstances().length)\n public hasOpenModals = computed(() => this.modalInstances().length > 0)\n public modalIds = computed(() => this.modalInstances().map((instance) => instance.id))\n\n // Subject to emit when modals are closed\n private modalClosedSubject = new Subject<string>()\n public modalClosed$ = this.modalClosedSubject.asObservable()\n\n showModal<T = unknown>(component: Type<T>, options: ModalOptions, componentInputs?: Record<string, unknown>): string {\n const id = this.generateId()\n\n // Create the content component instance first\n const contentRef = createComponent(component, {\n environmentInjector: this.environmentInjector,\n })\n\n // Set component inputs if provided\n if (componentInputs) {\n Object.entries(componentInputs).forEach(([key, value]) => {\n contentRef.setInput(key, value)\n })\n }\n\n // Create the modal component instance with content projected in body slot\n const modalRef = createComponent(QuangModalComponent, {\n environmentInjector: this.environmentInjector,\n projectableNodes: [\n [], // header slot (empty)\n [contentRef.location.nativeElement], // body slot (content component)\n [], // footer slot (empty)\n ],\n })\n\n // Set modal inputs from options\n modalRef.setInput('position', options.position)\n if (options.height !== undefined) modalRef.setInput('height', options.height)\n if (options.width !== undefined) modalRef.setInput('width', options.width)\n if (options.padding !== undefined) modalRef.setInput('padding', options.padding)\n if (options.containerClass !== undefined) modalRef.setInput('containerClass', options.containerClass)\n if (options.animationMode !== undefined) modalRef.setInput('animationMode', options.animationMode)\n if (options.backgroundColor !== undefined) modalRef.setInput('backgroundColor', options.backgroundColor)\n if (options.showBackdrop !== undefined) modalRef.setInput('showBackdrop', options.showBackdrop)\n\n // Subscribe to backdrop click to close modal\n modalRef.instance.backdropClick.subscribe(() => {\n this.hideModal(id)\n })\n\n // Attach components to the application\n this.appRef.attachView(contentRef.hostView)\n this.appRef.attachView(modalRef.hostView)\n\n // Add modal to DOM\n document.body.appendChild(modalRef.location.nativeElement)\n\n // Store modal instance\n const modalInstance: ModalInstance = {\n id,\n modalRef,\n contentRef,\n }\n this.modalInstances.update((instances) => [...instances, modalInstance])\n\n return id\n }\n\n hideModal(id?: string): void {\n if (id) {\n // Find and remove modal by id\n const instances = this.modalInstances()\n const index = instances.findIndex((instance: ModalInstance) => instance.id === id)\n if (index !== -1) {\n const modalToClose = instances[index]\n this.destroyModalInstance(modalToClose)\n this.modalInstances.update((instances) => instances.filter((_, i) => i !== index))\n // Emit modal closed event\n this.modalClosedSubject.next(id)\n }\n } else {\n // Remove last modal (LIFO - Last In First Out)\n const instances = this.modalInstances()\n const lastModal = instances[instances.length - 1]\n if (lastModal) {\n this.destroyModalInstance(lastModal)\n this.modalInstances.update((instances) => instances.slice(0, -1))\n // Emit modal closed event\n this.modalClosedSubject.next(lastModal.id)\n }\n }\n }\n\n private destroyModalInstance(instance: ModalInstance): void {\n // Close the modal component (triggers overlay cleanup)\n instance.modalRef.instance.closeModal()\n\n // Detach from application\n this.appRef.detachView(instance.contentRef.hostView)\n this.appRef.detachView(instance.modalRef.hostView)\n\n // Remove from DOM if still attached\n if (instance.modalRef.location.nativeElement.parentNode) {\n instance.modalRef.location.nativeElement.parentNode.removeChild(instance.modalRef.location.nativeElement)\n }\n\n // Destroy component references\n instance.contentRef.destroy()\n instance.modalRef.destroy()\n }\n\n private generateId(): string {\n this.idCounter.update((count) => count + 1)\n return `modal-${this.idCounter()}-${Date.now()}`\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AA0BA;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;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACpBD;;AAEG;;;;"}
1
+ {"version":3,"file":"quang-overlay-modal.mjs","sources":["../../../projects/quang/overlay/modal/modal.component.ts","../../../projects/quang/overlay/modal/modal.component.html","../../../projects/quang/overlay/modal/modal.service.ts","../../../projects/quang/overlay/modal/quang-overlay-modal.ts"],"sourcesContent":["import { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay'\nimport { CdkPortal, PortalModule } from '@angular/cdk/portal'\nimport { NgStyle } from '@angular/common'\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n OnDestroy,\n ViewChild,\n computed,\n inject,\n input,\n output,\n} from '@angular/core'\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop'\n\nimport { ModalAnimationMode } from './models/ModalAnimationMode'\n\n@Component({\n selector: 'quang-modal',\n imports: [PortalModule, NgStyle],\n templateUrl: './modal.component.html',\n styleUrl: './modal.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\n/**\n * Modal component that leverages Angular CDK's Overlay and Portal modules to create modals with flexible positioning and configurations.\n *\n * @usageNotes\n * The component can be shown by using its selector `quang-modal` with a boolean binded to the Angular directive `*ngIf`.\n *\n * Its structure is divided in 3 `ng-content` to set the header, body and footer.\n * Every section has its own selector and can be used to render custom content in a simple way.\n *\n * `header` section is placed on top, `footer` section is placed on bottom.\n *\n * @example\n * <quang-modal\n * (backdropClick)=\"closeModal()\"\n * *ngIf=\"showModal\"\n * position=\"right\"\n * >\n * <ng-container header>\n * <h2>Modal header</h2>\n * </ng-container>\n * <ng-container body>\n * <h3>Modal body</h3>\n * </ng-container>\n * <ng-container footer>\n * <h3>Modal footer</h3>\n * </ng-container>\n * </quang-modal>\n */\nexport class QuangModalComponent implements AfterViewInit, OnDestroy {\n @ViewChild(CdkPortal) public readonly portal?: CdkPortal\n\n backdropClick = output<void>()\n\n position = input.required<'right' | 'left' | 'center'>()\n\n height = input<string>('80vh')\n\n width = input<string>('80vw')\n\n padding = input<string>('0 1rem')\n\n containerClass = input<string>('')\n\n animationMode = input<ModalAnimationMode>()\n\n backgroundColor = input<string>()\n\n showBackdrop = input<boolean>(true)\n\n positionStrategy = computed(() => {\n switch (this.position()) {\n case 'right':\n return this.overlay.position().global().right().top()\n case 'left':\n return this.overlay.position().global().left().top()\n case 'center':\n default:\n return this.overlay.position().global().centerHorizontally().centerVertically()\n }\n })\n\n animationClassEnter = computed(() => {\n switch (this.animationMode()) {\n case 'SLIDE_FROM_LEFT_TO_RIGHT':\n return 'left-to-right-enter-active'\n case 'SLIDE_FROM_RIGHT_TO_LEFT':\n return 'right-to-left-enter-active'\n case 'SLIDE_TOP_TO_BOTTOM':\n return 'top-to-bottom-enter-active'\n case 'SLIDE_BOTTOM_TO_TOP':\n return 'top-to-bottom-enter-active'\n case 'FADE':\n return 'fade-enter-active'\n default:\n return ''\n }\n })\n\n private readonly destroyRef = inject(DestroyRef)\n\n private overlayConfig?: OverlayConfig\n\n private overlayRef?: OverlayRef\n\n constructor(private readonly overlay: Overlay) {}\n\n ngAfterViewInit(): void {\n this.overlayConfig = new OverlayConfig({\n hasBackdrop: true,\n positionStrategy: this.positionStrategy(),\n scrollStrategy: this.overlay.scrollStrategies.block(),\n backdropClass: this.showBackdrop() ? undefined : '',\n })\n this.overlayRef = this.overlay.create(this.overlayConfig)\n this.overlayRef\n .backdropClick()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.backdropClick.emit()\n })\n this.overlayRef?.attach(this.portal)\n }\n\n ngOnDestroy(): void {\n this.closeModal()\n }\n\n closeModal(): void {\n this.overlayRef?.detach()\n this.overlayRef?.dispose()\n }\n}\n","<ng-template cdkPortal>\n <div\n [ngStyle]=\"{\n '--quang-modal-panel-width': width(),\n '--quang-modal-panel-height': height(),\n '--quang-modal-panel-background': backgroundColor(),\n '--quang-modal-panel-padding': padding(),\n }\"\n class=\"dialog {{ containerClass() }} {{ animationClassEnter() }}\"\n >\n <div class=\"dialog__header\">\n <ng-content select=\"[header]\"></ng-content>\n </div>\n <div class=\"dialog__body\">\n <ng-content select=\"[body]\"></ng-content>\n </div>\n <div class=\"dialog__footer\">\n <ng-content select=\"[footer]\"></ng-content>\n </div>\n </div>\n</ng-template>\n","import {\n ApplicationRef,\n EnvironmentInjector,\n Injectable,\n Type,\n computed,\n createComponent,\n inject,\n signal,\n} from '@angular/core'\n\nimport { Subject } from 'rxjs'\n\nimport { QuangModalComponent } from './modal.component'\n\nimport { ModalInstance } from './models/ModalInstance'\nimport { ModalOptions } from './models/ModalOptions'\n\n@Injectable({\n providedIn: 'root',\n})\nexport class QuangModalService {\n private readonly environmentInjector = inject(EnvironmentInjector)\n private readonly appRef = inject(ApplicationRef)\n\n private modalInstances = signal<ModalInstance[]>([])\n private idCounter = signal(0)\n\n // Computed properties for easier access\n public modalCount = computed(() => this.modalInstances().length)\n public hasOpenModals = computed(() => this.modalInstances().length > 0)\n public modalIds = computed(() => this.modalInstances().map((instance) => instance.id))\n\n // Subject to emit when modals are closed\n private modalClosedSubject = new Subject<string>()\n public modalClosed$ = this.modalClosedSubject.asObservable()\n\n showModal<T = unknown>(component: Type<T>, options: ModalOptions, componentInputs?: Record<string, unknown>): string {\n const id = this.generateId()\n\n // Create the content component instance first\n const contentRef = createComponent(component, {\n environmentInjector: this.environmentInjector,\n })\n\n // Set component inputs if provided\n if (componentInputs) {\n Object.entries(componentInputs).forEach(([key, value]) => {\n contentRef.setInput(key, value)\n })\n }\n\n // Create the modal component instance with content projected in body slot\n const modalRef = createComponent(QuangModalComponent, {\n environmentInjector: this.environmentInjector,\n projectableNodes: [\n [], // header slot (empty)\n [contentRef.location.nativeElement], // body slot (content component)\n [], // footer slot (empty)\n ],\n })\n\n // Set modal inputs from options\n modalRef.setInput('position', options.position)\n if (options.height !== undefined) modalRef.setInput('height', options.height)\n if (options.width !== undefined) modalRef.setInput('width', options.width)\n if (options.padding !== undefined) modalRef.setInput('padding', options.padding)\n if (options.containerClass !== undefined) modalRef.setInput('containerClass', options.containerClass)\n if (options.animationMode !== undefined) modalRef.setInput('animationMode', options.animationMode)\n if (options.backgroundColor !== undefined) modalRef.setInput('backgroundColor', options.backgroundColor)\n if (options.showBackdrop !== undefined) modalRef.setInput('showBackdrop', options.showBackdrop)\n\n // Subscribe to backdrop click to close modal\n modalRef.instance.backdropClick.subscribe(() => {\n this.hideModal(id)\n })\n\n // Attach components to the application\n this.appRef.attachView(contentRef.hostView)\n this.appRef.attachView(modalRef.hostView)\n\n // Add modal to DOM\n document.body.appendChild(modalRef.location.nativeElement)\n\n // Store modal instance\n const modalInstance: ModalInstance = {\n id,\n modalRef,\n contentRef,\n }\n this.modalInstances.update((instances) => [...instances, modalInstance])\n\n return id\n }\n\n hideModal(id?: string): void {\n if (id) {\n // Find and remove modal by id\n const instances = this.modalInstances()\n const index = instances.findIndex((instance: ModalInstance) => instance.id === id)\n if (index !== -1) {\n const modalToClose = instances[index]\n this.destroyModalInstance(modalToClose)\n this.modalInstances.update((instances) => instances.filter((_, i) => i !== index))\n // Emit modal closed event\n this.modalClosedSubject.next(id)\n }\n } else {\n // Remove last modal (LIFO - Last In First Out)\n const instances = this.modalInstances()\n const lastModal = instances[instances.length - 1]\n if (lastModal) {\n this.destroyModalInstance(lastModal)\n this.modalInstances.update((instances) => instances.slice(0, -1))\n // Emit modal closed event\n this.modalClosedSubject.next(lastModal.id)\n }\n }\n }\n\n private destroyModalInstance(instance: ModalInstance): void {\n // Close the modal component (triggers overlay cleanup)\n instance.modalRef.instance.closeModal()\n\n // Detach from application\n this.appRef.detachView(instance.contentRef.hostView)\n this.appRef.detachView(instance.modalRef.hostView)\n\n // Remove from DOM if still attached\n if (instance.modalRef.location.nativeElement.parentNode) {\n instance.modalRef.location.nativeElement.parentNode.removeChild(instance.modalRef.location.nativeElement)\n }\n\n // Destroy component references\n instance.contentRef.destroy()\n instance.modalRef.destroy()\n }\n\n private generateId(): string {\n this.idCounter.update((count) => count + 1)\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AE,CAAA,CAAE;;8GAvHvC,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,cAFhB,MAAM,EAAA,CAAA,CAAA;;2FAEP,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAH7B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACpBD;;AAEG;;;;"}
@@ -21,10 +21,10 @@ import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
21
21
  */
22
22
  class QuangPopoverComponent {
23
23
  constructor() {
24
- this.overlayContent = input(null);
25
- this.positionPair = signal(null);
26
- this.payload = input();
27
- this.getPopoverPosition = signal('');
24
+ this.overlayContent = input(null, ...(ngDevMode ? [{ debugName: "overlayContent" }] : []));
25
+ this.positionPair = signal(null, ...(ngDevMode ? [{ debugName: "positionPair" }] : []));
26
+ this.payload = input(...(ngDevMode ? [undefined, { debugName: "payload" }] : []));
27
+ this.getPopoverPosition = signal('', ...(ngDevMode ? [{ debugName: "getPopoverPosition" }] : []));
28
28
  this.onChangePositionPair$ = toObservable(this.positionPair)
29
29
  .pipe(takeUntilDestroyed())
30
30
  .subscribe((positionPair) => {
@@ -38,10 +38,10 @@ class QuangPopoverComponent {
38
38
  }
39
39
  });
40
40
  }
41
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: QuangPopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
42
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: QuangPopoverComponent, isStandalone: true, selector: "quang-popover", inputs: { overlayContent: { classPropertyName: "overlayContent", publicName: "overlayContent", isSignal: true, isRequired: false, transformFunction: null }, payload: { classPropertyName: "payload", publicName: "payload", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (overlayContent()) {\n <div\n [ngClass]=\"getPopoverPosition()\"\n class=\"popover-container\"\n >\n <ng-container\n [ngTemplateOutlet]=\"overlayContent()\"\n [ngTemplateOutletContext]=\"{\n $implicit: payload(),\n }\"\n ></ng-container>\n </div>\n}\n", styles: [":host{--bs-popover-border-width: 1px;--bs-popover-arrow-width: .5rem;--bs-popover-arrow-border: var(--bs-border-color, #000);--box-shadow-bg: rgba(0, 0, 0, .16)}.popover-container{box-shadow:var(--box-shadow-bg);background:var(--bs-body-bg, #fff);border:var(--bs-popover-border-width) solid var(--bs-border-color, #000);position:relative;padding:1rem;pointer-events:all}.popover-container.center-bottom:after,.popover-container.center-bottom:before{bottom:100%;left:50%;transform:translate(-50%)}.popover-container.start-bottom:after,.popover-container.start-bottom:before{bottom:100%;left:85%;transform:translate(-50%)}.popover-container.end-bottom:after,.popover-container.end-bottom:before{bottom:100%;left:15%;transform:translate(-50%)}.popover-container.center-top:after,.popover-container.center-top:before{top:100%;left:50%;transform:translate(-50%) rotate(180deg)}.popover-container.start-top:after,.popover-container.start-top:before{top:100%;left:85%;transform:translate(-50%) rotate(180deg)}.popover-container.end-top:after,.popover-container.end-top:before{top:100%;left:15%;transform:translate(-50%) rotate(180deg)}.popover-container.end-center:after,.popover-container.end-center:before{right:100%;top:50%;transform:translateY(-50%) rotate(270deg)}.popover-container.start-center:after,.popover-container.start-center:before{left:100%;top:50%;transform:translateY(-50%) rotate(90deg)}.popover-container:after,.popover-container:before{content:\"\";display:block;position:absolute;width:0;height:0;border-style:solid}.popover-container:after{border-color:transparent transparent var(--bs-body-bg, #fff) transparent;border-width:var(--bs-popover-arrow-width)}.popover-container:before{border-color:transparent transparent var(--bs-border-color, #000) transparent;border-width:calc(var(--bs-popover-arrow-width) + 1px)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
41
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: QuangPopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
42
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: QuangPopoverComponent, isStandalone: true, selector: "quang-popover", inputs: { overlayContent: { classPropertyName: "overlayContent", publicName: "overlayContent", isSignal: true, isRequired: false, transformFunction: null }, payload: { classPropertyName: "payload", publicName: "payload", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (overlayContent()) {\n <div\n [ngClass]=\"getPopoverPosition()\"\n class=\"popover-container\"\n >\n <ng-container\n [ngTemplateOutlet]=\"overlayContent()\"\n [ngTemplateOutletContext]=\"{\n $implicit: payload(),\n }\"\n ></ng-container>\n </div>\n}\n", styles: [":host{--bs-popover-border-width: 1px;--bs-popover-arrow-width: .5rem;--bs-popover-arrow-border: var(--bs-border-color, #000);--box-shadow-bg: rgba(0, 0, 0, .16)}.popover-container{box-shadow:var(--box-shadow-bg);background:var(--bs-body-bg, #fff);border:var(--bs-popover-border-width) solid var(--bs-border-color, #000);position:relative;padding:1rem;pointer-events:all}.popover-container.center-bottom:after,.popover-container.center-bottom:before{bottom:100%;left:50%;transform:translate(-50%)}.popover-container.start-bottom:after,.popover-container.start-bottom:before{bottom:100%;left:85%;transform:translate(-50%)}.popover-container.end-bottom:after,.popover-container.end-bottom:before{bottom:100%;left:15%;transform:translate(-50%)}.popover-container.center-top:after,.popover-container.center-top:before{top:100%;left:50%;transform:translate(-50%) rotate(180deg)}.popover-container.start-top:after,.popover-container.start-top:before{top:100%;left:85%;transform:translate(-50%) rotate(180deg)}.popover-container.end-top:after,.popover-container.end-top:before{top:100%;left:15%;transform:translate(-50%) rotate(180deg)}.popover-container.end-center:after,.popover-container.end-center:before{right:100%;top:50%;transform:translateY(-50%) rotate(270deg)}.popover-container.start-center:after,.popover-container.start-center:before{left:100%;top:50%;transform:translateY(-50%) rotate(90deg)}.popover-container:after,.popover-container:before{content:\"\";display:block;position:absolute;width:0;height:0;border-style:solid}.popover-container:after{border-color:transparent transparent var(--bs-body-bg, #fff) transparent;border-width:var(--bs-popover-arrow-width)}.popover-container:before{border-color:transparent transparent var(--bs-border-color, #000) transparent;border-width:calc(var(--bs-popover-arrow-width) + 1px)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
43
43
  }
44
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: QuangPopoverComponent, decorators: [{
44
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: QuangPopoverComponent, decorators: [{
45
45
  type: Component,
46
46
  args: [{ selector: 'quang-popover', imports: [NgTemplateOutlet, NgClass], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (overlayContent()) {\n <div\n [ngClass]=\"getPopoverPosition()\"\n class=\"popover-container\"\n >\n <ng-container\n [ngTemplateOutlet]=\"overlayContent()\"\n [ngTemplateOutletContext]=\"{\n $implicit: payload(),\n }\"\n ></ng-container>\n </div>\n}\n", styles: [":host{--bs-popover-border-width: 1px;--bs-popover-arrow-width: .5rem;--bs-popover-arrow-border: var(--bs-border-color, #000);--box-shadow-bg: rgba(0, 0, 0, .16)}.popover-container{box-shadow:var(--box-shadow-bg);background:var(--bs-body-bg, #fff);border:var(--bs-popover-border-width) solid var(--bs-border-color, #000);position:relative;padding:1rem;pointer-events:all}.popover-container.center-bottom:after,.popover-container.center-bottom:before{bottom:100%;left:50%;transform:translate(-50%)}.popover-container.start-bottom:after,.popover-container.start-bottom:before{bottom:100%;left:85%;transform:translate(-50%)}.popover-container.end-bottom:after,.popover-container.end-bottom:before{bottom:100%;left:15%;transform:translate(-50%)}.popover-container.center-top:after,.popover-container.center-top:before{top:100%;left:50%;transform:translate(-50%) rotate(180deg)}.popover-container.start-top:after,.popover-container.start-top:before{top:100%;left:85%;transform:translate(-50%) rotate(180deg)}.popover-container.end-top:after,.popover-container.end-top:before{top:100%;left:15%;transform:translate(-50%) rotate(180deg)}.popover-container.end-center:after,.popover-container.end-center:before{right:100%;top:50%;transform:translateY(-50%) rotate(270deg)}.popover-container.start-center:after,.popover-container.start-center:before{left:100%;top:50%;transform:translateY(-50%) rotate(90deg)}.popover-container:after,.popover-container:before{content:\"\";display:block;position:absolute;width:0;height:0;border-style:solid}.popover-container:after{border-color:transparent transparent var(--bs-body-bg, #fff) transparent;border-width:var(--bs-popover-arrow-width)}.popover-container:before{border-color:transparent transparent var(--bs-border-color, #000) transparent;border-width:calc(var(--bs-popover-arrow-width) + 1px)}\n"] }]
47
47
  }] });
@@ -49,13 +49,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
49
49
  class QuangPopoverDirective extends QuangBaseOverlayDirective {
50
50
  constructor() {
51
51
  super(...arguments);
52
- this.targetComponentType = signal(QuangPopoverComponent);
53
- this.content = input.required({ alias: 'quangPopover' });
52
+ this.targetComponentType = signal(QuangPopoverComponent, ...(ngDevMode ? [{ debugName: "targetComponentType" }] : []));
53
+ this.content = input.required(...(ngDevMode ? [{ debugName: "content", alias: 'quangPopover' }] : [{ alias: 'quangPopover' }]));
54
54
  }
55
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: QuangPopoverDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
56
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.4", type: QuangPopoverDirective, isStandalone: true, selector: "[quangPopover]", inputs: { content: { classPropertyName: "content", publicName: "quangPopover", isSignal: true, isRequired: true, transformFunction: null } }, usesInheritance: true, ngImport: i0 }); }
55
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: QuangPopoverDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
56
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.1.7", type: QuangPopoverDirective, isStandalone: true, selector: "[quangPopover]", inputs: { content: { classPropertyName: "content", publicName: "quangPopover", isSignal: true, isRequired: true, transformFunction: null } }, usesInheritance: true, ngImport: i0 }); }
57
57
  }
58
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: QuangPopoverDirective, decorators: [{
58
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: QuangPopoverDirective, decorators: [{
59
59
  type: Directive,
60
60
  args: [{
61
61
  selector: '[quangPopover]',
@@ -1 +1 @@
1
- {"version":3,"file":"quang-overlay-popover.mjs","sources":["../../../projects/quang/overlay/popover/popover.component.ts","../../../projects/quang/overlay/popover/popover.component.html","../../../projects/quang/overlay/popover/popover.directive.ts","../../../projects/quang/overlay/popover/quang-overlay-popover.ts"],"sourcesContent":["import { ConnectionPositionPair } from '@angular/cdk/overlay'\nimport { NgClass, NgTemplateOutlet } from '@angular/common'\nimport { ChangeDetectionStrategy, Component, TemplateRef, input, signal } from '@angular/core'\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop'\n\nimport { QuangBaseOverlayComponent } from 'quang/overlay/shared'\n\n@Component({\n selector: 'quang-popover',\n imports: [NgTemplateOutlet, NgClass],\n templateUrl: './popover.component.html',\n styleUrl: './popover.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\n/**\n * Popover component that can render custom content, passed from the outside as a `TemplateRef`\n * @example\n * <button\n [quangPopover]=\"popoverTest\"\n [scrollCloseThreshold]=\"undefined\"\n class=\"btn popover-test-button\"\n overlayPosition=\"top\"\n showMethod=\"click\"\n >\n {{ 'buttons.popover' | transloco }}\n <span>CLICK</span>\n </button>\n <ng-template #popoverTest> <span>test works!</span> <button type=\"button\">click!</button> </ng-template>\n */\nexport class QuangPopoverComponent implements QuangBaseOverlayComponent {\n overlayContent = input<TemplateRef<any> | null>(null)\n\n positionPair = signal<ConnectionPositionPair | null>(null)\n\n payload = input<any>()\n\n getPopoverPosition = signal<string>('')\n\n onChangePositionPair$ = toObservable(this.positionPair)\n .pipe(takeUntilDestroyed())\n .subscribe((positionPair) => {\n const originX = positionPair?.originX\n const originY = positionPair?.originY\n if (originX && originY) {\n this.getPopoverPosition.set(`${originX}-${originY}`)\n } else {\n this.getPopoverPosition.set('')\n }\n })\n}\n","@if (overlayContent()) {\n <div\n [ngClass]=\"getPopoverPosition()\"\n class=\"popover-container\"\n >\n <ng-container\n [ngTemplateOutlet]=\"overlayContent()\"\n [ngTemplateOutletContext]=\"{\n $implicit: payload(),\n }\"\n ></ng-container>\n </div>\n}\n","import { ComponentType } from '@angular/cdk/portal'\nimport { Directive, TemplateRef, input, signal } from '@angular/core'\n\nimport { QuangBaseOverlayDirective } from 'quang/overlay/shared'\n\nimport { QuangPopoverComponent } from './popover.component'\n\n@Directive({\n selector: '[quangPopover]',\n})\nexport class QuangPopoverDirective extends QuangBaseOverlayDirective<QuangPopoverComponent> {\n override targetComponentType = signal<ComponentType<QuangPopoverComponent> | undefined>(QuangPopoverComponent)\n\n override content = input.required<TemplateRef<any> | null>({ alias: 'quangPopover' })\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mapp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,cAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAHjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gBAAgB;AAC3B,iBAAA;;;ACTD;;AAEG;;;;"}
1
+ {"version":3,"file":"quang-overlay-popover.mjs","sources":["../../../projects/quang/overlay/popover/popover.component.ts","../../../projects/quang/overlay/popover/popover.component.html","../../../projects/quang/overlay/popover/popover.directive.ts","../../../projects/quang/overlay/popover/quang-overlay-popover.ts"],"sourcesContent":["import { ConnectionPositionPair } from '@angular/cdk/overlay'\nimport { NgClass, NgTemplateOutlet } from '@angular/common'\nimport { ChangeDetectionStrategy, Component, TemplateRef, input, signal } from '@angular/core'\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop'\n\nimport { QuangBaseOverlayComponent } from 'quang/overlay/shared'\n\n@Component({\n selector: 'quang-popover',\n imports: [NgTemplateOutlet, NgClass],\n templateUrl: './popover.component.html',\n styleUrl: './popover.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\n/**\n * Popover component that can render custom content, passed from the outside as a `TemplateRef`\n * @example\n * <button\n [quangPopover]=\"popoverTest\"\n [scrollCloseThreshold]=\"undefined\"\n class=\"btn popover-test-button\"\n overlayPosition=\"top\"\n showMethod=\"click\"\n >\n {{ 'buttons.popover' | transloco }}\n <span>CLICK</span>\n </button>\n <ng-template #popoverTest> <span>test works!</span> <button type=\"button\">click!</button> </ng-template>\n */\nexport class QuangPopoverComponent implements QuangBaseOverlayComponent {\n overlayContent = input<TemplateRef<any> | null>(null)\n\n positionPair = signal<ConnectionPositionPair | null>(null)\n\n payload = input<any>()\n\n getPopoverPosition = signal<string>('')\n\n onChangePositionPair$ = toObservable(this.positionPair)\n .pipe(takeUntilDestroyed())\n .subscribe((positionPair) => {\n const originX = positionPair?.originX\n const originY = positionPair?.originY\n if (originX && originY) {\n this.getPopoverPosition.set(`${originX}-${originY}`)\n } else {\n this.getPopoverPosition.set('')\n }\n })\n}\n","@if (overlayContent()) {\n <div\n [ngClass]=\"getPopoverPosition()\"\n class=\"popover-container\"\n >\n <ng-container\n [ngTemplateOutlet]=\"overlayContent()\"\n [ngTemplateOutletContext]=\"{\n $implicit: payload(),\n }\"\n ></ng-container>\n </div>\n}\n","import { ComponentType } from '@angular/cdk/portal'\nimport { Directive, TemplateRef, input, signal } from '@angular/core'\n\nimport { QuangBaseOverlayDirective } from 'quang/overlay/shared'\n\nimport { QuangPopoverComponent } from './popover.component'\n\n@Directive({\n selector: '[quangPopover]',\n})\nexport class QuangPopoverDirective extends QuangBaseOverlayDirective<QuangPopoverComponent> {\n override targetComponentType = signal<ComponentType<QuangPopoverComponent> | undefined>(QuangPopoverComponent)\n\n override content = input.required<TemplateRef<any> | null>({ alias: 'quangPopover' })\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAcA;;;;;;;;;;;;;;AAcG;MACU,qBAAqB,CAAA;AAtBlC,IAAA,WAAA,GAAA;AAuBE,QAAA,IAAA,CAAA,cAAc,GAAG,KAAK,CAA0B,IAAI,0DAAC;AAErD,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAgC,IAAI,wDAAC;QAE1D,IAAA,CAAA,OAAO,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,SAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAO;AAEtB,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAS,EAAE,8DAAC;AAEvC,QAAA,IAAA,CAAA,qBAAqB,GAAG,YAAY,CAAC,IAAI,CAAC,YAAY;aACnD,IAAI,CAAC,kBAAkB,EAAE;A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11
11
  class QuangBaseOverlayComponent {
12
12
  constructor() {
13
- this.overlayContent = input.required();
14
- this.payload = input();
15
- this.positionPair = signal(null);
13
+ this.overlayContent = input.required(...(ngDevMode ? [{ debugName: "overlayContent" }] : []));
14
+ this.payload = input(...(ngDevMode ? [undefined, { debugName: "payload" }] : []));
15
+ this.positionPair = signal(null, ...(ngDevMode ? [{ debugName: "positionPair" }] : []));
16
16
  }
17
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: QuangBaseOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
18
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.4", type: QuangBaseOverlayComponent, isStandalone: true, selector: "quang-base-overlay-component", inputs: { overlayContent: { classPropertyName: "overlayContent", publicName: "overlayContent", isSignal: true, isRequired: true, transformFunction: null }, payload: { classPropertyName: "payload", publicName: "payload", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: ``, isInline: true }); }
17
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: QuangBaseOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
18
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.7", type: QuangBaseOverlayComponent, isStandalone: true, selector: "quang-base-overlay-component", inputs: { overlayContent: { classPropertyName: "overlayContent", publicName: "overlayContent", isSignal: true, isRequired: true, transformFunction: null }, payload: { classPropertyName: "payload", publicName: "payload", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: ``, isInline: true }); }
19
19
  }
20
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: QuangBaseOverlayComponent, decorators: [{
20
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: QuangBaseOverlayComponent, decorators: [{
21
21
  type: Component,
22
22
  args: [{
23
23
  selector: 'quang-base-overlay-component',
@@ -27,18 +27,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
27
27
 
28
28
  class QuangBaseOverlayDirective {
29
29
  constructor() {
30
- this.targetComponentType = signal(undefined);
30
+ this.targetComponentType = signal(undefined, ...(ngDevMode ? [{ debugName: "targetComponentType" }] : []));
31
31
  /**
32
32
  * The amount of pixels needed for the popover to automatically disappear. If undefined the popover will not disappear on scroll
33
33
  * Default: 100
34
34
  * @default 100
35
35
  */
36
- this.scrollCloseThreshold = input(100);
37
- this.showMethod = input('click');
38
- this.content = input.required();
39
- this.quangOverlayPayload = input();
36
+ this.scrollCloseThreshold = input(100, ...(ngDevMode ? [{ debugName: "scrollCloseThreshold" }] : []));
37
+ this.showMethod = input('click', ...(ngDevMode ? [{ debugName: "showMethod" }] : []));
38
+ this.content = input.required(...(ngDevMode ? [{ debugName: "content" }] : []));
39
+ this.quangOverlayPayload = input(...(ngDevMode ? [undefined, { debugName: "quangOverlayPayload" }] : []));
40
40
  this.closeOnClickOutside = true;
41
- this.overlayPosition = input('top');
41
+ this.overlayPosition = input('top', ...(ngDevMode ? [{ debugName: "overlayPosition" }] : []));
42
42
  this.destroyRef = inject(DestroyRef);
43
43
  this.top = signal({
44
44
  originX: 'center',
@@ -46,7 +46,7 @@ class QuangBaseOverlayDirective {
46
46
  overlayX: 'center',
47
47
  overlayY: 'bottom',
48
48
  offsetY: -8,
49
- });
49
+ }, ...(ngDevMode ? [{ debugName: "top" }] : []));
50
50
  this.topLeft = signal({
51
51
  originX: 'start',
52
52
  originY: 'top',
@@ -54,7 +54,7 @@ class QuangBaseOverlayDirective {
54
54
  overlayY: 'bottom',
55
55
  offsetY: -8,
56
56
  offsetX: 40,
57
- });
57
+ }, ...(ngDevMode ? [{ debugName: "topLeft" }] : []));
58
58
  this.topRight = signal({
59
59
  originX: 'end',
60
60
  originY: 'top',
@@ -62,14 +62,14 @@ class QuangBaseOverlayDirective {
62
62
  overlayY: 'bottom',
63
63
  offsetY: -8,
64
64
  offsetX: 40,
65
- });
65
+ }, ...(ngDevMode ? [{ debugName: "topRight" }] : []));
66
66
  this.bottom = signal({
67
67
  originX: 'center',
68
68
  originY: 'bottom',
69
69
  overlayX: 'center',
70
70
  overlayY: 'top',
71
71
  offsetY: 8,
72
- });
72
+ }, ...(ngDevMode ? [{ debugName: "bottom" }] : []));
73
73
  this.bottomLeft = signal({
74
74
  originX: 'start',
75
75
  originY: 'bottom',
@@ -77,7 +77,7 @@ class QuangBaseOverlayDirective {
77
77
  overlayY: 'top',
78
78
  offsetY: 8,
79
79
  offsetX: 40,
80
- });
80
+ }, ...(ngDevMode ? [{ debugName: "bottomLeft" }] : []));
81
81
  this.bottomRight = signal({
82
82
  originX: 'end',
83
83
  originY: 'bottom',
@@ -85,21 +85,21 @@ class QuangBaseOverlayDirective {
85
85
  overlayY: 'top',
86
86
  offsetY: 8,
87
87
  offsetX: 40,
88
- });
88
+ }, ...(ngDevMode ? [{ debugName: "bottomRight" }] : []));
89
89
  this.left = signal({
90
90
  originX: 'start',
91
91
  originY: 'center',
92
92
  overlayX: 'end',
93
93
  overlayY: 'center',
94
94
  offsetX: -8,
95
- });
95
+ }, ...(ngDevMode ? [{ debugName: "left" }] : []));
96
96
  this.right = signal({
97
97
  originX: 'end',
98
98
  originY: 'center',
99
99
  overlayX: 'start',
100
100
  overlayY: 'center',
101
101
  offsetX: 8,
102
- });
102
+ }, ...(ngDevMode ? [{ debugName: "right" }] : []));
103
103
  this.tooltipPosition = computed(() => {
104
104
  switch (this.overlayPosition()) {
105
105
  case 'top':
@@ -121,13 +121,13 @@ class QuangBaseOverlayDirective {
121
121
  default:
122
122
  return [this.top(), this.bottom()];
123
123
  }
124
- });
125
- this.overlayRef = signal(null);
126
- this.overlay = signal(inject(Overlay));
127
- this.overlayPositionBuilder = signal(inject(OverlayPositionBuilder));
128
- this.elementRef = signal(inject(ElementRef));
129
- this.positionStrategy = signal(undefined);
130
- this.componentOverlayRef = signal(null);
124
+ }, ...(ngDevMode ? [{ debugName: "tooltipPosition" }] : []));
125
+ this.overlayRef = signal(null, ...(ngDevMode ? [{ debugName: "overlayRef" }] : []));
126
+ this.overlay = signal(inject(Overlay), ...(ngDevMode ? [{ debugName: "overlay" }] : []));
127
+ this.overlayPositionBuilder = signal(inject(OverlayPositionBuilder), ...(ngDevMode ? [{ debugName: "overlayPositionBuilder" }] : []));
128
+ this.elementRef = signal(inject(ElementRef), ...(ngDevMode ? [{ debugName: "elementRef" }] : []));
129
+ this.positionStrategy = signal(undefined, ...(ngDevMode ? [{ debugName: "positionStrategy" }] : []));
130
+ this.componentOverlayRef = signal(null, ...(ngDevMode ? [{ debugName: "componentOverlayRef" }] : []));
131
131
  }
132
132
  onClick() {
133
133
  if (this.showMethod() === 'click')
@@ -198,10 +198,10 @@ class QuangBaseOverlayDirective {
198
198
  ngOnDestroy() {
199
199
  this.detachOverlay();
200
200
  }
201
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: QuangBaseOverlayDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
202
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.4", type: QuangBaseOverlayDirective, isStandalone: true, inputs: { scrollCloseThreshold: { classPropertyName: "scrollCloseThreshold", publicName: "scrollCloseThreshold", isSignal: true, isRequired: false, transformFunction: null }, showMethod: { classPropertyName: "showMethod", publicName: "showMethod", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null }, quangOverlayPayload: { classPropertyName: "quangOverlayPayload", publicName: "quangOverlayPayload", isSignal: true, isRequired: false, transformFunction: null }, overlayPosition: { classPropertyName: "overlayPosition", publicName: "overlayPosition", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick()", "mouseenter": "onHover()", "mouseleave": "onLeave()" } }, ngImport: i0 }); }
201
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: QuangBaseOverlayDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
202
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.1.7", type: QuangBaseOverlayDirective, isStandalone: true, inputs: { scrollCloseThreshold: { classPropertyName: "scrollCloseThreshold", publicName: "scrollCloseThreshold", isSignal: true, isRequired: false, transformFunction: null }, showMethod: { classPropertyName: "showMethod", publicName: "showMethod", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null }, quangOverlayPayload: { classPropertyName: "quangOverlayPayload", publicName: "quangOverlayPayload", isSignal: true, isRequired: false, transformFunction: null }, overlayPosition: { classPropertyName: "overlayPosition", publicName: "overlayPosition", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick()", "mouseenter": "onHover()", "mouseleave": "onLeave()" } }, ngImport: i0 }); }
203
203
  }
204
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: QuangBaseOverlayDirective, decorators: [{
204
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: QuangBaseOverlayDirective, decorators: [{
205
205
  type: Directive
206
206
  }], propDecorators: { onClick: [{
207
207
  type: HostListener,
@@ -340,10 +340,10 @@ class CustomViewportRuler {
340
340
  ? { width: document.documentElement.clientWidth, height: document.documentElement.clientHeight }
341
341
  : { width: 0, height: 0 };
342
342
  }
343
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: CustomViewportRuler, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
344
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: CustomViewportRuler, providedIn: 'root' }); }
343
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CustomViewportRuler, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
344
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CustomViewportRuler, providedIn: 'root' }); }
345
345
  }
346
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: CustomViewportRuler, decorators: [{
346
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CustomViewportRuler, decorators: [{
347
347
  type: Injectable,
348
348
  args: [{ providedIn: 'root' }]
349
349
  }], ctorParameters: () => [] });
@@ -1 +1 @@
1
- {"version":3,"file":"quang-overlay-shared.mjs","sources":["../../../projects/quang/overlay/shared/quang-base-overlay.component.ts","../../../projects/quang/overlay/shared/quang-base-overlay.directive.ts","../../../projects/quang/overlay/shared/CustomViewportRuler.ts","../../../projects/quang/overlay/shared/quang-overlay-shared.ts"],"sourcesContent":["import { ConnectionPositionPair } from '@angular/cdk/overlay'\nimport { Component, input, signal } from '@angular/core'\n\n@Component({\n selector: 'quang-base-overlay-component',\n\n template: ``,\n})\nexport abstract class QuangBaseOverlayComponent {\n overlayContent = input.required<any>()\n\n payload = input<any>()\n\n positionPair = signal<ConnectionPositionPair | null>(null)\n}\n","import {\n ConnectedOverlayPositionChange,\n ConnectedPosition,\n FlexibleConnectedPositionStrategy,\n Overlay,\n OverlayPositionBuilder,\n OverlayRef,\n} from '@angular/cdk/overlay'\nimport { ComponentPortal, ComponentType } from '@angular/cdk/portal'\nimport {\n ComponentRef,\n DestroyRef,\n Directive,\n ElementRef,\n HostListener,\n OnDestroy,\n computed,\n inject,\n input,\n signal,\n} from '@angular/core'\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop'\n\nimport { QuangBaseOverlayComponent } from './quang-base-overlay.component'\n\n@Directive()\nexport abstract class QuangBaseOverlayDirective<T extends QuangBaseOverlayComponent> implements OnDestroy {\n targetComponentType = signal<ComponentType<T> | undefined>(undefined)\n\n /**\n * The amount of pixels needed for the popover to automatically disappear. If undefined the popover will not disappear on scroll\n * Default: 100\n * @default 100\n */\n scrollCloseThreshold = input<number | undefined>(100)\n\n showMethod = input<'click' | 'hover'>('click')\n\n content = input.required<any>()\n\n quangOverlayPayload = input<any>()\n\n closeOnClickOutside = true\n\n overlayPosition = input<\n 'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right' | 'left' | 'right'\n >('top')\n\n destroyRef = inject(DestroyRef)\n\n private top = signal<ConnectedPosition>({\n originX: 'center',\n originY: 'top',\n overlayX: 'center',\n overlayY: 'bottom',\n offsetY: -8,\n })\n\n private topLeft = signal<ConnectedPosition>({\n originX: 'start',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'bottom',\n offsetY: -8,\n offsetX: 40,\n })\n\n private topRight = signal<ConnectedPosition>({\n originX: 'end',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'bottom',\n offsetY: -8,\n offsetX: 40,\n })\n\n private bottom = signal<ConnectedPosition>({\n originX: 'center',\n originY: 'bottom',\n overlayX: 'center',\n overlayY: 'top',\n offsetY: 8,\n })\n\n private bottomLeft = signal<ConnectedPosition>({\n originX: 'start',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top',\n offsetY: 8,\n offsetX: 40,\n })\n\n private bottomRight = signal<ConnectedPosition>({\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top',\n offsetY: 8,\n offsetX: 40,\n })\n\n private left = signal<ConnectedPosition>({\n originX: 'start',\n originY: 'center',\n overlayX: 'end',\n overlayY: 'center',\n offsetX: -8,\n })\n\n private right = signal<ConnectedPosition>({\n originX: 'end',\n originY: 'center',\n overlayX: 'start',\n overlayY: 'center',\n offsetX: 8,\n })\n\n tooltipPosition = computed((): ConnectedPosition[] => {\n switch (this.overlayPosition()) {\n case 'top':\n return [this.top(), this.bottom()]\n case 'top-left':\n return [this.topLeft(), this.bottomLeft()]\n case 'top-right':\n return [this.topRight(), this.bottomRight()]\n case 'bottom':\n return [this.bottom(), this.top()]\n case 'bottom-left':\n return [this.bottomLeft(), this.topLeft()]\n case 'bottom-right':\n return [this.bottomRight(), this.topRight()]\n case 'left':\n return [this.left(), this.right()]\n case 'right':\n return [this.right(), this.left()]\n default:\n return [this.top(), this.bottom()]\n }\n })\n\n private overlayRef = signal<OverlayRef | null>(null)\n\n private readonly overlay = signal(inject(Overlay))\n\n private readonly overlayPositionBuilder = signal(inject(OverlayPositionBuilder))\n\n private readonly elementRef = signal(inject(ElementRef))\n\n private positionStrategy = signal<FlexibleConnectedPositionStrategy | undefined>(undefined)\n\n private componentOverlayRef = signal<ComponentRef<T> | null>(null)\n\n @HostListener('click') onClick(): void {\n if (this.showMethod() === 'click') this.showHideOverlay()\n }\n\n @HostListener('mouseenter') onHover(): void {\n if (this.showMethod() === 'hover') this.showHideOverlay()\n }\n\n @HostListener('mouseleave') onLeave(): void {\n if (this.showMethod() === 'hover') this.detachOverlay()\n }\n\n attachOverlay(): void {\n const targetComponentType = this.targetComponentType()\n if (!targetComponentType) {\n return\n }\n this.positionStrategy.set(\n this.overlayPositionBuilder().flexibleConnectedTo(this.elementRef()).withPositions(this.tooltipPosition())\n )\n\n this.overlayRef.set(\n this.overlay().create({\n positionStrategy: this.positionStrategy(),\n scrollStrategy: this.scrollCloseThreshold()\n ? this.overlay().scrollStrategies.close({ threshold: this.scrollCloseThreshold() })\n : this.overlay().scrollStrategies.noop(),\n hasBackdrop: this.showMethod() === 'click',\n backdropClass: '',\n })\n )\n\n const componentPortal = new ComponentPortal(targetComponentType)\n const createdOverlay = this.overlayRef()\n if (createdOverlay) {\n this.componentOverlayRef.set(createdOverlay.attach(componentPortal))\n const componentOverlayRefInstance = this.componentOverlayRef()?.instance\n if (componentOverlayRefInstance) {\n componentOverlayRefInstance.overlayContent = this.content\n componentOverlayRefInstance.payload = this.quangOverlayPayload\n }\n }\n this.positionStrategy()\n ?.positionChanges.pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((position) => {\n const positionRef: ConnectedOverlayPositionChange = position as ConnectedOverlayPositionChange\n const componentOverlayRefInstance = this.componentOverlayRef()?.instance\n if (componentOverlayRefInstance) {\n componentOverlayRefInstance.positionPair.set(positionRef.connectionPair)\n }\n })\n this.overlayRef()\n ?.backdropClick()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n if (this.closeOnClickOutside) {\n this.detachOverlay()\n }\n })\n }\n\n detachOverlay(): void {\n this.overlayRef()?.detach()\n this.overlayRef()?.dispose()\n }\n\n showHideOverlay(): void {\n if (this.overlayRef()?.hasAttached()) {\n this.detachOverlay()\n } else {\n this.attachOverlay()\n }\n }\n\n ngOnDestroy(): void {\n this.detachOverlay()\n }\n}\n","import { Platform } from '@angular/cdk/platform'\nimport { DEFAULT_RESIZE_TIME, ViewportScrollPosition } from '@angular/cdk/scrolling'\nimport { DOCUMENT } from '@angular/common'\nimport { Injectable, NgZone, OnDestroy, inject } from '@angular/core'\n\nimport { Observable, Subject, auditTime } from 'rxjs'\n\n/**\n * Class cloe of [ViewportRuler](https://github.com/angular/components/blob/master/src/cdk/scrolling/viewport-ruler.ts)\n * To fix the wrong reported size of the viewport on mobile devices with hidden url bars\n * Issues references:\n * https://github.com/angular/components/issues/18890\n * https://github.com/angular/components/issues/27739\n *\n * To use this component provide it instead of `ViewportRuler`\n *\n * @example\n * providers: [\n * {\n * provide: ViewportRuler,\n * useClass: CustomViewportRuler\n * }\n * ]\n */\n@Injectable({ providedIn: 'root' })\nexport class CustomViewportRuler implements OnDestroy {\n /** Used to reference correct document/window */\n // protected _document: Document\n /** Cached viewport dimensions. */\n private _viewportSize: { width: number; height: number } | null = null\n /** Stream of viewport change events. */\n private readonly _change = new Subject<Event>()\n\n private readonly _platform = inject(Platform)\n private readonly ngZone = inject(NgZone)\n private readonly _document = inject(DOCUMENT, { optional: true }) || document\n\n constructor() {\n this.ngZone.runOutsideAngular(() => {\n if (this._platform.isBrowser) {\n const window = this._getWindow()\n\n // Note that bind the events ourselves, rather than going through something like RxJS's\n // `fromEvent` so that we can ensure that they're bound outside of the NgZone.\n window.addEventListener('resize', this._changeListener)\n window.addEventListener('orientationchange', this._changeListener)\n }\n\n // Clear the cached position so that the viewport is re-measured next time it is required.\n // We don't need to keep track of the subscription, because it is completed on destroy.\n this.change().subscribe(() => (this._viewportSize = null))\n })\n }\n\n ngOnDestroy() {\n if (this._platform.isBrowser) {\n const window = this._getWindow()\n window.removeEventListener('resize', this._changeListener)\n window.removeEventListener('orientationchange', this._changeListener)\n }\n\n this._change.complete()\n }\n\n /** Returns the viewport's width and height. */\n getViewportSize(): Readonly<{ width: number; height: number }> {\n if (!this._viewportSize) {\n this._updateViewportSize()\n }\n\n const output = { width: this._viewportSize!.width, height: this._viewportSize!.height }\n\n // If we're not on a browser, don't cache the size since it'll be mocked out anyway.\n if (!this._platform.isBrowser) {\n this._viewportSize = null!\n }\n\n return output\n }\n\n /** Gets a DOMRect for the viewport's bounds. */\n getViewportRect() {\n // Use the document element's bounding rect rather than the window scroll properties\n // (e.g. pageYOffset, scrollY) due to in issue in Chrome and IE where window scroll\n // properties and client coordinates (boundingClientRect, clientX/Y, etc.) are in different\n // conceptual viewports. Under most circumstances these viewports are equivalent, but they\n // can disagree when the page is pinch-zoomed (on devices that support touch).\n // See https://bugs.chromium.org/p/chromium/issues/detail?id=489206#c4\n // We use the documentElement instead of the body because, by default (without a css reset)\n // browsers typically give the document body an 8px margin, which is not included in\n // getBoundingClientRect().\n const scrollPosition = this.getViewportScrollPosition()\n const { width, height } = this.getViewportSize()\n\n return {\n top: scrollPosition.top,\n left: scrollPosition.left,\n bottom: scrollPosition.top + height,\n right: scrollPosition.left + width,\n height,\n width,\n }\n }\n\n /** Gets the (top, left) scroll position of the viewport. */\n getViewportScrollPosition(): ViewportScrollPosition {\n // While we can get a reference to the fake document\n // during SSR, it doesn't have getBoundingClientRect.\n if (!this._platform.isBrowser) {\n return { top: 0, left: 0 }\n }\n\n // The top-left-corner of the viewport is determined by the scroll position of the document\n // body, normally just (scrollLeft, scrollTop). However, Chrome and Firefox disagree about\n // whether `document.body` or `document.documentElement` is the scrolled element, so reading\n // `scrollTop` and `scrollLeft` is inconsistent. However, using the bounding rect of\n // `document.documentElement` works consistently, where the `top` and `left` values will\n // equal negative the scroll position.\n const document = this._document\n const window = this._getWindow()\n const documentElement = document.documentElement!\n const documentRect = documentElement.getBoundingClientRect()\n\n const top = -documentRect.top || document.body.scrollTop || window.scrollY || documentElement.scrollTop || 0\n\n const left = -documentRect.left || document.body.scrollLeft || window.scrollX || documentElement.scrollLeft || 0\n\n return { top, left }\n }\n\n /**\n * Returns a stream that emits whenever the size of the viewport changes.\n * This stream emits outside of the Angular zone.\n * @param throttleTime Time in milliseconds to throttle the stream.\n */\n change(throttleTime: number = DEFAULT_RESIZE_TIME): Observable<Event> {\n return throttleTime > 0 ? this._change.pipe(auditTime(throttleTime)) : this._change\n }\n\n /** Event listener that will be used to handle the viewport change events. */\n private _changeListener = (event: Event) => {\n this._change.next(event)\n }\n\n /** Use defaultView of injected document if available or fallback to global window reference */\n private _getWindow(): Window {\n return this._document.defaultView || window\n }\n\n /** Updates the cached viewport size. */\n private _updateViewportSize() {\n this._viewportSize = this._platform.isBrowser\n ? { width: document.documentElement.clientWidth, height: document.documentElement.clientHeight }\n : { width: 0, height: 0 }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MAQsB,yBAAyB,CAAA;AAL/C,IAAA,WAAA,GAAA;AAME,QAAA,IAAA,CAAA,cAAc,GAAG,KAAK,CAAC,QAAQ,EAAO;QAEtC,IAAO,CAAA,OAAA,GAAG,KAAK,EAAO;AAEtB,QAAA,IAAA,CAAA,YAAY,GAAG,MAA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AAC,WAAW,IAAI,MAAM;;;IAIrC,mBAAmB,GAAA;AACzB,QAAA,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC;AAClC,cAAE,EAAE,KAAK,EAAE,QAAQ,CAAC,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,CAAC,eAAe,CAAC,YAAY;cAC5F,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;;8GAhIlB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAnB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,cADN,MAAM,EAAA,CAAA,CAAA;;2FACnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAD/B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACxBlC;;AAEG;;;;"}
1
+ {"version":3,"file":"quang-overlay-shared.mjs","sources":["../../../projects/quang/overlay/shared/quang-base-overlay.component.ts","../../../projects/quang/overlay/shared/quang-base-overlay.directive.ts","../../../projects/quang/overlay/shared/CustomViewportRuler.ts","../../../projects/quang/overlay/shared/quang-overlay-shared.ts"],"sourcesContent":["import { ConnectionPositionPair } from '@angular/cdk/overlay'\nimport { Component, input, signal } from '@angular/core'\n\n@Component({\n selector: 'quang-base-overlay-component',\n\n template: ``,\n})\nexport abstract class QuangBaseOverlayComponent {\n overlayContent = input.required<any>()\n\n payload = input<any>()\n\n positionPair = signal<ConnectionPositionPair | null>(null)\n}\n","import {\n ConnectedOverlayPositionChange,\n ConnectedPosition,\n FlexibleConnectedPositionStrategy,\n Overlay,\n OverlayPositionBuilder,\n OverlayRef,\n} from '@angular/cdk/overlay'\nimport { ComponentPortal, ComponentType } from '@angular/cdk/portal'\nimport {\n ComponentRef,\n DestroyRef,\n Directive,\n ElementRef,\n HostListener,\n OnDestroy,\n computed,\n inject,\n input,\n signal,\n} from '@angular/core'\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop'\n\nimport { QuangBaseOverlayComponent } from './quang-base-overlay.component'\n\n@Directive()\nexport abstract class QuangBaseOverlayDirective<T extends QuangBaseOverlayComponent> implements OnDestroy {\n targetComponentType = signal<ComponentType<T> | undefined>(undefined)\n\n /**\n * The amount of pixels needed for the popover to automatically disappear. If undefined the popover will not disappear on scroll\n * Default: 100\n * @default 100\n */\n scrollCloseThreshold = input<number | undefined>(100)\n\n showMethod = input<'click' | 'hover'>('click')\n\n content = input.required<any>()\n\n quangOverlayPayload = input<any>()\n\n closeOnClickOutside = true\n\n overlayPosition = input<\n 'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right' | 'left' | 'right'\n >('top')\n\n destroyRef = inject(DestroyRef)\n\n private top = signal<ConnectedPosition>({\n originX: 'center',\n originY: 'top',\n overlayX: 'center',\n overlayY: 'bottom',\n offsetY: -8,\n })\n\n private topLeft = signal<ConnectedPosition>({\n originX: 'start',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'bottom',\n offsetY: -8,\n offsetX: 40,\n })\n\n private topRight = signal<ConnectedPosition>({\n originX: 'end',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'bottom',\n offsetY: -8,\n offsetX: 40,\n })\n\n private bottom = signal<ConnectedPosition>({\n originX: 'center',\n originY: 'bottom',\n overlayX: 'center',\n overlayY: 'top',\n offsetY: 8,\n })\n\n private bottomLeft = signal<ConnectedPosition>({\n originX: 'start',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top',\n offsetY: 8,\n offsetX: 40,\n })\n\n private bottomRight = signal<ConnectedPosition>({\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top',\n offsetY: 8,\n offsetX: 40,\n })\n\n private left = signal<ConnectedPosition>({\n originX: 'start',\n originY: 'center',\n overlayX: 'end',\n overlayY: 'center',\n offsetX: -8,\n })\n\n private right = signal<ConnectedPosition>({\n originX: 'end',\n originY: 'center',\n overlayX: 'start',\n overlayY: 'center',\n offsetX: 8,\n })\n\n tooltipPosition = computed((): ConnectedPosition[] => {\n switch (this.overlayPosition()) {\n case 'top':\n return [this.top(), this.bottom()]\n case 'top-left':\n return [this.topLeft(), this.bottomLeft()]\n case 'top-right':\n return [this.topRight(), this.bottomRight()]\n case 'bottom':\n return [this.bottom(), this.top()]\n case 'bottom-left':\n return [this.bottomLeft(), this.topLeft()]\n case 'bottom-right':\n return [this.bottomRight(), this.topRight()]\n case 'left':\n return [this.left(), this.right()]\n case 'right':\n return [this.right(), this.left()]\n default:\n return [this.top(), this.bottom()]\n }\n })\n\n private overlayRef = signal<OverlayRef | null>(null)\n\n private readonly overlay = signal(inject(Overlay))\n\n private readonly overlayPositionBuilder = signal(inject(OverlayPositionBuilder))\n\n private readonly elementRef = signal(inject(ElementRef))\n\n private positionStrategy = signal<FlexibleConnectedPositionStrategy | undefined>(undefined)\n\n private componentOverlayRef = signal<ComponentRef<T> | null>(null)\n\n @HostListener('click') onClick(): void {\n if (this.showMethod() === 'click') this.showHideOverlay()\n }\n\n @HostListener('mouseenter') onHover(): void {\n if (this.showMethod() === 'hover') this.showHideOverlay()\n }\n\n @HostListener('mouseleave') onLeave(): void {\n if (this.showMethod() === 'hover') this.detachOverlay()\n }\n\n attachOverlay(): void {\n const targetComponentType = this.targetComponentType()\n if (!targetComponentType) {\n return\n }\n this.positionStrategy.set(\n this.overlayPositionBuilder().flexibleConnectedTo(this.elementRef()).withPositions(this.tooltipPosition())\n )\n\n this.overlayRef.set(\n this.overlay().create({\n positionStrategy: this.positionStrategy(),\n scrollStrategy: this.scrollCloseThreshold()\n ? this.overlay().scrollStrategies.close({ threshold: this.scrollCloseThreshold() })\n : this.overlay().scrollStrategies.noop(),\n hasBackdrop: this.showMethod() === 'click',\n backdropClass: '',\n })\n )\n\n const componentPortal = new ComponentPortal(targetComponentType)\n const createdOverlay = this.overlayRef()\n if (createdOverlay) {\n this.componentOverlayRef.set(createdOverlay.attach(componentPortal))\n const componentOverlayRefInstance = this.componentOverlayRef()?.instance\n if (componentOverlayRefInstance) {\n componentOverlayRefInstance.overlayContent = this.content\n componentOverlayRefInstance.payload = this.quangOverlayPayload\n }\n }\n this.positionStrategy()\n ?.positionChanges.pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((position) => {\n const positionRef: ConnectedOverlayPositionChange = position as ConnectedOverlayPositionChange\n const componentOverlayRefInstance = this.componentOverlayRef()?.instance\n if (componentOverlayRefInstance) {\n componentOverlayRefInstance.positionPair.set(positionRef.connectionPair)\n }\n })\n this.overlayRef()\n ?.backdropClick()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n if (this.closeOnClickOutside) {\n this.detachOverlay()\n }\n })\n }\n\n detachOverlay(): void {\n this.overlayRef()?.detach()\n this.overlayRef()?.dispose()\n }\n\n showHideOverlay(): void {\n if (this.overlayRef()?.hasAttached()) {\n this.detachOverlay()\n } else {\n this.attachOverlay()\n }\n }\n\n ngOnDestroy(): void {\n this.detachOverlay()\n }\n}\n","import { Platform } from '@angular/cdk/platform'\nimport { DEFAULT_RESIZE_TIME, ViewportScrollPosition } from '@angular/cdk/scrolling'\nimport { DOCUMENT } from '@angular/common'\nimport { Injectable, NgZone, OnDestroy, inject } from '@angular/core'\n\nimport { Observable, Subject, auditTime } from 'rxjs'\n\n/**\n * Class cloe of [ViewportRuler](https://github.com/angular/components/blob/master/src/cdk/scrolling/viewport-ruler.ts)\n * To fix the wrong reported size of the viewport on mobile devices with hidden url bars\n * Issues references:\n * https://github.com/angular/components/issues/18890\n * https://github.com/angular/components/issues/27739\n *\n * To use this component provide it instead of `ViewportRuler`\n *\n * @example\n * providers: [\n * {\n * provide: ViewportRuler,\n * useClass: CustomViewportRuler\n * }\n * ]\n */\n@Injectable({ providedIn: 'root' })\nexport class CustomViewportRuler implements OnDestroy {\n /** Used to reference correct document/window */\n // protected _document: Document\n /** Cached viewport dimensions. */\n private _viewportSize: { width: number; height: number } | null = null\n /** Stream of viewport change events. */\n private readonly _change = new Subject<Event>()\n\n private readonly _platform = inject(Platform)\n private readonly ngZone = inject(NgZone)\n private readonly _document = inject(DOCUMENT, { optional: true }) || document\n\n constructor() {\n this.ngZone.runOutsideAngular(() => {\n if (this._platform.isBrowser) {\n const window = this._getWindow()\n\n // Note that bind the events ourselves, rather than going through something like RxJS's\n // `fromEvent` so that we can ensure that they're bound outside of the NgZone.\n window.addEventListener('resize', this._changeListener)\n window.addEventListener('orientationchange', this._changeListener)\n }\n\n // Clear the cached position so that the viewport is re-measured next time it is required.\n // We don't need to keep track of the subscription, because it is completed on destroy.\n this.change().subscribe(() => (this._viewportSize = null))\n })\n }\n\n ngOnDestroy() {\n if (this._platform.isBrowser) {\n const window = this._getWindow()\n window.removeEventListener('resize', this._changeListener)\n window.removeEventListener('orientationchange', this._changeListener)\n }\n\n this._change.complete()\n }\n\n /** Returns the viewport's width and height. */\n getViewportSize(): Readonly<{ width: number; height: number }> {\n if (!this._viewportSize) {\n this._updateViewportSize()\n }\n\n const output = { width: this._viewportSize!.width, height: this._viewportSize!.height }\n\n // If we're not on a browser, don't cache the size since it'll be mocked out anyway.\n if (!this._platform.isBrowser) {\n this._viewportSize = null!\n }\n\n return output\n }\n\n /** Gets a DOMRect for the viewport's bounds. */\n getViewportRect() {\n // Use the document element's bounding rect rather than the window scroll properties\n // (e.g. pageYOffset, scrollY) due to in issue in Chrome and IE where window scroll\n // properties and client coordinates (boundingClientRect, clientX/Y, etc.) are in different\n // conceptual viewports. Under most circumstances these viewports are equivalent, but they\n // can disagree when the page is pinch-zoomed (on devices that support touch).\n // See https://bugs.chromium.org/p/chromium/issues/detail?id=489206#c4\n // We use the documentElement instead of the body because, by default (without a css reset)\n // browsers typically give the document body an 8px margin, which is not included in\n // getBoundingClientRect().\n const scrollPosition = this.getViewportScrollPosition()\n const { width, height } = this.getViewportSize()\n\n return {\n top: scrollPosition.top,\n left: scrollPosition.left,\n bottom: scrollPosition.top + height,\n right: scrollPosition.left + width,\n height,\n width,\n }\n }\n\n /** Gets the (top, left) scroll position of the viewport. */\n getViewportScrollPosition(): ViewportScrollPosition {\n // While we can get a reference to the fake document\n // during SSR, it doesn't have getBoundingClientRect.\n if (!this._platform.isBrowser) {\n return { top: 0, left: 0 }\n }\n\n // The top-left-corner of the viewport is determined by the scroll position of the document\n // body, normally just (scrollLeft, scrollTop). However, Chrome and Firefox disagree about\n // whether `document.body` or `document.documentElement` is the scrolled element, so reading\n // `scrollTop` and `scrollLeft` is inconsistent. However, using the bounding rect of\n // `document.documentElement` works consistently, where the `top` and `left` values will\n // equal negative the scroll position.\n const document = this._document\n const window = this._getWindow()\n const documentElement = document.documentElement!\n const documentRect = documentElement.getBoundingClientRect()\n\n const top = -documentRect.top || document.body.scrollTop || window.scrollY || documentElement.scrollTop || 0\n\n const left = -documentRect.left || document.body.scrollLeft || window.scrollX || documentElement.scrollLeft || 0\n\n return { top, left }\n }\n\n /**\n * Returns a stream that emits whenever the size of the viewport changes.\n * This stream emits outside of the Angular zone.\n * @param throttleTime Time in milliseconds to throttle the stream.\n */\n change(throttleTime: number = DEFAULT_RESIZE_TIME): Observable<Event> {\n return throttleTime > 0 ? this._change.pipe(auditTime(throttleTime)) : this._change\n }\n\n /** Event listener that will be used to handle the viewport change events. */\n private _changeListener = (event: Event) => {\n this._change.next(event)\n }\n\n /** Use defaultView of injected document if available or fallback to global window reference */\n private _getWindow(): Window {\n return this._document.defaultView || window\n }\n\n /** Updates the cached viewport size. */\n private _updateViewportSize() {\n this._viewportSize = this._platform.isBrowser\n ? { width: document.documentElement.clientWidth, height: document.documentElement.clientHeight }\n : { width: 0, height: 0 }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MAQsB,yBAAyB,CAAA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