monkey-front-core 0.0.393 → 0.0.395
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/esm2020/lib/components/alerts/alerts.component.mjs +5 -3
- package/esm2020/lib/core/interfaces/monkeyecx-config.mjs +1 -1
- package/esm2020/lib/core/services/config/monkeyecx-alerts-config.service.mjs +4 -3
- package/fesm2015/monkey-front-core.mjs +8 -5
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +7 -4
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/lib/components/alerts/alerts.component.d.ts +1 -0
- package/lib/core/interfaces/monkeyecx-config.d.ts +1 -0
- package/monkey-front-core-0.0.395.tgz +0 -0
- package/package.json +1 -1
- package/monkey-front-core-0.0.393.tgz +0 -0
|
@@ -11,6 +11,7 @@ export class AlertsComponent {
|
|
|
11
11
|
this._title = '';
|
|
12
12
|
this._message = '';
|
|
13
13
|
this._action = null;
|
|
14
|
+
this._hideClose = false;
|
|
14
15
|
// not to do
|
|
15
16
|
}
|
|
16
17
|
ngOnInit() {
|
|
@@ -19,6 +20,7 @@ export class AlertsComponent {
|
|
|
19
20
|
this._title = config?.data?.title;
|
|
20
21
|
this._message = config?.data?.message;
|
|
21
22
|
this._action = config?.data?.action;
|
|
23
|
+
this._hideClose = config?.data?.hideClose;
|
|
22
24
|
}
|
|
23
25
|
onClose() {
|
|
24
26
|
this.modalService.close(this.modalRef);
|
|
@@ -31,13 +33,13 @@ export class AlertsComponent {
|
|
|
31
33
|
}
|
|
32
34
|
}
|
|
33
35
|
AlertsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AlertsComponent, deps: [{ token: i1.MonkeyStyleGuideModalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
34
|
-
AlertsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: AlertsComponent, selector: "monkeyecx-alerts", inputs: { config: "config", modalRef: "modalRef" }, ngImport: i0, template: "<monkey-modal [config]=\"config\" [modalRef]=\"modalRef\" *ngIf=\"config\">\r\n <div class=\"alert-header\">\r\n <img [src]=\"_img\">\r\n </div>\r\n <div class=\"alert-body\">\r\n <span class=\"title\">\r\n {{ _title | translate }}\r\n </span>\r\n <span class=\"message\">\r\n {{ _message | translate }}\r\n </span>\r\n </div>\r\n <div class=\"alert-footer\">\r\n <monkey-button type=\"tertiary\" color=\"theme\" (click)=\"onClose()\">\r\n
|
|
36
|
+
AlertsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: AlertsComponent, selector: "monkeyecx-alerts", inputs: { config: "config", modalRef: "modalRef" }, ngImport: i0, template: "<monkey-modal [config]=\"config\" [modalRef]=\"modalRef\" *ngIf=\"config\">\r\n <div class=\"alert-header\">\r\n <img [src]=\"_img\">\r\n </div>\r\n <div class=\"alert-body\">\r\n <span class=\"title\">\r\n {{ _title | translate }}\r\n </span>\r\n <span class=\"message\">\r\n {{ _message | translate }}\r\n </span>\r\n </div>\r\n <div class=\"alert-footer\">\r\n <ng-container *ngIf=\"!_hideClose\">\r\n <monkey-button type=\"tertiary\" color=\"theme\" (click)=\"onClose()\">\r\n {{ 'BUTTONS.CLOSE' | translate }}\r\n </monkey-button>\r\n </ng-container>\r\n \r\n <ng-container *ngIf=\"_action\">\r\n <monkey-button type=\"primary\" color=\"theme\" (click)=\"onAction()\">\r\n {{ _action.label | translate }}\r\n </monkey-button>\r\n </ng-container>\r\n </div>\r\n</monkey-modal>", styles: [":host ::ng-deep monkey-modal mecx-monkey-modal{padding:0}:host ::ng-deep monkey-modal mecx-monkey-modal .body{margin-bottom:0}:host ::ng-deep monkey-modal .mecx-monkey-modal__size-md{max-width:448px}:host .alert-header{height:100%;max-height:200px}@media screen and (max-width: 959px){:host .alert-header{min-height:212px}}:host .alert-header img{border-radius:12px 12px 0 0;-o-object-fit:cover;object-fit:cover;width:100%;max-height:280px}@media screen and (max-width: 959px){:host .alert-header img{height:200px}}:host .alert-body{display:flex;flex-direction:column;gap:16px;padding:24px;margin:auto}:host .alert-body .title{font-style:normal;font-weight:700;font-size:32px;line-height:40px;text-align:center;color:#1f2024}:host .alert-body .message{font-style:normal;font-weight:400;font-size:16px;line-height:24px;text-align:center;letter-spacing:.03em;color:#545a63}:host .alert-footer{display:flex;justify-content:space-between;padding:0 24px 24px;position:sticky;bottom:0;background:#fafafa;gap:12px}:host .alert-footer ::ng-deep monkey-button{width:100%}:host .alert-footer ::ng-deep monkey-button button{width:100%}\n"], components: [{ type: i1.MonkeyModalComponent, selector: "monkey-modal", inputs: ["config", "modalRef", "onHandleConfirm"] }, { type: i1.MonkeyButtonComponent, selector: "monkey-button", inputs: ["label", "icon", "iconPosition", "type", "color", "disabled", "size"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i3.TranslatePipe } });
|
|
35
37
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AlertsComponent, decorators: [{
|
|
36
38
|
type: Component,
|
|
37
|
-
args: [{ selector: 'monkeyecx-alerts', template: "<monkey-modal [config]=\"config\" [modalRef]=\"modalRef\" *ngIf=\"config\">\r\n <div class=\"alert-header\">\r\n <img [src]=\"_img\">\r\n </div>\r\n <div class=\"alert-body\">\r\n <span class=\"title\">\r\n {{ _title | translate }}\r\n </span>\r\n <span class=\"message\">\r\n {{ _message | translate }}\r\n </span>\r\n </div>\r\n <div class=\"alert-footer\">\r\n <monkey-button type=\"tertiary\" color=\"theme\" (click)=\"onClose()\">\r\n
|
|
39
|
+
args: [{ selector: 'monkeyecx-alerts', template: "<monkey-modal [config]=\"config\" [modalRef]=\"modalRef\" *ngIf=\"config\">\r\n <div class=\"alert-header\">\r\n <img [src]=\"_img\">\r\n </div>\r\n <div class=\"alert-body\">\r\n <span class=\"title\">\r\n {{ _title | translate }}\r\n </span>\r\n <span class=\"message\">\r\n {{ _message | translate }}\r\n </span>\r\n </div>\r\n <div class=\"alert-footer\">\r\n <ng-container *ngIf=\"!_hideClose\">\r\n <monkey-button type=\"tertiary\" color=\"theme\" (click)=\"onClose()\">\r\n {{ 'BUTTONS.CLOSE' | translate }}\r\n </monkey-button>\r\n </ng-container>\r\n \r\n <ng-container *ngIf=\"_action\">\r\n <monkey-button type=\"primary\" color=\"theme\" (click)=\"onAction()\">\r\n {{ _action.label | translate }}\r\n </monkey-button>\r\n </ng-container>\r\n </div>\r\n</monkey-modal>", styles: [":host ::ng-deep monkey-modal mecx-monkey-modal{padding:0}:host ::ng-deep monkey-modal mecx-monkey-modal .body{margin-bottom:0}:host ::ng-deep monkey-modal .mecx-monkey-modal__size-md{max-width:448px}:host .alert-header{height:100%;max-height:200px}@media screen and (max-width: 959px){:host .alert-header{min-height:212px}}:host .alert-header img{border-radius:12px 12px 0 0;-o-object-fit:cover;object-fit:cover;width:100%;max-height:280px}@media screen and (max-width: 959px){:host .alert-header img{height:200px}}:host .alert-body{display:flex;flex-direction:column;gap:16px;padding:24px;margin:auto}:host .alert-body .title{font-style:normal;font-weight:700;font-size:32px;line-height:40px;text-align:center;color:#1f2024}:host .alert-body .message{font-style:normal;font-weight:400;font-size:16px;line-height:24px;text-align:center;letter-spacing:.03em;color:#545a63}:host .alert-footer{display:flex;justify-content:space-between;padding:0 24px 24px;position:sticky;bottom:0;background:#fafafa;gap:12px}:host .alert-footer ::ng-deep monkey-button{width:100%}:host .alert-footer ::ng-deep monkey-button button{width:100%}\n"] }]
|
|
38
40
|
}], ctorParameters: function () { return [{ type: i1.MonkeyStyleGuideModalService }]; }, propDecorators: { config: [{
|
|
39
41
|
type: Input
|
|
40
42
|
}], modalRef: [{
|
|
41
43
|
type: Input
|
|
42
44
|
}] } });
|
|
43
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
45
|
+
//# sourceMappingURL=data:application/json;base64,eyJ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vbW9ua2V5LWJ1dHRvbj5cclxuICAgIDwvbmctY29udGFpbmVyPlxyXG4gIDwvZGl2PlxyXG48L21vbmtleS1tb2RhbD4iXX0=
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9ua2V5ZWN4LWNvbmZpZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL21vbmtleS1mcm9udC1jb3JlL3NyYy9saWIvY29yZS9pbnRlcmZhY2VzL21vbmtleWVjeC1jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBpbnRlcmZhY2UgTW9ua2V5RWN4Q29uZmlnUHJvZ3JhbSB7XG4gIHRva2VuOiBzdHJpbmc7XG4gIG5hbWU6IHN0cmluZztcbiAgdHlwZTogc3RyaW5nO1xuICByZWdpc3Rlcjoge1xuICAgIHNlbGxlcjoge1xuICAgICAgdHlwZXM6IHN0cmluZ1tdO1xuICAgICAgZG9jdW1lbnRUeXBlczogc3RyaW5nW107XG4gICAgICBsZWdhbE5hdHVyZXM6IHN0cmluZ1tdO1xuICAgIH07XG4gICAgc3BvbnNvcjoge1xuICAgICAgdHlwZXM6IHN0cmluZ1tdO1xuICAgIH07XG4gICAgYnV5ZXI6IHtcbiAgICAgIGNhbGN1bGF0aW9uVHlwZXM6IHN0cmluZ1tdO1xuICAgICAgbGVnYWxOYXR1cmVzOiBzdHJpbmdbXTtcbiAgICAgIHR5cGVzOiBzdHJpbmdbXTtcbiAgICB9O1xuICB9O1xuICBzZXR0aW5nczoge1xuICAgIGVkaXRTcG9uc29yVGF4OiBib29sZWFuO1xuICAgIGRpc2FibGVCdXllckluZm9ybWF0aW9uOiBib29sZWFuO1xuICAgIFtrZXk6IHN0cmluZ106IGJvb2xl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lnQWxlcnQge1xuICBpbWc6IHN0cmluZztcbiAgdGl0bGU6IHN0cmluZztcbiAgbWVzc2FnZTogc3RyaW5nO1xuICBlbmREYXRlOiBzdHJpbmc7XG4gIG5vRW5kRGF0ZT86IGJvb2xlYW47XG4gIGhpZGVDbG9zZT86IGJvb2xlYW47XG4gIGFjdGlvbj86IHtcbiAgICBocmVmOiBzdHJpbmc7XG4gICAgbGFiZWw6IHN0cmluZztcbiAgfTtcbn1cblxuZXhwb3J0IGludGVyZmFjZSBNb25rZXlFY3hDb25maWcge1xuICBwcm9ncmFtPzogTW9ua2V5RWN4Q29uZmlnUHJvZ3JhbTtcbiAgbWFya2V0PzogTW9ua2V5RWN4Q29uZmlnTWFya2V0O1xuICB0aGVtZT86IE1vbmtleUVjeENvbmZpZ1RoZW1lO1xuICBzdXBwb3J0PzogTW9ua2V5RWN4Q29uZmlnU3VwcG9ydDtcbiAgaTE4bj86IE1vbmtleUVjeENvbmZpZ2kxOG47XG4gIGxvZ3M/OiBNb25rZXlFY3hDb25maWdMb2dzO1xuICBleHRlcm5hbGkxOG4/OiBNb25rZXlFY3hDb25maWdFeHRlcm5hbGkxOG47XG4gIG1lc3NhZ2VzPzogTW9ua2V5RWN4Q29uZmlnTWVzc2FnZXM7XG4gIGV4dGVybmFsU2V0dGluZ3M/OiBNb25rZXlFY3hDb25maWdFeHRlcm5hbFNldHRpbmdzO1xuICBndG0/OiBNb25rZXlFY3hDb25maWdHVE07XG4gIGFsZXJ0PzogTW9ua2V5RWN4Q29uZmlnQWxlcnQ7XG59XG4iXX0=
|
|
@@ -11,7 +11,7 @@ export class MonkeyEcxAlertsConfigService {
|
|
|
11
11
|
}
|
|
12
12
|
handleValidation(config) {
|
|
13
13
|
if (config.alert) {
|
|
14
|
-
const { img, title, message, endDate, noEndDate, action } = config.alert;
|
|
14
|
+
const { img, title, message, endDate, noEndDate, action, hideClose } = config.alert;
|
|
15
15
|
if (moment.default().isSameOrBefore(moment.default(endDate)) || noEndDate) {
|
|
16
16
|
this.modalService.open(AlertsComponent, {
|
|
17
17
|
color: 'theme',
|
|
@@ -20,7 +20,8 @@ export class MonkeyEcxAlertsConfigService {
|
|
|
20
20
|
img,
|
|
21
21
|
title,
|
|
22
22
|
message,
|
|
23
|
-
action
|
|
23
|
+
action,
|
|
24
|
+
hideClose
|
|
24
25
|
}
|
|
25
26
|
});
|
|
26
27
|
}
|
|
@@ -38,4 +39,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
38
39
|
providedIn: 'root'
|
|
39
40
|
}]
|
|
40
41
|
}], ctorParameters: function () { return [{ type: i1.MonkeyStyleGuideModalFixedService }]; } });
|
|
41
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
42
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9ua2V5ZWN4LWFsZXJ0cy1jb25maWcuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL21vbmtleS1mcm9udC1jb3JlL3NyYy9saWIvY29yZS9zZXJ2aWNlcy9jb25maWcvbW9ua2V5ZWN4LWFsZXJ0cy1jb25maWcuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzNDLE9BQU8sS0FBSyxPQUFPLE1BQU0sUUFBUSxDQUFDO0FBRWxDLE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSw2Q0FBNkMsQ0FBQzs7O0FBRzlFLE1BQU0sTUFBTSxHQUFRLE9BQU8sQ0FBQztBQUs1QixNQUFNLE9BQU8sNEJBQTRCO0lBQ3ZDLFlBQW9CLFlBQStDO1FBQS9DLGlCQUFZLEdBQVosWUFBWSxDQUFtQztRQUNqRSxZQUFZO0lBQ2QsQ0F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uICAgICAgICAgICAgYWN0aW9uLFxuICAgICAgICAgICAgaGlkZUNsb3NlXG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH1cbiAgICB9XG4gIH1cblxuICBwdWJsaWMgYXBwbHkoY29uZmlnOiBNb25rZXlFY3hDb25maWcpIHtcbiAgICB0aGlzLmhhbmRsZVZhbGlkYXRpb24oY29uZmlnKTtcbiAgfVxufVxuIl19
|
|
@@ -36,15 +36,17 @@ class AlertsComponent {
|
|
|
36
36
|
this._title = '';
|
|
37
37
|
this._message = '';
|
|
38
38
|
this._action = null;
|
|
39
|
+
this._hideClose = false;
|
|
39
40
|
// not to do
|
|
40
41
|
}
|
|
41
42
|
ngOnInit() {
|
|
42
|
-
var _a, _b, _c, _d;
|
|
43
|
+
var _a, _b, _c, _d, _e;
|
|
43
44
|
const { config } = this;
|
|
44
45
|
this._img = (_a = config === null || config === void 0 ? void 0 : config.data) === null || _a === void 0 ? void 0 : _a.img;
|
|
45
46
|
this._title = (_b = config === null || config === void 0 ? void 0 : config.data) === null || _b === void 0 ? void 0 : _b.title;
|
|
46
47
|
this._message = (_c = config === null || config === void 0 ? void 0 : config.data) === null || _c === void 0 ? void 0 : _c.message;
|
|
47
48
|
this._action = (_d = config === null || config === void 0 ? void 0 : config.data) === null || _d === void 0 ? void 0 : _d.action;
|
|
49
|
+
this._hideClose = (_e = config === null || config === void 0 ? void 0 : config.data) === null || _e === void 0 ? void 0 : _e.hideClose;
|
|
48
50
|
}
|
|
49
51
|
onClose() {
|
|
50
52
|
this.modalService.close(this.modalRef);
|
|
@@ -57,10 +59,10 @@ class AlertsComponent {
|
|
|
57
59
|
}
|
|
58
60
|
}
|
|
59
61
|
AlertsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AlertsComponent, deps: [{ token: i1.MonkeyStyleGuideModalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
60
|
-
AlertsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: AlertsComponent, selector: "monkeyecx-alerts", inputs: { config: "config", modalRef: "modalRef" }, ngImport: i0, template: "<monkey-modal [config]=\"config\" [modalRef]=\"modalRef\" *ngIf=\"config\">\r\n <div class=\"alert-header\">\r\n <img [src]=\"_img\">\r\n </div>\r\n <div class=\"alert-body\">\r\n <span class=\"title\">\r\n {{ _title | translate }}\r\n </span>\r\n <span class=\"message\">\r\n {{ _message | translate }}\r\n </span>\r\n </div>\r\n <div class=\"alert-footer\">\r\n <monkey-button type=\"tertiary\" color=\"theme\" (click)=\"onClose()\">\r\n
|
|
62
|
+
AlertsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: AlertsComponent, selector: "monkeyecx-alerts", inputs: { config: "config", modalRef: "modalRef" }, ngImport: i0, template: "<monkey-modal [config]=\"config\" [modalRef]=\"modalRef\" *ngIf=\"config\">\r\n <div class=\"alert-header\">\r\n <img [src]=\"_img\">\r\n </div>\r\n <div class=\"alert-body\">\r\n <span class=\"title\">\r\n {{ _title | translate }}\r\n </span>\r\n <span class=\"message\">\r\n {{ _message | translate }}\r\n </span>\r\n </div>\r\n <div class=\"alert-footer\">\r\n <ng-container *ngIf=\"!_hideClose\">\r\n <monkey-button type=\"tertiary\" color=\"theme\" (click)=\"onClose()\">\r\n {{ 'BUTTONS.CLOSE' | translate }}\r\n </monkey-button>\r\n </ng-container>\r\n \r\n <ng-container *ngIf=\"_action\">\r\n <monkey-button type=\"primary\" color=\"theme\" (click)=\"onAction()\">\r\n {{ _action.label | translate }}\r\n </monkey-button>\r\n </ng-container>\r\n </div>\r\n</monkey-modal>", styles: [":host ::ng-deep monkey-modal mecx-monkey-modal{padding:0}:host ::ng-deep monkey-modal mecx-monkey-modal .body{margin-bottom:0}:host ::ng-deep monkey-modal .mecx-monkey-modal__size-md{max-width:448px}:host .alert-header{height:100%;max-height:200px}@media screen and (max-width: 959px){:host .alert-header{min-height:212px}}:host .alert-header img{border-radius:12px 12px 0 0;-o-object-fit:cover;object-fit:cover;width:100%;max-height:280px}@media screen and (max-width: 959px){:host .alert-header img{height:200px}}:host .alert-body{display:flex;flex-direction:column;gap:16px;padding:24px;margin:auto}:host .alert-body .title{font-style:normal;font-weight:700;font-size:32px;line-height:40px;text-align:center;color:#1f2024}:host .alert-body .message{font-style:normal;font-weight:400;font-size:16px;line-height:24px;text-align:center;letter-spacing:.03em;color:#545a63}:host .alert-footer{display:flex;justify-content:space-between;padding:0 24px 24px;position:sticky;bottom:0;background:#fafafa;gap:12px}:host .alert-footer ::ng-deep monkey-button{width:100%}:host .alert-footer ::ng-deep monkey-button button{width:100%}\n"], components: [{ type: i1.MonkeyModalComponent, selector: "monkey-modal", inputs: ["config", "modalRef", "onHandleConfirm"] }, { type: i1.MonkeyButtonComponent, selector: "monkey-button", inputs: ["label", "icon", "iconPosition", "type", "color", "disabled", "size"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i1$1.TranslatePipe } });
|
|
61
63
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AlertsComponent, decorators: [{
|
|
62
64
|
type: Component,
|
|
63
|
-
args: [{ selector: 'monkeyecx-alerts', template: "<monkey-modal [config]=\"config\" [modalRef]=\"modalRef\" *ngIf=\"config\">\r\n <div class=\"alert-header\">\r\n <img [src]=\"_img\">\r\n </div>\r\n <div class=\"alert-body\">\r\n <span class=\"title\">\r\n {{ _title | translate }}\r\n </span>\r\n <span class=\"message\">\r\n {{ _message | translate }}\r\n </span>\r\n </div>\r\n <div class=\"alert-footer\">\r\n <monkey-button type=\"tertiary\" color=\"theme\" (click)=\"onClose()\">\r\n
|
|
65
|
+
args: [{ selector: 'monkeyecx-alerts', template: "<monkey-modal [config]=\"config\" [modalRef]=\"modalRef\" *ngIf=\"config\">\r\n <div class=\"alert-header\">\r\n <img [src]=\"_img\">\r\n </div>\r\n <div class=\"alert-body\">\r\n <span class=\"title\">\r\n {{ _title | translate }}\r\n </span>\r\n <span class=\"message\">\r\n {{ _message | translate }}\r\n </span>\r\n </div>\r\n <div class=\"alert-footer\">\r\n <ng-container *ngIf=\"!_hideClose\">\r\n <monkey-button type=\"tertiary\" color=\"theme\" (click)=\"onClose()\">\r\n {{ 'BUTTONS.CLOSE' | translate }}\r\n </monkey-button>\r\n </ng-container>\r\n \r\n <ng-container *ngIf=\"_action\">\r\n <monkey-button type=\"primary\" color=\"theme\" (click)=\"onAction()\">\r\n {{ _action.label | translate }}\r\n </monkey-button>\r\n </ng-container>\r\n </div>\r\n</monkey-modal>", styles: [":host ::ng-deep monkey-modal mecx-monkey-modal{padding:0}:host ::ng-deep monkey-modal mecx-monkey-modal .body{margin-bottom:0}:host ::ng-deep monkey-modal .mecx-monkey-modal__size-md{max-width:448px}:host .alert-header{height:100%;max-height:200px}@media screen and (max-width: 959px){:host .alert-header{min-height:212px}}:host .alert-header img{border-radius:12px 12px 0 0;-o-object-fit:cover;object-fit:cover;width:100%;max-height:280px}@media screen and (max-width: 959px){:host .alert-header img{height:200px}}:host .alert-body{display:flex;flex-direction:column;gap:16px;padding:24px;margin:auto}:host .alert-body .title{font-style:normal;font-weight:700;font-size:32px;line-height:40px;text-align:center;color:#1f2024}:host .alert-body .message{font-style:normal;font-weight:400;font-size:16px;line-height:24px;text-align:center;letter-spacing:.03em;color:#545a63}:host .alert-footer{display:flex;justify-content:space-between;padding:0 24px 24px;position:sticky;bottom:0;background:#fafafa;gap:12px}:host .alert-footer ::ng-deep monkey-button{width:100%}:host .alert-footer ::ng-deep monkey-button button{width:100%}\n"] }]
|
|
64
66
|
}], ctorParameters: function () { return [{ type: i1.MonkeyStyleGuideModalService }]; }, propDecorators: { config: [{
|
|
65
67
|
type: Input
|
|
66
68
|
}], modalRef: [{
|
|
@@ -3484,7 +3486,7 @@ class MonkeyEcxAlertsConfigService {
|
|
|
3484
3486
|
}
|
|
3485
3487
|
handleValidation(config) {
|
|
3486
3488
|
if (config.alert) {
|
|
3487
|
-
const { img, title, message, endDate, noEndDate, action } = config.alert;
|
|
3489
|
+
const { img, title, message, endDate, noEndDate, action, hideClose } = config.alert;
|
|
3488
3490
|
if (moment.default().isSameOrBefore(moment.default(endDate)) || noEndDate) {
|
|
3489
3491
|
this.modalService.open(AlertsComponent, {
|
|
3490
3492
|
color: 'theme',
|
|
@@ -3493,7 +3495,8 @@ class MonkeyEcxAlertsConfigService {
|
|
|
3493
3495
|
img,
|
|
3494
3496
|
title,
|
|
3495
3497
|
message,
|
|
3496
|
-
action
|
|
3498
|
+
action,
|
|
3499
|
+
hideClose
|
|
3497
3500
|
}
|
|
3498
3501
|
});
|
|
3499
3502
|
}
|