@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 • 66.8 kB
Source Map (JSON)
{"version":3,"file":"covalent-core-dialogs.mjs","sources":["../../../../libs/angular/dialogs/src/dialog.component.ts","../../../../libs/angular/dialogs/src/dialog.component.html","../../../../libs/angular/dialogs/src/alert-dialog/alert-dialog.component.ts","../../../../libs/angular/dialogs/src/alert-dialog/alert-dialog.component.html","../../../../libs/angular/dialogs/src/confirm-dialog/confirm-dialog.component.ts","../../../../libs/angular/dialogs/src/confirm-dialog/confirm-dialog.component.html","../../../../libs/angular/dialogs/src/prompt-dialog/prompt-dialog.component.ts","../../../../libs/angular/dialogs/src/prompt-dialog/prompt-dialog.component.html","../../../../libs/angular/dialogs/src/status-dialog/status-dialog.component.ts","../../../../libs/angular/dialogs/src/status-dialog/status-dialog.component.html","../../../../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":["import {\n Component,\n Directive,\n ContentChildren,\n QueryList,\n AfterContentInit,\n} from '@angular/core';\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})\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","<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 { Component } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\n\n@Component({\n selector: 'td-alert-dialog',\n templateUrl: './alert-dialog.component.html',\n styleUrls: ['./alert-dialog.component.scss'],\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 mat-button color=\"accent\" (click)=\"close()\">\n {{ closeButton }}\n </button>\n </ng-container>\n</td-dialog>\n","import { Component } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\n\n@Component({\n selector: 'td-confirm-dialog',\n templateUrl: './confirm-dialog.component.html',\n styleUrls: ['./confirm-dialog.component.scss'],\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 </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 {\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';\n\n@Component({\n selector: 'td-prompt-dialog',\n templateUrl: './prompt-dialog.component.html',\n styleUrls: ['./prompt-dialog.component.scss'],\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>\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 { Component } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\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})\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","<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 { 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 { ThemePalette } from '@angular/material/core';\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})\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';\nimport { MatToolbarModule } from '@angular/material/toolbar';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatIconModule } from '@angular/material/icon';\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@NgModule({\n imports: [\n FormsModule,\n CommonModule,\n MatDialogModule,\n MatInputModule,\n MatButtonModule,\n MatToolbarModule,\n MatTooltipModule,\n MatIconModule,\n ],\n declarations: [...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 mouseUpSub.unsubscribe();\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1","i2","i4.TdDialogComponent","i4.TdDialogTitleDirective","i4.TdDialogActionsDirective","i4.TdDialogContentDirective","i3","i6","i7.TdDialogComponent","i7.TdDialogTitleDirective","i7.TdDialogActionsDirective","i7.TdDialogContentDirective","i4","i5.TdDialogComponent","i5.TdDialogStatusDirective","i5.TdDialogTitleDirective","i5.TdDialogActionsDirective","i5.TdDialogContentDirective"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;MASa,sBAAsB,CAAA;uGAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;2FAAtB,sBAAsB,EAAA,QAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBADlC,SAAS;mBAAC,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAA;;MAI7B,wBAAwB,CAAA;uGAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;2FAAxB,wBAAwB,EAAA,QAAA,EAAA,mBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBADpC,SAAS;mBAAC,EAAE,QAAQ,EAAE,mBAAmB,EAAE,CAAA;;MAI/B,wBAAwB,CAAA;uGAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EA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