@enigmatry/entry-components 1.2.78 → 1.2.80
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/entry-dialog.component.d.ts +5 -0
- package/dialog/entry-dialog-buttons-alignment.type.d.ts +1 -1
- package/dialog/styles/modules/_generator.scss +11 -0
- package/dialog/styles/modules/components/dialogs/_general.scss +11 -0
- package/dialog/styles/modules/components/dialogs/footers/_general.scss +26 -0
- package/dialog/styles/modules/components/dialogs/headers/_general.scss +16 -0
- package/dialog/styles/modules/states/_hover.scss +19 -0
- package/dialog/styles/modules/theming/_default-theming.scss +29 -0
- package/dialog/styles/partials/core/_index.scss +3 -0
- package/dialog/styles/partials/core/components/_index.scss +1 -0
- package/dialog/styles/partials/core/components/dialogs/_general.scss +78 -0
- package/dialog/styles/partials/core/components/dialogs/_index.scss +1 -0
- package/dialog/styles/partials/core/elements/_general.scss +10 -0
- package/dialog/styles/partials/core/elements/_index.scss +1 -0
- package/dialog/styles/partials/core/layouts/_alignments.scss +13 -0
- package/dialog/styles/partials/core/layouts/_index.scss +1 -0
- package/dialog/styles/partials/main.scss +1 -0
- package/esm2020/dialog/dialogs/entry-dialog.component.mjs +8 -3
- package/esm2020/dialog/entry-dialog-buttons-alignment.type.mjs +1 -1
- package/fesm2015/enigmatry-entry-components-dialog.mjs +7 -2
- package/fesm2015/enigmatry-entry-components-dialog.mjs.map +1 -1
- package/fesm2020/enigmatry-entry-components-dialog.mjs +7 -2
- package/fesm2020/enigmatry-entry-components-dialog.mjs.map +1 -1
- package/header/styles/modules/_generator.scss +1 -1
- package/header/styles/modules/theming/_default-theming.scss +20 -0
- package/header/styles/partials/core/components/buttons/_general.scss +2 -2
- package/header/styles/partials/core/components/headers/_general.scss +2 -2
- package/package.json +1 -1
- package/styles/_generate.scss +12 -0
- package/styles/modules/_generate.scss +5 -0
- package/{header/styles → styles}/modules/_variables.scss +6 -5
- package/styles/modules/theming/_default-theming.scss +7 -0
- package/styles/modules/typography/_fonts.scss +82 -0
- package/styles/modules/typography/_generate.scss +7 -0
- package/header/styles/modules/themings/_default-theming.scss +0 -22
- /package/{header/styles → styles}/modules/_breakpoints.scss +0 -0
|
@@ -6,6 +6,11 @@ import { EntryDialogButtonsAlignment } from '../entry-dialog-buttons-alignment.t
|
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
/**
|
|
8
8
|
* Base Entry dialog component. Must be extended when building custom dialogs.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```html
|
|
12
|
+
* <entry-dialog title="TITLE"><p>Dialog content</p></entry-dialog>
|
|
13
|
+
* ```
|
|
9
14
|
*/
|
|
10
15
|
export declare class EntryDialogComponent {
|
|
11
16
|
protected readonly mdDialogRef: MatDialogRef<EntryDialogComponent>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Defines horizontal alignment of dialog buttons. */
|
|
2
|
-
export declare type EntryDialogButtonsAlignment = 'align-
|
|
2
|
+
export declare type EntryDialogButtonsAlignment = 'align-left' | 'align-center' | 'align-right';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
@use 'theming/default-theming' as default_theme;
|
|
4
|
+
@use 'components/dialogs/general' as dialogs;
|
|
5
|
+
|
|
6
|
+
$default-theme: default_theme.$theme;
|
|
7
|
+
|
|
8
|
+
@mixin generate($custom-theme: ()) {
|
|
9
|
+
$merged-theme: map.deep-merge($default-theme, $custom-theme);
|
|
10
|
+
@include dialogs.generate-dialog-from($merged-theme);
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
@use '@enigmatry/scss-foundation/src/modules/map';
|
|
2
|
+
@use 'headers/general' as headers;
|
|
3
|
+
@use 'footers/general' as footers;
|
|
4
|
+
|
|
5
|
+
@mixin generate-dialog-from($theme) {
|
|
6
|
+
.entry-dialog {
|
|
7
|
+
@include headers.generate-headers-from($theme);
|
|
8
|
+
@include footers.generate-footers-from($theme);
|
|
9
|
+
font-size: map.value-from($theme, 'default-font-size');
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
@use '@enigmatry/scss-foundation/src/modules/map';
|
|
2
|
+
@use '../../../states/hover';
|
|
3
|
+
|
|
4
|
+
@mixin generate-footers-from($theme) {
|
|
5
|
+
.button-confirm {
|
|
6
|
+
@include hover.default(
|
|
7
|
+
map.value-from($theme, 'button-confirm.default-font-color'),
|
|
8
|
+
map.value-from($theme, 'button-confirm.hover-font-color'));
|
|
9
|
+
background-color: map.value-from($theme, 'button-confirm.default-background');
|
|
10
|
+
|
|
11
|
+
&:hover {
|
|
12
|
+
background-color: map.value-from($theme, 'button-confirm.hover-background');
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.button-cancel {
|
|
17
|
+
@include hover.default(
|
|
18
|
+
map.value-from($theme, 'button-cancel.default-font-color'),
|
|
19
|
+
map.value-from($theme, 'button-cancel.hover-font-color'));
|
|
20
|
+
background-color: map.value-from($theme, 'button-cancel.default-background');
|
|
21
|
+
|
|
22
|
+
&:hover {
|
|
23
|
+
background-color: map.value-from($theme, 'button-cancel.hover-background');
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
@use '@enigmatry/scss-foundation/src/modules/map';
|
|
2
|
+
@use '../../../states/hover';
|
|
3
|
+
|
|
4
|
+
@mixin generate-headers-from($theme) {
|
|
5
|
+
.title {
|
|
6
|
+
color: map.value-from($theme, 'header.title.color');
|
|
7
|
+
font-size: map.value-from($theme, 'header.title.size');
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.close-button {
|
|
11
|
+
@include hover.default(
|
|
12
|
+
map.value-from($theme, 'header.close-icon.default-color'),
|
|
13
|
+
map.value-from($theme, 'header.close-icon.hover-color'));
|
|
14
|
+
font-size: map.value-from($theme, 'header.close-icon.size');
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@use '../../../../styles/modules/variables' as vars;
|
|
2
|
+
|
|
3
|
+
// TODO: remove this once implemented https://jira.enigmatry.com/browse/ETL-484
|
|
4
|
+
@mixin default($default: vars.$accent, $hover: vars.$body-font-color) {
|
|
5
|
+
transition: vars.$default-transition;
|
|
6
|
+
color: $default;
|
|
7
|
+
|
|
8
|
+
&:active {
|
|
9
|
+
color: $hover;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// Had to be done this way since at least Chrome isn't triggering ontouchend on mobile so hover state remains.
|
|
13
|
+
/* stylelint-disable-next-line at-rule-allowed-list, media-feature-name-allowed-list */
|
|
14
|
+
@media (hover: hover) {
|
|
15
|
+
&:hover {
|
|
16
|
+
color: $hover;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
@use '../../../../styles/modules/variables' as vars;
|
|
2
|
+
|
|
3
|
+
$theme: (
|
|
4
|
+
header: (
|
|
5
|
+
title: (
|
|
6
|
+
size: 20px,
|
|
7
|
+
color: vars.$font-color-default,
|
|
8
|
+
),
|
|
9
|
+
close-icon: (
|
|
10
|
+
size: 12px,
|
|
11
|
+
default-color: vars.$font-color-default,
|
|
12
|
+
hover-color: vars.$primary,
|
|
13
|
+
)
|
|
14
|
+
),
|
|
15
|
+
content-color: vars.$font-color-default,
|
|
16
|
+
default-font-size: 14px,
|
|
17
|
+
button-confirm: (
|
|
18
|
+
default-background: vars.$primary,
|
|
19
|
+
default-font-color: vars.$font-color-light,
|
|
20
|
+
hover-background: vars.$accent,
|
|
21
|
+
hover-font-color: vars.$font-color-light,
|
|
22
|
+
),
|
|
23
|
+
button-cancel: (
|
|
24
|
+
default-background: transparent,
|
|
25
|
+
default-font-color: vars.$primary,
|
|
26
|
+
hover-background: transparent,
|
|
27
|
+
hover-font-color: vars.$accent,
|
|
28
|
+
)
|
|
29
|
+
);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@use 'dialogs';
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
@use '@enigmatry/scss-foundation/src/modules/display/items';
|
|
2
|
+
@use '../../../../modules/states/hover';
|
|
3
|
+
@use '../../../../../../styles/modules/variables' as vars;
|
|
4
|
+
@use 'sass:color';
|
|
5
|
+
@use '../../../../../../styles/modules/typography/fonts' as fonts;
|
|
6
|
+
|
|
7
|
+
$border-dark: #000;
|
|
8
|
+
|
|
9
|
+
.dialog-container {
|
|
10
|
+
/* stylelint-disable-next-line declaration-no-important */
|
|
11
|
+
position: absolute !important;
|
|
12
|
+
top: vars.$large-gap;
|
|
13
|
+
width: 100%;
|
|
14
|
+
max: {
|
|
15
|
+
/* stylelint-disable-next-line declaration-no-important */
|
|
16
|
+
width: 700px !important;
|
|
17
|
+
/* stylelint-disable-next-line declaration-no-important */
|
|
18
|
+
height: calc(100% - 2 * vars.$large-gap) !important;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&.wide {
|
|
22
|
+
/* stylelint-disable-next-line declaration-no-important */
|
|
23
|
+
max-width: 85% !important;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&.small {
|
|
27
|
+
width: 400px;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.entry-dialog {
|
|
32
|
+
&.dialog-form {
|
|
33
|
+
height: 100%;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.dialog-header {
|
|
37
|
+
@include items.fully-align(center, space-between, row, nowrap);
|
|
38
|
+
|
|
39
|
+
.title {
|
|
40
|
+
// @include fonts.title-font();
|
|
41
|
+
line-height: 1.2;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.close-button {
|
|
45
|
+
margin-left: vars.$default-gap;
|
|
46
|
+
border: none;
|
|
47
|
+
background: none;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.dialog-content {
|
|
52
|
+
margin: {
|
|
53
|
+
top: vars.$default-gap;
|
|
54
|
+
bottom: vars.$large-gap;
|
|
55
|
+
}
|
|
56
|
+
line-height: 1.4;
|
|
57
|
+
|
|
58
|
+
&.with-actions {
|
|
59
|
+
/* stylelint-disable-next-line declaration-no-important */
|
|
60
|
+
max-height: calc(100% - 115px) !important;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.button-confirm, .button-cancel {
|
|
65
|
+
padding: 10px 20px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.dialog-radio-buttons {
|
|
69
|
+
display: block;
|
|
70
|
+
padding: 10px 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.dialog-radio-button {
|
|
74
|
+
display: block;
|
|
75
|
+
margin-top: vars.$default-gap;
|
|
76
|
+
white-space: break;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@use 'general';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@use 'general';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@use 'alignments';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@use 'core';
|
|
@@ -7,6 +7,11 @@ import * as i2 from "@angular/common";
|
|
|
7
7
|
import * as i3 from "../entry-dialog-config.model";
|
|
8
8
|
/**
|
|
9
9
|
* Base Entry dialog component. Must be extended when building custom dialogs.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```html
|
|
13
|
+
* <entry-dialog title="TITLE"><p>Dialog content</p></entry-dialog>
|
|
14
|
+
* ```
|
|
10
15
|
*/
|
|
11
16
|
export class EntryDialogComponent {
|
|
12
17
|
constructor(mdDialogRef, config) {
|
|
@@ -39,10 +44,10 @@ export class EntryDialogComponent {
|
|
|
39
44
|
}
|
|
40
45
|
}
|
|
41
46
|
EntryDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: EntryDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: ENTRY_DIALOG_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
|
|
42
|
-
EntryDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: EntryDialogComponent, selector: "entry-dialog", inputs: { title: "title", buttonsAlignment: "buttonsAlignment", confirmButtonText: "confirmButtonText", cancelButtonText: "cancelButtonText", hideButtons: "hideButtons", hideCancel: "hideCancel", hideClose: "hideClose", disableConfirm: "disableConfirm", buttonsTemplate: "buttonsTemplate", confirm: "confirm", cancel: "cancel" }, ngImport: i0, template: "<div class=\"dialog-form\">\n <div class=\"dialog-header\">\n <h1 class=\"
|
|
47
|
+
EntryDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: EntryDialogComponent, selector: "entry-dialog", inputs: { title: "title", buttonsAlignment: "buttonsAlignment", confirmButtonText: "confirmButtonText", cancelButtonText: "cancelButtonText", hideButtons: "hideButtons", hideCancel: "hideCancel", hideClose: "hideClose", disableConfirm: "disableConfirm", buttonsTemplate: "buttonsTemplate", confirm: "confirm", cancel: "cancel" }, ngImport: i0, template: "<div class=\"entry-dialog dialog-form\">\n <div class=\"dialog-header\">\n <h1 class=\"title\">{{ title }}</h1>\n\n <button *ngIf=\"!hideClose\" type=\"button\" class=\"close-button\" (click)=\"cancel()\">\n <span class=\"icon-close icon\"></span>\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 <ng-template [ngIf]=\"buttonsTemplate\" [ngIfElse]=\"defaultButtonsTemplate\">\n <ng-template [ngTemplateOutlet]=\"buttonsTemplate\"></ng-template>\n </ng-template>\n\n <ng-template #defaultButtonsTemplate>\n <div *ngIf=\"!hideButtons\" class=\"dialog-footer {{ buttonsAlignment }}\">\n <button\n cdkFocusInitial\n type=\"button\"\n class=\"button-confirm\"\n cdkFocusInitial\n (click)=\"onSubmit()\">{{confirmButtonText}}</button>\n <button\n *ngIf=\"!hideCancel\"\n type=\"button\"\n class=\"button-cancel\"\n (click)=\"cancel()\">{{cancelButtonText}}</button>\n </div>\n </ng-template>\n</div>", styles: [".align-center{margin:auto}\n"], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
43
48
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: EntryDialogComponent, decorators: [{
|
|
44
49
|
type: Component,
|
|
45
|
-
args: [{ selector: 'entry-dialog', template: "<div class=\"dialog-form\">\n <div class=\"dialog-header\">\n <h1 class=\"
|
|
50
|
+
args: [{ selector: 'entry-dialog', template: "<div class=\"entry-dialog dialog-form\">\n <div class=\"dialog-header\">\n <h1 class=\"title\">{{ title }}</h1>\n\n <button *ngIf=\"!hideClose\" type=\"button\" class=\"close-button\" (click)=\"cancel()\">\n <span class=\"icon-close icon\"></span>\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 <ng-template [ngIf]=\"buttonsTemplate\" [ngIfElse]=\"defaultButtonsTemplate\">\n <ng-template [ngTemplateOutlet]=\"buttonsTemplate\"></ng-template>\n </ng-template>\n\n <ng-template #defaultButtonsTemplate>\n <div *ngIf=\"!hideButtons\" class=\"dialog-footer {{ buttonsAlignment }}\">\n <button\n cdkFocusInitial\n type=\"button\"\n class=\"button-confirm\"\n cdkFocusInitial\n (click)=\"onSubmit()\">{{confirmButtonText}}</button>\n <button\n *ngIf=\"!hideCancel\"\n type=\"button\"\n class=\"button-cancel\"\n (click)=\"cancel()\">{{cancelButtonText}}</button>\n </div>\n </ng-template>\n</div>", styles: [".align-center{margin:auto}\n"] }]
|
|
46
51
|
}], ctorParameters: function () { return [{ type: i1.MatDialogRef }, { type: i3.EntryDialogConfig, decorators: [{
|
|
47
52
|
type: Inject,
|
|
48
53
|
args: [ENTRY_DIALOG_CONFIG]
|
|
@@ -69,4 +74,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
69
74
|
}], cancel: [{
|
|
70
75
|
type: Input
|
|
71
76
|
}] } });
|
|
72
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
77
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW50cnktZGlhbG9nLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvZW50cnktY29tcG9uZW50cy9kaWFsb2cvZGlhbG9ncy9lbnRyeS1kaWFsb2cuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9lbnRyeS1jb21wb25lbnRzL2RpYWxvZy9kaWFsb2dzL2VudHJ5LWRpYWxvZy5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sRUFBRSxLQUFLLEVBQWUsTUFBTSxlQUFlLENBQUM7QUFFdEUsT0FBTyxFQUFjLEVBQUUsRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUN0QyxPQUFPLEVBQUUsbUJBQW1CLEVBQXFCLE1BQU0sOEJBQThCLENBQUM7Ozs7O0FBR3RGOzs7Ozs7O0dBT0c7QUFNSCxNQUFNLE9BQU8sb0JBQW9CO0lBb0I3QixZQUN1QixXQUErQyxFQUN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1wbGF0ZSBbbmdJZl09XCJidXR0b25zVGVtcGxhdGVcIiBbbmdJZkVsc2VdPVwiZGVmYXVsdEJ1dHRvbnNUZW1wbGF0ZVwiPlxuICAgICAgICA8bmctdGVtcGxhdGUgW25nVGVtcGxhdGVPdXRsZXRdPVwiYnV0dG9uc1RlbXBsYXRlXCI+PC9uZy10ZW1wbGF0ZT5cbiAgICA8L25nLXRlbXBsYXRlPlxuXG4gICAgPG5nLXRlbXBsYXRlICNkZWZhdWx0QnV0dG9uc1RlbXBsYXRlPlxuICAgICAgICA8ZGl2ICpuZ0lmPVwiIWhpZGVCdXR0b25zXCIgY2xhc3M9XCJkaWFsb2ctZm9vdGVyIHt7IGJ1dHRvbnNBbGlnbm1lbnQgfX1cIj5cbiAgICAgICAgICAgIDxidXR0b25cbiAgICAgICAgICAgICAgICBjZGtGb2N1c0luaXRpYWxcbiAgICAgICAgICAgICAgICB0eXBlPVwiYnV0dG9uXCJcbiAgICAgICAgICAgICAgICBjbGFzcz1cImJ1dHRvbi1jb25maXJtXCJcbiAgICAgICAgICAgICAgICBjZGtGb2N1c0luaXRpYWxcbiAgICAgICAgICAgICAgICAoY2xpY2spPVwib25TdWJtaXQoKVwiPnt7Y29uZmlybUJ1dHRvblRleHR9fTwvYnV0dG9uPlxuICAgICAgICAgICAgPGJ1dHRvblxuICAgICAgICAgICAgICAgICpuZ0lmPVwiIWhpZGVDYW5jZWxcIlxuICAgICAgICAgICAgICAgIHR5cGU9XCJidXR0b25cIlxuICAgICAgICAgICAgICAgIGNsYXNzPVwiYnV0dG9uLWNhbmNlbFwiXG4gICAgICAgICAgICAgICAgKGNsaWNrKT1cImNhbmNlbCgpXCI+e3tjYW5jZWxCdXR0b25UZXh0fX08L2J1dHRvbj5cbiAgICAgICAgPC9kaXY+XG4gICAgPC9uZy10ZW1wbGF0ZT5cbjwvZGl2PiJdfQ==
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW50cnktZGlhbG9nLWJ1dHRvbnMtYWxpZ25tZW50LnR5cGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzL2VudHJ5LWNvbXBvbmVudHMvZGlhbG9nL2VudHJ5LWRpYWxvZy1idXR0b25zLWFsaWdubWVudC50eXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyIvKiogRGVmaW5lcyBob3Jpem9udGFsIGFsaWdubWVudCBvZiBkaWFsb2cgYnV0dG9ucy4gKi9cbmV4cG9ydCB0eXBlIEVudHJ5RGlhbG9nQnV0dG9uc0FsaWdubWVudCA9ICdhbGlnbi1sZWZ0JyB8ICdhbGlnbi1jZW50ZXInIHwgJ2FsaWduLXJpZ2h0JztcbiJdfQ==
|
|
@@ -38,6 +38,11 @@ const ENTRY_DIALOG_CONFIG = new InjectionToken('EntryDialogConfig', {
|
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* Base Entry dialog component. Must be extended when building custom dialogs.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```html
|
|
44
|
+
* <entry-dialog title="TITLE"><p>Dialog content</p></entry-dialog>
|
|
45
|
+
* ```
|
|
41
46
|
*/
|
|
42
47
|
class EntryDialogComponent {
|
|
43
48
|
constructor(mdDialogRef, config) {
|
|
@@ -70,10 +75,10 @@ class EntryDialogComponent {
|
|
|
70
75
|
}
|
|
71
76
|
}
|
|
72
77
|
EntryDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: EntryDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: ENTRY_DIALOG_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
|
|
73
|
-
EntryDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: EntryDialogComponent, selector: "entry-dialog", inputs: { title: "title", buttonsAlignment: "buttonsAlignment", confirmButtonText: "confirmButtonText", cancelButtonText: "cancelButtonText", hideButtons: "hideButtons", hideCancel: "hideCancel", hideClose: "hideClose", disableConfirm: "disableConfirm", buttonsTemplate: "buttonsTemplate", confirm: "confirm", cancel: "cancel" }, ngImport: i0, template: "<div class=\"dialog-form\">\n <div class=\"dialog-header\">\n <h1 class=\"
|
|
78
|
+
EntryDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: EntryDialogComponent, selector: "entry-dialog", inputs: { title: "title", buttonsAlignment: "buttonsAlignment", confirmButtonText: "confirmButtonText", cancelButtonText: "cancelButtonText", hideButtons: "hideButtons", hideCancel: "hideCancel", hideClose: "hideClose", disableConfirm: "disableConfirm", buttonsTemplate: "buttonsTemplate", confirm: "confirm", cancel: "cancel" }, ngImport: i0, template: "<div class=\"entry-dialog dialog-form\">\n <div class=\"dialog-header\">\n <h1 class=\"title\">{{ title }}</h1>\n\n <button *ngIf=\"!hideClose\" type=\"button\" class=\"close-button\" (click)=\"cancel()\">\n <span class=\"icon-close icon\"></span>\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 <ng-template [ngIf]=\"buttonsTemplate\" [ngIfElse]=\"defaultButtonsTemplate\">\n <ng-template [ngTemplateOutlet]=\"buttonsTemplate\"></ng-template>\n </ng-template>\n\n <ng-template #defaultButtonsTemplate>\n <div *ngIf=\"!hideButtons\" class=\"dialog-footer {{ buttonsAlignment }}\">\n <button\n cdkFocusInitial\n type=\"button\"\n class=\"button-confirm\"\n cdkFocusInitial\n (click)=\"onSubmit()\">{{confirmButtonText}}</button>\n <button\n *ngIf=\"!hideCancel\"\n type=\"button\"\n class=\"button-cancel\"\n (click)=\"cancel()\">{{cancelButtonText}}</button>\n </div>\n </ng-template>\n</div>", styles: [".align-center{margin:auto}\n"], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
74
79
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: EntryDialogComponent, decorators: [{
|
|
75
80
|
type: Component,
|
|
76
|
-
args: [{ selector: 'entry-dialog', template: "<div class=\"dialog-form\">\n <div class=\"dialog-header\">\n <h1 class=\"
|
|
81
|
+
args: [{ selector: 'entry-dialog', template: "<div class=\"entry-dialog dialog-form\">\n <div class=\"dialog-header\">\n <h1 class=\"title\">{{ title }}</h1>\n\n <button *ngIf=\"!hideClose\" type=\"button\" class=\"close-button\" (click)=\"cancel()\">\n <span class=\"icon-close icon\"></span>\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 <ng-template [ngIf]=\"buttonsTemplate\" [ngIfElse]=\"defaultButtonsTemplate\">\n <ng-template [ngTemplateOutlet]=\"buttonsTemplate\"></ng-template>\n </ng-template>\n\n <ng-template #defaultButtonsTemplate>\n <div *ngIf=\"!hideButtons\" class=\"dialog-footer {{ buttonsAlignment }}\">\n <button\n cdkFocusInitial\n type=\"button\"\n class=\"button-confirm\"\n cdkFocusInitial\n (click)=\"onSubmit()\">{{confirmButtonText}}</button>\n <button\n *ngIf=\"!hideCancel\"\n type=\"button\"\n class=\"button-cancel\"\n (click)=\"cancel()\">{{cancelButtonText}}</button>\n </div>\n </ng-template>\n</div>", styles: [".align-center{margin:auto}\n"] }]
|
|
77
82
|
}], ctorParameters: function () {
|
|
78
83
|
return [{ type: i1.MatDialogRef }, { type: EntryDialogConfig, decorators: [{
|
|
79
84
|
type: Inject,
|
|
@@ -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 { InjectionToken } from '@angular/core';\nimport { EntryDialogButtonsAlignment } from './entry-dialog-buttons-alignment.type';\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 ?? 'align-right';\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 * Can be updated with custom configuration.\n *\n * Defaults:\n * - confirmButtonText: 'Ok'\n * - cancelButtonText: 'Cancel'\n * - buttonsAlignment: 'align-right'\n * - hideClose: true\n * - disableClose: false\n */\nexport const ENTRY_DIALOG_CONFIG = new InjectionToken<EntryDialogConfig>(\n 'EntryDialogConfig',\n {\n providedIn: 'root',\n factory: () => new EntryDialogConfig()\n }\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@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=\"dialog-form\">\n <div class=\"dialog-header\">\n <h1 class=\"dialog-title\">{{title}}</h1>\n\n <button *ngIf=\"!hideClose\" 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 class=\"dialog-content\" [ngClass]=\"{'with-actions': !hideButtons}\">\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=\"!hideButtons\" class=\"dialog-footer {{ buttonsAlignment }}\">\n <button\n cdkFocusInitial\n type=\"button\"\n class=\"button button-accent dialog-footer-button\"\n (click)=\"onSubmit()\">{{confirmButtonText}}</button>\n <button\n *ngIf=\"!hideCancel\"\n type=\"button\"\n class=\"button button-primary dialog-footer-button\"\n (click)=\"cancel()\">{{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 { 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 { 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 { EntryDialogService } from './entry-dialog.service';\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 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":";;;;;;;;;AAGA;;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,CAAC,gBAAgB,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,aAAa,CAAC;QACjE,IAAI,CA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AAC5B,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,eAAe;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,oBAAoB;wBACpB,yBAAyB;wBACzB,2BAA2B;AAC5B,qBAAA;oBACD,SAAS,EAAE,CAAC,kBAAkB,CAAC;iBAChC,CAAA;;;ACxBD;;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/entry-dialog.service.ts","../../../../libs/entry-components/dialog/entry-dialog.module.ts","../../../../libs/entry-components/dialog/enigmatry-entry-components-dialog.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { EntryDialogButtonsAlignment } from './entry-dialog-buttons-alignment.type';\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 ?? 'align-right';\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 * Can be updated with custom configuration.\n *\n * Defaults:\n * - confirmButtonText: 'Ok'\n * - cancelButtonText: 'Cancel'\n * - buttonsAlignment: 'align-right'\n * - hideClose: true\n * - disableClose: false\n */\nexport const ENTRY_DIALOG_CONFIG = new InjectionToken<EntryDialogConfig>(\n 'EntryDialogConfig',\n {\n providedIn: 'root',\n factory: () => new EntryDialogConfig()\n }\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 dialog-form\">\n <div class=\"dialog-header\">\n <h1 class=\"title\">{{ title }}</h1>\n\n <button *ngIf=\"!hideClose\" type=\"button\" class=\"close-button\" (click)=\"cancel()\">\n <span class=\"icon-close icon\"></span>\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 <ng-template [ngIf]=\"buttonsTemplate\" [ngIfElse]=\"defaultButtonsTemplate\">\n <ng-template [ngTemplateOutlet]=\"buttonsTemplate\"></ng-template>\n </ng-template>\n\n <ng-template #defaultButtonsTemplate>\n <div *ngIf=\"!hideButtons\" class=\"dialog-footer {{ buttonsAlignment }}\">\n <button\n cdkFocusInitial\n type=\"button\"\n class=\"button-confirm\"\n cdkFocusInitial\n (click)=\"onSubmit()\">{{confirmButtonText}}</button>\n <button\n *ngIf=\"!hideCancel\"\n type=\"button\"\n class=\"button-cancel\"\n (click)=\"cancel()\">{{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 { 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 { 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 { EntryDialogService } from './entry-dialog.service';\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 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":";;;;;;;;;AAGA;;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,CAA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AA,CAAA;4FAQU,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAjB7B,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;oBACD,SAAS,EAAE,CAAC,kBAAkB,CAAC;iBAChC,CAAA;;;ACxBD;;AAEG;;;;"}
|
|
@@ -37,6 +37,11 @@ const ENTRY_DIALOG_CONFIG = new InjectionToken('EntryDialogConfig', {
|
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* Base Entry dialog component. Must be extended when building custom dialogs.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```html
|
|
43
|
+
* <entry-dialog title="TITLE"><p>Dialog content</p></entry-dialog>
|
|
44
|
+
* ```
|
|
40
45
|
*/
|
|
41
46
|
class EntryDialogComponent {
|
|
42
47
|
constructor(mdDialogRef, config) {
|
|
@@ -69,10 +74,10 @@ class EntryDialogComponent {
|
|
|
69
74
|
}
|
|
70
75
|
}
|
|
71
76
|
EntryDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: EntryDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: ENTRY_DIALOG_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
|
|
72
|
-
EntryDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: EntryDialogComponent, selector: "entry-dialog", inputs: { title: "title", buttonsAlignment: "buttonsAlignment", confirmButtonText: "confirmButtonText", cancelButtonText: "cancelButtonText", hideButtons: "hideButtons", hideCancel: "hideCancel", hideClose: "hideClose", disableConfirm: "disableConfirm", buttonsTemplate: "buttonsTemplate", confirm: "confirm", cancel: "cancel" }, ngImport: i0, template: "<div class=\"dialog-form\">\n <div class=\"dialog-header\">\n <h1 class=\"
|
|
77
|
+
EntryDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: EntryDialogComponent, selector: "entry-dialog", inputs: { title: "title", buttonsAlignment: "buttonsAlignment", confirmButtonText: "confirmButtonText", cancelButtonText: "cancelButtonText", hideButtons: "hideButtons", hideCancel: "hideCancel", hideClose: "hideClose", disableConfirm: "disableConfirm", buttonsTemplate: "buttonsTemplate", confirm: "confirm", cancel: "cancel" }, ngImport: i0, template: "<div class=\"entry-dialog dialog-form\">\n <div class=\"dialog-header\">\n <h1 class=\"title\">{{ title }}</h1>\n\n <button *ngIf=\"!hideClose\" type=\"button\" class=\"close-button\" (click)=\"cancel()\">\n <span class=\"icon-close icon\"></span>\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 <ng-template [ngIf]=\"buttonsTemplate\" [ngIfElse]=\"defaultButtonsTemplate\">\n <ng-template [ngTemplateOutlet]=\"buttonsTemplate\"></ng-template>\n </ng-template>\n\n <ng-template #defaultButtonsTemplate>\n <div *ngIf=\"!hideButtons\" class=\"dialog-footer {{ buttonsAlignment }}\">\n <button\n cdkFocusInitial\n type=\"button\"\n class=\"button-confirm\"\n cdkFocusInitial\n (click)=\"onSubmit()\">{{confirmButtonText}}</button>\n <button\n *ngIf=\"!hideCancel\"\n type=\"button\"\n class=\"button-cancel\"\n (click)=\"cancel()\">{{cancelButtonText}}</button>\n </div>\n </ng-template>\n</div>", styles: [".align-center{margin:auto}\n"], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
73
78
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: EntryDialogComponent, decorators: [{
|
|
74
79
|
type: Component,
|
|
75
|
-
args: [{ selector: 'entry-dialog', template: "<div class=\"dialog-form\">\n <div class=\"dialog-header\">\n <h1 class=\"
|
|
80
|
+
args: [{ selector: 'entry-dialog', template: "<div class=\"entry-dialog dialog-form\">\n <div class=\"dialog-header\">\n <h1 class=\"title\">{{ title }}</h1>\n\n <button *ngIf=\"!hideClose\" type=\"button\" class=\"close-button\" (click)=\"cancel()\">\n <span class=\"icon-close icon\"></span>\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 <ng-template [ngIf]=\"buttonsTemplate\" [ngIfElse]=\"defaultButtonsTemplate\">\n <ng-template [ngTemplateOutlet]=\"buttonsTemplate\"></ng-template>\n </ng-template>\n\n <ng-template #defaultButtonsTemplate>\n <div *ngIf=\"!hideButtons\" class=\"dialog-footer {{ buttonsAlignment }}\">\n <button\n cdkFocusInitial\n type=\"button\"\n class=\"button-confirm\"\n cdkFocusInitial\n (click)=\"onSubmit()\">{{confirmButtonText}}</button>\n <button\n *ngIf=\"!hideCancel\"\n type=\"button\"\n class=\"button-cancel\"\n (click)=\"cancel()\">{{cancelButtonText}}</button>\n </div>\n </ng-template>\n</div>", styles: [".align-center{margin:auto}\n"] }]
|
|
76
81
|
}], ctorParameters: function () { return [{ type: i1.MatDialogRef }, { type: EntryDialogConfig, decorators: [{
|
|
77
82
|
type: Inject,
|
|
78
83
|
args: [ENTRY_DIALOG_CONFIG]
|
|
@@ -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 { InjectionToken } from '@angular/core';\nimport { EntryDialogButtonsAlignment } from './entry-dialog-buttons-alignment.type';\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 ?? 'align-right';\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 * Can be updated with custom configuration.\n *\n * Defaults:\n * - confirmButtonText: 'Ok'\n * - cancelButtonText: 'Cancel'\n * - buttonsAlignment: 'align-right'\n * - hideClose: true\n * - disableClose: false\n */\nexport const ENTRY_DIALOG_CONFIG = new InjectionToken<EntryDialogConfig>(\n 'EntryDialogConfig',\n {\n providedIn: 'root',\n factory: () => new EntryDialogConfig()\n }\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@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=\"dialog-form\">\n <div class=\"dialog-header\">\n <h1 class=\"dialog-title\">{{title}}</h1>\n\n <button *ngIf=\"!hideClose\" 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 class=\"dialog-content\" [ngClass]=\"{'with-actions': !hideButtons}\">\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=\"!hideButtons\" class=\"dialog-footer {{ buttonsAlignment }}\">\n <button\n cdkFocusInitial\n type=\"button\"\n class=\"button button-accent dialog-footer-button\"\n (click)=\"onSubmit()\">{{confirmButtonText}}</button>\n <button\n *ngIf=\"!hideCancel\"\n type=\"button\"\n class=\"button button-primary dialog-footer-button\"\n (click)=\"cancel()\">{{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 { 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 { 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 { EntryDialogService } from './entry-dialog.service';\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 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":";;;;;;;;;AAGA;;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,aAAa,CAAC;QACjE,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;;;;;;;;;;AAUG;MACU,mBAAmB,GAAG,IAAI,cAAc,CACjD,mBAAmB,EACnB;AACI,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE;AACzC,CAAA;;ACrCL;;AAEG;MAMU,oBAAoB,CAAA;IAoB7B,WACuB,CAAA,WAA+C,EAClB,MAAyB,EAAA;QADtD,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,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,iBAf1B,oBAAoB;QACpB,yBAAyB;AACzB,QAAA,2BAA2B,aAG3B,YAAY;AACZ,QAAA,eAAe,aAGf,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,EATtB,OAAA,EAAA,CAAA;YACP,YAAY;YACZ,eAAe;AAChB,SAAA,CAAA,EAAA,CAAA,CAAA;4FAQU,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAjB7B,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;oBACD,SAAS,EAAE,CAAC,kBAAkB,CAAC;AAChC,iBAAA,CAAA;;;ACxBD;;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/entry-dialog.service.ts","../../../../libs/entry-components/dialog/entry-dialog.module.ts","../../../../libs/entry-components/dialog/enigmatry-entry-components-dialog.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { EntryDialogButtonsAlignment } from './entry-dialog-buttons-alignment.type';\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 ?? 'align-right';\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 * Can be updated with custom configuration.\n *\n * Defaults:\n * - confirmButtonText: 'Ok'\n * - cancelButtonText: 'Cancel'\n * - buttonsAlignment: 'align-right'\n * - hideClose: true\n * - disableClose: false\n */\nexport const ENTRY_DIALOG_CONFIG = new InjectionToken<EntryDialogConfig>(\n 'EntryDialogConfig',\n {\n providedIn: 'root',\n factory: () => new EntryDialogConfig()\n }\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 dialog-form\">\n <div class=\"dialog-header\">\n <h1 class=\"title\">{{ title }}</h1>\n\n <button *ngIf=\"!hideClose\" type=\"button\" class=\"close-button\" (click)=\"cancel()\">\n <span class=\"icon-close icon\"></span>\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 <ng-template [ngIf]=\"buttonsTemplate\" [ngIfElse]=\"defaultButtonsTemplate\">\n <ng-template [ngTemplateOutlet]=\"buttonsTemplate\"></ng-template>\n </ng-template>\n\n <ng-template #defaultButtonsTemplate>\n <div *ngIf=\"!hideButtons\" class=\"dialog-footer {{ buttonsAlignment }}\">\n <button\n cdkFocusInitial\n type=\"button\"\n class=\"button-confirm\"\n cdkFocusInitial\n (click)=\"onSubmit()\">{{confirmButtonText}}</button>\n <button\n *ngIf=\"!hideCancel\"\n type=\"button\"\n class=\"button-cancel\"\n (click)=\"cancel()\">{{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 { 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 { 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 { EntryDialogService } from './entry-dialog.service';\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 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":";;;;;;;;;AAGA;;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,aAAa,CAAC;QACjE,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;;;;;;;;;;AAUG;MACU,mBAAmB,GAAG,IAAI,cAAc,CACjD,mBAAmB,EACnB;AACI,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE;AACzC,CAAA;;ACrCL;;;;;;;AAOG;MAMU,oBAAoB,CAAA;IAoB7B,WACuB,CAAA,WAA+C,EAClB,MAAyB,EAAA;QADtD,IAAW,CAAA,WAAA,GAAX,WAAW,CAAoC;QAClB,IAAM,CAAA,MAAA,GAAN,MAAM,CAAmB;;AAlBpE,QAAA,IAAA,CAAA,gBAAgB,GAAgC,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC;;AAE7E,QAAA,IAAA,CAAA,iBAAiB,GAAG,IAAI,CAAC,MAAM,CAAC,iBAAiB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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,EATtB,OAAA,EAAA,CAAA;YACP,YAAY;YACZ,eAAe;AAChB,SAAA,CAAA,EAAA,CAAA,CAAA;4FAQU,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAjB7B,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;oBACD,SAAS,EAAE,CAAC,kBAAkB,CAAC;AAChC,iBAAA,CAAA;;;ACxBD;;AAEG;;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@use '../../../../styles/modules/variables' as vars;
|
|
2
|
+
|
|
3
|
+
$theme: (
|
|
4
|
+
header: (
|
|
5
|
+
background: vars.$primary-lightest,
|
|
6
|
+
title-size: 32px,
|
|
7
|
+
),
|
|
8
|
+
button-primary: (
|
|
9
|
+
default-background: vars.$primary,
|
|
10
|
+
default-font-color: vars.$font-color-light,
|
|
11
|
+
hover-background: vars.$accent,
|
|
12
|
+
hover-font-color: vars.$font-color-light,
|
|
13
|
+
),
|
|
14
|
+
button-accent: (
|
|
15
|
+
default-background: vars.$accent,
|
|
16
|
+
default-font-color: vars.$font-color-light,
|
|
17
|
+
hover-background: vars.$primary,
|
|
18
|
+
hover-font-color: vars.$font-color-light,
|
|
19
|
+
)
|
|
20
|
+
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@use '
|
|
2
|
-
|
|
1
|
+
@use '../../../../../../styles/modules/variables' as vars;
|
|
2
|
+
@use '../../../../../../styles/modules/typography/fonts' as fonts;
|
|
3
3
|
|
|
4
4
|
.button, %button {
|
|
5
5
|
// @include fonts.main-bolded-font(14px);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@use '
|
|
2
|
-
// @use 'styles/modules/breakpoints';
|
|
1
|
+
@use '../../../../../../styles/modules/variables' as vars;
|
|
2
|
+
// @use '../../../../../../styles/modules/breakpoints' as breakpoints;
|
|
3
3
|
|
|
4
4
|
.entry-header {
|
|
5
5
|
padding: 4px vars.$large-gap vars.$default-gap;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enigmatry/entry-components",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.80",
|
|
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",
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@use '../dialog/styles/modules/generator' as dialog;
|
|
2
|
+
@use '../dialog/styles/partials/main.scss' as dialogPartials;
|
|
3
|
+
@use '../header/styles/modules/generator' as header;
|
|
4
|
+
@use '../header/styles/partials/main.scss' as headerPartials;
|
|
5
|
+
@use './modules/generate' as modules;
|
|
6
|
+
@use 'sass:map';
|
|
7
|
+
|
|
8
|
+
@mixin generate($theme, $font-config: null) {
|
|
9
|
+
@include modules.generate($font-config);
|
|
10
|
+
@include dialog.generate(map.get($theme, dialog));
|
|
11
|
+
@include header.generate(map.get($theme, header));
|
|
12
|
+
}
|
|
@@ -6,16 +6,17 @@ $breakpoints: (
|
|
|
6
6
|
|
|
7
7
|
$primary: #2581C4;
|
|
8
8
|
$primary-lightest: #DFF1FD;
|
|
9
|
-
|
|
9
|
+
|
|
10
10
|
$accent: #EA518D;
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
$font-color-default: #323232;
|
|
12
13
|
$font-color-light: #FFF;
|
|
13
|
-
|
|
14
|
+
|
|
14
15
|
$disabled: #D9D9D9;
|
|
15
|
-
|
|
16
|
+
|
|
16
17
|
$font-size-default: 14px;
|
|
17
18
|
|
|
18
19
|
$default-gap: 16px;
|
|
19
20
|
$large-gap: calc(#{$default-gap} * 2);
|
|
20
21
|
|
|
21
|
-
$default-transition: .4s;
|
|
22
|
+
$default-transition: .4s;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
@use 'sass:string';
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
@use 'sass:math';
|
|
4
|
+
|
|
5
|
+
@mixin generate-font-face($font-config) {
|
|
6
|
+
$font-path: map.get($font-config, path);
|
|
7
|
+
$font-sources: map.get($font-config, sources);
|
|
8
|
+
|
|
9
|
+
@each $font in $font-sources {
|
|
10
|
+
$name: map.get($font, name);
|
|
11
|
+
$style: map.get($font, style);
|
|
12
|
+
$formats: map.get($font, formats);
|
|
13
|
+
|
|
14
|
+
@each $format in $formats {
|
|
15
|
+
$url: '#{$font-path}#{$name}/#{$name}-#{$style}.#{$format}';
|
|
16
|
+
|
|
17
|
+
@font-face {
|
|
18
|
+
font: {
|
|
19
|
+
family: '#{$name}-#{$style}';
|
|
20
|
+
style: '#{$style}';
|
|
21
|
+
}
|
|
22
|
+
src: url('#{$url}') format('#{$format}');
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Generate icomoon icons font face:
|
|
28
|
+
@include entry-icomoon-icons($font-path);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// TODO: Hardcoded icons font, must be configurable but also to support default value!
|
|
32
|
+
@mixin entry-icomoon-icons($font-path) {
|
|
33
|
+
@font-face {
|
|
34
|
+
font-family: 'icomoon';
|
|
35
|
+
font-style: normal;
|
|
36
|
+
font-weight: normal;
|
|
37
|
+
src: url($font-path + 'icomoon/fonts/icomoon.eot?s68r7n');
|
|
38
|
+
src: url($font-path + 'icomoon/fonts/icomoon.eot?s68r7n#iefix') format('embedded-opentype'),
|
|
39
|
+
url($font-path + 'icomoon/fonts/icomoon.ttf?s68r7n') format('truetype'),
|
|
40
|
+
url($font-path + 'icomoon/fonts//icomoon.woff?s68r7n') format('woff'),
|
|
41
|
+
url($font-path + 'icomoon/fonts//icomoon.svg?s68r7n#icomoon') format('svg');
|
|
42
|
+
font-display: block;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
[class ^= 'icon-'], [class *= ' icon-'] {
|
|
46
|
+
/* use !important to prevent issues with browser extensions that change fonts */
|
|
47
|
+
font-family: 'icomoon' !important;
|
|
48
|
+
|
|
49
|
+
/* Better Font Rendering =========== */
|
|
50
|
+
-webkit-font-smoothing: antialiased;
|
|
51
|
+
-moz-osx-font-smoothing: grayscale;
|
|
52
|
+
font-style: normal;
|
|
53
|
+
font-variant: normal;
|
|
54
|
+
font-weight: normal;
|
|
55
|
+
line-height: 1;
|
|
56
|
+
text-transform: none;
|
|
57
|
+
speak: never;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.icon-close::before {
|
|
61
|
+
content: '\e900';
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// TODO: Hardcoded mixins (currently not ins use) that should be configurable!
|
|
66
|
+
/*
|
|
67
|
+
@mixin -font($family, $size) {
|
|
68
|
+
font: {
|
|
69
|
+
family: $family;
|
|
70
|
+
size: $size;
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
@mixin main-font($size: 14px) {
|
|
74
|
+
@include -font('OpenSans-normal', $size);
|
|
75
|
+
}
|
|
76
|
+
@mixin main-bolded-font($size: 14px) {
|
|
77
|
+
@include -font('OpenSans-Bold', $size);
|
|
78
|
+
}
|
|
79
|
+
@mixin title-font($size: 20px) {
|
|
80
|
+
@include -font('Montserrat-bold', $size);
|
|
81
|
+
}
|
|
82
|
+
*/
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
@use '../variables' as vars;
|
|
2
|
-
|
|
3
|
-
@use 'sass:list';
|
|
4
|
-
|
|
5
|
-
$theme: (
|
|
6
|
-
header: (
|
|
7
|
-
background: vars.$primary-lightest,
|
|
8
|
-
title-size: 32px
|
|
9
|
-
),
|
|
10
|
-
button-primary: (
|
|
11
|
-
default-background: vars.$primary,
|
|
12
|
-
default-font-color: vars.$font-color-light,
|
|
13
|
-
hover-background: vars.$accent,
|
|
14
|
-
hover-font-color: vars.$font-color-light,
|
|
15
|
-
),
|
|
16
|
-
button-accent: (
|
|
17
|
-
default-background: vars.$accent,
|
|
18
|
-
default-font-color: vars.$font-color-light,
|
|
19
|
-
hover-background: vars.$primary,
|
|
20
|
-
hover-font-color: vars.$font-color-light,
|
|
21
|
-
)
|
|
22
|
-
);
|
|
File without changes
|