tango-app-ui-manage-settings 3.0.48-dev → 3.0.50-dev
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/configurations/report-configuration/add-report/add-report.component.mjs +18 -7
- package/esm2022/lib/components/configurations/report-configuration/report-configuration.component.mjs +15 -4
- package/fesm2022/tango-app-ui-manage-settings.mjs +29 -9
- package/fesm2022/tango-app-ui-manage-settings.mjs.map +1 -1
- package/lib/components/configurations/report-configuration/add-report/add-report.component.d.ts +2 -0
- package/lib/components/configurations/report-configuration/report-configuration.component.d.ts +2 -0
- package/package.json +1 -1
|
@@ -3741,6 +3741,8 @@ class AddReportComponent {
|
|
|
3741
3741
|
$emailInterrupt = new BehaviorSubject('');
|
|
3742
3742
|
clientId;
|
|
3743
3743
|
destroy$ = new Subject();
|
|
3744
|
+
// emailValidation: { invalidEmail: boolean; } | null;
|
|
3745
|
+
emailValidation = [];
|
|
3744
3746
|
constructor(fb, apiService, activeModal, toaster) {
|
|
3745
3747
|
this.fb = fb;
|
|
3746
3748
|
this.apiService = apiService;
|
|
@@ -3759,11 +3761,16 @@ class AddReportComponent {
|
|
|
3759
3761
|
}
|
|
3760
3762
|
initForm() {
|
|
3761
3763
|
this.addReportForm = this.fb.group({
|
|
3762
|
-
fileName: [''],
|
|
3763
|
-
fileType: [''],
|
|
3764
|
-
email: ['']
|
|
3764
|
+
fileName: ['', Validators.required],
|
|
3765
|
+
fileType: ['', Validators.required],
|
|
3766
|
+
email: ['', Validators.required]
|
|
3765
3767
|
});
|
|
3766
3768
|
}
|
|
3769
|
+
emailValidator(value) {
|
|
3770
|
+
const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
|
3771
|
+
const valid = emailRegex.test(value);
|
|
3772
|
+
this.emailValidation.push(valid);
|
|
3773
|
+
}
|
|
3767
3774
|
ngAfterViewInit() {
|
|
3768
3775
|
this.addReportForm.get('email')?.valueChanges
|
|
3769
3776
|
.pipe(map((value) => value.replace(/\n/g, '')))
|
|
@@ -3771,8 +3778,9 @@ class AddReportComponent {
|
|
|
3771
3778
|
return this.$emailInterrupt.pipe(takeUntil(this.destroy$)).pipe(map((interrupt) => {
|
|
3772
3779
|
if (interrupt === 'Enter') {
|
|
3773
3780
|
this.$emailInterrupt.next('');
|
|
3774
|
-
|
|
3781
|
+
this.emailValidation = [];
|
|
3775
3782
|
this.emailList.push(val);
|
|
3783
|
+
this.emailList.forEach((element) => { this.emailValidator(element); });
|
|
3776
3784
|
this.addReportForm.get('email')?.setValue('');
|
|
3777
3785
|
}
|
|
3778
3786
|
else if (interrupt === 'Backspace' && !val && this.emailList.length) {
|
|
@@ -3789,6 +3797,8 @@ class AddReportComponent {
|
|
|
3789
3797
|
}
|
|
3790
3798
|
removeChip(i) {
|
|
3791
3799
|
this.emailList.splice(i, 1);
|
|
3800
|
+
this.emailValidation = [];
|
|
3801
|
+
this.emailList.forEach((element) => { this.emailValidator(element); });
|
|
3792
3802
|
}
|
|
3793
3803
|
onCancel() {
|
|
3794
3804
|
this.activeModal.close();
|
|
@@ -3802,11 +3812,11 @@ class AddReportComponent {
|
|
|
3802
3812
|
});
|
|
3803
3813
|
}
|
|
3804
3814
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: AddReportComponent, deps: [{ token: i1$1.FormBuilder }, { token: ClientApiService }, { token: i1$2.NgbActiveModal }, { token: i4$2.ToastService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3805
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.10", type: AddReportComponent, selector: "lib-add-report", ngImport: i0, template: "<form [formGroup]=\"addReportForm\">\r\n <div class=\"row\">\r\n <div class=\"col-12 mb-5\">\r\n <svg width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" fill=\"#DAF1FF\"/>\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" stroke=\"#EAF8FF\" stroke-width=\"8\"/>\r\n <path d=\"M30 18H22C21.4696 18 20.9609 18.2107 20.5858 18.5858C20.2107 18.9609 20 19.4696 20 20V36C20 36.5304 20.2107 37.0391 20.5858 37.4142C20.9609 37.7893 21.4696 38 22 38H34C34.5304 38 35.0391 37.7893 35.4142 37.4142C35.7893 37.0391 36 36.5304 36 36V24M30 18L36 24M30 18V24H36M28 34V28M25 31H31\" stroke=\"#00A3FF\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg> \r\n </div>\r\n <div class=\"col-12 mb-10 header\">\r\n Add Report\r\n </div>\r\n <div class=\"col-12 mb-5\">\r\n <label for=\"fileName\" class=\"form-label\">
|
|
3815
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.10", type: AddReportComponent, selector: "lib-add-report", ngImport: i0, template: "<form [formGroup]=\"addReportForm\">\r\n <div class=\"row\">\r\n <div class=\"col-12 mb-5\">\r\n <svg width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" fill=\"#DAF1FF\"/>\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" stroke=\"#EAF8FF\" stroke-width=\"8\"/>\r\n <path d=\"M30 18H22C21.4696 18 20.9609 18.2107 20.5858 18.5858C20.2107 18.9609 20 19.4696 20 20V36C20 36.5304 20.2107 37.0391 20.5858 37.4142C20.9609 37.7893 21.4696 38 22 38H34C34.5304 38 35.0391 37.7893 35.4142 37.4142C35.7893 37.0391 36 36.5304 36 36V24M30 18L36 24M30 18V24H36M28 34V28M25 31H31\" stroke=\"#00A3FF\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg> \r\n </div>\r\n <div class=\"col-12 mb-10 header\">\r\n Add Report\r\n </div>\r\n <div class=\"col-12 mb-5\">\r\n <label for=\"fileName\" class=\"form-label\">Report Name<span class=\"alert-required\"></span></label>\r\n <input formControlName=\"fileName\" type=\"text\" class=\"form-control disabled-input\" id=\"fileName\"\r\n autocomplete=\"off\">\r\n </div>\r\n <div class=\"col-12 mb-5\">\r\n <label for=\"fileType\" class=\"form-label\">File Type<span class=\"alert-required\"></span></label>\r\n <input formControlName=\"fileType\" type=\"text\" class=\"form-control disabled-input\" id=\"fileType\"\r\n autocomplete=\"off\">\r\n </div>\r\n <div class=\"col-md-12\">\r\n <label for=\"infraDownTime\" class=\"form-label\">Receivers Email <span class=\"alert-required\"></span></label>\r\n <div class=\"outer-container\">\r\n <div class=\" input-container form-control\">\r\n <ng-container *ngFor=\"let email of emailList; let i = index\">\r\n <span class=\"chip\">\r\n <span class=\"me-3\">{{email}}</span>\r\n <span *ngIf=\"addReportForm.enabled\" (click)=\"removeChip(i)\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\"\r\n fill=\"none\">\r\n <path d=\"M9 3L3 9M3 3L9 9\" stroke=\"#667085\" stroke-width=\"1.5\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </span>\r\n </span>\r\n </ng-container>\r\n <textarea rows=\"5\" formControlName=\"email\" (keydown)=\"onKeyDown($event)\"></textarea>\r\n <!-- <input style=\"min-height: 44px;\" formControlName=\"email\" (keydown)=\"onKeyDown($event)\" type=\"text\"> -->\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"emailValidation.includes(false)\" class=\"text-danger mt-3\">Invalid Email Format</div>\r\n <div class=\"col-12 mt-10\">\r\n <div class=\"row\" >\r\n <div class=\"col \">\r\n <a type=\"button\" class=\"btn btn-outline w-100 \" (click)=\"onCancel()\">Cancel</a>\r\n </div>\r\n <div class=\"col\">\r\n <button type=\"submit\" class=\"btn btn-primary w-100\" (click)=\"onSubmit()\" [disabled]=\"addReportForm.invalid || emailValidation.includes(false)\"><span>Save Changes</span></button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</form>\r\n", styles: [":host{padding:1.5rem}.header{color:var(--Gray-900, #101828);font-size:18px;font-weight:600;line-height:28px}.form-control{display:block;height:45px;padding:.5rem 1rem;font-size:1.1rem;font-weight:400;color:var(--Gray-500, #667085);-webkit-appearance:none;appearance:none;border-radius:8px!important;border:1px solid var(--Gray-300, #D0D5DD)!important;background:var(--White, #FFF)!important;box-shadow:0 1px 2px #1018280d!important;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control[disabled]{background-color:#f9fafb!important}.is-invalid{border-radius:8px!important;border:1px solid var(--Error-300, #FDA29B)!important;background:var(--White, #FFF)!important;box-shadow:0 1px 2px #1018280d!important;padding-right:calc(1.5em + .75rem)!important;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzIyMDFfMjA5NTApIj4KPHBhdGggZD0iTTcuOTk5NjcgNS4zMzM5OFY4LjAwMDY1TTcuOTk5NjcgMTAuNjY3M0g4LjAwNjM0TTE0LjY2NjMgOC4wMDA2NUMxNC42NjYzIDExLjY4MjYgMTEuNjgxNiAxNC42NjczIDcuOTk5NjcgMTQuNjY3M0M0LjMxNzc4IDE0LjY2NzMgMS4zMzMwMSAxMS42ODI2IDEuMzMzMDEgOC4wMDA2NUMxLjMzMzAxIDQuMzE4NzUgNC4zMTc3OCAxLjMzMzk4IDcuOTk5NjcgMS4zMzM5OEMxMS42ODE2IDEuMzMzOTggMTQuNjY2MyA0LjMxODc1IDE0LjY2NjMgOC4wMDA2NVoiIHN0cm9rZT0iI0YwNDQzOCIgc3Ryb2tlLXdpZHRoPSIxLjMzMzMzIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8yMjAxXzIwOTUwIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=)!important;background-repeat:no-repeat!important;background-position:right calc(.375em + .1875rem) center!important;background-size:calc(.75em + .375rem) calc(.75em + .375rem)!important}small{color:var(--Error-500, #F04438)!important;font-size:14px!important;font-weight:400!important;line-height:20px;display:block;margin-top:6px}.cancel{border-radius:8px;border:1px solid #D0D5DD;background:#fff;color:#344054;font-family:Inter;font-size:14px;font-weight:600;line-height:20px;text-transform:capitalize}.apply{color:#fff;font-family:Inter;font-size:14px;font-style:normal;font-weight:600;line-height:20px;text-transform:capitalize}.outer-container{position:relative}.outer-container .form-control{padding-top:0;padding-bottom:0}.outer-container .input-container{border:1px solid black;height:100%;width:100%;display:flex;flex-wrap:wrap}.outer-container .input-container textarea{all:unset;flex:1;min-width:50px;line-height:16px}.outer-container .input-container .chip{margin:10px 0 10px 10px;padding:3px 10px;border-radius:16px;background:var(--Gray-100, #F2F4F7);color:var(--Gray-700, #344054);font-family:Inter;font-size:14px;font-weight:500;line-height:20px;height:25px}.outer-container .input-container .chip:nth-child(1){margin-left:0}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
3806
3816
|
}
|
|
3807
3817
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: AddReportComponent, decorators: [{
|
|
3808
3818
|
type: Component,
|
|
3809
|
-
args: [{ selector: 'lib-add-report', template: "<form [formGroup]=\"addReportForm\">\r\n <div class=\"row\">\r\n <div class=\"col-12 mb-5\">\r\n <svg width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" fill=\"#DAF1FF\"/>\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" stroke=\"#EAF8FF\" stroke-width=\"8\"/>\r\n <path d=\"M30 18H22C21.4696 18 20.9609 18.2107 20.5858 18.5858C20.2107 18.9609 20 19.4696 20 20V36C20 36.5304 20.2107 37.0391 20.5858 37.4142C20.9609 37.7893 21.4696 38 22 38H34C34.5304 38 35.0391 37.7893 35.4142 37.4142C35.7893 37.0391 36 36.5304 36 36V24M30 18L36 24M30 18V24H36M28 34V28M25 31H31\" stroke=\"#00A3FF\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg> \r\n </div>\r\n <div class=\"col-12 mb-10 header\">\r\n Add Report\r\n </div>\r\n <div class=\"col-12 mb-5\">\r\n <label for=\"fileName\" class=\"form-label\">
|
|
3819
|
+
args: [{ selector: 'lib-add-report', template: "<form [formGroup]=\"addReportForm\">\r\n <div class=\"row\">\r\n <div class=\"col-12 mb-5\">\r\n <svg width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" fill=\"#DAF1FF\"/>\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" stroke=\"#EAF8FF\" stroke-width=\"8\"/>\r\n <path d=\"M30 18H22C21.4696 18 20.9609 18.2107 20.5858 18.5858C20.2107 18.9609 20 19.4696 20 20V36C20 36.5304 20.2107 37.0391 20.5858 37.4142C20.9609 37.7893 21.4696 38 22 38H34C34.5304 38 35.0391 37.7893 35.4142 37.4142C35.7893 37.0391 36 36.5304 36 36V24M30 18L36 24M30 18V24H36M28 34V28M25 31H31\" stroke=\"#00A3FF\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg> \r\n </div>\r\n <div class=\"col-12 mb-10 header\">\r\n Add Report\r\n </div>\r\n <div class=\"col-12 mb-5\">\r\n <label for=\"fileName\" class=\"form-label\">Report Name<span class=\"alert-required\"></span></label>\r\n <input formControlName=\"fileName\" type=\"text\" class=\"form-control disabled-input\" id=\"fileName\"\r\n autocomplete=\"off\">\r\n </div>\r\n <div class=\"col-12 mb-5\">\r\n <label for=\"fileType\" class=\"form-label\">File Type<span class=\"alert-required\"></span></label>\r\n <input formControlName=\"fileType\" type=\"text\" class=\"form-control disabled-input\" id=\"fileType\"\r\n autocomplete=\"off\">\r\n </div>\r\n <div class=\"col-md-12\">\r\n <label for=\"infraDownTime\" class=\"form-label\">Receivers Email <span class=\"alert-required\"></span></label>\r\n <div class=\"outer-container\">\r\n <div class=\" input-container form-control\">\r\n <ng-container *ngFor=\"let email of emailList; let i = index\">\r\n <span class=\"chip\">\r\n <span class=\"me-3\">{{email}}</span>\r\n <span *ngIf=\"addReportForm.enabled\" (click)=\"removeChip(i)\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\"\r\n fill=\"none\">\r\n <path d=\"M9 3L3 9M3 3L9 9\" stroke=\"#667085\" stroke-width=\"1.5\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </span>\r\n </span>\r\n </ng-container>\r\n <textarea rows=\"5\" formControlName=\"email\" (keydown)=\"onKeyDown($event)\"></textarea>\r\n <!-- <input style=\"min-height: 44px;\" formControlName=\"email\" (keydown)=\"onKeyDown($event)\" type=\"text\"> -->\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"emailValidation.includes(false)\" class=\"text-danger mt-3\">Invalid Email Format</div>\r\n <div class=\"col-12 mt-10\">\r\n <div class=\"row\" >\r\n <div class=\"col \">\r\n <a type=\"button\" class=\"btn btn-outline w-100 \" (click)=\"onCancel()\">Cancel</a>\r\n </div>\r\n <div class=\"col\">\r\n <button type=\"submit\" class=\"btn btn-primary w-100\" (click)=\"onSubmit()\" [disabled]=\"addReportForm.invalid || emailValidation.includes(false)\"><span>Save Changes</span></button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</form>\r\n", styles: [":host{padding:1.5rem}.header{color:var(--Gray-900, #101828);font-size:18px;font-weight:600;line-height:28px}.form-control{display:block;height:45px;padding:.5rem 1rem;font-size:1.1rem;font-weight:400;color:var(--Gray-500, #667085);-webkit-appearance:none;appearance:none;border-radius:8px!important;border:1px solid var(--Gray-300, #D0D5DD)!important;background:var(--White, #FFF)!important;box-shadow:0 1px 2px #1018280d!important;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control[disabled]{background-color:#f9fafb!important}.is-invalid{border-radius:8px!important;border:1px solid var(--Error-300, #FDA29B)!important;background:var(--White, #FFF)!important;box-shadow:0 1px 2px #1018280d!important;padding-right:calc(1.5em + .75rem)!important;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzIyMDFfMjA5NTApIj4KPHBhdGggZD0iTTcuOTk5NjcgNS4zMzM5OFY4LjAwMDY1TTcuOTk5NjcgMTAuNjY3M0g4LjAwNjM0TTE0LjY2NjMgOC4wMDA2NUMxNC42NjYzIDExLjY4MjYgMTEuNjgxNiAxNC42NjczIDcuOTk5NjcgMTQuNjY3M0M0LjMxNzc4IDE0LjY2NzMgMS4zMzMwMSAxMS42ODI2IDEuMzMzMDEgOC4wMDA2NUMxLjMzMzAxIDQuMzE4NzUgNC4zMTc3OCAxLjMzMzk4IDcuOTk5NjcgMS4zMzM5OEMxMS42ODE2IDEuMzMzOTggMTQuNjY2MyA0LjMxODc1IDE0LjY2NjMgOC4wMDA2NVoiIHN0cm9rZT0iI0YwNDQzOCIgc3Ryb2tlLXdpZHRoPSIxLjMzMzMzIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8yMjAxXzIwOTUwIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=)!important;background-repeat:no-repeat!important;background-position:right calc(.375em + .1875rem) center!important;background-size:calc(.75em + .375rem) calc(.75em + .375rem)!important}small{color:var(--Error-500, #F04438)!important;font-size:14px!important;font-weight:400!important;line-height:20px;display:block;margin-top:6px}.cancel{border-radius:8px;border:1px solid #D0D5DD;background:#fff;color:#344054;font-family:Inter;font-size:14px;font-weight:600;line-height:20px;text-transform:capitalize}.apply{color:#fff;font-family:Inter;font-size:14px;font-style:normal;font-weight:600;line-height:20px;text-transform:capitalize}.outer-container{position:relative}.outer-container .form-control{padding-top:0;padding-bottom:0}.outer-container .input-container{border:1px solid black;height:100%;width:100%;display:flex;flex-wrap:wrap}.outer-container .input-container textarea{all:unset;flex:1;min-width:50px;line-height:16px}.outer-container .input-container .chip{margin:10px 0 10px 10px;padding:3px 10px;border-radius:16px;background:var(--Gray-100, #F2F4F7);color:var(--Gray-700, #344054);font-family:Inter;font-size:14px;font-weight:500;line-height:20px;height:25px}.outer-container .input-container .chip:nth-child(1){margin-left:0}\n"] }]
|
|
3810
3820
|
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: ClientApiService }, { type: i1$2.NgbActiveModal }, { type: i4$2.ToastService }] });
|
|
3811
3821
|
|
|
3812
3822
|
class ReportConfigurationComponent {
|
|
@@ -3823,6 +3833,7 @@ class ReportConfigurationComponent {
|
|
|
3823
3833
|
clientId;
|
|
3824
3834
|
selectedReport;
|
|
3825
3835
|
destroy$ = new Subject();
|
|
3836
|
+
emailValidation = [];
|
|
3826
3837
|
constructor(fb, apiService, modalService, toaster, cd, gs) {
|
|
3827
3838
|
this.fb = fb;
|
|
3828
3839
|
this.apiService = apiService;
|
|
@@ -3842,6 +3853,11 @@ class ReportConfigurationComponent {
|
|
|
3842
3853
|
this.destroy$.next(true);
|
|
3843
3854
|
this.destroy$.complete();
|
|
3844
3855
|
}
|
|
3856
|
+
emailValidator(value) {
|
|
3857
|
+
const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
|
3858
|
+
const valid = emailRegex.test(value);
|
|
3859
|
+
this.emailValidation.push(valid);
|
|
3860
|
+
}
|
|
3845
3861
|
ngAfterViewInit() {
|
|
3846
3862
|
this.reportConfigurationForm.get('email')?.valueChanges
|
|
3847
3863
|
.pipe(map((value) => value.replace(/\n/g, '').replace(/\s/g, '')))
|
|
@@ -3849,7 +3865,9 @@ class ReportConfigurationComponent {
|
|
|
3849
3865
|
return this.$emailInterrupt.pipe(takeUntil(this.destroy$)).pipe(map((interrupt) => {
|
|
3850
3866
|
if (interrupt === 'Enter') {
|
|
3851
3867
|
this.$emailInterrupt.next('');
|
|
3868
|
+
this.emailValidation = [];
|
|
3852
3869
|
this.emailList.push(val);
|
|
3870
|
+
this.emailList.forEach((element) => { this.emailValidator(element); });
|
|
3853
3871
|
this.reportConfigurationForm.get('email')?.setValue('');
|
|
3854
3872
|
}
|
|
3855
3873
|
else if (interrupt === 'Backspace' && !val && this.emailList.length) {
|
|
@@ -3864,7 +3882,7 @@ class ReportConfigurationComponent {
|
|
|
3864
3882
|
initForm() {
|
|
3865
3883
|
this.reportConfigurationForm = this.fb.group({
|
|
3866
3884
|
fileName: [''],
|
|
3867
|
-
fileType: [''],
|
|
3885
|
+
fileType: ['', Validators.required],
|
|
3868
3886
|
email: ['']
|
|
3869
3887
|
});
|
|
3870
3888
|
this.reportConfigurationForm.disable();
|
|
@@ -3893,6 +3911,8 @@ class ReportConfigurationComponent {
|
|
|
3893
3911
|
}
|
|
3894
3912
|
removeChip(i) {
|
|
3895
3913
|
this.emailList.splice(i, 1);
|
|
3914
|
+
this.emailValidation = [];
|
|
3915
|
+
this.emailList.forEach((element) => { this.emailValidator(element); });
|
|
3896
3916
|
}
|
|
3897
3917
|
onReportSelect(event) {
|
|
3898
3918
|
this.selectedReport = event;
|
|
@@ -3940,11 +3960,11 @@ class ReportConfigurationComponent {
|
|
|
3940
3960
|
});
|
|
3941
3961
|
}
|
|
3942
3962
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: ReportConfigurationComponent, deps: [{ token: i1$1.FormBuilder }, { token: ClientApiService }, { token: i1$2.NgbModal }, { token: i4$2.ToastService }, { token: i0.ChangeDetectorRef }, { token: i3.GlobalStateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3943
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.10", type: ReportConfigurationComponent, selector: "lib-report-configuration", ngImport: i0, template: "<form [formGroup]=\"reportConfigurationForm\">\r\n <div class=\"row\">\r\n <ng-container *ngIf=\"(gs.userAccess | async)?.settings_configuration_isEdit \" >\r\n <div class=\"col-12 mb-5\">\r\n <div class=\" d-flex justify-content-end\">\r\n <button *ngIf=\"reportConfigurationForm.disabled\"\r\n (click)=\"reportConfigurationForm.disabled ? reportConfigurationForm.enable() : reportConfigurationForm.disable()\"\r\n type=\"button\" class=\"btn btn-outline align-items-end me-5\"><span class=\"me-2\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_2579_25125)\">\r\n <path\r\n d=\"M14.167 2.49993C14.3859 2.28106 14.6457 2.10744 14.9317 1.98899C15.2176 1.87054 15.5241 1.80957 15.8337 1.80957C16.1432 1.80957 16.4497 1.87054 16.7357 1.98899C17.0216 2.10744 17.2815 2.28106 17.5003 2.49993C17.7192 2.7188 17.8928 2.97863 18.0113 3.2646C18.1297 3.55057 18.1907 3.85706 18.1907 4.16659C18.1907 4.47612 18.1297 4.78262 18.0113 5.06859C17.8928 5.35455 17.7192 5.61439 17.5003 5.83326L6.25033 17.0833L1.66699 18.3333L2.91699 13.7499L14.167 2.49993Z\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_2579_25125\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\" />\r\n </clipPath>\r\n </defs>\r\n </svg></span>Edit Details</button>\r\n <button [disabled]=\"reportConfigurationForm.disabled\" (click)=\"openAddModal()\" type=\"button\" class=\"btn btn-primary align-items-end\"><span\r\n class=\"me-2\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M10.0003 4.16663V15.8333M4.16699 9.99996H15.8337\" stroke=\"white\" stroke-width=\"2\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </span>Add Report</button>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-5\">\r\n <label for=\"infraDownTime\" class=\"form-label\">Report Name <span class=\"alert-required\"></span></label>\r\n <lib-select [items]=\"reportList\" [multi]=\"false\" [searchField]=\"'fileName'\"\r\n [disabled]=\"reportConfigurationForm.get('fileName')?.disabled\" [idField]=\"'_id'\"\r\n (selected)=\"onReportSelect($event)\" [selectedValues]=\"[selectedReport]\"></lib-select>\r\n </div>\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-5\">\r\n <label for=\"count\" class=\"form-label\">File Type<span class=\"alert-required\"></span></label>\r\n <input formControlName=\"fileType\" type=\"text\" class=\"form-control disabled-input\" id=\"count\"\r\n autocomplete=\"off\">\r\n </div>\r\n\r\n <div class=\"col-md-12 col-lg-12 col-xl-12 col-xxl-12 mb-5\">\r\n <label for=\"infraDownTime\" class=\"form-label\">Receivers Email <span class=\"alert-required\"></span></label>\r\n <div class=\"outer-container\">\r\n <div class=\" input-container form-control\">\r\n <ng-container *ngFor=\"let domain of emailList; let i = index\">\r\n <span class=\"chip\">\r\n <span class=\"me-3\">{{domain}}</span>\r\n <span *ngIf=\"reportConfigurationForm.enabled\" (click)=\"removeChip(i)\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\"\r\n fill=\"none\">\r\n <path d=\"M9 3L3 9M3 3L9 9\" stroke=\"#667085\" stroke-width=\"1.5\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </span>\r\n </span>\r\n </ng-container>\r\n <input style=\"min-height: 44px;\" formControlName=\"email\" (keydown)=\"onKeyDown($event)\" type=\"text\">\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n <div *ngIf=\"reportConfigurationForm.enabled\">\r\n <div class=\"mb-5 w-100 footer-seperator\"></div>\r\n <div class=\"d-flex justify-content-end\">\r\n <a type=\"button\" class=\"btn btn-outline me-4\" (click)=\"onCancel()\">Cancel</a>\r\n <a type=\"submit\" class=\"btn btn-primary px-4 \" (click)=\"onSubmit()\"><span>Save Changes</span></a>\r\n </div>\r\n </div>\r\n\r\n</form>", styles: [".form-control{display:block;height:45px;padding:.5rem 1rem;font-size:1.1rem;font-weight:400;color:var(--Gray-500, #667085);-webkit-appearance:none;appearance:none;border-radius:8px!important;border:1px solid var(--Gray-300, #D0D5DD)!important;background:var(--White, #FFF)!important;box-shadow:0 1px 2px #1018280d!important;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control[disabled]{background-color:#f9fafb!important}.is-invalid{border-radius:8px!important;border:1px solid var(--Error-300, #FDA29B)!important;background:var(--White, #FFF)!important;box-shadow:0 1px 2px #1018280d!important;padding-right:calc(1.5em + .75rem)!important;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzIyMDFfMjA5NTApIj4KPHBhdGggZD0iTTcuOTk5NjcgNS4zMzM5OFY4LjAwMDY1TTcuOTk5NjcgMTAuNjY3M0g4LjAwNjM0TTE0LjY2NjMgOC4wMDA2NUMxNC42NjYzIDExLjY4MjYgMTEuNjgxNiAxNC42NjczIDcuOTk5NjcgMTQuNjY3M0M0LjMxNzc4IDE0LjY2NzMgMS4zMzMwMSAxMS42ODI2IDEuMzMzMDEgOC4wMDA2NUMxLjMzMzAxIDQuMzE4NzUgNC4zMTc3OCAxLjMzMzk4IDcuOTk5NjcgMS4zMzM5OEMxMS42ODE2IDEuMzMzOTggMTQuNjY2MyA0LjMxODc1IDE0LjY2NjMgOC4wMDA2NVoiIHN0cm9rZT0iI0YwNDQzOCIgc3Ryb2tlLXdpZHRoPSIxLjMzMzMzIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8yMjAxXzIwOTUwIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=)!important;background-repeat:no-repeat!important;background-position:right calc(.375em + .1875rem) center!important;background-size:calc(.75em + .375rem) calc(.75em + .375rem)!important}small{color:var(--Error-500, #F04438)!important;font-size:14px!important;font-weight:400!important;line-height:20px;display:block;margin-top:6px}.cancel{border-radius:8px;border:1px solid #D0D5DD;background:#fff;color:#344054;font-family:Inter;font-size:14px;font-weight:600;line-height:20px;text-transform:capitalize}.apply{color:#fff;font-family:Inter;font-size:14px;font-style:normal;font-weight:600;line-height:20px;text-transform:capitalize}.footer-seperator{border-top:1px solid #EAECF0}:host{width:100%;height:100%}.outer-container{position:relative}.outer-container .form-control{padding-top:0;padding-bottom:0}.outer-container .input-container{border:1px solid black;height:100%;width:100%;display:flex;flex-wrap:wrap}.outer-container .input-container input{all:unset;flex:1;min-width:50px}.outer-container .input-container .chip{margin:10px 0 10px 10px;padding:3px 10px;border-radius:16px;background:var(--Gray-100, #F2F4F7);color:var(--Gray-700, #344054);font-family:Inter;font-size:14px;font-weight:500;line-height:20px}.outer-container .input-container .chip:nth-child(1){margin-left:0}.sso-label{color:var(--Gray-700, #344054);font-family:Inter;font-size:18px;font-weight:600;line-height:28px}.sso-sub{color:var(--Gray-500, #667085);font-family:Inter;font-size:16px;font-weight:500;line-height:24px}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4$2.CustomSelectComponent, selector: "lib-select", inputs: ["items", "searchField", "multi", "idField", "selectedValues", "disabled", "label"], outputs: ["selected"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }] });
|
|
3963
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.10", type: ReportConfigurationComponent, selector: "lib-report-configuration", ngImport: i0, template: "<form [formGroup]=\"reportConfigurationForm\">\r\n <div class=\"row\">\r\n <ng-container *ngIf=\"(gs.userAccess | async)?.settings_configuration_isEdit \" >\r\n <div class=\"col-12 mb-5\">\r\n <div class=\" d-flex justify-content-end\">\r\n <button *ngIf=\"reportConfigurationForm.disabled\"\r\n (click)=\"reportConfigurationForm.disabled ? reportConfigurationForm.enable() : reportConfigurationForm.disable()\"\r\n type=\"button\" class=\"btn btn-outline align-items-end me-5\"><span class=\"me-2\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_2579_25125)\">\r\n <path\r\n d=\"M14.167 2.49993C14.3859 2.28106 14.6457 2.10744 14.9317 1.98899C15.2176 1.87054 15.5241 1.80957 15.8337 1.80957C16.1432 1.80957 16.4497 1.87054 16.7357 1.98899C17.0216 2.10744 17.2815 2.28106 17.5003 2.49993C17.7192 2.7188 17.8928 2.97863 18.0113 3.2646C18.1297 3.55057 18.1907 3.85706 18.1907 4.16659C18.1907 4.47612 18.1297 4.78262 18.0113 5.06859C17.8928 5.35455 17.7192 5.61439 17.5003 5.83326L6.25033 17.0833L1.66699 18.3333L2.91699 13.7499L14.167 2.49993Z\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_2579_25125\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\" />\r\n </clipPath>\r\n </defs>\r\n </svg></span>Edit Details</button>\r\n <button [disabled]=\"reportConfigurationForm.disabled\" (click)=\"openAddModal()\" type=\"button\" class=\"btn btn-primary align-items-end\"><span\r\n class=\"me-2\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M10.0003 4.16663V15.8333M4.16699 9.99996H15.8337\" stroke=\"white\" stroke-width=\"2\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </span>Add Report</button>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-5\">\r\n <label for=\"infraDownTime\" class=\"form-label\">Report Name <span class=\"alert-required\"></span></label>\r\n <lib-select [items]=\"reportList\" [multi]=\"false\" [searchField]=\"'fileName'\"\r\n [disabled]=\"reportConfigurationForm.get('fileName')?.disabled\" [idField]=\"'_id'\"\r\n (selected)=\"onReportSelect($event)\" [selectedValues]=\"[selectedReport]\"></lib-select>\r\n </div>\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-5\">\r\n <label for=\"count\" class=\"form-label\">File Type<span class=\"alert-required\"></span></label>\r\n <input formControlName=\"fileType\" type=\"text\" class=\"form-control disabled-input\" id=\"count\"\r\n autocomplete=\"off\">\r\n </div>\r\n\r\n <div class=\"col-md-12 col-lg-12 col-xl-12 col-xxl-12 mb-5\">\r\n <label for=\"infraDownTime\" class=\"form-label\">Receivers Email <span class=\"alert-required\"></span></label>\r\n <div class=\"outer-container\">\r\n <div class=\" input-container form-control\">\r\n <ng-container *ngFor=\"let domain of emailList; let i = index\">\r\n <span class=\"chip\">\r\n <span class=\"me-3\">{{domain}}</span>\r\n <span *ngIf=\"reportConfigurationForm.enabled\" (click)=\"removeChip(i)\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\"\r\n fill=\"none\">\r\n <path d=\"M9 3L3 9M3 3L9 9\" stroke=\"#667085\" stroke-width=\"1.5\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </span>\r\n </span>\r\n </ng-container>\r\n <input style=\"min-height: 44px;\" formControlName=\"email\" (keydown)=\"onKeyDown($event)\" type=\"text\">\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n <div *ngIf=\"emailValidation.includes(false)\" class=\"text-danger mt-3\">Invalid Email Format</div>\r\n\r\n <div *ngIf=\"reportConfigurationForm.enabled\">\r\n <div class=\"mb-5 w-100 footer-seperator\"></div>\r\n <div class=\"d-flex justify-content-end\">\r\n <a type=\"button\" class=\"btn btn-outline me-4 align-content-center\" (click)=\"onCancel()\">Cancel</a>\r\n <button type=\"button\" class=\"btn btn-primary px-4\" [disabled]=\"reportConfigurationForm.invalid || !emailList?.length || emailValidation.includes(false)\" (click)=\"onSubmit()\"><span>Save Changes</span></button>\r\n </div>\r\n </div>\r\n\r\n</form>", styles: [".form-control{display:block;height:45px;padding:.5rem 1rem;font-size:1.1rem;font-weight:400;color:var(--Gray-500, #667085);-webkit-appearance:none;appearance:none;border-radius:8px!important;border:1px solid var(--Gray-300, #D0D5DD)!important;background:var(--White, #FFF)!important;box-shadow:0 1px 2px #1018280d!important;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control[disabled]{background-color:#f9fafb!important}.is-invalid{border-radius:8px!important;border:1px solid var(--Error-300, #FDA29B)!important;background:var(--White, #FFF)!important;box-shadow:0 1px 2px #1018280d!important;padding-right:calc(1.5em + .75rem)!important;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzIyMDFfMjA5NTApIj4KPHBhdGggZD0iTTcuOTk5NjcgNS4zMzM5OFY4LjAwMDY1TTcuOTk5NjcgMTAuNjY3M0g4LjAwNjM0TTE0LjY2NjMgOC4wMDA2NUMxNC42NjYzIDExLjY4MjYgMTEuNjgxNiAxNC42NjczIDcuOTk5NjcgMTQuNjY3M0M0LjMxNzc4IDE0LjY2NzMgMS4zMzMwMSAxMS42ODI2IDEuMzMzMDEgOC4wMDA2NUMxLjMzMzAxIDQuMzE4NzUgNC4zMTc3OCAxLjMzMzk4IDcuOTk5NjcgMS4zMzM5OEMxMS42ODE2IDEuMzMzOTggMTQuNjY2MyA0LjMxODc1IDE0LjY2NjMgOC4wMDA2NVoiIHN0cm9rZT0iI0YwNDQzOCIgc3Ryb2tlLXdpZHRoPSIxLjMzMzMzIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8yMjAxXzIwOTUwIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=)!important;background-repeat:no-repeat!important;background-position:right calc(.375em + .1875rem) center!important;background-size:calc(.75em + .375rem) calc(.75em + .375rem)!important}small{color:var(--Error-500, #F04438)!important;font-size:14px!important;font-weight:400!important;line-height:20px;display:block;margin-top:6px}.cancel{border-radius:8px;border:1px solid #D0D5DD;background:#fff;color:#344054;font-family:Inter;font-size:14px;font-weight:600;line-height:20px;text-transform:capitalize}.apply{color:#fff;font-family:Inter;font-size:14px;font-style:normal;font-weight:600;line-height:20px;text-transform:capitalize}.footer-seperator{border-top:1px solid #EAECF0}:host{width:100%;height:100%}.outer-container{position:relative}.outer-container .form-control{padding-top:0;padding-bottom:0}.outer-container .input-container{border:1px solid black;height:100%;width:100%;display:flex;flex-wrap:wrap}.outer-container .input-container input{all:unset;flex:1;min-width:50px}.outer-container .input-container .chip{margin:10px 0 10px 10px;padding:3px 10px;border-radius:16px;background:var(--Gray-100, #F2F4F7);color:var(--Gray-700, #344054);font-family:Inter;font-size:14px;font-weight:500;line-height:20px}.outer-container .input-container .chip:nth-child(1){margin-left:0}.sso-label{color:var(--Gray-700, #344054);font-family:Inter;font-size:18px;font-weight:600;line-height:28px}.sso-sub{color:var(--Gray-500, #667085);font-family:Inter;font-size:16px;font-weight:500;line-height:24px}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4$2.CustomSelectComponent, selector: "lib-select", inputs: ["items", "searchField", "multi", "idField", "selectedValues", "disabled", "label"], outputs: ["selected"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }] });
|
|
3944
3964
|
}
|
|
3945
3965
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: ReportConfigurationComponent, decorators: [{
|
|
3946
3966
|
type: Component,
|
|
3947
|
-
args: [{ selector: 'lib-report-configuration', template: "<form [formGroup]=\"reportConfigurationForm\">\r\n <div class=\"row\">\r\n <ng-container *ngIf=\"(gs.userAccess | async)?.settings_configuration_isEdit \" >\r\n <div class=\"col-12 mb-5\">\r\n <div class=\" d-flex justify-content-end\">\r\n <button *ngIf=\"reportConfigurationForm.disabled\"\r\n (click)=\"reportConfigurationForm.disabled ? reportConfigurationForm.enable() : reportConfigurationForm.disable()\"\r\n type=\"button\" class=\"btn btn-outline align-items-end me-5\"><span class=\"me-2\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_2579_25125)\">\r\n <path\r\n d=\"M14.167 2.49993C14.3859 2.28106 14.6457 2.10744 14.9317 1.98899C15.2176 1.87054 15.5241 1.80957 15.8337 1.80957C16.1432 1.80957 16.4497 1.87054 16.7357 1.98899C17.0216 2.10744 17.2815 2.28106 17.5003 2.49993C17.7192 2.7188 17.8928 2.97863 18.0113 3.2646C18.1297 3.55057 18.1907 3.85706 18.1907 4.16659C18.1907 4.47612 18.1297 4.78262 18.0113 5.06859C17.8928 5.35455 17.7192 5.61439 17.5003 5.83326L6.25033 17.0833L1.66699 18.3333L2.91699 13.7499L14.167 2.49993Z\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_2579_25125\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\" />\r\n </clipPath>\r\n </defs>\r\n </svg></span>Edit Details</button>\r\n <button [disabled]=\"reportConfigurationForm.disabled\" (click)=\"openAddModal()\" type=\"button\" class=\"btn btn-primary align-items-end\"><span\r\n class=\"me-2\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M10.0003 4.16663V15.8333M4.16699 9.99996H15.8337\" stroke=\"white\" stroke-width=\"2\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </span>Add Report</button>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-5\">\r\n <label for=\"infraDownTime\" class=\"form-label\">Report Name <span class=\"alert-required\"></span></label>\r\n <lib-select [items]=\"reportList\" [multi]=\"false\" [searchField]=\"'fileName'\"\r\n [disabled]=\"reportConfigurationForm.get('fileName')?.disabled\" [idField]=\"'_id'\"\r\n (selected)=\"onReportSelect($event)\" [selectedValues]=\"[selectedReport]\"></lib-select>\r\n </div>\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-5\">\r\n <label for=\"count\" class=\"form-label\">File Type<span class=\"alert-required\"></span></label>\r\n <input formControlName=\"fileType\" type=\"text\" class=\"form-control disabled-input\" id=\"count\"\r\n autocomplete=\"off\">\r\n </div>\r\n\r\n <div class=\"col-md-12 col-lg-12 col-xl-12 col-xxl-12 mb-5\">\r\n <label for=\"infraDownTime\" class=\"form-label\">Receivers Email <span class=\"alert-required\"></span></label>\r\n <div class=\"outer-container\">\r\n <div class=\" input-container form-control\">\r\n <ng-container *ngFor=\"let domain of emailList; let i = index\">\r\n <span class=\"chip\">\r\n <span class=\"me-3\">{{domain}}</span>\r\n <span *ngIf=\"reportConfigurationForm.enabled\" (click)=\"removeChip(i)\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\"\r\n fill=\"none\">\r\n <path d=\"M9 3L3 9M3 3L9 9\" stroke=\"#667085\" stroke-width=\"1.5\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </span>\r\n </span>\r\n </ng-container>\r\n <input style=\"min-height: 44px;\" formControlName=\"email\" (keydown)=\"onKeyDown($event)\" type=\"text\">\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n <div *ngIf=\"reportConfigurationForm.enabled\">\r\n <div class=\"mb-5 w-100 footer-seperator\"></div>\r\n <div class=\"d-flex justify-content-end\">\r\n <a type=\"button\" class=\"btn btn-outline me-4\" (click)=\"onCancel()\">Cancel</a>\r\n <
|
|
3967
|
+
args: [{ selector: 'lib-report-configuration', template: "<form [formGroup]=\"reportConfigurationForm\">\r\n <div class=\"row\">\r\n <ng-container *ngIf=\"(gs.userAccess | async)?.settings_configuration_isEdit \" >\r\n <div class=\"col-12 mb-5\">\r\n <div class=\" d-flex justify-content-end\">\r\n <button *ngIf=\"reportConfigurationForm.disabled\"\r\n (click)=\"reportConfigurationForm.disabled ? reportConfigurationForm.enable() : reportConfigurationForm.disable()\"\r\n type=\"button\" class=\"btn btn-outline align-items-end me-5\"><span class=\"me-2\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_2579_25125)\">\r\n <path\r\n d=\"M14.167 2.49993C14.3859 2.28106 14.6457 2.10744 14.9317 1.98899C15.2176 1.87054 15.5241 1.80957 15.8337 1.80957C16.1432 1.80957 16.4497 1.87054 16.7357 1.98899C17.0216 2.10744 17.2815 2.28106 17.5003 2.49993C17.7192 2.7188 17.8928 2.97863 18.0113 3.2646C18.1297 3.55057 18.1907 3.85706 18.1907 4.16659C18.1907 4.47612 18.1297 4.78262 18.0113 5.06859C17.8928 5.35455 17.7192 5.61439 17.5003 5.83326L6.25033 17.0833L1.66699 18.3333L2.91699 13.7499L14.167 2.49993Z\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_2579_25125\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\" />\r\n </clipPath>\r\n </defs>\r\n </svg></span>Edit Details</button>\r\n <button [disabled]=\"reportConfigurationForm.disabled\" (click)=\"openAddModal()\" type=\"button\" class=\"btn btn-primary align-items-end\"><span\r\n class=\"me-2\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M10.0003 4.16663V15.8333M4.16699 9.99996H15.8337\" stroke=\"white\" stroke-width=\"2\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </span>Add Report</button>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-5\">\r\n <label for=\"infraDownTime\" class=\"form-label\">Report Name <span class=\"alert-required\"></span></label>\r\n <lib-select [items]=\"reportList\" [multi]=\"false\" [searchField]=\"'fileName'\"\r\n [disabled]=\"reportConfigurationForm.get('fileName')?.disabled\" [idField]=\"'_id'\"\r\n (selected)=\"onReportSelect($event)\" [selectedValues]=\"[selectedReport]\"></lib-select>\r\n </div>\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-5\">\r\n <label for=\"count\" class=\"form-label\">File Type<span class=\"alert-required\"></span></label>\r\n <input formControlName=\"fileType\" type=\"text\" class=\"form-control disabled-input\" id=\"count\"\r\n autocomplete=\"off\">\r\n </div>\r\n\r\n <div class=\"col-md-12 col-lg-12 col-xl-12 col-xxl-12 mb-5\">\r\n <label for=\"infraDownTime\" class=\"form-label\">Receivers Email <span class=\"alert-required\"></span></label>\r\n <div class=\"outer-container\">\r\n <div class=\" input-container form-control\">\r\n <ng-container *ngFor=\"let domain of emailList; let i = index\">\r\n <span class=\"chip\">\r\n <span class=\"me-3\">{{domain}}</span>\r\n <span *ngIf=\"reportConfigurationForm.enabled\" (click)=\"removeChip(i)\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\"\r\n fill=\"none\">\r\n <path d=\"M9 3L3 9M3 3L9 9\" stroke=\"#667085\" stroke-width=\"1.5\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </span>\r\n </span>\r\n </ng-container>\r\n <input style=\"min-height: 44px;\" formControlName=\"email\" (keydown)=\"onKeyDown($event)\" type=\"text\">\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n <div *ngIf=\"emailValidation.includes(false)\" class=\"text-danger mt-3\">Invalid Email Format</div>\r\n\r\n <div *ngIf=\"reportConfigurationForm.enabled\">\r\n <div class=\"mb-5 w-100 footer-seperator\"></div>\r\n <div class=\"d-flex justify-content-end\">\r\n <a type=\"button\" class=\"btn btn-outline me-4 align-content-center\" (click)=\"onCancel()\">Cancel</a>\r\n <button type=\"button\" class=\"btn btn-primary px-4\" [disabled]=\"reportConfigurationForm.invalid || !emailList?.length || emailValidation.includes(false)\" (click)=\"onSubmit()\"><span>Save Changes</span></button>\r\n </div>\r\n </div>\r\n\r\n</form>", styles: [".form-control{display:block;height:45px;padding:.5rem 1rem;font-size:1.1rem;font-weight:400;color:var(--Gray-500, #667085);-webkit-appearance:none;appearance:none;border-radius:8px!important;border:1px solid var(--Gray-300, #D0D5DD)!important;background:var(--White, #FFF)!important;box-shadow:0 1px 2px #1018280d!important;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control[disabled]{background-color:#f9fafb!important}.is-invalid{border-radius:8px!important;border:1px solid var(--Error-300, #FDA29B)!important;background:var(--White, #FFF)!important;box-shadow:0 1px 2px #1018280d!important;padding-right:calc(1.5em + .75rem)!important;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzIyMDFfMjA5NTApIj4KPHBhdGggZD0iTTcuOTk5NjcgNS4zMzM5OFY4LjAwMDY1TTcuOTk5NjcgMTAuNjY3M0g4LjAwNjM0TTE0LjY2NjMgOC4wMDA2NUMxNC42NjYzIDExLjY4MjYgMTEuNjgxNiAxNC42NjczIDcuOTk5NjcgMTQuNjY3M0M0LjMxNzc4IDE0LjY2NzMgMS4zMzMwMSAxMS42ODI2IDEuMzMzMDEgOC4wMDA2NUMxLjMzMzAxIDQuMzE4NzUgNC4zMTc3OCAxLjMzMzk4IDcuOTk5NjcgMS4zMzM5OEMxMS42ODE2IDEuMzMzOTggMTQuNjY2MyA0LjMxODc1IDE0LjY2NjMgOC4wMDA2NVoiIHN0cm9rZT0iI0YwNDQzOCIgc3Ryb2tlLXdpZHRoPSIxLjMzMzMzIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8yMjAxXzIwOTUwIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=)!important;background-repeat:no-repeat!important;background-position:right calc(.375em + .1875rem) center!important;background-size:calc(.75em + .375rem) calc(.75em + .375rem)!important}small{color:var(--Error-500, #F04438)!important;font-size:14px!important;font-weight:400!important;line-height:20px;display:block;margin-top:6px}.cancel{border-radius:8px;border:1px solid #D0D5DD;background:#fff;color:#344054;font-family:Inter;font-size:14px;font-weight:600;line-height:20px;text-transform:capitalize}.apply{color:#fff;font-family:Inter;font-size:14px;font-style:normal;font-weight:600;line-height:20px;text-transform:capitalize}.footer-seperator{border-top:1px solid #EAECF0}:host{width:100%;height:100%}.outer-container{position:relative}.outer-container .form-control{padding-top:0;padding-bottom:0}.outer-container .input-container{border:1px solid black;height:100%;width:100%;display:flex;flex-wrap:wrap}.outer-container .input-container input{all:unset;flex:1;min-width:50px}.outer-container .input-container .chip{margin:10px 0 10px 10px;padding:3px 10px;border-radius:16px;background:var(--Gray-100, #F2F4F7);color:var(--Gray-700, #344054);font-family:Inter;font-size:14px;font-weight:500;line-height:20px}.outer-container .input-container .chip:nth-child(1){margin-left:0}.sso-label{color:var(--Gray-700, #344054);font-family:Inter;font-size:18px;font-weight:600;line-height:28px}.sso-sub{color:var(--Gray-500, #667085);font-family:Inter;font-size:16px;font-weight:500;line-height:24px}\n"] }]
|
|
3948
3968
|
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: ClientApiService }, { type: i1$2.NgbModal }, { type: i4$2.ToastService }, { type: i0.ChangeDetectorRef }, { type: i3.GlobalStateService }] });
|
|
3949
3969
|
|
|
3950
3970
|
class UserConfigurationComponent {
|