@muxima-ui/confirmation-dialog 1.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/esm2020/index.mjs +3 -0
- package/esm2020/lib/confirmation-dialog/confirmation-dialog.component.mjs +109 -0
- package/esm2020/lib/confirmation-dialog/confirmation-dialog.service.mjs +32 -0
- package/esm2020/muxima-ui-confirmation-dialog.mjs +5 -0
- package/fesm2015/muxima-ui-confirmation-dialog.mjs +146 -0
- package/fesm2015/muxima-ui-confirmation-dialog.mjs.map +1 -0
- package/fesm2020/muxima-ui-confirmation-dialog.mjs +145 -0
- package/fesm2020/muxima-ui-confirmation-dialog.mjs.map +1 -0
- package/index.d.ts +2 -0
- package/lib/confirmation-dialog/confirmation-dialog.component.d.ts +29 -0
- package/lib/confirmation-dialog/confirmation-dialog.service.d.ts +23 -0
- package/package.json +56 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export * from './lib/confirmation-dialog/confirmation-dialog.component';
|
|
2
|
+
export * from './lib/confirmation-dialog/confirmation-dialog.service';
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9vdmVybGF5L2NvbmZpcm1hdGlvbi1kaWFsb2cvc3JjL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMseURBQXlELENBQUM7QUFDeEUsY0FBYyx1REFBdUQsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vbGliL2NvbmZpcm1hdGlvbi1kaWFsb2cvY29uZmlybWF0aW9uLWRpYWxvZy5jb21wb25lbnQnO1xyXG5leHBvcnQgKiBmcm9tICcuL2xpYi9jb25maXJtYXRpb24tZGlhbG9nL2NvbmZpcm1hdGlvbi1kaWFsb2cuc2VydmljZSc7XHJcbiJdfQ==
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { Component, EventEmitter, HostListener, Input, Output } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "./confirmation-dialog.service";
|
|
5
|
+
import * as i2 from "@angular/common";
|
|
6
|
+
export class ConfirmationDialogComponent {
|
|
7
|
+
constructor(confirmationService) {
|
|
8
|
+
this.confirmationService = confirmationService;
|
|
9
|
+
this.title = 'Confirmar Ação';
|
|
10
|
+
this.message = 'Tem certeza que deseja realizar esta ação?';
|
|
11
|
+
this.variant = 'info';
|
|
12
|
+
this.confirmText = 'Confirmar';
|
|
13
|
+
this.cancelText = 'Cancelar';
|
|
14
|
+
this.isOpen = false;
|
|
15
|
+
this.confirmed = new EventEmitter();
|
|
16
|
+
this.cancelled = new EventEmitter();
|
|
17
|
+
this.closed = new EventEmitter();
|
|
18
|
+
}
|
|
19
|
+
ngOnInit() {
|
|
20
|
+
this.subscription = this.confirmationService.openDialog$.subscribe((config) => {
|
|
21
|
+
this.applyConfig(config);
|
|
22
|
+
this.open();
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
ngOnDestroy() {
|
|
26
|
+
this.subscription?.unsubscribe();
|
|
27
|
+
}
|
|
28
|
+
onEscapeKey() {
|
|
29
|
+
if (this.isOpen) {
|
|
30
|
+
this.cancel();
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
open() {
|
|
34
|
+
this.isOpen = true;
|
|
35
|
+
document.body.style.overflow = 'hidden';
|
|
36
|
+
}
|
|
37
|
+
close() {
|
|
38
|
+
this.isOpen = false;
|
|
39
|
+
this.closed.emit();
|
|
40
|
+
document.body.style.overflow = '';
|
|
41
|
+
}
|
|
42
|
+
confirm() {
|
|
43
|
+
this.confirmed.emit();
|
|
44
|
+
this.confirmationService.sendResult(true);
|
|
45
|
+
this.close();
|
|
46
|
+
}
|
|
47
|
+
cancel() {
|
|
48
|
+
this.cancelled.emit();
|
|
49
|
+
this.confirmationService.sendResult(false);
|
|
50
|
+
this.close();
|
|
51
|
+
}
|
|
52
|
+
applyConfig(config) {
|
|
53
|
+
this.title = config.title;
|
|
54
|
+
this.message = config.message;
|
|
55
|
+
if (config.variant)
|
|
56
|
+
this.variant = config.variant;
|
|
57
|
+
if (config.confirmText)
|
|
58
|
+
this.confirmText = config.confirmText;
|
|
59
|
+
if (config.cancelText)
|
|
60
|
+
this.cancelText = config.cancelText;
|
|
61
|
+
if (config.icon)
|
|
62
|
+
this.icon = config.icon;
|
|
63
|
+
}
|
|
64
|
+
getVariantIcon() {
|
|
65
|
+
if (this.icon)
|
|
66
|
+
return this.icon;
|
|
67
|
+
switch (this.variant) {
|
|
68
|
+
case 'danger':
|
|
69
|
+
return '⚠️';
|
|
70
|
+
case 'warning':
|
|
71
|
+
return '⚡';
|
|
72
|
+
case 'success':
|
|
73
|
+
return '✅';
|
|
74
|
+
case 'info':
|
|
75
|
+
default:
|
|
76
|
+
return 'ℹ️';
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
ConfirmationDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConfirmationDialogComponent, deps: [{ token: i1.ConfirmationDialogService }], target: i0.ɵɵFactoryTarget.Component });
|
|
81
|
+
ConfirmationDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ConfirmationDialogComponent, isStandalone: true, selector: "muxima-confirmation-dialog", inputs: { title: "title", message: "message", variant: "variant", confirmText: "confirmText", cancelText: "cancelText", icon: "icon", isOpen: "isOpen" }, outputs: { confirmed: "confirmed", cancelled: "cancelled", closed: "closed" }, host: { listeners: { "document:keydown.escape": "onEscapeKey()" } }, ngImport: i0, template: "<div class=\"confirmation-dialog-container\" *ngIf=\"isOpen\">\r\n <div class=\"dialog-backdrop\" (click)=\"cancel()\"></div>\r\n\r\n <div class=\"dialog-panel\" [class]=\"'variant-' + variant\">\r\n <div class=\"dialog-icon\">\r\n <span class=\"icon-emoji\">{{ getVariantIcon() }}</span>\r\n </div>\r\n\r\n <div class=\"dialog-header\">\r\n <h2 class=\"dialog-title\">{{ title }}</h2>\r\n </div>\r\n\r\n <div class=\"dialog-content\">\r\n <p class=\"dialog-message\">{{ message }}</p>\r\n </div>\r\n\r\n <div class=\"dialog-footer\">\r\n <button class=\"btn btn-cancel\" (click)=\"cancel()\">\r\n {{ cancelText }}\r\n </button>\r\n <button class=\"btn btn-confirm\" [class]=\"'btn-' + variant\" (click)=\"confirm()\">\r\n {{ confirmText }}\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".confirmation-dialog-container{position:fixed;inset:0;z-index:10000;display:flex;align-items:center;justify-content:center;padding:16px}.dialog-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.5);animation:fadeIn .2s ease}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.dialog-panel{position:relative;background:white;border-radius:20px;box-shadow:0 25px 50px -12px #00000040;max-width:500px;width:100%;padding:32px;animation:scaleIn .3s cubic-bezier(.4,0,.2,1)}@keyframes scaleIn{0%{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}.dialog-icon{display:flex;align-items:center;justify-content:center;margin-bottom:24px}.dialog-icon .icon-emoji{font-size:64px;animation:bounceIn .5s cubic-bezier(.68,-.55,.265,1.55)}@keyframes bounceIn{0%{transform:scale(0)}50%{transform:scale(1.1)}to{transform:scale(1)}}.dialog-header{margin-bottom:16px;text-align:center}.dialog-title{font-size:28px;font-weight:800;color:#1f2937;margin:0}.dialog-content{margin-bottom:32px;text-align:center}.dialog-message{font-size:16px;line-height:1.6;color:#6b7280;margin:0}.dialog-footer{display:flex;gap:12px;justify-content:flex-end}.btn{padding:12px 24px;border:none;border-radius:12px;font-size:16px;font-weight:600;cursor:pointer;transition:all .3s ease;outline:none}.btn:active{transform:scale(.95)}.btn-cancel{background:#f3f4f6;color:#6b7280}.btn-cancel:hover{background:#e5e7eb;color:#374151}.btn-confirm{color:#fff;min-width:120px}.btn-info{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);box-shadow:0 4px 12px #667eea66}.btn-info:hover{box-shadow:0 6px 16px #667eea80;transform:translateY(-2px)}.btn-success{background:linear-gradient(135deg,#10b981 0%,#059669 100%);box-shadow:0 4px 12px #10b98166}.btn-success:hover{box-shadow:0 6px 16px #10b98180;transform:translateY(-2px)}.btn-warning{background:linear-gradient(135deg,#f59e0b 0%,#d97706 100%);box-shadow:0 4px 12px #f59e0b66}.btn-warning:hover{box-shadow:0 6px 16px #f59e0b80;transform:translateY(-2px)}.btn-danger{background:linear-gradient(135deg,#ef4444 0%,#dc2626 100%);box-shadow:0 4px 12px #ef444466}.btn-danger:hover{box-shadow:0 6px 16px #ef444480;transform:translateY(-2px)}.variant-danger{border-top:4px solid #ef4444}.variant-warning{border-top:4px solid #f59e0b}.variant-success{border-top:4px solid #10b981}.variant-info{border-top:4px solid #667eea}@media (max-width: 640px){.dialog-panel{padding:24px}.dialog-icon .icon-emoji{font-size:48px}.dialog-title{font-size:24px}.dialog-message{font-size:14px}.dialog-footer{flex-direction:column-reverse}.dialog-footer .btn{width:100%}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
82
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConfirmationDialogComponent, decorators: [{
|
|
83
|
+
type: Component,
|
|
84
|
+
args: [{ selector: 'muxima-confirmation-dialog', standalone: true, imports: [CommonModule], template: "<div class=\"confirmation-dialog-container\" *ngIf=\"isOpen\">\r\n <div class=\"dialog-backdrop\" (click)=\"cancel()\"></div>\r\n\r\n <div class=\"dialog-panel\" [class]=\"'variant-' + variant\">\r\n <div class=\"dialog-icon\">\r\n <span class=\"icon-emoji\">{{ getVariantIcon() }}</span>\r\n </div>\r\n\r\n <div class=\"dialog-header\">\r\n <h2 class=\"dialog-title\">{{ title }}</h2>\r\n </div>\r\n\r\n <div class=\"dialog-content\">\r\n <p class=\"dialog-message\">{{ message }}</p>\r\n </div>\r\n\r\n <div class=\"dialog-footer\">\r\n <button class=\"btn btn-cancel\" (click)=\"cancel()\">\r\n {{ cancelText }}\r\n </button>\r\n <button class=\"btn btn-confirm\" [class]=\"'btn-' + variant\" (click)=\"confirm()\">\r\n {{ confirmText }}\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".confirmation-dialog-container{position:fixed;inset:0;z-index:10000;display:flex;align-items:center;justify-content:center;padding:16px}.dialog-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.5);animation:fadeIn .2s ease}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.dialog-panel{position:relative;background:white;border-radius:20px;box-shadow:0 25px 50px -12px #00000040;max-width:500px;width:100%;padding:32px;animation:scaleIn .3s cubic-bezier(.4,0,.2,1)}@keyframes scaleIn{0%{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}.dialog-icon{display:flex;align-items:center;justify-content:center;margin-bottom:24px}.dialog-icon .icon-emoji{font-size:64px;animation:bounceIn .5s cubic-bezier(.68,-.55,.265,1.55)}@keyframes bounceIn{0%{transform:scale(0)}50%{transform:scale(1.1)}to{transform:scale(1)}}.dialog-header{margin-bottom:16px;text-align:center}.dialog-title{font-size:28px;font-weight:800;color:#1f2937;margin:0}.dialog-content{margin-bottom:32px;text-align:center}.dialog-message{font-size:16px;line-height:1.6;color:#6b7280;margin:0}.dialog-footer{display:flex;gap:12px;justify-content:flex-end}.btn{padding:12px 24px;border:none;border-radius:12px;font-size:16px;font-weight:600;cursor:pointer;transition:all .3s ease;outline:none}.btn:active{transform:scale(.95)}.btn-cancel{background:#f3f4f6;color:#6b7280}.btn-cancel:hover{background:#e5e7eb;color:#374151}.btn-confirm{color:#fff;min-width:120px}.btn-info{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);box-shadow:0 4px 12px #667eea66}.btn-info:hover{box-shadow:0 6px 16px #667eea80;transform:translateY(-2px)}.btn-success{background:linear-gradient(135deg,#10b981 0%,#059669 100%);box-shadow:0 4px 12px #10b98166}.btn-success:hover{box-shadow:0 6px 16px #10b98180;transform:translateY(-2px)}.btn-warning{background:linear-gradient(135deg,#f59e0b 0%,#d97706 100%);box-shadow:0 4px 12px #f59e0b66}.btn-warning:hover{box-shadow:0 6px 16px #f59e0b80;transform:translateY(-2px)}.btn-danger{background:linear-gradient(135deg,#ef4444 0%,#dc2626 100%);box-shadow:0 4px 12px #ef444466}.btn-danger:hover{box-shadow:0 6px 16px #ef444480;transform:translateY(-2px)}.variant-danger{border-top:4px solid #ef4444}.variant-warning{border-top:4px solid #f59e0b}.variant-success{border-top:4px solid #10b981}.variant-info{border-top:4px solid #667eea}@media (max-width: 640px){.dialog-panel{padding:24px}.dialog-icon .icon-emoji{font-size:48px}.dialog-title{font-size:24px}.dialog-message{font-size:14px}.dialog-footer{flex-direction:column-reverse}.dialog-footer .btn{width:100%}}\n"] }]
|
|
85
|
+
}], ctorParameters: function () { return [{ type: i1.ConfirmationDialogService }]; }, propDecorators: { title: [{
|
|
86
|
+
type: Input
|
|
87
|
+
}], message: [{
|
|
88
|
+
type: Input
|
|
89
|
+
}], variant: [{
|
|
90
|
+
type: Input
|
|
91
|
+
}], confirmText: [{
|
|
92
|
+
type: Input
|
|
93
|
+
}], cancelText: [{
|
|
94
|
+
type: Input
|
|
95
|
+
}], icon: [{
|
|
96
|
+
type: Input
|
|
97
|
+
}], isOpen: [{
|
|
98
|
+
type: Input
|
|
99
|
+
}], confirmed: [{
|
|
100
|
+
type: Output
|
|
101
|
+
}], cancelled: [{
|
|
102
|
+
type: Output
|
|
103
|
+
}], closed: [{
|
|
104
|
+
type: Output
|
|
105
|
+
}], onEscapeKey: [{
|
|
106
|
+
type: HostListener,
|
|
107
|
+
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G4tY29uZmlybVwiIFtjbGFzc109XCInYnRuLScgKyB2YXJpYW50XCIgKGNsaWNrKT1cImNvbmZpcm0oKVwiPlxyXG4gICAgICAgIHt7IGNvbmZpcm1UZXh0IH19XHJcbiAgICAgIDwvYnV0dG9uPlxyXG4gICAgPC9kaXY+XHJcbiAgPC9kaXY+XHJcbjwvZGl2PlxyXG4iXX0=
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { Subject } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export class ConfirmationDialogService {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.openDialogSubject = new Subject();
|
|
7
|
+
this.dialogResultSubject = new Subject();
|
|
8
|
+
this.openDialog$ = this.openDialogSubject.asObservable();
|
|
9
|
+
this.dialogResult$ = this.dialogResultSubject.asObservable();
|
|
10
|
+
}
|
|
11
|
+
confirm(config) {
|
|
12
|
+
return new Promise((resolve) => {
|
|
13
|
+
this.openDialogSubject.next(config);
|
|
14
|
+
const subscription = this.dialogResult$.subscribe((result) => {
|
|
15
|
+
resolve(result.confirmed);
|
|
16
|
+
subscription.unsubscribe();
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
sendResult(confirmed) {
|
|
21
|
+
this.dialogResultSubject.next({ confirmed });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
ConfirmationDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConfirmationDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
25
|
+
ConfirmationDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConfirmationDialogService, providedIn: 'root' });
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConfirmationDialogService, decorators: [{
|
|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
+
*/
|
|
4
|
+
export * from './index';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibXV4aW1hLXVpLWNvbmZpcm1hdGlvbi1kaWFsb2cuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9vdmVybGF5L2NvbmZpcm1hdGlvbi1kaWFsb2cvc3JjL211eGltYS11aS1jb25maXJtYXRpb24tZGlhbG9nLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, EventEmitter, Component, Input, Output, HostListener } from '@angular/core';
|
|
3
|
+
import * as i2 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import { Subject } from 'rxjs';
|
|
6
|
+
|
|
7
|
+
class ConfirmationDialogService {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.openDialogSubject = new Subject();
|
|
10
|
+
this.dialogResultSubject = new Subject();
|
|
11
|
+
this.openDialog$ = this.openDialogSubject.asObservable();
|
|
12
|
+
this.dialogResult$ = this.dialogResultSubject.asObservable();
|
|
13
|
+
}
|
|
14
|
+
confirm(config) {
|
|
15
|
+
return new Promise((resolve) => {
|
|
16
|
+
this.openDialogSubject.next(config);
|
|
17
|
+
const subscription = this.dialogResult$.subscribe((result) => {
|
|
18
|
+
resolve(result.confirmed);
|
|
19
|
+
subscription.unsubscribe();
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
sendResult(confirmed) {
|
|
24
|
+
this.dialogResultSubject.next({ confirmed });
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
ConfirmationDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConfirmationDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
28
|
+
ConfirmationDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConfirmationDialogService, providedIn: 'root' });
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConfirmationDialogService, decorators: [{
|
|
30
|
+
type: Injectable,
|
|
31
|
+
args: [{
|
|
32
|
+
providedIn: 'root'
|
|
33
|
+
}]
|
|
34
|
+
}] });
|
|
35
|
+
|
|
36
|
+
class ConfirmationDialogComponent {
|
|
37
|
+
constructor(confirmationService) {
|
|
38
|
+
this.confirmationService = confirmationService;
|
|
39
|
+
this.title = 'Confirmar Ação';
|
|
40
|
+
this.message = 'Tem certeza que deseja realizar esta ação?';
|
|
41
|
+
this.variant = 'info';
|
|
42
|
+
this.confirmText = 'Confirmar';
|
|
43
|
+
this.cancelText = 'Cancelar';
|
|
44
|
+
this.isOpen = false;
|
|
45
|
+
this.confirmed = new EventEmitter();
|
|
46
|
+
this.cancelled = new EventEmitter();
|
|
47
|
+
this.closed = new EventEmitter();
|
|
48
|
+
}
|
|
49
|
+
ngOnInit() {
|
|
50
|
+
this.subscription = this.confirmationService.openDialog$.subscribe((config) => {
|
|
51
|
+
this.applyConfig(config);
|
|
52
|
+
this.open();
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
ngOnDestroy() {
|
|
56
|
+
var _a;
|
|
57
|
+
(_a = this.subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
58
|
+
}
|
|
59
|
+
onEscapeKey() {
|
|
60
|
+
if (this.isOpen) {
|
|
61
|
+
this.cancel();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
open() {
|
|
65
|
+
this.isOpen = true;
|
|
66
|
+
document.body.style.overflow = 'hidden';
|
|
67
|
+
}
|
|
68
|
+
close() {
|
|
69
|
+
this.isOpen = false;
|
|
70
|
+
this.closed.emit();
|
|
71
|
+
document.body.style.overflow = '';
|
|
72
|
+
}
|
|
73
|
+
confirm() {
|
|
74
|
+
this.confirmed.emit();
|
|
75
|
+
this.confirmationService.sendResult(true);
|
|
76
|
+
this.close();
|
|
77
|
+
}
|
|
78
|
+
cancel() {
|
|
79
|
+
this.cancelled.emit();
|
|
80
|
+
this.confirmationService.sendResult(false);
|
|
81
|
+
this.close();
|
|
82
|
+
}
|
|
83
|
+
applyConfig(config) {
|
|
84
|
+
this.title = config.title;
|
|
85
|
+
this.message = config.message;
|
|
86
|
+
if (config.variant)
|
|
87
|
+
this.variant = config.variant;
|
|
88
|
+
if (config.confirmText)
|
|
89
|
+
this.confirmText = config.confirmText;
|
|
90
|
+
if (config.cancelText)
|
|
91
|
+
this.cancelText = config.cancelText;
|
|
92
|
+
if (config.icon)
|
|
93
|
+
this.icon = config.icon;
|
|
94
|
+
}
|
|
95
|
+
getVariantIcon() {
|
|
96
|
+
if (this.icon)
|
|
97
|
+
return this.icon;
|
|
98
|
+
switch (this.variant) {
|
|
99
|
+
case 'danger':
|
|
100
|
+
return '⚠️';
|
|
101
|
+
case 'warning':
|
|
102
|
+
return '⚡';
|
|
103
|
+
case 'success':
|
|
104
|
+
return '✅';
|
|
105
|
+
case 'info':
|
|
106
|
+
default:
|
|
107
|
+
return 'ℹ️';
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
ConfirmationDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConfirmationDialogComponent, deps: [{ token: ConfirmationDialogService }], target: i0.ɵɵFactoryTarget.Component });
|
|
112
|
+
ConfirmationDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ConfirmationDialogComponent, isStandalone: true, selector: "muxima-confirmation-dialog", inputs: { title: "title", message: "message", variant: "variant", confirmText: "confirmText", cancelText: "cancelText", icon: "icon", isOpen: "isOpen" }, outputs: { confirmed: "confirmed", cancelled: "cancelled", closed: "closed" }, host: { listeners: { "document:keydown.escape": "onEscapeKey()" } }, ngImport: i0, template: "<div class=\"confirmation-dialog-container\" *ngIf=\"isOpen\">\r\n <div class=\"dialog-backdrop\" (click)=\"cancel()\"></div>\r\n\r\n <div class=\"dialog-panel\" [class]=\"'variant-' + variant\">\r\n <div class=\"dialog-icon\">\r\n <span class=\"icon-emoji\">{{ getVariantIcon() }}</span>\r\n </div>\r\n\r\n <div class=\"dialog-header\">\r\n <h2 class=\"dialog-title\">{{ title }}</h2>\r\n </div>\r\n\r\n <div class=\"dialog-content\">\r\n <p class=\"dialog-message\">{{ message }}</p>\r\n </div>\r\n\r\n <div class=\"dialog-footer\">\r\n <button class=\"btn btn-cancel\" (click)=\"cancel()\">\r\n {{ cancelText }}\r\n </button>\r\n <button class=\"btn btn-confirm\" [class]=\"'btn-' + variant\" (click)=\"confirm()\">\r\n {{ confirmText }}\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".confirmation-dialog-container{position:fixed;inset:0;z-index:10000;display:flex;align-items:center;justify-content:center;padding:16px}.dialog-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.5);animation:fadeIn .2s ease}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.dialog-panel{position:relative;background:white;border-radius:20px;box-shadow:0 25px 50px -12px #00000040;max-width:500px;width:100%;padding:32px;animation:scaleIn .3s cubic-bezier(.4,0,.2,1)}@keyframes scaleIn{0%{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}.dialog-icon{display:flex;align-items:center;justify-content:center;margin-bottom:24px}.dialog-icon .icon-emoji{font-size:64px;animation:bounceIn .5s cubic-bezier(.68,-.55,.265,1.55)}@keyframes bounceIn{0%{transform:scale(0)}50%{transform:scale(1.1)}to{transform:scale(1)}}.dialog-header{margin-bottom:16px;text-align:center}.dialog-title{font-size:28px;font-weight:800;color:#1f2937;margin:0}.dialog-content{margin-bottom:32px;text-align:center}.dialog-message{font-size:16px;line-height:1.6;color:#6b7280;margin:0}.dialog-footer{display:flex;gap:12px;justify-content:flex-end}.btn{padding:12px 24px;border:none;border-radius:12px;font-size:16px;font-weight:600;cursor:pointer;transition:all .3s ease;outline:none}.btn:active{transform:scale(.95)}.btn-cancel{background:#f3f4f6;color:#6b7280}.btn-cancel:hover{background:#e5e7eb;color:#374151}.btn-confirm{color:#fff;min-width:120px}.btn-info{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);box-shadow:0 4px 12px #667eea66}.btn-info:hover{box-shadow:0 6px 16px #667eea80;transform:translateY(-2px)}.btn-success{background:linear-gradient(135deg,#10b981 0%,#059669 100%);box-shadow:0 4px 12px #10b98166}.btn-success:hover{box-shadow:0 6px 16px #10b98180;transform:translateY(-2px)}.btn-warning{background:linear-gradient(135deg,#f59e0b 0%,#d97706 100%);box-shadow:0 4px 12px #f59e0b66}.btn-warning:hover{box-shadow:0 6px 16px #f59e0b80;transform:translateY(-2px)}.btn-danger{background:linear-gradient(135deg,#ef4444 0%,#dc2626 100%);box-shadow:0 4px 12px #ef444466}.btn-danger:hover{box-shadow:0 6px 16px #ef444480;transform:translateY(-2px)}.variant-danger{border-top:4px solid #ef4444}.variant-warning{border-top:4px solid #f59e0b}.variant-success{border-top:4px solid #10b981}.variant-info{border-top:4px solid #667eea}@media (max-width: 640px){.dialog-panel{padding:24px}.dialog-icon .icon-emoji{font-size:48px}.dialog-title{font-size:24px}.dialog-message{font-size:14px}.dialog-footer{flex-direction:column-reverse}.dialog-footer .btn{width:100%}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
113
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConfirmationDialogComponent, decorators: [{
|
|
114
|
+
type: Component,
|
|
115
|
+
args: [{ selector: 'muxima-confirmation-dialog', standalone: true, imports: [CommonModule], template: "<div class=\"confirmation-dialog-container\" *ngIf=\"isOpen\">\r\n <div class=\"dialog-backdrop\" (click)=\"cancel()\"></div>\r\n\r\n <div class=\"dialog-panel\" [class]=\"'variant-' + variant\">\r\n <div class=\"dialog-icon\">\r\n <span class=\"icon-emoji\">{{ getVariantIcon() }}</span>\r\n </div>\r\n\r\n <div class=\"dialog-header\">\r\n <h2 class=\"dialog-title\">{{ title }}</h2>\r\n </div>\r\n\r\n <div class=\"dialog-content\">\r\n <p class=\"dialog-message\">{{ message }}</p>\r\n </div>\r\n\r\n <div class=\"dialog-footer\">\r\n <button class=\"btn btn-cancel\" (click)=\"cancel()\">\r\n {{ cancelText }}\r\n </button>\r\n <button class=\"btn btn-confirm\" [class]=\"'btn-' + variant\" (click)=\"confirm()\">\r\n {{ confirmText }}\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".confirmation-dialog-container{position:fixed;inset:0;z-index:10000;display:flex;align-items:center;justify-content:center;padding:16px}.dialog-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.5);animation:fadeIn .2s ease}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.dialog-panel{position:relative;background:white;border-radius:20px;box-shadow:0 25px 50px -12px #00000040;max-width:500px;width:100%;padding:32px;animation:scaleIn .3s cubic-bezier(.4,0,.2,1)}@keyframes scaleIn{0%{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}.dialog-icon{display:flex;align-items:center;justify-content:center;margin-bottom:24px}.dialog-icon .icon-emoji{font-size:64px;animation:bounceIn .5s cubic-bezier(.68,-.55,.265,1.55)}@keyframes bounceIn{0%{transform:scale(0)}50%{transform:scale(1.1)}to{transform:scale(1)}}.dialog-header{margin-bottom:16px;text-align:center}.dialog-title{font-size:28px;font-weight:800;color:#1f2937;margin:0}.dialog-content{margin-bottom:32px;text-align:center}.dialog-message{font-size:16px;line-height:1.6;color:#6b7280;margin:0}.dialog-footer{display:flex;gap:12px;justify-content:flex-end}.btn{padding:12px 24px;border:none;border-radius:12px;font-size:16px;font-weight:600;cursor:pointer;transition:all .3s ease;outline:none}.btn:active{transform:scale(.95)}.btn-cancel{background:#f3f4f6;color:#6b7280}.btn-cancel:hover{background:#e5e7eb;color:#374151}.btn-confirm{color:#fff;min-width:120px}.btn-info{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);box-shadow:0 4px 12px #667eea66}.btn-info:hover{box-shadow:0 6px 16px #667eea80;transform:translateY(-2px)}.btn-success{background:linear-gradient(135deg,#10b981 0%,#059669 100%);box-shadow:0 4px 12px #10b98166}.btn-success:hover{box-shadow:0 6px 16px #10b98180;transform:translateY(-2px)}.btn-warning{background:linear-gradient(135deg,#f59e0b 0%,#d97706 100%);box-shadow:0 4px 12px #f59e0b66}.btn-warning:hover{box-shadow:0 6px 16px #f59e0b80;transform:translateY(-2px)}.btn-danger{background:linear-gradient(135deg,#ef4444 0%,#dc2626 100%);box-shadow:0 4px 12px #ef444466}.btn-danger:hover{box-shadow:0 6px 16px #ef444480;transform:translateY(-2px)}.variant-danger{border-top:4px solid #ef4444}.variant-warning{border-top:4px solid #f59e0b}.variant-success{border-top:4px solid #10b981}.variant-info{border-top:4px solid #667eea}@media (max-width: 640px){.dialog-panel{padding:24px}.dialog-icon .icon-emoji{font-size:48px}.dialog-title{font-size:24px}.dialog-message{font-size:14px}.dialog-footer{flex-direction:column-reverse}.dialog-footer .btn{width:100%}}\n"] }]
|
|
116
|
+
}], ctorParameters: function () { return [{ type: ConfirmationDialogService }]; }, propDecorators: { title: [{
|
|
117
|
+
type: Input
|
|
118
|
+
}], message: [{
|
|
119
|
+
type: Input
|
|
120
|
+
}], variant: [{
|
|
121
|
+
type: Input
|
|
122
|
+
}], confirmText: [{
|
|
123
|
+
type: Input
|
|
124
|
+
}], cancelText: [{
|
|
125
|
+
type: Input
|
|
126
|
+
}], icon: [{
|
|
127
|
+
type: Input
|
|
128
|
+
}], isOpen: [{
|
|
129
|
+
type: Input
|
|
130
|
+
}], confirmed: [{
|
|
131
|
+
type: Output
|
|
132
|
+
}], cancelled: [{
|
|
133
|
+
type: Output
|
|
134
|
+
}], closed: [{
|
|
135
|
+
type: Output
|
|
136
|
+
}], onEscapeKey: [{
|
|
137
|
+
type: HostListener,
|
|
138
|
+
args: ['document:keydown.escape']
|
|
139
|
+
}] } });
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Generated bundle index. Do not edit.
|
|
143
|
+
*/
|
|
144
|
+
|
|
145
|
+
export { ConfirmationDialogComponent, ConfirmationDialogService };
|
|
146
|
+
//# sourceMappingURL=muxima-ui-confirmation-dialog.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"muxima-ui-confirmation-dialog.mjs","sources":["../../../../overlay/confirmation-dialog/src/lib/confirmation-dialog/confirmation-dialog.service.ts","../../../../overlay/confirmation-dialog/src/lib/confirmation-dialog/confirmation-dialog.component.ts","../../../../overlay/confirmation-dialog/src/lib/confirmation-dialog/confirmation-dialog.component.html","../../../../overlay/confirmation-dialog/src/muxima-ui-confirmation-dialog.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\nimport { Subject } from 'rxjs';\r\n\r\nexport type ConfirmationVariant = 'info' | 'warning' | 'danger' | 'success';\r\n\r\nexport interface ConfirmationConfig {\r\n title: string;\r\n message: string;\r\n variant?: ConfirmationVariant;\r\n confirmText?: string;\r\n cancelText?: string;\r\n icon?: string;\r\n}\r\n\r\nexport interface ConfirmationResult {\r\n confirmed: boolean;\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ConfirmationDialogService {\r\n private openDialogSubject = new Subject<ConfirmationConfig>();\r\n private dialogResultSubject = new Subject<ConfirmationResult>();\r\n\r\n openDialog$ = this.openDialogSubject.asObservable();\r\n dialogResult$ = this.dialogResultSubject.asObservable();\r\n\r\n confirm(config: ConfirmationConfig): Promise<boolean> {\r\n return new Promise((resolve) => {\r\n this.openDialogSubject.next(config);\r\n\r\n const subscription = this.dialogResult$.subscribe((result) => {\r\n resolve(result.confirmed);\r\n subscription.unsubscribe();\r\n });\r\n });\r\n }\r\n\r\n sendResult(confirmed: boolean): void {\r\n this.dialogResultSubject.next({ confirmed });\r\n }\r\n}\r\n","import { Component, EventEmitter, HostListener, Input, OnDestroy, OnInit, Output } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ConfirmationDialogService, ConfirmationConfig, ConfirmationVariant } from './confirmation-dialog.service';\r\nimport { Subscription } from 'rxjs';\r\n\r\n@Component({\r\n selector: 'muxima-confirmation-dialog',\r\n standalone: true,\r\n imports: [CommonModule],\r\n templateUrl: './confirmation-dialog.component.html',\r\n styleUrls: ['./confirmation-dialog.component.scss']\r\n})\r\nexport class ConfirmationDialogComponent implements OnInit, OnDestroy {\r\n @Input() title = 'Confirmar Ação';\r\n @Input() message = 'Tem certeza que deseja realizar esta ação?';\r\n @Input() variant: ConfirmationVariant = 'info';\r\n @Input() confirmText = 'Confirmar';\r\n @Input() cancelText = 'Cancelar';\r\n @Input() icon?: string;\r\n @Input() isOpen = false;\r\n \r\n @Output() confirmed = new EventEmitter<void>();\r\n @Output() cancelled = new EventEmitter<void>();\r\n @Output() closed = new EventEmitter<void>();\r\n \r\n private subscription?: Subscription;\r\n\r\n constructor(private confirmationService: ConfirmationDialogService) {}\r\n\r\n ngOnInit(): void {\r\n this.subscription = this.confirmationService.openDialog$.subscribe((config) => {\r\n this.applyConfig(config);\r\n this.open();\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.subscription?.unsubscribe();\r\n }\r\n\r\n @HostListener('document:keydown.escape')\r\n onEscapeKey(): void {\r\n if (this.isOpen) {\r\n this.cancel();\r\n }\r\n }\r\n\r\n open(): void {\r\n this.isOpen = true;\r\n document.body.style.overflow = 'hidden';\r\n }\r\n\r\n close(): void {\r\n this.isOpen = false;\r\n this.closed.emit();\r\n document.body.style.overflow = '';\r\n }\r\n\r\n confirm(): void {\r\n this.confirmed.emit();\r\n this.confirmationService.sendResult(true);\r\n this.close();\r\n }\r\n\r\n cancel(): void {\r\n this.cancelled.emit();\r\n this.confirmationService.sendResult(false);\r\n this.close();\r\n }\r\n\r\n private applyConfig(config: ConfirmationConfig): void {\r\n this.title = config.title;\r\n this.message = config.message;\r\n if (config.variant) this.variant = config.variant;\r\n if (config.confirmText) this.confirmText = config.confirmText;\r\n if (config.cancelText) this.cancelText = config.cancelText;\r\n if (config.icon) this.icon = config.icon;\r\n }\r\n\r\n getVariantIcon(): string {\r\n if (this.icon) return this.icon;\r\n \r\n switch (this.variant) {\r\n case 'danger':\r\n return '⚠️';\r\n case 'warning':\r\n return '⚡';\r\n case 'success':\r\n return '✅';\r\n case 'info':\r\n default:\r\n return 'ℹ️';\r\n }\r\n }\r\n}\r\n","<div class=\"confirmation-dialog-container\" *ngIf=\"isOpen\">\r\n <div class=\"dialog-backdrop\" (click)=\"cancel()\"></div>\r\n\r\n <div class=\"dialog-panel\" [class]=\"'variant-' + variant\">\r\n <div class=\"dialog-icon\">\r\n <span class=\"icon-emoji\">{{ getVariantIcon() }}</span>\r\n </div>\r\n\r\n <div class=\"dialog-header\">\r\n <h2 class=\"dialog-title\">{{ title }}</h2>\r\n </div>\r\n\r\n <div class=\"dialog-content\">\r\n <p class=\"dialog-message\">{{ message }}</p>\r\n </div>\r\n\r\n <div class=\"dialog-footer\">\r\n <button class=\"btn btn-cancel\" (click)=\"cancel()\">\r\n {{ cancelText }}\r\n </button>\r\n <button class=\"btn btn-confirm\" [class]=\"'btn-' + variant\" (click)=\"confirm()\">\r\n {{ confirmText }}\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.Confirmation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AIX,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBAPvC,SAAS;YACE,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,4BAA4B,EAC1B,UAAA,EAAA,IAAI,EACP,OAAA,EAAA,CAAC,YAAY,CAAC,EAAA,QAAA,EAAA,o2BAAA,EAAA,MAAA,EAAA,CAAA,4gFAAA,CAAA,EAAA,CAAA;6GAKd,KAAK,EAAA,CAAA;sBAAb,KAAK;gBACG,OAAO,EAAA,CAAA;sBAAf,KAAK;gBACG,OAAO,EAAA,CAAA;sBAAf,KAAK;gBACG,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBACG,UAAU,EAAA,CAAA;sBAAlB,KAAK;gBACG,IAAI,EAAA,CAAA;sBAAZ,KAAK;gBACG,MAAM,EAAA,CAAA;sBAAd,KAAK;gBAEI,SAAS,EAAA,CAAA;sBAAlB,MAAM;gBACG,SAAS,EAAA,CAAA;sBAAlB,MAAM;gBACG,MAAM,EAAA,CAAA;sBAAf,MAAM;gBAkBP,WAAW,EAAA,CAAA;sBADV,YAAY;uBAAC,yBAAyB,CAAA;;;AExCzC;;AAEG;;;;"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, EventEmitter, Component, Input, Output, HostListener } from '@angular/core';
|
|
3
|
+
import * as i2 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import { Subject } from 'rxjs';
|
|
6
|
+
|
|
7
|
+
class ConfirmationDialogService {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.openDialogSubject = new Subject();
|
|
10
|
+
this.dialogResultSubject = new Subject();
|
|
11
|
+
this.openDialog$ = this.openDialogSubject.asObservable();
|
|
12
|
+
this.dialogResult$ = this.dialogResultSubject.asObservable();
|
|
13
|
+
}
|
|
14
|
+
confirm(config) {
|
|
15
|
+
return new Promise((resolve) => {
|
|
16
|
+
this.openDialogSubject.next(config);
|
|
17
|
+
const subscription = this.dialogResult$.subscribe((result) => {
|
|
18
|
+
resolve(result.confirmed);
|
|
19
|
+
subscription.unsubscribe();
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
sendResult(confirmed) {
|
|
24
|
+
this.dialogResultSubject.next({ confirmed });
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
ConfirmationDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConfirmationDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
28
|
+
ConfirmationDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConfirmationDialogService, providedIn: 'root' });
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConfirmationDialogService, decorators: [{
|
|
30
|
+
type: Injectable,
|
|
31
|
+
args: [{
|
|
32
|
+
providedIn: 'root'
|
|
33
|
+
}]
|
|
34
|
+
}] });
|
|
35
|
+
|
|
36
|
+
class ConfirmationDialogComponent {
|
|
37
|
+
constructor(confirmationService) {
|
|
38
|
+
this.confirmationService = confirmationService;
|
|
39
|
+
this.title = 'Confirmar Ação';
|
|
40
|
+
this.message = 'Tem certeza que deseja realizar esta ação?';
|
|
41
|
+
this.variant = 'info';
|
|
42
|
+
this.confirmText = 'Confirmar';
|
|
43
|
+
this.cancelText = 'Cancelar';
|
|
44
|
+
this.isOpen = false;
|
|
45
|
+
this.confirmed = new EventEmitter();
|
|
46
|
+
this.cancelled = new EventEmitter();
|
|
47
|
+
this.closed = new EventEmitter();
|
|
48
|
+
}
|
|
49
|
+
ngOnInit() {
|
|
50
|
+
this.subscription = this.confirmationService.openDialog$.subscribe((config) => {
|
|
51
|
+
this.applyConfig(config);
|
|
52
|
+
this.open();
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
ngOnDestroy() {
|
|
56
|
+
this.subscription?.unsubscribe();
|
|
57
|
+
}
|
|
58
|
+
onEscapeKey() {
|
|
59
|
+
if (this.isOpen) {
|
|
60
|
+
this.cancel();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
open() {
|
|
64
|
+
this.isOpen = true;
|
|
65
|
+
document.body.style.overflow = 'hidden';
|
|
66
|
+
}
|
|
67
|
+
close() {
|
|
68
|
+
this.isOpen = false;
|
|
69
|
+
this.closed.emit();
|
|
70
|
+
document.body.style.overflow = '';
|
|
71
|
+
}
|
|
72
|
+
confirm() {
|
|
73
|
+
this.confirmed.emit();
|
|
74
|
+
this.confirmationService.sendResult(true);
|
|
75
|
+
this.close();
|
|
76
|
+
}
|
|
77
|
+
cancel() {
|
|
78
|
+
this.cancelled.emit();
|
|
79
|
+
this.confirmationService.sendResult(false);
|
|
80
|
+
this.close();
|
|
81
|
+
}
|
|
82
|
+
applyConfig(config) {
|
|
83
|
+
this.title = config.title;
|
|
84
|
+
this.message = config.message;
|
|
85
|
+
if (config.variant)
|
|
86
|
+
this.variant = config.variant;
|
|
87
|
+
if (config.confirmText)
|
|
88
|
+
this.confirmText = config.confirmText;
|
|
89
|
+
if (config.cancelText)
|
|
90
|
+
this.cancelText = config.cancelText;
|
|
91
|
+
if (config.icon)
|
|
92
|
+
this.icon = config.icon;
|
|
93
|
+
}
|
|
94
|
+
getVariantIcon() {
|
|
95
|
+
if (this.icon)
|
|
96
|
+
return this.icon;
|
|
97
|
+
switch (this.variant) {
|
|
98
|
+
case 'danger':
|
|
99
|
+
return '⚠️';
|
|
100
|
+
case 'warning':
|
|
101
|
+
return '⚡';
|
|
102
|
+
case 'success':
|
|
103
|
+
return '✅';
|
|
104
|
+
case 'info':
|
|
105
|
+
default:
|
|
106
|
+
return 'ℹ️';
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
ConfirmationDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConfirmationDialogComponent, deps: [{ token: ConfirmationDialogService }], target: i0.ɵɵFactoryTarget.Component });
|
|
111
|
+
ConfirmationDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ConfirmationDialogComponent, isStandalone: true, selector: "muxima-confirmation-dialog", inputs: { title: "title", message: "message", variant: "variant", confirmText: "confirmText", cancelText: "cancelText", icon: "icon", isOpen: "isOpen" }, outputs: { confirmed: "confirmed", cancelled: "cancelled", closed: "closed" }, host: { listeners: { "document:keydown.escape": "onEscapeKey()" } }, ngImport: i0, template: "<div class=\"confirmation-dialog-container\" *ngIf=\"isOpen\">\r\n <div class=\"dialog-backdrop\" (click)=\"cancel()\"></div>\r\n\r\n <div class=\"dialog-panel\" [class]=\"'variant-' + variant\">\r\n <div class=\"dialog-icon\">\r\n <span class=\"icon-emoji\">{{ getVariantIcon() }}</span>\r\n </div>\r\n\r\n <div class=\"dialog-header\">\r\n <h2 class=\"dialog-title\">{{ title }}</h2>\r\n </div>\r\n\r\n <div class=\"dialog-content\">\r\n <p class=\"dialog-message\">{{ message }}</p>\r\n </div>\r\n\r\n <div class=\"dialog-footer\">\r\n <button class=\"btn btn-cancel\" (click)=\"cancel()\">\r\n {{ cancelText }}\r\n </button>\r\n <button class=\"btn btn-confirm\" [class]=\"'btn-' + variant\" (click)=\"confirm()\">\r\n {{ confirmText }}\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".confirmation-dialog-container{position:fixed;inset:0;z-index:10000;display:flex;align-items:center;justify-content:center;padding:16px}.dialog-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.5);animation:fadeIn .2s ease}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.dialog-panel{position:relative;background:white;border-radius:20px;box-shadow:0 25px 50px -12px #00000040;max-width:500px;width:100%;padding:32px;animation:scaleIn .3s cubic-bezier(.4,0,.2,1)}@keyframes scaleIn{0%{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}.dialog-icon{display:flex;align-items:center;justify-content:center;margin-bottom:24px}.dialog-icon .icon-emoji{font-size:64px;animation:bounceIn .5s cubic-bezier(.68,-.55,.265,1.55)}@keyframes bounceIn{0%{transform:scale(0)}50%{transform:scale(1.1)}to{transform:scale(1)}}.dialog-header{margin-bottom:16px;text-align:center}.dialog-title{font-size:28px;font-weight:800;color:#1f2937;margin:0}.dialog-content{margin-bottom:32px;text-align:center}.dialog-message{font-size:16px;line-height:1.6;color:#6b7280;margin:0}.dialog-footer{display:flex;gap:12px;justify-content:flex-end}.btn{padding:12px 24px;border:none;border-radius:12px;font-size:16px;font-weight:600;cursor:pointer;transition:all .3s ease;outline:none}.btn:active{transform:scale(.95)}.btn-cancel{background:#f3f4f6;color:#6b7280}.btn-cancel:hover{background:#e5e7eb;color:#374151}.btn-confirm{color:#fff;min-width:120px}.btn-info{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);box-shadow:0 4px 12px #667eea66}.btn-info:hover{box-shadow:0 6px 16px #667eea80;transform:translateY(-2px)}.btn-success{background:linear-gradient(135deg,#10b981 0%,#059669 100%);box-shadow:0 4px 12px #10b98166}.btn-success:hover{box-shadow:0 6px 16px #10b98180;transform:translateY(-2px)}.btn-warning{background:linear-gradient(135deg,#f59e0b 0%,#d97706 100%);box-shadow:0 4px 12px #f59e0b66}.btn-warning:hover{box-shadow:0 6px 16px #f59e0b80;transform:translateY(-2px)}.btn-danger{background:linear-gradient(135deg,#ef4444 0%,#dc2626 100%);box-shadow:0 4px 12px #ef444466}.btn-danger:hover{box-shadow:0 6px 16px #ef444480;transform:translateY(-2px)}.variant-danger{border-top:4px solid #ef4444}.variant-warning{border-top:4px solid #f59e0b}.variant-success{border-top:4px solid #10b981}.variant-info{border-top:4px solid #667eea}@media (max-width: 640px){.dialog-panel{padding:24px}.dialog-icon .icon-emoji{font-size:48px}.dialog-title{font-size:24px}.dialog-message{font-size:14px}.dialog-footer{flex-direction:column-reverse}.dialog-footer .btn{width:100%}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
112
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConfirmationDialogComponent, decorators: [{
|
|
113
|
+
type: Component,
|
|
114
|
+
args: [{ selector: 'muxima-confirmation-dialog', standalone: true, imports: [CommonModule], template: "<div class=\"confirmation-dialog-container\" *ngIf=\"isOpen\">\r\n <div class=\"dialog-backdrop\" (click)=\"cancel()\"></div>\r\n\r\n <div class=\"dialog-panel\" [class]=\"'variant-' + variant\">\r\n <div class=\"dialog-icon\">\r\n <span class=\"icon-emoji\">{{ getVariantIcon() }}</span>\r\n </div>\r\n\r\n <div class=\"dialog-header\">\r\n <h2 class=\"dialog-title\">{{ title }}</h2>\r\n </div>\r\n\r\n <div class=\"dialog-content\">\r\n <p class=\"dialog-message\">{{ message }}</p>\r\n </div>\r\n\r\n <div class=\"dialog-footer\">\r\n <button class=\"btn btn-cancel\" (click)=\"cancel()\">\r\n {{ cancelText }}\r\n </button>\r\n <button class=\"btn btn-confirm\" [class]=\"'btn-' + variant\" (click)=\"confirm()\">\r\n {{ confirmText }}\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".confirmation-dialog-container{position:fixed;inset:0;z-index:10000;display:flex;align-items:center;justify-content:center;padding:16px}.dialog-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.5);animation:fadeIn .2s ease}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.dialog-panel{position:relative;background:white;border-radius:20px;box-shadow:0 25px 50px -12px #00000040;max-width:500px;width:100%;padding:32px;animation:scaleIn .3s cubic-bezier(.4,0,.2,1)}@keyframes scaleIn{0%{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}.dialog-icon{display:flex;align-items:center;justify-content:center;margin-bottom:24px}.dialog-icon .icon-emoji{font-size:64px;animation:bounceIn .5s cubic-bezier(.68,-.55,.265,1.55)}@keyframes bounceIn{0%{transform:scale(0)}50%{transform:scale(1.1)}to{transform:scale(1)}}.dialog-header{margin-bottom:16px;text-align:center}.dialog-title{font-size:28px;font-weight:800;color:#1f2937;margin:0}.dialog-content{margin-bottom:32px;text-align:center}.dialog-message{font-size:16px;line-height:1.6;color:#6b7280;margin:0}.dialog-footer{display:flex;gap:12px;justify-content:flex-end}.btn{padding:12px 24px;border:none;border-radius:12px;font-size:16px;font-weight:600;cursor:pointer;transition:all .3s ease;outline:none}.btn:active{transform:scale(.95)}.btn-cancel{background:#f3f4f6;color:#6b7280}.btn-cancel:hover{background:#e5e7eb;color:#374151}.btn-confirm{color:#fff;min-width:120px}.btn-info{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);box-shadow:0 4px 12px #667eea66}.btn-info:hover{box-shadow:0 6px 16px #667eea80;transform:translateY(-2px)}.btn-success{background:linear-gradient(135deg,#10b981 0%,#059669 100%);box-shadow:0 4px 12px #10b98166}.btn-success:hover{box-shadow:0 6px 16px #10b98180;transform:translateY(-2px)}.btn-warning{background:linear-gradient(135deg,#f59e0b 0%,#d97706 100%);box-shadow:0 4px 12px #f59e0b66}.btn-warning:hover{box-shadow:0 6px 16px #f59e0b80;transform:translateY(-2px)}.btn-danger{background:linear-gradient(135deg,#ef4444 0%,#dc2626 100%);box-shadow:0 4px 12px #ef444466}.btn-danger:hover{box-shadow:0 6px 16px #ef444480;transform:translateY(-2px)}.variant-danger{border-top:4px solid #ef4444}.variant-warning{border-top:4px solid #f59e0b}.variant-success{border-top:4px solid #10b981}.variant-info{border-top:4px solid #667eea}@media (max-width: 640px){.dialog-panel{padding:24px}.dialog-icon .icon-emoji{font-size:48px}.dialog-title{font-size:24px}.dialog-message{font-size:14px}.dialog-footer{flex-direction:column-reverse}.dialog-footer .btn{width:100%}}\n"] }]
|
|
115
|
+
}], ctorParameters: function () { return [{ type: ConfirmationDialogService }]; }, propDecorators: { title: [{
|
|
116
|
+
type: Input
|
|
117
|
+
}], message: [{
|
|
118
|
+
type: Input
|
|
119
|
+
}], variant: [{
|
|
120
|
+
type: Input
|
|
121
|
+
}], confirmText: [{
|
|
122
|
+
type: Input
|
|
123
|
+
}], cancelText: [{
|
|
124
|
+
type: Input
|
|
125
|
+
}], icon: [{
|
|
126
|
+
type: Input
|
|
127
|
+
}], isOpen: [{
|
|
128
|
+
type: Input
|
|
129
|
+
}], confirmed: [{
|
|
130
|
+
type: Output
|
|
131
|
+
}], cancelled: [{
|
|
132
|
+
type: Output
|
|
133
|
+
}], closed: [{
|
|
134
|
+
type: Output
|
|
135
|
+
}], onEscapeKey: [{
|
|
136
|
+
type: HostListener,
|
|
137
|
+
args: ['document:keydown.escape']
|
|
138
|
+
}] } });
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Generated bundle index. Do not edit.
|
|
142
|
+
*/
|
|
143
|
+
|
|
144
|
+
export { ConfirmationDialogComponent, ConfirmationDialogService };
|
|
145
|
+
//# sourceMappingURL=muxima-ui-confirmation-dialog.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"muxima-ui-confirmation-dialog.mjs","sources":["../../../../overlay/confirmation-dialog/src/lib/confirmation-dialog/confirmation-dialog.service.ts","../../../../overlay/confirmation-dialog/src/lib/confirmation-dialog/confirmation-dialog.component.ts","../../../../overlay/confirmation-dialog/src/lib/confirmation-dialog/confirmation-dialog.component.html","../../../../overlay/confirmation-dialog/src/muxima-ui-confirmation-dialog.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\nimport { Subject } from 'rxjs';\r\n\r\nexport type ConfirmationVariant = 'info' | 'warning' | 'danger' | 'success';\r\n\r\nexport interface ConfirmationConfig {\r\n title: string;\r\n message: string;\r\n variant?: ConfirmationVariant;\r\n confirmText?: string;\r\n cancelText?: string;\r\n icon?: string;\r\n}\r\n\r\nexport interface ConfirmationResult {\r\n confirmed: boolean;\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ConfirmationDialogService {\r\n private openDialogSubject = new Subject<ConfirmationConfig>();\r\n private dialogResultSubject = new Subject<ConfirmationResult>();\r\n\r\n openDialog$ = this.openDialogSubject.asObservable();\r\n dialogResult$ = this.dialogResultSubject.asObservable();\r\n\r\n confirm(config: ConfirmationConfig): Promise<boolean> {\r\n return new Promise((resolve) => {\r\n this.openDialogSubject.next(config);\r\n\r\n const subscription = this.dialogResult$.subscribe((result) => {\r\n resolve(result.confirmed);\r\n subscription.unsubscribe();\r\n });\r\n });\r\n }\r\n\r\n sendResult(confirmed: boolean): void {\r\n this.dialogResultSubject.next({ confirmed });\r\n }\r\n}\r\n","import { Component, EventEmitter, HostListener, Input, OnDestroy, OnInit, Output } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ConfirmationDialogService, ConfirmationConfig, ConfirmationVariant } from './confirmation-dialog.service';\r\nimport { Subscription } from 'rxjs';\r\n\r\n@Component({\r\n selector: 'muxima-confirmation-dialog',\r\n standalone: true,\r\n imports: [CommonModule],\r\n templateUrl: './confirmation-dialog.component.html',\r\n styleUrls: ['./confirmation-dialog.component.scss']\r\n})\r\nexport class ConfirmationDialogComponent implements OnInit, OnDestroy {\r\n @Input() title = 'Confirmar Ação';\r\n @Input() message = 'Tem certeza que deseja realizar esta ação?';\r\n @Input() variant: ConfirmationVariant = 'info';\r\n @Input() confirmText = 'Confirmar';\r\n @Input() cancelText = 'Cancelar';\r\n @Input() icon?: string;\r\n @Input() isOpen = false;\r\n \r\n @Output() confirmed = new EventEmitter<void>();\r\n @Output() cancelled = new EventEmitter<void>();\r\n @Output() closed = new EventEmitter<void>();\r\n \r\n private subscription?: Subscription;\r\n\r\n constructor(private confirmationService: ConfirmationDialogService) {}\r\n\r\n ngOnInit(): void {\r\n this.subscription = this.confirmationService.openDialog$.subscribe((config) => {\r\n this.applyConfig(config);\r\n this.open();\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.subscription?.unsubscribe();\r\n }\r\n\r\n @HostListener('document:keydown.escape')\r\n onEscapeKey(): void {\r\n if (this.isOpen) {\r\n this.cancel();\r\n }\r\n }\r\n\r\n open(): void {\r\n this.isOpen = true;\r\n document.body.style.overflow = 'hidden';\r\n }\r\n\r\n close(): void {\r\n this.isOpen = false;\r\n this.closed.emit();\r\n document.body.style.overflow = '';\r\n }\r\n\r\n confirm(): void {\r\n this.confirmed.emit();\r\n this.confirmationService.sendResult(true);\r\n this.close();\r\n }\r\n\r\n cancel(): void {\r\n this.cancelled.emit();\r\n this.confirmationService.sendResult(false);\r\n this.close();\r\n }\r\n\r\n private applyConfig(config: ConfirmationConfig): void {\r\n this.title = config.title;\r\n this.message = config.message;\r\n if (config.variant) this.variant = config.variant;\r\n if (config.confirmText) this.confirmText = config.confirmText;\r\n if (config.cancelText) this.cancelText = config.cancelText;\r\n if (config.icon) this.icon = config.icon;\r\n }\r\n\r\n getVariantIcon(): string {\r\n if (this.icon) return this.icon;\r\n \r\n switch (this.variant) {\r\n case 'danger':\r\n return '⚠️';\r\n case 'warning':\r\n return '⚡';\r\n case 'success':\r\n return '✅';\r\n case 'info':\r\n default:\r\n return 'ℹ️';\r\n }\r\n }\r\n}\r\n","<div class=\"confirmation-dialog-container\" *ngIf=\"isOpen\">\r\n <div class=\"dialog-backdrop\" (click)=\"cancel()\"></div>\r\n\r\n <div class=\"dialog-panel\" [class]=\"'variant-' + variant\">\r\n <div class=\"dialog-icon\">\r\n <span class=\"icon-emoji\">{{ getVariantIcon() }}</span>\r\n </div>\r\n\r\n <div class=\"dialog-header\">\r\n <h2 class=\"dialog-title\">{{ title }}</h2>\r\n </div>\r\n\r\n <div class=\"dialog-content\">\r\n <p class=\"dialog-message\">{{ message }}</p>\r\n </div>\r\n\r\n <div class=\"dialog-footer\">\r\n <button class=\"btn btn-cancel\" (click)=\"cancel()\">\r\n {{ cancelText }}\r\n </button>\r\n <button class=\"btn btn-confirm\" [class]=\"'btn-' + variant\" (click)=\"confirm()\">\r\n {{ confirmText }}\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.ConfirmationDialogService"],"mappings":";;;;;;MAqBa,yBAAyB,CAAA;AAHtC,IAAA,WAAA,GAAA;AAIU,QAAA,IAAA,CAAA,iBAAiB,GAAG,IAAI,OAAO,EAAsB,CAAC;AACtD,QAAA,IAAA,CAAA,mBAAmB,GAAG,IAAI,OAAO,EAAsB,CAAC;AAEhE,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,CAAC;AACpD,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,CAAC,mBAAmB,CAAC,YAAY,EAAE,CAAC;AAgBzD,KAAA;AAdC,IAAA,OAAO,CAAC,MAA0B,EAAA;AAChC,QAAA,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,KAAI;AAC7B,YAAA,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAEpC,MAAM,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,MAAM,KAAI;AAC3D,gBAAA,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;gBAC1B,YAAY,CAAC,WAAW,EAAE,CAAC;AAC7B,aAAC,CAAC,CAAC;AACL,SAAC,CAAC,CAAC;KACJ;AAED,IAAA,UAAU,CAAC,SAAkB,EAAA;QAC3B,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;KAC9C;;uHApBU,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAzB,yBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA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AA;4FAIX,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBAPvC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,4BAA4B,EAC1B,UAAA,EAAA,IAAI,EACP,OAAA,EAAA,CAAC,YAAY,CAAC,EAAA,QAAA,EAAA,o2BAAA,EAAA,MAAA,EAAA,CAAA,4gFAAA,CAAA,EAAA,CAAA;6GAKd,KAAK,EAAA,CAAA;sBAAb,KAAK;gBACG,OAAO,EAAA,CAAA;sBAAf,KAAK;gBACG,OAAO,EAAA,CAAA;sBAAf,KAAK;gBACG,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBACG,UAAU,EAAA,CAAA;sBAAlB,KAAK;gBACG,IAAI,EAAA,CAAA;sBAAZ,KAAK;gBACG,MAAM,EAAA,CAAA;sBAAd,KAAK;gBAEI,SAAS,EAAA,CAAA;sBAAlB,MAAM;gBACG,SAAS,EAAA,CAAA;sBAAlB,MAAM;gBACG,MAAM,EAAA,CAAA;sBAAf,MAAM;gBAkBP,WAAW,EAAA,CAAA;sBADV,YAAY;uBAAC,yBAAyB,CAAA;;;AExCzC;;AAEG;;;;"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { ConfirmationDialogService, ConfirmationVariant } from './confirmation-dialog.service';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ConfirmationDialogComponent implements OnInit, OnDestroy {
|
|
5
|
+
private confirmationService;
|
|
6
|
+
title: string;
|
|
7
|
+
message: string;
|
|
8
|
+
variant: ConfirmationVariant;
|
|
9
|
+
confirmText: string;
|
|
10
|
+
cancelText: string;
|
|
11
|
+
icon?: string;
|
|
12
|
+
isOpen: boolean;
|
|
13
|
+
confirmed: EventEmitter<void>;
|
|
14
|
+
cancelled: EventEmitter<void>;
|
|
15
|
+
closed: EventEmitter<void>;
|
|
16
|
+
private subscription?;
|
|
17
|
+
constructor(confirmationService: ConfirmationDialogService);
|
|
18
|
+
ngOnInit(): void;
|
|
19
|
+
ngOnDestroy(): void;
|
|
20
|
+
onEscapeKey(): void;
|
|
21
|
+
open(): void;
|
|
22
|
+
close(): void;
|
|
23
|
+
confirm(): void;
|
|
24
|
+
cancel(): void;
|
|
25
|
+
private applyConfig;
|
|
26
|
+
getVariantIcon(): string;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmationDialogComponent, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ConfirmationDialogComponent, "muxima-confirmation-dialog", never, { "title": "title"; "message": "message"; "variant": "variant"; "confirmText": "confirmText"; "cancelText": "cancelText"; "icon": "icon"; "isOpen": "isOpen"; }, { "confirmed": "confirmed"; "cancelled": "cancelled"; "closed": "closed"; }, never, never, true, never>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export type ConfirmationVariant = 'info' | 'warning' | 'danger' | 'success';
|
|
3
|
+
export interface ConfirmationConfig {
|
|
4
|
+
title: string;
|
|
5
|
+
message: string;
|
|
6
|
+
variant?: ConfirmationVariant;
|
|
7
|
+
confirmText?: string;
|
|
8
|
+
cancelText?: string;
|
|
9
|
+
icon?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ConfirmationResult {
|
|
12
|
+
confirmed: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare class ConfirmationDialogService {
|
|
15
|
+
private openDialogSubject;
|
|
16
|
+
private dialogResultSubject;
|
|
17
|
+
openDialog$: import("rxjs").Observable<ConfirmationConfig>;
|
|
18
|
+
dialogResult$: import("rxjs").Observable<ConfirmationResult>;
|
|
19
|
+
confirm(config: ConfirmationConfig): Promise<boolean>;
|
|
20
|
+
sendResult(confirmed: boolean): void;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmationDialogService, never>;
|
|
22
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ConfirmationDialogService>;
|
|
23
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@muxima-ui/confirmation-dialog",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Confirmation dialog component for Angular 18+ - Muxima UI",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"angular",
|
|
7
|
+
"confirmation",
|
|
8
|
+
"dialog",
|
|
9
|
+
"confirm",
|
|
10
|
+
"alert",
|
|
11
|
+
"overlay",
|
|
12
|
+
"muxima-ui"
|
|
13
|
+
],
|
|
14
|
+
"author": "Muxima UI Team (jokerscript)",
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/Aldemiro20/muxima-ui.git",
|
|
19
|
+
"directory": "packages/overlay/confirmation-dialog"
|
|
20
|
+
},
|
|
21
|
+
"homepage": "https://muxima-ui.vercel.app/components/confirmation-dialog",
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/Aldemiro20/muxima-ui/issues"
|
|
24
|
+
},
|
|
25
|
+
"documentation": "https://muxima-ui.vercel.app",
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"@angular/common": "^18.0.0",
|
|
31
|
+
"@angular/core": "^18.0.0"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"tslib": "^2.3.0"
|
|
35
|
+
},
|
|
36
|
+
"sideEffects": false,
|
|
37
|
+
"module": "fesm2015/muxima-ui-confirmation-dialog.mjs",
|
|
38
|
+
"es2020": "fesm2020/muxima-ui-confirmation-dialog.mjs",
|
|
39
|
+
"esm2020": "esm2020/muxima-ui-confirmation-dialog.mjs",
|
|
40
|
+
"fesm2020": "fesm2020/muxima-ui-confirmation-dialog.mjs",
|
|
41
|
+
"fesm2015": "fesm2015/muxima-ui-confirmation-dialog.mjs",
|
|
42
|
+
"typings": "index.d.ts",
|
|
43
|
+
"exports": {
|
|
44
|
+
"./package.json": {
|
|
45
|
+
"default": "./package.json"
|
|
46
|
+
},
|
|
47
|
+
".": {
|
|
48
|
+
"types": "./index.d.ts",
|
|
49
|
+
"esm2020": "./esm2020/muxima-ui-confirmation-dialog.mjs",
|
|
50
|
+
"es2020": "./fesm2020/muxima-ui-confirmation-dialog.mjs",
|
|
51
|
+
"es2015": "./fesm2015/muxima-ui-confirmation-dialog.mjs",
|
|
52
|
+
"node": "./fesm2015/muxima-ui-confirmation-dialog.mjs",
|
|
53
|
+
"default": "./fesm2020/muxima-ui-confirmation-dialog.mjs"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|