@enigmatry/entry-components 1.2.58 → 1.2.60
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/README.md +95 -0
- package/dialog/entry-dialog.service.d.ts +23 -2
- package/esm2020/dialog/entry-dialog.service.mjs +22 -1
- package/fesm2015/enigmatry-entry-components-dialog.mjs +21 -0
- package/fesm2015/enigmatry-entry-components-dialog.mjs.map +1 -1
- package/fesm2020/enigmatry-entry-components-dialog.mjs +21 -0
- package/fesm2020/enigmatry-entry-components-dialog.mjs.map +1 -1
- package/header/README.md +26 -0
- package/package.json +1 -1
package/dialog/README.md
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Entry Dialog
|
|
2
|
+
|
|
3
|
+
Enables working with built-in (alert and confirm) and custom dialogs. Supports dialog configuration on module level.
|
|
4
|
+
|
|
5
|
+
## Imports
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import { EntryDialogModule } from '@enigmatry/entry-components/entry-dialog';
|
|
9
|
+
import { MatDialogModule } from '@angular/material/dialog';
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Basic usage
|
|
13
|
+
|
|
14
|
+
`EntryDialogService` is used to open dialogs:
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
constructor (entryDialogService: EntryDialogService) {
|
|
18
|
+
entryDialogService.openAlert({
|
|
19
|
+
title: 'ALERT!', message: 'I want to tell you that I love you :)'
|
|
20
|
+
})
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Configuration
|
|
25
|
+
|
|
26
|
+
`ENTRY_DIALOG_CONFIG`: `InjectionToken<EntryDialogConfig>` - Optional configuration used to override defaults.
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
// ...
|
|
30
|
+
|
|
31
|
+
@NgModule({
|
|
32
|
+
imports: [
|
|
33
|
+
EntryDialogModule,
|
|
34
|
+
MatDialogModule
|
|
35
|
+
],
|
|
36
|
+
providers: [
|
|
37
|
+
{
|
|
38
|
+
provide: ENTRY_DIALOG_CONFIG,
|
|
39
|
+
useFactory: () => new EntryDialogConfig('Yes', 'No', 'align-center')
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
})
|
|
43
|
+
export class AppModule { }
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## EntryDialogService Methods
|
|
47
|
+
|
|
48
|
+
`openAlert(data: IEntryAlertDialogData): Observable<any>`
|
|
49
|
+
|
|
50
|
+
Opens alert dialog containing title and message defined in `data` parameter.
|
|
51
|
+
|
|
52
|
+
`openConfirm(data: IEntryConfirmDialogData): Observable<bool | undefined>`
|
|
53
|
+
|
|
54
|
+
Opens confirm dialog containing title and message defined in `data` parameter.
|
|
55
|
+
|
|
56
|
+
Returns `true` if confirmed, `false` if canceled or closed, and `undefined` if closed by clicking outside of dialog.
|
|
57
|
+
|
|
58
|
+
`open(component: Type<EntryDialogComponent>, data: unknown = undefined, cssClass: string = ''): Observable<any>`
|
|
59
|
+
|
|
60
|
+
Opens custom dialog component defined by `component` parameter. Optionally, it can receive input `data` or `cssClass`.
|
|
61
|
+
|
|
62
|
+
## Classes and Interfaces
|
|
63
|
+
|
|
64
|
+
| `IEntryAlertDialogData` | |
|
|
65
|
+
| - | - |
|
|
66
|
+
| title: `string` | Dialog header title |
|
|
67
|
+
| message: `string` | Dialog content message |
|
|
68
|
+
| confirmText?: `string` | Optional confirm button text |
|
|
69
|
+
|
|
70
|
+
| `IEntryConfirmDialogData` | |
|
|
71
|
+
| - | - |
|
|
72
|
+
| title: `string` | Dialog header title |
|
|
73
|
+
| message: `string` | Dialog content message |
|
|
74
|
+
| confirmText?: `string` | Optional confirm button text |
|
|
75
|
+
| cancelText?: `string` | Optional cancel button text |
|
|
76
|
+
|
|
77
|
+
| `EntryDialogConfig` | |
|
|
78
|
+
| - | - |
|
|
79
|
+
| confirmButtonText: `string` | Confirm button text (default 'Ok') |
|
|
80
|
+
| cancelButtonText: `string` | Cancel button text (default 'Cancel') |
|
|
81
|
+
| buttonsAlignment: `string` | Buttons alignment values: `'align-right'`, `'align-center'` or `''` (default `'align-right'`) |
|
|
82
|
+
|
|
83
|
+
| `IEntryDialogButtonsConfig` | |
|
|
84
|
+
| - | - |
|
|
85
|
+
| confirmButtonText: `string` | Confirm button text |
|
|
86
|
+
| cancelButtonText: `string` | Cancel button text |
|
|
87
|
+
| buttonsAlignment: `string` | Buttons alignment values: `'align-right'`, `'align-center'` or `''` |
|
|
88
|
+
| visible: `bool` | Hides or shows dialog buttons |
|
|
89
|
+
|
|
90
|
+
| `EntryDialogComponent` | |
|
|
91
|
+
| - | - |
|
|
92
|
+
| title: `string` | Dialog header title |
|
|
93
|
+
| buttons: `IEntryDialogButtonsConfig` | Dialog buttons configuration |
|
|
94
|
+
| disableConfirm: `bool` | Disables confirm button |
|
|
95
|
+
| buttonsTemplate?: `TemplateRef<>` | Optional dialog buttons custom template |
|
|
@@ -8,9 +8,30 @@ import * as i0 from "@angular/core";
|
|
|
8
8
|
export declare class EntryDialogService {
|
|
9
9
|
private readonly matDialog;
|
|
10
10
|
constructor(matDialog: MatDialog);
|
|
11
|
+
/**
|
|
12
|
+
* Opens alert dialog
|
|
13
|
+
*
|
|
14
|
+
* @param data - Contains title, message and optional confirm button text of IEntryAlertDialogData type
|
|
15
|
+
* @returns Observable of any
|
|
16
|
+
*/
|
|
11
17
|
openAlert: (data: IEntryAlertDialogData) => Observable<any>;
|
|
12
|
-
|
|
13
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Opens confirm dialog
|
|
20
|
+
*
|
|
21
|
+
* @param data - Contains title, message and optional confirm/cancel buttons text of IEntryConfirmDialogData type
|
|
22
|
+
* @returns Observable of bool or undefined, `true` if confirmed, `false` if canceled or closed
|
|
23
|
+
* , `undefined` if closed by clicking outside of the dialog
|
|
24
|
+
*/
|
|
25
|
+
openConfirm: (data: IEntryConfirmDialogData) => Observable<boolean | undefined>;
|
|
26
|
+
/**
|
|
27
|
+
* Opens dialog with custom component
|
|
28
|
+
*
|
|
29
|
+
* @param component - Dialog custom component implementation
|
|
30
|
+
* @param data - Optional parameter used to supply component with input parameters
|
|
31
|
+
* @param cssClass - Optional parameter used to set custom class to Material overlay pane
|
|
32
|
+
* @returns Observable of any containing result of dialog with custom component
|
|
33
|
+
*/
|
|
34
|
+
open: (component: Type<EntryDialogComponent>, data?: unknown, cssClass?: string) => Observable<any>;
|
|
14
35
|
readonly close: () => void;
|
|
15
36
|
private setPanelClassFor;
|
|
16
37
|
static ɵfac: i0.ɵɵFactoryDeclaration<EntryDialogService, never>;
|
|
@@ -8,8 +8,29 @@ import * as i1 from "@angular/material/dialog";
|
|
|
8
8
|
export class EntryDialogService {
|
|
9
9
|
constructor(matDialog) {
|
|
10
10
|
this.matDialog = matDialog;
|
|
11
|
+
/**
|
|
12
|
+
* Opens alert dialog
|
|
13
|
+
*
|
|
14
|
+
* @param data - Contains title, message and optional confirm button text of IEntryAlertDialogData type
|
|
15
|
+
* @returns Observable of any
|
|
16
|
+
*/
|
|
11
17
|
this.openAlert = (data) => this.open(EntryAlertDialogComponent, data);
|
|
18
|
+
/**
|
|
19
|
+
* Opens confirm dialog
|
|
20
|
+
*
|
|
21
|
+
* @param data - Contains title, message and optional confirm/cancel buttons text of IEntryConfirmDialogData type
|
|
22
|
+
* @returns Observable of bool or undefined, `true` if confirmed, `false` if canceled or closed
|
|
23
|
+
* , `undefined` if closed by clicking outside of the dialog
|
|
24
|
+
*/
|
|
12
25
|
this.openConfirm = (data) => this.open(EntryConfirmDialogComponent, data);
|
|
26
|
+
/**
|
|
27
|
+
* Opens dialog with custom component
|
|
28
|
+
*
|
|
29
|
+
* @param component - Dialog custom component implementation
|
|
30
|
+
* @param data - Optional parameter used to supply component with input parameters
|
|
31
|
+
* @param cssClass - Optional parameter used to set custom class to Material overlay pane
|
|
32
|
+
* @returns Observable of any containing result of dialog with custom component
|
|
33
|
+
*/
|
|
13
34
|
this.open = (component, data = undefined, cssClass = '') => {
|
|
14
35
|
const configuration = new MatDialogConfig();
|
|
15
36
|
configuration.data = data;
|
|
@@ -33,4 +54,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
33
54
|
providedIn: 'root'
|
|
34
55
|
}]
|
|
35
56
|
}], ctorParameters: function () { return [{ type: i1.MatDialog }]; } });
|
|
36
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
57
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW50cnktZGlhbG9nLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9lbnRyeS1jb21wb25lbnRzL2RpYWxvZy9lbnRyeS1kaWFsb2cuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFRLE1BQU0sZUFBZSxDQUFDO0FBQ2pELE9BQU8sRUFBYSxlQUFlLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUV0RSxPQUFPLEVBQUUsSUFBSSxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFFdEMsT0FBTyxFQUFFLHlCQUF5QixFQUFFLE1BQU0sOENBQThDLENBQUM7QUFFekYsT0FBTyxFQUFFLDJCQUEyQixFQUFFLE1BQU0sa0RBQWtELENBQUM7OztBQU0vRixNQUFNLE9BQU8sa0JBQWtCO0lBQzdCLFlBQTZCLFNBQW9CO1FBQXBCLGNBQVMsR0FBVCxTQUFTLENBQVc7UUFFakQ7Ozs7O1dBS0c7UUFDSCxjQUFTLEdBQUcsQ0FBQyxJQUEyQixFQUFtQixFQUFFLENBQzNELElBQUksQ0FBQyxJQUFJLENBQUMseUJBQXlCLEVBQUUsSUFBSSxDQUFDLENBQUM7UUFFN0M7Ozs7OztXQU1HO1FBQ0gsZ0JBQVcsR0FBRyxD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zQ2xhc3M6IHN0cmluZykgPT4ge1xuICAgIGNvbmZpZ3VyYXRpb24ucGFuZWxDbGFzcyA9IFsnZGlhbG9nLWNvbnRhaW5lcicsIGNzc0NsYXNzXTtcbiAgfTtcbn1cbiJdfQ==
|
|
@@ -136,8 +136,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
136
136
|
class EntryDialogService {
|
|
137
137
|
constructor(matDialog) {
|
|
138
138
|
this.matDialog = matDialog;
|
|
139
|
+
/**
|
|
140
|
+
* Opens alert dialog
|
|
141
|
+
*
|
|
142
|
+
* @param data - Contains title, message and optional confirm button text of IEntryAlertDialogData type
|
|
143
|
+
* @returns Observable of any
|
|
144
|
+
*/
|
|
139
145
|
this.openAlert = (data) => this.open(EntryAlertDialogComponent, data);
|
|
146
|
+
/**
|
|
147
|
+
* Opens confirm dialog
|
|
148
|
+
*
|
|
149
|
+
* @param data - Contains title, message and optional confirm/cancel buttons text of IEntryConfirmDialogData type
|
|
150
|
+
* @returns Observable of bool or undefined, `true` if confirmed, `false` if canceled or closed
|
|
151
|
+
* , `undefined` if closed by clicking outside of the dialog
|
|
152
|
+
*/
|
|
140
153
|
this.openConfirm = (data) => this.open(EntryConfirmDialogComponent, data);
|
|
154
|
+
/**
|
|
155
|
+
* Opens dialog with custom component
|
|
156
|
+
*
|
|
157
|
+
* @param component - Dialog custom component implementation
|
|
158
|
+
* @param data - Optional parameter used to supply component with input parameters
|
|
159
|
+
* @param cssClass - Optional parameter used to set custom class to Material overlay pane
|
|
160
|
+
* @returns Observable of any containing result of dialog with custom component
|
|
161
|
+
*/
|
|
141
162
|
this.open = (component, data = undefined, cssClass = '') => {
|
|
142
163
|
const configuration = new MatDialogConfig();
|
|
143
164
|
configuration.data = data;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enigmatry-entry-components-dialog.mjs","sources":["../../../../projects/entry-components/dialog/entry-dialog-config.model.ts","../../../../projects/entry-components/dialog/dialogs/entry-dialog.component.ts","../../../../projects/entry-components/dialog/dialogs/entry-dialog.component.html","../../../../projects/entry-components/dialog/dialogs/alert/entry-alert-dialog.component.ts","../../../../projects/entry-components/dialog/dialogs/alert/entry-alert-dialog.component.html","../../../../projects/entry-components/dialog/dialogs/confirm/entry-confirm-dialog.component.ts","../../../../projects/entry-components/dialog/dialogs/confirm/entry-confirm-dialog.component.html","../../../../projects/entry-components/dialog/entry-dialog.service.ts","../../../../projects/entry-components/dialog/entry-dialog.module.ts","../../../../projects/entry-components/dialog/enigmatry-entry-components-dialog.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport class EntryDialogConfig {\n confirmButtonText: string;\n cancelButtonText: string;\n buttonsAlignment: 'align-right' | 'align-center' | '';\n\n constructor(config: Partial<EntryDialogConfig> = {}) {\n this.confirmButtonText = config.confirmButtonText ?? 'Ok';\n this.cancelButtonText = config.cancelButtonText ?? 'Cancel';\n this.buttonsAlignment = config.buttonsAlignment ?? 'align-right';\n }\n}\nexport const ENTRY_DIALOG_CONFIG = new InjectionToken<EntryDialogConfig>('EntryDialogConfig',\n {\n providedIn: 'root',\n factory: () => new EntryDialogConfig()\n }\n);\n","import { Component, HostListener, Inject, Input, TemplateRef } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\nimport { Observable, of } from 'rxjs';\nimport { IEntryDialogButtonsConfig } from '../entry-dialog-buttons-config.interface';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from '../entry-dialog-config.model';\n\n@Component({\n selector: 'entry-dialog',\n templateUrl: './entry-dialog.component.html',\n styleUrls: ['./entry-dialog.component.scss']\n})\nexport class EntryDialogComponent {\n\n @Input() title: string;\n @Input() buttons: IEntryDialogButtonsConfig = {\n buttonsAlignment: this.config.buttonsAlignment,\n confirmButtonText: this.config.confirmButtonText,\n cancelButtonText: this.config.cancelButtonText,\n visible: true\n };\n\n @Input() disableConfirm = false;\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 readonly onEsc = () => this.cancel();\n\n readonly onSubmit = () => {\n this.confirm().subscribe({\n next: closeDialog => {\n if (closeDialog) {\n this.close(closeDialog);\n }\n }\n });\n };\n\n readonly close = (value: unknown = true) => this.mdDialogRef.close(value);\n}\n","<div class=\"dialog-form\">\n <div class=\"dialog-header\">\n <h1 class=\"dialog-title\">\n {{ title }}\n </h1>\n\n <button type=\"button\" class=\"dialog-close-button\" (click)=\"cancel()\">\n <span class=\"icon-close dialog-close-icon\"></span>\n </button>\n </div>\n\n <mat-dialog-content\n class=\"dialog-content\"\n [ngClass]=\"{'with-actions': buttons.visible}\">\n <ng-content></ng-content>\n </mat-dialog-content>\n\n <ng-template [ngIf]=\"buttonsTemplate\" [ngIfElse]=\"defaultButtonsTemplate\">\n <ng-template [ngTemplateOutlet]=\"buttonsTemplate\"></ng-template>\n </ng-template>\n\n <ng-template #defaultButtonsTemplate>\n <div *ngIf=\"buttons.visible\" class=\"dialog-footer {{ buttons.buttonsAlignment }}\">\n <button\n type=\"button\"\n class=\"button button-accent dialog-footer-button\"\n cdkFocusInitial\n (click)=\"onSubmit()\">{{buttons.confirmButtonText}}</button>\n <button\n type=\"button\"\n class=\"button button-primary dialog-footer-button\"\n *ngIf=\"buttons.cancelButtonText !== ''\"\n (click)=\"cancel()\">{{buttons.cancelButtonText}}</button>\n </div>\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 { IEntryDialogButtonsConfig } from '../../entry-dialog-buttons-config.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 readonly buttons: IEntryDialogButtonsConfig = {\n confirmButtonText: this.data.confirmText ?? this.config.confirmButtonText,\n cancelButtonText: '',\n buttonsAlignment: 'align-center',\n visible: true\n };\n\n constructor(\n protected readonly mdDialogRef: MatDialogRef<EntryDialogComponent>,\n @Inject(ENTRY_DIALOG_CONFIG) protected readonly config: EntryDialogConfig,\n @Inject(MAT_DIALOG_DATA) public data: IEntryAlertDialogData) {\n super(mdDialogRef, config);\n }\n}\n","<entry-dialog [title]='data.title' [buttons]=\"buttons\">\n <p>{{data.message}}</p>\n</entry-dialog>","import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';\nimport { IEntryDialogButtonsConfig } from '../../entry-dialog-buttons-config.interface';\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 readonly buttons: IEntryDialogButtonsConfig = {\n confirmButtonText: this.data.confirmText ?? this.config.confirmButtonText,\n cancelButtonText: this.data.cancelText ?? this.config.cancelButtonText,\n buttonsAlignment: 'align-right',\n visible: true\n };\n\n constructor(\n protected readonly mdDialogRef: MatDialogRef<EntryDialogComponent>,\n @Inject(ENTRY_DIALOG_CONFIG) protected readonly config: EntryDialogConfig,\n @Inject(MAT_DIALOG_DATA) readonly data: IEntryConfirmDialogData) {\n super(mdDialogRef, config);\n }\n}\n","<entry-dialog [title]='data.title' [buttons]=\"buttons\">\n <p>{{data.message}}</p>\n</entry-dialog>","import { 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';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class EntryDialogService {\n constructor(private readonly matDialog: MatDialog) { }\n\n openAlert = (data: IEntryAlertDialogData): Observable<any> =>\n this.open(EntryAlertDialogComponent, data);\n\n readonly openConfirm = (data: IEntryConfirmDialogData): Observable<boolean | undefined> =>\n this.open(EntryConfirmDialogComponent, data);\n\n readonly open = (component: Type<EntryDialogComponent>, data: unknown = undefined, cssClass: string = '') => {\n const configuration = new MatDialogConfig<unknown>();\n configuration.data = data;\n this.setPanelClassFor(configuration, cssClass);\n\n return this.matDialog\n .open(component, configuration)\n .afterClosed()\n .pipe(take(1));\n };\n\n readonly close = (): 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 { EntryAlertDialogComponent } from './dialogs/alert/entry-alert-dialog.component';\nimport { EntryConfirmDialogComponent } from './dialogs/confirm/entry-confirm-dialog.component';\nimport { EntryDialogComponent } from './dialogs/entry-dialog.component';\n\n@NgModule({\n declarations: [\n EntryDialogComponent,\n EntryAlertDialogComponent,\n EntryConfirmDialogComponent\n ],\n imports: [\n CommonModule,\n MatDialogModule\n ],\n exports: [\n EntryDialogComponent,\n EntryAlertDialogComponent,\n EntryConfirmDialogComponent\n ]\n})\nexport class EntryDialogModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2.EntryDialogComponent"],"mappings":";;;;;;;;;MAEa,iBAAiB,CAAA;IAK1B,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,CAAC,gBAAgB,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,aAAa,CAAC;KACpE;AACJ,CAAA;MACY,mBAAmB,GAAG,IAAI,cAAc,CAAoB,mBAAmB,EACxF;AACI,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE;AACzC,CAAA;;MCNQ,oBAAoB,CAAA;IAa7B,WACuB,CAAA,WAA+C,EAClB,MAAyB,EAAA;AADtD,QAAA,IAAW,CAAA,WAAA,GAAX,WAAW,CAAoC;AAClB,QAAA,IAAM,CAAA,MAAA,GAAN,MAAM,CAAmB;QAZpE,IAAA,CAAA,OAAO,GAA8B;AAC1C,YAAA,gBAAgB,EAAE,IAAI,CAAC,MAAM,CAAC,gBAAgB;AAC9C,YAAA,iBAAiB,EAAE,IAAI,CAAC,MAAM,CAAC,i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,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,EAVnB,OAAA,EAAA,CAAA;YACP,YAAY;YACZ,eAAe;SAChB,CAAA,EAAA,CAAA,CAAA;4FAOU,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAhB7B,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;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,oBAAoB;wBACpB,yBAAyB;wBACzB,2BAA2B;AAC5B,qBAAA;iBACF,CAAA;;;ACtBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"enigmatry-entry-components-dialog.mjs","sources":["../../../../projects/entry-components/dialog/entry-dialog-config.model.ts","../../../../projects/entry-components/dialog/dialogs/entry-dialog.component.ts","../../../../projects/entry-components/dialog/dialogs/entry-dialog.component.html","../../../../projects/entry-components/dialog/dialogs/alert/entry-alert-dialog.component.ts","../../../../projects/entry-components/dialog/dialogs/alert/entry-alert-dialog.component.html","../../../../projects/entry-components/dialog/dialogs/confirm/entry-confirm-dialog.component.ts","../../../../projects/entry-components/dialog/dialogs/confirm/entry-confirm-dialog.component.html","../../../../projects/entry-components/dialog/entry-dialog.service.ts","../../../../projects/entry-components/dialog/entry-dialog.module.ts","../../../../projects/entry-components/dialog/enigmatry-entry-components-dialog.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport class EntryDialogConfig {\n confirmButtonText: string;\n cancelButtonText: string;\n buttonsAlignment: 'align-right' | 'align-center' | '';\n\n constructor(config: Partial<EntryDialogConfig> = {}) {\n this.confirmButtonText = config.confirmButtonText ?? 'Ok';\n this.cancelButtonText = config.cancelButtonText ?? 'Cancel';\n this.buttonsAlignment = config.buttonsAlignment ?? 'align-right';\n }\n}\nexport const ENTRY_DIALOG_CONFIG = new InjectionToken<EntryDialogConfig>('EntryDialogConfig',\n {\n providedIn: 'root',\n factory: () => new EntryDialogConfig()\n }\n);\n","import { Component, HostListener, Inject, Input, TemplateRef } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\nimport { Observable, of } from 'rxjs';\nimport { IEntryDialogButtonsConfig } from '../entry-dialog-buttons-config.interface';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from '../entry-dialog-config.model';\n\n@Component({\n selector: 'entry-dialog',\n templateUrl: './entry-dialog.component.html',\n styleUrls: ['./entry-dialog.component.scss']\n})\nexport class EntryDialogComponent {\n\n @Input() title: string;\n @Input() buttons: IEntryDialogButtonsConfig = {\n buttonsAlignment: this.config.buttonsAlignment,\n confirmButtonText: this.config.confirmButtonText,\n cancelButtonText: this.config.cancelButtonText,\n visible: true\n };\n\n @Input() disableConfirm = false;\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 readonly onEsc = () => this.cancel();\n\n readonly onSubmit = () => {\n this.confirm().subscribe({\n next: closeDialog => {\n if (closeDialog) {\n this.close(closeDialog);\n }\n }\n });\n };\n\n readonly close = (value: unknown = true) => this.mdDialogRef.close(value);\n}\n","<div class=\"dialog-form\">\n <div class=\"dialog-header\">\n <h1 class=\"dialog-title\">\n {{ title }}\n </h1>\n\n <button type=\"button\" class=\"dialog-close-button\" (click)=\"cancel()\">\n <span class=\"icon-close dialog-close-icon\"></span>\n </button>\n </div>\n\n <mat-dialog-content\n class=\"dialog-content\"\n [ngClass]=\"{'with-actions': buttons.visible}\">\n <ng-content></ng-content>\n </mat-dialog-content>\n\n <ng-template [ngIf]=\"buttonsTemplate\" [ngIfElse]=\"defaultButtonsTemplate\">\n <ng-template [ngTemplateOutlet]=\"buttonsTemplate\"></ng-template>\n </ng-template>\n\n <ng-template #defaultButtonsTemplate>\n <div *ngIf=\"buttons.visible\" class=\"dialog-footer {{ buttons.buttonsAlignment }}\">\n <button\n type=\"button\"\n class=\"button button-accent dialog-footer-button\"\n cdkFocusInitial\n (click)=\"onSubmit()\">{{buttons.confirmButtonText}}</button>\n <button\n type=\"button\"\n class=\"button button-primary dialog-footer-button\"\n *ngIf=\"buttons.cancelButtonText !== ''\"\n (click)=\"cancel()\">{{buttons.cancelButtonText}}</button>\n </div>\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 { IEntryDialogButtonsConfig } from '../../entry-dialog-buttons-config.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 readonly buttons: IEntryDialogButtonsConfig = {\n confirmButtonText: this.data.confirmText ?? this.config.confirmButtonText,\n cancelButtonText: '',\n buttonsAlignment: 'align-center',\n visible: true\n };\n\n constructor(\n protected readonly mdDialogRef: MatDialogRef<EntryDialogComponent>,\n @Inject(ENTRY_DIALOG_CONFIG) protected readonly config: EntryDialogConfig,\n @Inject(MAT_DIALOG_DATA) public data: IEntryAlertDialogData) {\n super(mdDialogRef, config);\n }\n}\n","<entry-dialog [title]='data.title' [buttons]=\"buttons\">\n <p>{{data.message}}</p>\n</entry-dialog>","import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';\nimport { IEntryDialogButtonsConfig } from '../../entry-dialog-buttons-config.interface';\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 readonly buttons: IEntryDialogButtonsConfig = {\n confirmButtonText: this.data.confirmText ?? this.config.confirmButtonText,\n cancelButtonText: this.data.cancelText ?? this.config.cancelButtonText,\n buttonsAlignment: 'align-right',\n visible: true\n };\n\n constructor(\n protected readonly mdDialogRef: MatDialogRef<EntryDialogComponent>,\n @Inject(ENTRY_DIALOG_CONFIG) protected readonly config: EntryDialogConfig,\n @Inject(MAT_DIALOG_DATA) readonly data: IEntryConfirmDialogData) {\n super(mdDialogRef, config);\n }\n}\n","<entry-dialog [title]='data.title' [buttons]=\"buttons\">\n <p>{{data.message}}</p>\n</entry-dialog>","import { 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';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class EntryDialogService {\n constructor(private readonly matDialog: MatDialog) { }\n\n /**\n * Opens alert dialog\n *\n * @param data - Contains title, message and optional confirm button text of IEntryAlertDialogData type\n * @returns Observable of any\n */\n openAlert = (data: IEntryAlertDialogData): Observable<any> =>\n this.open(EntryAlertDialogComponent, data);\n\n /**\n * Opens confirm dialog\n *\n * @param data - Contains title, message and optional confirm/cancel buttons text of IEntryConfirmDialogData type\n * @returns Observable of bool or undefined, `true` if confirmed, `false` if canceled or closed\n * , `undefined` if closed by clicking outside of the dialog\n */\n openConfirm = (data: IEntryConfirmDialogData): Observable<boolean | undefined> =>\n this.open(EntryConfirmDialogComponent, data);\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 cssClass - Optional parameter used to set custom class to Material overlay pane\n * @returns Observable of any containing result of dialog with custom component\n */\n open = (\n component: Type<EntryDialogComponent>,\n data: unknown = undefined,\n cssClass: string = ''): Observable<any> => {\n const configuration = new MatDialogConfig<unknown>();\n configuration.data = data;\n this.setPanelClassFor(configuration, cssClass);\n\n return this.matDialog\n .open(component, configuration)\n .afterClosed()\n .pipe(take(1));\n };\n\n readonly close = (): 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 { EntryAlertDialogComponent } from './dialogs/alert/entry-alert-dialog.component';\nimport { EntryConfirmDialogComponent } from './dialogs/confirm/entry-confirm-dialog.component';\nimport { EntryDialogComponent } from './dialogs/entry-dialog.component';\n\n@NgModule({\n declarations: [\n EntryDialogComponent,\n EntryAlertDialogComponent,\n EntryConfirmDialogComponent\n ],\n imports: [\n CommonModule,\n MatDialogModule\n ],\n exports: [\n EntryDialogComponent,\n EntryAlertDialogComponent,\n EntryConfirmDialogComponent\n ]\n})\nexport class EntryDialogModule { }\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,EAAA,IAAA,EAAA,iBAAiB,EAVnB,OAAA,EAAA,CAAA;YACP,YAAY;YACZ,eAAe;SAChB,CAAA,EAAA,CAAA,CAAA;4FAOU,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAhB7B,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;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,oBAAoB;wBACpB,yBAAyB;wBACzB,2BAA2B;AAC5B,qBAAA;iBACF,CAAA;;;ACtBD;;AAEG;;;;"}
|
|
@@ -127,8 +127,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
127
127
|
class EntryDialogService {
|
|
128
128
|
constructor(matDialog) {
|
|
129
129
|
this.matDialog = matDialog;
|
|
130
|
+
/**
|
|
131
|
+
* Opens alert dialog
|
|
132
|
+
*
|
|
133
|
+
* @param data - Contains title, message and optional confirm button text of IEntryAlertDialogData type
|
|
134
|
+
* @returns Observable of any
|
|
135
|
+
*/
|
|
130
136
|
this.openAlert = (data) => this.open(EntryAlertDialogComponent, data);
|
|
137
|
+
/**
|
|
138
|
+
* Opens confirm dialog
|
|
139
|
+
*
|
|
140
|
+
* @param data - Contains title, message and optional confirm/cancel buttons text of IEntryConfirmDialogData type
|
|
141
|
+
* @returns Observable of bool or undefined, `true` if confirmed, `false` if canceled or closed
|
|
142
|
+
* , `undefined` if closed by clicking outside of the dialog
|
|
143
|
+
*/
|
|
131
144
|
this.openConfirm = (data) => this.open(EntryConfirmDialogComponent, data);
|
|
145
|
+
/**
|
|
146
|
+
* Opens dialog with custom component
|
|
147
|
+
*
|
|
148
|
+
* @param component - Dialog custom component implementation
|
|
149
|
+
* @param data - Optional parameter used to supply component with input parameters
|
|
150
|
+
* @param cssClass - Optional parameter used to set custom class to Material overlay pane
|
|
151
|
+
* @returns Observable of any containing result of dialog with custom component
|
|
152
|
+
*/
|
|
132
153
|
this.open = (component, data = undefined, cssClass = '') => {
|
|
133
154
|
const configuration = new MatDialogConfig();
|
|
134
155
|
configuration.data = data;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enigmatry-entry-components-dialog.mjs","sources":["../../../../projects/entry-components/dialog/entry-dialog-config.model.ts","../../../../projects/entry-components/dialog/dialogs/entry-dialog.component.ts","../../../../projects/entry-components/dialog/dialogs/entry-dialog.component.html","../../../../projects/entry-components/dialog/dialogs/alert/entry-alert-dialog.component.ts","../../../../projects/entry-components/dialog/dialogs/alert/entry-alert-dialog.component.html","../../../../projects/entry-components/dialog/dialogs/confirm/entry-confirm-dialog.component.ts","../../../../projects/entry-components/dialog/dialogs/confirm/entry-confirm-dialog.component.html","../../../../projects/entry-components/dialog/entry-dialog.service.ts","../../../../projects/entry-components/dialog/entry-dialog.module.ts","../../../../projects/entry-components/dialog/enigmatry-entry-components-dialog.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport class EntryDialogConfig {\n confirmButtonText: string;\n cancelButtonText: string;\n buttonsAlignment: 'align-right' | 'align-center' | '';\n\n constructor(config: Partial<EntryDialogConfig> = {}) {\n this.confirmButtonText = config.confirmButtonText ?? 'Ok';\n this.cancelButtonText = config.cancelButtonText ?? 'Cancel';\n this.buttonsAlignment = config.buttonsAlignment ?? 'align-right';\n }\n}\nexport const ENTRY_DIALOG_CONFIG = new InjectionToken<EntryDialogConfig>('EntryDialogConfig',\n {\n providedIn: 'root',\n factory: () => new EntryDialogConfig()\n }\n);\n","import { Component, HostListener, Inject, Input, TemplateRef } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\nimport { Observable, of } from 'rxjs';\nimport { IEntryDialogButtonsConfig } from '../entry-dialog-buttons-config.interface';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from '../entry-dialog-config.model';\n\n@Component({\n selector: 'entry-dialog',\n templateUrl: './entry-dialog.component.html',\n styleUrls: ['./entry-dialog.component.scss']\n})\nexport class EntryDialogComponent {\n\n @Input() title: string;\n @Input() buttons: IEntryDialogButtonsConfig = {\n buttonsAlignment: this.config.buttonsAlignment,\n confirmButtonText: this.config.confirmButtonText,\n cancelButtonText: this.config.cancelButtonText,\n visible: true\n };\n\n @Input() disableConfirm = false;\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 readonly onEsc = () => this.cancel();\n\n readonly onSubmit = () => {\n this.confirm().subscribe({\n next: closeDialog => {\n if (closeDialog) {\n this.close(closeDialog);\n }\n }\n });\n };\n\n readonly close = (value: unknown = true) => this.mdDialogRef.close(value);\n}\n","<div class=\"dialog-form\">\n <div class=\"dialog-header\">\n <h1 class=\"dialog-title\">\n {{ title }}\n </h1>\n\n <button type=\"button\" class=\"dialog-close-button\" (click)=\"cancel()\">\n <span class=\"icon-close dialog-close-icon\"></span>\n </button>\n </div>\n\n <mat-dialog-content\n class=\"dialog-content\"\n [ngClass]=\"{'with-actions': buttons.visible}\">\n <ng-content></ng-content>\n </mat-dialog-content>\n\n <ng-template [ngIf]=\"buttonsTemplate\" [ngIfElse]=\"defaultButtonsTemplate\">\n <ng-template [ngTemplateOutlet]=\"buttonsTemplate\"></ng-template>\n </ng-template>\n\n <ng-template #defaultButtonsTemplate>\n <div *ngIf=\"buttons.visible\" class=\"dialog-footer {{ buttons.buttonsAlignment }}\">\n <button\n type=\"button\"\n class=\"button button-accent dialog-footer-button\"\n cdkFocusInitial\n (click)=\"onSubmit()\">{{buttons.confirmButtonText}}</button>\n <button\n type=\"button\"\n class=\"button button-primary dialog-footer-button\"\n *ngIf=\"buttons.cancelButtonText !== ''\"\n (click)=\"cancel()\">{{buttons.cancelButtonText}}</button>\n </div>\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 { IEntryDialogButtonsConfig } from '../../entry-dialog-buttons-config.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 readonly buttons: IEntryDialogButtonsConfig = {\n confirmButtonText: this.data.confirmText ?? this.config.confirmButtonText,\n cancelButtonText: '',\n buttonsAlignment: 'align-center',\n visible: true\n };\n\n constructor(\n protected readonly mdDialogRef: MatDialogRef<EntryDialogComponent>,\n @Inject(ENTRY_DIALOG_CONFIG) protected readonly config: EntryDialogConfig,\n @Inject(MAT_DIALOG_DATA) public data: IEntryAlertDialogData) {\n super(mdDialogRef, config);\n }\n}\n","<entry-dialog [title]='data.title' [buttons]=\"buttons\">\n <p>{{data.message}}</p>\n</entry-dialog>","import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';\nimport { IEntryDialogButtonsConfig } from '../../entry-dialog-buttons-config.interface';\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 readonly buttons: IEntryDialogButtonsConfig = {\n confirmButtonText: this.data.confirmText ?? this.config.confirmButtonText,\n cancelButtonText: this.data.cancelText ?? this.config.cancelButtonText,\n buttonsAlignment: 'align-right',\n visible: true\n };\n\n constructor(\n protected readonly mdDialogRef: MatDialogRef<EntryDialogComponent>,\n @Inject(ENTRY_DIALOG_CONFIG) protected readonly config: EntryDialogConfig,\n @Inject(MAT_DIALOG_DATA) readonly data: IEntryConfirmDialogData) {\n super(mdDialogRef, config);\n }\n}\n","<entry-dialog [title]='data.title' [buttons]=\"buttons\">\n <p>{{data.message}}</p>\n</entry-dialog>","import { 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';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class EntryDialogService {\n constructor(private readonly matDialog: MatDialog) { }\n\n openAlert = (data: IEntryAlertDialogData): Observable<any> =>\n this.open(EntryAlertDialogComponent, data);\n\n readonly openConfirm = (data: IEntryConfirmDialogData): Observable<boolean | undefined> =>\n this.open(EntryConfirmDialogComponent, data);\n\n readonly open = (component: Type<EntryDialogComponent>, data: unknown = undefined, cssClass: string = '') => {\n const configuration = new MatDialogConfig<unknown>();\n configuration.data = data;\n this.setPanelClassFor(configuration, cssClass);\n\n return this.matDialog\n .open(component, configuration)\n .afterClosed()\n .pipe(take(1));\n };\n\n readonly close = (): 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 { EntryAlertDialogComponent } from './dialogs/alert/entry-alert-dialog.component';\nimport { EntryConfirmDialogComponent } from './dialogs/confirm/entry-confirm-dialog.component';\nimport { EntryDialogComponent } from './dialogs/entry-dialog.component';\n\n@NgModule({\n declarations: [\n EntryDialogComponent,\n EntryAlertDialogComponent,\n EntryConfirmDialogComponent\n ],\n imports: [\n CommonModule,\n MatDialogModule\n ],\n exports: [\n EntryDialogComponent,\n EntryAlertDialogComponent,\n EntryConfirmDialogComponent\n ]\n})\nexport class EntryDialogModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2.EntryDialogComponent"],"mappings":";;;;;;;;;MAEa,iBAAiB,CAAA;AAK1B,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,aAAa,CAAC;KACpE;AACJ,CAAA;MACY,mBAAmB,GAAG,IAAI,cAAc,CAAoB,mBAAmB,EACxF;AACI,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE;AACzC,CAAA;;MCNQ,oBAAoB,CAAA;IAa7B,WACuB,CAAA,WAA+C,EAClB,MAAyB,EAAA;QADtD,IAAW,CAAA,WAAA,GAAX,WAAW,CAAoC;QAClB,IAAM,CAAA,MAAA,GAAN,MAAM,CAAmB;AAZpE,QAAA,IAAA,CAAA,OAAO,GAA8B;AAC1C,YAAA,gBAAgB,EAAE,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AA,CAAA,EAAA,CAAA,CAAA;4FAOU,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAhB7B,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;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,oBAAoB;wBACpB,yBAAyB;wBACzB,2BAA2B;AAC5B,qBAAA;AACF,iBAAA,CAAA;;;ACtBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"enigmatry-entry-components-dialog.mjs","sources":["../../../../projects/entry-components/dialog/entry-dialog-config.model.ts","../../../../projects/entry-components/dialog/dialogs/entry-dialog.component.ts","../../../../projects/entry-components/dialog/dialogs/entry-dialog.component.html","../../../../projects/entry-components/dialog/dialogs/alert/entry-alert-dialog.component.ts","../../../../projects/entry-components/dialog/dialogs/alert/entry-alert-dialog.component.html","../../../../projects/entry-components/dialog/dialogs/confirm/entry-confirm-dialog.component.ts","../../../../projects/entry-components/dialog/dialogs/confirm/entry-confirm-dialog.component.html","../../../../projects/entry-components/dialog/entry-dialog.service.ts","../../../../projects/entry-components/dialog/entry-dialog.module.ts","../../../../projects/entry-components/dialog/enigmatry-entry-components-dialog.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport class EntryDialogConfig {\n confirmButtonText: string;\n cancelButtonText: string;\n buttonsAlignment: 'align-right' | 'align-center' | '';\n\n constructor(config: Partial<EntryDialogConfig> = {}) {\n this.confirmButtonText = config.confirmButtonText ?? 'Ok';\n this.cancelButtonText = config.cancelButtonText ?? 'Cancel';\n this.buttonsAlignment = config.buttonsAlignment ?? 'align-right';\n }\n}\nexport const ENTRY_DIALOG_CONFIG = new InjectionToken<EntryDialogConfig>('EntryDialogConfig',\n {\n providedIn: 'root',\n factory: () => new EntryDialogConfig()\n }\n);\n","import { Component, HostListener, Inject, Input, TemplateRef } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\nimport { Observable, of } from 'rxjs';\nimport { IEntryDialogButtonsConfig } from '../entry-dialog-buttons-config.interface';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from '../entry-dialog-config.model';\n\n@Component({\n selector: 'entry-dialog',\n templateUrl: './entry-dialog.component.html',\n styleUrls: ['./entry-dialog.component.scss']\n})\nexport class EntryDialogComponent {\n\n @Input() title: string;\n @Input() buttons: IEntryDialogButtonsConfig = {\n buttonsAlignment: this.config.buttonsAlignment,\n confirmButtonText: this.config.confirmButtonText,\n cancelButtonText: this.config.cancelButtonText,\n visible: true\n };\n\n @Input() disableConfirm = false;\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 readonly onEsc = () => this.cancel();\n\n readonly onSubmit = () => {\n this.confirm().subscribe({\n next: closeDialog => {\n if (closeDialog) {\n this.close(closeDialog);\n }\n }\n });\n };\n\n readonly close = (value: unknown = true) => this.mdDialogRef.close(value);\n}\n","<div class=\"dialog-form\">\n <div class=\"dialog-header\">\n <h1 class=\"dialog-title\">\n {{ title }}\n </h1>\n\n <button type=\"button\" class=\"dialog-close-button\" (click)=\"cancel()\">\n <span class=\"icon-close dialog-close-icon\"></span>\n </button>\n </div>\n\n <mat-dialog-content\n class=\"dialog-content\"\n [ngClass]=\"{'with-actions': buttons.visible}\">\n <ng-content></ng-content>\n </mat-dialog-content>\n\n <ng-template [ngIf]=\"buttonsTemplate\" [ngIfElse]=\"defaultButtonsTemplate\">\n <ng-template [ngTemplateOutlet]=\"buttonsTemplate\"></ng-template>\n </ng-template>\n\n <ng-template #defaultButtonsTemplate>\n <div *ngIf=\"buttons.visible\" class=\"dialog-footer {{ buttons.buttonsAlignment }}\">\n <button\n type=\"button\"\n class=\"button button-accent dialog-footer-button\"\n cdkFocusInitial\n (click)=\"onSubmit()\">{{buttons.confirmButtonText}}</button>\n <button\n type=\"button\"\n class=\"button button-primary dialog-footer-button\"\n *ngIf=\"buttons.cancelButtonText !== ''\"\n (click)=\"cancel()\">{{buttons.cancelButtonText}}</button>\n </div>\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 { IEntryDialogButtonsConfig } from '../../entry-dialog-buttons-config.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 readonly buttons: IEntryDialogButtonsConfig = {\n confirmButtonText: this.data.confirmText ?? this.config.confirmButtonText,\n cancelButtonText: '',\n buttonsAlignment: 'align-center',\n visible: true\n };\n\n constructor(\n protected readonly mdDialogRef: MatDialogRef<EntryDialogComponent>,\n @Inject(ENTRY_DIALOG_CONFIG) protected readonly config: EntryDialogConfig,\n @Inject(MAT_DIALOG_DATA) public data: IEntryAlertDialogData) {\n super(mdDialogRef, config);\n }\n}\n","<entry-dialog [title]='data.title' [buttons]=\"buttons\">\n <p>{{data.message}}</p>\n</entry-dialog>","import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';\nimport { IEntryDialogButtonsConfig } from '../../entry-dialog-buttons-config.interface';\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 readonly buttons: IEntryDialogButtonsConfig = {\n confirmButtonText: this.data.confirmText ?? this.config.confirmButtonText,\n cancelButtonText: this.data.cancelText ?? this.config.cancelButtonText,\n buttonsAlignment: 'align-right',\n visible: true\n };\n\n constructor(\n protected readonly mdDialogRef: MatDialogRef<EntryDialogComponent>,\n @Inject(ENTRY_DIALOG_CONFIG) protected readonly config: EntryDialogConfig,\n @Inject(MAT_DIALOG_DATA) readonly data: IEntryConfirmDialogData) {\n super(mdDialogRef, config);\n }\n}\n","<entry-dialog [title]='data.title' [buttons]=\"buttons\">\n <p>{{data.message}}</p>\n</entry-dialog>","import { 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';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class EntryDialogService {\n constructor(private readonly matDialog: MatDialog) { }\n\n /**\n * Opens alert dialog\n *\n * @param data - Contains title, message and optional confirm button text of IEntryAlertDialogData type\n * @returns Observable of any\n */\n openAlert = (data: IEntryAlertDialogData): Observable<any> =>\n this.open(EntryAlertDialogComponent, data);\n\n /**\n * Opens confirm dialog\n *\n * @param data - Contains title, message and optional confirm/cancel buttons text of IEntryConfirmDialogData type\n * @returns Observable of bool or undefined, `true` if confirmed, `false` if canceled or closed\n * , `undefined` if closed by clicking outside of the dialog\n */\n openConfirm = (data: IEntryConfirmDialogData): Observable<boolean | undefined> =>\n this.open(EntryConfirmDialogComponent, data);\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 cssClass - Optional parameter used to set custom class to Material overlay pane\n * @returns Observable of any containing result of dialog with custom component\n */\n open = (\n component: Type<EntryDialogComponent>,\n data: unknown = undefined,\n cssClass: string = ''): Observable<any> => {\n const configuration = new MatDialogConfig<unknown>();\n configuration.data = data;\n this.setPanelClassFor(configuration, cssClass);\n\n return this.matDialog\n .open(component, configuration)\n .afterClosed()\n .pipe(take(1));\n };\n\n readonly close = (): 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 { EntryAlertDialogComponent } from './dialogs/alert/entry-alert-dialog.component';\nimport { EntryConfirmDialogComponent } from './dialogs/confirm/entry-confirm-dialog.component';\nimport { EntryDialogComponent } from './dialogs/entry-dialog.component';\n\n@NgModule({\n declarations: [\n EntryDialogComponent,\n EntryAlertDialogComponent,\n EntryConfirmDialogComponent\n ],\n imports: [\n CommonModule,\n MatDialogModule\n ],\n exports: [\n EntryDialogComponent,\n EntryAlertDialogComponent,\n EntryConfirmDialogComponent\n ]\n})\nexport class EntryDialogModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2.EntryDialogComponent"],"mappings":";;;;;;;;;MAEa,iBAAiB,CAAA;AAK1B,IAAA,WAAA,CAAY,SAAqC,EAAE,EAAA;QAC/C,IAAI,CAAC,iBAAiB,GAAG,MAAM,CA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,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAjB,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,iBAd1B,oBAAoB;QACpB,yBAAyB;AACzB,QAAA,2BAA2B,aAG3B,YAAY;AACZ,QAAA,eAAe,aAGf,oBAAoB;QACpB,yBAAyB;QACzB,2BAA2B,CAAA,EAAA,CAAA,CAAA;AAGlB,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,EAVnB,OAAA,EAAA,CAAA;YACP,YAAY;YACZ,eAAe;AAChB,SAAA,CAAA,EAAA,CAAA,CAAA;4FAOU,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAhB7B,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;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,oBAAoB;wBACpB,yBAAyB;wBACzB,2BAA2B;AAC5B,qBAAA;AACF,iBAAA,CAAA;;;ACtBD;;AAEG;;;;"}
|
package/header/README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Entry Header
|
|
2
|
+
|
|
3
|
+
Simple way of providing header layout and styling for the page or section header.
|
|
4
|
+
|
|
5
|
+
## Imports
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import { EntryHeaderModule } from '@enigmatry/entry-components/entry-header';
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Basic usage
|
|
12
|
+
|
|
13
|
+
`entry-header` is used to provide standard layout and styles:
|
|
14
|
+
|
|
15
|
+
```html
|
|
16
|
+
<entry-header [title]="'Title here'">
|
|
17
|
+
<div buttons>
|
|
18
|
+
<button mat-raised-button color="primary">Add new</button>
|
|
19
|
+
<button mat-raised-button color="accent">Other action</button>
|
|
20
|
+
</div>
|
|
21
|
+
<div content>
|
|
22
|
+
Content goes here...
|
|
23
|
+
</div>
|
|
24
|
+
</entry-header>
|
|
25
|
+
```
|
|
26
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enigmatry/entry-components",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.60",
|
|
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/projects/entry-components#readme",
|