{ "version": 3, "sources": ["libs/galaxy/confirmation-modal/src/modal-actions/modal-actions.component.ts", "libs/galaxy/confirmation-modal/src/modal-actions/modal-actions.component.html", "libs/galaxy/confirmation-modal/src/modal-body/modal-body.component.ts", "libs/galaxy/confirmation-modal/src/modal-body/modal-body.component.html", "libs/galaxy/confirmation-modal/src/confirmation-modal/confirmation-modal.component.ts", "libs/galaxy/confirmation-modal/src/confirmation-modal/confirmation-modal.component.html", "libs/galaxy/confirmation-modal/src/confirmation-modal.service.ts"], "sourcesContent": ["import { Component, Directive, HostBinding } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'glxy-confirmation-actions',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './modal-actions.component.html',\n styleUrls: ['./modal-actions.component.scss'],\n})\nexport class ModalActionsComponent {}\n\n// Directives\n\n@Directive({\n standalone: true,\n selector: 'glxy-confirmation-primary-actions, [glxyConfirmationPrimaryActions]',\n})\nexport class ConfirmationModalActionsDirective {\n @HostBinding('class') class = 'glxy-confirmation-primary-actions';\n}\n\n@Directive({\n standalone: true,\n selector: 'glxy-confirmation-secondary-actions, [glxyConfirmationSecondaryActions]',\n})\nexport class ConfirmationModalSecondaryActionsDirective {\n @HostBinding('class') class = 'glxy-confirmation-secondary-actions';\n}\n", "\n\n\n", "import { Component, Directive, HostBinding } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'glxy-confirmation-body',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './modal-body.component.html',\n styleUrls: ['./modal-body.component.scss'],\n})\nexport class ModalBodyComponent {}\n\n// Directives\n\n@Directive({\n standalone: true,\n selector: 'glxy-confirmation-icon, [glxyConfirmationIcon]',\n})\nexport class ConfirmationModalIconDirective {\n @HostBinding('class') class = 'glxy-confirmation-icon';\n}\n\n@Directive({\n standalone: true,\n selector: 'glxy-confirmation-title, [glxyConfirmationTitle]',\n})\nexport class ConfirmationModalTitleDirective {\n @HostBinding('class') class = 'glxy-confirmation-title';\n}\n\n@Directive({\n standalone: true,\n selector: 'glxy-confirmation-message, [glxyConfirmationMessage]',\n})\nexport class ConfirmationModalMessageDirective {\n @HostBinding('class') class = 'glxy-confirmation-message';\n}\n\n@Directive({\n standalone: true,\n selector: 'glxy-confirmation-custom-content, [glxyConfirmationCustomContent]',\n})\nexport class ConfirmationModalCustomContentDirective {\n @HostBinding('class') class = 'glxy-confirmation-custom-content';\n}\n", "
\n \n
\n\n\n\n\n\n\n", "import { CommonModule } from '@angular/common';\nimport { Component, HostBinding, HostListener, inject } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';\nimport { MatIconModule } from '@angular/material/icon';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { GalaxyI18NModule } from '@vendasta/galaxy/i18n';\nimport { ConfirmationModalConfig } from '../confirmation-modal.service';\nimport {\n ConfirmationModalActionsDirective,\n ConfirmationModalSecondaryActionsDirective,\n ModalActionsComponent,\n} from '../modal-actions/modal-actions.component';\nimport {\n ConfirmationModalIconDirective,\n ConfirmationModalMessageDirective,\n ConfirmationModalTitleDirective,\n ModalBodyComponent,\n} from '../modal-body/modal-body.component';\n\n@Component({\n selector: 'glxy-confirmation-modal',\n standalone: true,\n imports: [\n CommonModule,\n TranslateModule,\n MatDialogModule,\n MatButtonModule,\n MatIconModule,\n MatCheckboxModule,\n GalaxyI18NModule,\n ModalBodyComponent,\n ModalActionsComponent,\n ConfirmationModalIconDirective,\n ConfirmationModalMessageDirective,\n ConfirmationModalTitleDirective,\n ConfirmationModalActionsDirective,\n ConfirmationModalSecondaryActionsDirective,\n ],\n templateUrl: './confirmation-modal.component.html',\n styleUrls: ['./confirmation-modal.component.scss'],\n})\nexport class ConfirmationModalComponent {\n @HostBinding('class') class = 'glxy-confirmation-modal';\n\n @HostListener('document:keydown.enter', ['$event']) onEnter(event: KeyboardEvent) {\n // fire the confirm action if the user presses enter\n // unless the user pressed enter on the cancel button\n const target = event?.target as HTMLButtonElement;\n const isCancelButton = target?.id === 'confirmation-modal-cancel-button';\n\n if (this.config.actionOnEnterKey !== false && !isCancelButton) {\n this.dialogActionClicked();\n }\n }\n\n public dialogRef = inject(MatDialogRef);\n public config: ConfirmationModalConfig = inject(MAT_DIALOG_DATA);\n\n dialogActionClicked() {\n this.dialogRef.close(true);\n }\n}\n", "\n \n {{ config.type === 'warn' ? 'warning' : 'info' }}\n \n\n \n {{ config.title | translate }}\n \n\n \n {{ config.message ?? '' | translate }}\n \n\n\n\n \n {{ config.checkboxText ?? 'GALAXY.CONFIRMATION_MODAL.DONT_SHOW_AGAIN' | translate }}\n \n\n \n \n\n \n \n\n", "import { Injectable, inject } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { Observable } from 'rxjs';\nimport { ConfirmationModalComponent } from './confirmation-modal/confirmation-modal.component';\n\nexport interface ConfirmationModalConfig {\n type?: 'confirm' | 'warn';\n title: string;\n message?: string;\n confirmButtonText?: string;\n hideCancel?: boolean;\n cancelButtonText?: string;\n actionOnEnterKey?: boolean;\n cancelOnEscapeKeyOrBackgroundClick?: boolean;\n width?: number;\n showCheckbox?: boolean; // for future updates\n checkboxText?: string; // for future updates\n}\n\nexport const ConfirmationModalWidth = '540px';\nexport const ConfirmationModalMaxWidth = 'calc( 100vw - 8px )';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class OpenConfirmationModalService {\n // in order to use this service, you MUST import the MatDialogModule in your base app.module\n // otherwise you will get an error like this:\n //\n // ERROR Error: Uncaught (in promise): NullInjectorError:\n // R3InjectorError(ConfirmationModalModule)[OpenConfirmationModalService -> OpenConfirmationModalService\n // -> MatDialog -> MatDialog]: NullInjectorError: No provider for MatDialog!\n //\n\n private readonly dialog = inject(MatDialog);\n\n openModal(config: ConfirmationModalConfig): Observable {\n return this.dialog\n .open(ConfirmationModalComponent, {\n data: config,\n width: config.width ? config.width + 'px' : ConfirmationModalWidth,\n maxWidth: ConfirmationModalMaxWidth,\n autoFocus: false,\n disableClose: config.cancelOnEscapeKeyOrBackgroundClick === false,\n })\n .afterClosed();\n // this observable autocloses after the first value is emitted\n // so no need to unsubscribe or use take(1)\n }\n}\n"], "mappings": "00BAUaA,GAAqB,IAAA,CAA5B,IAAOA,EAAP,MAAOA,CAAqB,yCAArBA,EAAqB,sBAArBA,EAAqBC,UAAA,CAAA,CAAA,2BAAA,CAAA,EAAAC,WAAA,GAAAC,SAAA,CAAAC,CAAA,EAAAC,mBAAAC,GAAAC,MAAA,EAAAC,KAAA,EAAAC,SAAA,SAAAC,EAAAC,EAAA,CAAAD,EAAA,UCVlCE,EAAA,CAAA,EAEAA,EAAA,EAAA,CAAA,kBDIYC,CAAY,EAAAC,OAAA,CAAA;iHAAA,CAAA,CAAA,EAIlB,IAAOd,EAAPe,SAAOf,CAAqB,GAAA,EAQrBgB,GAAiC,IAAA,CAAxC,IAAOA,EAAP,MAAOA,CAAiC,CAJ9CC,aAAA,CAKwB,KAAAC,MAAQ,4EADnBF,EAAiC,sBAAjCA,EAAiCf,UAAA,CAAA,CAAA,mCAAA,EAAA,CAAA,GAAA,iCAAA,EAAA,CAAA,EAAAkB,SAAA,EAAAC,aAAA,SAAAV,EAAAC,EAAA,CAAAD,EAAA,GAAjCW,EAAAV,EAAAO,KAAA,mBAAP,IAAOF,EAAPM,SAAON,CAAiC,GAAA,EAQjCO,GAA0C,IAAA,CAAjD,IAAOA,EAAP,MAAOA,CAA0C,CAJvDN,aAAA,CAKwB,KAAAC,MAAQ,8EADnBK,EAA0C,sBAA1CA,EAA0CtB,UAAA,CAAA,CAAA,qCAAA,EAAA,CAAA,GAAA,mCAAA,EAAA,CAAA,EAAAkB,SAAA,EAAAC,aAAA,SAAAV,EAAAC,EAAA,CAAAD,EAAA,GAA1CW,EAAAV,EAAAO,KAAA,mBAAP,IAAOK,EAAPC,SAAOD,CAA0C,GAAA,0fEhB1CE,GAAkB,IAA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C,EAAAhB,EAAAxB,OAAAyC,qBAAA,MAAAD,IAAAtC,OAAAsC,EAAA,mCAAA,EAAA,GAAA,kBDAFE,EAAYC,EACZC,EAAeC,EACfC,EAAeC,EACfC,EAAeC,EACfC,EAAaC,EACbC,EAAiBC,EACjBC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,CAA0C,EAAAC,OAAA,CAAA;sHAAA,CAAA,CAAA,EAKxC,IAAOzD,EAAP0D,SAAO1D,CAA0B,GAAA,EExBhC,IAAM2D,GAAyB,QACzBC,GAA4B,sBAK5BC,IAA4B,IAAA,CAAnC,IAAOA,EAAP,MAAOA,CAA4B,CAHzCC,aAAA,CAYmB,KAAAC,OAASC,EAAOC,CAAS,EAE1CC,UAAUC,EAA+B,CACvC,OAAO,KAAKJ,OACTK,KAAKC,GAA4B,CAChCC,KAAMH,EACNI,MAAOJ,EAAOI,MAAQJ,EAAOI,MAAQ,KAAOZ,GAC5Ca,SAAUZ,GACVa,UAAW,GACXC,aAAcP,EAAOQ,qCAAuC,GAC7D,EACAC,YAAW,CAGhB,yCAvBWf,EAA4B,wBAA5BA,EAA4BgB,QAA5BhB,EAA4BiB,UAAAC,WAF3B,MAAM,CAAA,EAEd,IAAOlB,EAAPmB,SAAOnB,CAA4B,GAAA", "names": ["ModalActionsComponent", "selectors", "standalone", "features", "\u0275\u0275StandaloneFeature", "ngContentSelectors", "_c1", "decls", "vars", "template", "rf", "ctx", "\u0275\u0275projection", "CommonModule", "styles", "_ModalActionsComponent", "ConfirmationModalActionsDirective", "constructor", "class", "hostVars", "hostBindings", "\u0275\u0275classMap", "_ConfirmationModalActionsDirective", "ConfirmationModalSecondaryActionsDirective", "_ConfirmationModalSecondaryActionsDirective", "ModalBodyComponent", "selectors", "standalone", "features", "\u0275\u0275StandaloneFeature", "ngContentSelectors", "_c1", "decls", "vars", "consts", "template", "rf", "ctx", "\u0275\u0275elementStart", "\u0275\u0275projection", "\u0275\u0275elementEnd", "CommonModule", "styles", "_ModalBodyComponent", "ConfirmationModalIconDirective", "constructor", "class", "hostVars", "hostBindings", "\u0275\u0275classMap", "_ConfirmationModalIconDirective", "ConfirmationModalTitleDirective", "_ConfirmationModalTitleDirective", "ConfirmationModalMessageDirective", "_ConfirmationModalMessageDirective", "\u0275\u0275elementStart", "\u0275\u0275text", "\u0275\u0275elementEnd", "\u0275\u0275advance", "\u0275\u0275textInterpolate", "\u0275\u0275pipeBind1", "tmp_1_0", "ctx_r0", "config", "checkboxText", "undefined", "\u0275\u0275textInterpolate1", "cancelButtonText", "ConfirmationModalComponent", "constructor", "class", "dialogRef", "inject", "MatDialogRef", "MAT_DIALOG_DATA", "onEnter", "event", "isCancelButton", "target", "id", "actionOnEnterKey", "dialogActionClicked", "close", "selectors", "hostVars", "hostBindings", "rf", "ctx", "\u0275\u0275listener", "$event", "\u0275\u0275resolveDocument", "\u0275\u0275classMap", "\u0275\u0275template", "ConfirmationModalComponent_glxy_confirmation_secondary_actions_10_Template", "ConfirmationModalComponent_button_12_Template", "\u0275\u0275classProp", "type", "title", "tmp_3_0", "message", "\u0275\u0275property", "showCheckbox", "hideCancel", "tmp_7_0", "confirmButtonText", "CommonModule", "NgIf", "TranslateModule", "TranslatePipe", "MatDialogModule", "MatDialogClose", "MatButtonModule", "MatButton", "MatIconModule", "MatIcon", "MatCheckboxModule", "MatCheckbox", "GalaxyI18NModule", "ModalBodyComponent", "ModalActionsComponent", "ConfirmationModalIconDirective", "ConfirmationModalMessageDirective", "ConfirmationModalTitleDirective", "ConfirmationModalActionsDirective", "ConfirmationModalSecondaryActionsDirective", "styles", "_ConfirmationModalComponent", "ConfirmationModalWidth", "ConfirmationModalMaxWidth", "OpenConfirmationModalService", "constructor", "dialog", "inject", "MatDialog", "openModal", "config", "open", "ConfirmationModalComponent", "data", "width", "maxWidth", "autoFocus", "disableClose", "cancelOnEscapeKeyOrBackgroundClick", "afterClosed", "factory", "\u0275fac", "providedIn", "_OpenConfirmationModalService"] }