@ppwcode/ng-dialogs
Advanced tools
| import { ThemePalette } from '@angular/material/core'; | ||
| import * as i0 from '@angular/core'; | ||
| import { OnInit } from '@angular/core'; | ||
| import * as i1 from '@angular/cdk/drag-drop'; | ||
| interface ConfirmationDialogData { | ||
| titleKey: string; | ||
| bodyKey: string; | ||
| bodyParams: any; | ||
| titleParams: any; | ||
| confirmationKey: string; | ||
| cancelKey: string; | ||
| allowConfirmOnly?: boolean; | ||
| confirmationThemePalette?: ThemePalette; | ||
| } | ||
| declare class ConfirmationDialogComponent { | ||
| data: ConfirmationDialogData; | ||
| get confirmationThemePalette(): ThemePalette; | ||
| static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmationDialogComponent, never>; | ||
| static ɵcmp: i0.ɵɵComponentDeclaration<ConfirmationDialogComponent, "ppw-confirmation-dialog", never, {}, {}, never, never, true, never>; | ||
| } | ||
| declare class DraggableDialogDirective implements OnInit { | ||
| #private; | ||
| ngOnInit(): void; | ||
| static ɵfac: i0.ɵɵFactoryDeclaration<DraggableDialogDirective, never>; | ||
| static ɵdir: i0.ɵɵDirectiveDeclaration<DraggableDialogDirective, "[ppwDraggableDialog]", never, {}, {}, never, never, true, [{ directive: typeof i1.CdkDrag; inputs: {}; outputs: {}; }]>; | ||
| } | ||
| export { ConfirmationDialogComponent, DraggableDialogDirective }; | ||
| export type { ConfirmationDialogData }; |
| import * as i0 from '@angular/core'; | ||
| import { inject, ElementRef, Renderer2, Directive, Component } from '@angular/core'; | ||
| import { inject, ElementRef, Renderer2, Directive, ChangeDetectionStrategy, Component } from '@angular/core'; | ||
| import * as i2 from '@angular/material/button'; | ||
@@ -19,6 +19,6 @@ import { MatButtonModule } from '@angular/material/button'; | ||
| } | ||
| static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: DraggableDialogDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); } | ||
| static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: DraggableDialogDirective, isStandalone: true, selector: "[ppwDraggableDialog]", hostDirectives: [{ directive: i1.CdkDrag }], ngImport: i0 }); } | ||
| static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: DraggableDialogDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); } | ||
| static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.2", type: DraggableDialogDirective, isStandalone: true, selector: "[ppwDraggableDialog]", hostDirectives: [{ directive: i1.CdkDrag }], ngImport: i0 }); } | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: DraggableDialogDirective, decorators: [{ | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: DraggableDialogDirective, decorators: [{ | ||
| type: Directive, | ||
@@ -38,6 +38,6 @@ args: [{ | ||
| } | ||
| static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ConfirmationDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); } | ||
| static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ConfirmationDialogComponent, isStandalone: true, selector: "ppw-confirmation-dialog", ngImport: i0, template: "<div ppwDraggableDialog>\n <!-- eslint-disable-next-line @angular-eslint/template/elements-content -->\n <h3 cdkDragHandle mat-dialog-title [translate]=\"data.titleKey\" [translateParams]=\"data.titleParams\"></h3>\n <mat-dialog-content\n class=\"mat-typography\"\n [translate]=\"data.bodyKey\"\n [translateParams]=\"data.bodyParams\"\n ></mat-dialog-content>\n <mat-dialog-actions align=\"end\">\n @if (!data.allowConfirmOnly) {\n <button mat-stroked-button class=\"ppw-confirmation-dialog__action\" [mat-dialog-close]=\"false\">\n <i class=\"fa-solid fa-ban\"></i> {{ data.cancelKey | translate }}\n </button>\n }\n <button\n mat-raised-button\n class=\"ppw-confirmation-dialog__action\"\n [mat-dialog-close]=\"true\"\n [color]=\"confirmationThemePalette\"\n >\n <i class=\"fa-solid fa-check\"></i> {{ data.confirmationKey | translate }}\n </button>\n </mat-dialog-actions>\n</div>\n", styles: ["[mat-dialog-title]{background:var(--ppw-confirmation-dialog-header-background-color);color:var(--ppw-confirmation-dialog-header-text-color)}mat-dialog-content{white-space:pre-wrap}@media only screen and (max-width: 960px){mat-dialog-actions{display:flex;flex-direction:column;align-items:stretch;gap:8px}mat-dialog-actions button.ppw-confirmation-dialog__action{margin:0}}\n"], dependencies: [{ kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: DraggableDialogDirective, selector: "[ppwDraggableDialog]" }, { kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); } | ||
| static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: ConfirmationDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); } | ||
| static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.2", type: ConfirmationDialogComponent, isStandalone: true, selector: "ppw-confirmation-dialog", ngImport: i0, template: "<div ppwDraggableDialog>\n <!-- eslint-disable-next-line @angular-eslint/template/elements-content -->\n <h3 cdkDragHandle mat-dialog-title [translate]=\"data.titleKey\" [translateParams]=\"data.titleParams\"></h3>\n <mat-dialog-content\n class=\"mat-typography\"\n [translate]=\"data.bodyKey\"\n [translateParams]=\"data.bodyParams\"\n ></mat-dialog-content>\n <mat-dialog-actions align=\"end\">\n @if (!data.allowConfirmOnly) {\n <button mat-stroked-button class=\"ppw-confirmation-dialog__action\" [mat-dialog-close]=\"false\">\n <i class=\"fa-solid fa-ban\"></i> {{ data.cancelKey | translate }}\n </button>\n }\n <button\n mat-raised-button\n class=\"ppw-confirmation-dialog__action\"\n [mat-dialog-close]=\"true\"\n [color]=\"confirmationThemePalette\"\n >\n <i class=\"fa-solid fa-check\"></i> {{ data.confirmationKey | translate }}\n </button>\n </mat-dialog-actions>\n</div>\n", styles: ["[mat-dialog-title]{background:var(--ppw-confirmation-dialog-header-background-color);color:var(--ppw-confirmation-dialog-header-text-color)}mat-dialog-content{white-space:pre-wrap}@media only screen and (max-width:960px){mat-dialog-actions{display:flex;flex-direction:column;align-items:stretch;gap:8px}mat-dialog-actions button.ppw-confirmation-dialog__action{margin:0}}\n"], dependencies: [{ kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: DraggableDialogDirective, selector: "[ppwDraggableDialog]" }, { kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); } | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ConfirmationDialogComponent, decorators: [{ | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: ConfirmationDialogComponent, decorators: [{ | ||
| type: Component, | ||
@@ -51,3 +51,3 @@ args: [{ selector: 'ppw-confirmation-dialog', imports: [ | ||
| CdkDragHandle | ||
| ], template: "<div ppwDraggableDialog>\n <!-- eslint-disable-next-line @angular-eslint/template/elements-content -->\n <h3 cdkDragHandle mat-dialog-title [translate]=\"data.titleKey\" [translateParams]=\"data.titleParams\"></h3>\n <mat-dialog-content\n class=\"mat-typography\"\n [translate]=\"data.bodyKey\"\n [translateParams]=\"data.bodyParams\"\n ></mat-dialog-content>\n <mat-dialog-actions align=\"end\">\n @if (!data.allowConfirmOnly) {\n <button mat-stroked-button class=\"ppw-confirmation-dialog__action\" [mat-dialog-close]=\"false\">\n <i class=\"fa-solid fa-ban\"></i> {{ data.cancelKey | translate }}\n </button>\n }\n <button\n mat-raised-button\n class=\"ppw-confirmation-dialog__action\"\n [mat-dialog-close]=\"true\"\n [color]=\"confirmationThemePalette\"\n >\n <i class=\"fa-solid fa-check\"></i> {{ data.confirmationKey | translate }}\n </button>\n </mat-dialog-actions>\n</div>\n", styles: ["[mat-dialog-title]{background:var(--ppw-confirmation-dialog-header-background-color);color:var(--ppw-confirmation-dialog-header-text-color)}mat-dialog-content{white-space:pre-wrap}@media only screen and (max-width: 960px){mat-dialog-actions{display:flex;flex-direction:column;align-items:stretch;gap:8px}mat-dialog-actions button.ppw-confirmation-dialog__action{margin:0}}\n"] }] | ||
| ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div ppwDraggableDialog>\n <!-- eslint-disable-next-line @angular-eslint/template/elements-content -->\n <h3 cdkDragHandle mat-dialog-title [translate]=\"data.titleKey\" [translateParams]=\"data.titleParams\"></h3>\n <mat-dialog-content\n class=\"mat-typography\"\n [translate]=\"data.bodyKey\"\n [translateParams]=\"data.bodyParams\"\n ></mat-dialog-content>\n <mat-dialog-actions align=\"end\">\n @if (!data.allowConfirmOnly) {\n <button mat-stroked-button class=\"ppw-confirmation-dialog__action\" [mat-dialog-close]=\"false\">\n <i class=\"fa-solid fa-ban\"></i> {{ data.cancelKey | translate }}\n </button>\n }\n <button\n mat-raised-button\n class=\"ppw-confirmation-dialog__action\"\n [mat-dialog-close]=\"true\"\n [color]=\"confirmationThemePalette\"\n >\n <i class=\"fa-solid fa-check\"></i> {{ data.confirmationKey | translate }}\n </button>\n </mat-dialog-actions>\n</div>\n", styles: ["[mat-dialog-title]{background:var(--ppw-confirmation-dialog-header-background-color);color:var(--ppw-confirmation-dialog-header-text-color)}mat-dialog-content{white-space:pre-wrap}@media only screen and (max-width:960px){mat-dialog-actions{display:flex;flex-direction:column;align-items:stretch;gap:8px}mat-dialog-actions button.ppw-confirmation-dialog__action{margin:0}}\n"] }] | ||
| }] }); | ||
@@ -54,0 +54,0 @@ |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"ppwcode-ng-dialogs.mjs","sources":["../../../../projects/ppwcode/ng-dialogs/src/lib/directives/draggable-dialog.directive.ts","../../../../projects/ppwcode/ng-dialogs/src/lib/confirmation-dialog/confirmation-dialog.component.ts","../../../../projects/ppwcode/ng-dialogs/src/lib/confirmation-dialog/confirmation-dialog.component.html","../../../../projects/ppwcode/ng-dialogs/src/public-api.ts","../../../../projects/ppwcode/ng-dialogs/src/ppwcode-ng-dialogs.ts"],"sourcesContent":["import { CdkDrag } from '@angular/cdk/drag-drop'\nimport { Directive, ElementRef, inject, OnInit, Renderer2 } from '@angular/core'\n\n@Directive({\n selector: '[ppwDraggableDialog]',\n hostDirectives: [CdkDrag]\n})\nexport class DraggableDialogDirective implements OnInit {\n #el: ElementRef = inject(ElementRef)\n #renderer: Renderer2 = inject(Renderer2)\n #cdkDrag: CdkDrag = inject(CdkDrag)\n\n ngOnInit(): void {\n this.#renderer.addClass(this.#el.nativeElement, 'ppw-draggable-dialog')\n this.#cdkDrag.rootElementSelector = '.cdk-overlay-pane'\n }\n}\n","import { Component, inject } from '@angular/core'\nimport { MatButtonModule } from '@angular/material/button'\nimport { ThemePalette } from '@angular/material/core'\nimport { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog'\nimport { TranslateDirective, TranslatePipe } from '@ngx-translate/core'\nimport { DraggableDialogDirective } from '../directives/draggable-dialog.directive'\nimport { CdkDragHandle } from '@angular/cdk/drag-drop' /* NgxTranslate expects any for params. tslint should stop complaining */\n\n/* NgxTranslate expects any for params. tslint should stop complaining */\nexport interface ConfirmationDialogData {\n titleKey: string\n bodyKey: string\n\n /* eslint-disable @typescript-eslint/no-explicit-any */\n bodyParams: any\n titleParams: any\n /* eslint-enable */\n\n confirmationKey: string\n cancelKey: string\n\n allowConfirmOnly?: boolean\n\n confirmationThemePalette?: ThemePalette\n}\n\n@Component({\n selector: 'ppw-confirmation-dialog',\n templateUrl: './confirmation-dialog.component.html',\n imports: [\n MatDialogModule,\n TranslatePipe,\n TranslateDirective,\n MatButtonModule,\n DraggableDialogDirective,\n CdkDragHandle\n ],\n styleUrls: ['./confirmation-dialog.component.scss']\n})\nexport class ConfirmationDialogComponent {\n public data: ConfirmationDialogData = inject(MAT_DIALOG_DATA)\n\n get confirmationThemePalette(): ThemePalette {\n return this.data.confirmationThemePalette ?? 'primary'\n }\n}\n","<div ppwDraggableDialog>\n <!-- eslint-disable-next-line @angular-eslint/template/elements-content -->\n <h3 cdkDragHandle mat-dialog-title [translate]=\"data.titleKey\" [translateParams]=\"data.titleParams\"></h3>\n <mat-dialog-content\n class=\"mat-typography\"\n [translate]=\"data.bodyKey\"\n [translateParams]=\"data.bodyParams\"\n ></mat-dialog-content>\n <mat-dialog-actions align=\"end\">\n @if (!data.allowConfirmOnly) {\n <button mat-stroked-button class=\"ppw-confirmation-dialog__action\" [mat-dialog-close]=\"false\">\n <i class=\"fa-solid fa-ban\"></i> {{ data.cancelKey | translate }}\n </button>\n }\n <button\n mat-raised-button\n class=\"ppw-confirmation-dialog__action\"\n [mat-dialog-close]=\"true\"\n [color]=\"confirmationThemePalette\"\n >\n <i class=\"fa-solid fa-check\"></i> {{ data.confirmationKey | translate }}\n </button>\n </mat-dialog-actions>\n</div>\n","/*\n * Public API Surface of ng-dialogs\n */\n\nexport * from './lib/confirmation-dialog/confirmation-dialog.component'\nexport * from './lib/directives/draggable-dialog.directive'\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;MAOa,wBAAwB,CAAA;AACjC,IAAA,GAAG,GAAe,MAAM,CAAC,UAAU,CAAC;AACpC,IAAA,SAAS,GAAc,MAAM,CAAC,SAAS,CAAC;AACxC,IAAA,QAAQ,GAAY,MAAM,CAAC,OAAO,CAAC;IAEnC,QAAQ,GAAA;AACJ,QAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,sBAAsB,CAAC;AACvE,QAAA,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I,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,yBAAyB,EAAA,OAAA,EAE1B;wBACL,eAAe;wBACf,aAAa;wBACb,kBAAkB;wBAClB,eAAe;wBACf,wBAAwB;wBACxB;AACH,qBAAA,EAAA,QAAA,EAAA,6hCAAA,EAAA,MAAA,EAAA,CAAA,wXAAA,CAAA,EAAA;;;AEpCL;;AAEG;;ACFH;;AAEG;;;;"} | ||
| {"version":3,"file":"ppwcode-ng-dialogs.mjs","sources":["../../../../projects/ppwcode/ng-dialogs/src/lib/directives/draggable-dialog.directive.ts","../../../../projects/ppwcode/ng-dialogs/src/lib/confirmation-dialog/confirmation-dialog.component.ts","../../../../projects/ppwcode/ng-dialogs/src/lib/confirmation-dialog/confirmation-dialog.component.html","../../../../projects/ppwcode/ng-dialogs/src/public-api.ts","../../../../projects/ppwcode/ng-dialogs/src/ppwcode-ng-dialogs.ts"],"sourcesContent":["import { CdkDrag } from '@angular/cdk/drag-drop'\nimport { Directive, ElementRef, inject, OnInit, Renderer2 } from '@angular/core'\n\n@Directive({\n selector: '[ppwDraggableDialog]',\n hostDirectives: [CdkDrag]\n})\nexport class DraggableDialogDirective implements OnInit {\n #el: ElementRef = inject(ElementRef)\n #renderer: Renderer2 = inject(Renderer2)\n #cdkDrag: CdkDrag = inject(CdkDrag)\n\n ngOnInit(): void {\n this.#renderer.addClass(this.#el.nativeElement, 'ppw-draggable-dialog')\n this.#cdkDrag.rootElementSelector = '.cdk-overlay-pane'\n }\n}\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core'\nimport { MatButtonModule } from '@angular/material/button'\nimport { ThemePalette } from '@angular/material/core'\nimport { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog'\nimport { TranslateDirective, TranslatePipe } from '@ngx-translate/core'\nimport { DraggableDialogDirective } from '../directives/draggable-dialog.directive'\nimport { CdkDragHandle } from '@angular/cdk/drag-drop' /* NgxTranslate expects any for params. tslint should stop complaining */\n\n/* NgxTranslate expects any for params. tslint should stop complaining */\nexport interface ConfirmationDialogData {\n titleKey: string\n bodyKey: string\n\n /* eslint-disable @typescript-eslint/no-explicit-any */\n bodyParams: any\n titleParams: any\n /* eslint-enable */\n\n confirmationKey: string\n cancelKey: string\n\n allowConfirmOnly?: boolean\n\n confirmationThemePalette?: ThemePalette\n}\n\n@Component({\n selector: 'ppw-confirmation-dialog',\n templateUrl: './confirmation-dialog.component.html',\n imports: [\n MatDialogModule,\n TranslatePipe,\n TranslateDirective,\n MatButtonModule,\n DraggableDialogDirective,\n CdkDragHandle\n ],\n styleUrls: ['./confirmation-dialog.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ConfirmationDialogComponent {\n public data: ConfirmationDialogData = inject(MAT_DIALOG_DATA)\n\n get confirmationThemePalette(): ThemePalette {\n return this.data.confirmationThemePalette ?? 'primary'\n }\n}\n","<div ppwDraggableDialog>\n <!-- eslint-disable-next-line @angular-eslint/template/elements-content -->\n <h3 cdkDragHandle mat-dialog-title [translate]=\"data.titleKey\" [translateParams]=\"data.titleParams\"></h3>\n <mat-dialog-content\n class=\"mat-typography\"\n [translate]=\"data.bodyKey\"\n [translateParams]=\"data.bodyParams\"\n ></mat-dialog-content>\n <mat-dialog-actions align=\"end\">\n @if (!data.allowConfirmOnly) {\n <button mat-stroked-button class=\"ppw-confirmation-dialog__action\" [mat-dialog-close]=\"false\">\n <i class=\"fa-solid fa-ban\"></i> {{ data.cancelKey | translate }}\n </button>\n }\n <button\n mat-raised-button\n class=\"ppw-confirmation-dialog__action\"\n [mat-dialog-close]=\"true\"\n [color]=\"confirmationThemePalette\"\n >\n <i class=\"fa-solid fa-check\"></i> {{ data.confirmationKey | translate }}\n </button>\n </mat-dialog-actions>\n</div>\n","/*\n * Public API Surface of ng-dialogs\n */\n\nexport * from './lib/confirmation-dialog/confirmation-dialog.component'\nexport * from './lib/directives/draggable-dialog.directive'\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["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,EAAA,QAAA,EAAA,CAAA,WAAA,EAAA,WAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACf,wBAAwB,EAAA,QAAA,EAAA,sBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACxB,aAAa,0FAJb,aAAa,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FASR,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBAdvC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,yBAAyB,EAAA,OAAA,EAE1B;wBACL,eAAe;wBACf,aAAa;wBACb,kBAAkB;wBAClB,eAAe;wBACf,wBAAwB;wBACxB;qBACH,EAAA,eAAA,EAEgB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,6hCAAA,EAAA,MAAA,EAAA,CAAA,uXAAA,CAAA,EAAA;;;AEtCnD;;AAEG;;ACFH;;AAEG;;;;"} |
+5
-5
| { | ||
| "name": "@ppwcode/ng-dialogs", | ||
| "version": "20.6.1", | ||
| "version": "21.0.0", | ||
| "repository": { | ||
@@ -8,4 +8,4 @@ "url": "https://github.com/peopleware/angular-sdk" | ||
| "peerDependencies": { | ||
| "@angular/common": "^20.3.15", | ||
| "@angular/core": "^20.3.15" | ||
| "@angular/common": "^21.0.2", | ||
| "@angular/core": "^21.0.2" | ||
| }, | ||
@@ -17,3 +17,3 @@ "dependencies": { | ||
| "module": "fesm2022/ppwcode-ng-dialogs.mjs", | ||
| "typings": "index.d.ts", | ||
| "typings": "types/ppwcode-ng-dialogs.d.ts", | ||
| "exports": { | ||
@@ -24,3 +24,3 @@ "./package.json": { | ||
| ".": { | ||
| "types": "./index.d.ts", | ||
| "types": "./types/ppwcode-ng-dialogs.d.ts", | ||
| "default": "./fesm2022/ppwcode-ng-dialogs.mjs" | ||
@@ -27,0 +27,0 @@ } |
-31
| import { ThemePalette } from '@angular/material/core'; | ||
| import * as i0 from '@angular/core'; | ||
| import { OnInit } from '@angular/core'; | ||
| import * as i1 from '@angular/cdk/drag-drop'; | ||
| interface ConfirmationDialogData { | ||
| titleKey: string; | ||
| bodyKey: string; | ||
| bodyParams: any; | ||
| titleParams: any; | ||
| confirmationKey: string; | ||
| cancelKey: string; | ||
| allowConfirmOnly?: boolean; | ||
| confirmationThemePalette?: ThemePalette; | ||
| } | ||
| declare class ConfirmationDialogComponent { | ||
| data: ConfirmationDialogData; | ||
| get confirmationThemePalette(): ThemePalette; | ||
| static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmationDialogComponent, never>; | ||
| static ɵcmp: i0.ɵɵComponentDeclaration<ConfirmationDialogComponent, "ppw-confirmation-dialog", never, {}, {}, never, never, true, never>; | ||
| } | ||
| declare class DraggableDialogDirective implements OnInit { | ||
| #private; | ||
| ngOnInit(): void; | ||
| static ɵfac: i0.ɵɵFactoryDeclaration<DraggableDialogDirective, never>; | ||
| static ɵdir: i0.ɵɵDirectiveDeclaration<DraggableDialogDirective, "[ppwDraggableDialog]", never, {}, {}, never, never, true, [{ directive: typeof i1.CdkDrag; inputs: {}; outputs: {}; }]>; | ||
| } | ||
| export { ConfirmationDialogComponent, DraggableDialogDirective }; | ||
| export type { ConfirmationDialogData }; |
16548
1.87%