ng-ipa-library 6.2.24 → 6.2.29

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.
@@ -482,11 +482,11 @@ class TextareaInputComponent {
482
482
  return this.errorMsg;
483
483
  }
484
484
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TextareaInputComponent, deps: [{ token: IPAFormService }, { token: i2$1.NgControl, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
485
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TextareaInputComponent, isStandalone: false, selector: "ipa-textarea-input", inputs: { isPlatformCodeDesignSystem: "isPlatformCodeDesignSystem", id: "id", label: "label", placeholder: "placeholder", required: "required", patternErrorMsg: "patternErrorMsg", pattern: "pattern", classes: "classes", containerClasses: "containerClasses", isArabicForm: "isArabicForm" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true, static: true }], ngImport: i0, template: "<!-- none platform code design system -->\r\n<div class=\"form-floating {{containerClasses}}\" [ngClass]=\"{'d-none': isPlatformCodeDesignSystem}\">\r\n <textarea #input id=\"{{id}}\" class=\"form-control {{classes}}\" [required]=\"required\" pattern=\"{{pattern}}\"\r\n placeholder=\"{{placeholder}}\" [formControl]=\"formControl\" (input)=\"onChange(controlDir.control?.value)\"\r\n (blur)=\"onTouched()\" style=\"height: 135px;\"\r\n [ngClass]=\"{\r\n 'is-invalid is-invalid:focus': (controlDir.control?.invalid && (controlDir.control?.dirty || controlDir.control?.touched)) && errorMsg,\r\n 'is-valid is-valid:focus': (controlDir.control?.valid && (controlDir.control?.dirty || controlDir.control?.touched) && (errorMsg || controlDir.value))}\">\r\n </textarea>\r\n <label for=\"{{id}}\"><span *ngIf=\"required\" class=\"text-danger\">*</span> {{label}}</label>\r\n <div class=\"invalid-feedback\" *ngIf=\"errorMessage !== null\">\r\n {{errorMsg}}\r\n </div>\r\n</div>\r\n<!-- platform code design system -->\r\n<div class=\"{{containerClasses}}\" [ngClass]=\"{'d-none': !isPlatformCodeDesignSystem}\">\r\n <label for=\"{{id}}\"><span *ngIf=\"required\" class=\"text-danger\">*</span> {{label}}</label>\r\n <textarea #input id=\"{{id}}\" class=\"form-control {{classes}}\" [required]=\"required\" pattern=\"{{pattern}}\"\r\n placeholder=\"{{placeholder}}\" [formControl]=\"formControl\" (input)=\"onChange(controlDir.control?.value)\"\r\n (blur)=\"onTouched()\" style=\"height: 135px;\"\r\n [ngClass]=\"{\r\n 'is-invalid is-invalid:focus': (controlDir.control?.invalid && (controlDir.control?.dirty || controlDir.control?.touched)) && errorMsg}\">\r\n </textarea>\r\n <div class=\"invalid-feedback\" *ngIf=\"errorMessage !== null\">\r\n {{errorMsg}}\r\n </div>\r\n</div>", styles: [".form-floating label{min-width:100%}.form-floating label:before{content:\"\";position:absolute;top:.9em;z-index:-1;width:110%;height:2em;background-color:#fff;box-shadow:0 -1px #fff}.form-floating>.form-control:focus~label,.form-floating>.form-control:not(:placeholder-shown)~label,.form-floating>.form-select~label{opacity:.95;color:gray}@media (max-width: 1699px){.form-floating label:before{width:107%!important}}@media (max-width: 770px){.form-floating label:before{width:97%!important}}\n"], dependencies: [{ kind: "directive", type: i2$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$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: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] }); }
485
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TextareaInputComponent, isStandalone: false, selector: "ipa-textarea-input", inputs: { isPlatformCodeDesignSystem: "isPlatformCodeDesignSystem", id: "id", label: "label", placeholder: "placeholder", required: "required", patternErrorMsg: "patternErrorMsg", pattern: "pattern", classes: "classes", containerClasses: "containerClasses", isArabicForm: "isArabicForm" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true, static: true }], ngImport: i0, template: "<!-- none platform code design system -->\r\n<div class=\"form-floating {{containerClasses}}\" [ngClass]=\"{'d-none': isPlatformCodeDesignSystem}\">\r\n <textarea #input id=\"{{id}}\" class=\"form-control {{classes}}\" [required]=\"required\" pattern=\"{{pattern}}\"\r\n placeholder=\"{{placeholder}}\" [formControl]=\"formControl\" (input)=\"onChange(controlDir.control?.value)\"\r\n (blur)=\"onTouched()\" style=\"height: 135px;\"\r\n [ngClass]=\"{\r\n 'is-invalid is-invalid:focus': (controlDir.control?.invalid && (controlDir.control?.dirty || controlDir.control?.touched)) && errorMsg,\r\n 'is-valid is-valid:focus': (controlDir.control?.valid && (controlDir.control?.dirty || controlDir.control?.touched) && (errorMsg || controlDir.value))}\">\r\n </textarea>\r\n <label for=\"{{id}}\"><span *ngIf=\"required\" class=\"text-danger\">*</span> {{label}}</label>\r\n <div class=\"invalid-feedback\" *ngIf=\"errorMessage !== null\">\r\n {{errorMsg}}\r\n </div>\r\n</div>\r\n<!-- platform code design system -->\r\n<div class=\"{{containerClasses}}\" [ngClass]=\"{'d-none': !isPlatformCodeDesignSystem}\">\r\n <label class=\"form-label\" for=\"{{id}}\"><span *ngIf=\"required\" class=\"text-danger\">*</span> {{label}}</label>\r\n <textarea #input id=\"{{id}}\" class=\"form-control {{classes}}\" [required]=\"required\" pattern=\"{{pattern}}\"\r\n placeholder=\"{{placeholder}}\" [formControl]=\"formControl\" (input)=\"onChange(controlDir.control?.value)\"\r\n (blur)=\"onTouched()\" style=\"height: 135px;\"\r\n [ngClass]=\"{\r\n 'is-invalid is-invalid:focus': (controlDir.control?.invalid && (controlDir.control?.dirty || controlDir.control?.touched)) && errorMsg}\">\r\n </textarea>\r\n <div class=\"invalid-feedback\" *ngIf=\"errorMessage !== null\">\r\n {{errorMsg}}\r\n </div>\r\n</div>", styles: [".form-floating label{min-width:100%}.form-floating label:before{content:\"\";position:absolute;top:.9em;z-index:-1;width:110%;height:2em;background-color:#fff;box-shadow:0 -1px #fff}.form-floating>.form-control:focus~label,.form-floating>.form-control:not(:placeholder-shown)~label,.form-floating>.form-select~label{opacity:.95;color:gray}@media (max-width: 1699px){.form-floating label:before{width:107%!important}}@media (max-width: 770px){.form-floating label:before{width:97%!important}}\n"], dependencies: [{ kind: "directive", type: i2$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$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: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] }); }
486
486
  }
487
487
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TextareaInputComponent, decorators: [{
488
488
  type: Component,
489
- args: [{ selector: 'ipa-textarea-input', standalone: false, template: "<!-- none platform code design system -->\r\n<div class=\"form-floating {{containerClasses}}\" [ngClass]=\"{'d-none': isPlatformCodeDesignSystem}\">\r\n <textarea #input id=\"{{id}}\" class=\"form-control {{classes}}\" [required]=\"required\" pattern=\"{{pattern}}\"\r\n placeholder=\"{{placeholder}}\" [formControl]=\"formControl\" (input)=\"onChange(controlDir.control?.value)\"\r\n (blur)=\"onTouched()\" style=\"height: 135px;\"\r\n [ngClass]=\"{\r\n 'is-invalid is-invalid:focus': (controlDir.control?.invalid && (controlDir.control?.dirty || controlDir.control?.touched)) && errorMsg,\r\n 'is-valid is-valid:focus': (controlDir.control?.valid && (controlDir.control?.dirty || controlDir.control?.touched) && (errorMsg || controlDir.value))}\">\r\n </textarea>\r\n <label for=\"{{id}}\"><span *ngIf=\"required\" class=\"text-danger\">*</span> {{label}}</label>\r\n <div class=\"invalid-feedback\" *ngIf=\"errorMessage !== null\">\r\n {{errorMsg}}\r\n </div>\r\n</div>\r\n<!-- platform code design system -->\r\n<div class=\"{{containerClasses}}\" [ngClass]=\"{'d-none': !isPlatformCodeDesignSystem}\">\r\n <label for=\"{{id}}\"><span *ngIf=\"required\" class=\"text-danger\">*</span> {{label}}</label>\r\n <textarea #input id=\"{{id}}\" class=\"form-control {{classes}}\" [required]=\"required\" pattern=\"{{pattern}}\"\r\n placeholder=\"{{placeholder}}\" [formControl]=\"formControl\" (input)=\"onChange(controlDir.control?.value)\"\r\n (blur)=\"onTouched()\" style=\"height: 135px;\"\r\n [ngClass]=\"{\r\n 'is-invalid is-invalid:focus': (controlDir.control?.invalid && (controlDir.control?.dirty || controlDir.control?.touched)) && errorMsg}\">\r\n </textarea>\r\n <div class=\"invalid-feedback\" *ngIf=\"errorMessage !== null\">\r\n {{errorMsg}}\r\n </div>\r\n</div>", styles: [".form-floating label{min-width:100%}.form-floating label:before{content:\"\";position:absolute;top:.9em;z-index:-1;width:110%;height:2em;background-color:#fff;box-shadow:0 -1px #fff}.form-floating>.form-control:focus~label,.form-floating>.form-control:not(:placeholder-shown)~label,.form-floating>.form-select~label{opacity:.95;color:gray}@media (max-width: 1699px){.form-floating label:before{width:107%!important}}@media (max-width: 770px){.form-floating label:before{width:97%!important}}\n"] }]
489
+ args: [{ selector: 'ipa-textarea-input', standalone: false, template: "<!-- none platform code design system -->\r\n<div class=\"form-floating {{containerClasses}}\" [ngClass]=\"{'d-none': isPlatformCodeDesignSystem}\">\r\n <textarea #input id=\"{{id}}\" class=\"form-control {{classes}}\" [required]=\"required\" pattern=\"{{pattern}}\"\r\n placeholder=\"{{placeholder}}\" [formControl]=\"formControl\" (input)=\"onChange(controlDir.control?.value)\"\r\n (blur)=\"onTouched()\" style=\"height: 135px;\"\r\n [ngClass]=\"{\r\n 'is-invalid is-invalid:focus': (controlDir.control?.invalid && (controlDir.control?.dirty || controlDir.control?.touched)) && errorMsg,\r\n 'is-valid is-valid:focus': (controlDir.control?.valid && (controlDir.control?.dirty || controlDir.control?.touched) && (errorMsg || controlDir.value))}\">\r\n </textarea>\r\n <label for=\"{{id}}\"><span *ngIf=\"required\" class=\"text-danger\">*</span> {{label}}</label>\r\n <div class=\"invalid-feedback\" *ngIf=\"errorMessage !== null\">\r\n {{errorMsg}}\r\n </div>\r\n</div>\r\n<!-- platform code design system -->\r\n<div class=\"{{containerClasses}}\" [ngClass]=\"{'d-none': !isPlatformCodeDesignSystem}\">\r\n <label class=\"form-label\" for=\"{{id}}\"><span *ngIf=\"required\" class=\"text-danger\">*</span> {{label}}</label>\r\n <textarea #input id=\"{{id}}\" class=\"form-control {{classes}}\" [required]=\"required\" pattern=\"{{pattern}}\"\r\n placeholder=\"{{placeholder}}\" [formControl]=\"formControl\" (input)=\"onChange(controlDir.control?.value)\"\r\n (blur)=\"onTouched()\" style=\"height: 135px;\"\r\n [ngClass]=\"{\r\n 'is-invalid is-invalid:focus': (controlDir.control?.invalid && (controlDir.control?.dirty || controlDir.control?.touched)) && errorMsg}\">\r\n </textarea>\r\n <div class=\"invalid-feedback\" *ngIf=\"errorMessage !== null\">\r\n {{errorMsg}}\r\n </div>\r\n</div>", styles: [".form-floating label{min-width:100%}.form-floating label:before{content:\"\";position:absolute;top:.9em;z-index:-1;width:110%;height:2em;background-color:#fff;box-shadow:0 -1px #fff}.form-floating>.form-control:focus~label,.form-floating>.form-control:not(:placeholder-shown)~label,.form-floating>.form-select~label{opacity:.95;color:gray}@media (max-width: 1699px){.form-floating label:before{width:107%!important}}@media (max-width: 770px){.form-floating label:before{width:97%!important}}\n"] }]
490
490
  }], ctorParameters: () => [{ type: IPAFormService }, { type: i2$1.NgControl, decorators: [{
491
491
  type: Self
492
492
  }] }, { type: i0.ChangeDetectorRef }], propDecorators: { input: [{
@@ -719,17 +719,27 @@ class FileUploadComponent {
719
719
  this.method = 'POST';
720
720
  this.autoUpload = false;
721
721
  this.apiUrl = 'apiUrl';
722
+ this.disabled = false;
722
723
  this.successUpload = new EventEmitter();
723
724
  this.fileAdded = new EventEmitter();
724
725
  this.fileDeleted = new EventEmitter();
725
726
  this.dragEnter = false;
726
- this.errors = [];
727
727
  this.filesAdded = [];
728
728
  this.currentFiles = [];
729
+ this.hasMaxFileExceeded = false;
730
+ this.fileIconDone = '/_catalogs/masterpage/ar-sa/CPS/assets/img/internal/upload-done.svg';
731
+ this.fileIconError = '/_catalogs/masterpage/ar-sa/CPS/assets/img/internal/upload-error.svg';
732
+ this.fileMessage = '';
729
733
  this.formControl = new UntypedFormControl('');
730
734
  }
731
735
  ngOnInit() {
732
736
  this.setConfiguration();
737
+ if (this.isArabicForm) {
738
+ this.fileMessage = `الحد الأقصى لحجم الملف المسموح به هو ${this.maxFileSize} ميجابايت، وتشمل الصيغ المدعومة ${this.acceptedFiles.replace(',', ' و ')}.`;
739
+ }
740
+ else {
741
+ this.fileMessage = `Maximum file size allowed is ${this.maxFileSize} MB, supported file formats include ${this.acceptedFiles.replace(',', ' and ')}.`;
742
+ }
733
743
  }
734
744
  operationCompleted(e) {
735
745
  if (this.filesAdded.length > 0) {
@@ -748,10 +758,11 @@ class FileUploadComponent {
748
758
  : 'Attachments uploaded successfully';
749
759
  this.toastrService.success(message);
750
760
  }
751
- onUploadError(e) {
752
- if (e[1]) {
753
- this.errors = [];
754
- this.errors.push(`${e[1]} (${e[0].name})`);
761
+ onUploadError(args) {
762
+ if (args[1]) {
763
+ const fileIndex = this.currentFiles.findIndex((f) => f.file.name === args[0].name && f.file.size === args[0].size);
764
+ if (fileIndex !== -1)
765
+ this.currentFiles[fileIndex].error = args[1];
755
766
  }
756
767
  }
757
768
  fileWasAdded(e) {
@@ -759,23 +770,44 @@ class FileUploadComponent {
759
770
  if (this.multiple === 1) {
760
771
  this.currentFiles = [];
761
772
  this.filesAdded = [];
762
- this.errors = [];
763
773
  const files = myDropzone.files;
764
774
  if (files.length > 1) {
765
775
  myDropzone.removeFile(files[0]);
766
776
  }
767
777
  }
768
- this.currentFiles.push(e);
769
- this.fileAdded.emit(e);
778
+ const isDuplicateFile = this.currentFiles.some((f) => f.file.name === e.name && f.file.size === e.size);
779
+ if (isDuplicateFile) {
780
+ myDropzone.removeFile(e);
781
+ return;
782
+ }
783
+ if (this.currentFiles.length < this.multiple) {
784
+ this.currentFiles.push({ file: e, error: '' });
785
+ this.fileAdded.emit(e);
786
+ }
770
787
  }
771
- sending(e) {
772
- this.errors = [];
788
+ onEnterKey(event) {
789
+ event.target.click();
790
+ event.preventDefault();
773
791
  }
792
+ sending(e) { }
774
793
  reset(e) { }
775
794
  deleteFile(file) {
776
- this.currentFiles = this.currentFiles.filter((x) => x.name !== file.name && x.size !== file.size);
777
- this.errors = [];
778
- this.fileDeleted.emit();
795
+ const myDropzone = this.dropzoneDir.dropzone();
796
+ const fileIndex = this.currentFiles.findIndex((f) => f.file.name === file.name && f.file.size === file.size);
797
+ if (fileIndex !== -1) {
798
+ this.currentFiles.splice(fileIndex, 1);
799
+ }
800
+ this.fileDeleted.emit(file);
801
+ myDropzone.removeFile(file);
802
+ if (this.currentFiles.length === 0) {
803
+ this.dropzoneDir.reset();
804
+ }
805
+ }
806
+ maxFilesExceeded(file) {
807
+ this.hasMaxFileExceeded = true;
808
+ this.toastrService.error(this.isArabicForm
809
+ ? 'الرجاء حذف الملفات الموجودة حاليا لتتمكن من إضافة الملف'
810
+ : 'Please delete existing files to be able to add this file');
779
811
  }
780
812
  setConfiguration() {
781
813
  this.label = (this.isArabicForm ? 'رفع ' : 'Upload ') + this.label;
@@ -804,11 +836,11 @@ class FileUploadComponent {
804
836
  };
805
837
  }
806
838
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FileUploadComponent, deps: [{ token: i1.ToastrService }], target: i0.ɵɵFactoryTarget.Component }); }
807
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: FileUploadComponent, isStandalone: false, selector: "ipa-file-upload", inputs: { isArabicForm: "isArabicForm", label: "label", required: "required", acceptedFiles: "acceptedFiles", multiple: "multiple", maxFileSize: "maxFileSize", method: "method", autoUpload: "autoUpload", apiUrl: "apiUrl", authorization: "authorization" }, outputs: { successUpload: "successUpload", fileAdded: "fileAdded", fileDeleted: "fileDeleted" }, viewQueries: [{ propertyName: "dropzoneDir", first: true, predicate: DropzoneDirective, descendants: true }], ngImport: i0, template: "<div class=\"file-upload\">\r\n <div class=\"upload-overlay\" [dropzone]=\"config\" (error)=\"onUploadError($event)\"\r\n (queueComplete)=\"operationCompleted($event)\" (success)=\"onUploadSuccess($event)\" (dragenter)=\"dragEnter = true\"\r\n (dragLeave)=\"dragEnter = false\" (drop)=\"dragEnter = false\" (dragEnd)=\"dragEnter = false\"\r\n [class.active-border]=\"dragEnter\" (sending)=\"sending($event)\" (reset)=\"reset($event)\"\r\n (addedFile)=\"fileWasAdded($event)\">\r\n </div>\r\n <div class=\"upload-btn-wrapper\">\r\n <div>\r\n <div class=\"subtitle mb-2\">\r\n {{label}}\r\n <span *ngIf=\"required\" class=\"text-danger\">*</span>\r\n </div>\r\n <hr>\r\n <span style=\"font-size: 12px;\">{{isArabicForm? '\u0642\u0645 \u0628\u0633\u062D\u0628 \u0627\u0644\u0645\u0644\u0641 \u0623\u0648 \u0627\u0636\u063A\u0637 \u0647\u0646\u0627' : 'drag or click here'}}</span>\r\n <i class=\"fas fa-upload upload-icon mr-2\"></i>\r\n </div>\r\n <div *ngIf=\"acceptedFiles.length > 0\" class=\"allowed-extensions\">\r\n {{isArabicForm? '\u0627\u0644\u0635\u064A\u063A\u0629 \u0627\u0644\u0645\u0633\u0645\u0648\u062D \u0628\u0647\u0627:' : 'Allowed format:'}} \r\n <span class=\"extensions\">{{ acceptedFiles }}</span>\r\n </div>\r\n <div class=\"allowed-extensions\">\r\n {{isArabicForm? '\u0627\u0642\u0635\u0649 \u062D\u062C\u0645 \u0644\u0644\u0645\u0631\u0641\u0642:' : 'Attachment Size:'}}\r\n <span class=\"extensions\">{{ maxFileSize }} MB</span>\r\n </div>\r\n </div>\r\n</div>\r\n<div id=\"attachment-status\" style=\"text-align: center; margin-top:10px;\">\r\n <span style=\"font-size: 14px; margin: auto; font-weight:bold;\" *ngFor=\"let file of currentFiles\">\r\n {{ file.name }} <i (click)=\"deleteFile(file)\" class=\"fas fa-trash\"\r\n style=\"color:firebrick; cursor: pointer;\"></i>\r\n <br>\r\n </span>\r\n <ul class=\"list-unstyled\">\r\n <li class=\"text-danger\" style=\"font-size: 12px;\" *ngFor=\"let error of errors\">{{error}}</li>\r\n </ul>\r\n</div>", styles: [".subtitle{border-bottom:none;display:block;line-height:2}.file-upload{border:dashed 1px #ccc;display:block;min-height:150px;border-radius:15px;width:350px;cursor:pointer;position:relative;margin:auto}.upload-overlay{position:absolute;width:100%;height:100%}.upload-btn-wrapper{text-align:center}.upload-icon{margin-right:5px}.list-unstyled{margin:10px!important;padding:14px!important;list-style:none}.allowed-extensions{color:#4d7297}\n"], dependencies: [{ kind: "directive", type: i2$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DropzoneDirective, selector: "[dropzone]", inputs: ["disabled", "dropzone"], outputs: ["init", "error", "success", "sending", "canceled", "complete", "processing", "drop", "dragStart", "dragEnd", "dragEnter", "dragOver", "dragLeave", "thumbnail", "addedFile", "addedFiles", "removedFile", "uploadProgress", "maxFilesReached", "maxFilesExceeded", "errorMultiple", "successMultiple", "sendingMultiple", "canceledMultiple", "completeMultiple", "processingMultiple", "reset", "queueComplete", "totalUploadProgress"], exportAs: ["ngxDropzone"] }] }); }
839
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: FileUploadComponent, isStandalone: false, selector: "ipa-file-upload", inputs: { isArabicForm: "isArabicForm", label: "label", required: "required", acceptedFiles: "acceptedFiles", multiple: "multiple", maxFileSize: "maxFileSize", method: "method", autoUpload: "autoUpload", apiUrl: "apiUrl", authorization: "authorization", disabled: "disabled" }, outputs: { successUpload: "successUpload", fileAdded: "fileAdded", fileDeleted: "fileDeleted" }, viewQueries: [{ propertyName: "dropzoneDir", first: true, predicate: DropzoneDirective, descendants: true }], ngImport: i0, template: "<!-- <div class=\"file-upload\">\r\n <div class=\"upload-overlay\" [dropzone]=\"config\" (error)=\"onUploadError($event)\" tabindex=\"0\"\r\n (keydown.enter)=\"onEnterKey($event)\" (keydown.space)=\"onEnterKey($event)\"\r\n (queueComplete)=\"operationCompleted($event)\" (success)=\"onUploadSuccess($event)\" (dragenter)=\"dragEnter = true\"\r\n (dragLeave)=\"dragEnter = false\" (drop)=\"dragEnter = false\" (dragEnd)=\"dragEnter = false\"\r\n [class.active-border]=\"dragEnter\" (sending)=\"sending($event)\" (reset)=\"reset($event)\"\r\n (addedFile)=\"fileWasAdded($event)\" (maxFilesExceeded)=\"maxFilesExceeded($event)\">\r\n </div>\r\n <div class=\"upload-btn-wrapper\">\r\n <div>\r\n <div class=\"subtitle mb-2\">\r\n {{label}}\r\n <span *ngIf=\"required\" class=\"text-danger\">*</span>\r\n </div>\r\n <hr>\r\n <span style=\"font-size: 12px;\">{{isArabicForm? '\u0642\u0645 \u0628\u0633\u062D\u0628 \u0627\u0644\u0645\u0644\u0641 \u0623\u0648 \u0627\u0636\u063A\u0637 \u0647\u0646\u0627' : 'drag or click here'}}</span>\r\n <i class=\"fas fa-upload upload-icon mr-2\"></i>\r\n </div>\r\n <div *ngIf=\"acceptedFiles.length > 0\" class=\"allowed-extensions\">\r\n {{isArabicForm? '\u0627\u0644\u0635\u064A\u063A\u0629 \u0627\u0644\u0645\u0633\u0645\u0648\u062D \u0628\u0647\u0627:' : 'Allowed format:'}}\r\n <span class=\"extensions\">{{ acceptedFiles }}</span>\r\n </div>\r\n <div class=\"allowed-extensions\">\r\n {{isArabicForm? '\u0627\u0642\u0635\u0649 \u062D\u062C\u0645 \u0644\u0644\u0645\u0631\u0641\u0642:' : 'Attachment Size:'}}\r\n <span class=\"extensions\">{{ maxFileSize }} MB</span>\r\n </div>\r\n </div>\r\n</div>\r\n<div id=\"attachment-status\" style=\"text-align: center; margin-top:10px;\">\r\n <ng-container *ngFor=\"let file of currentFiles\">\r\n <span style=\"font-size: 14px; margin: auto; font-weight:bold;\" *ngFor=\"let file of currentFiles\">\r\n {{ file.file.name }} <i (click)=\"deleteFile(file.file)\" class=\"fas fa-trash\"\r\n style=\"color:firebrick; cursor: pointer;\"></i>\r\n <br>\r\n </span>\r\n <span class=\"text-danger\" style=\"font-size: 12px;\" *>\r\n {{file.error}}\r\n </span>\r\n </ng-container>\r\n</div> -->\r\n@if(multiple === 1) {\r\n<div class=\"file-upload-label\"> {{label}}</div>\r\n<div class=\"file-upload-description\">\r\n {{fileMessage}}\r\n</div>\r\n<div class=\"single-file-upload\" [ngClass]=\"{'disabled': disabled}\" [disabled]=\"disabled\" [dropzone]=\"config\"\r\n (error)=\"onUploadError($event)\" tabindex=\"0\" (keydown.enter)=\"onEnterKey($event)\"\r\n (keydown.space)=\"onEnterKey($event)\" (queueComplete)=\"operationCompleted($event)\"\r\n (success)=\"onUploadSuccess($event)\" (sending)=\"sending($event)\" (reset)=\"reset($event)\"\r\n (addedFile)=\"fileWasAdded($event)\" (maxFilesExceeded)=\"maxFilesExceeded($event)\">\r\n {{isArabicForm ? '\u062A\u0635\u0641\u062D \u0627\u0644\u0645\u0644\u0641\u0627\u062A' : 'Browse Files'}}\r\n</div>\r\n<br><br>\r\n@if (currentFiles.length > 0) {\r\n<ng-container *ngFor=\"let file of currentFiles\">\r\n <div class=\"uploaded-file \" [ngClass]=\"{'uploaded-file-error': file.error}\">\r\n <img [src]=\"file.error ? fileIconError : fileIconDone\"> {{ file.file.name }}\r\n <div style=\"margin-right: auto;\" (click)=\"deleteFile(file.file)\" title=\"\u062D\u0630\u0641 \u0627\u0644\u0645\u0644\u0641\">\r\n <img src=\"/_catalogs/masterpage/ar-sa/CPS/assets/img/internal/upload-close.svg\">\r\n </div>\r\n @if (file.error) {\r\n <div class=\"flex-wrap-newline\" *ngIf=\"file.error\"></div>\r\n <div class=\"uploaded-helper\">{{file.error}}</div>\r\n }\r\n </div><br><br>\r\n</ng-container>\r\n}\r\n}@else{\r\n<div class=\"file-upload-label form-label\"> {{label}}</div>\r\n<div class=\"multiple-file-upload text-center d-flex flex-column align-items-center \"\r\n [ngClass]=\"{'multiple-disabled': disabled}\" [disabled]=\"disabled\" [dropzone]=\"config\"\r\n (error)=\"onUploadError($event)\" tabindex=\"0\" (keydown.enter)=\"onEnterKey($event)\"\r\n (keydown.space)=\"onEnterKey($event)\" (queueComplete)=\"operationCompleted($event)\"\r\n (success)=\"onUploadSuccess($event)\" (dragenter)=\"dragEnter = true\" (dragLeave)=\"dragEnter = false\"\r\n (drop)=\"dragEnter = false\" (dragEnd)=\"dragEnter = false\" [class.multiple-drag-hover]=\"dragEnter\"\r\n (sending)=\"sending($event)\" (reset)=\"reset($event)\" (addedFile)=\"fileWasAdded($event)\"\r\n (maxFilesExceeded)=\"maxFilesExceeded($event)\">\r\n <div>\r\n <img src=\"/_catalogs/masterpage/ar-sa/CPS/assets/img/internal/file-upload.svg\">\r\n </div>\r\n <div class=\"multiple-file-upload-text\">\r\n {{isArabicForm ? '\u0627\u0633\u062D\u0628 \u0648 \u0623\u0641\u0644\u062A \u0627\u0644\u0645\u0644\u0641\u0627\u062A \u0647\u0646\u0627 \u0644\u0644\u0631\u0641\u0639' : 'Drag and drop files here to upload'}}\r\n </div>\r\n <div class=\"multiple-file-upload-description\">\r\n {{fileMessage}}\r\n </div>\r\n <div class=\"tp-link\">\r\n {{isArabicForm ? '\u062A\u0635\u0641\u062D \u0627\u0644\u0645\u0644\u0641\u0627\u062A' : 'Browse Files'}}\r\n </div>\r\n</div>\r\n<br>\r\n@if (currentFiles.length > 0) {\r\n<ng-container *ngFor=\"let file of currentFiles\">\r\n <div class=\"uploaded-file \" [ngClass]=\"{'uploaded-file-error': file.error}\">\r\n <img [src]=\"file.error ? fileIconError : fileIconDone\"> {{ file.file.name }}\r\n <div style=\"margin-right: auto;\" (click)=\"deleteFile(file.file)\" title=\"\u062D\u0630\u0641 \u0627\u0644\u0645\u0644\u0641\">\r\n <img src=\"/_catalogs/masterpage/ar-sa/CPS/assets/img/internal/upload-close.svg\">\r\n </div>\r\n @if (file.error) {\r\n <div class=\"flex-wrap-newline\" *ngIf=\"file.error\"></div>\r\n <div class=\"uploaded-helper\">{{file.error}}</div>\r\n }\r\n </div><br>\r\n</ng-container>\r\n}\r\n}", styles: [".subtitle{border-bottom:none;display:block;line-height:2}.file-upload{border:dashed 1px #ccc;display:block;min-height:150px;border-radius:15px;width:350px;cursor:pointer;position:relative;margin:auto}.upload-overlay{position:absolute;width:100%;height:100%}.upload-btn-wrapper{text-align:center}.upload-icon{margin-right:5px}.list-unstyled{margin:10px!important;padding:14px!important;list-style:none}.allowed-extensions{color:#4d7297}\n"], dependencies: [{ kind: "directive", type: i2$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DropzoneDirective, selector: "[dropzone]", inputs: ["disabled", "dropzone"], outputs: ["init", "error", "success", "sending", "canceled", "complete", "processing", "drop", "dragStart", "dragEnd", "dragEnter", "dragOver", "dragLeave", "thumbnail", "addedFile", "addedFiles", "removedFile", "uploadProgress", "maxFilesReached", "maxFilesExceeded", "errorMultiple", "successMultiple", "sendingMultiple", "canceledMultiple", "completeMultiple", "processingMultiple", "reset", "queueComplete", "totalUploadProgress"], exportAs: ["ngxDropzone"] }] }); }
808
840
  }
809
841
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FileUploadComponent, decorators: [{
810
842
  type: Component,
811
- args: [{ selector: 'ipa-file-upload', standalone: false, template: "<div class=\"file-upload\">\r\n <div class=\"upload-overlay\" [dropzone]=\"config\" (error)=\"onUploadError($event)\"\r\n (queueComplete)=\"operationCompleted($event)\" (success)=\"onUploadSuccess($event)\" (dragenter)=\"dragEnter = true\"\r\n (dragLeave)=\"dragEnter = false\" (drop)=\"dragEnter = false\" (dragEnd)=\"dragEnter = false\"\r\n [class.active-border]=\"dragEnter\" (sending)=\"sending($event)\" (reset)=\"reset($event)\"\r\n (addedFile)=\"fileWasAdded($event)\">\r\n </div>\r\n <div class=\"upload-btn-wrapper\">\r\n <div>\r\n <div class=\"subtitle mb-2\">\r\n {{label}}\r\n <span *ngIf=\"required\" class=\"text-danger\">*</span>\r\n </div>\r\n <hr>\r\n <span style=\"font-size: 12px;\">{{isArabicForm? '\u0642\u0645 \u0628\u0633\u062D\u0628 \u0627\u0644\u0645\u0644\u0641 \u0623\u0648 \u0627\u0636\u063A\u0637 \u0647\u0646\u0627' : 'drag or click here'}}</span>\r\n <i class=\"fas fa-upload upload-icon mr-2\"></i>\r\n </div>\r\n <div *ngIf=\"acceptedFiles.length > 0\" class=\"allowed-extensions\">\r\n {{isArabicForm? '\u0627\u0644\u0635\u064A\u063A\u0629 \u0627\u0644\u0645\u0633\u0645\u0648\u062D \u0628\u0647\u0627:' : 'Allowed format:'}} \r\n <span class=\"extensions\">{{ acceptedFiles }}</span>\r\n </div>\r\n <div class=\"allowed-extensions\">\r\n {{isArabicForm? '\u0627\u0642\u0635\u0649 \u062D\u062C\u0645 \u0644\u0644\u0645\u0631\u0641\u0642:' : 'Attachment Size:'}}\r\n <span class=\"extensions\">{{ maxFileSize }} MB</span>\r\n </div>\r\n </div>\r\n</div>\r\n<div id=\"attachment-status\" style=\"text-align: center; margin-top:10px;\">\r\n <span style=\"font-size: 14px; margin: auto; font-weight:bold;\" *ngFor=\"let file of currentFiles\">\r\n {{ file.name }} <i (click)=\"deleteFile(file)\" class=\"fas fa-trash\"\r\n style=\"color:firebrick; cursor: pointer;\"></i>\r\n <br>\r\n </span>\r\n <ul class=\"list-unstyled\">\r\n <li class=\"text-danger\" style=\"font-size: 12px;\" *ngFor=\"let error of errors\">{{error}}</li>\r\n </ul>\r\n</div>", styles: [".subtitle{border-bottom:none;display:block;line-height:2}.file-upload{border:dashed 1px #ccc;display:block;min-height:150px;border-radius:15px;width:350px;cursor:pointer;position:relative;margin:auto}.upload-overlay{position:absolute;width:100%;height:100%}.upload-btn-wrapper{text-align:center}.upload-icon{margin-right:5px}.list-unstyled{margin:10px!important;padding:14px!important;list-style:none}.allowed-extensions{color:#4d7297}\n"] }]
843
+ args: [{ selector: 'ipa-file-upload', standalone: false, template: "<!-- <div class=\"file-upload\">\r\n <div class=\"upload-overlay\" [dropzone]=\"config\" (error)=\"onUploadError($event)\" tabindex=\"0\"\r\n (keydown.enter)=\"onEnterKey($event)\" (keydown.space)=\"onEnterKey($event)\"\r\n (queueComplete)=\"operationCompleted($event)\" (success)=\"onUploadSuccess($event)\" (dragenter)=\"dragEnter = true\"\r\n (dragLeave)=\"dragEnter = false\" (drop)=\"dragEnter = false\" (dragEnd)=\"dragEnter = false\"\r\n [class.active-border]=\"dragEnter\" (sending)=\"sending($event)\" (reset)=\"reset($event)\"\r\n (addedFile)=\"fileWasAdded($event)\" (maxFilesExceeded)=\"maxFilesExceeded($event)\">\r\n </div>\r\n <div class=\"upload-btn-wrapper\">\r\n <div>\r\n <div class=\"subtitle mb-2\">\r\n {{label}}\r\n <span *ngIf=\"required\" class=\"text-danger\">*</span>\r\n </div>\r\n <hr>\r\n <span style=\"font-size: 12px;\">{{isArabicForm? '\u0642\u0645 \u0628\u0633\u062D\u0628 \u0627\u0644\u0645\u0644\u0641 \u0623\u0648 \u0627\u0636\u063A\u0637 \u0647\u0646\u0627' : 'drag or click here'}}</span>\r\n <i class=\"fas fa-upload upload-icon mr-2\"></i>\r\n </div>\r\n <div *ngIf=\"acceptedFiles.length > 0\" class=\"allowed-extensions\">\r\n {{isArabicForm? '\u0627\u0644\u0635\u064A\u063A\u0629 \u0627\u0644\u0645\u0633\u0645\u0648\u062D \u0628\u0647\u0627:' : 'Allowed format:'}}\r\n <span class=\"extensions\">{{ acceptedFiles }}</span>\r\n </div>\r\n <div class=\"allowed-extensions\">\r\n {{isArabicForm? '\u0627\u0642\u0635\u0649 \u062D\u062C\u0645 \u0644\u0644\u0645\u0631\u0641\u0642:' : 'Attachment Size:'}}\r\n <span class=\"extensions\">{{ maxFileSize }} MB</span>\r\n </div>\r\n </div>\r\n</div>\r\n<div id=\"attachment-status\" style=\"text-align: center; margin-top:10px;\">\r\n <ng-container *ngFor=\"let file of currentFiles\">\r\n <span style=\"font-size: 14px; margin: auto; font-weight:bold;\" *ngFor=\"let file of currentFiles\">\r\n {{ file.file.name }} <i (click)=\"deleteFile(file.file)\" class=\"fas fa-trash\"\r\n style=\"color:firebrick; cursor: pointer;\"></i>\r\n <br>\r\n </span>\r\n <span class=\"text-danger\" style=\"font-size: 12px;\" *>\r\n {{file.error}}\r\n </span>\r\n </ng-container>\r\n</div> -->\r\n@if(multiple === 1) {\r\n<div class=\"file-upload-label\"> {{label}}</div>\r\n<div class=\"file-upload-description\">\r\n {{fileMessage}}\r\n</div>\r\n<div class=\"single-file-upload\" [ngClass]=\"{'disabled': disabled}\" [disabled]=\"disabled\" [dropzone]=\"config\"\r\n (error)=\"onUploadError($event)\" tabindex=\"0\" (keydown.enter)=\"onEnterKey($event)\"\r\n (keydown.space)=\"onEnterKey($event)\" (queueComplete)=\"operationCompleted($event)\"\r\n (success)=\"onUploadSuccess($event)\" (sending)=\"sending($event)\" (reset)=\"reset($event)\"\r\n (addedFile)=\"fileWasAdded($event)\" (maxFilesExceeded)=\"maxFilesExceeded($event)\">\r\n {{isArabicForm ? '\u062A\u0635\u0641\u062D \u0627\u0644\u0645\u0644\u0641\u0627\u062A' : 'Browse Files'}}\r\n</div>\r\n<br><br>\r\n@if (currentFiles.length > 0) {\r\n<ng-container *ngFor=\"let file of currentFiles\">\r\n <div class=\"uploaded-file \" [ngClass]=\"{'uploaded-file-error': file.error}\">\r\n <img [src]=\"file.error ? fileIconError : fileIconDone\"> {{ file.file.name }}\r\n <div style=\"margin-right: auto;\" (click)=\"deleteFile(file.file)\" title=\"\u062D\u0630\u0641 \u0627\u0644\u0645\u0644\u0641\">\r\n <img src=\"/_catalogs/masterpage/ar-sa/CPS/assets/img/internal/upload-close.svg\">\r\n </div>\r\n @if (file.error) {\r\n <div class=\"flex-wrap-newline\" *ngIf=\"file.error\"></div>\r\n <div class=\"uploaded-helper\">{{file.error}}</div>\r\n }\r\n </div><br><br>\r\n</ng-container>\r\n}\r\n}@else{\r\n<div class=\"file-upload-label form-label\"> {{label}}</div>\r\n<div class=\"multiple-file-upload text-center d-flex flex-column align-items-center \"\r\n [ngClass]=\"{'multiple-disabled': disabled}\" [disabled]=\"disabled\" [dropzone]=\"config\"\r\n (error)=\"onUploadError($event)\" tabindex=\"0\" (keydown.enter)=\"onEnterKey($event)\"\r\n (keydown.space)=\"onEnterKey($event)\" (queueComplete)=\"operationCompleted($event)\"\r\n (success)=\"onUploadSuccess($event)\" (dragenter)=\"dragEnter = true\" (dragLeave)=\"dragEnter = false\"\r\n (drop)=\"dragEnter = false\" (dragEnd)=\"dragEnter = false\" [class.multiple-drag-hover]=\"dragEnter\"\r\n (sending)=\"sending($event)\" (reset)=\"reset($event)\" (addedFile)=\"fileWasAdded($event)\"\r\n (maxFilesExceeded)=\"maxFilesExceeded($event)\">\r\n <div>\r\n <img src=\"/_catalogs/masterpage/ar-sa/CPS/assets/img/internal/file-upload.svg\">\r\n </div>\r\n <div class=\"multiple-file-upload-text\">\r\n {{isArabicForm ? '\u0627\u0633\u062D\u0628 \u0648 \u0623\u0641\u0644\u062A \u0627\u0644\u0645\u0644\u0641\u0627\u062A \u0647\u0646\u0627 \u0644\u0644\u0631\u0641\u0639' : 'Drag and drop files here to upload'}}\r\n </div>\r\n <div class=\"multiple-file-upload-description\">\r\n {{fileMessage}}\r\n </div>\r\n <div class=\"tp-link\">\r\n {{isArabicForm ? '\u062A\u0635\u0641\u062D \u0627\u0644\u0645\u0644\u0641\u0627\u062A' : 'Browse Files'}}\r\n </div>\r\n</div>\r\n<br>\r\n@if (currentFiles.length > 0) {\r\n<ng-container *ngFor=\"let file of currentFiles\">\r\n <div class=\"uploaded-file \" [ngClass]=\"{'uploaded-file-error': file.error}\">\r\n <img [src]=\"file.error ? fileIconError : fileIconDone\"> {{ file.file.name }}\r\n <div style=\"margin-right: auto;\" (click)=\"deleteFile(file.file)\" title=\"\u062D\u0630\u0641 \u0627\u0644\u0645\u0644\u0641\">\r\n <img src=\"/_catalogs/masterpage/ar-sa/CPS/assets/img/internal/upload-close.svg\">\r\n </div>\r\n @if (file.error) {\r\n <div class=\"flex-wrap-newline\" *ngIf=\"file.error\"></div>\r\n <div class=\"uploaded-helper\">{{file.error}}</div>\r\n }\r\n </div><br>\r\n</ng-container>\r\n}\r\n}", styles: [".subtitle{border-bottom:none;display:block;line-height:2}.file-upload{border:dashed 1px #ccc;display:block;min-height:150px;border-radius:15px;width:350px;cursor:pointer;position:relative;margin:auto}.upload-overlay{position:absolute;width:100%;height:100%}.upload-btn-wrapper{text-align:center}.upload-icon{margin-right:5px}.list-unstyled{margin:10px!important;padding:14px!important;list-style:none}.allowed-extensions{color:#4d7297}\n"] }]
812
844
  }], ctorParameters: () => [{ type: i1.ToastrService }], propDecorators: { dropzoneDir: [{
813
845
  type: ViewChild,
814
846
  args: [DropzoneDirective, { static: false }]
@@ -832,6 +864,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
832
864
  type: Input
833
865
  }], authorization: [{
834
866
  type: Input
867
+ }], disabled: [{
868
+ type: Input
835
869
  }], successUpload: [{
836
870
  type: Output
837
871
  }], fileAdded: [{
@@ -1006,7 +1040,7 @@ class GenerateFormComponent {
1006
1040
  return selectedItems.length > 0 ? selectedItems : null;
1007
1041
  }
1008
1042
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GenerateFormComponent, deps: [{ token: IPAFormService }], target: i0.ɵɵFactoryTarget.Component }); }
1009
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: GenerateFormComponent, isStandalone: false, selector: "ipa-generate-form", inputs: { generateForm: "generateForm", form: "form", isArabicForm: "isArabicForm", isPlatformCodeDesignSystem: "isPlatformCodeDesignSystem", siteKey: "siteKey", recaptchaSize: "recaptchaSize", lang: "lang", recaptchaType: "recaptchaType", theme: "theme", useGlobalDomain: "useGlobalDomain" }, outputs: { successUpload: "successUpload", fileAdded: "fileAdded", fileDeleted: "fileDeleted" }, ngImport: i0, template: "<form [formGroup]=\"generateForm\">\r\n <ng-container *ngFor=\"let column of form.columns\">\r\n <div [ngSwitch]=\"column.type\">\r\n <!-- TEXTAREA -->\r\n <div *ngSwitchCase=\"'textArea'\">\r\n <ipa-textarea-input [isPlatformCodeDesignSystem]=\"isPlatformCodeDesignSystem\"\r\n [formControlName]=\"column.formControlName\" [id]=\"column.formControlName\"\r\n [label]=\"isArabicForm? column.arabicLabel : column.englishLabel\" [required]=\"column.required\"\r\n [placeholder]=\"isArabicForm? column.arabicLabel : column.englishLabel\"\r\n [patternErrorMsg]=\"isArabicForm? column.patternArErrorMsg! : column.patternEnErrorMsg!\"\r\n [classes]=\"column.inputClasses!\" [containerClasses]=\"column.containerClasses!\" [isArabicForm]=\"isArabicForm\">\r\n </ipa-textarea-input>\r\n </div>\r\n\r\n <!-- DROP DOWN LIST -->\r\n <div *ngSwitchCase=\"'select'\">\r\n <ipa-dropdown-input [isPlatformCodeDesignSystem]=\"isPlatformCodeDesignSystem\"\r\n [formControlName]=\"column.formControlName\" [id]=\"column.formControlName\"\r\n [label]=\"isArabicForm? column.arabicLabel : column.englishLabel\" [items]=\"column.data!\"\r\n [valueField]=\"column.valueField!\" [textField]=\"column.textField!\" [required]=\"column.required\"\r\n [searchable]=\"column.searchable!\" [notFoundText]=\"column.notFoundText!\" [classes]=\"column.inputClasses!\"\r\n [containerClasses]=\"column.containerClasses!\" [isArabicForm]=\"isArabicForm\" [fromGenerateForm]=\"true\">\r\n </ipa-dropdown-input>\r\n </div>\r\n\r\n <!-- CHECKBOX -->\r\n <div *ngSwitchCase=\"'checkbox'\" [class]=\"column.containerClasses\">\r\n <label>\r\n <span *ngIf=\"column.required\" class=\"text-danger\">*</span>\r\n {{isArabicForm? column.arabicLabel : column.englishLabel}}\r\n </label>\r\n <ng-container [formArrayName]=\"'items'+ column.formControlName\"\r\n *ngFor=\"let control of getFormControls(column.formControlName).controls; let i = index\">\r\n <div class=\"form-check {{column.inputClasses}}\" [formGroupName]=\"i\">\r\n <input [id]=\"column.formControlName+control.value[column.valueField!]\" class=\"form-check-input\"\r\n type=\"checkbox\" formControlName=\"checkbox\">\r\n <label class=\"form-check-label\" [for]=\"column.formControlName+control.value[column.valueField!]\">\r\n {{control.value[column.textField!]}}\r\n </label>\r\n </div>\r\n </ng-container>\r\n <div class=\"invalid-feedback\" style=\"display: block !important;\"\r\n *ngIf=\"getErrorMessage(column.formControlName) !== null\">\r\n {{errorMsg}}\r\n </div>\r\n </div>\r\n\r\n <!-- RADIO -->\r\n <div *ngSwitchCase=\"'radio'\" [class]=\"column.containerClasses\">\r\n <label>\r\n <span *ngIf=\"column.required\" class=\"text-danger\">*</span>\r\n {{isArabicForm? column.arabicLabel : column.englishLabel}}\r\n </label>\r\n <ng-container *ngFor=\"let item of column.data; let i = index\">\r\n <div class=\"form-check {{column.inputClasses}}\">\r\n <input [id]=\"column.formControlName+item[column.valueField!]\" class=\"form-check-input\" type=\"radio\"\r\n [formControlName]=\"column.formControlName\" [value]=\"item[column.textField!]\">\r\n <label class=\"form-check-label\" [for]=\"column.formControlName+item[column.valueField!]\">\r\n {{item[column.textField!]}}\r\n </label>\r\n </div>\r\n </ng-container>\r\n <div class=\"invalid-feedback\" style=\"display: block !important;\"\r\n *ngIf=\"getErrorMessage(column.formControlName) !== null\">\r\n {{errorMsg}}\r\n </div>\r\n </div>\r\n\r\n <!-- FILE UPLOAD -->\r\n <div *ngSwitchCase=\"'file'\" [class]=\"column.containerClasses\">\r\n <ipa-file-upload [isArabicForm]=\"isArabicForm\" [required]=\"column.required\"\r\n [label]=\"isArabicForm? column.arabicLabel : column.englishLabel\" [acceptedFiles]=\"column.acceptedFiles!\"\r\n [multiple]=\"column.multipleFile!\" [maxFileSize]=\"column.size!\" [method]=\"column.apiURlMethod!\"\r\n [autoUpload]=\"column.autoUploadFile!\" [apiUrl]=\"column.apiUrl?? 'apiUrl' \"\r\n [authorization]=\"column.authorization!\" ngDefaultControl [formControlName]=\"column.formControlName\"\r\n (successUpload)=\"SuccessUpload($event)\" (fileAdded)=\"FileAdded($event, column.formControlName)\"\r\n (fileDeleted)=\"FileDeleted($event, column.formControlName)\">\r\n </ipa-file-upload>\r\n </div>\r\n\r\n <!-- recaptcha -->\r\n <div *ngSwitchCase=\"'recaptcha'\" [class]=\"column.containerClasses\">\r\n <ipa-recaptcha [recaptchaSize]=\"recaptchaSize\" [lang]=\"isArabicForm? 'ar':'en'\" [theme]=\"theme\"\r\n [recaptchaType]=\"recaptchaType\" [useGlobalDomain]=\"useGlobalDomain\"\r\n formControlName=\"{{column.formControlName}}\">\r\n </ipa-recaptcha>\r\n </div>\r\n\r\n <!-- DEFAULT -->\r\n <div *ngSwitchDefault>\r\n <ipa-text-input [isPlatformCodeDesignSystem]=\"isPlatformCodeDesignSystem\"\r\n [formControlName]=\"column.formControlName\" [id]=\"column.formControlName\" [type]=\"column.type\"\r\n [label]=\"isArabicForm? column.arabicLabel : column.englishLabel\" [required]=\"column.required\"\r\n [placeholder]=\"isArabicForm? column.arabicLabel : column.englishLabel\"\r\n [patternErrorMsg]=\"isArabicForm? column.patternArErrorMsg! : column.patternEnErrorMsg!\"\r\n [classes]=\"column.inputClasses!\" [containerClasses]=\"column.containerClasses!\" [isArabicForm]=\"isArabicForm\">\r\n </ipa-text-input>\r\n </div>\r\n </div>\r\n </ng-container>\r\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i2$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2$2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2$2.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$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: i2$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2$1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i2$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "component", type: TextInputComponent, selector: "ipa-text-input", inputs: ["isPlatformCodeDesignSystem", "id", "type", "label", "placeholder", "required", "patternErrorMsg", "onlyNumber", "pattern", "classes", "containerClasses", "isArabicForm"] }, { kind: "component", type: TextareaInputComponent, selector: "ipa-textarea-input", inputs: ["isPlatformCodeDesignSystem", "id", "label", "placeholder", "required", "patternErrorMsg", "pattern", "classes", "containerClasses", "isArabicForm"] }, { kind: "component", type: DropdownInputComponent, selector: "ipa-dropdown-input", inputs: ["id", "isPlatformCodeDesignSystem", "label", "items", "textField", "valueField", "required", "firstItemLabel", "searchable", "notFoundText", "classes", "containerClasses", "isArabicForm", "fromGenerateForm"] }, { kind: "component", type: FileUploadComponent, selector: "ipa-file-upload", inputs: ["isArabicForm", "label", "required", "acceptedFiles", "multiple", "maxFileSize", "method", "autoUpload", "apiUrl", "authorization"], outputs: ["successUpload", "fileAdded", "fileDeleted"] }, { kind: "component", type: RecaptchaComponent, selector: "ipa-recaptcha", inputs: ["siteKey", "recaptchaSize", "lang", "recaptchaType", "theme", "useGlobalDomain"] }] }); }
1043
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: GenerateFormComponent, isStandalone: false, selector: "ipa-generate-form", inputs: { generateForm: "generateForm", form: "form", isArabicForm: "isArabicForm", isPlatformCodeDesignSystem: "isPlatformCodeDesignSystem", siteKey: "siteKey", recaptchaSize: "recaptchaSize", lang: "lang", recaptchaType: "recaptchaType", theme: "theme", useGlobalDomain: "useGlobalDomain" }, outputs: { successUpload: "successUpload", fileAdded: "fileAdded", fileDeleted: "fileDeleted" }, ngImport: i0, template: "<form [formGroup]=\"generateForm\">\r\n <ng-container *ngFor=\"let column of form.columns\">\r\n <div [ngSwitch]=\"column.type\">\r\n <!-- TEXTAREA -->\r\n <div *ngSwitchCase=\"'textArea'\">\r\n <ipa-textarea-input [isPlatformCodeDesignSystem]=\"isPlatformCodeDesignSystem\"\r\n [formControlName]=\"column.formControlName\" [id]=\"column.formControlName\"\r\n [label]=\"isArabicForm? column.arabicLabel : column.englishLabel\" [required]=\"column.required\"\r\n [placeholder]=\"isArabicForm? column.arabicLabel : column.englishLabel\"\r\n [patternErrorMsg]=\"isArabicForm? column.patternArErrorMsg! : column.patternEnErrorMsg!\"\r\n [classes]=\"column.inputClasses!\" [containerClasses]=\"column.containerClasses!\" [isArabicForm]=\"isArabicForm\">\r\n </ipa-textarea-input>\r\n </div>\r\n\r\n <!-- DROP DOWN LIST -->\r\n <div *ngSwitchCase=\"'select'\">\r\n <ipa-dropdown-input [isPlatformCodeDesignSystem]=\"isPlatformCodeDesignSystem\"\r\n [formControlName]=\"column.formControlName\" [id]=\"column.formControlName\"\r\n [label]=\"isArabicForm? column.arabicLabel : column.englishLabel\" [items]=\"column.data!\"\r\n [valueField]=\"column.valueField!\" [textField]=\"column.textField!\" [required]=\"column.required\"\r\n [searchable]=\"column.searchable!\" [notFoundText]=\"column.notFoundText!\" [classes]=\"column.inputClasses!\"\r\n [containerClasses]=\"column.containerClasses!\" [isArabicForm]=\"isArabicForm\" [fromGenerateForm]=\"true\">\r\n </ipa-dropdown-input>\r\n </div>\r\n\r\n <!-- CHECKBOX -->\r\n <div *ngSwitchCase=\"'checkbox'\" [class]=\"column.containerClasses\">\r\n <label>\r\n <span *ngIf=\"column.required\" class=\"text-danger\">*</span>\r\n {{isArabicForm? column.arabicLabel : column.englishLabel}}\r\n </label>\r\n <ng-container [formArrayName]=\"'items'+ column.formControlName\"\r\n *ngFor=\"let control of getFormControls(column.formControlName).controls; let i = index\">\r\n <div class=\"form-check {{column.inputClasses}}\" [formGroupName]=\"i\">\r\n <input [id]=\"column.formControlName+control.value[column.valueField!]\" class=\"form-check-input\"\r\n type=\"checkbox\" formControlName=\"checkbox\">\r\n <label class=\"form-check-label\" [for]=\"column.formControlName+control.value[column.valueField!]\">\r\n {{control.value[column.textField!]}}\r\n </label>\r\n </div>\r\n </ng-container>\r\n <div class=\"invalid-feedback\" style=\"display: block !important;\"\r\n *ngIf=\"getErrorMessage(column.formControlName) !== null\">\r\n {{errorMsg}}\r\n </div>\r\n </div>\r\n\r\n <!-- RADIO -->\r\n <div *ngSwitchCase=\"'radio'\" [class]=\"column.containerClasses\">\r\n <label>\r\n <span *ngIf=\"column.required\" class=\"text-danger\">*</span>\r\n {{isArabicForm? column.arabicLabel : column.englishLabel}}\r\n </label>\r\n <ng-container *ngFor=\"let item of column.data; let i = index\">\r\n <div class=\"form-check {{column.inputClasses}}\">\r\n <input [id]=\"column.formControlName+item[column.valueField!]\" class=\"form-check-input\" type=\"radio\"\r\n [formControlName]=\"column.formControlName\" [value]=\"item[column.textField!]\">\r\n <label class=\"form-check-label\" [for]=\"column.formControlName+item[column.valueField!]\">\r\n {{item[column.textField!]}}\r\n </label>\r\n </div>\r\n </ng-container>\r\n <div class=\"invalid-feedback\" style=\"display: block !important;\"\r\n *ngIf=\"getErrorMessage(column.formControlName) !== null\">\r\n {{errorMsg}}\r\n </div>\r\n </div>\r\n\r\n <!-- FILE UPLOAD -->\r\n <div *ngSwitchCase=\"'file'\" [class]=\"column.containerClasses\">\r\n <ipa-file-upload [isArabicForm]=\"isArabicForm\" [required]=\"column.required\"\r\n [label]=\"isArabicForm? column.arabicLabel : column.englishLabel\" [acceptedFiles]=\"column.acceptedFiles!\"\r\n [multiple]=\"column.multipleFile!\" [maxFileSize]=\"column.size!\" [method]=\"column.apiURlMethod!\"\r\n [autoUpload]=\"column.autoUploadFile!\" [apiUrl]=\"column.apiUrl?? 'apiUrl' \"\r\n [authorization]=\"column.authorization!\" ngDefaultControl [formControlName]=\"column.formControlName\"\r\n (successUpload)=\"SuccessUpload($event)\" (fileAdded)=\"FileAdded($event, column.formControlName)\"\r\n (fileDeleted)=\"FileDeleted($event, column.formControlName)\">\r\n </ipa-file-upload>\r\n </div>\r\n\r\n <!-- recaptcha -->\r\n <div *ngSwitchCase=\"'recaptcha'\" [class]=\"column.containerClasses\">\r\n <ipa-recaptcha [recaptchaSize]=\"recaptchaSize\" [lang]=\"isArabicForm? 'ar':'en'\" [theme]=\"theme\"\r\n [recaptchaType]=\"recaptchaType\" [useGlobalDomain]=\"useGlobalDomain\"\r\n formControlName=\"{{column.formControlName}}\">\r\n </ipa-recaptcha>\r\n </div>\r\n\r\n <!-- DEFAULT -->\r\n <div *ngSwitchDefault>\r\n <ipa-text-input [isPlatformCodeDesignSystem]=\"isPlatformCodeDesignSystem\"\r\n [formControlName]=\"column.formControlName\" [id]=\"column.formControlName\" [type]=\"column.type\"\r\n [label]=\"isArabicForm? column.arabicLabel : column.englishLabel\" [required]=\"column.required\"\r\n [placeholder]=\"isArabicForm? column.arabicLabel : column.englishLabel\"\r\n [patternErrorMsg]=\"isArabicForm? column.patternArErrorMsg! : column.patternEnErrorMsg!\"\r\n [classes]=\"column.inputClasses!\" [containerClasses]=\"column.containerClasses!\" [isArabicForm]=\"isArabicForm\">\r\n </ipa-text-input>\r\n </div>\r\n </div>\r\n </ng-container>\r\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i2$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2$2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2$2.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$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: i2$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2$1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i2$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "component", type: TextInputComponent, selector: "ipa-text-input", inputs: ["isPlatformCodeDesignSystem", "id", "type", "label", "placeholder", "required", "patternErrorMsg", "onlyNumber", "pattern", "classes", "containerClasses", "isArabicForm"] }, { kind: "component", type: TextareaInputComponent, selector: "ipa-textarea-input", inputs: ["isPlatformCodeDesignSystem", "id", "label", "placeholder", "required", "patternErrorMsg", "pattern", "classes", "containerClasses", "isArabicForm"] }, { kind: "component", type: DropdownInputComponent, selector: "ipa-dropdown-input", inputs: ["id", "isPlatformCodeDesignSystem", "label", "items", "textField", "valueField", "required", "firstItemLabel", "searchable", "notFoundText", "classes", "containerClasses", "isArabicForm", "fromGenerateForm"] }, { kind: "component", type: FileUploadComponent, selector: "ipa-file-upload", inputs: ["isArabicForm", "label", "required", "acceptedFiles", "multiple", "maxFileSize", "method", "autoUpload", "apiUrl", "authorization", "disabled"], outputs: ["successUpload", "fileAdded", "fileDeleted"] }, { kind: "component", type: RecaptchaComponent, selector: "ipa-recaptcha", inputs: ["siteKey", "recaptchaSize", "lang", "recaptchaType", "theme", "useGlobalDomain"] }] }); }
1010
1044
  }
1011
1045
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GenerateFormComponent, decorators: [{
1012
1046
  type: Component,