@craftsjs/alert 3.0.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +145 -143
  3. package/_craftsjs-alert.theme.scss +296 -296
  4. package/{esm2015/craftsjs-alert.js → esm2020/craftsjs-alert.mjs} +4 -4
  5. package/esm2020/lib/alert.module.mjs +67 -0
  6. package/esm2020/lib/components/dialog-alert/components/alert-info/alert-info.component.mjs +13 -0
  7. package/esm2020/lib/components/dialog-alert/components/alert-success/alert-success.component.mjs +13 -0
  8. package/esm2020/lib/components/dialog-alert/components/buttons/alert-cancel-button/alert-cancel-button.component.mjs +18 -0
  9. package/esm2020/lib/components/dialog-alert/components/buttons/alert-ok-button/alert-ok-button.component.mjs +18 -0
  10. package/{esm2015/lib/components/dialog-alert/components/components.js → esm2020/lib/components/dialog-alert/components/components.mjs} +24 -24
  11. package/esm2020/lib/components/dialog-alert/components/error/error.component.mjs +13 -0
  12. package/esm2020/lib/components/dialog-alert/components/warning/warning.component.mjs +13 -0
  13. package/esm2020/lib/components/dialog-alert/dialog-alert.component.mjs +74 -0
  14. package/{esm2015/lib/models/alert-enum.model.js → esm2020/lib/models/alert-enum.model.mjs} +8 -8
  15. package/esm2020/lib/models/alert.model.mjs +2 -0
  16. package/esm2020/lib/services/alert.service.mjs +64 -0
  17. package/{esm2015/public-api.js → esm2020/public-api.mjs} +16 -16
  18. package/fesm2015/craftsjs-alert.mjs +299 -0
  19. package/fesm2015/craftsjs-alert.mjs.map +1 -0
  20. package/fesm2020/craftsjs-alert.mjs +297 -0
  21. package/fesm2020/craftsjs-alert.mjs.map +1 -0
  22. package/{craftsjs-alert.d.ts → index.d.ts} +5 -4
  23. package/lib/alert.module.d.ts +20 -4
  24. package/lib/components/dialog-alert/components/alert-info/alert-info.component.d.ts +5 -2
  25. package/lib/components/dialog-alert/components/alert-success/alert-success.component.d.ts +5 -2
  26. package/lib/components/dialog-alert/components/buttons/alert-cancel-button/alert-cancel-button.component.d.ts +7 -4
  27. package/lib/components/dialog-alert/components/buttons/alert-ok-button/alert-ok-button.component.d.ts +7 -4
  28. package/lib/components/dialog-alert/components/components.d.ts +6 -6
  29. package/lib/components/dialog-alert/components/error/error.component.d.ts +5 -2
  30. package/lib/components/dialog-alert/components/warning/warning.component.d.ts +5 -2
  31. package/lib/components/dialog-alert/dialog-alert.component.d.ts +20 -18
  32. package/lib/models/alert-enum.model.d.ts +6 -6
  33. package/lib/models/alert.model.d.ts +12 -12
  34. package/lib/services/alert.service.d.ts +16 -13
  35. package/package.json +27 -15
  36. package/public-api.d.ts +12 -12
  37. package/bundles/craftsjs-alert.umd.js +0 -334
  38. package/bundles/craftsjs-alert.umd.js.map +0 -1
  39. package/craftsjs-alert.metadata.json +0 -1
  40. package/esm2015/lib/alert.module.js +0 -55
  41. package/esm2015/lib/components/dialog-alert/components/alert-info/alert-info.component.js +0 -16
  42. package/esm2015/lib/components/dialog-alert/components/alert-success/alert-success.component.js +0 -16
  43. package/esm2015/lib/components/dialog-alert/components/buttons/alert-cancel-button/alert-cancel-button.component.js +0 -18
  44. package/esm2015/lib/components/dialog-alert/components/buttons/alert-ok-button/alert-ok-button.component.js +0 -18
  45. package/esm2015/lib/components/dialog-alert/components/error/error.component.js +0 -16
  46. package/esm2015/lib/components/dialog-alert/components/warning/warning.component.js +0 -16
  47. package/esm2015/lib/components/dialog-alert/dialog-alert.component.js +0 -67
  48. package/esm2015/lib/models/alert.model.js +0 -2
  49. package/esm2015/lib/services/alert.service.js +0 -64
  50. package/fesm2015/craftsjs-alert.js +0 -302
  51. package/fesm2015/craftsjs-alert.js.map +0 -1
@@ -0,0 +1,299 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, ChangeDetectionStrategy, ViewEncapsulation, EventEmitter, Output, InjectionToken, TemplateRef, Injector, Inject, ViewChildren, Injectable, NgModule } from '@angular/core';
3
+ import * as i1 from '@angular/material/button';
4
+ import { MatButtonModule } from '@angular/material/button';
5
+ import * as i1$1 from '@angular/material/dialog';
6
+ import { MatDialogRef, MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
7
+ import * as i2 from '@ngx-translate/core';
8
+ import { TranslateModule } from '@ngx-translate/core';
9
+ import * as i2$1 from '@angular/common';
10
+ import { CommonModule } from '@angular/common';
11
+ import * as i3 from '@craftsjs/core';
12
+ import { DynamicDirective, CoreModule } from '@craftsjs/core';
13
+
14
+ class AlertSuccessComponent {
15
+ }
16
+ AlertSuccessComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AlertSuccessComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
17
+ AlertSuccessComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AlertSuccessComponent, selector: "alert-success", host: { classAttribute: "alert-icon alert-icon-success" }, ngImport: i0, template: "<span class=\"alert-icon-success-line alert-icon-success-line-long\"></span>\n<span class=\"alert-icon-success-line alert-icon-success-line-tip\"></span>\n<div class=\"alert-icon-success-ring\"></div>\n<div class=\"alert-icon-success-hide-corners\"></div>", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
18
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AlertSuccessComponent, decorators: [{
19
+ type: Component,
20
+ args: [{ selector: 'alert-success', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
21
+ class: 'alert-icon alert-icon-success'
22
+ }, template: "<span class=\"alert-icon-success-line alert-icon-success-line-long\"></span>\n<span class=\"alert-icon-success-line alert-icon-success-line-tip\"></span>\n<div class=\"alert-icon-success-ring\"></div>\n<div class=\"alert-icon-success-hide-corners\"></div>" }]
23
+ }] });
24
+
25
+ var AlertEnum;
26
+ (function (AlertEnum) {
27
+ AlertEnum["success"] = "success";
28
+ AlertEnum["error"] = "error";
29
+ AlertEnum["info"] = "info";
30
+ AlertEnum["warning"] = "warning";
31
+ })(AlertEnum || (AlertEnum = {}));
32
+
33
+ class AlertInfoComponent {
34
+ }
35
+ AlertInfoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AlertInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
36
+ AlertInfoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AlertInfoComponent, selector: "alert-info", host: { classAttribute: "alert-icon alert-icon-info" }, ngImport: i0, template: "", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
37
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AlertInfoComponent, decorators: [{
38
+ type: Component,
39
+ args: [{ selector: 'alert-info', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
40
+ class: 'alert-icon alert-icon-info'
41
+ }, template: "" }]
42
+ }] });
43
+
44
+ class WarningComponent {
45
+ }
46
+ WarningComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WarningComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
47
+ WarningComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: WarningComponent, selector: "alert-warning", host: { classAttribute: "alert-icon alert-icon-warning " }, ngImport: i0, template: "<span class=\"alert-icon-warning-body\">\n <span class=\"alert-icon-warning-dot\"></span>\n</span>", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
48
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WarningComponent, decorators: [{
49
+ type: Component,
50
+ args: [{ selector: 'alert-warning', host: {
51
+ class: 'alert-icon alert-icon-warning '
52
+ }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<span class=\"alert-icon-warning-body\">\n <span class=\"alert-icon-warning-dot\"></span>\n</span>" }]
53
+ }] });
54
+
55
+ class ErrorComponent {
56
+ }
57
+ ErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
58
+ ErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ErrorComponent, selector: "alert-error", host: { classAttribute: "alert-icon alert-icon-error" }, ngImport: i0, template: "<div class=\"alert-icon-error-x-mark\">\n <span class=\"alert-icon-error-line alert-icon-error-line-left\"></span>\n <span class=\"alert-icon-error-line alert-icon-error-line-right\"></span>\n</div>", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
59
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ErrorComponent, decorators: [{
60
+ type: Component,
61
+ args: [{ selector: 'alert-error', host: {
62
+ class: 'alert-icon alert-icon-error'
63
+ }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"alert-icon-error-x-mark\">\n <span class=\"alert-icon-error-line alert-icon-error-line-left\"></span>\n <span class=\"alert-icon-error-line alert-icon-error-line-right\"></span>\n</div>" }]
64
+ }] });
65
+
66
+ const alertComponents = [
67
+ {
68
+ type: AlertEnum.success,
69
+ component: AlertSuccessComponent
70
+ },
71
+ {
72
+ type: AlertEnum.info,
73
+ component: AlertInfoComponent
74
+ },
75
+ {
76
+ type: AlertEnum.warning,
77
+ component: WarningComponent
78
+ },
79
+ {
80
+ type: AlertEnum.error,
81
+ component: ErrorComponent
82
+ }
83
+ ];
84
+
85
+ class AlertOkButtonComponent {
86
+ constructor() {
87
+ this.click = new EventEmitter();
88
+ }
89
+ }
90
+ AlertOkButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AlertOkButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
91
+ AlertOkButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AlertOkButtonComponent, selector: "alert-ok-button", outputs: { click: "click" }, ngImport: i0, template: "<button mat-raised-button color=\"primary\" (click)=\"click.emit($event)\">{{'general.ok' | translate}}</button>", styles: [""], dependencies: [{ kind: "component", type: i1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
92
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AlertOkButtonComponent, decorators: [{
93
+ type: Component,
94
+ args: [{ selector: 'alert-ok-button', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button mat-raised-button color=\"primary\" (click)=\"click.emit($event)\">{{'general.ok' | translate}}</button>" }]
95
+ }], propDecorators: { click: [{
96
+ type: Output
97
+ }] } });
98
+
99
+ class AlertCancelButtonComponent {
100
+ constructor() {
101
+ this.click = new EventEmitter();
102
+ }
103
+ }
104
+ AlertCancelButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AlertCancelButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
105
+ AlertCancelButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AlertCancelButtonComponent, selector: "alert-cancel-button", outputs: { click: "click" }, ngImport: i0, template: "<button mat-raised-button (click)=\"click.emit($event)\">{{'general.cancel' | translate}}</button>", styles: [""], dependencies: [{ kind: "component", type: i1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
106
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AlertCancelButtonComponent, decorators: [{
107
+ type: Component,
108
+ args: [{ selector: 'alert-cancel-button', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button mat-raised-button (click)=\"click.emit($event)\">{{'general.cancel' | translate}}</button>" }]
109
+ }], propDecorators: { click: [{
110
+ type: Output
111
+ }] } });
112
+
113
+ const CRAFTSJS_ALERT_DATA = new InjectionToken('CraftsjsAlertData');
114
+ class DialogAlertComponent {
115
+ constructor(dialogRef, data) {
116
+ this.dialogRef = dialogRef;
117
+ this.data = data;
118
+ }
119
+ ngOnInit() {
120
+ }
121
+ ngAfterViewInit() {
122
+ this.loadComponents();
123
+ }
124
+ loadComponents() {
125
+ const itemComponent = alertComponents.find(x => x.type === this.data.type);
126
+ const component = itemComponent && itemComponent.component;
127
+ this.resolveComponent(component, this.appDynamic.find(x => x.name === 'alert-icon').viewContainerRef);
128
+ this.resolveComponent(this.data.customBody, this.appDynamic.find(x => x.name === 'alert-body').viewContainerRef);
129
+ this.resolveComponent(this.data.customButtonComponent, this.appDynamic.find(x => x.name === 'alert-buttons').viewContainerRef);
130
+ }
131
+ resolveComponent(component, viewContainerRef) {
132
+ if (!component) {
133
+ return;
134
+ }
135
+ viewContainerRef.clear();
136
+ if (component instanceof TemplateRef) {
137
+ viewContainerRef.createEmbeddedView(component, { $implicit: this.data, dialogRef: this.dialogRef });
138
+ }
139
+ else {
140
+ const injector = this.createInjector(viewContainerRef.injector);
141
+ viewContainerRef.createComponent(component, {
142
+ injector
143
+ });
144
+ }
145
+ }
146
+ createInjector(injector) {
147
+ return Injector.create({
148
+ providers: [{
149
+ provide: CRAFTSJS_ALERT_DATA,
150
+ useValue: this.data
151
+ },
152
+ {
153
+ provide: MatDialogRef,
154
+ useValue: this.dialogRef
155
+ }],
156
+ parent: injector
157
+ });
158
+ }
159
+ buttonClick(result) {
160
+ this.dialogRef.close({ data: this.data, result });
161
+ }
162
+ }
163
+ DialogAlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DialogAlertComponent, deps: [{ token: i1$1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
164
+ DialogAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: DialogAlertComponent, selector: "dialog-alert", viewQueries: [{ propertyName: "appDynamic", predicate: DynamicDirective, descendants: true }], ngImport: i0, template: "<ng-template craftsjsDynamic name=\"alert-icon\"></ng-template>\n<div *ngIf=\"data?.title\" class=\"alert-title\">\n <span>\n {{data.title | translate}}\n </span>\n</div>\n<div *ngIf=\"data?.text\" class=\"alert-text\">\n <span>\n {{data.text | translate}}\n </span>\n</div>\n<ng-template craftsjsDynamic name=\"alert-body\"></ng-template>\n<div class=\"alert-footer\" *ngIf=\"!data?.hiddenButtons\">\n <alert-ok-button *ngIf=\"!data?.customButtonComponent\" (click)=\"buttonClick('ok')\">\n </alert-ok-button>\n <alert-cancel-button *ngIf=\"!data?.customButtonComponent && data?.showCancelButton\"\n (click)=\"buttonClick('cancel')\">\n </alert-cancel-button>\n</div>\n<ng-template craftsjsDynamic name=\"alert-buttons\"></ng-template>", styles: [".alert-icon{width:80px;height:80px;border-width:4px;border-style:solid;border-radius:50%;padding:0;position:relative;box-sizing:content-box;margin:20px auto}.alert-icon-custom{width:auto;height:auto;max-width:100%;border:none;border-radius:0}.alert-icon img{max-width:100%;max-height:100%}.alert-title{color:#000000a6;font-weight:600;text-transform:none;position:relative;display:block;font-size:27px;line-height:normal;text-align:center;margin-bottom:0}.alert-title:first-child{margin-top:26px}.alert-title:not(:first-child){padding-bottom:0}.alert-title:not(:last-child){margin-bottom:13px}.alert-text{font-size:16px;position:relative;float:none;line-height:normal;vertical-align:top;text-align:center;display:inline-block;margin:0;padding:0 10px;font-weight:400;color:#000000a3;overflow-wrap:break-word;box-sizing:border-box;width:100%}.alert-text:first-child{margin-top:45px}.alert-text:last-child{margin-bottom:45px}.alert-footer{text-align:right;margin-top:13px;padding:13px 16px;border-radius:inherit;border-top-left-radius:0;border-top-right-radius:0}.alert-footer-button-container{margin:5px;display:inline-block;position:relative}.alert-footer>*{display:inline-block;margin-right:.5em}.alert-footer>:last-child{margin-right:inherit}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DynamicDirective, selector: "[craftsjsDynamic]", inputs: ["name"] }, { kind: "component", type: AlertOkButtonComponent, selector: "alert-ok-button", outputs: ["click"] }, { kind: "component", type: AlertCancelButtonComponent, selector: "alert-cancel-button", outputs: ["click"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
165
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DialogAlertComponent, decorators: [{
166
+ type: Component,
167
+ args: [{ selector: 'dialog-alert', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-template craftsjsDynamic name=\"alert-icon\"></ng-template>\n<div *ngIf=\"data?.title\" class=\"alert-title\">\n <span>\n {{data.title | translate}}\n </span>\n</div>\n<div *ngIf=\"data?.text\" class=\"alert-text\">\n <span>\n {{data.text | translate}}\n </span>\n</div>\n<ng-template craftsjsDynamic name=\"alert-body\"></ng-template>\n<div class=\"alert-footer\" *ngIf=\"!data?.hiddenButtons\">\n <alert-ok-button *ngIf=\"!data?.customButtonComponent\" (click)=\"buttonClick('ok')\">\n </alert-ok-button>\n <alert-cancel-button *ngIf=\"!data?.customButtonComponent && data?.showCancelButton\"\n (click)=\"buttonClick('cancel')\">\n </alert-cancel-button>\n</div>\n<ng-template craftsjsDynamic name=\"alert-buttons\"></ng-template>", styles: [".alert-icon{width:80px;height:80px;border-width:4px;border-style:solid;border-radius:50%;padding:0;position:relative;box-sizing:content-box;margin:20px auto}.alert-icon-custom{width:auto;height:auto;max-width:100%;border:none;border-radius:0}.alert-icon img{max-width:100%;max-height:100%}.alert-title{color:#000000a6;font-weight:600;text-transform:none;position:relative;display:block;font-size:27px;line-height:normal;text-align:center;margin-bottom:0}.alert-title:first-child{margin-top:26px}.alert-title:not(:first-child){padding-bottom:0}.alert-title:not(:last-child){margin-bottom:13px}.alert-text{font-size:16px;position:relative;float:none;line-height:normal;vertical-align:top;text-align:center;display:inline-block;margin:0;padding:0 10px;font-weight:400;color:#000000a3;overflow-wrap:break-word;box-sizing:border-box;width:100%}.alert-text:first-child{margin-top:45px}.alert-text:last-child{margin-bottom:45px}.alert-footer{text-align:right;margin-top:13px;padding:13px 16px;border-radius:inherit;border-top-left-radius:0;border-top-right-radius:0}.alert-footer-button-container{margin:5px;display:inline-block;position:relative}.alert-footer>*{display:inline-block;margin-right:.5em}.alert-footer>:last-child{margin-right:inherit}\n"] }]
168
+ }], ctorParameters: function () {
169
+ return [{ type: i1$1.MatDialogRef }, { type: undefined, decorators: [{
170
+ type: Inject,
171
+ args: [MAT_DIALOG_DATA]
172
+ }] }];
173
+ }, propDecorators: { appDynamic: [{
174
+ type: ViewChildren,
175
+ args: [DynamicDirective]
176
+ }] } });
177
+
178
+ class AlertService {
179
+ constructor(_dialog) {
180
+ this._dialog = _dialog;
181
+ }
182
+ showSimple(title, message) {
183
+ return this._open({
184
+ title,
185
+ text: message
186
+ });
187
+ }
188
+ showSuccess(title, message) {
189
+ return this._open({
190
+ title,
191
+ text: message,
192
+ type: AlertEnum.success
193
+ });
194
+ }
195
+ showError(title, message) {
196
+ return this._open({
197
+ title,
198
+ text: message,
199
+ type: AlertEnum.error
200
+ });
201
+ }
202
+ showInfo(title, message) {
203
+ return this._open({
204
+ title,
205
+ text: message,
206
+ type: AlertEnum.info
207
+ });
208
+ }
209
+ showWarning(title, message) {
210
+ return this._open({
211
+ title,
212
+ text: message,
213
+ type: AlertEnum.warning
214
+ });
215
+ }
216
+ showConfirmation(title, message) {
217
+ return this._open({
218
+ title,
219
+ text: message,
220
+ type: AlertEnum.warning,
221
+ showCancelButton: true
222
+ });
223
+ }
224
+ _open(alertModel) {
225
+ return this._dialog.open(DialogAlertComponent, {
226
+ width: '500px',
227
+ data: alertModel
228
+ });
229
+ }
230
+ }
231
+ AlertService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AlertService, deps: [{ token: i1$1.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable });
232
+ AlertService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AlertService });
233
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AlertService, decorators: [{
234
+ type: Injectable
235
+ }], ctorParameters: function () { return [{ type: i1$1.MatDialog }]; } });
236
+
237
+ class AlertModule {
238
+ static forRoot() {
239
+ return {
240
+ ngModule: AlertModule,
241
+ providers: [
242
+ AlertService
243
+ ]
244
+ };
245
+ }
246
+ }
247
+ AlertModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
248
+ AlertModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: AlertModule, declarations: [DialogAlertComponent,
249
+ AlertSuccessComponent,
250
+ AlertInfoComponent,
251
+ WarningComponent,
252
+ ErrorComponent,
253
+ AlertOkButtonComponent,
254
+ AlertCancelButtonComponent], imports: [CommonModule,
255
+ TranslateModule,
256
+ MatButtonModule,
257
+ CoreModule,
258
+ MatDialogModule], exports: [DialogAlertComponent] });
259
+ AlertModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AlertModule, imports: [CommonModule,
260
+ TranslateModule,
261
+ MatButtonModule,
262
+ CoreModule,
263
+ MatDialogModule] });
264
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AlertModule, decorators: [{
265
+ type: NgModule,
266
+ args: [{
267
+ imports: [
268
+ CommonModule,
269
+ TranslateModule,
270
+ MatButtonModule,
271
+ CoreModule,
272
+ MatDialogModule
273
+ ],
274
+ declarations: [
275
+ DialogAlertComponent,
276
+ AlertSuccessComponent,
277
+ AlertInfoComponent,
278
+ WarningComponent,
279
+ ErrorComponent,
280
+ AlertOkButtonComponent,
281
+ AlertCancelButtonComponent
282
+ ],
283
+ exports: [
284
+ DialogAlertComponent
285
+ ]
286
+ }]
287
+ }] });
288
+
289
+ /*
290
+ * Public API Surface of alert
291
+ */
292
+
293
+ /**
294
+ * Generated bundle index. Do not edit.
295
+ */
296
+
297
+ export { AlertCancelButtonComponent, AlertEnum, AlertInfoComponent, AlertModule, AlertOkButtonComponent, AlertService, AlertSuccessComponent, CRAFTSJS_ALERT_DATA, DialogAlertComponent, ErrorComponent, WarningComponent, alertComponents };
298
+ //# sourceMappingURL=craftsjs-alert.mjs.map
299
+ //# sourceMappingURL=craftsjs-alert.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"craftsjs-alert.mjs","sources":["../../../../projects/craftsjs/alert/src/lib/components/dialog-alert/components/alert-success/alert-success.component.ts","../../../../projects/craftsjs/alert/src/lib/components/dialog-alert/components/alert-success/alert-success.component.html","../../../../projects/craftsjs/alert/src/lib/models/alert-enum.model.ts","../../../../projects/craftsjs/alert/src/lib/components/dialog-alert/components/alert-info/alert-info.component.ts","../../../../projects/craftsjs/alert/src/lib/components/dialog-alert/components/alert-info/alert-info.component.html","../../../../projects/craftsjs/alert/src/lib/components/dialog-alert/components/warning/warning.component.ts","../../../../projects/craftsjs/alert/src/lib/components/dialog-alert/components/warning/warning.component.html","../../../../projects/craftsjs/alert/src/lib/components/dialog-alert/components/error/error.component.ts","../../../../projects/craftsjs/alert/src/lib/components/dialog-alert/components/error/error.component.html","../../../../projects/craftsjs/alert/src/lib/components/dialog-alert/components/components.ts","../../../../projects/craftsjs/alert/src/lib/components/dialog-alert/components/buttons/alert-ok-button/alert-ok-button.component.ts","../../../../projects/craftsjs/alert/src/lib/components/dialog-alert/components/buttons/alert-ok-button/alert-ok-button.component.html","../../../../projects/craftsjs/alert/src/lib/components/dialog-alert/components/buttons/alert-cancel-button/alert-cancel-button.component.ts","../../../../projects/craftsjs/alert/src/lib/components/dialog-alert/components/buttons/alert-cancel-button/alert-cancel-button.component.html","../../../../projects/craftsjs/alert/src/lib/components/dialog-alert/dialog-alert.component.ts","../../../../projects/craftsjs/alert/src/lib/components/dialog-alert/dialog-alert.component.html","../../../../projects/craftsjs/alert/src/lib/services/alert.service.ts","../../../../projects/craftsjs/alert/src/lib/alert.module.ts","../../../../projects/craftsjs/alert/src/public-api.ts","../../../../projects/craftsjs/alert/src/craftsjs-alert.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'alert-success',\n templateUrl: './alert-success.component.html',\n styleUrls: ['./alert-success.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'alert-icon alert-icon-success'\n }\n})\nexport class AlertSuccessComponent { }\n","<span class=\"alert-icon-success-line alert-icon-success-line-long\"></span>\n<span class=\"alert-icon-success-line alert-icon-success-line-tip\"></span>\n<div class=\"alert-icon-success-ring\"></div>\n<div class=\"alert-icon-success-hide-corners\"></div>","export enum AlertEnum {\n success = 'success',\n error = 'error',\n info = 'info',\n warning = 'warning'\n}\n","import { Component, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'alert-info',\n templateUrl: './alert-info.component.html',\n styleUrls: ['./alert-info.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'alert-icon alert-icon-info'\n }\n})\nexport class AlertInfoComponent { }\n","","import { Component, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'alert-warning',\n templateUrl: './warning.component.html',\n styleUrls: ['./warning.component.scss'],\n host: {\n class: 'alert-icon alert-icon-warning '\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class WarningComponent { }\n","<span class=\"alert-icon-warning-body\">\n <span class=\"alert-icon-warning-dot\"></span>\n</span>","import { Component, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';\n\n@Component({\n selector: 'alert-error',\n templateUrl: './error.component.html',\n styleUrls: ['./error.component.scss'],\n host: {\n class: 'alert-icon alert-icon-error'\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ErrorComponent { }\n","<div class=\"alert-icon-error-x-mark\">\n <span class=\"alert-icon-error-line alert-icon-error-line-left\"></span>\n <span class=\"alert-icon-error-line alert-icon-error-line-right\"></span>\n</div>","import { AlertSuccessComponent } from './alert-success/alert-success.component';\nimport { AlertEnum } from '../../../models/alert-enum.model';\nimport { AlertInfoComponent } from './alert-info/alert-info.component';\nimport { WarningComponent } from './warning/warning.component';\nimport { ErrorComponent } from './error/error.component';\n\nexport const alertComponents = [\n {\n type: AlertEnum.success,\n component: AlertSuccessComponent\n },\n {\n type: AlertEnum.info,\n component: AlertInfoComponent\n },\n {\n type: AlertEnum.warning,\n component: WarningComponent\n },\n {\n type: AlertEnum.error,\n component: ErrorComponent\n }\n];\n","import { Component, ChangeDetectionStrategy, Output, EventEmitter } from '@angular/core';\n\n@Component({\n selector: 'alert-ok-button',\n templateUrl: './alert-ok-button.component.html',\n styleUrls: ['./alert-ok-button.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class AlertOkButtonComponent {\n @Output()\n click = new EventEmitter();\n}\n","<button mat-raised-button color=\"primary\" (click)=\"click.emit($event)\">{{'general.ok' | translate}}</button>","import { Component, ChangeDetectionStrategy, Output, EventEmitter } from '@angular/core';\n\n@Component({\n selector: 'alert-cancel-button',\n templateUrl: './alert-cancel-button.component.html',\n styleUrls: ['./alert-cancel-button.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class AlertCancelButtonComponent {\n @Output()\n click = new EventEmitter();\n}\n","<button mat-raised-button (click)=\"click.emit($event)\">{{'general.cancel' | translate}}</button>","import {\n Component,\n ChangeDetectionStrategy,\n Inject,\n ViewEncapsulation,\n OnInit,\n Injector,\n InjectionToken,\n Type,\n ViewContainerRef,\n QueryList,\n ViewChildren,\n AfterViewInit,\n TemplateRef\n} from '@angular/core';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { AlertModel } from '../../models/alert.model';\nimport { alertComponents } from './components/components';\nimport { DynamicDirective } from '@craftsjs/core';\n\nexport const CRAFTSJS_ALERT_DATA = new InjectionToken<any>('CraftsjsAlertData');\n\n@Component({\n selector: 'dialog-alert',\n templateUrl: './dialog-alert.component.html',\n styleUrls: ['./dialog-alert.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class DialogAlertComponent implements OnInit, AfterViewInit {\n\n @ViewChildren(DynamicDirective)\n appDynamic: QueryList<DynamicDirective>;\n\n constructor(\n public dialogRef: MatDialogRef<DialogAlertComponent>,\n @Inject(MAT_DIALOG_DATA) public data: AlertModel,\n ) {\n }\n\n ngOnInit(): void {\n\n }\n\n ngAfterViewInit(): void {\n this.loadComponents();\n }\n\n private loadComponents() {\n const itemComponent = alertComponents.find(x => x.type === this.data.type);\n const component = itemComponent && itemComponent.component;\n this.resolveComponent(component, this.appDynamic.find(x => x.name === 'alert-icon').viewContainerRef);\n this.resolveComponent(this.data.customBody, this.appDynamic.find(x => x.name === 'alert-body').viewContainerRef);\n this.resolveComponent(this.data.customButtonComponent, this.appDynamic.find(x => x.name === 'alert-buttons').viewContainerRef);\n }\n\n private resolveComponent(component: Type<any> | TemplateRef<any>, viewContainerRef: ViewContainerRef) {\n if (!component) { return; }\n viewContainerRef.clear();\n if (component instanceof TemplateRef) {\n viewContainerRef.createEmbeddedView(component, { $implicit: this.data, dialogRef: this.dialogRef });\n } else {\n const injector = this.createInjector(viewContainerRef.injector);\n viewContainerRef.createComponent(component, {\n injector\n });\n }\n }\n\n private createInjector(injector: Injector) {\n return Injector.create({\n providers: [{\n provide: CRAFTSJS_ALERT_DATA,\n useValue: this.data\n },\n {\n provide: MatDialogRef,\n useValue: this.dialogRef\n }],\n parent: injector\n })\n }\n\n buttonClick(result: string) {\n this.dialogRef.close({ data: this.data, result });\n }\n\n}\n","<ng-template craftsjsDynamic name=\"alert-icon\"></ng-template>\n<div *ngIf=\"data?.title\" class=\"alert-title\">\n <span>\n {{data.title | translate}}\n </span>\n</div>\n<div *ngIf=\"data?.text\" class=\"alert-text\">\n <span>\n {{data.text | translate}}\n </span>\n</div>\n<ng-template craftsjsDynamic name=\"alert-body\"></ng-template>\n<div class=\"alert-footer\" *ngIf=\"!data?.hiddenButtons\">\n <alert-ok-button *ngIf=\"!data?.customButtonComponent\" (click)=\"buttonClick('ok')\">\n </alert-ok-button>\n <alert-cancel-button *ngIf=\"!data?.customButtonComponent && data?.showCancelButton\"\n (click)=\"buttonClick('cancel')\">\n </alert-cancel-button>\n</div>\n<ng-template craftsjsDynamic name=\"alert-buttons\"></ng-template>","import { Injectable } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { AlertModel } from '../models/alert.model';\nimport { AlertEnum } from '../models/alert-enum.model';\nimport { DialogAlertComponent } from '../components/dialog-alert/dialog-alert.component';\n\n@Injectable()\nexport class AlertService {\n\n constructor(private _dialog: MatDialog) { }\n\n showSimple(title: string, message: string) {\n return this._open({\n title,\n text: message\n } as AlertModel);\n }\n\n showSuccess(title: string, message: string) {\n return this._open({\n title,\n text: message,\n type: AlertEnum.success\n });\n }\n\n showError(title: string, message: string) {\n return this._open({\n title,\n text: message,\n type: AlertEnum.error\n });\n }\n\n showInfo(title: string, message: string) {\n return this._open({\n title,\n text: message,\n type: AlertEnum.info\n });\n }\n\n showWarning(title: string, message: string) {\n return this._open({\n title,\n text: message,\n type: AlertEnum.warning\n });\n }\n\n showConfirmation(title: string, message: string) {\n return this._open({\n title,\n text: message,\n type: AlertEnum.warning,\n showCancelButton: true\n });\n }\n\n private _open(alertModel: AlertModel) {\n return this._dialog.open(DialogAlertComponent, {\n width: '500px',\n data: alertModel\n });\n }\n}\n","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { CommonModule } from '@angular/common';\nimport { CoreModule } from '@craftsjs/core';\nimport { DialogAlertComponent } from './components/dialog-alert/dialog-alert.component';\nimport { AlertSuccessComponent } from './components/dialog-alert/components/alert-success/alert-success.component';\nimport { AlertInfoComponent } from './components/dialog-alert/components/alert-info/alert-info.component';\nimport { WarningComponent } from './components/dialog-alert/components/warning/warning.component';\nimport { ErrorComponent } from './components/dialog-alert/components/error/error.component';\nimport { AlertOkButtonComponent } from './components/dialog-alert/components/buttons/alert-ok-button/alert-ok-button.component';\nimport {\n AlertCancelButtonComponent\n} from './components/dialog-alert/components/buttons/alert-cancel-button/alert-cancel-button.component';\nimport { AlertService } from './services/alert.service';\n\n@NgModule({\n imports: [\n CommonModule,\n TranslateModule,\n MatButtonModule,\n CoreModule,\n MatDialogModule\n ],\n declarations: [\n DialogAlertComponent,\n AlertSuccessComponent,\n AlertInfoComponent,\n WarningComponent,\n ErrorComponent,\n AlertOkButtonComponent,\n AlertCancelButtonComponent\n ],\n exports: [\n DialogAlertComponent\n ]\n})\nexport class AlertModule {\n static forRoot(): ModuleWithProviders<AlertModule> {\n return {\n ngModule: AlertModule,\n providers: [\n AlertService\n ]\n };\n }\n}\n","/*\n * Public API Surface of alert\n */\n\nexport * from './lib/alert.module';\nexport * from './lib/components/dialog-alert/dialog-alert.component';\nexport * from './lib/components/dialog-alert/components/alert-info/alert-info.component';\nexport * from './lib/components/dialog-alert/components/alert-success/alert-success.component';\nexport * from './lib/components/dialog-alert/components/buttons/alert-cancel-button/alert-cancel-button.component';\nexport * from './lib/components/dialog-alert/components/buttons/alert-ok-button/alert-ok-button.component';\nexport * from './lib/components/dialog-alert/components/components';\nexport * from './lib/components/dialog-alert/components/error/error.component';\nexport * from './lib/components/dialog-alert/components/warning/warning.component';\nexport * from './lib/models/alert-enum.model';\nexport * from './lib/models/alert.model';\nexport * from './lib/services/alert.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","i4.AlertOkButtonComponent","i5.AlertCancelButtonComponent","i6","i1"],"mappings":";;;;;;;;;;;;;MAYa,qBAAqB,CAAA;;kHAArB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAArB,qBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,qBAAqB,gHCZlC,iQAGmD,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;2FDStC,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAVjC,SAAS;+BACE,eAAe,EAAA,eAAA,EAGR,uBAA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