@enigmatry/entry-components 15.1.1-preview.8 → 15.2.0
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.
- package/dialog/dialogs/error/entry-error-dialog-data.interface.d.ts +9 -0
- package/dialog/dialogs/error/entry-error-dialog.component.d.ts +15 -0
- package/dialog/entry-dialog.module.d.ts +7 -6
- package/dialog/entry-dialog.service.d.ts +8 -0
- package/dialog/public-api.d.ts +2 -0
- package/esm2020/dialog/dialogs/alert/entry-alert-dialog.component.mjs +2 -2
- package/esm2020/dialog/dialogs/confirm/entry-confirm-dialog.component.mjs +2 -2
- package/esm2020/dialog/dialogs/error/entry-error-dialog-data.interface.mjs +2 -0
- package/esm2020/dialog/dialogs/error/entry-error-dialog.component.mjs +46 -0
- package/esm2020/dialog/entry-dialog.module.mjs +10 -5
- package/esm2020/dialog/entry-dialog.service.mjs +12 -1
- package/esm2020/dialog/public-api.mjs +2 -1
- package/fesm2015/enigmatry-entry-components-dialog.mjs +60 -7
- package/fesm2015/enigmatry-entry-components-dialog.mjs.map +1 -1
- package/fesm2020/enigmatry-entry-components-dialog.mjs +58 -7
- package/fesm2020/enigmatry-entry-components-dialog.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IValidationProblemDetails } from '@enigmatry/entry-components/validation';
|
|
2
|
+
import { IEntryAlertDialogData } from '../alert/entry-alert-dialog-data.interface';
|
|
3
|
+
/**
|
|
4
|
+
* Error dialog data.
|
|
5
|
+
*/
|
|
6
|
+
export interface IEntryErrorDialogData extends IEntryAlertDialogData {
|
|
7
|
+
/** Errors to display */
|
|
8
|
+
errors: string[] | IValidationProblemDetails;
|
|
9
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { EntryDialogComponent } from '../entry-dialog.component';
|
|
2
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
3
|
+
import { IEntryErrorDialogData } from './entry-error-dialog-data.interface';
|
|
4
|
+
import { EntryDialogConfig } from '../../entry-dialog-config.model';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class EntryErrorDialogComponent extends EntryDialogComponent {
|
|
7
|
+
protected readonly mdDialogRef: MatDialogRef<EntryDialogComponent>;
|
|
8
|
+
readonly config: EntryDialogConfig;
|
|
9
|
+
data: IEntryErrorDialogData;
|
|
10
|
+
errors: string[];
|
|
11
|
+
constructor(mdDialogRef: MatDialogRef<EntryDialogComponent>, config: EntryDialogConfig, data: IEntryErrorDialogData);
|
|
12
|
+
private extractValidationErrors;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EntryErrorDialogComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EntryErrorDialogComponent, "entry-error-dialog", never, {}, {}, never, never, false, never>;
|
|
15
|
+
}
|
|
@@ -2,13 +2,14 @@ import * as i0 from "@angular/core";
|
|
|
2
2
|
import * as i1 from "./dialogs/entry-dialog.component";
|
|
3
3
|
import * as i2 from "./dialogs/alert/entry-alert-dialog.component";
|
|
4
4
|
import * as i3 from "./dialogs/confirm/entry-confirm-dialog.component";
|
|
5
|
-
import * as i4 from "
|
|
6
|
-
import * as i5 from "@angular/
|
|
7
|
-
import * as i6 from "@angular/material/
|
|
8
|
-
import * as i7 from "@angular/material/
|
|
9
|
-
import * as i8 from "@
|
|
5
|
+
import * as i4 from "./dialogs/error/entry-error-dialog.component";
|
|
6
|
+
import * as i5 from "@angular/common";
|
|
7
|
+
import * as i6 from "@angular/material/dialog";
|
|
8
|
+
import * as i7 from "@angular/material/icon";
|
|
9
|
+
import * as i8 from "@angular/material/button";
|
|
10
|
+
import * as i9 from "@enigmatry/entry-components/button";
|
|
10
11
|
export declare class EntryDialogModule {
|
|
11
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<EntryDialogModule, never>;
|
|
12
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<EntryDialogModule, [typeof i1.EntryDialogComponent, typeof i2.EntryAlertDialogComponent, typeof i3.EntryConfirmDialogComponent], [typeof
|
|
13
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<EntryDialogModule, [typeof i1.EntryDialogComponent, typeof i2.EntryAlertDialogComponent, typeof i3.EntryConfirmDialogComponent, typeof i4.EntryErrorDialogComponent], [typeof i5.CommonModule, typeof i6.MatDialogModule, typeof i7.MatIconModule, typeof i8.MatButtonModule, typeof i9.EntryButtonModule], [typeof i1.EntryDialogComponent, typeof i2.EntryAlertDialogComponent, typeof i3.EntryConfirmDialogComponent, typeof i4.EntryErrorDialogComponent]>;
|
|
13
14
|
static ɵinj: i0.ɵɵInjectorDeclaration<EntryDialogModule>;
|
|
14
15
|
}
|
|
@@ -5,6 +5,7 @@ import { IEntryAlertDialogData } from './dialogs/alert/entry-alert-dialog-data.i
|
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
6
6
|
import { IEntryConfirmDialogData } from './dialogs/confirm/entry-confirm-dialog-data.interface';
|
|
7
7
|
import { EntryDialogConfig } from './entry-dialog-config.model';
|
|
8
|
+
import { IEntryErrorDialogData } from './dialogs/error/entry-error-dialog-data.interface';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
/**
|
|
10
11
|
* Used to open built-in and custom entry dialogs.
|
|
@@ -27,6 +28,13 @@ export declare class EntryDialogService {
|
|
|
27
28
|
* @returns `true` if confirmed, `false` if canceled or closed, `undefined` if closed by clicking on backdrop or pressing escape
|
|
28
29
|
*/
|
|
29
30
|
openConfirm: (data: Partial<IEntryConfirmDialogData>) => Observable<boolean | undefined>;
|
|
31
|
+
/**
|
|
32
|
+
* Opens error dialog.
|
|
33
|
+
*
|
|
34
|
+
* @param data - Contains title, errors and optional confirm button text
|
|
35
|
+
* @returns `true` if confirmed, `undefined` if closed by clicking on backdrop or pressing escape
|
|
36
|
+
*/
|
|
37
|
+
openError: (data: Partial<IEntryErrorDialogData>) => Observable<true | undefined>;
|
|
30
38
|
/**
|
|
31
39
|
* Opens dialog with custom component.
|
|
32
40
|
*
|
package/dialog/public-api.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ export { EntryAlertDialogComponent } from './dialogs/alert/entry-alert-dialog.co
|
|
|
2
2
|
export { IEntryAlertDialogData } from './dialogs/alert/entry-alert-dialog-data.interface';
|
|
3
3
|
export { EntryConfirmDialogComponent } from './dialogs/confirm/entry-confirm-dialog.component';
|
|
4
4
|
export { IEntryConfirmDialogData } from './dialogs/confirm/entry-confirm-dialog-data.interface';
|
|
5
|
+
export { EntryErrorDialogComponent } from './dialogs/error/entry-error-dialog.component';
|
|
6
|
+
export { IEntryErrorDialogData } from './dialogs/error/entry-error-dialog-data.interface';
|
|
5
7
|
export { EntryDialogComponent } from './dialogs/entry-dialog.component';
|
|
6
8
|
export { EntryDialogButtonsAlignment } from './entry-dialog-buttons-alignment.type';
|
|
7
9
|
export { EntryDialogService } from './entry-dialog.service';
|
|
@@ -15,7 +15,7 @@ export class EntryAlertDialogComponent extends EntryDialogComponent {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
EntryAlertDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryAlertDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: ENTRY_DIALOG_CONFIG }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
18
|
-
EntryAlertDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: EntryAlertDialogComponent, selector: "entry-alert-dialog", usesInheritance: true, ngImport: i0, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p>{{data.message}}</p>\n</entry-dialog>",
|
|
18
|
+
EntryAlertDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: EntryAlertDialogComponent, selector: "entry-alert-dialog", usesInheritance: true, ngImport: i0, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p>{{data.message}}</p>\n</entry-dialog>", dependencies: [{ kind: "component", type: i2.EntryDialogComponent, selector: "entry-dialog", inputs: ["title", "buttonsAlignment", "confirmButtonText", "cancelButtonText", "hideButtons", "hideCancel", "hideClose", "disableConfirm", "buttonsTemplate", "confirm", "cancel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
19
19
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryAlertDialogComponent, decorators: [{
|
|
20
20
|
type: Component,
|
|
21
21
|
args: [{ selector: 'entry-alert-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p>{{data.message}}</p>\n</entry-dialog>" }]
|
|
@@ -26,4 +26,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
26
26
|
type: Inject,
|
|
27
27
|
args: [MAT_DIALOG_DATA]
|
|
28
28
|
}] }]; } });
|
|
29
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
29
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW50cnktYWxlcnQtZGlhbG9nLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzI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ZmlnOiBFbnRyeURpYWxvZ0NvbmZpZyxcbiAgICBASW5qZWN0KE1BVF9ESUFMT0dfREFUQSkgcHVibGljIGRhdGE6IElFbnRyeUFsZXJ0RGlhbG9nRGF0YSkge1xuICAgIHN1cGVyKG1kRGlhbG9nUmVmLCBjb25maWcpO1xuICB9XG59XG4iLCI8ZW50cnktZGlhbG9nXG4gICAgW3RpdGxlXT1cImRhdGEudGl0bGVcIlxuICAgIFtjb25maXJtQnV0dG9uVGV4dF09XCJkYXRhLmNvbmZpcm1UZXh0ID8/IGNvbmZpZy5jb25maXJtQnV0dG9uVGV4dFwiXG4gICAgW2J1dHRvbnNBbGlnbm1lbnRdPVwiZGF0YS5idXR0b25zQWxpZ25tZW50ID8/IGNvbmZpZy5idXR0b25zQWxpZ25tZW50XCJcbiAgICBbaGlkZUNsb3NlXT1cImRhdGEuaGlkZUNsb3NlID8/IGNvbmZpZy5oaWRlQ2xvc2VcIlxuICAgIFtoaWRlQ2FuY2VsXT1cInRydWVcIj5cbiAgICA8cD57e2RhdGEubWVzc2FnZX19PC9wPlxuPC9lbnRyeS1kaWFsb2c+Il19
|
|
@@ -15,7 +15,7 @@ export class EntryConfirmDialogComponent extends EntryDialogComponent {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
EntryConfirmDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryConfirmDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: ENTRY_DIALOG_CONFIG }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
18
|
-
EntryConfirmDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: EntryConfirmDialogComponent, selector: "entry-confirm-dialog", usesInheritance: true, ngImport: i0, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [cancelButtonText]=\"data.cancelText ?? config.cancelButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\">\n <p>{{data.message}}</p>\n</entry-dialog>",
|
|
18
|
+
EntryConfirmDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: EntryConfirmDialogComponent, selector: "entry-confirm-dialog", usesInheritance: true, ngImport: i0, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [cancelButtonText]=\"data.cancelText ?? config.cancelButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\">\n <p>{{data.message}}</p>\n</entry-dialog>", dependencies: [{ kind: "component", type: i2.EntryDialogComponent, selector: "entry-dialog", inputs: ["title", "buttonsAlignment", "confirmButtonText", "cancelButtonText", "hideButtons", "hideCancel", "hideClose", "disableConfirm", "buttonsTemplate", "confirm", "cancel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
19
19
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryConfirmDialogComponent, decorators: [{
|
|
20
20
|
type: Component,
|
|
21
21
|
args: [{ selector: 'entry-confirm-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [cancelButtonText]=\"data.cancelText ?? config.cancelButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\">\n <p>{{data.message}}</p>\n</entry-dialog>" }]
|
|
@@ -26,4 +26,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
26
26
|
type: Inject,
|
|
27
27
|
args: [MAT_DIALOG_DATA]
|
|
28
28
|
}] }]; } });
|
|
29
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
29
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW50cnktY29uZmlybS1kaWFsb2cuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9lbnRyeS1jb21wb25lbnRzL2RpYWxvZy9kaWFsb2dzL2NvbmZpcm0vZW50cnktY29uZmlybS1kaWFsb2cuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9lbnRyeS1jb21wb25lbnRzL2RpYWxvZy9kaWFsb2dzL2NvbmZpcm0vZW50cnktY29uZmlybS1kaWFsb2cuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLHVCQUF1QixFQUFFLFNBQVMsRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0UsT0FBTyxFQUFFLGVBQWUsRUFBZ0IsTUFBTSwwQkFBMEIsQ0FBQztBQUN6RSxPQUFPLEVBQUUsb0JBQW9CLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUVqRSxPQUFPLEVBQUUsbUJBQW1CLEVBQXFCLE1BQU0saUNBQWlDLENBQUM7Ozs7O0FBT3pGLE1BQU0sT0FBTywyQkFBNEIsU0FBUSxvQkFBb0I7SUFDbkUsWUFDcUIsV0FBK0MsRUFDckIsTUFBeUIsRUFDcEMsSUFBNkI7UUFDL0QsS0FBSyxDQUFDLFdBQVcsRUFBRSxNQUFNLENBQUMsQ0FBQztRQUhSLGdCQUFXLEdBQVgsV0FBVyxDQUFvQztRQUNyQixXQUFNLEdBQU4sTUFBTSxDQUFtQjtRQUNwQyxTQUFJLEdBQUosSUFBSSxDQUF5QjtJQUVqRSxDQUFDOzt5SEFOVSwyQkFBM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4vLi4vbGlicy9lbnRyeS1jb21wb25lbnRzL2RpYWxvZy9kaWFsb2dzL2Vycm9yL2VudHJ5LWVycm9yLWRpYWxvZy1kYXRhLmludGVyZmFjZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSVZhbGlkYXRpb25Qcm9ibGVtRGV0YWlscyB9IGZyb20gJ0BlbmlnbWF0cnkvZW50cnktY29tcG9uZW50cy92YWxpZGF0aW9uJztcbmltcG9ydCB7IElFbnRyeUFsZXJ0RGlhbG9nRGF0YSB9IGZyb20gJy4uL2FsZXJ0L2VudHJ5LWFsZXJ0LWRpYWxvZy1kYXRhLmludGVyZmFjZSc7XG5cbi8qKlxuICogRXJyb3IgZGlhbG9nIGRhdGEuXG4gKi9cbmV4cG9ydCBpbnRlcmZhY2UgSUVudHJ5RXJyb3JEaWFsb2dEYXRhIGV4dGVuZHMgSUVudHJ5QWxlcnREaWFsb2dEYXRhIHtcbiAgLyoqIEVycm9ycyB0byBkaXNwbGF5ICovXG4gIGVycm9yczogc3RyaW5nW10gfCBJVmFsaWRhdGlvblByb2JsZW1EZXRhaWxzO1xufVxuIl19
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';
|
|
2
|
+
import { EntryDialogComponent } from '../entry-dialog.component';
|
|
3
|
+
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
4
|
+
import { ENTRY_DIALOG_CONFIG } from '../../entry-dialog-config.model';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
import * as i1 from "@angular/material/dialog";
|
|
7
|
+
import * as i2 from "@angular/common";
|
|
8
|
+
import * as i3 from "../entry-dialog.component";
|
|
9
|
+
import * as i4 from "../../entry-dialog-config.model";
|
|
10
|
+
export class EntryErrorDialogComponent extends EntryDialogComponent {
|
|
11
|
+
constructor(mdDialogRef, config, data) {
|
|
12
|
+
super(mdDialogRef, config);
|
|
13
|
+
this.mdDialogRef = mdDialogRef;
|
|
14
|
+
this.config = config;
|
|
15
|
+
this.data = data;
|
|
16
|
+
this.errors = [];
|
|
17
|
+
this.extractValidationErrors();
|
|
18
|
+
}
|
|
19
|
+
extractValidationErrors() {
|
|
20
|
+
if (Array.isArray(this.data.errors)) {
|
|
21
|
+
this.errors = this.data.errors;
|
|
22
|
+
}
|
|
23
|
+
else if (this.data.errors.errors) {
|
|
24
|
+
const validationErrors = this.data.errors.errors;
|
|
25
|
+
this.errors = Object.entries(validationErrors)
|
|
26
|
+
.map(values => values[1])
|
|
27
|
+
.reduce((a, b) => a.concat(b), []);
|
|
28
|
+
}
|
|
29
|
+
else if (this.data.message) {
|
|
30
|
+
this.errors = [this.data.message];
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
EntryErrorDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryErrorDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: ENTRY_DIALOG_CONFIG }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
35
|
+
EntryErrorDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: EntryErrorDialogComponent, selector: "entry-error-dialog", usesInheritance: true, ngImport: i0, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p *ngFor=\"let error of errors\">{{error}}</p>\n</entry-dialog>", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i3.EntryDialogComponent, selector: "entry-dialog", inputs: ["title", "buttonsAlignment", "confirmButtonText", "cancelButtonText", "hideButtons", "hideCancel", "hideClose", "disableConfirm", "buttonsTemplate", "confirm", "cancel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryErrorDialogComponent, decorators: [{
|
|
37
|
+
type: Component,
|
|
38
|
+
args: [{ selector: 'entry-error-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p *ngFor=\"let error of errors\">{{error}}</p>\n</entry-dialog>" }]
|
|
39
|
+
}], ctorParameters: function () { return [{ type: i1.MatDialogRef }, { type: i4.EntryDialogConfig, decorators: [{
|
|
40
|
+
type: Inject,
|
|
41
|
+
args: [ENTRY_DIALOG_CONFIG]
|
|
42
|
+
}] }, { type: undefined, decorators: [{
|
|
43
|
+
type: Inject,
|
|
44
|
+
args: [MAT_DIALOG_DATA]
|
|
45
|
+
}] }]; } });
|
|
46
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW50cnktZXJyb3ItZGlhbG9nLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvZW50cnktY29tcG9uZW50cy9kaWFsb2cvZGlhbG9ncy9lcnJvci9lbnRyeS1lcnJvci1kaWFsb2cuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9lbnRyeS1jb21wb25lbnRzL2RpYWxvZy9kaWFsb2dzL2Vycm9yL2VudHJ5LWVycm9yLWRpYWxvZy5jb21wb25lbnQuaHRtbCJdLCJuYW1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4gICAgfSBlbHNlIGlmICh0aGlzLmRhdGEuZXJyb3JzLmVycm9ycykge1xuICAgICAgY29uc3QgdmFsaWRhdGlvbkVycm9ycyA9IHRoaXMuZGF0YS5lcnJvcnMuZXJyb3JzO1xuICAgICAgdGhpcy5lcnJvcnMgPSBPYmplY3QuZW50cmllcyh2YWxpZGF0aW9uRXJyb3JzKVxuICAgICAgICAubWFwKHZhbHVlcyA9PiB2YWx1ZXNbMV0pXG4gICAgICAgIC5yZWR1Y2UoKGEsIGIpID0+IGEuY29uY2F0KGIpLCBbXSk7XG4gICAgfSBlbHNlIGlmICh0aGlzLmRhdGEubWVzc2FnZSkge1xuICAgICAgdGhpcy5lcnJvcnMgPSBbdGhpcy5kYXRhLm1lc3NhZ2VdO1xuICAgIH1cbiAgfVxufVxuIiwiPGVudHJ5LWRpYWxvZ1xuICAgIFt0aXRsZV09XCJkYXRhLnRpdGxlXCJcbiAgICBbY29uZmlybUJ1dHRvblRleHRdPVwiZGF0YS5jb25maXJtVGV4dCA/PyBjb25maWcuY29uZmlybUJ1dHRvblRleHRcIlxuICAgIFtidXR0b25zQWxpZ25tZW50XT1cImRhdGEuYnV0dG9uc0FsaWdubWVudCA/PyBjb25maWcuYnV0dG9uc0FsaWdubWVudFwiXG4gICAgW2hpZGVDbG9zZV09XCJkYXRhLmhpZGVDbG9zZSA/PyBjb25maWcuaGlkZUNsb3NlXCJcbiAgICBbaGlkZUNhbmNlbF09XCJ0cnVlXCI+XG4gICAgPHAgKm5nRm9yPVwibGV0IGVycm9yIG9mIGVycm9yc1wiPnt7ZXJyb3J9fTwvcD5cbjwvZW50cnktZGlhbG9nPiJdfQ==
|
|
@@ -8,19 +8,22 @@ import { EntryConfirmDialogComponent } from './dialogs/confirm/entry-confirm-dia
|
|
|
8
8
|
import { EntryDialogComponent } from './dialogs/entry-dialog.component';
|
|
9
9
|
import { EntryButtonModule } from '@enigmatry/entry-components/button';
|
|
10
10
|
import { EntryDialogService } from './entry-dialog.service';
|
|
11
|
+
import { EntryErrorDialogComponent } from './dialogs/error/entry-error-dialog.component';
|
|
11
12
|
import * as i0 from "@angular/core";
|
|
12
13
|
export class EntryDialogModule {
|
|
13
14
|
}
|
|
14
15
|
EntryDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
15
16
|
EntryDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: EntryDialogModule, declarations: [EntryDialogComponent,
|
|
16
17
|
EntryAlertDialogComponent,
|
|
17
|
-
EntryConfirmDialogComponent
|
|
18
|
+
EntryConfirmDialogComponent,
|
|
19
|
+
EntryErrorDialogComponent], imports: [CommonModule,
|
|
18
20
|
MatDialogModule,
|
|
19
21
|
MatIconModule,
|
|
20
22
|
MatButtonModule,
|
|
21
23
|
EntryButtonModule], exports: [EntryDialogComponent,
|
|
22
24
|
EntryAlertDialogComponent,
|
|
23
|
-
EntryConfirmDialogComponent
|
|
25
|
+
EntryConfirmDialogComponent,
|
|
26
|
+
EntryErrorDialogComponent] });
|
|
24
27
|
EntryDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryDialogModule, providers: [EntryDialogService], imports: [CommonModule,
|
|
25
28
|
MatDialogModule,
|
|
26
29
|
MatIconModule,
|
|
@@ -32,7 +35,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
32
35
|
declarations: [
|
|
33
36
|
EntryDialogComponent,
|
|
34
37
|
EntryAlertDialogComponent,
|
|
35
|
-
EntryConfirmDialogComponent
|
|
38
|
+
EntryConfirmDialogComponent,
|
|
39
|
+
EntryErrorDialogComponent
|
|
36
40
|
],
|
|
37
41
|
imports: [
|
|
38
42
|
CommonModule,
|
|
@@ -44,9 +48,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
44
48
|
exports: [
|
|
45
49
|
EntryDialogComponent,
|
|
46
50
|
EntryAlertDialogComponent,
|
|
47
|
-
EntryConfirmDialogComponent
|
|
51
|
+
EntryConfirmDialogComponent,
|
|
52
|
+
EntryErrorDialogComponent
|
|
48
53
|
],
|
|
49
54
|
providers: [EntryDialogService]
|
|
50
55
|
}]
|
|
51
56
|
}] });
|
|
52
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
57
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW50cnktZGlhbG9nLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMvZW50cnktY29tcG9uZW50cy9kaWFsb2cvZW50cnktZGlhbG9nLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMvQyxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFDM0QsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBQ3ZELE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUMzRCxPQUFPLEVBQUUseUJBQXlCLEVBQUUsTUFBTSw4Q0FBOEMsQ0FBQztBQUN6RixPQUFPLEVBQUUsMkJBQTJCLEVBQUUsTUFBTSxrREFBa0QsQ0FBQztBQUMvRixPQUFPLEVBQUUsb0JBQW9CLEVBQUUsTUFBTSxrQ0FBa0MsQ0FBQztBQUN4RSxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxvQ0FBb0MsQ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5Q29uZmlybURpYWxvZ0NvbXBvbmVudCxcbiAgICBFbnRyeUVycm9yRGlhbG9nQ29tcG9uZW50XG4gIF0sXG4gIGltcG9ydHM6IFtcbiAgICBDb21tb25Nb2R1bGUsXG4gICAgTWF0RGlhbG9nTW9kdWxlLFxuICAgIE1hdEljb25Nb2R1bGUsXG4gICAgTWF0QnV0dG9uTW9kdWxlLFxuICAgIEVudHJ5QnV0dG9uTW9kdWxlXG4gIF0sXG4gIGV4cG9ydHM6IFtcbiAgICBFbnRyeURpYWxvZ0NvbXBvbmVudCxcbiAgICBFbnRyeUFsZXJ0RGlhbG9nQ29tcG9uZW50LFxuICAgIEVudHJ5Q29uZmlybURpYWxvZ0NvbXBvbmVudCxcbiAgICBFbnRyeUVycm9yRGlhbG9nQ29tcG9uZW50XG4gIF0sXG4gIHByb3ZpZGVyczogW0VudHJ5RGlhbG9nU2VydmljZV1cbn0pXG5leHBvcnQgY2xhc3MgRW50cnlEaWFsb2dNb2R1bGUgeyB9XG4iXX0=
|
|
@@ -4,6 +4,7 @@ import { take } from 'rxjs/operators';
|
|
|
4
4
|
import { EntryAlertDialogComponent } from './dialogs/alert/entry-alert-dialog.component';
|
|
5
5
|
import { EntryConfirmDialogComponent } from './dialogs/confirm/entry-confirm-dialog.component';
|
|
6
6
|
import { ENTRY_DIALOG_CONFIG } from './entry-dialog-config.model';
|
|
7
|
+
import { EntryErrorDialogComponent } from './dialogs/error/entry-error-dialog.component';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
import * as i1 from "@angular/material/dialog";
|
|
9
10
|
import * as i2 from "./entry-dialog-config.model";
|
|
@@ -34,6 +35,16 @@ export class EntryDialogService {
|
|
|
34
35
|
data.disableClose = data.disableClose === undefined ? this.config.disableClose : data.disableClose;
|
|
35
36
|
return this.open(EntryConfirmDialogComponent, data, data.disableClose);
|
|
36
37
|
};
|
|
38
|
+
/**
|
|
39
|
+
* Opens error dialog.
|
|
40
|
+
*
|
|
41
|
+
* @param data - Contains title, errors and optional confirm button text
|
|
42
|
+
* @returns `true` if confirmed, `undefined` if closed by clicking on backdrop or pressing escape
|
|
43
|
+
*/
|
|
44
|
+
this.openError = (data) => {
|
|
45
|
+
data.disableClose = data.disableClose === undefined ? this.config.disableClose : data.disableClose;
|
|
46
|
+
return this.open(EntryErrorDialogComponent, data, data.disableClose);
|
|
47
|
+
};
|
|
37
48
|
/**
|
|
38
49
|
* Opens dialog with custom component.
|
|
39
50
|
*
|
|
@@ -72,4 +83,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
72
83
|
type: Inject,
|
|
73
84
|
args: [ENTRY_DIALOG_CONFIG]
|
|
74
85
|
}] }, { type: i1.MatDialog }]; } });
|
|
75
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
86
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW50cnktZGlhbG9nLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzL2VudHJ5LWNvbXBvbmVudHMvZGlhbG9nL2VudHJ5LWRpYWxvZy5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxNQUFNLEVBQUUsVUFBVSxFQUFRLE1BQU0sZUFBZSxDQUFDO0FBQ3pELE9BQU8sRUFBYSxlQUFlLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUV0RSxPQUFPLEVBQUUsSUFBSSxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFFdEMsT0FBTyxFQUFFLHlCQUF5QixFQUFFLE1BQU0sOENBQThDLENBQUM7QUFFekYsT0FBTyxFQUFFLDJCQUEyQixFQUFFLE1BQU0sa0RBQWtELENBQUM7QUFFL0YsT0FBTyxFQUFFLG1CQUFtQixFQUFxQixNQUFNLDZCQUE2QixDQUFDO0FBRXJG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vKipcbiAgICogQ2xvc2VzIGFsbCBvcGVuZWQgZGlhbG9ncy5cbiAgICovXG4gIGNsb3NlQWxsID0gKCk6IHZvaWQgPT4gdGhpcy5tYXREaWFsb2cuY2xvc2VBbGwoKTtcblxuICBwcml2YXRlIHNldFBhbmVsQ2xhc3NGb3IgPSA8VD4oY29uZmlndXJhdGlvbjogTWF0RGlhbG9nQ29uZmlnPFQ+LCBjc3NDbGFzczogc3RyaW5nKSA9PiB7XG4gICAgY29uZmlndXJhdGlvbi5wYW5lbENsYXNzID0gWydkaWFsb2ctY29udGFpbmVyJywgY3NzQ2xhc3NdO1xuICB9O1xufVxuIl19
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export { EntryAlertDialogComponent } from './dialogs/alert/entry-alert-dialog.component';
|
|
2
2
|
export { EntryConfirmDialogComponent } from './dialogs/confirm/entry-confirm-dialog.component';
|
|
3
|
+
export { EntryErrorDialogComponent } from './dialogs/error/entry-error-dialog.component';
|
|
3
4
|
export { EntryDialogComponent } from './dialogs/entry-dialog.component';
|
|
4
5
|
export { EntryDialogService } from './entry-dialog.service';
|
|
5
6
|
export { EntryDialogModule } from './entry-dialog.module';
|
|
6
7
|
export { ENTRY_DIALOG_CONFIG, EntryDialogConfig, provideEntryDialogConfig } from './entry-dialog-config.model';
|
|
7
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
8
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMvZW50cnktY29tcG9uZW50cy9kaWFsb2cvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQUUseUJBQXlCLEVBQUUsTUFBTSw4Q0FBOEMsQ0FBQztBQUd6RixPQUFPLEVBQUUsMkJBQTJCLEVBQUUsTUFBTSxrREFBa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Z3MvZXJyb3IvZW50cnktZXJyb3ItZGlhbG9nLWRhdGEuaW50ZXJmYWNlJztcblxuZXhwb3J0IHsgRW50cnlEaWFsb2dDb21wb25lbnQgfSBmcm9tICcuL2RpYWxvZ3MvZW50cnktZGlhbG9nLmNvbXBvbmVudCc7XG5cbmV4cG9ydCB7IEVudHJ5RGlhbG9nQnV0dG9uc0FsaWdubWVudCB9IGZyb20gJy4vZW50cnktZGlhbG9nLWJ1dHRvbnMtYWxpZ25tZW50LnR5cGUnO1xuZXhwb3J0IHsgRW50cnlEaWFsb2dTZXJ2aWNlIH0gZnJvbSAnLi9lbnRyeS1kaWFsb2cuc2VydmljZSc7XG5leHBvcnQgeyBFbnRyeURpYWxvZ01vZHVsZSB9IGZyb20gJy4vZW50cnktZGlhbG9nLm1vZHVsZSc7XG5cbmV4cG9ydCB7IEVOVFJZX0RJQUxPR19DT05GSUcsIEVudHJ5RGlhbG9nQ29uZmlnLCBwcm92aWRlRW50cnlEaWFsb2dDb25maWcgfSBmcm9tICcuL2VudHJ5LWRpYWxvZy1jb25maWcubW9kZWwnO1xuIl19
|
|
@@ -126,7 +126,7 @@ class EntryAlertDialogComponent extends EntryDialogComponent {
|
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
EntryAlertDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryAlertDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: ENTRY_DIALOG_CONFIG }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
129
|
-
EntryAlertDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: EntryAlertDialogComponent, selector: "entry-alert-dialog", usesInheritance: true, ngImport: i0, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p>{{data.message}}</p>\n</entry-dialog>",
|
|
129
|
+
EntryAlertDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: EntryAlertDialogComponent, selector: "entry-alert-dialog", usesInheritance: true, ngImport: i0, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p>{{data.message}}</p>\n</entry-dialog>", dependencies: [{ kind: "component", type: EntryDialogComponent, selector: "entry-dialog", inputs: ["title", "buttonsAlignment", "confirmButtonText", "cancelButtonText", "hideButtons", "hideCancel", "hideClose", "disableConfirm", "buttonsTemplate", "confirm", "cancel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
130
130
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryAlertDialogComponent, decorators: [{
|
|
131
131
|
type: Component,
|
|
132
132
|
args: [{ selector: 'entry-alert-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p>{{data.message}}</p>\n</entry-dialog>" }]
|
|
@@ -149,7 +149,7 @@ class EntryConfirmDialogComponent extends EntryDialogComponent {
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
EntryConfirmDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryConfirmDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: ENTRY_DIALOG_CONFIG }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
152
|
-
EntryConfirmDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: EntryConfirmDialogComponent, selector: "entry-confirm-dialog", usesInheritance: true, ngImport: i0, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [cancelButtonText]=\"data.cancelText ?? config.cancelButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\">\n <p>{{data.message}}</p>\n</entry-dialog>",
|
|
152
|
+
EntryConfirmDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: EntryConfirmDialogComponent, selector: "entry-confirm-dialog", usesInheritance: true, ngImport: i0, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [cancelButtonText]=\"data.cancelText ?? config.cancelButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\">\n <p>{{data.message}}</p>\n</entry-dialog>", dependencies: [{ kind: "component", type: EntryDialogComponent, selector: "entry-dialog", inputs: ["title", "buttonsAlignment", "confirmButtonText", "cancelButtonText", "hideButtons", "hideCancel", "hideClose", "disableConfirm", "buttonsTemplate", "confirm", "cancel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
153
153
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryConfirmDialogComponent, decorators: [{
|
|
154
154
|
type: Component,
|
|
155
155
|
args: [{ selector: 'entry-confirm-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [cancelButtonText]=\"data.cancelText ?? config.cancelButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\">\n <p>{{data.message}}</p>\n</entry-dialog>" }]
|
|
@@ -163,6 +163,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
163
163
|
}] }];
|
|
164
164
|
} });
|
|
165
165
|
|
|
166
|
+
class EntryErrorDialogComponent extends EntryDialogComponent {
|
|
167
|
+
constructor(mdDialogRef, config, data) {
|
|
168
|
+
super(mdDialogRef, config);
|
|
169
|
+
this.mdDialogRef = mdDialogRef;
|
|
170
|
+
this.config = config;
|
|
171
|
+
this.data = data;
|
|
172
|
+
this.errors = [];
|
|
173
|
+
this.extractValidationErrors();
|
|
174
|
+
}
|
|
175
|
+
extractValidationErrors() {
|
|
176
|
+
if (Array.isArray(this.data.errors)) {
|
|
177
|
+
this.errors = this.data.errors;
|
|
178
|
+
}
|
|
179
|
+
else if (this.data.errors.errors) {
|
|
180
|
+
const validationErrors = this.data.errors.errors;
|
|
181
|
+
this.errors = Object.entries(validationErrors)
|
|
182
|
+
.map(values => values[1])
|
|
183
|
+
.reduce((a, b) => a.concat(b), []);
|
|
184
|
+
}
|
|
185
|
+
else if (this.data.message) {
|
|
186
|
+
this.errors = [this.data.message];
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
EntryErrorDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryErrorDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: ENTRY_DIALOG_CONFIG }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
191
|
+
EntryErrorDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: EntryErrorDialogComponent, selector: "entry-error-dialog", usesInheritance: true, ngImport: i0, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p *ngFor=\"let error of errors\">{{error}}</p>\n</entry-dialog>", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: EntryDialogComponent, selector: "entry-dialog", inputs: ["title", "buttonsAlignment", "confirmButtonText", "cancelButtonText", "hideButtons", "hideCancel", "hideClose", "disableConfirm", "buttonsTemplate", "confirm", "cancel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
192
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryErrorDialogComponent, decorators: [{
|
|
193
|
+
type: Component,
|
|
194
|
+
args: [{ selector: 'entry-error-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p *ngFor=\"let error of errors\">{{error}}</p>\n</entry-dialog>" }]
|
|
195
|
+
}], ctorParameters: function () {
|
|
196
|
+
return [{ type: i1.MatDialogRef }, { type: EntryDialogConfig, decorators: [{
|
|
197
|
+
type: Inject,
|
|
198
|
+
args: [ENTRY_DIALOG_CONFIG]
|
|
199
|
+
}] }, { type: undefined, decorators: [{
|
|
200
|
+
type: Inject,
|
|
201
|
+
args: [MAT_DIALOG_DATA]
|
|
202
|
+
}] }];
|
|
203
|
+
} });
|
|
204
|
+
|
|
166
205
|
/**
|
|
167
206
|
* Used to open built-in and custom entry dialogs.
|
|
168
207
|
*/
|
|
@@ -190,6 +229,16 @@ class EntryDialogService {
|
|
|
190
229
|
data.disableClose = data.disableClose === undefined ? this.config.disableClose : data.disableClose;
|
|
191
230
|
return this.open(EntryConfirmDialogComponent, data, data.disableClose);
|
|
192
231
|
};
|
|
232
|
+
/**
|
|
233
|
+
* Opens error dialog.
|
|
234
|
+
*
|
|
235
|
+
* @param data - Contains title, errors and optional confirm button text
|
|
236
|
+
* @returns `true` if confirmed, `undefined` if closed by clicking on backdrop or pressing escape
|
|
237
|
+
*/
|
|
238
|
+
this.openError = (data) => {
|
|
239
|
+
data.disableClose = data.disableClose === undefined ? this.config.disableClose : data.disableClose;
|
|
240
|
+
return this.open(EntryErrorDialogComponent, data, data.disableClose);
|
|
241
|
+
};
|
|
193
242
|
/**
|
|
194
243
|
* Opens dialog with custom component.
|
|
195
244
|
*
|
|
@@ -236,13 +285,15 @@ class EntryDialogModule {
|
|
|
236
285
|
EntryDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
237
286
|
EntryDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: EntryDialogModule, declarations: [EntryDialogComponent,
|
|
238
287
|
EntryAlertDialogComponent,
|
|
239
|
-
EntryConfirmDialogComponent
|
|
288
|
+
EntryConfirmDialogComponent,
|
|
289
|
+
EntryErrorDialogComponent], imports: [CommonModule,
|
|
240
290
|
MatDialogModule,
|
|
241
291
|
MatIconModule,
|
|
242
292
|
MatButtonModule,
|
|
243
293
|
EntryButtonModule], exports: [EntryDialogComponent,
|
|
244
294
|
EntryAlertDialogComponent,
|
|
245
|
-
EntryConfirmDialogComponent
|
|
295
|
+
EntryConfirmDialogComponent,
|
|
296
|
+
EntryErrorDialogComponent] });
|
|
246
297
|
EntryDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryDialogModule, providers: [EntryDialogService], imports: [CommonModule,
|
|
247
298
|
MatDialogModule,
|
|
248
299
|
MatIconModule,
|
|
@@ -254,7 +305,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
254
305
|
declarations: [
|
|
255
306
|
EntryDialogComponent,
|
|
256
307
|
EntryAlertDialogComponent,
|
|
257
|
-
EntryConfirmDialogComponent
|
|
308
|
+
EntryConfirmDialogComponent,
|
|
309
|
+
EntryErrorDialogComponent
|
|
258
310
|
],
|
|
259
311
|
imports: [
|
|
260
312
|
CommonModule,
|
|
@@ -266,7 +318,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
266
318
|
exports: [
|
|
267
319
|
EntryDialogComponent,
|
|
268
320
|
EntryAlertDialogComponent,
|
|
269
|
-
EntryConfirmDialogComponent
|
|
321
|
+
EntryConfirmDialogComponent,
|
|
322
|
+
EntryErrorDialogComponent
|
|
270
323
|
],
|
|
271
324
|
providers: [EntryDialogService]
|
|
272
325
|
}]
|
|
@@ -276,5 +329,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
276
329
|
* Generated bundle index. Do not edit.
|
|
277
330
|
*/
|
|
278
331
|
|
|
279
|
-
export { ENTRY_DIALOG_CONFIG, EntryAlertDialogComponent, EntryConfirmDialogComponent, EntryDialogComponent, EntryDialogConfig, EntryDialogModule, EntryDialogService, provideEntryDialogConfig };
|
|
332
|
+
export { ENTRY_DIALOG_CONFIG, EntryAlertDialogComponent, EntryConfirmDialogComponent, EntryDialogComponent, EntryDialogConfig, EntryDialogModule, EntryDialogService, EntryErrorDialogComponent, provideEntryDialogConfig };
|
|
280
333
|
//# sourceMappingURL=enigmatry-entry-components-dialog.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enigmatry-entry-components-dialog.mjs","sources":["../../../../libs/entry-components/dialog/entry-dialog-config.model.ts","../../../../libs/entry-components/dialog/dialogs/entry-dialog.component.ts","../../../../libs/entry-components/dialog/dialogs/entry-dialog.component.html","../../../../libs/entry-components/dialog/dialogs/alert/entry-alert-dialog.component.ts","../../../../libs/entry-components/dialog/dialogs/alert/entry-alert-dialog.component.html","../../../../libs/entry-components/dialog/dialogs/confirm/entry-confirm-dialog.component.ts","../../../../libs/entry-components/dialog/dialogs/confirm/entry-confirm-dialog.component.html","../../../../libs/entry-components/dialog/entry-dialog.service.ts","../../../../libs/entry-components/dialog/entry-dialog.module.ts","../../../../libs/entry-components/dialog/enigmatry-entry-components-dialog.ts"],"sourcesContent":["import { createInjectionToken, provideConfig } from '@enigmatry/entry-components/common';\nimport { EntryDialogButtonsAlignment } from './entry-dialog-buttons-alignment.type';\nimport { Provider } from '@angular/core';\n\n/**\n * Used to provide default configurations on module level.\n */\nexport class EntryDialogConfig {\n /** Confirm button label (default 'Ok') */\n confirmButtonText: string;\n /** Cancel button label (default 'Cancel') */\n cancelButtonText: string;\n /** Dialog buttons horizontal alignment (default 'align-right') */\n buttonsAlignment: EntryDialogButtonsAlignment;\n /** Determines if close button is visible (default is true) */\n hideClose: boolean;\n /** Disable closing dialog when pressing escape or clicking on backdrop (default false) */\n disableClose: boolean;\n\n constructor(config: Partial<EntryDialogConfig> = {}) {\n this.confirmButtonText = config.confirmButtonText ?? 'Ok';\n this.cancelButtonText = config.cancelButtonText ?? 'Cancel';\n this.buttonsAlignment = config.buttonsAlignment ?? 'end';\n this.hideClose = config.hideClose ?? true;\n this.disableClose = config.disableClose ?? false;\n }\n}\n\n/**\n * Entry dialog injection token of EntryDialogConfig type containing dialog default configurations.\n *\n * Defaults:\n * - confirmButtonText: 'Ok'\n * - cancelButtonText: 'Cancel'\n * - buttonsAlignment: 'end'\n * - hideClose: true\n * - disableClose: false\n */\nexport const ENTRY_DIALOG_CONFIG = createInjectionToken(new EntryDialogConfig());\n\n/**\n * Can be used to provide entry dialog configuration.\n */\nexport function provideEntryDialogConfig(config: Partial<EntryDialogConfig>): Provider {\n return provideConfig(ENTRY_DIALOG_CONFIG, () => new EntryDialogConfig(config));\n}\n","import { Component, Inject, Input, TemplateRef } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\nimport { Observable, of } from 'rxjs';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from '../entry-dialog-config.model';\nimport { EntryDialogButtonsAlignment } from '../entry-dialog-buttons-alignment.type';\n\n/**\n * Base Entry dialog component. Must be extended when building custom dialogs.\n *\n * @example\n * ```html\n * <entry-dialog title=\"TITLE\"><p>Dialog content</p></entry-dialog>\n * ```\n */\n@Component({\n selector: 'entry-dialog',\n templateUrl: './entry-dialog.component.html',\n styleUrls: ['./entry-dialog.component.scss']\n})\nexport class EntryDialogComponent {\n /** Dialog header title */\n @Input() title: string;\n /** Dialog buttons horizontal alignment */\n @Input() buttonsAlignment: EntryDialogButtonsAlignment = this.config.buttonsAlignment;\n /** Confirm button label */\n @Input() confirmButtonText = this.config.confirmButtonText;\n /** Cancel button label */\n @Input() cancelButtonText = this.config.cancelButtonText;\n /** Show or hide dialog buttons */\n @Input() hideButtons: boolean;\n /** Show or hide dialog cancel button */\n @Input() hideCancel: boolean;\n /** Show or hide dialog close button */\n @Input() hideClose: boolean = this.config.hideClose;\n /** Enable or disable dialog confirm button */\n @Input() disableConfirm: boolean;\n /** Provide custom buttons template */\n @Input() buttonsTemplate: TemplateRef<any> | null | undefined;\n\n constructor(\n protected readonly mdDialogRef: MatDialogRef<EntryDialogComponent>,\n @Inject(ENTRY_DIALOG_CONFIG) protected readonly config: EntryDialogConfig) { }\n\n @Input() confirm: () => Observable<unknown> = () => of(true);\n @Input() cancel = () => this.close(false);\n\n // @HostListener('keydown.esc')\n // onEsc = () => {\n // if (!this.disableClose) {\n // this.cancel();\n // }\n // };\n\n onSubmit = () =>\n this.confirm().subscribe({\n next: closeDialog => {\n if (closeDialog) {\n this.close(closeDialog);\n }\n }\n });\n\n close = (value: unknown = true) => this.mdDialogRef.close(value);\n}\n","<div class=\"entry-dialog\">\n <div class=\"dialog-header\">\n <h1 class=\"title\" [ngClass]=\"{'without-close-icon': hideClose === true}\" mat-dialog-title>{{ title }}</h1>\n <button mat-icon-button *ngIf=\"!hideClose\" type=\"button\" class=\"close-button\" (click)=\"cancel()\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n\n <mat-dialog-content class=\"dialog-content\" [ngClass]=\"{'with-actions': !hideButtons}\">\n <ng-content></ng-content>\n </mat-dialog-content>\n\n <mat-dialog-actions class=\"dialog-actions\" [align]=\"buttonsAlignment\" *ngIf=\"!hideButtons\">\n <ng-container *ngIf=\"buttonsTemplate; then buttonsTemplate; else defaultButtonsTemplate\">\n </ng-container>\n </mat-dialog-actions>\n \n <ng-template #defaultButtonsTemplate>\n <button cdkFocusInitial mat-button entry-submit-button (click)=\"onSubmit()\">\n <span>{{confirmButtonText}}</span>\n </button>\n <button *ngIf=\"!hideCancel\" mat-button entry-cancel-button (click)=\"cancel()\">\n <span>{{cancelButtonText}}</span>\n </button>\n </ng-template>\n</div>","import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';\nimport { EntryDialogComponent } from '../entry-dialog.component';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { IEntryAlertDialogData } from './entry-alert-dialog-data.interface';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from '../../entry-dialog-config.model';\n\n@Component({\n selector: 'entry-alert-dialog',\n templateUrl: './entry-alert-dialog.component.html',\n styleUrls: ['./entry-alert-dialog.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class EntryAlertDialogComponent extends EntryDialogComponent {\n constructor(\n protected readonly mdDialogRef: MatDialogRef<EntryDialogComponent>,\n @Inject(ENTRY_DIALOG_CONFIG) public readonly config: EntryDialogConfig,\n @Inject(MAT_DIALOG_DATA) public data: IEntryAlertDialogData) {\n super(mdDialogRef, config);\n }\n}\n","<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p>{{data.message}}</p>\n</entry-dialog>","import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { EntryDialogComponent } from '../entry-dialog.component';\nimport { IEntryConfirmDialogData } from './entry-confirm-dialog-data.interface';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from '../../entry-dialog-config.model';\n\n@Component({\n selector: 'entry-confirm-dialog',\n templateUrl: './entry-confirm-dialog.component.html',\n styleUrls: ['./entry-confirm-dialog.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class EntryConfirmDialogComponent extends EntryDialogComponent {\n constructor(\n protected readonly mdDialogRef: MatDialogRef<EntryDialogComponent>,\n @Inject(ENTRY_DIALOG_CONFIG) public readonly config: EntryDialogConfig,\n @Inject(MAT_DIALOG_DATA) readonly data: IEntryConfirmDialogData) {\n super(mdDialogRef, config);\n }\n}\n","<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [cancelButtonText]=\"data.cancelText ?? config.cancelButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\">\n <p>{{data.message}}</p>\n</entry-dialog>","import { Inject, Injectable, Type } from '@angular/core';\nimport { MatDialog, MatDialogConfig } from '@angular/material/dialog';\nimport { EntryDialogComponent } from './dialogs/entry-dialog.component';\nimport { take } from 'rxjs/operators';\nimport { IEntryAlertDialogData } from './dialogs/alert/entry-alert-dialog-data.interface';\nimport { EntryAlertDialogComponent } from './dialogs/alert/entry-alert-dialog.component';\nimport { Observable } from 'rxjs';\nimport { EntryConfirmDialogComponent } from './dialogs/confirm/entry-confirm-dialog.component';\nimport { IEntryConfirmDialogData } from './dialogs/confirm/entry-confirm-dialog-data.interface';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from './entry-dialog-config.model';\n\n/**\n * Used to open built-in and custom entry dialogs.\n */\n@Injectable()\nexport class EntryDialogService {\n constructor(\n @Inject(ENTRY_DIALOG_CONFIG) protected readonly config: EntryDialogConfig,\n private readonly matDialog: MatDialog) { }\n\n /**\n * Opens alert dialog.\n *\n * @param data - Contains title, message and optional confirm button text\n * @returns `true` if confirmed, `undefined` if closed by clicking on backdrop or pressing escape\n */\n openAlert = (data: Partial<IEntryAlertDialogData>): Observable<true | undefined> => {\n data.disableClose = data.disableClose === undefined ? this.config.disableClose : data.disableClose;\n return this.open(EntryAlertDialogComponent, data, data.disableClose);\n };\n\n /**\n * Opens confirm dialog.\n *\n * @param data - Contains title, message and optional confirm/cancel buttons text\n * @returns `true` if confirmed, `false` if canceled or closed, `undefined` if closed by clicking on backdrop or pressing escape\n */\n openConfirm = (data: Partial<IEntryConfirmDialogData>): Observable<boolean | undefined> => {\n data.disableClose = data.disableClose === undefined ? this.config.disableClose : data.disableClose;\n return this.open(EntryConfirmDialogComponent, data, data.disableClose);\n };\n\n /**\n * Opens dialog with custom component.\n *\n * @param component - Dialog custom component implementation\n * @param data - Optional parameter used to supply component with input parameters\n * @param disableClose - Optional parameter that disable closing dialog when pressing escape or clicking on backdrop\n * @param cssClass - Optional parameter used to set custom class to Material overlay pane\n * @returns Any result custom implementation provides\n */\n open = (\n component: Type<EntryDialogComponent>,\n data: unknown = undefined,\n disableClose: boolean | undefined = undefined,\n cssClass: string = ''): Observable<any> => {\n const configuration = new MatDialogConfig<unknown>();\n configuration.data = data;\n configuration.disableClose = disableClose === undefined\n ? this.config.disableClose\n : disableClose;\n this.setPanelClassFor(configuration, cssClass);\n\n return this.matDialog\n .open(component, configuration)\n .afterClosed()\n .pipe(take(1));\n };\n\n /**\n * Closes all opened dialogs.\n */\n closeAll = (): void => this.matDialog.closeAll();\n\n private setPanelClassFor = <T>(configuration: MatDialogConfig<T>, cssClass: string) => {\n configuration.panelClass = ['dialog-container', cssClass];\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { EntryAlertDialogComponent } from './dialogs/alert/entry-alert-dialog.component';\nimport { EntryConfirmDialogComponent } from './dialogs/confirm/entry-confirm-dialog.component';\nimport { EntryDialogComponent } from './dialogs/entry-dialog.component';\nimport { EntryButtonModule } from '@enigmatry/entry-components/button';\nimport { EntryDialogService } from './entry-dialog.service';\n\n@NgModule({\n declarations: [\n EntryDialogComponent,\n EntryAlertDialogComponent,\n EntryConfirmDialogComponent\n ],\n imports: [\n CommonModule,\n MatDialogModule,\n MatIconModule,\n MatButtonModule,\n EntryButtonModule\n ],\n exports: [\n EntryDialogComponent,\n EntryAlertDialogComponent,\n EntryConfirmDialogComponent\n ],\n providers: [EntryDialogService]\n})\nexport class EntryDialogModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2.EntryDialogComponent"],"mappings":";;;;;;;;;;;;;;;;AAIA;;AAEG;MACU,iBAAiB,CAAA;IAY1B,WAAY,CAAA,SAAqC,EAAE,EAAA;;QAC/C,IAAI,CAAC,iBAAiB,GAAG,CAAA,EAAA,GAAA,MAAM,CAAC,iBAAiB,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,IAAI,CAAC;QAC1D,IAAI,CAAC,gBAAgB,GAAG,CAAA,EAAA,GAAA,MAAM,CAAC,gBAAgB,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,QAAQ,CAAC;QAC5D,IAAI,CAAC,gBAAgB,GAAG,CAAA,EAAA,GAAA,MAAM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AACD,oBAAA,OAAO,EAAE;wBACP,oBAAoB;wBACpB,yBAAyB;wBACzB,2BAA2B;AAC5B,qBAAA;oBACD,SAAS,EAAE,CAAC,kBAAkB,CAAC;iBAChC,CAAA;;;AC9BD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"enigmatry-entry-components-dialog.mjs","sources":["../../../../libs/entry-components/dialog/entry-dialog-config.model.ts","../../../../libs/entry-components/dialog/dialogs/entry-dialog.component.ts","../../../../libs/entry-components/dialog/dialogs/entry-dialog.component.html","../../../../libs/entry-components/dialog/dialogs/alert/entry-alert-dialog.component.ts","../../../../libs/entry-components/dialog/dialogs/alert/entry-alert-dialog.component.html","../../../../libs/entry-components/dialog/dialogs/confirm/entry-confirm-dialog.component.ts","../../../../libs/entry-components/dialog/dialogs/confirm/entry-confirm-dialog.component.html","../../../../libs/entry-components/dialog/dialogs/error/entry-error-dialog.component.ts","../../../../libs/entry-components/dialog/dialogs/error/entry-error-dialog.component.html","../../../../libs/entry-components/dialog/entry-dialog.service.ts","../../../../libs/entry-components/dialog/entry-dialog.module.ts","../../../../libs/entry-components/dialog/enigmatry-entry-components-dialog.ts"],"sourcesContent":["import { createInjectionToken, provideConfig } from '@enigmatry/entry-components/common';\nimport { EntryDialogButtonsAlignment } from './entry-dialog-buttons-alignment.type';\nimport { Provider } from '@angular/core';\n\n/**\n * Used to provide default configurations on module level.\n */\nexport class EntryDialogConfig {\n /** Confirm button label (default 'Ok') */\n confirmButtonText: string;\n /** Cancel button label (default 'Cancel') */\n cancelButtonText: string;\n /** Dialog buttons horizontal alignment (default 'align-right') */\n buttonsAlignment: EntryDialogButtonsAlignment;\n /** Determines if close button is visible (default is true) */\n hideClose: boolean;\n /** Disable closing dialog when pressing escape or clicking on backdrop (default false) */\n disableClose: boolean;\n\n constructor(config: Partial<EntryDialogConfig> = {}) {\n this.confirmButtonText = config.confirmButtonText ?? 'Ok';\n this.cancelButtonText = config.cancelButtonText ?? 'Cancel';\n this.buttonsAlignment = config.buttonsAlignment ?? 'end';\n this.hideClose = config.hideClose ?? true;\n this.disableClose = config.disableClose ?? false;\n }\n}\n\n/**\n * Entry dialog injection token of EntryDialogConfig type containing dialog default configurations.\n *\n * Defaults:\n * - confirmButtonText: 'Ok'\n * - cancelButtonText: 'Cancel'\n * - buttonsAlignment: 'end'\n * - hideClose: true\n * - disableClose: false\n */\nexport const ENTRY_DIALOG_CONFIG = createInjectionToken(new EntryDialogConfig());\n\n/**\n * Can be used to provide entry dialog configuration.\n */\nexport function provideEntryDialogConfig(config: Partial<EntryDialogConfig>): Provider {\n return provideConfig(ENTRY_DIALOG_CONFIG, () => new EntryDialogConfig(config));\n}\n","import { Component, Inject, Input, TemplateRef } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\nimport { Observable, of } from 'rxjs';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from '../entry-dialog-config.model';\nimport { EntryDialogButtonsAlignment } from '../entry-dialog-buttons-alignment.type';\n\n/**\n * Base Entry dialog component. Must be extended when building custom dialogs.\n *\n * @example\n * ```html\n * <entry-dialog title=\"TITLE\"><p>Dialog content</p></entry-dialog>\n * ```\n */\n@Component({\n selector: 'entry-dialog',\n templateUrl: './entry-dialog.component.html',\n styleUrls: ['./entry-dialog.component.scss']\n})\nexport class EntryDialogComponent {\n /** Dialog header title */\n @Input() title: string;\n /** Dialog buttons horizontal alignment */\n @Input() buttonsAlignment: EntryDialogButtonsAlignment = this.config.buttonsAlignment;\n /** Confirm button label */\n @Input() confirmButtonText = this.config.confirmButtonText;\n /** Cancel button label */\n @Input() cancelButtonText = this.config.cancelButtonText;\n /** Show or hide dialog buttons */\n @Input() hideButtons: boolean;\n /** Show or hide dialog cancel button */\n @Input() hideCancel: boolean;\n /** Show or hide dialog close button */\n @Input() hideClose: boolean = this.config.hideClose;\n /** Enable or disable dialog confirm button */\n @Input() disableConfirm: boolean;\n /** Provide custom buttons template */\n @Input() buttonsTemplate: TemplateRef<any> | null | undefined;\n\n constructor(\n protected readonly mdDialogRef: MatDialogRef<EntryDialogComponent>,\n @Inject(ENTRY_DIALOG_CONFIG) protected readonly config: EntryDialogConfig) { }\n\n @Input() confirm: () => Observable<unknown> = () => of(true);\n @Input() cancel = () => this.close(false);\n\n // @HostListener('keydown.esc')\n // onEsc = () => {\n // if (!this.disableClose) {\n // this.cancel();\n // }\n // };\n\n onSubmit = () =>\n this.confirm().subscribe({\n next: closeDialog => {\n if (closeDialog) {\n this.close(closeDialog);\n }\n }\n });\n\n close = (value: unknown = true) => this.mdDialogRef.close(value);\n}\n","<div class=\"entry-dialog\">\n <div class=\"dialog-header\">\n <h1 class=\"title\" [ngClass]=\"{'without-close-icon': hideClose === true}\" mat-dialog-title>{{ title }}</h1>\n <button mat-icon-button *ngIf=\"!hideClose\" type=\"button\" class=\"close-button\" (click)=\"cancel()\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n\n <mat-dialog-content class=\"dialog-content\" [ngClass]=\"{'with-actions': !hideButtons}\">\n <ng-content></ng-content>\n </mat-dialog-content>\n\n <mat-dialog-actions class=\"dialog-actions\" [align]=\"buttonsAlignment\" *ngIf=\"!hideButtons\">\n <ng-container *ngIf=\"buttonsTemplate; then buttonsTemplate; else defaultButtonsTemplate\">\n </ng-container>\n </mat-dialog-actions>\n \n <ng-template #defaultButtonsTemplate>\n <button cdkFocusInitial mat-button entry-submit-button (click)=\"onSubmit()\">\n <span>{{confirmButtonText}}</span>\n </button>\n <button *ngIf=\"!hideCancel\" mat-button entry-cancel-button (click)=\"cancel()\">\n <span>{{cancelButtonText}}</span>\n </button>\n </ng-template>\n</div>","import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';\nimport { EntryDialogComponent } from '../entry-dialog.component';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { IEntryAlertDialogData } from './entry-alert-dialog-data.interface';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from '../../entry-dialog-config.model';\n\n@Component({\n selector: 'entry-alert-dialog',\n templateUrl: './entry-alert-dialog.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class EntryAlertDialogComponent extends EntryDialogComponent {\n constructor(\n protected readonly mdDialogRef: MatDialogRef<EntryDialogComponent>,\n @Inject(ENTRY_DIALOG_CONFIG) public readonly config: EntryDialogConfig,\n @Inject(MAT_DIALOG_DATA) public data: IEntryAlertDialogData) {\n super(mdDialogRef, config);\n }\n}\n","<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p>{{data.message}}</p>\n</entry-dialog>","import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { EntryDialogComponent } from '../entry-dialog.component';\nimport { IEntryConfirmDialogData } from './entry-confirm-dialog-data.interface';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from '../../entry-dialog-config.model';\n\n@Component({\n selector: 'entry-confirm-dialog',\n templateUrl: './entry-confirm-dialog.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class EntryConfirmDialogComponent extends EntryDialogComponent {\n constructor(\n protected readonly mdDialogRef: MatDialogRef<EntryDialogComponent>,\n @Inject(ENTRY_DIALOG_CONFIG) public readonly config: EntryDialogConfig,\n @Inject(MAT_DIALOG_DATA) readonly data: IEntryConfirmDialogData) {\n super(mdDialogRef, config);\n }\n}\n","<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [cancelButtonText]=\"data.cancelText ?? config.cancelButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\">\n <p>{{data.message}}</p>\n</entry-dialog>","import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';\nimport { EntryDialogComponent } from '../entry-dialog.component';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { IEntryErrorDialogData } from './entry-error-dialog-data.interface';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from '../../entry-dialog-config.model';\n\n@Component({\n selector: 'entry-error-dialog',\n templateUrl: './entry-error-dialog.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class EntryErrorDialogComponent extends EntryDialogComponent {\n errors: string[] = [];\n constructor(\n protected readonly mdDialogRef: MatDialogRef<EntryDialogComponent>,\n @Inject(ENTRY_DIALOG_CONFIG) public readonly config: EntryDialogConfig,\n @Inject(MAT_DIALOG_DATA) public data: IEntryErrorDialogData) {\n super(mdDialogRef, config);\n this.extractValidationErrors();\n }\n\n private extractValidationErrors(): void {\n if (Array.isArray(this.data.errors)) {\n this.errors = this.data.errors as string[];\n } else if (this.data.errors.errors) {\n const validationErrors = this.data.errors.errors;\n this.errors = Object.entries(validationErrors)\n .map(values => values[1])\n .reduce((a, b) => a.concat(b), []);\n } else if (this.data.message) {\n this.errors = [this.data.message];\n }\n }\n}\n","<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p *ngFor=\"let error of errors\">{{error}}</p>\n</entry-dialog>","import { Inject, Injectable, Type } from '@angular/core';\nimport { MatDialog, MatDialogConfig } from '@angular/material/dialog';\nimport { EntryDialogComponent } from './dialogs/entry-dialog.component';\nimport { take } from 'rxjs/operators';\nimport { IEntryAlertDialogData } from './dialogs/alert/entry-alert-dialog-data.interface';\nimport { EntryAlertDialogComponent } from './dialogs/alert/entry-alert-dialog.component';\nimport { Observable } from 'rxjs';\nimport { EntryConfirmDialogComponent } from './dialogs/confirm/entry-confirm-dialog.component';\nimport { IEntryConfirmDialogData } from './dialogs/confirm/entry-confirm-dialog-data.interface';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from './entry-dialog-config.model';\nimport { IEntryErrorDialogData } from './dialogs/error/entry-error-dialog-data.interface';\nimport { EntryErrorDialogComponent } from './dialogs/error/entry-error-dialog.component';\n\n/**\n * Used to open built-in and custom entry dialogs.\n */\n@Injectable()\nexport class EntryDialogService {\n constructor(\n @Inject(ENTRY_DIALOG_CONFIG) protected readonly config: EntryDialogConfig,\n private readonly matDialog: MatDialog) { }\n\n /**\n * Opens alert dialog.\n *\n * @param data - Contains title, message and optional confirm button text\n * @returns `true` if confirmed, `undefined` if closed by clicking on backdrop or pressing escape\n */\n openAlert = (data: Partial<IEntryAlertDialogData>): Observable<true | undefined> => {\n data.disableClose = data.disableClose === undefined ? this.config.disableClose : data.disableClose;\n return this.open(EntryAlertDialogComponent, data, data.disableClose);\n };\n\n /**\n * Opens confirm dialog.\n *\n * @param data - Contains title, message and optional confirm/cancel buttons text\n * @returns `true` if confirmed, `false` if canceled or closed, `undefined` if closed by clicking on backdrop or pressing escape\n */\n openConfirm = (data: Partial<IEntryConfirmDialogData>): Observable<boolean | undefined> => {\n data.disableClose = data.disableClose === undefined ? this.config.disableClose : data.disableClose;\n return this.open(EntryConfirmDialogComponent, data, data.disableClose);\n };\n\n /**\n * Opens error dialog.\n *\n * @param data - Contains title, errors and optional confirm button text\n * @returns `true` if confirmed, `undefined` if closed by clicking on backdrop or pressing escape\n */\n openError = (data: Partial<IEntryErrorDialogData>): Observable<true | undefined> => {\n data.disableClose = data.disableClose === undefined ? this.config.disableClose : data.disableClose;\n return this.open(EntryErrorDialogComponent, data, data.disableClose);\n };\n\n /**\n * Opens dialog with custom component.\n *\n * @param component - Dialog custom component implementation\n * @param data - Optional parameter used to supply component with input parameters\n * @param disableClose - Optional parameter that disable closing dialog when pressing escape or clicking on backdrop\n * @param cssClass - Optional parameter used to set custom class to Material overlay pane\n * @returns Any result custom implementation provides\n */\n open = (\n component: Type<EntryDialogComponent>,\n data: unknown = undefined,\n disableClose: boolean | undefined = undefined,\n cssClass: string = ''): Observable<any> => {\n const configuration = new MatDialogConfig<unknown>();\n configuration.data = data;\n configuration.disableClose = disableClose === undefined\n ? this.config.disableClose\n : disableClose;\n this.setPanelClassFor(configuration, cssClass);\n\n return this.matDialog\n .open(component, configuration)\n .afterClosed()\n .pipe(take(1));\n };\n\n /**\n * Closes all opened dialogs.\n */\n closeAll = (): void => this.matDialog.closeAll();\n\n private setPanelClassFor = <T>(configuration: MatDialogConfig<T>, cssClass: string) => {\n configuration.panelClass = ['dialog-container', cssClass];\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { EntryAlertDialogComponent } from './dialogs/alert/entry-alert-dialog.component';\nimport { EntryConfirmDialogComponent } from './dialogs/confirm/entry-confirm-dialog.component';\nimport { EntryDialogComponent } from './dialogs/entry-dialog.component';\nimport { EntryButtonModule } from '@enigmatry/entry-components/button';\nimport { EntryDialogService } from './entry-dialog.service';\nimport { EntryErrorDialogComponent } from './dialogs/error/entry-error-dialog.component';\n\n@NgModule({\n declarations: [\n EntryDialogComponent,\n EntryAlertDialogComponent,\n EntryConfirmDialogComponent,\n EntryErrorDialogComponent\n ],\n imports: [\n CommonModule,\n MatDialogModule,\n MatIconModule,\n MatButtonModule,\n EntryButtonModule\n ],\n exports: [\n EntryDialogComponent,\n EntryAlertDialogComponent,\n EntryConfirmDialogComponent,\n EntryErrorDialogComponent\n ],\n providers: [EntryDialogService]\n})\nexport class EntryDialogModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2.EntryDialogComponent","i3.EntryDialogComponent"],"mappings":";;;;;;;;;;;;;;;;AAIA;;AAEG;MACU,iBAAiB,CAAA;IAY1B,WAAY,CAAA,SAAqC,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BAAiB,EAFjB,SAAA,EAAA,CAAC,kBAAkB,CAAC,YAZ7B,YAAY;QACZ,eAAe;QACf,aAAa;QACb,eAAe;QACf,iBAAiB,CAAA,EAAA,CAAA,CAAA;4FAUR,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAtB7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,oBAAoB;wBACpB,yBAAyB;wBACzB,2BAA2B;wBAC3B,yBAAyB;AAC1B,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,eAAe;wBACf,aAAa;wBACb,eAAe;wBACf,iBAAiB;AAClB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,oBAAoB;wBACpB,yBAAyB;wBACzB,2BAA2B;wBAC3B,yBAAyB;AAC1B,qBAAA;oBACD,SAAS,EAAE,CAAC,kBAAkB,CAAC;iBAChC,CAAA;;;ACjCD;;AAEG;;;;"}
|
|
@@ -123,7 +123,7 @@ class EntryAlertDialogComponent extends EntryDialogComponent {
|
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
EntryAlertDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryAlertDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: ENTRY_DIALOG_CONFIG }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
126
|
-
EntryAlertDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: EntryAlertDialogComponent, selector: "entry-alert-dialog", usesInheritance: true, ngImport: i0, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p>{{data.message}}</p>\n</entry-dialog>",
|
|
126
|
+
EntryAlertDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: EntryAlertDialogComponent, selector: "entry-alert-dialog", usesInheritance: true, ngImport: i0, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p>{{data.message}}</p>\n</entry-dialog>", dependencies: [{ kind: "component", type: EntryDialogComponent, selector: "entry-dialog", inputs: ["title", "buttonsAlignment", "confirmButtonText", "cancelButtonText", "hideButtons", "hideCancel", "hideClose", "disableConfirm", "buttonsTemplate", "confirm", "cancel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
127
127
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryAlertDialogComponent, decorators: [{
|
|
128
128
|
type: Component,
|
|
129
129
|
args: [{ selector: 'entry-alert-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p>{{data.message}}</p>\n</entry-dialog>" }]
|
|
@@ -144,7 +144,7 @@ class EntryConfirmDialogComponent extends EntryDialogComponent {
|
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
EntryConfirmDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryConfirmDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: ENTRY_DIALOG_CONFIG }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
147
|
-
EntryConfirmDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: EntryConfirmDialogComponent, selector: "entry-confirm-dialog", usesInheritance: true, ngImport: i0, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [cancelButtonText]=\"data.cancelText ?? config.cancelButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\">\n <p>{{data.message}}</p>\n</entry-dialog>",
|
|
147
|
+
EntryConfirmDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: EntryConfirmDialogComponent, selector: "entry-confirm-dialog", usesInheritance: true, ngImport: i0, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [cancelButtonText]=\"data.cancelText ?? config.cancelButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\">\n <p>{{data.message}}</p>\n</entry-dialog>", dependencies: [{ kind: "component", type: EntryDialogComponent, selector: "entry-dialog", inputs: ["title", "buttonsAlignment", "confirmButtonText", "cancelButtonText", "hideButtons", "hideCancel", "hideClose", "disableConfirm", "buttonsTemplate", "confirm", "cancel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
148
148
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryConfirmDialogComponent, decorators: [{
|
|
149
149
|
type: Component,
|
|
150
150
|
args: [{ selector: 'entry-confirm-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [cancelButtonText]=\"data.cancelText ?? config.cancelButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\">\n <p>{{data.message}}</p>\n</entry-dialog>" }]
|
|
@@ -156,6 +156,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
156
156
|
args: [MAT_DIALOG_DATA]
|
|
157
157
|
}] }]; } });
|
|
158
158
|
|
|
159
|
+
class EntryErrorDialogComponent extends EntryDialogComponent {
|
|
160
|
+
constructor(mdDialogRef, config, data) {
|
|
161
|
+
super(mdDialogRef, config);
|
|
162
|
+
this.mdDialogRef = mdDialogRef;
|
|
163
|
+
this.config = config;
|
|
164
|
+
this.data = data;
|
|
165
|
+
this.errors = [];
|
|
166
|
+
this.extractValidationErrors();
|
|
167
|
+
}
|
|
168
|
+
extractValidationErrors() {
|
|
169
|
+
if (Array.isArray(this.data.errors)) {
|
|
170
|
+
this.errors = this.data.errors;
|
|
171
|
+
}
|
|
172
|
+
else if (this.data.errors.errors) {
|
|
173
|
+
const validationErrors = this.data.errors.errors;
|
|
174
|
+
this.errors = Object.entries(validationErrors)
|
|
175
|
+
.map(values => values[1])
|
|
176
|
+
.reduce((a, b) => a.concat(b), []);
|
|
177
|
+
}
|
|
178
|
+
else if (this.data.message) {
|
|
179
|
+
this.errors = [this.data.message];
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
EntryErrorDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryErrorDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: ENTRY_DIALOG_CONFIG }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
184
|
+
EntryErrorDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: EntryErrorDialogComponent, selector: "entry-error-dialog", usesInheritance: true, ngImport: i0, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p *ngFor=\"let error of errors\">{{error}}</p>\n</entry-dialog>", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: EntryDialogComponent, selector: "entry-dialog", inputs: ["title", "buttonsAlignment", "confirmButtonText", "cancelButtonText", "hideButtons", "hideCancel", "hideClose", "disableConfirm", "buttonsTemplate", "confirm", "cancel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
185
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryErrorDialogComponent, decorators: [{
|
|
186
|
+
type: Component,
|
|
187
|
+
args: [{ selector: 'entry-error-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p *ngFor=\"let error of errors\">{{error}}</p>\n</entry-dialog>" }]
|
|
188
|
+
}], ctorParameters: function () { return [{ type: i1.MatDialogRef }, { type: EntryDialogConfig, decorators: [{
|
|
189
|
+
type: Inject,
|
|
190
|
+
args: [ENTRY_DIALOG_CONFIG]
|
|
191
|
+
}] }, { type: undefined, decorators: [{
|
|
192
|
+
type: Inject,
|
|
193
|
+
args: [MAT_DIALOG_DATA]
|
|
194
|
+
}] }]; } });
|
|
195
|
+
|
|
159
196
|
/**
|
|
160
197
|
* Used to open built-in and custom entry dialogs.
|
|
161
198
|
*/
|
|
@@ -183,6 +220,16 @@ class EntryDialogService {
|
|
|
183
220
|
data.disableClose = data.disableClose === undefined ? this.config.disableClose : data.disableClose;
|
|
184
221
|
return this.open(EntryConfirmDialogComponent, data, data.disableClose);
|
|
185
222
|
};
|
|
223
|
+
/**
|
|
224
|
+
* Opens error dialog.
|
|
225
|
+
*
|
|
226
|
+
* @param data - Contains title, errors and optional confirm button text
|
|
227
|
+
* @returns `true` if confirmed, `undefined` if closed by clicking on backdrop or pressing escape
|
|
228
|
+
*/
|
|
229
|
+
this.openError = (data) => {
|
|
230
|
+
data.disableClose = data.disableClose === undefined ? this.config.disableClose : data.disableClose;
|
|
231
|
+
return this.open(EntryErrorDialogComponent, data, data.disableClose);
|
|
232
|
+
};
|
|
186
233
|
/**
|
|
187
234
|
* Opens dialog with custom component.
|
|
188
235
|
*
|
|
@@ -227,13 +274,15 @@ class EntryDialogModule {
|
|
|
227
274
|
EntryDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
228
275
|
EntryDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: EntryDialogModule, declarations: [EntryDialogComponent,
|
|
229
276
|
EntryAlertDialogComponent,
|
|
230
|
-
EntryConfirmDialogComponent
|
|
277
|
+
EntryConfirmDialogComponent,
|
|
278
|
+
EntryErrorDialogComponent], imports: [CommonModule,
|
|
231
279
|
MatDialogModule,
|
|
232
280
|
MatIconModule,
|
|
233
281
|
MatButtonModule,
|
|
234
282
|
EntryButtonModule], exports: [EntryDialogComponent,
|
|
235
283
|
EntryAlertDialogComponent,
|
|
236
|
-
EntryConfirmDialogComponent
|
|
284
|
+
EntryConfirmDialogComponent,
|
|
285
|
+
EntryErrorDialogComponent] });
|
|
237
286
|
EntryDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryDialogModule, providers: [EntryDialogService], imports: [CommonModule,
|
|
238
287
|
MatDialogModule,
|
|
239
288
|
MatIconModule,
|
|
@@ -245,7 +294,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
245
294
|
declarations: [
|
|
246
295
|
EntryDialogComponent,
|
|
247
296
|
EntryAlertDialogComponent,
|
|
248
|
-
EntryConfirmDialogComponent
|
|
297
|
+
EntryConfirmDialogComponent,
|
|
298
|
+
EntryErrorDialogComponent
|
|
249
299
|
],
|
|
250
300
|
imports: [
|
|
251
301
|
CommonModule,
|
|
@@ -257,7 +307,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
257
307
|
exports: [
|
|
258
308
|
EntryDialogComponent,
|
|
259
309
|
EntryAlertDialogComponent,
|
|
260
|
-
EntryConfirmDialogComponent
|
|
310
|
+
EntryConfirmDialogComponent,
|
|
311
|
+
EntryErrorDialogComponent
|
|
261
312
|
],
|
|
262
313
|
providers: [EntryDialogService]
|
|
263
314
|
}]
|
|
@@ -267,5 +318,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
267
318
|
* Generated bundle index. Do not edit.
|
|
268
319
|
*/
|
|
269
320
|
|
|
270
|
-
export { ENTRY_DIALOG_CONFIG, EntryAlertDialogComponent, EntryConfirmDialogComponent, EntryDialogComponent, EntryDialogConfig, EntryDialogModule, EntryDialogService, provideEntryDialogConfig };
|
|
321
|
+
export { ENTRY_DIALOG_CONFIG, EntryAlertDialogComponent, EntryConfirmDialogComponent, EntryDialogComponent, EntryDialogConfig, EntryDialogModule, EntryDialogService, EntryErrorDialogComponent, provideEntryDialogConfig };
|
|
271
322
|
//# sourceMappingURL=enigmatry-entry-components-dialog.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enigmatry-entry-components-dialog.mjs","sources":["../../../../libs/entry-components/dialog/entry-dialog-config.model.ts","../../../../libs/entry-components/dialog/dialogs/entry-dialog.component.ts","../../../../libs/entry-components/dialog/dialogs/entry-dialog.component.html","../../../../libs/entry-components/dialog/dialogs/alert/entry-alert-dialog.component.ts","../../../../libs/entry-components/dialog/dialogs/alert/entry-alert-dialog.component.html","../../../../libs/entry-components/dialog/dialogs/confirm/entry-confirm-dialog.component.ts","../../../../libs/entry-components/dialog/dialogs/confirm/entry-confirm-dialog.component.html","../../../../libs/entry-components/dialog/entry-dialog.service.ts","../../../../libs/entry-components/dialog/entry-dialog.module.ts","../../../../libs/entry-components/dialog/enigmatry-entry-components-dialog.ts"],"sourcesContent":["import { createInjectionToken, provideConfig } from '@enigmatry/entry-components/common';\nimport { EntryDialogButtonsAlignment } from './entry-dialog-buttons-alignment.type';\nimport { Provider } from '@angular/core';\n\n/**\n * Used to provide default configurations on module level.\n */\nexport class EntryDialogConfig {\n /** Confirm button label (default 'Ok') */\n confirmButtonText: string;\n /** Cancel button label (default 'Cancel') */\n cancelButtonText: string;\n /** Dialog buttons horizontal alignment (default 'align-right') */\n buttonsAlignment: EntryDialogButtonsAlignment;\n /** Determines if close button is visible (default is true) */\n hideClose: boolean;\n /** Disable closing dialog when pressing escape or clicking on backdrop (default false) */\n disableClose: boolean;\n\n constructor(config: Partial<EntryDialogConfig> = {}) {\n this.confirmButtonText = config.confirmButtonText ?? 'Ok';\n this.cancelButtonText = config.cancelButtonText ?? 'Cancel';\n this.buttonsAlignment = config.buttonsAlignment ?? 'end';\n this.hideClose = config.hideClose ?? true;\n this.disableClose = config.disableClose ?? false;\n }\n}\n\n/**\n * Entry dialog injection token of EntryDialogConfig type containing dialog default configurations.\n *\n * Defaults:\n * - confirmButtonText: 'Ok'\n * - cancelButtonText: 'Cancel'\n * - buttonsAlignment: 'end'\n * - hideClose: true\n * - disableClose: false\n */\nexport const ENTRY_DIALOG_CONFIG = createInjectionToken(new EntryDialogConfig());\n\n/**\n * Can be used to provide entry dialog configuration.\n */\nexport function provideEntryDialogConfig(config: Partial<EntryDialogConfig>): Provider {\n return provideConfig(ENTRY_DIALOG_CONFIG, () => new EntryDialogConfig(config));\n}\n","import { Component, Inject, Input, TemplateRef } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\nimport { Observable, of } from 'rxjs';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from '../entry-dialog-config.model';\nimport { EntryDialogButtonsAlignment } from '../entry-dialog-buttons-alignment.type';\n\n/**\n * Base Entry dialog component. Must be extended when building custom dialogs.\n *\n * @example\n * ```html\n * <entry-dialog title=\"TITLE\"><p>Dialog content</p></entry-dialog>\n * ```\n */\n@Component({\n selector: 'entry-dialog',\n templateUrl: './entry-dialog.component.html',\n styleUrls: ['./entry-dialog.component.scss']\n})\nexport class EntryDialogComponent {\n /** Dialog header title */\n @Input() title: string;\n /** Dialog buttons horizontal alignment */\n @Input() buttonsAlignment: EntryDialogButtonsAlignment = this.config.buttonsAlignment;\n /** Confirm button label */\n @Input() confirmButtonText = this.config.confirmButtonText;\n /** Cancel button label */\n @Input() cancelButtonText = this.config.cancelButtonText;\n /** Show or hide dialog buttons */\n @Input() hideButtons: boolean;\n /** Show or hide dialog cancel button */\n @Input() hideCancel: boolean;\n /** Show or hide dialog close button */\n @Input() hideClose: boolean = this.config.hideClose;\n /** Enable or disable dialog confirm button */\n @Input() disableConfirm: boolean;\n /** Provide custom buttons template */\n @Input() buttonsTemplate: TemplateRef<any> | null | undefined;\n\n constructor(\n protected readonly mdDialogRef: MatDialogRef<EntryDialogComponent>,\n @Inject(ENTRY_DIALOG_CONFIG) protected readonly config: EntryDialogConfig) { }\n\n @Input() confirm: () => Observable<unknown> = () => of(true);\n @Input() cancel = () => this.close(false);\n\n // @HostListener('keydown.esc')\n // onEsc = () => {\n // if (!this.disableClose) {\n // this.cancel();\n // }\n // };\n\n onSubmit = () =>\n this.confirm().subscribe({\n next: closeDialog => {\n if (closeDialog) {\n this.close(closeDialog);\n }\n }\n });\n\n close = (value: unknown = true) => this.mdDialogRef.close(value);\n}\n","<div class=\"entry-dialog\">\n <div class=\"dialog-header\">\n <h1 class=\"title\" [ngClass]=\"{'without-close-icon': hideClose === true}\" mat-dialog-title>{{ title }}</h1>\n <button mat-icon-button *ngIf=\"!hideClose\" type=\"button\" class=\"close-button\" (click)=\"cancel()\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n\n <mat-dialog-content class=\"dialog-content\" [ngClass]=\"{'with-actions': !hideButtons}\">\n <ng-content></ng-content>\n </mat-dialog-content>\n\n <mat-dialog-actions class=\"dialog-actions\" [align]=\"buttonsAlignment\" *ngIf=\"!hideButtons\">\n <ng-container *ngIf=\"buttonsTemplate; then buttonsTemplate; else defaultButtonsTemplate\">\n </ng-container>\n </mat-dialog-actions>\n \n <ng-template #defaultButtonsTemplate>\n <button cdkFocusInitial mat-button entry-submit-button (click)=\"onSubmit()\">\n <span>{{confirmButtonText}}</span>\n </button>\n <button *ngIf=\"!hideCancel\" mat-button entry-cancel-button (click)=\"cancel()\">\n <span>{{cancelButtonText}}</span>\n </button>\n </ng-template>\n</div>","import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';\nimport { EntryDialogComponent } from '../entry-dialog.component';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { IEntryAlertDialogData } from './entry-alert-dialog-data.interface';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from '../../entry-dialog-config.model';\n\n@Component({\n selector: 'entry-alert-dialog',\n templateUrl: './entry-alert-dialog.component.html',\n styleUrls: ['./entry-alert-dialog.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class EntryAlertDialogComponent extends EntryDialogComponent {\n constructor(\n protected readonly mdDialogRef: MatDialogRef<EntryDialogComponent>,\n @Inject(ENTRY_DIALOG_CONFIG) public readonly config: EntryDialogConfig,\n @Inject(MAT_DIALOG_DATA) public data: IEntryAlertDialogData) {\n super(mdDialogRef, config);\n }\n}\n","<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p>{{data.message}}</p>\n</entry-dialog>","import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { EntryDialogComponent } from '../entry-dialog.component';\nimport { IEntryConfirmDialogData } from './entry-confirm-dialog-data.interface';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from '../../entry-dialog-config.model';\n\n@Component({\n selector: 'entry-confirm-dialog',\n templateUrl: './entry-confirm-dialog.component.html',\n styleUrls: ['./entry-confirm-dialog.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class EntryConfirmDialogComponent extends EntryDialogComponent {\n constructor(\n protected readonly mdDialogRef: MatDialogRef<EntryDialogComponent>,\n @Inject(ENTRY_DIALOG_CONFIG) public readonly config: EntryDialogConfig,\n @Inject(MAT_DIALOG_DATA) readonly data: IEntryConfirmDialogData) {\n super(mdDialogRef, config);\n }\n}\n","<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [cancelButtonText]=\"data.cancelText ?? config.cancelButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\">\n <p>{{data.message}}</p>\n</entry-dialog>","import { Inject, Injectable, Type } from '@angular/core';\nimport { MatDialog, MatDialogConfig } from '@angular/material/dialog';\nimport { EntryDialogComponent } from './dialogs/entry-dialog.component';\nimport { take } from 'rxjs/operators';\nimport { IEntryAlertDialogData } from './dialogs/alert/entry-alert-dialog-data.interface';\nimport { EntryAlertDialogComponent } from './dialogs/alert/entry-alert-dialog.component';\nimport { Observable } from 'rxjs';\nimport { EntryConfirmDialogComponent } from './dialogs/confirm/entry-confirm-dialog.component';\nimport { IEntryConfirmDialogData } from './dialogs/confirm/entry-confirm-dialog-data.interface';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from './entry-dialog-config.model';\n\n/**\n * Used to open built-in and custom entry dialogs.\n */\n@Injectable()\nexport class EntryDialogService {\n constructor(\n @Inject(ENTRY_DIALOG_CONFIG) protected readonly config: EntryDialogConfig,\n private readonly matDialog: MatDialog) { }\n\n /**\n * Opens alert dialog.\n *\n * @param data - Contains title, message and optional confirm button text\n * @returns `true` if confirmed, `undefined` if closed by clicking on backdrop or pressing escape\n */\n openAlert = (data: Partial<IEntryAlertDialogData>): Observable<true | undefined> => {\n data.disableClose = data.disableClose === undefined ? this.config.disableClose : data.disableClose;\n return this.open(EntryAlertDialogComponent, data, data.disableClose);\n };\n\n /**\n * Opens confirm dialog.\n *\n * @param data - Contains title, message and optional confirm/cancel buttons text\n * @returns `true` if confirmed, `false` if canceled or closed, `undefined` if closed by clicking on backdrop or pressing escape\n */\n openConfirm = (data: Partial<IEntryConfirmDialogData>): Observable<boolean | undefined> => {\n data.disableClose = data.disableClose === undefined ? this.config.disableClose : data.disableClose;\n return this.open(EntryConfirmDialogComponent, data, data.disableClose);\n };\n\n /**\n * Opens dialog with custom component.\n *\n * @param component - Dialog custom component implementation\n * @param data - Optional parameter used to supply component with input parameters\n * @param disableClose - Optional parameter that disable closing dialog when pressing escape or clicking on backdrop\n * @param cssClass - Optional parameter used to set custom class to Material overlay pane\n * @returns Any result custom implementation provides\n */\n open = (\n component: Type<EntryDialogComponent>,\n data: unknown = undefined,\n disableClose: boolean | undefined = undefined,\n cssClass: string = ''): Observable<any> => {\n const configuration = new MatDialogConfig<unknown>();\n configuration.data = data;\n configuration.disableClose = disableClose === undefined\n ? this.config.disableClose\n : disableClose;\n this.setPanelClassFor(configuration, cssClass);\n\n return this.matDialog\n .open(component, configuration)\n .afterClosed()\n .pipe(take(1));\n };\n\n /**\n * Closes all opened dialogs.\n */\n closeAll = (): void => this.matDialog.closeAll();\n\n private setPanelClassFor = <T>(configuration: MatDialogConfig<T>, cssClass: string) => {\n configuration.panelClass = ['dialog-container', cssClass];\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { EntryAlertDialogComponent } from './dialogs/alert/entry-alert-dialog.component';\nimport { EntryConfirmDialogComponent } from './dialogs/confirm/entry-confirm-dialog.component';\nimport { EntryDialogComponent } from './dialogs/entry-dialog.component';\nimport { EntryButtonModule } from '@enigmatry/entry-components/button';\nimport { EntryDialogService } from './entry-dialog.service';\n\n@NgModule({\n declarations: [\n EntryDialogComponent,\n EntryAlertDialogComponent,\n EntryConfirmDialogComponent\n ],\n imports: [\n CommonModule,\n MatDialogModule,\n MatIconModule,\n MatButtonModule,\n EntryButtonModule\n ],\n exports: [\n EntryDialogComponent,\n EntryAlertDialogComponent,\n EntryConfirmDialogComponent\n ],\n providers: [EntryDialogService]\n})\nexport class EntryDialogModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2.EntryDialogComponent"],"mappings":";;;;;;;;;;;;;;;;AAIA;;AAEG;MACU,iBAAiB,CAAA;AAY1B,IAAA,WAAA,CAAY,SAAqC,EAAE,EAAA;QAC/C,IAAI,CAAC,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,IAAI,IAAI,CAAC;QAC1D,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,IAAI,QAAQ,CAAC;QAC5D,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,IAAI,KAAK,CAAC;QACzD,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,IAAI,CAAC;QAC1C,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,IAAI,KAAK,CAAC;KACpD;AACJ,CAAA;AAED;;;;;;;;;AASG;AACU,MAAA,mBAAmB,GAAG,oBAAoB,CAAC,IA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oBAAoB;QACpB,yBAAyB;AACzB,QAAA,2BAA2B,aAG3B,YAAY;QACZ,eAAe;QACf,aAAa;QACb,eAAe;AACf,QAAA,iBAAiB,aAGjB,oBAAoB;QACpB,yBAAyB;QACzB,2BAA2B,CAAA,EAAA,CAAA,CAAA;AAIlB,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,EAFjB,SAAA,EAAA,CAAC,kBAAkB,CAAC,YAX7B,YAAY;QACZ,eAAe;QACf,aAAa;QACb,eAAe;QACf,iBAAiB,CAAA,EAAA,CAAA,CAAA;4FASR,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBApB7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,oBAAoB;wBACpB,yBAAyB;wBACzB,2BAA2B;AAC5B,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,eAAe;wBACf,aAAa;wBACb,eAAe;wBACf,iBAAiB;AAClB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,oBAAoB;wBACpB,yBAAyB;wBACzB,2BAA2B;AAC5B,qBAAA;oBACD,SAAS,EAAE,CAAC,kBAAkB,CAAC;AAChC,iBAAA,CAAA;;;AC9BD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"enigmatry-entry-components-dialog.mjs","sources":["../../../../libs/entry-components/dialog/entry-dialog-config.model.ts","../../../../libs/entry-components/dialog/dialogs/entry-dialog.component.ts","../../../../libs/entry-components/dialog/dialogs/entry-dialog.component.html","../../../../libs/entry-components/dialog/dialogs/alert/entry-alert-dialog.component.ts","../../../../libs/entry-components/dialog/dialogs/alert/entry-alert-dialog.component.html","../../../../libs/entry-components/dialog/dialogs/confirm/entry-confirm-dialog.component.ts","../../../../libs/entry-components/dialog/dialogs/confirm/entry-confirm-dialog.component.html","../../../../libs/entry-components/dialog/dialogs/error/entry-error-dialog.component.ts","../../../../libs/entry-components/dialog/dialogs/error/entry-error-dialog.component.html","../../../../libs/entry-components/dialog/entry-dialog.service.ts","../../../../libs/entry-components/dialog/entry-dialog.module.ts","../../../../libs/entry-components/dialog/enigmatry-entry-components-dialog.ts"],"sourcesContent":["import { createInjectionToken, provideConfig } from '@enigmatry/entry-components/common';\nimport { EntryDialogButtonsAlignment } from './entry-dialog-buttons-alignment.type';\nimport { Provider } from '@angular/core';\n\n/**\n * Used to provide default configurations on module level.\n */\nexport class EntryDialogConfig {\n /** Confirm button label (default 'Ok') */\n confirmButtonText: string;\n /** Cancel button label (default 'Cancel') */\n cancelButtonText: string;\n /** Dialog buttons horizontal alignment (default 'align-right') */\n buttonsAlignment: EntryDialogButtonsAlignment;\n /** Determines if close button is visible (default is true) */\n hideClose: boolean;\n /** Disable closing dialog when pressing escape or clicking on backdrop (default false) */\n disableClose: boolean;\n\n constructor(config: Partial<EntryDialogConfig> = {}) {\n this.confirmButtonText = config.confirmButtonText ?? 'Ok';\n this.cancelButtonText = config.cancelButtonText ?? 'Cancel';\n this.buttonsAlignment = config.buttonsAlignment ?? 'end';\n this.hideClose = config.hideClose ?? true;\n this.disableClose = config.disableClose ?? false;\n }\n}\n\n/**\n * Entry dialog injection token of EntryDialogConfig type containing dialog default configurations.\n *\n * Defaults:\n * - confirmButtonText: 'Ok'\n * - cancelButtonText: 'Cancel'\n * - buttonsAlignment: 'end'\n * - hideClose: true\n * - disableClose: false\n */\nexport const ENTRY_DIALOG_CONFIG = createInjectionToken(new EntryDialogConfig());\n\n/**\n * Can be used to provide entry dialog configuration.\n */\nexport function provideEntryDialogConfig(config: Partial<EntryDialogConfig>): Provider {\n return provideConfig(ENTRY_DIALOG_CONFIG, () => new EntryDialogConfig(config));\n}\n","import { Component, Inject, Input, TemplateRef } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\nimport { Observable, of } from 'rxjs';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from '../entry-dialog-config.model';\nimport { EntryDialogButtonsAlignment } from '../entry-dialog-buttons-alignment.type';\n\n/**\n * Base Entry dialog component. Must be extended when building custom dialogs.\n *\n * @example\n * ```html\n * <entry-dialog title=\"TITLE\"><p>Dialog content</p></entry-dialog>\n * ```\n */\n@Component({\n selector: 'entry-dialog',\n templateUrl: './entry-dialog.component.html',\n styleUrls: ['./entry-dialog.component.scss']\n})\nexport class EntryDialogComponent {\n /** Dialog header title */\n @Input() title: string;\n /** Dialog buttons horizontal alignment */\n @Input() buttonsAlignment: EntryDialogButtonsAlignment = this.config.buttonsAlignment;\n /** Confirm button label */\n @Input() confirmButtonText = this.config.confirmButtonText;\n /** Cancel button label */\n @Input() cancelButtonText = this.config.cancelButtonText;\n /** Show or hide dialog buttons */\n @Input() hideButtons: boolean;\n /** Show or hide dialog cancel button */\n @Input() hideCancel: boolean;\n /** Show or hide dialog close button */\n @Input() hideClose: boolean = this.config.hideClose;\n /** Enable or disable dialog confirm button */\n @Input() disableConfirm: boolean;\n /** Provide custom buttons template */\n @Input() buttonsTemplate: TemplateRef<any> | null | undefined;\n\n constructor(\n protected readonly mdDialogRef: MatDialogRef<EntryDialogComponent>,\n @Inject(ENTRY_DIALOG_CONFIG) protected readonly config: EntryDialogConfig) { }\n\n @Input() confirm: () => Observable<unknown> = () => of(true);\n @Input() cancel = () => this.close(false);\n\n // @HostListener('keydown.esc')\n // onEsc = () => {\n // if (!this.disableClose) {\n // this.cancel();\n // }\n // };\n\n onSubmit = () =>\n this.confirm().subscribe({\n next: closeDialog => {\n if (closeDialog) {\n this.close(closeDialog);\n }\n }\n });\n\n close = (value: unknown = true) => this.mdDialogRef.close(value);\n}\n","<div class=\"entry-dialog\">\n <div class=\"dialog-header\">\n <h1 class=\"title\" [ngClass]=\"{'without-close-icon': hideClose === true}\" mat-dialog-title>{{ title }}</h1>\n <button mat-icon-button *ngIf=\"!hideClose\" type=\"button\" class=\"close-button\" (click)=\"cancel()\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n\n <mat-dialog-content class=\"dialog-content\" [ngClass]=\"{'with-actions': !hideButtons}\">\n <ng-content></ng-content>\n </mat-dialog-content>\n\n <mat-dialog-actions class=\"dialog-actions\" [align]=\"buttonsAlignment\" *ngIf=\"!hideButtons\">\n <ng-container *ngIf=\"buttonsTemplate; then buttonsTemplate; else defaultButtonsTemplate\">\n </ng-container>\n </mat-dialog-actions>\n \n <ng-template #defaultButtonsTemplate>\n <button cdkFocusInitial mat-button entry-submit-button (click)=\"onSubmit()\">\n <span>{{confirmButtonText}}</span>\n </button>\n <button *ngIf=\"!hideCancel\" mat-button entry-cancel-button (click)=\"cancel()\">\n <span>{{cancelButtonText}}</span>\n </button>\n </ng-template>\n</div>","import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';\nimport { EntryDialogComponent } from '../entry-dialog.component';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { IEntryAlertDialogData } from './entry-alert-dialog-data.interface';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from '../../entry-dialog-config.model';\n\n@Component({\n selector: 'entry-alert-dialog',\n templateUrl: './entry-alert-dialog.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class EntryAlertDialogComponent extends EntryDialogComponent {\n constructor(\n protected readonly mdDialogRef: MatDialogRef<EntryDialogComponent>,\n @Inject(ENTRY_DIALOG_CONFIG) public readonly config: EntryDialogConfig,\n @Inject(MAT_DIALOG_DATA) public data: IEntryAlertDialogData) {\n super(mdDialogRef, config);\n }\n}\n","<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p>{{data.message}}</p>\n</entry-dialog>","import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { EntryDialogComponent } from '../entry-dialog.component';\nimport { IEntryConfirmDialogData } from './entry-confirm-dialog-data.interface';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from '../../entry-dialog-config.model';\n\n@Component({\n selector: 'entry-confirm-dialog',\n templateUrl: './entry-confirm-dialog.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class EntryConfirmDialogComponent extends EntryDialogComponent {\n constructor(\n protected readonly mdDialogRef: MatDialogRef<EntryDialogComponent>,\n @Inject(ENTRY_DIALOG_CONFIG) public readonly config: EntryDialogConfig,\n @Inject(MAT_DIALOG_DATA) readonly data: IEntryConfirmDialogData) {\n super(mdDialogRef, config);\n }\n}\n","<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [cancelButtonText]=\"data.cancelText ?? config.cancelButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\">\n <p>{{data.message}}</p>\n</entry-dialog>","import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';\nimport { EntryDialogComponent } from '../entry-dialog.component';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { IEntryErrorDialogData } from './entry-error-dialog-data.interface';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from '../../entry-dialog-config.model';\n\n@Component({\n selector: 'entry-error-dialog',\n templateUrl: './entry-error-dialog.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class EntryErrorDialogComponent extends EntryDialogComponent {\n errors: string[] = [];\n constructor(\n protected readonly mdDialogRef: MatDialogRef<EntryDialogComponent>,\n @Inject(ENTRY_DIALOG_CONFIG) public readonly config: EntryDialogConfig,\n @Inject(MAT_DIALOG_DATA) public data: IEntryErrorDialogData) {\n super(mdDialogRef, config);\n this.extractValidationErrors();\n }\n\n private extractValidationErrors(): void {\n if (Array.isArray(this.data.errors)) {\n this.errors = this.data.errors as string[];\n } else if (this.data.errors.errors) {\n const validationErrors = this.data.errors.errors;\n this.errors = Object.entries(validationErrors)\n .map(values => values[1])\n .reduce((a, b) => a.concat(b), []);\n } else if (this.data.message) {\n this.errors = [this.data.message];\n }\n }\n}\n","<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p *ngFor=\"let error of errors\">{{error}}</p>\n</entry-dialog>","import { Inject, Injectable, Type } from '@angular/core';\nimport { MatDialog, MatDialogConfig } from '@angular/material/dialog';\nimport { EntryDialogComponent } from './dialogs/entry-dialog.component';\nimport { take } from 'rxjs/operators';\nimport { IEntryAlertDialogData } from './dialogs/alert/entry-alert-dialog-data.interface';\nimport { EntryAlertDialogComponent } from './dialogs/alert/entry-alert-dialog.component';\nimport { Observable } from 'rxjs';\nimport { EntryConfirmDialogComponent } from './dialogs/confirm/entry-confirm-dialog.component';\nimport { IEntryConfirmDialogData } from './dialogs/confirm/entry-confirm-dialog-data.interface';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from './entry-dialog-config.model';\nimport { IEntryErrorDialogData } from './dialogs/error/entry-error-dialog-data.interface';\nimport { EntryErrorDialogComponent } from './dialogs/error/entry-error-dialog.component';\n\n/**\n * Used to open built-in and custom entry dialogs.\n */\n@Injectable()\nexport class EntryDialogService {\n constructor(\n @Inject(ENTRY_DIALOG_CONFIG) protected readonly config: EntryDialogConfig,\n private readonly matDialog: MatDialog) { }\n\n /**\n * Opens alert dialog.\n *\n * @param data - Contains title, message and optional confirm button text\n * @returns `true` if confirmed, `undefined` if closed by clicking on backdrop or pressing escape\n */\n openAlert = (data: Partial<IEntryAlertDialogData>): Observable<true | undefined> => {\n data.disableClose = data.disableClose === undefined ? this.config.disableClose : data.disableClose;\n return this.open(EntryAlertDialogComponent, data, data.disableClose);\n };\n\n /**\n * Opens confirm dialog.\n *\n * @param data - Contains title, message and optional confirm/cancel buttons text\n * @returns `true` if confirmed, `false` if canceled or closed, `undefined` if closed by clicking on backdrop or pressing escape\n */\n openConfirm = (data: Partial<IEntryConfirmDialogData>): Observable<boolean | undefined> => {\n data.disableClose = data.disableClose === undefined ? this.config.disableClose : data.disableClose;\n return this.open(EntryConfirmDialogComponent, data, data.disableClose);\n };\n\n /**\n * Opens error dialog.\n *\n * @param data - Contains title, errors and optional confirm button text\n * @returns `true` if confirmed, `undefined` if closed by clicking on backdrop or pressing escape\n */\n openError = (data: Partial<IEntryErrorDialogData>): Observable<true | undefined> => {\n data.disableClose = data.disableClose === undefined ? this.config.disableClose : data.disableClose;\n return this.open(EntryErrorDialogComponent, data, data.disableClose);\n };\n\n /**\n * Opens dialog with custom component.\n *\n * @param component - Dialog custom component implementation\n * @param data - Optional parameter used to supply component with input parameters\n * @param disableClose - Optional parameter that disable closing dialog when pressing escape or clicking on backdrop\n * @param cssClass - Optional parameter used to set custom class to Material overlay pane\n * @returns Any result custom implementation provides\n */\n open = (\n component: Type<EntryDialogComponent>,\n data: unknown = undefined,\n disableClose: boolean | undefined = undefined,\n cssClass: string = ''): Observable<any> => {\n const configuration = new MatDialogConfig<unknown>();\n configuration.data = data;\n configuration.disableClose = disableClose === undefined\n ? this.config.disableClose\n : disableClose;\n this.setPanelClassFor(configuration, cssClass);\n\n return this.matDialog\n .open(component, configuration)\n .afterClosed()\n .pipe(take(1));\n };\n\n /**\n * Closes all opened dialogs.\n */\n closeAll = (): void => this.matDialog.closeAll();\n\n private setPanelClassFor = <T>(configuration: MatDialogConfig<T>, cssClass: string) => {\n configuration.panelClass = ['dialog-container', cssClass];\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { EntryAlertDialogComponent } from './dialogs/alert/entry-alert-dialog.component';\nimport { EntryConfirmDialogComponent } from './dialogs/confirm/entry-confirm-dialog.component';\nimport { EntryDialogComponent } from './dialogs/entry-dialog.component';\nimport { EntryButtonModule } from '@enigmatry/entry-components/button';\nimport { EntryDialogService } from './entry-dialog.service';\nimport { EntryErrorDialogComponent } from './dialogs/error/entry-error-dialog.component';\n\n@NgModule({\n declarations: [\n EntryDialogComponent,\n EntryAlertDialogComponent,\n EntryConfirmDialogComponent,\n EntryErrorDialogComponent\n ],\n imports: [\n CommonModule,\n MatDialogModule,\n MatIconModule,\n MatButtonModule,\n EntryButtonModule\n ],\n exports: [\n EntryDialogComponent,\n EntryAlertDialogComponent,\n EntryConfirmDialogComponent,\n EntryErrorDialogComponent\n ],\n providers: [EntryDialogService]\n})\nexport class EntryDialogModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2.EntryDialogComponent","i3.EntryDialogComponent"],"mappings":";;;;;;;;;;;;;;;;AAIA;;AAEG;MACU,iBAAiB,CAAA;AAY1B,IAAA,WAAA,CAAY,SAAqC,EAAE,EAAA;QAC/C,IAAI,CAAC,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,IAAI,IAAI,CAAC;QAC1D,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,IAAI,QAAQ,CAAC;QAC5D,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,IAAI,KAAK,CAAC;QACzD,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,IAAI,CAAC;QAC1C,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,IAAI,KAAK,CAAC;KACpD;AACJ,CAAA;AAED;;;;;;;;;AASG;AACU,MAAA,mBAAmB,GAAG,oBAAoB,CAAC,IAAI,iBAAiB,EAAE,EAAE;AAEjF;;AAEG;AACG,SAAU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B,YAAY;QACZ,eAAe;QACf,aAAa;QACb,eAAe;AACf,QAAA,iBAAiB,aAGjB,oBAAoB;QACpB,yBAAyB;QACzB,2BAA2B;QAC3B,yBAAyB,CAAA,EAAA,CAAA,CAAA;AAIhB,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,EAFjB,SAAA,EAAA,CAAC,kBAAkB,CAAC,YAZ7B,YAAY;QACZ,eAAe;QACf,aAAa;QACb,eAAe;QACf,iBAAiB,CAAA,EAAA,CAAA,CAAA;4FAUR,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAtB7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,oBAAoB;wBACpB,yBAAyB;wBACzB,2BAA2B;wBAC3B,yBAAyB;AAC1B,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,eAAe;wBACf,aAAa;wBACb,eAAe;wBACf,iBAAiB;AAClB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,oBAAoB;wBACpB,yBAAyB;wBACzB,2BAA2B;wBAC3B,yBAAyB;AAC1B,qBAAA;oBACD,SAAS,EAAE,CAAC,kBAAkB,CAAC;AAChC,iBAAA,CAAA;;;ACjCD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enigmatry/entry-components",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.2.0",
|
|
4
4
|
"author": "Enigmatry",
|
|
5
5
|
"description": "Enigmatry entry angular material components",
|
|
6
6
|
"homepage": "https://github.com/enigmatry/entry-angular-building-blocks/tree/master/libs/entry-components#readme",
|