@testgorilla/tgo-ui 12.0.1 → 12.0.3

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.
@@ -1,9 +1,12 @@
1
+ import { hasModifierKey } from "@angular/cdk/keycodes";
1
2
  import { CdkScrollable } from "@angular/cdk/scrolling";
2
3
  import { AsyncPipe, CommonModule } from "@angular/common";
3
4
  import * as i0 from "@angular/core";
4
- import { ChangeDetectionStrategy, Component, ContentChild, EventEmitter, HostBinding, HostListener, Inject, Injectable, Input, NgModule, Optional, Output, ViewChild, ViewEncapsulation, booleanAttribute, input } from "@angular/core";
5
+ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, EventEmitter, HostBinding, Inject, Injectable, Input, NgModule, Optional, Output, ViewChild, ViewEncapsulation, booleanAttribute, inject, input } from "@angular/core";
6
+ import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
5
7
  import * as i1 from "@angular/material/dialog";
6
8
  import { MAT_DIALOG_DATA, MatDialogActions, MatDialogContent, MatDialogModule, MatDialogRef, MatDialogState, MatDialogTitle } from "@angular/material/dialog";
9
+ import { filter } from "rxjs";
7
10
  import { ButtonComponent, ButtonComponentModule } from "@testgorilla/tgo-ui/components/button";
8
11
  import { LanguageService, UiTranslatePipe } from "@testgorilla/tgo-ui/components/core";
9
12
  import { TooltipComponent } from "@testgorilla/tgo-ui/components/tooltip";
@@ -48,9 +51,11 @@ var DialogComponent = class DialogComponent {
48
51
  this.secondaryButtonClickEvent = new EventEmitter();
49
52
  this.primaryButtonClickEvent = new EventEmitter();
50
53
  this.modalClosed = false;
54
+ this.cdr = inject(ChangeDetectorRef);
51
55
  this.disableButtons = false;
52
56
  this.translationContext = "DIALOG.";
53
57
  if (defaultAppTheme) this.applicationTheme = defaultAppTheme;
58
+ this.dialogRef.keydownEvents?.().pipe(filter((event) => event.key === "Escape" && !hasModifierKey(event)), takeUntilDestroyed()).subscribe(() => this.onEsc());
54
59
  }
55
60
  get hasCustomHeader() {
56
61
  return Boolean(this.customHeader);
@@ -80,6 +85,7 @@ var DialogComponent = class DialogComponent {
80
85
  this.dialogRef.disableClose = false;
81
86
  this.dialogRef.close();
82
87
  this.modalClosed = true;
88
+ this.cdr.markForCheck();
83
89
  }
84
90
  }
85
91
  onClose(event) {
@@ -299,10 +305,7 @@ var DialogComponent = class DialogComponent {
299
305
  secondaryButtonClickEvent: "secondaryButtonClickEvent",
300
306
  primaryButtonClickEvent: "primaryButtonClickEvent"
301
307
  },
302
- host: {
303
- listeners: { "keydown.esc": "onEsc()" },
304
- properties: { "style.--color": "this.companyColor" }
305
- },
308
+ host: { properties: { "style.--color": "this.companyColor" } },
306
309
  queries: [{
307
310
  propertyName: "customHeader",
308
311
  first: true,
@@ -503,10 +506,6 @@ i0.ɵɵngDeclareClassMetadata({
503
506
  type: ViewChild,
504
507
  args: ["closeButton"]
505
508
  }],
506
- onEsc: [{
507
- type: HostListener,
508
- args: ["keydown.esc"]
509
- }],
510
509
  customHeader: [{
511
510
  type: ContentChild,
512
511
  args: ["dialogHeader"]
@@ -1 +1 @@
1
- {"version":3,"file":"testgorilla-tgo-ui-components-dialog.mjs","names":[],"sources":["../../../components/dialog/dialog.component.ts","../../../components/dialog/dialog.component.html","../../../components/dialog/dialog.service.ts","../../../components/dialog/dialog.component.module.ts","../../../components/dialog/confirm-dialog/confirm-dialog.component.ts","../../../components/dialog/confirm-dialog/confirm-dialog.component.html","../../../components/dialog/confirm-dialog/confirm-dialog.component.module.ts","../../../components/dialog/dialog-custom/dialog-custom.component.ts","../../../components/dialog/dialog-custom/dialog-custom.component.html","../../../components/dialog/dialog-custom/dialog-custom.component.module.ts"],"sourcesContent":["import { CdkScrollable } from '@angular/cdk/scrolling';\nimport { AsyncPipe } from '@angular/common';\nimport {\n AfterViewInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n EventEmitter,\n HostBinding,\n HostListener,\n Inject,\n Input,\n input,\n OnChanges,\n OnInit,\n Optional,\n Output,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n MAT_DIALOG_DATA,\n MatDialogRef,\n MatDialogState,\n MatDialogTitle,\n MatDialogContent,\n MatDialogActions,\n} from '@angular/material/dialog';\n\nimport { ButtonComponent, ButtonColor, ButtonIconPosition } from '@testgorilla/tgo-ui/components/button';\nimport { ApplicationTheme, UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconName } from '@testgorilla/tgo-ui/components/icon';\nimport { TooltipComponent } from '@testgorilla/tgo-ui/components/tooltip';\n\n@Component({\n selector: 'ui-dialog',\n templateUrl: './dialog.component.html',\n styleUrls: ['./dialog.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [\n MatDialogTitle,\n TooltipComponent,\n ButtonComponent,\n CdkScrollable,\n MatDialogContent,\n MatDialogActions,\n AsyncPipe,\n UiTranslatePipe,\n ],\n})\nexport class DialogComponent implements OnInit, OnChanges, AfterViewInit {\n /**\n * Dialog title\n *\n * @memberof DialogComponent\n */\n @Input() title? = '';\n\n /**\n * Show close button\n *\n * @memberof DialogComponent\n */\n @Input() showCloseButton = true;\n\n /**\n * Fuction called before dialgo is closed\n *\n * @memberof DialogComponent\n */\n @Input() canCloseFn: () => boolean = () => true;\n\n /**\n * Secondary button label\n *\n * @memberof DialogComponent\n */\n @Input() secondaryButtonLabel? = '';\n\n /**\n * Footer dialog message\n *\n * @memberof DialogComponent\n */\n @Input() footerMessage? = '';\n\n /**\n * Primary button label\n *\n * @memberof DialogComponent\n */\n @Input() primaryButtonLabel? = '';\n\n /**\n * Primary button icon name\n *\n * @memberof DialogComponent\n */\n @Input() primaryButtonIconName?: IconName | '' = '';\n\n /**\n * Secondary button type\n *\n * @memberof DialogComponent\n */\n @Input() secondaryButtonType: ButtonColor = 'ghost';\n\n /**\n * Primary button type\n *\n * @memberof DialogComponent\n */\n @Input() primaryButtonType: ButtonColor = 'primary';\n\n /**\n * Primary button test id\n *\n * @memberof DialogComponent\n */\n @Input() primaryButtonDataTestId: string | null = null;\n\n @Input() testId: string | null = null;\n\n @Input() closeButtonTestId: string | null = null;\n\n @Input() closeButtonAriaLabel = '';\n\n /**\n * Secondary button test id\n *\n * @memberof DialogComponent\n */\n @Input() secondaryButtonDataTestId: string | null = null;\n\n /**\n * Color of the dialog.\n * Defaults to Test Gorilla primary color.\n *\n * @type {string}\n * @memberof DialogComponent\n */\n @HostBinding('style.--color')\n @Input()\n companyColor: string | null = '';\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof DialogComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n /**\n *\n * Disable primary button\n *\n * @type {boolean}\n * @memberof DialogComponent\n */\n @Input() disablePrimaryButton = false;\n /**\n *\n * Show a spinner in place of the primary button label while the action runs.\n * Also disables the button, so a second click cannot fire\n * `primaryButtonClickEvent` while the first is still in flight.\n *\n * @memberof DialogComponent\n */\n primaryButtonLoading = input(false, { transform: booleanAttribute });\n /**\n *\n * Tooltip shown when hovering the primary button. Bound to a wrapper around the\n * button so it also shows while the button is disabled (a disabled button\n * receives no pointer events), e.g. to explain why the action is unavailable.\n *\n * @type {string}\n * @memberof DialogComponent\n */\n @Input() primaryButtonTooltip = '';\n /**\n *\n * Disable close button\n *\n * @type {boolean}\n * @memberof DialogComponent\n */\n @Input() disableClose = false;\n\n /**\n *\n * Disable button when canCloseFn is used\n *\n * @type {boolean}\n * @memberof DialogComponent\n */\n @Input() shouldDisableButtons = true;\n\n /**\n * A string representing the ARIA requirement for accessibility.\n * This attribute is used to indicate whether an input field is required for form submission.\n * @type {string}\n * @memberof DialogComponent\n */\n @Input() ariaLabelledby = '';\n\n /**\n * A string representing the ARIA requirement for accessibility.\n * This attribute is used to indicate whether an input field is required for form submission.\n * @type {string}\n * @memberof DialogComponent\n */\n @Input() ariaDescribedby = '';\n\n /**\n * Defines how modal was opened (with keyboard or not)\n *\n * @type {boolean}\n * @memberof DialogComponent\n */\n @Input() keyboardOpen = false;\n\n primaryButtonIconPosition = input<ButtonIconPosition>('left');\n\n @Output() closeEvent: EventEmitter<Event> = new EventEmitter<Event>();\n @Output() secondaryButtonClickEvent: EventEmitter<Event> = new EventEmitter<Event>();\n @Output() primaryButtonClickEvent: EventEmitter<Event> = new EventEmitter<Event>();\n\n @ViewChild('closeButton') closeButton: ButtonComponent;\n\n modalClosed = false;\n\n @HostListener('keydown.esc')\n onEsc() {\n this.dismiss();\n }\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme,\n public dialogRef: MatDialogRef<DialogComponent>,\n @Inject(MAT_DIALOG_DATA) private readonly data: { applicationTheme: ApplicationTheme }\n ) {\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n }\n\n disableButtons = false;\n protected readonly translationContext = 'DIALOG.';\n\n @ContentChild('dialogHeader')\n customHeader?: unknown;\n\n get hasCustomHeader(): boolean {\n return Boolean(this.customHeader);\n }\n\n ngOnInit(): void {\n this.areButtonsDisabled();\n if (this.data?.applicationTheme) {\n this.applicationTheme = this.data.applicationTheme;\n }\n if (this.applicationTheme !== 'classic') {\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- empty companyColor falls back to the theme colour\n this.companyColor = this.companyColor || '#D410AA';\n } else {\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- empty companyColor falls back to the theme colour\n this.companyColor = this.companyColor || '#46A997';\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes['canCloseFn']) {\n this.dialogRef.disableClose = !this.canCloseFn();\n this.areButtonsDisabled();\n }\n }\n\n ngAfterViewInit(): void {\n if (this.keyboardOpen) {\n setTimeout(() => {\n this.closeButton.buttonElement.focus('keyboard');\n }, 100);\n }\n }\n\n //Disable primary button when canClose is false\n areButtonsDisabled() {\n this.disableButtons = !this.canCloseFn() && this.shouldDisableButtons;\n }\n\n //Close modal\n dismiss(): void {\n if (this.canCloseFn()) {\n this.dialogRef.disableClose = false;\n this.dialogRef.close();\n this.modalClosed = true;\n }\n }\n\n onClose(event: Event): void {\n this.closeEvent.emit(event);\n this.modalClosed = true;\n }\n\n onSecondaryButtonClick(event: Event): void {\n this.secondaryButtonClickEvent.emit(event);\n }\n\n onPrimaryButtonClick(event: Event): void {\n this.primaryButtonClickEvent.emit(event);\n\n // The consumer may have closed the dialog with its own result. Closing again\n // would overwrite that result with undefined, and consumers read a missing\n // result as a cancel (ASM-157).\n if (this.dialogRef.getState() === MatDialogState.OPEN) {\n this.dismiss();\n }\n }\n}\n","<div class=\"dialog-container\" [attr.theme]=\"applicationTheme\" [attr.data-testid]=\"testId\">\n <div\n mat-dialog-title\n class=\"dialog-title\"\n [attr.aria-modal]=\"true\"\n [attr.aria-labelledby]=\"'labelledby'\"\n [attr.aria-describedby]=\"'ariaDescribedby'\"\n >\n <span [style.display]=\"'none'\" id=\"ariaDescribedby\">{{ ariaDescribedby }}</span>\n\n <!-- Default header content -->\n @if (!hasCustomHeader) {\n <h3 class=\"bold\" id=\"labelledby\">{{ title }}</h3>\n @if (showCloseButton) {\n <div>\n <ui-button\n #closeButton\n [variant]=\"'icon-button'\"\n [iconName]=\"'Close'\"\n [companyColor]=\"applicationTheme === 'classic' ? '#000' : '#242424'\"\n [applicationTheme]=\"applicationTheme\"\n [tooltip]=\"('COMMON.CLOSE' | uiTranslate | async)!\"\n (click)=\"onClose($event)\"\n (buttonClickEvent)=\"dismiss()\"\n [testId]=\"closeButtonTestId\"\n [ariaLabel]=\"closeButtonAriaLabel || ('COMMON.CLOSE' | uiTranslate | async)!\"\n id=\"dialog-close-button\"\n ></ui-button>\n </div>\n }\n }\n\n <!-- Custom header content projection -->\n <ng-content select=\"[dialogHeader]\"></ng-content>\n </div>\n <mat-dialog-content>\n <ng-content></ng-content>\n </mat-dialog-content>\n @if (secondaryButtonLabel !== '' || primaryButtonLabel !== '') {\n <div mat-dialog-actions [class.dialog-action-w-message]=\"!!footerMessage\">\n @if (footerMessage) {\n <div class=\"actions-footer-message\">{{ footerMessage }}</div>\n }\n\n <!-- Projected footer content, rendered to the left of the action buttons -->\n <ng-content select=\"[dialogFooter]\"></ng-content>\n\n @if (!!secondaryButtonLabel) {\n <!-- Action-button ids stay on the ui-button wrappers: five tgo-qa-automation page objects descend from them. -->\n <ui-button\n [companyColor]=\"companyColor\"\n [variant]=\"secondaryButtonType\"\n [applicationTheme]=\"applicationTheme\"\n [label]=\"secondaryButtonLabel\"\n [attr.data-testid]=\"secondaryButtonDataTestId\"\n (click)=\"onSecondaryButtonClick($event)\"\n ></ui-button>\n }\n @if (!!primaryButtonLabel) {\n <!-- The tooltip wraps the button: a disabled ui-button receives no pointer\n events, so the tooltip must trigger from an enclosing element. -->\n <ui-tooltip\n class=\"primary-button-tooltip-trigger\"\n [message]=\"primaryButtonTooltip\"\n [applicationTheme]=\"applicationTheme\"\n >\n <ui-button\n [iconPosition]=\"primaryButtonIconPosition()\"\n [iconName]=\"primaryButtonIconName ? primaryButtonIconName : undefined\"\n [variant]=\"primaryButtonType\"\n [loading]=\"primaryButtonLoading()\"\n [ariaLabel]=\"primaryButtonLoading() ? primaryButtonLabel : ''\"\n [disabled]=\"disableButtons || disablePrimaryButton || primaryButtonLoading()\"\n [applicationTheme]=\"applicationTheme\"\n (click)=\"onPrimaryButtonClick($event)\"\n [label]=\"primaryButtonLabel\"\n [companyColor]=\"companyColor\"\n [attr.data-testid]=\"primaryButtonDataTestId\"\n ></ui-button>\n </ui-tooltip>\n }\n </div>\n }\n\n <!-- This is announcement for screen reader that dialog was closed-->\n <div aria-live=\"assertive\" role=\"alert\" style=\"position: absolute; left: -9999px\">\n @if (modalClosed) {\n <span>{{ 'DIALOG.CLOSED' | uiTranslate | async }}</span>\n }\n </div>\n</div>\n","import { ComponentType } from '@angular/cdk/portal';\nimport { Inject, Injectable, Optional } from '@angular/core';\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\n\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\n\nimport { DialogConfig } from './dialog.model';\n\nexport type DialogSize = 'small' | 'large' | 'x-large';\n@Injectable()\nexport class DialogService {\n constructor(\n private readonly matDialog: MatDialog,\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme\n ) {}\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- mirrors MatDialog.open<T, D = any, R = any>: untyped-by-default data/result types for consumer ergonomics\n open<K = any, R = any, T = any>(\n dialogComponent: ComponentType<T>,\n dialogConfig?: DialogConfig<K>\n ): MatDialogRef<T, R> {\n const {\n applicationTheme = 'light',\n size = 'small',\n panelClass = '',\n extraData = {},\n backdropClass = '',\n keyboardOpen = false,\n config = {},\n } = dialogConfig ?? {};\n // Open the dialog using UI custom styles\n return this.matDialog.open(dialogComponent, {\n ...config,\n data: {\n applicationTheme: this.defaultAppTheme ?? applicationTheme,\n ...extraData,\n keyboardOpen,\n },\n backdropClass: backdropClass || '',\n panelClass:\n applicationTheme === 'classic'\n ? ['ui-dialog-wrapper', panelClass, size]\n : ['ui-dialog-wrapper', panelClass, applicationTheme, size],\n });\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatDialogModule, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nimport { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';\nimport { UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\n\nimport { DialogComponent } from './dialog.component';\nimport { DialogService } from './dialog.service';\n\n@NgModule({\n imports: [CommonModule, MatDialogModule, ButtonComponentModule, UiTranslatePipe, DialogComponent],\n exports: [DialogComponent],\n providers: [{ provide: MAT_DIALOG_DATA, useValue: {} }, { provide: MatDialogRef, useValue: {} }, DialogService],\n})\nexport class DialogComponentModule {}\n","import { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Inject, Input, Optional } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\n\nimport { ButtonColor, ButtonIconPosition } from '@testgorilla/tgo-ui/components/button';\nimport { ApplicationTheme, LanguageService, UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconName } from '@testgorilla/tgo-ui/components/icon';\n\nimport { DialogComponent } from '../dialog.component';\n\nimport { ConfirmDialogData } from './confirm-dialog.model';\n\n@Component({\n selector: 'ui-confirm-dialog',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './confirm-dialog.component.html',\n styleUrls: ['./confirm-dialog.component.scss'],\n imports: [DialogComponent, AsyncPipe, UiTranslatePipe],\n})\nexport class ConfirmDialogComponent {\n confirmMessage: string | undefined;\n confirmButtonText: string | undefined;\n cancelButtonText: string | undefined;\n title: string | undefined;\n lang = LanguageService.defaultLanguage;\n confirmMessageHtml: string | undefined;\n showCloseButton = false;\n showSecondaryButton = true;\n color: string | null;\n primaryButtonType: ButtonColor;\n secondaryButtonType: ButtonColor;\n primaryButtonIconName: IconName | undefined;\n primaryButtonDataTestId = 'confirm-dialog.confirm-button';\n secondaryButtonDataTestId = 'confirm-dialog.cancel-button';\n primaryButtonIconPosition: ButtonIconPosition;\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof DialogComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme,\n public dialogRef: MatDialogRef<ConfirmDialogComponent>,\n @Inject(MAT_DIALOG_DATA) private readonly data: ConfirmDialogData\n ) {\n this.confirmMessage = data.message;\n this.confirmButtonText = data.confirmButtonText;\n this.cancelButtonText = data.cancelButtonText;\n this.title = data.title;\n this.lang = data.language ?? LanguageService.defaultLanguage;\n this.confirmMessageHtml = data.messageHtml ?? undefined;\n this.showCloseButton = data.showCloseButton ?? false;\n this.showSecondaryButton = data.showSecondaryButton ?? true;\n this.color = data.color ?? null;\n this.primaryButtonType = data.primaryButtonType ?? 'primary';\n this.secondaryButtonType = data.secondaryButtonType ?? 'ghost';\n this.primaryButtonIconName = data.primaryButtonIconName ?? undefined;\n this.primaryButtonDataTestId = data.primaryButtonDataTestId ?? 'confirm-dialog.confirm-button';\n this.secondaryButtonDataTestId = data.secondaryButtonDataTestId ?? 'confirm-dialog.cancel-button';\n this.primaryButtonIconPosition = data.primaryButtonIconPosition ?? 'left';\n\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n }\n\n onConfirm(): void {\n if (this.data.onConfirm) {\n this.data.onConfirm();\n }\n this.dialogRef.close(true);\n }\n}\n","<ng-container>\n <ui-dialog\n [title]=\"title ?? ('COMMON.CONFIRM' | uiTranslate | async)!\"\n [primaryButtonLabel]=\"confirmButtonText ?? ('COMMON.YES' | uiTranslate | async)!\"\n [secondaryButtonLabel]=\"\n showSecondaryButton ? (cancelButtonText ?? ('COMMON.CANCEL' | uiTranslate | async)!) : undefined\n \"\n (primaryButtonClickEvent)=\"onConfirm()\"\n (secondaryButtonClickEvent)=\"dialogRef.close(false)\"\n (closeEvent)=\"dialogRef.close(null)\"\n [primaryButtonType]=\"primaryButtonType\"\n [primaryButtonIconName]=\"primaryButtonIconName\"\n [secondaryButtonType]=\"secondaryButtonType\"\n [applicationTheme]=\"applicationTheme\"\n [showCloseButton]=\"showCloseButton\"\n [companyColor]=\"color\"\n [primaryButtonDataTestId]=\"primaryButtonDataTestId\"\n [secondaryButtonDataTestId]=\"secondaryButtonDataTestId\"\n [primaryButtonIconPosition]=\"primaryButtonIconPosition\"\n >\n <div class=\"message\">{{ confirmMessage }}</div>\n @if (confirmMessageHtml) {\n <div class=\"message\" [innerHTML]=\"confirmMessageHtml\"></div>\n }\n </ui-dialog>\n</ng-container>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';\n\nimport { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';\nimport { UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\n\nimport { DialogComponentModule } from '../dialog.component.module';\n\nimport { ConfirmDialogComponent } from './confirm-dialog.component';\n\n@NgModule({\n exports: [ConfirmDialogComponent],\n providers: [\n { provide: MAT_DIALOG_DATA, useValue: {} },\n { provide: MatDialogRef, useValue: {} },\n ],\n imports: [\n CommonModule,\n MatDialogModule,\n ButtonComponentModule,\n DialogComponentModule,\n UiTranslatePipe,\n ConfirmDialogComponent,\n ],\n})\nexport class ConfirmDialogComponentModule {}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Inject,\n Input,\n OnInit,\n Optional,\n ViewEncapsulation,\n} from '@angular/core';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nimport { ButtonComponent } from '@testgorilla/tgo-ui/components/button';\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\nimport { ToggleComponent } from '@testgorilla/tgo-ui/components/toggle';\n\nimport { DialogComponent } from '../dialog.component';\n\n// Shape of the MAT_DIALOG_DATA this demo dialog is opened with (see\n// dialog-demo.component's extraData; keyboardOpen is always merged in by\n// DialogService.open). The booleans are required because ui-dialog's\n// matching inputs are strict `boolean`.\ninterface DialogCustomData {\n title?: string;\n type?: 'default' | 'custom-header' | 'footer-content' | 'disabled-primary-tooltip';\n showCloseButton: boolean;\n keyboardOpen: boolean;\n footerMessage?: string;\n primaryButtonTooltip?: string;\n}\n\n@Component({\n selector: 'ui-dialog-custom',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './dialog-custom.component.html',\n styleUrls: ['./dialog-custom.component.scss'],\n encapsulation: ViewEncapsulation.None,\n imports: [DialogComponent, ButtonComponent, ToggleComponent],\n})\nexport class DialogCustomComponent implements OnInit {\n canClose: () => boolean;\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof DialogComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme,\n @Inject(MAT_DIALOG_DATA) protected data: DialogCustomData,\n private readonly cdr: ChangeDetectorRef\n ) {\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n }\n\n ngOnInit(): void {\n this.canClose = this.canCloseFalse.bind(this);\n setTimeout(() => {\n this.canClose = this.canCloseTrue.bind(this);\n // `canClose` is template-bound and swapped from a timer.\n this.cdr.markForCheck();\n }, 2000);\n }\n\n //canCloseFn @input demo with false value\n canCloseFalse(): boolean {\n return false;\n }\n\n //canCloseFn @input demo with true value\n canCloseTrue(): boolean {\n return true;\n }\n}\n","<ui-dialog\n [title]=\"data.title\"\n [showCloseButton]=\"data.showCloseButton\"\n [applicationTheme]=\"applicationTheme\"\n [primaryButtonLabel]=\"'OK'\"\n [secondaryButtonLabel]=\"'Cancel'\"\n [canCloseFn]=\"canClose\"\n [keyboardOpen]=\"data.keyboardOpen\"\n [footerMessage]=\"data.footerMessage\"\n [disablePrimaryButton]=\"data.type === 'disabled-primary-tooltip'\"\n [primaryButtonTooltip]=\"data.primaryButtonTooltip ?? ''\"\n>\n <!-- Custom header content -->\n @if (data.type === 'custom-header') {\n <div dialogHeader class=\"custom-header\">\n <div class=\"button-group\">\n <ui-button label=\"Action 1\" [variant]=\"'ghost'\" [applicationTheme]=\"applicationTheme\"></ui-button>\n <ui-button label=\"Action 2\" [variant]=\"'primary'\" [applicationTheme]=\"applicationTheme\"></ui-button>\n </div>\n </div>\n }\n\n <!-- Custom footer content projection -->\n @if (data.type === 'footer-content') {\n <ui-toggle dialogFooter label=\"Don't show this again\" [applicationTheme]=\"applicationTheme\"></ui-toggle>\n }\n\n <!-- Dialog content -->\n <div class=\"dialog-content\">\n @if (data.type === 'default') {\n <p class=\"dialog-message\">This is a default dialog example with a standard header.</p>\n }\n @if (data.type === 'custom-header') {\n <p class=\"dialog-message\">This dialog uses a custom header with content projection.</p>\n }\n @if (data.type === 'footer-content') {\n <p class=\"dialog-message\">\n This dialog projects a <code>ui-toggle</code> into the footer, to the left of the action buttons.\n </p>\n }\n @if (data.type === 'disabled-primary-tooltip') {\n <p class=\"dialog-message\">\n The primary button is disabled; hover it to see the tooltip explaining why the action is unavailable.\n </p>\n }\n <p class=\"dialog-message\">The dialog will be closeable in 2 seconds (demonstrating canCloseFn).</p>\n </div>\n</ui-dialog>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';\nimport { ToggleComponentModule } from '@testgorilla/tgo-ui/components/toggle';\n\nimport { DialogComponentModule } from '../dialog.component.module';\n\nimport { DialogCustomComponent } from './dialog-custom.component';\n\n@NgModule({\n imports: [CommonModule, DialogComponentModule, ButtonComponentModule, ToggleComponentModule, DialogCustomComponent],\n exports: [DialogCustomComponent],\n})\nexport class DialogCustomComponentModule {}\n"],"mappings":";;;;;;;;;;AAqDA,IAAa,kBAAb,MAAa,gBAAe;CAuL1B,QAAK;EACH,KAAK,QAAO;CACd;CAEA,YAC6E,iBACpE,WACmC,MAA4C;EAFX,KAAA,kBAAA;EACpE,KAAA,YAAA;EACmC,KAAA,OAAA;EAxLnC,KAAA,QAAS;EAOT,KAAA,kBAAkB;EAOlB,KAAA,mBAAkC;EAOlC,KAAA,uBAAwB;EAOxB,KAAA,gBAAiB;EAOjB,KAAA,qBAAsB;EAOtB,KAAA,wBAAwC;EAOxC,KAAA,sBAAmC;EAOnC,KAAA,oBAAiC;EAOjC,KAAA,0BAAyC;EAEzC,KAAA,SAAwB;EAExB,KAAA,oBAAmC;EAEnC,KAAA,uBAAuB;EAOvB,KAAA,4BAA2C;EAWpD,KAAA,eAA8B;EASrB,KAAA,mBAAqC;EAQrC,KAAA,uBAAuB;EAShC,KAAA,uBAAuB,MAAM,OAAK;GAAA,GAAA,YAAA,EAAA,WAAA,uBAAA,+BAAA,CAAA;GAA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AAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAA2B,YAAA,CAAA;EAJvC,MAAA;EAAS,MAAA,CAAA;GACR,SAAS;IAAC;IAAc;IAAuB;IAAuB;IAAuB;GAAqB;GAClH,SAAS,CAAC,qBAAqB;EAChC,CAAA"}
1
+ {"version":3,"file":"testgorilla-tgo-ui-components-dialog.mjs","names":[],"sources":["../../../components/dialog/dialog.component.ts","../../../components/dialog/dialog.component.html","../../../components/dialog/dialog.service.ts","../../../components/dialog/dialog.component.module.ts","../../../components/dialog/confirm-dialog/confirm-dialog.component.ts","../../../components/dialog/confirm-dialog/confirm-dialog.component.html","../../../components/dialog/confirm-dialog/confirm-dialog.component.module.ts","../../../components/dialog/dialog-custom/dialog-custom.component.ts","../../../components/dialog/dialog-custom/dialog-custom.component.html","../../../components/dialog/dialog-custom/dialog-custom.component.module.ts"],"sourcesContent":["import { hasModifierKey } from '@angular/cdk/keycodes';\nimport { CdkScrollable } from '@angular/cdk/scrolling';\nimport { AsyncPipe } from '@angular/common';\nimport {\n AfterViewInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n EventEmitter,\n HostBinding,\n Inject,\n inject,\n Input,\n input,\n OnChanges,\n OnInit,\n Optional,\n Output,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n MAT_DIALOG_DATA,\n MatDialogRef,\n MatDialogState,\n MatDialogTitle,\n MatDialogContent,\n MatDialogActions,\n} from '@angular/material/dialog';\nimport { filter } from 'rxjs';\n\nimport { ButtonComponent, ButtonColor, ButtonIconPosition } from '@testgorilla/tgo-ui/components/button';\nimport { ApplicationTheme, UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconName } from '@testgorilla/tgo-ui/components/icon';\nimport { TooltipComponent } from '@testgorilla/tgo-ui/components/tooltip';\n\n@Component({\n selector: 'ui-dialog',\n templateUrl: './dialog.component.html',\n styleUrls: ['./dialog.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [\n MatDialogTitle,\n TooltipComponent,\n ButtonComponent,\n CdkScrollable,\n MatDialogContent,\n MatDialogActions,\n AsyncPipe,\n UiTranslatePipe,\n ],\n})\nexport class DialogComponent implements OnInit, OnChanges, AfterViewInit {\n /**\n * Dialog title\n *\n * @memberof DialogComponent\n */\n @Input() title? = '';\n\n /**\n * Show close button\n *\n * @memberof DialogComponent\n */\n @Input() showCloseButton = true;\n\n /**\n * Fuction called before dialgo is closed\n *\n * @memberof DialogComponent\n */\n @Input() canCloseFn: () => boolean = () => true;\n\n /**\n * Secondary button label\n *\n * @memberof DialogComponent\n */\n @Input() secondaryButtonLabel? = '';\n\n /**\n * Footer dialog message\n *\n * @memberof DialogComponent\n */\n @Input() footerMessage? = '';\n\n /**\n * Primary button label\n *\n * @memberof DialogComponent\n */\n @Input() primaryButtonLabel? = '';\n\n /**\n * Primary button icon name\n *\n * @memberof DialogComponent\n */\n @Input() primaryButtonIconName?: IconName | '' = '';\n\n /**\n * Secondary button type\n *\n * @memberof DialogComponent\n */\n @Input() secondaryButtonType: ButtonColor = 'ghost';\n\n /**\n * Primary button type\n *\n * @memberof DialogComponent\n */\n @Input() primaryButtonType: ButtonColor = 'primary';\n\n /**\n * Primary button test id\n *\n * @memberof DialogComponent\n */\n @Input() primaryButtonDataTestId: string | null = null;\n\n @Input() testId: string | null = null;\n\n @Input() closeButtonTestId: string | null = null;\n\n @Input() closeButtonAriaLabel = '';\n\n /**\n * Secondary button test id\n *\n * @memberof DialogComponent\n */\n @Input() secondaryButtonDataTestId: string | null = null;\n\n /**\n * Color of the dialog.\n * Defaults to Test Gorilla primary color.\n *\n * @type {string}\n * @memberof DialogComponent\n */\n @HostBinding('style.--color')\n @Input()\n companyColor: string | null = '';\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof DialogComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n /**\n *\n * Disable primary button\n *\n * @type {boolean}\n * @memberof DialogComponent\n */\n @Input() disablePrimaryButton = false;\n /**\n *\n * Show a spinner in place of the primary button label while the action runs.\n * Also disables the button, so a second click cannot fire\n * `primaryButtonClickEvent` while the first is still in flight.\n *\n * @memberof DialogComponent\n */\n primaryButtonLoading = input(false, { transform: booleanAttribute });\n /**\n *\n * Tooltip shown when hovering the primary button. Bound to a wrapper around the\n * button so it also shows while the button is disabled (a disabled button\n * receives no pointer events), e.g. to explain why the action is unavailable.\n *\n * @type {string}\n * @memberof DialogComponent\n */\n @Input() primaryButtonTooltip = '';\n /**\n *\n * Disable close button\n *\n * @type {boolean}\n * @memberof DialogComponent\n */\n @Input() disableClose = false;\n\n /**\n *\n * Disable button when canCloseFn is used\n *\n * @type {boolean}\n * @memberof DialogComponent\n */\n @Input() shouldDisableButtons = true;\n\n /**\n * A string representing the ARIA requirement for accessibility.\n * This attribute is used to indicate whether an input field is required for form submission.\n * @type {string}\n * @memberof DialogComponent\n */\n @Input() ariaLabelledby = '';\n\n /**\n * A string representing the ARIA requirement for accessibility.\n * This attribute is used to indicate whether an input field is required for form submission.\n * @type {string}\n * @memberof DialogComponent\n */\n @Input() ariaDescribedby = '';\n\n /**\n * Defines how modal was opened (with keyboard or not)\n *\n * @type {boolean}\n * @memberof DialogComponent\n */\n @Input() keyboardOpen = false;\n\n primaryButtonIconPosition = input<ButtonIconPosition>('left');\n\n @Output() closeEvent: EventEmitter<Event> = new EventEmitter<Event>();\n @Output() secondaryButtonClickEvent: EventEmitter<Event> = new EventEmitter<Event>();\n @Output() primaryButtonClickEvent: EventEmitter<Event> = new EventEmitter<Event>();\n\n @ViewChild('closeButton') closeButton: ButtonComponent;\n\n modalClosed = false;\n\n private readonly cdr = inject(ChangeDetectorRef);\n\n onEsc() {\n this.dismiss();\n }\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme,\n public dialogRef: MatDialogRef<DialogComponent>,\n @Inject(MAT_DIALOG_DATA) private readonly data: { applicationTheme: ApplicationTheme }\n ) {\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n // Not a host listener: focus can sit outside <ui-dialog>, e.g. on mat-dialog-container.\n // Optional call: MatDialogRef is stubbed as {} by DialogComponentModule, the stories and many consumer specs.\n this.dialogRef\n .keydownEvents?.()\n .pipe(\n filter(event => event.key === 'Escape' && !hasModifierKey(event)),\n takeUntilDestroyed()\n )\n .subscribe(() => this.onEsc());\n }\n\n disableButtons = false;\n protected readonly translationContext = 'DIALOG.';\n\n @ContentChild('dialogHeader')\n customHeader?: unknown;\n\n get hasCustomHeader(): boolean {\n return Boolean(this.customHeader);\n }\n\n ngOnInit(): void {\n this.areButtonsDisabled();\n if (this.data?.applicationTheme) {\n this.applicationTheme = this.data.applicationTheme;\n }\n if (this.applicationTheme !== 'classic') {\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- empty companyColor falls back to the theme colour\n this.companyColor = this.companyColor || '#D410AA';\n } else {\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- empty companyColor falls back to the theme colour\n this.companyColor = this.companyColor || '#46A997';\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes['canCloseFn']) {\n this.dialogRef.disableClose = !this.canCloseFn();\n this.areButtonsDisabled();\n }\n }\n\n ngAfterViewInit(): void {\n if (this.keyboardOpen) {\n setTimeout(() => {\n this.closeButton.buttonElement.focus('keyboard');\n }, 100);\n }\n }\n\n //Disable primary button when canClose is false\n areButtonsDisabled() {\n this.disableButtons = !this.canCloseFn() && this.shouldDisableButtons;\n }\n\n //Close modal\n dismiss(): void {\n if (this.canCloseFn()) {\n this.dialogRef.disableClose = false;\n this.dialogRef.close();\n this.modalClosed = true;\n this.cdr.markForCheck();\n }\n }\n\n onClose(event: Event): void {\n this.closeEvent.emit(event);\n this.modalClosed = true;\n }\n\n onSecondaryButtonClick(event: Event): void {\n this.secondaryButtonClickEvent.emit(event);\n }\n\n onPrimaryButtonClick(event: Event): void {\n this.primaryButtonClickEvent.emit(event);\n\n // The consumer may have closed the dialog with its own result. Closing again\n // would overwrite that result with undefined, and consumers read a missing\n // result as a cancel (ASM-157).\n if (this.dialogRef.getState() === MatDialogState.OPEN) {\n this.dismiss();\n }\n }\n}\n","<div class=\"dialog-container\" [attr.theme]=\"applicationTheme\" [attr.data-testid]=\"testId\">\n <div\n mat-dialog-title\n class=\"dialog-title\"\n [attr.aria-modal]=\"true\"\n [attr.aria-labelledby]=\"'labelledby'\"\n [attr.aria-describedby]=\"'ariaDescribedby'\"\n >\n <span [style.display]=\"'none'\" id=\"ariaDescribedby\">{{ ariaDescribedby }}</span>\n\n <!-- Default header content -->\n @if (!hasCustomHeader) {\n <h3 class=\"bold\" id=\"labelledby\">{{ title }}</h3>\n @if (showCloseButton) {\n <div>\n <ui-button\n #closeButton\n [variant]=\"'icon-button'\"\n [iconName]=\"'Close'\"\n [companyColor]=\"applicationTheme === 'classic' ? '#000' : '#242424'\"\n [applicationTheme]=\"applicationTheme\"\n [tooltip]=\"('COMMON.CLOSE' | uiTranslate | async)!\"\n (click)=\"onClose($event)\"\n (buttonClickEvent)=\"dismiss()\"\n [testId]=\"closeButtonTestId\"\n [ariaLabel]=\"closeButtonAriaLabel || ('COMMON.CLOSE' | uiTranslate | async)!\"\n id=\"dialog-close-button\"\n ></ui-button>\n </div>\n }\n }\n\n <!-- Custom header content projection -->\n <ng-content select=\"[dialogHeader]\"></ng-content>\n </div>\n <mat-dialog-content>\n <ng-content></ng-content>\n </mat-dialog-content>\n @if (secondaryButtonLabel !== '' || primaryButtonLabel !== '') {\n <div mat-dialog-actions [class.dialog-action-w-message]=\"!!footerMessage\">\n @if (footerMessage) {\n <div class=\"actions-footer-message\">{{ footerMessage }}</div>\n }\n\n <!-- Projected footer content, rendered to the left of the action buttons -->\n <ng-content select=\"[dialogFooter]\"></ng-content>\n\n @if (!!secondaryButtonLabel) {\n <!-- Action-button ids stay on the ui-button wrappers: five tgo-qa-automation page objects descend from them. -->\n <ui-button\n [companyColor]=\"companyColor\"\n [variant]=\"secondaryButtonType\"\n [applicationTheme]=\"applicationTheme\"\n [label]=\"secondaryButtonLabel\"\n [attr.data-testid]=\"secondaryButtonDataTestId\"\n (click)=\"onSecondaryButtonClick($event)\"\n ></ui-button>\n }\n @if (!!primaryButtonLabel) {\n <!-- The tooltip wraps the button: a disabled ui-button receives no pointer\n events, so the tooltip must trigger from an enclosing element. -->\n <ui-tooltip\n class=\"primary-button-tooltip-trigger\"\n [message]=\"primaryButtonTooltip\"\n [applicationTheme]=\"applicationTheme\"\n >\n <ui-button\n [iconPosition]=\"primaryButtonIconPosition()\"\n [iconName]=\"primaryButtonIconName ? primaryButtonIconName : undefined\"\n [variant]=\"primaryButtonType\"\n [loading]=\"primaryButtonLoading()\"\n [ariaLabel]=\"primaryButtonLoading() ? primaryButtonLabel : ''\"\n [disabled]=\"disableButtons || disablePrimaryButton || primaryButtonLoading()\"\n [applicationTheme]=\"applicationTheme\"\n (click)=\"onPrimaryButtonClick($event)\"\n [label]=\"primaryButtonLabel\"\n [companyColor]=\"companyColor\"\n [attr.data-testid]=\"primaryButtonDataTestId\"\n ></ui-button>\n </ui-tooltip>\n }\n </div>\n }\n\n <!-- This is announcement for screen reader that dialog was closed-->\n <div aria-live=\"assertive\" role=\"alert\" style=\"position: absolute; left: -9999px\">\n @if (modalClosed) {\n <span>{{ 'DIALOG.CLOSED' | uiTranslate | async }}</span>\n }\n </div>\n</div>\n","import { ComponentType } from '@angular/cdk/portal';\nimport { Inject, Injectable, Optional } from '@angular/core';\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\n\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\n\nimport { DialogConfig } from './dialog.model';\n\nexport type DialogSize = 'small' | 'large' | 'x-large';\n@Injectable()\nexport class DialogService {\n constructor(\n private readonly matDialog: MatDialog,\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme\n ) {}\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- mirrors MatDialog.open<T, D = any, R = any>: untyped-by-default data/result types for consumer ergonomics\n open<K = any, R = any, T = any>(\n dialogComponent: ComponentType<T>,\n dialogConfig?: DialogConfig<K>\n ): MatDialogRef<T, R> {\n const {\n applicationTheme = 'light',\n size = 'small',\n panelClass = '',\n extraData = {},\n backdropClass = '',\n keyboardOpen = false,\n config = {},\n } = dialogConfig ?? {};\n // Open the dialog using UI custom styles\n return this.matDialog.open(dialogComponent, {\n ...config,\n data: {\n applicationTheme: this.defaultAppTheme ?? applicationTheme,\n ...extraData,\n keyboardOpen,\n },\n backdropClass: backdropClass || '',\n panelClass:\n applicationTheme === 'classic'\n ? ['ui-dialog-wrapper', panelClass, size]\n : ['ui-dialog-wrapper', panelClass, applicationTheme, size],\n });\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatDialogModule, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nimport { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';\nimport { UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\n\nimport { DialogComponent } from './dialog.component';\nimport { DialogService } from './dialog.service';\n\n@NgModule({\n imports: [CommonModule, MatDialogModule, ButtonComponentModule, UiTranslatePipe, DialogComponent],\n exports: [DialogComponent],\n providers: [{ provide: MAT_DIALOG_DATA, useValue: {} }, { provide: MatDialogRef, useValue: {} }, DialogService],\n})\nexport class DialogComponentModule {}\n","import { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Inject, Input, Optional } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\n\nimport { ButtonColor, ButtonIconPosition } from '@testgorilla/tgo-ui/components/button';\nimport { ApplicationTheme, LanguageService, UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconName } from '@testgorilla/tgo-ui/components/icon';\n\nimport { DialogComponent } from '../dialog.component';\n\nimport { ConfirmDialogData } from './confirm-dialog.model';\n\n@Component({\n selector: 'ui-confirm-dialog',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './confirm-dialog.component.html',\n styleUrls: ['./confirm-dialog.component.scss'],\n imports: [DialogComponent, AsyncPipe, UiTranslatePipe],\n})\nexport class ConfirmDialogComponent {\n confirmMessage: string | undefined;\n confirmButtonText: string | undefined;\n cancelButtonText: string | undefined;\n title: string | undefined;\n lang = LanguageService.defaultLanguage;\n confirmMessageHtml: string | undefined;\n showCloseButton = false;\n showSecondaryButton = true;\n color: string | null;\n primaryButtonType: ButtonColor;\n secondaryButtonType: ButtonColor;\n primaryButtonIconName: IconName | undefined;\n primaryButtonDataTestId = 'confirm-dialog.confirm-button';\n secondaryButtonDataTestId = 'confirm-dialog.cancel-button';\n primaryButtonIconPosition: ButtonIconPosition;\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof DialogComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme,\n public dialogRef: MatDialogRef<ConfirmDialogComponent>,\n @Inject(MAT_DIALOG_DATA) private readonly data: ConfirmDialogData\n ) {\n this.confirmMessage = data.message;\n this.confirmButtonText = data.confirmButtonText;\n this.cancelButtonText = data.cancelButtonText;\n this.title = data.title;\n this.lang = data.language ?? LanguageService.defaultLanguage;\n this.confirmMessageHtml = data.messageHtml ?? undefined;\n this.showCloseButton = data.showCloseButton ?? false;\n this.showSecondaryButton = data.showSecondaryButton ?? true;\n this.color = data.color ?? null;\n this.primaryButtonType = data.primaryButtonType ?? 'primary';\n this.secondaryButtonType = data.secondaryButtonType ?? 'ghost';\n this.primaryButtonIconName = data.primaryButtonIconName ?? undefined;\n this.primaryButtonDataTestId = data.primaryButtonDataTestId ?? 'confirm-dialog.confirm-button';\n this.secondaryButtonDataTestId = data.secondaryButtonDataTestId ?? 'confirm-dialog.cancel-button';\n this.primaryButtonIconPosition = data.primaryButtonIconPosition ?? 'left';\n\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n }\n\n onConfirm(): void {\n if (this.data.onConfirm) {\n this.data.onConfirm();\n }\n this.dialogRef.close(true);\n }\n}\n","<ng-container>\n <ui-dialog\n [title]=\"title ?? ('COMMON.CONFIRM' | uiTranslate | async)!\"\n [primaryButtonLabel]=\"confirmButtonText ?? ('COMMON.YES' | uiTranslate | async)!\"\n [secondaryButtonLabel]=\"\n showSecondaryButton ? (cancelButtonText ?? ('COMMON.CANCEL' | uiTranslate | async)!) : undefined\n \"\n (primaryButtonClickEvent)=\"onConfirm()\"\n (secondaryButtonClickEvent)=\"dialogRef.close(false)\"\n (closeEvent)=\"dialogRef.close(null)\"\n [primaryButtonType]=\"primaryButtonType\"\n [primaryButtonIconName]=\"primaryButtonIconName\"\n [secondaryButtonType]=\"secondaryButtonType\"\n [applicationTheme]=\"applicationTheme\"\n [showCloseButton]=\"showCloseButton\"\n [companyColor]=\"color\"\n [primaryButtonDataTestId]=\"primaryButtonDataTestId\"\n [secondaryButtonDataTestId]=\"secondaryButtonDataTestId\"\n [primaryButtonIconPosition]=\"primaryButtonIconPosition\"\n >\n <div class=\"message\">{{ confirmMessage }}</div>\n @if (confirmMessageHtml) {\n <div class=\"message\" [innerHTML]=\"confirmMessageHtml\"></div>\n }\n </ui-dialog>\n</ng-container>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';\n\nimport { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';\nimport { UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\n\nimport { DialogComponentModule } from '../dialog.component.module';\n\nimport { ConfirmDialogComponent } from './confirm-dialog.component';\n\n@NgModule({\n exports: [ConfirmDialogComponent],\n providers: [\n { provide: MAT_DIALOG_DATA, useValue: {} },\n { provide: MatDialogRef, useValue: {} },\n ],\n imports: [\n CommonModule,\n MatDialogModule,\n ButtonComponentModule,\n DialogComponentModule,\n UiTranslatePipe,\n ConfirmDialogComponent,\n ],\n})\nexport class ConfirmDialogComponentModule {}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Inject,\n Input,\n OnInit,\n Optional,\n ViewEncapsulation,\n} from '@angular/core';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nimport { ButtonComponent } from '@testgorilla/tgo-ui/components/button';\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\nimport { ToggleComponent } from '@testgorilla/tgo-ui/components/toggle';\n\nimport { DialogComponent } from '../dialog.component';\n\n// Shape of the MAT_DIALOG_DATA this demo dialog is opened with (see\n// dialog-demo.component's extraData; keyboardOpen is always merged in by\n// DialogService.open). The booleans are required because ui-dialog's\n// matching inputs are strict `boolean`.\ninterface DialogCustomData {\n title?: string;\n type?: 'default' | 'custom-header' | 'footer-content' | 'disabled-primary-tooltip';\n showCloseButton: boolean;\n keyboardOpen: boolean;\n footerMessage?: string;\n primaryButtonTooltip?: string;\n}\n\n@Component({\n selector: 'ui-dialog-custom',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './dialog-custom.component.html',\n styleUrls: ['./dialog-custom.component.scss'],\n encapsulation: ViewEncapsulation.None,\n imports: [DialogComponent, ButtonComponent, ToggleComponent],\n})\nexport class DialogCustomComponent implements OnInit {\n canClose: () => boolean;\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof DialogComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme,\n @Inject(MAT_DIALOG_DATA) protected data: DialogCustomData,\n private readonly cdr: ChangeDetectorRef\n ) {\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n }\n\n ngOnInit(): void {\n this.canClose = this.canCloseFalse.bind(this);\n setTimeout(() => {\n this.canClose = this.canCloseTrue.bind(this);\n // `canClose` is template-bound and swapped from a timer.\n this.cdr.markForCheck();\n }, 2000);\n }\n\n //canCloseFn @input demo with false value\n canCloseFalse(): boolean {\n return false;\n }\n\n //canCloseFn @input demo with true value\n canCloseTrue(): boolean {\n return true;\n }\n}\n","<ui-dialog\n [title]=\"data.title\"\n [showCloseButton]=\"data.showCloseButton\"\n [applicationTheme]=\"applicationTheme\"\n [primaryButtonLabel]=\"'OK'\"\n [secondaryButtonLabel]=\"'Cancel'\"\n [canCloseFn]=\"canClose\"\n [keyboardOpen]=\"data.keyboardOpen\"\n [footerMessage]=\"data.footerMessage\"\n [disablePrimaryButton]=\"data.type === 'disabled-primary-tooltip'\"\n [primaryButtonTooltip]=\"data.primaryButtonTooltip ?? ''\"\n>\n <!-- Custom header content -->\n @if (data.type === 'custom-header') {\n <div dialogHeader class=\"custom-header\">\n <div class=\"button-group\">\n <ui-button label=\"Action 1\" [variant]=\"'ghost'\" [applicationTheme]=\"applicationTheme\"></ui-button>\n <ui-button label=\"Action 2\" [variant]=\"'primary'\" [applicationTheme]=\"applicationTheme\"></ui-button>\n </div>\n </div>\n }\n\n <!-- Custom footer content projection -->\n @if (data.type === 'footer-content') {\n <ui-toggle dialogFooter label=\"Don't show this again\" [applicationTheme]=\"applicationTheme\"></ui-toggle>\n }\n\n <!-- Dialog content -->\n <div class=\"dialog-content\">\n @if (data.type === 'default') {\n <p class=\"dialog-message\">This is a default dialog example with a standard header.</p>\n }\n @if (data.type === 'custom-header') {\n <p class=\"dialog-message\">This dialog uses a custom header with content projection.</p>\n }\n @if (data.type === 'footer-content') {\n <p class=\"dialog-message\">\n This dialog projects a <code>ui-toggle</code> into the footer, to the left of the action buttons.\n </p>\n }\n @if (data.type === 'disabled-primary-tooltip') {\n <p class=\"dialog-message\">\n The primary button is disabled; hover it to see the tooltip explaining why the action is unavailable.\n </p>\n }\n <p class=\"dialog-message\">The dialog will be closeable in 2 seconds (demonstrating canCloseFn).</p>\n </div>\n</ui-dialog>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';\nimport { ToggleComponentModule } from '@testgorilla/tgo-ui/components/toggle';\n\nimport { DialogComponentModule } from '../dialog.component.module';\n\nimport { DialogCustomComponent } from './dialog-custom.component';\n\n@NgModule({\n imports: [CommonModule, DialogComponentModule, ButtonComponentModule, ToggleComponentModule, DialogCustomComponent],\n exports: [DialogCustomComponent],\n})\nexport class DialogCustomComponentModule {}\n"],"mappings":";;;;;;;;;;;;;AAyDA,IAAa,kBAAb,MAAa,gBAAe;CAwL1B,QAAK;EACH,KAAK,QAAO;CACd;CAEA,YAC6E,iBACpE,WACmC,MAA4C;EAFX,KAAA,kBAAA;EACpE,KAAA,YAAA;EACmC,KAAA,OAAA;EAzLnC,KAAA,QAAS;EAOT,KAAA,kBAAkB;EAOlB,KAAA,mBAAkC;EAOlC,KAAA,uBAAwB;EAOxB,KAAA,gBAAiB;EAOjB,KAAA,qBAAsB;EAOtB,KAAA,wBAAwC;EAOxC,KAAA,sBAAmC;EAOnC,KAAA,oBAAiC;EAOjC,KAAA,0BAAyC;EAEzC,KAAA,SAAwB;EAExB,KAAA,oBAAmC;EAEnC,KAAA,uBAAuB;EAOvB,KAAA,4BAA2C;EAWpD,KAAA,eAA8B;EASrB,KAAA,mBAAqC;EAQrC,KAAA,uBAAuB;EAShC,KAAA,uBAAuB,MAAM,OAAK;GAAA,GAAA,YAAA,EAAA,WAAA,uBAAA,+BAAA,CAAA;GAAI,WAAW;EAAgB,CAAA;EAUxD,KAAA,uBAAuB;EAQvB,KAAA,eAAe;EASf,KAAA,uBAAuB;EAQvB,KAAA,iBAAiB;EAQjB,KAAA,kBAAkB;EAQlB,KAAA,eAAe;EAExB,KA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