-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cdk/dialog): move experimental CDK dialog into stable (#24804)
Moves the `cdk-experimental/dialog` package into the CDK.
- Loading branch information
Showing
23 changed files
with
231 additions
and
16 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!-- TODO --> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,198 @@ | ||
## API Report File for "components-srcs" | ||
|
||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). | ||
```ts | ||
|
||
import { AfterViewInit } from '@angular/core'; | ||
import { BasePortalOutlet } from '@angular/cdk/portal'; | ||
import { CdkPortalOutlet } from '@angular/cdk/portal'; | ||
import { ComponentFactoryResolver } from '@angular/core'; | ||
import { ComponentPortal } from '@angular/cdk/portal'; | ||
import { ComponentRef } from '@angular/core'; | ||
import { ComponentType } from '@angular/cdk/overlay'; | ||
import { Direction } from '@angular/cdk/bidi'; | ||
import { DomPortal } from '@angular/cdk/portal'; | ||
import { ElementRef } from '@angular/core'; | ||
import { EmbeddedViewRef } from '@angular/core'; | ||
import { FocusMonitor } from '@angular/cdk/a11y'; | ||
import { FocusOrigin } from '@angular/cdk/a11y'; | ||
import { FocusTrapFactory } from '@angular/cdk/a11y'; | ||
import * as i0 from '@angular/core'; | ||
import * as i2 from '@angular/cdk/overlay'; | ||
import * as i3 from '@angular/cdk/portal'; | ||
import * as i4 from '@angular/cdk/a11y'; | ||
import { InjectionToken } from '@angular/core'; | ||
import { Injector } from '@angular/core'; | ||
import { InteractivityChecker } from '@angular/cdk/a11y'; | ||
import { NgZone } from '@angular/core'; | ||
import { Observable } from 'rxjs'; | ||
import { OnDestroy } from '@angular/core'; | ||
import { Overlay } from '@angular/cdk/overlay'; | ||
import { OverlayContainer } from '@angular/cdk/overlay'; | ||
import { OverlayRef } from '@angular/cdk/overlay'; | ||
import { PositionStrategy } from '@angular/cdk/overlay'; | ||
import { ScrollStrategy } from '@angular/cdk/overlay'; | ||
import { StaticProvider } from '@angular/core'; | ||
import { Subject } from 'rxjs'; | ||
import { TemplatePortal } from '@angular/cdk/portal'; | ||
import { TemplateRef } from '@angular/core'; | ||
import { Type } from '@angular/core'; | ||
import { ViewContainerRef } from '@angular/core'; | ||
|
||
// @public | ||
export type AutoFocusTarget = 'dialog' | 'first-tabbable' | 'first-heading'; | ||
|
||
// @public | ||
export class CdkDialogContainer<C extends DialogConfig = DialogConfig> extends BasePortalOutlet implements AfterViewInit, OnDestroy { | ||
constructor(_elementRef: ElementRef, _focusTrapFactory: FocusTrapFactory, _document: any, _config: C, _interactivityChecker: InteractivityChecker, _ngZone: NgZone, _overlayRef: OverlayRef, _focusMonitor?: FocusMonitor | undefined); | ||
_ariaLabelledBy: string | null; | ||
attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>; | ||
// @deprecated | ||
attachDomPortal: (portal: DomPortal) => void; | ||
attachTemplatePortal<T>(portal: TemplatePortal<T>): EmbeddedViewRef<T>; | ||
protected _captureInitialFocus(): void; | ||
_closeInteractionType: FocusOrigin | null; | ||
// (undocumented) | ||
readonly _config: C; | ||
// (undocumented) | ||
protected _document: Document; | ||
// (undocumented) | ||
protected _elementRef: ElementRef; | ||
// (undocumented) | ||
protected _focusTrapFactory: FocusTrapFactory; | ||
// (undocumented) | ||
ngAfterViewInit(): void; | ||
// (undocumented) | ||
ngOnDestroy(): void; | ||
_portalOutlet: CdkPortalOutlet; | ||
protected _trapFocus(): void; | ||
// (undocumented) | ||
static ɵcmp: i0.ɵɵComponentDeclaration<CdkDialogContainer<any>, "cdk-dialog-container", never, {}, {}, never, never>; | ||
// (undocumented) | ||
static ɵfac: i0.ɵɵFactoryDeclaration<CdkDialogContainer<any>, [null, null, { optional: true; }, null, null, null, null, null]>; | ||
} | ||
|
||
// @public | ||
export const DEFAULT_DIALOG_CONFIG: InjectionToken<DialogConfig<unknown, unknown, BasePortalOutlet>>; | ||
|
||
// @public (undocumented) | ||
export class Dialog implements OnDestroy { | ||
constructor(_overlay: Overlay, _injector: Injector, _defaultOptions: DialogConfig, _parentDialog: Dialog, _overlayContainer: OverlayContainer, scrollStrategy: any); | ||
readonly afterAllClosed: Observable<void>; | ||
get afterOpened(): Subject<DialogRef<any, any>>; | ||
closeAll(): void; | ||
getDialogById<R, C>(id: string): DialogRef<R, C> | undefined; | ||
// (undocumented) | ||
ngOnDestroy(): void; | ||
open<R = unknown, D = unknown, C = unknown>(component: ComponentType<C>, config?: DialogConfig<D, DialogRef<R, C>>): DialogRef<R, C>; | ||
open<R = unknown, D = unknown, C = unknown>(template: TemplateRef<C>, config?: DialogConfig<D, DialogRef<R, C>>): DialogRef<R, C>; | ||
// (undocumented) | ||
open<R = unknown, D = unknown, C = unknown>(componentOrTemplateRef: ComponentType<C> | TemplateRef<C>, config?: DialogConfig<D, DialogRef<R, C>>): DialogRef<R, C>; | ||
get openDialogs(): DialogRef<any, any>[]; | ||
// (undocumented) | ||
static ɵfac: i0.ɵɵFactoryDeclaration<Dialog, [null, null, { optional: true; }, { optional: true; skipSelf: true; }, null, null]>; | ||
// (undocumented) | ||
static ɵprov: i0.ɵɵInjectableDeclaration<Dialog>; | ||
} | ||
|
||
// @public | ||
export const DIALOG_DATA: InjectionToken<any>; | ||
|
||
// @public | ||
export const DIALOG_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>; | ||
|
||
// @public | ||
export const DIALOG_SCROLL_STRATEGY_PROVIDER: { | ||
provide: InjectionToken<() => ScrollStrategy>; | ||
deps: (typeof Overlay)[]; | ||
useFactory: typeof DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY; | ||
}; | ||
|
||
// @public | ||
export function DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay: Overlay): () => ScrollStrategy; | ||
|
||
// @public | ||
export interface DialogCloseOptions { | ||
focusOrigin?: FocusOrigin; | ||
} | ||
|
||
// @public | ||
export class DialogConfig<D = unknown, R = unknown, C extends BasePortalOutlet = BasePortalOutlet> { | ||
ariaDescribedBy?: string | null; | ||
ariaLabel?: string | null; | ||
ariaLabelledBy?: string | null; | ||
ariaModal?: boolean; | ||
autoFocus?: AutoFocusTarget | string | boolean; | ||
backdropClass?: string | string[]; | ||
closeOnNavigation?: boolean; | ||
componentFactoryResolver?: ComponentFactoryResolver; | ||
container?: Type<C> | { | ||
type: Type<C>; | ||
providers: (config: DialogConfig<D, R, C>) => StaticProvider[]; | ||
}; | ||
data?: D | null; | ||
direction?: Direction; | ||
disableClose?: boolean; | ||
hasBackdrop?: boolean; | ||
height?: string; | ||
id?: string; | ||
injector?: Injector; | ||
maxHeight?: number | string; | ||
maxWidth?: number | string; | ||
minHeight?: number | string; | ||
minWidth?: number | string; | ||
panelClass?: string | string[]; | ||
positionStrategy?: PositionStrategy; | ||
providers?: StaticProvider[] | ((dialogRef: R, config: DialogConfig<D, R, C>, container: C) => StaticProvider[]); | ||
restoreFocus?: boolean; | ||
role?: DialogRole; | ||
scrollStrategy?: ScrollStrategy; | ||
templateContext?: Record<string, any> | (() => Record<string, any>); | ||
viewContainerRef?: ViewContainerRef; | ||
width?: string; | ||
} | ||
|
||
// @public (undocumented) | ||
export class DialogModule { | ||
// (undocumented) | ||
static ɵfac: i0.ɵɵFactoryDeclaration<DialogModule, never>; | ||
// (undocumented) | ||
static ɵinj: i0.ɵɵInjectorDeclaration<DialogModule>; | ||
// (undocumented) | ||
static ɵmod: i0.ɵɵNgModuleDeclaration<DialogModule, [typeof i1.CdkDialogContainer], [typeof i2.OverlayModule, typeof i3.PortalModule, typeof i4.A11yModule], [typeof i3.PortalModule, typeof i1.CdkDialogContainer]>; | ||
} | ||
|
||
// @public | ||
export class DialogRef<R = unknown, C = unknown> { | ||
constructor(overlayRef: OverlayRef, config: DialogConfig<any, DialogRef<R, C>, BasePortalOutlet>); | ||
addPanelClass(classes: string | string[]): this; | ||
readonly backdropClick: Observable<MouseEvent>; | ||
close(result?: R, options?: DialogCloseOptions): void; | ||
readonly closed: Observable<R | undefined>; | ||
componentInstance: C | null; | ||
// (undocumented) | ||
readonly config: DialogConfig<any, DialogRef<R, C>, BasePortalOutlet>; | ||
containerInstance: BasePortalOutlet & { | ||
_closeInteractionType?: FocusOrigin; | ||
}; | ||
disableClose: boolean | undefined; | ||
readonly id: string; | ||
readonly keydownEvents: Observable<KeyboardEvent>; | ||
readonly outsidePointerEvents: Observable<MouseEvent>; | ||
// (undocumented) | ||
readonly overlayRef: OverlayRef; | ||
removePanelClass(classes: string | string[]): this; | ||
updatePosition(): this; | ||
updateSize(width?: string, height?: string): this; | ||
} | ||
|
||
// @public | ||
export type DialogRole = 'dialog' | 'alertdialog'; | ||
|
||
// @public (undocumented) | ||
export function throwDialogContentAlreadyAttachedError(): void; | ||
|
||
// (No @packageDocumentation comment for this package) | ||
|
||
``` |