@bnsights/bbsf-controls 1.0.190 → 1.0.191
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -1
- package/esm2022/lib/Shared/Models/RepeaterOptions.mjs +2 -1
- package/esm2022/lib/controls/FileUpload/FileUpload.component.mjs +15 -5
- package/esm2022/lib/controls/HtmlEditor/HtmlEditor.component.mjs +2 -2
- package/esm2022/lib/controls/MultiLingualHtmlEditor/MultiLingualHtmlEditor.component.mjs +74 -50
- package/esm2022/lib/controls/Repeater/repeater-field-builder/repeater-field-builder.component.mjs +612 -148
- package/esm2022/lib/controls/Repeater/repeater-table/repeater-table.component.mjs +8 -6
- package/fesm2022/bnsights-bbsf-controls.mjs +707 -206
- package/fesm2022/bnsights-bbsf-controls.mjs.map +1 -1
- package/lib/Shared/Models/RepeaterOptions.d.ts +1 -0
- package/package.json +1 -1
|
@@ -2803,6 +2803,7 @@ class RepeaterOptions {
|
|
|
2803
2803
|
this.disableAddButton = false;
|
|
2804
2804
|
this.disableDeleteButton = false;
|
|
2805
2805
|
this.isReadonly = false;
|
|
2806
|
+
this.enableTableNumbering = false;
|
|
2806
2807
|
}
|
|
2807
2808
|
}
|
|
2808
2809
|
|
|
@@ -3022,7 +3023,7 @@ class FileUploadComponent {
|
|
|
3022
3023
|
// blob.lastModifiedDate = null;
|
|
3023
3024
|
// blob.webkitRelativePath = '';
|
|
3024
3025
|
let file = this.fileLikeObject;
|
|
3025
|
-
file.url = element.
|
|
3026
|
+
file.url = element.fullFileURL;
|
|
3026
3027
|
files.push(file);
|
|
3027
3028
|
}
|
|
3028
3029
|
this.uploader.addToQueue(files);
|
|
@@ -3039,7 +3040,7 @@ class FileUploadComponent {
|
|
|
3039
3040
|
};
|
|
3040
3041
|
this.file = element;
|
|
3041
3042
|
let file = this.fileLikeObject;
|
|
3042
|
-
file.url = element.
|
|
3043
|
+
file.url = element.fullFileURL;
|
|
3043
3044
|
this.uploader.addToQueue([file]);
|
|
3044
3045
|
if (!this.options.value.file) {
|
|
3045
3046
|
this.fileUploadModel = new FileUploadModel();
|
|
@@ -3317,6 +3318,16 @@ class FileUploadComponent {
|
|
|
3317
3318
|
return;
|
|
3318
3319
|
}
|
|
3319
3320
|
}
|
|
3321
|
+
if (!this.options.isMultipleFile && this.uploader.queue.length > 1) {
|
|
3322
|
+
const formControl = this.fileUploadFormControl;
|
|
3323
|
+
const newErrors = {
|
|
3324
|
+
MaxFileCountValidationKey: 1
|
|
3325
|
+
};
|
|
3326
|
+
formControl.setErrors(newErrors);
|
|
3327
|
+
formControl.markAsTouched();
|
|
3328
|
+
this.uploader.queue = [];
|
|
3329
|
+
return;
|
|
3330
|
+
}
|
|
3320
3331
|
let AddedQueue = this.uploader.queue.filter((obj) => obj['some'].lastModified != null);
|
|
3321
3332
|
let hasValidationError = false;
|
|
3322
3333
|
let validationErrorType = '';
|
|
@@ -3616,11 +3627,11 @@ class FileUploadComponent {
|
|
|
3616
3627
|
this.options.value = value;
|
|
3617
3628
|
}
|
|
3618
3629
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FileUploadComponent, deps: [{ token: i2.ControlContainer, optional: true }, { token: i2.FormGroupDirective }, { token: ControlUtility }, { token: i3.UtilityService }, { token: i3.ControlValidationService }, { token: GlobalSettings }, { token: FileUploadService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3619
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: FileUploadComponent, selector: "BBSF-FileUpload", inputs: { group: "group", options: "options" }, outputs: { OnChange: "OnChange", isUploadComplete: "isUploadComplete" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], ngImport: i0, template: "<div class=\"form-group bbsf-control bbsf-file-upload\" [formGroup]=\"group\">\r\n <div [ngClass]=\"options.viewType == 1 ? 'bbsf-vertical' : 'bbsf-horizontal'\">\r\n <!--label-->\r\n <label [hidden]=\"options.hideLabel\" class=\"bbsf-label {{ options.labelExtraClasses }}\">\r\n {{ options.labelValue }}\r\n <!--Asterisk-->\r\n <span *ngIf=\"((options.showAsterisk && options.isRequired) || options.isRequired) && !options.isReadonly\"\r\n class=\"text-danger\">*</span>\r\n </label>\r\n <!--Allow dropZone-->\r\n <div ng2FileDrop class=\"bbsf-input-container {{ options.extraClasses }}\"\r\n *ngIf=\"options.isDropZone && !(options.isMultipleFile == false && uploader.queue.length > 0) && !options.isReadonly\"\r\n [ngClass]=\"{ 'another-file-over-class': hasAnotherDropZoneOver }\" (onFileDrop)=\"onFileChange()\"\r\n (fileOver)=\"fileOverAnother($event)\" [uploader]=\"uploader\" [accept]=\"acceptedType\" id=\"{{ options.name }}\"\r\n multiple=\"{{ options.isMultipleFile ? 'multiple' : '' }}\" aria-invalid=\"true\" type=\"file\"\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\"\r\n (click)=\"fileInputDropZone.click()\">\r\n <div class=\"dropzone-label\">\r\n <div class=\"svg-and-validation\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"70\" height=\"70\" viewBox=\"0 0 70 70\" fill=\"none\">\r\n <path opacity=\"0.4\"\r\n d=\"M58.333 48.8332C61.8957 45.8908 64.1663 41.4397 64.1663 36.4583C64.1663 27.5988 56.9843 20.4167 48.1247 20.4167C47.4874 20.4167 46.8912 20.0842 46.5675 19.5351C42.7641 13.0808 35.7417 8.75 27.708 8.75C15.6268 8.75 5.83301 18.5438 5.83301 30.625C5.83301 36.6511 8.26974 42.1082 12.2116 46.0644\"\r\n stroke=\"#4B5489\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n <path d=\"M23.333 46.6667L34.9997 35M34.9997 35L46.6663 46.6667M34.9997 35V61.25\" stroke=\"#4B5489\"\r\n stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n <!--Validation text-->\r\n <div class=\"bbsf-validation-msg validation-msg-header text-center\">\r\n {{ UtilityService.getResourceValue('DragAndDropHere') }}\r\n </div>\r\n <div class=\"bbsf-validation-msg text-center\" *ngIf=\"validationMessage\" [innerHTML]=\"validationMessage\"></div>\r\n <div class=\"bbsf-validation-msg ng-star-inserted text-center text-danger\"\r\n *ngIf=\"validationCountMessage && options.isMultipleFile && options.maxNoOfFiles > 0\"\r\n [innerHTML]=\"validationCountMessage\"></div>\r\n </div>\r\n </div>\r\n <input ng2FileSelect [uploader]=\"uploader\" [accept]=\"acceptedType\"\r\n class=\"fileSelector customFileUploadPlacment hidden v-required-multiplefiles d-none\"\r\n multiple=\"{{ options.isMultipleFile ? 'multiple' : '' }}\" name=\"file\" type=\"file\" value=\"\" autocomplete=\"off\"\r\n (change)=\"onFileChange()\" [ngClass]=\"options.viewType == 1 ? '' : 'col-md-9'\" id=\"{{ options.name }}\"\r\n aria-invalid=\"true\" #fileInputDropZone\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\" />\r\n </div>\r\n <!--Not allowed dropZone-->\r\n <div class=\"bbsf-input-container\" *ngIf=\"!options.isDropZone && !isHideInput() && !options.isReadonly\"\r\n (click)=\"fileInput.click()\">\r\n <div class=\"dropzone-label\">\r\n <div class=\"svg-and-validation\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"70\" height=\"70\" viewBox=\"0 0 70 70\" fill=\"none\">\r\n <path opacity=\"0.4\"\r\n d=\"M58.333 48.8332C61.8957 45.8908 64.1663 41.4397 64.1663 36.4583C64.1663 27.5988 56.9843 20.4167 48.1247 20.4167C47.4874 20.4167 46.8912 20.0842 46.5675 19.5351C42.7641 13.0808 35.7417 8.75 27.708 8.75C15.6268 8.75 5.83301 18.5438 5.83301 30.625C5.83301 36.6511 8.26974 42.1082 12.2116 46.0644\"\r\n stroke=\"#4B5489\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n <path d=\"M23.333 46.6667L34.9997 35M34.9997 35L46.6663 46.6667M34.9997 35V61.25\" stroke=\"#4B5489\"\r\n stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n <!--Validation text-->\r\n <div class=\"bbsf-validation-msg text-center\">{{ UtilityService.getResourceValue('Upload') }}</div>\r\n <div class=\"bbsf-validation-msg text-center\" *ngIf=\"validationMessage\" [innerHTML]=\"validationMessage\"></div>\r\n <div class=\"bbsf-validation-msg ng-star-inserted text-center text-danger\"\r\n *ngIf=\"validationCountMessage && options.isMultipleFile && options.maxNoOfFiles > 0\"\r\n [innerHTML]=\"validationCountMessage\"></div>\r\n </div>\r\n </div>\r\n <input ng2FileSelect [uploader]=\"uploader\" [accept]=\"acceptedType\"\r\n class=\"fileSelector customFileUploadPlacment hidden v-required-multiplefiles d-none\"\r\n multiple=\"{{ options.isMultipleFile ? 'multiple' : '' }}\" name=\"file\" type=\"file\" value=\"\" autocomplete=\"off\"\r\n (change)=\"onFileChange()\" [ngClass]=\"options.viewType == 1 ? '' : 'col-md-9'\" id=\"{{ options.name }}\"\r\n aria-invalid=\"true\" #fileInput\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\" />\r\n </div>\r\n <!-- readonly -->\r\n <div *ngIf=\"options.isReadonly && !options.value\">\r\n <span class=\"readonly-view\">{{ UtilityService.getResourceValue('NA') }}</span>\r\n </div>\r\n </div>\r\n <!--items uploaded-->\r\n <div class=\"uploaded-items\">\r\n <div class=\"btn-group\" *ngFor=\"let item of uploader.queue\">\r\n <ng-container *ngIf=\"item?.progress == 100 && options.isUploadFileAsync\">\r\n <a *ngIf=\"item?.file?.rawFile['url']\" href=\"{{ item?.file?.rawFile['url'] }}\"\r\n class=\"btn-download-file btn-sm btn-progress-upload\" download>\r\n <span class=\"file-name\">{{ sanitizeFileName(item?.file?.name || '') }}</span>\r\n </a>\r\n <a *ngIf=\"item?.file?.rawFile['url'] == null\" class=\"btn-download-file btn-sm btn-progress-upload\">\r\n <span class=\"file-name\">{{ sanitizeFileName(item?.file?.name || '') }}</span>\r\n </a>\r\n <button *ngIf=\"!options.isReadonly\" class=\"btn btn-download-file btn-sm\"\r\n (click)=\"item.remove(); removeFromControlValue(item)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\">\r\n <path opacity=\"0.4\"\r\n d=\"M9.33301 3.70584V3.26663C9.33301 2.65166 9.33301 2.34419 9.20587 2.1093C9.09405 1.9027 8.91555 1.73471 8.69604 1.62944C8.44647 1.50977 8.11977 1.50977 7.46638 1.50977H6.53305C5.87965 1.50977 5.55296 1.50977 5.30339 1.62944C5.08387 1.73471 4.90539 1.9027 4.79354 2.1093C4.66638 2.34419 4.66638 2.65166 4.66638 3.26663V3.70584\"\r\n stroke=\"#D83731\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M1.75 3.70605H12.25M11.0834 3.70605V9.8551C11.0834 10.7775 11.0834 11.2387 10.8926 11.591C10.7248 11.901 10.4571 12.1529 10.1278 12.3109C9.75345 12.4904 9.26345 12.4904 8.28334 12.4904H5.71666C4.73658 12.4904 4.24653 12.4904 3.87218 12.3109C3.5429 12.1529 3.27519 11.901 3.10741 11.591C2.91666 11.2387 2.91666 10.7775 2.91666 9.8551V3.70605\"\r\n stroke=\"#D83731\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngIf=\"!options.isUploadFileAsync\">\r\n <a href=\"{{ item?.file?.rawFile['url'] }}\" class=\"btn btn-download-file btn-sm\" download>\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path\r\n d=\"M21 22H3C2.4 22 2 21.6 2 21C2 20.4 2.4 20 3 20H21C21.6 20 22 20.4 22 21C22 21.6 21.6 22 21 22ZM13 13.4V3C13 2.4 12.6 2 12 2C11.4 2 11 2.4 11 3V13.4H13Z\"\r\n fill=\"currentColor\"></path>\r\n <path opacity=\"0.3\" d=\"M7 13.4H17L12.7 17.7C12.3 18.1 11.7 18.1 11.3 17.7L7 13.4Z\" fill=\"currentColor\">\r\n </path>\r\n </svg>\r\n <span class=\"file-name\">{{ sanitizeFileName(item?.file?.name || '') }}</span>\r\n </a>\r\n <button *ngIf=\"!options.isReadonly\" class=\"btn btn-download-file btn-sm btn-danger\"\r\n (click)=\"item.remove(); removeFromControlValue(item)\">\r\n <i class=\"fa fa-times px-0\"></i>\r\n </button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <!--progress bar file upload-->\r\n <div *ngFor=\"let item of uploader.queue\">\r\n <div class=\"upload-items\" [ngClass]=\"{ 'mt-4': options.isMultipleFile == true }\"\r\n *ngIf=\"item?.progress < 100 && options.isUploadFileAsync\">\r\n <div class=\"upload-items-toolbar\">\r\n <h4>{{ item?.file?.name }}</h4>\r\n <span (click)=\"item.remove(); removeFromControlValue(item)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_1324_13216)\">\r\n <path opacity=\"0.4\"\r\n d=\"M9 16.5C13.1421 16.5 16.5 13.1421 16.5 9C16.5 4.85786 13.1421 1.5 9 1.5C4.85786 1.5 1.5 4.85786 1.5 9C1.5 13.1421 4.85786 16.5 9 16.5Z\"\r\n stroke=\"#DBE1F0\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n <path d=\"M11.25 6.75L6.75 11.25M6.75 6.75L11.25 11.25\" stroke=\"#DBE1F0\" stroke-width=\"2\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_1324_13216\">\r\n <rect width=\"18\" height=\"18\" fill=\"white\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n </span>\r\n </div>\r\n <div class=\"progress\">\r\n <div class=\"progress-bar\" role=\"progressbar\" aria-valuenow=\"70\" aria-valuemin=\"0\" aria-valuemax=\"100\"\r\n [class.file-uploaded]=\"item?.progress < 100\" [style.width.%]=\"item?.progress\" *ngIf=\"item?.progress > 0\">\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"subtext-container\" *ngIf=\"!options.isReadonly\">\r\n <!-- required text-->\r\n <div class=\"bbsf-validation\" *ngIf=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\">\r\n {{ getErrorValidation(fileUploadFormControl.errors | keyvalue) }}\r\n </div>\r\n <!-- LabelDescription-->\r\n <div class=\"bbsf-control-desc\" *ngIf=\"options.labelDescription != null\">{{ options.labelDescription }}</div>\r\n <div *ngIf=\"(group.valid && group.dirty && group.touched) || (group.untouched && group.invalid && group.dirty)\">\r\n {{ resetError() }}\r\n </div>\r\n </div>\r\n</div>", dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5$2.FileDropDirective, selector: "[ng2FileDrop]", inputs: ["uploader"], outputs: ["fileOver", "onFileDrop"] }, { kind: "directive", type: i5$2.FileSelectDirective, selector: "[ng2FileSelect]", inputs: ["uploader"], outputs: ["onFileSelected"] }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "pipe", type: i5.KeyValuePipe, name: "keyvalue" }] }); }
|
|
3630
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: FileUploadComponent, selector: "BBSF-FileUpload", inputs: { group: "group", options: "options" }, outputs: { OnChange: "OnChange", isUploadComplete: "isUploadComplete" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], ngImport: i0, template: "<div class=\"form-group bbsf-control bbsf-file-upload\" [formGroup]=\"group\">\r\n <div [ngClass]=\"options.viewType == 1 ? 'bbsf-vertical' : 'bbsf-horizontal'\">\r\n <!--label-->\r\n <label [hidden]=\"options.hideLabel\" class=\"bbsf-label {{ options.labelExtraClasses }}\">\r\n {{ options.labelValue }}\r\n <!--Asterisk-->\r\n <span *ngIf=\"((options.showAsterisk && options.isRequired) || options.isRequired) && !options.isReadonly\"\r\n class=\"text-danger\">*</span>\r\n </label>\r\n <!--Allow dropZone-->\r\n <div ng2FileDrop class=\"bbsf-input-container {{ options.extraClasses }}\"\r\n *ngIf=\"options.isDropZone && !(options.isMultipleFile == false && uploader.queue.length > 0) && !options.isReadonly\"\r\n [ngClass]=\"{ 'another-file-over-class': hasAnotherDropZoneOver }\" (onFileDrop)=\"onFileChange()\"\r\n (fileOver)=\"fileOverAnother($event)\" [uploader]=\"uploader\" [accept]=\"acceptedType\" id=\"{{ options.name }}\"\r\n multiple=\"{{ options.isMultipleFile ? 'multiple' : '' }}\" aria-invalid=\"true\" type=\"file\"\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\"\r\n (click)=\"fileInputDropZone.click()\">\r\n <div class=\"dropzone-label\">\r\n <div class=\"svg-and-validation\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"70\" height=\"70\" viewBox=\"0 0 70 70\" fill=\"none\">\r\n <path opacity=\"0.4\"\r\n d=\"M58.333 48.8332C61.8957 45.8908 64.1663 41.4397 64.1663 36.4583C64.1663 27.5988 56.9843 20.4167 48.1247 20.4167C47.4874 20.4167 46.8912 20.0842 46.5675 19.5351C42.7641 13.0808 35.7417 8.75 27.708 8.75C15.6268 8.75 5.83301 18.5438 5.83301 30.625C5.83301 36.6511 8.26974 42.1082 12.2116 46.0644\"\r\n stroke=\"#4B5489\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n <path d=\"M23.333 46.6667L34.9997 35M34.9997 35L46.6663 46.6667M34.9997 35V61.25\" stroke=\"#4B5489\"\r\n stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n <!--Validation text-->\r\n <div class=\"bbsf-validation-msg validation-msg-header text-center\">\r\n {{ UtilityService.getResourceValue('DragAndDropHere') }}\r\n </div>\r\n <div class=\"bbsf-validation-msg text-center\" *ngIf=\"validationMessage\" [innerHTML]=\"validationMessage\"></div>\r\n <div class=\"bbsf-validation-msg ng-star-inserted text-center text-danger\"\r\n *ngIf=\"validationCountMessage && options.isMultipleFile && options.maxNoOfFiles > 0\"\r\n [innerHTML]=\"validationCountMessage\"></div>\r\n </div>\r\n </div>\r\n <input ng2FileSelect [uploader]=\"uploader\" [accept]=\"acceptedType\"\r\n class=\"fileSelector customFileUploadPlacment hidden v-required-multiplefiles d-none\"\r\n multiple=\"{{ options.isMultipleFile ? 'multiple' : '' }}\" name=\"file\" type=\"file\" value=\"\" autocomplete=\"off\"\r\n (change)=\"onFileChange()\" [ngClass]=\"options.viewType == 1 ? '' : 'col-md-9'\" id=\"{{ options.name }}\"\r\n aria-invalid=\"true\" #fileInputDropZone\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\" />\r\n </div>\r\n <!--Not allowed dropZone-->\r\n <div class=\"bbsf-input-container\" *ngIf=\"!options.isDropZone && !isHideInput() && !options.isReadonly\"\r\n (click)=\"fileInput.click()\">\r\n <div class=\"dropzone-label\">\r\n <div class=\"svg-and-validation\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"70\" height=\"70\" viewBox=\"0 0 70 70\" fill=\"none\">\r\n <path opacity=\"0.4\"\r\n d=\"M58.333 48.8332C61.8957 45.8908 64.1663 41.4397 64.1663 36.4583C64.1663 27.5988 56.9843 20.4167 48.1247 20.4167C47.4874 20.4167 46.8912 20.0842 46.5675 19.5351C42.7641 13.0808 35.7417 8.75 27.708 8.75C15.6268 8.75 5.83301 18.5438 5.83301 30.625C5.83301 36.6511 8.26974 42.1082 12.2116 46.0644\"\r\n stroke=\"#4B5489\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n <path d=\"M23.333 46.6667L34.9997 35M34.9997 35L46.6663 46.6667M34.9997 35V61.25\" stroke=\"#4B5489\"\r\n stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n <!--Validation text-->\r\n <div class=\"bbsf-validation-msg text-center\">{{ UtilityService.getResourceValue('Upload') }}</div>\r\n <div class=\"bbsf-validation-msg text-center\" *ngIf=\"validationMessage\" [innerHTML]=\"validationMessage\"></div>\r\n <div class=\"bbsf-validation-msg ng-star-inserted text-center text-danger\"\r\n *ngIf=\"validationCountMessage && options.isMultipleFile && options.maxNoOfFiles > 0\"\r\n [innerHTML]=\"validationCountMessage\"></div>\r\n </div>\r\n </div>\r\n <input ng2FileSelect [uploader]=\"uploader\" [accept]=\"acceptedType\"\r\n class=\"fileSelector customFileUploadPlacment hidden v-required-multiplefiles d-none\"\r\n multiple=\"{{ options.isMultipleFile ? 'multiple' : '' }}\" name=\"file\" type=\"file\" value=\"\" autocomplete=\"off\"\r\n (change)=\"onFileChange()\" [ngClass]=\"options.viewType == 1 ? '' : 'col-md-9'\" id=\"{{ options.name }}\"\r\n aria-invalid=\"true\" #fileInput\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\" />\r\n </div>\r\n <!-- readonly -->\r\n <div *ngIf=\"options.isReadonly && !options.value\">\r\n <span class=\"readonly-view\">{{ UtilityService.getResourceValue('NA') }}</span>\r\n </div>\r\n </div>\r\n <!--items uploaded-->\r\n <div class=\"uploaded-items\">\r\n <div class=\"btn-group\" *ngFor=\"let item of uploader.queue\">\r\n <ng-container *ngIf=\"item?.progress == 100 && options.isUploadFileAsync\">\r\n <a *ngIf=\"item?.file?.rawFile['url']\" href=\"{{ item?.file?.rawFile['url'] }}\"\r\n class=\"btn-download-file btn-sm btn-progress-upload\" download>\r\n <span class=\"file-name\">{{ sanitizeFileName(item?.file?.name || '') }}</span>\r\n </a>\r\n <a *ngIf=\"item?.file?.rawFile['url'] == null\" class=\"btn-download-file btn-sm btn-progress-upload\">\r\n <span class=\"file-name\">{{ sanitizeFileName(item?.file?.name || '') }}</span>\r\n </a>\r\n <button *ngIf=\"!options.isReadonly\" class=\"btn btn-download-file btn-sm\"\r\n (click)=\"item.remove(); removeFromControlValue(item)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\">\r\n <path opacity=\"0.4\"\r\n d=\"M9.33301 3.70584V3.26663C9.33301 2.65166 9.33301 2.34419 9.20587 2.1093C9.09405 1.9027 8.91555 1.73471 8.69604 1.62944C8.44647 1.50977 8.11977 1.50977 7.46638 1.50977H6.53305C5.87965 1.50977 5.55296 1.50977 5.30339 1.62944C5.08387 1.73471 4.90539 1.9027 4.79354 2.1093C4.66638 2.34419 4.66638 2.65166 4.66638 3.26663V3.70584\"\r\n stroke=\"#D83731\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M1.75 3.70605H12.25M11.0834 3.70605V9.8551C11.0834 10.7775 11.0834 11.2387 10.8926 11.591C10.7248 11.901 10.4571 12.1529 10.1278 12.3109C9.75345 12.4904 9.26345 12.4904 8.28334 12.4904H5.71666C4.73658 12.4904 4.24653 12.4904 3.87218 12.3109C3.5429 12.1529 3.27519 11.901 3.10741 11.591C2.91666 11.2387 2.91666 10.7775 2.91666 9.8551V3.70605\"\r\n stroke=\"#D83731\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngIf=\"!options.isUploadFileAsync\">\r\n <a href=\"{{ item?.file?.rawFile['url'] }}\" *ngIf=\"item?.file?.rawFile['url']\" class=\"btn btn-download-file btn-sm\" download>\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path\r\n d=\"M21 22H3C2.4 22 2 21.6 2 21C2 20.4 2.4 20 3 20H21C21.6 20 22 20.4 22 21C22 21.6 21.6 22 21 22ZM13 13.4V3C13 2.4 12.6 2 12 2C11.4 2 11 2.4 11 3V13.4H13Z\"\r\n fill=\"currentColor\"></path>\r\n <path opacity=\"0.3\" d=\"M7 13.4H17L12.7 17.7C12.3 18.1 11.7 18.1 11.3 17.7L7 13.4Z\" fill=\"currentColor\">\r\n </path>\r\n </svg>\r\n <span class=\"file-name\">{{ sanitizeFileName(item?.file?.name || '') }}</span>\r\n </a>\r\n <a *ngIf=\"item?.file?.rawFile['url'] == null\" class=\"btn-download-file btn-sm btn-progress-upload\">\r\n <span class=\"file-name\">{{ sanitizeFileName(item?.file?.name || '') }}</span>\r\n </a>\r\n <button *ngIf=\"!options.isReadonly\" class=\"btn btn-download-file btn-sm btn-danger\"\r\n (click)=\"item.remove(); removeFromControlValue(item)\">\r\n <i class=\"fa fa-times px-0\"></i>\r\n </button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <!--progress bar file upload-->\r\n <div *ngFor=\"let item of uploader.queue\">\r\n <div class=\"upload-items\" [ngClass]=\"{ 'mt-4': options.isMultipleFile == true }\"\r\n *ngIf=\"item?.progress < 100 && options.isUploadFileAsync\">\r\n <div class=\"upload-items-toolbar\">\r\n <h4>{{ item?.file?.name }}</h4>\r\n <span (click)=\"item.remove(); removeFromControlValue(item)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_1324_13216)\">\r\n <path opacity=\"0.4\"\r\n d=\"M9 16.5C13.1421 16.5 16.5 13.1421 16.5 9C16.5 4.85786 13.1421 1.5 9 1.5C4.85786 1.5 1.5 4.85786 1.5 9C1.5 13.1421 4.85786 16.5 9 16.5Z\"\r\n stroke=\"#DBE1F0\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n <path d=\"M11.25 6.75L6.75 11.25M6.75 6.75L11.25 11.25\" stroke=\"#DBE1F0\" stroke-width=\"2\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_1324_13216\">\r\n <rect width=\"18\" height=\"18\" fill=\"white\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n </span>\r\n </div>\r\n <div class=\"progress\">\r\n <div class=\"progress-bar\" role=\"progressbar\" aria-valuenow=\"70\" aria-valuemin=\"0\" aria-valuemax=\"100\"\r\n [class.file-uploaded]=\"item?.progress < 100\" [style.width.%]=\"item?.progress\" *ngIf=\"item?.progress > 0\">\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"subtext-container\" *ngIf=\"!options.isReadonly\">\r\n <!-- required text-->\r\n <div class=\"bbsf-validation\" *ngIf=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\">\r\n {{ getErrorValidation(fileUploadFormControl.errors | keyvalue) }}\r\n </div>\r\n <!-- LabelDescription-->\r\n <div class=\"bbsf-control-desc\" *ngIf=\"options.labelDescription != null\">{{ options.labelDescription }}</div>\r\n <div *ngIf=\"(group.valid && group.dirty && group.touched) || (group.untouched && group.invalid && group.dirty)\">\r\n {{ resetError() }}\r\n </div>\r\n </div>\r\n</div>", dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5$2.FileDropDirective, selector: "[ng2FileDrop]", inputs: ["uploader"], outputs: ["fileOver", "onFileDrop"] }, { kind: "directive", type: i5$2.FileSelectDirective, selector: "[ng2FileSelect]", inputs: ["uploader"], outputs: ["onFileSelected"] }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "pipe", type: i5.KeyValuePipe, name: "keyvalue" }] }); }
|
|
3620
3631
|
}
|
|
3621
3632
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FileUploadComponent, decorators: [{
|
|
3622
3633
|
type: Component,
|
|
3623
|
-
args: [{ selector: 'BBSF-FileUpload', standalone: false, template: "<div class=\"form-group bbsf-control bbsf-file-upload\" [formGroup]=\"group\">\r\n <div [ngClass]=\"options.viewType == 1 ? 'bbsf-vertical' : 'bbsf-horizontal'\">\r\n <!--label-->\r\n <label [hidden]=\"options.hideLabel\" class=\"bbsf-label {{ options.labelExtraClasses }}\">\r\n {{ options.labelValue }}\r\n <!--Asterisk-->\r\n <span *ngIf=\"((options.showAsterisk && options.isRequired) || options.isRequired) && !options.isReadonly\"\r\n class=\"text-danger\">*</span>\r\n </label>\r\n <!--Allow dropZone-->\r\n <div ng2FileDrop class=\"bbsf-input-container {{ options.extraClasses }}\"\r\n *ngIf=\"options.isDropZone && !(options.isMultipleFile == false && uploader.queue.length > 0) && !options.isReadonly\"\r\n [ngClass]=\"{ 'another-file-over-class': hasAnotherDropZoneOver }\" (onFileDrop)=\"onFileChange()\"\r\n (fileOver)=\"fileOverAnother($event)\" [uploader]=\"uploader\" [accept]=\"acceptedType\" id=\"{{ options.name }}\"\r\n multiple=\"{{ options.isMultipleFile ? 'multiple' : '' }}\" aria-invalid=\"true\" type=\"file\"\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\"\r\n (click)=\"fileInputDropZone.click()\">\r\n <div class=\"dropzone-label\">\r\n <div class=\"svg-and-validation\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"70\" height=\"70\" viewBox=\"0 0 70 70\" fill=\"none\">\r\n <path opacity=\"0.4\"\r\n d=\"M58.333 48.8332C61.8957 45.8908 64.1663 41.4397 64.1663 36.4583C64.1663 27.5988 56.9843 20.4167 48.1247 20.4167C47.4874 20.4167 46.8912 20.0842 46.5675 19.5351C42.7641 13.0808 35.7417 8.75 27.708 8.75C15.6268 8.75 5.83301 18.5438 5.83301 30.625C5.83301 36.6511 8.26974 42.1082 12.2116 46.0644\"\r\n stroke=\"#4B5489\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n <path d=\"M23.333 46.6667L34.9997 35M34.9997 35L46.6663 46.6667M34.9997 35V61.25\" stroke=\"#4B5489\"\r\n stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n <!--Validation text-->\r\n <div class=\"bbsf-validation-msg validation-msg-header text-center\">\r\n {{ UtilityService.getResourceValue('DragAndDropHere') }}\r\n </div>\r\n <div class=\"bbsf-validation-msg text-center\" *ngIf=\"validationMessage\" [innerHTML]=\"validationMessage\"></div>\r\n <div class=\"bbsf-validation-msg ng-star-inserted text-center text-danger\"\r\n *ngIf=\"validationCountMessage && options.isMultipleFile && options.maxNoOfFiles > 0\"\r\n [innerHTML]=\"validationCountMessage\"></div>\r\n </div>\r\n </div>\r\n <input ng2FileSelect [uploader]=\"uploader\" [accept]=\"acceptedType\"\r\n class=\"fileSelector customFileUploadPlacment hidden v-required-multiplefiles d-none\"\r\n multiple=\"{{ options.isMultipleFile ? 'multiple' : '' }}\" name=\"file\" type=\"file\" value=\"\" autocomplete=\"off\"\r\n (change)=\"onFileChange()\" [ngClass]=\"options.viewType == 1 ? '' : 'col-md-9'\" id=\"{{ options.name }}\"\r\n aria-invalid=\"true\" #fileInputDropZone\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\" />\r\n </div>\r\n <!--Not allowed dropZone-->\r\n <div class=\"bbsf-input-container\" *ngIf=\"!options.isDropZone && !isHideInput() && !options.isReadonly\"\r\n (click)=\"fileInput.click()\">\r\n <div class=\"dropzone-label\">\r\n <div class=\"svg-and-validation\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"70\" height=\"70\" viewBox=\"0 0 70 70\" fill=\"none\">\r\n <path opacity=\"0.4\"\r\n d=\"M58.333 48.8332C61.8957 45.8908 64.1663 41.4397 64.1663 36.4583C64.1663 27.5988 56.9843 20.4167 48.1247 20.4167C47.4874 20.4167 46.8912 20.0842 46.5675 19.5351C42.7641 13.0808 35.7417 8.75 27.708 8.75C15.6268 8.75 5.83301 18.5438 5.83301 30.625C5.83301 36.6511 8.26974 42.1082 12.2116 46.0644\"\r\n stroke=\"#4B5489\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n <path d=\"M23.333 46.6667L34.9997 35M34.9997 35L46.6663 46.6667M34.9997 35V61.25\" stroke=\"#4B5489\"\r\n stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n <!--Validation text-->\r\n <div class=\"bbsf-validation-msg text-center\">{{ UtilityService.getResourceValue('Upload') }}</div>\r\n <div class=\"bbsf-validation-msg text-center\" *ngIf=\"validationMessage\" [innerHTML]=\"validationMessage\"></div>\r\n <div class=\"bbsf-validation-msg ng-star-inserted text-center text-danger\"\r\n *ngIf=\"validationCountMessage && options.isMultipleFile && options.maxNoOfFiles > 0\"\r\n [innerHTML]=\"validationCountMessage\"></div>\r\n </div>\r\n </div>\r\n <input ng2FileSelect [uploader]=\"uploader\" [accept]=\"acceptedType\"\r\n class=\"fileSelector customFileUploadPlacment hidden v-required-multiplefiles d-none\"\r\n multiple=\"{{ options.isMultipleFile ? 'multiple' : '' }}\" name=\"file\" type=\"file\" value=\"\" autocomplete=\"off\"\r\n (change)=\"onFileChange()\" [ngClass]=\"options.viewType == 1 ? '' : 'col-md-9'\" id=\"{{ options.name }}\"\r\n aria-invalid=\"true\" #fileInput\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\" />\r\n </div>\r\n <!-- readonly -->\r\n <div *ngIf=\"options.isReadonly && !options.value\">\r\n <span class=\"readonly-view\">{{ UtilityService.getResourceValue('NA') }}</span>\r\n </div>\r\n </div>\r\n <!--items uploaded-->\r\n <div class=\"uploaded-items\">\r\n <div class=\"btn-group\" *ngFor=\"let item of uploader.queue\">\r\n <ng-container *ngIf=\"item?.progress == 100 && options.isUploadFileAsync\">\r\n <a *ngIf=\"item?.file?.rawFile['url']\" href=\"{{ item?.file?.rawFile['url'] }}\"\r\n class=\"btn-download-file btn-sm btn-progress-upload\" download>\r\n <span class=\"file-name\">{{ sanitizeFileName(item?.file?.name || '') }}</span>\r\n </a>\r\n <a *ngIf=\"item?.file?.rawFile['url'] == null\" class=\"btn-download-file btn-sm btn-progress-upload\">\r\n <span class=\"file-name\">{{ sanitizeFileName(item?.file?.name || '') }}</span>\r\n </a>\r\n <button *ngIf=\"!options.isReadonly\" class=\"btn btn-download-file btn-sm\"\r\n (click)=\"item.remove(); removeFromControlValue(item)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\">\r\n <path opacity=\"0.4\"\r\n d=\"M9.33301 3.70584V3.26663C9.33301 2.65166 9.33301 2.34419 9.20587 2.1093C9.09405 1.9027 8.91555 1.73471 8.69604 1.62944C8.44647 1.50977 8.11977 1.50977 7.46638 1.50977H6.53305C5.87965 1.50977 5.55296 1.50977 5.30339 1.62944C5.08387 1.73471 4.90539 1.9027 4.79354 2.1093C4.66638 2.34419 4.66638 2.65166 4.66638 3.26663V3.70584\"\r\n stroke=\"#D83731\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M1.75 3.70605H12.25M11.0834 3.70605V9.8551C11.0834 10.7775 11.0834 11.2387 10.8926 11.591C10.7248 11.901 10.4571 12.1529 10.1278 12.3109C9.75345 12.4904 9.26345 12.4904 8.28334 12.4904H5.71666C4.73658 12.4904 4.24653 12.4904 3.87218 12.3109C3.5429 12.1529 3.27519 11.901 3.10741 11.591C2.91666 11.2387 2.91666 10.7775 2.91666 9.8551V3.70605\"\r\n stroke=\"#D83731\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngIf=\"!options.isUploadFileAsync\">\r\n <a href=\"{{ item?.file?.rawFile['url'] }}\" class=\"btn btn-download-file btn-sm\" download>\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path\r\n d=\"M21 22H3C2.4 22 2 21.6 2 21C2 20.4 2.4 20 3 20H21C21.6 20 22 20.4 22 21C22 21.6 21.6 22 21 22ZM13 13.4V3C13 2.4 12.6 2 12 2C11.4 2 11 2.4 11 3V13.4H13Z\"\r\n fill=\"currentColor\"></path>\r\n <path opacity=\"0.3\" d=\"M7 13.4H17L12.7 17.7C12.3 18.1 11.7 18.1 11.3 17.7L7 13.4Z\" fill=\"currentColor\">\r\n </path>\r\n </svg>\r\n <span class=\"file-name\">{{ sanitizeFileName(item?.file?.name || '') }}</span>\r\n </a>\r\n <button *ngIf=\"!options.isReadonly\" class=\"btn btn-download-file btn-sm btn-danger\"\r\n (click)=\"item.remove(); removeFromControlValue(item)\">\r\n <i class=\"fa fa-times px-0\"></i>\r\n </button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <!--progress bar file upload-->\r\n <div *ngFor=\"let item of uploader.queue\">\r\n <div class=\"upload-items\" [ngClass]=\"{ 'mt-4': options.isMultipleFile == true }\"\r\n *ngIf=\"item?.progress < 100 && options.isUploadFileAsync\">\r\n <div class=\"upload-items-toolbar\">\r\n <h4>{{ item?.file?.name }}</h4>\r\n <span (click)=\"item.remove(); removeFromControlValue(item)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_1324_13216)\">\r\n <path opacity=\"0.4\"\r\n d=\"M9 16.5C13.1421 16.5 16.5 13.1421 16.5 9C16.5 4.85786 13.1421 1.5 9 1.5C4.85786 1.5 1.5 4.85786 1.5 9C1.5 13.1421 4.85786 16.5 9 16.5Z\"\r\n stroke=\"#DBE1F0\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n <path d=\"M11.25 6.75L6.75 11.25M6.75 6.75L11.25 11.25\" stroke=\"#DBE1F0\" stroke-width=\"2\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_1324_13216\">\r\n <rect width=\"18\" height=\"18\" fill=\"white\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n </span>\r\n </div>\r\n <div class=\"progress\">\r\n <div class=\"progress-bar\" role=\"progressbar\" aria-valuenow=\"70\" aria-valuemin=\"0\" aria-valuemax=\"100\"\r\n [class.file-uploaded]=\"item?.progress < 100\" [style.width.%]=\"item?.progress\" *ngIf=\"item?.progress > 0\">\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"subtext-container\" *ngIf=\"!options.isReadonly\">\r\n <!-- required text-->\r\n <div class=\"bbsf-validation\" *ngIf=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\">\r\n {{ getErrorValidation(fileUploadFormControl.errors | keyvalue) }}\r\n </div>\r\n <!-- LabelDescription-->\r\n <div class=\"bbsf-control-desc\" *ngIf=\"options.labelDescription != null\">{{ options.labelDescription }}</div>\r\n <div *ngIf=\"(group.valid && group.dirty && group.touched) || (group.untouched && group.invalid && group.dirty)\">\r\n {{ resetError() }}\r\n </div>\r\n </div>\r\n</div>" }]
|
|
3634
|
+
args: [{ selector: 'BBSF-FileUpload', standalone: false, template: "<div class=\"form-group bbsf-control bbsf-file-upload\" [formGroup]=\"group\">\r\n <div [ngClass]=\"options.viewType == 1 ? 'bbsf-vertical' : 'bbsf-horizontal'\">\r\n <!--label-->\r\n <label [hidden]=\"options.hideLabel\" class=\"bbsf-label {{ options.labelExtraClasses }}\">\r\n {{ options.labelValue }}\r\n <!--Asterisk-->\r\n <span *ngIf=\"((options.showAsterisk && options.isRequired) || options.isRequired) && !options.isReadonly\"\r\n class=\"text-danger\">*</span>\r\n </label>\r\n <!--Allow dropZone-->\r\n <div ng2FileDrop class=\"bbsf-input-container {{ options.extraClasses }}\"\r\n *ngIf=\"options.isDropZone && !(options.isMultipleFile == false && uploader.queue.length > 0) && !options.isReadonly\"\r\n [ngClass]=\"{ 'another-file-over-class': hasAnotherDropZoneOver }\" (onFileDrop)=\"onFileChange()\"\r\n (fileOver)=\"fileOverAnother($event)\" [uploader]=\"uploader\" [accept]=\"acceptedType\" id=\"{{ options.name }}\"\r\n multiple=\"{{ options.isMultipleFile ? 'multiple' : '' }}\" aria-invalid=\"true\" type=\"file\"\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\"\r\n (click)=\"fileInputDropZone.click()\">\r\n <div class=\"dropzone-label\">\r\n <div class=\"svg-and-validation\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"70\" height=\"70\" viewBox=\"0 0 70 70\" fill=\"none\">\r\n <path opacity=\"0.4\"\r\n d=\"M58.333 48.8332C61.8957 45.8908 64.1663 41.4397 64.1663 36.4583C64.1663 27.5988 56.9843 20.4167 48.1247 20.4167C47.4874 20.4167 46.8912 20.0842 46.5675 19.5351C42.7641 13.0808 35.7417 8.75 27.708 8.75C15.6268 8.75 5.83301 18.5438 5.83301 30.625C5.83301 36.6511 8.26974 42.1082 12.2116 46.0644\"\r\n stroke=\"#4B5489\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n <path d=\"M23.333 46.6667L34.9997 35M34.9997 35L46.6663 46.6667M34.9997 35V61.25\" stroke=\"#4B5489\"\r\n stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n <!--Validation text-->\r\n <div class=\"bbsf-validation-msg validation-msg-header text-center\">\r\n {{ UtilityService.getResourceValue('DragAndDropHere') }}\r\n </div>\r\n <div class=\"bbsf-validation-msg text-center\" *ngIf=\"validationMessage\" [innerHTML]=\"validationMessage\"></div>\r\n <div class=\"bbsf-validation-msg ng-star-inserted text-center text-danger\"\r\n *ngIf=\"validationCountMessage && options.isMultipleFile && options.maxNoOfFiles > 0\"\r\n [innerHTML]=\"validationCountMessage\"></div>\r\n </div>\r\n </div>\r\n <input ng2FileSelect [uploader]=\"uploader\" [accept]=\"acceptedType\"\r\n class=\"fileSelector customFileUploadPlacment hidden v-required-multiplefiles d-none\"\r\n multiple=\"{{ options.isMultipleFile ? 'multiple' : '' }}\" name=\"file\" type=\"file\" value=\"\" autocomplete=\"off\"\r\n (change)=\"onFileChange()\" [ngClass]=\"options.viewType == 1 ? '' : 'col-md-9'\" id=\"{{ options.name }}\"\r\n aria-invalid=\"true\" #fileInputDropZone\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\" />\r\n </div>\r\n <!--Not allowed dropZone-->\r\n <div class=\"bbsf-input-container\" *ngIf=\"!options.isDropZone && !isHideInput() && !options.isReadonly\"\r\n (click)=\"fileInput.click()\">\r\n <div class=\"dropzone-label\">\r\n <div class=\"svg-and-validation\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"70\" height=\"70\" viewBox=\"0 0 70 70\" fill=\"none\">\r\n <path opacity=\"0.4\"\r\n d=\"M58.333 48.8332C61.8957 45.8908 64.1663 41.4397 64.1663 36.4583C64.1663 27.5988 56.9843 20.4167 48.1247 20.4167C47.4874 20.4167 46.8912 20.0842 46.5675 19.5351C42.7641 13.0808 35.7417 8.75 27.708 8.75C15.6268 8.75 5.83301 18.5438 5.83301 30.625C5.83301 36.6511 8.26974 42.1082 12.2116 46.0644\"\r\n stroke=\"#4B5489\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n <path d=\"M23.333 46.6667L34.9997 35M34.9997 35L46.6663 46.6667M34.9997 35V61.25\" stroke=\"#4B5489\"\r\n stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n <!--Validation text-->\r\n <div class=\"bbsf-validation-msg text-center\">{{ UtilityService.getResourceValue('Upload') }}</div>\r\n <div class=\"bbsf-validation-msg text-center\" *ngIf=\"validationMessage\" [innerHTML]=\"validationMessage\"></div>\r\n <div class=\"bbsf-validation-msg ng-star-inserted text-center text-danger\"\r\n *ngIf=\"validationCountMessage && options.isMultipleFile && options.maxNoOfFiles > 0\"\r\n [innerHTML]=\"validationCountMessage\"></div>\r\n </div>\r\n </div>\r\n <input ng2FileSelect [uploader]=\"uploader\" [accept]=\"acceptedType\"\r\n class=\"fileSelector customFileUploadPlacment hidden v-required-multiplefiles d-none\"\r\n multiple=\"{{ options.isMultipleFile ? 'multiple' : '' }}\" name=\"file\" type=\"file\" value=\"\" autocomplete=\"off\"\r\n (change)=\"onFileChange()\" [ngClass]=\"options.viewType == 1 ? '' : 'col-md-9'\" id=\"{{ options.name }}\"\r\n aria-invalid=\"true\" #fileInput\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\" />\r\n </div>\r\n <!-- readonly -->\r\n <div *ngIf=\"options.isReadonly && !options.value\">\r\n <span class=\"readonly-view\">{{ UtilityService.getResourceValue('NA') }}</span>\r\n </div>\r\n </div>\r\n <!--items uploaded-->\r\n <div class=\"uploaded-items\">\r\n <div class=\"btn-group\" *ngFor=\"let item of uploader.queue\">\r\n <ng-container *ngIf=\"item?.progress == 100 && options.isUploadFileAsync\">\r\n <a *ngIf=\"item?.file?.rawFile['url']\" href=\"{{ item?.file?.rawFile['url'] }}\"\r\n class=\"btn-download-file btn-sm btn-progress-upload\" download>\r\n <span class=\"file-name\">{{ sanitizeFileName(item?.file?.name || '') }}</span>\r\n </a>\r\n <a *ngIf=\"item?.file?.rawFile['url'] == null\" class=\"btn-download-file btn-sm btn-progress-upload\">\r\n <span class=\"file-name\">{{ sanitizeFileName(item?.file?.name || '') }}</span>\r\n </a>\r\n <button *ngIf=\"!options.isReadonly\" class=\"btn btn-download-file btn-sm\"\r\n (click)=\"item.remove(); removeFromControlValue(item)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\">\r\n <path opacity=\"0.4\"\r\n d=\"M9.33301 3.70584V3.26663C9.33301 2.65166 9.33301 2.34419 9.20587 2.1093C9.09405 1.9027 8.91555 1.73471 8.69604 1.62944C8.44647 1.50977 8.11977 1.50977 7.46638 1.50977H6.53305C5.87965 1.50977 5.55296 1.50977 5.30339 1.62944C5.08387 1.73471 4.90539 1.9027 4.79354 2.1093C4.66638 2.34419 4.66638 2.65166 4.66638 3.26663V3.70584\"\r\n stroke=\"#D83731\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M1.75 3.70605H12.25M11.0834 3.70605V9.8551C11.0834 10.7775 11.0834 11.2387 10.8926 11.591C10.7248 11.901 10.4571 12.1529 10.1278 12.3109C9.75345 12.4904 9.26345 12.4904 8.28334 12.4904H5.71666C4.73658 12.4904 4.24653 12.4904 3.87218 12.3109C3.5429 12.1529 3.27519 11.901 3.10741 11.591C2.91666 11.2387 2.91666 10.7775 2.91666 9.8551V3.70605\"\r\n stroke=\"#D83731\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngIf=\"!options.isUploadFileAsync\">\r\n <a href=\"{{ item?.file?.rawFile['url'] }}\" *ngIf=\"item?.file?.rawFile['url']\" class=\"btn btn-download-file btn-sm\" download>\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path\r\n d=\"M21 22H3C2.4 22 2 21.6 2 21C2 20.4 2.4 20 3 20H21C21.6 20 22 20.4 22 21C22 21.6 21.6 22 21 22ZM13 13.4V3C13 2.4 12.6 2 12 2C11.4 2 11 2.4 11 3V13.4H13Z\"\r\n fill=\"currentColor\"></path>\r\n <path opacity=\"0.3\" d=\"M7 13.4H17L12.7 17.7C12.3 18.1 11.7 18.1 11.3 17.7L7 13.4Z\" fill=\"currentColor\">\r\n </path>\r\n </svg>\r\n <span class=\"file-name\">{{ sanitizeFileName(item?.file?.name || '') }}</span>\r\n </a>\r\n <a *ngIf=\"item?.file?.rawFile['url'] == null\" class=\"btn-download-file btn-sm btn-progress-upload\">\r\n <span class=\"file-name\">{{ sanitizeFileName(item?.file?.name || '') }}</span>\r\n </a>\r\n <button *ngIf=\"!options.isReadonly\" class=\"btn btn-download-file btn-sm btn-danger\"\r\n (click)=\"item.remove(); removeFromControlValue(item)\">\r\n <i class=\"fa fa-times px-0\"></i>\r\n </button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <!--progress bar file upload-->\r\n <div *ngFor=\"let item of uploader.queue\">\r\n <div class=\"upload-items\" [ngClass]=\"{ 'mt-4': options.isMultipleFile == true }\"\r\n *ngIf=\"item?.progress < 100 && options.isUploadFileAsync\">\r\n <div class=\"upload-items-toolbar\">\r\n <h4>{{ item?.file?.name }}</h4>\r\n <span (click)=\"item.remove(); removeFromControlValue(item)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_1324_13216)\">\r\n <path opacity=\"0.4\"\r\n d=\"M9 16.5C13.1421 16.5 16.5 13.1421 16.5 9C16.5 4.85786 13.1421 1.5 9 1.5C4.85786 1.5 1.5 4.85786 1.5 9C1.5 13.1421 4.85786 16.5 9 16.5Z\"\r\n stroke=\"#DBE1F0\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n <path d=\"M11.25 6.75L6.75 11.25M6.75 6.75L11.25 11.25\" stroke=\"#DBE1F0\" stroke-width=\"2\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_1324_13216\">\r\n <rect width=\"18\" height=\"18\" fill=\"white\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n </span>\r\n </div>\r\n <div class=\"progress\">\r\n <div class=\"progress-bar\" role=\"progressbar\" aria-valuenow=\"70\" aria-valuemin=\"0\" aria-valuemax=\"100\"\r\n [class.file-uploaded]=\"item?.progress < 100\" [style.width.%]=\"item?.progress\" *ngIf=\"item?.progress > 0\">\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"subtext-container\" *ngIf=\"!options.isReadonly\">\r\n <!-- required text-->\r\n <div class=\"bbsf-validation\" *ngIf=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\">\r\n {{ getErrorValidation(fileUploadFormControl.errors | keyvalue) }}\r\n </div>\r\n <!-- LabelDescription-->\r\n <div class=\"bbsf-control-desc\" *ngIf=\"options.labelDescription != null\">{{ options.labelDescription }}</div>\r\n <div *ngIf=\"(group.valid && group.dirty && group.touched) || (group.untouched && group.invalid && group.dirty)\">\r\n {{ resetError() }}\r\n </div>\r\n </div>\r\n</div>" }]
|
|
3624
3635
|
}], ctorParameters: () => [{ type: i2.ControlContainer, decorators: [{
|
|
3625
3636
|
type: Optional
|
|
3626
3637
|
}] }, { type: i2.FormGroupDirective }, { type: ControlUtility }, { type: i3.UtilityService }, { type: i3.ControlValidationService }, { type: GlobalSettings }, { type: FileUploadService }], propDecorators: { fileInput: [{
|
|
@@ -3809,7 +3820,7 @@ class HtmlEditorComponent {
|
|
|
3809
3820
|
tag: 'h1',
|
|
3810
3821
|
},
|
|
3811
3822
|
],
|
|
3812
|
-
uploadUrl: 'v1/image',
|
|
3823
|
+
// uploadUrl: 'v1/image', this line comment so the editor will convert image to base64 when enable upload the api should return full url for file
|
|
3813
3824
|
uploadWithCredentials: false,
|
|
3814
3825
|
sanitize: false,
|
|
3815
3826
|
toolbarPosition: 'top',
|
|
@@ -4739,7 +4750,7 @@ class MultiLingualHtmlEditorComponent {
|
|
|
4739
4750
|
this.controlValidationService = controlValidationService;
|
|
4740
4751
|
this.globalSettings = globalSettings;
|
|
4741
4752
|
this.OnChange = new EventEmitter();
|
|
4742
|
-
this.currentLanguage =
|
|
4753
|
+
this.currentLanguage = '';
|
|
4743
4754
|
this.arabicValidationRules = [];
|
|
4744
4755
|
this.arabicValidationRulesasync = [];
|
|
4745
4756
|
this.englishValidationRules = [];
|
|
@@ -4747,8 +4758,8 @@ class MultiLingualHtmlEditorComponent {
|
|
|
4747
4758
|
this.markAllAsTouched = false;
|
|
4748
4759
|
this.validationRules = [];
|
|
4749
4760
|
this.validationRulesasync = [];
|
|
4750
|
-
this.arabicLetterOnly =
|
|
4751
|
-
this.englishLetterOnly =
|
|
4761
|
+
this.arabicLetterOnly = '';
|
|
4762
|
+
this.englishLetterOnly = '';
|
|
4752
4763
|
this.englishValue = null;
|
|
4753
4764
|
this.arabicValue = null;
|
|
4754
4765
|
this.resetError = () => {
|
|
@@ -4781,10 +4792,9 @@ class MultiLingualHtmlEditorComponent {
|
|
|
4781
4792
|
};
|
|
4782
4793
|
MultiLingualHtmlEditorComponent.controlContainerstatic = this.controlContainer;
|
|
4783
4794
|
}
|
|
4784
|
-
;
|
|
4785
4795
|
getCustomErrorsMassages() {
|
|
4786
|
-
this.arabicLetterOnly = this.utilityService.getResourceValue(
|
|
4787
|
-
this.englishLetterOnly = this.utilityService.getResourceValue(
|
|
4796
|
+
this.arabicLetterOnly = this.utilityService.getResourceValue('ArabicLetterOnly');
|
|
4797
|
+
this.englishLetterOnly = this.utilityService.getResourceValue('EnglishLetterOnly');
|
|
4788
4798
|
}
|
|
4789
4799
|
async ngOnInit() {
|
|
4790
4800
|
if (!this.options.viewType)
|
|
@@ -4815,7 +4825,7 @@ class MultiLingualHtmlEditorComponent {
|
|
|
4815
4825
|
customClasses: [
|
|
4816
4826
|
{
|
|
4817
4827
|
name: 'quote',
|
|
4818
|
-
class: 'quote'
|
|
4828
|
+
class: 'quote'
|
|
4819
4829
|
},
|
|
4820
4830
|
{
|
|
4821
4831
|
name: 'redText',
|
|
@@ -4824,10 +4834,10 @@ class MultiLingualHtmlEditorComponent {
|
|
|
4824
4834
|
{
|
|
4825
4835
|
name: 'titleText',
|
|
4826
4836
|
class: 'titleText',
|
|
4827
|
-
tag: 'h1'
|
|
4828
|
-
}
|
|
4837
|
+
tag: 'h1'
|
|
4838
|
+
}
|
|
4829
4839
|
],
|
|
4830
|
-
uploadUrl: 'v1/image',
|
|
4840
|
+
// uploadUrl: 'v1/image', this line comment so the editor will convert image to base64 when enable upload the api should return full url for file
|
|
4831
4841
|
uploadWithCredentials: false,
|
|
4832
4842
|
sanitize: false,
|
|
4833
4843
|
toolbarPosition: 'top',
|
|
@@ -4857,7 +4867,7 @@ class MultiLingualHtmlEditorComponent {
|
|
|
4857
4867
|
customClasses: [
|
|
4858
4868
|
{
|
|
4859
4869
|
name: 'quote',
|
|
4860
|
-
class: 'quote'
|
|
4870
|
+
class: 'quote'
|
|
4861
4871
|
},
|
|
4862
4872
|
{
|
|
4863
4873
|
name: 'redText',
|
|
@@ -4866,10 +4876,10 @@ class MultiLingualHtmlEditorComponent {
|
|
|
4866
4876
|
{
|
|
4867
4877
|
name: 'titleText',
|
|
4868
4878
|
class: 'titleText',
|
|
4869
|
-
tag: 'h1'
|
|
4870
|
-
}
|
|
4879
|
+
tag: 'h1'
|
|
4880
|
+
}
|
|
4871
4881
|
],
|
|
4872
|
-
uploadUrl: 'v1/image',
|
|
4882
|
+
// uploadUrl: 'v1/image', this line comment so the editor will convert image to base64 when enable upload the api should return full url for file
|
|
4873
4883
|
uploadWithCredentials: false,
|
|
4874
4884
|
sanitize: false,
|
|
4875
4885
|
toolbarPosition: 'top',
|
|
@@ -4911,20 +4921,23 @@ class MultiLingualHtmlEditorComponent {
|
|
|
4911
4921
|
// fontNames: ['Helvetica', 'Arial', 'Arial Black', 'Comic Sans MS', 'Courier New', 'Roboto', 'Times']
|
|
4912
4922
|
// }
|
|
4913
4923
|
this.multilingualHtmlEditorgroup = new FormGroup({});
|
|
4914
|
-
;
|
|
4915
|
-
this.multilingualHtmlEditorgroup.addControl(
|
|
4916
|
-
this.multilingualHtmlEditorgroup.
|
|
4917
|
-
this.
|
|
4918
|
-
this.englishHtmlEditorFormControl = this.multilingualHtmlEditorgroup.controls["English"]; // new FormControl('',validationRules);
|
|
4924
|
+
this.multilingualHtmlEditorgroup.addControl('Arabic', new FormControl(''));
|
|
4925
|
+
this.multilingualHtmlEditorgroup.addControl('English', new FormControl(''));
|
|
4926
|
+
this.arabicHtmlEditorFormControl = this.multilingualHtmlEditorgroup.controls['Arabic']; // new FormControl('',validationRules);
|
|
4927
|
+
this.englishHtmlEditorFormControl = this.multilingualHtmlEditorgroup.controls['English']; // new FormControl('',validationRules);
|
|
4919
4928
|
this.group.addControl(this.options.name, new FormGroup(this.multilingualHtmlEditorgroup.controls));
|
|
4920
4929
|
this.getCustomErrorsMassages();
|
|
4921
4930
|
switch (this.options.type) {
|
|
4922
4931
|
case InputType.Email:
|
|
4923
4932
|
this.englishValidationRules.push(Validators.compose([
|
|
4924
|
-
this.controlUtility.patternValidator(/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$/, {
|
|
4933
|
+
this.controlUtility.patternValidator(/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$/, {
|
|
4934
|
+
EmailValidationKey: ''
|
|
4935
|
+
})
|
|
4925
4936
|
]));
|
|
4926
4937
|
this.arabicValidationRules.push(Validators.compose([
|
|
4927
|
-
this.controlUtility.patternValidator(/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$/, {
|
|
4938
|
+
this.controlUtility.patternValidator(/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$/, {
|
|
4939
|
+
EmailValidationKey: ''
|
|
4940
|
+
})
|
|
4928
4941
|
]));
|
|
4929
4942
|
break;
|
|
4930
4943
|
case InputType.Number:
|
|
@@ -4948,22 +4961,30 @@ class MultiLingualHtmlEditorComponent {
|
|
|
4948
4961
|
this.englishValidationRules.push(Validators.maxLength(this.options.maxLength));
|
|
4949
4962
|
this.arabicValidationRules.push(Validators.maxLength(this.options.maxLength));
|
|
4950
4963
|
}
|
|
4951
|
-
if (this.options.labelKey != null && this.options.labelKey !=
|
|
4952
|
-
this.options.arabicLabelValue =
|
|
4953
|
-
|
|
4964
|
+
if (this.options.labelKey != null && this.options.labelKey != '') {
|
|
4965
|
+
this.options.arabicLabelValue =
|
|
4966
|
+
this.utilityService.getResourceValue(this.options.labelKey) +
|
|
4967
|
+
' ' +
|
|
4968
|
+
this.utilityService.getResourceValue('InArabic');
|
|
4969
|
+
this.options.englishLabelValue =
|
|
4970
|
+
this.utilityService.getResourceValue(this.options.labelKey) +
|
|
4971
|
+
' ' +
|
|
4972
|
+
this.utilityService.getResourceValue('InEnglish');
|
|
4954
4973
|
}
|
|
4955
4974
|
else {
|
|
4956
|
-
if (this.options.arabicLabelKey != null && this.options.arabicLabelKey !=
|
|
4975
|
+
if (this.options.arabicLabelKey != null && this.options.arabicLabelKey != '')
|
|
4957
4976
|
this.options.arabicLabelValue = this.utilityService.getResourceValue(this.options.arabicLabelKey);
|
|
4958
|
-
if (this.options.englishLabelKey != null && this.options.englishLabelKey !=
|
|
4977
|
+
if (this.options.englishLabelKey != null && this.options.englishLabelKey != '')
|
|
4959
4978
|
this.options.englishLabelValue = this.utilityService.getResourceValue(this.options.englishLabelKey);
|
|
4960
4979
|
}
|
|
4961
4980
|
this.showInputUsingLanguageMode();
|
|
4962
4981
|
this.arabicValidationRules.push(Validators.compose([
|
|
4963
|
-
this.controlUtility.patternValidator(/^[\u0621-\u064A\u0660-\u0669 ]+$/, {
|
|
4982
|
+
this.controlUtility.patternValidator(/^[\u0621-\u064A\u0660-\u0669 ]+$/, {
|
|
4983
|
+
ArabicLetterOnly: this.arabicLetterOnly
|
|
4984
|
+
})
|
|
4964
4985
|
]));
|
|
4965
4986
|
this.englishValidationRules.push(Validators.compose([
|
|
4966
|
-
this.controlUtility.patternValidator(/^[~`!@#$%^&*()‘’“”_+=[\]\\{}|;':",.\/<>?a-zA-Z0-9- ]*$/, { EnglishLetterOnly: this.englishLetterOnly })
|
|
4987
|
+
this.controlUtility.patternValidator(/^[~`!@#$%^&*()‘’“”_+=[\]\\{}|;':",.\/<>?a-zA-Z0-9- ]*$/, { EnglishLetterOnly: this.englishLetterOnly })
|
|
4967
4988
|
]));
|
|
4968
4989
|
// this.arabicHtmlEditorFormControl.setValidators(this.ArabicValidationRules);
|
|
4969
4990
|
// this.arabicHtmlEditorFormControl.setAsyncValidators(this.ArabicValidationRulesasync);
|
|
@@ -4981,48 +5002,62 @@ class MultiLingualHtmlEditorComponent {
|
|
|
4981
5002
|
});
|
|
4982
5003
|
}
|
|
4983
5004
|
ngAfterViewChecked() {
|
|
4984
|
-
let dir = this.utilityService.getCurrentLanguage() ==
|
|
4985
|
-
var angularEditor = document.getElementsByClassName(
|
|
5005
|
+
let dir = this.utilityService.getCurrentLanguage() == 'en' ? 'ltr' : 'rtl';
|
|
5006
|
+
var angularEditor = document.getElementsByClassName('angular-editor-toolbar ng-star-inserted');
|
|
4986
5007
|
for (let index = 0; index < angularEditor.length; index++) {
|
|
4987
5008
|
const element = angularEditor[index];
|
|
4988
|
-
element.setAttribute(
|
|
5009
|
+
element.setAttribute('dir', dir);
|
|
4989
5010
|
}
|
|
4990
5011
|
}
|
|
4991
5012
|
onTextChange(type) {
|
|
4992
|
-
if (type ==
|
|
4993
|
-
this.multilingualHtmlEditorgroup.controls[
|
|
4994
|
-
this.englishValue =
|
|
5013
|
+
if (type == 'en') {
|
|
5014
|
+
this.multilingualHtmlEditorgroup.controls['English'].setValue(this.multilingualHtmlEditorgroup.controls['English'].value.trim());
|
|
5015
|
+
this.englishValue =
|
|
5016
|
+
this.multilingualHtmlEditorgroup.controls['English'].value == null
|
|
5017
|
+
? ''
|
|
5018
|
+
: this.multilingualHtmlEditorgroup.controls['English'].value;
|
|
4995
5019
|
if (this.englishValue) {
|
|
4996
5020
|
this.englishHtmlEditorFormControl.setValue(this.englishValue);
|
|
4997
5021
|
let originalValue = this.englishValue;
|
|
4998
|
-
if (this.options.patchFunction &&
|
|
5022
|
+
if (this.options.patchFunction &&
|
|
5023
|
+
this.options.patchPath &&
|
|
5024
|
+
this.englishHtmlEditorFormControl.valid) {
|
|
4999
5025
|
this.controlUtility.patchControlValue(originalValue, this.options.patchFunction, this.options.patchPath);
|
|
5000
5026
|
}
|
|
5001
5027
|
}
|
|
5002
|
-
let EngliswordCountArray = this.englishHtmlEditorFormControl.value.split(
|
|
5028
|
+
let EngliswordCountArray = this.englishHtmlEditorFormControl.value.split(' ').length;
|
|
5003
5029
|
if (EngliswordCountArray > 0) {
|
|
5004
5030
|
if (EngliswordCountArray > this.options.maxWordCount)
|
|
5005
|
-
this.multilingualHtmlEditorgroup.controls[
|
|
5006
|
-
|
|
5007
|
-
|
|
5031
|
+
this.multilingualHtmlEditorgroup.controls['English'].setErrors({
|
|
5032
|
+
MaxWordCountValidationKey: this.options.maxWordCount
|
|
5033
|
+
});
|
|
5034
|
+
this.multilingualHtmlEditorgroup.controls['English'].markAsTouched();
|
|
5035
|
+
this.multilingualHtmlEditorgroup.controls['English'].invalid;
|
|
5008
5036
|
}
|
|
5009
5037
|
}
|
|
5010
|
-
if (type ==
|
|
5011
|
-
this.multilingualHtmlEditorgroup.controls[
|
|
5012
|
-
this.arabicValue =
|
|
5038
|
+
if (type == 'ar') {
|
|
5039
|
+
this.multilingualHtmlEditorgroup.controls['Arabic'].setValue(this.multilingualHtmlEditorgroup.controls['Arabic'].value.trim());
|
|
5040
|
+
this.arabicValue =
|
|
5041
|
+
this.multilingualHtmlEditorgroup.controls['Arabic'].value == null
|
|
5042
|
+
? ''
|
|
5043
|
+
: this.multilingualHtmlEditorgroup.controls['Arabic'].value;
|
|
5013
5044
|
if (this.arabicValue) {
|
|
5014
5045
|
this.arabicHtmlEditorFormControl.setValue(this.arabicValue);
|
|
5015
5046
|
let originalValue = this.arabicValue;
|
|
5016
|
-
if (this.options.patchFunction &&
|
|
5047
|
+
if (this.options.patchFunction &&
|
|
5048
|
+
this.options.patchPath &&
|
|
5049
|
+
this.arabicHtmlEditorFormControl.valid) {
|
|
5017
5050
|
this.controlUtility.patchControlValue(originalValue, this.options.patchFunction, this.options.patchPath);
|
|
5018
5051
|
}
|
|
5019
5052
|
}
|
|
5020
|
-
let ArabicwordCountArray = this.arabicHtmlEditorFormControl.value.split(
|
|
5053
|
+
let ArabicwordCountArray = this.arabicHtmlEditorFormControl.value.split(' ').length;
|
|
5021
5054
|
if (ArabicwordCountArray > 0) {
|
|
5022
5055
|
if (ArabicwordCountArray > this.options.maxWordCount)
|
|
5023
|
-
this.multilingualHtmlEditorgroup.controls[
|
|
5024
|
-
|
|
5025
|
-
|
|
5056
|
+
this.multilingualHtmlEditorgroup.controls['Arabic'].setErrors({
|
|
5057
|
+
MaxWordCountValidationKey: this.options.maxWordCount
|
|
5058
|
+
});
|
|
5059
|
+
this.multilingualHtmlEditorgroup.controls['Arabic'].markAsTouched();
|
|
5060
|
+
this.multilingualHtmlEditorgroup.controls['Arabic'].invalid;
|
|
5026
5061
|
}
|
|
5027
5062
|
}
|
|
5028
5063
|
let mulitLangModel = new EnglishArabicDTO();
|
|
@@ -5045,8 +5080,8 @@ class MultiLingualHtmlEditorComponent {
|
|
|
5045
5080
|
return this.controlUtility.getErrorValidationMassage(ErrorList, this.group, this.options);
|
|
5046
5081
|
}
|
|
5047
5082
|
showInputUsingLanguageMode() {
|
|
5048
|
-
this.arabicValidationRules = this.arabicValidationRules.filter(item => item !== Validators.required);
|
|
5049
|
-
this.englishValidationRules = this.englishValidationRules.filter(item => item !== Validators.required);
|
|
5083
|
+
this.arabicValidationRules = this.arabicValidationRules.filter((item) => item !== Validators.required);
|
|
5084
|
+
this.englishValidationRules = this.englishValidationRules.filter((item) => item !== Validators.required);
|
|
5050
5085
|
this.arabicHtmlEditorFormControl.clearValidators();
|
|
5051
5086
|
this.englishHtmlEditorFormControl.clearValidators();
|
|
5052
5087
|
this.arabicHtmlEditorFormControl.updateValueAndValidity();
|
|
@@ -8854,15 +8889,15 @@ class RepeaterFieldBuilderComponent {
|
|
|
8854
8889
|
this.itemsValue = [];
|
|
8855
8890
|
this.itemValue = null;
|
|
8856
8891
|
}
|
|
8857
|
-
ngOnInit() {
|
|
8858
|
-
}
|
|
8892
|
+
ngOnInit() { }
|
|
8859
8893
|
ngAfterViewInit() {
|
|
8860
8894
|
setTimeout(() => {
|
|
8861
8895
|
if (this.itemsValue.length > 0)
|
|
8862
8896
|
this.itemValue = this.itemsValue[this.itemNumber];
|
|
8863
8897
|
if (this.itemValue) {
|
|
8864
8898
|
for (const key in this.itemValue) {
|
|
8865
|
-
if (Object.prototype.hasOwnProperty.call(this.itemValue, key) &&
|
|
8899
|
+
if (Object.prototype.hasOwnProperty.call(this.itemValue, key) &&
|
|
8900
|
+
key == this.repeaterField.controlOptions.name) {
|
|
8866
8901
|
const element = this.itemValue[key];
|
|
8867
8902
|
this.value = element;
|
|
8868
8903
|
}
|
|
@@ -8873,12 +8908,19 @@ class RepeaterFieldBuilderComponent {
|
|
|
8873
8908
|
//#region TextBox
|
|
8874
8909
|
case DataType.Text:
|
|
8875
8910
|
let Text = new TextBoxOptions();
|
|
8876
|
-
Text.name =
|
|
8911
|
+
Text.name =
|
|
8912
|
+
this.repeaterField.controlOptions.name +
|
|
8913
|
+
'.' +
|
|
8914
|
+
this.itemNumber.toString() +
|
|
8915
|
+
'.' +
|
|
8916
|
+
this.controlNumber.toString();
|
|
8877
8917
|
Text.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
8878
8918
|
Text.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
8879
8919
|
Text.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
8880
8920
|
Text.viewType = this.repeaterField.controlOptions.viewType;
|
|
8881
|
-
Text.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
8921
|
+
Text.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
8922
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
8923
|
+
: '';
|
|
8882
8924
|
Text.type = InputType.Text;
|
|
8883
8925
|
Text.languageValidation = this.repeaterField.controlOptions.languageValidation;
|
|
8884
8926
|
if (this.repeaterField.controlOptions.maxLength)
|
|
@@ -8887,47 +8929,77 @@ class RepeaterFieldBuilderComponent {
|
|
|
8887
8929
|
Text.minLength = this.repeaterField.controlOptions.minLength;
|
|
8888
8930
|
Text.value = this.value;
|
|
8889
8931
|
Text.isReadonly = this.repeaterField.controlOptions.isReadonly;
|
|
8932
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
8933
|
+
Text.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
8934
|
+
}
|
|
8890
8935
|
this.renderComponentService.renderDynamicComponent(this.item, TextboxComponent, this.group, Text);
|
|
8891
8936
|
break;
|
|
8892
8937
|
case DataType.Name:
|
|
8893
8938
|
let name = new TextBoxOptions();
|
|
8894
|
-
name.name =
|
|
8939
|
+
name.name =
|
|
8940
|
+
this.repeaterField.controlOptions.name +
|
|
8941
|
+
'.' +
|
|
8942
|
+
this.itemNumber.toString() +
|
|
8943
|
+
'.' +
|
|
8944
|
+
this.controlNumber.toString();
|
|
8895
8945
|
name.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
8896
8946
|
name.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
8897
8947
|
name.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
8898
8948
|
name.viewType = this.repeaterField.controlOptions.viewType;
|
|
8899
8949
|
name.languageValidation = this.repeaterField.controlOptions.languageValidation;
|
|
8900
|
-
name.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
8950
|
+
name.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
8951
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
8952
|
+
: '';
|
|
8901
8953
|
if (this.repeaterField.controlOptions.maxLength)
|
|
8902
8954
|
name.maxLength = this.repeaterField.controlOptions.maxLength;
|
|
8903
8955
|
if (this.repeaterField.controlOptions.minLength)
|
|
8904
8956
|
name.minLength = this.repeaterField.controlOptions.minLength;
|
|
8905
8957
|
name.type = InputType.Text;
|
|
8906
8958
|
name.value = this.value;
|
|
8959
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
8960
|
+
name.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
8961
|
+
}
|
|
8907
8962
|
this.renderComponentService.renderDynamicComponent(this.item, TextboxComponent, this.group, name);
|
|
8908
8963
|
break;
|
|
8909
8964
|
case DataType.Email:
|
|
8910
8965
|
let email = new TextBoxOptions();
|
|
8911
|
-
email.name =
|
|
8966
|
+
email.name =
|
|
8967
|
+
this.repeaterField.controlOptions.name +
|
|
8968
|
+
'.' +
|
|
8969
|
+
this.itemNumber.toString() +
|
|
8970
|
+
'.' +
|
|
8971
|
+
this.controlNumber.toString();
|
|
8912
8972
|
email.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
8913
8973
|
email.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
8914
8974
|
email.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
8915
8975
|
email.viewType = this.repeaterField.controlOptions.viewType;
|
|
8916
8976
|
email.languageValidation = this.repeaterField.controlOptions.languageValidation;
|
|
8917
|
-
email.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
8977
|
+
email.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
8978
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
8979
|
+
: '';
|
|
8918
8980
|
email.type = InputType.Email;
|
|
8919
8981
|
email.value = this.value;
|
|
8982
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
8983
|
+
email.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
8984
|
+
}
|
|
8920
8985
|
this.renderComponentService.renderDynamicComponent(this.item, TextboxComponent, this.group, email);
|
|
8921
8986
|
break;
|
|
8922
8987
|
case DataType.Number:
|
|
8923
8988
|
let number = new TextBoxOptions();
|
|
8924
|
-
number.name =
|
|
8989
|
+
number.name =
|
|
8990
|
+
this.repeaterField.controlOptions.name +
|
|
8991
|
+
'.' +
|
|
8992
|
+
this.itemNumber.toString() +
|
|
8993
|
+
'.' +
|
|
8994
|
+
this.controlNumber.toString();
|
|
8925
8995
|
number.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
8926
8996
|
number.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
8927
8997
|
number.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
8928
8998
|
number.viewType = this.repeaterField.controlOptions.viewType;
|
|
8929
8999
|
number.languageValidation = this.repeaterField.controlOptions.languageValidation;
|
|
8930
|
-
number.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9000
|
+
number.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9001
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9002
|
+
: '';
|
|
8931
9003
|
number.type = InputType.Number;
|
|
8932
9004
|
let rangeNumber = new RangeNumber();
|
|
8933
9005
|
if (this.repeaterField.controlOptions.numberRange) {
|
|
@@ -8937,228 +9009,378 @@ class RepeaterFieldBuilderComponent {
|
|
|
8937
9009
|
number.numberRange = rangeNumber;
|
|
8938
9010
|
number.value = this.value;
|
|
8939
9011
|
number.isReadonly = this.repeaterField.controlOptions.isReadonly;
|
|
9012
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9013
|
+
number.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9014
|
+
}
|
|
8940
9015
|
this.renderComponentService.renderDynamicComponent(this.item, TextboxComponent, this.group, number);
|
|
8941
9016
|
break;
|
|
8942
9017
|
//#endregion
|
|
8943
9018
|
//#region DateTime
|
|
8944
9019
|
case DataType.Date:
|
|
8945
9020
|
let date = new DatePickerOptions();
|
|
8946
|
-
date.name =
|
|
9021
|
+
date.name =
|
|
9022
|
+
this.repeaterField.controlOptions.name +
|
|
9023
|
+
'.' +
|
|
9024
|
+
this.itemNumber.toString() +
|
|
9025
|
+
'.' +
|
|
9026
|
+
this.controlNumber.toString();
|
|
8947
9027
|
date.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
8948
9028
|
date.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
8949
9029
|
date.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
8950
9030
|
date.viewType = this.repeaterField.controlOptions.viewType;
|
|
8951
|
-
date.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9031
|
+
date.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9032
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9033
|
+
: '';
|
|
8952
9034
|
date.pickerType = PickerType.Calendar;
|
|
8953
9035
|
date.selectMode = SelectMode.Single;
|
|
8954
9036
|
date.startView = StartView.Month;
|
|
8955
9037
|
date.value = this.value;
|
|
9038
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9039
|
+
date.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9040
|
+
}
|
|
8956
9041
|
this.renderComponentService.renderDynamicComponent(this.item, DateInputComponent, this.group, date);
|
|
8957
9042
|
break;
|
|
8958
9043
|
case DataType.DateTime:
|
|
8959
9044
|
let dateTime = new DatePickerOptions();
|
|
8960
|
-
dateTime.name =
|
|
9045
|
+
dateTime.name =
|
|
9046
|
+
this.repeaterField.controlOptions.name +
|
|
9047
|
+
'.' +
|
|
9048
|
+
this.itemNumber.toString() +
|
|
9049
|
+
'.' +
|
|
9050
|
+
this.controlNumber.toString();
|
|
8961
9051
|
dateTime.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
8962
9052
|
dateTime.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
8963
9053
|
dateTime.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
8964
9054
|
dateTime.viewType = this.repeaterField.controlOptions.viewType;
|
|
8965
|
-
dateTime.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9055
|
+
dateTime.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9056
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9057
|
+
: '';
|
|
8966
9058
|
dateTime.pickerType = PickerType.Both;
|
|
8967
9059
|
dateTime.selectMode = SelectMode.Single;
|
|
8968
9060
|
dateTime.startView = StartView.Month;
|
|
8969
9061
|
dateTime.value = this.value;
|
|
9062
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9063
|
+
dateTime.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9064
|
+
}
|
|
8970
9065
|
this.renderComponentService.renderDynamicComponent(this.item, DateInputComponent, this.group, dateTime);
|
|
8971
9066
|
break;
|
|
8972
9067
|
case DataType.Time:
|
|
8973
9068
|
let time = new DatePickerOptions();
|
|
8974
|
-
time.name =
|
|
9069
|
+
time.name =
|
|
9070
|
+
this.repeaterField.controlOptions.name +
|
|
9071
|
+
'.' +
|
|
9072
|
+
this.itemNumber.toString() +
|
|
9073
|
+
'.' +
|
|
9074
|
+
this.controlNumber.toString();
|
|
8975
9075
|
time.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
8976
9076
|
time.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
8977
9077
|
time.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
8978
9078
|
time.viewType = this.repeaterField.controlOptions.viewType;
|
|
8979
|
-
time.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9079
|
+
time.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9080
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9081
|
+
: '';
|
|
8980
9082
|
time.pickerType = PickerType.Timer;
|
|
8981
9083
|
time.selectMode = SelectMode.Single;
|
|
8982
9084
|
time.startView = StartView.Month;
|
|
8983
9085
|
time.value = this.value;
|
|
9086
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9087
|
+
time.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9088
|
+
}
|
|
8984
9089
|
this.renderComponentService.renderDynamicComponent(this.item, DateInputComponent, this.group, time);
|
|
8985
9090
|
break;
|
|
8986
9091
|
//#endregion
|
|
8987
9092
|
//#region Dropdown
|
|
8988
9093
|
case DataType.SingleSelect:
|
|
8989
9094
|
let singleSelect = new DropdownOptions();
|
|
8990
|
-
singleSelect.name =
|
|
9095
|
+
singleSelect.name =
|
|
9096
|
+
this.repeaterField.controlOptions.name +
|
|
9097
|
+
'.' +
|
|
9098
|
+
this.itemNumber.toString() +
|
|
9099
|
+
'.' +
|
|
9100
|
+
this.controlNumber.toString();
|
|
8991
9101
|
singleSelect.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
8992
9102
|
singleSelect.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
8993
9103
|
singleSelect.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
8994
9104
|
singleSelect.viewType = this.repeaterField.controlOptions.viewType;
|
|
8995
|
-
singleSelect.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9105
|
+
singleSelect.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9106
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9107
|
+
: '';
|
|
8996
9108
|
singleSelect.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
8997
9109
|
singleSelect.singleSelection = true;
|
|
8998
9110
|
singleSelect.showCheckbox = false;
|
|
8999
9111
|
singleSelect.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
9000
9112
|
singleSelect.selectedItems = this.value;
|
|
9113
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9114
|
+
singleSelect.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9115
|
+
}
|
|
9001
9116
|
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, singleSelect);
|
|
9002
9117
|
break;
|
|
9003
9118
|
case DataType.MulipleSelect:
|
|
9004
9119
|
let mulipleSelect = new DropdownOptions();
|
|
9005
|
-
mulipleSelect.name =
|
|
9120
|
+
mulipleSelect.name =
|
|
9121
|
+
this.repeaterField.controlOptions.name +
|
|
9122
|
+
'.' +
|
|
9123
|
+
this.itemNumber.toString() +
|
|
9124
|
+
'.' +
|
|
9125
|
+
this.controlNumber.toString();
|
|
9006
9126
|
mulipleSelect.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9007
9127
|
mulipleSelect.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9008
9128
|
mulipleSelect.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9009
9129
|
mulipleSelect.viewType = this.repeaterField.controlOptions.viewType;
|
|
9010
|
-
mulipleSelect.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9130
|
+
mulipleSelect.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9131
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9132
|
+
: '';
|
|
9011
9133
|
mulipleSelect.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
9012
9134
|
mulipleSelect.singleSelection = false;
|
|
9013
9135
|
mulipleSelect.showCheckbox = false;
|
|
9014
9136
|
mulipleSelect.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
9015
9137
|
mulipleSelect.selectedItems = this.value;
|
|
9138
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9139
|
+
mulipleSelect.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9140
|
+
}
|
|
9016
9141
|
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, mulipleSelect);
|
|
9017
9142
|
break;
|
|
9018
9143
|
case DataType.Goal:
|
|
9019
9144
|
let goal = new DropdownOptions();
|
|
9020
|
-
goal.name =
|
|
9145
|
+
goal.name =
|
|
9146
|
+
this.repeaterField.controlOptions.name +
|
|
9147
|
+
'.' +
|
|
9148
|
+
this.itemNumber.toString() +
|
|
9149
|
+
'.' +
|
|
9150
|
+
this.controlNumber.toString();
|
|
9021
9151
|
goal.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9022
9152
|
goal.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9023
9153
|
goal.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9024
9154
|
goal.viewType = this.repeaterField.controlOptions.viewType;
|
|
9025
|
-
goal.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9155
|
+
goal.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9156
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9157
|
+
: '';
|
|
9026
9158
|
goal.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
9027
9159
|
goal.singleSelection = !this.repeaterField.controlOptions.isMultiple;
|
|
9028
9160
|
goal.showCheckbox = false;
|
|
9029
9161
|
goal.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
9030
9162
|
goal.selectedItems = this.value;
|
|
9163
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9164
|
+
goal.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9165
|
+
}
|
|
9031
9166
|
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, goal);
|
|
9032
9167
|
break;
|
|
9033
9168
|
case DataType.Challenge:
|
|
9034
9169
|
let challenge = new DropdownOptions();
|
|
9035
|
-
challenge.name =
|
|
9170
|
+
challenge.name =
|
|
9171
|
+
this.repeaterField.controlOptions.name +
|
|
9172
|
+
'.' +
|
|
9173
|
+
this.itemNumber.toString() +
|
|
9174
|
+
'.' +
|
|
9175
|
+
this.controlNumber.toString();
|
|
9036
9176
|
challenge.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9037
9177
|
challenge.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9038
9178
|
challenge.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9039
9179
|
challenge.viewType = this.repeaterField.controlOptions.viewType;
|
|
9040
|
-
challenge.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9180
|
+
challenge.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9181
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9182
|
+
: '';
|
|
9041
9183
|
challenge.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
9042
9184
|
challenge.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
9043
9185
|
challenge.singleSelection = !this.repeaterField.controlOptions.isMultiple;
|
|
9044
9186
|
challenge.showCheckbox = false;
|
|
9045
9187
|
challenge.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
9046
9188
|
challenge.selectedItems = this.value;
|
|
9189
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9190
|
+
challenge.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9191
|
+
}
|
|
9047
9192
|
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, challenge);
|
|
9048
9193
|
break;
|
|
9049
9194
|
case DataType.InnovationLab:
|
|
9050
9195
|
let innovationLab = new DropdownOptions();
|
|
9051
|
-
innovationLab.name =
|
|
9196
|
+
innovationLab.name =
|
|
9197
|
+
this.repeaterField.controlOptions.name +
|
|
9198
|
+
'.' +
|
|
9199
|
+
this.itemNumber.toString() +
|
|
9200
|
+
'.' +
|
|
9201
|
+
this.controlNumber.toString();
|
|
9052
9202
|
innovationLab.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9053
9203
|
innovationLab.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9054
9204
|
innovationLab.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9055
9205
|
innovationLab.viewType = this.repeaterField.controlOptions.viewType;
|
|
9056
|
-
innovationLab.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9206
|
+
innovationLab.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9207
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9208
|
+
: '';
|
|
9057
9209
|
innovationLab.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
9058
9210
|
innovationLab.singleSelection = !this.repeaterField.controlOptions.isMultiple;
|
|
9059
9211
|
innovationLab.showCheckbox = false;
|
|
9060
9212
|
innovationLab.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
9061
9213
|
innovationLab.selectedItems = this.value;
|
|
9214
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9215
|
+
innovationLab.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9216
|
+
}
|
|
9062
9217
|
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, innovationLab);
|
|
9063
9218
|
break;
|
|
9064
9219
|
case DataType.Country:
|
|
9065
9220
|
let country = new DropdownOptions();
|
|
9066
|
-
country.name =
|
|
9221
|
+
country.name =
|
|
9222
|
+
this.repeaterField.controlOptions.name +
|
|
9223
|
+
'.' +
|
|
9224
|
+
this.itemNumber.toString() +
|
|
9225
|
+
'.' +
|
|
9226
|
+
this.controlNumber.toString();
|
|
9067
9227
|
country.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9068
9228
|
country.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9069
9229
|
country.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9070
9230
|
country.viewType = this.repeaterField.controlOptions.viewType;
|
|
9071
|
-
country.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9231
|
+
country.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9232
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9233
|
+
: '';
|
|
9072
9234
|
country.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
9073
9235
|
country.singleSelection = !this.repeaterField.controlOptions.isMultiple;
|
|
9074
9236
|
country.showCheckbox = false;
|
|
9075
9237
|
country.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
9076
9238
|
country.selectedItems = this.value;
|
|
9239
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9240
|
+
country.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9241
|
+
}
|
|
9077
9242
|
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, country);
|
|
9078
9243
|
break;
|
|
9079
9244
|
//#endregion
|
|
9080
9245
|
//#region FileUpload
|
|
9081
9246
|
case DataType.File:
|
|
9082
9247
|
let file = new FileUploadOptions();
|
|
9083
|
-
file.name =
|
|
9248
|
+
file.name =
|
|
9249
|
+
this.repeaterField.controlOptions.name +
|
|
9250
|
+
'.' +
|
|
9251
|
+
this.itemNumber.toString() +
|
|
9252
|
+
'.' +
|
|
9253
|
+
this.controlNumber.toString();
|
|
9084
9254
|
file.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9085
9255
|
file.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9086
9256
|
file.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9087
9257
|
file.viewType = this.repeaterField.controlOptions.viewType;
|
|
9088
|
-
file.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9258
|
+
file.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9259
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9260
|
+
: '';
|
|
9089
9261
|
file.fileMaxSizeInMB = this.repeaterField.controlOptions.maxFileSizeInMB;
|
|
9090
9262
|
file.value = this.value;
|
|
9263
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9264
|
+
file.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9265
|
+
}
|
|
9091
9266
|
this.renderComponentService.renderDynamicComponent(this.item, FileUploadComponent, this.group, file);
|
|
9092
9267
|
break;
|
|
9093
9268
|
case DataType.MultiFile:
|
|
9094
9269
|
let multiFile = new FileUploadOptions();
|
|
9095
|
-
file.name =
|
|
9270
|
+
file.name =
|
|
9271
|
+
this.repeaterField.controlOptions.name +
|
|
9272
|
+
'.' +
|
|
9273
|
+
this.itemNumber.toString() +
|
|
9274
|
+
'.' +
|
|
9275
|
+
this.controlNumber.toString();
|
|
9096
9276
|
file.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9097
9277
|
file.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9098
9278
|
file.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9099
9279
|
file.viewType = this.repeaterField.controlOptions.viewType;
|
|
9100
|
-
file.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9280
|
+
file.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9281
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9282
|
+
: '';
|
|
9101
9283
|
multiFile.maxSizeForAllFilesInMB = this.repeaterField.controlOptions.maxFileSizeInMB;
|
|
9102
9284
|
multiFile.maxNoOfFiles = this.repeaterField.controlOptions.maxFileCount;
|
|
9103
9285
|
multiFile.isMultipleFile = true;
|
|
9104
9286
|
multiFile.value = this.value;
|
|
9287
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9288
|
+
multiFile.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9289
|
+
}
|
|
9105
9290
|
this.renderComponentService.renderDynamicComponent(this.item, FileUploadComponent, this.group, multiFile);
|
|
9106
9291
|
break;
|
|
9107
9292
|
//#endregion
|
|
9108
9293
|
//#region ImageUpload
|
|
9109
9294
|
case DataType.Image:
|
|
9110
9295
|
let image = new ImageUploadOptions();
|
|
9111
|
-
image.name =
|
|
9296
|
+
image.name =
|
|
9297
|
+
this.repeaterField.controlOptions.name +
|
|
9298
|
+
'.' +
|
|
9299
|
+
this.itemNumber.toString() +
|
|
9300
|
+
'.' +
|
|
9301
|
+
this.controlNumber.toString();
|
|
9112
9302
|
image.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9113
9303
|
image.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9114
9304
|
image.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9115
9305
|
image.viewType = this.repeaterField.controlOptions.viewType;
|
|
9116
|
-
image.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9306
|
+
image.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9307
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9308
|
+
: '';
|
|
9117
9309
|
if (this.repeaterField.controlOptions.maxFileSizeInMB)
|
|
9118
9310
|
image.fileMaxSizeInMB = this.repeaterField.controlOptions.maxFileSizeInMB;
|
|
9119
9311
|
image.value = this.value;
|
|
9312
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9313
|
+
image.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9314
|
+
}
|
|
9120
9315
|
this.renderComponentService.renderDynamicComponent(this.item, ImageUploaderComponent, this.group, image);
|
|
9121
9316
|
break;
|
|
9122
9317
|
case DataType.CoverPhoto:
|
|
9123
9318
|
let coverPhoto = new ImageUploadOptions();
|
|
9124
|
-
coverPhoto.name =
|
|
9319
|
+
coverPhoto.name =
|
|
9320
|
+
this.repeaterField.controlOptions.name +
|
|
9321
|
+
'.' +
|
|
9322
|
+
this.itemNumber.toString() +
|
|
9323
|
+
'.' +
|
|
9324
|
+
this.controlNumber.toString();
|
|
9125
9325
|
coverPhoto.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9126
9326
|
coverPhoto.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9127
9327
|
coverPhoto.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9128
9328
|
coverPhoto.viewType = this.repeaterField.controlOptions.viewType;
|
|
9129
|
-
coverPhoto.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9329
|
+
coverPhoto.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9330
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9331
|
+
: '';
|
|
9130
9332
|
if (this.repeaterField.controlOptions.maxFileSizeInMB)
|
|
9131
9333
|
coverPhoto.fileMaxSizeInMB = this.repeaterField.controlOptions.maxFileSizeInMB;
|
|
9132
9334
|
coverPhoto.value = this.value;
|
|
9335
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9336
|
+
coverPhoto.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9337
|
+
}
|
|
9133
9338
|
this.renderComponentService.renderDynamicComponent(this.item, ImageUploaderComponent, this.group, coverPhoto);
|
|
9134
9339
|
break;
|
|
9135
9340
|
//#endregion
|
|
9136
9341
|
//#region Mobile
|
|
9137
9342
|
case DataType.Mobile:
|
|
9138
9343
|
let mobile = new PhoneOptions();
|
|
9139
|
-
mobile.name =
|
|
9344
|
+
mobile.name =
|
|
9345
|
+
this.repeaterField.controlOptions.name +
|
|
9346
|
+
'.' +
|
|
9347
|
+
this.itemNumber.toString() +
|
|
9348
|
+
'.' +
|
|
9349
|
+
this.controlNumber.toString();
|
|
9140
9350
|
mobile.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9141
9351
|
mobile.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9142
9352
|
mobile.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9143
9353
|
mobile.viewType = this.repeaterField.controlOptions.viewType;
|
|
9144
|
-
mobile.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9354
|
+
mobile.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9355
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9356
|
+
: '';
|
|
9145
9357
|
mobile.allowSearch = true;
|
|
9146
9358
|
mobile.phoneValidation = true;
|
|
9147
9359
|
mobile.selectFirstCountry = true;
|
|
9148
9360
|
mobile.enablePlaceholder = true;
|
|
9149
9361
|
mobile.value = this.value;
|
|
9362
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9363
|
+
mobile.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9364
|
+
}
|
|
9150
9365
|
this.renderComponentService.renderDynamicComponent(this.item, PhoneComponent, this.group, mobile);
|
|
9151
9366
|
break;
|
|
9152
9367
|
//#endregion
|
|
9153
9368
|
//#region MultilineText
|
|
9154
9369
|
case DataType.MultilineText:
|
|
9155
9370
|
let multilineText = new TextAreaOptions();
|
|
9156
|
-
multilineText.name =
|
|
9371
|
+
multilineText.name =
|
|
9372
|
+
this.repeaterField.controlOptions.name +
|
|
9373
|
+
'.' +
|
|
9374
|
+
this.itemNumber.toString() +
|
|
9375
|
+
'.' +
|
|
9376
|
+
this.controlNumber.toString();
|
|
9157
9377
|
multilineText.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9158
9378
|
multilineText.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9159
9379
|
multilineText.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9160
9380
|
multilineText.viewType = this.repeaterField.controlOptions.viewType;
|
|
9161
|
-
multilineText.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9381
|
+
multilineText.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9382
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9383
|
+
: '';
|
|
9162
9384
|
if (this.repeaterField.controlOptions.maxLength)
|
|
9163
9385
|
multilineText.maxLength = this.repeaterField.controlOptions.maxLength;
|
|
9164
9386
|
if (this.repeaterField.controlOptions.minLength)
|
|
@@ -9166,63 +9388,106 @@ class RepeaterFieldBuilderComponent {
|
|
|
9166
9388
|
multilineText.rows = this.repeaterField.controlOptions.rows;
|
|
9167
9389
|
multilineText.forceDirection = this.repeaterField.controlOptions.forceDirection;
|
|
9168
9390
|
multilineText.value = this.value;
|
|
9391
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9392
|
+
multilineText.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9393
|
+
}
|
|
9169
9394
|
this.renderComponentService.renderDynamicComponent(this.item, TextAreaComponent, this.group, multilineText);
|
|
9170
9395
|
break;
|
|
9171
9396
|
//#endregion
|
|
9172
9397
|
//#region HTML
|
|
9173
9398
|
case DataType.HTML:
|
|
9174
|
-
let
|
|
9175
|
-
|
|
9176
|
-
|
|
9177
|
-
|
|
9178
|
-
|
|
9179
|
-
|
|
9180
|
-
|
|
9399
|
+
let html = new HtmlEditorOptions();
|
|
9400
|
+
html.name =
|
|
9401
|
+
this.repeaterField.controlOptions.name +
|
|
9402
|
+
'.' +
|
|
9403
|
+
this.itemNumber.toString() +
|
|
9404
|
+
'.' +
|
|
9405
|
+
this.controlNumber.toString();
|
|
9406
|
+
html.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9407
|
+
html.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9408
|
+
html.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9409
|
+
html.viewType = this.repeaterField.controlOptions.viewType;
|
|
9410
|
+
html.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9411
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9412
|
+
: '';
|
|
9181
9413
|
if (this.repeaterField.controlOptions.maxLength)
|
|
9182
|
-
|
|
9414
|
+
html.maxLength = this.repeaterField.controlOptions.maxLength;
|
|
9183
9415
|
if (this.repeaterField.controlOptions.minLength)
|
|
9184
|
-
|
|
9185
|
-
|
|
9186
|
-
|
|
9187
|
-
|
|
9188
|
-
this.
|
|
9416
|
+
html.minLength = this.repeaterField.controlOptions.minLength;
|
|
9417
|
+
html.height = this.repeaterField.controlOptions.rows;
|
|
9418
|
+
html.forceDirection = this.repeaterField.controlOptions.forceDirection;
|
|
9419
|
+
html.value = this.value;
|
|
9420
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9421
|
+
html.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9422
|
+
}
|
|
9423
|
+
this.renderComponentService.renderDynamicComponent(this.item, HtmlEditorComponent, this.group, html);
|
|
9189
9424
|
break;
|
|
9190
9425
|
//#endregion
|
|
9191
9426
|
//#region Boolean
|
|
9192
9427
|
case DataType.Boolean:
|
|
9193
9428
|
let boolean = new ToggleSlideOptions();
|
|
9194
|
-
boolean.name =
|
|
9429
|
+
boolean.name =
|
|
9430
|
+
this.repeaterField.controlOptions.name +
|
|
9431
|
+
'.' +
|
|
9432
|
+
this.itemNumber.toString() +
|
|
9433
|
+
'.' +
|
|
9434
|
+
this.controlNumber.toString();
|
|
9195
9435
|
boolean.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9196
9436
|
boolean.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9197
9437
|
boolean.viewType = this.repeaterField.controlOptions.viewType;
|
|
9198
9438
|
boolean.value = this.value;
|
|
9199
|
-
boolean.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9439
|
+
boolean.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9440
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9441
|
+
: '';
|
|
9442
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9443
|
+
boolean.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9444
|
+
}
|
|
9200
9445
|
this.renderComponentService.renderDynamicComponent(this.item, ToggleslideComponent, this.group, boolean);
|
|
9201
9446
|
break;
|
|
9202
9447
|
//#endregion
|
|
9203
9448
|
//#region Location
|
|
9204
9449
|
case DataType.Location:
|
|
9205
9450
|
let location = new MapAutoCompleteOptions();
|
|
9206
|
-
location.name =
|
|
9451
|
+
location.name =
|
|
9452
|
+
this.repeaterField.controlOptions.name +
|
|
9453
|
+
'.' +
|
|
9454
|
+
this.itemNumber.toString() +
|
|
9455
|
+
'.' +
|
|
9456
|
+
this.controlNumber.toString();
|
|
9207
9457
|
location.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9208
9458
|
location.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9209
9459
|
location.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9210
9460
|
location.viewType = this.repeaterField.controlOptions.viewType;
|
|
9211
9461
|
location.value = this.value;
|
|
9212
|
-
location.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9462
|
+
location.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9463
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9464
|
+
: '';
|
|
9465
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9466
|
+
location.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9467
|
+
}
|
|
9213
9468
|
this.renderComponentService.renderDynamicComponent(this.item, MapAutoCompleteComponent, this.group, location);
|
|
9214
9469
|
break;
|
|
9215
9470
|
//#endregion
|
|
9216
9471
|
//#region CheckBox
|
|
9217
9472
|
case DataType.CheckBox:
|
|
9218
9473
|
let checkBox = new CheckBoxOptions();
|
|
9219
|
-
checkBox.name =
|
|
9474
|
+
checkBox.name =
|
|
9475
|
+
this.repeaterField.controlOptions.name +
|
|
9476
|
+
'.' +
|
|
9477
|
+
this.itemNumber.toString() +
|
|
9478
|
+
'.' +
|
|
9479
|
+
this.controlNumber.toString();
|
|
9220
9480
|
checkBox.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9221
9481
|
checkBox.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9222
9482
|
checkBox.viewType = this.repeaterField.controlOptions.viewType;
|
|
9223
9483
|
checkBox.outputFunction = this.repeaterField.controlOptions.outputFunction;
|
|
9224
|
-
checkBox.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9484
|
+
checkBox.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9485
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9486
|
+
: '';
|
|
9225
9487
|
checkBox.value = this.value;
|
|
9488
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9489
|
+
checkBox.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9490
|
+
}
|
|
9226
9491
|
this.renderComponentService.renderDynamicComponent(this.item, CheckBoxComponent, this.group, checkBox);
|
|
9227
9492
|
break;
|
|
9228
9493
|
//#endregion
|
|
@@ -9234,7 +9499,11 @@ class RepeaterFieldBuilderComponent {
|
|
|
9234
9499
|
ngOnChanges(changes) {
|
|
9235
9500
|
if (changes.itemNumber)
|
|
9236
9501
|
if (changes.itemNumber.previousValue) {
|
|
9237
|
-
let name = this.repeaterField.controlOptions.name +
|
|
9502
|
+
let name = this.repeaterField.controlOptions.name +
|
|
9503
|
+
'.' +
|
|
9504
|
+
changes.itemNumber.previousValue.toString() +
|
|
9505
|
+
'.' +
|
|
9506
|
+
this.controlNumber.toString();
|
|
9238
9507
|
let value = this.group.controls[name].value;
|
|
9239
9508
|
this.item.clear();
|
|
9240
9509
|
this.group.removeControl(name);
|
|
@@ -9242,284 +9511,471 @@ class RepeaterFieldBuilderComponent {
|
|
|
9242
9511
|
//#region TextBox
|
|
9243
9512
|
case DataType.Text:
|
|
9244
9513
|
let text = new TextBoxOptions();
|
|
9245
|
-
text.name =
|
|
9514
|
+
text.name =
|
|
9515
|
+
this.repeaterField.controlOptions.name +
|
|
9516
|
+
'.' +
|
|
9517
|
+
changes.itemNumber.currentValue +
|
|
9518
|
+
'.' +
|
|
9519
|
+
this.controlNumber.toString();
|
|
9246
9520
|
text.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9247
9521
|
text.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9248
9522
|
text.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9249
9523
|
text.viewType = this.repeaterField.controlOptions.viewType;
|
|
9250
|
-
text.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9524
|
+
text.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9525
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9526
|
+
: '';
|
|
9251
9527
|
text.type = InputType.Text;
|
|
9252
9528
|
if (this.repeaterField.controlOptions.maxLength)
|
|
9253
9529
|
text.maxLength = this.repeaterField.controlOptions.maxLength;
|
|
9254
9530
|
if (this.repeaterField.controlOptions.minLength)
|
|
9255
9531
|
text.minLength = this.repeaterField.controlOptions.minLength;
|
|
9256
9532
|
text.value = value;
|
|
9533
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9534
|
+
text.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9535
|
+
}
|
|
9257
9536
|
this.renderComponentService.renderDynamicComponent(this.item, TextboxComponent, this.group, text);
|
|
9258
9537
|
break;
|
|
9259
9538
|
case DataType.Name:
|
|
9260
9539
|
let name = new TextBoxOptions();
|
|
9261
|
-
name.name =
|
|
9540
|
+
name.name =
|
|
9541
|
+
this.repeaterField.controlOptions.name +
|
|
9542
|
+
'.' +
|
|
9543
|
+
changes.itemNumber.currentValue +
|
|
9544
|
+
'.' +
|
|
9545
|
+
this.controlNumber.toString();
|
|
9262
9546
|
name.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9263
9547
|
name.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9264
9548
|
name.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9265
9549
|
name.viewType = this.repeaterField.controlOptions.viewType;
|
|
9266
|
-
name.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9550
|
+
name.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9551
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9552
|
+
: '';
|
|
9267
9553
|
if (this.repeaterField.controlOptions.maxLength)
|
|
9268
9554
|
name.maxLength = this.repeaterField.controlOptions.maxLength;
|
|
9269
9555
|
if (this.repeaterField.controlOptions.minLength)
|
|
9270
9556
|
name.minLength = this.repeaterField.controlOptions.minLength;
|
|
9271
9557
|
name.type = InputType.Text;
|
|
9272
9558
|
name.value = value;
|
|
9559
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9560
|
+
name.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9561
|
+
}
|
|
9273
9562
|
this.renderComponentService.renderDynamicComponent(this.item, TextboxComponent, this.group, name);
|
|
9274
9563
|
break;
|
|
9275
9564
|
case DataType.Email:
|
|
9276
9565
|
let email = new TextBoxOptions();
|
|
9277
|
-
email.name =
|
|
9566
|
+
email.name =
|
|
9567
|
+
this.repeaterField.controlOptions.name +
|
|
9568
|
+
'.' +
|
|
9569
|
+
changes.itemNumber.currentValue +
|
|
9570
|
+
'.' +
|
|
9571
|
+
this.controlNumber.toString();
|
|
9278
9572
|
email.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9279
9573
|
email.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9280
9574
|
email.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9281
9575
|
email.viewType = this.repeaterField.controlOptions.viewType;
|
|
9282
|
-
email.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9576
|
+
email.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9577
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9578
|
+
: '';
|
|
9283
9579
|
email.type = InputType.Email;
|
|
9284
9580
|
email.value = value;
|
|
9581
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9582
|
+
email.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9583
|
+
}
|
|
9285
9584
|
this.renderComponentService.renderDynamicComponent(this.item, TextboxComponent, this.group, email);
|
|
9286
9585
|
break;
|
|
9287
9586
|
case DataType.Number:
|
|
9288
9587
|
let number = new TextBoxOptions();
|
|
9289
|
-
number.name =
|
|
9588
|
+
number.name =
|
|
9589
|
+
this.repeaterField.controlOptions.name +
|
|
9590
|
+
'.' +
|
|
9591
|
+
changes.itemNumber.currentValue +
|
|
9592
|
+
'.' +
|
|
9593
|
+
this.controlNumber.toString();
|
|
9290
9594
|
number.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9291
9595
|
number.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9292
9596
|
number.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9293
9597
|
number.viewType = this.repeaterField.controlOptions.viewType;
|
|
9294
|
-
number.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9598
|
+
number.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9599
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9600
|
+
: '';
|
|
9295
9601
|
number.type = InputType.Number;
|
|
9296
9602
|
let rangeNumber = new RangeNumber();
|
|
9297
9603
|
rangeNumber.to = this.repeaterField.controlOptions.maxLength;
|
|
9298
9604
|
rangeNumber.from = this.repeaterField.controlOptions.minLength;
|
|
9299
9605
|
number.numberRange = rangeNumber;
|
|
9300
9606
|
number.value = value;
|
|
9607
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9608
|
+
number.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9609
|
+
}
|
|
9301
9610
|
this.renderComponentService.renderDynamicComponent(this.item, TextboxComponent, this.group, number);
|
|
9302
9611
|
break;
|
|
9303
9612
|
//#endregion
|
|
9304
9613
|
//#region DateTime
|
|
9305
9614
|
case DataType.Date:
|
|
9306
|
-
let
|
|
9307
|
-
|
|
9308
|
-
|
|
9309
|
-
|
|
9310
|
-
|
|
9311
|
-
|
|
9312
|
-
|
|
9313
|
-
|
|
9314
|
-
|
|
9315
|
-
|
|
9316
|
-
|
|
9317
|
-
|
|
9615
|
+
let date = new DatePickerOptions();
|
|
9616
|
+
date.name =
|
|
9617
|
+
this.repeaterField.controlOptions.name +
|
|
9618
|
+
'.' +
|
|
9619
|
+
changes.itemNumber.currentValue +
|
|
9620
|
+
'.' +
|
|
9621
|
+
this.controlNumber.toString();
|
|
9622
|
+
date.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9623
|
+
date.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9624
|
+
date.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9625
|
+
date.viewType = this.repeaterField.controlOptions.viewType;
|
|
9626
|
+
date.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9627
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9628
|
+
: '';
|
|
9629
|
+
date.pickerType = PickerType.Calendar;
|
|
9630
|
+
date.selectMode = SelectMode.Single;
|
|
9631
|
+
date.startView = StartView.Month;
|
|
9632
|
+
date.value = value;
|
|
9633
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9634
|
+
date.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9635
|
+
}
|
|
9636
|
+
this.renderComponentService.renderDynamicComponent(this.item, DateInputComponent, this.group, date);
|
|
9318
9637
|
break;
|
|
9319
9638
|
case DataType.DateTime:
|
|
9320
9639
|
let dateTime = new DatePickerOptions();
|
|
9321
|
-
dateTime.name =
|
|
9640
|
+
dateTime.name =
|
|
9641
|
+
this.repeaterField.controlOptions.name +
|
|
9642
|
+
'.' +
|
|
9643
|
+
changes.itemNumber.currentValue +
|
|
9644
|
+
'.' +
|
|
9645
|
+
this.controlNumber.toString();
|
|
9322
9646
|
dateTime.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9323
9647
|
dateTime.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9324
9648
|
dateTime.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9325
9649
|
dateTime.viewType = this.repeaterField.controlOptions.viewType;
|
|
9326
|
-
dateTime.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9650
|
+
dateTime.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9651
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9652
|
+
: '';
|
|
9327
9653
|
dateTime.pickerType = PickerType.Both;
|
|
9328
9654
|
dateTime.selectMode = SelectMode.Single;
|
|
9329
9655
|
dateTime.startView = StartView.Month;
|
|
9330
9656
|
dateTime.value = value;
|
|
9657
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9658
|
+
dateTime.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9659
|
+
}
|
|
9331
9660
|
this.renderComponentService.renderDynamicComponent(this.item, DateInputComponent, this.group, dateTime);
|
|
9332
9661
|
break;
|
|
9333
9662
|
case DataType.Time:
|
|
9334
9663
|
let time = new DatePickerOptions();
|
|
9335
|
-
time.name =
|
|
9664
|
+
time.name =
|
|
9665
|
+
this.repeaterField.controlOptions.name +
|
|
9666
|
+
'.' +
|
|
9667
|
+
changes.itemNumber.currentValue +
|
|
9668
|
+
'.' +
|
|
9669
|
+
this.controlNumber.toString();
|
|
9336
9670
|
time.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9337
9671
|
time.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9338
9672
|
time.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9339
9673
|
time.viewType = this.repeaterField.controlOptions.viewType;
|
|
9340
|
-
time.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9674
|
+
time.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9675
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9676
|
+
: '';
|
|
9341
9677
|
time.pickerType = PickerType.Timer;
|
|
9342
9678
|
time.selectMode = SelectMode.Single;
|
|
9343
9679
|
time.startView = StartView.Month;
|
|
9344
9680
|
time.value = value;
|
|
9681
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9682
|
+
time.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9683
|
+
}
|
|
9345
9684
|
this.renderComponentService.renderDynamicComponent(this.item, DateInputComponent, this.group, time);
|
|
9346
9685
|
break;
|
|
9347
9686
|
//#endregion
|
|
9348
9687
|
//#region Dropdown
|
|
9349
9688
|
case DataType.SingleSelect:
|
|
9350
9689
|
let singleSelect = new DropdownOptions();
|
|
9351
|
-
singleSelect.name =
|
|
9690
|
+
singleSelect.name =
|
|
9691
|
+
this.repeaterField.controlOptions.name +
|
|
9692
|
+
'.' +
|
|
9693
|
+
changes.itemNumber.currentValue +
|
|
9694
|
+
'.' +
|
|
9695
|
+
this.controlNumber.toString();
|
|
9352
9696
|
singleSelect.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9353
9697
|
singleSelect.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9354
9698
|
singleSelect.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9355
9699
|
singleSelect.viewType = this.repeaterField.controlOptions.viewType;
|
|
9356
|
-
singleSelect.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9700
|
+
singleSelect.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9701
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9702
|
+
: '';
|
|
9357
9703
|
singleSelect.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
9358
9704
|
singleSelect.singleSelection = true;
|
|
9359
9705
|
singleSelect.showCheckbox = false;
|
|
9360
9706
|
singleSelect.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
9361
9707
|
singleSelect.selectedItems = value;
|
|
9708
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9709
|
+
singleSelect.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9710
|
+
}
|
|
9362
9711
|
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, singleSelect);
|
|
9363
9712
|
break;
|
|
9364
9713
|
case DataType.MulipleSelect:
|
|
9365
9714
|
let mulipleSelect = new DropdownOptions();
|
|
9366
|
-
mulipleSelect.name =
|
|
9715
|
+
mulipleSelect.name =
|
|
9716
|
+
this.repeaterField.controlOptions.name +
|
|
9717
|
+
'.' +
|
|
9718
|
+
changes.itemNumber.currentValue +
|
|
9719
|
+
'.' +
|
|
9720
|
+
this.controlNumber.toString();
|
|
9367
9721
|
mulipleSelect.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9368
9722
|
mulipleSelect.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9369
9723
|
mulipleSelect.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9370
9724
|
mulipleSelect.viewType = this.repeaterField.controlOptions.viewType;
|
|
9371
|
-
mulipleSelect.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9725
|
+
mulipleSelect.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9726
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9727
|
+
: '';
|
|
9372
9728
|
mulipleSelect.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
9373
9729
|
mulipleSelect.singleSelection = false;
|
|
9374
9730
|
mulipleSelect.showCheckbox = false;
|
|
9375
9731
|
mulipleSelect.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
9376
9732
|
mulipleSelect.selectedItems = value;
|
|
9733
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9734
|
+
mulipleSelect.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9735
|
+
}
|
|
9377
9736
|
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, mulipleSelect);
|
|
9378
9737
|
break;
|
|
9379
9738
|
case DataType.Goal:
|
|
9380
|
-
let
|
|
9381
|
-
|
|
9382
|
-
|
|
9383
|
-
|
|
9384
|
-
|
|
9385
|
-
|
|
9386
|
-
|
|
9387
|
-
|
|
9388
|
-
|
|
9389
|
-
|
|
9390
|
-
|
|
9391
|
-
|
|
9392
|
-
|
|
9739
|
+
let goal = new DropdownOptions();
|
|
9740
|
+
goal.name =
|
|
9741
|
+
this.repeaterField.controlOptions.name +
|
|
9742
|
+
'.' +
|
|
9743
|
+
changes.itemNumber.currentValue +
|
|
9744
|
+
'.' +
|
|
9745
|
+
this.controlNumber.toString();
|
|
9746
|
+
goal.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9747
|
+
goal.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9748
|
+
goal.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9749
|
+
goal.viewType = this.repeaterField.controlOptions.viewType;
|
|
9750
|
+
goal.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9751
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9752
|
+
: '';
|
|
9753
|
+
goal.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
9754
|
+
goal.singleSelection = !this.repeaterField.controlOptions.isMultiple;
|
|
9755
|
+
goal.showCheckbox = false;
|
|
9756
|
+
goal.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
9757
|
+
goal.selectedItems = value;
|
|
9758
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9759
|
+
goal.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9760
|
+
}
|
|
9761
|
+
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, goal);
|
|
9393
9762
|
break;
|
|
9394
9763
|
case DataType.Challenge:
|
|
9395
9764
|
let challenge = new DropdownOptions();
|
|
9396
|
-
challenge.name =
|
|
9765
|
+
challenge.name =
|
|
9766
|
+
this.repeaterField.controlOptions.name +
|
|
9767
|
+
'.' +
|
|
9768
|
+
changes.itemNumber.currentValue +
|
|
9769
|
+
'.' +
|
|
9770
|
+
this.controlNumber.toString();
|
|
9397
9771
|
challenge.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9398
9772
|
challenge.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9399
9773
|
challenge.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9400
9774
|
challenge.viewType = this.repeaterField.controlOptions.viewType;
|
|
9401
|
-
challenge.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9775
|
+
challenge.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9776
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9777
|
+
: '';
|
|
9402
9778
|
challenge.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
9403
9779
|
challenge.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
9404
9780
|
challenge.singleSelection = !this.repeaterField.controlOptions.isMultiple;
|
|
9405
9781
|
challenge.showCheckbox = false;
|
|
9406
9782
|
challenge.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
9407
9783
|
challenge.selectedItems = value;
|
|
9784
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9785
|
+
challenge.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9786
|
+
}
|
|
9408
9787
|
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, challenge);
|
|
9409
9788
|
break;
|
|
9410
9789
|
case DataType.InnovationLab:
|
|
9411
9790
|
let innovationLab = new DropdownOptions();
|
|
9412
|
-
innovationLab.name =
|
|
9791
|
+
innovationLab.name =
|
|
9792
|
+
this.repeaterField.controlOptions.name +
|
|
9793
|
+
'.' +
|
|
9794
|
+
changes.itemNumber.currentValue +
|
|
9795
|
+
'.' +
|
|
9796
|
+
this.controlNumber.toString();
|
|
9413
9797
|
innovationLab.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9414
9798
|
innovationLab.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9415
9799
|
innovationLab.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9416
9800
|
innovationLab.viewType = this.repeaterField.controlOptions.viewType;
|
|
9417
|
-
innovationLab.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9801
|
+
innovationLab.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9802
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9803
|
+
: '';
|
|
9418
9804
|
innovationLab.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
9419
9805
|
innovationLab.singleSelection = !this.repeaterField.controlOptions.isMultiple;
|
|
9420
9806
|
innovationLab.showCheckbox = false;
|
|
9421
9807
|
innovationLab.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
9422
9808
|
innovationLab.selectedItems = value;
|
|
9809
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9810
|
+
innovationLab.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9811
|
+
}
|
|
9423
9812
|
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, innovationLab);
|
|
9424
9813
|
break;
|
|
9425
9814
|
case DataType.Country:
|
|
9426
9815
|
let country = new DropdownOptions();
|
|
9427
|
-
country.name =
|
|
9816
|
+
country.name =
|
|
9817
|
+
this.repeaterField.controlOptions.name +
|
|
9818
|
+
'.' +
|
|
9819
|
+
changes.itemNumber.currentValue +
|
|
9820
|
+
'.' +
|
|
9821
|
+
this.controlNumber.toString();
|
|
9428
9822
|
country.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9429
9823
|
country.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9430
9824
|
country.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9431
9825
|
country.viewType = this.repeaterField.controlOptions.viewType;
|
|
9432
|
-
country.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9826
|
+
country.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9827
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9828
|
+
: '';
|
|
9433
9829
|
country.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
9434
9830
|
country.singleSelection = !this.repeaterField.controlOptions.isMultiple;
|
|
9435
9831
|
country.showCheckbox = false;
|
|
9436
9832
|
country.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
9437
9833
|
country.selectedItems = value;
|
|
9834
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9835
|
+
country.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9836
|
+
}
|
|
9438
9837
|
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, country);
|
|
9439
9838
|
break;
|
|
9440
9839
|
//#endregion
|
|
9441
9840
|
//#region FileUpload
|
|
9442
9841
|
case DataType.File:
|
|
9443
9842
|
let file = new FileUploadOptions();
|
|
9444
|
-
file.name =
|
|
9843
|
+
file.name =
|
|
9844
|
+
this.repeaterField.controlOptions.name +
|
|
9845
|
+
'.' +
|
|
9846
|
+
changes.itemNumber.currentValue +
|
|
9847
|
+
'.' +
|
|
9848
|
+
this.controlNumber.toString();
|
|
9445
9849
|
file.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9446
9850
|
file.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9447
9851
|
file.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9448
9852
|
file.viewType = this.repeaterField.controlOptions.viewType;
|
|
9449
|
-
file.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9853
|
+
file.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9854
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9855
|
+
: '';
|
|
9450
9856
|
file.fileMaxSizeInMB = this.repeaterField.controlOptions.maxFileSizeInMB;
|
|
9451
9857
|
file.value = value;
|
|
9858
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9859
|
+
file.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9860
|
+
}
|
|
9452
9861
|
this.renderComponentService.renderDynamicComponent(this.item, FileUploadComponent, this.group, file);
|
|
9453
9862
|
break;
|
|
9454
9863
|
case DataType.MultiFile:
|
|
9455
9864
|
let multiFile = new FileUploadOptions();
|
|
9456
|
-
file.name =
|
|
9865
|
+
file.name =
|
|
9866
|
+
this.repeaterField.controlOptions.name +
|
|
9867
|
+
'.' +
|
|
9868
|
+
changes.itemNumber.currentValue +
|
|
9869
|
+
'.' +
|
|
9870
|
+
this.controlNumber.toString();
|
|
9457
9871
|
file.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9458
9872
|
file.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9459
9873
|
file.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9460
9874
|
file.viewType = this.repeaterField.controlOptions.viewType;
|
|
9461
|
-
file.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9875
|
+
file.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9876
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9877
|
+
: '';
|
|
9462
9878
|
multiFile.maxSizeForAllFilesInMB = this.repeaterField.controlOptions.maxFileSizeInMB;
|
|
9463
9879
|
multiFile.maxNoOfFiles = this.repeaterField.controlOptions.maxFileCount;
|
|
9464
9880
|
multiFile.isMultipleFile = true;
|
|
9465
9881
|
multiFile.value = value;
|
|
9882
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9883
|
+
multiFile.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9884
|
+
}
|
|
9466
9885
|
this.renderComponentService.renderDynamicComponent(this.item, FileUploadComponent, this.group, multiFile);
|
|
9467
9886
|
break;
|
|
9468
9887
|
//#endregion
|
|
9469
9888
|
//#region ImageUpload
|
|
9470
9889
|
case DataType.Image:
|
|
9471
9890
|
let image = new ImageUploadOptions();
|
|
9472
|
-
image.name =
|
|
9891
|
+
image.name =
|
|
9892
|
+
this.repeaterField.controlOptions.name +
|
|
9893
|
+
'.' +
|
|
9894
|
+
changes.itemNumber.currentValue +
|
|
9895
|
+
'.' +
|
|
9896
|
+
this.controlNumber.toString();
|
|
9473
9897
|
image.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9474
9898
|
image.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9475
9899
|
image.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9476
9900
|
image.viewType = this.repeaterField.controlOptions.viewType;
|
|
9477
|
-
image.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9901
|
+
image.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9902
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9903
|
+
: '';
|
|
9478
9904
|
if (this.repeaterField.controlOptions.maxFileSizeInMB)
|
|
9479
9905
|
image.fileMaxSizeInMB = this.repeaterField.controlOptions.maxFileSizeInMB;
|
|
9480
9906
|
image.value = value;
|
|
9907
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9908
|
+
image.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9909
|
+
}
|
|
9481
9910
|
this.renderComponentService.renderDynamicComponent(this.item, ImageUploaderComponent, this.group, image);
|
|
9482
9911
|
break;
|
|
9483
9912
|
case DataType.CoverPhoto:
|
|
9484
9913
|
let coverPhoto = new ImageUploadOptions();
|
|
9485
|
-
coverPhoto.name =
|
|
9914
|
+
coverPhoto.name =
|
|
9915
|
+
this.repeaterField.controlOptions.name +
|
|
9916
|
+
'.' +
|
|
9917
|
+
changes.itemNumber.currentValue +
|
|
9918
|
+
'.' +
|
|
9919
|
+
this.controlNumber.toString();
|
|
9486
9920
|
coverPhoto.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9487
9921
|
coverPhoto.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9488
9922
|
coverPhoto.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9489
9923
|
coverPhoto.viewType = this.repeaterField.controlOptions.viewType;
|
|
9490
|
-
coverPhoto.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9924
|
+
coverPhoto.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9925
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9926
|
+
: '';
|
|
9491
9927
|
if (this.repeaterField.controlOptions.maxFileSizeInMB)
|
|
9492
9928
|
coverPhoto.fileMaxSizeInMB = this.repeaterField.controlOptions.maxFileSizeInMB;
|
|
9493
9929
|
coverPhoto.value = value;
|
|
9930
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9931
|
+
coverPhoto.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9932
|
+
}
|
|
9494
9933
|
this.renderComponentService.renderDynamicComponent(this.item, ImageUploaderComponent, this.group, coverPhoto);
|
|
9495
9934
|
break;
|
|
9496
9935
|
//#endregion
|
|
9497
9936
|
//#region Mobile
|
|
9498
9937
|
case DataType.Mobile:
|
|
9499
9938
|
let mobile = new PhoneOptions();
|
|
9500
|
-
mobile.name =
|
|
9939
|
+
mobile.name =
|
|
9940
|
+
this.repeaterField.controlOptions.name +
|
|
9941
|
+
'.' +
|
|
9942
|
+
changes.itemNumber.currentValue +
|
|
9943
|
+
'.' +
|
|
9944
|
+
this.controlNumber.toString();
|
|
9501
9945
|
mobile.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9502
9946
|
mobile.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9503
9947
|
mobile.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9504
9948
|
mobile.viewType = this.repeaterField.controlOptions.viewType;
|
|
9505
|
-
mobile.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9949
|
+
mobile.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9950
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9951
|
+
: '';
|
|
9506
9952
|
mobile.allowSearch = true;
|
|
9507
9953
|
mobile.phoneValidation = true;
|
|
9508
9954
|
mobile.selectFirstCountry = true;
|
|
9509
9955
|
mobile.enablePlaceholder = true;
|
|
9510
9956
|
mobile.value = value;
|
|
9957
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9958
|
+
mobile.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9959
|
+
}
|
|
9511
9960
|
this.renderComponentService.renderDynamicComponent(this.item, PhoneComponent, this.group, mobile);
|
|
9512
9961
|
break;
|
|
9513
9962
|
//#endregion
|
|
9514
9963
|
//#region MultilineText
|
|
9515
9964
|
case DataType.MultilineText:
|
|
9516
9965
|
let multilineText = new TextAreaOptions();
|
|
9517
|
-
multilineText.name =
|
|
9966
|
+
multilineText.name =
|
|
9967
|
+
this.repeaterField.controlOptions.name +
|
|
9968
|
+
'.' +
|
|
9969
|
+
changes.itemNumber.currentValue +
|
|
9970
|
+
'.' +
|
|
9971
|
+
this.controlNumber.toString();
|
|
9518
9972
|
multilineText.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9519
9973
|
multilineText.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9520
9974
|
multilineText.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9521
9975
|
multilineText.viewType = this.repeaterField.controlOptions.viewType;
|
|
9522
|
-
multilineText.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9976
|
+
multilineText.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9977
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9978
|
+
: '';
|
|
9523
9979
|
if (this.repeaterField.controlOptions.maxLength)
|
|
9524
9980
|
multilineText.maxLength = this.repeaterField.controlOptions.maxLength;
|
|
9525
9981
|
if (this.repeaterField.controlOptions.minLength)
|
|
@@ -9527,63 +9983,106 @@ class RepeaterFieldBuilderComponent {
|
|
|
9527
9983
|
multilineText.rows = this.repeaterField.controlOptions.rows;
|
|
9528
9984
|
multilineText.forceDirection = this.repeaterField.controlOptions.forceDirection;
|
|
9529
9985
|
multilineText.value = value;
|
|
9986
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9987
|
+
multilineText.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9988
|
+
}
|
|
9530
9989
|
this.renderComponentService.renderDynamicComponent(this.item, TextAreaComponent, this.group, multilineText);
|
|
9531
9990
|
break;
|
|
9532
9991
|
//#endregion
|
|
9533
9992
|
//#region HTML
|
|
9534
9993
|
case DataType.HTML:
|
|
9535
|
-
let
|
|
9536
|
-
|
|
9537
|
-
|
|
9538
|
-
|
|
9539
|
-
|
|
9540
|
-
|
|
9541
|
-
|
|
9994
|
+
let html = new HtmlEditorOptions();
|
|
9995
|
+
html.name =
|
|
9996
|
+
this.repeaterField.controlOptions.name +
|
|
9997
|
+
'.' +
|
|
9998
|
+
changes.itemNumber.currentValue +
|
|
9999
|
+
'.' +
|
|
10000
|
+
this.controlNumber.toString();
|
|
10001
|
+
html.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
10002
|
+
html.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
10003
|
+
html.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
10004
|
+
html.viewType = this.repeaterField.controlOptions.viewType;
|
|
10005
|
+
html.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
10006
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
10007
|
+
: '';
|
|
9542
10008
|
if (this.repeaterField.controlOptions.maxLength)
|
|
9543
|
-
|
|
10009
|
+
html.maxLength = this.repeaterField.controlOptions.maxLength;
|
|
9544
10010
|
if (this.repeaterField.controlOptions.minLength)
|
|
9545
|
-
|
|
9546
|
-
|
|
9547
|
-
|
|
9548
|
-
|
|
9549
|
-
this.
|
|
10011
|
+
html.minLength = this.repeaterField.controlOptions.minLength;
|
|
10012
|
+
html.height = this.repeaterField.controlOptions.rows;
|
|
10013
|
+
html.forceDirection = this.repeaterField.controlOptions.forceDirection;
|
|
10014
|
+
html.value = value;
|
|
10015
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10016
|
+
html.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10017
|
+
}
|
|
10018
|
+
this.renderComponentService.renderDynamicComponent(this.item, HtmlEditorComponent, this.group, html);
|
|
9550
10019
|
break;
|
|
9551
10020
|
//#endregion
|
|
9552
10021
|
//#region Boolean
|
|
9553
10022
|
case DataType.Boolean:
|
|
9554
10023
|
let boolean = new ToggleSlideOptions();
|
|
9555
|
-
boolean.name =
|
|
10024
|
+
boolean.name =
|
|
10025
|
+
this.repeaterField.controlOptions.name +
|
|
10026
|
+
'.' +
|
|
10027
|
+
changes.itemNumber.currentValue +
|
|
10028
|
+
'.' +
|
|
10029
|
+
this.controlNumber.toString();
|
|
9556
10030
|
boolean.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9557
10031
|
boolean.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9558
10032
|
boolean.viewType = this.repeaterField.controlOptions.viewType;
|
|
9559
|
-
boolean.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
10033
|
+
boolean.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
10034
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
10035
|
+
: '';
|
|
9560
10036
|
boolean.value = value;
|
|
10037
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10038
|
+
boolean.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10039
|
+
}
|
|
9561
10040
|
this.renderComponentService.renderDynamicComponent(this.item, ToggleslideComponent, this.group, boolean);
|
|
9562
10041
|
break;
|
|
9563
10042
|
//#endregion
|
|
9564
10043
|
//#region Location
|
|
9565
10044
|
case DataType.Location:
|
|
9566
|
-
let
|
|
9567
|
-
|
|
9568
|
-
|
|
9569
|
-
|
|
9570
|
-
|
|
9571
|
-
|
|
9572
|
-
|
|
9573
|
-
|
|
9574
|
-
|
|
10045
|
+
let location = new MapAutoCompleteOptions();
|
|
10046
|
+
location.name =
|
|
10047
|
+
this.repeaterField.controlOptions.name +
|
|
10048
|
+
'.' +
|
|
10049
|
+
changes.itemNumber.currentValue +
|
|
10050
|
+
'.' +
|
|
10051
|
+
this.controlNumber.toString();
|
|
10052
|
+
location.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
10053
|
+
location.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
10054
|
+
location.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
10055
|
+
location.viewType = this.repeaterField.controlOptions.viewType;
|
|
10056
|
+
location.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
10057
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
10058
|
+
: '';
|
|
10059
|
+
location.value = value;
|
|
10060
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10061
|
+
location.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10062
|
+
}
|
|
10063
|
+
this.renderComponentService.renderDynamicComponent(this.item, MapAutoCompleteComponent, this.group, location);
|
|
9575
10064
|
break;
|
|
9576
10065
|
//#endregion
|
|
9577
10066
|
//#region CheckBox
|
|
9578
10067
|
case DataType.CheckBox:
|
|
9579
10068
|
let checkBox = new CheckBoxOptions();
|
|
9580
|
-
checkBox.name =
|
|
10069
|
+
checkBox.name =
|
|
10070
|
+
this.repeaterField.controlOptions.name +
|
|
10071
|
+
'.' +
|
|
10072
|
+
changes.itemNumber.currentValue +
|
|
10073
|
+
'.' +
|
|
10074
|
+
this.controlNumber.toString();
|
|
9581
10075
|
checkBox.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9582
10076
|
checkBox.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9583
10077
|
checkBox.viewType = this.repeaterField.controlOptions.viewType;
|
|
9584
|
-
checkBox.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
10078
|
+
checkBox.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
10079
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
10080
|
+
: '';
|
|
9585
10081
|
checkBox.outputFunction = this.repeaterField.controlOptions.outputFunction;
|
|
9586
10082
|
checkBox.value = value;
|
|
10083
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10084
|
+
checkBox.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10085
|
+
}
|
|
9587
10086
|
this.renderComponentService.renderDynamicComponent(this.item, CheckBoxComponent, this.group, checkBox);
|
|
9588
10087
|
break;
|
|
9589
10088
|
//#endregion
|
|
@@ -9600,7 +10099,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
9600
10099
|
args: [{ selector: 'repeater-field-builder', template: "<ng-container #Item></ng-container>\r\n" }]
|
|
9601
10100
|
}], ctorParameters: () => [{ type: RenderComponentService }, { type: i2.FormGroupDirective }], propDecorators: { item: [{
|
|
9602
10101
|
type: ViewChild,
|
|
9603
|
-
args: [
|
|
10102
|
+
args: ['Item', { read: ViewContainerRef }]
|
|
9604
10103
|
}], group: [{
|
|
9605
10104
|
type: Input
|
|
9606
10105
|
}], itemNumber: [{
|
|
@@ -9659,7 +10158,9 @@ class RepeaterTableComponent {
|
|
|
9659
10158
|
if (Object.prototype.hasOwnProperty.call(this.repeaterGroup.controls, key)) {
|
|
9660
10159
|
const keySplitArr = key.split('.');
|
|
9661
10160
|
let item = {
|
|
9662
|
-
[keySplitArr[1]]: {
|
|
10161
|
+
[keySplitArr[1]]: {
|
|
10162
|
+
[keySplitArr[0]]: this.group.controls[this.options.name].value[key]
|
|
10163
|
+
}
|
|
9663
10164
|
};
|
|
9664
10165
|
addItems.push(item);
|
|
9665
10166
|
if (!rowNumber.includes(keySplitArr[1]))
|
|
@@ -9669,7 +10170,7 @@ class RepeaterTableComponent {
|
|
|
9669
10170
|
for (let index = 0; index < rowNumber.length; index++) {
|
|
9670
10171
|
const row = rowNumber[index];
|
|
9671
10172
|
let addObject = {};
|
|
9672
|
-
let filteredElements = addItems.filter(item => item[row]);
|
|
10173
|
+
let filteredElements = addItems.filter((item) => item[row]);
|
|
9673
10174
|
for (let index = 0; index < filteredElements.length; index++) {
|
|
9674
10175
|
const filteredElement = filteredElements[index];
|
|
9675
10176
|
for (const key in filteredElement) {
|
|
@@ -9694,7 +10195,7 @@ class RepeaterTableComponent {
|
|
|
9694
10195
|
if (this.items.length == this.options.minRequiredItems && this.options.isRequired)
|
|
9695
10196
|
return;
|
|
9696
10197
|
let deletedControls = [];
|
|
9697
|
-
let controlNames = this.options.repeaterStructure.map(e => e.controlOptions.name);
|
|
10198
|
+
let controlNames = this.options.repeaterStructure.map((e) => e.controlOptions.name);
|
|
9698
10199
|
for (const key in this.repeaterGroup.controls) {
|
|
9699
10200
|
if (Object.prototype.hasOwnProperty.call(this.repeaterGroup.controls, key)) {
|
|
9700
10201
|
for (let index = 0; index < controlNames.length; index++) {
|
|
@@ -9724,11 +10225,11 @@ class RepeaterTableComponent {
|
|
|
9724
10225
|
this.items.push(this.items[this.items.length - 1] + 1);
|
|
9725
10226
|
}
|
|
9726
10227
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: RepeaterTableComponent, deps: [{ token: i3.UtilityService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9727
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: RepeaterTableComponent, selector: "BBSF-repeater-table", inputs: { group: "group", options: "options" }, ngImport: i0, template: "<div class=\"form-group bbsf-control bbsf-repeater\">\r\n <!--table-->\r\n <div class=\"table-responsive\">\r\n <table class=\"bbsf-repeater-table table {{options.repeaterTableExtraClasses}}\">\r\n <thead class=\"table-head\">\r\n <tr class=\"{{options.repeaterTableRowExtraClasses}}\">\r\n <th *ngFor=\"let item of options.repeaterStructure\" [hidden]=\"item.isHiddenInput\">{{item.headerTitle}}</th>\r\n <th *ngIf=\"!options.disableDeleteButton\" class=\"text-center\">\r\n {{utilityService.getResourceValue(options.actionLabelKey)}}</th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"table-body\">\r\n <tr *ngFor=\"let item of items ; index as i\">\r\n <td *ngFor=\"let repeaterField of options.repeaterStructure ; index as r\"
|
|
10228
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: RepeaterTableComponent, selector: "BBSF-repeater-table", inputs: { group: "group", options: "options" }, ngImport: i0, template: "<div class=\"form-group bbsf-control bbsf-repeater\">\r\n <!--table-->\r\n <div class=\"table-responsive\">\r\n <table class=\"bbsf-repeater-table table {{options.repeaterTableExtraClasses}}\">\r\n <thead class=\"table-head\">\r\n <tr class=\"{{options.repeaterTableRowExtraClasses}}\">\r\n <td *ngIf=\"options.enableTableNumbering\">\r\n <span>#</span>\r\n </td>\r\n <th *ngFor=\"let item of options.repeaterStructure\" [hidden]=\"item.isHiddenInput\">{{item.headerTitle}}</th>\r\n <th *ngIf=\"!options.disableDeleteButton\" class=\"text-center\">\r\n {{utilityService.getResourceValue(options.actionLabelKey)}}</th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"table-body\">\r\n <tr *ngFor=\"let item of items ; index as i\">\r\n <td *ngIf=\"options.enableTableNumbering\">{{i+1}}</td>\r\n <td *ngFor=\"let repeaterField of options.repeaterStructure ; index as r\"\r\n [hidden]=\"repeaterField.isHiddenInput\">\r\n <repeater-field-builder [repeaterField]=\"repeaterField\" [itemNumber]=\"i\" [itemsValue]=\"originalItems\"\r\n [controlNumber]=\"r\" [group]=\"repeaterGroup\">\r\n </repeater-field-builder>\r\n </td>\r\n <td *ngIf=\"!options.disableDeleteButton\" class=\"td-delete\">\r\n <button class=\"{{options.deleteButtonExtraClasses}} btn btn-icon btn-sm btn-danger\" type=\"button\"\r\n (click)=\"deleteItem(i)\" [disabled]=\"(items.length ==options.minRequiredItems&&options.isRequired)\">\r\n <span [innerHTML]=\"options.deleteButtonText\"></span>\r\n </button>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n <!--add button-->\r\n <div class=\"repeater-add-btn\" *ngIf=\"!options.disableAddButton\">\r\n <button class=\"{{options.addButtonExtraClasses}} btn btn-sm btn-brand\" type=\"button\" (click)=\"addItem()\">\r\n <span [innerHTML]=\"options.addButtonText\"></span>\r\n </button>\r\n </div>\r\n</div>", dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: RepeaterFieldBuilderComponent, selector: "repeater-field-builder", inputs: ["group", "itemNumber", "controlNumber", "repeaterField", "itemsValue"] }] }); }
|
|
9728
10229
|
}
|
|
9729
10230
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: RepeaterTableComponent, decorators: [{
|
|
9730
10231
|
type: Component,
|
|
9731
|
-
args: [{ selector: 'BBSF-repeater-table', template: "<div class=\"form-group bbsf-control bbsf-repeater\">\r\n <!--table-->\r\n <div class=\"table-responsive\">\r\n <table class=\"bbsf-repeater-table table {{options.repeaterTableExtraClasses}}\">\r\n <thead class=\"table-head\">\r\n <tr class=\"{{options.repeaterTableRowExtraClasses}}\">\r\n <th *ngFor=\"let item of options.repeaterStructure\" [hidden]=\"item.isHiddenInput\">{{item.headerTitle}}</th>\r\n <th *ngIf=\"!options.disableDeleteButton\" class=\"text-center\">\r\n {{utilityService.getResourceValue(options.actionLabelKey)}}</th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"table-body\">\r\n <tr *ngFor=\"let item of items ; index as i\">\r\n <td *ngFor=\"let repeaterField of options.repeaterStructure ; index as r\"
|
|
10232
|
+
args: [{ selector: 'BBSF-repeater-table', template: "<div class=\"form-group bbsf-control bbsf-repeater\">\r\n <!--table-->\r\n <div class=\"table-responsive\">\r\n <table class=\"bbsf-repeater-table table {{options.repeaterTableExtraClasses}}\">\r\n <thead class=\"table-head\">\r\n <tr class=\"{{options.repeaterTableRowExtraClasses}}\">\r\n <td *ngIf=\"options.enableTableNumbering\">\r\n <span>#</span>\r\n </td>\r\n <th *ngFor=\"let item of options.repeaterStructure\" [hidden]=\"item.isHiddenInput\">{{item.headerTitle}}</th>\r\n <th *ngIf=\"!options.disableDeleteButton\" class=\"text-center\">\r\n {{utilityService.getResourceValue(options.actionLabelKey)}}</th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"table-body\">\r\n <tr *ngFor=\"let item of items ; index as i\">\r\n <td *ngIf=\"options.enableTableNumbering\">{{i+1}}</td>\r\n <td *ngFor=\"let repeaterField of options.repeaterStructure ; index as r\"\r\n [hidden]=\"repeaterField.isHiddenInput\">\r\n <repeater-field-builder [repeaterField]=\"repeaterField\" [itemNumber]=\"i\" [itemsValue]=\"originalItems\"\r\n [controlNumber]=\"r\" [group]=\"repeaterGroup\">\r\n </repeater-field-builder>\r\n </td>\r\n <td *ngIf=\"!options.disableDeleteButton\" class=\"td-delete\">\r\n <button class=\"{{options.deleteButtonExtraClasses}} btn btn-icon btn-sm btn-danger\" type=\"button\"\r\n (click)=\"deleteItem(i)\" [disabled]=\"(items.length ==options.minRequiredItems&&options.isRequired)\">\r\n <span [innerHTML]=\"options.deleteButtonText\"></span>\r\n </button>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n <!--add button-->\r\n <div class=\"repeater-add-btn\" *ngIf=\"!options.disableAddButton\">\r\n <button class=\"{{options.addButtonExtraClasses}} btn btn-sm btn-brand\" type=\"button\" (click)=\"addItem()\">\r\n <span [innerHTML]=\"options.addButtonText\"></span>\r\n </button>\r\n </div>\r\n</div>" }]
|
|
9732
10233
|
}], ctorParameters: () => [{ type: i3.UtilityService }], propDecorators: { group: [{
|
|
9733
10234
|
type: Input
|
|
9734
10235
|
}], options: [{
|