@angular/cdk 21.2.0-rc.0 → 21.2.1

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/fesm2022/cdk.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Version } from '@angular/core';
2
2
 
3
- const VERSION = new Version('21.2.0-rc.0');
3
+ const VERSION = new Version('21.2.1');
4
4
 
5
5
  export { VERSION };
6
6
  //# sourceMappingURL=cdk.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"cdk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('21.2.0-rc.0');\n"],"names":["VERSION","Version"],"mappings":";;MAWaA,OAAO,GAAG,IAAIC,OAAO,CAAC,mBAAmB;;;;"}
1
+ {"version":3,"file":"cdk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('21.2.1');\n"],"names":["VERSION","Version"],"mappings":";;MAWaA,OAAO,GAAG,IAAIC,OAAO,CAAC,mBAAmB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/dialog/dialog-config.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/dialog/dialog-container.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/dialog/dialog-container.html","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/dialog/dialog-ref.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/dialog/dialog-injectors.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/dialog/dialog.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/dialog/dialog-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ViewContainerRef, Injector, StaticProvider, Type} from '@angular/core';\nimport {Direction} from '../bidi';\nimport {PositionStrategy, ScrollStrategy} from '../overlay';\nimport {Observable} from 'rxjs';\nimport {BasePortalOutlet} from '../portal';\nimport {FocusOrigin} from '../a11y';\n\n/** Options for where to set focus to automatically on dialog open */\nexport type AutoFocusTarget = 'dialog' | 'first-tabbable' | 'first-heading';\n\n/** Valid ARIA roles for a dialog. */\nexport type DialogRole = 'dialog' | 'alertdialog';\n\n/** Component that can be used as the container for the dialog. */\nexport type DialogContainer = BasePortalOutlet & {\n _focusTrapped?: Observable<void>;\n _closeInteractionType?: FocusOrigin;\n _recaptureFocus?: () => void;\n};\n\n/** Configuration for opening a modal dialog. */\nexport class DialogConfig<D = unknown, R = unknown, C extends DialogContainer = BasePortalOutlet> {\n /**\n * Where the attached component should live in Angular's *logical* component tree.\n * This affects what is available for injection and the change detection order for the\n * component instantiated inside of the dialog. This does not affect where the dialog\n * content will be rendered.\n */\n viewContainerRef?: ViewContainerRef;\n\n /**\n * Injector used for the instantiation of the component to be attached. If provided,\n * takes precedence over the injector indirectly provided by `ViewContainerRef`.\n */\n injector?: Injector;\n\n /** ID for the dialog. If omitted, a unique one will be generated. */\n id?: string;\n\n /** The ARIA role of the dialog element. */\n role?: DialogRole = 'dialog';\n\n /** Optional CSS class or classes applied to the overlay panel. */\n panelClass?: string | string[] = '';\n\n /** Whether the dialog has a backdrop. */\n hasBackdrop?: boolean = true;\n\n /** Optional CSS class or classes applied to the overlay backdrop. */\n backdropClass?: string | string[] = '';\n\n /** Whether the dialog closes with the escape key or pointer events outside the panel element. */\n disableClose?: boolean = false;\n\n /** Function used to determine whether the dialog is allowed to close. */\n closePredicate?: <\n Result = unknown,\n Component = unknown,\n Config extends DialogConfig = DialogConfig,\n >(\n result: Result | undefined,\n config: Config,\n componentInstance: Component | null,\n ) => boolean;\n\n /** Width of the dialog. */\n width?: string = '';\n\n /** Height of the dialog. */\n height?: string = '';\n\n /** Min-width of the dialog. If a number is provided, assumes pixel units. */\n minWidth?: number | string;\n\n /** Min-height of the dialog. If a number is provided, assumes pixel units. */\n minHeight?: number | string;\n\n /** Max-width of the dialog. If a number is provided, assumes pixel units. */\n maxWidth?: number | string;\n\n /** Max-height of the dialog. If a number is provided, assumes pixel units. */\n maxHeight?: number | string;\n\n /** Strategy to use when positioning the dialog. Defaults to centering it on the page. */\n positionStrategy?: PositionStrategy;\n\n /** Data being injected into the child component. */\n data?: D | null = null;\n\n /** Layout direction for the dialog's content. */\n direction?: Direction;\n\n /** ID of the element that describes the dialog. */\n ariaDescribedBy?: string | null = null;\n\n /** ID of the element that labels the dialog. */\n ariaLabelledBy?: string | null = null;\n\n /** Dialog label applied via `aria-label` */\n ariaLabel?: string | null = null;\n\n /**\n * Whether this is a modal dialog. Used to set the `aria-modal` attribute. Off by default,\n * because it can interfere with other overlay-based components (e.g. `mat-select`) and because\n * it is redundant since the dialog marks all outside content as `aria-hidden` anyway.\n */\n ariaModal?: boolean = false;\n\n /**\n * Where the dialog should focus on open.\n * @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or\n * AutoFocusTarget instead.\n */\n autoFocus?: AutoFocusTarget | string | boolean = 'first-tabbable';\n\n /**\n * Whether the dialog should restore focus to the previously-focused element upon closing.\n * Has the following behavior based on the type that is passed in:\n * - `boolean` - when true, will return focus to the element that was focused before the dialog\n * was opened, otherwise won't restore focus at all.\n * - `string` - focus will be restored to the first element that matches the CSS selector.\n * - `HTMLElement` - focus will be restored to the specific element.\n */\n restoreFocus?: boolean | string | HTMLElement = true;\n\n /**\n * Scroll strategy to be used for the dialog. This determines how\n * the dialog responds to scrolling underneath the panel element.\n */\n scrollStrategy?: ScrollStrategy;\n\n /**\n * Whether the dialog should close when the user navigates backwards or forwards through browser\n * history. This does not apply to navigation via anchor element unless using URL-hash based\n * routing (`HashLocationStrategy` in the Angular router).\n */\n closeOnNavigation?: boolean = true;\n\n /**\n * Whether the dialog should close when the dialog service is destroyed. This is useful if\n * another service is wrapping the dialog and is managing the destruction instead.\n */\n closeOnDestroy?: boolean = true;\n\n /**\n * Whether the dialog should close when the underlying overlay is detached. This is useful if\n * another service is wrapping the dialog and is managing the destruction instead. E.g. an\n * external detachment can happen as a result of a scroll strategy triggering it or when the\n * browser location changes.\n */\n closeOnOverlayDetachments?: boolean = true;\n\n /**\n * Whether the built-in overlay animations should be disabled.\n */\n disableAnimations?: boolean = false;\n\n /**\n * Providers that will be exposed to the contents of the dialog. Can also\n * be provided as a function in order to generate the providers lazily.\n */\n providers?:\n | StaticProvider[]\n | ((dialogRef: R, config: DialogConfig<D, R, C>, container: C) => StaticProvider[]);\n\n /**\n * Component into which the dialog content will be rendered. Defaults to `CdkDialogContainer`.\n * A configuration object can be passed in to customize the providers that will be exposed\n * to the dialog container.\n */\n container?:\n | Type<C>\n | {\n type: Type<C>;\n providers: (config: DialogConfig<D, R, C>) => StaticProvider[];\n };\n\n /**\n * Context that will be passed to template-based dialogs.\n * A function can be passed in to resolve the context lazily.\n */\n templateContext?: Record<string, any> | (() => Record<string, any>);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n FocusMonitor,\n FocusOrigin,\n FocusTrap,\n FocusTrapFactory,\n InteractivityChecker,\n} from '../a11y';\nimport {Platform, _getFocusedElementPierceShadowDom} from '../platform';\nimport {\n BasePortalOutlet,\n CdkPortalOutlet,\n ComponentPortal,\n DomPortal,\n TemplatePortal,\n} from '../portal';\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ComponentRef,\n ElementRef,\n EmbeddedViewRef,\n Injector,\n NgZone,\n OnDestroy,\n Renderer2,\n ViewChild,\n ViewEncapsulation,\n afterNextRender,\n inject,\n DOCUMENT,\n} from '@angular/core';\nimport {DialogConfig, DialogContainer} from './dialog-config';\nimport {Observable, Subject} from 'rxjs';\n\nexport function throwDialogContentAlreadyAttachedError() {\n throw Error('Attempting to attach dialog content after content is already attached');\n}\n\n/**\n * Internal component that wraps user-provided dialog content.\n * @docs-private\n */\n@Component({\n selector: 'cdk-dialog-container',\n templateUrl: './dialog-container.html',\n styleUrl: 'dialog-container.css',\n encapsulation: ViewEncapsulation.None,\n // Using OnPush for dialogs caused some G3 sync issues. Disabled until we can track them down.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n imports: [CdkPortalOutlet],\n host: {\n 'class': 'cdk-dialog-container',\n 'tabindex': '-1',\n '[attr.id]': '_config.id || null',\n '[attr.role]': '_config.role',\n '[attr.aria-modal]': '_config.ariaModal',\n '[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledByQueue[0]',\n '[attr.aria-label]': '_config.ariaLabel',\n '[attr.aria-describedby]': '_config.ariaDescribedBy || null',\n },\n})\nexport class CdkDialogContainer<C extends DialogConfig = DialogConfig>\n extends BasePortalOutlet\n implements DialogContainer, OnDestroy\n{\n protected _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n protected _focusTrapFactory = inject(FocusTrapFactory);\n readonly _config: C;\n private _interactivityChecker = inject(InteractivityChecker);\n protected _ngZone = inject(NgZone);\n private _focusMonitor = inject(FocusMonitor);\n private _renderer = inject(Renderer2);\n protected readonly _changeDetectorRef = inject(ChangeDetectorRef);\n private _injector = inject(Injector);\n private _platform = inject(Platform);\n protected _document = inject(DOCUMENT);\n\n /** The portal outlet inside of this container into which the dialog content will be loaded. */\n @ViewChild(CdkPortalOutlet, {static: true}) _portalOutlet!: CdkPortalOutlet;\n\n _focusTrapped: Observable<void> = new Subject<void>();\n\n /** The class that traps and manages focus within the dialog. */\n private _focusTrap: FocusTrap | null = null;\n\n /** Element that was focused before the dialog was opened. Save this to restore upon close. */\n private _elementFocusedBeforeDialogWasOpened: HTMLElement | null = null;\n\n /**\n * Type of interaction that led to the dialog being closed. This is used to determine\n * whether the focus style will be applied when returning focus to its original location\n * after the dialog is closed.\n */\n _closeInteractionType: FocusOrigin | null = null;\n\n /**\n * Queue of the IDs of the dialog's label element, based on their definition order. The first\n * ID will be used as the `aria-labelledby` value. We use a queue here to handle the case\n * where there are two or more titles in the DOM at a time and the first one is destroyed while\n * the rest are present.\n */\n _ariaLabelledByQueue: string[] = [];\n\n private _isDestroyed = false;\n\n constructor(...args: unknown[]);\n\n constructor() {\n super();\n\n // Callback is primarily for some internal tests\n // that were instantiating the dialog container manually.\n this._config = (inject(DialogConfig, {optional: true}) || new DialogConfig()) as C;\n\n if (this._config.ariaLabelledBy) {\n this._ariaLabelledByQueue.push(this._config.ariaLabelledBy);\n }\n }\n\n _addAriaLabelledBy(id: string) {\n this._ariaLabelledByQueue.push(id);\n this._changeDetectorRef.markForCheck();\n }\n\n _removeAriaLabelledBy(id: string) {\n const index = this._ariaLabelledByQueue.indexOf(id);\n\n if (index > -1) {\n this._ariaLabelledByQueue.splice(index, 1);\n this._changeDetectorRef.markForCheck();\n }\n }\n\n protected _contentAttached() {\n this._initializeFocusTrap();\n this._captureInitialFocus();\n }\n\n /**\n * Can be used by child classes to customize the initial focus\n * capturing behavior (e.g. if it's tied to an animation).\n */\n protected _captureInitialFocus() {\n this._trapFocus();\n }\n\n ngOnDestroy() {\n (this._focusTrapped as Subject<void>).complete();\n this._isDestroyed = true;\n this._restoreFocus();\n }\n\n /**\n * Attach a ComponentPortal as content to this dialog container.\n * @param portal Portal to be attached as the dialog content.\n */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throwDialogContentAlreadyAttachedError();\n }\n\n const result = this._portalOutlet.attachComponentPortal(portal);\n this._contentAttached();\n return result;\n }\n\n /**\n * Attach a TemplatePortal as content to this dialog container.\n * @param portal Portal to be attached as the dialog content.\n */\n attachTemplatePortal<T>(portal: TemplatePortal<T>): EmbeddedViewRef<T> {\n if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throwDialogContentAlreadyAttachedError();\n }\n\n const result = this._portalOutlet.attachTemplatePortal(portal);\n this._contentAttached();\n return result;\n }\n\n /**\n * Attaches a DOM portal to the dialog container.\n * @param portal Portal to be attached.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n override attachDomPortal = (portal: DomPortal) => {\n if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throwDialogContentAlreadyAttachedError();\n }\n\n const result = this._portalOutlet.attachDomPortal(portal);\n this._contentAttached();\n return result;\n };\n\n // TODO(crisbeto): this shouldn't be exposed, but there are internal references to it.\n /** Captures focus if it isn't already inside the dialog. */\n _recaptureFocus() {\n if (!this._containsFocus()) {\n this._trapFocus();\n }\n }\n\n /**\n * Focuses the provided element. If the element is not focusable, it will add a tabIndex\n * attribute to forcefully focus it. The attribute is removed after focus is moved.\n * @param element The element to focus.\n */\n private _forceFocus(element: HTMLElement, options?: FocusOptions) {\n if (!this._interactivityChecker.isFocusable(element)) {\n element.tabIndex = -1;\n // The tabindex attribute should be removed to avoid navigating to that element again\n this._ngZone.runOutsideAngular(() => {\n const callback = () => {\n deregisterBlur();\n deregisterMousedown();\n element.removeAttribute('tabindex');\n };\n\n const deregisterBlur = this._renderer.listen(element, 'blur', callback);\n const deregisterMousedown = this._renderer.listen(element, 'mousedown', callback);\n });\n }\n element.focus(options);\n }\n\n /**\n * Focuses the first element that matches the given selector within the focus trap.\n * @param selector The CSS selector for the element to set focus to.\n */\n private _focusByCssSelector(selector: string, options?: FocusOptions) {\n let elementToFocus = this._elementRef.nativeElement.querySelector(\n selector,\n ) as HTMLElement | null;\n if (elementToFocus) {\n this._forceFocus(elementToFocus, options);\n }\n }\n\n /**\n * Moves the focus inside the focus trap. When autoFocus is not set to 'dialog', if focus\n * cannot be moved then focus will go to the dialog container.\n */\n protected _trapFocus(options?: FocusOptions) {\n if (this._isDestroyed) {\n return;\n }\n\n // If were to attempt to focus immediately, then the content of the dialog would not yet be\n // ready in instances where change detection has to run first. To deal with this, we simply\n // wait until after the next render.\n afterNextRender(\n () => {\n const element = this._elementRef.nativeElement;\n switch (this._config.autoFocus) {\n case false:\n case 'dialog':\n // Ensure that focus is on the dialog container. It's possible that a different\n // component tried to move focus while the open animation was running. See:\n // https://github.com/angular/components/issues/16215. Note that we only want to do this\n // if the focus isn't inside the dialog already, because it's possible that the consumer\n // turned off `autoFocus` in order to move focus themselves.\n if (!this._containsFocus()) {\n element.focus(options);\n }\n break;\n case true:\n case 'first-tabbable':\n const focusedSuccessfully = this._focusTrap?.focusInitialElement(options);\n // If we weren't able to find a focusable element in the dialog, then focus the dialog\n // container instead.\n if (!focusedSuccessfully) {\n this._focusDialogContainer(options);\n }\n break;\n case 'first-heading':\n this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role=\"heading\"]', options);\n break;\n default:\n this._focusByCssSelector(this._config.autoFocus!, options);\n break;\n }\n (this._focusTrapped as Subject<void>).next();\n },\n {injector: this._injector},\n );\n }\n\n /** Restores focus to the element that was focused before the dialog opened. */\n private _restoreFocus() {\n const focusConfig = this._config.restoreFocus;\n let focusTargetElement: HTMLElement | null = null;\n\n if (typeof focusConfig === 'string') {\n focusTargetElement = this._document.querySelector(focusConfig);\n } else if (typeof focusConfig === 'boolean') {\n focusTargetElement = focusConfig ? this._elementFocusedBeforeDialogWasOpened : null;\n } else if (focusConfig) {\n focusTargetElement = focusConfig;\n }\n\n // We need the extra check, because IE can set the `activeElement` to null in some cases.\n if (\n this._config.restoreFocus &&\n focusTargetElement &&\n typeof focusTargetElement.focus === 'function'\n ) {\n const activeElement = _getFocusedElementPierceShadowDom();\n const element = this._elementRef.nativeElement;\n\n // Make sure that focus is still inside the dialog or is on the body (usually because a\n // non-focusable element like the backdrop was clicked) before moving it. It's possible that\n // the consumer moved it themselves before the animation was done, in which case we shouldn't\n // do anything.\n if (\n !activeElement ||\n activeElement === this._document.body ||\n activeElement === element ||\n element.contains(activeElement)\n ) {\n if (this._focusMonitor) {\n this._focusMonitor.focusVia(focusTargetElement, this._closeInteractionType);\n this._closeInteractionType = null;\n } else {\n focusTargetElement.focus();\n }\n }\n }\n\n if (this._focusTrap) {\n this._focusTrap.destroy();\n }\n }\n\n /** Focuses the dialog container. */\n private _focusDialogContainer(options?: FocusOptions) {\n // Note that there is no focus method when rendering on the server.\n this._elementRef.nativeElement.focus?.(options);\n }\n\n /** Returns whether focus is inside the dialog. */\n private _containsFocus() {\n const element = this._elementRef.nativeElement;\n const activeElement = _getFocusedElementPierceShadowDom();\n return element === activeElement || element.contains(activeElement);\n }\n\n /** Sets up the focus trap. */\n private _initializeFocusTrap() {\n if (this._platform.isBrowser) {\n this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement);\n\n // Save the previously focused element. This element will be re-focused\n // when the dialog closes.\n if (this._document) {\n this._elementFocusedBeforeDialogWasOpened = _getFocusedElementPierceShadowDom();\n }\n }\n }\n}\n","<ng-template cdkPortalOutlet />\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {OverlayRef} from '../overlay';\nimport {ESCAPE, hasModifierKey} from '../keycodes';\nimport {Observable, Subject, Subscription} from 'rxjs';\nimport {DialogConfig, DialogContainer} from './dialog-config';\nimport {FocusOrigin} from '../a11y';\nimport {ComponentRef} from '@angular/core';\n\n/** Additional options that can be passed in when closing a dialog. */\nexport interface DialogCloseOptions {\n /** Focus original to use when restoring focus. */\n focusOrigin?: FocusOrigin;\n}\n\n/**\n * Reference to a dialog opened via the Dialog service.\n */\nexport class DialogRef<R = unknown, C = unknown> {\n /**\n * Instance of component opened into the dialog. Will be\n * null when the dialog is opened using a `TemplateRef`.\n */\n readonly componentInstance: C | null = null;\n\n /**\n * `ComponentRef` of the component opened into the dialog. Will be\n * null when the dialog is opened using a `TemplateRef`.\n */\n readonly componentRef: ComponentRef<C> | null = null;\n\n /** Instance of the container that is rendering out the dialog content. */\n readonly containerInstance!: DialogContainer;\n\n /** Whether the user is allowed to close the dialog. */\n disableClose: boolean | undefined;\n\n /** Emits when the dialog has been closed. */\n readonly closed: Observable<R | undefined> = new Subject<R | undefined>();\n\n /** Emits when the backdrop of the dialog is clicked. */\n readonly backdropClick: Observable<MouseEvent>;\n\n /** Emits when on keyboard events within the dialog. */\n readonly keydownEvents: Observable<KeyboardEvent>;\n\n /** Emits on pointer events that happen outside of the dialog. */\n readonly outsidePointerEvents: Observable<MouseEvent>;\n\n /** Unique ID for the dialog. */\n readonly id: string;\n\n /** Subscription to external detachments of the dialog. */\n private _detachSubscription: Subscription;\n\n constructor(\n readonly overlayRef: OverlayRef,\n readonly config: DialogConfig<any, DialogRef<R, C>, DialogContainer>,\n ) {\n this.disableClose = config.disableClose;\n this.backdropClick = overlayRef.backdropClick();\n this.keydownEvents = overlayRef.keydownEvents();\n this.outsidePointerEvents = overlayRef.outsidePointerEvents();\n this.id = config.id!; // By the time the dialog is created we are guaranteed to have an ID.\n\n this.keydownEvents.subscribe(event => {\n if (event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event)) {\n event.preventDefault();\n this.close(undefined, {focusOrigin: 'keyboard'});\n }\n });\n\n this.backdropClick.subscribe(() => {\n if (!this.disableClose && this._canClose()) {\n this.close(undefined, {focusOrigin: 'mouse'});\n } else {\n // Clicking on the backdrop will move focus out of dialog.\n // Recapture it if closing via the backdrop is disabled.\n this.containerInstance._recaptureFocus?.();\n }\n });\n\n this._detachSubscription = overlayRef.detachments().subscribe(() => {\n // Check specifically for `false`, because we want `undefined` to be treated like `true`.\n if (config.closeOnOverlayDetachments !== false) {\n this.close();\n }\n });\n }\n\n /**\n * Close the dialog.\n * @param result Optional result to return to the dialog opener.\n * @param options Additional options to customize the closing behavior.\n */\n close(result?: R, options?: DialogCloseOptions): void {\n if (this._canClose(result)) {\n const closedSubject = this.closed as Subject<R | undefined>;\n this.containerInstance._closeInteractionType = options?.focusOrigin || 'program';\n // Drop the detach subscription first since it can be triggered by the\n // `dispose` call and override the result of this closing sequence.\n this._detachSubscription.unsubscribe();\n this.overlayRef.dispose();\n closedSubject.next(result);\n closedSubject.complete();\n (this as {componentInstance: C}).componentInstance = (\n this as {containerInstance: DialogContainer}\n ).containerInstance = null!;\n }\n }\n\n /** Updates the position of the dialog based on the current position strategy. */\n updatePosition(): this {\n this.overlayRef.updatePosition();\n return this;\n }\n\n /**\n * Updates the dialog's width and height.\n * @param width New width of the dialog.\n * @param height New height of the dialog.\n */\n updateSize(width: string | number = '', height: string | number = ''): this {\n this.overlayRef.updateSize({width, height});\n return this;\n }\n\n /** Add a CSS class or an array of classes to the overlay pane. */\n addPanelClass(classes: string | string[]): this {\n this.overlayRef.addPanelClass(classes);\n return this;\n }\n\n /** Remove a CSS class or an array of classes from the overlay pane. */\n removePanelClass(classes: string | string[]): this {\n this.overlayRef.removePanelClass(classes);\n return this;\n }\n\n /** Whether the dialog is allowed to close. */\n private _canClose(result?: R): boolean {\n const config = this.config as DialogConfig<unknown, unknown, DialogContainer>;\n\n return (\n !!this.containerInstance &&\n (!config.closePredicate || config.closePredicate(result, config, this.componentInstance))\n );\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectionToken, Injector, inject} from '@angular/core';\nimport {createBlockScrollStrategy, ScrollStrategy} from '../overlay';\nimport {DialogConfig} from './dialog-config';\n\n/** Injection token for the Dialog's ScrollStrategy. */\nexport const DIALOG_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrategy>(\n 'DialogScrollStrategy',\n {\n providedIn: 'root',\n factory: () => {\n const injector = inject(Injector);\n return () => createBlockScrollStrategy(injector);\n },\n },\n);\n\n/** Injection token for the Dialog's Data. */\nexport const DIALOG_DATA = new InjectionToken<any>('DialogData');\n\n/** Injection token that can be used to provide default options for the dialog module. */\nexport const DEFAULT_DIALOG_CONFIG = new InjectionToken<DialogConfig>('DefaultDialogConfig');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n ComponentRef,\n EventEmitter,\n Injectable,\n Injector,\n OnDestroy,\n StaticProvider,\n TemplateRef,\n Type,\n inject,\n signal,\n} from '@angular/core';\nimport {Observable, Subject, defer} from 'rxjs';\nimport {startWith, take} from 'rxjs/operators';\nimport {_IdGenerator} from '../a11y';\nimport {Direction, Directionality} from '../bidi';\nimport {\n ComponentType,\n createGlobalPositionStrategy,\n createOverlayRef,\n OverlayConfig,\n OverlayContainer,\n OverlayRef,\n} from '../overlay';\nimport {ComponentPortal, TemplatePortal} from '../portal';\nimport {DialogConfig, DialogContainer} from './dialog-config';\nimport {DialogRef} from './dialog-ref';\n\nimport {CdkDialogContainer} from './dialog-container';\nimport {DEFAULT_DIALOG_CONFIG, DIALOG_DATA, DIALOG_SCROLL_STRATEGY} from './dialog-injectors';\n\nfunction getDirectionality(value: Direction): Directionality {\n const valueSignal = signal(value);\n const change = new EventEmitter<Direction>();\n return {\n valueSignal,\n get value() {\n return valueSignal();\n },\n change,\n ngOnDestroy() {\n change.complete();\n },\n };\n}\n\n@Injectable({providedIn: 'root'})\nexport class Dialog implements OnDestroy {\n private _injector = inject(Injector);\n private _defaultOptions = inject<DialogConfig>(DEFAULT_DIALOG_CONFIG, {optional: true});\n private _parentDialog = inject(Dialog, {optional: true, skipSelf: true});\n private _overlayContainer = inject(OverlayContainer);\n private _idGenerator = inject(_IdGenerator);\n\n private _openDialogsAtThisLevel: DialogRef<any, any>[] = [];\n private readonly _afterAllClosedAtThisLevel = new Subject<void>();\n private readonly _afterOpenedAtThisLevel = new Subject<DialogRef>();\n private _ariaHiddenElements = new Map<Element, string | null>();\n private _scrollStrategy = inject(DIALOG_SCROLL_STRATEGY);\n\n /** Keeps track of the currently-open dialogs. */\n get openDialogs(): readonly DialogRef<any, any>[] {\n return this._parentDialog ? this._parentDialog.openDialogs : this._openDialogsAtThisLevel;\n }\n\n /** Stream that emits when a dialog has been opened. */\n get afterOpened(): Subject<DialogRef<any, any>> {\n return this._parentDialog ? this._parentDialog.afterOpened : this._afterOpenedAtThisLevel;\n }\n\n /**\n * Stream that emits when all open dialog have finished closing.\n * Will emit on subscribe if there are no open dialogs to begin with.\n */\n readonly afterAllClosed: Observable<void> = defer(() =>\n this.openDialogs.length\n ? this._getAfterAllClosed()\n : this._getAfterAllClosed().pipe(startWith(undefined)),\n );\n\n constructor(...args: unknown[]);\n\n constructor() {}\n\n /**\n * Opens a modal dialog containing the given component.\n * @param component Type of the component to load into the dialog.\n * @param config Extra configuration options.\n * @returns Reference to the newly-opened dialog.\n */\n open<R = unknown, D = unknown, C = unknown>(\n component: ComponentType<C>,\n config?: DialogConfig<D, DialogRef<R, C>>,\n ): DialogRef<R, C>;\n\n /**\n * Opens a modal dialog containing the given template.\n * @param template TemplateRef to instantiate as the dialog content.\n * @param config Extra configuration options.\n * @returns Reference to the newly-opened dialog.\n */\n open<R = unknown, D = unknown, C = unknown>(\n template: TemplateRef<C>,\n config?: DialogConfig<D, DialogRef<R, C>>,\n ): DialogRef<R, C>;\n\n open<R = unknown, D = unknown, C = unknown>(\n componentOrTemplateRef: ComponentType<C> | TemplateRef<C>,\n config?: DialogConfig<D, DialogRef<R, C>>,\n ): DialogRef<R, C>;\n\n open<R = unknown, D = unknown, C = unknown>(\n componentOrTemplateRef: ComponentType<C> | TemplateRef<C>,\n config?: DialogConfig<D, DialogRef<R, C>>,\n ): DialogRef<R, C> {\n const defaults = (this._defaultOptions || new DialogConfig()) as DialogConfig<\n D,\n DialogRef<R, C>\n >;\n config = {...defaults, ...config};\n config.id = config.id || this._idGenerator.getId('cdk-dialog-');\n\n if (\n config.id &&\n this.getDialogById(config.id) &&\n (typeof ngDevMode === 'undefined' || ngDevMode)\n ) {\n throw Error(`Dialog with id \"${config.id}\" exists already. The dialog id must be unique.`);\n }\n\n const overlayConfig = this._getOverlayConfig(config);\n const overlayRef = createOverlayRef(this._injector, overlayConfig);\n const dialogRef = new DialogRef(overlayRef, config);\n const dialogContainer = this._attachContainer(overlayRef, dialogRef, config);\n\n (dialogRef as {containerInstance: DialogContainer}).containerInstance = dialogContainer;\n\n // If this is the first dialog that we're opening, hide all the non-overlay content.\n if (!this.openDialogs.length) {\n // Resolve this ahead of time, because some internal apps\n // mock it out and depend on it being synchronous.\n const overlayContainer = this._overlayContainer.getContainerElement();\n\n if (dialogContainer._focusTrapped) {\n dialogContainer._focusTrapped.pipe(take(1)).subscribe(() => {\n this._hideNonDialogContentFromAssistiveTechnology(overlayContainer);\n });\n } else {\n this._hideNonDialogContentFromAssistiveTechnology(overlayContainer);\n }\n }\n\n this._attachDialogContent(componentOrTemplateRef, dialogRef, dialogContainer, config);\n (this.openDialogs as DialogRef<R, C>[]).push(dialogRef);\n dialogRef.closed.subscribe(() => this._removeOpenDialog(dialogRef, true));\n this.afterOpened.next(dialogRef);\n\n return dialogRef;\n }\n\n /**\n * Closes all of the currently-open dialogs.\n */\n closeAll(): void {\n reverseForEach(this.openDialogs, dialog => dialog.close());\n }\n\n /**\n * Finds an open dialog by its id.\n * @param id ID to use when looking up the dialog.\n */\n getDialogById<R, C>(id: string): DialogRef<R, C> | undefined {\n return this.openDialogs.find(dialog => dialog.id === id);\n }\n\n ngOnDestroy() {\n // Make one pass over all the dialogs that need to be untracked, but should not be closed. We\n // want to stop tracking the open dialog even if it hasn't been closed, because the tracking\n // determines when `aria-hidden` is removed from elements outside the dialog.\n reverseForEach(this._openDialogsAtThisLevel, dialog => {\n // Check for `false` specifically since we want `undefined` to be interpreted as `true`.\n if (dialog.config.closeOnDestroy === false) {\n this._removeOpenDialog(dialog, false);\n }\n });\n\n // Make a second pass and close the remaining dialogs. We do this second pass in order to\n // correctly dispatch the `afterAllClosed` event in case we have a mixed array of dialogs\n // that should be closed and dialogs that should not.\n reverseForEach(this._openDialogsAtThisLevel, dialog => dialog.close());\n\n this._afterAllClosedAtThisLevel.complete();\n this._afterOpenedAtThisLevel.complete();\n this._openDialogsAtThisLevel = [];\n }\n\n /**\n * Creates an overlay config from a dialog config.\n * @param config The dialog configuration.\n * @returns The overlay configuration.\n */\n private _getOverlayConfig<D, R>(config: DialogConfig<D, R>): OverlayConfig {\n const state = new OverlayConfig({\n positionStrategy:\n config.positionStrategy ||\n createGlobalPositionStrategy(this._injector).centerHorizontally().centerVertically(),\n scrollStrategy: config.scrollStrategy || this._scrollStrategy(),\n panelClass: config.panelClass,\n hasBackdrop: config.hasBackdrop,\n direction: config.direction,\n minWidth: config.minWidth,\n minHeight: config.minHeight,\n maxWidth: config.maxWidth,\n maxHeight: config.maxHeight,\n width: config.width,\n height: config.height,\n disposeOnNavigation: config.closeOnNavigation,\n disableAnimations: config.disableAnimations,\n });\n\n if (config.backdropClass) {\n state.backdropClass = config.backdropClass;\n }\n\n return state;\n }\n\n /**\n * Attaches a dialog container to a dialog's already-created overlay.\n * @param overlay Reference to the dialog's underlying overlay.\n * @param config The dialog configuration.\n * @returns A promise resolving to a ComponentRef for the attached container.\n */\n private _attachContainer<R, D, C>(\n overlay: OverlayRef,\n dialogRef: DialogRef<R, C>,\n config: DialogConfig<D, DialogRef<R, C>>,\n ): DialogContainer {\n const userInjector = config.injector || config.viewContainerRef?.injector;\n const providers: StaticProvider[] = [\n {provide: DialogConfig, useValue: config},\n {provide: DialogRef, useValue: dialogRef},\n {provide: OverlayRef, useValue: overlay},\n ];\n let containerType: Type<DialogContainer>;\n\n if (config.container) {\n if (typeof config.container === 'function') {\n containerType = config.container;\n } else {\n containerType = config.container.type;\n providers.push(...config.container.providers(config));\n }\n } else {\n containerType = CdkDialogContainer;\n }\n\n const containerPortal = new ComponentPortal(\n containerType,\n config.viewContainerRef,\n Injector.create({parent: userInjector || this._injector, providers}),\n );\n const containerRef = overlay.attach(containerPortal);\n\n return containerRef.instance;\n }\n\n /**\n * Attaches the user-provided component to the already-created dialog container.\n * @param componentOrTemplateRef The type of component being loaded into the dialog,\n * or a TemplateRef to instantiate as the content.\n * @param dialogRef Reference to the dialog being opened.\n * @param dialogContainer Component that is going to wrap the dialog content.\n * @param config Configuration used to open the dialog.\n */\n private _attachDialogContent<R, D, C>(\n componentOrTemplateRef: ComponentType<C> | TemplateRef<C>,\n dialogRef: DialogRef<R, C>,\n dialogContainer: DialogContainer,\n config: DialogConfig<D, DialogRef<R, C>>,\n ) {\n if (componentOrTemplateRef instanceof TemplateRef) {\n const injector = this._createInjector(config, dialogRef, dialogContainer, undefined);\n let context: any = {$implicit: config.data, dialogRef};\n\n if (config.templateContext) {\n context = {\n ...context,\n ...(typeof config.templateContext === 'function'\n ? config.templateContext()\n : config.templateContext),\n };\n }\n\n dialogContainer.attachTemplatePortal(\n new TemplatePortal<C>(componentOrTemplateRef, null!, context, injector),\n );\n } else {\n const injector = this._createInjector(config, dialogRef, dialogContainer, this._injector);\n const contentRef = dialogContainer.attachComponentPortal<C>(\n new ComponentPortal(componentOrTemplateRef, config.viewContainerRef, injector),\n );\n (dialogRef as {componentRef: ComponentRef<C>}).componentRef = contentRef;\n (dialogRef as {componentInstance: C}).componentInstance = contentRef.instance;\n }\n }\n\n /**\n * Creates a custom injector to be used inside the dialog. This allows a component loaded inside\n * of a dialog to close itself and, optionally, to return a value.\n * @param config Config object that is used to construct the dialog.\n * @param dialogRef Reference to the dialog being opened.\n * @param dialogContainer Component that is going to wrap the dialog content.\n * @param fallbackInjector Injector to use as a fallback when a lookup fails in the custom\n * dialog injector, if the user didn't provide a custom one.\n * @returns The custom injector that can be used inside the dialog.\n */\n private _createInjector<R, D, C>(\n config: DialogConfig<D, DialogRef<R, C>>,\n dialogRef: DialogRef<R, C>,\n dialogContainer: DialogContainer,\n fallbackInjector: Injector | undefined,\n ): Injector {\n const userInjector = config.injector || config.viewContainerRef?.injector;\n const providers: StaticProvider[] = [\n {provide: DIALOG_DATA, useValue: config.data},\n {provide: DialogRef, useValue: dialogRef},\n ];\n\n if (config.providers) {\n if (typeof config.providers === 'function') {\n providers.push(...config.providers(dialogRef, config, dialogContainer));\n } else {\n providers.push(...config.providers);\n }\n }\n\n if (\n config.direction &&\n (!userInjector ||\n !userInjector.get<Directionality | null>(Directionality, null, {optional: true}))\n ) {\n providers.push({\n provide: Directionality,\n useValue: getDirectionality(config.direction),\n });\n }\n\n return Injector.create({parent: userInjector || fallbackInjector, providers});\n }\n\n /**\n * Removes a dialog from the array of open dialogs.\n * @param dialogRef Dialog to be removed.\n * @param emitEvent Whether to emit an event if this is the last dialog.\n */\n private _removeOpenDialog<R, C>(dialogRef: DialogRef<R, C>, emitEvent: boolean) {\n const index = this.openDialogs.indexOf(dialogRef);\n\n if (index > -1) {\n (this.openDialogs as DialogRef<R, C>[]).splice(index, 1);\n\n // If all the dialogs were closed, remove/restore the `aria-hidden`\n // to a the siblings and emit to the `afterAllClosed` stream.\n if (!this.openDialogs.length) {\n this._ariaHiddenElements.forEach((previousValue, element) => {\n if (previousValue) {\n element.setAttribute('aria-hidden', previousValue);\n } else {\n element.removeAttribute('aria-hidden');\n }\n });\n\n this._ariaHiddenElements.clear();\n\n if (emitEvent) {\n this._getAfterAllClosed().next();\n }\n }\n }\n }\n\n /** Hides all of the content that isn't an overlay from assistive technology. */\n private _hideNonDialogContentFromAssistiveTechnology(overlayContainer: HTMLElement) {\n // Ensure that the overlay container is attached to the DOM.\n if (overlayContainer.parentElement) {\n const siblings = overlayContainer.parentElement.children;\n\n for (let i = siblings.length - 1; i > -1; i--) {\n const sibling = siblings[i];\n\n if (\n sibling !== overlayContainer &&\n sibling.nodeName !== 'SCRIPT' &&\n sibling.nodeName !== 'STYLE' &&\n !sibling.hasAttribute('aria-live') &&\n !sibling.hasAttribute('popover')\n ) {\n this._ariaHiddenElements.set(sibling, sibling.getAttribute('aria-hidden'));\n sibling.setAttribute('aria-hidden', 'true');\n }\n }\n }\n }\n\n private _getAfterAllClosed(): Subject<void> {\n const parent = this._parentDialog;\n return parent ? parent._getAfterAllClosed() : this._afterAllClosedAtThisLevel;\n }\n}\n\n/**\n * Executes a callback against all elements in an array while iterating in reverse.\n * Useful if the array is being modified as it is being iterated.\n */\nfunction reverseForEach<T>(items: T[] | readonly T[], callback: (current: T) => void) {\n let i = items.length;\n\n while (i--) {\n callback(items[i]);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {OverlayModule} from '../overlay';\nimport {PortalModule} from '../portal';\nimport {A11yModule} from '../a11y';\nimport {Dialog} from './dialog';\nimport {CdkDialogContainer} from './dialog-container';\n\n@NgModule({\n imports: [OverlayModule, PortalModule, A11yModule, CdkDialogContainer],\n exports: [\n // Re-export the PortalModule so that people extending the `CdkDialogContainer`\n // don't have to remember to import it or be faced with an unhelpful error.\n PortalModule,\n CdkDialogContainer,\n ],\n providers: [Dialog],\n})\nexport class DialogModule {}\n\n// Re-export needed by the Angular compiler.\n// See: https://github.com/angular/components/issues/30663.\n// Note: These exports need to be stable and shouldn't be renamed unnecessarily because\n// consuming libraries might have references to them in their own partial compilation output.\nexport {CdkPortal as ɵɵCdkPortal, CdkPortalOutlet as ɵɵCdkPortalOutlet} from '../portal';\n"],"names":["DialogConfig","viewContainerRef","injector","id","role","panelClass","hasBackdrop","backdropClass","disableClose","closePredicate","width","height","minWidth","minHeight","maxWidth","maxHeight","positionStrategy","data","direction","ariaDescribedBy","ariaLabelledBy","ariaLabel","ariaModal","autoFocus","restoreFocus","scrollStrategy","closeOnNavigation","closeOnDestroy","closeOnOverlayDetachments","disableAnimations","providers","container","templateContext","throwDialogContentAlreadyAttachedError","Error","CdkDialogContainer","BasePortalOutlet","_elementRef","inject","ElementRef","_focusTrapFactory","FocusTrapFactory","_config","_interactivityChecker","InteractivityChecker","_ngZone","NgZone","_focusMonitor","FocusMonitor","_renderer","Renderer2","_changeDetectorRef","ChangeDetectorRef","_injector","Injector","_platform","Platform","_document","DOCUMENT","_portalOutlet","_focusTrapped","Subject","_focusTrap","_elementFocusedBeforeDialogWasOpened","_closeInteractionType","_ariaLabelledByQueue","_isDestroyed","constructor","optional","push","_addAriaLabelledBy","markForCheck","_removeAriaLabelledBy","index","indexOf","splice","_contentAttached","_initializeFocusTrap","_captureInitialFocus","_trapFocus","ngOnDestroy","complete","_restoreFocus","attachComponentPortal","portal","hasAttached","ngDevMode","result","attachTemplatePortal","attachDomPortal","_recaptureFocus","_containsFocus","_forceFocus","element","options","isFocusable","tabIndex","runOutsideAngular","callback","deregisterBlur","deregisterMousedown","removeAttribute","listen","focus","_focusByCssSelector","selector","elementToFocus","nativeElement","querySelector","afterNextRender","focusedSuccessfully","focusInitialElement","_focusDialogContainer","next","focusConfig","focusTargetElement","activeElement","_getFocusedElementPierceShadowDom","body","contains","focusVia","destroy","isBrowser","create","deps","target","i0","ɵɵFactoryTarget","Component","ɵcmp","ɵɵngDeclareComponent","minVersion","version","type","isStandalone","host","attributes","properties","classAttribute","viewQueries","propertyName","first","predicate","CdkPortalOutlet","descendants","static","usesInheritance","ngImport","template","inputs","outputs","exportAs","changeDetection","ChangeDetectionStrategy","Default","encapsulation","ViewEncapsulation","None","decorators","args","imports","styles","ViewChild","DialogRef","overlayRef","config","componentInstance","componentRef","containerInstance","closed","backdropClick","keydownEvents","outsidePointerEvents","_detachSubscription","subscribe","event","keyCode","ESCAPE","hasModifierKey","preventDefault","close","undefined","focusOrigin","_canClose","detachments","closedSubject","unsubscribe","dispose","updatePosition","updateSize","addPanelClass","classes","removePanelClass","DIALOG_SCROLL_STRATEGY","InjectionToken","providedIn","factory","createBlockScrollStrategy","DIALOG_DATA","DEFAULT_DIALOG_CONFIG","getDirectionality","value","valueSignal","signal","change","EventEmitter","Dialog","_defaultOptions","_parentDialog","skipSelf","_overlayContainer","OverlayContainer","_idGenerator","_IdGenerator","_openDialogsAtThisLevel","_afterAllClosedAtThisLevel","_afterOpenedAtThisLevel","_ariaHiddenElements","Map","_scrollStrategy","openDialogs","afterOpened","afterAllClosed","defer","length","_getAfterAllClosed","pipe","startWith","open","componentOrTemplateRef","defaults","getId","getDialogById","overlayConfig","_getOverlayConfig","createOverlayRef","dialogRef","dialogContainer","_attachContainer","overlayContainer","getContainerElement","take","_hideNonDialogContentFromAssistiveTechnology","_attachDialogContent","_removeOpenDialog","closeAll","reverseForEach","dialog","find","state","OverlayConfig","createGlobalPositionStrategy","centerHorizontally","centerVertically","disposeOnNavigation","overlay","userInjector","provide","useValue","OverlayRef","containerType","containerPortal","ComponentPortal","parent","containerRef","attach","instance","TemplateRef","_createInjector","context","$implicit","TemplatePortal","contentRef","fallbackInjector","get","Directionality","emitEvent","forEach","previousValue","setAttribute","clear","parentElement","siblings","children","i","sibling","nodeName","hasAttribute","set","getAttribute","Injectable","ɵprov","ɵɵngDeclareInjectable","items","DialogModule","NgModule","ɵmod","ɵɵngDeclareNgModule","OverlayModule","PortalModule","A11yModule","exports"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA6BaA,YAAY,CAAA;EAOvBC,gBAAgB;EAMhBC,QAAQ;EAGRC,EAAE;AAGFC,EAAAA,IAAI,GAAgB,QAAQ;AAG5BC,EAAAA,UAAU,GAAuB,EAAE;AAGnCC,EAAAA,WAAW,GAAa,IAAI;AAG5BC,EAAAA,aAAa,GAAuB,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O,EAAE,CAGPF,YAAY,EACZxQ,kBAAkB,CACnB;MACDL,SAAS,EAAE,CAACgL,MAAM;KACnB;;;;;;"}
1
+ {"version":3,"file":"dialog.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/dialog/dialog-config.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/dialog/dialog-container.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/dialog/dialog-container.html","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/dialog/dialog-ref.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/dialog/dialog-injectors.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/dialog/dialog.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/dialog/dialog-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ViewContainerRef, Injector, StaticProvider, Type} from '@angular/core';\nimport {Direction} from '../bidi';\nimport {PositionStrategy, ScrollStrategy} from '../overlay';\nimport {Observable} from 'rxjs';\nimport {BasePortalOutlet} from '../portal';\nimport {FocusOrigin} from '../a11y';\n\n/** Options for where to set focus to automatically on dialog open */\nexport type AutoFocusTarget = 'dialog' | 'first-tabbable' | 'first-heading';\n\n/**\n * Value that determines the focus restoration behavior for a dialog.\n * The values represent the following behaviors:\n * - `boolean` - when true, will return focus to the element that was focused before the dialog\n * was opened, otherwise won't restore focus at all.\n * - `string` - focus will be restored to the first element that matches the CSS selector.\n * - `HTMLElement` - focus will be restored to the specific element.\n */\nexport type RestoreFocusValue = boolean | string | HTMLElement;\n\n/** Valid ARIA roles for a dialog. */\nexport type DialogRole = 'dialog' | 'alertdialog';\n\n/** Component that can be used as the container for the dialog. */\nexport type DialogContainer = BasePortalOutlet & {\n _focusTrapped?: Observable<void>;\n _closeInteractionType?: FocusOrigin;\n _recaptureFocus?: () => void;\n};\n\n/** Configuration for opening a modal dialog. */\nexport class DialogConfig<D = unknown, R = unknown, C extends DialogContainer = BasePortalOutlet> {\n /**\n * Where the attached component should live in Angular's *logical* component tree.\n * This affects what is available for injection and the change detection order for the\n * component instantiated inside of the dialog. This does not affect where the dialog\n * content will be rendered.\n */\n viewContainerRef?: ViewContainerRef;\n\n /**\n * Injector used for the instantiation of the component to be attached. If provided,\n * takes precedence over the injector indirectly provided by `ViewContainerRef`.\n */\n injector?: Injector;\n\n /** ID for the dialog. If omitted, a unique one will be generated. */\n id?: string;\n\n /** The ARIA role of the dialog element. */\n role?: DialogRole = 'dialog';\n\n /** Optional CSS class or classes applied to the overlay panel. */\n panelClass?: string | string[] = '';\n\n /** Whether the dialog has a backdrop. */\n hasBackdrop?: boolean = true;\n\n /** Optional CSS class or classes applied to the overlay backdrop. */\n backdropClass?: string | string[] = '';\n\n /** Whether the dialog closes with the escape key or pointer events outside the panel element. */\n disableClose?: boolean = false;\n\n /** Function used to determine whether the dialog is allowed to close. */\n closePredicate?: <\n Result = unknown,\n Component = unknown,\n Config extends DialogConfig = DialogConfig,\n >(\n result: Result | undefined,\n config: Config,\n componentInstance: Component | null,\n ) => boolean;\n\n /** Width of the dialog. */\n width?: string = '';\n\n /** Height of the dialog. */\n height?: string = '';\n\n /** Min-width of the dialog. If a number is provided, assumes pixel units. */\n minWidth?: number | string;\n\n /** Min-height of the dialog. If a number is provided, assumes pixel units. */\n minHeight?: number | string;\n\n /** Max-width of the dialog. If a number is provided, assumes pixel units. */\n maxWidth?: number | string;\n\n /** Max-height of the dialog. If a number is provided, assumes pixel units. */\n maxHeight?: number | string;\n\n /** Strategy to use when positioning the dialog. Defaults to centering it on the page. */\n positionStrategy?: PositionStrategy;\n\n /** Data being injected into the child component. */\n data?: D | null = null;\n\n /** Layout direction for the dialog's content. */\n direction?: Direction;\n\n /** ID of the element that describes the dialog. */\n ariaDescribedBy?: string | null = null;\n\n /** ID of the element that labels the dialog. */\n ariaLabelledBy?: string | null = null;\n\n /** Dialog label applied via `aria-label` */\n ariaLabel?: string | null = null;\n\n /**\n * Whether this is a modal dialog. Used to set the `aria-modal` attribute. Off by default,\n * because it can interfere with other overlay-based components (e.g. `mat-select`) and because\n * it is redundant since the dialog marks all outside content as `aria-hidden` anyway.\n */\n ariaModal?: boolean = false;\n\n /**\n * Where the dialog should focus on open.\n * @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or\n * AutoFocusTarget instead.\n */\n autoFocus?: AutoFocusTarget | string | boolean = 'first-tabbable';\n\n /** Configures the focus restoration behavior. See `RestoreFocusValue` for more information. */\n restoreFocus?: RestoreFocusValue = true;\n\n /**\n * Scroll strategy to be used for the dialog. This determines how\n * the dialog responds to scrolling underneath the panel element.\n */\n scrollStrategy?: ScrollStrategy;\n\n /**\n * Whether the dialog should close when the user navigates backwards or forwards through browser\n * history. This does not apply to navigation via anchor element unless using URL-hash based\n * routing (`HashLocationStrategy` in the Angular router).\n */\n closeOnNavigation?: boolean = true;\n\n /**\n * Whether the dialog should close when the dialog service is destroyed. This is useful if\n * another service is wrapping the dialog and is managing the destruction instead.\n */\n closeOnDestroy?: boolean = true;\n\n /**\n * Whether the dialog should close when the underlying overlay is detached. This is useful if\n * another service is wrapping the dialog and is managing the destruction instead. E.g. an\n * external detachment can happen as a result of a scroll strategy triggering it or when the\n * browser location changes.\n */\n closeOnOverlayDetachments?: boolean = true;\n\n /**\n * Whether the built-in overlay animations should be disabled.\n */\n disableAnimations?: boolean = false;\n\n /**\n * Providers that will be exposed to the contents of the dialog. Can also\n * be provided as a function in order to generate the providers lazily.\n */\n providers?:\n | StaticProvider[]\n | ((dialogRef: R, config: DialogConfig<D, R, C>, container: C) => StaticProvider[]);\n\n /**\n * Component into which the dialog content will be rendered. Defaults to `CdkDialogContainer`.\n * A configuration object can be passed in to customize the providers that will be exposed\n * to the dialog container.\n */\n container?:\n | Type<C>\n | {\n type: Type<C>;\n providers: (config: DialogConfig<D, R, C>) => StaticProvider[];\n };\n\n /**\n * Context that will be passed to template-based dialogs.\n * A function can be passed in to resolve the context lazily.\n */\n templateContext?: Record<string, any> | (() => Record<string, any>);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n FocusMonitor,\n FocusOrigin,\n FocusTrap,\n FocusTrapFactory,\n InteractivityChecker,\n} from '../a11y';\nimport {Platform, _getFocusedElementPierceShadowDom} from '../platform';\nimport {\n BasePortalOutlet,\n CdkPortalOutlet,\n ComponentPortal,\n DomPortal,\n TemplatePortal,\n} from '../portal';\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ComponentRef,\n ElementRef,\n EmbeddedViewRef,\n Injector,\n NgZone,\n OnDestroy,\n Renderer2,\n ViewChild,\n ViewEncapsulation,\n afterNextRender,\n inject,\n DOCUMENT,\n} from '@angular/core';\nimport {DialogConfig, DialogContainer} from './dialog-config';\nimport {Observable, Subject} from 'rxjs';\n\nexport function throwDialogContentAlreadyAttachedError() {\n throw Error('Attempting to attach dialog content after content is already attached');\n}\n\n/**\n * Internal component that wraps user-provided dialog content.\n * @docs-private\n */\n@Component({\n selector: 'cdk-dialog-container',\n templateUrl: './dialog-container.html',\n styleUrl: 'dialog-container.css',\n encapsulation: ViewEncapsulation.None,\n // Using OnPush for dialogs caused some G3 sync issues. Disabled until we can track them down.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n imports: [CdkPortalOutlet],\n host: {\n 'class': 'cdk-dialog-container',\n 'tabindex': '-1',\n '[attr.id]': '_config.id || null',\n '[attr.role]': '_config.role',\n '[attr.aria-modal]': '_config.ariaModal',\n '[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledByQueue[0]',\n '[attr.aria-label]': '_config.ariaLabel',\n '[attr.aria-describedby]': '_config.ariaDescribedBy || null',\n },\n})\nexport class CdkDialogContainer<C extends DialogConfig = DialogConfig>\n extends BasePortalOutlet\n implements DialogContainer, OnDestroy\n{\n protected _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n protected _focusTrapFactory = inject(FocusTrapFactory);\n readonly _config: C;\n private _interactivityChecker = inject(InteractivityChecker);\n protected _ngZone = inject(NgZone);\n private _focusMonitor = inject(FocusMonitor);\n private _renderer = inject(Renderer2);\n protected readonly _changeDetectorRef = inject(ChangeDetectorRef);\n private _injector = inject(Injector);\n private _platform = inject(Platform);\n protected _document = inject(DOCUMENT);\n\n /** The portal outlet inside of this container into which the dialog content will be loaded. */\n @ViewChild(CdkPortalOutlet, {static: true}) _portalOutlet!: CdkPortalOutlet;\n\n _focusTrapped: Observable<void> = new Subject<void>();\n\n /** The class that traps and manages focus within the dialog. */\n private _focusTrap: FocusTrap | null = null;\n\n /** Element that was focused before the dialog was opened. Save this to restore upon close. */\n private _elementFocusedBeforeDialogWasOpened: HTMLElement | null = null;\n\n /**\n * Type of interaction that led to the dialog being closed. This is used to determine\n * whether the focus style will be applied when returning focus to its original location\n * after the dialog is closed.\n */\n _closeInteractionType: FocusOrigin | null = null;\n\n /**\n * Queue of the IDs of the dialog's label element, based on their definition order. The first\n * ID will be used as the `aria-labelledby` value. We use a queue here to handle the case\n * where there are two or more titles in the DOM at a time and the first one is destroyed while\n * the rest are present.\n */\n _ariaLabelledByQueue: string[] = [];\n\n private _isDestroyed = false;\n\n constructor(...args: unknown[]);\n\n constructor() {\n super();\n\n // Callback is primarily for some internal tests\n // that were instantiating the dialog container manually.\n this._config = (inject(DialogConfig, {optional: true}) || new DialogConfig()) as C;\n\n if (this._config.ariaLabelledBy) {\n this._ariaLabelledByQueue.push(this._config.ariaLabelledBy);\n }\n }\n\n _addAriaLabelledBy(id: string) {\n this._ariaLabelledByQueue.push(id);\n this._changeDetectorRef.markForCheck();\n }\n\n _removeAriaLabelledBy(id: string) {\n const index = this._ariaLabelledByQueue.indexOf(id);\n\n if (index > -1) {\n this._ariaLabelledByQueue.splice(index, 1);\n this._changeDetectorRef.markForCheck();\n }\n }\n\n protected _contentAttached() {\n this._initializeFocusTrap();\n this._captureInitialFocus();\n }\n\n /**\n * Can be used by child classes to customize the initial focus\n * capturing behavior (e.g. if it's tied to an animation).\n */\n protected _captureInitialFocus() {\n this._trapFocus();\n }\n\n ngOnDestroy() {\n (this._focusTrapped as Subject<void>).complete();\n this._isDestroyed = true;\n this._restoreFocus();\n }\n\n /**\n * Attach a ComponentPortal as content to this dialog container.\n * @param portal Portal to be attached as the dialog content.\n */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throwDialogContentAlreadyAttachedError();\n }\n\n const result = this._portalOutlet.attachComponentPortal(portal);\n this._contentAttached();\n return result;\n }\n\n /**\n * Attach a TemplatePortal as content to this dialog container.\n * @param portal Portal to be attached as the dialog content.\n */\n attachTemplatePortal<T>(portal: TemplatePortal<T>): EmbeddedViewRef<T> {\n if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throwDialogContentAlreadyAttachedError();\n }\n\n const result = this._portalOutlet.attachTemplatePortal(portal);\n this._contentAttached();\n return result;\n }\n\n /**\n * Attaches a DOM portal to the dialog container.\n * @param portal Portal to be attached.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n override attachDomPortal = (portal: DomPortal) => {\n if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throwDialogContentAlreadyAttachedError();\n }\n\n const result = this._portalOutlet.attachDomPortal(portal);\n this._contentAttached();\n return result;\n };\n\n // TODO(crisbeto): this shouldn't be exposed, but there are internal references to it.\n /** Captures focus if it isn't already inside the dialog. */\n _recaptureFocus() {\n if (!this._containsFocus()) {\n this._trapFocus();\n }\n }\n\n /**\n * Focuses the provided element. If the element is not focusable, it will add a tabIndex\n * attribute to forcefully focus it. The attribute is removed after focus is moved.\n * @param element The element to focus.\n */\n private _forceFocus(element: HTMLElement, options?: FocusOptions) {\n if (!this._interactivityChecker.isFocusable(element)) {\n element.tabIndex = -1;\n // The tabindex attribute should be removed to avoid navigating to that element again\n this._ngZone.runOutsideAngular(() => {\n const callback = () => {\n deregisterBlur();\n deregisterMousedown();\n element.removeAttribute('tabindex');\n };\n\n const deregisterBlur = this._renderer.listen(element, 'blur', callback);\n const deregisterMousedown = this._renderer.listen(element, 'mousedown', callback);\n });\n }\n element.focus(options);\n }\n\n /**\n * Focuses the first element that matches the given selector within the focus trap.\n * @param selector The CSS selector for the element to set focus to.\n */\n private _focusByCssSelector(selector: string, options?: FocusOptions) {\n let elementToFocus = this._elementRef.nativeElement.querySelector(\n selector,\n ) as HTMLElement | null;\n if (elementToFocus) {\n this._forceFocus(elementToFocus, options);\n }\n }\n\n /**\n * Moves the focus inside the focus trap. When autoFocus is not set to 'dialog', if focus\n * cannot be moved then focus will go to the dialog container.\n */\n protected _trapFocus(options?: FocusOptions) {\n if (this._isDestroyed) {\n return;\n }\n\n // If were to attempt to focus immediately, then the content of the dialog would not yet be\n // ready in instances where change detection has to run first. To deal with this, we simply\n // wait until after the next render.\n afterNextRender(\n () => {\n const element = this._elementRef.nativeElement;\n switch (this._config.autoFocus) {\n case false:\n case 'dialog':\n // Ensure that focus is on the dialog container. It's possible that a different\n // component tried to move focus while the open animation was running. See:\n // https://github.com/angular/components/issues/16215. Note that we only want to do this\n // if the focus isn't inside the dialog already, because it's possible that the consumer\n // turned off `autoFocus` in order to move focus themselves.\n if (!this._containsFocus()) {\n element.focus(options);\n }\n break;\n case true:\n case 'first-tabbable':\n const focusedSuccessfully = this._focusTrap?.focusInitialElement(options);\n // If we weren't able to find a focusable element in the dialog, then focus the dialog\n // container instead.\n if (!focusedSuccessfully) {\n this._focusDialogContainer(options);\n }\n break;\n case 'first-heading':\n this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role=\"heading\"]', options);\n break;\n default:\n this._focusByCssSelector(this._config.autoFocus!, options);\n break;\n }\n (this._focusTrapped as Subject<void>).next();\n },\n {injector: this._injector},\n );\n }\n\n /** Restores focus to the element that was focused before the dialog opened. */\n private _restoreFocus() {\n const focusConfig = this._config.restoreFocus;\n let focusTargetElement: HTMLElement | null = null;\n\n if (typeof focusConfig === 'string') {\n focusTargetElement = this._document.querySelector(focusConfig);\n } else if (typeof focusConfig === 'boolean') {\n focusTargetElement = focusConfig ? this._elementFocusedBeforeDialogWasOpened : null;\n } else if (focusConfig) {\n focusTargetElement = focusConfig;\n }\n\n // We need the extra check, because IE can set the `activeElement` to null in some cases.\n if (\n this._config.restoreFocus &&\n focusTargetElement &&\n typeof focusTargetElement.focus === 'function'\n ) {\n const activeElement = _getFocusedElementPierceShadowDom();\n const element = this._elementRef.nativeElement;\n\n // Make sure that focus is still inside the dialog or is on the body (usually because a\n // non-focusable element like the backdrop was clicked) before moving it. It's possible that\n // the consumer moved it themselves before the animation was done, in which case we shouldn't\n // do anything.\n if (\n !activeElement ||\n activeElement === this._document.body ||\n activeElement === element ||\n element.contains(activeElement)\n ) {\n if (this._focusMonitor) {\n this._focusMonitor.focusVia(focusTargetElement, this._closeInteractionType);\n this._closeInteractionType = null;\n } else {\n focusTargetElement.focus();\n }\n }\n }\n\n if (this._focusTrap) {\n this._focusTrap.destroy();\n }\n }\n\n /** Focuses the dialog container. */\n private _focusDialogContainer(options?: FocusOptions) {\n // Note that there is no focus method when rendering on the server.\n this._elementRef.nativeElement.focus?.(options);\n }\n\n /** Returns whether focus is inside the dialog. */\n private _containsFocus() {\n const element = this._elementRef.nativeElement;\n const activeElement = _getFocusedElementPierceShadowDom();\n return element === activeElement || element.contains(activeElement);\n }\n\n /** Sets up the focus trap. */\n private _initializeFocusTrap() {\n if (this._platform.isBrowser) {\n this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement);\n\n // Save the previously focused element. This element will be re-focused\n // when the dialog closes.\n if (this._document) {\n this._elementFocusedBeforeDialogWasOpened = _getFocusedElementPierceShadowDom();\n }\n }\n }\n}\n","<ng-template cdkPortalOutlet />\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {OverlayRef} from '../overlay';\nimport {ESCAPE, hasModifierKey} from '../keycodes';\nimport {Observable, Subject, Subscription} from 'rxjs';\nimport {DialogConfig, DialogContainer} from './dialog-config';\nimport {FocusOrigin} from '../a11y';\nimport {ComponentRef} from '@angular/core';\n\n/** Additional options that can be passed in when closing a dialog. */\nexport interface DialogCloseOptions {\n /** Focus original to use when restoring focus. */\n focusOrigin?: FocusOrigin;\n}\n\n/**\n * Reference to a dialog opened via the Dialog service.\n */\nexport class DialogRef<R = unknown, C = unknown> {\n /**\n * Instance of component opened into the dialog. Will be\n * null when the dialog is opened using a `TemplateRef`.\n */\n readonly componentInstance: C | null = null;\n\n /**\n * `ComponentRef` of the component opened into the dialog. Will be\n * null when the dialog is opened using a `TemplateRef`.\n */\n readonly componentRef: ComponentRef<C> | null = null;\n\n /** Instance of the container that is rendering out the dialog content. */\n readonly containerInstance!: DialogContainer;\n\n /** Whether the user is allowed to close the dialog. */\n disableClose: boolean | undefined;\n\n /** Emits when the dialog has been closed. */\n readonly closed: Observable<R | undefined> = new Subject<R | undefined>();\n\n /** Emits when the backdrop of the dialog is clicked. */\n readonly backdropClick: Observable<MouseEvent>;\n\n /** Emits when on keyboard events within the dialog. */\n readonly keydownEvents: Observable<KeyboardEvent>;\n\n /** Emits on pointer events that happen outside of the dialog. */\n readonly outsidePointerEvents: Observable<MouseEvent>;\n\n /** Unique ID for the dialog. */\n readonly id: string;\n\n /** Subscription to external detachments of the dialog. */\n private _detachSubscription: Subscription;\n\n constructor(\n readonly overlayRef: OverlayRef,\n readonly config: DialogConfig<any, DialogRef<R, C>, DialogContainer>,\n ) {\n this.disableClose = config.disableClose;\n this.backdropClick = overlayRef.backdropClick();\n this.keydownEvents = overlayRef.keydownEvents();\n this.outsidePointerEvents = overlayRef.outsidePointerEvents();\n this.id = config.id!; // By the time the dialog is created we are guaranteed to have an ID.\n\n this.keydownEvents.subscribe(event => {\n if (event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event)) {\n event.preventDefault();\n this.close(undefined, {focusOrigin: 'keyboard'});\n }\n });\n\n this.backdropClick.subscribe(() => {\n if (!this.disableClose && this._canClose()) {\n this.close(undefined, {focusOrigin: 'mouse'});\n } else {\n // Clicking on the backdrop will move focus out of dialog.\n // Recapture it if closing via the backdrop is disabled.\n this.containerInstance._recaptureFocus?.();\n }\n });\n\n this._detachSubscription = overlayRef.detachments().subscribe(() => {\n // Check specifically for `false`, because we want `undefined` to be treated like `true`.\n if (config.closeOnOverlayDetachments !== false) {\n this.close();\n }\n });\n }\n\n /**\n * Close the dialog.\n * @param result Optional result to return to the dialog opener.\n * @param options Additional options to customize the closing behavior.\n */\n close(result?: R, options?: DialogCloseOptions): void {\n if (this._canClose(result)) {\n const closedSubject = this.closed as Subject<R | undefined>;\n this.containerInstance._closeInteractionType = options?.focusOrigin || 'program';\n // Drop the detach subscription first since it can be triggered by the\n // `dispose` call and override the result of this closing sequence.\n this._detachSubscription.unsubscribe();\n this.overlayRef.dispose();\n closedSubject.next(result);\n closedSubject.complete();\n (this as {componentInstance: C}).componentInstance = (\n this as {containerInstance: DialogContainer}\n ).containerInstance = null!;\n }\n }\n\n /** Updates the position of the dialog based on the current position strategy. */\n updatePosition(): this {\n this.overlayRef.updatePosition();\n return this;\n }\n\n /**\n * Updates the dialog's width and height.\n * @param width New width of the dialog.\n * @param height New height of the dialog.\n */\n updateSize(width: string | number = '', height: string | number = ''): this {\n this.overlayRef.updateSize({width, height});\n return this;\n }\n\n /** Add a CSS class or an array of classes to the overlay pane. */\n addPanelClass(classes: string | string[]): this {\n this.overlayRef.addPanelClass(classes);\n return this;\n }\n\n /** Remove a CSS class or an array of classes from the overlay pane. */\n removePanelClass(classes: string | string[]): this {\n this.overlayRef.removePanelClass(classes);\n return this;\n }\n\n /** Whether the dialog is allowed to close. */\n private _canClose(result?: R): boolean {\n const config = this.config as DialogConfig<unknown, unknown, DialogContainer>;\n\n return (\n !!this.containerInstance &&\n (!config.closePredicate || config.closePredicate(result, config, this.componentInstance))\n );\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectionToken, Injector, inject} from '@angular/core';\nimport {createBlockScrollStrategy, ScrollStrategy} from '../overlay';\nimport {DialogConfig} from './dialog-config';\n\n/** Injection token for the Dialog's ScrollStrategy. */\nexport const DIALOG_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrategy>(\n 'DialogScrollStrategy',\n {\n providedIn: 'root',\n factory: () => {\n const injector = inject(Injector);\n return () => createBlockScrollStrategy(injector);\n },\n },\n);\n\n/** Injection token for the Dialog's Data. */\nexport const DIALOG_DATA = new InjectionToken<any>('DialogData');\n\n/** Injection token that can be used to provide default options for the dialog module. */\nexport const DEFAULT_DIALOG_CONFIG = new InjectionToken<DialogConfig>('DefaultDialogConfig');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n ComponentRef,\n EventEmitter,\n Injectable,\n Injector,\n OnDestroy,\n StaticProvider,\n TemplateRef,\n Type,\n inject,\n signal,\n} from '@angular/core';\nimport {Observable, Subject, defer} from 'rxjs';\nimport {startWith, take} from 'rxjs/operators';\nimport {_IdGenerator} from '../a11y';\nimport {Direction, Directionality} from '../bidi';\nimport {\n ComponentType,\n createGlobalPositionStrategy,\n createOverlayRef,\n OverlayConfig,\n OverlayContainer,\n OverlayRef,\n} from '../overlay';\nimport {ComponentPortal, TemplatePortal} from '../portal';\nimport {DialogConfig, DialogContainer} from './dialog-config';\nimport {DialogRef} from './dialog-ref';\n\nimport {CdkDialogContainer} from './dialog-container';\nimport {DEFAULT_DIALOG_CONFIG, DIALOG_DATA, DIALOG_SCROLL_STRATEGY} from './dialog-injectors';\n\nfunction getDirectionality(value: Direction): Directionality {\n const valueSignal = signal(value);\n const change = new EventEmitter<Direction>();\n return {\n valueSignal,\n get value() {\n return valueSignal();\n },\n change,\n ngOnDestroy() {\n change.complete();\n },\n };\n}\n\n@Injectable({providedIn: 'root'})\nexport class Dialog implements OnDestroy {\n private _injector = inject(Injector);\n private _defaultOptions = inject<DialogConfig>(DEFAULT_DIALOG_CONFIG, {optional: true});\n private _parentDialog = inject(Dialog, {optional: true, skipSelf: true});\n private _overlayContainer = inject(OverlayContainer);\n private _idGenerator = inject(_IdGenerator);\n\n private _openDialogsAtThisLevel: DialogRef<any, any>[] = [];\n private readonly _afterAllClosedAtThisLevel = new Subject<void>();\n private readonly _afterOpenedAtThisLevel = new Subject<DialogRef>();\n private _ariaHiddenElements = new Map<Element, string | null>();\n private _scrollStrategy = inject(DIALOG_SCROLL_STRATEGY);\n\n /** Keeps track of the currently-open dialogs. */\n get openDialogs(): readonly DialogRef<any, any>[] {\n return this._parentDialog ? this._parentDialog.openDialogs : this._openDialogsAtThisLevel;\n }\n\n /** Stream that emits when a dialog has been opened. */\n get afterOpened(): Subject<DialogRef<any, any>> {\n return this._parentDialog ? this._parentDialog.afterOpened : this._afterOpenedAtThisLevel;\n }\n\n /**\n * Stream that emits when all open dialog have finished closing.\n * Will emit on subscribe if there are no open dialogs to begin with.\n */\n readonly afterAllClosed: Observable<void> = defer(() =>\n this.openDialogs.length\n ? this._getAfterAllClosed()\n : this._getAfterAllClosed().pipe(startWith(undefined)),\n );\n\n constructor(...args: unknown[]);\n\n constructor() {}\n\n /**\n * Opens a modal dialog containing the given component.\n * @param component Type of the component to load into the dialog.\n * @param config Extra configuration options.\n * @returns Reference to the newly-opened dialog.\n */\n open<R = unknown, D = unknown, C = unknown>(\n component: ComponentType<C>,\n config?: DialogConfig<D, DialogRef<R, C>>,\n ): DialogRef<R, C>;\n\n /**\n * Opens a modal dialog containing the given template.\n * @param template TemplateRef to instantiate as the dialog content.\n * @param config Extra configuration options.\n * @returns Reference to the newly-opened dialog.\n */\n open<R = unknown, D = unknown, C = unknown>(\n template: TemplateRef<C>,\n config?: DialogConfig<D, DialogRef<R, C>>,\n ): DialogRef<R, C>;\n\n open<R = unknown, D = unknown, C = unknown>(\n componentOrTemplateRef: ComponentType<C> | TemplateRef<C>,\n config?: DialogConfig<D, DialogRef<R, C>>,\n ): DialogRef<R, C>;\n\n open<R = unknown, D = unknown, C = unknown>(\n componentOrTemplateRef: ComponentType<C> | TemplateRef<C>,\n config?: DialogConfig<D, DialogRef<R, C>>,\n ): DialogRef<R, C> {\n const defaults = (this._defaultOptions || new DialogConfig()) as DialogConfig<\n D,\n DialogRef<R, C>\n >;\n config = {...defaults, ...config};\n config.id = config.id || this._idGenerator.getId('cdk-dialog-');\n\n if (\n config.id &&\n this.getDialogById(config.id) &&\n (typeof ngDevMode === 'undefined' || ngDevMode)\n ) {\n throw Error(`Dialog with id \"${config.id}\" exists already. The dialog id must be unique.`);\n }\n\n const overlayConfig = this._getOverlayConfig(config);\n const overlayRef = createOverlayRef(this._injector, overlayConfig);\n const dialogRef = new DialogRef(overlayRef, config);\n const dialogContainer = this._attachContainer(overlayRef, dialogRef, config);\n\n (dialogRef as {containerInstance: DialogContainer}).containerInstance = dialogContainer;\n\n // If this is the first dialog that we're opening, hide all the non-overlay content.\n if (!this.openDialogs.length) {\n // Resolve this ahead of time, because some internal apps\n // mock it out and depend on it being synchronous.\n const overlayContainer = this._overlayContainer.getContainerElement();\n\n if (dialogContainer._focusTrapped) {\n dialogContainer._focusTrapped.pipe(take(1)).subscribe(() => {\n this._hideNonDialogContentFromAssistiveTechnology(overlayContainer);\n });\n } else {\n this._hideNonDialogContentFromAssistiveTechnology(overlayContainer);\n }\n }\n\n this._attachDialogContent(componentOrTemplateRef, dialogRef, dialogContainer, config);\n (this.openDialogs as DialogRef<R, C>[]).push(dialogRef);\n dialogRef.closed.subscribe(() => this._removeOpenDialog(dialogRef, true));\n this.afterOpened.next(dialogRef);\n\n return dialogRef;\n }\n\n /**\n * Closes all of the currently-open dialogs.\n */\n closeAll(): void {\n reverseForEach(this.openDialogs, dialog => dialog.close());\n }\n\n /**\n * Finds an open dialog by its id.\n * @param id ID to use when looking up the dialog.\n */\n getDialogById<R, C>(id: string): DialogRef<R, C> | undefined {\n return this.openDialogs.find(dialog => dialog.id === id);\n }\n\n ngOnDestroy() {\n // Make one pass over all the dialogs that need to be untracked, but should not be closed. We\n // want to stop tracking the open dialog even if it hasn't been closed, because the tracking\n // determines when `aria-hidden` is removed from elements outside the dialog.\n reverseForEach(this._openDialogsAtThisLevel, dialog => {\n // Check for `false` specifically since we want `undefined` to be interpreted as `true`.\n if (dialog.config.closeOnDestroy === false) {\n this._removeOpenDialog(dialog, false);\n }\n });\n\n // Make a second pass and close the remaining dialogs. We do this second pass in order to\n // correctly dispatch the `afterAllClosed` event in case we have a mixed array of dialogs\n // that should be closed and dialogs that should not.\n reverseForEach(this._openDialogsAtThisLevel, dialog => dialog.close());\n\n this._afterAllClosedAtThisLevel.complete();\n this._afterOpenedAtThisLevel.complete();\n this._openDialogsAtThisLevel = [];\n }\n\n /**\n * Creates an overlay config from a dialog config.\n * @param config The dialog configuration.\n * @returns The overlay configuration.\n */\n private _getOverlayConfig<D, R>(config: DialogConfig<D, R>): OverlayConfig {\n const state = new OverlayConfig({\n positionStrategy:\n config.positionStrategy ||\n createGlobalPositionStrategy(this._injector).centerHorizontally().centerVertically(),\n scrollStrategy: config.scrollStrategy || this._scrollStrategy(),\n panelClass: config.panelClass,\n hasBackdrop: config.hasBackdrop,\n direction: config.direction,\n minWidth: config.minWidth,\n minHeight: config.minHeight,\n maxWidth: config.maxWidth,\n maxHeight: config.maxHeight,\n width: config.width,\n height: config.height,\n disposeOnNavigation: config.closeOnNavigation,\n disableAnimations: config.disableAnimations,\n });\n\n if (config.backdropClass) {\n state.backdropClass = config.backdropClass;\n }\n\n return state;\n }\n\n /**\n * Attaches a dialog container to a dialog's already-created overlay.\n * @param overlay Reference to the dialog's underlying overlay.\n * @param config The dialog configuration.\n * @returns A promise resolving to a ComponentRef for the attached container.\n */\n private _attachContainer<R, D, C>(\n overlay: OverlayRef,\n dialogRef: DialogRef<R, C>,\n config: DialogConfig<D, DialogRef<R, C>>,\n ): DialogContainer {\n const userInjector = config.injector || config.viewContainerRef?.injector;\n const providers: StaticProvider[] = [\n {provide: DialogConfig, useValue: config},\n {provide: DialogRef, useValue: dialogRef},\n {provide: OverlayRef, useValue: overlay},\n ];\n let containerType: Type<DialogContainer>;\n\n if (config.container) {\n if (typeof config.container === 'function') {\n containerType = config.container;\n } else {\n containerType = config.container.type;\n providers.push(...config.container.providers(config));\n }\n } else {\n containerType = CdkDialogContainer;\n }\n\n const containerPortal = new ComponentPortal(\n containerType,\n config.viewContainerRef,\n Injector.create({parent: userInjector || this._injector, providers}),\n );\n const containerRef = overlay.attach(containerPortal);\n\n return containerRef.instance;\n }\n\n /**\n * Attaches the user-provided component to the already-created dialog container.\n * @param componentOrTemplateRef The type of component being loaded into the dialog,\n * or a TemplateRef to instantiate as the content.\n * @param dialogRef Reference to the dialog being opened.\n * @param dialogContainer Component that is going to wrap the dialog content.\n * @param config Configuration used to open the dialog.\n */\n private _attachDialogContent<R, D, C>(\n componentOrTemplateRef: ComponentType<C> | TemplateRef<C>,\n dialogRef: DialogRef<R, C>,\n dialogContainer: DialogContainer,\n config: DialogConfig<D, DialogRef<R, C>>,\n ) {\n if (componentOrTemplateRef instanceof TemplateRef) {\n const injector = this._createInjector(config, dialogRef, dialogContainer, undefined);\n let context: any = {$implicit: config.data, dialogRef};\n\n if (config.templateContext) {\n context = {\n ...context,\n ...(typeof config.templateContext === 'function'\n ? config.templateContext()\n : config.templateContext),\n };\n }\n\n dialogContainer.attachTemplatePortal(\n new TemplatePortal<C>(componentOrTemplateRef, null!, context, injector),\n );\n } else {\n const injector = this._createInjector(config, dialogRef, dialogContainer, this._injector);\n const contentRef = dialogContainer.attachComponentPortal<C>(\n new ComponentPortal(componentOrTemplateRef, config.viewContainerRef, injector),\n );\n (dialogRef as {componentRef: ComponentRef<C>}).componentRef = contentRef;\n (dialogRef as {componentInstance: C}).componentInstance = contentRef.instance;\n }\n }\n\n /**\n * Creates a custom injector to be used inside the dialog. This allows a component loaded inside\n * of a dialog to close itself and, optionally, to return a value.\n * @param config Config object that is used to construct the dialog.\n * @param dialogRef Reference to the dialog being opened.\n * @param dialogContainer Component that is going to wrap the dialog content.\n * @param fallbackInjector Injector to use as a fallback when a lookup fails in the custom\n * dialog injector, if the user didn't provide a custom one.\n * @returns The custom injector that can be used inside the dialog.\n */\n private _createInjector<R, D, C>(\n config: DialogConfig<D, DialogRef<R, C>>,\n dialogRef: DialogRef<R, C>,\n dialogContainer: DialogContainer,\n fallbackInjector: Injector | undefined,\n ): Injector {\n const userInjector = config.injector || config.viewContainerRef?.injector;\n const providers: StaticProvider[] = [\n {provide: DIALOG_DATA, useValue: config.data},\n {provide: DialogRef, useValue: dialogRef},\n ];\n\n if (config.providers) {\n if (typeof config.providers === 'function') {\n providers.push(...config.providers(dialogRef, config, dialogContainer));\n } else {\n providers.push(...config.providers);\n }\n }\n\n if (\n config.direction &&\n (!userInjector ||\n !userInjector.get<Directionality | null>(Directionality, null, {optional: true}))\n ) {\n providers.push({\n provide: Directionality,\n useValue: getDirectionality(config.direction),\n });\n }\n\n return Injector.create({parent: userInjector || fallbackInjector, providers});\n }\n\n /**\n * Removes a dialog from the array of open dialogs.\n * @param dialogRef Dialog to be removed.\n * @param emitEvent Whether to emit an event if this is the last dialog.\n */\n private _removeOpenDialog<R, C>(dialogRef: DialogRef<R, C>, emitEvent: boolean) {\n const index = this.openDialogs.indexOf(dialogRef);\n\n if (index > -1) {\n (this.openDialogs as DialogRef<R, C>[]).splice(index, 1);\n\n // If all the dialogs were closed, remove/restore the `aria-hidden`\n // to a the siblings and emit to the `afterAllClosed` stream.\n if (!this.openDialogs.length) {\n this._ariaHiddenElements.forEach((previousValue, element) => {\n if (previousValue) {\n element.setAttribute('aria-hidden', previousValue);\n } else {\n element.removeAttribute('aria-hidden');\n }\n });\n\n this._ariaHiddenElements.clear();\n\n if (emitEvent) {\n this._getAfterAllClosed().next();\n }\n }\n }\n }\n\n /** Hides all of the content that isn't an overlay from assistive technology. */\n private _hideNonDialogContentFromAssistiveTechnology(overlayContainer: HTMLElement) {\n // Ensure that the overlay container is attached to the DOM.\n if (overlayContainer.parentElement) {\n const siblings = overlayContainer.parentElement.children;\n\n for (let i = siblings.length - 1; i > -1; i--) {\n const sibling = siblings[i];\n\n if (\n sibling !== overlayContainer &&\n sibling.nodeName !== 'SCRIPT' &&\n sibling.nodeName !== 'STYLE' &&\n !sibling.hasAttribute('aria-live') &&\n !sibling.hasAttribute('popover')\n ) {\n this._ariaHiddenElements.set(sibling, sibling.getAttribute('aria-hidden'));\n sibling.setAttribute('aria-hidden', 'true');\n }\n }\n }\n }\n\n private _getAfterAllClosed(): Subject<void> {\n const parent = this._parentDialog;\n return parent ? parent._getAfterAllClosed() : this._afterAllClosedAtThisLevel;\n }\n}\n\n/**\n * Executes a callback against all elements in an array while iterating in reverse.\n * Useful if the array is being modified as it is being iterated.\n */\nfunction reverseForEach<T>(items: T[] | readonly T[], callback: (current: T) => void) {\n let i = items.length;\n\n while (i--) {\n callback(items[i]);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {OverlayModule} from '../overlay';\nimport {PortalModule} from '../portal';\nimport {A11yModule} from '../a11y';\nimport {Dialog} from './dialog';\nimport {CdkDialogContainer} from './dialog-container';\n\n@NgModule({\n imports: [OverlayModule, PortalModule, A11yModule, CdkDialogContainer],\n exports: [\n // Re-export the PortalModule so that people extending the `CdkDialogContainer`\n // don't have to remember to import it or be faced with an unhelpful error.\n PortalModule,\n CdkDialogContainer,\n ],\n providers: [Dialog],\n})\nexport class DialogModule {}\n\n// Re-export needed by the Angular compiler.\n// See: https://github.com/angular/components/issues/30663.\n// Note: These exports need to be stable and shouldn't be renamed unnecessarily because\n// consuming libraries might have references to them in their own partial compilation output.\nexport {CdkPortal as ɵɵCdkPortal, CdkPortalOutlet as ɵɵCdkPortalOutlet} from '../portal';\n"],"names":["DialogConfig","viewContainerRef","injector","id","role","panelClass","hasBackdrop","backdropClass","disableClose","closePredicate","width","height","minWidth","minHeight","maxWidth","maxHeight","positionStrategy","data","direction","ariaDescribedBy","ariaLabelledBy","ariaLabel","ariaModal","autoFocus","restoreFocus","scrollStrategy","closeOnNavigation","closeOnDestroy","closeOnOverlayDetachments","disableAnimations","providers","container","templateContext","throwDialogContentAlreadyAttachedError","Error","CdkDialogContainer","BasePortalOutlet","_elementRef","inject","ElementRef","_focusTrapFactory","FocusTrapFactory","_config","_interactivityChecker","InteractivityChecker","_ngZone","NgZone","_focusMonitor","FocusMonitor","_renderer","Renderer2","_changeDetectorRef","ChangeDetectorRef","_injector","Injector","_platform","Platform","_document","DOCUMENT","_portalOutlet","_focusTrapped","Subject","_focusTrap","_elementFocusedBeforeDialogWasOpened","_closeInteractionType","_ariaLabelledByQueue","_isDestroyed","constructor","optional","push","_addAriaLabelledBy","markForCheck","_removeAriaLabelledBy","index","indexOf","splice","_contentAttached","_initializeFocusTrap","_captureInitialFocus","_trapFocus","ngOnDestroy","complete","_restoreFocus","attachComponentPortal","portal","hasAttached","ngDevMode","result","attachTemplatePortal","attachDomPortal","_recaptureFocus","_containsFocus","_forceFocus","element","options","isFocusable","tabIndex","runOutsideAngular","callback","deregisterBlur","deregisterMousedown","removeAttribute","listen","focus","_focusByCssSelector","selector","elementToFocus","nativeElement","querySelector","afterNextRender","focusedSuccessfully","focusInitialElement","_focusDialogContainer","next","focusConfig","focusTargetElement","activeElement","_getFocusedElementPierceShadowDom","body","contains","focusVia","destroy","isBrowser","create","deps","target","i0","ɵɵFactoryTarget","Component","ɵcmp","ɵɵngDeclareComponent","minVersion","version","type","isStandalone","host","attributes","properties","classAttribute","viewQueries","propertyName","first","predicate","CdkPortalOutlet","descendants","static","usesInheritance","ngImport","template","inputs","outputs","exportAs","changeDetection","ChangeDetectionStrategy","Default","encapsulation","ViewEncapsulation","None","decorators","args","imports","styles","ViewChild","DialogRef","overlayRef","config","componentInstance","componentRef","containerInstance","closed","backdropClick","keydownEvents","outsidePointerEvents","_detachSubscription","subscribe","event","keyCode","ESCAPE","hasModifierKey","preventDefault","close","undefined","focusOrigin","_canClose","detachments","closedSubject","unsubscribe","dispose","updatePosition","updateSize","addPanelClass","classes","removePanelClass","DIALOG_SCROLL_STRATEGY","InjectionToken","providedIn","factory","createBlockScrollStrategy","DIALOG_DATA","DEFAULT_DIALOG_CONFIG","getDirectionality","value","valueSignal","signal","change","EventEmitter","Dialog","_defaultOptions","_parentDialog","skipSelf","_overlayContainer","OverlayContainer","_idGenerator","_IdGenerator","_openDialogsAtThisLevel","_afterAllClosedAtThisLevel","_afterOpenedAtThisLevel","_ariaHiddenElements","Map","_scrollStrategy","openDialogs","afterOpened","afterAllClosed","defer","length","_getAfterAllClosed","pipe","startWith","open","componentOrTemplateRef","defaults","getId","getDialogById","overlayConfig","_getOverlayConfig","createOverlayRef","dialogRef","dialogContainer","_attachContainer","overlayContainer","getContainerElement","take","_hideNonDialogContentFromAssistiveTechnology","_attachDialogContent","_removeOpenDialog","closeAll","reverseForEach","dialog","find","state","OverlayConfig","createGlobalPositionStrategy","centerHorizontally","centerVertically","disposeOnNavigation","overlay","userInjector","provide","useValue","OverlayRef","containerType","containerPortal","ComponentPortal","parent","containerRef","attach","instance","TemplateRef","_createInjector","context","$implicit","TemplatePortal","contentRef","fallbackInjector","get","Directionality","emitEvent","forEach","previousValue","setAttribute","clear","parentElement","siblings","children","i","sibling","nodeName","hasAttribute","set","getAttribute","Injectable","ɵprov","ɵɵngDeclareInjectable","items","DialogModule","NgModule","ɵmod","ɵɵngDeclareNgModule","OverlayModule","PortalModule","A11yModule","exports"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAuCaA,YAAY,CAAA;EAOvBC,gBAAgB;EAMhBC,QAAQ;EAGRC,EAAE;AAGFC,EAAAA,IAAI,GAAgB,QAAQ;AAG5BC,EAAAA,UAAU,GAAuB,EAAE;AAGnCC,EAAAA,WAAW,GAAa,IAAI;AAG5BC,EAAAA,aAAa,GAAuB,EAAE;AAGtCC,EAAAA,YAAY,GAAa,KAAK;EAG9BC,cAAc;AAWdC,EAAAA,KAAK,GAAY,EAAE;AAGnBC,EAAAA,MAAM,GAAY,EAAE;EAGpBC,QAAQ;EAGRC,SAAS;EAGTC,QAAQ;EAGRC,SAAS;EAGTC,gBAAgB;AAGhBC,EAAAA,IAAI,GAAc,IAAI;EAGtBC,SAAS;AAGTC,EAAAA,eAAe,GAAmB,IAAI;AAGtCC,EAAAA,cAAc,GAAmB,IAAI;AAGrCC,EAAAA,SAAS,GAAmB,IAAI;AAOhCC,EAAAA,SAAS,GAAa,KAAK;AAO3BC,EAAAA,SAAS,GAAwC,gBAAgB;AAGjEC,EAAAA,YAAY,GAAuB,IAAI;EAMvCC,cAAc;AAOdC,EAAAA,iBAAiB,GAAa,IAAI;AAMlCC,EAAAA,cAAc,GAAa,IAAI;AAQ/BC,EAAAA,yBAAyB,GAAa,IAAI;AAK1CC,EAAAA,iBAAiB,GAAa,KAAK;EAMnCC,SAAS;EASTC,SAAS;EAWTC,eAAe;AAChB;;SCrJeC,sCAAsCA,GAAA;EACpD,MAAMC,KAAK,CAAC,uEAAuE,CAAC;AACtF;AA0BM,MAAOC,kBACX,SAAQC,gBAAgB,CAAA;AAGdC,EAAAA,WAAW,GAAGC,MAAM,CAA0BC,UAAU,CAAC;AACzDC,EAAAA,iBAAiB,GAAGF,MAAM,CAACG,gBAAgB,CAAC;EAC7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,GAAA,CAAA;;;;;UAITmQ,YAAY;IAAAxQ,SAAA,EAFZ,CAACgL,MAAM,CAAC;cAPT4F,aAAa,EAAEC,YAAY,EAAEC,UAAU,EAI/CD,YAAY;AAAA,GAAA,CAAA;;;;;;QAKHL,YAAY;AAAAxI,EAAAA,UAAA,EAAA,CAAA;UAVxByI,QAAQ;AAACxI,IAAAA,IAAA,EAAA,CAAA;MACRC,OAAO,EAAE,CAAC0I,aAAa,EAAEC,YAAY,EAAEC,UAAU,EAAEzQ,kBAAkB,CAAC;AACtE0Q,MAAAA,OAAO,EAAE,CAGPF,YAAY,EACZxQ,kBAAkB,CACnB;MACDL,SAAS,EAAE,CAACgL,MAAM;KACnB;;;;;;"}
@@ -55,12 +55,14 @@ class ComponentPortal extends Portal {
55
55
  viewContainerRef;
56
56
  injector;
57
57
  projectableNodes;
58
- constructor(component, viewContainerRef, injector, projectableNodes) {
58
+ bindings;
59
+ constructor(component, viewContainerRef, injector, projectableNodes, bindings) {
59
60
  super();
60
61
  this.component = component;
61
62
  this.viewContainerRef = viewContainerRef;
62
63
  this.injector = injector;
63
64
  this.projectableNodes = projectableNodes;
65
+ this.bindings = bindings || null;
64
66
  }
65
67
  }
66
68
  class TemplatePortal extends Portal {
@@ -174,7 +176,8 @@ class DomPortalOutlet extends BasePortalOutlet {
174
176
  index: portal.viewContainerRef.length,
175
177
  injector,
176
178
  ngModuleRef,
177
- projectableNodes: portal.projectableNodes || undefined
179
+ projectableNodes: portal.projectableNodes || undefined,
180
+ bindings: portal.bindings || undefined
178
181
  });
179
182
  this.setDisposeFn(() => componentRef.destroy());
180
183
  } else {
@@ -187,7 +190,8 @@ class DomPortalOutlet extends BasePortalOutlet {
187
190
  componentRef = createComponent(portal.component, {
188
191
  elementInjector,
189
192
  environmentInjector,
190
- projectableNodes: portal.projectableNodes || undefined
193
+ projectableNodes: portal.projectableNodes || undefined,
194
+ bindings: portal.bindings || undefined
191
195
  });
192
196
  appRef.attachView(componentRef.hostView);
193
197
  this.setDisposeFn(() => {
@@ -324,7 +328,8 @@ class CdkPortalOutlet extends BasePortalOutlet {
324
328
  index: viewContainerRef.length,
325
329
  injector: portal.injector || viewContainerRef.injector,
326
330
  projectableNodes: portal.projectableNodes || undefined,
327
- ngModuleRef: this._moduleRef || undefined
331
+ ngModuleRef: this._moduleRef || undefined,
332
+ bindings: portal.bindings || undefined
328
333
  });
329
334
  if (viewContainerRef !== this._viewContainerRef) {
330
335
  this._getRootNode().appendChild(ref.hostView.rootNodes[0]);
@@ -1 +1 @@
1
- {"version":3,"file":"portal.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/portal/portal-errors.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/portal/portal.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/portal/dom-portal-outlet.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/portal/portal-directives.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * Throws an exception when attempting to attach a null portal to a host.\n * @docs-private\n */\nexport function throwNullPortalError() {\n throw Error('Must provide a portal to attach');\n}\n\n/**\n * Throws an exception when attempting to attach a portal to a host that is already attached.\n * @docs-private\n */\nexport function throwPortalAlreadyAttachedError() {\n throw Error('Host already has a portal attached');\n}\n\n/**\n * Throws an exception when attempting to attach a portal to an already-disposed host.\n * @docs-private\n */\nexport function throwPortalOutletAlreadyDisposedError() {\n throw Error('This PortalOutlet has already been disposed');\n}\n\n/**\n * Throws an exception when attempting to attach an unknown portal type.\n * @docs-private\n */\nexport function throwUnknownPortalTypeError() {\n throw Error(\n 'Attempting to attach an unknown Portal type. BasePortalOutlet accepts either ' +\n 'a ComponentPortal or a TemplatePortal.',\n );\n}\n\n/**\n * Throws an exception when attempting to attach a portal to a null host.\n * @docs-private\n */\nexport function throwNullPortalOutletError() {\n throw Error('Attempting to attach a portal to a null PortalOutlet');\n}\n\n/**\n * Throws an exception when attempting to detach a portal that is not attached.\n * @docs-private\n */\nexport function throwNoPortalAttachedError() {\n throw Error('Attempting to detach a portal that is not attached to a host');\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n TemplateRef,\n ViewContainerRef,\n ElementRef,\n ComponentRef,\n EmbeddedViewRef,\n Injector,\n} from '@angular/core';\nimport {\n throwNullPortalOutletError,\n throwPortalAlreadyAttachedError,\n throwNoPortalAttachedError,\n throwNullPortalError,\n throwPortalOutletAlreadyDisposedError,\n throwUnknownPortalTypeError,\n} from './portal-errors';\n\n/** Interface that can be used to generically type a class. */\nexport interface ComponentType<T> {\n new (...args: any[]): T;\n}\n\n/**\n * A `Portal` is something that you want to render somewhere else.\n * It can be attach to / detached from a `PortalOutlet`.\n */\nexport abstract class Portal<T> {\n private _attachedHost: PortalOutlet | null = null;\n\n /** Attach this portal to a host. */\n attach(host: PortalOutlet): T {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (host == null) {\n throwNullPortalOutletError();\n }\n\n if (host.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n }\n\n this._attachedHost = host;\n return <T>host.attach(this);\n }\n\n /** Detach this portal from its host */\n detach(): void {\n let host = this._attachedHost;\n\n if (host != null) {\n this._attachedHost = null;\n host.detach();\n } else if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throwNoPortalAttachedError();\n }\n }\n\n /** Whether this portal is attached to a host. */\n get isAttached(): boolean {\n return this._attachedHost != null;\n }\n\n /**\n * Sets the PortalOutlet reference without performing `attach()`. This is used directly by\n * the PortalOutlet when it is performing an `attach()` or `detach()`.\n */\n setAttachedHost(host: PortalOutlet | null) {\n this._attachedHost = host;\n }\n}\n\n/**\n * A `ComponentPortal` is a portal that instantiates some Component upon attachment.\n */\nexport class ComponentPortal<T> extends Portal<ComponentRef<T>> {\n /** The type of the component that will be instantiated for attachment. */\n component: ComponentType<T>;\n\n /**\n * Where the attached component should live in Angular's *logical* component tree.\n * This is different from where the component *renders*, which is determined by the PortalOutlet.\n * The origin is necessary when the host is outside of the Angular application context.\n */\n viewContainerRef?: ViewContainerRef | null;\n\n /** Injector used for the instantiation of the component. */\n injector?: Injector | null;\n\n /**\n * List of DOM nodes that should be projected through `<ng-content>` of the attached component.\n */\n projectableNodes?: Node[][] | null;\n\n constructor(\n component: ComponentType<T>,\n viewContainerRef?: ViewContainerRef | null,\n injector?: Injector | null,\n projectableNodes?: Node[][] | null,\n ) {\n super();\n this.component = component;\n this.viewContainerRef = viewContainerRef;\n this.injector = injector;\n this.projectableNodes = projectableNodes;\n }\n}\n\n/**\n * A `TemplatePortal` is a portal that represents some embedded template (TemplateRef).\n */\nexport class TemplatePortal<C = any> extends Portal<EmbeddedViewRef<C>> {\n constructor(\n /** The embedded template that will be used to instantiate an embedded View in the host. */\n public templateRef: TemplateRef<C>,\n /** Reference to the ViewContainer into which the template will be stamped out. */\n public viewContainerRef: ViewContainerRef,\n /** Contextual data to be passed in to the embedded view. */\n public context?: C,\n /** The injector to use for the embedded view. */\n public injector?: Injector,\n ) {\n super();\n }\n\n get origin(): ElementRef {\n return this.templateRef.elementRef;\n }\n\n /**\n * Attach the portal to the provided `PortalOutlet`.\n * When a context is provided it will override the `context` property of the `TemplatePortal`\n * instance.\n */\n override attach(host: PortalOutlet, context: C | undefined = this.context): EmbeddedViewRef<C> {\n this.context = context;\n return super.attach(host);\n }\n\n override detach(): void {\n this.context = undefined;\n return super.detach();\n }\n}\n\n/**\n * A `DomPortal` is a portal whose DOM element will be taken from its current position\n * in the DOM and moved into a portal outlet, when it is attached. On detach, the content\n * will be restored to its original position.\n */\nexport class DomPortal<T = HTMLElement> extends Portal<T> {\n /** DOM node hosting the portal's content. */\n readonly element: T;\n\n constructor(element: T | ElementRef<T>) {\n super();\n this.element = element instanceof ElementRef ? element.nativeElement : element;\n }\n}\n\n/** A `PortalOutlet` is a space that can contain a single `Portal`. */\nexport interface PortalOutlet {\n /** Attaches a portal to this outlet. */\n attach(portal: Portal<any>): any;\n\n /** Detaches the currently attached portal from this outlet. */\n detach(): any;\n\n /** Performs cleanup before the outlet is destroyed. */\n dispose(): void;\n\n /** Whether there is currently a portal attached to this outlet. */\n hasAttached(): boolean;\n}\n\n/**\n * Partial implementation of PortalOutlet that handles attaching\n * ComponentPortal and TemplatePortal.\n */\nexport abstract class BasePortalOutlet implements PortalOutlet {\n /** The portal currently attached to the host. */\n protected _attachedPortal: Portal<any> | null = null;\n\n /** A function that will permanently dispose this host. */\n private _disposeFn: (() => void) | null = null;\n\n /** Whether this host has already been permanently disposed. */\n private _isDisposed: boolean = false;\n\n /** Whether this host has an attached portal. */\n hasAttached(): boolean {\n return !!this._attachedPortal;\n }\n\n attach<T>(portal: ComponentPortal<T>): ComponentRef<T>;\n attach<T>(portal: TemplatePortal<T>): EmbeddedViewRef<T>;\n attach(portal: any): any;\n\n /** Attaches a portal. */\n attach(portal: Portal<any>): any {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!portal) {\n throwNullPortalError();\n }\n\n if (this.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n\n if (this._isDisposed) {\n throwPortalOutletAlreadyDisposedError();\n }\n }\n\n if (portal instanceof ComponentPortal) {\n this._attachedPortal = portal;\n return this.attachComponentPortal(portal);\n } else if (portal instanceof TemplatePortal) {\n this._attachedPortal = portal;\n return this.attachTemplatePortal(portal);\n // @breaking-change 10.0.0 remove null check for `this.attachDomPortal`.\n } else if (this.attachDomPortal && portal instanceof DomPortal) {\n this._attachedPortal = portal;\n return this.attachDomPortal(portal);\n }\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throwUnknownPortalTypeError();\n }\n }\n\n abstract attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;\n\n abstract attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C>;\n\n // @breaking-change 10.0.0 `attachDomPortal` to become a required abstract method.\n readonly attachDomPortal: null | ((portal: DomPortal) => any) = null;\n\n /** Detaches a previously attached portal. */\n detach(): void {\n if (this._attachedPortal) {\n this._attachedPortal.setAttachedHost(null);\n this._attachedPortal = null;\n }\n\n this._invokeDisposeFn();\n }\n\n /** Permanently dispose of this portal host. */\n dispose(): void {\n if (this.hasAttached()) {\n this.detach();\n }\n\n this._invokeDisposeFn();\n this._isDisposed = true;\n }\n\n /** @docs-private */\n setDisposeFn(fn: () => void) {\n this._disposeFn = fn;\n }\n\n private _invokeDisposeFn() {\n if (this._disposeFn) {\n this._disposeFn();\n this._disposeFn = null;\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n ApplicationRef,\n ComponentRef,\n EmbeddedViewRef,\n EnvironmentInjector,\n Injector,\n NgModuleRef,\n createComponent,\n} from '@angular/core';\nimport {BasePortalOutlet, ComponentPortal, DomPortal, TemplatePortal} from './portal';\n\n/**\n * A PortalOutlet for attaching portals to an arbitrary DOM element outside of the Angular\n * application context.\n */\nexport class DomPortalOutlet extends BasePortalOutlet {\n /**\n * @param outletElement Element into which the content is projected.\n * @param _appRef Reference to the application. Only used in component portals when there\n * is no `ViewContainerRef` available.\n * @param _defaultInjector Injector to use as a fallback when the portal being attached doesn't\n * have one. Only used for component portals.\n */\n constructor(\n /** Element into which the content is projected. */\n public outletElement: Element,\n private _appRef?: ApplicationRef,\n private _defaultInjector?: Injector,\n ) {\n super();\n }\n\n /**\n * Attach the given ComponentPortal to DOM element.\n * @param portal Portal to be attached\n * @returns Reference to the created component.\n */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n let componentRef: ComponentRef<T>;\n\n // If the portal specifies a ViewContainerRef, we will use that as the attachment point\n // for the component (in terms of Angular's component tree, not rendering).\n // When the ViewContainerRef is missing, we use the factory to create the component directly\n // and then manually attach the view to the application.\n if (portal.viewContainerRef) {\n const injector = portal.injector || portal.viewContainerRef.injector;\n const ngModuleRef = injector.get(NgModuleRef, null, {optional: true}) || undefined;\n\n componentRef = portal.viewContainerRef.createComponent(portal.component, {\n index: portal.viewContainerRef.length,\n injector,\n ngModuleRef,\n projectableNodes: portal.projectableNodes || undefined,\n });\n\n this.setDisposeFn(() => componentRef.destroy());\n } else {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !this._appRef) {\n throw Error('Cannot attach component portal to outlet without an ApplicationRef.');\n }\n const appRef = this._appRef!;\n\n const elementInjector = portal.injector || this._defaultInjector || Injector.NULL;\n const environmentInjector = elementInjector.get(EnvironmentInjector, appRef.injector);\n componentRef = createComponent(portal.component, {\n elementInjector,\n environmentInjector,\n projectableNodes: portal.projectableNodes || undefined,\n });\n\n appRef.attachView(componentRef.hostView);\n this.setDisposeFn(() => {\n // Verify that the ApplicationRef has registered views before trying to detach a host view.\n // This check also protects the `detachView` from being called on a destroyed ApplicationRef.\n if (appRef.viewCount > 0) {\n appRef.detachView(componentRef.hostView);\n }\n componentRef.destroy();\n });\n }\n // At this point the component has been instantiated, so we move it to the location in the DOM\n // where we want it to be rendered.\n this.outletElement.appendChild(this._getComponentRootNode(componentRef));\n this._attachedPortal = portal;\n\n return componentRef;\n }\n\n /**\n * Attaches a template portal to the DOM as an embedded view.\n * @param portal Portal to be attached.\n * @returns Reference to the created embedded view.\n */\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n let viewContainer = portal.viewContainerRef;\n let viewRef = viewContainer.createEmbeddedView(portal.templateRef, portal.context, {\n injector: portal.injector,\n });\n\n // The method `createEmbeddedView` will add the view as a child of the viewContainer.\n // But for the DomPortalOutlet the view can be added everywhere in the DOM\n // (e.g Overlay Container) To move the view to the specified host element. We just\n // re-append the existing root nodes.\n viewRef.rootNodes.forEach(rootNode => this.outletElement.appendChild(rootNode));\n\n // Note that we want to detect changes after the nodes have been moved so that\n // any directives inside the portal that are looking at the DOM inside a lifecycle\n // hook won't be invoked too early.\n viewRef.detectChanges();\n\n this.setDisposeFn(() => {\n let index = viewContainer.indexOf(viewRef);\n if (index !== -1) {\n viewContainer.remove(index);\n }\n });\n\n this._attachedPortal = portal;\n\n // TODO(jelbourn): Return locals from view.\n return viewRef;\n }\n\n /**\n * Attaches a DOM portal by transferring its content into the outlet.\n * @param portal Portal to be attached.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n override attachDomPortal = (portal: DomPortal) => {\n const element = portal.element;\n if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('DOM portal content must be attached to a parent node.');\n }\n\n // Anchor used to save the element's previous position so\n // that we can restore it when the portal is detached.\n const anchorNode = this.outletElement.ownerDocument.createComment('dom-portal');\n\n element.parentNode!.insertBefore(anchorNode, element);\n this.outletElement.appendChild(element);\n this._attachedPortal = portal;\n\n super.setDisposeFn(() => {\n // We can't use `replaceWith` here because IE doesn't support it.\n if (anchorNode.parentNode) {\n anchorNode.parentNode.replaceChild(element, anchorNode);\n }\n });\n };\n\n /**\n * Clears out a portal from the DOM.\n */\n override dispose(): void {\n super.dispose();\n this.outletElement.remove();\n }\n\n /** Gets the root HTMLElement for an instantiated component. */\n private _getComponentRootNode(componentRef: ComponentRef<any>): HTMLElement {\n return (componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n ComponentRef,\n Directive,\n EmbeddedViewRef,\n EventEmitter,\n NgModule,\n OnDestroy,\n OnInit,\n Output,\n TemplateRef,\n ViewContainerRef,\n Input,\n inject,\n NgModuleRef,\n DOCUMENT,\n} from '@angular/core';\n\nimport {BasePortalOutlet, ComponentPortal, Portal, TemplatePortal, DomPortal} from './portal';\n\n/**\n * Directive version of a `TemplatePortal`. Because the directive *is* a TemplatePortal,\n * the directive instance itself can be attached to a host, enabling declarative use of portals.\n */\n@Directive({\n selector: '[cdkPortal]',\n exportAs: 'cdkPortal',\n})\nexport class CdkPortal extends TemplatePortal {\n constructor(...args: unknown[]);\n\n constructor() {\n const templateRef = inject<TemplateRef<any>>(TemplateRef);\n const viewContainerRef = inject(ViewContainerRef);\n\n super(templateRef, viewContainerRef);\n }\n}\n\n/**\n * Possible attached references to the CdkPortalOutlet.\n */\nexport type CdkPortalOutletAttachedRef = ComponentRef<any> | EmbeddedViewRef<any> | null;\n\n/**\n * Directive version of a PortalOutlet. Because the directive *is* a PortalOutlet, portals can be\n * directly attached to it, enabling declarative use.\n *\n * Usage:\n * `<ng-template [cdkPortalOutlet]=\"greeting\"></ng-template>`\n */\n@Directive({\n selector: '[cdkPortalOutlet]',\n exportAs: 'cdkPortalOutlet',\n})\nexport class CdkPortalOutlet extends BasePortalOutlet implements OnInit, OnDestroy {\n private _moduleRef = inject(NgModuleRef, {optional: true});\n private _document = inject(DOCUMENT);\n private _viewContainerRef = inject(ViewContainerRef);\n\n /** Whether the portal component is initialized. */\n private _isInitialized = false;\n\n /** Reference to the currently-attached component/view ref. */\n private _attachedRef: CdkPortalOutletAttachedRef = null;\n\n constructor(...args: unknown[]);\n\n constructor() {\n super();\n }\n\n /** Portal associated with the Portal outlet. */\n @Input('cdkPortalOutlet')\n get portal(): Portal<any> | null {\n return this._attachedPortal;\n }\n\n set portal(portal: Portal<any> | null | undefined | '') {\n // Ignore the cases where the `portal` is set to a falsy value before the lifecycle hooks have\n // run. This handles the cases where the user might do something like `<div cdkPortalOutlet>`\n // and attach a portal programmatically in the parent component. When Angular does the first CD\n // round, it will fire the setter with empty string, causing the user's content to be cleared.\n if (this.hasAttached() && !portal && !this._isInitialized) {\n return;\n }\n\n if (this.hasAttached()) {\n super.detach();\n }\n\n if (portal) {\n super.attach(portal);\n }\n\n this._attachedPortal = portal || null;\n }\n\n /** Emits when a portal is attached to the outlet. */\n @Output() readonly attached: EventEmitter<CdkPortalOutletAttachedRef> =\n new EventEmitter<CdkPortalOutletAttachedRef>();\n\n /** Component or view reference that is attached to the portal. */\n get attachedRef(): CdkPortalOutletAttachedRef {\n return this._attachedRef;\n }\n\n ngOnInit() {\n this._isInitialized = true;\n }\n\n ngOnDestroy() {\n super.dispose();\n this._attachedRef = this._attachedPortal = null;\n }\n\n /**\n * Attach the given ComponentPortal to this PortalOutlet.\n *\n * @param portal Portal to be attached to the portal outlet.\n * @returns Reference to the created component.\n */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n portal.setAttachedHost(this);\n\n // If the portal specifies an origin, use that as the logical location of the component\n // in the application tree. Otherwise use the location of this PortalOutlet.\n const viewContainerRef =\n portal.viewContainerRef != null ? portal.viewContainerRef : this._viewContainerRef;\n\n const ref = viewContainerRef.createComponent(portal.component, {\n index: viewContainerRef.length,\n injector: portal.injector || viewContainerRef.injector,\n projectableNodes: portal.projectableNodes || undefined,\n ngModuleRef: this._moduleRef || undefined,\n });\n\n // If we're using a view container that's different from the injected one (e.g. when the portal\n // specifies its own) we need to move the component into the outlet, otherwise it'll be rendered\n // inside of the alternate view container.\n if (viewContainerRef !== this._viewContainerRef) {\n this._getRootNode().appendChild((ref.hostView as EmbeddedViewRef<any>).rootNodes[0]);\n }\n\n super.setDisposeFn(() => ref.destroy());\n this._attachedPortal = portal;\n this._attachedRef = ref;\n this.attached.emit(ref);\n\n return ref;\n }\n\n /**\n * Attach the given TemplatePortal to this PortalHost as an embedded View.\n * @param portal Portal to be attached.\n * @returns Reference to the created embedded view.\n */\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n portal.setAttachedHost(this);\n const viewRef = this._viewContainerRef.createEmbeddedView(portal.templateRef, portal.context, {\n injector: portal.injector,\n });\n super.setDisposeFn(() => this._viewContainerRef.clear());\n\n this._attachedPortal = portal;\n this._attachedRef = viewRef;\n this.attached.emit(viewRef);\n\n return viewRef;\n }\n\n /**\n * Attaches the given DomPortal to this PortalHost by moving all of the portal content into it.\n * @param portal Portal to be attached.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n override attachDomPortal = (portal: DomPortal) => {\n const element = portal.element;\n if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('DOM portal content must be attached to a parent node.');\n }\n\n // Anchor used to save the element's previous position so\n // that we can restore it when the portal is detached.\n const anchorNode = this._document.createComment('dom-portal');\n\n portal.setAttachedHost(this);\n element.parentNode!.insertBefore(anchorNode, element);\n this._getRootNode().appendChild(element);\n this._attachedPortal = portal;\n\n super.setDisposeFn(() => {\n if (anchorNode.parentNode) {\n anchorNode.parentNode!.replaceChild(element, anchorNode);\n }\n });\n };\n\n /** Gets the root node of the portal outlet. */\n private _getRootNode(): HTMLElement {\n const nativeElement: Node = this._viewContainerRef.element.nativeElement;\n\n // The directive could be set on a template which will result in a comment\n // node being the root. Use the comment's parent node if that is the case.\n return (\n nativeElement.nodeType === nativeElement.ELEMENT_NODE\n ? nativeElement\n : nativeElement.parentNode!\n ) as HTMLElement;\n }\n}\n\n@NgModule({\n imports: [CdkPortal, CdkPortalOutlet],\n exports: [CdkPortal, CdkPortalOutlet],\n})\nexport class PortalModule {}\n"],"names":["throwNullPortalError","Error","throwPortalAlreadyAttachedError","throwPortalOutletAlreadyDisposedError","throwUnknownPortalTypeError","throwNullPortalOutletError","throwNoPortalAttachedError","Portal","_attachedHost","attach","host","ngDevMode","hasAttached","detach","isAttached","setAttachedHost","ComponentPortal","component","viewContainerRef","injector","projectableNodes","constructor","TemplatePortal","templateRef","context","origin","elementRef","undefined","DomPortal","element","ElementRef","nativeElement","BasePortalOutlet","_attachedPortal","_disposeFn","_isDisposed","portal","attachComponentPortal","attachTemplatePortal","attachDomPortal","_invokeDisposeFn","dispose","setDisposeFn","fn","DomPortalOutlet","outletElement","_appRef","_defaultInjector","componentRef","ngModuleRef","get","NgModuleRef","optional","createComponent","index","length","destroy","appRef","elementInjector","Injector","NULL","environmentInjector","EnvironmentInjector","attachView","hostView","viewCount","detachView","appendChild","_getComponentRootNode","viewContainer","viewRef","createEmbeddedView","rootNodes","forEach","rootNode","detectChanges","indexOf","remove","parentNode","anchorNode","ownerDocument","createComment","insertBefore","replaceChild","CdkPortal","inject","TemplateRef","ViewContainerRef","deps","target","i0","ɵɵFactoryTarget","Directive","isStandalone","selector","exportAs","usesInheritance","ngImport","decorators","args","CdkPortalOutlet","_moduleRef","_document","DOCUMENT","_viewContainerRef","_isInitialized","_attachedRef","attached","EventEmitter","attachedRef","ngOnInit","ngOnDestroy","ref","_getRootNode","emit","clear","nodeType","ELEMENT_NODE","inputs","outputs","Input","Output","PortalModule","NgModule","ɵmod","ɵɵngDeclareNgModule","minVersion","version","type","exports","imports"],"mappings":";;;SAYgBA,oBAAoBA,GAAA;EAClC,MAAMC,KAAK,CAAC,iCAAiC,CAAC;AAChD;SAMgBC,+BAA+BA,GAAA;EAC7C,MAAMD,KAAK,CAAC,oCAAoC,CAAC;AACnD;SAMgBE,qCAAqCA,GAAA;EACnD,MAAMF,KAAK,CAAC,6CAA6C,CAAC;AAC5D;SAMgBG,2BAA2BA,GAAA;AACzC,EAAA,MAAMH,KAAK,CACT,+EAA+E,GAC7E,wCAAwC,CAC3C;AACH;SAMgBI,0BAA0BA,GAAA;EACxC,MAAMJ,KAAK,CAAC,sDAAsD,CAAC;AACrE;SAMgBK,0BAA0BA,GAAA;EACxC,MAAML,KAAK,CAAC,8DAA8D,CAAC;AAC7E;;MCvBsBM,MAAM,CAAA;AAClBC,EAAAA,aAAa,GAAwB,IAAI;EAGjDC,MAAMA,CAACC,IAAkB,EAAA;AACvB,IAAA,IAAI,OAAOC,SAAS,KAAK,WAAW,IAAIA,SAAS,EAAE;MACjD,IAAID,IAAI,IAAI,IAAI,EAAE;AAChBL,QAAAA,0BAA0B,EAAE;AAC9B;AAEA,MA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,EAAA,CAAA;AACTL,MAAAA,QAAQ,EAAE,mBAAmB;AAC7BC,MAAAA,QAAQ,EAAE;KACX;;;;;YAmBEyB,KAAK;aAAC,iBAAiB;;;YA0BvBC;;;;MAsHUC,YAAY,CAAA;;;;;UAAZA,YAAY;AAAAlC,IAAAA,IAAA,EAAA,EAAA;AAAAC,IAAAA,MAAA,EAAAC,EAAA,CAAAC,eAAA,CAAAgC;AAAA,GAAA,CAAA;AAAZ,EAAA,OAAAC,IAAA,GAAAlC,EAAA,CAAAmC,mBAAA,CAAA;AAAAC,IAAAA,UAAA,EAAA,QAAA;AAAAC,IAAAA,OAAA,EAAA,QAAA;AAAA9B,IAAAA,QAAA,EAAAP,EAAA;AAAAsC,IAAAA,IAAA,EAAAN,YAAY;cA7LZtC,SAAS,EA2BTgB,eAAe,CA3Bf;AAAA6B,IAAAA,OAAA,EAAA,CAAA7C,SAAS,EA2BTgB,eAAe;AAAA,GAAA,CAAA;;;;;UAkKfsB;AAAY,GAAA,CAAA;;;;;;QAAZA,YAAY;AAAAxB,EAAAA,UAAA,EAAA,CAAA;UAJxByB,QAAQ;AAACxB,IAAAA,IAAA,EAAA,CAAA;AACR+B,MAAAA,OAAO,EAAE,CAAC9C,SAAS,EAAEgB,eAAe,CAAC;AACrC6B,MAAAA,OAAO,EAAE,CAAC7C,SAAS,EAAEgB,eAAe;KACrC;;;;;;"}
1
+ {"version":3,"file":"portal.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/portal/portal-errors.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/portal/portal.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/portal/dom-portal-outlet.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/portal/portal-directives.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * Throws an exception when attempting to attach a null portal to a host.\n * @docs-private\n */\nexport function throwNullPortalError() {\n throw Error('Must provide a portal to attach');\n}\n\n/**\n * Throws an exception when attempting to attach a portal to a host that is already attached.\n * @docs-private\n */\nexport function throwPortalAlreadyAttachedError() {\n throw Error('Host already has a portal attached');\n}\n\n/**\n * Throws an exception when attempting to attach a portal to an already-disposed host.\n * @docs-private\n */\nexport function throwPortalOutletAlreadyDisposedError() {\n throw Error('This PortalOutlet has already been disposed');\n}\n\n/**\n * Throws an exception when attempting to attach an unknown portal type.\n * @docs-private\n */\nexport function throwUnknownPortalTypeError() {\n throw Error(\n 'Attempting to attach an unknown Portal type. BasePortalOutlet accepts either ' +\n 'a ComponentPortal or a TemplatePortal.',\n );\n}\n\n/**\n * Throws an exception when attempting to attach a portal to a null host.\n * @docs-private\n */\nexport function throwNullPortalOutletError() {\n throw Error('Attempting to attach a portal to a null PortalOutlet');\n}\n\n/**\n * Throws an exception when attempting to detach a portal that is not attached.\n * @docs-private\n */\nexport function throwNoPortalAttachedError() {\n throw Error('Attempting to detach a portal that is not attached to a host');\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n TemplateRef,\n ViewContainerRef,\n ElementRef,\n ComponentRef,\n EmbeddedViewRef,\n Injector,\n Binding,\n} from '@angular/core';\nimport {\n throwNullPortalOutletError,\n throwPortalAlreadyAttachedError,\n throwNoPortalAttachedError,\n throwNullPortalError,\n throwPortalOutletAlreadyDisposedError,\n throwUnknownPortalTypeError,\n} from './portal-errors';\n\n/** Interface that can be used to generically type a class. */\nexport interface ComponentType<T> {\n new (...args: any[]): T;\n}\n\n/**\n * A `Portal` is something that you want to render somewhere else.\n * It can be attach to / detached from a `PortalOutlet`.\n */\nexport abstract class Portal<T> {\n private _attachedHost: PortalOutlet | null = null;\n\n /** Attach this portal to a host. */\n attach(host: PortalOutlet): T {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (host == null) {\n throwNullPortalOutletError();\n }\n\n if (host.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n }\n\n this._attachedHost = host;\n return <T>host.attach(this);\n }\n\n /** Detach this portal from its host */\n detach(): void {\n let host = this._attachedHost;\n\n if (host != null) {\n this._attachedHost = null;\n host.detach();\n } else if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throwNoPortalAttachedError();\n }\n }\n\n /** Whether this portal is attached to a host. */\n get isAttached(): boolean {\n return this._attachedHost != null;\n }\n\n /**\n * Sets the PortalOutlet reference without performing `attach()`. This is used directly by\n * the PortalOutlet when it is performing an `attach()` or `detach()`.\n */\n setAttachedHost(host: PortalOutlet | null) {\n this._attachedHost = host;\n }\n}\n\n/**\n * A `ComponentPortal` is a portal that instantiates some Component upon attachment.\n */\nexport class ComponentPortal<T> extends Portal<ComponentRef<T>> {\n /** The type of the component that will be instantiated for attachment. */\n component: ComponentType<T>;\n\n /**\n * Where the attached component should live in Angular's *logical* component tree.\n * This is different from where the component *renders*, which is determined by the PortalOutlet.\n * The origin is necessary when the host is outside of the Angular application context.\n */\n viewContainerRef?: ViewContainerRef | null;\n\n /** Injector used for the instantiation of the component. */\n injector?: Injector | null;\n\n /**\n * List of DOM nodes that should be projected through `<ng-content>` of the attached component.\n */\n projectableNodes?: Node[][] | null;\n\n /**\n * Bindings to apply to the created component.\n */\n readonly bindings: Binding[] | null;\n\n constructor(\n component: ComponentType<T>,\n viewContainerRef?: ViewContainerRef | null,\n injector?: Injector | null,\n projectableNodes?: Node[][] | null,\n bindings?: Binding[],\n ) {\n super();\n this.component = component;\n this.viewContainerRef = viewContainerRef;\n this.injector = injector;\n this.projectableNodes = projectableNodes;\n this.bindings = bindings || null;\n }\n}\n\n/**\n * A `TemplatePortal` is a portal that represents some embedded template (TemplateRef).\n */\nexport class TemplatePortal<C = any> extends Portal<EmbeddedViewRef<C>> {\n constructor(\n /** The embedded template that will be used to instantiate an embedded View in the host. */\n public templateRef: TemplateRef<C>,\n /** Reference to the ViewContainer into which the template will be stamped out. */\n public viewContainerRef: ViewContainerRef,\n /** Contextual data to be passed in to the embedded view. */\n public context?: C,\n /** The injector to use for the embedded view. */\n public injector?: Injector,\n ) {\n super();\n }\n\n get origin(): ElementRef {\n return this.templateRef.elementRef;\n }\n\n /**\n * Attach the portal to the provided `PortalOutlet`.\n * When a context is provided it will override the `context` property of the `TemplatePortal`\n * instance.\n */\n override attach(host: PortalOutlet, context: C | undefined = this.context): EmbeddedViewRef<C> {\n this.context = context;\n return super.attach(host);\n }\n\n override detach(): void {\n this.context = undefined;\n return super.detach();\n }\n}\n\n/**\n * A `DomPortal` is a portal whose DOM element will be taken from its current position\n * in the DOM and moved into a portal outlet, when it is attached. On detach, the content\n * will be restored to its original position.\n */\nexport class DomPortal<T = HTMLElement> extends Portal<T> {\n /** DOM node hosting the portal's content. */\n readonly element: T;\n\n constructor(element: T | ElementRef<T>) {\n super();\n this.element = element instanceof ElementRef ? element.nativeElement : element;\n }\n}\n\n/** A `PortalOutlet` is a space that can contain a single `Portal`. */\nexport interface PortalOutlet {\n /** Attaches a portal to this outlet. */\n attach(portal: Portal<any>): any;\n\n /** Detaches the currently attached portal from this outlet. */\n detach(): any;\n\n /** Performs cleanup before the outlet is destroyed. */\n dispose(): void;\n\n /** Whether there is currently a portal attached to this outlet. */\n hasAttached(): boolean;\n}\n\n/**\n * Partial implementation of PortalOutlet that handles attaching\n * ComponentPortal and TemplatePortal.\n */\nexport abstract class BasePortalOutlet implements PortalOutlet {\n /** The portal currently attached to the host. */\n protected _attachedPortal: Portal<any> | null = null;\n\n /** A function that will permanently dispose this host. */\n private _disposeFn: (() => void) | null = null;\n\n /** Whether this host has already been permanently disposed. */\n private _isDisposed: boolean = false;\n\n /** Whether this host has an attached portal. */\n hasAttached(): boolean {\n return !!this._attachedPortal;\n }\n\n attach<T>(portal: ComponentPortal<T>): ComponentRef<T>;\n attach<T>(portal: TemplatePortal<T>): EmbeddedViewRef<T>;\n attach(portal: any): any;\n\n /** Attaches a portal. */\n attach(portal: Portal<any>): any {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!portal) {\n throwNullPortalError();\n }\n\n if (this.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n\n if (this._isDisposed) {\n throwPortalOutletAlreadyDisposedError();\n }\n }\n\n if (portal instanceof ComponentPortal) {\n this._attachedPortal = portal;\n return this.attachComponentPortal(portal);\n } else if (portal instanceof TemplatePortal) {\n this._attachedPortal = portal;\n return this.attachTemplatePortal(portal);\n // @breaking-change 10.0.0 remove null check for `this.attachDomPortal`.\n } else if (this.attachDomPortal && portal instanceof DomPortal) {\n this._attachedPortal = portal;\n return this.attachDomPortal(portal);\n }\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throwUnknownPortalTypeError();\n }\n }\n\n abstract attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;\n\n abstract attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C>;\n\n // @breaking-change 10.0.0 `attachDomPortal` to become a required abstract method.\n readonly attachDomPortal: null | ((portal: DomPortal) => any) = null;\n\n /** Detaches a previously attached portal. */\n detach(): void {\n if (this._attachedPortal) {\n this._attachedPortal.setAttachedHost(null);\n this._attachedPortal = null;\n }\n\n this._invokeDisposeFn();\n }\n\n /** Permanently dispose of this portal host. */\n dispose(): void {\n if (this.hasAttached()) {\n this.detach();\n }\n\n this._invokeDisposeFn();\n this._isDisposed = true;\n }\n\n /** @docs-private */\n setDisposeFn(fn: () => void) {\n this._disposeFn = fn;\n }\n\n private _invokeDisposeFn() {\n if (this._disposeFn) {\n this._disposeFn();\n this._disposeFn = null;\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n ApplicationRef,\n ComponentRef,\n EmbeddedViewRef,\n EnvironmentInjector,\n Injector,\n NgModuleRef,\n createComponent,\n} from '@angular/core';\nimport {BasePortalOutlet, ComponentPortal, DomPortal, TemplatePortal} from './portal';\n\n/**\n * A PortalOutlet for attaching portals to an arbitrary DOM element outside of the Angular\n * application context.\n */\nexport class DomPortalOutlet extends BasePortalOutlet {\n /**\n * @param outletElement Element into which the content is projected.\n * @param _appRef Reference to the application. Only used in component portals when there\n * is no `ViewContainerRef` available.\n * @param _defaultInjector Injector to use as a fallback when the portal being attached doesn't\n * have one. Only used for component portals.\n */\n constructor(\n /** Element into which the content is projected. */\n public outletElement: Element,\n private _appRef?: ApplicationRef,\n private _defaultInjector?: Injector,\n ) {\n super();\n }\n\n /**\n * Attach the given ComponentPortal to DOM element.\n * @param portal Portal to be attached\n * @returns Reference to the created component.\n */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n let componentRef: ComponentRef<T>;\n\n // If the portal specifies a ViewContainerRef, we will use that as the attachment point\n // for the component (in terms of Angular's component tree, not rendering).\n // When the ViewContainerRef is missing, we use the factory to create the component directly\n // and then manually attach the view to the application.\n if (portal.viewContainerRef) {\n const injector = portal.injector || portal.viewContainerRef.injector;\n const ngModuleRef = injector.get(NgModuleRef, null, {optional: true}) || undefined;\n\n componentRef = portal.viewContainerRef.createComponent(portal.component, {\n index: portal.viewContainerRef.length,\n injector,\n ngModuleRef,\n projectableNodes: portal.projectableNodes || undefined,\n bindings: portal.bindings || undefined,\n });\n\n this.setDisposeFn(() => componentRef.destroy());\n } else {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !this._appRef) {\n throw Error('Cannot attach component portal to outlet without an ApplicationRef.');\n }\n const appRef = this._appRef!;\n\n const elementInjector = portal.injector || this._defaultInjector || Injector.NULL;\n const environmentInjector = elementInjector.get(EnvironmentInjector, appRef.injector);\n componentRef = createComponent(portal.component, {\n elementInjector,\n environmentInjector,\n projectableNodes: portal.projectableNodes || undefined,\n bindings: portal.bindings || undefined,\n });\n\n appRef.attachView(componentRef.hostView);\n this.setDisposeFn(() => {\n // Verify that the ApplicationRef has registered views before trying to detach a host view.\n // This check also protects the `detachView` from being called on a destroyed ApplicationRef.\n if (appRef.viewCount > 0) {\n appRef.detachView(componentRef.hostView);\n }\n componentRef.destroy();\n });\n }\n // At this point the component has been instantiated, so we move it to the location in the DOM\n // where we want it to be rendered.\n this.outletElement.appendChild(this._getComponentRootNode(componentRef));\n this._attachedPortal = portal;\n\n return componentRef;\n }\n\n /**\n * Attaches a template portal to the DOM as an embedded view.\n * @param portal Portal to be attached.\n * @returns Reference to the created embedded view.\n */\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n let viewContainer = portal.viewContainerRef;\n let viewRef = viewContainer.createEmbeddedView(portal.templateRef, portal.context, {\n injector: portal.injector,\n });\n\n // The method `createEmbeddedView` will add the view as a child of the viewContainer.\n // But for the DomPortalOutlet the view can be added everywhere in the DOM\n // (e.g Overlay Container) To move the view to the specified host element. We just\n // re-append the existing root nodes.\n viewRef.rootNodes.forEach(rootNode => this.outletElement.appendChild(rootNode));\n\n // Note that we want to detect changes after the nodes have been moved so that\n // any directives inside the portal that are looking at the DOM inside a lifecycle\n // hook won't be invoked too early.\n viewRef.detectChanges();\n\n this.setDisposeFn(() => {\n let index = viewContainer.indexOf(viewRef);\n if (index !== -1) {\n viewContainer.remove(index);\n }\n });\n\n this._attachedPortal = portal;\n\n // TODO(jelbourn): Return locals from view.\n return viewRef;\n }\n\n /**\n * Attaches a DOM portal by transferring its content into the outlet.\n * @param portal Portal to be attached.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n override attachDomPortal = (portal: DomPortal) => {\n const element = portal.element;\n if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('DOM portal content must be attached to a parent node.');\n }\n\n // Anchor used to save the element's previous position so\n // that we can restore it when the portal is detached.\n const anchorNode = this.outletElement.ownerDocument.createComment('dom-portal');\n\n element.parentNode!.insertBefore(anchorNode, element);\n this.outletElement.appendChild(element);\n this._attachedPortal = portal;\n\n super.setDisposeFn(() => {\n // We can't use `replaceWith` here because IE doesn't support it.\n if (anchorNode.parentNode) {\n anchorNode.parentNode.replaceChild(element, anchorNode);\n }\n });\n };\n\n /**\n * Clears out a portal from the DOM.\n */\n override dispose(): void {\n super.dispose();\n this.outletElement.remove();\n }\n\n /** Gets the root HTMLElement for an instantiated component. */\n private _getComponentRootNode(componentRef: ComponentRef<any>): HTMLElement {\n return (componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n ComponentRef,\n Directive,\n EmbeddedViewRef,\n EventEmitter,\n NgModule,\n OnDestroy,\n OnInit,\n Output,\n TemplateRef,\n ViewContainerRef,\n Input,\n inject,\n NgModuleRef,\n DOCUMENT,\n} from '@angular/core';\n\nimport {BasePortalOutlet, ComponentPortal, Portal, TemplatePortal, DomPortal} from './portal';\n\n/**\n * Directive version of a `TemplatePortal`. Because the directive *is* a TemplatePortal,\n * the directive instance itself can be attached to a host, enabling declarative use of portals.\n */\n@Directive({\n selector: '[cdkPortal]',\n exportAs: 'cdkPortal',\n})\nexport class CdkPortal extends TemplatePortal {\n constructor(...args: unknown[]);\n\n constructor() {\n const templateRef = inject<TemplateRef<any>>(TemplateRef);\n const viewContainerRef = inject(ViewContainerRef);\n\n super(templateRef, viewContainerRef);\n }\n}\n\n/**\n * Possible attached references to the CdkPortalOutlet.\n */\nexport type CdkPortalOutletAttachedRef = ComponentRef<any> | EmbeddedViewRef<any> | null;\n\n/**\n * Directive version of a PortalOutlet. Because the directive *is* a PortalOutlet, portals can be\n * directly attached to it, enabling declarative use.\n *\n * Usage:\n * `<ng-template [cdkPortalOutlet]=\"greeting\"></ng-template>`\n */\n@Directive({\n selector: '[cdkPortalOutlet]',\n exportAs: 'cdkPortalOutlet',\n})\nexport class CdkPortalOutlet extends BasePortalOutlet implements OnInit, OnDestroy {\n private _moduleRef = inject(NgModuleRef, {optional: true});\n private _document = inject(DOCUMENT);\n private _viewContainerRef = inject(ViewContainerRef);\n\n /** Whether the portal component is initialized. */\n private _isInitialized = false;\n\n /** Reference to the currently-attached component/view ref. */\n private _attachedRef: CdkPortalOutletAttachedRef = null;\n\n constructor(...args: unknown[]);\n\n constructor() {\n super();\n }\n\n /** Portal associated with the Portal outlet. */\n @Input('cdkPortalOutlet')\n get portal(): Portal<any> | null {\n return this._attachedPortal;\n }\n\n set portal(portal: Portal<any> | null | undefined | '') {\n // Ignore the cases where the `portal` is set to a falsy value before the lifecycle hooks have\n // run. This handles the cases where the user might do something like `<div cdkPortalOutlet>`\n // and attach a portal programmatically in the parent component. When Angular does the first CD\n // round, it will fire the setter with empty string, causing the user's content to be cleared.\n if (this.hasAttached() && !portal && !this._isInitialized) {\n return;\n }\n\n if (this.hasAttached()) {\n super.detach();\n }\n\n if (portal) {\n super.attach(portal);\n }\n\n this._attachedPortal = portal || null;\n }\n\n /** Emits when a portal is attached to the outlet. */\n @Output() readonly attached: EventEmitter<CdkPortalOutletAttachedRef> =\n new EventEmitter<CdkPortalOutletAttachedRef>();\n\n /** Component or view reference that is attached to the portal. */\n get attachedRef(): CdkPortalOutletAttachedRef {\n return this._attachedRef;\n }\n\n ngOnInit() {\n this._isInitialized = true;\n }\n\n ngOnDestroy() {\n super.dispose();\n this._attachedRef = this._attachedPortal = null;\n }\n\n /**\n * Attach the given ComponentPortal to this PortalOutlet.\n *\n * @param portal Portal to be attached to the portal outlet.\n * @returns Reference to the created component.\n */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n portal.setAttachedHost(this);\n\n // If the portal specifies an origin, use that as the logical location of the component\n // in the application tree. Otherwise use the location of this PortalOutlet.\n const viewContainerRef =\n portal.viewContainerRef != null ? portal.viewContainerRef : this._viewContainerRef;\n\n const ref = viewContainerRef.createComponent(portal.component, {\n index: viewContainerRef.length,\n injector: portal.injector || viewContainerRef.injector,\n projectableNodes: portal.projectableNodes || undefined,\n ngModuleRef: this._moduleRef || undefined,\n bindings: portal.bindings || undefined,\n });\n\n // If we're using a view container that's different from the injected one (e.g. when the portal\n // specifies its own) we need to move the component into the outlet, otherwise it'll be rendered\n // inside of the alternate view container.\n if (viewContainerRef !== this._viewContainerRef) {\n this._getRootNode().appendChild((ref.hostView as EmbeddedViewRef<any>).rootNodes[0]);\n }\n\n super.setDisposeFn(() => ref.destroy());\n this._attachedPortal = portal;\n this._attachedRef = ref;\n this.attached.emit(ref);\n\n return ref;\n }\n\n /**\n * Attach the given TemplatePortal to this PortalHost as an embedded View.\n * @param portal Portal to be attached.\n * @returns Reference to the created embedded view.\n */\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n portal.setAttachedHost(this);\n const viewRef = this._viewContainerRef.createEmbeddedView(portal.templateRef, portal.context, {\n injector: portal.injector,\n });\n super.setDisposeFn(() => this._viewContainerRef.clear());\n\n this._attachedPortal = portal;\n this._attachedRef = viewRef;\n this.attached.emit(viewRef);\n\n return viewRef;\n }\n\n /**\n * Attaches the given DomPortal to this PortalHost by moving all of the portal content into it.\n * @param portal Portal to be attached.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n override attachDomPortal = (portal: DomPortal) => {\n const element = portal.element;\n if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('DOM portal content must be attached to a parent node.');\n }\n\n // Anchor used to save the element's previous position so\n // that we can restore it when the portal is detached.\n const anchorNode = this._document.createComment('dom-portal');\n\n portal.setAttachedHost(this);\n element.parentNode!.insertBefore(anchorNode, element);\n this._getRootNode().appendChild(element);\n this._attachedPortal = portal;\n\n super.setDisposeFn(() => {\n if (anchorNode.parentNode) {\n anchorNode.parentNode!.replaceChild(element, anchorNode);\n }\n });\n };\n\n /** Gets the root node of the portal outlet. */\n private _getRootNode(): HTMLElement {\n const nativeElement: Node = this._viewContainerRef.element.nativeElement;\n\n // The directive could be set on a template which will result in a comment\n // node being the root. Use the comment's parent node if that is the case.\n return (\n nativeElement.nodeType === nativeElement.ELEMENT_NODE\n ? nativeElement\n : nativeElement.parentNode!\n ) as HTMLElement;\n }\n}\n\n@NgModule({\n imports: [CdkPortal, CdkPortalOutlet],\n exports: [CdkPortal, CdkPortalOutlet],\n})\nexport class PortalModule {}\n"],"names":["throwNullPortalError","Error","throwPortalAlreadyAttachedError","throwPortalOutletAlreadyDisposedError","throwUnknownPortalTypeError","throwNullPortalOutletError","throwNoPortalAttachedError","Portal","_attachedHost","attach","host","ngDevMode","hasAttached","detach","isAttached","setAttachedHost","ComponentPortal","component","viewContainerRef","injector","projectableNodes","bindings","constructor","TemplatePortal","templateRef","context","origin","elementRef","undefined","DomPortal","element","ElementRef","nativeElement","BasePortalOutlet","_attachedPortal","_disposeFn","_isDisposed","portal","attachComponentPortal","attachTemplatePortal","attachDomPortal","_invokeDisposeFn","dispose","setDisposeFn","fn","DomPortalOutlet","outletElement","_appRef","_defaultInjector","componentRef","ngModuleRef","get","NgModuleRef","optional","createComponent","index","length","destroy","appRef","elementInjector","Injector","NULL","environmentInjector","EnvironmentInjector","attachView","hostView","viewCount","detachView","appendChild","_getComponentRootNode","viewContainer","viewRef","createEmbeddedView","rootNodes","forEach","rootNode","detectChanges","indexOf","remove","parentNode","anchorNode","ownerDocument","createComment","insertBefore","replaceChild","CdkPortal","inject","TemplateRef","ViewContainerRef","deps","target","i0","ɵɵFactoryTarget","Directive","isStandalone","selector","exportAs","usesInheritance","ngImport","decorators","args","CdkPortalOutlet","_moduleRef","_document","DOCUMENT","_viewContainerRef","_isInitialized","_attachedRef","attached","EventEmitter","attachedRef","ngOnInit","ngOnDestroy","ref","_getRootNode","emit","clear","nodeType","ELEMENT_NODE","inputs","outputs","Input","Output","PortalModule","NgModule","ɵmod","ɵɵngDeclareNgModule","minVersion","version","type","exports","imports"],"mapp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,GAAA,CAAA;AAAZ,EAAA,OAAAC,IAAA,GAAAlC,EAAA,CAAAmC,mBAAA,CAAA;AAAAC,IAAAA,UAAA,EAAA,QAAA;AAAAC,IAAAA,OAAA,EAAA,QAAA;AAAA9B,IAAAA,QAAA,EAAAP,EAAA;AAAAsC,IAAAA,IAAA,EAAAN,YAAY;cA9LZtC,SAAS,EA2BTgB,eAAe,CA3Bf;AAAA6B,IAAAA,OAAA,EAAA,CAAA7C,SAAS,EA2BTgB,eAAe;AAAA,GAAA,CAAA;;;;;UAmKfsB;AAAY,GAAA,CAAA;;;;;;QAAZA,YAAY;AAAAxB,EAAAA,UAAA,EAAA,CAAA;UAJxByB,QAAQ;AAACxB,IAAAA,IAAA,EAAA,CAAA;AACR+B,MAAAA,OAAO,EAAE,CAAC9C,SAAS,EAAEgB,eAAe,CAAC;AACrC6B,MAAAA,OAAO,EAAE,CAAC7C,SAAS,EAAEgB,eAAe;KACrC;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/cdk",
3
- "version": "21.2.0-rc.0",
3
+ "version": "21.2.1",
4
4
  "description": "Angular Material Component Development Kit",
5
5
  "repository": {
6
6
  "type": "git",
@@ -158,9 +158,9 @@
158
158
  }
159
159
  },
160
160
  "peerDependencies": {
161
- "@angular/core": "^21.0.0-0 || ^21.1.0-0 || ^21.2.0-0 || ^21.3.0-0 || ^22.0.0-0",
162
- "@angular/common": "^21.0.0-0 || ^21.1.0-0 || ^21.2.0-0 || ^21.3.0-0 || ^22.0.0-0",
163
- "@angular/platform-browser": "^21.0.0-0 || ^21.1.0-0 || ^21.2.0-0 || ^21.3.0-0 || ^22.0.0-0",
161
+ "@angular/core": "^21.0.0 || ^22.0.0",
162
+ "@angular/common": "^21.0.0 || ^22.0.0",
163
+ "@angular/platform-browser": "^21.0.0 || ^22.0.0",
164
164
  "rxjs": "^6.5.3 || ^7.4.0"
165
165
  },
166
166
  "dependencies": {
@@ -6,6 +6,11 @@
6
6
  "description": "Updates the Angular CDK to v21",
7
7
  "factory": "./ng-update/index#updateToV21"
8
8
  },
9
+ "migration-v22": {
10
+ "version": "22.0.0-0",
11
+ "description": "Updates the Angular CDK to v22",
12
+ "factory": "./ng-update/index#updateToV22"
13
+ },
9
14
  "ng-post-update": {
10
15
  "description": "Prints out results after ng-update.",
11
16
  "factory": "./ng-update/index#postUpdate",
@@ -26,6 +26,6 @@ function default_1() {
26
26
  // In order to align the CDK version with other Angular dependencies that are setup by
27
27
  // `@schematics/angular`, we use tilde instead of caret. This is default for Angular
28
28
  // dependencies in new CLI projects.
29
- return (0, utility_1.addDependency)('@angular/cdk', `~21.2.0-rc.0`, { existing: utility_1.ExistingBehavior.Skip });
29
+ return (0, utility_1.addDependency)('@angular/cdk', `~21.2.1`, { existing: utility_1.ExistingBehavior.Skip });
30
30
  }
31
31
  //# sourceMappingURL=index.js.map
@@ -6,5 +6,7 @@
6
6
  * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
8
  import { Rule } from '@angular-devkit/schematics';
9
- /** Entry point for the migration schematics with target of Angular CDK 20.0.0 */
9
+ /** Entry point for the migration schematics with target of Angular CDK 21.0.0 */
10
10
  export declare function updateToV21(): Rule;
11
+ /** Entry point for the migration schematics with target of Angular CDK 22.0.0 */
12
+ export declare function updateToV22(): Rule;
@@ -8,14 +8,19 @@
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.updateToV21 = updateToV21;
11
+ exports.updateToV22 = updateToV22;
11
12
  const target_version_1 = require("../update-tool/target-version");
12
13
  const upgrade_data_1 = require("./upgrade-data");
13
14
  const devkit_migration_rule_1 = require("./devkit-migration-rule");
14
15
  const cdkMigrations = [];
15
- /** Entry point for the migration schematics with target of Angular CDK 20.0.0 */
16
+ /** Entry point for the migration schematics with target of Angular CDK 21.0.0 */
16
17
  function updateToV21() {
17
18
  return (0, devkit_migration_rule_1.createMigrationSchematicRule)(target_version_1.TargetVersion.V21, cdkMigrations, upgrade_data_1.cdkUpgradeData, onMigrationComplete);
18
19
  }
20
+ /** Entry point for the migration schematics with target of Angular CDK 22.0.0 */
21
+ function updateToV22() {
22
+ return (0, devkit_migration_rule_1.createMigrationSchematicRule)(target_version_1.TargetVersion.V22, cdkMigrations, upgrade_data_1.cdkUpgradeData, onMigrationComplete);
23
+ }
19
24
  /** Function that will be called when the migration completed. */
20
25
  function onMigrationComplete(context, targetVersion, hasFailures) {
21
26
  context.logger.info('');
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAUH,kCAOC;AAdD,kEAA4D;AAC5D,iDAA8C;AAC9C,mEAA8F;AAE9F,MAAM,aAAa,GAA8B,EAAE,CAAC;AAEpD,iFAAiF;AACjF,SAAgB,WAAW;IACzB,OAAO,IAAA,oDAA4B,EACjC,8BAAa,CAAC,GAAG,EACjB,aAAa,EACb,6BAAc,EACd,mBAAmB,CACpB,CAAC;AACJ,CAAC;AAED,iEAAiE;AACjE,SAAS,mBAAmB,CAC1B,OAAyB,EACzB,aAA4B,EAC5B,WAAoB;IAEpB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,+BAA+B,aAAa,EAAE,CAAC,CAAC;IACpE,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAExB,IAAI,WAAW,EAAE,CAAC;QAChB,OAAO,CAAC,MAAM,CAAC,IAAI,CACjB,wFAAwF;YACtF,6CAA6C,CAChD,CAAC;IACJ,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAUH,kCAOC;AAGD,kCAOC;AAxBD,kEAA4D;AAC5D,iDAA8C;AAC9C,mEAA8F;AAE9F,MAAM,aAAa,GAA8B,EAAE,CAAC;AAEpD,iFAAiF;AACjF,SAAgB,WAAW;IACzB,OAAO,IAAA,oDAA4B,EACjC,8BAAa,CAAC,GAAG,EACjB,aAAa,EACb,6BAAc,EACd,mBAAmB,CACpB,CAAC;AACJ,CAAC;AAED,iFAAiF;AACjF,SAAgB,WAAW;IACzB,OAAO,IAAA,oDAA4B,EACjC,8BAAa,CAAC,GAAG,EACjB,aAAa,EACb,6BAAc,EACd,mBAAmB,CACpB,CAAC;AACJ,CAAC;AAED,iEAAiE;AACjE,SAAS,mBAAmB,CAC1B,OAAyB,EACzB,aAA4B,EAC5B,WAAoB;IAEpB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,+BAA+B,aAAa,EAAE,CAAC,CAAC;IACpE,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAExB,IAAI,WAAW,EAAE,CAAC;QAChB,OAAO,CAAC,MAAM,CAAC,IAAI,CACjB,wFAAwF;YACtF,6CAA6C,CAChD,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -7,7 +7,8 @@
7
7
  */
8
8
  /** Possible versions that can be automatically migrated by `ng update`. */
9
9
  export declare enum TargetVersion {
10
- V21 = "version 21"
10
+ V21 = "version 21",
11
+ V22 = "version 22"
11
12
  }
12
13
  /**
13
14
  * Returns all versions that are supported by "ng update". The versions are determined
@@ -14,6 +14,7 @@ exports.getAllVersionNames = getAllVersionNames;
14
14
  var TargetVersion;
15
15
  (function (TargetVersion) {
16
16
  TargetVersion["V21"] = "version 21";
17
+ TargetVersion["V22"] = "version 22";
17
18
  })(TargetVersion || (exports.TargetVersion = TargetVersion = {}));
18
19
  /**
19
20
  * Returns all versions that are supported by "ng update". The versions are determined
@@ -1 +1 @@
1
- {"version":3,"file":"target-version.js","sourceRoot":"","sources":["target-version.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAaH,gDAIC;AAfD,2EAA2E;AAE3E,6CAA6C;AAC7C,IAAY,aAEX;AAFD,WAAY,aAAa;IACvB,mCAAkB,CAAA;AACpB,CAAC,EAFW,aAAa,6BAAb,aAAa,QAExB;AAED;;;GAGG;AACH,SAAgB,kBAAkB;IAChC,OAAO,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE;QACnD,OAAO,OAAQ,aAAoD,CAAC,SAAS,CAAC,KAAK,QAAQ,CAAC;IAC9F,CAAC,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"target-version.js","sourceRoot":"","sources":["target-version.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAcH,gDAIC;AAhBD,2EAA2E;AAE3E,6CAA6C;AAC7C,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,mCAAkB,CAAA;IAClB,mCAAkB,CAAA;AACpB,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB;AAED;;;GAGG;AACH,SAAgB,kBAAkB;IAChC,OAAO,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE;QACnD,OAAO,OAAQ,aAAoD,CAAC,SAAS,CAAC,KAAK,QAAQ,CAAC;IAC9F,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { ComponentRef, ViewContainerRef, Injector, EmbeddedViewRef, TemplateRef, ElementRef, OnInit, OnDestroy, EventEmitter } from '@angular/core';
2
+ import { ComponentRef, ViewContainerRef, Injector, Binding, EmbeddedViewRef, TemplateRef, ElementRef, OnInit, OnDestroy, EventEmitter } from '@angular/core';
3
3
 
4
4
  /** Interface that can be used to generically type a class. */
5
5
  interface ComponentType<T> {
@@ -41,7 +41,11 @@ declare class ComponentPortal<T> extends Portal<ComponentRef<T>> {
41
41
  * List of DOM nodes that should be projected through `<ng-content>` of the attached component.
42
42
  */
43
43
  projectableNodes?: Node[][] | null;
44
- constructor(component: ComponentType<T>, viewContainerRef?: ViewContainerRef | null, injector?: Injector | null, projectableNodes?: Node[][] | null);
44
+ /**
45
+ * Bindings to apply to the created component.
46
+ */
47
+ readonly bindings: Binding[] | null;
48
+ constructor(component: ComponentType<T>, viewContainerRef?: ViewContainerRef | null, injector?: Injector | null, projectableNodes?: Node[][] | null, bindings?: Binding[]);
45
49
  }
46
50
  /**
47
51
  * A `TemplatePortal` is a portal that represents some embedded template (TemplateRef).
package/types/dialog.d.ts CHANGED
@@ -20,6 +20,15 @@ import './_style-loader-chunk.js';
20
20
 
21
21
  /** Options for where to set focus to automatically on dialog open */
22
22
  type AutoFocusTarget = 'dialog' | 'first-tabbable' | 'first-heading';
23
+ /**
24
+ * Value that determines the focus restoration behavior for a dialog.
25
+ * The values represent the following behaviors:
26
+ * - `boolean` - when true, will return focus to the element that was focused before the dialog
27
+ * was opened, otherwise won't restore focus at all.
28
+ * - `string` - focus will be restored to the first element that matches the CSS selector.
29
+ * - `HTMLElement` - focus will be restored to the specific element.
30
+ */
31
+ type RestoreFocusValue = boolean | string | HTMLElement;
23
32
  /** Valid ARIA roles for a dialog. */
24
33
  type DialogRole = 'dialog' | 'alertdialog';
25
34
  /** Component that can be used as the container for the dialog. */
@@ -92,15 +101,8 @@ declare class DialogConfig<D = unknown, R = unknown, C extends DialogContainer =
92
101
  * AutoFocusTarget instead.
93
102
  */
94
103
  autoFocus?: AutoFocusTarget | string | boolean;
95
- /**
96
- * Whether the dialog should restore focus to the previously-focused element upon closing.
97
- * Has the following behavior based on the type that is passed in:
98
- * - `boolean` - when true, will return focus to the element that was focused before the dialog
99
- * was opened, otherwise won't restore focus at all.
100
- * - `string` - focus will be restored to the first element that matches the CSS selector.
101
- * - `HTMLElement` - focus will be restored to the specific element.
102
- */
103
- restoreFocus?: boolean | string | HTMLElement;
104
+ /** Configures the focus restoration behavior. See `RestoreFocusValue` for more information. */
105
+ restoreFocus?: RestoreFocusValue;
104
106
  /**
105
107
  * Scroll strategy to be used for the dialog. This determines how
106
108
  * the dialog responds to scrolling underneath the panel element.
@@ -410,4 +412,4 @@ declare const DIALOG_DATA: InjectionToken<any>;
410
412
  declare const DEFAULT_DIALOG_CONFIG: InjectionToken<DialogConfig<unknown, unknown, _angular_cdk_portal.BasePortalOutlet>>;
411
413
 
412
414
  export { CdkDialogContainer, DEFAULT_DIALOG_CONFIG, DIALOG_DATA, DIALOG_SCROLL_STRATEGY, Dialog, DialogConfig, DialogModule, DialogRef, throwDialogContentAlreadyAttachedError, CdkPortalOutlet as ɵɵCdkPortalOutlet };
413
- export type { AutoFocusTarget, DialogCloseOptions, DialogContainer, DialogRole };
415
+ export type { AutoFocusTarget, DialogCloseOptions, DialogContainer, DialogRole, RestoreFocusValue };