@craftsjs/alert 3.0.0 → 4.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.
- package/README.md +1 -0
- package/craftsjs-alert.d.ts +1 -0
- package/{esm2015/craftsjs-alert.js → esm2020/craftsjs-alert.mjs} +0 -0
- package/esm2020/lib/alert.module.mjs +69 -0
- package/esm2020/lib/components/dialog-alert/components/alert-info/alert-info.component.mjs +13 -0
- package/esm2020/lib/components/dialog-alert/components/alert-success/alert-success.component.mjs +13 -0
- package/esm2020/lib/components/dialog-alert/components/buttons/alert-cancel-button/alert-cancel-button.component.mjs +18 -0
- package/esm2020/lib/components/dialog-alert/components/buttons/alert-ok-button/alert-ok-button.component.mjs +18 -0
- package/{esm2015/lib/components/dialog-alert/components/components.js → esm2020/lib/components/dialog-alert/components/components.mjs} +0 -0
- package/esm2020/lib/components/dialog-alert/components/error/error.component.mjs +13 -0
- package/esm2020/lib/components/dialog-alert/components/warning/warning.component.mjs +13 -0
- package/esm2020/lib/components/dialog-alert/dialog-alert.component.mjs +74 -0
- package/{esm2015/lib/models/alert-enum.model.js → esm2020/lib/models/alert-enum.model.mjs} +0 -0
- package/{esm2015/lib/models/alert.model.js → esm2020/lib/models/alert.model.mjs} +0 -0
- package/esm2020/lib/services/alert.service.mjs +64 -0
- package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
- package/fesm2015/craftsjs-alert.mjs +300 -0
- package/fesm2015/craftsjs-alert.mjs.map +1 -0
- package/fesm2020/craftsjs-alert.mjs +298 -0
- package/fesm2020/craftsjs-alert.mjs.map +1 -0
- package/lib/alert.module.d.ts +16 -0
- package/lib/components/dialog-alert/components/alert-info/alert-info.component.d.ts +3 -0
- package/lib/components/dialog-alert/components/alert-success/alert-success.component.d.ts +3 -0
- package/lib/components/dialog-alert/components/buttons/alert-cancel-button/alert-cancel-button.component.d.ts +3 -0
- package/lib/components/dialog-alert/components/buttons/alert-ok-button/alert-ok-button.component.d.ts +3 -0
- package/lib/components/dialog-alert/components/error/error.component.d.ts +3 -0
- package/lib/components/dialog-alert/components/warning/warning.component.d.ts +3 -0
- package/lib/components/dialog-alert/dialog-alert.component.d.ts +5 -3
- package/lib/services/alert.service.d.ts +3 -0
- package/package.json +26 -14
- package/bundles/craftsjs-alert.umd.js +0 -334
- package/bundles/craftsjs-alert.umd.js.map +0 -1
- package/craftsjs-alert.metadata.json +0 -1
- package/esm2015/lib/alert.module.js +0 -55
- package/esm2015/lib/components/dialog-alert/components/alert-info/alert-info.component.js +0 -16
- package/esm2015/lib/components/dialog-alert/components/alert-success/alert-success.component.js +0 -16
- package/esm2015/lib/components/dialog-alert/components/buttons/alert-cancel-button/alert-cancel-button.component.js +0 -18
- package/esm2015/lib/components/dialog-alert/components/buttons/alert-ok-button/alert-ok-button.component.js +0 -18
- package/esm2015/lib/components/dialog-alert/components/error/error.component.js +0 -16
- package/esm2015/lib/components/dialog-alert/components/warning/warning.component.js +0 -16
- package/esm2015/lib/components/dialog-alert/dialog-alert.component.js +0 -67
- package/esm2015/lib/services/alert.service.js +0 -64
- package/fesm2015/craftsjs-alert.js +0 -302
- package/fesm2015/craftsjs-alert.js.map +0 -1
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { Component, ChangeDetectionStrategy, Inject, ViewEncapsulation, ComponentFactoryResolver, InjectionToken, ViewChildren, TemplateRef } from '@angular/core';
|
|
2
|
-
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
3
|
-
import { alertComponents } from './components/components';
|
|
4
|
-
import { PortalInjector } from '@angular/cdk/portal';
|
|
5
|
-
import { DynamicDirective } from '@craftsjs/core';
|
|
6
|
-
export const CRAFTSJS_ALERT_DATA = new InjectionToken('CraftsjsAlertData');
|
|
7
|
-
export class DialogAlertComponent {
|
|
8
|
-
constructor(dialogRef, data, componentFactoryResolver) {
|
|
9
|
-
this.dialogRef = dialogRef;
|
|
10
|
-
this.data = data;
|
|
11
|
-
this.componentFactoryResolver = componentFactoryResolver;
|
|
12
|
-
}
|
|
13
|
-
ngOnInit() {
|
|
14
|
-
}
|
|
15
|
-
ngAfterViewInit() {
|
|
16
|
-
this.loadComponents();
|
|
17
|
-
}
|
|
18
|
-
loadComponents() {
|
|
19
|
-
const itemComponent = alertComponents.find(x => x.type === this.data.type);
|
|
20
|
-
const component = itemComponent && itemComponent.component;
|
|
21
|
-
this.resolveComponent(component, this.appDynamic.find(x => x.name === 'alert-icon').viewContainerRef);
|
|
22
|
-
this.resolveComponent(this.data.customBody, this.appDynamic.find(x => x.name === 'alert-body').viewContainerRef);
|
|
23
|
-
this.resolveComponent(this.data.customButtonComponent, this.appDynamic.find(x => x.name === 'alert-buttons').viewContainerRef);
|
|
24
|
-
}
|
|
25
|
-
resolveComponent(component, viewContainerRef) {
|
|
26
|
-
if (!component) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
viewContainerRef.clear();
|
|
30
|
-
if (component instanceof TemplateRef) {
|
|
31
|
-
viewContainerRef.createEmbeddedView(component, { $implicit: this.data, dialogRef: this.dialogRef });
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
const componentFactory = component && this.componentFactoryResolver.resolveComponentFactory(component);
|
|
35
|
-
const injector = this.createInjector(viewContainerRef.injector);
|
|
36
|
-
viewContainerRef.createComponent(componentFactory, null, injector);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
createInjector(injector) {
|
|
40
|
-
const injectionTokens = new WeakMap([
|
|
41
|
-
[CRAFTSJS_ALERT_DATA, this.data],
|
|
42
|
-
[MatDialogRef, this.dialogRef]
|
|
43
|
-
]);
|
|
44
|
-
return new PortalInjector(injector, injectionTokens);
|
|
45
|
-
}
|
|
46
|
-
buttonClick(result) {
|
|
47
|
-
this.dialogRef.close({ data: this.data, result });
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
DialogAlertComponent.decorators = [
|
|
51
|
-
{ type: Component, args: [{
|
|
52
|
-
selector: 'dialog-alert',
|
|
53
|
-
template: "<ng-template craftsjsDynamic name=\"alert-icon\"></ng-template>\r\n<div *ngIf=\"data?.title\" class=\"alert-title\">\r\n <span>\r\n {{data.title | translate}}\r\n </span>\r\n</div>\r\n<div *ngIf=\"data?.text\" class=\"alert-text\">\r\n <span>\r\n {{data.text | translate}}\r\n </span>\r\n</div>\r\n<ng-template craftsjsDynamic name=\"alert-body\"></ng-template>\r\n<div class=\"alert-footer\" *ngIf=\"!data?.hiddenButtons\">\r\n <alert-ok-button *ngIf=\"!data?.customButtonComponent\" (click)=\"buttonClick('ok')\">\r\n </alert-ok-button>\r\n <alert-cancel-button *ngIf=\"!data?.customButtonComponent && data?.showCancelButton\"\r\n (click)=\"buttonClick('cancel')\">\r\n </alert-cancel-button>\r\n</div>\r\n<ng-template craftsjsDynamic name=\"alert-buttons\"></ng-template>",
|
|
54
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
55
|
-
encapsulation: ViewEncapsulation.None,
|
|
56
|
-
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:rgba(0,0,0,.65);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:rgba(0,0,0,.64);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}"]
|
|
57
|
-
},] }
|
|
58
|
-
];
|
|
59
|
-
DialogAlertComponent.ctorParameters = () => [
|
|
60
|
-
{ type: MatDialogRef },
|
|
61
|
-
{ type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] },
|
|
62
|
-
{ type: ComponentFactoryResolver }
|
|
63
|
-
];
|
|
64
|
-
DialogAlertComponent.propDecorators = {
|
|
65
|
-
appDynamic: [{ type: ViewChildren, args: [DynamicDirective,] }]
|
|
66
|
-
};
|
|
67
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlhbG9nLWFsZXJ0LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NyYWZ0c2pzL2FsZXJ0L3NyYy9saWIvY29tcG9uZW50cy9kaWFsb2ctYWxlcnQvZGlhbG9nLWFsZXJ0LmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQ0wsU0FBUyxFQUNULHVCQUF1QixFQUN2QixNQUFNLEVBQ04saUJBQWlCLEVBRWpCLHdCQUF3QixFQUV4QixjQUFjLEVBSWQsWUFBWSxFQUVaLFdBQVcsRUFDWixNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEVBQUUsWUFBWSxFQUFFLGVBQWUsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBRXpFLE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUMxRCxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDckQsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFFbEQsTUFBTSxDQUFDLE1BQU0sbUJBQW1C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VmXVxyXG4gICAgXSk7XHJcbiAgICByZXR1cm4gbmV3IFBvcnRhbEluamVjdG9yKGluamVjdG9yLCBpbmplY3Rpb25Ub2tlbnMpO1xyXG4gIH1cclxuXHJcbiAgYnV0dG9uQ2xpY2socmVzdWx0OiBzdHJpbmcpIHtcclxuICAgIHRoaXMuZGlhbG9nUmVmLmNsb3NlKHsgZGF0YTogdGhpcy5kYXRhLCByZXN1bHQgfSk7XHJcbiAgfVxyXG5cclxufVxyXG4iXX0=
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { MatDialog } from '@angular/material/dialog';
|
|
3
|
-
import { AlertEnum } from '../models/alert-enum.model';
|
|
4
|
-
import { DialogAlertComponent } from '../components/dialog-alert/dialog-alert.component';
|
|
5
|
-
export class AlertService {
|
|
6
|
-
constructor(_dialog) {
|
|
7
|
-
this._dialog = _dialog;
|
|
8
|
-
}
|
|
9
|
-
showSimple(title, message) {
|
|
10
|
-
return this._open({
|
|
11
|
-
title,
|
|
12
|
-
text: message
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
showSuccess(title, message) {
|
|
16
|
-
return this._open({
|
|
17
|
-
title,
|
|
18
|
-
text: message,
|
|
19
|
-
type: AlertEnum.success
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
showError(title, message) {
|
|
23
|
-
return this._open({
|
|
24
|
-
title,
|
|
25
|
-
text: message,
|
|
26
|
-
type: AlertEnum.error
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
showInfo(title, message) {
|
|
30
|
-
return this._open({
|
|
31
|
-
title,
|
|
32
|
-
text: message,
|
|
33
|
-
type: AlertEnum.info
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
showWarning(title, message) {
|
|
37
|
-
return this._open({
|
|
38
|
-
title,
|
|
39
|
-
text: message,
|
|
40
|
-
type: AlertEnum.warning
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
showConfirmation(title, message) {
|
|
44
|
-
return this._open({
|
|
45
|
-
title,
|
|
46
|
-
text: message,
|
|
47
|
-
type: AlertEnum.warning,
|
|
48
|
-
showCancelButton: true
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
_open(alertModel) {
|
|
52
|
-
return this._dialog.open(DialogAlertComponent, {
|
|
53
|
-
width: '500px',
|
|
54
|
-
data: alertModel
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
AlertService.decorators = [
|
|
59
|
-
{ type: Injectable }
|
|
60
|
-
];
|
|
61
|
-
AlertService.ctorParameters = () => [
|
|
62
|
-
{ type: MatDialog }
|
|
63
|
-
];
|
|
64
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxlcnQuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NyYWZ0c2pzL2FsZXJ0L3NyYy9saWIvc2VydmljZXMvYWxlcnQuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzNDLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUVyRCxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sNEJBQTRCLENBQUM7QUFDdkQsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sbURBQW1ELENBQUM7QUFHekYsTUFBTSxPQUFPLFlBQVk7SUFFdkIsWUFBb0IsT0FBa0I7UUFBbEIsWUFBTyxHQUFQLE9BQU8sQ0FBVztJQUFJLENBQUM7SUFFM0MsVUFBVSxDQUFDLEtBQWEsRUFBRSxPQUFlO1FBQ3ZDLE9BQU8sSUFBSSxDQUFDLEtBQUssQ0FBQztZQUNoQixLQUFLO1lBQ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gICAgc2hvd0NhbmNlbEJ1dHRvbjogdHJ1ZVxyXG4gICAgfSk7XHJcbiAgfVxyXG5cclxuICBwcml2YXRlIF9vcGVuKGFsZXJ0TW9kZWw6IEFsZXJ0TW9kZWwpIHtcclxuICAgIHJldHVybiB0aGlzLl9kaWFsb2cub3BlbihEaWFsb2dBbGVydENvbXBvbmVudCwge1xyXG4gICAgICB3aWR0aDogJzUwMHB4JyxcclxuICAgICAgZGF0YTogYWxlcnRNb2RlbFxyXG4gICAgfSk7XHJcbiAgfVxyXG59XHJcbiJdfQ==
|
|
@@ -1,302 +0,0 @@
|
|
|
1
|
-
import { Component, ChangeDetectionStrategy, ViewEncapsulation, InjectionToken, TemplateRef, Inject, ComponentFactoryResolver, ViewChildren, EventEmitter, Output, Injectable, NgModule } from '@angular/core';
|
|
2
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
3
|
-
import { MatDialogRef, MAT_DIALOG_DATA, MatDialog, MatDialogModule } from '@angular/material/dialog';
|
|
4
|
-
import { TranslateModule } from '@ngx-translate/core';
|
|
5
|
-
import { CommonModule } from '@angular/common';
|
|
6
|
-
import { DynamicDirective, CoreModule } from '@craftsjs/core';
|
|
7
|
-
import { PortalInjector } from '@angular/cdk/portal';
|
|
8
|
-
|
|
9
|
-
class AlertSuccessComponent {
|
|
10
|
-
}
|
|
11
|
-
AlertSuccessComponent.decorators = [
|
|
12
|
-
{ type: Component, args: [{
|
|
13
|
-
selector: 'alert-success',
|
|
14
|
-
template: "<span class=\"alert-icon-success-line alert-icon-success-line-long\"></span>\r\n<span class=\"alert-icon-success-line alert-icon-success-line-tip\"></span>\r\n<div class=\"alert-icon-success-ring\"></div>\r\n<div class=\"alert-icon-success-hide-corners\"></div>",
|
|
15
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
16
|
-
encapsulation: ViewEncapsulation.None,
|
|
17
|
-
host: {
|
|
18
|
-
class: 'alert-icon alert-icon-success'
|
|
19
|
-
},
|
|
20
|
-
styles: [""]
|
|
21
|
-
},] }
|
|
22
|
-
];
|
|
23
|
-
|
|
24
|
-
var AlertEnum;
|
|
25
|
-
(function (AlertEnum) {
|
|
26
|
-
AlertEnum["success"] = "success";
|
|
27
|
-
AlertEnum["error"] = "error";
|
|
28
|
-
AlertEnum["info"] = "info";
|
|
29
|
-
AlertEnum["warning"] = "warning";
|
|
30
|
-
})(AlertEnum || (AlertEnum = {}));
|
|
31
|
-
|
|
32
|
-
class AlertInfoComponent {
|
|
33
|
-
}
|
|
34
|
-
AlertInfoComponent.decorators = [
|
|
35
|
-
{ type: Component, args: [{
|
|
36
|
-
selector: 'alert-info',
|
|
37
|
-
template: "",
|
|
38
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
39
|
-
encapsulation: ViewEncapsulation.None,
|
|
40
|
-
host: {
|
|
41
|
-
class: 'alert-icon alert-icon-info'
|
|
42
|
-
},
|
|
43
|
-
styles: [""]
|
|
44
|
-
},] }
|
|
45
|
-
];
|
|
46
|
-
|
|
47
|
-
class WarningComponent {
|
|
48
|
-
}
|
|
49
|
-
WarningComponent.decorators = [
|
|
50
|
-
{ type: Component, args: [{
|
|
51
|
-
selector: 'alert-warning',
|
|
52
|
-
template: "<span class=\"alert-icon-warning-body\">\r\n <span class=\"alert-icon-warning-dot\"></span>\r\n</span>",
|
|
53
|
-
host: {
|
|
54
|
-
class: 'alert-icon alert-icon-warning '
|
|
55
|
-
},
|
|
56
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
57
|
-
encapsulation: ViewEncapsulation.None,
|
|
58
|
-
styles: [""]
|
|
59
|
-
},] }
|
|
60
|
-
];
|
|
61
|
-
|
|
62
|
-
class ErrorComponent {
|
|
63
|
-
}
|
|
64
|
-
ErrorComponent.decorators = [
|
|
65
|
-
{ type: Component, args: [{
|
|
66
|
-
selector: 'alert-error',
|
|
67
|
-
template: "<div class=\"alert-icon-error-x-mark\">\r\n <span class=\"alert-icon-error-line alert-icon-error-line-left\"></span>\r\n <span class=\"alert-icon-error-line alert-icon-error-line-right\"></span>\r\n</div>",
|
|
68
|
-
host: {
|
|
69
|
-
class: 'alert-icon alert-icon-error'
|
|
70
|
-
},
|
|
71
|
-
encapsulation: ViewEncapsulation.None,
|
|
72
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
73
|
-
styles: [""]
|
|
74
|
-
},] }
|
|
75
|
-
];
|
|
76
|
-
|
|
77
|
-
const alertComponents = [
|
|
78
|
-
{
|
|
79
|
-
type: AlertEnum.success,
|
|
80
|
-
component: AlertSuccessComponent
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
type: AlertEnum.info,
|
|
84
|
-
component: AlertInfoComponent
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
type: AlertEnum.warning,
|
|
88
|
-
component: WarningComponent
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
type: AlertEnum.error,
|
|
92
|
-
component: ErrorComponent
|
|
93
|
-
}
|
|
94
|
-
];
|
|
95
|
-
|
|
96
|
-
const CRAFTSJS_ALERT_DATA = new InjectionToken('CraftsjsAlertData');
|
|
97
|
-
class DialogAlertComponent {
|
|
98
|
-
constructor(dialogRef, data, componentFactoryResolver) {
|
|
99
|
-
this.dialogRef = dialogRef;
|
|
100
|
-
this.data = data;
|
|
101
|
-
this.componentFactoryResolver = componentFactoryResolver;
|
|
102
|
-
}
|
|
103
|
-
ngOnInit() {
|
|
104
|
-
}
|
|
105
|
-
ngAfterViewInit() {
|
|
106
|
-
this.loadComponents();
|
|
107
|
-
}
|
|
108
|
-
loadComponents() {
|
|
109
|
-
const itemComponent = alertComponents.find(x => x.type === this.data.type);
|
|
110
|
-
const component = itemComponent && itemComponent.component;
|
|
111
|
-
this.resolveComponent(component, this.appDynamic.find(x => x.name === 'alert-icon').viewContainerRef);
|
|
112
|
-
this.resolveComponent(this.data.customBody, this.appDynamic.find(x => x.name === 'alert-body').viewContainerRef);
|
|
113
|
-
this.resolveComponent(this.data.customButtonComponent, this.appDynamic.find(x => x.name === 'alert-buttons').viewContainerRef);
|
|
114
|
-
}
|
|
115
|
-
resolveComponent(component, viewContainerRef) {
|
|
116
|
-
if (!component) {
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
viewContainerRef.clear();
|
|
120
|
-
if (component instanceof TemplateRef) {
|
|
121
|
-
viewContainerRef.createEmbeddedView(component, { $implicit: this.data, dialogRef: this.dialogRef });
|
|
122
|
-
}
|
|
123
|
-
else {
|
|
124
|
-
const componentFactory = component && this.componentFactoryResolver.resolveComponentFactory(component);
|
|
125
|
-
const injector = this.createInjector(viewContainerRef.injector);
|
|
126
|
-
viewContainerRef.createComponent(componentFactory, null, injector);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
createInjector(injector) {
|
|
130
|
-
const injectionTokens = new WeakMap([
|
|
131
|
-
[CRAFTSJS_ALERT_DATA, this.data],
|
|
132
|
-
[MatDialogRef, this.dialogRef]
|
|
133
|
-
]);
|
|
134
|
-
return new PortalInjector(injector, injectionTokens);
|
|
135
|
-
}
|
|
136
|
-
buttonClick(result) {
|
|
137
|
-
this.dialogRef.close({ data: this.data, result });
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
DialogAlertComponent.decorators = [
|
|
141
|
-
{ type: Component, args: [{
|
|
142
|
-
selector: 'dialog-alert',
|
|
143
|
-
template: "<ng-template craftsjsDynamic name=\"alert-icon\"></ng-template>\r\n<div *ngIf=\"data?.title\" class=\"alert-title\">\r\n <span>\r\n {{data.title | translate}}\r\n </span>\r\n</div>\r\n<div *ngIf=\"data?.text\" class=\"alert-text\">\r\n <span>\r\n {{data.text | translate}}\r\n </span>\r\n</div>\r\n<ng-template craftsjsDynamic name=\"alert-body\"></ng-template>\r\n<div class=\"alert-footer\" *ngIf=\"!data?.hiddenButtons\">\r\n <alert-ok-button *ngIf=\"!data?.customButtonComponent\" (click)=\"buttonClick('ok')\">\r\n </alert-ok-button>\r\n <alert-cancel-button *ngIf=\"!data?.customButtonComponent && data?.showCancelButton\"\r\n (click)=\"buttonClick('cancel')\">\r\n </alert-cancel-button>\r\n</div>\r\n<ng-template craftsjsDynamic name=\"alert-buttons\"></ng-template>",
|
|
144
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
145
|
-
encapsulation: ViewEncapsulation.None,
|
|
146
|
-
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:rgba(0,0,0,.65);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:rgba(0,0,0,.64);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}"]
|
|
147
|
-
},] }
|
|
148
|
-
];
|
|
149
|
-
DialogAlertComponent.ctorParameters = () => [
|
|
150
|
-
{ type: MatDialogRef },
|
|
151
|
-
{ type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] },
|
|
152
|
-
{ type: ComponentFactoryResolver }
|
|
153
|
-
];
|
|
154
|
-
DialogAlertComponent.propDecorators = {
|
|
155
|
-
appDynamic: [{ type: ViewChildren, args: [DynamicDirective,] }]
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
class AlertOkButtonComponent {
|
|
159
|
-
constructor() {
|
|
160
|
-
this.click = new EventEmitter();
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
AlertOkButtonComponent.decorators = [
|
|
164
|
-
{ type: Component, args: [{
|
|
165
|
-
selector: 'alert-ok-button',
|
|
166
|
-
template: "<button mat-raised-button color=\"primary\" (click)=\"click.emit($event)\">{{'general.ok' | translate}}</button>",
|
|
167
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
168
|
-
styles: [""]
|
|
169
|
-
},] }
|
|
170
|
-
];
|
|
171
|
-
AlertOkButtonComponent.propDecorators = {
|
|
172
|
-
click: [{ type: Output }]
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
class AlertCancelButtonComponent {
|
|
176
|
-
constructor() {
|
|
177
|
-
this.click = new EventEmitter();
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
AlertCancelButtonComponent.decorators = [
|
|
181
|
-
{ type: Component, args: [{
|
|
182
|
-
selector: 'alert-cancel-button',
|
|
183
|
-
template: "<button mat-raised-button (click)=\"click.emit($event)\">{{'general.cancel' | translate}}</button>",
|
|
184
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
185
|
-
styles: [""]
|
|
186
|
-
},] }
|
|
187
|
-
];
|
|
188
|
-
AlertCancelButtonComponent.propDecorators = {
|
|
189
|
-
click: [{ type: Output }]
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
class AlertService {
|
|
193
|
-
constructor(_dialog) {
|
|
194
|
-
this._dialog = _dialog;
|
|
195
|
-
}
|
|
196
|
-
showSimple(title, message) {
|
|
197
|
-
return this._open({
|
|
198
|
-
title,
|
|
199
|
-
text: message
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
showSuccess(title, message) {
|
|
203
|
-
return this._open({
|
|
204
|
-
title,
|
|
205
|
-
text: message,
|
|
206
|
-
type: AlertEnum.success
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
showError(title, message) {
|
|
210
|
-
return this._open({
|
|
211
|
-
title,
|
|
212
|
-
text: message,
|
|
213
|
-
type: AlertEnum.error
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
showInfo(title, message) {
|
|
217
|
-
return this._open({
|
|
218
|
-
title,
|
|
219
|
-
text: message,
|
|
220
|
-
type: AlertEnum.info
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
showWarning(title, message) {
|
|
224
|
-
return this._open({
|
|
225
|
-
title,
|
|
226
|
-
text: message,
|
|
227
|
-
type: AlertEnum.warning
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
showConfirmation(title, message) {
|
|
231
|
-
return this._open({
|
|
232
|
-
title,
|
|
233
|
-
text: message,
|
|
234
|
-
type: AlertEnum.warning,
|
|
235
|
-
showCancelButton: true
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
_open(alertModel) {
|
|
239
|
-
return this._dialog.open(DialogAlertComponent, {
|
|
240
|
-
width: '500px',
|
|
241
|
-
data: alertModel
|
|
242
|
-
});
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
AlertService.decorators = [
|
|
246
|
-
{ type: Injectable }
|
|
247
|
-
];
|
|
248
|
-
AlertService.ctorParameters = () => [
|
|
249
|
-
{ type: MatDialog }
|
|
250
|
-
];
|
|
251
|
-
|
|
252
|
-
class AlertModule {
|
|
253
|
-
static forRoot() {
|
|
254
|
-
return {
|
|
255
|
-
ngModule: AlertModule,
|
|
256
|
-
providers: [
|
|
257
|
-
AlertService
|
|
258
|
-
]
|
|
259
|
-
};
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
AlertModule.decorators = [
|
|
263
|
-
{ type: NgModule, args: [{
|
|
264
|
-
imports: [
|
|
265
|
-
CommonModule,
|
|
266
|
-
TranslateModule,
|
|
267
|
-
MatButtonModule,
|
|
268
|
-
CoreModule,
|
|
269
|
-
MatDialogModule
|
|
270
|
-
],
|
|
271
|
-
declarations: [
|
|
272
|
-
DialogAlertComponent,
|
|
273
|
-
AlertSuccessComponent,
|
|
274
|
-
AlertInfoComponent,
|
|
275
|
-
WarningComponent,
|
|
276
|
-
ErrorComponent,
|
|
277
|
-
AlertOkButtonComponent,
|
|
278
|
-
AlertCancelButtonComponent
|
|
279
|
-
],
|
|
280
|
-
exports: [
|
|
281
|
-
DialogAlertComponent
|
|
282
|
-
],
|
|
283
|
-
entryComponents: [
|
|
284
|
-
DialogAlertComponent,
|
|
285
|
-
AlertSuccessComponent,
|
|
286
|
-
AlertInfoComponent,
|
|
287
|
-
WarningComponent,
|
|
288
|
-
ErrorComponent
|
|
289
|
-
]
|
|
290
|
-
},] }
|
|
291
|
-
];
|
|
292
|
-
|
|
293
|
-
/*
|
|
294
|
-
* Public API Surface of alert
|
|
295
|
-
*/
|
|
296
|
-
|
|
297
|
-
/**
|
|
298
|
-
* Generated bundle index. Do not edit.
|
|
299
|
-
*/
|
|
300
|
-
|
|
301
|
-
export { AlertCancelButtonComponent, AlertEnum, AlertInfoComponent, AlertModule, AlertOkButtonComponent, AlertService, AlertSuccessComponent, CRAFTSJS_ALERT_DATA, DialogAlertComponent, ErrorComponent, WarningComponent, alertComponents };
|
|
302
|
-
//# sourceMappingURL=craftsjs-alert.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"craftsjs-alert.js","sources":["../../../../projects/craftsjs/alert/src/lib/components/dialog-alert/components/alert-success/alert-success.component.ts","../../../../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/warning/warning.component.ts","../../../../projects/craftsjs/alert/src/lib/components/dialog-alert/components/error/error.component.ts","../../../../projects/craftsjs/alert/src/lib/components/dialog-alert/components/components.ts","../../../../projects/craftsjs/alert/src/lib/components/dialog-alert/dialog-alert.component.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-cancel-button/alert-cancel-button.component.ts","../../../../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';\r\n\r\n@Component({\r\n selector: 'alert-success',\r\n templateUrl: './alert-success.component.html',\r\n styleUrls: ['./alert-success.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n host: {\r\n class: 'alert-icon alert-icon-success'\r\n }\r\n})\r\nexport class AlertSuccessComponent { }\r\n","export enum AlertEnum {\r\n success = 'success',\r\n error = 'error',\r\n info = 'info',\r\n warning = 'warning'\r\n}\r\n","import { Component, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'alert-info',\r\n templateUrl: './alert-info.component.html',\r\n styleUrls: ['./alert-info.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n host: {\r\n class: 'alert-icon alert-icon-info'\r\n }\r\n})\r\nexport class AlertInfoComponent { }\r\n","import { Component, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'alert-warning',\r\n templateUrl: './warning.component.html',\r\n styleUrls: ['./warning.component.scss'],\r\n host: {\r\n class: 'alert-icon alert-icon-warning '\r\n },\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None\r\n})\r\nexport class WarningComponent { }\r\n","import { Component, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'alert-error',\r\n templateUrl: './error.component.html',\r\n styleUrls: ['./error.component.scss'],\r\n host: {\r\n class: 'alert-icon alert-icon-error'\r\n },\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class ErrorComponent { }\r\n","import { AlertSuccessComponent } from './alert-success/alert-success.component';\r\nimport { AlertEnum } from '../../../models/alert-enum.model';\r\nimport { AlertInfoComponent } from './alert-info/alert-info.component';\r\nimport { WarningComponent } from './warning/warning.component';\r\nimport { ErrorComponent } from './error/error.component';\r\n\r\nexport const alertComponents = [\r\n {\r\n type: AlertEnum.success,\r\n component: AlertSuccessComponent\r\n },\r\n {\r\n type: AlertEnum.info,\r\n component: AlertInfoComponent\r\n },\r\n {\r\n type: AlertEnum.warning,\r\n component: WarningComponent\r\n },\r\n {\r\n type: AlertEnum.error,\r\n component: ErrorComponent\r\n }\r\n];\r\n","import {\r\n Component,\r\n ChangeDetectionStrategy,\r\n Inject,\r\n ViewEncapsulation,\r\n OnInit,\r\n ComponentFactoryResolver,\r\n Injector,\r\n InjectionToken,\r\n Type,\r\n ViewContainerRef,\r\n QueryList,\r\n ViewChildren,\r\n AfterViewInit,\r\n TemplateRef\r\n} from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { AlertModel } from '../../models/alert.model';\r\nimport { alertComponents } from './components/components';\r\nimport { PortalInjector } from '@angular/cdk/portal';\r\nimport { DynamicDirective } from '@craftsjs/core';\r\n\r\nexport const CRAFTSJS_ALERT_DATA = new InjectionToken<any>('CraftsjsAlertData');\r\n\r\n@Component({\r\n selector: 'dialog-alert',\r\n templateUrl: './dialog-alert.component.html',\r\n styleUrls: ['./dialog-alert.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None\r\n})\r\nexport class DialogAlertComponent implements OnInit, AfterViewInit {\r\n\r\n @ViewChildren(DynamicDirective)\r\n appDynamic: QueryList<DynamicDirective>;\r\n\r\n constructor(\r\n public dialogRef: MatDialogRef<DialogAlertComponent>,\r\n @Inject(MAT_DIALOG_DATA) public data: AlertModel,\r\n private componentFactoryResolver: ComponentFactoryResolver\r\n ) {\r\n }\r\n\r\n ngOnInit(): void {\r\n\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.loadComponents();\r\n }\r\n\r\n private loadComponents() {\r\n const itemComponent = alertComponents.find(x => x.type === this.data.type);\r\n const component = itemComponent && itemComponent.component;\r\n this.resolveComponent(component, this.appDynamic.find(x => x.name === 'alert-icon').viewContainerRef);\r\n this.resolveComponent(this.data.customBody, this.appDynamic.find(x => x.name === 'alert-body').viewContainerRef);\r\n this.resolveComponent(this.data.customButtonComponent, this.appDynamic.find(x => x.name === 'alert-buttons').viewContainerRef);\r\n }\r\n\r\n private resolveComponent(component: Type<{}> | TemplateRef<{}>, viewContainerRef: ViewContainerRef) {\r\n if (!component) { return; }\r\n viewContainerRef.clear();\r\n if (component instanceof TemplateRef) {\r\n viewContainerRef.createEmbeddedView(component, { $implicit: this.data, dialogRef: this.dialogRef });\r\n } else {\r\n const componentFactory = component && this.componentFactoryResolver.resolveComponentFactory(component);\r\n const injector = this.createInjector(viewContainerRef.injector);\r\n viewContainerRef.createComponent(componentFactory, null, injector);\r\n }\r\n }\r\n\r\n private createInjector(injector: Injector): PortalInjector {\r\n const injectionTokens = new WeakMap<any, any>([\r\n [CRAFTSJS_ALERT_DATA, this.data],\r\n [MatDialogRef, this.dialogRef]\r\n ]);\r\n return new PortalInjector(injector, injectionTokens);\r\n }\r\n\r\n buttonClick(result: string) {\r\n this.dialogRef.close({ data: this.data, result });\r\n }\r\n\r\n}\r\n","import { Component, ChangeDetectionStrategy, Output, EventEmitter } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'alert-ok-button',\r\n templateUrl: './alert-ok-button.component.html',\r\n styleUrls: ['./alert-ok-button.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class AlertOkButtonComponent {\r\n @Output()\r\n click = new EventEmitter();\r\n}\r\n","import { Component, ChangeDetectionStrategy, Output, EventEmitter } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'alert-cancel-button',\r\n templateUrl: './alert-cancel-button.component.html',\r\n styleUrls: ['./alert-cancel-button.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class AlertCancelButtonComponent {\r\n @Output()\r\n click = new EventEmitter();\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { AlertModel } from '../models/alert.model';\r\nimport { AlertEnum } from '../models/alert-enum.model';\r\nimport { DialogAlertComponent } from '../components/dialog-alert/dialog-alert.component';\r\n\r\n@Injectable()\r\nexport class AlertService {\r\n\r\n constructor(private _dialog: MatDialog) { }\r\n\r\n showSimple(title: string, message: string) {\r\n return this._open({\r\n title,\r\n text: message\r\n } as AlertModel);\r\n }\r\n\r\n showSuccess(title: string, message: string) {\r\n return this._open({\r\n title,\r\n text: message,\r\n type: AlertEnum.success\r\n });\r\n }\r\n\r\n showError(title: string, message: string) {\r\n return this._open({\r\n title,\r\n text: message,\r\n type: AlertEnum.error\r\n });\r\n }\r\n\r\n showInfo(title: string, message: string) {\r\n return this._open({\r\n title,\r\n text: message,\r\n type: AlertEnum.info\r\n });\r\n }\r\n\r\n showWarning(title: string, message: string) {\r\n return this._open({\r\n title,\r\n text: message,\r\n type: AlertEnum.warning\r\n });\r\n }\r\n\r\n showConfirmation(title: string, message: string) {\r\n return this._open({\r\n title,\r\n text: message,\r\n type: AlertEnum.warning,\r\n showCancelButton: true\r\n });\r\n }\r\n\r\n private _open(alertModel: AlertModel) {\r\n return this._dialog.open(DialogAlertComponent, {\r\n width: '500px',\r\n data: alertModel\r\n });\r\n }\r\n}\r\n","import { NgModule, ModuleWithProviders } from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatDialogModule } from '@angular/material/dialog';\r\nimport { TranslateModule } from '@ngx-translate/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { CoreModule } from '@craftsjs/core';\r\nimport { DialogAlertComponent } from './components/dialog-alert/dialog-alert.component';\r\nimport { AlertSuccessComponent } from './components/dialog-alert/components/alert-success/alert-success.component';\r\nimport { AlertInfoComponent } from './components/dialog-alert/components/alert-info/alert-info.component';\r\nimport { WarningComponent } from './components/dialog-alert/components/warning/warning.component';\r\nimport { ErrorComponent } from './components/dialog-alert/components/error/error.component';\r\nimport { AlertOkButtonComponent } from './components/dialog-alert/components/buttons/alert-ok-button/alert-ok-button.component';\r\nimport {\r\n AlertCancelButtonComponent\r\n} from './components/dialog-alert/components/buttons/alert-cancel-button/alert-cancel-button.component';\r\nimport { AlertService } from './services/alert.service';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n TranslateModule,\r\n MatButtonModule,\r\n CoreModule,\r\n MatDialogModule\r\n ],\r\n declarations: [\r\n DialogAlertComponent,\r\n AlertSuccessComponent,\r\n AlertInfoComponent,\r\n WarningComponent,\r\n ErrorComponent,\r\n AlertOkButtonComponent,\r\n AlertCancelButtonComponent\r\n ],\r\n exports: [\r\n DialogAlertComponent\r\n ],\r\n entryComponents: [\r\n DialogAlertComponent,\r\n AlertSuccessComponent,\r\n AlertInfoComponent,\r\n WarningComponent,\r\n ErrorComponent\r\n ]\r\n})\r\nexport class AlertModule {\r\n static forRoot(): ModuleWithProviders<AlertModule> {\r\n return {\r\n ngModule: AlertModule,\r\n providers: [\r\n AlertService\r\n ]\r\n };\r\n }\r\n}\r\n","/*\r\n * Public API Surface of alert\r\n */\r\n\r\nexport * from './lib/alert.module';\r\nexport * from './lib/components/dialog-alert/dialog-alert.component';\r\nexport * from './lib/components/dialog-alert/components/alert-info/alert-info.component';\r\nexport * from './lib/components/dialog-alert/components/alert-success/alert-success.component';\r\nexport * from './lib/components/dialog-alert/components/buttons/alert-cancel-button/alert-cancel-button.component';\r\nexport * from './lib/components/dialog-alert/components/buttons/alert-ok-button/alert-ok-button.component';\r\nexport * from './lib/components/dialog-alert/components/components';\r\nexport * from './lib/components/dialog-alert/components/error/error.component';\r\nexport * from './lib/components/dialog-alert/components/warning/warning.component';\r\nexport * from './lib/models/alert-enum.model';\r\nexport * from './lib/models/alert.model';\r\nexport * from './lib/services/alert.service';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAYa,qBAAqB;;;YAVjC,SAAS,SAAC;gBACT,QAAQ,EAAE,eAAe;gBACzB,iRAA6C;gBAE7C,eAAe,EAAE,uBAAuB,CAAC,MAAM;gBAC/C,aAAa,EAAE,iBAAiB,CAAC,IAAI;gBACrC,IAAI,EAAE;oBACJ,KAAK,EAAE,+BAA+B;iBACvC;;aACF;;;ICXW;AAAZ,WAAY,SAAS;IACjB,gCAAmB,CAAA;IACnB,4BAAe,CAAA;IACf,0BAAa,CAAA;IACb,gCAAmB,CAAA;AACvB,CAAC,EALW,SAAS,KAAT,SAAS;;MCYR,kBAAkB;;;YAV9B,SAAS,SAAC;gBACT,QAAQ,EAAE,YAAY;gBACtB,YAA0C;gBAE1C,eAAe,EAAE,uBAAuB,CAAC,MAAM;gBAC/C,aAAa,EAAE,iBAAiB,CAAC,IAAI;gBACrC,IAAI,EAAE;oBACJ,KAAK,EAAE,4BAA4B;iBACpC;;aACF;;;MCCY,gBAAgB;;;YAV5B,SAAS,SAAC;gBACT,QAAQ,EAAE,eAAe;gBACzB,mHAAuC;gBAEvC,IAAI,EAAE;oBACJ,KAAK,EAAE,gCAAgC;iBACxC;gBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;gBAC/C,aAAa,EAAE,iBAAiB,CAAC,IAAI;;aACtC;;;MCCY,cAAc;;;YAV1B,SAAS,SAAC;gBACT,QAAQ,EAAE,aAAa;gBACvB,0NAAqC;gBAErC,IAAI,EAAE;oBACJ,KAAK,EAAE,6BAA6B;iBACrC;gBACD,aAAa,EAAE,iBAAiB,CAAC,IAAI;gBACrC,eAAe,EAAE,uBAAuB,CAAC,MAAM;;aAChD;;;MCLY,eAAe,GAAG;IAC3B;QACI,IAAI,EAAE,SAA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