zek 17.3.34 → 17.3.37
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/components/base.component.mjs +1 -1
- package/esm2022/lib/components/core-ui.component.mjs +5 -5
- package/esm2022/lib/components/core.component.mjs +1 -1
- package/esm2022/lib/components/edit-base.component.mjs +17 -17
- package/esm2022/lib/components/list-base.component.mjs +18 -18
- package/esm2022/lib/modules/age/age.pipe.mjs +2 -2
- package/esm2022/lib/modules/alert/toast/toast.mjs +3 -3
- package/esm2022/lib/modules/bb/bb.component.mjs +2 -2
- package/esm2022/lib/modules/card/card/card.mjs +1 -1
- package/esm2022/lib/modules/datepicker/date-value-accessor.mjs +6 -6
- package/esm2022/lib/modules/file-viewer/file-viewer.mjs +2 -2
- package/esm2022/lib/modules/google-login-button/google-login-button.mjs +2 -2
- package/esm2022/lib/modules/google-login-button/loader.mjs +1 -1
- package/esm2022/lib/modules/modal/modal/modal.component.mjs +5 -5
- package/esm2022/lib/modules/numeric/numeric.directive.mjs +6 -6
- package/esm2022/lib/modules/pager/pager/pager.mjs +1 -1
- package/esm2022/lib/modules/progress/progress.mjs +3 -3
- package/esm2022/lib/modules/radio/radio.mjs +2 -2
- package/esm2022/lib/modules/recaptcha/loader.mjs +3 -3
- package/esm2022/lib/modules/select/select.mjs +5 -5
- package/esm2022/lib/modules/select2/select2.mjs +2 -2
- package/esm2022/lib/modules/select2-multiple/select2-multiple.mjs +3 -3
- package/esm2022/lib/modules/validators/validator.mjs +4 -4
- package/esm2022/lib/modules/wizard/wizard/wizard.mjs +2 -2
- package/esm2022/lib/services/alert.service.mjs +2 -2
- package/esm2022/lib/services/auth-guard.service.mjs +17 -2
- package/esm2022/lib/services/auth.service.mjs +10 -10
- package/esm2022/lib/services/http-error-handler.service.mjs +3 -3
- package/esm2022/lib/services/web.api.mjs +2 -2
- package/esm2022/lib/utils/array-helper.mjs +8 -8
- package/esm2022/lib/utils/bootstrap.helper.mjs +1 -1
- package/esm2022/lib/utils/convert.mjs +2 -2
- package/esm2022/lib/utils/css-helper.mjs +6 -6
- package/esm2022/lib/utils/date-helper.mjs +32 -47
- package/esm2022/lib/utils/error-helper.mjs +3 -3
- package/esm2022/lib/utils/excel-helper.mjs +2 -2
- package/esm2022/lib/utils/file.helper.mjs +4 -4
- package/esm2022/lib/utils/filter-helper.mjs +2 -2
- package/esm2022/lib/utils/handler.mjs +5 -5
- package/esm2022/lib/utils/html-helper.mjs +4 -4
- package/esm2022/lib/utils/jwt-helper.mjs +4 -4
- package/esm2022/lib/utils/math-helper.mjs +1 -3
- package/esm2022/lib/utils/object-helper.mjs +3 -5
- package/esm2022/lib/utils/overlap-helper.mjs +4 -4
- package/esm2022/lib/utils/storage-helper.mjs +3 -3
- package/esm2022/lib/utils/string-helper.mjs +6 -5
- package/esm2022/lib/utils/thenBy.mjs +9 -9
- package/esm2022/lib/utils/time-helper.mjs +12 -13
- package/esm2022/lib/utils/tmp-helper.mjs +2 -2
- package/esm2022/lib/utils/url-helper.mjs +6 -6
- package/fesm2022/zek.mjs +200 -206
- package/fesm2022/zek.mjs.map +1 -1
- package/lib/services/alert.service.d.ts +2 -2
- package/lib/services/auth-guard.service.d.ts +2 -1
- package/lib/utils/bootstrap.helper.d.ts +1 -1
- package/lib/utils/handler.d.ts +1 -1
- package/lib/utils/thenBy.d.ts +1 -1
- package/package.json +1 -1
package/fesm2022/zek.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, InjectionToken, Inject, Directive,
|
|
2
|
+
import { Injectable, inject, InjectionToken, Inject, Directive, Input, EventEmitter, Output, ViewChild, Pipe, Component, forwardRef, NgModule, HostListener, ViewEncapsulation, ChangeDetectionStrategy, Optional } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/router';
|
|
4
|
-
import { NavigationStart, ActivatedRoute,
|
|
4
|
+
import { Router, NavigationStart, ActivatedRoute, RouterModule } from '@angular/router';
|
|
5
5
|
import { BehaviorSubject, Subject, catchError, of, firstValueFrom, timer } from 'rxjs';
|
|
6
6
|
import * as i2 from '@ngx-translate/core';
|
|
7
7
|
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
@@ -26,15 +26,13 @@ class ArrayHelper {
|
|
|
26
26
|
static insert(value, index, v) {
|
|
27
27
|
value.splice(index, 0, v);
|
|
28
28
|
}
|
|
29
|
-
;
|
|
30
29
|
static contains(value, v) {
|
|
31
|
-
for (
|
|
30
|
+
for (let i = 0; i < value.length; i++) {
|
|
32
31
|
if (value[i] === v)
|
|
33
32
|
return true;
|
|
34
33
|
}
|
|
35
34
|
return false;
|
|
36
35
|
}
|
|
37
|
-
;
|
|
38
36
|
static isArray(arg) {
|
|
39
37
|
return Array.isArray(arg) && arg.length > 0;
|
|
40
38
|
}
|
|
@@ -49,9 +47,11 @@ class ArrayHelper {
|
|
|
49
47
|
// return arr;
|
|
50
48
|
// }
|
|
51
49
|
static distinct(source) {
|
|
52
|
-
|
|
50
|
+
const length = source.length;
|
|
51
|
+
const result = [];
|
|
52
|
+
const seen = new Set();
|
|
53
53
|
for (let index = 0; index < length; index++) {
|
|
54
|
-
|
|
54
|
+
const value = source[index];
|
|
55
55
|
if (seen.has(value))
|
|
56
56
|
continue;
|
|
57
57
|
seen.add(value);
|
|
@@ -118,12 +118,12 @@ class ArrayHelper {
|
|
|
118
118
|
static enumToKeyPairBaseArray(value) {
|
|
119
119
|
const keys = Object.keys(value);
|
|
120
120
|
const slice = keys.length / 2;
|
|
121
|
-
|
|
121
|
+
const result = [];
|
|
122
122
|
// for (let i = 0; i < slice; i++) {
|
|
123
123
|
// result.push({ key: +keys[i], value: keys[i + slice] } as T);
|
|
124
124
|
// }
|
|
125
125
|
for (let i = slice; i < keys.length; i++) {
|
|
126
|
-
|
|
126
|
+
const name = keys[i];
|
|
127
127
|
result.push({ key: +value[name], value: name });
|
|
128
128
|
}
|
|
129
129
|
return result;
|
|
@@ -314,7 +314,7 @@ class Convert {
|
|
|
314
314
|
static parseNumber(value) {
|
|
315
315
|
if (typeof value === 'undefined' || value == null || (typeof value === 'string' && value.length === 0))
|
|
316
316
|
return null;
|
|
317
|
-
|
|
317
|
+
const n = Number(value);
|
|
318
318
|
return !isNaN(n) ? n : null;
|
|
319
319
|
}
|
|
320
320
|
static toNumber(value, defaultValue = 0) {
|
|
@@ -336,7 +336,7 @@ class CssHelper {
|
|
|
336
336
|
if (!addClasses || addClasses === '') {
|
|
337
337
|
return clazz;
|
|
338
338
|
}
|
|
339
|
-
|
|
339
|
+
const arr = ArrayHelper.distinct(this.parseClassNames(clazz).concat(this.parseClassNames(addClasses)));
|
|
340
340
|
return Array.isArray(clazz) ? arr : arr.join(' ');
|
|
341
341
|
}
|
|
342
342
|
static removeClass(clazz, removeClasses) {
|
|
@@ -346,11 +346,11 @@ class CssHelper {
|
|
|
346
346
|
if (!removeClasses || removeClasses === '' || removeClasses.length === 0) {
|
|
347
347
|
return clazz;
|
|
348
348
|
}
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
349
|
+
const arrClasses = this.parseClassNames(clazz);
|
|
350
|
+
const arrRemove = this.parseClassNames(removeClasses);
|
|
351
|
+
const arr = [];
|
|
352
352
|
for (var i = 0; i < arrClasses.length; i++) {
|
|
353
|
-
|
|
353
|
+
const val = arrClasses[i];
|
|
354
354
|
if (!ArrayHelper.contains(arrRemove, val)) {
|
|
355
355
|
arr.push(val);
|
|
356
356
|
}
|
|
@@ -407,8 +407,8 @@ class OverlapHelper {
|
|
|
407
407
|
}
|
|
408
408
|
return end2 == end1 ? PeriodRelation.EnclosingEndTouching : PeriodRelation.Enclosing;
|
|
409
409
|
}
|
|
410
|
-
|
|
411
|
-
|
|
410
|
+
const periodContainsMyStart = this.hasInside(start2, end2, start1);
|
|
411
|
+
const periodContainsMyEnd = this.hasInside(start2, end2, end1);
|
|
412
412
|
if (periodContainsMyStart && periodContainsMyEnd) {
|
|
413
413
|
if (start2 == start1) {
|
|
414
414
|
return PeriodRelation.InsideStartTouching;
|
|
@@ -433,7 +433,7 @@ class OverlapHelper {
|
|
|
433
433
|
return this.hasInside(start1, end1, start2) || this.hasInside(start1, end1, end2) || (start2 < start1 && end2 > end1);
|
|
434
434
|
}
|
|
435
435
|
static overlaps(start1, end1, start2, end2) {
|
|
436
|
-
|
|
436
|
+
const relation = this.getRelation(start1, end1, start2, end2);
|
|
437
437
|
return relation != PeriodRelation.After &&
|
|
438
438
|
relation != PeriodRelation.StartTouching &&
|
|
439
439
|
relation != PeriodRelation.EndTouching &&
|
|
@@ -462,27 +462,26 @@ class TimeHelper {
|
|
|
462
462
|
return '';
|
|
463
463
|
}
|
|
464
464
|
static toDate(time) {
|
|
465
|
-
|
|
466
|
-
|
|
465
|
+
const date = new Date(0);
|
|
466
|
+
const tmp = this.parseTime(time);
|
|
467
467
|
if (!tmp)
|
|
468
468
|
return date;
|
|
469
|
-
|
|
469
|
+
const timeDate = new Date('1970-01-01T' + time + 'Z');
|
|
470
470
|
date.setTime(date.getTime() + timeDate.getTime());
|
|
471
471
|
return date;
|
|
472
472
|
}
|
|
473
|
-
;
|
|
474
473
|
static intersects(start1, end1, start2, end2) {
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
474
|
+
const startDate1 = this.toDate(start1);
|
|
475
|
+
const endDate1 = this.toDate(end1);
|
|
476
|
+
const startDate2 = this.toDate(start2);
|
|
477
|
+
const endDate2 = this.toDate(end2);
|
|
479
478
|
return OverlapHelper.intersects(startDate1, endDate1, startDate2, endDate2);
|
|
480
479
|
}
|
|
481
480
|
static overlaps(start1, end1, start2, end2) {
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
481
|
+
const startDate1 = this.toDate(start1);
|
|
482
|
+
const endDate1 = this.toDate(end1);
|
|
483
|
+
const startDate2 = this.toDate(start2);
|
|
484
|
+
const endDate2 = this.toDate(end2);
|
|
486
485
|
return OverlapHelper.overlaps(startDate1, endDate1, startDate2, endDate2);
|
|
487
486
|
}
|
|
488
487
|
}
|
|
@@ -491,10 +490,9 @@ class DateHelper {
|
|
|
491
490
|
static minDate() {
|
|
492
491
|
return new Date(0);
|
|
493
492
|
}
|
|
494
|
-
;
|
|
495
493
|
static equals(value1, value2) {
|
|
496
|
-
|
|
497
|
-
|
|
494
|
+
const val1 = (value1 === undefined || value1 === null) ? null : value1;
|
|
495
|
+
const val2 = (value2 === undefined || value2 === null) ? null : value2;
|
|
498
496
|
if (val1 === val2) {
|
|
499
497
|
return true;
|
|
500
498
|
}
|
|
@@ -504,8 +502,8 @@ class DateHelper {
|
|
|
504
502
|
return val1.getTime() === val2.getTime();
|
|
505
503
|
}
|
|
506
504
|
static getDates(start, end) {
|
|
507
|
-
|
|
508
|
-
|
|
505
|
+
const dates = new Array();
|
|
506
|
+
let date = new Date(start.valueOf());
|
|
509
507
|
while (date <= end) {
|
|
510
508
|
dates.push(new Date(date));
|
|
511
509
|
date = this.addDays(date, 1);
|
|
@@ -513,24 +511,24 @@ class DateHelper {
|
|
|
513
511
|
return dates;
|
|
514
512
|
}
|
|
515
513
|
static dateOnly(value) {
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
514
|
+
const year = value.getFullYear();
|
|
515
|
+
const month = value.getMonth();
|
|
516
|
+
const day = value.getDate();
|
|
517
|
+
const date = new Date(Date.UTC(year, month, day));
|
|
520
518
|
return date;
|
|
521
519
|
}
|
|
522
520
|
static today() {
|
|
523
521
|
return this.dateOnly(new Date());
|
|
524
522
|
}
|
|
525
523
|
static toISODateString(value) {
|
|
526
|
-
|
|
524
|
+
const date = this.parseDate(value);
|
|
527
525
|
if (!date)
|
|
528
526
|
return null;
|
|
529
|
-
|
|
527
|
+
const year = date.getFullYear();
|
|
530
528
|
// Add +1 to month since 0 is January
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
529
|
+
const month = date.getMonth() + 1;
|
|
530
|
+
const day = date.getDate();
|
|
531
|
+
const str = `${year}-${month < 10 ? '0' : ''}${month}-${day < 10 ? '0' : ''}${day}`;
|
|
534
532
|
return str;
|
|
535
533
|
}
|
|
536
534
|
//** Offes seconds ( offsetmin * 60sec * 1000ms) */
|
|
@@ -542,42 +540,39 @@ class DateHelper {
|
|
|
542
540
|
return new Date(utc.getTime() - this._utcDiff);
|
|
543
541
|
}
|
|
544
542
|
static addTime(value, time) {
|
|
545
|
-
|
|
543
|
+
const tmp = TimeHelper.parseTime(time);
|
|
546
544
|
if (!tmp)
|
|
547
545
|
return value;
|
|
548
|
-
|
|
549
|
-
|
|
546
|
+
const timeDate = new Date('1970-01-01T' + time + 'Z');
|
|
547
|
+
const date = value;
|
|
550
548
|
date.setTime(date.getTime() + timeDate.getTime());
|
|
551
549
|
return date;
|
|
552
550
|
}
|
|
553
|
-
;
|
|
554
551
|
static addYears(v, years) {
|
|
555
552
|
if (!years)
|
|
556
553
|
return v;
|
|
557
|
-
|
|
554
|
+
const date = v;
|
|
558
555
|
date.setFullYear(v.getFullYear() + years);
|
|
559
556
|
return date;
|
|
560
557
|
}
|
|
561
558
|
static addMonths(v, months) {
|
|
562
559
|
if (!months)
|
|
563
560
|
return v;
|
|
564
|
-
|
|
561
|
+
const date = v;
|
|
565
562
|
date.setMonth(date.getMonth() + months);
|
|
566
563
|
return date;
|
|
567
564
|
}
|
|
568
|
-
;
|
|
569
565
|
static addDays(v, days) {
|
|
570
566
|
if (!days)
|
|
571
567
|
return v;
|
|
572
|
-
|
|
568
|
+
const date = v;
|
|
573
569
|
date.setDate(date.getDate() + days);
|
|
574
570
|
return date;
|
|
575
571
|
}
|
|
576
|
-
;
|
|
577
572
|
static addHours(v, hours) {
|
|
578
573
|
if (!hours)
|
|
579
574
|
return v;
|
|
580
|
-
|
|
575
|
+
const date = new Date(v);
|
|
581
576
|
//todo need to check if this line needs --> date = new Date(date.getTime());
|
|
582
577
|
date.setHours(date.getHours() + hours);
|
|
583
578
|
return date;
|
|
@@ -585,7 +580,7 @@ class DateHelper {
|
|
|
585
580
|
static addMinutes(v, minutes) {
|
|
586
581
|
if (!minutes)
|
|
587
582
|
return v;
|
|
588
|
-
|
|
583
|
+
const date = new Date(v);
|
|
589
584
|
//todo need to check if this line needs --> date = new Date(date.getTime());
|
|
590
585
|
date.setMinutes(date.getMinutes() + minutes);
|
|
591
586
|
return date;
|
|
@@ -593,76 +588,65 @@ class DateHelper {
|
|
|
593
588
|
static addSeconds(v, seconds) {
|
|
594
589
|
if (!seconds)
|
|
595
590
|
return v;
|
|
596
|
-
|
|
591
|
+
const date = v;
|
|
597
592
|
date.setSeconds(date.getSeconds() + seconds);
|
|
598
593
|
return date;
|
|
599
594
|
}
|
|
600
|
-
;
|
|
601
595
|
static isToday(date) {
|
|
602
|
-
|
|
596
|
+
const today = new Date();
|
|
603
597
|
return this.isSameDate(date, today);
|
|
604
598
|
}
|
|
605
|
-
;
|
|
606
599
|
static clone(date) {
|
|
607
600
|
return new Date(+date);
|
|
608
601
|
}
|
|
609
|
-
;
|
|
610
602
|
static isAnotherMonth(a, b) {
|
|
611
603
|
return b && a.getMonth() !== b.getMonth();
|
|
612
604
|
}
|
|
613
|
-
;
|
|
614
605
|
static isWeekend(v) {
|
|
615
606
|
return v.getDay() === 0 || v.getDay() === 6;
|
|
616
607
|
}
|
|
617
|
-
;
|
|
618
608
|
static isSameDate(a, b) {
|
|
619
609
|
return b && a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
|
620
610
|
}
|
|
621
|
-
;
|
|
622
611
|
static getAge(value, now) {
|
|
623
612
|
if (value === undefined || value === null || value === '' || value !== value)
|
|
624
613
|
return null;
|
|
625
614
|
const date = this.toDate(value);
|
|
626
|
-
|
|
627
|
-
|
|
615
|
+
const nowTime = now ? now.getTime() : Date.now();
|
|
616
|
+
const timeDiff = nowTime - date.getTime();
|
|
628
617
|
return Math.floor((timeDiff / 86400000) / 365.25); //86400000 = (1000 * 60 * 60 * 24) = 1000 millisecond * 60second * 60minute * 24hour
|
|
629
618
|
}
|
|
630
|
-
;
|
|
631
619
|
static subtractMonths(endDate, starDate) {
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
620
|
+
const start = starDate <= endDate ? starDate : endDate;
|
|
621
|
+
const end = starDate <= endDate ? endDate : starDate;
|
|
622
|
+
const plus = starDate <= endDate ? 1 : -1;
|
|
635
623
|
let months = (end.getFullYear() - start.getFullYear()) * 12;
|
|
636
624
|
months -= start.getMonth();
|
|
637
625
|
months += end.getMonth();
|
|
638
626
|
return months * plus;
|
|
639
627
|
}
|
|
640
|
-
;
|
|
641
628
|
static subtractDays(value, date) {
|
|
642
629
|
if (!date)
|
|
643
630
|
return null;
|
|
644
631
|
date = this.toDate(date);
|
|
645
|
-
|
|
632
|
+
const timeDiff = date.getTime() - value.getTime();
|
|
646
633
|
return Math.floor(timeDiff / 86400000); //86400000 = (1000 * 60 * 60 * 24) = 1000 millisecond * 60second * 60minute * 24hour
|
|
647
634
|
}
|
|
648
|
-
;
|
|
649
635
|
static subtractHours(value, date) {
|
|
650
636
|
if (!date)
|
|
651
637
|
return null;
|
|
652
638
|
date = this.toDate(date);
|
|
653
|
-
|
|
639
|
+
const timeDiff = date.getTime() - value.getTime();
|
|
654
640
|
return Math.floor((timeDiff % 86400000) / 3600000);
|
|
655
641
|
}
|
|
656
|
-
;
|
|
657
642
|
static subtractMinutes(value, date) {
|
|
658
643
|
if (!date)
|
|
659
644
|
return null;
|
|
660
645
|
date = this.toDate(date);
|
|
661
|
-
|
|
646
|
+
const timeDiff = date.getTime() - value.getTime();
|
|
662
647
|
//
|
|
663
648
|
return Math.floor(((timeDiff % 86400000) % 3600000) / 60000);
|
|
664
649
|
}
|
|
665
|
-
;
|
|
666
650
|
static { this.ISO8601_DATE_REGEX = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/; }
|
|
667
651
|
// 1 2 3 4 5 6 7 8 9 10 11
|
|
668
652
|
static parseDate(value) {
|
|
@@ -767,10 +751,10 @@ class ErrorHelper {
|
|
|
767
751
|
: error;
|
|
768
752
|
const result = [];
|
|
769
753
|
const properties = Object.keys(errors);
|
|
770
|
-
for (
|
|
754
|
+
for (const property of properties) {
|
|
771
755
|
const messages = errors[property];
|
|
772
756
|
if (messages instanceof Array) {
|
|
773
|
-
for (
|
|
757
|
+
for (const message of messages) {
|
|
774
758
|
result.push({ key: property, value: message });
|
|
775
759
|
}
|
|
776
760
|
}
|
|
@@ -786,7 +770,7 @@ class ExcelHelper {
|
|
|
786
770
|
let dividend = columnNumber;
|
|
787
771
|
let columnName = '';
|
|
788
772
|
while (dividend > 0) {
|
|
789
|
-
|
|
773
|
+
const modulo = Math.floor((dividend - 1) % 26);
|
|
790
774
|
columnName = String.fromCharCode(65 + modulo) + columnName;
|
|
791
775
|
dividend = Math.floor((dividend - modulo) / 26);
|
|
792
776
|
}
|
|
@@ -804,9 +788,9 @@ class FileHelper {
|
|
|
804
788
|
const directorySeparatorChar = '\\';
|
|
805
789
|
const altDirectorySeparatorChar = '/';
|
|
806
790
|
const volumeSeparatorChar = ':';
|
|
807
|
-
|
|
791
|
+
const length = path.length;
|
|
808
792
|
for (let i = length; --i >= 0;) {
|
|
809
|
-
|
|
793
|
+
const ch = path[i];
|
|
810
794
|
if (ch === '.') {
|
|
811
795
|
if (i !== length - 1)
|
|
812
796
|
return path.substring(i, length);
|
|
@@ -826,7 +810,7 @@ class FileHelper {
|
|
|
826
810
|
nav.msSaveOrOpenBlob(blob, fileName);
|
|
827
811
|
}
|
|
828
812
|
else {
|
|
829
|
-
|
|
813
|
+
const a = document.createElement('a');
|
|
830
814
|
a.href = URL.createObjectURL(blob);
|
|
831
815
|
a.download = fileName;
|
|
832
816
|
a.target = '_blank';
|
|
@@ -857,8 +841,8 @@ class ObjectHelper {
|
|
|
857
841
|
return true;
|
|
858
842
|
// if (typeof obj === 'undefined' || obj === null)
|
|
859
843
|
// return true;
|
|
860
|
-
for (
|
|
861
|
-
|
|
844
|
+
for (const prop in obj) {
|
|
845
|
+
const v = obj[prop];
|
|
862
846
|
if (!this.isEmptyValue(v))
|
|
863
847
|
return false;
|
|
864
848
|
// if (typeof (obj[prop]) !== undefined && obj[prop] !== null && obj[prop] !== '') {
|
|
@@ -873,7 +857,6 @@ class ObjectHelper {
|
|
|
873
857
|
static deleteNullKeys(val) {
|
|
874
858
|
this.deleteNullFields(val);
|
|
875
859
|
}
|
|
876
|
-
;
|
|
877
860
|
static deleteNullFields(val) {
|
|
878
861
|
if (!val)
|
|
879
862
|
return;
|
|
@@ -885,7 +868,6 @@ class ObjectHelper {
|
|
|
885
868
|
}
|
|
886
869
|
return val;
|
|
887
870
|
}
|
|
888
|
-
;
|
|
889
871
|
static assignFields(target, source) {
|
|
890
872
|
let t = target;
|
|
891
873
|
let s = source;
|
|
@@ -923,7 +905,7 @@ class FilterHelper {
|
|
|
923
905
|
static isEmpty(obj) {
|
|
924
906
|
if (typeof obj === 'undefined' || obj === null)
|
|
925
907
|
return true;
|
|
926
|
-
|
|
908
|
+
const tmp = Object.assign({}, obj);
|
|
927
909
|
delete tmp.page;
|
|
928
910
|
delete tmp.pageSize;
|
|
929
911
|
delete tmp.sort;
|
|
@@ -931,9 +913,9 @@ class FilterHelper {
|
|
|
931
913
|
}
|
|
932
914
|
}
|
|
933
915
|
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
916
|
+
const handler = (function () {
|
|
917
|
+
let i = 1;
|
|
918
|
+
const listeners = {};
|
|
937
919
|
return {
|
|
938
920
|
addListener: function (element, event, handler, options) {
|
|
939
921
|
element.addEventListener(event, handler, options);
|
|
@@ -947,7 +929,7 @@ var handler = (function () {
|
|
|
947
929
|
},
|
|
948
930
|
removeListener: function (id) {
|
|
949
931
|
if (id in listeners) {
|
|
950
|
-
|
|
932
|
+
const h = listeners[id];
|
|
951
933
|
h.element.removeEventListener(h.event, h.handler, h.options);
|
|
952
934
|
delete listeners[id];
|
|
953
935
|
}
|
|
@@ -968,7 +950,7 @@ class HtmlHelper {
|
|
|
968
950
|
.replace(/>/g, '>');
|
|
969
951
|
}
|
|
970
952
|
static addInput(type, name, id = name, force = false) {
|
|
971
|
-
|
|
953
|
+
const node = document.createElement('input');
|
|
972
954
|
node.type = type;
|
|
973
955
|
node.name = name;
|
|
974
956
|
node.id = id;
|
|
@@ -993,13 +975,13 @@ class HtmlHelper {
|
|
|
993
975
|
//2022-02-24 document.getElementsByTagName('head')[0].appendChild(script);
|
|
994
976
|
}
|
|
995
977
|
static loadScripts(...scripts) {
|
|
996
|
-
|
|
978
|
+
const promises = [];
|
|
997
979
|
scripts.forEach((script) => promises.push(this.internalLoadScript(script)));
|
|
998
980
|
return Promise.all(promises);
|
|
999
981
|
}
|
|
1000
982
|
static internalLoadScript(src) {
|
|
1001
983
|
return new Promise((resolve, reject) => {
|
|
1002
|
-
|
|
984
|
+
const script = document.createElement('script');
|
|
1003
985
|
script.src = src;
|
|
1004
986
|
script.type = 'text/javascript';
|
|
1005
987
|
if (script.readyState) { //IE
|
|
@@ -1023,9 +1005,9 @@ class HtmlHelper {
|
|
|
1023
1005
|
|
|
1024
1006
|
class JwtHelper {
|
|
1025
1007
|
static decode(token) {
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1008
|
+
const base64Url = token.split('.')[1];
|
|
1009
|
+
const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');
|
|
1010
|
+
const jsonPayload = decodeURIComponent(atob(base64).split('').map(function (c) {
|
|
1029
1011
|
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
|
|
1030
1012
|
}).join(''));
|
|
1031
1013
|
return JSON.parse(jsonPayload);
|
|
@@ -1036,13 +1018,11 @@ class MathHelper {
|
|
|
1036
1018
|
static round(value, decimals = 0) {
|
|
1037
1019
|
return Math.round(Number(value) * Math.pow(10, decimals)) / (Math.pow(10, decimals));
|
|
1038
1020
|
}
|
|
1039
|
-
;
|
|
1040
1021
|
static clamp(v, min, max) {
|
|
1041
1022
|
return Math.max(min, Math.min(max, v));
|
|
1042
1023
|
}
|
|
1043
1024
|
static sum(...values) {
|
|
1044
1025
|
return values.reduce((acc, cur) => acc + cur, 0);
|
|
1045
|
-
;
|
|
1046
1026
|
}
|
|
1047
1027
|
}
|
|
1048
1028
|
|
|
@@ -1140,13 +1120,13 @@ class StorageHelper {
|
|
|
1140
1120
|
localStorage.setItem(key, value);
|
|
1141
1121
|
}
|
|
1142
1122
|
static get(key) {
|
|
1143
|
-
|
|
1123
|
+
const str = localStorage.getItem(key);
|
|
1144
1124
|
if (!str) {
|
|
1145
1125
|
return null;
|
|
1146
1126
|
}
|
|
1147
1127
|
// assume it is an object that has been stringified
|
|
1148
1128
|
if (str[0] === '{') {
|
|
1149
|
-
|
|
1129
|
+
const v = JSON.parse(str);
|
|
1150
1130
|
return v;
|
|
1151
1131
|
}
|
|
1152
1132
|
return str;
|
|
@@ -1185,7 +1165,7 @@ class StringHelper {
|
|
|
1185
1165
|
static trim(val, ch) {
|
|
1186
1166
|
if (!val || !ch)
|
|
1187
1167
|
return val;
|
|
1188
|
-
|
|
1168
|
+
let start = 0, end = val.length;
|
|
1189
1169
|
while (start < end && val[start] === ch)
|
|
1190
1170
|
++start;
|
|
1191
1171
|
while (end > start && val[end - 1] === ch)
|
|
@@ -1195,7 +1175,8 @@ class StringHelper {
|
|
|
1195
1175
|
static trimStart(val, ch) {
|
|
1196
1176
|
if (!val || !ch)
|
|
1197
1177
|
return val;
|
|
1198
|
-
|
|
1178
|
+
let start = 0;
|
|
1179
|
+
const end = val.length;
|
|
1199
1180
|
while (start < end && val[start] === ch)
|
|
1200
1181
|
++start;
|
|
1201
1182
|
return (start > 0) ? val.substring(start, end) : val;
|
|
@@ -1203,7 +1184,7 @@ class StringHelper {
|
|
|
1203
1184
|
static trimEnd(val, ch) {
|
|
1204
1185
|
if (!val || !ch)
|
|
1205
1186
|
return val;
|
|
1206
|
-
|
|
1187
|
+
let start = 0, end = val.length;
|
|
1207
1188
|
while (end > start && val[end - 1] === ch)
|
|
1208
1189
|
--end;
|
|
1209
1190
|
return (end < val.length) ? val.substring(start, end) : val;
|
|
@@ -1217,7 +1198,7 @@ class StringHelper {
|
|
|
1217
1198
|
static trimAny(val, chars) {
|
|
1218
1199
|
if (!val || !chars)
|
|
1219
1200
|
return val;
|
|
1220
|
-
|
|
1201
|
+
let start = 0, end = val.length;
|
|
1221
1202
|
while (start < end && chars.indexOf(val[start]) >= 0)
|
|
1222
1203
|
++start;
|
|
1223
1204
|
while (end > start && chars.indexOf(val[end - 1]) >= 0)
|
|
@@ -1226,21 +1207,21 @@ class StringHelper {
|
|
|
1226
1207
|
}
|
|
1227
1208
|
}
|
|
1228
1209
|
|
|
1229
|
-
|
|
1210
|
+
const firstBy = (function () {
|
|
1230
1211
|
function identity(v) { return v; }
|
|
1231
1212
|
function ignoreCase(v) { return typeof (v) === "string" ? v.toLowerCase() : v; }
|
|
1232
1213
|
function makeCompareFunction(f, opt) {
|
|
1233
1214
|
opt = typeof (opt) === "number" ? { direction: opt } : opt || {};
|
|
1234
1215
|
if (typeof (f) != "function") {
|
|
1235
|
-
|
|
1216
|
+
const prop = f;
|
|
1236
1217
|
// make unary function
|
|
1237
1218
|
f = function (v1) { return !!v1[prop] ? v1[prop] : ""; };
|
|
1238
1219
|
}
|
|
1239
1220
|
if (f.length === 1) {
|
|
1240
1221
|
// f is a unary function mapping a single item to its sort score
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1222
|
+
const uf = f;
|
|
1223
|
+
const preprocess = opt.ignoreCase ? ignoreCase : identity;
|
|
1224
|
+
const cmp = opt.cmp || function (v1, v2) { return v1 < v2 ? -1 : v1 > v2 ? 1 : 0; };
|
|
1244
1225
|
f = function (v1, v2) { return cmp(preprocess(uf(v1)), preprocess(uf(v2))); };
|
|
1245
1226
|
}
|
|
1246
1227
|
if (opt.direction === -1)
|
|
@@ -1254,9 +1235,9 @@ var firstBy = (function () {
|
|
|
1254
1235
|
/* should get value false for the first call. This can be done by calling the
|
|
1255
1236
|
exported function, or the firstBy property on it (for es6 module compatibility)
|
|
1256
1237
|
*/
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1238
|
+
const x = (typeof (this) == "function" && !this.firstBy) ? this : false;
|
|
1239
|
+
const y = makeCompareFunction(func, opt);
|
|
1240
|
+
const f = x ? function (a, b) {
|
|
1260
1241
|
return x(a, b) || y(a, b);
|
|
1261
1242
|
}
|
|
1262
1243
|
: y;
|
|
@@ -1272,7 +1253,7 @@ class TmpHelper {
|
|
|
1272
1253
|
static get(key, remove = true) {
|
|
1273
1254
|
if (!key)
|
|
1274
1255
|
return;
|
|
1275
|
-
|
|
1256
|
+
const v = this._obj[key];
|
|
1276
1257
|
if (remove)
|
|
1277
1258
|
this.remove(key);
|
|
1278
1259
|
return v;
|
|
@@ -1297,16 +1278,16 @@ class UrlHelper {
|
|
|
1297
1278
|
return url.substring(0, url.lastIndexOf('/') + 1);
|
|
1298
1279
|
}
|
|
1299
1280
|
static getAction(url) {
|
|
1300
|
-
|
|
1301
|
-
|
|
1281
|
+
const action = url.substring(url.lastIndexOf('/') + 1);
|
|
1282
|
+
const i = action.indexOf(';');
|
|
1302
1283
|
return i === -1 ? action : action.substring(0, i);
|
|
1303
1284
|
}
|
|
1304
1285
|
static getNoParam(url) {
|
|
1305
|
-
|
|
1306
|
-
|
|
1286
|
+
const i1 = url.indexOf('?');
|
|
1287
|
+
const i2 = url.indexOf(';');
|
|
1307
1288
|
if (i1 !== -1) {
|
|
1308
1289
|
if (i2 !== -1) {
|
|
1309
|
-
|
|
1290
|
+
const min = i1 < i2 ? i1 : i2;
|
|
1310
1291
|
return url.substring(0, min);
|
|
1311
1292
|
}
|
|
1312
1293
|
return url.substring(0, i1);
|
|
@@ -1353,7 +1334,7 @@ class AuthService {
|
|
|
1353
1334
|
}
|
|
1354
1335
|
get user() {
|
|
1355
1336
|
if (!this._isInitialized) {
|
|
1356
|
-
|
|
1337
|
+
const user = StorageHelper.get('login');
|
|
1357
1338
|
if (user) {
|
|
1358
1339
|
user.id = ObjectHelper.isDefined(user.id) ? Convert.parseNumber(user.id) : user.id;
|
|
1359
1340
|
user.expired = ObjectHelper.isDefined(user.expired) ? DateHelper.parseDate(user.expired) : user.expired;
|
|
@@ -1370,7 +1351,7 @@ class AuthService {
|
|
|
1370
1351
|
}
|
|
1371
1352
|
_starRefreshTokenTimer() {
|
|
1372
1353
|
this._stopRefreshTokenTimer();
|
|
1373
|
-
|
|
1354
|
+
const user = this._user;
|
|
1374
1355
|
if (user && user.refreshTokenTime) {
|
|
1375
1356
|
let timeout = user.refreshTokenTime.getTime() - Date.now(); // - (60 * 1000);
|
|
1376
1357
|
if (timeout < 0) {
|
|
@@ -1396,7 +1377,7 @@ class AuthService {
|
|
|
1396
1377
|
}
|
|
1397
1378
|
}
|
|
1398
1379
|
isAuthenticated() {
|
|
1399
|
-
|
|
1380
|
+
const expired = this.getExpired() || new Date(0); // if getExpired is null return min JS date
|
|
1400
1381
|
const newValue = new Date() < expired;
|
|
1401
1382
|
if (this._oldValue !== newValue) {
|
|
1402
1383
|
this._oldValue = newValue;
|
|
@@ -1454,14 +1435,14 @@ class AuthService {
|
|
|
1454
1435
|
this.login(null);
|
|
1455
1436
|
}
|
|
1456
1437
|
getExpired() {
|
|
1457
|
-
|
|
1438
|
+
const user = this.user;
|
|
1458
1439
|
if (user) {
|
|
1459
1440
|
return user.expired;
|
|
1460
1441
|
}
|
|
1461
1442
|
return null;
|
|
1462
1443
|
}
|
|
1463
1444
|
getRefreshTokenExpired() {
|
|
1464
|
-
|
|
1445
|
+
const user = this.user;
|
|
1465
1446
|
if (user) {
|
|
1466
1447
|
return user.refreshTokenTime;
|
|
1467
1448
|
}
|
|
@@ -1509,9 +1490,9 @@ class AuthService {
|
|
|
1509
1490
|
if (value) {
|
|
1510
1491
|
for (let i = 0; i < permissions.length; i++) {
|
|
1511
1492
|
const p = permissions[i];
|
|
1512
|
-
|
|
1493
|
+
const found = userPermissions[p];
|
|
1513
1494
|
if (found) {
|
|
1514
|
-
|
|
1495
|
+
const hasPermission = BitwiseHelper.hasFlag(found, value);
|
|
1515
1496
|
if (hasPermission)
|
|
1516
1497
|
return true;
|
|
1517
1498
|
}
|
|
@@ -1520,7 +1501,7 @@ class AuthService {
|
|
|
1520
1501
|
else {
|
|
1521
1502
|
for (let i = 0; i < permissions.length; i++) {
|
|
1522
1503
|
const p = permissions[i];
|
|
1523
|
-
|
|
1504
|
+
const found = userPermissions[p];
|
|
1524
1505
|
if (found)
|
|
1525
1506
|
return true;
|
|
1526
1507
|
}
|
|
@@ -1532,7 +1513,7 @@ class AuthService {
|
|
|
1532
1513
|
// const allowedRoles = data.roles;
|
|
1533
1514
|
// let isInRole = this.isInRole(allowedRoles);
|
|
1534
1515
|
const permission = data.permission;
|
|
1535
|
-
|
|
1516
|
+
const hasPermission = this.hasPermission(permission);
|
|
1536
1517
|
// return isInRole && hasPermission;
|
|
1537
1518
|
return hasPermission;
|
|
1538
1519
|
}
|
|
@@ -1543,6 +1524,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
|
|
|
1543
1524
|
type: Injectable
|
|
1544
1525
|
}] });
|
|
1545
1526
|
|
|
1527
|
+
const zekAuthGuard = (route, state) => {
|
|
1528
|
+
const authService = inject(AuthService);
|
|
1529
|
+
const router = inject(Router);
|
|
1530
|
+
if (!authService.isAuthenticated()) {
|
|
1531
|
+
router.navigate(['/login'], { queryParams: { returnUrl: state.url } });
|
|
1532
|
+
return false;
|
|
1533
|
+
}
|
|
1534
|
+
return authService.hasDataPermission(route.data);
|
|
1535
|
+
};
|
|
1536
|
+
/**
|
|
1537
|
+
* @deprecated Please use canActivate
|
|
1538
|
+
* @see {@link canActivate}
|
|
1539
|
+
*/
|
|
1546
1540
|
class AuthGuardService {
|
|
1547
1541
|
constructor(authService, router) {
|
|
1548
1542
|
this.authService = authService;
|
|
@@ -1646,7 +1640,7 @@ class AlertService {
|
|
|
1646
1640
|
});
|
|
1647
1641
|
}
|
|
1648
1642
|
add(alertType, message, keepAfterRouteChange = false) {
|
|
1649
|
-
|
|
1643
|
+
const messages = [];
|
|
1650
1644
|
messages.push(message);
|
|
1651
1645
|
this.addRange(alertType, messages, keepAfterRouteChange);
|
|
1652
1646
|
}
|
|
@@ -1767,10 +1761,10 @@ class HttpErrorHandler {
|
|
|
1767
1761
|
: error;
|
|
1768
1762
|
const errorMessages = [];
|
|
1769
1763
|
const properties = Object.getOwnPropertyNames(errors);
|
|
1770
|
-
for (
|
|
1764
|
+
for (const property of properties) {
|
|
1771
1765
|
const messages = errors[property];
|
|
1772
1766
|
if (messages instanceof Array) {
|
|
1773
|
-
for (
|
|
1767
|
+
for (const message of messages) {
|
|
1774
1768
|
const messageKey = `Validation.${message}`;
|
|
1775
1769
|
let translatedMessage = this.translate.instant(messageKey);
|
|
1776
1770
|
// if translation not found then use message
|
|
@@ -1867,7 +1861,7 @@ class WebApiClient {
|
|
|
1867
1861
|
const field = obj[key];
|
|
1868
1862
|
if (field === undefined || field === null || (typeof field === 'string' && field.length === 0))
|
|
1869
1863
|
continue;
|
|
1870
|
-
|
|
1864
|
+
const value = field;
|
|
1871
1865
|
// if (typeof field === 'string' && field.length > 0) {
|
|
1872
1866
|
// value = field.replace(/\+/gi, '%2B');
|
|
1873
1867
|
// }
|
|
@@ -2119,7 +2113,7 @@ class CoreUiComponent extends CoreComponent {
|
|
|
2119
2113
|
}
|
|
2120
2114
|
set value(newValue) {
|
|
2121
2115
|
if (this._value !== newValue) {
|
|
2122
|
-
|
|
2116
|
+
const cancelEventArgs = {
|
|
2123
2117
|
oldValue: this._value,
|
|
2124
2118
|
newValue: newValue
|
|
2125
2119
|
};
|
|
@@ -2153,7 +2147,7 @@ class CoreUiComponent extends CoreComponent {
|
|
|
2153
2147
|
return this._readonly;
|
|
2154
2148
|
}
|
|
2155
2149
|
set readonly(value) {
|
|
2156
|
-
|
|
2150
|
+
const v = Convert.toBooleanProperty(value);
|
|
2157
2151
|
if (this._readonly !== v) {
|
|
2158
2152
|
this._readonly = v;
|
|
2159
2153
|
this.onReadOnlyChanged();
|
|
@@ -2165,7 +2159,7 @@ class CoreUiComponent extends CoreComponent {
|
|
|
2165
2159
|
return this._disabled;
|
|
2166
2160
|
}
|
|
2167
2161
|
set disabled(value) {
|
|
2168
|
-
|
|
2162
|
+
const v = Convert.toBooleanProperty(value);
|
|
2169
2163
|
if (this._disabled !== v) {
|
|
2170
2164
|
this._disabled = v;
|
|
2171
2165
|
this.onDisabledChanged();
|
|
@@ -2177,7 +2171,7 @@ class CoreUiComponent extends CoreComponent {
|
|
|
2177
2171
|
return this._required;
|
|
2178
2172
|
}
|
|
2179
2173
|
set required(value) {
|
|
2180
|
-
|
|
2174
|
+
const v = Convert.toBooleanProperty(value);
|
|
2181
2175
|
if (this._required !== v) {
|
|
2182
2176
|
this._required = v;
|
|
2183
2177
|
this.onRequiredChanged();
|
|
@@ -2312,7 +2306,7 @@ class EditFormComponent extends BaseComponent {
|
|
|
2312
2306
|
async approve() {
|
|
2313
2307
|
if (this.id) {
|
|
2314
2308
|
this.approveModel.ids = [this.id];
|
|
2315
|
-
|
|
2309
|
+
const approved = await this.internalApprove(this.approveModel);
|
|
2316
2310
|
if (approved) {
|
|
2317
2311
|
this.load();
|
|
2318
2312
|
}
|
|
@@ -2333,7 +2327,7 @@ class EditFormComponent extends BaseComponent {
|
|
|
2333
2327
|
async disapprove() {
|
|
2334
2328
|
if (this.id) {
|
|
2335
2329
|
this.approveModel.ids = [this.id];
|
|
2336
|
-
|
|
2330
|
+
const disapproved = await this.internalDisapprove(this.approveModel);
|
|
2337
2331
|
if (disapproved) {
|
|
2338
2332
|
this.load();
|
|
2339
2333
|
}
|
|
@@ -2366,7 +2360,7 @@ class EditBaseComponent extends EditFormComponent {
|
|
|
2366
2360
|
}
|
|
2367
2361
|
async internalSave(navigateToReturnUrl) {
|
|
2368
2362
|
this.alert.clear();
|
|
2369
|
-
|
|
2363
|
+
const data = await firstValueFrom(this.service.save(this.model));
|
|
2370
2364
|
let success = false;
|
|
2371
2365
|
if (typeof data === 'number' && data > 0) {
|
|
2372
2366
|
success = true;
|
|
@@ -2376,7 +2370,7 @@ class EditBaseComponent extends EditFormComponent {
|
|
|
2376
2370
|
success = true;
|
|
2377
2371
|
}
|
|
2378
2372
|
if (success) {
|
|
2379
|
-
|
|
2373
|
+
const message = await firstValueFrom(this.translate.get('Alert.SaveSuccess'));
|
|
2380
2374
|
this.alert.success(message, null, 'fa-solid fa-floppy-disk');
|
|
2381
2375
|
if (navigateToReturnUrl === true) {
|
|
2382
2376
|
this.navigateReturnUrl();
|
|
@@ -2389,46 +2383,46 @@ class EditBaseComponent extends EditFormComponent {
|
|
|
2389
2383
|
// }
|
|
2390
2384
|
}
|
|
2391
2385
|
else {
|
|
2392
|
-
|
|
2386
|
+
const message = await firstValueFrom(this.translate.get('Alert.SaveError'));
|
|
2393
2387
|
this.alert.error(message, null, 'fa-solid fa-floppy-disk');
|
|
2394
2388
|
return false;
|
|
2395
2389
|
}
|
|
2396
2390
|
}
|
|
2397
2391
|
async internalApprove(model) {
|
|
2398
|
-
|
|
2392
|
+
const data = await firstValueFrom(this.service.approve(model));
|
|
2399
2393
|
if (data && data.length > 0) {
|
|
2400
|
-
|
|
2394
|
+
const message = await firstValueFrom(this.translate.get('Alert.Approved'));
|
|
2401
2395
|
this.alert.success(message, null, 'fa-solid fa-floppy-disk');
|
|
2402
2396
|
return true;
|
|
2403
2397
|
}
|
|
2404
2398
|
else {
|
|
2405
|
-
|
|
2399
|
+
const message = await firstValueFrom(this.translate.get('Alert.ApproveError'));
|
|
2406
2400
|
this.alert.error(message, null, 'fa-solid fa-floppy-disk');
|
|
2407
2401
|
return false;
|
|
2408
2402
|
}
|
|
2409
2403
|
}
|
|
2410
2404
|
async internalDisapprove(model) {
|
|
2411
|
-
|
|
2405
|
+
const data = await firstValueFrom(this.service.disapprove(model));
|
|
2412
2406
|
if (data && data.length > 0) {
|
|
2413
|
-
|
|
2407
|
+
const message = await firstValueFrom(this.translate.get('Alert.Disapproved'));
|
|
2414
2408
|
this.alert.success(message, null, 'fa-solid fa-floppy-disk');
|
|
2415
2409
|
return true;
|
|
2416
2410
|
}
|
|
2417
2411
|
else {
|
|
2418
|
-
|
|
2412
|
+
const message = await firstValueFrom(this.translate.get('Alert.DisapproveError'));
|
|
2419
2413
|
this.alert.error(message, null, 'fa-solid fa-floppy-disk');
|
|
2420
2414
|
return false;
|
|
2421
2415
|
}
|
|
2422
2416
|
}
|
|
2423
2417
|
async internalSubmit(model) {
|
|
2424
|
-
|
|
2418
|
+
const data = await firstValueFrom(this.service.approve(model));
|
|
2425
2419
|
if (data && data.length > 0) {
|
|
2426
|
-
|
|
2420
|
+
const message = await firstValueFrom(this.translate.get('Alert.Submitted'));
|
|
2427
2421
|
this.alert.success(message, null, 'fa-solid fa-floppy-disk');
|
|
2428
2422
|
return true;
|
|
2429
2423
|
}
|
|
2430
2424
|
else {
|
|
2431
|
-
|
|
2425
|
+
const message = await firstValueFrom(this.translate.get('Alert.SubmitError'));
|
|
2432
2426
|
this.alert.error(message, null, 'fa-solid fa-floppy-disk');
|
|
2433
2427
|
return false;
|
|
2434
2428
|
}
|
|
@@ -2446,9 +2440,9 @@ class EditBaseComponent extends EditFormComponent {
|
|
|
2446
2440
|
super.print(this.id, printType);
|
|
2447
2441
|
}
|
|
2448
2442
|
async restore() {
|
|
2449
|
-
|
|
2443
|
+
const data = await firstValueFrom(this.service.restore(this.id));
|
|
2450
2444
|
if (data?.success) {
|
|
2451
|
-
|
|
2445
|
+
const message = await firstValueFrom(this.translate.get('Alert.Restored'));
|
|
2452
2446
|
this.alert.success(message);
|
|
2453
2447
|
this.load();
|
|
2454
2448
|
}
|
|
@@ -2640,7 +2634,7 @@ class ListBaseComponent extends BaseComponent {
|
|
|
2640
2634
|
initDefaultFilter() {
|
|
2641
2635
|
}
|
|
2642
2636
|
initStoredFilter() {
|
|
2643
|
-
|
|
2637
|
+
const filterParam = this.getQueryParam('filter') || this.getParam('filter');
|
|
2644
2638
|
if (filterParam) {
|
|
2645
2639
|
const tmp = StorageHelper.get('filter');
|
|
2646
2640
|
if (tmp && tmp.url && tmp.url === this.url && tmp.filter) {
|
|
@@ -2703,18 +2697,18 @@ class ListBaseComponent extends BaseComponent {
|
|
|
2703
2697
|
}
|
|
2704
2698
|
async delete(id) {
|
|
2705
2699
|
this.alert.clear();
|
|
2706
|
-
|
|
2700
|
+
const data = await firstValueFrom(this.service.delete(id));
|
|
2707
2701
|
if (data?.success) {
|
|
2708
|
-
|
|
2702
|
+
const message = await firstValueFrom(this.translate.get('Alert.Deleted'));
|
|
2709
2703
|
this.alert.error(message, null, 'fa-solid fa-trash');
|
|
2710
2704
|
this.refresh();
|
|
2711
2705
|
}
|
|
2712
2706
|
}
|
|
2713
2707
|
async delete2(id, id2) {
|
|
2714
2708
|
this.alert.clear();
|
|
2715
|
-
|
|
2709
|
+
const data = await firstValueFrom(this.service.delete2(id, id2));
|
|
2716
2710
|
if (data?.success) {
|
|
2717
|
-
|
|
2711
|
+
const message = await firstValueFrom(this.translate.get('Alert.Deleted'));
|
|
2718
2712
|
this.alert.error(message, null, 'fa-solid fa-trash');
|
|
2719
2713
|
this.refresh();
|
|
2720
2714
|
}
|
|
@@ -2731,7 +2725,7 @@ class ListBaseComponent extends BaseComponent {
|
|
|
2731
2725
|
}
|
|
2732
2726
|
select(item) {
|
|
2733
2727
|
item.selected = !item.selected;
|
|
2734
|
-
|
|
2728
|
+
const id = item.id;
|
|
2735
2729
|
if (id) {
|
|
2736
2730
|
if (item.selected) {
|
|
2737
2731
|
this.selectedIds.push(id);
|
|
@@ -2744,12 +2738,12 @@ class ListBaseComponent extends BaseComponent {
|
|
|
2744
2738
|
showApproveModal(id) {
|
|
2745
2739
|
if (!id || !this.approveModal)
|
|
2746
2740
|
return;
|
|
2747
|
-
|
|
2741
|
+
const tmp = { ids: [id] };
|
|
2748
2742
|
this.approveModel = {};
|
|
2749
2743
|
this.approveModal.show(tmp);
|
|
2750
2744
|
}
|
|
2751
2745
|
showApproveSelectedModal() {
|
|
2752
|
-
|
|
2746
|
+
const tmp = { ids: this.getSelectedIds() };
|
|
2753
2747
|
if (!tmp.ids || tmp.ids.length === 0 || !this.approveModal)
|
|
2754
2748
|
return;
|
|
2755
2749
|
this.approveModel = {};
|
|
@@ -2759,22 +2753,22 @@ class ListBaseComponent extends BaseComponent {
|
|
|
2759
2753
|
if (!m)
|
|
2760
2754
|
return;
|
|
2761
2755
|
this.alert.clear();
|
|
2762
|
-
|
|
2756
|
+
const data = await firstValueFrom(this.service.approve(m));
|
|
2763
2757
|
if (!data || data.length === 0)
|
|
2764
2758
|
return;
|
|
2765
|
-
|
|
2759
|
+
const message = await firstValueFrom(this.translate.get(this.approvedMesage));
|
|
2766
2760
|
this.alert.success(message, null, 'fa-solid fa-thumbs-up');
|
|
2767
2761
|
this.refresh();
|
|
2768
2762
|
}
|
|
2769
2763
|
showDisapproveModal(id) {
|
|
2770
2764
|
if (!id || !this.disapproveModal)
|
|
2771
2765
|
return;
|
|
2772
|
-
|
|
2766
|
+
const tmp = { ids: [id] };
|
|
2773
2767
|
this.approveModel = {};
|
|
2774
2768
|
this.disapproveModal.show(tmp);
|
|
2775
2769
|
}
|
|
2776
2770
|
showDisapproveSelectedModal() {
|
|
2777
|
-
|
|
2771
|
+
const tmp = { ids: this.getSelectedIds() };
|
|
2778
2772
|
if (!tmp.ids || tmp.ids.length === 0 || !this.disapproveModal)
|
|
2779
2773
|
return;
|
|
2780
2774
|
this.approveModel = {};
|
|
@@ -2790,10 +2784,10 @@ class ListBaseComponent extends BaseComponent {
|
|
|
2790
2784
|
delete m.comment;
|
|
2791
2785
|
}
|
|
2792
2786
|
this.alert.clear();
|
|
2793
|
-
|
|
2787
|
+
const data = await firstValueFrom(this.service.disapprove(m));
|
|
2794
2788
|
if (!data || data.length === 0)
|
|
2795
2789
|
return;
|
|
2796
|
-
|
|
2790
|
+
const message = await firstValueFrom(this.translate.get(this.disapprovedMesage));
|
|
2797
2791
|
this.alert.success(message, null, 'fa-solid fa-thumbs-down');
|
|
2798
2792
|
this.refresh();
|
|
2799
2793
|
}
|
|
@@ -2810,13 +2804,13 @@ class ListBaseComponent extends BaseComponent {
|
|
|
2810
2804
|
showSum() { }
|
|
2811
2805
|
async sum() {
|
|
2812
2806
|
this.sumModel = null;
|
|
2813
|
-
|
|
2807
|
+
const data = await firstValueFrom(this.service.sum(this.internalFilter));
|
|
2814
2808
|
if (data) {
|
|
2815
2809
|
this.sumModel = data;
|
|
2816
2810
|
this.showSum();
|
|
2817
2811
|
}
|
|
2818
2812
|
else {
|
|
2819
|
-
|
|
2813
|
+
const message = await firstValueFrom(this.translate.get('Alert.SumError'));
|
|
2820
2814
|
this.alert.error(message);
|
|
2821
2815
|
}
|
|
2822
2816
|
}
|
|
@@ -2828,7 +2822,7 @@ class ListBaseComponent extends BaseComponent {
|
|
|
2828
2822
|
print(printType) {
|
|
2829
2823
|
if (!this.model || !this.model.items)
|
|
2830
2824
|
return;
|
|
2831
|
-
|
|
2825
|
+
const ids = this.getSelectedIds();
|
|
2832
2826
|
for (const id of ids) {
|
|
2833
2827
|
super.print(id, printType);
|
|
2834
2828
|
}
|
|
@@ -2854,7 +2848,7 @@ class AgePipe {
|
|
|
2854
2848
|
if (typeof value === 'undefined' || value === null || value === '' || value !== value)
|
|
2855
2849
|
return null;
|
|
2856
2850
|
const date = DateHelper.toDate(value);
|
|
2857
|
-
|
|
2851
|
+
const timeDiff = (now ? DateHelper.toDate(now).getTime() : Date.now()) - date.getTime();
|
|
2858
2852
|
return Math.floor((timeDiff / (1000 * 3600 * 24)) / 365.25);
|
|
2859
2853
|
}
|
|
2860
2854
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: AgePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
@@ -2917,7 +2911,7 @@ class ZekToast {
|
|
|
2917
2911
|
return this._delay;
|
|
2918
2912
|
}
|
|
2919
2913
|
set delay(v) {
|
|
2920
|
-
|
|
2914
|
+
const tmp = clamp$1(Convert.toNumber(v) || 0);
|
|
2921
2915
|
if (this._delay !== tmp) {
|
|
2922
2916
|
this._delay = tmp;
|
|
2923
2917
|
}
|
|
@@ -2977,7 +2971,7 @@ class ZekToast {
|
|
|
2977
2971
|
if (this.icon && !toast.icon) {
|
|
2978
2972
|
toast.icon = BootstrapHelper.cssAlertIcon(toast.type);
|
|
2979
2973
|
}
|
|
2980
|
-
|
|
2974
|
+
let v = toast;
|
|
2981
2975
|
switch (toast.type) {
|
|
2982
2976
|
case 'primary':
|
|
2983
2977
|
v.css = 'bg-primary text-white';
|
|
@@ -3185,7 +3179,7 @@ class ZekButtonBrowse extends CoreUiComponent {
|
|
|
3185
3179
|
}
|
|
3186
3180
|
get modal() {
|
|
3187
3181
|
if (!this._modal) {
|
|
3188
|
-
|
|
3182
|
+
const modalEl = document.getElementById(this.modalId);
|
|
3189
3183
|
this._modal = new bootstrap.Modal(modalEl, { backdrop: false });
|
|
3190
3184
|
}
|
|
3191
3185
|
return this._modal;
|
|
@@ -3599,10 +3593,10 @@ class DateValueAccessor {
|
|
|
3599
3593
|
this.onChangeDate(e); //execude
|
|
3600
3594
|
});
|
|
3601
3595
|
setTimeout(() => {
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3596
|
+
const min = this.el.nativeElement.getAttribute('min');
|
|
3597
|
+
const max = this.el.nativeElement.getAttribute('max');
|
|
3598
|
+
const minDate = min ? DateHelper.toDate(min) : null;
|
|
3599
|
+
const maxDate = max ? DateHelper.toDate(max) : null;
|
|
3606
3600
|
this.datepicker.setOptions({
|
|
3607
3601
|
minDate: minDate, //String|Date|Number
|
|
3608
3602
|
maxDate: maxDate, //String|Date|Number
|
|
@@ -3680,7 +3674,7 @@ class DateValueAccessor {
|
|
|
3680
3674
|
}
|
|
3681
3675
|
//write from model to el.nativeElement
|
|
3682
3676
|
writeValue(value) {
|
|
3683
|
-
|
|
3677
|
+
const date = DateHelper.parseDate(value);
|
|
3684
3678
|
this.oldValue = date;
|
|
3685
3679
|
if (date) {
|
|
3686
3680
|
this.datepicker.setDate(date, { clear: true }); //to display in input
|
|
@@ -3935,7 +3929,7 @@ class ZekModal extends CoreComponent {
|
|
|
3935
3929
|
});
|
|
3936
3930
|
}
|
|
3937
3931
|
setTimeout(() => {
|
|
3938
|
-
|
|
3932
|
+
const modalEl = this.getModalElement();
|
|
3939
3933
|
if (modalEl) {
|
|
3940
3934
|
this.shownHandler = handler.addListener(modalEl, 'shown.bs.modal', () => {
|
|
3941
3935
|
this.onShown.emit();
|
|
@@ -4031,7 +4025,7 @@ class ZekModal extends CoreComponent {
|
|
|
4031
4025
|
return document.getElementById(this.modalId);
|
|
4032
4026
|
}
|
|
4033
4027
|
getModal() {
|
|
4034
|
-
|
|
4028
|
+
const modalEl = this.getModalElement();
|
|
4035
4029
|
return new bootstrap.Modal(modalEl, { backdrop: 'static' });
|
|
4036
4030
|
}
|
|
4037
4031
|
cssButton() {
|
|
@@ -4064,14 +4058,14 @@ class ZekModal extends CoreComponent {
|
|
|
4064
4058
|
this._modal.hide();
|
|
4065
4059
|
}
|
|
4066
4060
|
else {
|
|
4067
|
-
|
|
4061
|
+
const btn = document.getElementById(this.cancelButtonId);
|
|
4068
4062
|
if (btn) {
|
|
4069
4063
|
btn.click();
|
|
4070
4064
|
}
|
|
4071
4065
|
}
|
|
4072
4066
|
}
|
|
4073
4067
|
ok() {
|
|
4074
|
-
|
|
4068
|
+
const event = new ValidEventArgs();
|
|
4075
4069
|
this.onValidating.emit(event);
|
|
4076
4070
|
if (!event.valid)
|
|
4077
4071
|
return;
|
|
@@ -4358,7 +4352,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
|
|
|
4358
4352
|
|
|
4359
4353
|
class ZekFileViewer extends CoreComponent {
|
|
4360
4354
|
show(url, extension) {
|
|
4361
|
-
|
|
4355
|
+
const ext = extension || FileHelper.getExtension(url);
|
|
4362
4356
|
switch (ext) {
|
|
4363
4357
|
case '.docx':
|
|
4364
4358
|
case '.doc':
|
|
@@ -4482,7 +4476,7 @@ class ZekGoogleLoginButton extends CoreComponent {
|
|
|
4482
4476
|
});
|
|
4483
4477
|
}
|
|
4484
4478
|
renderButton() {
|
|
4485
|
-
|
|
4479
|
+
const options = { theme: "outline", size: "large" };
|
|
4486
4480
|
if (this._width)
|
|
4487
4481
|
options.width = this._width;
|
|
4488
4482
|
if (this._text)
|
|
@@ -4942,7 +4936,7 @@ class NumericDirective {
|
|
|
4942
4936
|
return this._digits;
|
|
4943
4937
|
}
|
|
4944
4938
|
set digits(v) {
|
|
4945
|
-
|
|
4939
|
+
const tmp = MathHelper.clamp(Convert.toNumber(v) || 0, 0, 29);
|
|
4946
4940
|
this._digits = tmp;
|
|
4947
4941
|
}
|
|
4948
4942
|
get negative() {
|
|
@@ -4956,7 +4950,7 @@ class NumericDirective {
|
|
|
4956
4950
|
return String(value).match(new RegExp(/^-?\d+$/));
|
|
4957
4951
|
}
|
|
4958
4952
|
else {
|
|
4959
|
-
|
|
4953
|
+
const regExpString = "^-?\\s*((\\d+(\\.\\d{0," +
|
|
4960
4954
|
this._digits +
|
|
4961
4955
|
"})?)|((\\d*(\\.\\d{1," +
|
|
4962
4956
|
this._digits +
|
|
@@ -4969,7 +4963,7 @@ class NumericDirective {
|
|
|
4969
4963
|
return String(value).match(new RegExp(/^\d+$/));
|
|
4970
4964
|
}
|
|
4971
4965
|
else {
|
|
4972
|
-
|
|
4966
|
+
const regExpString = "^\\s*((\\d+(\\.\\d{0," +
|
|
4973
4967
|
this._digits +
|
|
4974
4968
|
"})?)|((\\d*(\\.\\d{1," +
|
|
4975
4969
|
this._digits +
|
|
@@ -4979,8 +4973,8 @@ class NumericDirective {
|
|
|
4979
4973
|
}
|
|
4980
4974
|
run(oldValue) {
|
|
4981
4975
|
setTimeout(() => {
|
|
4982
|
-
|
|
4983
|
-
|
|
4976
|
+
const currentValue = this.el.nativeElement.value;
|
|
4977
|
+
const allowNegative = this._negative;
|
|
4984
4978
|
if (allowNegative) {
|
|
4985
4979
|
if (!["", "-"].includes(currentValue) &&
|
|
4986
4980
|
!this.checkAllowNegative(currentValue)) {
|
|
@@ -5167,7 +5161,7 @@ class ZekProgress {
|
|
|
5167
5161
|
return this._value;
|
|
5168
5162
|
}
|
|
5169
5163
|
set value(v) {
|
|
5170
|
-
|
|
5164
|
+
const tmp = clamp(Convert.toNumber(v) || 0);
|
|
5171
5165
|
if (this._value !== tmp) {
|
|
5172
5166
|
this._value = tmp;
|
|
5173
5167
|
}
|
|
@@ -5209,7 +5203,7 @@ class ZekProgress {
|
|
|
5209
5203
|
return this._height;
|
|
5210
5204
|
}
|
|
5211
5205
|
set height(v) {
|
|
5212
|
-
|
|
5206
|
+
const tmp = Convert.toNumber(v) || 0;
|
|
5213
5207
|
this._height = tmp > 0 ? tmp : null;
|
|
5214
5208
|
}
|
|
5215
5209
|
get background() {
|
|
@@ -5269,7 +5263,7 @@ class ZekRadio extends CoreUiComponent {
|
|
|
5269
5263
|
return this._inline;
|
|
5270
5264
|
}
|
|
5271
5265
|
set inline(v) {
|
|
5272
|
-
|
|
5266
|
+
const newValue = Convert.toBooleanProperty(v);
|
|
5273
5267
|
if (this._inline !== newValue) {
|
|
5274
5268
|
this._inline = newValue;
|
|
5275
5269
|
this.onInlineChanged();
|
|
@@ -5402,8 +5396,8 @@ urlParams, url, nonce) {
|
|
|
5402
5396
|
onLoaded(grecaptcha);
|
|
5403
5397
|
};
|
|
5404
5398
|
const baseUrl = url || "https://www.google.com/recaptcha/api.js";
|
|
5405
|
-
|
|
5406
|
-
|
|
5399
|
+
const params = urlParams || '';
|
|
5400
|
+
const src = `${baseUrl}?render=${siteKey}&onload=recaptchaloaded${params}`;
|
|
5407
5401
|
HtmlHelper.loadScript(src, nonce, true, true);
|
|
5408
5402
|
}
|
|
5409
5403
|
const loader = { loadScript };
|
|
@@ -5647,13 +5641,13 @@ class ZekSelectMultiple extends CoreUiComponent {
|
|
|
5647
5641
|
let notUnique = [];
|
|
5648
5642
|
if (this.valueField) {
|
|
5649
5643
|
for (const currentValue of value) {
|
|
5650
|
-
|
|
5644
|
+
const items = ArrayHelper.filterByKey(currentValue, this.valueField, this._data);
|
|
5651
5645
|
notUnique = notUnique.concat(items);
|
|
5652
5646
|
}
|
|
5653
5647
|
}
|
|
5654
5648
|
else {
|
|
5655
5649
|
for (const currentValue of value) {
|
|
5656
|
-
|
|
5650
|
+
const items = this._data.filter(x => x === currentValue);
|
|
5657
5651
|
notUnique = notUnique.concat(items);
|
|
5658
5652
|
}
|
|
5659
5653
|
}
|
|
@@ -5680,7 +5674,7 @@ class ZekSelectMultiple extends CoreUiComponent {
|
|
|
5680
5674
|
if (!v.checked) {
|
|
5681
5675
|
v.checked = true;
|
|
5682
5676
|
if (this.multiple) {
|
|
5683
|
-
|
|
5677
|
+
const tmp = [];
|
|
5684
5678
|
for (const item of this.normalized) {
|
|
5685
5679
|
if (item.checked) {
|
|
5686
5680
|
tmp.push(item.key);
|
|
@@ -5708,7 +5702,7 @@ class ZekSelectMultiple extends CoreUiComponent {
|
|
|
5708
5702
|
}
|
|
5709
5703
|
}
|
|
5710
5704
|
_initText() {
|
|
5711
|
-
|
|
5705
|
+
const field = this.checkedTextField || this.textField || '';
|
|
5712
5706
|
if (field) {
|
|
5713
5707
|
this._text = this._selected.filter(x => x !== undefined && x !== null).map(x => x[field]).join(', ');
|
|
5714
5708
|
}
|
|
@@ -5810,7 +5804,7 @@ class ZekSelect2 {
|
|
|
5810
5804
|
}
|
|
5811
5805
|
filterData() {
|
|
5812
5806
|
if (this.filter && this.filter !== '') {
|
|
5813
|
-
|
|
5807
|
+
const searchString = this.filter;
|
|
5814
5808
|
if (this.textField === undefined || this.textField === null) {
|
|
5815
5809
|
this.filteredData = this.data.filter(item => item.toLowerCase().indexOf(searchString.toLowerCase()) !== -1);
|
|
5816
5810
|
}
|
|
@@ -5967,7 +5961,7 @@ class ZekSelect2Multiple {
|
|
|
5967
5961
|
}
|
|
5968
5962
|
filterData() {
|
|
5969
5963
|
if (this.filter && this.filter !== '') {
|
|
5970
|
-
|
|
5964
|
+
const searchString = this.filter;
|
|
5971
5965
|
if (typeof this.textField === 'undefined' || this.textField === null) {
|
|
5972
5966
|
this.filteredData = this.data.filter(item => item.toLowerCase().indexOf(searchString.toLowerCase()) !== -1);
|
|
5973
5967
|
}
|
|
@@ -5988,7 +5982,7 @@ class ZekSelect2Multiple {
|
|
|
5988
5982
|
this.setText();
|
|
5989
5983
|
}
|
|
5990
5984
|
setText() {
|
|
5991
|
-
|
|
5985
|
+
const fieldName = this.selectedField || this.textField;
|
|
5992
5986
|
if (StringHelper.isNullOrEmpty((fieldName))) {
|
|
5993
5987
|
this.text = this._selectedItems.join(', ');
|
|
5994
5988
|
}
|
|
@@ -6553,8 +6547,8 @@ function rangeValidator(range) {
|
|
|
6553
6547
|
return null; // don't validate empty values to allow optional controls
|
|
6554
6548
|
}
|
|
6555
6549
|
const value = parseFloat(control.value);
|
|
6556
|
-
|
|
6557
|
-
|
|
6550
|
+
const max = range[0];
|
|
6551
|
+
const min = range[1];
|
|
6558
6552
|
if (!isNaN(value) && (value < min || value > max)) {
|
|
6559
6553
|
return { 'range': { 'min': min, 'max': max, 'actual': control.value } };
|
|
6560
6554
|
}
|
|
@@ -6569,7 +6563,7 @@ function matchValidator(input) {
|
|
|
6569
6563
|
const targetCtrl = control.get(input);
|
|
6570
6564
|
let targetValue;
|
|
6571
6565
|
if (!targetCtrl) {
|
|
6572
|
-
|
|
6566
|
+
const el = document.getElementById(input);
|
|
6573
6567
|
if (el) {
|
|
6574
6568
|
targetValue = el.value;
|
|
6575
6569
|
}
|
|
@@ -6744,7 +6738,7 @@ class ZekWizard {
|
|
|
6744
6738
|
v = this.steps;
|
|
6745
6739
|
if (this._step !== v) {
|
|
6746
6740
|
this._step = v;
|
|
6747
|
-
|
|
6741
|
+
const found = this.stepsArray.find(x => x.step === this._step);
|
|
6748
6742
|
if (found) {
|
|
6749
6743
|
this.progress = found.progress;
|
|
6750
6744
|
}
|
|
@@ -6818,5 +6812,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
|
|
|
6818
6812
|
* Generated bundle index. Do not edit.
|
|
6819
6813
|
*/
|
|
6820
6814
|
|
|
6821
|
-
export { API_BASE_URL, AgePipe, Alert, AlertService, ArrayHelper, AuthGuardService, AuthService, Base64Helper, BaseAlert, BaseComponent, BaseService, BitwiseHelper, BootstrapHelper, Color, ComponentType, Convert, CoreComponent, CoreUiComponent, CrudService, CssHelper, CustomHttpParamEncoder, DATE_FORMAT, DateHelper, DateValueAccessor, DatepickerModule, EditBase, EditBaseComponent, EditComponent, EditFormComponent, ErrorHelper, ExcelHelper, FileBase, FileBytes, FileHelper, FileString, FilterBase, FilterHelper, GOOGLE_CLIENT_ID, Gender, HtmlHelper, HttpErrorHandler, JwtHelper, KeyPair, KeyPairChecked, KeyPairEx, KeyPairRequired, LANGUAGE, ListBase, ListBaseComponent, MATCH_VALIDATOR, MatchValidator, MathHelper, Month, NumericDirective, ObjectHelper, OverlapHelper, PagedList, Pager, PagerHelper, PeriodRelation, PrintType, RANGE_VALIDATOR, RECAPTCHA_SITE_KEY, RandomHelper, RangeValidator, ReCaptchaService, RecaptchaModule, StorageHelper, StringHelper, TimeHelper, TimeModule, TimePipe, TimerService, TmpHelper, Toast, Tree, UrlHelper, ValidEventArgs, ValidationHelper, Validators, ValidatorsModule, WebApiClient, WebApiModule, ZekAlert, ZekApproveModal, ZekAutoComplete, ZekButtonBrowse, ZekButtonBrowseModalBase, ZekButtonBrowseModalToolbar, ZekButtonBrowseModule, ZekCallbackPipe, ZekCard, ZekDateAgoPipe, ZekDeleteModal, ZekDisapproveModal, ZekEditToolbar, ZekFieldValidator, ZekFileSizePipe, ZekFileViewer, ZekFilterModal, ZekGoogleLoginButton, ZekGoogleLoginModule, ZekGridToolbar, ZekGridToolbarBar, ZekListToolbar, ZekLoading, ZekLoadingModule, ZekLocalToUtcModule, ZekLocalToUtcPipe, ZekModal, ZekModalModule, ZekPageTitle, ZekPager, ZekPassword, ZekProgress, ZekRadio, ZekReadOnlyDirective, ZekRestoreModal, ZekSafePipe, ZekSelect2, ZekSelect2Multiple, ZekSelectMultiple, ZekSort, ZekSortButtonGroup, ZekSubmitModal, ZekSumModal, ZekToast, ZekTooltip, ZekUtcToLocalModule, ZekUtcToLocalPipe, ZekValidation, ZekWizard, ZekWizard2, firstBy, handler, matchValidator, nullValidator, rangeValidator };
|
|
6815
|
+
export { API_BASE_URL, AgePipe, Alert, AlertService, ArrayHelper, AuthGuardService, AuthService, Base64Helper, BaseAlert, BaseComponent, BaseService, BitwiseHelper, BootstrapHelper, Color, ComponentType, Convert, CoreComponent, CoreUiComponent, CrudService, CssHelper, CustomHttpParamEncoder, DATE_FORMAT, DateHelper, DateValueAccessor, DatepickerModule, EditBase, EditBaseComponent, EditComponent, EditFormComponent, ErrorHelper, ExcelHelper, FileBase, FileBytes, FileHelper, FileString, FilterBase, FilterHelper, GOOGLE_CLIENT_ID, Gender, HtmlHelper, HttpErrorHandler, JwtHelper, KeyPair, KeyPairChecked, KeyPairEx, KeyPairRequired, LANGUAGE, ListBase, ListBaseComponent, MATCH_VALIDATOR, MatchValidator, MathHelper, Month, NumericDirective, ObjectHelper, OverlapHelper, PagedList, Pager, PagerHelper, PeriodRelation, PrintType, RANGE_VALIDATOR, RECAPTCHA_SITE_KEY, RandomHelper, RangeValidator, ReCaptchaService, RecaptchaModule, StorageHelper, StringHelper, TimeHelper, TimeModule, TimePipe, TimerService, TmpHelper, Toast, Tree, UrlHelper, ValidEventArgs, ValidationHelper, Validators, ValidatorsModule, WebApiClient, WebApiModule, ZekAlert, ZekApproveModal, ZekAutoComplete, ZekButtonBrowse, ZekButtonBrowseModalBase, ZekButtonBrowseModalToolbar, ZekButtonBrowseModule, ZekCallbackPipe, ZekCard, ZekDateAgoPipe, ZekDeleteModal, ZekDisapproveModal, ZekEditToolbar, ZekFieldValidator, ZekFileSizePipe, ZekFileViewer, ZekFilterModal, ZekGoogleLoginButton, ZekGoogleLoginModule, ZekGridToolbar, ZekGridToolbarBar, ZekListToolbar, ZekLoading, ZekLoadingModule, ZekLocalToUtcModule, ZekLocalToUtcPipe, ZekModal, ZekModalModule, ZekPageTitle, ZekPager, ZekPassword, ZekProgress, ZekRadio, ZekReadOnlyDirective, ZekRestoreModal, ZekSafePipe, ZekSelect2, ZekSelect2Multiple, ZekSelectMultiple, ZekSort, ZekSortButtonGroup, ZekSubmitModal, ZekSumModal, ZekToast, ZekTooltip, ZekUtcToLocalModule, ZekUtcToLocalPipe, ZekValidation, ZekWizard, ZekWizard2, firstBy, handler, matchValidator, nullValidator, rangeValidator, zekAuthGuard };
|
|
6822
6816
|
//# sourceMappingURL=zek.mjs.map
|