zek 16.0.8 → 16.0.10
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/esm2022/lib/models/alert-type.mjs +2 -12
- package/esm2022/lib/modules/alert/alert/alert.mjs +7 -16
- package/esm2022/lib/modules/alert/toast/toast.mjs +8 -9
- package/esm2022/lib/modules/alert/validation/validation.mjs +4 -34
- package/esm2022/lib/services/alert.service.mjs +5 -6
- package/esm2022/lib/services/http-error-handler.service.mjs +2 -3
- package/esm2022/lib/utils/bootstrap.helper.mjs +23 -26
- package/fesm2022/zek.mjs +209 -260
- package/fesm2022/zek.mjs.map +1 -1
- package/lib/models/alert-type.d.ts +1 -10
- package/lib/modules/alert/alert/alert.d.ts +3 -2
- package/lib/modules/alert/validation/validation.d.ts +1 -1
- package/lib/utils/bootstrap.helper.d.ts +0 -1
- package/package.json +1 -1
package/fesm2022/zek.mjs
CHANGED
|
@@ -151,50 +151,6 @@ class BitwiseHelper {
|
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
var AlertType;
|
|
155
|
-
(function (AlertType) {
|
|
156
|
-
AlertType[AlertType["Primary"] = 1] = "Primary";
|
|
157
|
-
AlertType[AlertType["Secondary"] = 2] = "Secondary";
|
|
158
|
-
AlertType[AlertType["Success"] = 3] = "Success";
|
|
159
|
-
AlertType[AlertType["Danger"] = 4] = "Danger";
|
|
160
|
-
AlertType[AlertType["Warning"] = 5] = "Warning";
|
|
161
|
-
AlertType[AlertType["Info"] = 6] = "Info";
|
|
162
|
-
AlertType[AlertType["Light"] = 7] = "Light";
|
|
163
|
-
AlertType[AlertType["Dark"] = 8] = "Dark";
|
|
164
|
-
})(AlertType || (AlertType = {}));
|
|
165
|
-
|
|
166
|
-
class StringHelper {
|
|
167
|
-
static firstUpper(v) {
|
|
168
|
-
if (!v || v.length < 1)
|
|
169
|
-
return v;
|
|
170
|
-
return v.charAt(0).toUpperCase() + v.slice(1);
|
|
171
|
-
}
|
|
172
|
-
static isNullOrEmpty(value) {
|
|
173
|
-
return typeof value === 'undefined' || value == null || ((typeof value === 'string') && value.length === 0);
|
|
174
|
-
}
|
|
175
|
-
static isNullOrWhiteSpace(value) {
|
|
176
|
-
return typeof value === 'undefined' || value == null || ((typeof value === 'string') && value.trim().length === 0);
|
|
177
|
-
}
|
|
178
|
-
static tryTrim(val) {
|
|
179
|
-
if (val === undefined || val === null) {
|
|
180
|
-
return val;
|
|
181
|
-
}
|
|
182
|
-
return val.trim();
|
|
183
|
-
}
|
|
184
|
-
static ifNullEmpty(value) {
|
|
185
|
-
return typeof value === 'undefined' || value == null ? '' : value;
|
|
186
|
-
}
|
|
187
|
-
static join(val, separator, part) {
|
|
188
|
-
if (this.isNullOrEmpty(val)) {
|
|
189
|
-
return part;
|
|
190
|
-
}
|
|
191
|
-
if (this.isNullOrEmpty(part)) {
|
|
192
|
-
return val;
|
|
193
|
-
}
|
|
194
|
-
return val + separator + part;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
154
|
var ComponentType;
|
|
199
155
|
(function (ComponentType) {
|
|
200
156
|
ComponentType[ComponentType["Primary"] = 1] = "Primary";
|
|
@@ -271,34 +227,33 @@ class BootstrapHelper {
|
|
|
271
227
|
return 'btn-secondary';
|
|
272
228
|
}
|
|
273
229
|
}
|
|
274
|
-
static getAlertType(type) {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
}
|
|
230
|
+
// static getAlertType(type?: string | null): AlertType | null {
|
|
231
|
+
// if (!type) return null;
|
|
232
|
+
// let v = StringHelper.firstUpper(type);
|
|
233
|
+
// if (!v)
|
|
234
|
+
// return null;
|
|
235
|
+
// var enumValue = (<any>AlertType)[v];
|
|
236
|
+
// if (!enumValue)
|
|
237
|
+
// return null;
|
|
238
|
+
// return enumValue;
|
|
239
|
+
// }
|
|
285
240
|
static cssAlert(type) {
|
|
286
241
|
switch (type) {
|
|
287
|
-
case
|
|
242
|
+
case 'primary':
|
|
288
243
|
return 'alert-primary';
|
|
289
|
-
case
|
|
244
|
+
case 'secondary':
|
|
290
245
|
return 'alert-secondary';
|
|
291
|
-
case
|
|
246
|
+
case 'success':
|
|
292
247
|
return 'alert-success';
|
|
293
|
-
case
|
|
248
|
+
case 'danger':
|
|
294
249
|
return 'alert-danger';
|
|
295
|
-
case
|
|
250
|
+
case 'warning':
|
|
296
251
|
return 'alert-warning';
|
|
297
|
-
case
|
|
252
|
+
case 'info':
|
|
298
253
|
return 'alert-info';
|
|
299
|
-
case
|
|
254
|
+
case 'light':
|
|
300
255
|
return 'alert-light';
|
|
301
|
-
case
|
|
256
|
+
case 'dark':
|
|
302
257
|
return 'alert-dark';
|
|
303
258
|
default:
|
|
304
259
|
return 'alert-secondary';
|
|
@@ -306,13 +261,13 @@ class BootstrapHelper {
|
|
|
306
261
|
}
|
|
307
262
|
static cssAlertIcon(type) {
|
|
308
263
|
switch (type) {
|
|
309
|
-
case
|
|
264
|
+
case 'success':
|
|
310
265
|
return 'fa-solid fa-circle-check';
|
|
311
|
-
case
|
|
266
|
+
case 'danger':
|
|
312
267
|
return 'fa-solid fa-circle-xmark';
|
|
313
|
-
case
|
|
268
|
+
case 'warning':
|
|
314
269
|
return 'fa-solid fa-circle-exclamation';
|
|
315
|
-
case
|
|
270
|
+
case 'info':
|
|
316
271
|
return 'fa-solid fa-circle-info';
|
|
317
272
|
default:
|
|
318
273
|
return '';
|
|
@@ -1049,6 +1004,38 @@ class StorageHelper {
|
|
|
1049
1004
|
}
|
|
1050
1005
|
}
|
|
1051
1006
|
|
|
1007
|
+
class StringHelper {
|
|
1008
|
+
static firstUpper(v) {
|
|
1009
|
+
if (!v || v.length < 1)
|
|
1010
|
+
return v;
|
|
1011
|
+
return v.charAt(0).toUpperCase() + v.slice(1);
|
|
1012
|
+
}
|
|
1013
|
+
static isNullOrEmpty(value) {
|
|
1014
|
+
return typeof value === 'undefined' || value == null || ((typeof value === 'string') && value.length === 0);
|
|
1015
|
+
}
|
|
1016
|
+
static isNullOrWhiteSpace(value) {
|
|
1017
|
+
return typeof value === 'undefined' || value == null || ((typeof value === 'string') && value.trim().length === 0);
|
|
1018
|
+
}
|
|
1019
|
+
static tryTrim(val) {
|
|
1020
|
+
if (val === undefined || val === null) {
|
|
1021
|
+
return val;
|
|
1022
|
+
}
|
|
1023
|
+
return val.trim();
|
|
1024
|
+
}
|
|
1025
|
+
static ifNullEmpty(value) {
|
|
1026
|
+
return typeof value === 'undefined' || value == null ? '' : value;
|
|
1027
|
+
}
|
|
1028
|
+
static join(val, separator, part) {
|
|
1029
|
+
if (this.isNullOrEmpty(val)) {
|
|
1030
|
+
return part;
|
|
1031
|
+
}
|
|
1032
|
+
if (this.isNullOrEmpty(part)) {
|
|
1033
|
+
return val;
|
|
1034
|
+
}
|
|
1035
|
+
return val + separator + part;
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1052
1039
|
var firstBy = (function () {
|
|
1053
1040
|
function identity(v) { return v; }
|
|
1054
1041
|
function ignoreCase(v) { return typeof (v) === "string" ? v.toLowerCase() : v; }
|
|
@@ -1397,140 +1384,6 @@ class CrudService extends BaseService {
|
|
|
1397
1384
|
}
|
|
1398
1385
|
}
|
|
1399
1386
|
|
|
1400
|
-
class EditBase {
|
|
1401
|
-
}
|
|
1402
|
-
|
|
1403
|
-
class FileBase {
|
|
1404
|
-
}
|
|
1405
|
-
class FileString extends FileBase {
|
|
1406
|
-
constructor(init) {
|
|
1407
|
-
super();
|
|
1408
|
-
if (init) {
|
|
1409
|
-
Object.assign(this, init);
|
|
1410
|
-
}
|
|
1411
|
-
}
|
|
1412
|
-
}
|
|
1413
|
-
class FileBytes extends FileBase {
|
|
1414
|
-
//data: byte[];
|
|
1415
|
-
constructor(init) {
|
|
1416
|
-
super();
|
|
1417
|
-
if (init) {
|
|
1418
|
-
Object.assign(this, init);
|
|
1419
|
-
}
|
|
1420
|
-
}
|
|
1421
|
-
}
|
|
1422
|
-
|
|
1423
|
-
class FilterBase {
|
|
1424
|
-
constructor() {
|
|
1425
|
-
this.id = null;
|
|
1426
|
-
this.isDeleted = null;
|
|
1427
|
-
this.quickSearch = null;
|
|
1428
|
-
this.page = 1;
|
|
1429
|
-
this.pageSize = 10;
|
|
1430
|
-
this.sort = null;
|
|
1431
|
-
this.asc = false;
|
|
1432
|
-
}
|
|
1433
|
-
}
|
|
1434
|
-
|
|
1435
|
-
var Gender;
|
|
1436
|
-
(function (Gender) {
|
|
1437
|
-
Gender[Gender["Male"] = 1] = "Male";
|
|
1438
|
-
Gender[Gender["Female"] = 2] = "Female";
|
|
1439
|
-
})(Gender || (Gender = {}));
|
|
1440
|
-
|
|
1441
|
-
class KeyPair {
|
|
1442
|
-
constructor(init) {
|
|
1443
|
-
if (init) {
|
|
1444
|
-
Object.assign(this, init);
|
|
1445
|
-
}
|
|
1446
|
-
}
|
|
1447
|
-
}
|
|
1448
|
-
class KeyPairEx extends KeyPair {
|
|
1449
|
-
}
|
|
1450
|
-
class KeyPairChecked extends KeyPair {
|
|
1451
|
-
}
|
|
1452
|
-
class KeyPairRequired extends KeyPair {
|
|
1453
|
-
}
|
|
1454
|
-
|
|
1455
|
-
class ListBase {
|
|
1456
|
-
}
|
|
1457
|
-
|
|
1458
|
-
var Month;
|
|
1459
|
-
(function (Month) {
|
|
1460
|
-
Month[Month["January"] = 1] = "January";
|
|
1461
|
-
Month[Month["February"] = 2] = "February";
|
|
1462
|
-
Month[Month["March"] = 3] = "March";
|
|
1463
|
-
Month[Month["April"] = 4] = "April";
|
|
1464
|
-
Month[Month["May"] = 5] = "May";
|
|
1465
|
-
Month[Month["June"] = 6] = "June";
|
|
1466
|
-
Month[Month["July"] = 7] = "July";
|
|
1467
|
-
Month[Month["August"] = 8] = "August";
|
|
1468
|
-
Month[Month["September"] = 9] = "September";
|
|
1469
|
-
Month[Month["October"] = 10] = "October";
|
|
1470
|
-
Month[Month["November"] = 11] = "November";
|
|
1471
|
-
Month[Month["December"] = 12] = "December";
|
|
1472
|
-
})(Month || (Month = {}));
|
|
1473
|
-
|
|
1474
|
-
class PagerBase {
|
|
1475
|
-
constructor() {
|
|
1476
|
-
this.totalItemCount = 0;
|
|
1477
|
-
}
|
|
1478
|
-
}
|
|
1479
|
-
class Pager extends PagerBase {
|
|
1480
|
-
constructor() {
|
|
1481
|
-
super(...arguments);
|
|
1482
|
-
this.pageCount = 1;
|
|
1483
|
-
this.pageNumber = 1;
|
|
1484
|
-
this.pageSize = 25;
|
|
1485
|
-
this.hasPreviousPage = false;
|
|
1486
|
-
this.hasNextPage = false;
|
|
1487
|
-
this.isFirstPage = false;
|
|
1488
|
-
this.isLastPage = false;
|
|
1489
|
-
this.firstItemOnPage = 0;
|
|
1490
|
-
this.lastItemOnPage = 0;
|
|
1491
|
-
this.pages = [];
|
|
1492
|
-
}
|
|
1493
|
-
}
|
|
1494
|
-
class PagedListBase {
|
|
1495
|
-
constructor() {
|
|
1496
|
-
this.data = [];
|
|
1497
|
-
this.pager = new Pager();
|
|
1498
|
-
this.totalItemCount = 0;
|
|
1499
|
-
this.pageNumber = 1;
|
|
1500
|
-
this.pageSize = 25;
|
|
1501
|
-
this.count = 0;
|
|
1502
|
-
}
|
|
1503
|
-
}
|
|
1504
|
-
class PagedList extends PagedListBase {
|
|
1505
|
-
constructor() {
|
|
1506
|
-
super(...arguments);
|
|
1507
|
-
this.pageCount = 1;
|
|
1508
|
-
this.hasPreviousPage = false;
|
|
1509
|
-
this.hasNextPage = false;
|
|
1510
|
-
this.isFirstPage = false;
|
|
1511
|
-
this.isLastPage = false;
|
|
1512
|
-
this.firstItemOnPage = 0;
|
|
1513
|
-
this.lastItemOnPage = 0;
|
|
1514
|
-
}
|
|
1515
|
-
}
|
|
1516
|
-
|
|
1517
|
-
var PrintType;
|
|
1518
|
-
(function (PrintType) {
|
|
1519
|
-
PrintType[PrintType["Show"] = 1] = "Show";
|
|
1520
|
-
PrintType[PrintType["Pdf"] = 2] = "Pdf";
|
|
1521
|
-
})(PrintType || (PrintType = {}));
|
|
1522
|
-
|
|
1523
|
-
class Tree extends KeyPair {
|
|
1524
|
-
}
|
|
1525
|
-
|
|
1526
|
-
class ValidEventArgs {
|
|
1527
|
-
constructor() {
|
|
1528
|
-
this.valid = true;
|
|
1529
|
-
}
|
|
1530
|
-
}
|
|
1531
|
-
|
|
1532
|
-
//export * from './';
|
|
1533
|
-
|
|
1534
1387
|
class BaseAlert {
|
|
1535
1388
|
}
|
|
1536
1389
|
class Alert extends BaseAlert {
|
|
@@ -1576,16 +1429,16 @@ class AlertService {
|
|
|
1576
1429
|
return this.toastSubject.asObservable();
|
|
1577
1430
|
}
|
|
1578
1431
|
success(message, title, icon) {
|
|
1579
|
-
this.show(message, title,
|
|
1432
|
+
this.show(message, title, 'success', icon);
|
|
1580
1433
|
}
|
|
1581
1434
|
error(message, title, icon) {
|
|
1582
|
-
this.show(message, title,
|
|
1435
|
+
this.show(message, title, 'danger', icon);
|
|
1583
1436
|
}
|
|
1584
1437
|
warning(message, title, icon) {
|
|
1585
|
-
this.show(message, title,
|
|
1438
|
+
this.show(message, title, 'warning', icon);
|
|
1586
1439
|
}
|
|
1587
1440
|
info(message, title, icon) {
|
|
1588
|
-
this.show(message, title,
|
|
1441
|
+
this.show(message, title, 'info', icon);
|
|
1589
1442
|
}
|
|
1590
1443
|
show(message, title, alertType, icon) {
|
|
1591
1444
|
if (!icon) {
|
|
@@ -1703,7 +1556,7 @@ class HttpErrorHandler {
|
|
|
1703
1556
|
}
|
|
1704
1557
|
}
|
|
1705
1558
|
}
|
|
1706
|
-
this.alert.addRange(
|
|
1559
|
+
this.alert.addRange('danger', errorMessages);
|
|
1707
1560
|
}
|
|
1708
1561
|
break;
|
|
1709
1562
|
case 401: //Unauthorized
|
|
@@ -1890,6 +1743,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImpor
|
|
|
1890
1743
|
type: NgModule
|
|
1891
1744
|
}] });
|
|
1892
1745
|
|
|
1746
|
+
var PrintType;
|
|
1747
|
+
(function (PrintType) {
|
|
1748
|
+
PrintType[PrintType["Show"] = 1] = "Show";
|
|
1749
|
+
PrintType[PrintType["Pdf"] = 2] = "Pdf";
|
|
1750
|
+
})(PrintType || (PrintType = {}));
|
|
1751
|
+
|
|
1893
1752
|
class CoreComponent {
|
|
1894
1753
|
constructor() {
|
|
1895
1754
|
this.loading = false;
|
|
@@ -2431,6 +2290,134 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImpor
|
|
|
2431
2290
|
type: Directive
|
|
2432
2291
|
}], ctorParameters: function () { return [{ type: undefined }, { type: undefined }, { type: i1$1.TranslateService }, { type: AlertService }, { type: i1.ActivatedRoute }, { type: i1.Router }]; } });
|
|
2433
2292
|
|
|
2293
|
+
class EditBase {
|
|
2294
|
+
}
|
|
2295
|
+
|
|
2296
|
+
class FileBase {
|
|
2297
|
+
}
|
|
2298
|
+
class FileString extends FileBase {
|
|
2299
|
+
constructor(init) {
|
|
2300
|
+
super();
|
|
2301
|
+
if (init) {
|
|
2302
|
+
Object.assign(this, init);
|
|
2303
|
+
}
|
|
2304
|
+
}
|
|
2305
|
+
}
|
|
2306
|
+
class FileBytes extends FileBase {
|
|
2307
|
+
//data: byte[];
|
|
2308
|
+
constructor(init) {
|
|
2309
|
+
super();
|
|
2310
|
+
if (init) {
|
|
2311
|
+
Object.assign(this, init);
|
|
2312
|
+
}
|
|
2313
|
+
}
|
|
2314
|
+
}
|
|
2315
|
+
|
|
2316
|
+
class FilterBase {
|
|
2317
|
+
constructor() {
|
|
2318
|
+
this.id = null;
|
|
2319
|
+
this.isDeleted = null;
|
|
2320
|
+
this.quickSearch = null;
|
|
2321
|
+
this.page = 1;
|
|
2322
|
+
this.pageSize = 10;
|
|
2323
|
+
this.sort = null;
|
|
2324
|
+
this.asc = false;
|
|
2325
|
+
}
|
|
2326
|
+
}
|
|
2327
|
+
|
|
2328
|
+
var Gender;
|
|
2329
|
+
(function (Gender) {
|
|
2330
|
+
Gender[Gender["Male"] = 1] = "Male";
|
|
2331
|
+
Gender[Gender["Female"] = 2] = "Female";
|
|
2332
|
+
})(Gender || (Gender = {}));
|
|
2333
|
+
|
|
2334
|
+
class KeyPair {
|
|
2335
|
+
constructor(init) {
|
|
2336
|
+
if (init) {
|
|
2337
|
+
Object.assign(this, init);
|
|
2338
|
+
}
|
|
2339
|
+
}
|
|
2340
|
+
}
|
|
2341
|
+
class KeyPairEx extends KeyPair {
|
|
2342
|
+
}
|
|
2343
|
+
class KeyPairChecked extends KeyPair {
|
|
2344
|
+
}
|
|
2345
|
+
class KeyPairRequired extends KeyPair {
|
|
2346
|
+
}
|
|
2347
|
+
|
|
2348
|
+
class ListBase {
|
|
2349
|
+
}
|
|
2350
|
+
|
|
2351
|
+
var Month;
|
|
2352
|
+
(function (Month) {
|
|
2353
|
+
Month[Month["January"] = 1] = "January";
|
|
2354
|
+
Month[Month["February"] = 2] = "February";
|
|
2355
|
+
Month[Month["March"] = 3] = "March";
|
|
2356
|
+
Month[Month["April"] = 4] = "April";
|
|
2357
|
+
Month[Month["May"] = 5] = "May";
|
|
2358
|
+
Month[Month["June"] = 6] = "June";
|
|
2359
|
+
Month[Month["July"] = 7] = "July";
|
|
2360
|
+
Month[Month["August"] = 8] = "August";
|
|
2361
|
+
Month[Month["September"] = 9] = "September";
|
|
2362
|
+
Month[Month["October"] = 10] = "October";
|
|
2363
|
+
Month[Month["November"] = 11] = "November";
|
|
2364
|
+
Month[Month["December"] = 12] = "December";
|
|
2365
|
+
})(Month || (Month = {}));
|
|
2366
|
+
|
|
2367
|
+
class PagerBase {
|
|
2368
|
+
constructor() {
|
|
2369
|
+
this.totalItemCount = 0;
|
|
2370
|
+
}
|
|
2371
|
+
}
|
|
2372
|
+
class Pager extends PagerBase {
|
|
2373
|
+
constructor() {
|
|
2374
|
+
super(...arguments);
|
|
2375
|
+
this.pageCount = 1;
|
|
2376
|
+
this.pageNumber = 1;
|
|
2377
|
+
this.pageSize = 25;
|
|
2378
|
+
this.hasPreviousPage = false;
|
|
2379
|
+
this.hasNextPage = false;
|
|
2380
|
+
this.isFirstPage = false;
|
|
2381
|
+
this.isLastPage = false;
|
|
2382
|
+
this.firstItemOnPage = 0;
|
|
2383
|
+
this.lastItemOnPage = 0;
|
|
2384
|
+
this.pages = [];
|
|
2385
|
+
}
|
|
2386
|
+
}
|
|
2387
|
+
class PagedListBase {
|
|
2388
|
+
constructor() {
|
|
2389
|
+
this.data = [];
|
|
2390
|
+
this.pager = new Pager();
|
|
2391
|
+
this.totalItemCount = 0;
|
|
2392
|
+
this.pageNumber = 1;
|
|
2393
|
+
this.pageSize = 25;
|
|
2394
|
+
this.count = 0;
|
|
2395
|
+
}
|
|
2396
|
+
}
|
|
2397
|
+
class PagedList extends PagedListBase {
|
|
2398
|
+
constructor() {
|
|
2399
|
+
super(...arguments);
|
|
2400
|
+
this.pageCount = 1;
|
|
2401
|
+
this.hasPreviousPage = false;
|
|
2402
|
+
this.hasNextPage = false;
|
|
2403
|
+
this.isFirstPage = false;
|
|
2404
|
+
this.isLastPage = false;
|
|
2405
|
+
this.firstItemOnPage = 0;
|
|
2406
|
+
this.lastItemOnPage = 0;
|
|
2407
|
+
}
|
|
2408
|
+
}
|
|
2409
|
+
|
|
2410
|
+
class Tree extends KeyPair {
|
|
2411
|
+
}
|
|
2412
|
+
|
|
2413
|
+
class ValidEventArgs {
|
|
2414
|
+
constructor() {
|
|
2415
|
+
this.valid = true;
|
|
2416
|
+
}
|
|
2417
|
+
}
|
|
2418
|
+
|
|
2419
|
+
//export * from './';
|
|
2420
|
+
|
|
2434
2421
|
// declare let bootstrap: any;
|
|
2435
2422
|
class ListBaseComponent extends BaseComponent {
|
|
2436
2423
|
constructor(service, translate, alert, route, router) {
|
|
@@ -2718,7 +2705,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImpor
|
|
|
2718
2705
|
|
|
2719
2706
|
class ZekAlert {
|
|
2720
2707
|
constructor() {
|
|
2721
|
-
this._type =
|
|
2708
|
+
this._type = 'info';
|
|
2722
2709
|
this._showClose = true;
|
|
2723
2710
|
this.cssAlert = '';
|
|
2724
2711
|
this.cssIcon = '';
|
|
@@ -2729,19 +2716,7 @@ class ZekAlert {
|
|
|
2729
2716
|
set type(v) {
|
|
2730
2717
|
if (v !== this._type) {
|
|
2731
2718
|
this._type = v;
|
|
2732
|
-
this.
|
|
2733
|
-
this.cssIcon = '';
|
|
2734
|
-
if (typeof v === 'string') {
|
|
2735
|
-
let enumValue = BootstrapHelper.getAlertType(v);
|
|
2736
|
-
if (enumValue) {
|
|
2737
|
-
this.cssAlert = BootstrapHelper.cssAlert(enumValue);
|
|
2738
|
-
this.cssIcon = BootstrapHelper.cssAlertIcon(enumValue);
|
|
2739
|
-
}
|
|
2740
|
-
}
|
|
2741
|
-
else {
|
|
2742
|
-
this.cssAlert = BootstrapHelper.cssAlert(v);
|
|
2743
|
-
this.cssIcon = BootstrapHelper.cssAlertIcon(v);
|
|
2744
|
-
}
|
|
2719
|
+
this.init();
|
|
2745
2720
|
}
|
|
2746
2721
|
}
|
|
2747
2722
|
get showClose() {
|
|
@@ -2750,6 +2725,10 @@ class ZekAlert {
|
|
|
2750
2725
|
set showClose(v) {
|
|
2751
2726
|
this._showClose = Convert.toBooleanProperty(v);
|
|
2752
2727
|
}
|
|
2728
|
+
init() {
|
|
2729
|
+
this.cssAlert = BootstrapHelper.cssAlert(this._type);
|
|
2730
|
+
this.cssIcon = BootstrapHelper.cssAlertIcon(this._type);
|
|
2731
|
+
}
|
|
2753
2732
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ZekAlert, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2754
2733
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: ZekAlert, selector: "zek-alert", inputs: { type: "type", showClose: "showClose", title: "title" }, ngImport: i0, template: "<div class=\"alert {{cssAlert}} alert-dismissible fade show\" role=\"alert\">\r\n <button *ngIf=\"_showClose\" type=\"button\" class=\"btn-close\" data-bs-dismiss=\"alert\" aria-label=\"Close\"></button>\r\n <div class=\"row\">\r\n <div class=\"col-auto pe-1\" *ngIf=\"cssIcon\">\r\n <span class=\"flex-shrink-0\"><i class=\"{{cssIcon}}\"></i></span>\r\n </div>\r\n <div class=\"col-auto\">\r\n <div *ngIf=\"title\">\r\n <h5 class=\"alert-heading\">{{title}}</h5>\r\n </div>\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
2755
2734
|
}
|
|
@@ -2834,33 +2813,33 @@ class ZekToast {
|
|
|
2834
2813
|
}
|
|
2835
2814
|
var v = toast;
|
|
2836
2815
|
switch (toast.type) {
|
|
2837
|
-
case
|
|
2816
|
+
case 'primary':
|
|
2838
2817
|
v.css = 'bg-primary text-white';
|
|
2839
2818
|
break;
|
|
2840
|
-
case
|
|
2819
|
+
case 'success':
|
|
2841
2820
|
v.css = 'bg-success text-white';
|
|
2842
2821
|
// v.iconColor = 'text--accent-green';
|
|
2843
2822
|
// v.borderColor = 'border--accent-green';
|
|
2844
2823
|
break;
|
|
2845
|
-
case
|
|
2824
|
+
case 'danger':
|
|
2846
2825
|
v.css = 'bg-danger text-white';
|
|
2847
2826
|
// v.iconColor = 'text--accent-red';
|
|
2848
2827
|
// v.borderColor = 'border--accent-red';
|
|
2849
2828
|
break;
|
|
2850
|
-
case
|
|
2829
|
+
case 'warning':
|
|
2851
2830
|
v.css = 'bg-warning text-dark';
|
|
2852
2831
|
// v.iconColor = 'text--accent-yellow';
|
|
2853
2832
|
// v.borderColor = 'border--accent-yellow';
|
|
2854
2833
|
break;
|
|
2855
|
-
case
|
|
2834
|
+
case 'info':
|
|
2856
2835
|
v.css = 'bg-info text-white';
|
|
2857
2836
|
// v.iconColor = 'text--accent-blue';
|
|
2858
2837
|
// v.borderColor = 'border--accent-blue';
|
|
2859
2838
|
break;
|
|
2860
|
-
case
|
|
2839
|
+
case 'light':
|
|
2861
2840
|
v.css = 'bg-light text-dark';
|
|
2862
2841
|
break;
|
|
2863
|
-
case
|
|
2842
|
+
case 'dark':
|
|
2864
2843
|
v.css = 'bg-dark text-white';
|
|
2865
2844
|
break;
|
|
2866
2845
|
default:
|
|
@@ -2914,43 +2893,13 @@ class ZekValidation {
|
|
|
2914
2893
|
if (!alert.type) {
|
|
2915
2894
|
return;
|
|
2916
2895
|
}
|
|
2917
|
-
|
|
2918
|
-
case AlertType.Success:
|
|
2919
|
-
return 'fa-solid fa-check';
|
|
2920
|
-
case AlertType.Danger:
|
|
2921
|
-
case AlertType.Warning:
|
|
2922
|
-
return 'fa-solid fa-triangle-exclamation';
|
|
2923
|
-
case AlertType.Info:
|
|
2924
|
-
return 'fa-solid fa-circle-info';
|
|
2925
|
-
default:
|
|
2926
|
-
return;
|
|
2927
|
-
}
|
|
2896
|
+
return BootstrapHelper.cssAlertIcon(alert.type);
|
|
2928
2897
|
}
|
|
2929
2898
|
cssAlert(alert) {
|
|
2930
2899
|
if (!alert) {
|
|
2931
2900
|
return;
|
|
2932
2901
|
}
|
|
2933
|
-
|
|
2934
|
-
switch (alert.type) {
|
|
2935
|
-
case AlertType.Primary:
|
|
2936
|
-
return 'alert-primary';
|
|
2937
|
-
case AlertType.Secondary:
|
|
2938
|
-
return 'alert-secondary';
|
|
2939
|
-
case AlertType.Success:
|
|
2940
|
-
return 'alert-success';
|
|
2941
|
-
case AlertType.Danger:
|
|
2942
|
-
return 'alert-danger';
|
|
2943
|
-
case AlertType.Warning:
|
|
2944
|
-
return 'alert-warning';
|
|
2945
|
-
case AlertType.Info:
|
|
2946
|
-
return 'alert-info';
|
|
2947
|
-
case AlertType.Light:
|
|
2948
|
-
return 'alert-light';
|
|
2949
|
-
case AlertType.Dark:
|
|
2950
|
-
return 'alert-dark';
|
|
2951
|
-
default:
|
|
2952
|
-
return 'alert-secondary';
|
|
2953
|
-
}
|
|
2902
|
+
return BootstrapHelper.cssAlert(alert.type);
|
|
2954
2903
|
}
|
|
2955
2904
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ZekValidation, deps: [{ token: AlertService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2956
2905
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: ZekValidation, selector: "zek-validation", ngImport: i0, template: "<div *ngFor=\"let alert of alerts\" class=\"alert {{ cssAlert(alert) }} alert-dismissible fade show mt-3\" role=\"alert\">\r\n <button (click)=\"remove(alert)\" type=\"button\" class=\"btn-close\" aria-label=\"Close\"></button>\r\n <div *ngFor=\"let message of alert.messages\">\r\n <i *ngIf=\"cssIcon(alert)\" class=\"{{ cssIcon(alert) }}\"></i>\r\n {{message}}\r\n </div>\r\n <ng-content></ng-content>\r\n</div>", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
@@ -6664,5 +6613,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImpor
|
|
|
6664
6613
|
* Generated bundle index. Do not edit.
|
|
6665
6614
|
*/
|
|
6666
6615
|
|
|
6667
|
-
export { API_BASE_URL, AgeModule, AgePipe, Alert, AlertModule, AlertService,
|
|
6616
|
+
export { API_BASE_URL, AgeModule, AgePipe, Alert, AlertModule, AlertService, AppBaseModule, ArrayHelper, AuthGuardService, AuthService, AutoCompleteDirective, AutoCompleteModule, Base64Helper, BaseAlert, BaseComponent, BaseService, BitwiseHelper, BootstrapHelper, ButtonBrowseComponent, ButtonBrowseModalBaseComponent, ButtonBrowseModalToolbarComponent, ButtonBrowseModule, CallbackModule, CallbackPipe, CardComponent, CardModule, Color, ComponentType, Convert, CoreComponent, CoreUiComponent, CrudService, CssHelper, CustomHttpParamEncoder, DATE_FORMAT, DateAgoModule, DateAgoPipe, DateHelper, DateValueAccessor, DatepickerModule, EditBase, EditBaseComponent, EditComponent, EditFormComponent, EditToolbarComponent, EditToolbarModule, FileBase, FileBytes, FileHelper, FileModule, FileSizePipe, FileString, FileViewerModule, FilterBase, FilterHelper, Gender, GridToolbarBarComponent, GridToolbarComponent, GridToolbarModule, HtmlHelper, HttpErrorHandler, KeyPair, KeyPairChecked, KeyPairEx, KeyPairRequired, LANGUAGE, ListBase, ListBaseComponent, ListToolbarComponent, ListToolbarModule, MathHelper, Month, ObjectHelper, OverlapHelper, PageTitleComponent, PageTitleModule, PagedList, PagedListBase, Pager, PagerBase, PagerHelper, PasswordComponent, PasswordModule, PeriodRelation, PrintType, ProgressModule, RECAPTCHA_SITE_KEY, RadioComponent, RadioModule, RandomHelper, RangeValidator, ReCaptchaService, ReadOnlyDirective, ReadOnlyModule, RecaptchaModule, SafeModule, SafePipe, Select2Component, Select2Module, SortButtonGroupComponent, SortDirective, SortModule, StorageHelper, StringHelper, TimeHelper, TimeModule, TimePipe, TimerService, Toast, Tree, UrlHelper, ValidEventArgs, ValidationHelper, ValidatorModule, Validators, ValidatorsModule, WebApiClient, WebApiModule, WizardComponent, WizardComponent2, WizardModule, ZekAlert, ZekApproveModal, ZekDeleteModal, ZekDisapproveModal, ZekFieldValidator, ZekFileViewer, ZekFilterModal, ZekLoading, ZekLoadingModule, ZekModal, ZekModalModule, ZekPager, ZekPagerModule, ZekProgress, ZekRestoreModal, ZekSelect2Multiple, ZekSelect2MultipleModule, ZekSelectModule, ZekSelectMultiple, ZekSubmitModal, ZekSumModal, ZekToast, ZekValidation, firstBy, handler, nullValidator, rangeValidator };
|
|
6668
6617
|
//# sourceMappingURL=zek.mjs.map
|