@ngstarter-ui/components 21.0.50 → 21.0.51

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.
@@ -3423,9 +3423,31 @@
3423
3423
  "docsPath": "/components/dialog",
3424
3424
  "docsOverviewSource": "projects/docs/src/app/components/dialog/overview/overview.html",
3425
3425
  "purpose": "Open custom focused modal workflows above the current page.",
3426
- "useWhen": "Use Dialog.open(ComponentOrTemplate, config) for forms, editing records, creating objects, settings, detail views, wizard-like steps, scrollable content, and custom modal workflows where users must complete or close the task before returning to the page. Structure custom dialog components with ngs-dialog-title, ngs-dialog-content, ngs-dialog-actions, DialogRef.close(...), ngs-dialog-close, and optional DIALOG_DATA. Use DialogConfig for data, sizing, disableClose, autofocus, backdrop, panel classes, and accessibility labels. Do not use for a short binary destructive confirmation; use Confirm. Do not use for global messages; use Announcement, Alert, or SnackBar. Do not use for mobile bottom action panels; use BottomSheet. Do not use for side inspectors, filters, or detail panels; use Drawer or SidePanel.",
3426
+ "useWhen": "Use Dialog.open(ComponentOrTemplate, config) for forms, editing records, creating objects, settings, detail views, wizard-like steps, scrollable content, and custom modal workflows where users must complete or close the task before returning to the page. Structure custom dialog components with ngs-dialog-title, ngs-dialog-content, ngs-dialog-actions, DialogRef.close(...), ngs-dialog-close, and optional DIALOG_DATA. Use DialogConfig for data, sizing, disableClose, autofocus, backdrop, panel classes, accessibility labels, and showCloseButton when the dialog should render the built-in icon close button. Do not use for a short binary destructive confirmation; use Confirm. Do not use for global messages; use Announcement, Alert, or SnackBar. Do not use for mobile bottom action panels; use BottomSheet. Do not use for side inspectors, filters, or detail panels; use Drawer or SidePanel.",
3427
+ "configOptions": [
3428
+ "data",
3429
+ "width",
3430
+ "height",
3431
+ "minWidth",
3432
+ "minHeight",
3433
+ "maxWidth",
3434
+ "maxHeight",
3435
+ "hasBackdrop",
3436
+ "backdropClass",
3437
+ "panelClass",
3438
+ "disableClose",
3439
+ "autoFocus",
3440
+ "restoreFocus",
3441
+ "ariaDescribedBy",
3442
+ "ariaLabelledBy",
3443
+ "ariaLabel",
3444
+ "role",
3445
+ "closeOnNavigation",
3446
+ "showCloseButton"
3447
+ ],
3427
3448
  "exampleTopics": [
3428
3449
  "Basic Dialog",
3450
+ "Dialog Close",
3429
3451
  "Dialog With Scrollable Content",
3430
3452
  "Dialog Sizing (height, min-height)",
3431
3453
  "Dialog scrollable content",
@@ -3447,10 +3469,10 @@
3447
3469
  "source": "<ngs-form-field class=\"w-1/2\">\n <ngs-label>What's your name?</ngs-label>\n <input ngsInput [(ngModel)]=\"name\">\n</ngs-form-field>\n<div>\n <button ngsButton=\"outlined\" (click)=\"openDialog()\">Pick one</button>\n</div>\n@if (animal) {\n <p>You chose: <em>{{ animal }}</em></p>\n}"
3448
3470
  },
3449
3471
  {
3450
- "name": "dialog-scrollable-content",
3451
- "title": "Dialog scrollable content",
3452
- "file": "projects/docs/src/app/components/dialog/_examples/dialog-scrollable-content/dialog-scrollable-content.dialog.html",
3453
- "source": "<h3 ngs-dialog-title>Install Angular</h3>\n<ngs-dialog-content class=\"prose dark:prose-invert max-w-full\">\n <h2>Develop across all platforms</h2>\n <p>Learn one way to build applications with Angular and reuse your code and abilities to build\n apps for any deployment target. For web, mobile web, native mobile and native desktop.</p>\n <h2>Speed &amp; Performance</h2>\n <p>Achieve the maximum speed possible on the Web Platform today, and take it further, via Web\n Workers and server-side rendering. Angular puts you in control over scalability. Meet huge\n data requirements by building data models on RxJS, Immutable.js or another push-model.</p>\n <h3>Incredible tooling</h3>\n <p>Build features quickly with simple, declarative templates. Extend the template language with\n your own components and use a wide array of existing components. Get immediate Angular-specific\n help and feedback with nearly every IDE and editor. All this comes together so you can focus\n on building amazing apps rather than trying to make the code work.</p>\n <h3>Loved by millions</h3>\n <p>From prototype through global deployment, Angular delivers the productivity and scalable\n infrastructure that supports Google's largest applications.</p>\n <h3>What is Angular?</h3>\n <p>Angular is a platform that makes it easy to build applications with the web. Angular\n combines declarative templates, dependency injection, end to end tooling, and integrated\n best practices to solve development challenges. Angular empowers developers to build\n applications that live on the web, mobile, or\n..."
3472
+ "name": "dialog-close-example",
3473
+ "title": "Dialog close",
3474
+ "file": "projects/docs/src/app/components/dialog/_examples/dialog-close-example/dialog-close-example.html",
3475
+ "source": "<button ngsButton=\"filled\" (click)=\"openDialog()\">Open close dialog</button>\n@if (result()) {\n <p class=\"mt-3\">Result: {{ result() }}</p>\n}\n<ng-template #closeDialog>\n <h3 ngs-dialog-title>Close dialog</h3>\n <ngs-dialog-content>\n <p>\n This dialog enables the built-in close button through <code>showCloseButton</code>. Action\n buttons can still use <code>ngs-dialog-close</code> to close the current dialog and optionally\n return a result to the opener.\n </p>\n </ngs-dialog-content>\n <ngs-dialog-actions align=\"end\">\n <button ngsButton ngs-dialog-close>Cancel</button>\n <button ngsButton=\"filled\" [ngs-dialog-close]=\"'Saved changes'\">Save</button>\n </ngs-dialog-actions>\n</ng-template>"
3454
3476
  }
3455
3477
  ],
3456
3478
  "previewAsset": "projects/components/dialog/preview.svg",
@@ -3466,6 +3488,7 @@
3466
3488
  "ngs-dialog-actions",
3467
3489
  "ngs-dialog-container",
3468
3490
  "ngs-dialog-content",
3491
+ "ngs-dialog-header",
3469
3492
  "ngs-dialog-title"
3470
3493
  ],
3471
3494
  "exportedSymbols": [
@@ -3477,6 +3500,7 @@
3477
3500
  "DialogConfig",
3478
3501
  "DialogContainer",
3479
3502
  "DialogContent",
3503
+ "DialogHeader",
3480
3504
  "DialogRef",
3481
3505
  "DialogTitle"
3482
3506
  ],
@@ -4413,6 +4437,7 @@
4413
4437
  "ngs-form-builder",
4414
4438
  "ngs-form-builder-field-host",
4415
4439
  "ngs-form-builder-settings-host",
4440
+ "ngs-form-logic",
4416
4441
  "ngs-form-renderer"
4417
4442
  ],
4418
4443
  "exportedSymbols": [
@@ -4464,6 +4489,7 @@
4464
4489
  "FormBuilderUploadCallback",
4465
4490
  "FormBuilderUploadContext",
4466
4491
  "FormBuilderValidationRule",
4492
+ "FormLogic",
4467
4493
  "FormRenderer",
4468
4494
  "provideFormBuilder",
4469
4495
  "provideFormBuilderField",
@@ -4476,6 +4502,7 @@
4476
4502
  "canvasDropPlaceholderDelay",
4477
4503
  "control",
4478
4504
  "definitions",
4505
+ "description",
4479
4506
  "editableCanvas",
4480
4507
  "field",
4481
4508
  "inspectorTitle",
@@ -4486,6 +4513,7 @@
4486
4513
  "settingsDefinitions",
4487
4514
  "showSubmit",
4488
4515
  "submitLabel",
4516
+ "title",
4489
4517
  "uploadCallback"
4490
4518
  ],
4491
4519
  "outputs": [
@@ -9292,6 +9320,7 @@
9292
9320
  "useWhen": "Use ngs-stepper with ngs-step when users must move through related steps and see their current progress. Good for onboarding, checkout, setup, import/export flows, account or tenant creation, review flows, and multi-step forms. Use linear mode with stepControl when each step must be valid before the user continues. Use ngsStepperNext and ngsStepperPrevious on NgStarter buttons for standard wizard navigation, ngsStepLabel or label for step labels, optional/completed/error states for step status, and horizontal or vertical orientation for responsive layouts. Do not use Stepper when you only need step state and validation logic without the default visual UI; use HeadlessStepper. Do not use for independent page sections; use Tabs or ExpansionPanel. Do not use for app route navigation; use Navigation, Breadcrumbs, Sidebar, or routing. Do not use for showing only a percentage; use ProgressBar. Do not use for product tours over existing UI; use GuidedTour.",
9293
9321
  "exampleTopics": [
9294
9322
  "Basic Stepper",
9323
+ "Stepper In Dialog",
9295
9324
  "Stepper Vertical",
9296
9325
  "Stepper Header Position",
9297
9326
  "Stepper That Displays Errors In The Steps",
@@ -9314,10 +9343,10 @@
9314
9343
  "source": "<ngs-stepper headerPosition=\"bottom\" #stepper>\n <ngs-step [stepControl]=\"firstFormGroup\">\n <form [formGroup]=\"firstFormGroup\">\n <ng-template ngsStepLabel>Fill out your name</ng-template>\n <ngs-form-field class=\"w-1/2\">\n <input ngsInput placeholder=\"Last name, First name\" formControlName=\"firstCtrl\" required>\n </ngs-form-field>\n <div>\n <button ngsButton=\"filled\" ngsStepperNext>Next</button>\n </div>\n </form>\n </ngs-step>\n <ngs-step [stepControl]=\"secondFormGroup\" optional>\n <form [formGroup]=\"secondFormGroup\">\n <ng-template ngsStepLabel>Fill out your address</ng-template>\n <ngs-form-field class=\"w-1/2\">\n <input ngsInput placeholder=\"Address\" formControlName=\"secondCtrl\" required>\n </ngs-form-field>\n <div class=\"flex gap-3\">\n <button ngsButton=\"outlined\" ngsStepperPrevious>Back</button>\n <button ngsButton=\"filled\" ngsStepperNext>Next</button>\n </div>\n </form>\n </ngs-step>\n <ngs-step>\n <ng-template ngsStepLabel>Done</ng-template>\n You are now done.\n <div class=\"flex gap-3\">\n <button ngsButton=\"outlined\" ngsStepperPrevious>Back</button>\n <button ngsButton=\"filled\" (click)=\"stepper.reset()\">Reset</button>\n </div>\n </ngs-step>\n</ngs-stepper>"
9315
9344
  },
9316
9345
  {
9317
- "name": "stepper-label-bottom-position-example",
9318
- "title": "Stepper label bottom position",
9319
- "file": "projects/docs/src/app/components/stepper/_examples/stepper-label-bottom-position-example/stepper-label-bottom-position-example.html",
9320
- "source": "<ngs-stepper labelPosition=\"bottom\" #stepper>\n <ngs-step [stepControl]=\"firstFormGroup\">\n <form [formGroup]=\"firstFormGroup\">\n <ng-template ngsStepLabel>Fill out your name</ng-template>\n <ngs-form-field class=\"w-1/2 mt-2\">\n <ngs-label>Name</ngs-label>\n <input ngsInput placeholder=\"Last name, First name\" formControlName=\"firstCtrl\" required>\n </ngs-form-field>\n <div>\n <button ngsButton=\"filled\" ngsStepperNext>Next</button>\n </div>\n </form>\n </ngs-step>\n <ngs-step [stepControl]=\"secondFormGroup\" optional>\n <form [formGroup]=\"secondFormGroup\">\n <ng-template ngsStepLabel>Fill out your address</ng-template>\n <ngs-form-field class=\"w-1/2 mt-2\">\n <ngs-label>Address</ngs-label>\n <input ngsInput formControlName=\"secondCtrl\" placeholder=\"Ex. 1 Main St, New York, NY\"\n required>\n </ngs-form-field>\n <div class=\"flex gap-3\">\n <button ngsButton=\"outlined\" ngsStepperPrevious>Back</button>\n <button ngsButton=\"filled\" ngsStepperNext>Next</button>\n </div>\n </form>\n </ngs-step>\n <ngs-step>\n <ng-template ngsStepLabel>Done</ng-template>\n <p>You are now done.</p>\n <div class=\"flex gap-3\">\n <button ngsButton=\"outlined\" ngsStepperPrevious>Back</button>\n <button ngsButton=\"filled\" (click)=\"stepper.reset()\">Reset</button>\n </div>\n </ngs-step>\n</ngs-stepper>"
9346
+ "name": "stepper-in-dialog-example",
9347
+ "title": "Stepper in dialog",
9348
+ "file": "projects/docs/src/app/components/stepper/_examples/stepper-in-dialog-example/stepper-in-dialog-example.html",
9349
+ "source": "<button ngsButton=\"filled\" (click)=\"openDialog()\">Open setup dialog</button>\n@if (result()) {\n <p class=\"mt-3\">Result: {{ result() }}</p>\n}\n<ng-template #setupDialog>\n <h3 ngs-dialog-title>Workspace setup</h3>\n <ngs-dialog-content>\n <ngs-stepper linear #stepper>\n <ngs-step [stepControl]=\"workspaceForm\">\n <ng-template ngsStepLabel>Workspace</ng-template>\n <form [formGroup]=\"workspaceForm\" class=\"grid gap-4 md:grid-cols-2\">\n <ngs-form-field>\n <ngs-label>Workspace name</ngs-label>\n <input\n ngsInput\n formControlName=\"workspaceName\"\n placeholder=\"Atlas Operations\"\n required\n />\n </ngs-form-field>\n <ngs-form-field>\n <ngs-label>Workspace slug</ngs-label>\n <input ngsInput formControlName=\"slug\" placeholder=\"atlas-ops\" required />\n </ngs-form-field>\n <ngs-form-field>\n <ngs-label>Region</ngs-label>\n <input ngsInput formControlName=\"region\" placeholder=\"Europe / Warsaw\" required />\n </ngs-form-field>\n <ngs-form-field>\n <ngs-label>Owner</ngs-label>\n <input ngsInput formControlName=\"owner\" placeholder=\"Maya Chen\" required />\n </ngs-form-field>\n <ngs-form-field class=\"md:col-span-2\">\n <ngs-label>Description</ngs-label>\n <textarea\n ngsInput\n formControlName=\"description\"\n placeholder=\"Describe what this workspace is used for\"\n rows=\"4\"\n required\n..."
9321
9350
  }
9322
9351
  ],
9323
9352
  "previewAsset": "projects/components/stepper/preview.svg",
@@ -9341,11 +9370,11 @@
9341
9370
  ],
9342
9371
  "outputs": [],
9343
9372
  "cssTokens": [
9373
+ "--ngs-color-border",
9344
9374
  "--ngs-color-on-primary",
9345
9375
  "--ngs-color-on-success",
9346
9376
  "--ngs-color-on-surface",
9347
9377
  "--ngs-color-on-surface-variant",
9348
- "--ngs-color-outline-variant",
9349
9378
  "--ngs-color-primary",
9350
9379
  "--ngs-color-success",
9351
9380
  "--ngs-color-surface-container-high",
@@ -28,7 +28,7 @@ class Confirm {
28
28
  title = signal(this._data.title, ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
29
29
  description = signal(this._data.description, ...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
30
30
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: Confirm, deps: [], target: i0.ɵɵFactoryTarget.Component });
31
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: Confirm, isStandalone: true, selector: "ngs-confirm", host: { classAttribute: "ngs-confirm" }, exportAs: ["ngsConfirm"], ngImport: i0, template: "<h3 ngs-dialog-title>{{ title() }}</h3>\n<ngs-dialog-content>\n {{ description() }}\n</ngs-dialog-content>\n<ngs-dialog-actions align=\"end\">\n <button ngsButton [ngs-dialog-close]=\"false\">Cancel</button>\n <button ngsButton=\"filled\" [ngs-dialog-close]=\"true\">Confirm</button>\n</ngs-dialog-actions>\n", styles: [":host{display:block;width:500px}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: Button, selector: " button[ngsButton], button[ngsIconButton], a[ngsButton], a[ngsIconButton] ", inputs: ["ngsButton", "ngsIconButton", "loading", "disabled", "disabledInteractive", "disableRipple", "reverse", "fullWidth", "hideTextOnMobile"], exportAs: ["ngsButton"] }, { kind: "directive", type: DialogClose, selector: "[ngs-dialog-close], [ngsDialogClose]", inputs: ["ngs-dialog-close", "ngsDialogClose", "ariaLabel", "type"], exportAs: ["ngsDialogClose"] }, { kind: "component", type: DialogActions, selector: "ngs-dialog-actions, [ngs-dialog-actions], [ngsDialogActions]", inputs: ["align"] }, { kind: "component", type: DialogContent, selector: "ngs-dialog-content,[ngs-dialog-content],[ngsDialogContent]" }, { kind: "component", type: DialogTitle, selector: "ngs-dialog-title, [ngs-dialog-title], [ngsDialogTitle]", inputs: ["id"], exportAs: ["ngsDialogTitle"] }] });
31
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: Confirm, isStandalone: true, selector: "ngs-confirm", host: { classAttribute: "ngs-confirm" }, exportAs: ["ngsConfirm"], ngImport: i0, template: "<h3 ngs-dialog-title>{{ title() }}</h3>\n<ngs-dialog-content>\n {{ description() }}\n</ngs-dialog-content>\n<ngs-dialog-actions align=\"end\">\n <button ngsButton [ngs-dialog-close]=\"false\">Cancel</button>\n <button ngsButton=\"filled\" [ngs-dialog-close]=\"true\">Confirm</button>\n</ngs-dialog-actions>\n", styles: [":host{display:block;width:500px}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: Button, selector: " button[ngsButton], button[ngsIconButton], a[ngsButton], a[ngsIconButton] ", inputs: ["ngsButton", "ngsIconButton", "loading", "disabled", "disabledInteractive", "disableRipple", "reverse", "fullWidth", "hideTextOnMobile"], exportAs: ["ngsButton"] }, { kind: "directive", type: DialogClose, selector: "[ngs-dialog-close],[ngsDialogClose]", inputs: ["ngs-dialog-close", "ngsDialogClose", "ariaLabel", "type"], exportAs: ["ngsDialogClose"] }, { kind: "component", type: DialogActions, selector: "ngs-dialog-actions, [ngs-dialog-actions], [ngsDialogActions]", inputs: ["align"] }, { kind: "component", type: DialogContent, selector: "ngs-dialog-content,[ngs-dialog-content],[ngsDialogContent]" }, { kind: "component", type: DialogTitle, selector: "ngs-dialog-title, [ngs-dialog-title], [ngsDialogTitle]", inputs: ["id"], exportAs: ["ngsDialogTitle"] }] });
32
32
  }
33
33
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: Confirm, decorators: [{
34
34
  type: Component,
@@ -1 +1 @@
1
- {"version":3,"file":"ngstarter-ui-components-confirm.mjs","sources":["../../../projects/components/confirm/src/confirm-ref.ts","../../../projects/components/confirm/src/confirm/confirm.ts","../../../projects/components/confirm/src/confirm/confirm.html","../../../projects/components/confirm/src/confirm-manager.ts","../../../projects/components/confirm/ngstarter-ui-components-confirm.ts"],"sourcesContent":["import { EventEmitter } from '@angular/core';\n\nexport class ConfirmRef {\n readonly canceled = new EventEmitter();\n readonly confirmed = new EventEmitter();\n readonly closed = new EventEmitter();\n\n close(): void {\n this.closed.emit();\n }\n\n cancel(): void {\n this.canceled.emit();\n this.close();\n }\n\n confirm(): void {\n this.confirmed.emit();\n this.close();\n }\n}\n","import { Component, inject, signal } from '@angular/core';\nimport { DIALOG_DATA } from '@angular/cdk/dialog';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { Button } from '@ngstarter-ui/components/button';\nimport { DialogActions, DialogClose, DialogContent, DialogTitle } from '@ngstarter-ui/components/dialog';\n\n@Component({\n selector: 'ngs-confirm',\n exportAs: 'ngsConfirm',\n imports: [\n ReactiveFormsModule,\n Button,\n DialogClose,\n DialogActions,\n DialogContent,\n DialogTitle\n ],\n templateUrl: './confirm.html',\n styleUrl: './confirm.scss',\n host: {\n 'class': 'ngs-confirm'\n }\n})\nexport class Confirm {\n private _data = inject(DIALOG_DATA);\n\n title = signal(this._data.title);\n description = signal(this._data.description);\n}\n","<h3 ngs-dialog-title>{{ title() }}</h3>\n<ngs-dialog-content>\n {{ description() }}\n</ngs-dialog-content>\n<ngs-dialog-actions align=\"end\">\n <button ngsButton [ngs-dialog-close]=\"false\">Cancel</button>\n <button ngsButton=\"filled\" [ngs-dialog-close]=\"true\">Confirm</button>\n</ngs-dialog-actions>\n","import { DestroyRef, inject, Injectable } from '@angular/core';\nimport { ConfirmOptions } from './types';\nimport { ConfirmRef } from './confirm-ref';\nimport { Confirm } from './confirm/confirm';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { Dialog } from '@ngstarter-ui/components/dialog';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ConfirmManager {\n private _dialog = inject(Dialog);\n private _destroyRef = inject(DestroyRef);\n\n open(options: ConfirmOptions): ConfirmRef {\n const confirmRef = new ConfirmRef();\n const dialogRef = this._dialog.open(Confirm, {\n data: options,\n closeOnNavigation: true,\n disableClose: true\n });\n dialogRef\n .afterClosed()\n .pipe(takeUntilDestroyed(this._destroyRef))\n .subscribe((isConfirmed: boolean) => {\n if (isConfirmed) {\n confirmRef.confirm();\n } else {\n confirmRef.cancel();\n }\n });\n return confirmRef;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAEa,UAAU,CAAA;AACZ,IAAA,QAAQ,GAAG,IAAI,YAAY,EAAE;AAC7B,IAAA,SAAS,GAAG,IAAI,YAAY,EAAE;AAC9B,IAAA,MAAM,GAAG,IAAI,YAAY,EAAE;IAEpC,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;IACpB;IAEA,MAAM,GAAA;AACJ,QAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE;QACpB,IAAI,CAAC,KAAK,EAAE;IACd;IAEA,OAAO,GAAA;AACL,QAAA,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE;QACrB,IAAI,CAAC,KAAK,EAAE;IACd;AACD;;MCGY,OAAO,CAAA;AACV,IAAA,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC;IAEnC,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,E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cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAd,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,cAFb,MAAM,EAAA,CAAA;;2FAEP,cAAc,EAAA,UAAA,EAAA,CAAA;kBAH1B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACTD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngstarter-ui-components-confirm.mjs","sources":["../../../projects/components/confirm/src/confirm-ref.ts","../../../projects/components/confirm/src/confirm/confirm.ts","../../../projects/components/confirm/src/confirm/confirm.html","../../../projects/components/confirm/src/confirm-manager.ts","../../../projects/components/confirm/ngstarter-ui-components-confirm.ts"],"sourcesContent":["import { EventEmitter } from '@angular/core';\n\nexport class ConfirmRef {\n readonly canceled = new EventEmitter();\n readonly confirmed = new EventEmitter();\n readonly closed = new EventEmitter();\n\n close(): void {\n this.closed.emit();\n }\n\n cancel(): void {\n this.canceled.emit();\n this.close();\n }\n\n confirm(): void {\n this.confirmed.emit();\n this.close();\n }\n}\n","import { Component, inject, signal } from '@angular/core';\nimport { DIALOG_DATA } from '@angular/cdk/dialog';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { Button } from '@ngstarter-ui/components/button';\nimport { DialogActions, DialogClose, DialogContent, DialogTitle } from '@ngstarter-ui/components/dialog';\n\n@Component({\n selector: 'ngs-confirm',\n exportAs: 'ngsConfirm',\n imports: [\n ReactiveFormsModule,\n Button,\n DialogClose,\n DialogActions,\n DialogContent,\n DialogTitle\n ],\n templateUrl: './confirm.html',\n styleUrl: './confirm.scss',\n host: {\n 'class': 'ngs-confirm'\n }\n})\nexport class Confirm {\n private _data = inject(DIALOG_DATA);\n\n title = signal(this._data.title);\n description = signal(this._data.description);\n}\n","<h3 ngs-dialog-title>{{ title() }}</h3>\n<ngs-dialog-content>\n {{ description() }}\n</ngs-dialog-content>\n<ngs-dialog-actions align=\"end\">\n <button ngsButton [ngs-dialog-close]=\"false\">Cancel</button>\n <button ngsButton=\"filled\" [ngs-dialog-close]=\"true\">Confirm</button>\n</ngs-dialog-actions>\n","import { DestroyRef, inject, Injectable } from '@angular/core';\nimport { ConfirmOptions } from './types';\nimport { ConfirmRef } from './confirm-ref';\nimport { Confirm } from './confirm/confirm';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { Dialog } from '@ngstarter-ui/components/dialog';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ConfirmManager {\n private _dialog = inject(Dialog);\n private _destroyRef = inject(DestroyRef);\n\n open(options: ConfirmOptions): ConfirmRef {\n const confirmRef = new ConfirmRef();\n const dialogRef = this._dialog.open(Confirm, {\n data: options,\n closeOnNavigation: true,\n disableClose: true\n });\n dialogRef\n .afterClosed()\n .pipe(takeUntilDestroyed(this._destroyRef))\n .subscribe((isConfirmed: boolean) => {\n if (isConfirmed) {\n confirmRef.confirm();\n } else {\n confirmRef.cancel();\n }\n });\n return confirmRef;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAEa,UAAU,CAAA;AACZ,IAAA,QAAQ,GAAG,IAAI,YAAY,EAAE;AAC7B,IAAA,SAAS,GAAG,IAAI,YAAY,EAAE;AAC9B,IAAA,MAAM,GAAG,IAAI,YAAY,EAAE;IAEpC,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;IACpB;IAEA,MAAM,GAAA;AACJ,QAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE;QACpB,IAAI,CAAC,KAAK,EAAE;IACd;IAEA,OAAO,GAAA;AACL,QAAA,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE;QACrB,I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,aAAA,SAAS,CAAC,CAAC,WAAoB,KAAI;YAClC,IAAI,WAAW,EAAE;gBACf,UAAU,CAAC,OAAO,EAAE;YACtB;iBAAO;gBACL,UAAU,CAAC,MAAM,EAAE;YACrB;AACF,QAAA,CAAC,CAAC;AACJ,QAAA,OAAO,UAAU;IACnB;uGAtBW,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAd,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,cAFb,MAAM,EAAA,CAAA;;2FAEP,cAAc,EAAA,UAAA,EAAA,CAAA;kBAH1B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACTD;;AAEG;;;;"}
@@ -1,10 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, ChangeDetectorRef, viewChild, EventEmitter, Component, Injector, Injectable, input, Directive } from '@angular/core';
2
+ import { InjectionToken, inject, ChangeDetectorRef, EventEmitter, Component, Injector, Injectable, input, Directive } from '@angular/core';
3
3
  import { Subject, filter, take } from 'rxjs';
4
4
  import * as i1 from '@angular/cdk/dialog';
5
5
  import { CdkDialogContainer, DialogModule, Dialog as Dialog$1 } from '@angular/cdk/dialog';
6
6
  import { filter as filter$1, take as take$1 } from 'rxjs/operators';
7
- import { CdkPortalOutlet } from '@angular/cdk/portal';
7
+ import { Button } from '@ngstarter-ui/components/button';
8
+ import { Icon } from '@ngstarter-ui/components/icon';
8
9
 
9
10
  class DialogConfig {
10
11
  data = null;
@@ -25,6 +26,7 @@ class DialogConfig {
25
26
  ariaLabel = null;
26
27
  role = 'dialog';
27
28
  closeOnNavigation = true;
29
+ showCloseButton = false;
28
30
  }
29
31
  const DIALOG_DATA = new InjectionToken('DialogData');
30
32
  const DIALOG_DEFAULT_OPTIONS = new InjectionToken('DialogConfig');
@@ -110,7 +112,10 @@ class DialogRef {
110
112
 
111
113
  class DialogContainer extends CdkDialogContainer {
112
114
  _cdr = inject(ChangeDetectorRef);
113
- _portalOutlet = viewChild(CdkPortalOutlet);
115
+ _closeHandler;
116
+ get showCloseButton() {
117
+ return Boolean(this._config.showCloseButton);
118
+ }
114
119
  /** State of the dialog animation. */
115
120
  _animationState = 'void';
116
121
  /** Emits when an animation state changes. */
@@ -153,18 +158,28 @@ class DialogContainer extends CdkDialogContainer {
153
158
  this._animationState = 'exit';
154
159
  this._cdr.markForCheck();
155
160
  }
161
+ _setCloseHandler(handler) {
162
+ this._closeHandler = handler;
163
+ }
164
+ close() {
165
+ this._closeHandler?.();
166
+ }
156
167
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DialogContainer, deps: null, target: i0.ɵɵFactoryTarget.Component });
157
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.4", type: DialogContainer, isStandalone: true, selector: "ngs-dialog-container", host: { listeners: { "transitionend": "_onTransitionEnd($event)" }, properties: { "class.ngs-dialog-container-enter": "_animationState === \"enter\"", "class.ngs-dialog-container-exit": "_animationState === \"exit\"" }, classAttribute: "ngs-dialog-container" }, viewQueries: [{ propertyName: "_portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-template cdkPortalOutlet />\n", styles: [":host{background:var(--ngs-dialog-background, var(--ngs-dialog-bg));color:var(--ngs-dialog-color, var(--ngs-color-on-surface));border-radius:var(--ngs-dialog-border-radius, var(--ngs-dialog-radius));box-shadow:var(--ngs-dialog-box-shadow, var(--ngs-dialog-shadow));max-width:var(--ngs-dialog-container-max-width, 560px);min-width:var(--ngs-dialog-container-min-width, 280px);width:100%;height:100%;max-height:inherit;min-height:inherit;box-sizing:border-box;outline:0;overflow:hidden;margin:auto;opacity:0;transform:scale(.8);position:relative;display:flex;flex-direction:column}:host.ngs-dialog-container-enter{opacity:1;transform:scale(1);transition:opacity linear .15s,transform .2s cubic-bezier(0,0,.2,1)}:host.ngs-dialog-container-exit{opacity:0}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: DialogModule }, { kind: "directive", type: i1.ɵɵCdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }] });
168
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: DialogContainer, isStandalone: true, selector: "ngs-dialog-container", host: { listeners: { "transitionend": "_onTransitionEnd($event)" }, properties: { "class.ngs-dialog-container-enter": "_animationState === \"enter\"", "class.ngs-dialog-container-exit": "_animationState === \"exit\"" }, classAttribute: "ngs-dialog-container" }, exportAs: ["ngsDialogContainer"], usesInheritance: true, ngImport: i0, template: "@if (showCloseButton) {\n <span class=\"close\">\n <button type=\"button\" ngsIconButton aria-label=\"Close dialog\" (click)=\"close()\">\n <ngs-icon name=\"fluent:dismiss-24-regular\"/>\n </button>\n </span>\n}\n<ng-template cdkPortalOutlet />\n", styles: [":host{background:var(--ngs-dialog-background, var(--ngs-dialog-bg));color:var(--ngs-dialog-color, var(--ngs-color-on-surface));border-radius:var(--ngs-dialog-border-radius, var(--ngs-dialog-radius));box-shadow:var(--ngs-dialog-box-shadow, var(--ngs-dialog-shadow));max-width:var(--ngs-dialog-container-max-width, 560px);min-width:var(--ngs-dialog-container-min-width, 280px);width:100%;height:100%;max-height:inherit;min-height:inherit;box-sizing:border-box;outline:0;overflow:hidden;margin:auto;opacity:0;transform:scale(.8);position:relative;display:flex;flex-direction:column}:host.ngs-dialog-container-enter{opacity:1;transform:scale(1);transition:opacity linear .15s,transform .2s cubic-bezier(0,0,.2,1)}:host.ngs-dialog-container-exit{opacity:0}:host .close:empty{display:none}:host .close{position:absolute;right:calc(var(--spacing, .25rem) * 2);top:calc(var(--spacing, .25rem) * 2)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: DialogModule }, { kind: "directive", type: i1.ɵɵCdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "component", type: Button, selector: " button[ngsButton], button[ngsIconButton], a[ngsButton], a[ngsIconButton] ", inputs: ["ngsButton", "ngsIconButton", "loading", "disabled", "disabledInteractive", "disableRipple", "reverse", "fullWidth", "hideTextOnMobile"], exportAs: ["ngsButton"] }, { kind: "component", type: Icon, selector: "ngs-icon", inputs: ["name"], exportAs: ["ngsIcon"] }] });
158
169
  }
159
170
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DialogContainer, decorators: [{
160
171
  type: Component,
161
- args: [{ selector: 'ngs-dialog-container', imports: [DialogModule], host: {
172
+ args: [{ selector: 'ngs-dialog-container', exportAs: 'ngsDialogContainer', imports: [
173
+ DialogModule,
174
+ Button,
175
+ Icon,
176
+ ], host: {
162
177
  'class': 'ngs-dialog-container',
163
178
  '[class.ngs-dialog-container-enter]': '_animationState === "enter"',
164
179
  '[class.ngs-dialog-container-exit]': '_animationState === "exit"',
165
180
  '(transitionend)': '_onTransitionEnd($event)',
166
- }, template: "<ng-template cdkPortalOutlet />\n", styles: [":host{background:var(--ngs-dialog-background, var(--ngs-dialog-bg));color:var(--ngs-dialog-color, var(--ngs-color-on-surface));border-radius:var(--ngs-dialog-border-radius, var(--ngs-dialog-radius));box-shadow:var(--ngs-dialog-box-shadow, var(--ngs-dialog-shadow));max-width:var(--ngs-dialog-container-max-width, 560px);min-width:var(--ngs-dialog-container-min-width, 280px);width:100%;height:100%;max-height:inherit;min-height:inherit;box-sizing:border-box;outline:0;overflow:hidden;margin:auto;opacity:0;transform:scale(.8);position:relative;display:flex;flex-direction:column}:host.ngs-dialog-container-enter{opacity:1;transform:scale(1);transition:opacity linear .15s,transform .2s cubic-bezier(0,0,.2,1)}:host.ngs-dialog-container-exit{opacity:0}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] }]
167
- }], propDecorators: { _portalOutlet: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkPortalOutlet), { isSignal: true }] }] } });
181
+ }, template: "@if (showCloseButton) {\n <span class=\"close\">\n <button type=\"button\" ngsIconButton aria-label=\"Close dialog\" (click)=\"close()\">\n <ngs-icon name=\"fluent:dismiss-24-regular\"/>\n </button>\n </span>\n}\n<ng-template cdkPortalOutlet />\n", styles: [":host{background:var(--ngs-dialog-background, var(--ngs-dialog-bg));color:var(--ngs-dialog-color, var(--ngs-color-on-surface));border-radius:var(--ngs-dialog-border-radius, var(--ngs-dialog-radius));box-shadow:var(--ngs-dialog-box-shadow, var(--ngs-dialog-shadow));max-width:var(--ngs-dialog-container-max-width, 560px);min-width:var(--ngs-dialog-container-min-width, 280px);width:100%;height:100%;max-height:inherit;min-height:inherit;box-sizing:border-box;outline:0;overflow:hidden;margin:auto;opacity:0;transform:scale(.8);position:relative;display:flex;flex-direction:column}:host.ngs-dialog-container-enter{opacity:1;transform:scale(1);transition:opacity linear .15s,transform .2s cubic-bezier(0,0,.2,1)}:host.ngs-dialog-container-exit{opacity:0}:host .close:empty{display:none}:host .close{position:absolute;right:calc(var(--spacing, .25rem) * 2);top:calc(var(--spacing, .25rem) * 2)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] }]
182
+ }] });
168
183
 
169
184
  class Dialog {
170
185
  _cdkDialog = inject(Dialog$1);
@@ -200,6 +215,7 @@ class Dialog {
200
215
  dialogRef.disableClose = mergedConfig?.disableClose;
201
216
  dialogRef._cdkRef = cdkRef;
202
217
  if (container) {
218
+ container._setCloseHandler(() => dialogRef.close());
203
219
  container._animationStateChanged
204
220
  .pipe(filter$1((event) => event.phaseName === 'done' && event.toState === 'enter'), take$1(1))
205
221
  .subscribe(() => {
@@ -333,12 +349,12 @@ class DialogClose {
333
349
  }
334
350
  }
335
351
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DialogClose, deps: [], target: i0.ɵɵFactoryTarget.Directive });
336
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.4", type: DialogClose, isStandalone: true, selector: "[ngs-dialog-close], [ngsDialogClose]", inputs: { dialogResult: { classPropertyName: "dialogResult", publicName: "ngs-dialog-close", isSignal: true, isRequired: false, transformFunction: null }, _dialogResult: { classPropertyName: "_dialogResult", publicName: "ngsDialogClose", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "_onClick()" }, properties: { "attr.aria-label": "ariaLabel() || null", "attr.type": "type()" } }, exportAs: ["ngsDialogClose"], ngImport: i0 });
352
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.4", type: DialogClose, isStandalone: true, selector: "[ngs-dialog-close],[ngsDialogClose]", inputs: { dialogResult: { classPropertyName: "dialogResult", publicName: "ngs-dialog-close", isSignal: true, isRequired: false, transformFunction: null }, _dialogResult: { classPropertyName: "_dialogResult", publicName: "ngsDialogClose", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "_onClick()" }, properties: { "attr.aria-label": "ariaLabel() || null", "attr.type": "type()" } }, exportAs: ["ngsDialogClose"], ngImport: i0 });
337
353
  }
338
354
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DialogClose, decorators: [{
339
355
  type: Directive,
340
356
  args: [{
341
- selector: '[ngs-dialog-close], [ngsDialogClose]',
357
+ selector: '[ngs-dialog-close],[ngsDialogClose]',
342
358
  exportAs: 'ngsDialogClose',
343
359
  host: {
344
360
  '[attr.aria-label]': 'ariaLabel() || null',
@@ -348,9 +364,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
348
364
  }]
349
365
  }], propDecorators: { dialogResult: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngs-dialog-close", required: false }] }], _dialogResult: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngsDialogClose", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }] } });
350
366
 
367
+ class DialogHeader {
368
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DialogHeader, deps: [], target: i0.ɵɵFactoryTarget.Component });
369
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: DialogHeader, isStandalone: true, selector: "ngs-dialog-header", host: { classAttribute: "ngs-dialog-header" }, exportAs: ["ngsDialogHeader"], ngImport: i0, template: "<ng-content/>\n", styles: [":host{display:block;flex:none;padding:var(--ngs-dialog-header-padding)}\n"] });
370
+ }
371
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DialogHeader, decorators: [{
372
+ type: Component,
373
+ args: [{ selector: 'ngs-dialog-header', exportAs: 'ngsDialogHeader', imports: [], host: {
374
+ 'class': 'ngs-dialog-header',
375
+ }, template: "<ng-content/>\n", styles: [":host{display:block;flex:none;padding:var(--ngs-dialog-header-padding)}\n"] }]
376
+ }] });
377
+
351
378
  /**
352
379
  * Generated bundle index. Do not edit.
353
380
  */
354
381
 
355
- export { DIALOG_DATA, DIALOG_DEFAULT_OPTIONS, Dialog, DialogActions, DialogClose, DialogConfig, DialogContainer, DialogContent, DialogRef, DialogTitle };
382
+ export { DIALOG_DATA, DIALOG_DEFAULT_OPTIONS, Dialog, DialogActions, DialogClose, DialogConfig, DialogContainer, DialogContent, DialogHeader, DialogRef, DialogTitle };
356
383
  //# sourceMappingURL=ngstarter-ui-components-dialog.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngstarter-ui-components-dialog.mjs","sources":["../../../projects/components/dialog/src/dialog-config.ts","../../../projects/components/dialog/src/dialog-ref.ts","../../../projects/components/dialog/src/dialog-container/dialog-container.ts","../../../projects/components/dialog/src/dialog-container/dialog-container.html","../../../projects/components/dialog/src/dialog.service.ts","../../../projects/components/dialog/src/dialog-title/dialog-title.ts","../../../projects/components/dialog/src/dialog-content/dialog-content.ts","../../../projects/components/dialog/src/dialog-actions/dialog-actions.ts","../../../projects/components/dialog/src/dialog-close.ts","../../../projects/components/dialog/ngstarter-ui-components-dialog.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport class DialogConfig<D = any> {\n data?: D | null = null;\n width?: string = '';\n height?: string = '';\n minWidth?: string | number;\n minHeight?: string | number;\n maxWidth?: string | number;\n maxHeight?: string | number;\n hasBackdrop?: boolean = true;\n backdropClass?: string | string[] = 'ngs-dialog-backdrop';\n panelClass?: string | string[] = '';\n disableClose?: boolean = false;\n autoFocus?: boolean | string = 'first-tabbable';\n restoreFocus?: boolean = true;\n ariaDescribedBy?: string | null = null;\n ariaLabelledBy?: string | null = null;\n ariaLabel?: string | null = null;\n role?: 'dialog' | 'alertdialog' = 'dialog';\n closeOnNavigation?: boolean = true;\n}\n\nexport const DIALOG_DATA = new InjectionToken<any>('DialogData');\nexport const DIALOG_DEFAULT_OPTIONS = new InjectionToken<DialogConfig>('DialogConfig');\n","import { Subject, Observable, filter, take } from 'rxjs';\nimport { DialogContainer } from './dialog-container/dialog-container';\n\nexport class DialogRef<T, R = any> {\n private readonly _afterClosed = new Subject<R | undefined>();\n private readonly _afterOpened = new Subject<void>();\n private readonly _backdropClick = new Subject<MouseEvent>();\n private readonly _keydownEvents = new Subject<KeyboardEvent>();\n\n componentInstance: T | null = null;\n disableClose: boolean | undefined;\n\n /** @internal */\n _cdkRef: any;\n\n /** @internal */\n _container: DialogContainer | undefined;\n\n private _isClosing = false;\n\n close(dialogResult?: R): void {\n if (this._isClosing) {\n return;\n }\n\n this._isClosing = true;\n\n if (this._container && this._cdkRef) {\n\n // Start exit animation for the container\n this._container._startExitAnimation();\n\n // Start exit animation for the backdrop\n const overlayRef = this._cdkRef.overlayRef;\n const backdropElement = overlayRef.backdropElement;\n if (backdropElement) {\n // Remove both classes that could be forcing opacity: 1\n backdropElement.classList.remove('ngs-dialog-backdrop-showing');\n backdropElement.classList.remove('cdk-overlay-backdrop-showing');\n }\n\n // Wait for the container animation to finish before destroying the overlay\n this._container._animationStateChanged\n .pipe(\n filter((event: any) => event.phaseName === 'done' && event.toState === 'exit'),\n take(1)\n )\n .subscribe(() => {\n this._finishClose(dialogResult);\n });\n\n // Fallback in case transitionend never fires (e.g. if opacity was already 0 or style didn't apply)\n setTimeout(() => {\n if (this._isClosing && this._cdkRef) {\n this._finishClose(dialogResult);\n }\n }, 250);\n\n return;\n }\n this._finishClose(dialogResult);\n }\n\n private _finishClose(dialogResult?: R): void {\n if (this._cdkRef) {\n const cdkRef = this._cdkRef;\n this._cdkRef = null;\n cdkRef.close(dialogResult);\n }\n this._afterClosed.next(dialogResult);\n this._afterClosed.complete();\n this._afterOpened.complete();\n this._backdropClick.complete();\n this._keydownEvents.complete();\n }\n\n afterClosed(): Observable<R | undefined> {\n return this._afterClosed.asObservable();\n }\n\n afterOpened(): Observable<void> {\n return this._afterOpened.asObservable();\n }\n\n backdropClick(): Observable<MouseEvent> {\n return this._backdropClick.asObservable();\n }\n\n keydownEvents(): Observable<KeyboardEvent> {\n return this._keydownEvents.asObservable();\n }\n\n __fireAfterOpened(): void {\n this._afterOpened.next();\n }\n\n __fireBackdropClick(event: MouseEvent): void {\n this._backdropClick.next(event);\n }\n\n __fireKeydownEvent(event: KeyboardEvent): void {\n this._keydownEvents.next(event);\n }\n}\n","import { ChangeDetectorRef, Component, EventEmitter, inject, viewChild, ElementRef, OnInit } from '@angular/core';\nimport { CdkDialogContainer, DialogModule } from '@angular/cdk/dialog';\nimport { CdkPortalOutlet } from '@angular/cdk/portal';\n\n@Component({\n selector: 'ngs-dialog-container',\n imports: [DialogModule],\n templateUrl: './dialog-container.html',\n styleUrls: ['./dialog-container.scss'],\n host: {\n 'class': 'ngs-dialog-container',\n '[class.ngs-dialog-container-enter]': '_animationState === \"enter\"',\n '[class.ngs-dialog-container-exit]': '_animationState === \"exit\"',\n '(transitionend)': '_onTransitionEnd($event)',\n },\n})\nexport class DialogContainer extends CdkDialogContainer implements OnInit {\n private readonly _cdr = inject(ChangeDetectorRef);\n\n override readonly _portalOutlet = viewChild(CdkPortalOutlet) as any;\n\n /** State of the dialog animation. */\n _animationState: 'void' | 'enter' | 'exit' = 'void';\n\n /** Emits when an animation state changes. */\n _animationStateChanged = new EventEmitter<any>();\n\n ngOnInit() {\n const config = this._config;\n if (config) {\n const element = (this as any)._elementRef.nativeElement;\n\n if (config.maxWidth) {\n element.style.setProperty('--ngs-dialog-container-max-width', this._formatValue(config.maxWidth));\n }\n\n if (config.minWidth) {\n element.style.setProperty('--ngs-dialog-container-min-width', this._formatValue(config.minWidth));\n }\n\n if (config.width) {\n element.style.setProperty('--ngs-dialog-container-max-width', 'none');\n }\n }\n }\n\n private _formatValue(value: string | number): string {\n return typeof value === 'number' ? `${value}px` : value;\n }\n\n _onTransitionEnd(event: TransitionEvent) {\n if (event.propertyName === 'opacity' && event.target === event.currentTarget) {\n this._animationStateChanged.emit({\n fromState: this._animationState === 'enter' ? 'void' : 'enter',\n toState: this._animationState,\n totalTime: 150,\n phaseName: 'done',\n } as any);\n }\n }\n\n /** Starts the dialog enter animation. */\n _startEnterAnimation(): void {\n this._animationState = 'enter';\n this._cdr.markForCheck();\n }\n\n /** Starts the dialog exit animation. */\n _startExitAnimation(): void {\n this._animationState = 'exit';\n this._cdr.markForCheck();\n }\n}\n","<ng-template cdkPortalOutlet />\n","import { Injectable, Injector, Type, TemplateRef, inject, StaticProvider } from '@angular/core';\nimport { Dialog as CdkDialog, DialogConfig as CdkDialogConfig, DialogRef as CdkDialogRef } from '@angular/cdk/dialog';\nimport { filter, take } from 'rxjs/operators';\nimport { DialogConfig, DIALOG_DATA, DIALOG_DEFAULT_OPTIONS } from './dialog-config';\nimport { DialogRef } from './dialog-ref';\nimport { DialogContainer } from './dialog-container/dialog-container';\nimport { ComponentType } from '@angular/cdk/portal';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class Dialog {\n private readonly _cdkDialog = inject(CdkDialog);\n private readonly _injector = inject(Injector);\n private readonly _defaultOptions = inject(DIALOG_DEFAULT_OPTIONS, { optional: true });\n\n open<T, D = any, R = any>(\n componentOrTemplateRef: ComponentType<T> | TemplateRef<T>,\n config?: DialogConfig<D>\n ): DialogRef<T, R> {\n const dialogRef = new DialogRef<T, R>();\n const mergedConfig = { ...new DialogConfig(), ...this._defaultOptions, ...config };\n\n // Set default maxWidth if not specified and no width is set\n if (!mergedConfig.maxWidth && !mergedConfig.width) {\n mergedConfig.maxWidth = 560;\n }\n\n // Set default minWidth if not specified\n if (!mergedConfig.minWidth) {\n mergedConfig.minWidth = 280;\n }\n\n let container: DialogContainer | undefined;\n const cdkConfig: CdkDialogConfig<D, any, DialogContainer> = {\n ...mergedConfig,\n container: DialogContainer,\n panelClass: this._buildPanelClass(mergedConfig?.panelClass),\n backdropClass: this._buildBackdropClass(mergedConfig?.backdropClass),\n providers: (ref: any, config: any, _container: DialogContainer) => {\n container = _container;\n dialogRef._container = _container;\n return [\n { provide: DialogRef, useValue: dialogRef },\n { provide: DIALOG_DATA, useValue: config?.data }\n ];\n }\n };\n\n const cdkRef = this._cdkDialog.open(componentOrTemplateRef, cdkConfig as any);\n\n dialogRef.disableClose = mergedConfig?.disableClose;\n dialogRef._cdkRef = cdkRef;\n\n if (container) {\n container._animationStateChanged\n .pipe(\n filter((event: any) => event.phaseName === 'done' && event.toState === 'enter'),\n take(1)\n )\n .subscribe(() => {\n dialogRef.__fireAfterOpened();\n });\n\n // Use double rAF to ensure the browser has rendered the initial state (opacity: 0)\n // before we trigger the transition to opacity: 1.\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n if (container) {\n container._startEnterAnimation();\n }\n\n const overlayRef = cdkRef.overlayRef;\n if (overlayRef.backdropElement) {\n overlayRef.backdropElement.classList.add('ngs-dialog-backdrop-showing');\n }\n });\n });\n }\n\n cdkRef.closed.subscribe(result => {\n if (dialogRef._cdkRef) {\n dialogRef._cdkRef = null;\n dialogRef.close(result as R);\n }\n });\n\n cdkRef.backdropClick.subscribe(event => {\n dialogRef.__fireBackdropClick(event);\n if (!dialogRef.disableClose) {\n dialogRef.close();\n }\n });\n\n cdkRef.keydownEvents.subscribe(event => {\n dialogRef.__fireKeydownEvent(event);\n if (event.key === 'Escape' && !dialogRef.disableClose) {\n dialogRef.close();\n }\n });\n\n return dialogRef;\n }\n\n close<T, R>(dialogRef: DialogRef<T, R>, result?: R): void {\n dialogRef.close(result);\n }\n\n closeAll(): void {\n this._cdkDialog.closeAll();\n }\n\n private _buildPanelClass(panelClass: string | string[] | undefined): string[] {\n const classes = ['ngs-dialog-panel', 'overflow-hidden', 'flex', 'flex-col'];\n\n if (Array.isArray(panelClass)) {\n classes.push(...panelClass);\n } else if (panelClass) {\n classes.push(panelClass);\n }\n\n return classes;\n }\n\n private _buildBackdropClass(backdropClass: string | string[] | undefined): string[] {\n const classes: string[] = ['ngs-dialog-backdrop'];\n\n if (Array.isArray(backdropClass)) {\n classes.push(...backdropClass);\n } else if (backdropClass) {\n classes.push(backdropClass);\n }\n\n return classes;\n }\n}\n","import { Component, input, OnInit, inject } from '@angular/core';\nimport { DialogRef } from '../dialog-ref';\n\nlet nextUniqueId = 0;\n\n@Component({\n selector: 'ngs-dialog-title, [ngs-dialog-title], [ngsDialogTitle]',\n exportAs: 'ngsDialogTitle',\n template: '<ng-content/>',\n styleUrl: './dialog-title.scss',\n host: {\n 'class': 'ngs-dialog-title',\n '[id]': 'id()',\n },\n})\nexport class DialogTitle implements OnInit {\n private _dialogRef = inject(DialogRef, { optional: true });\n\n id = input<string>(`ngs-dialog-title-${nextUniqueId++}`);\n\n ngOnInit() {\n if (this._dialogRef && !this._dialogRef.disableClose) {\n // Logic for ARIA if needed\n }\n }\n}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'ngs-dialog-content,[ngs-dialog-content],[ngsDialogContent]',\n styleUrl: './dialog-content.scss',\n template: '<ng-content/>',\n host: {\n 'class': 'ngs-dialog-content'\n }\n})\nexport class DialogContent {}\n","import { Component, input } from '@angular/core';\n\n@Component({\n selector: 'ngs-dialog-actions, [ngs-dialog-actions], [ngsDialogActions]',\n styleUrl: './dialog-actions.scss',\n template: '<ng-content />',\n host: {\n 'class': 'ngs-dialog-actions',\n '[class.ngs-dialog-actions-align-center]': 'align() === \"center\"',\n '[class.ngs-dialog-actions-align-end]': 'align() === \"end\"',\n }\n})\nexport class DialogActions {\n align = input<'start' | 'center' | 'end'>('end');\n}\n","import { Directive, input, inject } from '@angular/core';\nimport { DialogRef } from './dialog-ref';\nimport { Dialog } from './dialog.service';\n\n@Directive({\n selector: '[ngs-dialog-close], [ngsDialogClose]',\n exportAs: 'ngsDialogClose',\n host: {\n '[attr.aria-label]': 'ariaLabel() || null',\n '[attr.type]': 'type()',\n '(click)': '_onClick()',\n }\n})\nexport class DialogClose {\n dialogResult = input<any>(undefined, {\n alias: 'ngs-dialog-close'\n });\n _dialogResult = input<any>(undefined, {\n alias: 'ngsDialogClose'\n });\n ariaLabel = input<string | null>(null);\n type = input<'submit' | 'button' | 'reset'>('button');\n\n private _dialogRef = inject(DialogRef, { optional: true });\n private _dialog = inject(Dialog);\n\n protected _onClick() {\n if (this._dialogRef) {\n this._dialog.close(this._dialogRef, this.dialogResult() || this._dialogResult());\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["CdkDialog","filter","take"],"mappings":";;;;;;;;MAEa,YAAY,CAAA;IACvB,IAAI,GAAc,IAAI;IACtB,KAAK,GAAY,EAAE;IACnB,MAAM,GAAY,EAAE;AACpB,IAAA,QAAQ;AACR,IAAA,SAAS;AACT,IAAA,QAAQ;AACR,IAAA,SAAS;IACT,WAAW,GAAa,IAAI;IAC5B,aAAa,GAAuB,qBAAqB;IACzD,UAAU,GAAuB,EAAE;IACnC,YAAY,GAAa,KAAK;IAC9B,SAAS,GAAsB,gBAAgB;IAC/C,YAAY,GAAa,IAAI;IAC7B,eAAe,GAAmB,IAAI;IACtC,cAAc,GAAmB,IAAI;IACrC,SAAS,GAAmB,IAAI;IAChC,IAAI,GAA8B,QAAQ;IAC1C,iBAAiB,GAAa,IAAI;AACnC;MAEY,WAAW,GAAG,IAAI,cAAc,CAAM,YAAY;MAClD,sBAAsB,GAAG,IAAI,cAAc,CAAe,cAAc;;MCrBxE,SAAS,CAAA;AACH,IAAA,YAAY,GAAG,IAAI,OAAO,EAAiB;AAC3C,IAAA,YAAY,GAAG,IAAI,OAAO,EAAQ;AAClC,IAAA,cAAc,GAAG,IAAI,OAAO,EAAc;AAC1C,IAAA,cAAc,GAAG,IAAI,OAAO,EAAiB;IAE9D,iBAAiB,GAAa,IAAI;AAClC,IAAA,YAAY;;AAGZ,IAAA,OAAO;;AAGP,IAAA,UAAU;IAEF,UAAU,GAAG,KAAK;AAE1B,IAAA,KAAK,CAAC,YAAgB,EAAA;AACpB,QAAA,IAAI,IAAI,CAAC,UAAU,EAAE;YACnB;QACF;AAEA,QAAA,IAAI,CAAC,UAAU,GAAG,IAAI;QAEtB,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,OAAO,EAAE;;AAGnC,YAAA,IAAI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AA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,YAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,qBAAA,EAAA,WAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAX,WAAW,EAAA,UAAA,EAAA,CAAA;kBATvB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,sCAAsC;AAChD,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,IAAI,EAAE;AACJ,wBAAA,mBAAmB,EAAE,qBAAqB;AAC1C,wBAAA,aAAa,EAAE,QAAQ;AACvB,wBAAA,SAAS,EAAE,YAAY;AACxB;AACF,iBAAA;;;ACZD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngstarter-ui-components-dialog.mjs","sources":["../../../projects/components/dialog/src/dialog-config.ts","../../../projects/components/dialog/src/dialog-ref.ts","../../../projects/components/dialog/src/dialog-container/dialog-container.ts","../../../projects/components/dialog/src/dialog-container/dialog-container.html","../../../projects/components/dialog/src/dialog.service.ts","../../../projects/components/dialog/src/dialog-title/dialog-title.ts","../../../projects/components/dialog/src/dialog-content/dialog-content.ts","../../../projects/components/dialog/src/dialog-actions/dialog-actions.ts","../../../projects/components/dialog/src/dialog-close.ts","../../../projects/components/dialog/src/dialog-header/dialog-header.ts","../../../projects/components/dialog/src/dialog-header/dialog-header.html","../../../projects/components/dialog/ngstarter-ui-components-dialog.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport class DialogConfig<D = any> {\n data?: D | null = null;\n width?: string = '';\n height?: string = '';\n minWidth?: string | number;\n minHeight?: string | number;\n maxWidth?: string | number;\n maxHeight?: string | number;\n hasBackdrop?: boolean = true;\n backdropClass?: string | string[] = 'ngs-dialog-backdrop';\n panelClass?: string | string[] = '';\n disableClose?: boolean = false;\n autoFocus?: boolean | string = 'first-tabbable';\n restoreFocus?: boolean = true;\n ariaDescribedBy?: string | null = null;\n ariaLabelledBy?: string | null = null;\n ariaLabel?: string | null = null;\n role?: 'dialog' | 'alertdialog' = 'dialog';\n closeOnNavigation?: boolean = true;\n showCloseButton?: boolean = false;\n}\n\nexport const DIALOG_DATA = new InjectionToken<any>('DialogData');\nexport const DIALOG_DEFAULT_OPTIONS = new InjectionToken<DialogConfig>('DialogConfig');\n","import { Subject, Observable, filter, take } from 'rxjs';\nimport { DialogContainer } from './dialog-container/dialog-container';\n\nexport class DialogRef<T, R = any> {\n private readonly _afterClosed = new Subject<R | undefined>();\n private readonly _afterOpened = new Subject<void>();\n private readonly _backdropClick = new Subject<MouseEvent>();\n private readonly _keydownEvents = new Subject<KeyboardEvent>();\n\n componentInstance: T | null = null;\n disableClose: boolean | undefined;\n\n /** @internal */\n _cdkRef: any;\n\n /** @internal */\n _container: DialogContainer | undefined;\n\n private _isClosing = false;\n\n close(dialogResult?: R): void {\n if (this._isClosing) {\n return;\n }\n\n this._isClosing = true;\n\n if (this._container && this._cdkRef) {\n\n // Start exit animation for the container\n this._container._startExitAnimation();\n\n // Start exit animation for the backdrop\n const overlayRef = this._cdkRef.overlayRef;\n const backdropElement = overlayRef.backdropElement;\n if (backdropElement) {\n // Remove both classes that could be forcing opacity: 1\n backdropElement.classList.remove('ngs-dialog-backdrop-showing');\n backdropElement.classList.remove('cdk-overlay-backdrop-showing');\n }\n\n // Wait for the container animation to finish before destroying the overlay\n this._container._animationStateChanged\n .pipe(\n filter((event: any) => event.phaseName === 'done' && event.toState === 'exit'),\n take(1)\n )\n .subscribe(() => {\n this._finishClose(dialogResult);\n });\n\n // Fallback in case transitionend never fires (e.g. if opacity was already 0 or style didn't apply)\n setTimeout(() => {\n if (this._isClosing && this._cdkRef) {\n this._finishClose(dialogResult);\n }\n }, 250);\n\n return;\n }\n this._finishClose(dialogResult);\n }\n\n private _finishClose(dialogResult?: R): void {\n if (this._cdkRef) {\n const cdkRef = this._cdkRef;\n this._cdkRef = null;\n cdkRef.close(dialogResult);\n }\n this._afterClosed.next(dialogResult);\n this._afterClosed.complete();\n this._afterOpened.complete();\n this._backdropClick.complete();\n this._keydownEvents.complete();\n }\n\n afterClosed(): Observable<R | undefined> {\n return this._afterClosed.asObservable();\n }\n\n afterOpened(): Observable<void> {\n return this._afterOpened.asObservable();\n }\n\n backdropClick(): Observable<MouseEvent> {\n return this._backdropClick.asObservable();\n }\n\n keydownEvents(): Observable<KeyboardEvent> {\n return this._keydownEvents.asObservable();\n }\n\n __fireAfterOpened(): void {\n this._afterOpened.next();\n }\n\n __fireBackdropClick(event: MouseEvent): void {\n this._backdropClick.next(event);\n }\n\n __fireKeydownEvent(event: KeyboardEvent): void {\n this._keydownEvents.next(event);\n }\n}\n","import { ChangeDetectorRef, Component, EventEmitter, inject, OnInit } from '@angular/core';\nimport { CdkDialogContainer, DialogModule } from '@angular/cdk/dialog';\nimport { Button } from \"@ngstarter-ui/components/button\";\nimport { Icon } from \"@ngstarter-ui/components/icon\";\nimport type { DialogConfig } from \"../dialog-config\";\n\n@Component({\n selector: 'ngs-dialog-container',\n exportAs: 'ngsDialogContainer',\n imports: [\n DialogModule,\n Button,\n Icon,\n ],\n templateUrl: './dialog-container.html',\n styleUrl: './dialog-container.scss',\n host: {\n 'class': 'ngs-dialog-container',\n '[class.ngs-dialog-container-enter]': '_animationState === \"enter\"',\n '[class.ngs-dialog-container-exit]': '_animationState === \"exit\"',\n '(transitionend)': '_onTransitionEnd($event)',\n },\n})\nexport class DialogContainer extends CdkDialogContainer implements OnInit {\n private readonly _cdr = inject(ChangeDetectorRef);\n private _closeHandler?: () => void;\n\n get showCloseButton(): boolean {\n return Boolean((this._config as DialogConfig).showCloseButton);\n }\n\n /** State of the dialog animation. */\n _animationState: 'void' | 'enter' | 'exit' = 'void';\n\n /** Emits when an animation state changes. */\n _animationStateChanged = new EventEmitter<any>();\n\n ngOnInit() {\n const config = this._config;\n if (config) {\n const element = (this as any)._elementRef.nativeElement;\n\n if (config.maxWidth) {\n element.style.setProperty('--ngs-dialog-container-max-width', this._formatValue(config.maxWidth));\n }\n\n if (config.minWidth) {\n element.style.setProperty('--ngs-dialog-container-min-width', this._formatValue(config.minWidth));\n }\n\n if (config.width) {\n element.style.setProperty('--ngs-dialog-container-max-width', 'none');\n }\n }\n }\n\n private _formatValue(value: string | number): string {\n return typeof value === 'number' ? `${value}px` : value;\n }\n\n _onTransitionEnd(event: TransitionEvent) {\n if (event.propertyName === 'opacity' && event.target === event.currentTarget) {\n this._animationStateChanged.emit({\n fromState: this._animationState === 'enter' ? 'void' : 'enter',\n toState: this._animationState,\n totalTime: 150,\n phaseName: 'done',\n } as any);\n }\n }\n\n /** Starts the dialog enter animation. */\n _startEnterAnimation(): void {\n this._animationState = 'enter';\n this._cdr.markForCheck();\n }\n\n /** Starts the dialog exit animation. */\n _startExitAnimation(): void {\n this._animationState = 'exit';\n this._cdr.markForCheck();\n }\n\n _setCloseHandler(handler: () => void): void {\n this._closeHandler = handler;\n }\n\n protected close(): void {\n this._closeHandler?.();\n }\n}\n","@if (showCloseButton) {\n <span class=\"close\">\n <button type=\"button\" ngsIconButton aria-label=\"Close dialog\" (click)=\"close()\">\n <ngs-icon name=\"fluent:dismiss-24-regular\"/>\n </button>\n </span>\n}\n<ng-template cdkPortalOutlet />\n","import { Injectable, Injector, Type, TemplateRef, inject, StaticProvider } from '@angular/core';\nimport { Dialog as CdkDialog, DialogConfig as CdkDialogConfig, DialogRef as CdkDialogRef } from '@angular/cdk/dialog';\nimport { filter, take } from 'rxjs/operators';\nimport { DialogConfig, DIALOG_DATA, DIALOG_DEFAULT_OPTIONS } from './dialog-config';\nimport { DialogRef } from './dialog-ref';\nimport { DialogContainer } from './dialog-container/dialog-container';\nimport { ComponentType } from '@angular/cdk/portal';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class Dialog {\n private readonly _cdkDialog = inject(CdkDialog);\n private readonly _injector = inject(Injector);\n private readonly _defaultOptions = inject(DIALOG_DEFAULT_OPTIONS, { optional: true });\n\n open<T, D = any, R = any>(\n componentOrTemplateRef: ComponentType<T> | TemplateRef<T>,\n config?: DialogConfig<D>\n ): DialogRef<T, R> {\n const dialogRef = new DialogRef<T, R>();\n const mergedConfig = { ...new DialogConfig(), ...this._defaultOptions, ...config };\n\n // Set default maxWidth if not specified and no width is set\n if (!mergedConfig.maxWidth && !mergedConfig.width) {\n mergedConfig.maxWidth = 560;\n }\n\n // Set default minWidth if not specified\n if (!mergedConfig.minWidth) {\n mergedConfig.minWidth = 280;\n }\n\n let container: DialogContainer | undefined;\n const cdkConfig: CdkDialogConfig<D, any, DialogContainer> = {\n ...mergedConfig,\n container: DialogContainer,\n panelClass: this._buildPanelClass(mergedConfig?.panelClass),\n backdropClass: this._buildBackdropClass(mergedConfig?.backdropClass),\n providers: (ref: any, config: any, _container: DialogContainer) => {\n container = _container;\n dialogRef._container = _container;\n return [\n { provide: DialogRef, useValue: dialogRef },\n { provide: DIALOG_DATA, useValue: config?.data }\n ];\n }\n };\n\n const cdkRef = this._cdkDialog.open(componentOrTemplateRef, cdkConfig as any);\n\n dialogRef.disableClose = mergedConfig?.disableClose;\n dialogRef._cdkRef = cdkRef;\n\n if (container) {\n container._setCloseHandler(() => dialogRef.close());\n\n container._animationStateChanged\n .pipe(\n filter((event: any) => event.phaseName === 'done' && event.toState === 'enter'),\n take(1)\n )\n .subscribe(() => {\n dialogRef.__fireAfterOpened();\n });\n\n // Use double rAF to ensure the browser has rendered the initial state (opacity: 0)\n // before we trigger the transition to opacity: 1.\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n if (container) {\n container._startEnterAnimation();\n }\n\n const overlayRef = cdkRef.overlayRef;\n if (overlayRef.backdropElement) {\n overlayRef.backdropElement.classList.add('ngs-dialog-backdrop-showing');\n }\n });\n });\n }\n\n cdkRef.closed.subscribe(result => {\n if (dialogRef._cdkRef) {\n dialogRef._cdkRef = null;\n dialogRef.close(result as R);\n }\n });\n\n cdkRef.backdropClick.subscribe(event => {\n dialogRef.__fireBackdropClick(event);\n if (!dialogRef.disableClose) {\n dialogRef.close();\n }\n });\n\n cdkRef.keydownEvents.subscribe(event => {\n dialogRef.__fireKeydownEvent(event);\n if (event.key === 'Escape' && !dialogRef.disableClose) {\n dialogRef.close();\n }\n });\n\n return dialogRef;\n }\n\n close<T, R>(dialogRef: DialogRef<T, R>, result?: R): void {\n dialogRef.close(result);\n }\n\n closeAll(): void {\n this._cdkDialog.closeAll();\n }\n\n private _buildPanelClass(panelClass: string | string[] | undefined): string[] {\n const classes = ['ngs-dialog-panel', 'overflow-hidden', 'flex', 'flex-col'];\n\n if (Array.isArray(panelClass)) {\n classes.push(...panelClass);\n } else if (panelClass) {\n classes.push(panelClass);\n }\n\n return classes;\n }\n\n private _buildBackdropClass(backdropClass: string | string[] | undefined): string[] {\n const classes: string[] = ['ngs-dialog-backdrop'];\n\n if (Array.isArray(backdropClass)) {\n classes.push(...backdropClass);\n } else if (backdropClass) {\n classes.push(backdropClass);\n }\n\n return classes;\n }\n}\n","import { Component, input, OnInit, inject } from '@angular/core';\nimport { DialogRef } from '../dialog-ref';\n\nlet nextUniqueId = 0;\n\n@Component({\n selector: 'ngs-dialog-title, [ngs-dialog-title], [ngsDialogTitle]',\n exportAs: 'ngsDialogTitle',\n template: '<ng-content/>',\n styleUrl: './dialog-title.scss',\n host: {\n 'class': 'ngs-dialog-title',\n '[id]': 'id()',\n },\n})\nexport class DialogTitle implements OnInit {\n private _dialogRef = inject(DialogRef, { optional: true });\n\n id = input<string>(`ngs-dialog-title-${nextUniqueId++}`);\n\n ngOnInit() {\n if (this._dialogRef && !this._dialogRef.disableClose) {\n // Logic for ARIA if needed\n }\n }\n}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'ngs-dialog-content,[ngs-dialog-content],[ngsDialogContent]',\n styleUrl: './dialog-content.scss',\n template: '<ng-content/>',\n host: {\n 'class': 'ngs-dialog-content'\n }\n})\nexport class DialogContent {}\n","import { Component, input } from '@angular/core';\n\n@Component({\n selector: 'ngs-dialog-actions, [ngs-dialog-actions], [ngsDialogActions]',\n styleUrl: './dialog-actions.scss',\n template: '<ng-content />',\n host: {\n 'class': 'ngs-dialog-actions',\n '[class.ngs-dialog-actions-align-center]': 'align() === \"center\"',\n '[class.ngs-dialog-actions-align-end]': 'align() === \"end\"',\n }\n})\nexport class DialogActions {\n align = input<'start' | 'center' | 'end'>('end');\n}\n","import { Directive, input, inject } from '@angular/core';\nimport { DialogRef } from './dialog-ref';\nimport { Dialog } from './dialog.service';\n\n@Directive({\n selector: '[ngs-dialog-close],[ngsDialogClose]',\n exportAs: 'ngsDialogClose',\n host: {\n '[attr.aria-label]': 'ariaLabel() || null',\n '[attr.type]': 'type()',\n '(click)': '_onClick()',\n }\n})\nexport class DialogClose {\n dialogResult = input<any>(undefined, {\n alias: 'ngs-dialog-close'\n });\n _dialogResult = input<any>(undefined, {\n alias: 'ngsDialogClose'\n });\n ariaLabel = input<string | null>(null);\n type = input<'submit' | 'button' | 'reset'>('button');\n\n private _dialogRef = inject(DialogRef, { optional: true });\n private _dialog = inject(Dialog);\n\n protected _onClick() {\n if (this._dialogRef) {\n this._dialog.close(this._dialogRef, this.dialogResult() || this._dialogResult());\n }\n }\n}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'ngs-dialog-header',\n exportAs: 'ngsDialogHeader',\n imports: [],\n templateUrl: './dialog-header.html',\n styleUrl: './dialog-header.scss',\n host: {\n 'class': 'ngs-dialog-header',\n }\n})\nexport class DialogHeader {\n\n}\n","<ng-content/>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["CdkDialog","filter","take"],"mappings":";;;;;;;;;MAEa,YAAY,CAAA;IACvB,IAAI,GAAc,IAAI;IACtB,KAAK,GAAY,EAAE;IACnB,M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