ngx-alert-modal 0.0.1
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 +256 -0
- package/esm2022/lib/ngx-alert-modal.component.mjs +65 -0
- package/esm2022/lib/ngx-alert-modal.module.mjs +25 -0
- package/esm2022/lib/ngx-alert-modal.service.mjs +62 -0
- package/esm2022/models/alert-result.mjs +18 -0
- package/esm2022/models/options.mjs +122 -0
- package/esm2022/ngx-alert-modal.mjs +5 -0
- package/esm2022/public-api.mjs +9 -0
- package/fesm2022/ngx-alert-modal.mjs +292 -0
- package/fesm2022/ngx-alert-modal.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/ngx-alert-modal.component.d.ts +21 -0
- package/lib/ngx-alert-modal.module.d.ts +8 -0
- package/lib/ngx-alert-modal.service.d.ts +20 -0
- package/models/alert-result.d.ts +26 -0
- package/models/options.d.ts +149 -0
- package/package.json +25 -0
- package/public-api.d.ts +5 -0
package/README.md
ADDED
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
# NgxAlertModal
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
Simple popup modal
|
|
5
|
+
|
|
6
|
+
like sweetalert2 and fix bug show in legacy browser
|
|
7
|
+
|
|
8
|
+
## 📦Demo
|
|
9
|
+
Preview [Demo](https://github.com/angular/angular-cli)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## 🗃️ Install
|
|
13
|
+
- NPM: npm i ngx-alert-modal
|
|
14
|
+
- YARN: yarn add ngx-alert-modal
|
|
15
|
+
|
|
16
|
+
## 🖥️Usage
|
|
17
|
+
Import `NgxAlertModalModule` to your working module
|
|
18
|
+
```
|
|
19
|
+
import { NgxAlertModalModule } from 'ngx-alert-modal';
|
|
20
|
+
|
|
21
|
+
@NgModule({
|
|
22
|
+
imports: [
|
|
23
|
+
NgxAlertModalModule
|
|
24
|
+
]
|
|
25
|
+
})
|
|
26
|
+
export class AppModule { }
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
## 💬For open popup
|
|
30
|
+
```
|
|
31
|
+
import { Component, OnInit } from '@angular/core';
|
|
32
|
+
import { NgxAlertModalService } from 'ngx-alert-modal';
|
|
33
|
+
|
|
34
|
+
@Component({
|
|
35
|
+
selector: 'app-demo',
|
|
36
|
+
templateUrl: './demo.component.html',
|
|
37
|
+
styleUrls: ['./demo.component.scss']
|
|
38
|
+
})
|
|
39
|
+
export class DemoComponent implements OnInit {
|
|
40
|
+
|
|
41
|
+
constructor(
|
|
42
|
+
private alert: NgxAlertModalService
|
|
43
|
+
) { }
|
|
44
|
+
|
|
45
|
+
ngOnInit(): void {
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
openPopup() {
|
|
50
|
+
this.alert.show({
|
|
51
|
+
title: 'Message Title',
|
|
52
|
+
text: 'Description',
|
|
53
|
+
icon: 'warning',
|
|
54
|
+
showConfirmButton: true,
|
|
55
|
+
showCancelButton: true,
|
|
56
|
+
}).then(r => {
|
|
57
|
+
console.log('result=', r);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## ⚙️Options
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
export type AlertIcon = 'success' | 'error' | 'warning' | 'info' | 'question'
|
|
68
|
+
|
|
69
|
+
export class AlertOptions {
|
|
70
|
+
/**
|
|
71
|
+
* The title of the popup
|
|
72
|
+
*
|
|
73
|
+
* @default ''
|
|
74
|
+
*/
|
|
75
|
+
title?: string = '';
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* A description for the popup.
|
|
79
|
+
*
|
|
80
|
+
* @default ''
|
|
81
|
+
*/
|
|
82
|
+
text?: string = '';
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* A HTML description for the popup.
|
|
86
|
+
*
|
|
87
|
+
* [Security] we does NOT sanitize this parameter. It is the developer's responsibility
|
|
88
|
+
* to escape any user input when using the `html` option, so XSS attacks would be prevented.
|
|
89
|
+
*
|
|
90
|
+
* @default ''
|
|
91
|
+
*/
|
|
92
|
+
html?: string | HTMLElement = '';
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Whether or not should show a full screen click-to-dismiss backdrop.
|
|
97
|
+
* Either a boolean value or a css background value (hex, rgb, rgba, url, etc.)
|
|
98
|
+
*
|
|
99
|
+
* @default true
|
|
100
|
+
*/
|
|
101
|
+
backdrop?: boolean = true;
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
icon?: AlertIcon;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Popup width, including paddings (`box-sizing: border-box`).
|
|
108
|
+
*
|
|
109
|
+
* @default undefined
|
|
110
|
+
* @description ❌⚠️NOT Implemented!⚠️❌
|
|
111
|
+
*/
|
|
112
|
+
width?: number | string
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* If set to `false`, the user can't dismiss the popup by clicking outside it.
|
|
117
|
+
*
|
|
118
|
+
* @default true
|
|
119
|
+
*/
|
|
120
|
+
allowOutsideClick?: boolean = true;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* If set to `false`, the user can't dismiss the popup by pressing the Escape key.
|
|
124
|
+
*
|
|
125
|
+
* @default true
|
|
126
|
+
* @description ❌⚠️NOT Implemented!⚠️❌
|
|
127
|
+
*/
|
|
128
|
+
allowEscapeKey?: boolean = true;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* If set to `false`, the user can't confirm the popup by pressing the Enter or Space keys,
|
|
132
|
+
* unless they manually focus the confirm button.
|
|
133
|
+
*
|
|
134
|
+
* @default true
|
|
135
|
+
* @description ❌⚠️NOT Implemented!⚠️❌
|
|
136
|
+
*/
|
|
137
|
+
allowEnterKey?: boolean = true;
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* If set to `false`, the "Confirm" button will not be shown.
|
|
142
|
+
*
|
|
143
|
+
* @default true
|
|
144
|
+
*/
|
|
145
|
+
showConfirmButton?: boolean = true;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* If set to `true`, the "Deny" button will be shown, which the user can click on to deny the popup.
|
|
149
|
+
*
|
|
150
|
+
* @default false
|
|
151
|
+
*/
|
|
152
|
+
showDenyButton?: boolean = false;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* If set to `true`, the "Cancel" button will be shown, which the user can click on to dismiss the popup.
|
|
156
|
+
*
|
|
157
|
+
* @default false
|
|
158
|
+
*/
|
|
159
|
+
showCancelButton?: boolean = true;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Use this to change the text on the "Confirm" button.
|
|
163
|
+
*
|
|
164
|
+
* @default 'OK'
|
|
165
|
+
*/
|
|
166
|
+
confirmButtonText?: string = 'Ok';
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Use this to change the text on the "Confirm" button.
|
|
170
|
+
*
|
|
171
|
+
* @default 'No'
|
|
172
|
+
*/
|
|
173
|
+
denyButtonText?: string = 'No';
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Use this to change the text on the "Cancel" button.
|
|
177
|
+
*
|
|
178
|
+
* @default 'Cancel'
|
|
179
|
+
*/
|
|
180
|
+
cancelButtonText?: string = 'Cancel';
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Use this to change the background color of the "Confirm" button.
|
|
184
|
+
*
|
|
185
|
+
* @default undefined
|
|
186
|
+
* @description ❌⚠️NOT Implemented!⚠️❌
|
|
187
|
+
*/
|
|
188
|
+
confirmButtonColor?: string;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Use this to change the background color of the "Deny" button.
|
|
192
|
+
*
|
|
193
|
+
* @default undefined
|
|
194
|
+
* @description ❌⚠️NOT Implemented!⚠️❌
|
|
195
|
+
*/
|
|
196
|
+
denyButtonColor?: string;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Use this to change the background color of the "Cancel" button.
|
|
200
|
+
*
|
|
201
|
+
* @default undefined
|
|
202
|
+
* @description ❌⚠️NOT Implemented!⚠️❌
|
|
203
|
+
*/
|
|
204
|
+
cancelButtonColor?: string;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Use this to change the `aria-label` for the "Confirm" button.
|
|
208
|
+
*
|
|
209
|
+
* @default ''
|
|
210
|
+
*/
|
|
211
|
+
confirmButtonAriaLabel?: string = '';
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Use this to change the `aria-label` for the "Deny" button.
|
|
215
|
+
*
|
|
216
|
+
* @default ''
|
|
217
|
+
*/
|
|
218
|
+
denyButtonAriaLabel?: string = '';
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Use this to change the `aria-label` for the "Cancel" button.
|
|
222
|
+
*
|
|
223
|
+
* @default ''
|
|
224
|
+
*/
|
|
225
|
+
cancelButtonAriaLabel?: string = '';
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Set to `true` if you want to invert default buttons positions.
|
|
230
|
+
*
|
|
231
|
+
* @default false
|
|
232
|
+
* @description ❌⚠️NOT Implemented!⚠️❌
|
|
233
|
+
*/
|
|
234
|
+
reverseButtons?: boolean = false;
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Set to `true` to show close button.
|
|
240
|
+
*
|
|
241
|
+
* @default false
|
|
242
|
+
*/
|
|
243
|
+
showCloseButton?: boolean = false;
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
containerClass?: string = '';
|
|
247
|
+
}
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
## Author
|
|
252
|
+
💻Mohammadreza samani | FrontEnd Developer
|
|
253
|
+
|
|
254
|
+
[❤️Buy me a coffee 😉](https://www.buymeacoffee.com/mrsamani)
|
|
255
|
+
|
|
256
|
+
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { Subject } from 'rxjs';
|
|
3
|
+
import { DismissReason } from '../models/alert-result';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@angular/common";
|
|
6
|
+
class NgxAlertModalComponent {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.index = 0;
|
|
9
|
+
this._onClose = new Subject();
|
|
10
|
+
this.onClose = this._onClose.asObservable();
|
|
11
|
+
}
|
|
12
|
+
onConfirm() {
|
|
13
|
+
this._onClose.next({
|
|
14
|
+
index: this.index,
|
|
15
|
+
result: {
|
|
16
|
+
isConfirmed: true,
|
|
17
|
+
isDismissed: false,
|
|
18
|
+
isDenied: false,
|
|
19
|
+
dismiss: DismissReason.close,
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
onCancel() {
|
|
24
|
+
this._onClose.next({
|
|
25
|
+
index: this.index,
|
|
26
|
+
result: {
|
|
27
|
+
isConfirmed: false,
|
|
28
|
+
isDismissed: true,
|
|
29
|
+
isDenied: false,
|
|
30
|
+
dismiss: DismissReason.cancel,
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
onDeny() {
|
|
35
|
+
this._onClose.next({
|
|
36
|
+
index: this.index,
|
|
37
|
+
result: {
|
|
38
|
+
isConfirmed: false,
|
|
39
|
+
isDismissed: false,
|
|
40
|
+
isDenied: true,
|
|
41
|
+
dismiss: DismissReason.close,
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
close() {
|
|
46
|
+
this.onCancel();
|
|
47
|
+
}
|
|
48
|
+
onOutSideClick() {
|
|
49
|
+
if (this.options.allowOutsideClick) {
|
|
50
|
+
this.onCancel();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
innerOnClick(ev) {
|
|
54
|
+
ev.preventDefault();
|
|
55
|
+
ev.stopPropagation();
|
|
56
|
+
}
|
|
57
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: NgxAlertModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
58
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.1", type: NgxAlertModalComponent, selector: "lib-ngx-alert-modal", ngImport: i0, template: "<div class=\"ngx-alert-container\" (click)=\"onOutSideClick()\" [ngClass]=\"options.containerClass\"\r\n [class.has-backdrop]=\"options.backdrop\">\r\n <div class=\"ngx-alert-inner\" (click)=\"innerOnClick($event)\">\r\n <div class=\"ngx-alert-header\">\r\n <button class=\"ngx-alert-close\" (click)=\"close()\" *ngIf=\"options.showCloseButton\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\">\r\n <path\r\n d=\"M312.1 375c9.369 9.369 9.369 24.57 0 33.94s-24.57 9.369-33.94 0L160 289.9l-119 119c-9.369 9.369-24.57 9.369-33.94 0s-9.369-24.57 0-33.94L126.1 256L7.027 136.1c-9.369-9.369-9.369-24.57 0-33.94s24.57-9.369 33.94 0L160 222.1l119-119c9.369-9.369 24.57-9.369 33.94 0s9.369 24.57 0 33.94L193.9 256L312.1 375z\" />\r\n </svg>\r\n </button>\r\n </div>\r\n\r\n <!-- --------- icon -------- -->\r\n <ng-container [ngSwitch]=\"options.icon\">\r\n\r\n\r\n <div *ngSwitchCase=\"'success'\" class=\"alert-icon alert-success alert-icon-show\" style=\"display: flex;\">\r\n <div class=\"alert-success-circular-line-left\"></div>\r\n <span class=\"alert-success-line-tip\"></span> <span class=\"alert-success-line-long\"></span>\r\n <div class=\"alert-success-ring\"></div>\r\n <div class=\"alert-success-fix\"></div>\r\n <div class=\"alert-success-circular-line-right\"></div>\r\n </div>\r\n\r\n\r\n <div *ngSwitchCase=\"'error'\" class=\"alert-icon alert-error alert-icon-show\" style=\"display: flex;\">\r\n <span class=\"alert-x-mark\">\r\n <span class=\"alert-x-mark-line-left\"></span>\r\n <span class=\"alert-x-mark-line-right\"></span>\r\n </span>\r\n </div>\r\n\r\n\r\n <div *ngSwitchCase=\"'info'\" class=\"alert-icon alert-info alert-icon-show\" style=\"display: flex;\">\r\n <div class=\"alert-icon-content\">i</div>\r\n </div>\r\n\r\n\r\n <div *ngSwitchCase=\"'question'\" class=\"alert-icon alert-question alert-icon-show\" style=\"display: flex;\">\r\n <div class=\"alert-icon-content\">?</div>\r\n </div>\r\n\r\n\r\n <div *ngSwitchCase=\"'warning'\" class=\"alert-icon alert-warning alert-icon-show\" style=\"display: flex;\">\r\n <div class=\"alert-icon-content\">!</div>\r\n </div>\r\n\r\n\r\n </ng-container>\r\n <!-- --------- /icon -------- -->\r\n\r\n <div class=\"ngx-alert-title\">\r\n {{options.title}}\r\n </div>\r\n <div class=\"ngx-alert-body\">\r\n {{options.text}}\r\n <span [innerHTML]=\"options.html\"></span>\r\n </div>\r\n <div class=\"ngx-alert-footer\">\r\n <button *ngIf=\"options.showConfirmButton\" class=\"btn-confirm\" (click)=\"onConfirm()\"\r\n [attr.aria-label]=\"options.confirmButtonAriaLabel\">\r\n {{options.confirmButtonText}}\r\n </button>\r\n <button *ngIf=\"options.showCancelButton\" class=\"btn-cancel\" (click)=\"onCancel()\"\r\n [attr.aria-label]=\"options.cancelButtonAriaLabel\">\r\n {{options.cancelButtonText}}\r\n </button>\r\n <button *ngIf=\"options.showDenyButton\" class=\"btn-deny\" (click)=\"onDeny()\"\r\n [attr.aria-label]=\"options.denyButtonAriaLabel\">\r\n {{options.denyButtonText}}\r\n </button>\r\n </div>\r\n </div>\r\n\r\n</div>", styles: [".ngx-alert-container{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;z-index:9999}.ngx-alert-container.has-backdrop{background:rgba(0,0,0,.1176470588)}.ngx-alert-container .ngx-alert-inner{background-color:#fff;box-shadow:0 0 36px #00000029;min-width:400px;min-height:150px;border-radius:6px;animation:ShowAlert .3s}.ngx-alert-container .ngx-alert-header{display:flex;align-items:center;font-size:30px;min-height:40px}.ngx-alert-container .ngx-alert-header .ngx-alert-close{background:none;border:none;outline:none;cursor:pointer}.ngx-alert-container .ngx-alert-header .ngx-alert-close svg{width:20px;height:20px}.ngx-alert-container .ngx-alert-body,.ngx-alert-container .ngx-alert-title{padding:15px;text-align:center}.ngx-alert-container .ngx-alert-footer{display:flex;align-items:center;flex-wrap:wrap;padding:15px;gap:6px;justify-content:center}.ngx-alert-container .ngx-alert-footer button{background:none;border:none;background-color:#007bff;color:#fff;padding:8px 15px;border-radius:3px;cursor:pointer}.ngx-alert-container .ngx-alert-footer button.btn-confirm{background-color:#007bff}.ngx-alert-container .ngx-alert-footer button.btn-cancel{background-color:#6e7881}.ngx-alert-container .ngx-alert-footer button.btn-deny{background-color:#dc3741}@keyframes ShowAlert{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}to{transform:scale(1)}}\n", ".alert-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:.5em auto .6em;border:.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;user-select:none}.alert-icon .alert-icon-content{display:flex;align-items:center;font-size:3.75em}.alert-icon.alert-error{border-color:#f27474;color:#f27474}.alert-icon.alert-error .alert-x-mark{position:relative;flex-grow:1}.alert-icon.alert-error [class^=alert-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.alert-icon.alert-error [class^=alert-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.alert-icon.alert-error [class^=alert-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.alert-icon.alert-error.alert-icon-show{animation:alert-animate-error-icon .5s}.alert-icon.alert-error.alert-icon-show .alert-x-mark{animation:alert-animate-error-x-mark .5s}.alert-icon.alert-warning{border-color:#facea8;color:#f8bb86}.alert-icon.alert-warning.alert-icon-show{animation:alert-animate-error-icon .5s}.alert-icon.alert-warning.alert-icon-show .alert-icon-content{animation:alert-animate-i-mark .5s}.alert-icon.alert-info{border-color:#9de0f6;color:#3fc3ee}.alert-icon.alert-info.alert-icon-show{animation:alert-animate-error-icon .5s}.alert-icon.alert-info.alert-icon-show .alert-icon-content{animation:alert-animate-i-mark .8s}.alert-icon.alert-question{border-color:#c9dae1;color:#87adbd}.alert-icon.alert-question.alert-icon-show{animation:alert-animate-error-icon .5s}.alert-icon.alert-question.alert-icon-show .alert-icon-content{animation:alert-animate-question-mark .8s}.alert-icon.alert-success{border-color:#a5dc86;color:#a5dc86}.alert-icon.alert-success [class^=alert-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.alert-icon.alert-success [class^=alert-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.alert-icon.alert-success [class^=alert-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.alert-icon.alert-success .alert-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.alert-icon.alert-success .alert-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.alert-icon.alert-success [class^=alert-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.alert-icon.alert-success [class^=alert-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.alert-icon.alert-success [class^=alert-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.alert-icon.alert-success.alert-icon-show .alert-success-line-tip{animation:alert-animate-success-line-tip .75s}.alert-icon.alert-success.alert-icon-show .alert-success-line-long{animation:alert-animate-success-line-long .75s}.alert-icon.alert-success.alert-icon-show .alert-success-circular-line-right{animation:alert-rotate-success-circular-line 4.25s ease-in}@keyframes alert-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}to{top:1.125em;left:.1875em;width:.75em}}@keyframes alert-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}to{top:.9375em;right:.1875em;width:1.375em}}@keyframes alert-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}to{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes alert-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}to{top:2.375em;right:.5em;width:2.9375em}}@keyframes alert-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}to{transform:rotate(-405deg)}}@keyframes alert-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}to{margin-top:0;transform:scale(1);opacity:1}}@keyframes alert-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}to{transform:rotateX(0);opacity:1}}@keyframes alert-rotate-loading{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes alert-animate-question-mark{0%{transform:rotateY(-360deg)}to{transform:rotateY(0)}}@keyframes alert-animate-i-mark{0%{transform:rotate(45deg);opacity:0}25%{transform:rotate(-25deg);opacity:.4}50%{transform:rotate(15deg);opacity:.8}75%{transform:rotate(-5deg);opacity:1}to{transform:rotateX(0);opacity:1}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }] }); }
|
|
59
|
+
}
|
|
60
|
+
export { NgxAlertModalComponent };
|
|
61
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: NgxAlertModalComponent, decorators: [{
|
|
62
|
+
type: Component,
|
|
63
|
+
args: [{ selector: 'lib-ngx-alert-modal', template: "<div class=\"ngx-alert-container\" (click)=\"onOutSideClick()\" [ngClass]=\"options.containerClass\"\r\n [class.has-backdrop]=\"options.backdrop\">\r\n <div class=\"ngx-alert-inner\" (click)=\"innerOnClick($event)\">\r\n <div class=\"ngx-alert-header\">\r\n <button class=\"ngx-alert-close\" (click)=\"close()\" *ngIf=\"options.showCloseButton\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\">\r\n <path\r\n d=\"M312.1 375c9.369 9.369 9.369 24.57 0 33.94s-24.57 9.369-33.94 0L160 289.9l-119 119c-9.369 9.369-24.57 9.369-33.94 0s-9.369-24.57 0-33.94L126.1 256L7.027 136.1c-9.369-9.369-9.369-24.57 0-33.94s24.57-9.369 33.94 0L160 222.1l119-119c9.369-9.369 24.57-9.369 33.94 0s9.369 24.57 0 33.94L193.9 256L312.1 375z\" />\r\n </svg>\r\n </button>\r\n </div>\r\n\r\n <!-- --------- icon -------- -->\r\n <ng-container [ngSwitch]=\"options.icon\">\r\n\r\n\r\n <div *ngSwitchCase=\"'success'\" class=\"alert-icon alert-success alert-icon-show\" style=\"display: flex;\">\r\n <div class=\"alert-success-circular-line-left\"></div>\r\n <span class=\"alert-success-line-tip\"></span> <span class=\"alert-success-line-long\"></span>\r\n <div class=\"alert-success-ring\"></div>\r\n <div class=\"alert-success-fix\"></div>\r\n <div class=\"alert-success-circular-line-right\"></div>\r\n </div>\r\n\r\n\r\n <div *ngSwitchCase=\"'error'\" class=\"alert-icon alert-error alert-icon-show\" style=\"display: flex;\">\r\n <span class=\"alert-x-mark\">\r\n <span class=\"alert-x-mark-line-left\"></span>\r\n <span class=\"alert-x-mark-line-right\"></span>\r\n </span>\r\n </div>\r\n\r\n\r\n <div *ngSwitchCase=\"'info'\" class=\"alert-icon alert-info alert-icon-show\" style=\"display: flex;\">\r\n <div class=\"alert-icon-content\">i</div>\r\n </div>\r\n\r\n\r\n <div *ngSwitchCase=\"'question'\" class=\"alert-icon alert-question alert-icon-show\" style=\"display: flex;\">\r\n <div class=\"alert-icon-content\">?</div>\r\n </div>\r\n\r\n\r\n <div *ngSwitchCase=\"'warning'\" class=\"alert-icon alert-warning alert-icon-show\" style=\"display: flex;\">\r\n <div class=\"alert-icon-content\">!</div>\r\n </div>\r\n\r\n\r\n </ng-container>\r\n <!-- --------- /icon -------- -->\r\n\r\n <div class=\"ngx-alert-title\">\r\n {{options.title}}\r\n </div>\r\n <div class=\"ngx-alert-body\">\r\n {{options.text}}\r\n <span [innerHTML]=\"options.html\"></span>\r\n </div>\r\n <div class=\"ngx-alert-footer\">\r\n <button *ngIf=\"options.showConfirmButton\" class=\"btn-confirm\" (click)=\"onConfirm()\"\r\n [attr.aria-label]=\"options.confirmButtonAriaLabel\">\r\n {{options.confirmButtonText}}\r\n </button>\r\n <button *ngIf=\"options.showCancelButton\" class=\"btn-cancel\" (click)=\"onCancel()\"\r\n [attr.aria-label]=\"options.cancelButtonAriaLabel\">\r\n {{options.cancelButtonText}}\r\n </button>\r\n <button *ngIf=\"options.showDenyButton\" class=\"btn-deny\" (click)=\"onDeny()\"\r\n [attr.aria-label]=\"options.denyButtonAriaLabel\">\r\n {{options.denyButtonText}}\r\n </button>\r\n </div>\r\n </div>\r\n\r\n</div>", styles: [".ngx-alert-container{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;z-index:9999}.ngx-alert-container.has-backdrop{background:rgba(0,0,0,.1176470588)}.ngx-alert-container .ngx-alert-inner{background-color:#fff;box-shadow:0 0 36px #00000029;min-width:400px;min-height:150px;border-radius:6px;animation:ShowAlert .3s}.ngx-alert-container .ngx-alert-header{display:flex;align-items:center;font-size:30px;min-height:40px}.ngx-alert-container .ngx-alert-header .ngx-alert-close{background:none;border:none;outline:none;cursor:pointer}.ngx-alert-container .ngx-alert-header .ngx-alert-close svg{width:20px;height:20px}.ngx-alert-container .ngx-alert-body,.ngx-alert-container .ngx-alert-title{padding:15px;text-align:center}.ngx-alert-container .ngx-alert-footer{display:flex;align-items:center;flex-wrap:wrap;padding:15px;gap:6px;justify-content:center}.ngx-alert-container .ngx-alert-footer button{background:none;border:none;background-color:#007bff;color:#fff;padding:8px 15px;border-radius:3px;cursor:pointer}.ngx-alert-container .ngx-alert-footer button.btn-confirm{background-color:#007bff}.ngx-alert-container .ngx-alert-footer button.btn-cancel{background-color:#6e7881}.ngx-alert-container .ngx-alert-footer button.btn-deny{background-color:#dc3741}@keyframes ShowAlert{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}to{transform:scale(1)}}\n", ".alert-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:.5em auto .6em;border:.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;user-select:none}.alert-icon .alert-icon-content{display:flex;align-items:center;font-size:3.75em}.alert-icon.alert-error{border-color:#f27474;color:#f27474}.alert-icon.alert-error .alert-x-mark{position:relative;flex-grow:1}.alert-icon.alert-error [class^=alert-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.alert-icon.alert-error [class^=alert-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.alert-icon.alert-error [class^=alert-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.alert-icon.alert-error.alert-icon-show{animation:alert-animate-error-icon .5s}.alert-icon.alert-error.alert-icon-show .alert-x-mark{animation:alert-animate-error-x-mark .5s}.alert-icon.alert-warning{border-color:#facea8;color:#f8bb86}.alert-icon.alert-warning.alert-icon-show{animation:alert-animate-error-icon .5s}.alert-icon.alert-warning.alert-icon-show .alert-icon-content{animation:alert-animate-i-mark .5s}.alert-icon.alert-info{border-color:#9de0f6;color:#3fc3ee}.alert-icon.alert-info.alert-icon-show{animation:alert-animate-error-icon .5s}.alert-icon.alert-info.alert-icon-show .alert-icon-content{animation:alert-animate-i-mark .8s}.alert-icon.alert-question{border-color:#c9dae1;color:#87adbd}.alert-icon.alert-question.alert-icon-show{animation:alert-animate-error-icon .5s}.alert-icon.alert-question.alert-icon-show .alert-icon-content{animation:alert-animate-question-mark .8s}.alert-icon.alert-success{border-color:#a5dc86;color:#a5dc86}.alert-icon.alert-success [class^=alert-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.alert-icon.alert-success [class^=alert-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.alert-icon.alert-success [class^=alert-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.alert-icon.alert-success .alert-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.alert-icon.alert-success .alert-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.alert-icon.alert-success [class^=alert-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.alert-icon.alert-success [class^=alert-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.alert-icon.alert-success [class^=alert-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.alert-icon.alert-success.alert-icon-show .alert-success-line-tip{animation:alert-animate-success-line-tip .75s}.alert-icon.alert-success.alert-icon-show .alert-success-line-long{animation:alert-animate-success-line-long .75s}.alert-icon.alert-success.alert-icon-show .alert-success-circular-line-right{animation:alert-rotate-success-circular-line 4.25s ease-in}@keyframes alert-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}to{top:1.125em;left:.1875em;width:.75em}}@keyframes alert-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}to{top:.9375em;right:.1875em;width:1.375em}}@keyframes alert-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}to{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes alert-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}to{top:2.375em;right:.5em;width:2.9375em}}@keyframes alert-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}to{transform:rotate(-405deg)}}@keyframes alert-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}to{margin-top:0;transform:scale(1);opacity:1}}@keyframes alert-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}to{transform:rotateX(0);opacity:1}}@keyframes alert-rotate-loading{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes alert-animate-question-mark{0%{transform:rotateY(-360deg)}to{transform:rotateY(0)}}@keyframes alert-animate-i-mark{0%{transform:rotate(45deg);opacity:0}25%{transform:rotate(-25deg);opacity:.4}50%{transform:rotate(15deg);opacity:.8}75%{transform:rotate(-5deg);opacity:1}to{transform:rotateX(0);opacity:1}}\n"] }]
|
|
64
|
+
}] });
|
|
65
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWFsZXJ0LW1vZGFsLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1hbGVydC1tb2RhbC9zcmMvbGliL25neC1hbGVydC1tb2RhbC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtYWxlcnQtbW9kYWwvc3JjL2xpYi9uZ3gtYWxlcnQtbW9kYWwuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUUxQyxPQUFPLEVBQWMsT0FBTyxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBQzNDLE9BQU8sRUFBZSxhQUFhLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQzs7O0FBRXBFLE1BS2Esc0JBQXNCO0lBTG5DO1FBT0UsVUFBSyxHQUFHLENBQUMsQ0FBQztRQUVPLGFBQVEsR0FBRyxJQUFJLE9BQU8sRUFBK0MsQ0FBQztRQUNoRixZQUFPLEdBQUcsSUFBSSxDQUFDLFFBQVEsQ0FBQyxZQUFZLEVBQUUsQ0FBQztLQW9EL0M7SUFsREMsU0FBUztRQUNQLElBQUksQ0FBQyxRQUFRLENBQUMsSUFBSSxDQUFDO1lBQ2pCLEtBQUssRUFBRSxJQUFJLENBQUMsS0FBSztZQUNqQixNQUFNLEVBQUU7Z0JBQ04sV0FBVyxFQ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3M9XCJidG4tY2FuY2VsXCIgKGNsaWNrKT1cIm9uQ2FuY2VsKClcIlxyXG4gICAgICAgICAgICAgICAgW2F0dHIuYXJpYS1sYWJlbF09XCJvcHRpb25zLmNhbmNlbEJ1dHRvbkFyaWFMYWJlbFwiPlxyXG4gICAgICAgICAgICAgICAge3tvcHRpb25zLmNhbmNlbEJ1dHRvblRleHR9fVxyXG4gICAgICAgICAgICA8L2J1dHRvbj5cclxuICAgICAgICAgICAgPGJ1dHRvbiAqbmdJZj1cIm9wdGlvbnMuc2hvd0RlbnlCdXR0b25cIiBjbGFzcz1cImJ0bi1kZW55XCIgKGNsaWNrKT1cIm9uRGVueSgpXCJcclxuICAgICAgICAgICAgICAgIFthdHRyLmFyaWEtbGFiZWxdPVwib3B0aW9ucy5kZW55QnV0dG9uQXJpYUxhYmVsXCI+XHJcbiAgICAgICAgICAgICAgICB7e29wdGlvbnMuZGVueUJ1dHRvblRleHR9fVxyXG4gICAgICAgICAgICA8L2J1dHRvbj5cclxuICAgICAgICA8L2Rpdj5cclxuICAgIDwvZGl2PlxyXG5cclxuPC9kaXY+Il19
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { NgxAlertModalComponent } from './ngx-alert-modal.component';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
class NgxAlertModalModule {
|
|
6
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: NgxAlertModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
7
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.1", ngImport: i0, type: NgxAlertModalModule, declarations: [NgxAlertModalComponent], imports: [CommonModule], exports: [NgxAlertModalComponent] }); }
|
|
8
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: NgxAlertModalModule, imports: [CommonModule] }); }
|
|
9
|
+
}
|
|
10
|
+
export { NgxAlertModalModule };
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: NgxAlertModalModule, decorators: [{
|
|
12
|
+
type: NgModule,
|
|
13
|
+
args: [{
|
|
14
|
+
declarations: [
|
|
15
|
+
NgxAlertModalComponent,
|
|
16
|
+
],
|
|
17
|
+
imports: [
|
|
18
|
+
CommonModule
|
|
19
|
+
],
|
|
20
|
+
exports: [
|
|
21
|
+
NgxAlertModalComponent,
|
|
22
|
+
]
|
|
23
|
+
}]
|
|
24
|
+
}] });
|
|
25
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWFsZXJ0LW1vZGFsLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1hbGVydC1tb2RhbC9zcmMvbGliL25neC1hbGVydC1tb2RhbC5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQUUsc0JBQXNCLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUNyRSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7O0FBSS9DLE1BV2EsbUJBQW1COzhHQUFuQixtQkFBbUI7K0dBQW5CLG1CQUFtQixpQkFUNUIsc0JBQXNCLGFBR3RCLFlBQVksYUFHWixzQkFBc0I7K0dBR2IsbUJBQW1CLFlBTjVCLFlBQVk7O1NBTUgsbUJBQW1COzJGQUFuQixtQkFBbUI7a0JBWC9CLFFBQVE7bUJBQUM7b0JBQ1IsWUFBWSxFQUFFO3dCQUNaLHNCQUFzQjtxQkFDdkI7b0JBQ0QsT0FBTyxFQUFFO3dCQUNQLFlBQVk7cUJBQ2I7b0JBQ0QsT0FBTyxFQUFFO3dCQUNQLHNCQUFzQjtxQkFDdkI7aUJBQ0YiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBOZ01vZHVsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuaW1wb3J0IHsgTmd4QWxlcnRNb2RhbENvbXBvbmVudCB9IGZyb20gJy4vbmd4LWFsZXJ0LW1vZGFsLmNvbXBvbmVudCc7XG5pbXBvcnQgeyBDb21tb25Nb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb21tb24nO1xuXG5cblxuQE5nTW9kdWxlKHtcbiAgZGVjbGFyYXRpb25zOiBbXG4gICAgTmd4QWxlcnRNb2RhbENvbXBvbmVudCxcbiAgXSxcbiAgaW1wb3J0czogW1xuICAgIENvbW1vbk1vZHVsZVxuICBdLFxuICBleHBvcnRzOiBbXG4gICAgTmd4QWxlcnRNb2RhbENvbXBvbmVudCxcbiAgXVxufSlcbmV4cG9ydCBjbGFzcyBOZ3hBbGVydE1vZGFsTW9kdWxlIHsgfVxuIl19
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Injectable, } from '@angular/core';
|
|
2
|
+
import { AlertOptions } from '../models/options';
|
|
3
|
+
import { NgxAlertModalComponent } from './ngx-alert-modal.component';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
class NgxAlertModalService {
|
|
6
|
+
constructor(componentFactoryResolver, appRef, injector) {
|
|
7
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
8
|
+
this.appRef = appRef;
|
|
9
|
+
this.injector = injector;
|
|
10
|
+
this.currentAdIndex = -1;
|
|
11
|
+
this.alerts = [];
|
|
12
|
+
this.insertedId = 0;
|
|
13
|
+
}
|
|
14
|
+
show(config) {
|
|
15
|
+
config = { ...(new AlertOptions()), ...config };
|
|
16
|
+
return new Promise((resolve, reject) => {
|
|
17
|
+
const componentFactory = this.componentFactoryResolver.resolveComponentFactory(NgxAlertModalComponent);
|
|
18
|
+
const componentRef = componentFactory.create(this.injector);
|
|
19
|
+
this.appRef.attachView(componentRef.hostView);
|
|
20
|
+
this.appendDialogComponentToBody(componentRef, config);
|
|
21
|
+
componentRef.instance.options = config;
|
|
22
|
+
componentRef.instance.index = this.insertedId;
|
|
23
|
+
componentRef.instance.onClose.subscribe((result) => {
|
|
24
|
+
this.removeDialogComponentFromBody(result.index);
|
|
25
|
+
resolve(result.result);
|
|
26
|
+
});
|
|
27
|
+
this.alerts.push(componentRef);
|
|
28
|
+
this.insertedId++;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
removeDialogComponentFromBody(index) {
|
|
32
|
+
if (this.alerts[index]) {
|
|
33
|
+
this.appRef.detachView(this.alerts[index].hostView);
|
|
34
|
+
this.alerts[index].destroy();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
appendDialogComponentToBody(componentRef, config) {
|
|
38
|
+
const domElem = componentRef.hostView.rootNodes[0];
|
|
39
|
+
if (config.containerClass) {
|
|
40
|
+
for (let c of config.containerClass.split(' ')) {
|
|
41
|
+
if (c.trim())
|
|
42
|
+
domElem.classList.add(c);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
document.body.appendChild(domElem);
|
|
46
|
+
}
|
|
47
|
+
closeAll() {
|
|
48
|
+
for (let i = 0; i < this.alerts.length; i++) {
|
|
49
|
+
this.removeDialogComponentFromBody(i);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: NgxAlertModalService, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ApplicationRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
53
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: NgxAlertModalService, providedIn: 'root' }); }
|
|
54
|
+
}
|
|
55
|
+
export { NgxAlertModalService };
|
|
56
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: NgxAlertModalService, decorators: [{
|
|
57
|
+
type: Injectable,
|
|
58
|
+
args: [{
|
|
59
|
+
providedIn: 'root'
|
|
60
|
+
}]
|
|
61
|
+
}], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.ApplicationRef }, { type: i0.Injector }]; } });
|
|
62
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWFsZXJ0LW1vZGFsLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtYWxlcnQtbW9kYWwvc3JjL2xpYi9uZ3gtYWxlcnQtbW9kYWwuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQ29FLFVBQVUsR0FDcEYsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBQ2pELE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLDZCQUE2QixDQUFDOztBQUlyRSxNQUdhLG9CQUFvQjtJQUkvQixZQUNVLHdCQUFrRCxFQUNsRCxNQUFzQixFQUN0QixRQUFrQjtRQUZsQiw2QkFBd0IsR0FBeEIsd0JBQXdCLENBQTBCO1FBQ2xELFdBQU0sR0FBTixNQUFNLENBQWdCO1FBQ3RCLGFBQVEsR0FBUixRQUFRLENBQVU7UUFONUIsbUJBQWMsR0FBRyxDQUFDLENBQUMsQ0FBQztRQUNwQixXQUFNLEdBQTJDLEVBQUUsQ0FBQztRQUNwRCxlQUFVLEdBQUcsQ0FBQyxDQUFDO0lBS1gsQ0FBQztJQUdFLElBQUksQ0FBQ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ZvaWQge1xuICAgIGlmICh0aGlzLmFsZXJ0c1tpbmRleF0pIHtcbiAgICAgIHRoaXMuYXBwUmVmLmRldGFjaFZpZXcodGhpcy5hbGVydHNbaW5kZXhdLmhvc3RWaWV3KTtcbiAgICAgIHRoaXMuYWxlcnRzW2luZGV4XS5kZXN0cm95KCk7XG4gICAgfVxuICB9XG5cbiAgcHJpdmF0ZSBhcHBlbmREaWFsb2dDb21wb25lbnRUb0JvZHkoY29tcG9uZW50UmVmOiBDb21wb25lbnRSZWY8Tmd4QWxlcnRNb2RhbENvbXBvbmVudD4sIGNvbmZpZzogQWxlcnRPcHRpb25zKSB7XG4gICAgY29uc3QgZG9tRWxlbSA9IChjb21wb25lbnRSZWYuaG9zdFZpZXcgYXMgRW1iZWRkZWRWaWV3UmVmPGFueT4pLnJvb3ROb2Rlc1swXSBhcyBIVE1MRWxlbWVudDtcbiAgICBpZiAoY29uZmlnLmNvbnRhaW5lckNsYXNzKSB7XG4gICAgICBmb3IgKGxldCBjIG9mIGNvbmZpZy5jb250YWluZXJDbGFzcy5zcGxpdCgnICcpKSB7XG4gICAgICAgIGlmIChjLnRyaW0oKSlcbiAgICAgICAgICBkb21FbGVtLmNsYXNzTGlzdC5hZGQoYyk7XG4gICAgICB9XG4gICAgfVxuICAgIGRvY3VtZW50LmJvZHkuYXBwZW5kQ2hpbGQoZG9tRWxlbSk7XG4gIH1cblxuICBjbG9zZUFsbCgpIHtcbiAgICBmb3IgKGxldCBpID0gMDsgaSA8IHRoaXMuYWxlcnRzLmxlbmd0aDsgaSsrKSB7XG4gICAgICB0aGlzLnJlbW92ZURpYWxvZ0NvbXBvbmVudEZyb21Cb2R5KGkpO1xuICAgIH1cbiAgfVxuXG5cblxufVxuIl19
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An enum of possible reasons that can explain an alert dismissal.
|
|
3
|
+
*/
|
|
4
|
+
export var DismissReason;
|
|
5
|
+
(function (DismissReason) {
|
|
6
|
+
DismissReason[DismissReason["cancel"] = 0] = "cancel";
|
|
7
|
+
DismissReason[DismissReason["backdrop"] = 1] = "backdrop";
|
|
8
|
+
DismissReason[DismissReason["close"] = 2] = "close";
|
|
9
|
+
/**
|
|
10
|
+
* @description ❌⚠️NOT Implemented!⚠️❌
|
|
11
|
+
*/
|
|
12
|
+
DismissReason[DismissReason["esc"] = 3] = "esc";
|
|
13
|
+
/**
|
|
14
|
+
* @description ❌⚠️NOT Implemented!⚠️❌
|
|
15
|
+
*/
|
|
16
|
+
DismissReason[DismissReason["timer"] = 4] = "timer";
|
|
17
|
+
})(DismissReason || (DismissReason = {}));
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxlcnQtcmVzdWx0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LWFsZXJ0LW1vZGFsL3NyYy9tb2RlbHMvYWxlcnQtcmVzdWx0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVlBOztHQUVHO0FBQ0gsTUFBTSxDQUFOLElBQVksYUFZWDtBQVpELFdBQVksYUFBYTtJQUNyQixxREFBTSxDQUFBO0lBQ04seURBQVEsQ0FBQTtJQUNSLG1EQUFLLENBQUE7SUFDTDs7SUFFQTtJQUNBLCtDQUFHLENBQUE7SUFDSDs7SUFFQTtJQUNBLG1EQUFLLENBQUE7QUFDVCxDQUFDLEVBWlcsYUFBYSxLQUFiLGFBQWEsUUFZeEIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgaW50ZXJmYWNlIEFsZXJ0UmVzdWx0PFQgPSBhbnk+IHtcclxuICAgIHJlYWRvbmx5IGlzQ29uZmlybWVkOiBib29sZWFuXHJcbiAgICByZWFkb25seSBpc0RlbmllZDogYm9vbGVhblxyXG4gICAgcmVhZG9ubHkgaXNEaXNtaXNzZWQ6IGJvb2xlYW5cclxuICAgIC8qKlxyXG4gICAgICogQGRlc2NyaXB0aW9uIOKdjOKaoO+4j05PVCBJbXBsZW1lbnRlZCHimqDvuI/inYxcclxuICAgICAqL1xyXG4gICAgcmVhZG9ubHkgdmFsdWU/OiBUXHJcbiAgICByZWFkb25seSBkaXNtaXNzPzogRGlzbWlzc1JlYXNvblxyXG59XHJcblxyXG5cclxuLyoqXHJcbiAqIEFuIGVudW0gb2YgcG9zc2libGUgcmVhc29ucyB0aGF0IGNhbiBleHBsYWluIGFuIGFsZXJ0IGRpc21pc3NhbC5cclxuICovXHJcbmV4cG9ydCBlbnVtIERpc21pc3NSZWFzb24ge1xyXG4gICAgY2FuY2VsLFxyXG4gICAgYmFja2Ryb3AsXHJcbiAgICBjbG9zZSxcclxuICAgIC8qKlxyXG4gICogQGRlc2NyaXB0aW9uIOKdjOKaoO+4j05PVCBJbXBsZW1lbnRlZCHimqDvuI/inYxcclxuICAqL1xyXG4gICAgZXNjLFxyXG4gICAgLyoqXHJcbiAgKiBAZGVzY3JpcHRpb24g4p2M4pqg77iPTk9UIEltcGxlbWVudGVkIeKaoO+4j+KdjFxyXG4gICovXHJcbiAgICB0aW1lcixcclxufVxyXG4iXX0=
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
export class AlertOptions {
|
|
2
|
+
constructor() {
|
|
3
|
+
/**
|
|
4
|
+
* The title of the popup
|
|
5
|
+
*
|
|
6
|
+
* @default ''
|
|
7
|
+
*/
|
|
8
|
+
this.title = '';
|
|
9
|
+
/**
|
|
10
|
+
* A description for the popup.
|
|
11
|
+
*
|
|
12
|
+
* @default ''
|
|
13
|
+
*/
|
|
14
|
+
this.text = '';
|
|
15
|
+
/**
|
|
16
|
+
* A HTML description for the popup.
|
|
17
|
+
*
|
|
18
|
+
* [Security] we does NOT sanitize this parameter. It is the developer's responsibility
|
|
19
|
+
* to escape any user input when using the `html` option, so XSS attacks would be prevented.
|
|
20
|
+
*
|
|
21
|
+
* @default ''
|
|
22
|
+
*/
|
|
23
|
+
this.html = '';
|
|
24
|
+
/**
|
|
25
|
+
* Whether or not should show a full screen click-to-dismiss backdrop.
|
|
26
|
+
* Either a boolean value or a css background value (hex, rgb, rgba, url, etc.)
|
|
27
|
+
*
|
|
28
|
+
* @default true
|
|
29
|
+
*/
|
|
30
|
+
this.backdrop = true;
|
|
31
|
+
/**
|
|
32
|
+
* If set to `false`, the user can't dismiss the popup by clicking outside it.
|
|
33
|
+
*
|
|
34
|
+
* @default true
|
|
35
|
+
*/
|
|
36
|
+
this.allowOutsideClick = true;
|
|
37
|
+
/**
|
|
38
|
+
* If set to `false`, the user can't dismiss the popup by pressing the Escape key.
|
|
39
|
+
*
|
|
40
|
+
* @default true
|
|
41
|
+
* @description ❌⚠️NOT Implemented!⚠️❌
|
|
42
|
+
*/
|
|
43
|
+
this.allowEscapeKey = true;
|
|
44
|
+
/**
|
|
45
|
+
* If set to `false`, the user can't confirm the popup by pressing the Enter or Space keys,
|
|
46
|
+
* unless they manually focus the confirm button.
|
|
47
|
+
*
|
|
48
|
+
* @default true
|
|
49
|
+
* @description ❌⚠️NOT Implemented!⚠️❌
|
|
50
|
+
*/
|
|
51
|
+
this.allowEnterKey = true;
|
|
52
|
+
/**
|
|
53
|
+
* If set to `false`, the "Confirm" button will not be shown.
|
|
54
|
+
*
|
|
55
|
+
* @default true
|
|
56
|
+
*/
|
|
57
|
+
this.showConfirmButton = true;
|
|
58
|
+
/**
|
|
59
|
+
* If set to `true`, the "Deny" button will be shown, which the user can click on to deny the popup.
|
|
60
|
+
*
|
|
61
|
+
* @default false
|
|
62
|
+
*/
|
|
63
|
+
this.showDenyButton = false;
|
|
64
|
+
/**
|
|
65
|
+
* If set to `true`, the "Cancel" button will be shown, which the user can click on to dismiss the popup.
|
|
66
|
+
*
|
|
67
|
+
* @default false
|
|
68
|
+
*/
|
|
69
|
+
this.showCancelButton = true;
|
|
70
|
+
/**
|
|
71
|
+
* Use this to change the text on the "Confirm" button.
|
|
72
|
+
*
|
|
73
|
+
* @default 'OK'
|
|
74
|
+
*/
|
|
75
|
+
this.confirmButtonText = 'Ok';
|
|
76
|
+
/**
|
|
77
|
+
* Use this to change the text on the "Confirm" button.
|
|
78
|
+
*
|
|
79
|
+
* @default 'No'
|
|
80
|
+
*/
|
|
81
|
+
this.denyButtonText = 'No';
|
|
82
|
+
/**
|
|
83
|
+
* Use this to change the text on the "Cancel" button.
|
|
84
|
+
*
|
|
85
|
+
* @default 'Cancel'
|
|
86
|
+
*/
|
|
87
|
+
this.cancelButtonText = 'Cancel';
|
|
88
|
+
/**
|
|
89
|
+
* Use this to change the `aria-label` for the "Confirm" button.
|
|
90
|
+
*
|
|
91
|
+
* @default ''
|
|
92
|
+
*/
|
|
93
|
+
this.confirmButtonAriaLabel = '';
|
|
94
|
+
/**
|
|
95
|
+
* Use this to change the `aria-label` for the "Deny" button.
|
|
96
|
+
*
|
|
97
|
+
* @default ''
|
|
98
|
+
*/
|
|
99
|
+
this.denyButtonAriaLabel = '';
|
|
100
|
+
/**
|
|
101
|
+
* Use this to change the `aria-label` for the "Cancel" button.
|
|
102
|
+
*
|
|
103
|
+
* @default ''
|
|
104
|
+
*/
|
|
105
|
+
this.cancelButtonAriaLabel = '';
|
|
106
|
+
/**
|
|
107
|
+
* Set to `true` if you want to invert default buttons positions.
|
|
108
|
+
*
|
|
109
|
+
* @default false
|
|
110
|
+
* @description ❌⚠️NOT Implemented!⚠️❌
|
|
111
|
+
*/
|
|
112
|
+
this.reverseButtons = false;
|
|
113
|
+
/**
|
|
114
|
+
* Set to `true` to show close button.
|
|
115
|
+
*
|
|
116
|
+
* @default false
|
|
117
|
+
*/
|
|
118
|
+
this.showCloseButton = false;
|
|
119
|
+
this.containerClass = '';
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3B0aW9ucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3By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RoZSBcIkRlbnlcIiBidXR0b24uXHJcbiAgICAgKlxyXG4gICAgICogQGRlZmF1bHQgJydcclxuICAgICAqL1xyXG4gICAgZGVueUJ1dHRvbkFyaWFMYWJlbD86IHN0cmluZyA9ICcnO1xyXG5cclxuICAgIC8qKlxyXG4gICAgICogVXNlIHRoaXMgdG8gY2hhbmdlIHRoZSBgYXJpYS1sYWJlbGAgZm9yIHRoZSBcIkNhbmNlbFwiIGJ1dHRvbi5cclxuICAgICAqXHJcbiAgICAgKiBAZGVmYXVsdCAnJ1xyXG4gICAgICovXHJcbiAgICBjYW5jZWxCdXR0b25BcmlhTGFiZWw/OiBzdHJpbmcgPSAnJztcclxuXHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBTZXQgdG8gYHRydWVgIGlmIHlvdSB3YW50IHRvIGludmVydCBkZWZhdWx0IGJ1dHRvbnMgcG9zaXRpb25zLlxyXG4gICAgICpcclxuICAgICAqIEBkZWZhdWx0IGZhbHNlXHJcbiAgICAgKiBAZGVzY3JpcHRpb24g4p2M4pqg77iPTk9UIEltcGxlbWVudGVkIeKaoO+4j+KdjFxyXG4gICAgICovXHJcbiAgICByZXZlcnNlQnV0dG9ucz86IGJvb2xlYW4gPSBmYWxzZTtcclxuXHJcblxyXG5cclxuICAgIC8qKlxyXG4gICAgICogU2V0IHRvIGB0cnVlYCB0byBzaG93IGNsb3NlIGJ1dHRvbi5cclxuICAgICAqXHJcbiAgICAgKiBAZGVmYXVsdCBmYWxzZVxyXG4gICAgICovXHJcbiAgICBzaG93Q2xvc2VCdXR0b24/OiBib29sZWFuID0gZmFsc2U7XHJcblxyXG5cclxuICAgIGNvbnRhaW5lckNsYXNzPzogc3RyaW5nID0gJyc7XHJcbn0iXX0=
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './public-api';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWFsZXJ0LW1vZGFsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vcHJvamVjdHMvbmd4LWFsZXJ0LW1vZGFsL3NyYy9uZ3gtYWxlcnQtbW9kYWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Public API Surface of ngx-alert-modal
|
|
3
|
+
*/
|
|
4
|
+
export * from './lib/ngx-alert-modal.service';
|
|
5
|
+
export * from './lib/ngx-alert-modal.component';
|
|
6
|
+
export * from './lib/ngx-alert-modal.module';
|
|
7
|
+
export * from './models/alert-result';
|
|
8
|
+
export * from './models/options';
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL25neC1hbGVydC1tb2RhbC9zcmMvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsK0JBQStCLENBQUM7QUFDOUMsY0FBYyxpQ0FBaUMsQ0FBQztBQUNoRCxjQUFjLDhCQUE4QixDQUFDO0FBRTdDLGNBQWMsdUJBQXVCLENBQUM7QUFDdEMsY0FBYyxrQkFBa0IsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2Ygbmd4LWFsZXJ0LW1vZGFsXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9saWIvbmd4LWFsZXJ0LW1vZGFsLnNlcnZpY2UnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvbmd4LWFsZXJ0LW1vZGFsLmNvbXBvbmVudCc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9uZ3gtYWxlcnQtbW9kYWwubW9kdWxlJztcblxuZXhwb3J0ICogZnJvbSAnLi9tb2RlbHMvYWxlcnQtcmVzdWx0JztcbmV4cG9ydCAqIGZyb20gJy4vbW9kZWxzL29wdGlvbnMnO1xuXG4iXX0=
|