ngx-kit 8.3.4 → 8.3.6

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { signal, InjectionToken, input, inject, ElementRef, Directive, computed, ChangeDetectionStrategy, Component, Injector, Injectable, makeEnvironmentProviders, provideEnvironmentInitializer, PLATFORM_ID, Renderer2, DestroyRef, effect, NgModule } from '@angular/core';
2
+ import { signal, InjectionToken, input, inject, ElementRef, Directive, Injector, EnvironmentInjector, computed, ChangeDetectionStrategy, Component, Injectable, makeEnvironmentProviders, provideEnvironmentInitializer, PLATFORM_ID, Renderer2, DestroyRef, effect, NgModule } from '@angular/core';
3
3
  import { DOCUMENT, NgComponentOutlet, isPlatformServer } from '@angular/common';
4
4
  import { DIALOG_OVERLAY_CLASSNAME, OverlayService } from 'ngx-kit/core';
5
5
  import { Subject } from 'rxjs';
@@ -141,7 +141,7 @@ class NgxDialogConfig {
141
141
  /** Entry animation for the panel. Default: 'zoom'. */
142
142
  animation = 'zoom';
143
143
  /** Parent injector for the content component (and `ngx-dialog-panel`
144
- * itself). Defaults to the root injector. */
144
+ * itself). Defaults to the dialog service's injector. */
145
145
  injector;
146
146
  constructor(init) {
147
147
  Object.assign(this, init);
@@ -288,25 +288,28 @@ class NgxDialogComponent {
288
288
  dialogRef = inject(DIALOG_REF);
289
289
  config = inject(NGX_DIALOG_CONFIG);
290
290
  content = inject(DIALOG_CONTENT);
291
+ contentInjector = inject(Injector);
292
+ contentEnvironmentInjector = inject(EnvironmentInjector);
291
293
  sizeClass = computed(() => this.config.size ? `ngx-dialog-size-${this.config.size}` : '', /* @ts-ignore */
292
294
  ...(ngDevMode ? [{ debugName: "sizeClass" }] : /* istanbul ignore next */ []));
293
295
  constructor() {
294
296
  this.dialogRef._setPanelElement(inject((ElementRef)).nativeElement);
295
297
  }
296
298
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
297
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.4", type: NgxDialogComponent, isStandalone: true, selector: "ngx-dialog-panel", host: { properties: { "class": "sizeClass()" }, classAttribute: "ngx-dialog-panel" }, ngImport: i0, template: "@if (config.header?.enable) {\n <div\n ngxDialogHeader\n [showCloseButton]=\"config.header?.showCloseButton ?? true\"\n [showMaximizeButton]=\"config.header?.showMaximizeButton ?? true\">\n {{ config.header?.title }}\n </div>\n}\n\n<ng-container *ngComponentOutlet=\"content\" />\n\n@if (config.footer?.enable) {\n <div ngxDialogFooter [align]=\"config.footer?.align ?? 'end'\">\n <button type=\"button\" class=\"ngx-dialog-default-close-btn\" (click)=\"dialogRef.close()\">\n {{ config.footer?.closeText ?? 'Close' }}\n </button>\n </div>\n}\n", styles: [":host{--ngx-dialog-bg: light-dark(#ffffff, #1c1c22);--ngx-dialog-fg: light-dark(#000000, #f0f0f5);--ngx-dialog-header-bg: light-dark(#ffffff, #1c1c22);--ngx-dialog-header-fg: light-dark(#1c1c22, #ffffff);display:flex;flex-direction:column;box-sizing:border-box;width:100%;height:100%;min-width:var(--ngx-dialog-min-width);min-height:inherit;overflow:hidden;background-color:var(--ngx-dialog-bg);color:var(--ngx-dialog-fg);animation:ngxDialogZoomIn .18s cubic-bezier(.25,.8,.25,1);max-height:100dvh}:host(.ngx-dialog-size-sm){--ngx-dialog-min-width: 30dvw}:host(.ngx-dialog-size-md){--ngx-dialog-min-width: 50dvw}:host(.ngx-dialog-size-lg){--ngx-dialog-min-width: 60dvw}:host(.ngx-dialog-size-xl){--ngx-dialog-min-width: 80dvw}:host(.ngx-dialog-size-full){width:100dvw;height:100dvh;max-width:none;border-radius:0}::ng-deep .dialog-header{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:0 0 auto;padding:0 15px;height:50px;box-sizing:border-box;color:var(--ngx-dialog-header-fg);background:var(--ngx-dialog-header-bg);font-size:.95rem;font-weight:600;border-bottom:1px solid rgba(107,107,107,.2)}::ng-deep .dialog-header .dialog-header-title{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;height:100%;display:flex;align-items:center}::ng-deep .dialog-header:not(.disable-drag) .dialog-header-title{cursor:move}::ng-deep .dialog-header .ngx-dialog-action-btn{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;background:none;border:none;cursor:pointer;color:inherit;padding:1px;border-radius:6px;width:24px;height:24px;background:light-dark(#efeff1,#2b2b33)}::ng-deep .dialog-header .ngx-dialog-action-btn svg{width:100%}::ng-deep .dialog-header .ngx-dialog-action-btn:hover{background:light-dark(#e2e2e6,#34343d)}::ng-deep .dialog-body{display:block;overflow:auto;padding:20px;box-sizing:border-box}::ng-deep .dialog-footer{flex:0 0 auto;display:flex;align-items:center;gap:8px;padding:12px 15px;box-shadow:0 -1px #72727233}::ng-deep .dialog-footer.align-start{justify-content:flex-start}::ng-deep .dialog-footer.align-end{justify-content:flex-end}::ng-deep .dialog-footer.align-center{justify-content:center}::ng-deep .dialog-footer.align-space-between{justify-content:space-between}::ng-deep .dialog-footer.align-space-around{justify-content:space-around}::ng-deep .ngx-dialog-backdrop{background:light-dark(rgba(71,71,71,.5490196078),rgba(39,38,38,.4509803922))!important;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px)}::ng-deep .ngx-dialog-fullscreen{width:100dvw!important;height:100dvh!important;max-height:unset!important;max-width:unset!important;transform:none!important;inset:0!important}@keyframes ngxDialogZoomIn{0%{transform:scale(.92);opacity:0}to{transform:scale(1);opacity:1}}@media(prefers-reduced-motion:reduce){:host{animation:none}}\n"], dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: NgxDialogHeader, selector: "ngx-dialog-header,[ngxDialogHeader]", inputs: ["showCloseButton", "showMaximizeButton"], exportAs: ["ngxDialogHeader"] }, { kind: "directive", type: NgxDialogFooter, selector: "ngx-dialog-footer,[ngxDialogFooter]", inputs: ["align"], exportAs: ["ngxDialogFooter"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
299
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.4", type: NgxDialogComponent, isStandalone: true, selector: "ngx-dialog-panel", host: { properties: { "class": "sizeClass()" }, classAttribute: "ngx-dialog-panel" }, ngImport: i0, template: "@if (config.header?.enable) {\n <div\n ngxDialogHeader\n [showCloseButton]=\"config.header?.showCloseButton ?? true\"\n [showMaximizeButton]=\"config.header?.showMaximizeButton ?? true\">\n {{ config.header?.title }}\n </div>\n}\n\n<ng-container\n *ngComponentOutlet=\"\n content;\n injector: contentInjector;\n environmentInjector: contentEnvironmentInjector\n \" />\n\n@if (config.footer?.enable) {\n <div ngxDialogFooter [align]=\"config.footer?.align ?? 'end'\">\n <button type=\"button\" class=\"ngx-dialog-default-close-btn\" (click)=\"dialogRef.close()\">\n {{ config.footer?.closeText ?? 'Close' }}\n </button>\n </div>\n}\n", styles: [":host{--ngx-dialog-bg: light-dark(#ffffff, #1c1c22);--ngx-dialog-fg: light-dark(#000000, #f0f0f5);--ngx-dialog-header-bg: light-dark(#ffffff, #1c1c22);--ngx-dialog-header-fg: light-dark(#1c1c22, #ffffff);display:flex;flex-direction:column;box-sizing:border-box;width:100%;height:100%;min-width:var(--ngx-dialog-min-width);min-height:inherit;overflow:hidden;background-color:var(--ngx-dialog-bg);color:var(--ngx-dialog-fg);animation:ngxDialogZoomIn .18s cubic-bezier(.25,.8,.25,1);max-height:100dvh}:host(.ngx-dialog-size-sm){--ngx-dialog-min-width: 30dvw}:host(.ngx-dialog-size-md){--ngx-dialog-min-width: 50dvw}:host(.ngx-dialog-size-lg){--ngx-dialog-min-width: 60dvw}:host(.ngx-dialog-size-xl){--ngx-dialog-min-width: 80dvw}:host(.ngx-dialog-size-full){width:100dvw;height:100dvh;max-width:none;border-radius:0}::ng-deep .dialog-header{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:0 0 auto;padding:0 15px;height:50px;box-sizing:border-box;color:var(--ngx-dialog-header-fg);background:var(--ngx-dialog-header-bg);font-size:.95rem;font-weight:600;border-bottom:1px solid rgba(107,107,107,.2)}::ng-deep .dialog-header .dialog-header-title{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;height:100%;display:flex;align-items:center}::ng-deep .dialog-header:not(.disable-drag) .dialog-header-title{cursor:move}::ng-deep .dialog-header .ngx-dialog-action-btn{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;background:none;border:none;cursor:pointer;color:inherit;padding:1px;border-radius:6px;width:24px;height:24px;background:light-dark(#efeff1,#2b2b33)}::ng-deep .dialog-header .ngx-dialog-action-btn svg{width:100%}::ng-deep .dialog-header .ngx-dialog-action-btn:hover{background:light-dark(#e2e2e6,#34343d)}::ng-deep .dialog-body{display:block;overflow:auto;padding:20px;box-sizing:border-box}::ng-deep .dialog-footer{flex:0 0 auto;display:flex;align-items:center;gap:8px;padding:12px 15px;box-shadow:0 -1px #72727233}::ng-deep .dialog-footer.align-start{justify-content:flex-start}::ng-deep .dialog-footer.align-end{justify-content:flex-end}::ng-deep .dialog-footer.align-center{justify-content:center}::ng-deep .dialog-footer.align-space-between{justify-content:space-between}::ng-deep .dialog-footer.align-space-around{justify-content:space-around}::ng-deep .ngx-dialog-backdrop{background:light-dark(rgba(71,71,71,.5490196078),rgba(39,38,38,.4509803922))!important;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px)}::ng-deep .ngx-dialog-fullscreen{width:100dvw!important;height:100dvh!important;max-height:unset!important;max-width:unset!important;transform:none!important;inset:0!important}@keyframes ngxDialogZoomIn{0%{transform:scale(.92);opacity:0}to{transform:scale(1);opacity:1}}@media(prefers-reduced-motion:reduce){:host{animation:none}}\n"], dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: NgxDialogHeader, selector: "ngx-dialog-header,[ngxDialogHeader]", inputs: ["showCloseButton", "showMaximizeButton"], exportAs: ["ngxDialogHeader"] }, { kind: "directive", type: NgxDialogFooter, selector: "ngx-dialog-footer,[ngxDialogFooter]", inputs: ["align"], exportAs: ["ngxDialogFooter"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
298
300
  }
299
301
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxDialogComponent, decorators: [{
300
302
  type: Component,
301
303
  args: [{ selector: 'ngx-dialog-panel', standalone: true, imports: [NgComponentOutlet, NgxDialogHeader, NgxDialogFooter], changeDetection: ChangeDetectionStrategy.OnPush, host: {
302
304
  class: 'ngx-dialog-panel',
303
305
  '[class]': 'sizeClass()',
304
- }, template: "@if (config.header?.enable) {\n <div\n ngxDialogHeader\n [showCloseButton]=\"config.header?.showCloseButton ?? true\"\n [showMaximizeButton]=\"config.header?.showMaximizeButton ?? true\">\n {{ config.header?.title }}\n </div>\n}\n\n<ng-container *ngComponentOutlet=\"content\" />\n\n@if (config.footer?.enable) {\n <div ngxDialogFooter [align]=\"config.footer?.align ?? 'end'\">\n <button type=\"button\" class=\"ngx-dialog-default-close-btn\" (click)=\"dialogRef.close()\">\n {{ config.footer?.closeText ?? 'Close' }}\n </button>\n </div>\n}\n", styles: [":host{--ngx-dialog-bg: light-dark(#ffffff, #1c1c22);--ngx-dialog-fg: light-dark(#000000, #f0f0f5);--ngx-dialog-header-bg: light-dark(#ffffff, #1c1c22);--ngx-dialog-header-fg: light-dark(#1c1c22, #ffffff);display:flex;flex-direction:column;box-sizing:border-box;width:100%;height:100%;min-width:var(--ngx-dialog-min-width);min-height:inherit;overflow:hidden;background-color:var(--ngx-dialog-bg);color:var(--ngx-dialog-fg);animation:ngxDialogZoomIn .18s cubic-bezier(.25,.8,.25,1);max-height:100dvh}:host(.ngx-dialog-size-sm){--ngx-dialog-min-width: 30dvw}:host(.ngx-dialog-size-md){--ngx-dialog-min-width: 50dvw}:host(.ngx-dialog-size-lg){--ngx-dialog-min-width: 60dvw}:host(.ngx-dialog-size-xl){--ngx-dialog-min-width: 80dvw}:host(.ngx-dialog-size-full){width:100dvw;height:100dvh;max-width:none;border-radius:0}::ng-deep .dialog-header{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:0 0 auto;padding:0 15px;height:50px;box-sizing:border-box;color:var(--ngx-dialog-header-fg);background:var(--ngx-dialog-header-bg);font-size:.95rem;font-weight:600;border-bottom:1px solid rgba(107,107,107,.2)}::ng-deep .dialog-header .dialog-header-title{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;height:100%;display:flex;align-items:center}::ng-deep .dialog-header:not(.disable-drag) .dialog-header-title{cursor:move}::ng-deep .dialog-header .ngx-dialog-action-btn{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;background:none;border:none;cursor:pointer;color:inherit;padding:1px;border-radius:6px;width:24px;height:24px;background:light-dark(#efeff1,#2b2b33)}::ng-deep .dialog-header .ngx-dialog-action-btn svg{width:100%}::ng-deep .dialog-header .ngx-dialog-action-btn:hover{background:light-dark(#e2e2e6,#34343d)}::ng-deep .dialog-body{display:block;overflow:auto;padding:20px;box-sizing:border-box}::ng-deep .dialog-footer{flex:0 0 auto;display:flex;align-items:center;gap:8px;padding:12px 15px;box-shadow:0 -1px #72727233}::ng-deep .dialog-footer.align-start{justify-content:flex-start}::ng-deep .dialog-footer.align-end{justify-content:flex-end}::ng-deep .dialog-footer.align-center{justify-content:center}::ng-deep .dialog-footer.align-space-between{justify-content:space-between}::ng-deep .dialog-footer.align-space-around{justify-content:space-around}::ng-deep .ngx-dialog-backdrop{background:light-dark(rgba(71,71,71,.5490196078),rgba(39,38,38,.4509803922))!important;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px)}::ng-deep .ngx-dialog-fullscreen{width:100dvw!important;height:100dvh!important;max-height:unset!important;max-width:unset!important;transform:none!important;inset:0!important}@keyframes ngxDialogZoomIn{0%{transform:scale(.92);opacity:0}to{transform:scale(1);opacity:1}}@media(prefers-reduced-motion:reduce){:host{animation:none}}\n"] }]
306
+ }, template: "@if (config.header?.enable) {\n <div\n ngxDialogHeader\n [showCloseButton]=\"config.header?.showCloseButton ?? true\"\n [showMaximizeButton]=\"config.header?.showMaximizeButton ?? true\">\n {{ config.header?.title }}\n </div>\n}\n\n<ng-container\n *ngComponentOutlet=\"\n content;\n injector: contentInjector;\n environmentInjector: contentEnvironmentInjector\n \" />\n\n@if (config.footer?.enable) {\n <div ngxDialogFooter [align]=\"config.footer?.align ?? 'end'\">\n <button type=\"button\" class=\"ngx-dialog-default-close-btn\" (click)=\"dialogRef.close()\">\n {{ config.footer?.closeText ?? 'Close' }}\n </button>\n </div>\n}\n", styles: [":host{--ngx-dialog-bg: light-dark(#ffffff, #1c1c22);--ngx-dialog-fg: light-dark(#000000, #f0f0f5);--ngx-dialog-header-bg: light-dark(#ffffff, #1c1c22);--ngx-dialog-header-fg: light-dark(#1c1c22, #ffffff);display:flex;flex-direction:column;box-sizing:border-box;width:100%;height:100%;min-width:var(--ngx-dialog-min-width);min-height:inherit;overflow:hidden;background-color:var(--ngx-dialog-bg);color:var(--ngx-dialog-fg);animation:ngxDialogZoomIn .18s cubic-bezier(.25,.8,.25,1);max-height:100dvh}:host(.ngx-dialog-size-sm){--ngx-dialog-min-width: 30dvw}:host(.ngx-dialog-size-md){--ngx-dialog-min-width: 50dvw}:host(.ngx-dialog-size-lg){--ngx-dialog-min-width: 60dvw}:host(.ngx-dialog-size-xl){--ngx-dialog-min-width: 80dvw}:host(.ngx-dialog-size-full){width:100dvw;height:100dvh;max-width:none;border-radius:0}::ng-deep .dialog-header{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:0 0 auto;padding:0 15px;height:50px;box-sizing:border-box;color:var(--ngx-dialog-header-fg);background:var(--ngx-dialog-header-bg);font-size:.95rem;font-weight:600;border-bottom:1px solid rgba(107,107,107,.2)}::ng-deep .dialog-header .dialog-header-title{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;height:100%;display:flex;align-items:center}::ng-deep .dialog-header:not(.disable-drag) .dialog-header-title{cursor:move}::ng-deep .dialog-header .ngx-dialog-action-btn{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;background:none;border:none;cursor:pointer;color:inherit;padding:1px;border-radius:6px;width:24px;height:24px;background:light-dark(#efeff1,#2b2b33)}::ng-deep .dialog-header .ngx-dialog-action-btn svg{width:100%}::ng-deep .dialog-header .ngx-dialog-action-btn:hover{background:light-dark(#e2e2e6,#34343d)}::ng-deep .dialog-body{display:block;overflow:auto;padding:20px;box-sizing:border-box}::ng-deep .dialog-footer{flex:0 0 auto;display:flex;align-items:center;gap:8px;padding:12px 15px;box-shadow:0 -1px #72727233}::ng-deep .dialog-footer.align-start{justify-content:flex-start}::ng-deep .dialog-footer.align-end{justify-content:flex-end}::ng-deep .dialog-footer.align-center{justify-content:center}::ng-deep .dialog-footer.align-space-between{justify-content:space-between}::ng-deep .dialog-footer.align-space-around{justify-content:space-around}::ng-deep .ngx-dialog-backdrop{background:light-dark(rgba(71,71,71,.5490196078),rgba(39,38,38,.4509803922))!important;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px)}::ng-deep .ngx-dialog-fullscreen{width:100dvw!important;height:100dvh!important;max-height:unset!important;max-width:unset!important;transform:none!important;inset:0!important}@keyframes ngxDialogZoomIn{0%{transform:scale(.92);opacity:0}to{transform:scale(1);opacity:1}}@media(prefers-reduced-motion:reduce){:host{animation:none}}\n"] }]
305
307
  }], ctorParameters: () => [] });
306
308
 
307
309
  class NgxDialogService {
308
310
  overlay = inject(OverlayService);
309
311
  injector = inject(Injector);
312
+ environmentInjector = inject(EnvironmentInjector);
310
313
  _openRefs = signal([], /* @ts-ignore */
311
314
  ...(ngDevMode ? [{ debugName: "_openRefs" }] : /* istanbul ignore next */ []));
312
315
  /** Every currently open dialog, oldest first. */
@@ -336,6 +339,7 @@ class NgxDialogService {
336
339
  const overlayRef = this.overlay.open({
337
340
  component: NgxDialogComponent,
338
341
  injector: componentInjector,
342
+ environmentInjector: this.environmentInjector,
339
343
  placement: 'center',
340
344
  alignment: 'center',
341
345
  margin: 0,
@@ -384,11 +388,10 @@ class NgxDialogService {
384
388
  el.style.maxHeight = config.maxHeight;
385
389
  }
386
390
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
387
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxDialogService, providedIn: 'root' });
391
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxDialogService });
388
392
  }
389
393
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxDialogService, decorators: [{
390
- type: Injectable,
391
- args: [{ providedIn: 'root' }]
394
+ type: Injectable
392
395
  }] });
393
396
 
394
397
  const NOT_INITIALIZED_MESSAGE = '[ngx-kit/dialog] Dialog.* was called before provideNgxDialog() ran. ' +
@@ -403,6 +406,7 @@ const NOT_INITIALIZED_MESSAGE = '[ngx-kit/dialog] Dialog.* was called before pro
403
406
  */
404
407
  class Dialog {
405
408
  static serviceInstance = null;
409
+ static openRefs = new Set();
406
410
  /** @internal set by `provideNgxDialog()`'s environment initializer. */
407
411
  static _setService(svc) {
408
412
  this.serviceInstance = svc;
@@ -414,9 +418,14 @@ class Dialog {
414
418
  return this.serviceInstance;
415
419
  }
416
420
  static open(component, config) {
417
- return this.service.open(component, config);
421
+ const scopedService = config?.injector?.get(NgxDialogService, null);
422
+ const ref = (scopedService ?? this.service).open(component, config);
423
+ this.openRefs.add(ref);
424
+ ref.afterClosed.subscribe(() => this.openRefs.delete(ref));
425
+ return ref;
418
426
  }
419
427
  static closeAll() {
428
+ this.openRefs.forEach((ref) => ref.close());
420
429
  this.service.closeAll();
421
430
  }
422
431
  }
@@ -473,7 +482,6 @@ class NgxDialogBody {
473
482
  const footerHeight = this.dialogRef.footerEl()?.offsetHeight ?? 0;
474
483
  const panelHeight = Math.min(panel.clientHeight, window.innerHeight);
475
484
  const available = panelHeight - headerHeight - footerHeight;
476
- console.log('available', available);
477
485
  if (available > 0) {
478
486
  this.renderer.setStyle(this.el.nativeElement, 'height', `${available}px`);
479
487
  }
@@ -494,7 +502,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImpor
494
502
  class NgxDialogModule {
495
503
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
496
504
  static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.4", ngImport: i0, type: NgxDialogModule, imports: [NgxDialogComponent, NgxDialogHeader, NgxDialogFooter, NgxDialogBody], exports: [NgxDialogComponent, NgxDialogHeader, NgxDialogFooter, NgxDialogBody] });
497
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxDialogModule });
505
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxDialogModule, providers: [NgxDialogService] });
498
506
  }
499
507
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxDialogModule, decorators: [{
500
508
  type: NgModule,
@@ -502,6 +510,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImpor
502
510
  declarations: [],
503
511
  imports: [NgxDialogComponent, NgxDialogHeader, NgxDialogFooter, NgxDialogBody],
504
512
  exports: [NgxDialogComponent, NgxDialogHeader, NgxDialogFooter, NgxDialogBody],
513
+ providers: [NgxDialogService],
505
514
  }]
506
515
  }] });
507
516
 
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-kit-dialog.mjs","sources":["../../../projects/libs/dialog/configs/dialog-ref.ts","../../../projects/libs/dialog/configs/dialog-config.ts","../../../projects/libs/dialog/tokens/dialog.tokens.ts","../../../projects/libs/dialog/directives/footer.directive.ts","../../../projects/libs/dialog/directives/header.directive.ts","../../../projects/libs/dialog/components/ngx-dialog.component.ts","../../../projects/libs/dialog/components/ngx-dialog.component.html","../../../projects/libs/dialog/services/ngx-dialog.service.ts","../../../projects/libs/dialog/dialog.facade.ts","../../../projects/libs/dialog/ngx-dialog.provider.ts","../../../projects/libs/dialog/directives/body.directive.ts","../../../projects/libs/dialog/ngx-dialog.module.ts","../../../projects/libs/dialog/ngx-kit-dialog.ts"],"sourcesContent":["import { signal } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\nimport { OverlayRef } from 'ngx-kit/core';\n\nlet uniqueId = 0;\nfunction nextDialogId(): string {\n uniqueId += 1;\n return `ngx-dialog-${Date.now().toString(36)}-${uniqueId}`;\n}\n\nexport class NgxDialogRef<R = any> {\n readonly id = nextDialogId();\n\n /** true from the moment `close()` is called, even before teardown finishes. */\n readonly closing = signal(false);\n /** true once the dialog has been fully removed from the DOM. */\n readonly closed = signal(false);\n\n private readonly _afterClosed = new Subject<R | undefined>();\n /** Emits the result exactly once, after the dialog has been fully torn down. */\n readonly afterClosed: Observable<R | undefined> = this._afterClosed.asObservable();\n\n /** @internal set by the layout directives; read by NgxDialogBody to size itself. */\n readonly headerEl = signal<HTMLElement | null>(null);\n /** @internal */\n readonly footerEl = signal<HTMLElement | null>(null);\n /** @internal */\n readonly bodyEl = signal<HTMLElement | null>(null);\n /** @internal the dialog panel's own host element. */\n readonly panelEl = signal<HTMLElement | null>(null);\n\n /** Optional synchronous guard - return `false` to prevent Escape/outside-click from closing. */\n beforeClose?: () => boolean;\n\n private overlayRef?: OverlayRef<unknown>;\n private result: R | undefined;\n\n /** @internal used by NgxDialogService right after creating the overlay. */\n _attachOverlayRef(ref: OverlayRef<unknown>): void {\n this.overlayRef = ref;\n }\n\n /** @internal used by the header/footer/body directives and the panel component. */\n _setHeaderElement(el: HTMLElement | null): void {\n this.headerEl.set(el);\n }\n /** @internal */\n _setFooterElement(el: HTMLElement | null): void {\n this.footerEl.set(el);\n }\n /** @internal */\n _setBodyElement(el: HTMLElement | null): void {\n this.bodyEl.set(el);\n }\n /** @internal */\n _setPanelElement(el: HTMLElement | null): void {\n this.panelEl.set(el);\n }\n\n /** Closes the dialog and emits `result` on `afterClosed` once torn down. Idempotent. */\n close(result?: R): void {\n if (this.closing() || this.closed()) {\n return;\n }\n this.closing.set(true);\n this.result = result;\n this.overlayRef?.close();\n }\n\n /** @internal called by NgxDialogService's `onClosed` callback once the overlay is fully torn down. */\n _finalizeClose(): void {\n if (this.closed()) {\n return;\n }\n this.closed.set(true);\n this._afterClosed.next(this.result);\n this._afterClosed.complete();\n }\n}\n","import { Injector } from '@angular/core';\nimport { NgxDialogFooterAlign } from '../directives/footer.directive';\n\nexport type NgxDialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';\n\nexport interface NgxDialogHeaderConfig {\n enable?: boolean;\n title?: string;\n showCloseButton?: boolean;\n showMaximizeButton?: boolean;\n}\n\nexport interface NgxDialogFooterConfig {\n enable?: boolean;\n /** Text for the auto-generated close button. Default: 'Close'. */\n closeText?: string;\n align?: NgxDialogFooterAlign;\n}\n\n/**\n * BREAKING CHANGE from the previous version of this config:\n * - `allowCloseOnOutsideClick` -> `closeOnOutsideClick` (naming now matches\n * `ngx-kit/overlay`'s options, which this service is built directly on).\n * - `header`/`footer` are now actually wired up (previously declared but\n * unused) - set `enable: true` to get an automatic header/footer without\n * having to place the `ngxDialogHeader`/`ngxDialogFooter` directives\n * yourself inside the content component.\n */\nexport class NgxDialogConfig<DataType = any> {\n /** Data made available to the content component (and to `ngx-dialog-panel`\n * itself) via the `DIALOG_DATA` injection token. */\n data?: DataType = {} as DataType;\n\n /** Named size preset - sets sensible min/max width bounds. Combine with\n * `width`/`maxWidth`/... for full manual control. */\n size?: NgxDialogSize = 'lg';\n width?: string;\n minWidth?: string;\n maxWidth?: string;\n height?: string;\n minHeight?: string;\n maxHeight?: string;\n\n /** Extra class(es) on the dialog panel (the `ngx-dialog-panel` host). */\n panelClass?: string | string[] = 'ngx-kit';\n /** Extra class(es) on the backdrop element behind the panel. */\n backdropClass?: string | string[] = 'ngx-dialog-backdrop';\n\n header?: NgxDialogHeaderConfig = {\n enable: false,\n showCloseButton: true,\n showMaximizeButton: true,\n };\n footer?: NgxDialogFooterConfig = { enable: false, align: 'end' };\n\n /** Close when clicking outside the panel.\n * - Default: `true`\n * */\n closeOnOutsideClick?: boolean = true;\n /** Close on Escape.\n * - Default: `true`\n * */\n closeOnEscape?: boolean = true;\n /** Shorthand for `closeOnOutsideClick: false, closeOnEscape: false` - the\n * dialog can then only be closed programmatically (e.g. via its own\n * buttons calling `dialogRef.close()`). */\n disableClose?: boolean = false;\n /** Synchronous guard consulted before Escape/outside-click would close the\n * dialog - return `false` to block it (e.g. unsaved changes). Does not\n * affect a programmatic `dialogRef.close()` call. */\n beforeClose?: () => boolean;\n\n /** Prevent the page behind the dialog from scrolling while it's open. Default: true. */\n lockBodyScroll?: boolean = true;\n /** Move focus into the dialog on open. Default: true. */\n autoFocus?: boolean = true;\n /** Restore focus to the previously focused element on close. Default: true. */\n restoreFocus?: boolean = true;\n /** Render via the native Popover API when supported. Default: true. */\n usePopover?: boolean = true;\n\n role?: 'dialog' | 'alertdialog' = 'dialog';\n ariaLabel?: string;\n ariaLabelledby?: string;\n ariaDescribedby?: string;\n\n /** Entry animation for the panel. Default: 'zoom'. */\n animation?: 'zoom' | 'fade' | 'slide-up' | 'none' = 'zoom';\n\n /** Parent injector for the content component (and `ngx-dialog-panel`\n * itself). Defaults to the root injector. */\n injector?: Injector;\n\n constructor(init?: Partial<NgxDialogConfig<DataType>>) {\n Object.assign(this, init);\n }\n}\n","import { InjectionToken, Type } from '@angular/core';\nimport { NgxDialogConfig } from '../configs/dialog-config';\nimport { NgxDialogRef } from '../configs/dialog-ref';\n\nexport const DIALOG_DATA = new InjectionToken<any>('NGX_DIALOG_DATA');\nexport const DIALOG_REF = new InjectionToken<NgxDialogRef<any>>('NGX_DIALOG_REF');\n/** The resolved config for the dialog currently being rendered. */\n\nexport const NGX_DIALOG_CONFIG = new InjectionToken<NgxDialogConfig<any>>('NGX_DIALOG_CONFIG', {\n factory: () => new NgxDialogConfig(),\n});\n/** The arbitrary content component passed to `open()`, projected via `*ngComponentOutlet`. */\nexport const DIALOG_CONTENT = new InjectionToken<Type<any>>('NGX_DIALOG_CONTENT');\n","import { Directive, ElementRef, inject, input, OnDestroy, OnInit } from '@angular/core';\nimport { DIALOG_REF } from '../tokens/dialog.tokens';\n\nexport type NgxDialogFooterAlign = 'start' | 'end' | 'center' | 'space-between' | 'space-around';\n\n@Directive({\n selector: 'ngx-dialog-footer,[ngxDialogFooter]',\n standalone: true,\n host: {\n class: 'dialog-footer',\n '[class.align-start]': 'align() === \"start\"',\n '[class.align-end]': 'align() === \"end\"',\n '[class.align-space-between]': 'align() === \"space-between\"',\n '[class.align-center]': 'align() === \"center\"',\n '[class.align-space-around]': 'align() === \"space-around\"',\n },\n exportAs: 'ngxDialogFooter',\n})\nexport class NgxDialogFooter implements OnInit, OnDestroy {\n readonly align = input<NgxDialogFooterAlign>('end');\n\n private readonly el = inject(ElementRef<HTMLElement>);\n private readonly dialogRef = inject(DIALOG_REF);\n\n ngOnInit(): void {\n this.dialogRef._setFooterElement(this.el.nativeElement);\n }\n\n ngOnDestroy(): void {\n this.dialogRef._setFooterElement(null);\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport { Directive, ElementRef, inject, input, OnInit } from '@angular/core';\nimport { DIALOG_REF, NGX_DIALOG_CONFIG } from '../tokens/dialog.tokens';\nimport { NgxDraggable } from 'ngx-kit/drag-resize';\nimport { DIALOG_OVERLAY_CLASSNAME } from 'ngx-kit/core';\n\nconst CLOSE_ICON_SVG = `<svg width=\"16\" height=\"16\" fill=\"currentColor\" viewBox=\"0 0 320 512\" aria-hidden=\"true\">\n <path d=\"M312.1 375c9.369 9.369 9.369 24.57 0 33.94s-24.57 9.369-33.94 0L160 289.9l-119 119c-9.369 9.369-24.57 9.369-33.94 0s-9.369-24.57 0-33.94L126.1 256L7.027 136.1c-9.369-9.369-9.369-24.57 0-33.94s24.57-9.369 33.94 0L160 222.1l119-119c9.369-9.369 24.57-9.369 33.94 0s9.369 24.57 0 33.94L193.9 256L312.1 375z\"/>\n </svg>`;\nconst MAXIMIZE_ICON_SVG = `<svg name=\"maximize\" stroke=\"currentColor\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M7.4852 16.5149C6.9104 15.9401 7.00595 13.4982 7.00595 13.4982M7.4852 16.5149C8.06001 17.0897 10.5019 16.994 10.5019 16.994M7.4852 16.5149L11 13M16.5149 7.48512C15.9401 6.91031 13.4982 7.00596 13.4982 7.00596M16.5149 7.48512C17.0897 8.05993 16.994 10.5018 16.994 10.5018M16.5149 7.48512L13 11\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z\" stroke-width=\"1.5\"/>\n</svg>`;\nconst RESTORE_ICON_SVG = `<svg name=\"restore\" stroke=\"currentColor\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z\" stroke-width=\"1.5\"/>\n<path d=\"M12.9833 11.0167C12.4085 10.4419 12.5041 8 12.5041 8M12.9833 11.0167C13.5581 11.5915 16 11.4958 16 11.4958M12.9833 11.0167L17 7M11.0131 12.9868C10.4383 12.412 7.99641 12.5077 7.99641 12.5077M11.0131 12.9868C11.5879 13.5616 11.4922 16.0035 11.4922 16.0035M11.0131 12.9868L7 16.9999\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>`;\n\n@Directive({\n selector: 'ngx-dialog-header,[ngxDialogHeader]',\n standalone: true,\n hostDirectives: [NgxDraggable],\n host: { class: 'dialog-header' },\n exportAs: 'ngxDialogHeader',\n})\nexport class NgxDialogHeader implements OnInit {\n private config = inject(NGX_DIALOG_CONFIG);\n readonly showCloseButton = input(this.config.header?.showCloseButton ?? true);\n readonly showMaximizeButton = input(this.config.header?.showMaximizeButton ?? true);\n\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef<HTMLElement>);\n private readonly document = inject(DOCUMENT);\n private readonly dialogRef = inject(DIALOG_REF);\n\n private readonly drag = inject(NgxDraggable);\n\n private isMaximized = false;\n\n ngOnInit(): void {\n this.drag.dragRootElement.set('.ngx-ui-overlay');\n this.drag.dragHandle.set('.dialog-header-title');\n // Wrap the existing (Angular-rendered) header content in a title span by\n // MOVING the actual DOM nodes, not by re-serializing/re-parsing\n // `innerHTML`. The original implementation did\n // `el.innerHTML = '<span>' + el.innerHTML + '</span>'`, which silently\n // destroys any event listeners or component state living inside the\n // header content (anything beyond static text) because the browser\n // throws away and re-parses the whole subtree.\n const titleWrapper = this.document.createElement('span');\n titleWrapper.className = 'dialog-header-title';\n while (this.el.nativeElement.firstChild) {\n titleWrapper.appendChild(this.el.nativeElement.firstChild);\n }\n this.el.nativeElement.appendChild(titleWrapper);\n if (this.showMaximizeButton()) {\n const fullScreenBtn = this.document.createElement('button');\n fullScreenBtn.type = 'button';\n fullScreenBtn.className = 'ngx-dialog-action-btn';\n fullScreenBtn.setAttribute('aria-label', 'Maximaize');\n fullScreenBtn.setAttribute('title', 'Maximaize');\n fullScreenBtn.innerHTML = MAXIMIZE_ICON_SVG;\n fullScreenBtn.addEventListener('click', (ev: Event) => this.fullScreen(ev));\n this.el.nativeElement.appendChild(fullScreenBtn);\n }\n if (this.showCloseButton()) {\n const closeBtn = this.document.createElement('button');\n closeBtn.type = 'button';\n closeBtn.className = 'ngx-dialog-action-btn close-btn';\n closeBtn.setAttribute('aria-label', 'Close');\n closeBtn.setAttribute('title', 'Close');\n closeBtn.innerHTML = CLOSE_ICON_SVG;\n closeBtn.addEventListener('click', () => this.dialogRef.close());\n this.el.nativeElement.appendChild(closeBtn);\n }\n\n this.dialogRef._setHeaderElement(this.el.nativeElement);\n }\n\n private fullScreen(ev: Event) {\n const overlay = this.el.nativeElement.closest(`.${DIALOG_OVERLAY_CLASSNAME}`);\n this.isMaximized = !this.isMaximized;\n this.drag.disabled.set(this.isMaximized);\n if (overlay) {\n overlay.classList.toggle('ngx-dialog-fullscreen');\n const btn = ev.currentTarget as HTMLButtonElement;\n btn.innerHTML = this.isMaximized ? RESTORE_ICON_SVG : MAXIMIZE_ICON_SVG;\n btn.setAttribute('aria-label', this.isMaximized ? 'Restore' : 'Maximaize');\n btn.setAttribute('title', this.isMaximized ? 'Restore' : 'Maximaize');\n }\n }\n}\n","import { NgComponentOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, ElementRef, computed, inject } from '@angular/core';\nimport { NGX_DIALOG_CONFIG, DIALOG_CONTENT, DIALOG_REF } from '../tokens/dialog.tokens';\nimport { NgxDialogFooter } from '../directives/footer.directive';\nimport { NgxDialogHeader } from '../directives/header.directive';\n\n/**\n * The dialog \"panel\" shell. It no longer owns the backdrop, centering,\n * focus trap, Escape handling or outside-click handling - all of that now\n * lives in `OverlayService`, which this component is rendered inside of.\n * This is intentionally a thin, fully signal-driven shell: no\n * `AfterViewInit`, no manual `ChangeDetectorRef.detectChanges()`, no\n * imperative style writes. Angular schedules change detection automatically\n * whenever a signal read from the template changes, including in zoneless\n * apps.\n */\n@Component({\n selector: 'ngx-dialog-panel',\n standalone: true,\n imports: [NgComponentOutlet, NgxDialogHeader, NgxDialogFooter],\n templateUrl: './ngx-dialog.component.html',\n styleUrl: './ngx-dialog.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'ngx-dialog-panel',\n '[class]': 'sizeClass()',\n },\n})\nexport class NgxDialogComponent {\n protected readonly dialogRef = inject(DIALOG_REF);\n protected readonly config = inject(NGX_DIALOG_CONFIG);\n protected readonly content = inject(DIALOG_CONTENT);\n\n protected readonly sizeClass = computed(() =>\n this.config.size ? `ngx-dialog-size-${this.config.size}` : '',\n );\n\n constructor() {\n this.dialogRef._setPanelElement(inject(ElementRef<HTMLElement>).nativeElement);\n }\n}\n","@if (config.header?.enable) {\n <div\n ngxDialogHeader\n [showCloseButton]=\"config.header?.showCloseButton ?? true\"\n [showMaximizeButton]=\"config.header?.showMaximizeButton ?? true\">\n {{ config.header?.title }}\n </div>\n}\n\n<ng-container *ngComponentOutlet=\"content\" />\n\n@if (config.footer?.enable) {\n <div ngxDialogFooter [align]=\"config.footer?.align ?? 'end'\">\n <button type=\"button\" class=\"ngx-dialog-default-close-btn\" (click)=\"dialogRef.close()\">\n {{ config.footer?.closeText ?? 'Close' }}\n </button>\n </div>\n}\n","import { Injectable, Injector, Type, computed, inject, signal } from '@angular/core';\nimport { OverlayService, OverlayOptions } from 'ngx-kit/core';\nimport { NgxDialogRef } from '../configs/dialog-ref';\nimport { NgxDialogConfig } from '../configs/dialog-config';\nimport {\n NGX_DIALOG_CONFIG,\n DIALOG_CONTENT,\n DIALOG_DATA,\n DIALOG_REF,\n} from '../tokens/dialog.tokens';\nimport { NgxDialogComponent } from '../components/ngx-dialog.component';\n\n@Injectable({ providedIn: 'root' })\nexport class NgxDialogService {\n private readonly overlay = inject(OverlayService);\n private readonly injector = inject(Injector);\n\n private readonly _openRefs = signal<NgxDialogRef<any>[]>([]);\n /** Every currently open dialog, oldest first. */\n readonly openDialogs = this._openRefs.asReadonly();\n /** How many dialogs are currently open. */\n readonly openCount = computed(() => this._openRefs().length);\n readonly defaultConfig = inject(NGX_DIALOG_CONFIG);\n /**\n * Opens `content` inside a dialog panel and returns a ref you can use to\n * close it and read the result back (`afterClosed`).\n */\n open<R = any, DataType = any>(\n content: Type<any>,\n config?: Partial<NgxDialogConfig<DataType>>,\n ): NgxDialogRef<R> {\n const resolvedConfig = { ...this.defaultConfig, ...config };\n const dialogRef = new NgxDialogRef<R>();\n dialogRef.beforeClose = resolvedConfig.beforeClose;\n\n const componentInjector = Injector.create({\n providers: [\n { provide: DIALOG_DATA, useValue: resolvedConfig.data },\n { provide: DIALOG_REF, useValue: dialogRef },\n { provide: NGX_DIALOG_CONFIG, useValue: resolvedConfig },\n { provide: DIALOG_CONTENT, useValue: content },\n ],\n parent: resolvedConfig.injector ?? this.injector,\n });\n\n const disableClose = resolvedConfig.disableClose ?? false;\n\n const overlayRef = this.overlay.open<NgxDialogComponent>({\n component: NgxDialogComponent,\n injector: componentInjector,\n placement: 'center',\n alignment: 'center',\n margin: 0,\n role: resolvedConfig.role ?? 'dialog',\n ariaModal: true,\n ariaLabel: resolvedConfig.ariaLabel,\n ariaLabelledby: resolvedConfig.ariaLabelledby,\n ariaDescribedby: resolvedConfig.ariaDescribedby,\n usePopover: resolvedConfig.usePopover ?? true,\n closeOnEscape: disableClose ? false : (resolvedConfig.closeOnEscape ?? true),\n closeOnOutsideClick: disableClose ? false : (resolvedConfig.closeOnOutsideClick ?? false),\n canClose: () => dialogRef.beforeClose?.() ?? true,\n restoreFocus: resolvedConfig.restoreFocus ?? true,\n autoFocus: resolvedConfig.autoFocus ?? true,\n lockBodyScroll: resolvedConfig.lockBodyScroll ?? true,\n backdropClass: resolvedConfig.backdropClass,\n panelClass: resolvedConfig.panelClass,\n configure: (_instance, ref) => this.applySizing(ref.nativeElement, resolvedConfig),\n onClosed: () => {\n this._openRefs.update((refs) => refs.filter((r) => r !== dialogRef));\n dialogRef._finalizeClose();\n },\n } satisfies OverlayOptions<NgxDialogComponent>);\n\n dialogRef._attachOverlayRef(overlayRef);\n this._openRefs.update((refs) => [...refs, dialogRef]);\n return dialogRef;\n }\n\n /** Closes every currently open dialog (ignores `disableClose`/guards - use sparingly, e.g. on logout). */\n closeAll(): void {\n [...this._openRefs()].forEach((ref) => ref.close());\n }\n\n private applySizing(el: HTMLElement | null, config: NgxDialogConfig): void {\n if (!el) return;\n if (config.width) el.style.width = config.width;\n if (config.minWidth) el.style.minWidth = config.minWidth;\n if (config.maxWidth) el.style.maxWidth = config.maxWidth;\n if (config.height) el.style.height = config.height;\n if (config.minHeight) el.style.minHeight = config.minHeight;\n if (config.maxHeight) el.style.maxHeight = config.maxHeight;\n }\n}\n","import { Type } from '@angular/core';\nimport { NgxDialogConfig } from './configs/dialog-config';\nimport { NgxDialogRef } from './configs/dialog-ref';\nimport { NgxDialogService } from './services/ngx-dialog.service';\n\nconst NOT_INITIALIZED_MESSAGE =\n '[ngx-kit/dialog] Dialog.* was called before provideNgxDialog() ran. ' +\n 'Add provideNgxDialog() to your app providers, or inject NgxDialogService directly instead of using the static Dialog API.';\n\n/**\n * Static convenience API over `NgxDialogService`, so you can call\n * `Dialog.open(...)` from anywhere without injecting the service manually.\n *\n * SSR note: the instance backing this static class is process-wide, not\n * per-request, so it is deliberately left unset on the server (see\n * `provideNgxDialog()`). Inject `NgxDialogService` directly in SSR code paths.\n */\nexport class Dialog {\n private static serviceInstance: NgxDialogService | null = null;\n\n /** @internal set by `provideNgxDialog()`'s environment initializer. */\n static _setService(svc: NgxDialogService): void {\n this.serviceInstance = svc;\n }\n\n private static get service(): NgxDialogService {\n if (!this.serviceInstance) {\n throw new Error(NOT_INITIALIZED_MESSAGE);\n }\n return this.serviceInstance;\n }\n\n static open<R = any, DataType = any>(\n component: Type<any>,\n config?: Partial<NgxDialogConfig<DataType>>,\n ): NgxDialogRef<R> {\n return this.service.open<R, DataType>(component, config);\n }\n\n static closeAll(): void {\n this.service.closeAll();\n }\n}\n","import {\n EnvironmentProviders,\n PLATFORM_ID,\n inject,\n makeEnvironmentProviders,\n provideEnvironmentInitializer,\n} from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport { NgxDialogService } from './services/ngx-dialog.service';\nimport { Dialog } from './dialog.facade';\nimport { NgxDialogConfig } from './configs/dialog-config';\nimport { NGX_DIALOG_CONFIG } from './tokens/dialog.tokens';\n\nexport function provideNgxDialog(config?: NgxDialogConfig): EnvironmentProviders {\n return makeEnvironmentProviders([\n {\n provide: NGX_DIALOG_CONFIG,\n useValue: { ...new NgxDialogConfig(), ...(config || {}) },\n },\n NgxDialogService,\n provideEnvironmentInitializer(() => {\n if (isPlatformServer(inject(PLATFORM_ID))) {\n return;\n }\n\n Dialog._setService(inject(NgxDialogService));\n }),\n ]);\n}\n","import {\n DestroyRef,\n Directive,\n ElementRef,\n HostListener,\n Renderer2,\n effect,\n inject,\n} from '@angular/core';\nimport { DIALOG_REF } from '../tokens/dialog.tokens';\n\n/**\n * Why this can't be pure CSS flexbox: the header/body/footer elements are\n * *grandchildren* of the dialog panel (panel -> `*ngComponentOutlet`'s host\n * element -> header/body/footer), not direct children, because the content\n * component that hosts them is arbitrary and we don't control its own host\n * styling. `display:flex;flex-direction:column` on the panel therefore can't\n * size the body against the header/footer through that extra layer, so we\n * measure and set an explicit `max-height` instead, driven by a\n * `ResizeObserver` on the panel (not a `window:resize` listener, so it also\n * reacts to the dialog itself changing size, e.g. via `config.size`).\n */\n@Directive({\n selector: 'ngx-dialog-body,[ngxDialogBody]',\n standalone: true,\n host: { class: 'dialog-body' },\n exportAs: 'ngxDialogBody',\n})\nexport class NgxDialogBody {\n private readonly el = inject(ElementRef<HTMLElement>);\n private readonly renderer = inject(Renderer2);\n private readonly dialogRef = inject(DIALOG_REF);\n private readonly destroyRef = inject(DestroyRef);\n\n constructor() {\n this.dialogRef._setBodyElement(this.el.nativeElement);\n this.destroyRef.onDestroy(() => this.dialogRef._setBodyElement(null));\n effect((onCleanup) => {\n const panel = this.dialogRef.panelEl();\n if (!panel || typeof ResizeObserver === 'undefined') {\n return;\n }\n const recompute = (): void => this.recomputeHeight(panel);\n\n const observer = new ResizeObserver(recompute);\n observer.observe(panel);\n recompute();\n onCleanup(() => observer.disconnect());\n });\n }\n\n private recomputeHeight(panel: HTMLElement): void {\n const headerHeight = this.dialogRef.headerEl()?.offsetHeight ?? 0;\n const footerHeight = this.dialogRef.footerEl()?.offsetHeight ?? 0;\n const panelHeight = Math.min(panel.clientHeight, window.innerHeight);\n const available = panelHeight - headerHeight - footerHeight;\n console.log('available', available);\n if (available > 0) {\n this.renderer.setStyle(this.el.nativeElement, 'height', `${available}px`);\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { NgxDialogBody } from './directives/body.directive';\nimport { NgxDialogFooter } from './directives/footer.directive';\nimport { NgxDialogHeader } from './directives/header.directive';\nimport { NgxDialogComponent } from './components/ngx-dialog.component';\n\n@NgModule({\n declarations: [],\n imports: [NgxDialogComponent, NgxDialogHeader, NgxDialogFooter, NgxDialogBody],\n exports: [NgxDialogComponent, NgxDialogHeader, NgxDialogFooter, NgxDialogBody],\n})\nexport class Ng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AAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EAAA,OAAA,EAAA,CAHhB,kBAAkB,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,CAAA,EAAA,OAAA,EAAA,CACnE,kBAAkB,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,CAAA,EAAA,CAAA;wGAElE,eAAe,EAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAL3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,EAAE;oBAChB,OAAO,EAAE,CAAC,kBAAkB,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,CAAC;oBAC9E,OAAO,EAAE,CAAC,kBAAkB,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,CAAC;AAC/E,iBAAA;;;ACVD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-kit-dialog.mjs","sources":["../../../projects/libs/dialog/configs/dialog-ref.ts","../../../projects/libs/dialog/configs/dialog-config.ts","../../../projects/libs/dialog/tokens/dialog.tokens.ts","../../../projects/libs/dialog/directives/footer.directive.ts","../../../projects/libs/dialog/directives/header.directive.ts","../../../projects/libs/dialog/components/ngx-dialog.component.ts","../../../projects/libs/dialog/components/ngx-dialog.component.html","../../../projects/libs/dialog/services/ngx-dialog.service.ts","../../../projects/libs/dialog/dialog.facade.ts","../../../projects/libs/dialog/ngx-dialog.provider.ts","../../../projects/libs/dialog/directives/body.directive.ts","../../../projects/libs/dialog/ngx-dialog.module.ts","../../../projects/libs/dialog/ngx-kit-dialog.ts"],"sourcesContent":["import { signal } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\nimport { OverlayRef } from 'ngx-kit/core';\n\nlet uniqueId = 0;\nfunction nextDialogId(): string {\n uniqueId += 1;\n return `ngx-dialog-${Date.now().toString(36)}-${uniqueId}`;\n}\n\nexport class NgxDialogRef<R = any> {\n readonly id = nextDialogId();\n\n /** true from the moment `close()` is called, even before teardown finishes. */\n readonly closing = signal(false);\n /** true once the dialog has been fully removed from the DOM. */\n readonly closed = signal(false);\n\n private readonly _afterClosed = new Subject<R | undefined>();\n /** Emits the result exactly once, after the dialog has been fully torn down. */\n readonly afterClosed: Observable<R | undefined> = this._afterClosed.asObservable();\n\n /** @internal set by the layout directives; read by NgxDialogBody to size itself. */\n readonly headerEl = signal<HTMLElement | null>(null);\n /** @internal */\n readonly footerEl = signal<HTMLElement | null>(null);\n /** @internal */\n readonly bodyEl = signal<HTMLElement | null>(null);\n /** @internal the dialog panel's own host element. */\n readonly panelEl = signal<HTMLElement | null>(null);\n\n /** Optional synchronous guard - return `false` to prevent Escape/outside-click from closing. */\n beforeClose?: () => boolean;\n\n private overlayRef?: OverlayRef<unknown>;\n private result: R | undefined;\n\n /** @internal used by NgxDialogService right after creating the overlay. */\n _attachOverlayRef(ref: OverlayRef<unknown>): void {\n this.overlayRef = ref;\n }\n\n /** @internal used by the header/footer/body directives and the panel component. */\n _setHeaderElement(el: HTMLElement | null): void {\n this.headerEl.set(el);\n }\n /** @internal */\n _setFooterElement(el: HTMLElement | null): void {\n this.footerEl.set(el);\n }\n /** @internal */\n _setBodyElement(el: HTMLElement | null): void {\n this.bodyEl.set(el);\n }\n /** @internal */\n _setPanelElement(el: HTMLElement | null): void {\n this.panelEl.set(el);\n }\n\n /** Closes the dialog and emits `result` on `afterClosed` once torn down. Idempotent. */\n close(result?: R): void {\n if (this.closing() || this.closed()) {\n return;\n }\n this.closing.set(true);\n this.result = result;\n this.overlayRef?.close();\n }\n\n /** @internal called by NgxDialogService's `onClosed` callback once the overlay is fully torn down. */\n _finalizeClose(): void {\n if (this.closed()) {\n return;\n }\n this.closed.set(true);\n this._afterClosed.next(this.result);\n this._afterClosed.complete();\n }\n}\n","import { Injector } from '@angular/core';\nimport { NgxDialogFooterAlign } from '../directives/footer.directive';\n\nexport type NgxDialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';\n\nexport interface NgxDialogHeaderConfig {\n enable?: boolean;\n title?: string;\n showCloseButton?: boolean;\n showMaximizeButton?: boolean;\n}\n\nexport interface NgxDialogFooterConfig {\n enable?: boolean;\n /** Text for the auto-generated close button. Default: 'Close'. */\n closeText?: string;\n align?: NgxDialogFooterAlign;\n}\n\n/**\n * BREAKING CHANGE from the previous version of this config:\n * - `allowCloseOnOutsideClick` -> `closeOnOutsideClick` (naming now matches\n * `ngx-kit/overlay`'s options, which this service is built directly on).\n * - `header`/`footer` are now actually wired up (previously declared but\n * unused) - set `enable: true` to get an automatic header/footer without\n * having to place the `ngxDialogHeader`/`ngxDialogFooter` directives\n * yourself inside the content component.\n */\nexport class NgxDialogConfig<DataType = any> {\n /** Data made available to the content component (and to `ngx-dialog-panel`\n * itself) via the `DIALOG_DATA` injection token. */\n data?: DataType = {} as DataType;\n\n /** Named size preset - sets sensible min/max width bounds. Combine with\n * `width`/`maxWidth`/... for full manual control. */\n size?: NgxDialogSize = 'lg';\n width?: string;\n minWidth?: string;\n maxWidth?: string;\n height?: string;\n minHeight?: string;\n maxHeight?: string;\n\n /** Extra class(es) on the dialog panel (the `ngx-dialog-panel` host). */\n panelClass?: string | string[] = 'ngx-kit';\n /** Extra class(es) on the backdrop element behind the panel. */\n backdropClass?: string | string[] = 'ngx-dialog-backdrop';\n\n header?: NgxDialogHeaderConfig = {\n enable: false,\n showCloseButton: true,\n showMaximizeButton: true,\n };\n footer?: NgxDialogFooterConfig = { enable: false, align: 'end' };\n\n /** Close when clicking outside the panel.\n * - Default: `true`\n * */\n closeOnOutsideClick?: boolean = true;\n /** Close on Escape.\n * - Default: `true`\n * */\n closeOnEscape?: boolean = true;\n /** Shorthand for `closeOnOutsideClick: false, closeOnEscape: false` - the\n * dialog can then only be closed programmatically (e.g. via its own\n * buttons calling `dialogRef.close()`). */\n disableClose?: boolean = false;\n /** Synchronous guard consulted before Escape/outside-click would close the\n * dialog - return `false` to block it (e.g. unsaved changes). Does not\n * affect a programmatic `dialogRef.close()` call. */\n beforeClose?: () => boolean;\n\n /** Prevent the page behind the dialog from scrolling while it's open. Default: true. */\n lockBodyScroll?: boolean = true;\n /** Move focus into the dialog on open. Default: true. */\n autoFocus?: boolean = true;\n /** Restore focus to the previously focused element on close. Default: true. */\n restoreFocus?: boolean = true;\n /** Render via the native Popover API when supported. Default: true. */\n usePopover?: boolean = true;\n\n role?: 'dialog' | 'alertdialog' = 'dialog';\n ariaLabel?: string;\n ariaLabelledby?: string;\n ariaDescribedby?: string;\n\n /** Entry animation for the panel. Default: 'zoom'. */\n animation?: 'zoom' | 'fade' | 'slide-up' | 'none' = 'zoom';\n\n /** Parent injector for the content component (and `ngx-dialog-panel`\n * itself). Defaults to the dialog service's injector. */\n injector?: Injector;\n\n constructor(init?: Partial<NgxDialogConfig<DataType>>) {\n Object.assign(this, init);\n }\n}\n","import { InjectionToken, Type } from '@angular/core';\nimport { NgxDialogConfig } from '../configs/dialog-config';\nimport { NgxDialogRef } from '../configs/dialog-ref';\n\nexport const DIALOG_DATA = new InjectionToken<any>('NGX_DIALOG_DATA');\nexport const DIALOG_REF = new InjectionToken<NgxDialogRef<any>>('NGX_DIALOG_REF');\n/** The resolved config for the dialog currently being rendered. */\n\nexport const NGX_DIALOG_CONFIG = new InjectionToken<NgxDialogConfig<any>>('NGX_DIALOG_CONFIG', {\n factory: () => new NgxDialogConfig(),\n});\n/** The arbitrary content component passed to `open()`, projected via `*ngComponentOutlet`. */\nexport const DIALOG_CONTENT = new InjectionToken<Type<any>>('NGX_DIALOG_CONTENT');\n","import { Directive, ElementRef, inject, input, OnDestroy, OnInit } from '@angular/core';\nimport { DIALOG_REF } from '../tokens/dialog.tokens';\n\nexport type NgxDialogFooterAlign = 'start' | 'end' | 'center' | 'space-between' | 'space-around';\n\n@Directive({\n selector: 'ngx-dialog-footer,[ngxDialogFooter]',\n standalone: true,\n host: {\n class: 'dialog-footer',\n '[class.align-start]': 'align() === \"start\"',\n '[class.align-end]': 'align() === \"end\"',\n '[class.align-space-between]': 'align() === \"space-between\"',\n '[class.align-center]': 'align() === \"center\"',\n '[class.align-space-around]': 'align() === \"space-around\"',\n },\n exportAs: 'ngxDialogFooter',\n})\nexport class NgxDialogFooter implements OnInit, OnDestroy {\n readonly align = input<NgxDialogFooterAlign>('end');\n\n private readonly el = inject(ElementRef<HTMLElement>);\n private readonly dialogRef = inject(DIALOG_REF);\n\n ngOnInit(): void {\n this.dialogRef._setFooterElement(this.el.nativeElement);\n }\n\n ngOnDestroy(): void {\n this.dialogRef._setFooterElement(null);\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport { Directive, ElementRef, inject, input, OnInit } from '@angular/core';\nimport { DIALOG_REF, NGX_DIALOG_CONFIG } from '../tokens/dialog.tokens';\nimport { NgxDraggable } from 'ngx-kit/drag-resize';\nimport { DIALOG_OVERLAY_CLASSNAME } from 'ngx-kit/core';\n\nconst CLOSE_ICON_SVG = `<svg width=\"16\" height=\"16\" fill=\"currentColor\" viewBox=\"0 0 320 512\" aria-hidden=\"true\">\n <path d=\"M312.1 375c9.369 9.369 9.369 24.57 0 33.94s-24.57 9.369-33.94 0L160 289.9l-119 119c-9.369 9.369-24.57 9.369-33.94 0s-9.369-24.57 0-33.94L126.1 256L7.027 136.1c-9.369-9.369-9.369-24.57 0-33.94s24.57-9.369 33.94 0L160 222.1l119-119c9.369-9.369 24.57-9.369 33.94 0s9.369 24.57 0 33.94L193.9 256L312.1 375z\"/>\n </svg>`;\nconst MAXIMIZE_ICON_SVG = `<svg name=\"maximize\" stroke=\"currentColor\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M7.4852 16.5149C6.9104 15.9401 7.00595 13.4982 7.00595 13.4982M7.4852 16.5149C8.06001 17.0897 10.5019 16.994 10.5019 16.994M7.4852 16.5149L11 13M16.5149 7.48512C15.9401 6.91031 13.4982 7.00596 13.4982 7.00596M16.5149 7.48512C17.0897 8.05993 16.994 10.5018 16.994 10.5018M16.5149 7.48512L13 11\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z\" stroke-width=\"1.5\"/>\n</svg>`;\nconst RESTORE_ICON_SVG = `<svg name=\"restore\" stroke=\"currentColor\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z\" stroke-width=\"1.5\"/>\n<path d=\"M12.9833 11.0167C12.4085 10.4419 12.5041 8 12.5041 8M12.9833 11.0167C13.5581 11.5915 16 11.4958 16 11.4958M12.9833 11.0167L17 7M11.0131 12.9868C10.4383 12.412 7.99641 12.5077 7.99641 12.5077M11.0131 12.9868C11.5879 13.5616 11.4922 16.0035 11.4922 16.0035M11.0131 12.9868L7 16.9999\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>`;\n\n@Directive({\n selector: 'ngx-dialog-header,[ngxDialogHeader]',\n standalone: true,\n hostDirectives: [NgxDraggable],\n host: { class: 'dialog-header' },\n exportAs: 'ngxDialogHeader',\n})\nexport class NgxDialogHeader implements OnInit {\n private config = inject(NGX_DIALOG_CONFIG);\n readonly showCloseButton = input(this.config.header?.showCloseButton ?? true);\n readonly showMaximizeButton = input(this.config.header?.showMaximizeButton ?? true);\n\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef<HTMLElement>);\n private readonly document = inject(DOCUMENT);\n private readonly dialogRef = inject(DIALOG_REF);\n\n private readonly drag = inject(NgxDraggable);\n\n private isMaximized = false;\n\n ngOnInit(): void {\n this.drag.dragRootElement.set('.ngx-ui-overlay');\n this.drag.dragHandle.set('.dialog-header-title');\n // Wrap the existing (Angular-rendered) header content in a title span by\n // MOVING the actual DOM nodes, not by re-serializing/re-parsing\n // `innerHTML`. The original implementation did\n // `el.innerHTML = '<span>' + el.innerHTML + '</span>'`, which silently\n // destroys any event listeners or component state living inside the\n // header content (anything beyond static text) because the browser\n // throws away and re-parses the whole subtree.\n const titleWrapper = this.document.createElement('span');\n titleWrapper.className = 'dialog-header-title';\n while (this.el.nativeElement.firstChild) {\n titleWrapper.appendChild(this.el.nativeElement.firstChild);\n }\n this.el.nativeElement.appendChild(titleWrapper);\n if (this.showMaximizeButton()) {\n const fullScreenBtn = this.document.createElement('button');\n fullScreenBtn.type = 'button';\n fullScreenBtn.className = 'ngx-dialog-action-btn';\n fullScreenBtn.setAttribute('aria-label', 'Maximaize');\n fullScreenBtn.setAttribute('title', 'Maximaize');\n fullScreenBtn.innerHTML = MAXIMIZE_ICON_SVG;\n fullScreenBtn.addEventListener('click', (ev: Event) => this.fullScreen(ev));\n this.el.nativeElement.appendChild(fullScreenBtn);\n }\n if (this.showCloseButton()) {\n const closeBtn = this.document.createElement('button');\n closeBtn.type = 'button';\n closeBtn.className = 'ngx-dialog-action-btn close-btn';\n closeBtn.setAttribute('aria-label', 'Close');\n closeBtn.setAttribute('title', 'Close');\n closeBtn.innerHTML = CLOSE_ICON_SVG;\n closeBtn.addEventListener('click', () => this.dialogRef.close());\n this.el.nativeElement.appendChild(closeBtn);\n }\n\n this.dialogRef._setHeaderElement(this.el.nativeElement);\n }\n\n private fullScreen(ev: Event) {\n const overlay = this.el.nativeElement.closest(`.${DIALOG_OVERLAY_CLASSNAME}`);\n this.isMaximized = !this.isMaximized;\n this.drag.disabled.set(this.isMaximized);\n if (overlay) {\n overlay.classList.toggle('ngx-dialog-fullscreen');\n const btn = ev.currentTarget as HTMLButtonElement;\n btn.innerHTML = this.isMaximized ? RESTORE_ICON_SVG : MAXIMIZE_ICON_SVG;\n btn.setAttribute('aria-label', this.isMaximized ? 'Restore' : 'Maximaize');\n btn.setAttribute('title', this.isMaximized ? 'Restore' : 'Maximaize');\n }\n }\n}\n","import { NgComponentOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EnvironmentInjector,\n Injector,\n computed,\n inject,\n} from '@angular/core';\nimport { NGX_DIALOG_CONFIG, DIALOG_CONTENT, DIALOG_REF } from '../tokens/dialog.tokens';\nimport { NgxDialogFooter } from '../directives/footer.directive';\nimport { NgxDialogHeader } from '../directives/header.directive';\n\n/**\n * The dialog \"panel\" shell. It no longer owns the backdrop, centering,\n * focus trap, Escape handling or outside-click handling - all of that now\n * lives in `OverlayService`, which this component is rendered inside of.\n * This is intentionally a thin, fully signal-driven shell: no\n * `AfterViewInit`, no manual `ChangeDetectorRef.detectChanges()`, no\n * imperative style writes. Angular schedules change detection automatically\n * whenever a signal read from the template changes, including in zoneless\n * apps.\n */\n@Component({\n selector: 'ngx-dialog-panel',\n standalone: true,\n imports: [NgComponentOutlet, NgxDialogHeader, NgxDialogFooter],\n templateUrl: './ngx-dialog.component.html',\n styleUrl: './ngx-dialog.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'ngx-dialog-panel',\n '[class]': 'sizeClass()',\n },\n})\nexport class NgxDialogComponent {\n protected readonly dialogRef = inject(DIALOG_REF);\n protected readonly config = inject(NGX_DIALOG_CONFIG);\n protected readonly content = inject(DIALOG_CONTENT);\n protected readonly contentInjector = inject(Injector);\n protected readonly contentEnvironmentInjector = inject(EnvironmentInjector);\n\n protected readonly sizeClass = computed(() =>\n this.config.size ? `ngx-dialog-size-${this.config.size}` : '',\n );\n\n constructor() {\n this.dialogRef._setPanelElement(inject(ElementRef<HTMLElement>).nativeElement);\n }\n}\n","@if (config.header?.enable) {\n <div\n ngxDialogHeader\n [showCloseButton]=\"config.header?.showCloseButton ?? true\"\n [showMaximizeButton]=\"config.header?.showMaximizeButton ?? true\">\n {{ config.header?.title }}\n </div>\n}\n\n<ng-container\n *ngComponentOutlet=\"\n content;\n injector: contentInjector;\n environmentInjector: contentEnvironmentInjector\n \" />\n\n@if (config.footer?.enable) {\n <div ngxDialogFooter [align]=\"config.footer?.align ?? 'end'\">\n <button type=\"button\" class=\"ngx-dialog-default-close-btn\" (click)=\"dialogRef.close()\">\n {{ config.footer?.closeText ?? 'Close' }}\n </button>\n </div>\n}\n","import {\n EnvironmentInjector,\n Injectable,\n Injector,\n Type,\n computed,\n inject,\n signal,\n} from '@angular/core';\nimport { OverlayService, OverlayOptions } from 'ngx-kit/core';\nimport { NgxDialogRef } from '../configs/dialog-ref';\nimport { NgxDialogConfig } from '../configs/dialog-config';\nimport {\n NGX_DIALOG_CONFIG,\n DIALOG_CONTENT,\n DIALOG_DATA,\n DIALOG_REF,\n} from '../tokens/dialog.tokens';\nimport { NgxDialogComponent } from '../components/ngx-dialog.component';\n\n@Injectable()\nexport class NgxDialogService {\n private readonly overlay = inject(OverlayService);\n private readonly injector = inject(Injector);\n private readonly environmentInjector = inject(EnvironmentInjector);\n\n private readonly _openRefs = signal<NgxDialogRef<any>[]>([]);\n /** Every currently open dialog, oldest first. */\n readonly openDialogs = this._openRefs.asReadonly();\n /** How many dialogs are currently open. */\n readonly openCount = computed(() => this._openRefs().length);\n readonly defaultConfig = inject(NGX_DIALOG_CONFIG);\n /**\n * Opens `content` inside a dialog panel and returns a ref you can use to\n * close it and read the result back (`afterClosed`).\n */\n open<R = any, DataType = any>(\n content: Type<any>,\n config?: Partial<NgxDialogConfig<DataType>>,\n ): NgxDialogRef<R> {\n const resolvedConfig = { ...this.defaultConfig, ...config };\n const dialogRef = new NgxDialogRef<R>();\n dialogRef.beforeClose = resolvedConfig.beforeClose;\n\n const componentInjector = Injector.create({\n providers: [\n { provide: DIALOG_DATA, useValue: resolvedConfig.data },\n { provide: DIALOG_REF, useValue: dialogRef },\n { provide: NGX_DIALOG_CONFIG, useValue: resolvedConfig },\n { provide: DIALOG_CONTENT, useValue: content },\n ],\n parent: resolvedConfig.injector ?? this.injector,\n });\n\n const disableClose = resolvedConfig.disableClose ?? false;\n const overlayRef = this.overlay.open<NgxDialogComponent>({\n component: NgxDialogComponent,\n injector: componentInjector,\n environmentInjector: this.environmentInjector,\n placement: 'center',\n alignment: 'center',\n margin: 0,\n role: resolvedConfig.role ?? 'dialog',\n ariaModal: true,\n ariaLabel: resolvedConfig.ariaLabel,\n ariaLabelledby: resolvedConfig.ariaLabelledby,\n ariaDescribedby: resolvedConfig.ariaDescribedby,\n usePopover: resolvedConfig.usePopover ?? true,\n closeOnEscape: disableClose ? false : (resolvedConfig.closeOnEscape ?? true),\n closeOnOutsideClick: disableClose ? false : (resolvedConfig.closeOnOutsideClick ?? false),\n canClose: () => dialogRef.beforeClose?.() ?? true,\n restoreFocus: resolvedConfig.restoreFocus ?? true,\n autoFocus: resolvedConfig.autoFocus ?? true,\n lockBodyScroll: resolvedConfig.lockBodyScroll ?? true,\n backdropClass: resolvedConfig.backdropClass,\n panelClass: resolvedConfig.panelClass,\n configure: (_instance, ref) => this.applySizing(ref.nativeElement, resolvedConfig),\n onClosed: () => {\n this._openRefs.update((refs) => refs.filter((r) => r !== dialogRef));\n dialogRef._finalizeClose();\n },\n } satisfies OverlayOptions<NgxDialogComponent>);\n\n dialogRef._attachOverlayRef(overlayRef);\n this._openRefs.update((refs) => [...refs, dialogRef]);\n return dialogRef;\n }\n\n /** Closes every currently open dialog (ignores `disableClose`/guards - use sparingly, e.g. on logout). */\n closeAll(): void {\n [...this._openRefs()].forEach((ref) => ref.close());\n }\n\n private applySizing(el: HTMLElement | null, config: NgxDialogConfig): void {\n if (!el) return;\n if (config.width) el.style.width = config.width;\n if (config.minWidth) el.style.minWidth = config.minWidth;\n if (config.maxWidth) el.style.maxWidth = config.maxWidth;\n if (config.height) el.style.height = config.height;\n if (config.minHeight) el.style.minHeight = config.minHeight;\n if (config.maxHeight) el.style.maxHeight = config.maxHeight;\n }\n}\n","import { Type } from '@angular/core';\nimport { NgxDialogConfig } from './configs/dialog-config';\nimport { NgxDialogRef } from './configs/dialog-ref';\nimport { NgxDialogService } from './services/ngx-dialog.service';\n\nconst NOT_INITIALIZED_MESSAGE =\n '[ngx-kit/dialog] Dialog.* was called before provideNgxDialog() ran. ' +\n 'Add provideNgxDialog() to your app providers, or inject NgxDialogService directly instead of using the static Dialog API.';\n\n/**\n * Static convenience API over `NgxDialogService`, so you can call\n * `Dialog.open(...)` from anywhere without injecting the service manually.\n *\n * SSR note: the instance backing this static class is process-wide, not\n * per-request, so it is deliberately left unset on the server (see\n * `provideNgxDialog()`). Inject `NgxDialogService` directly in SSR code paths.\n */\nexport class Dialog {\n private static serviceInstance: NgxDialogService | null = null;\n private static readonly openRefs = new Set<NgxDialogRef<any>>();\n\n /** @internal set by `provideNgxDialog()`'s environment initializer. */\n static _setService(svc: NgxDialogService): void {\n this.serviceInstance = svc;\n }\n\n private static get service(): NgxDialogService {\n if (!this.serviceInstance) {\n throw new Error(NOT_INITIALIZED_MESSAGE);\n }\n return this.serviceInstance;\n }\n\n static open<R = any, DataType = any>(\n component: Type<any>,\n config?: Partial<NgxDialogConfig<DataType>>,\n ): NgxDialogRef<R> {\n const scopedService = config?.injector?.get(NgxDialogService, null);\n const ref = (scopedService ?? this.service).open<R, DataType>(component, config);\n this.openRefs.add(ref);\n ref.afterClosed.subscribe(() => this.openRefs.delete(ref));\n return ref;\n }\n\n static closeAll(): void {\n this.openRefs.forEach((ref) => ref.close());\n this.service.closeAll();\n }\n}\n","import {\n EnvironmentProviders,\n PLATFORM_ID,\n inject,\n makeEnvironmentProviders,\n provideEnvironmentInitializer,\n} from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport { NgxDialogService } from './services/ngx-dialog.service';\nimport { Dialog } from './dialog.facade';\nimport { NgxDialogConfig } from './configs/dialog-config';\nimport { NGX_DIALOG_CONFIG } from './tokens/dialog.tokens';\n\nexport function provideNgxDialog(config?: NgxDialogConfig): EnvironmentProviders {\n return makeEnvironmentProviders([\n {\n provide: NGX_DIALOG_CONFIG,\n useValue: { ...new NgxDialogConfig(), ...(config || {}) },\n },\n NgxDialogService,\n provideEnvironmentInitializer(() => {\n if (isPlatformServer(inject(PLATFORM_ID))) {\n return;\n }\n\n Dialog._setService(inject(NgxDialogService));\n }),\n ]);\n}\n","import {\n DestroyRef,\n Directive,\n ElementRef,\n HostListener,\n Renderer2,\n effect,\n inject,\n} from '@angular/core';\nimport { DIALOG_REF } from '../tokens/dialog.tokens';\n\n/**\n * Why this can't be pure CSS flexbox: the header/body/footer elements are\n * *grandchildren* of the dialog panel (panel -> `*ngComponentOutlet`'s host\n * element -> header/body/footer), not direct children, because the content\n * component that hosts them is arbitrary and we don't control its own host\n * styling. `display:flex;flex-direction:column` on the panel therefore can't\n * size the body against the header/footer through that extra layer, so we\n * measure and set an explicit `max-height` instead, driven by a\n * `ResizeObserver` on the panel (not a `window:resize` listener, so it also\n * reacts to the dialog itself changing size, e.g. via `config.size`).\n */\n@Directive({\n selector: 'ngx-dialog-body,[ngxDialogBody]',\n standalone: true,\n host: { class: 'dialog-body' },\n exportAs: 'ngxDialogBody',\n})\nexport class NgxDialogBody {\n private readonly el = inject(ElementRef<HTMLElement>);\n private readonly renderer = inject(Renderer2);\n private readonly dialogRef = inject(DIALOG_REF);\n private readonly destroyRef = inject(DestroyRef);\n\n constructor() {\n this.dialogRef._setBodyElement(this.el.nativeElement);\n this.destroyRef.onDestroy(() => this.dialogRef._setBodyElement(null));\n effect((onCleanup) => {\n const panel = this.dialogRef.panelEl();\n if (!panel || typeof ResizeObserver === 'undefined') {\n return;\n }\n const recompute = (): void => this.recomputeHeight(panel);\n\n const observer = new ResizeObserver(recompute);\n observer.observe(panel);\n recompute();\n onCleanup(() => observer.disconnect());\n });\n }\n\n private recomputeHeight(panel: HTMLElement): void {\n const headerHeight = this.dialogRef.headerEl()?.offsetHeight ?? 0;\n const footerHeight = this.dialogRef.footerEl()?.offsetHeight ?? 0;\n const panelHeight = Math.min(panel.clientHeight, window.innerHeight);\n const available = panelHeight - headerHeight - footerHeight;\n if (available > 0) {\n this.renderer.setStyle(this.el.nativeElement, 'height', `${available}px`);\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { NgxDialogBody } from './directives/body.directive';\nimport { NgxDialogFooter } from './directives/footer.directive';\nimport { NgxDialogHeader } from './directives/header.directive';\nimport { NgxDialogComponent } from './components/ngx-dialog.component';\nimport { NgxDialogService } from './services/ngx-dialog.service';\n\n@NgModule({\n declarations: [],\n imports: [NgxDialogComponent, NgxDialogHeader, NgxDialogFooter, NgxDialogBody],\n exports: [NgxDialogComponent, NgxDialogHeader, NgxDialogFooter, NgxDialogBody],\n providers: [NgxDialogService],\n})\nexport class NgxDialogModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAIA,IAAI,QAAQ,GAAG,CAAC;AAChB,SAAS,YAAY,GAAA;IACnB,QAAQ,IAAI,CAAC;AACb,IAAA,OAAO,CAAA,WAAA,EAAc,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA,CAAA,EAAI,QAAQ,EAAE;AAC5D;MAEa,YAAY,CAAA;IACd,EAAE,GAAG,YAAY,EAAE;;IAGnB,OAAO,GAAG,MAAM,CAAC,KAAK;gFAAC;;IAEvB,MAAM,GAAG,MAAM,CAAC,KAAK;+EAAC;AAEd,IAAA,YAAY,GAAG,IAAI,OAAO,EAAiB;;AAEnD,IAAA,WAAW,GAA8B,IAAI,CAAC,YA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,CAJhB,kBAAkB,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,CAAA,EAAA,OAAA,EAAA,CACnE,kBAAkB,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,CAAA,EAAA,CAAA;wGAGlE,eAAe,EAAA,SAAA,EAFf,CAAC,gBAAgB,CAAC,EAAA,CAAA;;2FAElB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAN3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,EAAE;oBAChB,OAAO,EAAE,CAAC,kBAAkB,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,CAAC;oBAC9E,OAAO,EAAE,CAAC,kBAAkB,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,CAAC;oBAC9E,SAAS,EAAE,CAAC,gBAAgB,CAAC;AAC9B,iBAAA;;;ACZD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-kit",
3
- "version": "8.3.4",
3
+ "version": "8.3.6",
4
4
  "description": "Angular input components",
5
5
  "author": "Mohammadreza Samani <mr.samani1368@gmail.com>",
6
6
  "license": "MIT",
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { OnInit, OnDestroy, EventEmitter, ElementRef, ChangeDetectorRef, InjectionToken, ComponentRef, TemplateRef, Injector, Type, ViewContainerRef, ApplicationRef, EmbeddedViewRef } from '@angular/core';
2
+ import { OnInit, OnDestroy, EventEmitter, ElementRef, ChangeDetectorRef, InjectionToken, ComponentRef, TemplateRef, Injector, EnvironmentInjector, Type, ViewContainerRef, ApplicationRef, EmbeddedViewRef } from '@angular/core';
3
3
  import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors, FormControl } from '@angular/forms';
4
4
 
5
5
  interface IValue {
@@ -368,13 +368,16 @@ interface BaseOverlayOptions<T = any> {
368
368
  */
369
369
  usePopover?: boolean;
370
370
  /**
371
- * Parent injector used when creating the overlay's component. Lets callers
372
- * (e.g. a dialog service) provide their own tokens - such as data or a
373
- * reference back to the overlay - to the created component and everything
374
- * it projects. Defaults to the injector of `viewContainerRef` (or, when
375
- * `viewContainerRef` is omitted, the root environment injector).
371
+ * Element injector used when creating the overlay's component. Lets callers
372
+ * provide per-overlay tokens such as data or a reference back to the overlay.
373
+ * Environment-level dependencies are resolved from `environmentInjector`.
376
374
  */
377
375
  injector?: Injector;
376
+ /**
377
+ * Environment used to resolve dependencies for the overlay component and
378
+ * its content. Defaults to the environment where OverlayService was created.
379
+ */
380
+ environmentInjector?: EnvironmentInjector;
378
381
  /** Close this overlay when Escape is pressed while it's the topmost overlay. Default: true. */
379
382
  closeOnEscape?: boolean;
380
383
  /** Close this overlay on a click outside its panel and anchor. Default: true. */