ng-hub-ui-modal 22.4.1 → 22.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -472,27 +472,44 @@ this.modal.activeInstances.subscribe((refs) => {
472
472
 
473
473
  The main entry point for opening and managing modals.
474
474
 
475
- | Method | Signature | Description |
476
- | ----------------- | -------------------------------------- | ----------------------------------------------------- |
477
- | `open` | `open(content, options?): HubModalRef` | Opens a new modal with the given content and options. |
478
- | `dismissAll` | `dismissAll(reason?): void` | Dismisses all currently open modals. |
479
- | `hasOpenModals` | `hasOpenModals(): boolean` | Returns `true` if at least one modal is open. |
480
- | `activeInstances` | `EventEmitter<HubModalRef[]>` | Emits whenever the stack of open modals changes. |
475
+ | Method | Signature | Description |
476
+ | ----------------- | --------------------------------------------------------------- | ----------------------------------------------------- |
477
+ | `open` | `open<C, R, D>(content, options?): HubModalRef<C, R>` | Opens a new modal with the given content and options. |
478
+ | `dismissAll` | `dismissAll(reason?): void` | Dismisses all currently open modals. |
479
+ | `hasOpenModals` | `hasOpenModals(): boolean` | Returns `true` if at least one modal is open. |
480
+ | `activeInstances` | `EventEmitter<HubModalRef[]>` | Emits whenever the stack of open modals changes. |
481
+
482
+ `C` is inferred from the component class you pass as `content`, `R` types the result flow and `D` the `data` payload. All generics default to the previous loose types (`any` / `unknown`), so untyped call sites compile unchanged.
483
+
484
+ #### Typed results
485
+
486
+ ```typescript
487
+ const ref = this.modal.open<ConfirmDialogComponent, boolean>(ConfirmDialogComponent);
488
+
489
+ ref.componentInstance; // ConfirmDialogComponent | void — no `as unknown as` casts
490
+ ref.result.then((confirmed) => {
491
+ // confirmed: boolean
492
+ });
493
+
494
+ // Inside the content component:
495
+ inject<HubActiveModal<unknown, boolean>>(HubActiveModal).close(true); // close(result?: boolean)
496
+ ```
481
497
 
482
498
  ---
483
499
 
484
500
  ### HubModalRef
485
501
 
486
- A reference to an open modal returned by `HubModal.open()`.
502
+ A reference to an open modal returned by `HubModal.open()`. Generic in the content
503
+ component and the result type — `HubModalRef<C = any, R = any>`.
487
504
 
488
505
  | Member | Type | Description |
489
506
  | ------------------- | ------------------ | ----------------------------------------------------------- |
490
- | `result` | `Promise<any>` | Resolves on `close()`, rejects on `dismiss()`. |
491
- | `componentInstance` | `T \| void` | Instance of the content component (if used). |
492
- | `close(result?)` | `void` | Closes the modal and resolves `result`. |
507
+ | `result` | `Promise<R>` | Resolves on `close()`, rejects on `dismiss()`. |
508
+ | `componentInstance` | `C \| void` | Instance of the content component (if used). |
509
+ | `close(result?: R)` | `void` | Closes the modal and resolves `result`. |
493
510
  | `dismiss(reason?)` | `void` | Dismisses the modal and rejects `result`. |
494
511
  | `update(options)` | `void` | Updates modal options after opening. |
495
- | `closed` | `Observable<any>` | Emits when the modal is closed via `close()`. |
512
+ | `closed` | `Observable<R>` | Emits when the modal is closed via `close()`. |
496
513
  | `dismissed` | `Observable<any>` | Emits when dismissed via `dismiss()` or user interaction. |
497
514
  | `shown` | `Observable<void>` | Emits once the open animation finishes. |
498
515
  | `hidden` | `Observable<void>` | Emits once the close animation finishes and DOM is removed. |
@@ -502,12 +519,12 @@ A reference to an open modal returned by `HubModal.open()`.
502
519
  ### HubActiveModal
503
520
 
504
521
  Inject into your content component to control the modal from within. Generic in the
505
- payload type — `HubActiveModal<D = unknown>`.
522
+ payload and result types — `HubActiveModal<D = unknown, R = any>`.
506
523
 
507
524
  | Member | Description |
508
525
  | ------------------ | ---------------------------------------------------- |
509
526
  | `data` | Read-only payload passed through the `data` option, typed `D`. Equivalent to `inject(HUB_MODAL_DATA)`; resolves to `null` when no `data` was supplied. |
510
- | `close(result?)` | Closes the modal with an optional result. |
527
+ | `close(result?: R)` | Closes the modal with an optional result. |
511
528
  | `dismiss(reason?)` | Dismisses the modal with an optional reason. |
512
529
  | `update(options)` | Updates live options (same as `HubModalRef.update`). |
513
530
 
@@ -517,7 +534,8 @@ payload type — `HubActiveModal<D = unknown>`.
517
534
 
518
535
  ### HubModalOptions
519
536
 
520
- All options accepted by `HubModal.open()`.
537
+ All options accepted by `HubModal.open()`. Generic in the payload type —
538
+ `HubModalOptions<D = unknown>` types the `data` option, pairing with `HubActiveModal<D>.data`.
521
539
 
522
540
  | Option | Type | Default | Description |
523
541
  | ------------------ | ------------------------------------------------------------ | ------------------------ | ----------------------------------------------------------- |
@@ -542,7 +560,7 @@ All options accepted by `HubModal.open()`.
542
560
  | `footerSelector` | `string` | — | CSS selector for nodes to project into the footer slot. |
543
561
  | `dismissSelector` | `string` | `[data-dismiss="modal"]` | Selector for elements that auto-dismiss the modal on click. |
544
562
  | `closeSelector` | `string` | `[data-close="modal"]` | Selector for elements that auto-close the modal on click. |
545
- | `data` | `any` | — | Typed payload delivered to the content component via `inject(HUB_MODAL_DATA)` or `inject(HubActiveModal).data` (the legacy instance-field monkey-patch is deprecated). |
563
+ | `data` | `D` | — | Typed payload delivered to the content component via `inject(HUB_MODAL_DATA)` or `inject(HubActiveModal).data` (the legacy instance-field monkey-patch is deprecated). |
546
564
 
547
565
  ---
548
566
 
@@ -338,6 +338,8 @@ class HubModalRef {
338
338
  */
339
339
  close(result) {
340
340
  if (this._windowCmptRef) {
341
+ // `close()` without a value legitimately emits `undefined` through the
342
+ // `R`-typed stream, mirroring the optional `result` parameter.
341
343
  this._closed.next(result);
342
344
  this._resolve(result);
343
345
  this._removeModalElements();
@@ -1171,6 +1173,11 @@ class HubModal {
1171
1173
  * use `HubActiveModal` methods to close / dismiss modals from "inside" of your component.
1172
1174
  *
1173
1175
  * Also see the [`HubModalOptions`](#/components/modal/api#HubModalOptions) for the list of supported options.
1176
+ *
1177
+ * Generics: `C` is the content component type (inferred from the class you pass,
1178
+ * so `componentInstance` is typed without casts), `R` is the result type flowing
1179
+ * through `close()` / `result` / `closed`, and `D` types the `options.data`
1180
+ * payload (paired with `HubActiveModal<D>` / `HUB_MODAL_DATA` on the inside).
1174
1181
  */
1175
1182
  open(content, options = {}) {
1176
1183
  const combinedOptions = {
@@ -1 +1 @@
1
- {"version":3,"file":"ng-hub-ui-modal.mjs","sources":["../../../projects/modal/src/lib/modal-placement.ts","../../../projects/modal/src/lib/modal-config.ts","../../../projects/modal/src/lib/modal-backdrop.ts","../../../projects/modal/src/lib/modal-ref.ts","../../../projects/modal/src/lib/modal-dismiss-reasons.ts","../../../projects/modal/src/lib/modal-window.ts","../../../projects/modal/src/lib/modal-stack.ts","../../../projects/modal/src/lib/modal.ts","../../../projects/modal/src/lib/modal.module.ts","../../../projects/modal/src/public-api.ts","../../../projects/modal/src/ng-hub-ui-modal.ts"],"sourcesContent":["/**\n * Supported modal placements within the viewport.\n */\nexport enum HubModalPlacement {\n\t/**\n\t * Places the modal in the center of the viewport.\n\t */\n\tCenter = 'center',\n\n\t/**\n\t * Anchors the modal to the start edge of the viewport.\n\t */\n\tStart = 'start',\n\n\t/**\n\t * Anchors the modal to the end edge of the viewport.\n\t */\n\tEnd = 'end',\n\n\t/**\n\t * Anchors the modal to the top edge of the viewport.\n\t */\n\tTop = 'top',\n\n\t/**\n\t * Anchors the modal to the bottom edge of the viewport.\n\t */\n\tBottom = 'bottom'\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { HubModalPlacement } from './modal-placement';\n// import { HubConfig } from '../hub-config';\n\n/**\n * Options available when opening new modal windows with `HubModal.open()` method.\n */\nexport interface HubModalOptions {\n\t/**\n\t * If `true`, modal opening and closing will be animated.\n\t *\n\t * @since 8.0.0\n\t */\n\tanimation?: boolean;\n\n\t/**\n\t * `aria-labelledby` attribute value to set on the modal window.\n\t *\n\t * @since 2.2.0\n\t */\n\tariaLabelledBy?: string;\n\n\t/**\n\t * `aria-describedby` attribute value to set on the modal window.\n\t *\n\t * @since 6.1.0\n\t */\n\tariaDescribedBy?: string;\n\n\t/**\n\t * If `true`, the backdrop element will be created for a given modal.\n\t *\n\t * Alternatively, specify `'static'` for a backdrop which doesn't close the modal on click.\n\t *\n\t * Default value is `true`.\n\t */\n\tbackdrop?: boolean | 'static';\n\n\t/**\n\t * Callback right before the modal will be dismissed.\n\t *\n\t * If this function returns:\n\t * * `false`\n\t * * a promise resolved with `false`\n\t * * a promise that is rejected\n\t *\n\t * then the modal won't be dismissed.\n\t */\n\tbeforeDismiss?: () => boolean | Promise<boolean>;\n\n\t/**\n\t * If `true`, the modal will be centered vertically.\n\t *\n\t * Default value is `false`.\n\t *\n\t * @since 1.1.0\n\t */\n\tcentered?: boolean;\n\n\t/**\n\t * Controls where the modal is placed within the viewport.\n\t *\n\t * Default value is `'center'`.\n\t */\n\tplacement?: HubModalPlacement;\n\n\t/**\n\t * A selector specifying the element all new modal windows should be appended to.\n\t * Since v5.3.0 it is also possible to pass the reference to an `HTMLElement`.\n\t *\n\t * If not specified, will be `body`.\n\t */\n\tcontainer?: string | HTMLElement;\n\n\t/**\n\t * If `true` modal will always be displayed in fullscreen mode.\n\t *\n\t * For values like `'md'` it means that modal will be displayed in fullscreen mode\n\t * only if the viewport width is below `'md'`. For custom strings (ex. when passing `'mysize'`)\n\t * it will add a `'modal-fullscreen-mysize-down'` class.\n\t *\n\t * If not specified will be `false`.\n\t *\n\t * @since 12.1.0\n\t */\n\tfullscreen?: 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | boolean | string;\n\n\t/**\n\t * The `Injector` to use for modal content.\n\t */\n\tinjector?: Injector;\n\n\t/**\n\t * If `true`, the modal will be closed when `Escape` key is pressed\n\t *\n\t * Default value is `true`.\n\t */\n\tkeyboard?: boolean;\n\n\t/**\n\t * Scrollable modal content (false by default).\n\t *\n\t * @since 5.0.0\n\t */\n\tscrollable?: boolean;\n\n\t/**\n\t * Size of a new modal window.\n\t */\n\tsize?: 'sm' | 'lg' | 'xl' | string;\n\n\t/**\n\t * Semantic accent of the modal, for meaningful dialogs (a destructive\n\t * confirmation, a success notice…). Adds a coloured top bar to the dialog by\n\t * applying the `hub-modal--<variant>` class to the window.\n\t *\n\t * The built-in values (`'primary'` · `'success'` · `'danger'` · `'warning'`\n\t * · `'info'`) map to the design-system colours, but **any string is accepted**\n\t * — the modal reads `--hub-sys-color-<variant>` from the host application.\n\t *\n\t * If not specified, the modal is rendered neutral (no accent bar).\n\t */\n\tvariant?: 'primary' | 'success' | 'danger' | 'warning' | 'info' | (string & {});\n\n\t/**\n\t * A custom class to append to the modal window.\n\t */\n\twindowClass?: string;\n\n\t/**\n\t * A custom class to append to the modal dialog.\n\t *\n\t * @since 9.1.0\n\t */\n\tmodalDialogClass?: string;\n\n\t/**\n\t * A custom class to append to the modal backdrop.\n\t *\n\t * @since 1.1.0\n\t */\n\tbackdropClass?: string;\n\n\t/**\n\t * Allows to specify a custom selector for the header element of the modal window. This can be useful if you want to target\n\t * a specific element within the modal to act as the header, for example, to apply custom styling or functionality to it. By\n\t * providing a CSS selector string, you can target the desired\theader element within the modal content.\n\t */\n\theaderSelector?: string;\n\n\t/**\n\t * Allows to specify a custom selector for the footer element of the modal window. This can be useful if you want to target\n\t * a specific element within the modal to act as the footer, for example, to apply custom styling or functionality to it. By\n\t * providing a CSS selector string, you can target the desired footer element within the modal content.\n\t */\n\tfooterSelector?: string;\n\n\t/** Used to specify a custom selector for elements that can trigger the dismissal of the modal window. By providing a CSS selector\n\t * string for `dismissSelector`, you can target specific elements within the modal content that, when interacted with (e.g., clicked),\n\t * will close or dismiss the modal window.\n\t */\n\tdismissSelector?: string;\n\n\t/**\n\t * Used to specify a custom selector for elements that can trigger the closing of the modal window. By providing a CSS selector\n\t * string for `closeSelector`, you can target specific elements within the modal content that, when interacted with (e.g., clicked),\n\t * will close the modal window. This allows for customization of the elements that can act as close buttons for the modal.\n\t */\n\tcloseSelector?: string;\n\n\t/** Used to store any additional data that needs to be passed to the modal window when it is opened. This property allows you\n\t * to provide custom data to the modal component, which can then be accessed and utilized within the modal content or logic.\n\t * It provides flexibility for passing dynamic information to the modal window based on the specific use case or requirements.\n\t */\n\tdata?: any;\n}\n\n/**\n * Options that can be changed on an opened modal with `HubModalRef.update()` and `HubActiveModal.update()` methods.\n *\n * @since 14.2.0\n */\nexport type HubModalUpdatableOptions = Pick<\n\tHubModalOptions,\n\t| 'ariaLabelledBy'\n\t| 'ariaDescribedBy'\n\t| 'centered'\n\t| 'placement'\n\t| 'fullscreen'\n\t| 'backdropClass'\n\t| 'size'\n\t| 'variant'\n\t| 'windowClass'\n\t| 'modalDialogClass'\n>;\n\n/**\n * A configuration service for the [`HubModal`](#/components/modal/api#HubModal) service.\n *\n * You can inject this service, typically in your root component, and customize the values of its properties in\n * order to provide default values for all modals used in the application.\n *\n * @since 3.1.0\n */\n@Injectable({ providedIn: 'root' })\nexport class HubModalConfig implements Required<HubModalOptions> {\n\t// private _hubConfig = inject(HubConfig);\n\tprivate _animation?: boolean;\n\n\tariaLabelledBy!: string;\n\tariaDescribedBy!: string;\n\tbackdrop: boolean | 'static' = true;\n\tbeforeDismiss!: () => boolean | Promise<boolean>;\n\tcentered!: boolean;\n\tplacement: HubModalPlacement = HubModalPlacement.Center;\n\tcontainer!: string | HTMLElement;\n\tfullscreen: 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | boolean | string = false;\n\tinjector!: Injector;\n\tkeyboard = true;\n\tscrollable!: boolean;\n\tsize!: 'sm' | 'lg' | 'xl' | string;\n\tvariant!: 'primary' | 'success' | 'danger' | 'warning' | 'info' | (string & {});\n\twindowClass!: string;\n\tmodalDialogClass!: string;\n\tbackdropClass!: string;\n\theaderSelector!: string;\n\tfooterSelector!: string;\n\tdismissSelector: string = '[data-dismiss=\"modal\"]';\n\tcloseSelector: string = '[data-close=\"modal\"]';\n\tdata: any;\n\n\tget animation(): boolean {\n\t\treturn this._animation ?? true /* this._hubConfig.animation */;\n\t}\n\tset animation(animation: boolean) {\n\t\tthis._animation = animation;\n\t}\n}\n","import {\n\tafterNextRender,\n\tComponent,\n\tElementRef,\n\tinject,\n\tInjector,\n\tinput,\n\tNgZone,\n\tOnInit,\n\tViewEncapsulation\n} from '@angular/core';\nimport { hubRunTransition, reflow } from 'ng-hub-ui-utils';\nimport { Observable } from 'rxjs';\n\n/**\n * Represents the backdrop element associated with an active modal window.\n * It is responsible for displaying a dark overlay and handling entry/exit animations.\n */\n@Component({\n\tselector: 'hub-modal-backdrop',\n\tstandalone: true,\n\tencapsulation: ViewEncapsulation.None,\n\ttemplate: '',\n\thost: {\n\t\t'[class]': '\"hub-modal__backdrop\" + (backdropClass() ? \" \" + backdropClass() : \"\")',\n\t\t'[class.show]': '!animation()',\n\t\t'[class.fade]': 'animation()'\n\t}\n})\nexport class HubModalBackdrop implements OnInit {\n\tprivate _nativeElement = inject(ElementRef).nativeElement as HTMLElement;\n\tprivate _zone = inject(NgZone);\n\tprivate _injector = inject(Injector);\n\n\t/**\n\t * Determines whether the backdrop should use CSS transitions during its initialization and destruction.\n\t */\n\treadonly animation = input<boolean>(true);\n\n\t/**\n\t * Allows applying a custom CSS class to the backdrop element.\n\t */\n\treadonly backdropClass = input<string>();\n\n\tngOnInit() {\n\t\t// `NgZone.onStable` never emits under `provideZonelessChangeDetection` (the zone is a\n\t\t// `NoopNgZone`), so the entry transition never ran there. `afterNextRender` fires in\n\t\t// both modes. See the same fix in `HubModalWindowComponent.ngOnInit`.\n\t\tafterNextRender(\n\t\t\t() => {\n\t\t\t\thubRunTransition(\n\t\t\t\t\tthis._zone,\n\t\t\t\t\tthis._nativeElement,\n\t\t\t\t\t(element: HTMLElement, animation: boolean) => {\n\t\t\t\t\t\tif (animation) {\n\t\t\t\t\t\t\treflow(element);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telement.classList.add('show');\n\t\t\t\t\t},\n\t\t\t\t\t{ animation: this.animation(), runningTransition: 'continue' }\n\t\t\t\t);\n\t\t\t},\n\t\t\t{ injector: this._injector }\n\t\t);\n\t}\n\n\t/**\n\t * Triggers the hide transition for the backdrop element and removes the `show` CSS class.\n\t *\n\t * @returns An observable that completes once the exit transition has ended.\n\t */\n\thide(): Observable<void> {\n\t\treturn hubRunTransition(this._zone, this._nativeElement, ({ classList }) => classList.remove('show'), {\n\t\t\tanimation: this.animation(),\n\t\t\trunningTransition: 'stop'\n\t\t});\n\t}\n}\n","import { ComponentRef, InjectionToken } from '@angular/core';\nimport { ContentRef, isDefined, isPromise } from 'ng-hub-ui-utils';\nimport { Observable, of, Subject, zip } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { HubModalBackdrop } from './modal-backdrop';\nimport { HubModalOptions, HubModalUpdatableOptions } from './modal-config';\nimport { HubModalWindow } from './modal-window';\n\n/**\n * Injection token carrying the `HubModalOptions.data` payload down to the modal\n * content component. Inject it to read the payload in a typed way, mirroring the\n * Angular CDK `DIALOG_DATA` pattern:\n *\n * ```ts\n * private readonly data = inject(HUB_MODAL_DATA) as MyPayload;\n * ```\n *\n * It is provided alongside `HubActiveModal` in the content component's element\n * injector and resolves to `null` when no `data` option was supplied.\n *\n * @since 22.3.0\n */\nexport const HUB_MODAL_DATA = new InjectionToken<unknown>('HUB_MODAL_DATA');\n\n/**\n * A reference to the currently opened (active) modal.\n *\n * Instances of this class can be injected into your component passed as modal content.\n * So you can `.update()`, `.close()` or `.dismiss()` the modal window from your component.\n *\n * The optional generic parameter `D` types the {@link HubActiveModal.data} payload\n * passed through `HubModalOptions.data`.\n */\nexport class HubActiveModal<D = unknown> {\n\t/**\n\t * Creates the active modal reference.\n\t *\n\t * @param _data The payload supplied via `HubModalOptions.data`, if any.\n\t */\n\tconstructor(private readonly _data: D = null as D) {}\n\n\t/**\n\t * The typed payload passed to the modal through `HubModalOptions.data`.\n\t *\n\t * Equivalent to injecting the {@link HUB_MODAL_DATA} token, but strongly typed\n\t * when the generic parameter `D` is supplied. Resolves to `null` when no `data`\n\t * option was provided.\n\t *\n\t * @since 22.3.0\n\t */\n\tget data(): D {\n\t\treturn this._data;\n\t}\n\n\t/**\n\t * Updates options of an opened modal.\n\t *\n\t * @since 14.2.0\n\t */\n\tupdate(options: HubModalUpdatableOptions): void {}\n\t/**\n\t * Closes the modal with an optional `result` value.\n\t *\n\t * The `HubModalRef.result` promise will be resolved with the provided value.\n\t */\n\tclose(result?: any): void {}\n\n\t/**\n\t * Dismisses the modal with an optional `reason` value.\n\t *\n\t * The `HubModalRef.result` promise will be rejected with the provided value.\n\t */\n\tdismiss(reason?: any): void {}\n}\n\nconst WINDOW_ATTRIBUTES: string[] = [\n\t'animation',\n\t'ariaLabelledBy',\n\t'ariaDescribedBy',\n\t'backdrop',\n\t'centered',\n\t'placement',\n\t'fullscreen',\n\t'keyboard',\n\t'scrollable',\n\t'size',\n\t'variant',\n\t'windowClass',\n\t'modalDialogClass'\n];\nconst BACKDROP_ATTRIBUTES: string[] = ['animation', 'backdropClass'];\n\n/**\n * A reference to the newly opened modal returned by the `HubModal.open()` method.\n */\nexport class HubModalRef<T = any> {\n\tprivate _closed = new Subject<any>();\n\tprivate _dismissed = new Subject<any>();\n\tprivate _hidden = new Subject<void>();\n\tprivate _resolve!: (result?: any) => void;\n\tprivate _reject!: (reason?: any) => void;\n\n\tprivate _applyWindowOptions(windowComponentRef: ComponentRef<HubModalWindow>, options: HubModalOptions): void {\n\t\tWINDOW_ATTRIBUTES.forEach((optionName: string) => {\n\t\t\tconst opts: any = options as any;\n\t\t\tif (isDefined(opts[optionName])) {\n\t\t\t\twindowComponentRef.setInput(optionName, opts[optionName]);\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _applyBackdropOptions(backdropComponentRef: ComponentRef<HubModalBackdrop>, options: HubModalOptions): void {\n\t\tBACKDROP_ATTRIBUTES.forEach((optionName: string) => {\n\t\t\tconst opts: any = options as any;\n\t\t\tif (isDefined(opts[optionName])) {\n\t\t\t\tbackdropComponentRef.setInput(optionName, opts[optionName]);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Updates options of an opened modal.\n\t *\n\t * @since 14.2.0\n\t */\n\tupdate(options: HubModalUpdatableOptions): void {\n\t\tthis._applyWindowOptions(this._windowCmptRef, options);\n\t\tif (this._backdropCmptRef && this._backdropCmptRef.instance) {\n\t\t\tthis._applyBackdropOptions(this._backdropCmptRef, options);\n\t\t}\n\t}\n\n\t/**\n\t * The instance of a component used for the modal content.\n\t *\n\t * When a `TemplateRef` is used as the content or when the modal is closed, will return `undefined`.\n\t */\n\tget componentInstance(): T | void {\n\t\tif (this._contentRef && this._contentRef.componentRef) {\n\t\t\treturn this._contentRef.componentRef.instance;\n\t\t}\n\t}\n\n\t/**\n\t * The promise that is resolved when the modal is closed and rejected when the modal is dismissed.\n\t */\n\tresult: Promise<any>;\n\n\t/**\n\t * The observable that emits when the modal is closed via the `.close()` method.\n\t *\n\t * It will emit the result passed to the `.close()` method.\n\t *\n\t * @since 8.0.0\n\t */\n\tget closed(): Observable<any> {\n\t\treturn this._closed.asObservable().pipe(takeUntil(this._hidden));\n\t}\n\n\t/**\n\t * The observable that emits when the modal is dismissed via the `.dismiss()` method.\n\t *\n\t * It will emit the reason passed to the `.dismissed()` method by the user, or one of the internal\n\t * reasons like backdrop click or ESC key press.\n\t *\n\t * @since 8.0.0\n\t */\n\tget dismissed(): Observable<any> {\n\t\treturn this._dismissed.asObservable().pipe(takeUntil(this._hidden));\n\t}\n\n\t/**\n\t * The observable that emits when both modal window and backdrop are closed and animations were finished.\n\t * At this point modal and backdrop elements will be removed from the DOM tree.\n\t *\n\t * This observable will be completed after emitting.\n\t *\n\t * @since 8.0.0\n\t */\n\tget hidden(): Observable<void> {\n\t\treturn this._hidden.asObservable();\n\t}\n\n\t/**\n\t * The observable that emits when modal is fully visible and animation was finished.\n\t * Modal DOM element is always available synchronously after calling 'modal.open()' service.\n\t *\n\t * This observable will be completed after emitting.\n\t * It will not emit, if modal is closed before open animation is finished.\n\t *\n\t * @since 8.0.0\n\t */\n\tget shown(): Observable<void> {\n\t\treturn this._windowCmptRef.instance.shown.asObservable();\n\t}\n\n\tconstructor(\n\t\tprivate _windowCmptRef: ComponentRef<HubModalWindow>,\n\t\tprivate _contentRef: ContentRef,\n\t\tprivate _backdropCmptRef?: ComponentRef<HubModalBackdrop>,\n\t\tprivate _beforeDismiss?: () => boolean | Promise<boolean>\n\t) {\n\t\t_windowCmptRef.instance.dismissEvent.subscribe((reason: any) => {\n\t\t\tthis.dismiss(reason);\n\t\t});\n\n\t\tthis.result = new Promise((resolve, reject) => {\n\t\t\tthis._resolve = resolve;\n\t\t\tthis._reject = reject;\n\t\t});\n\t\tthis.result.then(null, () => {});\n\t}\n\n\t/**\n\t * Closes the modal with an optional `result` value.\n\t *\n\t * The `HubMobalRef.result` promise will be resolved with the provided value.\n\t */\n\tclose(result?: any): void {\n\t\tif (this._windowCmptRef) {\n\t\t\tthis._closed.next(result);\n\t\t\tthis._resolve(result);\n\t\t\tthis._removeModalElements();\n\t\t}\n\t}\n\n\tprivate _dismiss(reason?: any) {\n\t\tthis._dismissed.next(reason);\n\t\tthis._reject(reason);\n\t\tthis._removeModalElements();\n\t}\n\n\t/**\n\t * Dismisses the modal with an optional `reason` value.\n\t *\n\t * The `HubModalRef.result` promise will be rejected with the provided value.\n\t */\n\tdismiss(reason?: any): void {\n\t\tif (this._windowCmptRef) {\n\t\t\tif (!this._beforeDismiss) {\n\t\t\t\tthis._dismiss(reason);\n\t\t\t} else {\n\t\t\t\tconst dismiss = this._beforeDismiss();\n\t\t\t\tif (isPromise(dismiss as any)) {\n\t\t\t\t\t(dismiss as Promise<boolean>).then(\n\t\t\t\t\t\t(result) => {\n\t\t\t\t\t\t\tif (result !== false) {\n\t\t\t\t\t\t\t\tthis._dismiss(reason);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t() => {}\n\t\t\t\t\t);\n\t\t\t\t} else if (dismiss !== false) {\n\t\t\t\t\tthis._dismiss(reason);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate _removeModalElements() {\n\t\tconst windowTransition$ = this._windowCmptRef.instance.hide();\n\t\tconst backdropTransition$ = this._backdropCmptRef ? this._backdropCmptRef.instance.hide() : of(undefined);\n\n\t\t// hiding window\n\t\twindowTransition$.subscribe(() => {\n\t\t\tconst { nativeElement } = this._windowCmptRef.location;\n\t\t\tnativeElement.parentNode?.removeChild(nativeElement);\n\t\t\tthis._windowCmptRef.destroy();\n\t\t\tthis._contentRef?.viewRef?.destroy();\n\n\t\t\tthis._windowCmptRef = <any>null;\n\t\t\tthis._contentRef = <any>null;\n\t\t});\n\n\t\t// hiding backdrop\n\t\tbackdropTransition$.subscribe(() => {\n\t\t\tif (this._backdropCmptRef) {\n\t\t\t\tconst { nativeElement } = this._backdropCmptRef.location;\n\t\t\t\tnativeElement.parentNode?.removeChild(nativeElement);\n\t\t\t\tthis._backdropCmptRef.destroy();\n\t\t\t\tthis._backdropCmptRef = <any>null;\n\t\t\t}\n\t\t});\n\n\t\t// all done\n\t\tzip(windowTransition$, backdropTransition$).subscribe(() => {\n\t\t\tthis._hidden.next();\n\t\t\tthis._hidden.complete();\n\t\t});\n\t}\n}\n","export enum ModalDismissReasons {\n\tBACKDROP_CLICK,\n\tESC,\n}\n","import { DOCUMENT } from '@angular/common';\nimport {\n\tafterNextRender,\n\tComponent,\n\tElementRef,\n\tinject,\n\tInjector,\n\tinput,\n\tNgZone,\n\tOnDestroy,\n\tOnInit,\n\toutput,\n\tviewChild,\n\tViewEncapsulation\n} from '@angular/core';\nimport { getFocusableBoundaryElements, hubRunTransition, isString, reflow, TransitionOptions } from 'ng-hub-ui-utils';\nimport { fromEvent, Observable, Subject, zip } from 'rxjs';\nimport { filter, switchMap, take, takeUntil, tap } from 'rxjs/operators';\nimport { ModalDismissReasons } from './modal-dismiss-reasons';\nimport { HubModalPlacement } from './modal-placement';\n\n/**\n * The internal component representing the modal window.\n * It renders the modal dialog structure, handles ARIA attributes, encapsulates the projected content,\n * and manages interactions like keyboard dismissals and backdrop clicks.\n */\n@Component({\n\tselector: 'hub-modal-window',\n\timports: [],\n\thost: {\n\t\t'[class]':\n\t\t\t'\"hub-modal\" + hostPlacementClass + (variant() ? \" hub-modal--\" + variant() : \"\") + (windowClass() ? \" \" + windowClass() : \"\")',\n\t\t'[class.fade]': 'animation()',\n\t\trole: 'dialog',\n\t\ttabindex: '-1',\n\t\t'[attr.aria-modal]': 'true',\n\t\t'[attr.aria-labelledby]': 'ariaLabelledBy()',\n\t\t'[attr.aria-describedby]': 'ariaDescribedBy()'\n\t},\n\ttemplate: `\n\t\t<div\n\t\t\t#dialog\n\t\t\t[class]=\"\n\t\t\t\t'hub-modal__dialog' +\n\t\t\t\t(size() ? ' hub-modal__dialog--' + size() : '') +\n\t\t\t\tplacementClass +\n\t\t\t\tcenteredClass +\n\t\t\t\tfullscreenClass +\n\t\t\t\t(scrollable() ? ' hub-modal__dialog--scrollable' : '') +\n\t\t\t\t(modalDialogClass() ? ' ' + modalDialogClass() : '')\n\t\t\t\"\n\t\t\trole=\"document\"\n\t\t>\n\t\t\t<div class=\"hub-modal__content\">\n\t\t\t\t@if (singleContent) {\n\t\t\t\t\t<div #bodyContainer class=\"hub-modal__body\"></div>\n\t\t\t\t} @else {\n\t\t\t\t\t<div #headerContainer class=\"hub-modal__header\">\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t#closeButton\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tclass=\"hub-modal__close\"\n\t\t\t\t\t\t\taria-label=\"Close\"\n\t\t\t\t\t\t\t(click)=\"dismiss(null)\"\n\t\t\t\t\t\t></button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div #bodyContainer class=\"hub-modal__body\"></div>\n\t\t\t\t\t<div #footerContainer class=\"hub-modal__footer\"></div>\n\t\t\t\t}\n\t\t\t</div>\n\t\t</div>\n\t`,\n\tencapsulation: ViewEncapsulation.None,\n\tstyleUrl: './modal.scss'\n})\nexport class HubModalWindow implements OnInit, OnDestroy {\n\tprivate _document = inject(DOCUMENT);\n\tprivate _elRef = inject(ElementRef<HTMLElement>);\n\tprivate _zone = inject(NgZone);\n\tprivate _injector = inject(Injector);\n\n\tprivate _closed$ = new Subject<void>();\n\tprivate _elWithFocus: Element | null = null; // element that is focused prior to modal opening\n\n\tprivate readonly _dialogEl = viewChild.required<ElementRef<HTMLElement>>('dialog');\n\tprivate readonly _headerContainerEl = viewChild<ElementRef<HTMLElement>>('headerContainer');\n\tprivate readonly _bodyContainerEl = viewChild<ElementRef<HTMLElement>>('bodyContainer');\n\tprivate readonly _footerContainerEl = viewChild<ElementRef<HTMLElement>>('footerContainer');\n\tprivate readonly _closeButtonEl = viewChild<ElementRef<HTMLButtonElement>>('closeButton');\n\n\t/**\n\t * Determines whether the modal window should animate its entry and exit.\n\t */\n\treadonly animation = input<boolean>(true);\n\n\t/**\n\t * Identifier to apply to the `aria-labelledby` attribute of the modal.\n\t */\n\treadonly ariaLabelledBy = input<string>();\n\n\t/**\n\t * Identifier to apply to the `aria-describedby` attribute of the modal.\n\t */\n\treadonly ariaDescribedBy = input<string>();\n\n\t/**\n\t * Configures the presence and behavior of the modal backdrop (`true`, `false`, or `'static'`).\n\t */\n\treadonly backdrop = input<boolean | string>(true);\n\n\t/**\n\t * If `true`, the modal dialog will be centered vertically.\n\t */\n\treadonly centered = input<boolean>();\n\n\t/**\n\t * Specifies the modal placement inside the viewport.\n\t */\n\treadonly placement = input<HubModalPlacement>(HubModalPlacement.Center);\n\n\t/**\n\t * Enables fullscreen mode for the modal, either always (`true`) or below specific breakpoints.\n\t */\n\treadonly fullscreen = input<string | boolean>();\n\n\t/**\n\t * If `true`, pressing the ESC key will close the modal.\n\t */\n\treadonly keyboard = input(true);\n\n\t/**\n\t * If `true`, the modal content will be scrollable when it exceeds the viewport height.\n\t */\n\treadonly scrollable = input<boolean>();\n\n\t/**\n\t * Specifies the size of the modal (`'sm'`, `'lg'`, `'xl'`, etc.).\n\t */\n\treadonly size = input<string>();\n\n\t/**\n\t * Semantic accent of the modal (`'primary'`, `'success'`, `'danger'`,\n\t * `'warning'`, `'info'`, or any custom token name). Applies the\n\t * `hub-modal--<variant>` class, which paints an accent top bar on the dialog.\n\t */\n\treadonly variant = input<string>();\n\n\t/**\n\t * A custom CSS class to append to the modal window wrapper.\n\t */\n\treadonly windowClass = input<string>();\n\n\t/**\n\t * A custom CSS class to append to the inner modal dialog element.\n\t */\n\treadonly modalDialogClass = input<string>();\n\n\tsingleContent!: boolean;\n\n\t/**\n\t * Emits when the user dismisses the modal (e.g. via ESC, backdrop click, or custom close buttons).\n\t */\n\treadonly dismissEvent = output({ alias: 'dismiss' });\n\n\t/**\n\t * Emits and completes once the modal window is fully visible and its transition has ended.\n\t */\n\tshown = new Subject<void>();\n\n\t/**\n\t * Emits and completes once the modal is fully hidden and its DOM elements are ready to be destroyed.\n\t */\n\thidden = new Subject<void>();\n\n\t/**\n\t * Computes the CSS class for fullscreen behavior based on the `fullscreen` input.\n\t */\n\tget fullscreenClass(): string {\n\t\tconst fullscreen = this.fullscreen();\n\t\treturn fullscreen === true\n\t\t\t? ' hub-modal__dialog--fullscreen'\n\t\t\t: isString(fullscreen)\n\t\t\t\t? ` hub-modal__dialog--fullscreen-${fullscreen}-down`\n\t\t\t\t: '';\n\t}\n\n\t/**\n\t * Computes the CSS class corresponding to the requested modal placement.\n\t */\n\tget placementClass(): string {\n\t\tconst placement = this.placement();\n\t\treturn placement && placement !== HubModalPlacement.Center ? ` hub-modal__dialog--placement-${placement}` : '';\n\t}\n\n\t/**\n\t * Computes the CSS class applied to the modal host to control viewport anchoring.\n\t */\n\tget hostPlacementClass(): string {\n\t\tconst placement = this.placement();\n\t\treturn placement && placement !== HubModalPlacement.Center ? ` hub-modal--placement-${placement}` : '';\n\t}\n\n\t/**\n\t * Computes the CSS class used to center the modal on the secondary axis, depending on its placement.\n\t */\n\tget centeredClass(): string {\n\t\tif (!this.centered()) {\n\t\t\treturn '';\n\t\t}\n\n\t\tswitch (this.placement()) {\n\t\t\tcase HubModalPlacement.Start:\n\t\t\tcase HubModalPlacement.End:\n\t\t\t\treturn ' hub-modal__dialog--centered-vertical';\n\t\t\tcase HubModalPlacement.Top:\n\t\t\tcase HubModalPlacement.Bottom:\n\t\t\t\treturn '';\n\t\t\tcase HubModalPlacement.Center:\n\t\t\tdefault:\n\t\t\t\treturn ' hub-modal__dialog--centered';\n\t\t}\n\t}\n\n\t/**\n\t * Dismisses the modal by emitting the `dismissEvent` with the provided reason.\n\t *\n\t * @param reason The reason the modal was dismissed (e.g. 'ESC', 'BACKDROP_CLICK', or custom data).\n\t */\n\tdismiss(reason: any): void {\n\t\tthis.dismissEvent.emit(reason);\n\t}\n\n\t/**\n\t * Attaches the projected content nodes into their respective structural containers\n\t * (header, body, and footer) within the modal dialog.\n\t *\n\t * @param contentNodes A nested array containing nodes segmented into header, body, and footer parts.\n\t */\n\tattachContent([headerNodes, bodyNodes, footerNodes]: Node[][]): void {\n\t\tconst bodyContainer = this._bodyContainerEl()?.nativeElement;\n\t\tif (!bodyContainer) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.singleContent) {\n\t\t\tthis._appendNodes(bodyContainer, bodyNodes);\n\t\t\treturn;\n\t\t}\n\n\t\tconst headerContainer = this._headerContainerEl()?.nativeElement;\n\t\tconst footerContainer = this._footerContainerEl()?.nativeElement;\n\t\tconst closeButton = this._closeButtonEl()?.nativeElement ?? null;\n\n\t\tif (headerContainer) {\n\t\t\tthis._appendNodes(headerContainer, headerNodes, closeButton);\n\t\t}\n\t\tthis._appendNodes(bodyContainer, bodyNodes);\n\t\tif (footerContainer) {\n\t\t\tthis._appendNodes(footerContainer, footerNodes);\n\t\t}\n\t}\n\n\tngOnInit() {\n\t\tthis._elWithFocus = this._document.activeElement;\n\t\t// Defer until the window's own DOM is laid out, then run the entry transition and\n\t\t// arm the Escape / backdrop-click handlers.\n\t\t//\n\t\t// This used to wait on `NgZone.onStable`. Under `provideZonelessChangeDetection`\n\t\t// the injected zone is a `NoopNgZone` whose `onStable` never emits, so `_show()`\n\t\t// never ran: the window never got its `show` class and — far worse — never called\n\t\t// `_enableEventHandling()`, leaving every modal in a zoneless app unclosable by\n\t\t// Escape or by clicking the backdrop. `afterNextRender` is the zone-agnostic hook\n\t\t// for \"the DOM exists now\", and fires in both modes.\n\t\tafterNextRender(() => this._show(), { injector: this._injector });\n\t}\n\n\tngOnDestroy() {\n\t\tthis._disableEventHandling();\n\t}\n\n\t/**\n\t * Determines the focus element, blocks further interactions, configures the exit transition context,\n\t * removes 'show' CSS classes from the modal, and restores focus back to the previously focused element.\n\t *\n\t * @returns An observable that emits when the exit transition completely finishes.\n\t */\n\thide(): Observable<any> {\n\t\tconst { nativeElement } = this._elRef;\n\t\tconst context: TransitionOptions<any> = {\n\t\t\tanimation: this.animation(),\n\t\t\trunningTransition: 'stop'\n\t\t};\n\n\t\tconst windowTransition$ = hubRunTransition(\n\t\t\tthis._zone,\n\t\t\tnativeElement,\n\t\t\t() => nativeElement.classList.remove('show'),\n\t\t\tcontext\n\t\t);\n\t\tconst dialogTransition$ = hubRunTransition(this._zone, this._dialogEl().nativeElement, () => {}, context);\n\n\t\tconst transitions$ = zip(windowTransition$, dialogTransition$);\n\t\ttransitions$.subscribe(() => {\n\t\t\tthis.hidden.next();\n\t\t\tthis.hidden.complete();\n\t\t});\n\n\t\tthis._disableEventHandling();\n\t\tthis._restoreFocus();\n\n\t\treturn transitions$;\n\t}\n\n\tprivate _show() {\n\t\tconst context: TransitionOptions<any> = {\n\t\t\tanimation: this.animation(),\n\t\t\trunningTransition: 'continue'\n\t\t};\n\n\t\tconst windowTransition$ = hubRunTransition(\n\t\t\tthis._zone,\n\t\t\tthis._elRef.nativeElement,\n\t\t\t(element: HTMLElement, animation: boolean) => {\n\t\t\t\tif (animation) {\n\t\t\t\t\treflow(element);\n\t\t\t\t}\n\t\t\t\telement.classList.add('show');\n\t\t\t},\n\t\t\tcontext\n\t\t);\n\t\tconst dialogTransition$ = hubRunTransition(this._zone, this._dialogEl().nativeElement, () => {}, context);\n\n\t\tzip(windowTransition$, dialogTransition$).subscribe(() => {\n\t\t\tthis.shown.next();\n\t\t\tthis.shown.complete();\n\t\t});\n\n\t\tthis._enableEventHandling();\n\t\tthis._setFocus();\n\t}\n\n\tprivate _enableEventHandling() {\n\t\tconst { nativeElement } = this._elRef;\n\t\tthis._zone.runOutsideAngular(() => {\n\t\t\tfromEvent<KeyboardEvent>(nativeElement, 'keydown')\n\t\t\t\t.pipe(\n\t\t\t\t\ttakeUntil(this._closed$),\n\t\t\t\t\tfilter((e) => e.key === 'Escape')\n\t\t\t\t)\n\t\t\t\t.subscribe((event) => {\n\t\t\t\t\tif (this.keyboard()) {\n\t\t\t\t\t\trequestAnimationFrame(() => {\n\t\t\t\t\t\t\tif (!event.defaultPrevented) {\n\t\t\t\t\t\t\t\tthis._zone.run(() => this.dismiss(ModalDismissReasons.ESC));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t} else if (this.backdrop() === 'static') {\n\t\t\t\t\t\tthis._bumpBackdrop();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t// We're listening to 'mousedown' and 'mouseup' to prevent modal from closing when pressing the mouse\n\t\t\t// inside the modal dialog and releasing it outside\n\t\t\tlet preventClose = false;\n\t\t\tfromEvent<MouseEvent>(this._dialogEl().nativeElement, 'mousedown')\n\t\t\t\t.pipe(\n\t\t\t\t\ttakeUntil(this._closed$),\n\t\t\t\t\ttap(() => (preventClose = false)),\n\t\t\t\t\tswitchMap(() => fromEvent<MouseEvent>(nativeElement, 'mouseup').pipe(takeUntil(this._closed$), take(1))),\n\t\t\t\t\tfilter(({ target }) => nativeElement === target)\n\t\t\t\t)\n\t\t\t\t.subscribe(() => {\n\t\t\t\t\tpreventClose = true;\n\t\t\t\t});\n\n\t\t\t// We're listening to 'click' to dismiss modal on modal window click, except when:\n\t\t\t// 1. clicking on modal dialog itself\n\t\t\t// 2. closing was prevented by mousedown/up handlers\n\t\t\t// 3. clicking on scrollbar when the viewport is too small and modal doesn't fit (click is not triggered at all)\n\t\t\tfromEvent<MouseEvent>(nativeElement, 'click')\n\t\t\t\t.pipe(takeUntil(this._closed$))\n\t\t\t\t.subscribe(({ target }) => {\n\t\t\t\t\tif (nativeElement === target) {\n\t\t\t\t\t\tconst backdrop = this.backdrop();\n\t\t\t\t\t\tif (backdrop === 'static') {\n\t\t\t\t\t\t\tthis._bumpBackdrop();\n\t\t\t\t\t\t} else if (backdrop === true && !preventClose) {\n\t\t\t\t\t\t\tthis._zone.run(() => this.dismiss(ModalDismissReasons.BACKDROP_CLICK));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tpreventClose = false;\n\t\t\t\t});\n\t\t});\n\t}\n\n\tprivate _disableEventHandling() {\n\t\tthis._closed$.next();\n\t}\n\n\tprivate _setFocus() {\n\t\tconst { nativeElement } = this._elRef;\n\t\tif (!nativeElement.contains(document.activeElement)) {\n\t\t\tconst autoFocusable = nativeElement.querySelector(`[hubAutofocus]`) as HTMLElement;\n\t\t\tconst firstFocusable = getFocusableBoundaryElements(nativeElement)[0];\n\n\t\t\tconst elementToFocus = autoFocusable || firstFocusable || nativeElement;\n\t\t\telementToFocus.focus();\n\t\t}\n\t}\n\n\tprivate _restoreFocus() {\n\t\tconst body = this._document.body;\n\t\tconst elWithFocus = this._elWithFocus;\n\n\t\tlet elementToFocus: HTMLElement;\n\t\tif (elWithFocus instanceof HTMLElement && body.contains(elWithFocus)) {\n\t\t\telementToFocus = elWithFocus;\n\t\t} else {\n\t\t\telementToFocus = body as unknown as HTMLElement;\n\t\t}\n\t\tthis._zone.runOutsideAngular(() => {\n\t\t\tsetTimeout(() => elementToFocus.focus());\n\t\t\tthis._elWithFocus = null;\n\t\t});\n\t}\n\n\tprivate _bumpBackdrop() {\n\t\tif (this.backdrop() === 'static') {\n\t\t\thubRunTransition(\n\t\t\t\tthis._zone,\n\t\t\t\tthis._elRef.nativeElement,\n\t\t\t\t({ classList }) => {\n\t\t\t\t\tclassList.add('hub-modal--static');\n\t\t\t\t\treturn () => classList.remove('hub-modal--static');\n\t\t\t\t},\n\t\t\t\t{ animation: this.animation(), runningTransition: 'continue' }\n\t\t\t);\n\t\t}\n\t}\n\n\tprivate _appendNodes(container: HTMLElement, nodes: Node[], beforeNode?: Node | null) {\n\t\tnodes.forEach((node) => {\n\t\t\tif (beforeNode) {\n\t\t\t\tcontainer.insertBefore(node, beforeNode);\n\t\t\t} else {\n\t\t\t\tcontainer.appendChild(node);\n\t\t\t}\n\t\t});\n\t}\n}\n","import { DOCUMENT } from '@angular/common';\nimport {\n\tApplicationRef,\n\tComponentRef,\n\tcreateComponent,\n\tEnvironmentInjector,\n\tEventEmitter,\n\tinject,\n\tInjectable,\n\tInjector,\n\tNgZone,\n\tTemplateRef,\n\tType\n} from '@angular/core';\nimport { ContentRef, hubFocusTrap, isDefined, isString, ScrollBar } from 'ng-hub-ui-utils';\nimport { Subject } from 'rxjs';\nimport { take } from 'rxjs/operators';\nimport { HubModalBackdrop } from './modal-backdrop';\nimport { HubModalOptions, HubModalUpdatableOptions } from './modal-config';\nimport { HUB_MODAL_DATA, HubActiveModal, HubModalRef } from './modal-ref';\nimport { HubModalWindow } from './modal-window';\n\n/**\n * A service that manages the stack of currently active modal windows.\n * It is responsible for creating, attaching, and orchestrating the rendering\n * of the modal dialogue, its backdrop, and its content.\n */\n@Injectable({ providedIn: 'root' })\nexport class HubModalStack {\n\tprivate _applicationRef = inject(ApplicationRef);\n\tprivate _injector = inject(Injector);\n\tprivate _environmentInjector = inject(EnvironmentInjector);\n\tprivate _document = inject(DOCUMENT);\n\tprivate _scrollBar = inject(ScrollBar);\n\n\tprivate _activeWindowCmptHasChanged = new Subject<void>();\n\tprivate _ariaHiddenValues: Map<Element, string | null> = new Map();\n\tprivate _scrollBarRestoreFn: null | (() => void) = null;\n\tprivate _modalRefs: HubModalRef[] = [];\n\tprivate _windowCmpts: ComponentRef<HubModalWindow>[] = [];\n\tprivate _activeInstances: EventEmitter<HubModalRef[]> = new EventEmitter();\n\n\tconstructor() {\n\t\tconst ngZone = inject(NgZone);\n\n\t\t// Trap focus on active WindowCmpt\n\t\tthis._activeWindowCmptHasChanged.subscribe(() => {\n\t\t\tif (this._windowCmpts.length) {\n\t\t\t\tconst activeWindowCmpt = this._windowCmpts[this._windowCmpts.length - 1];\n\t\t\t\thubFocusTrap(ngZone, activeWindowCmpt.location.nativeElement, this._activeWindowCmptHasChanged);\n\t\t\t\tthis._revertAriaHidden();\n\t\t\t\tthis._setAriaHidden(activeWindowCmpt.location.nativeElement);\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _restoreScrollBar() {\n\t\tconst scrollBarRestoreFn = this._scrollBarRestoreFn;\n\t\tif (scrollBarRestoreFn) {\n\t\t\tthis._scrollBarRestoreFn = null;\n\t\t\tscrollBarRestoreFn();\n\t\t}\n\t}\n\n\tprivate _hideScrollBar() {\n\t\tif (!this._scrollBarRestoreFn) {\n\t\t\tthis._scrollBarRestoreFn = this._scrollBar.hide();\n\t\t}\n\t}\n\n\t/**\n\t * Opens a new modal window configured with the provided options.\n\t *\n\t * @param contentInjector The dependency injector to be used for the modal content component.\n\t * @param content The content to display inside the modal. Can be a component class, a template reference, or a string.\n\t * @param options Configuration options that dictate how the modal is rendered and behaves.\n\t * @returns An instance of `HubModalRef` which can be used to control the modal or subscribe to its events.\n\t * @throws Error if the specified container element is not found in the DOM.\n\t */\n\topen(contentInjector: Injector, content: any, options: HubModalOptions): HubModalRef {\n\t\tconst containerEl =\n\t\t\toptions.container instanceof HTMLElement\n\t\t\t\t? options.container\n\t\t\t\t: isDefined(options.container)\n\t\t\t\t\t? this._document.querySelector(options.container!)\n\t\t\t\t\t: this._document.body;\n\n\t\tif (!containerEl) {\n\t\t\tthrow new Error(`The specified modal container \"${options.container || 'body'}\" was not found in the DOM.`);\n\t\t}\n\n\t\tthis._hideScrollBar();\n\n\t\tconst activeModal = new HubActiveModal(options.data ?? null);\n\n\t\tcontentInjector = options.injector || contentInjector;\n\t\tconst environmentInjector = contentInjector.get(EnvironmentInjector, null) || this._environmentInjector;\n\t\tconst contentRef = this._getContentRef(contentInjector, environmentInjector, content, activeModal, options);\n\n\t\tconst backdropCmptRef: ComponentRef<HubModalBackdrop> | undefined =\n\t\t\toptions.backdrop !== false ? this._attachBackdrop(containerEl) : undefined;\n\t\tconst windowCmptRef: ComponentRef<HubModalWindow> = this._attachWindowComponent(containerEl, contentRef.nodes, options);\n\t\tconst hubModalRef: HubModalRef = new HubModalRef(windowCmptRef, contentRef, backdropCmptRef, options.beforeDismiss);\n\n\t\tthis._registerModalRef(hubModalRef);\n\t\tthis._registerWindowCmpt(windowCmptRef);\n\n\t\t// We have to cleanup DOM after the last modal when BOTH 'hidden' was emitted and 'result' promise was resolved:\n\t\t// - with animations OFF, 'hidden' emits synchronously, then 'result' is resolved asynchronously\n\t\t// - with animations ON, 'result' is resolved asynchronously, then 'hidden' emits asynchronously\n\t\thubModalRef.hidden.pipe(take(1)).subscribe(() =>\n\t\t\tPromise.resolve(true).then(() => {\n\t\t\t\tif (!this._modalRefs.length) {\n\t\t\t\t\tthis._document.body.classList.remove('hub-modal-open');\n\t\t\t\t\tthis._restoreScrollBar();\n\t\t\t\t\tthis._revertAriaHidden();\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\n\t\tactiveModal.close = (result: any) => {\n\t\t\thubModalRef.close(result);\n\t\t};\n\t\tactiveModal.dismiss = (reason: any) => {\n\t\t\thubModalRef.dismiss(reason);\n\t\t};\n\n\t\tactiveModal.update = (options: HubModalUpdatableOptions) => {\n\t\t\thubModalRef.update(options);\n\t\t};\n\n\t\thubModalRef.update(options);\n\t\tif (this._modalRefs.length === 1) {\n\t\t\tthis._document.body.classList.add('hub-modal-open');\n\t\t}\n\n\t\tif (backdropCmptRef && backdropCmptRef.instance) {\n\t\t\tbackdropCmptRef.changeDetectorRef.detectChanges();\n\t\t}\n\t\twindowCmptRef.changeDetectorRef.detectChanges();\n\t\treturn hubModalRef;\n\t}\n\n\t/**\n\t * Allows observing the array of active modal instances.\n\t *\n\t * @returns An event emitter that streams changes to the active modal references.\n\t */\n\tget activeInstances() {\n\t\treturn this._activeInstances;\n\t}\n\n\t/**\n\t * Dismisses all currently open modal windows.\n\t *\n\t * @param reason Optional reason to pass to the dismissal routines of the active modals.\n\t */\n\tdismissAll(reason?: any) {\n\t\tthis._modalRefs.forEach((hubModalRef) => hubModalRef.dismiss(reason));\n\t}\n\n\t/**\n\t * Checks whether there are any currently open modal windows.\n\t *\n\t * @returns `true` if at least one modal is active, `false` otherwise.\n\t */\n\thasOpenModals(): boolean {\n\t\treturn this._modalRefs.length > 0;\n\t}\n\n\tprivate _attachBackdrop(containerEl: Element): ComponentRef<HubModalBackdrop> {\n\t\tlet backdropCmptRef = createComponent(HubModalBackdrop, {\n\t\t\tenvironmentInjector: this._applicationRef.injector,\n\t\t\telementInjector: this._injector\n\t\t});\n\t\tthis._applicationRef.attachView(backdropCmptRef.hostView);\n\t\tcontainerEl.appendChild(backdropCmptRef.location.nativeElement);\n\t\treturn backdropCmptRef;\n\t}\n\n\tprivate _attachWindowComponent(\n\t\tcontainerEl: Element,\n\t\tcontentNodes: Node[][],\n\t\toptions: HubModalOptions\n\t): ComponentRef<HubModalWindow> {\n\t\tconst singleContent = !options.headerSelector && !options.footerSelector;\n\t\tlet windowCmptRef = createComponent(HubModalWindow, {\n\t\t\tenvironmentInjector: this._applicationRef.injector,\n\t\t\telementInjector: this._injector\n\t\t});\n\n\t\tObject.assign(windowCmptRef.instance, { singleContent });\n\n\t\tthis._applicationRef.attachView(windowCmptRef.hostView);\n\t\tcontainerEl.appendChild(windowCmptRef.location.nativeElement);\n\t\twindowCmptRef.changeDetectorRef.detectChanges();\n\t\twindowCmptRef.instance.attachContent(contentNodes);\n\t\treturn windowCmptRef;\n\t}\n\n\tprivate _getContentRef(\n\t\tcontentInjector: Injector,\n\t\tenvironmentInjector: EnvironmentInjector,\n\t\tcontent: Type<any> | TemplateRef<any> | string,\n\t\tactiveModal: HubActiveModal,\n\t\toptions: HubModalOptions\n\t): ContentRef {\n\t\tif (!content) {\n\t\t\treturn new ContentRef([]);\n\t\t} else if (content instanceof TemplateRef) {\n\t\t\treturn this._createFromTemplateRef(content, activeModal, options);\n\t\t} else if (isString(content)) {\n\t\t\treturn this._createFromString(content);\n\t\t} else {\n\t\t\treturn this._createFromComponent(contentInjector, environmentInjector, content, activeModal, options);\n\t\t}\n\t}\n\n\tprivate _createFromTemplateRef(\n\t\ttemplateRef: TemplateRef<any>,\n\t\tactiveModal: HubActiveModal,\n\t\toptions: HubModalOptions\n\t): ContentRef {\n\t\tconst context = {\n\t\t\t$implicit: activeModal,\n\t\t\tclose(result: any) {\n\t\t\t\tactiveModal.close(result);\n\t\t\t},\n\t\t\tdismiss(reason: any) {\n\t\t\t\tactiveModal.dismiss(reason);\n\t\t\t}\n\t\t};\n\t\tconst viewRef = templateRef.createEmbeddedView(context);\n\t\tthis._applicationRef.attachView(viewRef);\n\n\t\tconst containerNode = document.createElement('ng-container');\n\t\tcontainerNode.append(...viewRef.rootNodes);\n\n\t\tthis._addDismissEventListener(containerNode, context as any, options);\n\t\tthis._addCloseEventListener(containerNode, context as any, options);\n\n\t\treturn new ContentRef(\n\t\t\t[\n\t\t\t\toptions.headerSelector ? extractAndRemoveNodesBySelector(containerNode, options.headerSelector) : [],\n\t\t\t\tArray.from(containerNode.childNodes),\n\t\t\t\toptions.footerSelector ? extractAndRemoveNodesBySelector(containerNode, options.footerSelector) : []\n\t\t\t],\n\t\t\tviewRef\n\t\t);\n\t}\n\n\tprivate _createFromString(content: string): ContentRef {\n\t\tconst component = this._document.createTextNode(`${content}`);\n\t\treturn new ContentRef([[component]]);\n\t}\n\n\tprivate _createFromComponent(\n\t\tcontentInjector: Injector,\n\t\tenvironmentInjector: EnvironmentInjector,\n\t\tcomponentType: Type<any>,\n\t\tcontext: HubActiveModal,\n\t\toptions: HubModalOptions\n\t): ContentRef {\n\t\tconst elementInjector = Injector.create({\n\t\t\tproviders: [\n\t\t\t\t{ provide: HubActiveModal, useValue: context },\n\t\t\t\t{ provide: HUB_MODAL_DATA, useValue: options.data ?? null }\n\t\t\t],\n\t\t\tparent: contentInjector\n\t\t});\n\t\tconst componentRef = createComponent(componentType, {\n\t\t\tenvironmentInjector,\n\t\t\telementInjector\n\t\t});\n\n\t\t/**\n\t\t * @deprecated Since 22.3.0. Kept for one release for backward compatibility.\n\t\t * Prefer reading the payload through the typed `inject(HUB_MODAL_DATA)` token or\n\t\t * `inject(HubActiveModal).data`. This untyped monkey-patch of a `data` field on the\n\t\t * component instance will be removed in a future major.\n\t\t */\n\t\tif (options.data) {\n\t\t\tObject.assign(componentRef.instance, {\n\t\t\t\tdata: options.data\n\t\t\t});\n\t\t}\n\n\t\tconst componentNativeEl: HTMLElement = componentRef.location.nativeElement;\n\t\tif (options.scrollable) {\n\t\t\tcomponentNativeEl.classList.add('component-host-scrollable');\n\t\t}\n\t\tthis._applicationRef.attachView(componentRef.hostView);\n\n\t\tthis._addDismissEventListener(componentNativeEl, context, options);\n\t\tthis._addCloseEventListener(componentNativeEl, context as any, options);\n\n\t\t// FIXME: we should here get rid of the component nativeElement\n\t\t// and use `[Array.from(componentNativeEl.childNodes)]` instead and remove the above CSS class.\n\t\treturn new ContentRef(\n\t\t\t[\n\t\t\t\toptions.headerSelector ? extractAndRemoveNodesBySelector(componentNativeEl, options.headerSelector) : [],\n\t\t\t\tArray.from(componentNativeEl.childNodes),\n\t\t\t\toptions.footerSelector ? extractAndRemoveNodesBySelector(componentNativeEl, options.footerSelector) : []\n\t\t\t],\n\t\t\tcomponentRef.hostView,\n\t\t\tcomponentRef\n\t\t);\n\t}\n\n\tprivate _setAriaHidden(element: Element) {\n\t\tconst parent = element.parentElement;\n\t\tif (parent && element !== this._document.body) {\n\t\t\tArray.from(parent.children).forEach((sibling) => {\n\t\t\t\tif (sibling !== element && sibling.nodeName !== 'SCRIPT') {\n\t\t\t\t\tthis._ariaHiddenValues.set(sibling, sibling.getAttribute('aria-hidden'));\n\t\t\t\t\tsibling.setAttribute('aria-hidden', 'true');\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthis._setAriaHidden(parent);\n\t\t}\n\t}\n\n\tprivate _revertAriaHidden() {\n\t\tthis._ariaHiddenValues.forEach((value, element) => {\n\t\t\tif (value) {\n\t\t\t\telement.setAttribute('aria-hidden', value);\n\t\t\t} else {\n\t\t\t\telement.removeAttribute('aria-hidden');\n\t\t\t}\n\t\t});\n\t\tthis._ariaHiddenValues.clear();\n\t}\n\n\tprivate _registerModalRef(hubModalRef: HubModalRef) {\n\t\tconst unregisterModalRef = () => {\n\t\t\tconst index = this._modalRefs.indexOf(hubModalRef);\n\t\t\tif (index > -1) {\n\t\t\t\tthis._modalRefs.splice(index, 1);\n\t\t\t\tthis._activeInstances.emit(this._modalRefs);\n\t\t\t}\n\t\t};\n\t\tthis._modalRefs.push(hubModalRef);\n\t\tthis._activeInstances.emit(this._modalRefs);\n\t\thubModalRef.result.then(unregisterModalRef, unregisterModalRef);\n\t}\n\n\tprivate _registerWindowCmpt(hubWindowCmpt: ComponentRef<HubModalWindow>) {\n\t\tthis._windowCmpts.push(hubWindowCmpt);\n\t\tthis._activeWindowCmptHasChanged.next();\n\n\t\thubWindowCmpt.onDestroy(() => {\n\t\t\tconst index = this._windowCmpts.indexOf(hubWindowCmpt);\n\t\t\tif (index > -1) {\n\t\t\t\tthis._windowCmpts.splice(index, 1);\n\t\t\t\tthis._activeWindowCmptHasChanged.next();\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Attaches click event listeners to elements within a container based on a specified dismiss selector to dismiss a modal.\n\t *\n\t * @param {HTMLElement} container - The `container` parameter is an HTMLElement that represents the DOM element which contains the\n\t * modal content.\n\t * @param {HubActiveModal} context - The `context` parameter in the `_addDismissEventListener` function refers to the active modal\n\t * instance that is being displayed. It is used to call the `dismiss` method on the modal instance when a dismissible element is\n\t * clicked.\n\t * @param {HubModalOptions} options - The `options` parameter is an object that contains configuration options for the modal. It\n\t * may include properties such as `dismissSelector`, which is used to specify a CSS selector for elements that, when clicked, will\n\t * dismiss the modal by calling the `dismiss` method on the `context` object.\n\t */\n\tprivate _addDismissEventListener(container: HTMLElement, context: HubActiveModal, options: HubModalOptions) {\n\t\tif (options.dismissSelector) {\n\t\t\tconst dismissaable: NodeListOf<Element> = container.querySelectorAll(options.dismissSelector);\n\t\t\tfor (const item of Array.from(dismissaable)) {\n\t\t\t\titem.addEventListener('click', () => context.dismiss());\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Attaches click event listeners to elements matching a specified selector to close a modal window.\n\t *\n\t * @param {HTMLElement} container - The `container` parameter is an HTMLElement that represents the DOM element which contains the\n\t * modal content.\n\t * @param {HubActiveModal} context - The `context` parameter in the `_addCloseEventListener` function is of type `HubActiveModal`.\n\t * It is used to reference the active modal instance within the function and call the `close()` method on it when a close event is\n\t * triggered.\n\t * @param {HubModalOptions} options - The `options` parameter is an object that contains configuration options for the modal. It\n\t * may include properties such as `closeSelector`, which is used to specify the selector for elements that can trigger the modal\n\t * to close when clicked.\n\t */\n\tprivate _addCloseEventListener(container: HTMLElement, context: HubActiveModal, options: HubModalOptions) {\n\t\tif (options.closeSelector) {\n\t\t\tconst dismissaable: NodeListOf<Element> = container.querySelectorAll(options.closeSelector);\n\t\t\tfor (const item of Array.from(dismissaable)) {\n\t\t\t\tconst clickEventListeners = item.addEventListener('click', () => context.close());\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Extracts child nodes matching a selector from a container element, removes those nodes from the DOM, and returns them as an array.\n *\n * @param {HTMLElement} container - The `container` parameter in the `extractAndRemoveNodesBySelector` function is an HTMLElement\n * that represents the parent element within which we want to search for nodes matching a specific selector and remove them.\n * @param {string} selector - The `selector` parameter in the `extractAndRemoveNodesBySelector` function is a string that\n * represents a CSS selector. This selector is used to query and select specific elements within the `container` HTMLElement.\n *\n * @returns An array of nodes that were extracted from the container element based on the provided selector, and then removes those\n * nodes from the DOM.\n */\nfunction extractAndRemoveNodesBySelector(container: HTMLElement, selector: string): Array<Node> {\n\tlet containerNodes = container.querySelectorAll(selector);\n\n\tconst nodes = Array.from(containerNodes).reduce((acc, c) => {\n\t\treturn [...acc, ...Array.from(c.childNodes)];\n\t}, [] as Array<Node>);\n\n\t// Selecciona los nodos dentro del contenedor que coincidan con el selector\n\tconst nodesToRemove = container.querySelectorAll<HTMLElement>(selector);\n\n\t// Convertir NodeList a array y eliminar cada nodo del DOM\n\tArray.from(nodesToRemove).forEach((node) => node.remove());\n\treturn nodes;\n}\n","import { inject, Injectable, Injector } from '@angular/core';\n\nimport { HubModalConfig, HubModalOptions } from './modal-config';\nimport { HubModalRef } from './modal-ref';\nimport { HubModalStack } from './modal-stack';\n\n/**\n * A service for opening modal windows.\n *\n * Creating a modal is straightforward: create a component or a template and pass it as an argument to\n * the `.open()` method.\n */\n@Injectable({ providedIn: 'root' })\nexport class HubModal {\n\tprivate _injector = inject(Injector);\n\tprivate _modalStack = inject(HubModalStack);\n\tprivate _config = inject(HubModalConfig);\n\n\t/**\n\t * Opens a new modal window with the specified content and supplied options.\n\t *\n\t * Content can be provided as a `TemplateRef` or a component type. If you pass a component type as content,\n\t * then instances of those components can be injected with an instance of the `HubActiveModal` class. You can then\n\t * use `HubActiveModal` methods to close / dismiss modals from \"inside\" of your component.\n\t *\n\t * Also see the [`HubModalOptions`](#/components/modal/api#HubModalOptions) for the list of supported options.\n\t */\n\topen<T = any>(content: T, options: HubModalOptions = {}): HubModalRef<T> {\n\t\tconst combinedOptions = {\n\t\t\t...this._config,\n\t\t\tanimation: this._config.animation,\n\t\t\t...options\n\t\t};\n\t\treturn this._modalStack.open(this._injector, content, combinedOptions);\n\t}\n\n\t/**\n\t * Returns an observable that holds the active modal instances.\n\t */\n\tget activeInstances() {\n\t\treturn this._modalStack.activeInstances;\n\t}\n\n\t/**\n\t * Dismisses all currently displayed modal windows with the supplied reason.\n\t *\n\t * @since 3.1.0\n\t */\n\tdismissAll(reason?: any) {\n\t\tthis._modalStack.dismissAll(reason);\n\t}\n\n\t/**\n\t * Indicates if there are currently any open modal windows in the application.\n\t *\n\t * @since 3.3.0\n\t */\n\thasOpenModals(): boolean {\n\t\treturn this._modalStack.hasOpenModals();\n\t}\n}\n","import { NgModule } from '@angular/core';\nimport { HubModal } from './modal';\nexport { HubModal } from './modal';\nexport { HubModalConfig } from './modal-config';\nexport type { HubModalOptions, HubModalUpdatableOptions } from './modal-config';\nexport { ModalDismissReasons } from './modal-dismiss-reasons';\nexport { HubModalPlacement } from './modal-placement';\nexport { HUB_MODAL_DATA, HubActiveModal, HubModalRef } from './modal-ref';\n\n@NgModule({ providers: [HubModal] })\nexport class HubModalModule {}\n","/*\n * Public API Surface of modal\n */\nexport {\n\tModalDismissReasons,\n\tHUB_MODAL_DATA,\n\tHubActiveModal,\n\tHubModal,\n\tHubModalConfig,\n\tHubModalModule,\n\tHubModalPlacement,\n\tHubModalRef\n} from './lib/modal.module';\nexport type { HubModalOptions, HubModalUpdatableOptions } from './lib/modal.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAAA;;AAEG;IACS;AAAZ,CAAA,UAAY,iBAAiB,EAAA;AAC5B;;AAEG;AACH,IAAA,iBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AAEjB;;AAEG;AACH,IAAA,iBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AAEf;;AAEG;AACH,IAAA,iBAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AAEX;;AAEG;AACH,IAAA,iBAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AAEX;;AAEG;AACH,IAAA,iBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AAClB,CAAC,EAzBW,iBAAiB,KAAjB,iBAAiB,GAAA,EAAA,CAAA,CAAA;;ACiM7B;;;;;;;AAOG;MAEU,cAAc,CAAA;;AAElB,IAAA,UAAU;AAElB,IAAA,cAAc;AACd,IAAA,eAAe;IACf,QAAQ,GAAuB,IAAI;AACnC,IAAA,aAAa;AACb,IAAA,QAAQ;AACR,IAAA,SAAS,GAAsB,iBAAiB,CAAC,MAAM;AACvD,IAAA,SAAS;IACT,UAAU,GAAyD,KAAK;AACxE,IAAA,QAAQ;IACR,QA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AW,CAAC,UAAU,CAAC,MAAM,CAAC;IACpC;AAEA;;;;AAIG;IACH,aAAa,GAAA;AACZ,QAAA,OAAO,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE;IACxC;uGA9CY,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAR,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,QAAQ,cADK,MAAM,EAAA,CAAA;;2FACnB,QAAQ,EAAA,UAAA,EAAA,CAAA;kBADpB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;MCFrB,cAAc,CAAA;uGAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAd,cAAc,EAAA,CAAA;wGAAd,cAAc,EAAA,SAAA,EADJ,CAAC,QAAQ,CAAC,EAAA,CAAA;;2FACpB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE;;;ACTnC;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-hub-ui-modal.mjs","sources":["../../../projects/modal/src/lib/modal-placement.ts","../../../projects/modal/src/lib/modal-config.ts","../../../projects/modal/src/lib/modal-backdrop.ts","../../../projects/modal/src/lib/modal-ref.ts","../../../projects/modal/src/lib/modal-dismiss-reasons.ts","../../../projects/modal/src/lib/modal-window.ts","../../../projects/modal/src/lib/modal-stack.ts","../../../projects/modal/src/lib/modal.ts","../../../projects/modal/src/lib/modal.module.ts","../../../projects/modal/src/public-api.ts","../../../projects/modal/src/ng-hub-ui-modal.ts"],"sourcesContent":["/**\n * Supported modal placements within the viewport.\n */\nexport enum HubModalPlacement {\n\t/**\n\t * Places the modal in the center of the viewport.\n\t */\n\tCenter = 'center',\n\n\t/**\n\t * Anchors the modal to the start edge of the viewport.\n\t */\n\tStart = 'start',\n\n\t/**\n\t * Anchors the modal to the end edge of the viewport.\n\t */\n\tEnd = 'end',\n\n\t/**\n\t * Anchors the modal to the top edge of the viewport.\n\t */\n\tTop = 'top',\n\n\t/**\n\t * Anchors the modal to the bottom edge of the viewport.\n\t */\n\tBottom = 'bottom'\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { HubModalPlacement } from './modal-placement';\n// import { HubConfig } from '../hub-config';\n\n/**\n * Options available when opening new modal windows with `HubModal.open()` method.\n *\n * The optional generic parameter `D` types the `data` payload delivered to the\n * modal content through `HubActiveModal<D>.data` / the `HUB_MODAL_DATA` token.\n */\nexport interface HubModalOptions<D = unknown> {\n\t/**\n\t * If `true`, modal opening and closing will be animated.\n\t *\n\t * @since 8.0.0\n\t */\n\tanimation?: boolean;\n\n\t/**\n\t * `aria-labelledby` attribute value to set on the modal window.\n\t *\n\t * @since 2.2.0\n\t */\n\tariaLabelledBy?: string;\n\n\t/**\n\t * `aria-describedby` attribute value to set on the modal window.\n\t *\n\t * @since 6.1.0\n\t */\n\tariaDescribedBy?: string;\n\n\t/**\n\t * If `true`, the backdrop element will be created for a given modal.\n\t *\n\t * Alternatively, specify `'static'` for a backdrop which doesn't close the modal on click.\n\t *\n\t * Default value is `true`.\n\t */\n\tbackdrop?: boolean | 'static';\n\n\t/**\n\t * Callback right before the modal will be dismissed.\n\t *\n\t * If this function returns:\n\t * * `false`\n\t * * a promise resolved with `false`\n\t * * a promise that is rejected\n\t *\n\t * then the modal won't be dismissed.\n\t */\n\tbeforeDismiss?: () => boolean | Promise<boolean>;\n\n\t/**\n\t * If `true`, the modal will be centered vertically.\n\t *\n\t * Default value is `false`.\n\t *\n\t * @since 1.1.0\n\t */\n\tcentered?: boolean;\n\n\t/**\n\t * Controls where the modal is placed within the viewport.\n\t *\n\t * Default value is `'center'`.\n\t */\n\tplacement?: HubModalPlacement;\n\n\t/**\n\t * A selector specifying the element all new modal windows should be appended to.\n\t * Since v5.3.0 it is also possible to pass the reference to an `HTMLElement`.\n\t *\n\t * If not specified, will be `body`.\n\t */\n\tcontainer?: string | HTMLElement;\n\n\t/**\n\t * If `true` modal will always be displayed in fullscreen mode.\n\t *\n\t * For values like `'md'` it means that modal will be displayed in fullscreen mode\n\t * only if the viewport width is below `'md'`. For custom strings (ex. when passing `'mysize'`)\n\t * it will add a `'modal-fullscreen-mysize-down'` class.\n\t *\n\t * If not specified will be `false`.\n\t *\n\t * @since 12.1.0\n\t */\n\tfullscreen?: 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | boolean | string;\n\n\t/**\n\t * The `Injector` to use for modal content.\n\t */\n\tinjector?: Injector;\n\n\t/**\n\t * If `true`, the modal will be closed when `Escape` key is pressed\n\t *\n\t * Default value is `true`.\n\t */\n\tkeyboard?: boolean;\n\n\t/**\n\t * Scrollable modal content (false by default).\n\t *\n\t * @since 5.0.0\n\t */\n\tscrollable?: boolean;\n\n\t/**\n\t * Size of a new modal window.\n\t */\n\tsize?: 'sm' | 'lg' | 'xl' | string;\n\n\t/**\n\t * Semantic accent of the modal, for meaningful dialogs (a destructive\n\t * confirmation, a success notice…). Adds a coloured top bar to the dialog by\n\t * applying the `hub-modal--<variant>` class to the window.\n\t *\n\t * The built-in values (`'primary'` · `'success'` · `'danger'` · `'warning'`\n\t * · `'info'`) map to the design-system colours, but **any string is accepted**\n\t * — the modal reads `--hub-sys-color-<variant>` from the host application.\n\t *\n\t * If not specified, the modal is rendered neutral (no accent bar).\n\t */\n\tvariant?: 'primary' | 'success' | 'danger' | 'warning' | 'info' | (string & {});\n\n\t/**\n\t * A custom class to append to the modal window.\n\t */\n\twindowClass?: string;\n\n\t/**\n\t * A custom class to append to the modal dialog.\n\t *\n\t * @since 9.1.0\n\t */\n\tmodalDialogClass?: string;\n\n\t/**\n\t * A custom class to append to the modal backdrop.\n\t *\n\t * @since 1.1.0\n\t */\n\tbackdropClass?: string;\n\n\t/**\n\t * Allows to specify a custom selector for the header element of the modal window. This can be useful if you want to target\n\t * a specific element within the modal to act as the header, for example, to apply custom styling or functionality to it. By\n\t * providing a CSS selector string, you can target the desired\theader element within the modal content.\n\t */\n\theaderSelector?: string;\n\n\t/**\n\t * Allows to specify a custom selector for the footer element of the modal window. This can be useful if you want to target\n\t * a specific element within the modal to act as the footer, for example, to apply custom styling or functionality to it. By\n\t * providing a CSS selector string, you can target the desired footer element within the modal content.\n\t */\n\tfooterSelector?: string;\n\n\t/** Used to specify a custom selector for elements that can trigger the dismissal of the modal window. By providing a CSS selector\n\t * string for `dismissSelector`, you can target specific elements within the modal content that, when interacted with (e.g., clicked),\n\t * will close or dismiss the modal window.\n\t */\n\tdismissSelector?: string;\n\n\t/**\n\t * Used to specify a custom selector for elements that can trigger the closing of the modal window. By providing a CSS selector\n\t * string for `closeSelector`, you can target specific elements within the modal content that, when interacted with (e.g., clicked),\n\t * will close the modal window. This allows for customization of the elements that can act as close buttons for the modal.\n\t */\n\tcloseSelector?: string;\n\n\t/** Used to store any additional data that needs to be passed to the modal window when it is opened. This property allows you\n\t * to provide custom data to the modal component, which can then be accessed and utilized within the modal content or logic.\n\t * It provides flexibility for passing dynamic information to the modal window based on the specific use case or requirements.\n\t */\n\tdata?: D;\n}\n\n/**\n * Options that can be changed on an opened modal with `HubModalRef.update()` and `HubActiveModal.update()` methods.\n *\n * @since 14.2.0\n */\nexport type HubModalUpdatableOptions = Pick<\n\tHubModalOptions,\n\t| 'ariaLabelledBy'\n\t| 'ariaDescribedBy'\n\t| 'centered'\n\t| 'placement'\n\t| 'fullscreen'\n\t| 'backdropClass'\n\t| 'size'\n\t| 'variant'\n\t| 'windowClass'\n\t| 'modalDialogClass'\n>;\n\n/**\n * A configuration service for the [`HubModal`](#/components/modal/api#HubModal) service.\n *\n * You can inject this service, typically in your root component, and customize the values of its properties in\n * order to provide default values for all modals used in the application.\n *\n * @since 3.1.0\n */\n@Injectable({ providedIn: 'root' })\nexport class HubModalConfig implements Required<HubModalOptions> {\n\t// private _hubConfig = inject(HubConfig);\n\tprivate _animation?: boolean;\n\n\tariaLabelledBy!: string;\n\tariaDescribedBy!: string;\n\tbackdrop: boolean | 'static' = true;\n\tbeforeDismiss!: () => boolean | Promise<boolean>;\n\tcentered!: boolean;\n\tplacement: HubModalPlacement = HubModalPlacement.Center;\n\tcontainer!: string | HTMLElement;\n\tfullscreen: 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | boolean | string = false;\n\tinjector!: Injector;\n\tkeyboard = true;\n\tscrollable!: boolean;\n\tsize!: 'sm' | 'lg' | 'xl' | string;\n\tvariant!: 'primary' | 'success' | 'danger' | 'warning' | 'info' | (string & {});\n\twindowClass!: string;\n\tmodalDialogClass!: string;\n\tbackdropClass!: string;\n\theaderSelector!: string;\n\tfooterSelector!: string;\n\tdismissSelector: string = '[data-dismiss=\"modal\"]';\n\tcloseSelector: string = '[data-close=\"modal\"]';\n\tdata: any;\n\n\tget animation(): boolean {\n\t\treturn this._animation ?? true /* this._hubConfig.animation */;\n\t}\n\tset animation(animation: boolean) {\n\t\tthis._animation = animation;\n\t}\n}\n","import {\n\tafterNextRender,\n\tComponent,\n\tElementRef,\n\tinject,\n\tInjector,\n\tinput,\n\tNgZone,\n\tOnInit,\n\tViewEncapsulation\n} from '@angular/core';\nimport { hubRunTransition, reflow } from 'ng-hub-ui-utils';\nimport { Observable } from 'rxjs';\n\n/**\n * Represents the backdrop element associated with an active modal window.\n * It is responsible for displaying a dark overlay and handling entry/exit animations.\n */\n@Component({\n\tselector: 'hub-modal-backdrop',\n\tstandalone: true,\n\tencapsulation: ViewEncapsulation.None,\n\ttemplate: '',\n\thost: {\n\t\t'[class]': '\"hub-modal__backdrop\" + (backdropClass() ? \" \" + backdropClass() : \"\")',\n\t\t'[class.show]': '!animation()',\n\t\t'[class.fade]': 'animation()'\n\t}\n})\nexport class HubModalBackdrop implements OnInit {\n\tprivate _nativeElement = inject(ElementRef).nativeElement as HTMLElement;\n\tprivate _zone = inject(NgZone);\n\tprivate _injector = inject(Injector);\n\n\t/**\n\t * Determines whether the backdrop should use CSS transitions during its initialization and destruction.\n\t */\n\treadonly animation = input<boolean>(true);\n\n\t/**\n\t * Allows applying a custom CSS class to the backdrop element.\n\t */\n\treadonly backdropClass = input<string>();\n\n\tngOnInit() {\n\t\t// `NgZone.onStable` never emits under `provideZonelessChangeDetection` (the zone is a\n\t\t// `NoopNgZone`), so the entry transition never ran there. `afterNextRender` fires in\n\t\t// both modes. See the same fix in `HubModalWindowComponent.ngOnInit`.\n\t\tafterNextRender(\n\t\t\t() => {\n\t\t\t\thubRunTransition(\n\t\t\t\t\tthis._zone,\n\t\t\t\t\tthis._nativeElement,\n\t\t\t\t\t(element: HTMLElement, animation: boolean) => {\n\t\t\t\t\t\tif (animation) {\n\t\t\t\t\t\t\treflow(element);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telement.classList.add('show');\n\t\t\t\t\t},\n\t\t\t\t\t{ animation: this.animation(), runningTransition: 'continue' }\n\t\t\t\t);\n\t\t\t},\n\t\t\t{ injector: this._injector }\n\t\t);\n\t}\n\n\t/**\n\t * Triggers the hide transition for the backdrop element and removes the `show` CSS class.\n\t *\n\t * @returns An observable that completes once the exit transition has ended.\n\t */\n\thide(): Observable<void> {\n\t\treturn hubRunTransition(this._zone, this._nativeElement, ({ classList }) => classList.remove('show'), {\n\t\t\tanimation: this.animation(),\n\t\t\trunningTransition: 'stop'\n\t\t});\n\t}\n}\n","import { ComponentRef, InjectionToken } from '@angular/core';\nimport { ContentRef, isDefined, isPromise } from 'ng-hub-ui-utils';\nimport { Observable, of, Subject, zip } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { HubModalBackdrop } from './modal-backdrop';\nimport { HubModalOptions, HubModalUpdatableOptions } from './modal-config';\nimport { HubModalWindow } from './modal-window';\n\n/**\n * Injection token carrying the `HubModalOptions.data` payload down to the modal\n * content component. Inject it to read the payload in a typed way, mirroring the\n * Angular CDK `DIALOG_DATA` pattern:\n *\n * ```ts\n * private readonly data = inject(HUB_MODAL_DATA) as MyPayload;\n * ```\n *\n * It is provided alongside `HubActiveModal` in the content component's element\n * injector and resolves to `null` when no `data` option was supplied.\n *\n * @since 22.3.0\n */\nexport const HUB_MODAL_DATA = new InjectionToken<unknown>('HUB_MODAL_DATA');\n\n/**\n * A reference to the currently opened (active) modal.\n *\n * Instances of this class can be injected into your component passed as modal content.\n * So you can `.update()`, `.close()` or `.dismiss()` the modal window from your component.\n *\n * The optional generic parameter `D` types the {@link HubActiveModal.data} payload\n * passed through `HubModalOptions.data`.\n */\nexport class HubActiveModal<D = unknown, R = any> {\n\t/**\n\t * Creates the active modal reference.\n\t *\n\t * @param _data The payload supplied via `HubModalOptions.data`, if any.\n\t */\n\tconstructor(private readonly _data: D = null as D) {}\n\n\t/**\n\t * The typed payload passed to the modal through `HubModalOptions.data`.\n\t *\n\t * Equivalent to injecting the {@link HUB_MODAL_DATA} token, but strongly typed\n\t * when the generic parameter `D` is supplied. Resolves to `null` when no `data`\n\t * option was provided.\n\t *\n\t * @since 22.3.0\n\t */\n\tget data(): D {\n\t\treturn this._data;\n\t}\n\n\t/**\n\t * Updates options of an opened modal.\n\t *\n\t * @since 14.2.0\n\t */\n\tupdate(options: HubModalUpdatableOptions): void {}\n\t/**\n\t * Closes the modal with an optional `result` value.\n\t *\n\t * The `HubModalRef.result` promise will be resolved with the provided value.\n\t */\n\tclose(result?: R): void {}\n\n\t/**\n\t * Dismisses the modal with an optional `reason` value.\n\t *\n\t * The `HubModalRef.result` promise will be rejected with the provided value.\n\t */\n\tdismiss(reason?: any): void {}\n}\n\nconst WINDOW_ATTRIBUTES: string[] = [\n\t'animation',\n\t'ariaLabelledBy',\n\t'ariaDescribedBy',\n\t'backdrop',\n\t'centered',\n\t'placement',\n\t'fullscreen',\n\t'keyboard',\n\t'scrollable',\n\t'size',\n\t'variant',\n\t'windowClass',\n\t'modalDialogClass'\n];\nconst BACKDROP_ATTRIBUTES: string[] = ['animation', 'backdropClass'];\n\n/**\n * A reference to the newly opened modal returned by the `HubModal.open()` method.\n */\nexport class HubModalRef<C = any, R = any> {\n\tprivate _closed = new Subject<R>();\n\tprivate _dismissed = new Subject<any>();\n\tprivate _hidden = new Subject<void>();\n\tprivate _resolve!: (result: R | PromiseLike<R>) => void;\n\tprivate _reject!: (reason?: any) => void;\n\n\tprivate _applyWindowOptions(windowComponentRef: ComponentRef<HubModalWindow>, options: HubModalOptions): void {\n\t\tWINDOW_ATTRIBUTES.forEach((optionName: string) => {\n\t\t\tconst opts: any = options as any;\n\t\t\tif (isDefined(opts[optionName])) {\n\t\t\t\twindowComponentRef.setInput(optionName, opts[optionName]);\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _applyBackdropOptions(backdropComponentRef: ComponentRef<HubModalBackdrop>, options: HubModalOptions): void {\n\t\tBACKDROP_ATTRIBUTES.forEach((optionName: string) => {\n\t\t\tconst opts: any = options as any;\n\t\t\tif (isDefined(opts[optionName])) {\n\t\t\t\tbackdropComponentRef.setInput(optionName, opts[optionName]);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Updates options of an opened modal.\n\t *\n\t * @since 14.2.0\n\t */\n\tupdate(options: HubModalUpdatableOptions): void {\n\t\tthis._applyWindowOptions(this._windowCmptRef, options);\n\t\tif (this._backdropCmptRef && this._backdropCmptRef.instance) {\n\t\t\tthis._applyBackdropOptions(this._backdropCmptRef, options);\n\t\t}\n\t}\n\n\t/**\n\t * The instance of a component used for the modal content.\n\t *\n\t * When a `TemplateRef` is used as the content or when the modal is closed, will return `undefined`.\n\t */\n\tget componentInstance(): C | void {\n\t\tif (this._contentRef && this._contentRef.componentRef) {\n\t\t\treturn this._contentRef.componentRef.instance;\n\t\t}\n\t}\n\n\t/**\n\t * The promise that is resolved when the modal is closed and rejected when the modal is dismissed.\n\t */\n\tresult: Promise<R>;\n\n\t/**\n\t * The observable that emits when the modal is closed via the `.close()` method.\n\t *\n\t * It will emit the result passed to the `.close()` method.\n\t *\n\t * @since 8.0.0\n\t */\n\tget closed(): Observable<R> {\n\t\treturn this._closed.asObservable().pipe(takeUntil(this._hidden));\n\t}\n\n\t/**\n\t * The observable that emits when the modal is dismissed via the `.dismiss()` method.\n\t *\n\t * It will emit the reason passed to the `.dismissed()` method by the user, or one of the internal\n\t * reasons like backdrop click or ESC key press.\n\t *\n\t * @since 8.0.0\n\t */\n\tget dismissed(): Observable<any> {\n\t\treturn this._dismissed.asObservable().pipe(takeUntil(this._hidden));\n\t}\n\n\t/**\n\t * The observable that emits when both modal window and backdrop are closed and animations were finished.\n\t * At this point modal and backdrop elements will be removed from the DOM tree.\n\t *\n\t * This observable will be completed after emitting.\n\t *\n\t * @since 8.0.0\n\t */\n\tget hidden(): Observable<void> {\n\t\treturn this._hidden.asObservable();\n\t}\n\n\t/**\n\t * The observable that emits when modal is fully visible and animation was finished.\n\t * Modal DOM element is always available synchronously after calling 'modal.open()' service.\n\t *\n\t * This observable will be completed after emitting.\n\t * It will not emit, if modal is closed before open animation is finished.\n\t *\n\t * @since 8.0.0\n\t */\n\tget shown(): Observable<void> {\n\t\treturn this._windowCmptRef.instance.shown.asObservable();\n\t}\n\n\tconstructor(\n\t\tprivate _windowCmptRef: ComponentRef<HubModalWindow>,\n\t\tprivate _contentRef: ContentRef,\n\t\tprivate _backdropCmptRef?: ComponentRef<HubModalBackdrop>,\n\t\tprivate _beforeDismiss?: () => boolean | Promise<boolean>\n\t) {\n\t\t_windowCmptRef.instance.dismissEvent.subscribe((reason: any) => {\n\t\t\tthis.dismiss(reason);\n\t\t});\n\n\t\tthis.result = new Promise((resolve, reject) => {\n\t\t\tthis._resolve = resolve;\n\t\t\tthis._reject = reject;\n\t\t});\n\t\tthis.result.then(null, () => {});\n\t}\n\n\t/**\n\t * Closes the modal with an optional `result` value.\n\t *\n\t * The `HubMobalRef.result` promise will be resolved with the provided value.\n\t */\n\tclose(result?: R): void {\n\t\tif (this._windowCmptRef) {\n\t\t\t// `close()` without a value legitimately emits `undefined` through the\n\t\t\t// `R`-typed stream, mirroring the optional `result` parameter.\n\t\t\tthis._closed.next(result as R);\n\t\t\tthis._resolve(result as R);\n\t\t\tthis._removeModalElements();\n\t\t}\n\t}\n\n\tprivate _dismiss(reason?: any) {\n\t\tthis._dismissed.next(reason);\n\t\tthis._reject(reason);\n\t\tthis._removeModalElements();\n\t}\n\n\t/**\n\t * Dismisses the modal with an optional `reason` value.\n\t *\n\t * The `HubModalRef.result` promise will be rejected with the provided value.\n\t */\n\tdismiss(reason?: any): void {\n\t\tif (this._windowCmptRef) {\n\t\t\tif (!this._beforeDismiss) {\n\t\t\t\tthis._dismiss(reason);\n\t\t\t} else {\n\t\t\t\tconst dismiss = this._beforeDismiss();\n\t\t\t\tif (isPromise(dismiss as any)) {\n\t\t\t\t\t(dismiss as Promise<boolean>).then(\n\t\t\t\t\t\t(result) => {\n\t\t\t\t\t\t\tif (result !== false) {\n\t\t\t\t\t\t\t\tthis._dismiss(reason);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t() => {}\n\t\t\t\t\t);\n\t\t\t\t} else if (dismiss !== false) {\n\t\t\t\t\tthis._dismiss(reason);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate _removeModalElements() {\n\t\tconst windowTransition$ = this._windowCmptRef.instance.hide();\n\t\tconst backdropTransition$ = this._backdropCmptRef ? this._backdropCmptRef.instance.hide() : of(undefined);\n\n\t\t// hiding window\n\t\twindowTransition$.subscribe(() => {\n\t\t\tconst { nativeElement } = this._windowCmptRef.location;\n\t\t\tnativeElement.parentNode?.removeChild(nativeElement);\n\t\t\tthis._windowCmptRef.destroy();\n\t\t\tthis._contentRef?.viewRef?.destroy();\n\n\t\t\tthis._windowCmptRef = <any>null;\n\t\t\tthis._contentRef = <any>null;\n\t\t});\n\n\t\t// hiding backdrop\n\t\tbackdropTransition$.subscribe(() => {\n\t\t\tif (this._backdropCmptRef) {\n\t\t\t\tconst { nativeElement } = this._backdropCmptRef.location;\n\t\t\t\tnativeElement.parentNode?.removeChild(nativeElement);\n\t\t\t\tthis._backdropCmptRef.destroy();\n\t\t\t\tthis._backdropCmptRef = <any>null;\n\t\t\t}\n\t\t});\n\n\t\t// all done\n\t\tzip(windowTransition$, backdropTransition$).subscribe(() => {\n\t\t\tthis._hidden.next();\n\t\t\tthis._hidden.complete();\n\t\t});\n\t}\n}\n","export enum ModalDismissReasons {\n\tBACKDROP_CLICK,\n\tESC,\n}\n","import { DOCUMENT } from '@angular/common';\nimport {\n\tafterNextRender,\n\tComponent,\n\tElementRef,\n\tinject,\n\tInjector,\n\tinput,\n\tNgZone,\n\tOnDestroy,\n\tOnInit,\n\toutput,\n\tviewChild,\n\tViewEncapsulation\n} from '@angular/core';\nimport { getFocusableBoundaryElements, hubRunTransition, isString, reflow, TransitionOptions } from 'ng-hub-ui-utils';\nimport { fromEvent, Observable, Subject, zip } from 'rxjs';\nimport { filter, switchMap, take, takeUntil, tap } from 'rxjs/operators';\nimport { ModalDismissReasons } from './modal-dismiss-reasons';\nimport { HubModalPlacement } from './modal-placement';\n\n/**\n * The internal component representing the modal window.\n * It renders the modal dialog structure, handles ARIA attributes, encapsulates the projected content,\n * and manages interactions like keyboard dismissals and backdrop clicks.\n */\n@Component({\n\tselector: 'hub-modal-window',\n\timports: [],\n\thost: {\n\t\t'[class]':\n\t\t\t'\"hub-modal\" + hostPlacementClass + (variant() ? \" hub-modal--\" + variant() : \"\") + (windowClass() ? \" \" + windowClass() : \"\")',\n\t\t'[class.fade]': 'animation()',\n\t\trole: 'dialog',\n\t\ttabindex: '-1',\n\t\t'[attr.aria-modal]': 'true',\n\t\t'[attr.aria-labelledby]': 'ariaLabelledBy()',\n\t\t'[attr.aria-describedby]': 'ariaDescribedBy()'\n\t},\n\ttemplate: `\n\t\t<div\n\t\t\t#dialog\n\t\t\t[class]=\"\n\t\t\t\t'hub-modal__dialog' +\n\t\t\t\t(size() ? ' hub-modal__dialog--' + size() : '') +\n\t\t\t\tplacementClass +\n\t\t\t\tcenteredClass +\n\t\t\t\tfullscreenClass +\n\t\t\t\t(scrollable() ? ' hub-modal__dialog--scrollable' : '') +\n\t\t\t\t(modalDialogClass() ? ' ' + modalDialogClass() : '')\n\t\t\t\"\n\t\t\trole=\"document\"\n\t\t>\n\t\t\t<div class=\"hub-modal__content\">\n\t\t\t\t@if (singleContent) {\n\t\t\t\t\t<div #bodyContainer class=\"hub-modal__body\"></div>\n\t\t\t\t} @else {\n\t\t\t\t\t<div #headerContainer class=\"hub-modal__header\">\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t#closeButton\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tclass=\"hub-modal__close\"\n\t\t\t\t\t\t\taria-label=\"Close\"\n\t\t\t\t\t\t\t(click)=\"dismiss(null)\"\n\t\t\t\t\t\t></button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div #bodyContainer class=\"hub-modal__body\"></div>\n\t\t\t\t\t<div #footerContainer class=\"hub-modal__footer\"></div>\n\t\t\t\t}\n\t\t\t</div>\n\t\t</div>\n\t`,\n\tencapsulation: ViewEncapsulation.None,\n\tstyleUrl: './modal.scss'\n})\nexport class HubModalWindow implements OnInit, OnDestroy {\n\tprivate _document = inject(DOCUMENT);\n\tprivate _elRef = inject(ElementRef<HTMLElement>);\n\tprivate _zone = inject(NgZone);\n\tprivate _injector = inject(Injector);\n\n\tprivate _closed$ = new Subject<void>();\n\tprivate _elWithFocus: Element | null = null; // element that is focused prior to modal opening\n\n\tprivate readonly _dialogEl = viewChild.required<ElementRef<HTMLElement>>('dialog');\n\tprivate readonly _headerContainerEl = viewChild<ElementRef<HTMLElement>>('headerContainer');\n\tprivate readonly _bodyContainerEl = viewChild<ElementRef<HTMLElement>>('bodyContainer');\n\tprivate readonly _footerContainerEl = viewChild<ElementRef<HTMLElement>>('footerContainer');\n\tprivate readonly _closeButtonEl = viewChild<ElementRef<HTMLButtonElement>>('closeButton');\n\n\t/**\n\t * Determines whether the modal window should animate its entry and exit.\n\t */\n\treadonly animation = input<boolean>(true);\n\n\t/**\n\t * Identifier to apply to the `aria-labelledby` attribute of the modal.\n\t */\n\treadonly ariaLabelledBy = input<string>();\n\n\t/**\n\t * Identifier to apply to the `aria-describedby` attribute of the modal.\n\t */\n\treadonly ariaDescribedBy = input<string>();\n\n\t/**\n\t * Configures the presence and behavior of the modal backdrop (`true`, `false`, or `'static'`).\n\t */\n\treadonly backdrop = input<boolean | string>(true);\n\n\t/**\n\t * If `true`, the modal dialog will be centered vertically.\n\t */\n\treadonly centered = input<boolean>();\n\n\t/**\n\t * Specifies the modal placement inside the viewport.\n\t */\n\treadonly placement = input<HubModalPlacement>(HubModalPlacement.Center);\n\n\t/**\n\t * Enables fullscreen mode for the modal, either always (`true`) or below specific breakpoints.\n\t */\n\treadonly fullscreen = input<string | boolean>();\n\n\t/**\n\t * If `true`, pressing the ESC key will close the modal.\n\t */\n\treadonly keyboard = input(true);\n\n\t/**\n\t * If `true`, the modal content will be scrollable when it exceeds the viewport height.\n\t */\n\treadonly scrollable = input<boolean>();\n\n\t/**\n\t * Specifies the size of the modal (`'sm'`, `'lg'`, `'xl'`, etc.).\n\t */\n\treadonly size = input<string>();\n\n\t/**\n\t * Semantic accent of the modal (`'primary'`, `'success'`, `'danger'`,\n\t * `'warning'`, `'info'`, or any custom token name). Applies the\n\t * `hub-modal--<variant>` class, which paints an accent top bar on the dialog.\n\t */\n\treadonly variant = input<string>();\n\n\t/**\n\t * A custom CSS class to append to the modal window wrapper.\n\t */\n\treadonly windowClass = input<string>();\n\n\t/**\n\t * A custom CSS class to append to the inner modal dialog element.\n\t */\n\treadonly modalDialogClass = input<string>();\n\n\tsingleContent!: boolean;\n\n\t/**\n\t * Emits when the user dismisses the modal (e.g. via ESC, backdrop click, or custom close buttons).\n\t */\n\treadonly dismissEvent = output({ alias: 'dismiss' });\n\n\t/**\n\t * Emits and completes once the modal window is fully visible and its transition has ended.\n\t */\n\tshown = new Subject<void>();\n\n\t/**\n\t * Emits and completes once the modal is fully hidden and its DOM elements are ready to be destroyed.\n\t */\n\thidden = new Subject<void>();\n\n\t/**\n\t * Computes the CSS class for fullscreen behavior based on the `fullscreen` input.\n\t */\n\tget fullscreenClass(): string {\n\t\tconst fullscreen = this.fullscreen();\n\t\treturn fullscreen === true\n\t\t\t? ' hub-modal__dialog--fullscreen'\n\t\t\t: isString(fullscreen)\n\t\t\t\t? ` hub-modal__dialog--fullscreen-${fullscreen}-down`\n\t\t\t\t: '';\n\t}\n\n\t/**\n\t * Computes the CSS class corresponding to the requested modal placement.\n\t */\n\tget placementClass(): string {\n\t\tconst placement = this.placement();\n\t\treturn placement && placement !== HubModalPlacement.Center ? ` hub-modal__dialog--placement-${placement}` : '';\n\t}\n\n\t/**\n\t * Computes the CSS class applied to the modal host to control viewport anchoring.\n\t */\n\tget hostPlacementClass(): string {\n\t\tconst placement = this.placement();\n\t\treturn placement && placement !== HubModalPlacement.Center ? ` hub-modal--placement-${placement}` : '';\n\t}\n\n\t/**\n\t * Computes the CSS class used to center the modal on the secondary axis, depending on its placement.\n\t */\n\tget centeredClass(): string {\n\t\tif (!this.centered()) {\n\t\t\treturn '';\n\t\t}\n\n\t\tswitch (this.placement()) {\n\t\t\tcase HubModalPlacement.Start:\n\t\t\tcase HubModalPlacement.End:\n\t\t\t\treturn ' hub-modal__dialog--centered-vertical';\n\t\t\tcase HubModalPlacement.Top:\n\t\t\tcase HubModalPlacement.Bottom:\n\t\t\t\treturn '';\n\t\t\tcase HubModalPlacement.Center:\n\t\t\tdefault:\n\t\t\t\treturn ' hub-modal__dialog--centered';\n\t\t}\n\t}\n\n\t/**\n\t * Dismisses the modal by emitting the `dismissEvent` with the provided reason.\n\t *\n\t * @param reason The reason the modal was dismissed (e.g. 'ESC', 'BACKDROP_CLICK', or custom data).\n\t */\n\tdismiss(reason: any): void {\n\t\tthis.dismissEvent.emit(reason);\n\t}\n\n\t/**\n\t * Attaches the projected content nodes into their respective structural containers\n\t * (header, body, and footer) within the modal dialog.\n\t *\n\t * @param contentNodes A nested array containing nodes segmented into header, body, and footer parts.\n\t */\n\tattachContent([headerNodes, bodyNodes, footerNodes]: Node[][]): void {\n\t\tconst bodyContainer = this._bodyContainerEl()?.nativeElement;\n\t\tif (!bodyContainer) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.singleContent) {\n\t\t\tthis._appendNodes(bodyContainer, bodyNodes);\n\t\t\treturn;\n\t\t}\n\n\t\tconst headerContainer = this._headerContainerEl()?.nativeElement;\n\t\tconst footerContainer = this._footerContainerEl()?.nativeElement;\n\t\tconst closeButton = this._closeButtonEl()?.nativeElement ?? null;\n\n\t\tif (headerContainer) {\n\t\t\tthis._appendNodes(headerContainer, headerNodes, closeButton);\n\t\t}\n\t\tthis._appendNodes(bodyContainer, bodyNodes);\n\t\tif (footerContainer) {\n\t\t\tthis._appendNodes(footerContainer, footerNodes);\n\t\t}\n\t}\n\n\tngOnInit() {\n\t\tthis._elWithFocus = this._document.activeElement;\n\t\t// Defer until the window's own DOM is laid out, then run the entry transition and\n\t\t// arm the Escape / backdrop-click handlers.\n\t\t//\n\t\t// This used to wait on `NgZone.onStable`. Under `provideZonelessChangeDetection`\n\t\t// the injected zone is a `NoopNgZone` whose `onStable` never emits, so `_show()`\n\t\t// never ran: the window never got its `show` class and — far worse — never called\n\t\t// `_enableEventHandling()`, leaving every modal in a zoneless app unclosable by\n\t\t// Escape or by clicking the backdrop. `afterNextRender` is the zone-agnostic hook\n\t\t// for \"the DOM exists now\", and fires in both modes.\n\t\tafterNextRender(() => this._show(), { injector: this._injector });\n\t}\n\n\tngOnDestroy() {\n\t\tthis._disableEventHandling();\n\t}\n\n\t/**\n\t * Determines the focus element, blocks further interactions, configures the exit transition context,\n\t * removes 'show' CSS classes from the modal, and restores focus back to the previously focused element.\n\t *\n\t * @returns An observable that emits when the exit transition completely finishes.\n\t */\n\thide(): Observable<any> {\n\t\tconst { nativeElement } = this._elRef;\n\t\tconst context: TransitionOptions<any> = {\n\t\t\tanimation: this.animation(),\n\t\t\trunningTransition: 'stop'\n\t\t};\n\n\t\tconst windowTransition$ = hubRunTransition(\n\t\t\tthis._zone,\n\t\t\tnativeElement,\n\t\t\t() => nativeElement.classList.remove('show'),\n\t\t\tcontext\n\t\t);\n\t\tconst dialogTransition$ = hubRunTransition(this._zone, this._dialogEl().nativeElement, () => {}, context);\n\n\t\tconst transitions$ = zip(windowTransition$, dialogTransition$);\n\t\ttransitions$.subscribe(() => {\n\t\t\tthis.hidden.next();\n\t\t\tthis.hidden.complete();\n\t\t});\n\n\t\tthis._disableEventHandling();\n\t\tthis._restoreFocus();\n\n\t\treturn transitions$;\n\t}\n\n\tprivate _show() {\n\t\tconst context: TransitionOptions<any> = {\n\t\t\tanimation: this.animation(),\n\t\t\trunningTransition: 'continue'\n\t\t};\n\n\t\tconst windowTransition$ = hubRunTransition(\n\t\t\tthis._zone,\n\t\t\tthis._elRef.nativeElement,\n\t\t\t(element: HTMLElement, animation: boolean) => {\n\t\t\t\tif (animation) {\n\t\t\t\t\treflow(element);\n\t\t\t\t}\n\t\t\t\telement.classList.add('show');\n\t\t\t},\n\t\t\tcontext\n\t\t);\n\t\tconst dialogTransition$ = hubRunTransition(this._zone, this._dialogEl().nativeElement, () => {}, context);\n\n\t\tzip(windowTransition$, dialogTransition$).subscribe(() => {\n\t\t\tthis.shown.next();\n\t\t\tthis.shown.complete();\n\t\t});\n\n\t\tthis._enableEventHandling();\n\t\tthis._setFocus();\n\t}\n\n\tprivate _enableEventHandling() {\n\t\tconst { nativeElement } = this._elRef;\n\t\tthis._zone.runOutsideAngular(() => {\n\t\t\tfromEvent<KeyboardEvent>(nativeElement, 'keydown')\n\t\t\t\t.pipe(\n\t\t\t\t\ttakeUntil(this._closed$),\n\t\t\t\t\tfilter((e) => e.key === 'Escape')\n\t\t\t\t)\n\t\t\t\t.subscribe((event) => {\n\t\t\t\t\tif (this.keyboard()) {\n\t\t\t\t\t\trequestAnimationFrame(() => {\n\t\t\t\t\t\t\tif (!event.defaultPrevented) {\n\t\t\t\t\t\t\t\tthis._zone.run(() => this.dismiss(ModalDismissReasons.ESC));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t} else if (this.backdrop() === 'static') {\n\t\t\t\t\t\tthis._bumpBackdrop();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t// We're listening to 'mousedown' and 'mouseup' to prevent modal from closing when pressing the mouse\n\t\t\t// inside the modal dialog and releasing it outside\n\t\t\tlet preventClose = false;\n\t\t\tfromEvent<MouseEvent>(this._dialogEl().nativeElement, 'mousedown')\n\t\t\t\t.pipe(\n\t\t\t\t\ttakeUntil(this._closed$),\n\t\t\t\t\ttap(() => (preventClose = false)),\n\t\t\t\t\tswitchMap(() => fromEvent<MouseEvent>(nativeElement, 'mouseup').pipe(takeUntil(this._closed$), take(1))),\n\t\t\t\t\tfilter(({ target }) => nativeElement === target)\n\t\t\t\t)\n\t\t\t\t.subscribe(() => {\n\t\t\t\t\tpreventClose = true;\n\t\t\t\t});\n\n\t\t\t// We're listening to 'click' to dismiss modal on modal window click, except when:\n\t\t\t// 1. clicking on modal dialog itself\n\t\t\t// 2. closing was prevented by mousedown/up handlers\n\t\t\t// 3. clicking on scrollbar when the viewport is too small and modal doesn't fit (click is not triggered at all)\n\t\t\tfromEvent<MouseEvent>(nativeElement, 'click')\n\t\t\t\t.pipe(takeUntil(this._closed$))\n\t\t\t\t.subscribe(({ target }) => {\n\t\t\t\t\tif (nativeElement === target) {\n\t\t\t\t\t\tconst backdrop = this.backdrop();\n\t\t\t\t\t\tif (backdrop === 'static') {\n\t\t\t\t\t\t\tthis._bumpBackdrop();\n\t\t\t\t\t\t} else if (backdrop === true && !preventClose) {\n\t\t\t\t\t\t\tthis._zone.run(() => this.dismiss(ModalDismissReasons.BACKDROP_CLICK));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tpreventClose = false;\n\t\t\t\t});\n\t\t});\n\t}\n\n\tprivate _disableEventHandling() {\n\t\tthis._closed$.next();\n\t}\n\n\tprivate _setFocus() {\n\t\tconst { nativeElement } = this._elRef;\n\t\tif (!nativeElement.contains(document.activeElement)) {\n\t\t\tconst autoFocusable = nativeElement.querySelector(`[hubAutofocus]`) as HTMLElement;\n\t\t\tconst firstFocusable = getFocusableBoundaryElements(nativeElement)[0];\n\n\t\t\tconst elementToFocus = autoFocusable || firstFocusable || nativeElement;\n\t\t\telementToFocus.focus();\n\t\t}\n\t}\n\n\tprivate _restoreFocus() {\n\t\tconst body = this._document.body;\n\t\tconst elWithFocus = this._elWithFocus;\n\n\t\tlet elementToFocus: HTMLElement;\n\t\tif (elWithFocus instanceof HTMLElement && body.contains(elWithFocus)) {\n\t\t\telementToFocus = elWithFocus;\n\t\t} else {\n\t\t\telementToFocus = body as unknown as HTMLElement;\n\t\t}\n\t\tthis._zone.runOutsideAngular(() => {\n\t\t\tsetTimeout(() => elementToFocus.focus());\n\t\t\tthis._elWithFocus = null;\n\t\t});\n\t}\n\n\tprivate _bumpBackdrop() {\n\t\tif (this.backdrop() === 'static') {\n\t\t\thubRunTransition(\n\t\t\t\tthis._zone,\n\t\t\t\tthis._elRef.nativeElement,\n\t\t\t\t({ classList }) => {\n\t\t\t\t\tclassList.add('hub-modal--static');\n\t\t\t\t\treturn () => classList.remove('hub-modal--static');\n\t\t\t\t},\n\t\t\t\t{ animation: this.animation(), runningTransition: 'continue' }\n\t\t\t);\n\t\t}\n\t}\n\n\tprivate _appendNodes(container: HTMLElement, nodes: Node[], beforeNode?: Node | null) {\n\t\tnodes.forEach((node) => {\n\t\t\tif (beforeNode) {\n\t\t\t\tcontainer.insertBefore(node, beforeNode);\n\t\t\t} else {\n\t\t\t\tcontainer.appendChild(node);\n\t\t\t}\n\t\t});\n\t}\n}\n","import { DOCUMENT } from '@angular/common';\nimport {\n\tApplicationRef,\n\tComponentRef,\n\tcreateComponent,\n\tEnvironmentInjector,\n\tEventEmitter,\n\tinject,\n\tInjectable,\n\tInjector,\n\tNgZone,\n\tTemplateRef,\n\tType\n} from '@angular/core';\nimport { ContentRef, hubFocusTrap, isDefined, isString, ScrollBar } from 'ng-hub-ui-utils';\nimport { Subject } from 'rxjs';\nimport { take } from 'rxjs/operators';\nimport { HubModalBackdrop } from './modal-backdrop';\nimport { HubModalOptions, HubModalUpdatableOptions } from './modal-config';\nimport { HUB_MODAL_DATA, HubActiveModal, HubModalRef } from './modal-ref';\nimport { HubModalWindow } from './modal-window';\n\n/**\n * A service that manages the stack of currently active modal windows.\n * It is responsible for creating, attaching, and orchestrating the rendering\n * of the modal dialogue, its backdrop, and its content.\n */\n@Injectable({ providedIn: 'root' })\nexport class HubModalStack {\n\tprivate _applicationRef = inject(ApplicationRef);\n\tprivate _injector = inject(Injector);\n\tprivate _environmentInjector = inject(EnvironmentInjector);\n\tprivate _document = inject(DOCUMENT);\n\tprivate _scrollBar = inject(ScrollBar);\n\n\tprivate _activeWindowCmptHasChanged = new Subject<void>();\n\tprivate _ariaHiddenValues: Map<Element, string | null> = new Map();\n\tprivate _scrollBarRestoreFn: null | (() => void) = null;\n\tprivate _modalRefs: HubModalRef[] = [];\n\tprivate _windowCmpts: ComponentRef<HubModalWindow>[] = [];\n\tprivate _activeInstances: EventEmitter<HubModalRef[]> = new EventEmitter();\n\n\tconstructor() {\n\t\tconst ngZone = inject(NgZone);\n\n\t\t// Trap focus on active WindowCmpt\n\t\tthis._activeWindowCmptHasChanged.subscribe(() => {\n\t\t\tif (this._windowCmpts.length) {\n\t\t\t\tconst activeWindowCmpt = this._windowCmpts[this._windowCmpts.length - 1];\n\t\t\t\thubFocusTrap(ngZone, activeWindowCmpt.location.nativeElement, this._activeWindowCmptHasChanged);\n\t\t\t\tthis._revertAriaHidden();\n\t\t\t\tthis._setAriaHidden(activeWindowCmpt.location.nativeElement);\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _restoreScrollBar() {\n\t\tconst scrollBarRestoreFn = this._scrollBarRestoreFn;\n\t\tif (scrollBarRestoreFn) {\n\t\t\tthis._scrollBarRestoreFn = null;\n\t\t\tscrollBarRestoreFn();\n\t\t}\n\t}\n\n\tprivate _hideScrollBar() {\n\t\tif (!this._scrollBarRestoreFn) {\n\t\t\tthis._scrollBarRestoreFn = this._scrollBar.hide();\n\t\t}\n\t}\n\n\t/**\n\t * Opens a new modal window configured with the provided options.\n\t *\n\t * @param contentInjector The dependency injector to be used for the modal content component.\n\t * @param content The content to display inside the modal. Can be a component class, a template reference, or a string.\n\t * @param options Configuration options that dictate how the modal is rendered and behaves.\n\t * @returns An instance of `HubModalRef` which can be used to control the modal or subscribe to its events.\n\t * @throws Error if the specified container element is not found in the DOM.\n\t */\n\topen(contentInjector: Injector, content: any, options: HubModalOptions): HubModalRef {\n\t\tconst containerEl =\n\t\t\toptions.container instanceof HTMLElement\n\t\t\t\t? options.container\n\t\t\t\t: isDefined(options.container)\n\t\t\t\t\t? this._document.querySelector(options.container!)\n\t\t\t\t\t: this._document.body;\n\n\t\tif (!containerEl) {\n\t\t\tthrow new Error(`The specified modal container \"${options.container || 'body'}\" was not found in the DOM.`);\n\t\t}\n\n\t\tthis._hideScrollBar();\n\n\t\tconst activeModal = new HubActiveModal(options.data ?? null);\n\n\t\tcontentInjector = options.injector || contentInjector;\n\t\tconst environmentInjector = contentInjector.get(EnvironmentInjector, null) || this._environmentInjector;\n\t\tconst contentRef = this._getContentRef(contentInjector, environmentInjector, content, activeModal, options);\n\n\t\tconst backdropCmptRef: ComponentRef<HubModalBackdrop> | undefined =\n\t\t\toptions.backdrop !== false ? this._attachBackdrop(containerEl) : undefined;\n\t\tconst windowCmptRef: ComponentRef<HubModalWindow> = this._attachWindowComponent(containerEl, contentRef.nodes, options);\n\t\tconst hubModalRef: HubModalRef = new HubModalRef(windowCmptRef, contentRef, backdropCmptRef, options.beforeDismiss);\n\n\t\tthis._registerModalRef(hubModalRef);\n\t\tthis._registerWindowCmpt(windowCmptRef);\n\n\t\t// We have to cleanup DOM after the last modal when BOTH 'hidden' was emitted and 'result' promise was resolved:\n\t\t// - with animations OFF, 'hidden' emits synchronously, then 'result' is resolved asynchronously\n\t\t// - with animations ON, 'result' is resolved asynchronously, then 'hidden' emits asynchronously\n\t\thubModalRef.hidden.pipe(take(1)).subscribe(() =>\n\t\t\tPromise.resolve(true).then(() => {\n\t\t\t\tif (!this._modalRefs.length) {\n\t\t\t\t\tthis._document.body.classList.remove('hub-modal-open');\n\t\t\t\t\tthis._restoreScrollBar();\n\t\t\t\t\tthis._revertAriaHidden();\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\n\t\tactiveModal.close = (result: any) => {\n\t\t\thubModalRef.close(result);\n\t\t};\n\t\tactiveModal.dismiss = (reason: any) => {\n\t\t\thubModalRef.dismiss(reason);\n\t\t};\n\n\t\tactiveModal.update = (options: HubModalUpdatableOptions) => {\n\t\t\thubModalRef.update(options);\n\t\t};\n\n\t\thubModalRef.update(options);\n\t\tif (this._modalRefs.length === 1) {\n\t\t\tthis._document.body.classList.add('hub-modal-open');\n\t\t}\n\n\t\tif (backdropCmptRef && backdropCmptRef.instance) {\n\t\t\tbackdropCmptRef.changeDetectorRef.detectChanges();\n\t\t}\n\t\twindowCmptRef.changeDetectorRef.detectChanges();\n\t\treturn hubModalRef;\n\t}\n\n\t/**\n\t * Allows observing the array of active modal instances.\n\t *\n\t * @returns An event emitter that streams changes to the active modal references.\n\t */\n\tget activeInstances() {\n\t\treturn this._activeInstances;\n\t}\n\n\t/**\n\t * Dismisses all currently open modal windows.\n\t *\n\t * @param reason Optional reason to pass to the dismissal routines of the active modals.\n\t */\n\tdismissAll(reason?: any) {\n\t\tthis._modalRefs.forEach((hubModalRef) => hubModalRef.dismiss(reason));\n\t}\n\n\t/**\n\t * Checks whether there are any currently open modal windows.\n\t *\n\t * @returns `true` if at least one modal is active, `false` otherwise.\n\t */\n\thasOpenModals(): boolean {\n\t\treturn this._modalRefs.length > 0;\n\t}\n\n\tprivate _attachBackdrop(containerEl: Element): ComponentRef<HubModalBackdrop> {\n\t\tlet backdropCmptRef = createComponent(HubModalBackdrop, {\n\t\t\tenvironmentInjector: this._applicationRef.injector,\n\t\t\telementInjector: this._injector\n\t\t});\n\t\tthis._applicationRef.attachView(backdropCmptRef.hostView);\n\t\tcontainerEl.appendChild(backdropCmptRef.location.nativeElement);\n\t\treturn backdropCmptRef;\n\t}\n\n\tprivate _attachWindowComponent(\n\t\tcontainerEl: Element,\n\t\tcontentNodes: Node[][],\n\t\toptions: HubModalOptions\n\t): ComponentRef<HubModalWindow> {\n\t\tconst singleContent = !options.headerSelector && !options.footerSelector;\n\t\tlet windowCmptRef = createComponent(HubModalWindow, {\n\t\t\tenvironmentInjector: this._applicationRef.injector,\n\t\t\telementInjector: this._injector\n\t\t});\n\n\t\tObject.assign(windowCmptRef.instance, { singleContent });\n\n\t\tthis._applicationRef.attachView(windowCmptRef.hostView);\n\t\tcontainerEl.appendChild(windowCmptRef.location.nativeElement);\n\t\twindowCmptRef.changeDetectorRef.detectChanges();\n\t\twindowCmptRef.instance.attachContent(contentNodes);\n\t\treturn windowCmptRef;\n\t}\n\n\tprivate _getContentRef(\n\t\tcontentInjector: Injector,\n\t\tenvironmentInjector: EnvironmentInjector,\n\t\tcontent: Type<any> | TemplateRef<any> | string,\n\t\tactiveModal: HubActiveModal,\n\t\toptions: HubModalOptions\n\t): ContentRef {\n\t\tif (!content) {\n\t\t\treturn new ContentRef([]);\n\t\t} else if (content instanceof TemplateRef) {\n\t\t\treturn this._createFromTemplateRef(content, activeModal, options);\n\t\t} else if (isString(content)) {\n\t\t\treturn this._createFromString(content);\n\t\t} else {\n\t\t\treturn this._createFromComponent(contentInjector, environmentInjector, content, activeModal, options);\n\t\t}\n\t}\n\n\tprivate _createFromTemplateRef(\n\t\ttemplateRef: TemplateRef<any>,\n\t\tactiveModal: HubActiveModal,\n\t\toptions: HubModalOptions\n\t): ContentRef {\n\t\tconst context = {\n\t\t\t$implicit: activeModal,\n\t\t\tclose(result: any) {\n\t\t\t\tactiveModal.close(result);\n\t\t\t},\n\t\t\tdismiss(reason: any) {\n\t\t\t\tactiveModal.dismiss(reason);\n\t\t\t}\n\t\t};\n\t\tconst viewRef = templateRef.createEmbeddedView(context);\n\t\tthis._applicationRef.attachView(viewRef);\n\n\t\tconst containerNode = document.createElement('ng-container');\n\t\tcontainerNode.append(...viewRef.rootNodes);\n\n\t\tthis._addDismissEventListener(containerNode, context as any, options);\n\t\tthis._addCloseEventListener(containerNode, context as any, options);\n\n\t\treturn new ContentRef(\n\t\t\t[\n\t\t\t\toptions.headerSelector ? extractAndRemoveNodesBySelector(containerNode, options.headerSelector) : [],\n\t\t\t\tArray.from(containerNode.childNodes),\n\t\t\t\toptions.footerSelector ? extractAndRemoveNodesBySelector(containerNode, options.footerSelector) : []\n\t\t\t],\n\t\t\tviewRef\n\t\t);\n\t}\n\n\tprivate _createFromString(content: string): ContentRef {\n\t\tconst component = this._document.createTextNode(`${content}`);\n\t\treturn new ContentRef([[component]]);\n\t}\n\n\tprivate _createFromComponent(\n\t\tcontentInjector: Injector,\n\t\tenvironmentInjector: EnvironmentInjector,\n\t\tcomponentType: Type<any>,\n\t\tcontext: HubActiveModal,\n\t\toptions: HubModalOptions\n\t): ContentRef {\n\t\tconst elementInjector = Injector.create({\n\t\t\tproviders: [\n\t\t\t\t{ provide: HubActiveModal, useValue: context },\n\t\t\t\t{ provide: HUB_MODAL_DATA, useValue: options.data ?? null }\n\t\t\t],\n\t\t\tparent: contentInjector\n\t\t});\n\t\tconst componentRef = createComponent(componentType, {\n\t\t\tenvironmentInjector,\n\t\t\telementInjector\n\t\t});\n\n\t\t/**\n\t\t * @deprecated Since 22.3.0. Kept for one release for backward compatibility.\n\t\t * Prefer reading the payload through the typed `inject(HUB_MODAL_DATA)` token or\n\t\t * `inject(HubActiveModal).data`. This untyped monkey-patch of a `data` field on the\n\t\t * component instance will be removed in a future major.\n\t\t */\n\t\tif (options.data) {\n\t\t\tObject.assign(componentRef.instance, {\n\t\t\t\tdata: options.data\n\t\t\t});\n\t\t}\n\n\t\tconst componentNativeEl: HTMLElement = componentRef.location.nativeElement;\n\t\tif (options.scrollable) {\n\t\t\tcomponentNativeEl.classList.add('component-host-scrollable');\n\t\t}\n\t\tthis._applicationRef.attachView(componentRef.hostView);\n\n\t\tthis._addDismissEventListener(componentNativeEl, context, options);\n\t\tthis._addCloseEventListener(componentNativeEl, context as any, options);\n\n\t\t// FIXME: we should here get rid of the component nativeElement\n\t\t// and use `[Array.from(componentNativeEl.childNodes)]` instead and remove the above CSS class.\n\t\treturn new ContentRef(\n\t\t\t[\n\t\t\t\toptions.headerSelector ? extractAndRemoveNodesBySelector(componentNativeEl, options.headerSelector) : [],\n\t\t\t\tArray.from(componentNativeEl.childNodes),\n\t\t\t\toptions.footerSelector ? extractAndRemoveNodesBySelector(componentNativeEl, options.footerSelector) : []\n\t\t\t],\n\t\t\tcomponentRef.hostView,\n\t\t\tcomponentRef\n\t\t);\n\t}\n\n\tprivate _setAriaHidden(element: Element) {\n\t\tconst parent = element.parentElement;\n\t\tif (parent && element !== this._document.body) {\n\t\t\tArray.from(parent.children).forEach((sibling) => {\n\t\t\t\tif (sibling !== element && sibling.nodeName !== 'SCRIPT') {\n\t\t\t\t\tthis._ariaHiddenValues.set(sibling, sibling.getAttribute('aria-hidden'));\n\t\t\t\t\tsibling.setAttribute('aria-hidden', 'true');\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthis._setAriaHidden(parent);\n\t\t}\n\t}\n\n\tprivate _revertAriaHidden() {\n\t\tthis._ariaHiddenValues.forEach((value, element) => {\n\t\t\tif (value) {\n\t\t\t\telement.setAttribute('aria-hidden', value);\n\t\t\t} else {\n\t\t\t\telement.removeAttribute('aria-hidden');\n\t\t\t}\n\t\t});\n\t\tthis._ariaHiddenValues.clear();\n\t}\n\n\tprivate _registerModalRef(hubModalRef: HubModalRef) {\n\t\tconst unregisterModalRef = () => {\n\t\t\tconst index = this._modalRefs.indexOf(hubModalRef);\n\t\t\tif (index > -1) {\n\t\t\t\tthis._modalRefs.splice(index, 1);\n\t\t\t\tthis._activeInstances.emit(this._modalRefs);\n\t\t\t}\n\t\t};\n\t\tthis._modalRefs.push(hubModalRef);\n\t\tthis._activeInstances.emit(this._modalRefs);\n\t\thubModalRef.result.then(unregisterModalRef, unregisterModalRef);\n\t}\n\n\tprivate _registerWindowCmpt(hubWindowCmpt: ComponentRef<HubModalWindow>) {\n\t\tthis._windowCmpts.push(hubWindowCmpt);\n\t\tthis._activeWindowCmptHasChanged.next();\n\n\t\thubWindowCmpt.onDestroy(() => {\n\t\t\tconst index = this._windowCmpts.indexOf(hubWindowCmpt);\n\t\t\tif (index > -1) {\n\t\t\t\tthis._windowCmpts.splice(index, 1);\n\t\t\t\tthis._activeWindowCmptHasChanged.next();\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Attaches click event listeners to elements within a container based on a specified dismiss selector to dismiss a modal.\n\t *\n\t * @param {HTMLElement} container - The `container` parameter is an HTMLElement that represents the DOM element which contains the\n\t * modal content.\n\t * @param {HubActiveModal} context - The `context` parameter in the `_addDismissEventListener` function refers to the active modal\n\t * instance that is being displayed. It is used to call the `dismiss` method on the modal instance when a dismissible element is\n\t * clicked.\n\t * @param {HubModalOptions} options - The `options` parameter is an object that contains configuration options for the modal. It\n\t * may include properties such as `dismissSelector`, which is used to specify a CSS selector for elements that, when clicked, will\n\t * dismiss the modal by calling the `dismiss` method on the `context` object.\n\t */\n\tprivate _addDismissEventListener(container: HTMLElement, context: HubActiveModal, options: HubModalOptions) {\n\t\tif (options.dismissSelector) {\n\t\t\tconst dismissaable: NodeListOf<Element> = container.querySelectorAll(options.dismissSelector);\n\t\t\tfor (const item of Array.from(dismissaable)) {\n\t\t\t\titem.addEventListener('click', () => context.dismiss());\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Attaches click event listeners to elements matching a specified selector to close a modal window.\n\t *\n\t * @param {HTMLElement} container - The `container` parameter is an HTMLElement that represents the DOM element which contains the\n\t * modal content.\n\t * @param {HubActiveModal} context - The `context` parameter in the `_addCloseEventListener` function is of type `HubActiveModal`.\n\t * It is used to reference the active modal instance within the function and call the `close()` method on it when a close event is\n\t * triggered.\n\t * @param {HubModalOptions} options - The `options` parameter is an object that contains configuration options for the modal. It\n\t * may include properties such as `closeSelector`, which is used to specify the selector for elements that can trigger the modal\n\t * to close when clicked.\n\t */\n\tprivate _addCloseEventListener(container: HTMLElement, context: HubActiveModal, options: HubModalOptions) {\n\t\tif (options.closeSelector) {\n\t\t\tconst dismissaable: NodeListOf<Element> = container.querySelectorAll(options.closeSelector);\n\t\t\tfor (const item of Array.from(dismissaable)) {\n\t\t\t\tconst clickEventListeners = item.addEventListener('click', () => context.close());\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Extracts child nodes matching a selector from a container element, removes those nodes from the DOM, and returns them as an array.\n *\n * @param {HTMLElement} container - The `container` parameter in the `extractAndRemoveNodesBySelector` function is an HTMLElement\n * that represents the parent element within which we want to search for nodes matching a specific selector and remove them.\n * @param {string} selector - The `selector` parameter in the `extractAndRemoveNodesBySelector` function is a string that\n * represents a CSS selector. This selector is used to query and select specific elements within the `container` HTMLElement.\n *\n * @returns An array of nodes that were extracted from the container element based on the provided selector, and then removes those\n * nodes from the DOM.\n */\nfunction extractAndRemoveNodesBySelector(container: HTMLElement, selector: string): Array<Node> {\n\tlet containerNodes = container.querySelectorAll(selector);\n\n\tconst nodes = Array.from(containerNodes).reduce((acc, c) => {\n\t\treturn [...acc, ...Array.from(c.childNodes)];\n\t}, [] as Array<Node>);\n\n\t// Selecciona los nodos dentro del contenedor que coincidan con el selector\n\tconst nodesToRemove = container.querySelectorAll<HTMLElement>(selector);\n\n\t// Convertir NodeList a array y eliminar cada nodo del DOM\n\tArray.from(nodesToRemove).forEach((node) => node.remove());\n\treturn nodes;\n}\n","import { inject, Injectable, Injector, TemplateRef, Type } from '@angular/core';\n\nimport { HubModalConfig, HubModalOptions } from './modal-config';\nimport { HubModalRef } from './modal-ref';\nimport { HubModalStack } from './modal-stack';\n\n/**\n * A service for opening modal windows.\n *\n * Creating a modal is straightforward: create a component or a template and pass it as an argument to\n * the `.open()` method.\n */\n@Injectable({ providedIn: 'root' })\nexport class HubModal {\n\tprivate _injector = inject(Injector);\n\tprivate _modalStack = inject(HubModalStack);\n\tprivate _config = inject(HubModalConfig);\n\n\t/**\n\t * Opens a new modal window with the specified content and supplied options.\n\t *\n\t * Content can be provided as a `TemplateRef` or a component type. If you pass a component type as content,\n\t * then instances of those components can be injected with an instance of the `HubActiveModal` class. You can then\n\t * use `HubActiveModal` methods to close / dismiss modals from \"inside\" of your component.\n\t *\n\t * Also see the [`HubModalOptions`](#/components/modal/api#HubModalOptions) for the list of supported options.\n\t *\n\t * Generics: `C` is the content component type (inferred from the class you pass,\n\t * so `componentInstance` is typed without casts), `R` is the result type flowing\n\t * through `close()` / `result` / `closed`, and `D` types the `options.data`\n\t * payload (paired with `HubActiveModal<D>` / `HUB_MODAL_DATA` on the inside).\n\t */\n\topen<C = any, R = any, D = unknown>(\n\t\tcontent: Type<C> | TemplateRef<any> | string,\n\t\toptions: HubModalOptions<D> = {}\n\t): HubModalRef<C, R> {\n\t\tconst combinedOptions = {\n\t\t\t...this._config,\n\t\t\tanimation: this._config.animation,\n\t\t\t...options\n\t\t};\n\t\treturn this._modalStack.open(this._injector, content, combinedOptions) as HubModalRef<C, R>;\n\t}\n\n\t/**\n\t * Returns an observable that holds the active modal instances.\n\t */\n\tget activeInstances() {\n\t\treturn this._modalStack.activeInstances;\n\t}\n\n\t/**\n\t * Dismisses all currently displayed modal windows with the supplied reason.\n\t *\n\t * @since 3.1.0\n\t */\n\tdismissAll(reason?: any) {\n\t\tthis._modalStack.dismissAll(reason);\n\t}\n\n\t/**\n\t * Indicates if there are currently any open modal windows in the application.\n\t *\n\t * @since 3.3.0\n\t */\n\thasOpenModals(): boolean {\n\t\treturn this._modalStack.hasOpenModals();\n\t}\n}\n","import { NgModule } from '@angular/core';\nimport { HubModal } from './modal';\nexport { HubModal } from './modal';\nexport { HubModalConfig } from './modal-config';\nexport type { HubModalOptions, HubModalUpdatableOptions } from './modal-config';\nexport { ModalDismissReasons } from './modal-dismiss-reasons';\nexport { HubModalPlacement } from './modal-placement';\nexport { HUB_MODAL_DATA, HubActiveModal, HubModalRef } from './modal-ref';\n\n@NgModule({ providers: [HubModal] })\nexport class HubModalModule {}\n","/*\n * Public API Surface of modal\n */\nexport {\n\tModalDismissReasons,\n\tHUB_MODAL_DATA,\n\tHubActiveModal,\n\tHubModal,\n\tHubModalConfig,\n\tHubModalModule,\n\tHubModalPlacement,\n\tHubModalRef\n} from './lib/modal.module';\nexport type { HubModalOptions, HubModalUpdatableOptions } from './lib/modal.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAAA;;AAEG;IACS;AAAZ,CAAA,UAAY,iBAAiB,EAAA;AAC5B;;AAEG;AACH,IAAA,iBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AAEjB;;AAEG;AACH,IAAA,iBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AAEf;;AAEG;AACH,IAAA,iBAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AAEX;;AAEG;AACH,IAAA,iBAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AAEX;;AAEG;AACH,IAAA,iBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AAClB,CAAC,EAzBW,iBAAiB,KAAjB,iBAAiB,GAAA,EAAA,CAAA,CAAA;;ACoM7B;;;;;;;AAOG;MAEU,cAAc,CAAA;;AAElB,IAAA,UAAU;AAElB,IAAA,cAAc;AACd,IAAA,eAAe;IACf,QAAQ,GAAuB,IAAI;AACnC,IAAA,aAAa;AACb,IAAA,QAAQ;AACR,IAAA,SAAS,GAAsB,iBAAiB,CAAC,MAAM;AACvD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xC;AAEA;;;;AAIG;AACH,IAAA,UAAU,CAAC,MAAY,EAAA;AACtB,QAAA,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC;IACpC;AAEA;;;;AAIG;IACH,aAAa,GAAA;AACZ,QAAA,OAAO,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE;IACxC;uGAtDY,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAR,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,QAAQ,cADK,MAAM,EAAA,CAAA;;2FACnB,QAAQ,EAAA,UAAA,EAAA,CAAA;kBADpB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;MCFrB,cAAc,CAAA;uGAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAd,cAAc,EAAA,CAAA;wGAAd,cAAc,EAAA,SAAA,EADJ,CAAC,QAAQ,CAAC,EAAA,CAAA;;2FACpB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE;;;ACTnC;;AAEG;;ACFH;;AAEG;;;;"}
Binary file
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "ng-hub-ui-modal",
3
- "version": "22.4.1",
3
+ "version": "22.5.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=18.0.0",
6
6
  "@angular/core": ">=18.0.0",
7
- "ng-hub-ui-utils": ">=1.0.0"
7
+ "ng-hub-ui-utils": ">=22.0.0"
8
8
  },
9
9
  "dependencies": {
10
10
  "tslib": "^2.3.0"
@@ -1,5 +1,5 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { Injector, OnInit, OnDestroy, InjectionToken, ComponentRef } from '@angular/core';
2
+ import { Injector, OnInit, OnDestroy, InjectionToken, ComponentRef, Type, TemplateRef } from '@angular/core';
3
3
  import { ContentRef } from 'ng-hub-ui-utils';
4
4
  import { Observable, Subject } from 'rxjs';
5
5
 
@@ -31,8 +31,11 @@ declare enum HubModalPlacement {
31
31
 
32
32
  /**
33
33
  * Options available when opening new modal windows with `HubModal.open()` method.
34
+ *
35
+ * The optional generic parameter `D` types the `data` payload delivered to the
36
+ * modal content through `HubActiveModal<D>.data` / the `HUB_MODAL_DATA` token.
34
37
  */
35
- interface HubModalOptions {
38
+ interface HubModalOptions<D = unknown> {
36
39
  /**
37
40
  * If `true`, modal opening and closing will be animated.
38
41
  *
@@ -178,7 +181,7 @@ interface HubModalOptions {
178
181
  * to provide custom data to the modal component, which can then be accessed and utilized within the modal content or logic.
179
182
  * It provides flexibility for passing dynamic information to the modal window based on the specific use case or requirements.
180
183
  */
181
- data?: any;
184
+ data?: D;
182
185
  }
183
186
  /**
184
187
  * Options that can be changed on an opened modal with `HubModalRef.update()` and `HubActiveModal.update()` methods.
@@ -407,7 +410,7 @@ declare const HUB_MODAL_DATA: InjectionToken<unknown>;
407
410
  * The optional generic parameter `D` types the {@link HubActiveModal.data} payload
408
411
  * passed through `HubModalOptions.data`.
409
412
  */
410
- declare class HubActiveModal<D = unknown> {
413
+ declare class HubActiveModal<D = unknown, R = any> {
411
414
  private readonly _data;
412
415
  /**
413
416
  * Creates the active modal reference.
@@ -436,7 +439,7 @@ declare class HubActiveModal<D = unknown> {
436
439
  *
437
440
  * The `HubModalRef.result` promise will be resolved with the provided value.
438
441
  */
439
- close(result?: any): void;
442
+ close(result?: R): void;
440
443
  /**
441
444
  * Dismisses the modal with an optional `reason` value.
442
445
  *
@@ -447,7 +450,7 @@ declare class HubActiveModal<D = unknown> {
447
450
  /**
448
451
  * A reference to the newly opened modal returned by the `HubModal.open()` method.
449
452
  */
450
- declare class HubModalRef<T = any> {
453
+ declare class HubModalRef<C = any, R = any> {
451
454
  private _windowCmptRef;
452
455
  private _contentRef;
453
456
  private _backdropCmptRef?;
@@ -470,11 +473,11 @@ declare class HubModalRef<T = any> {
470
473
  *
471
474
  * When a `TemplateRef` is used as the content or when the modal is closed, will return `undefined`.
472
475
  */
473
- get componentInstance(): T | void;
476
+ get componentInstance(): C | void;
474
477
  /**
475
478
  * The promise that is resolved when the modal is closed and rejected when the modal is dismissed.
476
479
  */
477
- result: Promise<any>;
480
+ result: Promise<R>;
478
481
  /**
479
482
  * The observable that emits when the modal is closed via the `.close()` method.
480
483
  *
@@ -482,7 +485,7 @@ declare class HubModalRef<T = any> {
482
485
  *
483
486
  * @since 8.0.0
484
487
  */
485
- get closed(): Observable<any>;
488
+ get closed(): Observable<R>;
486
489
  /**
487
490
  * The observable that emits when the modal is dismissed via the `.dismiss()` method.
488
491
  *
@@ -517,7 +520,7 @@ declare class HubModalRef<T = any> {
517
520
  *
518
521
  * The `HubMobalRef.result` promise will be resolved with the provided value.
519
522
  */
520
- close(result?: any): void;
523
+ close(result?: R): void;
521
524
  private _dismiss;
522
525
  /**
523
526
  * Dismisses the modal with an optional `reason` value.
@@ -546,12 +549,17 @@ declare class HubModal {
546
549
  * use `HubActiveModal` methods to close / dismiss modals from "inside" of your component.
547
550
  *
548
551
  * Also see the [`HubModalOptions`](#/components/modal/api#HubModalOptions) for the list of supported options.
552
+ *
553
+ * Generics: `C` is the content component type (inferred from the class you pass,
554
+ * so `componentInstance` is typed without casts), `R` is the result type flowing
555
+ * through `close()` / `result` / `closed`, and `D` types the `options.data`
556
+ * payload (paired with `HubActiveModal<D>` / `HUB_MODAL_DATA` on the inside).
549
557
  */
550
- open<T = any>(content: T, options?: HubModalOptions): HubModalRef<T>;
558
+ open<C = any, R = any, D = unknown>(content: Type<C> | TemplateRef<any> | string, options?: HubModalOptions<D>): HubModalRef<C, R>;
551
559
  /**
552
560
  * Returns an observable that holds the active modal instances.
553
561
  */
554
- get activeInstances(): _angular_core.EventEmitter<HubModalRef<any>[]>;
562
+ get activeInstances(): _angular_core.EventEmitter<HubModalRef<any, any>[]>;
555
563
  /**
556
564
  * Dismisses all currently displayed modal windows with the supplied reason.
557
565
  *
Binary file