UNPKG

@covalent/core

Version:

Core Teradata UI Platform for layouts, icons, custom components and themes. This should be added as a dependency for any project that wants to use layouts, icons and themes for Angular Material.

1 lines 75.7 kB
{"version":3,"file":"covalent-core-dialogs.mjs","sources":["../../../../libs/angular/dialogs/src/dialog.component.html","../../../../libs/angular/dialogs/src/dialog.component.ts","../../../../libs/angular/dialogs/src/alert-dialog/alert-dialog.component.html","../../../../libs/angular/dialogs/src/alert-dialog/alert-dialog.component.ts","../../../../libs/angular/dialogs/src/confirm-dialog/confirm-dialog.component.html","../../../../libs/angular/dialogs/src/confirm-dialog/confirm-dialog.component.ts","../../../../libs/angular/dialogs/src/prompt-dialog/prompt-dialog.component.html","../../../../libs/angular/dialogs/src/prompt-dialog/prompt-dialog.component.ts","../../../../libs/angular/dialogs/src/status-dialog/status-dialog.component.html","../../../../libs/angular/dialogs/src/status-dialog/status-dialog.component.ts","../../../../libs/angular/dialogs/src/services/dialog.service.ts","../../../../libs/angular/dialogs/src/window-dialog/window-dialog.component.ts","../../../../libs/angular/dialogs/src/window-dialog/window-dialog.component.html","../../../../libs/angular/dialogs/src/dialogs.module.ts","../../../../libs/angular/dialogs/src/resizable-draggable-dialog/resizable-draggable-dialog.ts","../../../../libs/angular/dialogs/src/covalent-core-dialogs.ts"],"sourcesContent":["<div class=\"td-dialog-wrapper\">\n <ng-content\n *ngIf=\"dialogStatus.length > 0\"\n select=\"[tdDialogStatus]\"\n ></ng-content>\n <section class=\"td-dialog\">\n <div mat-dialog-title *ngIf=\"dialogTitle.length > 0\">\n <ng-content select=\"[tdDialogTitle]\"></ng-content>\n </div>\n <mat-dialog-content\n class=\"td-dialog-content\"\n *ngIf=\"dialogContent.length > 0\"\n >\n <ng-content select=\"[tdDialogContent]\"></ng-content>\n </mat-dialog-content>\n <mat-dialog-actions\n class=\"td-dialog-actions\"\n *ngIf=\"dialogActions.length > 0\"\n >\n <span class=\"td-dialog-spacer\"></span>\n <ng-content select=\"[tdDialogActions]\"></ng-content>\n </mat-dialog-actions>\n </section>\n</div>\n","import { CommonModule } from '@angular/common';\nimport {\n Component,\n Directive,\n ContentChildren,\n QueryList,\n AfterContentInit,\n} from '@angular/core';\nimport { MatDialogModule } from '@angular/material/dialog';\n\n@Directive({ selector: '[tdDialogTitle]' })\nexport class TdDialogTitleDirective {}\n\n@Directive({ selector: '[tdDialogContent]' })\nexport class TdDialogContentDirective {}\n\n@Directive({ selector: '[tdDialogActions]' })\nexport class TdDialogActionsDirective {}\n\n@Directive({ selector: '[tdDialogStatus]' })\nexport class TdDialogStatusDirective {}\n\n@Component({\n selector: 'td-dialog',\n templateUrl: './dialog.component.html',\n styleUrls: ['./dialog.component.scss'],\n imports: [CommonModule, MatDialogModule],\n})\nexport class TdDialogComponent implements AfterContentInit {\n @ContentChildren(TdDialogTitleDirective, { descendants: true })\n dialogTitle!: QueryList<TdDialogTitleDirective>;\n @ContentChildren(TdDialogContentDirective, { descendants: true })\n dialogContent!: QueryList<TdDialogContentDirective>;\n @ContentChildren(TdDialogActionsDirective, { descendants: true })\n dialogActions!: QueryList<TdDialogActionsDirective>;\n @ContentChildren(TdDialogStatusDirective, { descendants: true })\n dialogStatus!: QueryList<TdDialogStatusDirective>;\n\n ngAfterContentInit(): void {\n if (this.dialogTitle.length > 1) {\n throw new Error('Duplicate td-dialog-title component at in td-dialog.');\n }\n if (this.dialogContent.length > 1) {\n throw new Error('Duplicate td-dialog-content component at in td-dialog.');\n }\n if (this.dialogActions.length > 1) {\n throw new Error('Duplicate td-dialog-actions component at in td-dialog.');\n }\n if (this.dialogStatus.length > 1) {\n throw new Error('Duplicate td-dialog-status component at in td-dialog.');\n }\n }\n}\n","<td-dialog>\n <ng-container tdDialogTitle *ngIf=\"title\">{{ title }}</ng-container>\n <ng-container tdDialogContent>\n <span class=\"td-dialog-message\">{{ message }}</span>\n </ng-container>\n <ng-container tdDialogActions>\n <button mat-button color=\"accent\" (click)=\"close()\">\n {{ closeButton }}\n </button>\n </ng-container>\n</td-dialog>\n","import { Component } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogRef } from '@angular/material/dialog';\nimport { TdDialogActionsDirective, TdDialogComponent, TdDialogContentDirective, TdDialogTitleDirective } from '../dialog.component';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'td-alert-dialog',\n templateUrl: './alert-dialog.component.html',\n styleUrls: ['./alert-dialog.component.scss'],\n imports: [CommonModule, MatButtonModule, TdDialogComponent, TdDialogTitleDirective, TdDialogContentDirective, TdDialogActionsDirective],\n})\nexport class TdAlertDialogComponent {\n title?: string;\n message?: string;\n closeButton?: string = 'CLOSE';\n\n constructor(private _dialogRef: MatDialogRef<TdAlertDialogComponent>) {}\n\n close(): void {\n this._dialogRef.close();\n }\n}\n","<td-dialog>\n <ng-container tdDialogTitle *ngIf=\"title\">{{ title }}</ng-container>\n <ng-container tdDialogContent>\n <span class=\"td-dialog-message\">{{ message }}</span>\n </ng-container>\n <ng-container tdDialogActions>\n <button\n mat-button\n #closeBtn\n (keydown.arrowright)=\"acceptBtn.focus()\"\n (click)=\"cancel()\"\n >\n {{ cancelButton }}\n </button>\n <button\n mat-button\n [color]=\"isDestructive ? 'warn' : 'accent'\"\n #acceptBtn\n (keydown.arrowleft)=\"closeBtn.focus()\"\n (click)=\"accept()\"\n >\n {{ acceptButton }}\n </button>\n </ng-container>\n</td-dialog>\n","import { Component } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\nimport { TdDialogActionsDirective, TdDialogComponent, TdDialogContentDirective, TdDialogTitleDirective } from '../dialog.component';\nimport { MatButtonModule } from '@angular/material/button';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'td-confirm-dialog',\n templateUrl: './confirm-dialog.component.html',\n styleUrls: ['./confirm-dialog.component.scss'],\n imports: [CommonModule, TdDialogComponent, TdDialogTitleDirective, TdDialogContentDirective, TdDialogActionsDirective, MatButtonModule],\n})\nexport class TdConfirmDialogComponent {\n title?: string;\n message?: string;\n cancelButton = 'CANCEL';\n acceptButton = 'ACCEPT';\n isDestructive = false;\n\n constructor(private _dialogRef: MatDialogRef<TdConfirmDialogComponent>) {}\n\n cancel(): void {\n this._dialogRef.close(false);\n }\n\n accept(): void {\n this._dialogRef.close(true);\n }\n}\n","<td-dialog>\n <ng-container tdDialogTitle *ngIf=\"title\">{{ title }}</ng-container>\n <ng-container tdDialogContent>\n <span class=\"td-dialog-message\">{{ message }}</span>\n <form #form=\"ngForm\" novalidate>\n <div class=\"td-dialog-input-wrapper\">\n <mat-form-field class=\"td-dialog-input\">\n <input\n matInput\n #input\n (keydown.enter)=\"$event.preventDefault(); form.valid && accept()\"\n [(ngModel)]=\"value\"\n name=\"value\"\n required\n />\n </mat-form-field>\n </div>\n </form>\n </ng-container>\n <ng-container tdDialogActions>\n <button mat-button #closeBtn (click)=\"cancel()\">{{ cancelButton }}</button>\n <button\n mat-button\n color=\"accent\"\n #acceptBtn\n [disabled]=\"!form.valid\"\n (click)=\"accept()\"\n >\n {{ acceptButton }}\n </button>\n </ng-container>\n</td-dialog>\n","import {\n Component,\n ViewChild,\n ElementRef,\n AfterViewInit,\n NgZone,\n OnDestroy,\n} from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\nimport { LEFT_ARROW, RIGHT_ARROW } from '@angular/cdk/keycodes';\nimport { fromEvent, Subject, takeUntil } from 'rxjs';\nimport { FormsModule } from '@angular/forms';\nimport { MatFormField } from '@angular/material/form-field';\nimport { TdDialogActionsDirective, TdDialogComponent, TdDialogContentDirective, TdDialogTitleDirective } from '../dialog.component';\nimport { CommonModule } from '@angular/common';\nimport { MatInput } from '@angular/material/input';\nimport { MatButton } from '@angular/material/button';\n\n@Component({\n selector: 'td-prompt-dialog',\n templateUrl: './prompt-dialog.component.html',\n styleUrls: ['./prompt-dialog.component.scss'],\n imports: [CommonModule, FormsModule, MatFormField, MatInput, MatButton, TdDialogComponent, TdDialogTitleDirective, TdDialogContentDirective, TdDialogActionsDirective],\n})\nexport class TdPromptDialogComponent implements AfterViewInit, OnDestroy {\n title?: string;\n message?: string;\n value?: string;\n cancelButton = 'CANCEL';\n acceptButton = 'ACCEPT';\n\n /** The native `<input matInput />` element. */\n @ViewChild('input', { static: true }) _input!: ElementRef<HTMLInputElement>;\n\n @ViewChild('closeBtn', { static: true, read: ElementRef })\n _closeBtn!: ElementRef<HTMLButtonElement>;\n\n @ViewChild('acceptBtn', { static: true, read: ElementRef })\n _acceptBtn!: ElementRef<HTMLButtonElement>;\n\n private _destroy$ = new Subject<void>();\n\n constructor(\n private _ngZone: NgZone,\n private _dialogRef: MatDialogRef<TdPromptDialogComponent>\n ) {}\n\n ngAfterViewInit(): void {\n this._ngZone.runOutsideAngular(() => {\n // Note: `element.focus()` causes re-layout and this may lead to frame drop on slower devices.\n // `Promise` is a microtask and microtask are executed within the current rendering frame.\n // Animation tasks are executed within the next rendering frame.\n // We focus input once everything is rendered and good to go.\n requestAnimationFrame(() => this._input.nativeElement.focus());\n\n fromEvent(this._input.nativeElement, 'focus')\n .pipe(takeUntil(this._destroy$))\n .subscribe(() => {\n // This is executed when the input is focused, selects all text.\n this._input.nativeElement.select();\n });\n\n fromEvent<KeyboardEvent>(this._closeBtn.nativeElement, 'keydown')\n .pipe(takeUntil(this._destroy$))\n .subscribe((event) => {\n if (event.keyCode === RIGHT_ARROW) {\n this._acceptBtn.nativeElement.focus();\n }\n });\n\n fromEvent<KeyboardEvent>(this._acceptBtn.nativeElement, 'keydown')\n .pipe(takeUntil(this._destroy$))\n .subscribe((event) => {\n if (event.keyCode === LEFT_ARROW) {\n this._closeBtn.nativeElement.focus();\n }\n });\n });\n }\n\n ngOnDestroy(): void {\n this._destroy$.next();\n }\n\n cancel(): void {\n this._dialogRef.close();\n }\n\n accept(): void {\n this._dialogRef.close(this.value);\n }\n}\n","<td-dialog class=\"td-status-dialog\">\n <!-- Displays the icon and background color according to the state -->\n <div tdDialogStatus class=\"td-status-dialog-state\" [ngClass]=\"state\">\n <mat-icon>\n {{ getStatusIcon() }}\n </mat-icon>\n </div>\n <!-- Dialog title and the close icon -->\n <ng-container tdDialogTitle>\n <div class=\"td-status-dialog-title\">\n <span *ngIf=\"title\" class=\"\">{{ title }}</span>\n <button\n mat-icon-button\n class=\"td-status-dialog__icon-button\"\n (click)=\"close()\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </div>\n </ng-container>\n <!-- Dialog content with additonal information -->\n <ng-container tdDialogContent>\n <span class=\"td-dialog-message\">\n {{ message }}\n <div\n class=\"td-status-dialog__toggle-details\"\n role=\"button\"\n tabindex=\"0\"\n *ngIf=\"details\"\n (click)=\"toggleDetails()\"\n (keydown.enter)=\"toggleDetails()\"\n >\n {{\n showDetails\n ? detailsLabels?.hideDetailsLabel\n : detailsLabels?.showDetailsLabel\n }}\n <mat-icon\n [ngClass]=\"{\n 'td-status-dialog__arrow-icon': true,\n close: !showDetails,\n open: showDetails\n }\"\n >arrow_drop_down</mat-icon\n >\n </div>\n <div *ngIf=\"showDetails\">{{ details }}</div>\n </span>\n </ng-container>\n <ng-container tdDialogActions>\n <button\n mat-raised-button\n color=\"primary\"\n class=\"td-status-dialog___button\"\n (click)=\"close()\"\n >\n {{ closeButton }}\n </button>\n </ng-container>\n</td-dialog>\n","import { Component } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\nimport { MatIcon } from '@angular/material/icon';\nimport { TdDialogActionsDirective, TdDialogComponent, TdDialogContentDirective, TdDialogStatusDirective, TdDialogTitleDirective } from '../dialog.component';\nimport { CommonModule } from '@angular/common';\nimport { MatButton, MatIconButton } from '@angular/material/button';\n\nexport type TdStatusDialogStates = 'error' | 'positive' | 'warning';\n\nexport type TdStatusDialogDetailsLabels = {\n showDetailsLabel: string;\n hideDetailsLabel: string;\n};\n\n@Component({\n selector: 'td-status-dialog',\n templateUrl: './status-dialog.component.html',\n styleUrls: ['./status-dialog.component.scss'],\n imports: [CommonModule, MatIcon, MatIconButton, MatButton, TdDialogComponent, TdDialogTitleDirective, TdDialogContentDirective, TdDialogActionsDirective, TdDialogStatusDirective],\n})\nexport class TdStatusDialogComponent {\n // Label of the close button in the footer\n closeButton?: string = 'CLOSE';\n // Message to be displayed in the dialog\n message?: string;\n // State of the status dialog\n state?: TdStatusDialogStates = 'error';\n // Title of the status dialog\n title?: string;\n // Additional details to be displayed after the dialog message\n details?: string;\n // Toggles the additional details section\n showDetails? = false;\n // Labels for the toggle details link\n detailsLabels?: TdStatusDialogDetailsLabels = {\n showDetailsLabel: 'Show details',\n hideDetailsLabel: 'Hide details',\n };\n\n constructor(private _dialogRef: MatDialogRef<TdStatusDialogComponent>) {}\n\n close(): void {\n this._dialogRef.close();\n }\n\n getStatusIcon(): string {\n switch (this.state) {\n case 'positive':\n return 'check';\n case 'error':\n case 'warning':\n return this.state;\n default:\n return 'error';\n }\n }\n\n toggleDetails(): void {\n this.showDetails = !this.showDetails;\n }\n}\n","import { Injectable, Inject, Renderer2, RendererFactory2 } from '@angular/core';\nimport {\n MatDialog,\n MatDialogRef,\n MatDialogConfig,\n} from '@angular/material/dialog';\nimport { ComponentType } from '@angular/cdk/portal';\n\nimport { TdAlertDialogComponent } from '../alert-dialog/alert-dialog.component';\nimport { TdConfirmDialogComponent } from '../confirm-dialog/confirm-dialog.component';\nimport { TdPromptDialogComponent } from '../prompt-dialog/prompt-dialog.component';\nimport { DragDrop, DragRef } from '@angular/cdk/drag-drop';\nimport { DOCUMENT } from '@angular/common';\nimport { Subject } from 'rxjs';\nimport {\n TdStatusDialogStates,\n TdStatusDialogComponent,\n TdStatusDialogDetailsLabels,\n} from '../status-dialog/status-dialog.component';\n\nexport interface IDialogConfig extends MatDialogConfig {\n title?: string;\n message: string;\n}\n\nexport interface IAlertConfig extends IDialogConfig {\n closeButton?: string;\n}\n\nexport interface IConfirmConfig extends IDialogConfig {\n acceptButton?: string;\n cancelButton?: string;\n isDestructive?: boolean;\n}\n\nexport interface IPromptConfig extends IConfirmConfig {\n value?: string;\n}\n\nexport interface IStatusConfig extends IAlertConfig {\n state?: TdStatusDialogStates;\n details?: string;\n detailsLabels?: TdStatusDialogDetailsLabels;\n}\n\nexport interface IDraggableConfig<T> {\n component: ComponentType<T>;\n config?: MatDialogConfig;\n // CSS selectors of element(s) inside the component meant to be drag handle(s)\n dragHandleSelectors?: string[];\n // Class that will be added to the component signifying drag-ability\n draggableClass?: string;\n}\n\nexport interface IDraggableRefs<T> {\n matDialogRef: MatDialogRef<T>;\n dragRefSubject: Subject<DragRef>;\n}\n\n@Injectable()\nexport class TdDialogService {\n private _renderer2: Renderer2;\n\n constructor(\n @Inject(DOCUMENT) private _document: any,\n private _dialogService: MatDialog,\n private _dragDrop: DragDrop,\n private rendererFactory: RendererFactory2\n ) {\n this._renderer2 = rendererFactory.createRenderer(undefined, null);\n }\n\n /**\n * params:\n * - component: ComponentType<T>\n * - config: MatDialogConfig\n * Wrapper function over the open() method in MatDialog.\n * Opens a modal dialog containing the given component.\n */\n public open<T>(\n component: ComponentType<T>,\n config?: MatDialogConfig\n ): MatDialogRef<T> {\n return this._dialogService.open(component, config);\n }\n\n /**\n * Wrapper function over the closeAll() method in MatDialog.\n * Closes all of the currently-open dialogs.\n */\n public closeAll(): void {\n this._dialogService.closeAll();\n }\n\n /**\n * params:\n * - config: IAlertConfig {\n * message: string;\n * title?: string;\n * viewContainerRef?: ViewContainerRef;\n * closeButton?: string;\n * }\n *\n * Opens an alert dialog with the provided config.\n * Returns an MatDialogRef<TdAlertDialogComponent> object.\n */\n public openAlert(config: IAlertConfig): MatDialogRef<TdAlertDialogComponent> {\n const dialogConfig: MatDialogConfig = this._createConfig(config);\n const dialogRef: MatDialogRef<TdAlertDialogComponent> =\n this._dialogService.open(TdAlertDialogComponent, dialogConfig);\n const alertDialogComponent: TdAlertDialogComponent =\n dialogRef.componentInstance;\n alertDialogComponent.title = config.title;\n alertDialogComponent.message = config.message;\n if (config.closeButton) {\n alertDialogComponent.closeButton = config.closeButton;\n }\n return dialogRef;\n }\n\n /**\n * params:\n * - config: IConfirmConfig {\n * message: string;\n * title?: string;\n * viewContainerRef?: ViewContainerRef;\n * acceptButton?: string;\n * cancelButton?: string;\n * isDestructive?: boolean;\n * }\n *\n * Opens a confirm dialog with the provided config.\n * Returns an MatDialogRef<TdConfirmDialogComponent> object.\n */\n public openConfirm(\n config: IConfirmConfig\n ): MatDialogRef<TdConfirmDialogComponent> {\n const dialogConfig: MatDialogConfig = this._createConfig(config);\n const dialogRef: MatDialogRef<TdConfirmDialogComponent> =\n this._dialogService.open(TdConfirmDialogComponent, dialogConfig);\n const confirmDialogComponent: TdConfirmDialogComponent =\n dialogRef.componentInstance;\n confirmDialogComponent.title = config.title;\n confirmDialogComponent.message = config.message;\n if (config.acceptButton) {\n confirmDialogComponent.acceptButton = config.acceptButton;\n }\n if (config.isDestructive) {\n confirmDialogComponent.isDestructive = config.isDestructive;\n }\n if (config.cancelButton) {\n confirmDialogComponent.cancelButton = config.cancelButton;\n }\n return dialogRef;\n }\n\n /**\n * params:\n * - config: IPromptConfig {\n * message: string;\n * title?: string;\n * value?: string;\n * viewContainerRef?: ViewContainerRef;\n * acceptButton?: string;\n * cancelButton?: string;\n * }\n *\n * Opens a prompt dialog with the provided config.\n * Returns an MatDialogRef<TdPromptDialogComponent> object.\n */\n public openPrompt(\n config: IPromptConfig\n ): MatDialogRef<TdPromptDialogComponent> {\n const dialogConfig: MatDialogConfig = this._createConfig(config);\n const dialogRef: MatDialogRef<TdPromptDialogComponent> =\n this._dialogService.open(TdPromptDialogComponent, dialogConfig);\n const promptDialogComponent: TdPromptDialogComponent =\n dialogRef.componentInstance;\n promptDialogComponent.title = config.title;\n promptDialogComponent.message = config.message;\n promptDialogComponent.value = config.value;\n if (config.acceptButton) {\n promptDialogComponent.acceptButton = config.acceptButton;\n }\n if (config.cancelButton) {\n promptDialogComponent.cancelButton = config.cancelButton;\n }\n return dialogRef;\n }\n\n /**\n * Opens a draggable dialog containing the given component.\n */\n public openDraggable<T>({\n component,\n config,\n dragHandleSelectors,\n draggableClass,\n }: IDraggableConfig<T>): IDraggableRefs<T> {\n const matDialogRef: MatDialogRef<T, any> = this._dialogService.open(\n component,\n config\n );\n const dragRefSubject: Subject<DragRef> = new Subject<DragRef>();\n\n const CDK_OVERLAY_PANE_SELECTOR = '.cdk-overlay-pane';\n const CDK_OVERLAY_CONTAINER_SELECTOR = '.cdk-overlay-container';\n\n matDialogRef.afterOpened().subscribe(() => {\n const dialogElement: HTMLElement = <HTMLElement>(\n this._document.getElementById(matDialogRef.id)\n );\n\n if (!dialogElement) {\n return;\n }\n\n const draggableElement: DragRef =\n this._dragDrop.createDrag(dialogElement);\n\n if (draggableClass) {\n const childComponent = dialogElement.firstElementChild;\n this._renderer2.addClass(childComponent, draggableClass);\n }\n if (dragHandleSelectors && dragHandleSelectors.length) {\n const dragHandles: Element[] = dragHandleSelectors.reduce(\n (acc: Element[], curr: string) => [\n ...acc,\n ...Array.from(dialogElement.querySelectorAll(curr)),\n ],\n []\n );\n if (dragHandles.length > 0) {\n draggableElement.withHandles(<HTMLElement[]>dragHandles);\n }\n }\n const rootElement = dialogElement.closest(CDK_OVERLAY_PANE_SELECTOR);\n if (rootElement) {\n draggableElement.withRootElement(<HTMLElement>rootElement);\n }\n\n const boundaryElement = dialogElement.closest(\n CDK_OVERLAY_CONTAINER_SELECTOR\n );\n if (boundaryElement) {\n draggableElement.withBoundaryElement(<HTMLElement>boundaryElement);\n }\n dragRefSubject.next(draggableElement);\n });\n\n return { matDialogRef, dragRefSubject };\n }\n\n private _createConfig(config: IDialogConfig): MatDialogConfig {\n const dialogConfig: MatDialogConfig = new MatDialogConfig();\n dialogConfig.width = '400px';\n Object.assign(dialogConfig, config);\n return dialogConfig;\n }\n\n /**\n * params:\n * - config: IStatusConfig {\n * closeButton?: string;\n * details?: string;\n * detailsLabels?: TdStatusDialogDetailsLabels;\n * message: string;\n * state?: 'error' | 'positive' | 'warning'\n * title?: string;\n * viewContainerRef?: ViewContainerRef;\n * }\n *\n * Opens a status dialog with the provided config.\n * Returns an MatDialogRef<TdStatusDialogComponent> object.\n */\n public openStatus(\n config: IStatusConfig\n ): MatDialogRef<TdStatusDialogComponent> {\n config.panelClass = 'td-status-dialog';\n config.autoFocus = false;\n config.width = '575px';\n config.maxWidth = '96vw';\n const dialogConfig: MatDialogConfig = this._createConfig(config);\n const dialogRef: MatDialogRef<TdStatusDialogComponent> =\n this._dialogService.open(TdStatusDialogComponent, dialogConfig);\n const statusDialogComponent: TdStatusDialogComponent =\n dialogRef.componentInstance;\n statusDialogComponent.title = config.title;\n statusDialogComponent.message = config.message;\n statusDialogComponent.state = config.state;\n statusDialogComponent.details = config.details;\n if (config.detailsLabels) {\n statusDialogComponent.detailsLabels = config.detailsLabels;\n }\n if (config.closeButton) {\n statusDialogComponent.closeButton = config.closeButton;\n }\n return dialogRef;\n }\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n} from '@angular/core';\nimport { MatIconButton } from '@angular/material/button';\nimport { ThemePalette } from '@angular/material/core';\nimport { MatIcon } from '@angular/material/icon';\nimport { MatToolbar, MatToolbarRow } from '@angular/material/toolbar';\nimport { MatTooltip } from '@angular/material/tooltip';\n\n@Component({\n selector: 'td-window-dialog',\n templateUrl: './window-dialog.component.html',\n styleUrls: ['./window-dialog.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [MatIcon, MatIconButton, MatToolbar, MatToolbarRow, MatTooltip],\n})\nexport class TdWindowDialogComponent {\n @Input() toolbarColor?: ThemePalette;\n @Input() docked? = false;\n\n @Input() title?: string;\n @Input() toggleDockedStateLabel?: string;\n @Input() closeLabel?: string;\n\n @Output() dockToggled: EventEmitter<boolean> = new EventEmitter();\n @Output() closed: EventEmitter<void> = new EventEmitter();\n\n toolbarHeight = 56;\n\n toggleDockedState(): void {\n this.dockToggled.emit(this.docked);\n }\n}\n","<mat-toolbar\n [color]=\"toolbarColor\"\n class=\"td-window-dialog-toolbar\"\n [style.min-height.px]=\"toolbarHeight\"\n [style.cursor]=\"docked ? 'inherit' : 'move'\"\n>\n <mat-toolbar-row [style.height.px]=\"toolbarHeight\">\n <div layout=\"row\" layout-align=\"start center\" flex>\n <span class=\"mat-title td-window-dialog-title truncate\" flex>\n {{ title }}\n </span>\n\n <button\n mat-icon-button\n [matTooltip]=\"toggleDockedStateLabel ?? ''\"\n (click)=\"toggleDockedState()\"\n >\n <mat-icon [attr.aria-label]=\"toggleDockedStateLabel\"\n >dock_to_right</mat-icon\n >\n </button>\n\n <button\n mat-icon-button\n [matTooltip]=\"closeLabel ?? ''\"\n (click)=\"closed.emit()\"\n class=\"td-window-dialog-close\"\n [attr.data-test]=\"'close-button'\"\n >\n <mat-icon [attr.aria-label]=\"closeLabel\">close</mat-icon>\n </button>\n </div>\n </mat-toolbar-row>\n</mat-toolbar>\n<ng-content></ng-content>\n","import { Type } from '@angular/core';\nimport { NgModule } from '@angular/core';\n\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatButtonModule } from '@angular/material/button';\n\nimport {\n TdDialogComponent,\n TdDialogTitleDirective,\n TdDialogActionsDirective,\n TdDialogContentDirective,\n TdDialogStatusDirective,\n} from './dialog.component';\nimport { TdAlertDialogComponent } from './alert-dialog/alert-dialog.component';\nimport { TdConfirmDialogComponent } from './confirm-dialog/confirm-dialog.component';\nimport { TdPromptDialogComponent } from './prompt-dialog/prompt-dialog.component';\nimport { TdStatusDialogComponent } from './status-dialog/status-dialog.component';\nimport { TdDialogService } from './services/dialog.service';\nimport { TdWindowDialogComponent } from './window-dialog/window-dialog.component';\n\nconst TD_DIALOGS: Type<any>[] = [\n TdAlertDialogComponent,\n TdConfirmDialogComponent,\n TdPromptDialogComponent,\n TdDialogComponent,\n TdDialogStatusDirective,\n TdDialogTitleDirective,\n TdDialogActionsDirective,\n TdDialogContentDirective,\n TdWindowDialogComponent,\n TdAlertDialogComponent,\n TdConfirmDialogComponent,\n TdPromptDialogComponent,\n TdStatusDialogComponent,\n];\n\n/**\n * @deprecated This module is deprecated and will be removed in future versions.\n * Please migrate to using standalone components as soon as possible.\n */\n@NgModule({\n imports: [...TD_DIALOGS],\n exports: [...TD_DIALOGS],\n providers: [TdDialogService],\n})\nexport class CovalentDialogsModule {}\n","import { Renderer2 } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\nimport { DragRef } from '@angular/cdk/drag-drop';\nimport { merge, Subscription, fromEvent } from 'rxjs';\nimport { Point } from '@angular/cdk/drag-drop';\n\nenum corners {\n topRight = 'topRight',\n bottomRight = 'bottomRight',\n bottomLeft = 'bottomLeft',\n topLeft = 'topLeft',\n}\nenum cursors {\n nesw = 'nesw-resize',\n nwse = 'nwse-resize',\n}\nenum verticalAlignment {\n top = 'top',\n bottom = 'bottom',\n}\nenum horizontalAlignment {\n right = 'right',\n left = 'left',\n}\n\nconst cornerWidth = '16px';\nconst offset = '0px';\nconst minWidth = 200;\nconst minHeight = 200;\n\nfunction getPixels(sizeString: string): number {\n return parseFloat((sizeString || '').replace('px', ''));\n}\n\nfunction clamp(min: number, num: number, max: number): number {\n return Math.min(Math.max(num, min), max);\n}\n\nexport class ResizableDraggableDialog {\n cornerElements: HTMLElement[] = [];\n pointerDownSubs: Subscription[] = [];\n\n constructor(\n private _document: any,\n private _renderer2: Renderer2,\n private _dialogRef: MatDialogRef<any>,\n private _dragRef: DragRef\n ) {\n this._initialPositionReset();\n this._attachCorners();\n }\n\n public attach(): void {\n this.detach();\n this._attachCorners();\n }\n\n public detach(): void {\n this.pointerDownSubs.forEach((sub: Subscription) => sub.unsubscribe());\n this.pointerDownSubs = [];\n this.cornerElements.forEach((elem: HTMLElement) =>\n this._renderer2.removeChild(this._getDialogWrapper(), elem)\n );\n this.cornerElements = [];\n }\n\n private _getDialogWrapper(): HTMLElement | null {\n return (\n <HTMLElement>this._document.getElementById(this._dialogRef.id) || {}\n ).parentElement;\n }\n\n private _getViewportDimensions(): ClientRect | undefined {\n return this._getDialogWrapper()?.parentElement?.getBoundingClientRect();\n }\n\n private _getDialogWrapperDimensions(): { width: number; height: number } {\n const wrapper = this._getDialogWrapper();\n if (!wrapper) {\n return { width: 0, height: 0 };\n }\n const dimensions: CSSStyleDeclaration = getComputedStyle(wrapper);\n return {\n width: getPixels(dimensions.width),\n height: getPixels(dimensions.height),\n };\n }\n\n private _initialPositionReset(): void {\n const viewportWidth = this._getViewportDimensions()?.right ?? 0;\n const viewportHeight = this._getViewportDimensions()?.bottom ?? 0;\n const { width, height } = this._getDialogWrapperDimensions();\n const wrapperStyle = this._getDialogWrapper()?.style;\n const originalDialogRight = wrapperStyle?.marginRight;\n const originalDialogLeft = wrapperStyle?.marginLeft;\n const originalDialogBottom = wrapperStyle?.marginBottom;\n const originalDialogTop = wrapperStyle?.marginTop;\n let x: number;\n if (originalDialogLeft) {\n x = getPixels(originalDialogLeft);\n } else if (originalDialogRight) {\n x = viewportWidth - getPixels(originalDialogRight) - width;\n } else {\n x = (viewportWidth - width) / 2;\n }\n let y: number;\n if (originalDialogTop) {\n y = getPixels(originalDialogTop);\n } else if (originalDialogBottom) {\n y = viewportHeight - getPixels(originalDialogBottom) - height;\n } else {\n y = (viewportHeight - height) / 2;\n }\n // use drag ref's mechanisms for positioning instead of the dialog's\n this._dialogRef.updatePosition({\n top: '0px',\n right: '0px',\n bottom: '0px',\n left: '0px',\n });\n this._dragRef.setFreeDragPosition({ x, y });\n }\n\n private _attachCorners(): void {\n Object.values(corners).forEach((corner: corners) => {\n const element: HTMLElement = this._renderer2.createElement('div');\n this.cornerElements = [...this.cornerElements, element];\n this._renderer2.setStyle(element, 'position', 'absolute');\n this._renderer2.setStyle(element, 'width', cornerWidth);\n this._renderer2.setStyle(element, 'height', cornerWidth);\n this._renderer2.setStyle(element, 'z-index', 1);\n this._renderer2.appendChild(this._getDialogWrapper(), element);\n\n let cursor: cursors;\n let topBottom: verticalAlignment;\n let rightLeft: horizontalAlignment;\n\n if (corner === corners.topRight) {\n cursor = cursors.nesw;\n topBottom = verticalAlignment.top;\n rightLeft = horizontalAlignment.right;\n } else if (corner === corners.bottomRight) {\n cursor = cursors.nwse;\n topBottom = verticalAlignment.bottom;\n rightLeft = horizontalAlignment.right;\n\n const icon: HTMLElement = this._renderer2.createElement('i');\n this._renderer2.addClass(icon, 'material-symbols-outlined');\n this._renderer2.appendChild(\n icon,\n this._renderer2.createText('filter_list')\n );\n this._renderer2.appendChild(element, icon);\n this._renderer2.setStyle(\n icon,\n 'transform',\n `rotate(${315}deg) translate(0px, ${offset})`\n );\n this._renderer2.setStyle(icon, 'font-size', cornerWidth);\n this._renderer2.setStyle(icon, 'z-index', 1);\n } else if (corner === corners.bottomLeft) {\n cursor = cursors.nesw;\n topBottom = verticalAlignment.bottom;\n rightLeft = horizontalAlignment.left;\n } else {\n cursor = cursors.nwse;\n topBottom = verticalAlignment.top;\n rightLeft = horizontalAlignment.left;\n }\n this._renderer2.setStyle(element, topBottom, offset);\n this._renderer2.setStyle(element, rightLeft, offset);\n this._renderer2.setStyle(element, 'cursor', cursor);\n\n const pointerDownSub: Subscription = fromEvent<PointerEvent>(\n element,\n 'pointerdown'\n ).subscribe((event: PointerEvent) => {\n this._handleMouseDown(event, corner);\n });\n this.pointerDownSubs = [...this.pointerDownSubs, pointerDownSub];\n });\n }\n\n private _handleMouseDown(event: PointerEvent, corner: corners): void {\n this._renderer2.setStyle(\n <HTMLElement>this._document.body,\n 'user-select',\n 'none'\n );\n const { width: originalWidth, height: originalHeight } =\n this._getDialogWrapperDimensions();\n const originalMouseX: number = event.pageX;\n const originalMouseY: number = event.pageY;\n const { x: currentTransformX, y: currentTransformY }: Point =\n this._dragRef.getFreeDragPosition();\n const wrapper = this._getDialogWrapper()?.getBoundingClientRect();\n const distanceFromBottom = wrapper?.bottom ?? 0;\n const distanceFromRight = wrapper?.right ?? 0;\n const viewportWidth = this._getViewportDimensions()?.right ?? 0;\n const viewportHeight = this._getViewportDimensions()?.bottom ?? 0;\n\n const mouseMoveSub: Subscription = fromEvent<PointerEvent>(\n window,\n 'pointermove'\n ).subscribe((e: PointerEvent) => {\n e.preventDefault(); // prevent highlighting of text when dragging\n\n const yDelta: number = clamp(0, e.pageY, viewportHeight) - originalMouseY;\n const xDelta: number = clamp(0, e.pageX, viewportWidth) - originalMouseX;\n let newHeight: number;\n let newWidth: number;\n let newTransformY = 0;\n let newTransformX = 0;\n\n // top right\n if (corner === corners.topRight) {\n newHeight = clamp(minHeight, originalHeight - yDelta, viewportHeight);\n newWidth = clamp(minWidth, originalWidth + xDelta, viewportWidth);\n newTransformY = clamp(\n 0,\n currentTransformY + yDelta,\n distanceFromBottom - newHeight\n );\n newTransformX = currentTransformX;\n }\n // bottom right\n else if (corner === corners.bottomRight) {\n newHeight = clamp(minHeight, originalHeight + yDelta, viewportHeight);\n newWidth = clamp(minWidth, originalWidth + xDelta, viewportWidth);\n newTransformY = currentTransformY;\n newTransformX = currentTransformX;\n }\n // bottom left\n else if (corner === corners.bottomLeft) {\n newHeight = clamp(minHeight, originalHeight + yDelta, viewportHeight);\n newWidth = clamp(minWidth, originalWidth - xDelta, viewportWidth);\n newTransformY = currentTransformY;\n newTransformX = clamp(\n 0,\n currentTransformX + xDelta,\n distanceFromRight - newWidth\n );\n }\n // top left\n else {\n newHeight = clamp(minHeight, originalHeight - yDelta, viewportHeight);\n newWidth = clamp(minWidth, originalWidth - xDelta, viewportWidth);\n\n newTransformX = clamp(\n 0,\n currentTransformX + xDelta,\n distanceFromRight - newWidth\n );\n newTransformY = clamp(\n 0,\n currentTransformY + yDelta,\n distanceFromBottom - newHeight\n );\n }\n this._dialogRef.updateSize(`${newWidth}px`, `${newHeight}px`);\n this._dragRef.setFreeDragPosition({\n x: newTransformX,\n y: newTransformY,\n });\n });\n\n const mouseUpSub: Subscription = merge(\n fromEvent(window, 'pointerup'),\n fromEvent(window, 'pointercancel')\n ).subscribe(() => {\n this._renderer2.removeStyle(\n <HTMLElement>this._document.body,\n 'user-select'\n );\n mouseMoveSub.unsubscribe();\n mou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