@bnsights/bbsf-controls 1.0.189 → 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 +15 -0
- package/esm2022/lib/Shared/Enums/ToolbarButtons.mjs +33 -0
- package/esm2022/lib/Shared/Models/HtmlEditorOptions.mjs +1 -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 +6 -52
- 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/esm2022/public-api.mjs +2 -1
- package/fesm2022/bnsights-bbsf-controls.mjs +744 -256
- package/fesm2022/bnsights-bbsf-controls.mjs.map +1 -1
- package/lib/Shared/Enums/ToolbarButtons.d.ts +31 -0
- package/lib/Shared/Models/HtmlEditorOptions.d.ts +3 -15
- package/lib/Shared/Models/RepeaterOptions.d.ts +1 -0
- package/package.json +2 -2
- package/public-api.d.ts +1 -0
|
@@ -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,59 +3820,13 @@ 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',
|
|
3816
|
-
toolbarHiddenButtons: [
|
|
3817
|
-
[
|
|
3818
|
-
'link',
|
|
3819
|
-
'unlink',
|
|
3820
|
-
'insertImage',
|
|
3821
|
-
'insertVideo',
|
|
3822
|
-
'insertHorizontalRule',
|
|
3823
|
-
]
|
|
3824
|
-
]
|
|
3827
|
+
toolbarHiddenButtons: this.options.toolbarHiddenButtons ? this.options.toolbarHiddenButtons : []
|
|
3825
3828
|
};
|
|
3826
3829
|
this.controlValidationService.isCreatedBefor = false;
|
|
3827
|
-
// this.miscList = this.options.ToolsList_Misc != null ? this.options.ToolsList_Misc : ['codeview', 'undo', 'redo'];
|
|
3828
|
-
// this.styleList = this.options.ToolsList_Style != null ? this.options.ToolsList_Style : ['bold', 'italic', 'underline', 'clear']
|
|
3829
|
-
// this.fontsizeList = this.options.ToolsList_FontSize != null ? this.options.ToolsList_FontSize : ['fontname', 'fontsize', 'color']
|
|
3830
|
-
// this.paraList = this.options.ToolsList_Para != null ? this.options.ToolsList_Para : ['style', 'ul', 'ol', 'paragraph', 'height']
|
|
3831
|
-
// this.insertList = this.options.ToolsList_Insert != null ? this.options.ToolsList_Insert : ['table', 'picture', 'link', 'video', 'hr']
|
|
3832
|
-
// this.Config = {
|
|
3833
|
-
// callbacks: {
|
|
3834
|
-
// // onChange: (e) => {
|
|
3835
|
-
// // this.zone.run(() => {
|
|
3836
|
-
// // this.onTextChange();
|
|
3837
|
-
// // });
|
|
3838
|
-
// // },
|
|
3839
|
-
// // onKeyup: (e) => {
|
|
3840
|
-
// // this.zone.run(() => {
|
|
3841
|
-
// // ;
|
|
3842
|
-
// // this.onTextChange();
|
|
3843
|
-
// // });
|
|
3844
|
-
// // },
|
|
3845
|
-
// // onKeydown: (e) => {
|
|
3846
|
-
// // this.zone.run(() => {
|
|
3847
|
-
// // ;
|
|
3848
|
-
// // if (this.WordCountArray > this.options.MaxWordCount && e.keyCode != 8) {
|
|
3849
|
-
// // e.preventDefault();
|
|
3850
|
-
// // }
|
|
3851
|
-
// // });
|
|
3852
|
-
// // }
|
|
3853
|
-
// },
|
|
3854
|
-
// placeholder: this.options.Placeholder,
|
|
3855
|
-
// height: `${this.options.Height}px`,
|
|
3856
|
-
// toolbar: [
|
|
3857
|
-
// ['misc', this.miscList],
|
|
3858
|
-
// ['style', this.styleList],
|
|
3859
|
-
// ['fontsize', this.fontsizeList],
|
|
3860
|
-
// ['para', this.paraList],
|
|
3861
|
-
// ['insert', this.insertList]
|
|
3862
|
-
// ],
|
|
3863
|
-
// fontNames: ['Helvetica', 'Arial', 'Arial Black', 'Comic Sans MS', 'Courier New', 'Roboto', 'Times']
|
|
3864
|
-
// }
|
|
3865
3830
|
this.group.addControl(this.options.name, new FormControl(''));
|
|
3866
3831
|
this.htmlEditorFormControl = this.group.controls[this.options.name]; // new FormControl('',validationRules);
|
|
3867
3832
|
this.htmlEditorFormControl.setValue(this.options.value);
|
|
@@ -3927,11 +3892,11 @@ class HtmlEditorComponent {
|
|
|
3927
3892
|
this.OnChange.emit(originalValue);
|
|
3928
3893
|
}
|
|
3929
3894
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HtmlEditorComponent, deps: [{ token: i0.NgZone }, { token: ControlUtility }, { token: i2.ControlContainer, optional: true }, { token: i2.FormGroupDirective }, { token: i3.UtilityService }, { token: i3.ControlValidationService }, { token: GlobalSettings }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3930
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: HtmlEditorComponent, selector: "BBSF-HtmlEditor", inputs: { group: "group", options: "options" }, outputs: { OnChange: "OnChange" }, ngImport: i0, template: "<div class=\"form-group bbsf-control bbsf-htmleditor\" [formGroup]=\"group\">\r\n <div [ngClass]=\"(options.viewType==1)?'bbsf-vertical':'bbsf-horizontal'\">\r\n <!--label-->\r\n <label *ngIf=\"!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 <div *ngIf=\"!options.isReadonly\" class=\"bbsf-input-container\">\r\n <angular-editor (change)=\"onValueChanged()\" id=\"{{options.name}}\"\r\n [class.is-invalid]=\"htmlEditorFormControl.invalid && htmlEditorFormControl.touched\"\r\n class=\"{{options.extraClasses}}\" [dir]=\"textDir\" formControlName=\"{{options.name}}\"\r\n [config]=\"editorConfig\"></angular-editor>\r\n </div>\r\n\r\n <div *ngIf=\"options.isReadonly\"><span class=\"readonly-view\" [innerHTML]=\"options.value\"></span>\r\n\r\n </div>\r\n <div class=\"subtext-container\">\r\n <!-- LabelDescription-->\r\n <div class=\"bbsf-control-desc\" *ngIf=\"options.labelDescription!=null\">{{options.labelDescription}}</div>\r\n <!-- requiredText-->\r\n <div class=\"bbsf-validation\" *ngIf=\"(htmlEditorFormControl.invalid && htmlEditorFormControl.touched)\">\r\n {{getErrorValidation(htmlEditorFormControl.errors|keyvalue)}}\r\n </div>\r\n </div>\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">\r\n {{resetError()}}</div>\r\n </div>", dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { kind: "directive", type: i7.NativeElementInjectorDirective, selector: "[ngModel], [formControl], [formControlName]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { 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: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i8.AngularEditorComponent, selector: "angular-editor", inputs: ["id", "config", "placeholder", "tabIndex"], outputs: ["html", "viewMode", "blur", "focus"] }, { kind: "pipe", type: i5.KeyValuePipe, name: "keyvalue" }] }); }
|
|
3895
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: HtmlEditorComponent, selector: "BBSF-HtmlEditor", inputs: { group: "group", options: "options" }, outputs: { OnChange: "OnChange" }, ngImport: i0, template: "<div class=\"form-group bbsf-control bbsf-htmleditor\" [formGroup]=\"group\">\r\n <div [ngClass]=\"(options.viewType==1)?'bbsf-vertical':'bbsf-horizontal'\">\r\n <!--label-->\r\n <label *ngIf=\"!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 <div *ngIf=\"!options.isReadonly\" class=\"bbsf-input-container\">\r\n <angular-editor (change)=\"onValueChanged()\" id=\"{{options.name}}\"\r\n [class.is-invalid]=\"htmlEditorFormControl.invalid && htmlEditorFormControl.touched\"\r\n class=\"{{options.extraClasses}}\" [dir]=\"textDir\" formControlName=\"{{options.name}}\"\r\n [config]=\"editorConfig\"></angular-editor>\r\n </div>\r\n\r\n <div *ngIf=\"options.isReadonly\"><span class=\"readonly-view\" [innerHTML]=\"options.value\"></span>\r\n\r\n </div>\r\n <div class=\"subtext-container\">\r\n <!-- LabelDescription-->\r\n <div class=\"bbsf-control-desc\" *ngIf=\"options.labelDescription!=null\">{{options.labelDescription}}</div>\r\n <!-- requiredText-->\r\n <div class=\"bbsf-validation\" *ngIf=\"(htmlEditorFormControl.invalid && htmlEditorFormControl.touched)\">\r\n {{getErrorValidation(htmlEditorFormControl.errors|keyvalue)}}\r\n </div>\r\n </div>\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">\r\n {{resetError()}}</div>\r\n </div>", styles: [".angular-editor-toolbar-set:not(:has(>button:not([hidden]))){display:none}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { kind: "directive", type: i7.NativeElementInjectorDirective, selector: "[ngModel], [formControl], [formControlName]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { 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: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i8.AngularEditorComponent, selector: "angular-editor", inputs: ["id", "config", "placeholder", "tabIndex"], outputs: ["html", "viewMode", "blur", "focus"] }, { kind: "pipe", type: i5.KeyValuePipe, name: "keyvalue" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
3931
3896
|
}
|
|
3932
3897
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HtmlEditorComponent, decorators: [{
|
|
3933
3898
|
type: Component,
|
|
3934
|
-
args: [{ selector: 'BBSF-HtmlEditor', template: "<div class=\"form-group bbsf-control bbsf-htmleditor\" [formGroup]=\"group\">\r\n <div [ngClass]=\"(options.viewType==1)?'bbsf-vertical':'bbsf-horizontal'\">\r\n <!--label-->\r\n <label *ngIf=\"!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 <div *ngIf=\"!options.isReadonly\" class=\"bbsf-input-container\">\r\n <angular-editor (change)=\"onValueChanged()\" id=\"{{options.name}}\"\r\n [class.is-invalid]=\"htmlEditorFormControl.invalid && htmlEditorFormControl.touched\"\r\n class=\"{{options.extraClasses}}\" [dir]=\"textDir\" formControlName=\"{{options.name}}\"\r\n [config]=\"editorConfig\"></angular-editor>\r\n </div>\r\n\r\n <div *ngIf=\"options.isReadonly\"><span class=\"readonly-view\" [innerHTML]=\"options.value\"></span>\r\n\r\n </div>\r\n <div class=\"subtext-container\">\r\n <!-- LabelDescription-->\r\n <div class=\"bbsf-control-desc\" *ngIf=\"options.labelDescription!=null\">{{options.labelDescription}}</div>\r\n <!-- requiredText-->\r\n <div class=\"bbsf-validation\" *ngIf=\"(htmlEditorFormControl.invalid && htmlEditorFormControl.touched)\">\r\n {{getErrorValidation(htmlEditorFormControl.errors|keyvalue)}}\r\n </div>\r\n </div>\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">\r\n {{resetError()}}</div>\r\n </div>" }]
|
|
3899
|
+
args: [{ selector: 'BBSF-HtmlEditor', encapsulation: ViewEncapsulation.None, template: "<div class=\"form-group bbsf-control bbsf-htmleditor\" [formGroup]=\"group\">\r\n <div [ngClass]=\"(options.viewType==1)?'bbsf-vertical':'bbsf-horizontal'\">\r\n <!--label-->\r\n <label *ngIf=\"!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 <div *ngIf=\"!options.isReadonly\" class=\"bbsf-input-container\">\r\n <angular-editor (change)=\"onValueChanged()\" id=\"{{options.name}}\"\r\n [class.is-invalid]=\"htmlEditorFormControl.invalid && htmlEditorFormControl.touched\"\r\n class=\"{{options.extraClasses}}\" [dir]=\"textDir\" formControlName=\"{{options.name}}\"\r\n [config]=\"editorConfig\"></angular-editor>\r\n </div>\r\n\r\n <div *ngIf=\"options.isReadonly\"><span class=\"readonly-view\" [innerHTML]=\"options.value\"></span>\r\n\r\n </div>\r\n <div class=\"subtext-container\">\r\n <!-- LabelDescription-->\r\n <div class=\"bbsf-control-desc\" *ngIf=\"options.labelDescription!=null\">{{options.labelDescription}}</div>\r\n <!-- requiredText-->\r\n <div class=\"bbsf-validation\" *ngIf=\"(htmlEditorFormControl.invalid && htmlEditorFormControl.touched)\">\r\n {{getErrorValidation(htmlEditorFormControl.errors|keyvalue)}}\r\n </div>\r\n </div>\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">\r\n {{resetError()}}</div>\r\n </div>", styles: [".angular-editor-toolbar-set:not(:has(>button:not([hidden]))){display:none}\n"] }]
|
|
3935
3900
|
}], ctorParameters: () => [{ type: i0.NgZone }, { type: ControlUtility }, { type: i2.ControlContainer, decorators: [{
|
|
3936
3901
|
type: Optional
|
|
3937
3902
|
}] }, { type: i2.FormGroupDirective }, { type: i3.UtilityService }, { type: i3.ControlValidationService }, { type: GlobalSettings }], propDecorators: { group: [{
|
|
@@ -4785,7 +4750,7 @@ class MultiLingualHtmlEditorComponent {
|
|
|
4785
4750
|
this.controlValidationService = controlValidationService;
|
|
4786
4751
|
this.globalSettings = globalSettings;
|
|
4787
4752
|
this.OnChange = new EventEmitter();
|
|
4788
|
-
this.currentLanguage =
|
|
4753
|
+
this.currentLanguage = '';
|
|
4789
4754
|
this.arabicValidationRules = [];
|
|
4790
4755
|
this.arabicValidationRulesasync = [];
|
|
4791
4756
|
this.englishValidationRules = [];
|
|
@@ -4793,8 +4758,8 @@ class MultiLingualHtmlEditorComponent {
|
|
|
4793
4758
|
this.markAllAsTouched = false;
|
|
4794
4759
|
this.validationRules = [];
|
|
4795
4760
|
this.validationRulesasync = [];
|
|
4796
|
-
this.arabicLetterOnly =
|
|
4797
|
-
this.englishLetterOnly =
|
|
4761
|
+
this.arabicLetterOnly = '';
|
|
4762
|
+
this.englishLetterOnly = '';
|
|
4798
4763
|
this.englishValue = null;
|
|
4799
4764
|
this.arabicValue = null;
|
|
4800
4765
|
this.resetError = () => {
|
|
@@ -4827,10 +4792,9 @@ class MultiLingualHtmlEditorComponent {
|
|
|
4827
4792
|
};
|
|
4828
4793
|
MultiLingualHtmlEditorComponent.controlContainerstatic = this.controlContainer;
|
|
4829
4794
|
}
|
|
4830
|
-
;
|
|
4831
4795
|
getCustomErrorsMassages() {
|
|
4832
|
-
this.arabicLetterOnly = this.utilityService.getResourceValue(
|
|
4833
|
-
this.englishLetterOnly = this.utilityService.getResourceValue(
|
|
4796
|
+
this.arabicLetterOnly = this.utilityService.getResourceValue('ArabicLetterOnly');
|
|
4797
|
+
this.englishLetterOnly = this.utilityService.getResourceValue('EnglishLetterOnly');
|
|
4834
4798
|
}
|
|
4835
4799
|
async ngOnInit() {
|
|
4836
4800
|
if (!this.options.viewType)
|
|
@@ -4861,7 +4825,7 @@ class MultiLingualHtmlEditorComponent {
|
|
|
4861
4825
|
customClasses: [
|
|
4862
4826
|
{
|
|
4863
4827
|
name: 'quote',
|
|
4864
|
-
class: 'quote'
|
|
4828
|
+
class: 'quote'
|
|
4865
4829
|
},
|
|
4866
4830
|
{
|
|
4867
4831
|
name: 'redText',
|
|
@@ -4870,10 +4834,10 @@ class MultiLingualHtmlEditorComponent {
|
|
|
4870
4834
|
{
|
|
4871
4835
|
name: 'titleText',
|
|
4872
4836
|
class: 'titleText',
|
|
4873
|
-
tag: 'h1'
|
|
4874
|
-
}
|
|
4837
|
+
tag: 'h1'
|
|
4838
|
+
}
|
|
4875
4839
|
],
|
|
4876
|
-
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
|
|
4877
4841
|
uploadWithCredentials: false,
|
|
4878
4842
|
sanitize: false,
|
|
4879
4843
|
toolbarPosition: 'top',
|
|
@@ -4903,7 +4867,7 @@ class MultiLingualHtmlEditorComponent {
|
|
|
4903
4867
|
customClasses: [
|
|
4904
4868
|
{
|
|
4905
4869
|
name: 'quote',
|
|
4906
|
-
class: 'quote'
|
|
4870
|
+
class: 'quote'
|
|
4907
4871
|
},
|
|
4908
4872
|
{
|
|
4909
4873
|
name: 'redText',
|
|
@@ -4912,10 +4876,10 @@ class MultiLingualHtmlEditorComponent {
|
|
|
4912
4876
|
{
|
|
4913
4877
|
name: 'titleText',
|
|
4914
4878
|
class: 'titleText',
|
|
4915
|
-
tag: 'h1'
|
|
4916
|
-
}
|
|
4879
|
+
tag: 'h1'
|
|
4880
|
+
}
|
|
4917
4881
|
],
|
|
4918
|
-
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
|
|
4919
4883
|
uploadWithCredentials: false,
|
|
4920
4884
|
sanitize: false,
|
|
4921
4885
|
toolbarPosition: 'top',
|
|
@@ -4957,20 +4921,23 @@ class MultiLingualHtmlEditorComponent {
|
|
|
4957
4921
|
// fontNames: ['Helvetica', 'Arial', 'Arial Black', 'Comic Sans MS', 'Courier New', 'Roboto', 'Times']
|
|
4958
4922
|
// }
|
|
4959
4923
|
this.multilingualHtmlEditorgroup = new FormGroup({});
|
|
4960
|
-
;
|
|
4961
|
-
this.multilingualHtmlEditorgroup.addControl(
|
|
4962
|
-
this.multilingualHtmlEditorgroup.
|
|
4963
|
-
this.
|
|
4964
|
-
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);
|
|
4965
4928
|
this.group.addControl(this.options.name, new FormGroup(this.multilingualHtmlEditorgroup.controls));
|
|
4966
4929
|
this.getCustomErrorsMassages();
|
|
4967
4930
|
switch (this.options.type) {
|
|
4968
4931
|
case InputType.Email:
|
|
4969
4932
|
this.englishValidationRules.push(Validators.compose([
|
|
4970
|
-
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
|
+
})
|
|
4971
4936
|
]));
|
|
4972
4937
|
this.arabicValidationRules.push(Validators.compose([
|
|
4973
|
-
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
|
+
})
|
|
4974
4941
|
]));
|
|
4975
4942
|
break;
|
|
4976
4943
|
case InputType.Number:
|
|
@@ -4994,22 +4961,30 @@ class MultiLingualHtmlEditorComponent {
|
|
|
4994
4961
|
this.englishValidationRules.push(Validators.maxLength(this.options.maxLength));
|
|
4995
4962
|
this.arabicValidationRules.push(Validators.maxLength(this.options.maxLength));
|
|
4996
4963
|
}
|
|
4997
|
-
if (this.options.labelKey != null && this.options.labelKey !=
|
|
4998
|
-
this.options.arabicLabelValue =
|
|
4999
|
-
|
|
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');
|
|
5000
4973
|
}
|
|
5001
4974
|
else {
|
|
5002
|
-
if (this.options.arabicLabelKey != null && this.options.arabicLabelKey !=
|
|
4975
|
+
if (this.options.arabicLabelKey != null && this.options.arabicLabelKey != '')
|
|
5003
4976
|
this.options.arabicLabelValue = this.utilityService.getResourceValue(this.options.arabicLabelKey);
|
|
5004
|
-
if (this.options.englishLabelKey != null && this.options.englishLabelKey !=
|
|
4977
|
+
if (this.options.englishLabelKey != null && this.options.englishLabelKey != '')
|
|
5005
4978
|
this.options.englishLabelValue = this.utilityService.getResourceValue(this.options.englishLabelKey);
|
|
5006
4979
|
}
|
|
5007
4980
|
this.showInputUsingLanguageMode();
|
|
5008
4981
|
this.arabicValidationRules.push(Validators.compose([
|
|
5009
|
-
this.controlUtility.patternValidator(/^[\u0621-\u064A\u0660-\u0669 ]+$/, {
|
|
4982
|
+
this.controlUtility.patternValidator(/^[\u0621-\u064A\u0660-\u0669 ]+$/, {
|
|
4983
|
+
ArabicLetterOnly: this.arabicLetterOnly
|
|
4984
|
+
})
|
|
5010
4985
|
]));
|
|
5011
4986
|
this.englishValidationRules.push(Validators.compose([
|
|
5012
|
-
this.controlUtility.patternValidator(/^[~`!@#$%^&*()‘’“”_+=[\]\\{}|;':",.\/<>?a-zA-Z0-9- ]*$/, { EnglishLetterOnly: this.englishLetterOnly })
|
|
4987
|
+
this.controlUtility.patternValidator(/^[~`!@#$%^&*()‘’“”_+=[\]\\{}|;':",.\/<>?a-zA-Z0-9- ]*$/, { EnglishLetterOnly: this.englishLetterOnly })
|
|
5013
4988
|
]));
|
|
5014
4989
|
// this.arabicHtmlEditorFormControl.setValidators(this.ArabicValidationRules);
|
|
5015
4990
|
// this.arabicHtmlEditorFormControl.setAsyncValidators(this.ArabicValidationRulesasync);
|
|
@@ -5027,48 +5002,62 @@ class MultiLingualHtmlEditorComponent {
|
|
|
5027
5002
|
});
|
|
5028
5003
|
}
|
|
5029
5004
|
ngAfterViewChecked() {
|
|
5030
|
-
let dir = this.utilityService.getCurrentLanguage() ==
|
|
5031
|
-
var angularEditor = document.getElementsByClassName(
|
|
5005
|
+
let dir = this.utilityService.getCurrentLanguage() == 'en' ? 'ltr' : 'rtl';
|
|
5006
|
+
var angularEditor = document.getElementsByClassName('angular-editor-toolbar ng-star-inserted');
|
|
5032
5007
|
for (let index = 0; index < angularEditor.length; index++) {
|
|
5033
5008
|
const element = angularEditor[index];
|
|
5034
|
-
element.setAttribute(
|
|
5009
|
+
element.setAttribute('dir', dir);
|
|
5035
5010
|
}
|
|
5036
5011
|
}
|
|
5037
5012
|
onTextChange(type) {
|
|
5038
|
-
if (type ==
|
|
5039
|
-
this.multilingualHtmlEditorgroup.controls[
|
|
5040
|
-
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;
|
|
5041
5019
|
if (this.englishValue) {
|
|
5042
5020
|
this.englishHtmlEditorFormControl.setValue(this.englishValue);
|
|
5043
5021
|
let originalValue = this.englishValue;
|
|
5044
|
-
if (this.options.patchFunction &&
|
|
5022
|
+
if (this.options.patchFunction &&
|
|
5023
|
+
this.options.patchPath &&
|
|
5024
|
+
this.englishHtmlEditorFormControl.valid) {
|
|
5045
5025
|
this.controlUtility.patchControlValue(originalValue, this.options.patchFunction, this.options.patchPath);
|
|
5046
5026
|
}
|
|
5047
5027
|
}
|
|
5048
|
-
let EngliswordCountArray = this.englishHtmlEditorFormControl.value.split(
|
|
5028
|
+
let EngliswordCountArray = this.englishHtmlEditorFormControl.value.split(' ').length;
|
|
5049
5029
|
if (EngliswordCountArray > 0) {
|
|
5050
5030
|
if (EngliswordCountArray > this.options.maxWordCount)
|
|
5051
|
-
this.multilingualHtmlEditorgroup.controls[
|
|
5052
|
-
|
|
5053
|
-
|
|
5031
|
+
this.multilingualHtmlEditorgroup.controls['English'].setErrors({
|
|
5032
|
+
MaxWordCountValidationKey: this.options.maxWordCount
|
|
5033
|
+
});
|
|
5034
|
+
this.multilingualHtmlEditorgroup.controls['English'].markAsTouched();
|
|
5035
|
+
this.multilingualHtmlEditorgroup.controls['English'].invalid;
|
|
5054
5036
|
}
|
|
5055
5037
|
}
|
|
5056
|
-
if (type ==
|
|
5057
|
-
this.multilingualHtmlEditorgroup.controls[
|
|
5058
|
-
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;
|
|
5059
5044
|
if (this.arabicValue) {
|
|
5060
5045
|
this.arabicHtmlEditorFormControl.setValue(this.arabicValue);
|
|
5061
5046
|
let originalValue = this.arabicValue;
|
|
5062
|
-
if (this.options.patchFunction &&
|
|
5047
|
+
if (this.options.patchFunction &&
|
|
5048
|
+
this.options.patchPath &&
|
|
5049
|
+
this.arabicHtmlEditorFormControl.valid) {
|
|
5063
5050
|
this.controlUtility.patchControlValue(originalValue, this.options.patchFunction, this.options.patchPath);
|
|
5064
5051
|
}
|
|
5065
5052
|
}
|
|
5066
|
-
let ArabicwordCountArray = this.arabicHtmlEditorFormControl.value.split(
|
|
5053
|
+
let ArabicwordCountArray = this.arabicHtmlEditorFormControl.value.split(' ').length;
|
|
5067
5054
|
if (ArabicwordCountArray > 0) {
|
|
5068
5055
|
if (ArabicwordCountArray > this.options.maxWordCount)
|
|
5069
|
-
this.multilingualHtmlEditorgroup.controls[
|
|
5070
|
-
|
|
5071
|
-
|
|
5056
|
+
this.multilingualHtmlEditorgroup.controls['Arabic'].setErrors({
|
|
5057
|
+
MaxWordCountValidationKey: this.options.maxWordCount
|
|
5058
|
+
});
|
|
5059
|
+
this.multilingualHtmlEditorgroup.controls['Arabic'].markAsTouched();
|
|
5060
|
+
this.multilingualHtmlEditorgroup.controls['Arabic'].invalid;
|
|
5072
5061
|
}
|
|
5073
5062
|
}
|
|
5074
5063
|
let mulitLangModel = new EnglishArabicDTO();
|
|
@@ -5091,8 +5080,8 @@ class MultiLingualHtmlEditorComponent {
|
|
|
5091
5080
|
return this.controlUtility.getErrorValidationMassage(ErrorList, this.group, this.options);
|
|
5092
5081
|
}
|
|
5093
5082
|
showInputUsingLanguageMode() {
|
|
5094
|
-
this.arabicValidationRules = this.arabicValidationRules.filter(item => item !== Validators.required);
|
|
5095
|
-
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);
|
|
5096
5085
|
this.arabicHtmlEditorFormControl.clearValidators();
|
|
5097
5086
|
this.englishHtmlEditorFormControl.clearValidators();
|
|
5098
5087
|
this.arabicHtmlEditorFormControl.updateValueAndValidity();
|
|
@@ -8900,15 +8889,15 @@ class RepeaterFieldBuilderComponent {
|
|
|
8900
8889
|
this.itemsValue = [];
|
|
8901
8890
|
this.itemValue = null;
|
|
8902
8891
|
}
|
|
8903
|
-
ngOnInit() {
|
|
8904
|
-
}
|
|
8892
|
+
ngOnInit() { }
|
|
8905
8893
|
ngAfterViewInit() {
|
|
8906
8894
|
setTimeout(() => {
|
|
8907
8895
|
if (this.itemsValue.length > 0)
|
|
8908
8896
|
this.itemValue = this.itemsValue[this.itemNumber];
|
|
8909
8897
|
if (this.itemValue) {
|
|
8910
8898
|
for (const key in this.itemValue) {
|
|
8911
|
-
if (Object.prototype.hasOwnProperty.call(this.itemValue, key) &&
|
|
8899
|
+
if (Object.prototype.hasOwnProperty.call(this.itemValue, key) &&
|
|
8900
|
+
key == this.repeaterField.controlOptions.name) {
|
|
8912
8901
|
const element = this.itemValue[key];
|
|
8913
8902
|
this.value = element;
|
|
8914
8903
|
}
|
|
@@ -8919,12 +8908,19 @@ class RepeaterFieldBuilderComponent {
|
|
|
8919
8908
|
//#region TextBox
|
|
8920
8909
|
case DataType.Text:
|
|
8921
8910
|
let Text = new TextBoxOptions();
|
|
8922
|
-
Text.name =
|
|
8911
|
+
Text.name =
|
|
8912
|
+
this.repeaterField.controlOptions.name +
|
|
8913
|
+
'.' +
|
|
8914
|
+
this.itemNumber.toString() +
|
|
8915
|
+
'.' +
|
|
8916
|
+
this.controlNumber.toString();
|
|
8923
8917
|
Text.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
8924
8918
|
Text.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
8925
8919
|
Text.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
8926
8920
|
Text.viewType = this.repeaterField.controlOptions.viewType;
|
|
8927
|
-
Text.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
8921
|
+
Text.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
8922
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
8923
|
+
: '';
|
|
8928
8924
|
Text.type = InputType.Text;
|
|
8929
8925
|
Text.languageValidation = this.repeaterField.controlOptions.languageValidation;
|
|
8930
8926
|
if (this.repeaterField.controlOptions.maxLength)
|
|
@@ -8933,47 +8929,77 @@ class RepeaterFieldBuilderComponent {
|
|
|
8933
8929
|
Text.minLength = this.repeaterField.controlOptions.minLength;
|
|
8934
8930
|
Text.value = this.value;
|
|
8935
8931
|
Text.isReadonly = this.repeaterField.controlOptions.isReadonly;
|
|
8932
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
8933
|
+
Text.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
8934
|
+
}
|
|
8936
8935
|
this.renderComponentService.renderDynamicComponent(this.item, TextboxComponent, this.group, Text);
|
|
8937
8936
|
break;
|
|
8938
8937
|
case DataType.Name:
|
|
8939
8938
|
let name = new TextBoxOptions();
|
|
8940
|
-
name.name =
|
|
8939
|
+
name.name =
|
|
8940
|
+
this.repeaterField.controlOptions.name +
|
|
8941
|
+
'.' +
|
|
8942
|
+
this.itemNumber.toString() +
|
|
8943
|
+
'.' +
|
|
8944
|
+
this.controlNumber.toString();
|
|
8941
8945
|
name.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
8942
8946
|
name.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
8943
8947
|
name.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
8944
8948
|
name.viewType = this.repeaterField.controlOptions.viewType;
|
|
8945
8949
|
name.languageValidation = this.repeaterField.controlOptions.languageValidation;
|
|
8946
|
-
name.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
8950
|
+
name.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
8951
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
8952
|
+
: '';
|
|
8947
8953
|
if (this.repeaterField.controlOptions.maxLength)
|
|
8948
8954
|
name.maxLength = this.repeaterField.controlOptions.maxLength;
|
|
8949
8955
|
if (this.repeaterField.controlOptions.minLength)
|
|
8950
8956
|
name.minLength = this.repeaterField.controlOptions.minLength;
|
|
8951
8957
|
name.type = InputType.Text;
|
|
8952
8958
|
name.value = this.value;
|
|
8959
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
8960
|
+
name.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
8961
|
+
}
|
|
8953
8962
|
this.renderComponentService.renderDynamicComponent(this.item, TextboxComponent, this.group, name);
|
|
8954
8963
|
break;
|
|
8955
8964
|
case DataType.Email:
|
|
8956
8965
|
let email = new TextBoxOptions();
|
|
8957
|
-
email.name =
|
|
8966
|
+
email.name =
|
|
8967
|
+
this.repeaterField.controlOptions.name +
|
|
8968
|
+
'.' +
|
|
8969
|
+
this.itemNumber.toString() +
|
|
8970
|
+
'.' +
|
|
8971
|
+
this.controlNumber.toString();
|
|
8958
8972
|
email.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
8959
8973
|
email.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
8960
8974
|
email.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
8961
8975
|
email.viewType = this.repeaterField.controlOptions.viewType;
|
|
8962
8976
|
email.languageValidation = this.repeaterField.controlOptions.languageValidation;
|
|
8963
|
-
email.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
8977
|
+
email.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
8978
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
8979
|
+
: '';
|
|
8964
8980
|
email.type = InputType.Email;
|
|
8965
8981
|
email.value = this.value;
|
|
8982
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
8983
|
+
email.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
8984
|
+
}
|
|
8966
8985
|
this.renderComponentService.renderDynamicComponent(this.item, TextboxComponent, this.group, email);
|
|
8967
8986
|
break;
|
|
8968
8987
|
case DataType.Number:
|
|
8969
8988
|
let number = new TextBoxOptions();
|
|
8970
|
-
number.name =
|
|
8989
|
+
number.name =
|
|
8990
|
+
this.repeaterField.controlOptions.name +
|
|
8991
|
+
'.' +
|
|
8992
|
+
this.itemNumber.toString() +
|
|
8993
|
+
'.' +
|
|
8994
|
+
this.controlNumber.toString();
|
|
8971
8995
|
number.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
8972
8996
|
number.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
8973
8997
|
number.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
8974
8998
|
number.viewType = this.repeaterField.controlOptions.viewType;
|
|
8975
8999
|
number.languageValidation = this.repeaterField.controlOptions.languageValidation;
|
|
8976
|
-
number.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9000
|
+
number.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9001
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9002
|
+
: '';
|
|
8977
9003
|
number.type = InputType.Number;
|
|
8978
9004
|
let rangeNumber = new RangeNumber();
|
|
8979
9005
|
if (this.repeaterField.controlOptions.numberRange) {
|
|
@@ -8983,228 +9009,378 @@ class RepeaterFieldBuilderComponent {
|
|
|
8983
9009
|
number.numberRange = rangeNumber;
|
|
8984
9010
|
number.value = this.value;
|
|
8985
9011
|
number.isReadonly = this.repeaterField.controlOptions.isReadonly;
|
|
9012
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9013
|
+
number.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9014
|
+
}
|
|
8986
9015
|
this.renderComponentService.renderDynamicComponent(this.item, TextboxComponent, this.group, number);
|
|
8987
9016
|
break;
|
|
8988
9017
|
//#endregion
|
|
8989
9018
|
//#region DateTime
|
|
8990
9019
|
case DataType.Date:
|
|
8991
9020
|
let date = new DatePickerOptions();
|
|
8992
|
-
date.name =
|
|
9021
|
+
date.name =
|
|
9022
|
+
this.repeaterField.controlOptions.name +
|
|
9023
|
+
'.' +
|
|
9024
|
+
this.itemNumber.toString() +
|
|
9025
|
+
'.' +
|
|
9026
|
+
this.controlNumber.toString();
|
|
8993
9027
|
date.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
8994
9028
|
date.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
8995
9029
|
date.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
8996
9030
|
date.viewType = this.repeaterField.controlOptions.viewType;
|
|
8997
|
-
date.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9031
|
+
date.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9032
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9033
|
+
: '';
|
|
8998
9034
|
date.pickerType = PickerType.Calendar;
|
|
8999
9035
|
date.selectMode = SelectMode.Single;
|
|
9000
9036
|
date.startView = StartView.Month;
|
|
9001
9037
|
date.value = this.value;
|
|
9038
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9039
|
+
date.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9040
|
+
}
|
|
9002
9041
|
this.renderComponentService.renderDynamicComponent(this.item, DateInputComponent, this.group, date);
|
|
9003
9042
|
break;
|
|
9004
9043
|
case DataType.DateTime:
|
|
9005
9044
|
let dateTime = new DatePickerOptions();
|
|
9006
|
-
dateTime.name =
|
|
9045
|
+
dateTime.name =
|
|
9046
|
+
this.repeaterField.controlOptions.name +
|
|
9047
|
+
'.' +
|
|
9048
|
+
this.itemNumber.toString() +
|
|
9049
|
+
'.' +
|
|
9050
|
+
this.controlNumber.toString();
|
|
9007
9051
|
dateTime.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9008
9052
|
dateTime.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9009
9053
|
dateTime.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9010
9054
|
dateTime.viewType = this.repeaterField.controlOptions.viewType;
|
|
9011
|
-
dateTime.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9055
|
+
dateTime.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9056
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9057
|
+
: '';
|
|
9012
9058
|
dateTime.pickerType = PickerType.Both;
|
|
9013
9059
|
dateTime.selectMode = SelectMode.Single;
|
|
9014
9060
|
dateTime.startView = StartView.Month;
|
|
9015
9061
|
dateTime.value = this.value;
|
|
9062
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9063
|
+
dateTime.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9064
|
+
}
|
|
9016
9065
|
this.renderComponentService.renderDynamicComponent(this.item, DateInputComponent, this.group, dateTime);
|
|
9017
9066
|
break;
|
|
9018
9067
|
case DataType.Time:
|
|
9019
9068
|
let time = new DatePickerOptions();
|
|
9020
|
-
time.name =
|
|
9069
|
+
time.name =
|
|
9070
|
+
this.repeaterField.controlOptions.name +
|
|
9071
|
+
'.' +
|
|
9072
|
+
this.itemNumber.toString() +
|
|
9073
|
+
'.' +
|
|
9074
|
+
this.controlNumber.toString();
|
|
9021
9075
|
time.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9022
9076
|
time.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9023
9077
|
time.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9024
9078
|
time.viewType = this.repeaterField.controlOptions.viewType;
|
|
9025
|
-
time.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9079
|
+
time.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9080
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9081
|
+
: '';
|
|
9026
9082
|
time.pickerType = PickerType.Timer;
|
|
9027
9083
|
time.selectMode = SelectMode.Single;
|
|
9028
9084
|
time.startView = StartView.Month;
|
|
9029
9085
|
time.value = this.value;
|
|
9086
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9087
|
+
time.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9088
|
+
}
|
|
9030
9089
|
this.renderComponentService.renderDynamicComponent(this.item, DateInputComponent, this.group, time);
|
|
9031
9090
|
break;
|
|
9032
9091
|
//#endregion
|
|
9033
9092
|
//#region Dropdown
|
|
9034
9093
|
case DataType.SingleSelect:
|
|
9035
9094
|
let singleSelect = new DropdownOptions();
|
|
9036
|
-
singleSelect.name =
|
|
9095
|
+
singleSelect.name =
|
|
9096
|
+
this.repeaterField.controlOptions.name +
|
|
9097
|
+
'.' +
|
|
9098
|
+
this.itemNumber.toString() +
|
|
9099
|
+
'.' +
|
|
9100
|
+
this.controlNumber.toString();
|
|
9037
9101
|
singleSelect.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9038
9102
|
singleSelect.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9039
9103
|
singleSelect.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9040
9104
|
singleSelect.viewType = this.repeaterField.controlOptions.viewType;
|
|
9041
|
-
singleSelect.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9105
|
+
singleSelect.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9106
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9107
|
+
: '';
|
|
9042
9108
|
singleSelect.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
9043
9109
|
singleSelect.singleSelection = true;
|
|
9044
9110
|
singleSelect.showCheckbox = false;
|
|
9045
9111
|
singleSelect.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
9046
9112
|
singleSelect.selectedItems = this.value;
|
|
9113
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9114
|
+
singleSelect.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9115
|
+
}
|
|
9047
9116
|
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, singleSelect);
|
|
9048
9117
|
break;
|
|
9049
9118
|
case DataType.MulipleSelect:
|
|
9050
9119
|
let mulipleSelect = new DropdownOptions();
|
|
9051
|
-
mulipleSelect.name =
|
|
9120
|
+
mulipleSelect.name =
|
|
9121
|
+
this.repeaterField.controlOptions.name +
|
|
9122
|
+
'.' +
|
|
9123
|
+
this.itemNumber.toString() +
|
|
9124
|
+
'.' +
|
|
9125
|
+
this.controlNumber.toString();
|
|
9052
9126
|
mulipleSelect.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9053
9127
|
mulipleSelect.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9054
9128
|
mulipleSelect.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9055
9129
|
mulipleSelect.viewType = this.repeaterField.controlOptions.viewType;
|
|
9056
|
-
mulipleSelect.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9130
|
+
mulipleSelect.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9131
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9132
|
+
: '';
|
|
9057
9133
|
mulipleSelect.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
9058
9134
|
mulipleSelect.singleSelection = false;
|
|
9059
9135
|
mulipleSelect.showCheckbox = false;
|
|
9060
9136
|
mulipleSelect.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
9061
9137
|
mulipleSelect.selectedItems = this.value;
|
|
9138
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9139
|
+
mulipleSelect.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9140
|
+
}
|
|
9062
9141
|
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, mulipleSelect);
|
|
9063
9142
|
break;
|
|
9064
9143
|
case DataType.Goal:
|
|
9065
9144
|
let goal = new DropdownOptions();
|
|
9066
|
-
goal.name =
|
|
9145
|
+
goal.name =
|
|
9146
|
+
this.repeaterField.controlOptions.name +
|
|
9147
|
+
'.' +
|
|
9148
|
+
this.itemNumber.toString() +
|
|
9149
|
+
'.' +
|
|
9150
|
+
this.controlNumber.toString();
|
|
9067
9151
|
goal.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9068
9152
|
goal.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9069
9153
|
goal.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9070
9154
|
goal.viewType = this.repeaterField.controlOptions.viewType;
|
|
9071
|
-
goal.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9155
|
+
goal.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9156
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9157
|
+
: '';
|
|
9072
9158
|
goal.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
9073
9159
|
goal.singleSelection = !this.repeaterField.controlOptions.isMultiple;
|
|
9074
9160
|
goal.showCheckbox = false;
|
|
9075
9161
|
goal.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
9076
9162
|
goal.selectedItems = this.value;
|
|
9163
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9164
|
+
goal.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9165
|
+
}
|
|
9077
9166
|
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, goal);
|
|
9078
9167
|
break;
|
|
9079
9168
|
case DataType.Challenge:
|
|
9080
9169
|
let challenge = new DropdownOptions();
|
|
9081
|
-
challenge.name =
|
|
9170
|
+
challenge.name =
|
|
9171
|
+
this.repeaterField.controlOptions.name +
|
|
9172
|
+
'.' +
|
|
9173
|
+
this.itemNumber.toString() +
|
|
9174
|
+
'.' +
|
|
9175
|
+
this.controlNumber.toString();
|
|
9082
9176
|
challenge.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9083
9177
|
challenge.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9084
9178
|
challenge.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9085
9179
|
challenge.viewType = this.repeaterField.controlOptions.viewType;
|
|
9086
|
-
challenge.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9180
|
+
challenge.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9181
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9182
|
+
: '';
|
|
9087
9183
|
challenge.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
9088
9184
|
challenge.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
9089
9185
|
challenge.singleSelection = !this.repeaterField.controlOptions.isMultiple;
|
|
9090
9186
|
challenge.showCheckbox = false;
|
|
9091
9187
|
challenge.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
9092
9188
|
challenge.selectedItems = this.value;
|
|
9189
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9190
|
+
challenge.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9191
|
+
}
|
|
9093
9192
|
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, challenge);
|
|
9094
9193
|
break;
|
|
9095
9194
|
case DataType.InnovationLab:
|
|
9096
9195
|
let innovationLab = new DropdownOptions();
|
|
9097
|
-
innovationLab.name =
|
|
9196
|
+
innovationLab.name =
|
|
9197
|
+
this.repeaterField.controlOptions.name +
|
|
9198
|
+
'.' +
|
|
9199
|
+
this.itemNumber.toString() +
|
|
9200
|
+
'.' +
|
|
9201
|
+
this.controlNumber.toString();
|
|
9098
9202
|
innovationLab.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9099
9203
|
innovationLab.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9100
9204
|
innovationLab.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9101
9205
|
innovationLab.viewType = this.repeaterField.controlOptions.viewType;
|
|
9102
|
-
innovationLab.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9206
|
+
innovationLab.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9207
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9208
|
+
: '';
|
|
9103
9209
|
innovationLab.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
9104
9210
|
innovationLab.singleSelection = !this.repeaterField.controlOptions.isMultiple;
|
|
9105
9211
|
innovationLab.showCheckbox = false;
|
|
9106
9212
|
innovationLab.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
9107
9213
|
innovationLab.selectedItems = this.value;
|
|
9214
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9215
|
+
innovationLab.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9216
|
+
}
|
|
9108
9217
|
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, innovationLab);
|
|
9109
9218
|
break;
|
|
9110
9219
|
case DataType.Country:
|
|
9111
9220
|
let country = new DropdownOptions();
|
|
9112
|
-
country.name =
|
|
9221
|
+
country.name =
|
|
9222
|
+
this.repeaterField.controlOptions.name +
|
|
9223
|
+
'.' +
|
|
9224
|
+
this.itemNumber.toString() +
|
|
9225
|
+
'.' +
|
|
9226
|
+
this.controlNumber.toString();
|
|
9113
9227
|
country.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9114
9228
|
country.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9115
9229
|
country.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9116
9230
|
country.viewType = this.repeaterField.controlOptions.viewType;
|
|
9117
|
-
country.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9231
|
+
country.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9232
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9233
|
+
: '';
|
|
9118
9234
|
country.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
9119
9235
|
country.singleSelection = !this.repeaterField.controlOptions.isMultiple;
|
|
9120
9236
|
country.showCheckbox = false;
|
|
9121
9237
|
country.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
9122
9238
|
country.selectedItems = this.value;
|
|
9239
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9240
|
+
country.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9241
|
+
}
|
|
9123
9242
|
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, country);
|
|
9124
9243
|
break;
|
|
9125
9244
|
//#endregion
|
|
9126
9245
|
//#region FileUpload
|
|
9127
9246
|
case DataType.File:
|
|
9128
9247
|
let file = new FileUploadOptions();
|
|
9129
|
-
file.name =
|
|
9248
|
+
file.name =
|
|
9249
|
+
this.repeaterField.controlOptions.name +
|
|
9250
|
+
'.' +
|
|
9251
|
+
this.itemNumber.toString() +
|
|
9252
|
+
'.' +
|
|
9253
|
+
this.controlNumber.toString();
|
|
9130
9254
|
file.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9131
9255
|
file.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9132
9256
|
file.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9133
9257
|
file.viewType = this.repeaterField.controlOptions.viewType;
|
|
9134
|
-
file.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9258
|
+
file.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9259
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9260
|
+
: '';
|
|
9135
9261
|
file.fileMaxSizeInMB = this.repeaterField.controlOptions.maxFileSizeInMB;
|
|
9136
9262
|
file.value = this.value;
|
|
9263
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9264
|
+
file.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9265
|
+
}
|
|
9137
9266
|
this.renderComponentService.renderDynamicComponent(this.item, FileUploadComponent, this.group, file);
|
|
9138
9267
|
break;
|
|
9139
9268
|
case DataType.MultiFile:
|
|
9140
9269
|
let multiFile = new FileUploadOptions();
|
|
9141
|
-
file.name =
|
|
9270
|
+
file.name =
|
|
9271
|
+
this.repeaterField.controlOptions.name +
|
|
9272
|
+
'.' +
|
|
9273
|
+
this.itemNumber.toString() +
|
|
9274
|
+
'.' +
|
|
9275
|
+
this.controlNumber.toString();
|
|
9142
9276
|
file.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9143
9277
|
file.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9144
9278
|
file.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9145
9279
|
file.viewType = this.repeaterField.controlOptions.viewType;
|
|
9146
|
-
file.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9280
|
+
file.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9281
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9282
|
+
: '';
|
|
9147
9283
|
multiFile.maxSizeForAllFilesInMB = this.repeaterField.controlOptions.maxFileSizeInMB;
|
|
9148
9284
|
multiFile.maxNoOfFiles = this.repeaterField.controlOptions.maxFileCount;
|
|
9149
9285
|
multiFile.isMultipleFile = true;
|
|
9150
9286
|
multiFile.value = this.value;
|
|
9287
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9288
|
+
multiFile.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9289
|
+
}
|
|
9151
9290
|
this.renderComponentService.renderDynamicComponent(this.item, FileUploadComponent, this.group, multiFile);
|
|
9152
9291
|
break;
|
|
9153
9292
|
//#endregion
|
|
9154
9293
|
//#region ImageUpload
|
|
9155
9294
|
case DataType.Image:
|
|
9156
9295
|
let image = new ImageUploadOptions();
|
|
9157
|
-
image.name =
|
|
9296
|
+
image.name =
|
|
9297
|
+
this.repeaterField.controlOptions.name +
|
|
9298
|
+
'.' +
|
|
9299
|
+
this.itemNumber.toString() +
|
|
9300
|
+
'.' +
|
|
9301
|
+
this.controlNumber.toString();
|
|
9158
9302
|
image.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9159
9303
|
image.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9160
9304
|
image.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9161
9305
|
image.viewType = this.repeaterField.controlOptions.viewType;
|
|
9162
|
-
image.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9306
|
+
image.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9307
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9308
|
+
: '';
|
|
9163
9309
|
if (this.repeaterField.controlOptions.maxFileSizeInMB)
|
|
9164
9310
|
image.fileMaxSizeInMB = this.repeaterField.controlOptions.maxFileSizeInMB;
|
|
9165
9311
|
image.value = this.value;
|
|
9312
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9313
|
+
image.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9314
|
+
}
|
|
9166
9315
|
this.renderComponentService.renderDynamicComponent(this.item, ImageUploaderComponent, this.group, image);
|
|
9167
9316
|
break;
|
|
9168
9317
|
case DataType.CoverPhoto:
|
|
9169
9318
|
let coverPhoto = new ImageUploadOptions();
|
|
9170
|
-
coverPhoto.name =
|
|
9319
|
+
coverPhoto.name =
|
|
9320
|
+
this.repeaterField.controlOptions.name +
|
|
9321
|
+
'.' +
|
|
9322
|
+
this.itemNumber.toString() +
|
|
9323
|
+
'.' +
|
|
9324
|
+
this.controlNumber.toString();
|
|
9171
9325
|
coverPhoto.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9172
9326
|
coverPhoto.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9173
9327
|
coverPhoto.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9174
9328
|
coverPhoto.viewType = this.repeaterField.controlOptions.viewType;
|
|
9175
|
-
coverPhoto.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9329
|
+
coverPhoto.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9330
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9331
|
+
: '';
|
|
9176
9332
|
if (this.repeaterField.controlOptions.maxFileSizeInMB)
|
|
9177
9333
|
coverPhoto.fileMaxSizeInMB = this.repeaterField.controlOptions.maxFileSizeInMB;
|
|
9178
9334
|
coverPhoto.value = this.value;
|
|
9335
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9336
|
+
coverPhoto.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9337
|
+
}
|
|
9179
9338
|
this.renderComponentService.renderDynamicComponent(this.item, ImageUploaderComponent, this.group, coverPhoto);
|
|
9180
9339
|
break;
|
|
9181
9340
|
//#endregion
|
|
9182
9341
|
//#region Mobile
|
|
9183
9342
|
case DataType.Mobile:
|
|
9184
9343
|
let mobile = new PhoneOptions();
|
|
9185
|
-
mobile.name =
|
|
9344
|
+
mobile.name =
|
|
9345
|
+
this.repeaterField.controlOptions.name +
|
|
9346
|
+
'.' +
|
|
9347
|
+
this.itemNumber.toString() +
|
|
9348
|
+
'.' +
|
|
9349
|
+
this.controlNumber.toString();
|
|
9186
9350
|
mobile.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9187
9351
|
mobile.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9188
9352
|
mobile.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9189
9353
|
mobile.viewType = this.repeaterField.controlOptions.viewType;
|
|
9190
|
-
mobile.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9354
|
+
mobile.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9355
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9356
|
+
: '';
|
|
9191
9357
|
mobile.allowSearch = true;
|
|
9192
9358
|
mobile.phoneValidation = true;
|
|
9193
9359
|
mobile.selectFirstCountry = true;
|
|
9194
9360
|
mobile.enablePlaceholder = true;
|
|
9195
9361
|
mobile.value = this.value;
|
|
9362
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9363
|
+
mobile.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9364
|
+
}
|
|
9196
9365
|
this.renderComponentService.renderDynamicComponent(this.item, PhoneComponent, this.group, mobile);
|
|
9197
9366
|
break;
|
|
9198
9367
|
//#endregion
|
|
9199
9368
|
//#region MultilineText
|
|
9200
9369
|
case DataType.MultilineText:
|
|
9201
9370
|
let multilineText = new TextAreaOptions();
|
|
9202
|
-
multilineText.name =
|
|
9371
|
+
multilineText.name =
|
|
9372
|
+
this.repeaterField.controlOptions.name +
|
|
9373
|
+
'.' +
|
|
9374
|
+
this.itemNumber.toString() +
|
|
9375
|
+
'.' +
|
|
9376
|
+
this.controlNumber.toString();
|
|
9203
9377
|
multilineText.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9204
9378
|
multilineText.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9205
9379
|
multilineText.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9206
9380
|
multilineText.viewType = this.repeaterField.controlOptions.viewType;
|
|
9207
|
-
multilineText.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9381
|
+
multilineText.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9382
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9383
|
+
: '';
|
|
9208
9384
|
if (this.repeaterField.controlOptions.maxLength)
|
|
9209
9385
|
multilineText.maxLength = this.repeaterField.controlOptions.maxLength;
|
|
9210
9386
|
if (this.repeaterField.controlOptions.minLength)
|
|
@@ -9212,63 +9388,106 @@ class RepeaterFieldBuilderComponent {
|
|
|
9212
9388
|
multilineText.rows = this.repeaterField.controlOptions.rows;
|
|
9213
9389
|
multilineText.forceDirection = this.repeaterField.controlOptions.forceDirection;
|
|
9214
9390
|
multilineText.value = this.value;
|
|
9391
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9392
|
+
multilineText.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9393
|
+
}
|
|
9215
9394
|
this.renderComponentService.renderDynamicComponent(this.item, TextAreaComponent, this.group, multilineText);
|
|
9216
9395
|
break;
|
|
9217
9396
|
//#endregion
|
|
9218
9397
|
//#region HTML
|
|
9219
9398
|
case DataType.HTML:
|
|
9220
|
-
let
|
|
9221
|
-
|
|
9222
|
-
|
|
9223
|
-
|
|
9224
|
-
|
|
9225
|
-
|
|
9226
|
-
|
|
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
|
+
: '';
|
|
9227
9413
|
if (this.repeaterField.controlOptions.maxLength)
|
|
9228
|
-
|
|
9414
|
+
html.maxLength = this.repeaterField.controlOptions.maxLength;
|
|
9229
9415
|
if (this.repeaterField.controlOptions.minLength)
|
|
9230
|
-
|
|
9231
|
-
|
|
9232
|
-
|
|
9233
|
-
|
|
9234
|
-
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);
|
|
9235
9424
|
break;
|
|
9236
9425
|
//#endregion
|
|
9237
9426
|
//#region Boolean
|
|
9238
9427
|
case DataType.Boolean:
|
|
9239
9428
|
let boolean = new ToggleSlideOptions();
|
|
9240
|
-
boolean.name =
|
|
9429
|
+
boolean.name =
|
|
9430
|
+
this.repeaterField.controlOptions.name +
|
|
9431
|
+
'.' +
|
|
9432
|
+
this.itemNumber.toString() +
|
|
9433
|
+
'.' +
|
|
9434
|
+
this.controlNumber.toString();
|
|
9241
9435
|
boolean.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9242
9436
|
boolean.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9243
9437
|
boolean.viewType = this.repeaterField.controlOptions.viewType;
|
|
9244
9438
|
boolean.value = this.value;
|
|
9245
|
-
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
|
+
}
|
|
9246
9445
|
this.renderComponentService.renderDynamicComponent(this.item, ToggleslideComponent, this.group, boolean);
|
|
9247
9446
|
break;
|
|
9248
9447
|
//#endregion
|
|
9249
9448
|
//#region Location
|
|
9250
9449
|
case DataType.Location:
|
|
9251
9450
|
let location = new MapAutoCompleteOptions();
|
|
9252
|
-
location.name =
|
|
9451
|
+
location.name =
|
|
9452
|
+
this.repeaterField.controlOptions.name +
|
|
9453
|
+
'.' +
|
|
9454
|
+
this.itemNumber.toString() +
|
|
9455
|
+
'.' +
|
|
9456
|
+
this.controlNumber.toString();
|
|
9253
9457
|
location.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9254
9458
|
location.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9255
9459
|
location.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9256
9460
|
location.viewType = this.repeaterField.controlOptions.viewType;
|
|
9257
9461
|
location.value = this.value;
|
|
9258
|
-
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
|
+
}
|
|
9259
9468
|
this.renderComponentService.renderDynamicComponent(this.item, MapAutoCompleteComponent, this.group, location);
|
|
9260
9469
|
break;
|
|
9261
9470
|
//#endregion
|
|
9262
9471
|
//#region CheckBox
|
|
9263
9472
|
case DataType.CheckBox:
|
|
9264
9473
|
let checkBox = new CheckBoxOptions();
|
|
9265
|
-
checkBox.name =
|
|
9474
|
+
checkBox.name =
|
|
9475
|
+
this.repeaterField.controlOptions.name +
|
|
9476
|
+
'.' +
|
|
9477
|
+
this.itemNumber.toString() +
|
|
9478
|
+
'.' +
|
|
9479
|
+
this.controlNumber.toString();
|
|
9266
9480
|
checkBox.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9267
9481
|
checkBox.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9268
9482
|
checkBox.viewType = this.repeaterField.controlOptions.viewType;
|
|
9269
9483
|
checkBox.outputFunction = this.repeaterField.controlOptions.outputFunction;
|
|
9270
|
-
checkBox.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9484
|
+
checkBox.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9485
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9486
|
+
: '';
|
|
9271
9487
|
checkBox.value = this.value;
|
|
9488
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9489
|
+
checkBox.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9490
|
+
}
|
|
9272
9491
|
this.renderComponentService.renderDynamicComponent(this.item, CheckBoxComponent, this.group, checkBox);
|
|
9273
9492
|
break;
|
|
9274
9493
|
//#endregion
|
|
@@ -9280,7 +9499,11 @@ class RepeaterFieldBuilderComponent {
|
|
|
9280
9499
|
ngOnChanges(changes) {
|
|
9281
9500
|
if (changes.itemNumber)
|
|
9282
9501
|
if (changes.itemNumber.previousValue) {
|
|
9283
|
-
let name = this.repeaterField.controlOptions.name +
|
|
9502
|
+
let name = this.repeaterField.controlOptions.name +
|
|
9503
|
+
'.' +
|
|
9504
|
+
changes.itemNumber.previousValue.toString() +
|
|
9505
|
+
'.' +
|
|
9506
|
+
this.controlNumber.toString();
|
|
9284
9507
|
let value = this.group.controls[name].value;
|
|
9285
9508
|
this.item.clear();
|
|
9286
9509
|
this.group.removeControl(name);
|
|
@@ -9288,284 +9511,471 @@ class RepeaterFieldBuilderComponent {
|
|
|
9288
9511
|
//#region TextBox
|
|
9289
9512
|
case DataType.Text:
|
|
9290
9513
|
let text = new TextBoxOptions();
|
|
9291
|
-
text.name =
|
|
9514
|
+
text.name =
|
|
9515
|
+
this.repeaterField.controlOptions.name +
|
|
9516
|
+
'.' +
|
|
9517
|
+
changes.itemNumber.currentValue +
|
|
9518
|
+
'.' +
|
|
9519
|
+
this.controlNumber.toString();
|
|
9292
9520
|
text.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9293
9521
|
text.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9294
9522
|
text.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9295
9523
|
text.viewType = this.repeaterField.controlOptions.viewType;
|
|
9296
|
-
text.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9524
|
+
text.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9525
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9526
|
+
: '';
|
|
9297
9527
|
text.type = InputType.Text;
|
|
9298
9528
|
if (this.repeaterField.controlOptions.maxLength)
|
|
9299
9529
|
text.maxLength = this.repeaterField.controlOptions.maxLength;
|
|
9300
9530
|
if (this.repeaterField.controlOptions.minLength)
|
|
9301
9531
|
text.minLength = this.repeaterField.controlOptions.minLength;
|
|
9302
9532
|
text.value = value;
|
|
9533
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9534
|
+
text.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9535
|
+
}
|
|
9303
9536
|
this.renderComponentService.renderDynamicComponent(this.item, TextboxComponent, this.group, text);
|
|
9304
9537
|
break;
|
|
9305
9538
|
case DataType.Name:
|
|
9306
9539
|
let name = new TextBoxOptions();
|
|
9307
|
-
name.name =
|
|
9540
|
+
name.name =
|
|
9541
|
+
this.repeaterField.controlOptions.name +
|
|
9542
|
+
'.' +
|
|
9543
|
+
changes.itemNumber.currentValue +
|
|
9544
|
+
'.' +
|
|
9545
|
+
this.controlNumber.toString();
|
|
9308
9546
|
name.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9309
9547
|
name.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9310
9548
|
name.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9311
9549
|
name.viewType = this.repeaterField.controlOptions.viewType;
|
|
9312
|
-
name.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9550
|
+
name.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9551
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9552
|
+
: '';
|
|
9313
9553
|
if (this.repeaterField.controlOptions.maxLength)
|
|
9314
9554
|
name.maxLength = this.repeaterField.controlOptions.maxLength;
|
|
9315
9555
|
if (this.repeaterField.controlOptions.minLength)
|
|
9316
9556
|
name.minLength = this.repeaterField.controlOptions.minLength;
|
|
9317
9557
|
name.type = InputType.Text;
|
|
9318
9558
|
name.value = value;
|
|
9559
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9560
|
+
name.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9561
|
+
}
|
|
9319
9562
|
this.renderComponentService.renderDynamicComponent(this.item, TextboxComponent, this.group, name);
|
|
9320
9563
|
break;
|
|
9321
9564
|
case DataType.Email:
|
|
9322
9565
|
let email = new TextBoxOptions();
|
|
9323
|
-
email.name =
|
|
9566
|
+
email.name =
|
|
9567
|
+
this.repeaterField.controlOptions.name +
|
|
9568
|
+
'.' +
|
|
9569
|
+
changes.itemNumber.currentValue +
|
|
9570
|
+
'.' +
|
|
9571
|
+
this.controlNumber.toString();
|
|
9324
9572
|
email.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9325
9573
|
email.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9326
9574
|
email.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9327
9575
|
email.viewType = this.repeaterField.controlOptions.viewType;
|
|
9328
|
-
email.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9576
|
+
email.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9577
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9578
|
+
: '';
|
|
9329
9579
|
email.type = InputType.Email;
|
|
9330
9580
|
email.value = value;
|
|
9581
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9582
|
+
email.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9583
|
+
}
|
|
9331
9584
|
this.renderComponentService.renderDynamicComponent(this.item, TextboxComponent, this.group, email);
|
|
9332
9585
|
break;
|
|
9333
9586
|
case DataType.Number:
|
|
9334
9587
|
let number = new TextBoxOptions();
|
|
9335
|
-
number.name =
|
|
9588
|
+
number.name =
|
|
9589
|
+
this.repeaterField.controlOptions.name +
|
|
9590
|
+
'.' +
|
|
9591
|
+
changes.itemNumber.currentValue +
|
|
9592
|
+
'.' +
|
|
9593
|
+
this.controlNumber.toString();
|
|
9336
9594
|
number.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9337
9595
|
number.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9338
9596
|
number.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9339
9597
|
number.viewType = this.repeaterField.controlOptions.viewType;
|
|
9340
|
-
number.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9598
|
+
number.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9599
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9600
|
+
: '';
|
|
9341
9601
|
number.type = InputType.Number;
|
|
9342
9602
|
let rangeNumber = new RangeNumber();
|
|
9343
9603
|
rangeNumber.to = this.repeaterField.controlOptions.maxLength;
|
|
9344
9604
|
rangeNumber.from = this.repeaterField.controlOptions.minLength;
|
|
9345
9605
|
number.numberRange = rangeNumber;
|
|
9346
9606
|
number.value = value;
|
|
9607
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9608
|
+
number.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9609
|
+
}
|
|
9347
9610
|
this.renderComponentService.renderDynamicComponent(this.item, TextboxComponent, this.group, number);
|
|
9348
9611
|
break;
|
|
9349
9612
|
//#endregion
|
|
9350
9613
|
//#region DateTime
|
|
9351
9614
|
case DataType.Date:
|
|
9352
|
-
let
|
|
9353
|
-
|
|
9354
|
-
|
|
9355
|
-
|
|
9356
|
-
|
|
9357
|
-
|
|
9358
|
-
|
|
9359
|
-
|
|
9360
|
-
|
|
9361
|
-
|
|
9362
|
-
|
|
9363
|
-
|
|
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);
|
|
9364
9637
|
break;
|
|
9365
9638
|
case DataType.DateTime:
|
|
9366
9639
|
let dateTime = new DatePickerOptions();
|
|
9367
|
-
dateTime.name =
|
|
9640
|
+
dateTime.name =
|
|
9641
|
+
this.repeaterField.controlOptions.name +
|
|
9642
|
+
'.' +
|
|
9643
|
+
changes.itemNumber.currentValue +
|
|
9644
|
+
'.' +
|
|
9645
|
+
this.controlNumber.toString();
|
|
9368
9646
|
dateTime.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9369
9647
|
dateTime.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9370
9648
|
dateTime.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9371
9649
|
dateTime.viewType = this.repeaterField.controlOptions.viewType;
|
|
9372
|
-
dateTime.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9650
|
+
dateTime.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9651
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9652
|
+
: '';
|
|
9373
9653
|
dateTime.pickerType = PickerType.Both;
|
|
9374
9654
|
dateTime.selectMode = SelectMode.Single;
|
|
9375
9655
|
dateTime.startView = StartView.Month;
|
|
9376
9656
|
dateTime.value = value;
|
|
9657
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9658
|
+
dateTime.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9659
|
+
}
|
|
9377
9660
|
this.renderComponentService.renderDynamicComponent(this.item, DateInputComponent, this.group, dateTime);
|
|
9378
9661
|
break;
|
|
9379
9662
|
case DataType.Time:
|
|
9380
9663
|
let time = new DatePickerOptions();
|
|
9381
|
-
time.name =
|
|
9664
|
+
time.name =
|
|
9665
|
+
this.repeaterField.controlOptions.name +
|
|
9666
|
+
'.' +
|
|
9667
|
+
changes.itemNumber.currentValue +
|
|
9668
|
+
'.' +
|
|
9669
|
+
this.controlNumber.toString();
|
|
9382
9670
|
time.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9383
9671
|
time.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9384
9672
|
time.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9385
9673
|
time.viewType = this.repeaterField.controlOptions.viewType;
|
|
9386
|
-
time.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9674
|
+
time.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9675
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9676
|
+
: '';
|
|
9387
9677
|
time.pickerType = PickerType.Timer;
|
|
9388
9678
|
time.selectMode = SelectMode.Single;
|
|
9389
9679
|
time.startView = StartView.Month;
|
|
9390
9680
|
time.value = value;
|
|
9681
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9682
|
+
time.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9683
|
+
}
|
|
9391
9684
|
this.renderComponentService.renderDynamicComponent(this.item, DateInputComponent, this.group, time);
|
|
9392
9685
|
break;
|
|
9393
9686
|
//#endregion
|
|
9394
9687
|
//#region Dropdown
|
|
9395
9688
|
case DataType.SingleSelect:
|
|
9396
9689
|
let singleSelect = new DropdownOptions();
|
|
9397
|
-
singleSelect.name =
|
|
9690
|
+
singleSelect.name =
|
|
9691
|
+
this.repeaterField.controlOptions.name +
|
|
9692
|
+
'.' +
|
|
9693
|
+
changes.itemNumber.currentValue +
|
|
9694
|
+
'.' +
|
|
9695
|
+
this.controlNumber.toString();
|
|
9398
9696
|
singleSelect.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9399
9697
|
singleSelect.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9400
9698
|
singleSelect.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9401
9699
|
singleSelect.viewType = this.repeaterField.controlOptions.viewType;
|
|
9402
|
-
singleSelect.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9700
|
+
singleSelect.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9701
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9702
|
+
: '';
|
|
9403
9703
|
singleSelect.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
9404
9704
|
singleSelect.singleSelection = true;
|
|
9405
9705
|
singleSelect.showCheckbox = false;
|
|
9406
9706
|
singleSelect.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
9407
9707
|
singleSelect.selectedItems = value;
|
|
9708
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9709
|
+
singleSelect.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9710
|
+
}
|
|
9408
9711
|
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, singleSelect);
|
|
9409
9712
|
break;
|
|
9410
9713
|
case DataType.MulipleSelect:
|
|
9411
9714
|
let mulipleSelect = new DropdownOptions();
|
|
9412
|
-
mulipleSelect.name =
|
|
9715
|
+
mulipleSelect.name =
|
|
9716
|
+
this.repeaterField.controlOptions.name +
|
|
9717
|
+
'.' +
|
|
9718
|
+
changes.itemNumber.currentValue +
|
|
9719
|
+
'.' +
|
|
9720
|
+
this.controlNumber.toString();
|
|
9413
9721
|
mulipleSelect.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9414
9722
|
mulipleSelect.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9415
9723
|
mulipleSelect.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9416
9724
|
mulipleSelect.viewType = this.repeaterField.controlOptions.viewType;
|
|
9417
|
-
mulipleSelect.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9725
|
+
mulipleSelect.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9726
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9727
|
+
: '';
|
|
9418
9728
|
mulipleSelect.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
9419
9729
|
mulipleSelect.singleSelection = false;
|
|
9420
9730
|
mulipleSelect.showCheckbox = false;
|
|
9421
9731
|
mulipleSelect.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
9422
9732
|
mulipleSelect.selectedItems = value;
|
|
9733
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9734
|
+
mulipleSelect.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9735
|
+
}
|
|
9423
9736
|
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, mulipleSelect);
|
|
9424
9737
|
break;
|
|
9425
9738
|
case DataType.Goal:
|
|
9426
|
-
let
|
|
9427
|
-
|
|
9428
|
-
|
|
9429
|
-
|
|
9430
|
-
|
|
9431
|
-
|
|
9432
|
-
|
|
9433
|
-
|
|
9434
|
-
|
|
9435
|
-
|
|
9436
|
-
|
|
9437
|
-
|
|
9438
|
-
|
|
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);
|
|
9439
9762
|
break;
|
|
9440
9763
|
case DataType.Challenge:
|
|
9441
9764
|
let challenge = new DropdownOptions();
|
|
9442
|
-
challenge.name =
|
|
9765
|
+
challenge.name =
|
|
9766
|
+
this.repeaterField.controlOptions.name +
|
|
9767
|
+
'.' +
|
|
9768
|
+
changes.itemNumber.currentValue +
|
|
9769
|
+
'.' +
|
|
9770
|
+
this.controlNumber.toString();
|
|
9443
9771
|
challenge.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9444
9772
|
challenge.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9445
9773
|
challenge.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9446
9774
|
challenge.viewType = this.repeaterField.controlOptions.viewType;
|
|
9447
|
-
challenge.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9775
|
+
challenge.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9776
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9777
|
+
: '';
|
|
9448
9778
|
challenge.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
9449
9779
|
challenge.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
9450
9780
|
challenge.singleSelection = !this.repeaterField.controlOptions.isMultiple;
|
|
9451
9781
|
challenge.showCheckbox = false;
|
|
9452
9782
|
challenge.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
9453
9783
|
challenge.selectedItems = value;
|
|
9784
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9785
|
+
challenge.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9786
|
+
}
|
|
9454
9787
|
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, challenge);
|
|
9455
9788
|
break;
|
|
9456
9789
|
case DataType.InnovationLab:
|
|
9457
9790
|
let innovationLab = new DropdownOptions();
|
|
9458
|
-
innovationLab.name =
|
|
9791
|
+
innovationLab.name =
|
|
9792
|
+
this.repeaterField.controlOptions.name +
|
|
9793
|
+
'.' +
|
|
9794
|
+
changes.itemNumber.currentValue +
|
|
9795
|
+
'.' +
|
|
9796
|
+
this.controlNumber.toString();
|
|
9459
9797
|
innovationLab.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9460
9798
|
innovationLab.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9461
9799
|
innovationLab.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9462
9800
|
innovationLab.viewType = this.repeaterField.controlOptions.viewType;
|
|
9463
|
-
innovationLab.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9801
|
+
innovationLab.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9802
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9803
|
+
: '';
|
|
9464
9804
|
innovationLab.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
9465
9805
|
innovationLab.singleSelection = !this.repeaterField.controlOptions.isMultiple;
|
|
9466
9806
|
innovationLab.showCheckbox = false;
|
|
9467
9807
|
innovationLab.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
9468
9808
|
innovationLab.selectedItems = value;
|
|
9809
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9810
|
+
innovationLab.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9811
|
+
}
|
|
9469
9812
|
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, innovationLab);
|
|
9470
9813
|
break;
|
|
9471
9814
|
case DataType.Country:
|
|
9472
9815
|
let country = new DropdownOptions();
|
|
9473
|
-
country.name =
|
|
9816
|
+
country.name =
|
|
9817
|
+
this.repeaterField.controlOptions.name +
|
|
9818
|
+
'.' +
|
|
9819
|
+
changes.itemNumber.currentValue +
|
|
9820
|
+
'.' +
|
|
9821
|
+
this.controlNumber.toString();
|
|
9474
9822
|
country.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9475
9823
|
country.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9476
9824
|
country.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9477
9825
|
country.viewType = this.repeaterField.controlOptions.viewType;
|
|
9478
|
-
country.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9826
|
+
country.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9827
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9828
|
+
: '';
|
|
9479
9829
|
country.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
9480
9830
|
country.singleSelection = !this.repeaterField.controlOptions.isMultiple;
|
|
9481
9831
|
country.showCheckbox = false;
|
|
9482
9832
|
country.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
9483
9833
|
country.selectedItems = value;
|
|
9834
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9835
|
+
country.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9836
|
+
}
|
|
9484
9837
|
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, country);
|
|
9485
9838
|
break;
|
|
9486
9839
|
//#endregion
|
|
9487
9840
|
//#region FileUpload
|
|
9488
9841
|
case DataType.File:
|
|
9489
9842
|
let file = new FileUploadOptions();
|
|
9490
|
-
file.name =
|
|
9843
|
+
file.name =
|
|
9844
|
+
this.repeaterField.controlOptions.name +
|
|
9845
|
+
'.' +
|
|
9846
|
+
changes.itemNumber.currentValue +
|
|
9847
|
+
'.' +
|
|
9848
|
+
this.controlNumber.toString();
|
|
9491
9849
|
file.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9492
9850
|
file.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9493
9851
|
file.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9494
9852
|
file.viewType = this.repeaterField.controlOptions.viewType;
|
|
9495
|
-
file.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9853
|
+
file.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9854
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9855
|
+
: '';
|
|
9496
9856
|
file.fileMaxSizeInMB = this.repeaterField.controlOptions.maxFileSizeInMB;
|
|
9497
9857
|
file.value = value;
|
|
9858
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9859
|
+
file.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9860
|
+
}
|
|
9498
9861
|
this.renderComponentService.renderDynamicComponent(this.item, FileUploadComponent, this.group, file);
|
|
9499
9862
|
break;
|
|
9500
9863
|
case DataType.MultiFile:
|
|
9501
9864
|
let multiFile = new FileUploadOptions();
|
|
9502
|
-
file.name =
|
|
9865
|
+
file.name =
|
|
9866
|
+
this.repeaterField.controlOptions.name +
|
|
9867
|
+
'.' +
|
|
9868
|
+
changes.itemNumber.currentValue +
|
|
9869
|
+
'.' +
|
|
9870
|
+
this.controlNumber.toString();
|
|
9503
9871
|
file.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9504
9872
|
file.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9505
9873
|
file.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9506
9874
|
file.viewType = this.repeaterField.controlOptions.viewType;
|
|
9507
|
-
file.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9875
|
+
file.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9876
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9877
|
+
: '';
|
|
9508
9878
|
multiFile.maxSizeForAllFilesInMB = this.repeaterField.controlOptions.maxFileSizeInMB;
|
|
9509
9879
|
multiFile.maxNoOfFiles = this.repeaterField.controlOptions.maxFileCount;
|
|
9510
9880
|
multiFile.isMultipleFile = true;
|
|
9511
9881
|
multiFile.value = value;
|
|
9882
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9883
|
+
multiFile.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9884
|
+
}
|
|
9512
9885
|
this.renderComponentService.renderDynamicComponent(this.item, FileUploadComponent, this.group, multiFile);
|
|
9513
9886
|
break;
|
|
9514
9887
|
//#endregion
|
|
9515
9888
|
//#region ImageUpload
|
|
9516
9889
|
case DataType.Image:
|
|
9517
9890
|
let image = new ImageUploadOptions();
|
|
9518
|
-
image.name =
|
|
9891
|
+
image.name =
|
|
9892
|
+
this.repeaterField.controlOptions.name +
|
|
9893
|
+
'.' +
|
|
9894
|
+
changes.itemNumber.currentValue +
|
|
9895
|
+
'.' +
|
|
9896
|
+
this.controlNumber.toString();
|
|
9519
9897
|
image.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9520
9898
|
image.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9521
9899
|
image.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9522
9900
|
image.viewType = this.repeaterField.controlOptions.viewType;
|
|
9523
|
-
image.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9901
|
+
image.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9902
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9903
|
+
: '';
|
|
9524
9904
|
if (this.repeaterField.controlOptions.maxFileSizeInMB)
|
|
9525
9905
|
image.fileMaxSizeInMB = this.repeaterField.controlOptions.maxFileSizeInMB;
|
|
9526
9906
|
image.value = value;
|
|
9907
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9908
|
+
image.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9909
|
+
}
|
|
9527
9910
|
this.renderComponentService.renderDynamicComponent(this.item, ImageUploaderComponent, this.group, image);
|
|
9528
9911
|
break;
|
|
9529
9912
|
case DataType.CoverPhoto:
|
|
9530
9913
|
let coverPhoto = new ImageUploadOptions();
|
|
9531
|
-
coverPhoto.name =
|
|
9914
|
+
coverPhoto.name =
|
|
9915
|
+
this.repeaterField.controlOptions.name +
|
|
9916
|
+
'.' +
|
|
9917
|
+
changes.itemNumber.currentValue +
|
|
9918
|
+
'.' +
|
|
9919
|
+
this.controlNumber.toString();
|
|
9532
9920
|
coverPhoto.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9533
9921
|
coverPhoto.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9534
9922
|
coverPhoto.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9535
9923
|
coverPhoto.viewType = this.repeaterField.controlOptions.viewType;
|
|
9536
|
-
coverPhoto.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9924
|
+
coverPhoto.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9925
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9926
|
+
: '';
|
|
9537
9927
|
if (this.repeaterField.controlOptions.maxFileSizeInMB)
|
|
9538
9928
|
coverPhoto.fileMaxSizeInMB = this.repeaterField.controlOptions.maxFileSizeInMB;
|
|
9539
9929
|
coverPhoto.value = value;
|
|
9930
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9931
|
+
coverPhoto.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9932
|
+
}
|
|
9540
9933
|
this.renderComponentService.renderDynamicComponent(this.item, ImageUploaderComponent, this.group, coverPhoto);
|
|
9541
9934
|
break;
|
|
9542
9935
|
//#endregion
|
|
9543
9936
|
//#region Mobile
|
|
9544
9937
|
case DataType.Mobile:
|
|
9545
9938
|
let mobile = new PhoneOptions();
|
|
9546
|
-
mobile.name =
|
|
9939
|
+
mobile.name =
|
|
9940
|
+
this.repeaterField.controlOptions.name +
|
|
9941
|
+
'.' +
|
|
9942
|
+
changes.itemNumber.currentValue +
|
|
9943
|
+
'.' +
|
|
9944
|
+
this.controlNumber.toString();
|
|
9547
9945
|
mobile.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9548
9946
|
mobile.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9549
9947
|
mobile.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9550
9948
|
mobile.viewType = this.repeaterField.controlOptions.viewType;
|
|
9551
|
-
mobile.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9949
|
+
mobile.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9950
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9951
|
+
: '';
|
|
9552
9952
|
mobile.allowSearch = true;
|
|
9553
9953
|
mobile.phoneValidation = true;
|
|
9554
9954
|
mobile.selectFirstCountry = true;
|
|
9555
9955
|
mobile.enablePlaceholder = true;
|
|
9556
9956
|
mobile.value = value;
|
|
9957
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9958
|
+
mobile.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9959
|
+
}
|
|
9557
9960
|
this.renderComponentService.renderDynamicComponent(this.item, PhoneComponent, this.group, mobile);
|
|
9558
9961
|
break;
|
|
9559
9962
|
//#endregion
|
|
9560
9963
|
//#region MultilineText
|
|
9561
9964
|
case DataType.MultilineText:
|
|
9562
9965
|
let multilineText = new TextAreaOptions();
|
|
9563
|
-
multilineText.name =
|
|
9966
|
+
multilineText.name =
|
|
9967
|
+
this.repeaterField.controlOptions.name +
|
|
9968
|
+
'.' +
|
|
9969
|
+
changes.itemNumber.currentValue +
|
|
9970
|
+
'.' +
|
|
9971
|
+
this.controlNumber.toString();
|
|
9564
9972
|
multilineText.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9565
9973
|
multilineText.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9566
9974
|
multilineText.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
9567
9975
|
multilineText.viewType = this.repeaterField.controlOptions.viewType;
|
|
9568
|
-
multilineText.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9976
|
+
multilineText.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
9977
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
9978
|
+
: '';
|
|
9569
9979
|
if (this.repeaterField.controlOptions.maxLength)
|
|
9570
9980
|
multilineText.maxLength = this.repeaterField.controlOptions.maxLength;
|
|
9571
9981
|
if (this.repeaterField.controlOptions.minLength)
|
|
@@ -9573,63 +9983,106 @@ class RepeaterFieldBuilderComponent {
|
|
|
9573
9983
|
multilineText.rows = this.repeaterField.controlOptions.rows;
|
|
9574
9984
|
multilineText.forceDirection = this.repeaterField.controlOptions.forceDirection;
|
|
9575
9985
|
multilineText.value = value;
|
|
9986
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
9987
|
+
multilineText.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
9988
|
+
}
|
|
9576
9989
|
this.renderComponentService.renderDynamicComponent(this.item, TextAreaComponent, this.group, multilineText);
|
|
9577
9990
|
break;
|
|
9578
9991
|
//#endregion
|
|
9579
9992
|
//#region HTML
|
|
9580
9993
|
case DataType.HTML:
|
|
9581
|
-
let
|
|
9582
|
-
|
|
9583
|
-
|
|
9584
|
-
|
|
9585
|
-
|
|
9586
|
-
|
|
9587
|
-
|
|
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
|
+
: '';
|
|
9588
10008
|
if (this.repeaterField.controlOptions.maxLength)
|
|
9589
|
-
|
|
10009
|
+
html.maxLength = this.repeaterField.controlOptions.maxLength;
|
|
9590
10010
|
if (this.repeaterField.controlOptions.minLength)
|
|
9591
|
-
|
|
9592
|
-
|
|
9593
|
-
|
|
9594
|
-
|
|
9595
|
-
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);
|
|
9596
10019
|
break;
|
|
9597
10020
|
//#endregion
|
|
9598
10021
|
//#region Boolean
|
|
9599
10022
|
case DataType.Boolean:
|
|
9600
10023
|
let boolean = new ToggleSlideOptions();
|
|
9601
|
-
boolean.name =
|
|
10024
|
+
boolean.name =
|
|
10025
|
+
this.repeaterField.controlOptions.name +
|
|
10026
|
+
'.' +
|
|
10027
|
+
changes.itemNumber.currentValue +
|
|
10028
|
+
'.' +
|
|
10029
|
+
this.controlNumber.toString();
|
|
9602
10030
|
boolean.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9603
10031
|
boolean.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9604
10032
|
boolean.viewType = this.repeaterField.controlOptions.viewType;
|
|
9605
|
-
boolean.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
10033
|
+
boolean.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
10034
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
10035
|
+
: '';
|
|
9606
10036
|
boolean.value = value;
|
|
10037
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10038
|
+
boolean.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10039
|
+
}
|
|
9607
10040
|
this.renderComponentService.renderDynamicComponent(this.item, ToggleslideComponent, this.group, boolean);
|
|
9608
10041
|
break;
|
|
9609
10042
|
//#endregion
|
|
9610
10043
|
//#region Location
|
|
9611
10044
|
case DataType.Location:
|
|
9612
|
-
let
|
|
9613
|
-
|
|
9614
|
-
|
|
9615
|
-
|
|
9616
|
-
|
|
9617
|
-
|
|
9618
|
-
|
|
9619
|
-
|
|
9620
|
-
|
|
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);
|
|
9621
10064
|
break;
|
|
9622
10065
|
//#endregion
|
|
9623
10066
|
//#region CheckBox
|
|
9624
10067
|
case DataType.CheckBox:
|
|
9625
10068
|
let checkBox = new CheckBoxOptions();
|
|
9626
|
-
checkBox.name =
|
|
10069
|
+
checkBox.name =
|
|
10070
|
+
this.repeaterField.controlOptions.name +
|
|
10071
|
+
'.' +
|
|
10072
|
+
changes.itemNumber.currentValue +
|
|
10073
|
+
'.' +
|
|
10074
|
+
this.controlNumber.toString();
|
|
9627
10075
|
checkBox.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
9628
10076
|
checkBox.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
9629
10077
|
checkBox.viewType = this.repeaterField.controlOptions.viewType;
|
|
9630
|
-
checkBox.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
10078
|
+
checkBox.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
10079
|
+
? this.repeaterField.controlOptions.labelDescription
|
|
10080
|
+
: '';
|
|
9631
10081
|
checkBox.outputFunction = this.repeaterField.controlOptions.outputFunction;
|
|
9632
10082
|
checkBox.value = value;
|
|
10083
|
+
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10084
|
+
checkBox.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10085
|
+
}
|
|
9633
10086
|
this.renderComponentService.renderDynamicComponent(this.item, CheckBoxComponent, this.group, checkBox);
|
|
9634
10087
|
break;
|
|
9635
10088
|
//#endregion
|
|
@@ -9646,7 +10099,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
9646
10099
|
args: [{ selector: 'repeater-field-builder', template: "<ng-container #Item></ng-container>\r\n" }]
|
|
9647
10100
|
}], ctorParameters: () => [{ type: RenderComponentService }, { type: i2.FormGroupDirective }], propDecorators: { item: [{
|
|
9648
10101
|
type: ViewChild,
|
|
9649
|
-
args: [
|
|
10102
|
+
args: ['Item', { read: ViewContainerRef }]
|
|
9650
10103
|
}], group: [{
|
|
9651
10104
|
type: Input
|
|
9652
10105
|
}], itemNumber: [{
|
|
@@ -9705,7 +10158,9 @@ class RepeaterTableComponent {
|
|
|
9705
10158
|
if (Object.prototype.hasOwnProperty.call(this.repeaterGroup.controls, key)) {
|
|
9706
10159
|
const keySplitArr = key.split('.');
|
|
9707
10160
|
let item = {
|
|
9708
|
-
[keySplitArr[1]]: {
|
|
10161
|
+
[keySplitArr[1]]: {
|
|
10162
|
+
[keySplitArr[0]]: this.group.controls[this.options.name].value[key]
|
|
10163
|
+
}
|
|
9709
10164
|
};
|
|
9710
10165
|
addItems.push(item);
|
|
9711
10166
|
if (!rowNumber.includes(keySplitArr[1]))
|
|
@@ -9715,7 +10170,7 @@ class RepeaterTableComponent {
|
|
|
9715
10170
|
for (let index = 0; index < rowNumber.length; index++) {
|
|
9716
10171
|
const row = rowNumber[index];
|
|
9717
10172
|
let addObject = {};
|
|
9718
|
-
let filteredElements = addItems.filter(item => item[row]);
|
|
10173
|
+
let filteredElements = addItems.filter((item) => item[row]);
|
|
9719
10174
|
for (let index = 0; index < filteredElements.length; index++) {
|
|
9720
10175
|
const filteredElement = filteredElements[index];
|
|
9721
10176
|
for (const key in filteredElement) {
|
|
@@ -9740,7 +10195,7 @@ class RepeaterTableComponent {
|
|
|
9740
10195
|
if (this.items.length == this.options.minRequiredItems && this.options.isRequired)
|
|
9741
10196
|
return;
|
|
9742
10197
|
let deletedControls = [];
|
|
9743
|
-
let controlNames = this.options.repeaterStructure.map(e => e.controlOptions.name);
|
|
10198
|
+
let controlNames = this.options.repeaterStructure.map((e) => e.controlOptions.name);
|
|
9744
10199
|
for (const key in this.repeaterGroup.controls) {
|
|
9745
10200
|
if (Object.prototype.hasOwnProperty.call(this.repeaterGroup.controls, key)) {
|
|
9746
10201
|
for (let index = 0; index < controlNames.length; index++) {
|
|
@@ -9770,11 +10225,11 @@ class RepeaterTableComponent {
|
|
|
9770
10225
|
this.items.push(this.items[this.items.length - 1] + 1);
|
|
9771
10226
|
}
|
|
9772
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 }); }
|
|
9773
|
-
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"] }] }); }
|
|
9774
10229
|
}
|
|
9775
10230
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: RepeaterTableComponent, decorators: [{
|
|
9776
10231
|
type: Component,
|
|
9777
|
-
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>" }]
|
|
9778
10233
|
}], ctorParameters: () => [{ type: i3.UtilityService }], propDecorators: { group: [{
|
|
9779
10234
|
type: Input
|
|
9780
10235
|
}], options: [{
|
|
@@ -10973,6 +11428,39 @@ var FileType;
|
|
|
10973
11428
|
FileType["None"] = "";
|
|
10974
11429
|
})(FileType || (FileType = {}));
|
|
10975
11430
|
|
|
11431
|
+
var ToolbarButtons;
|
|
11432
|
+
(function (ToolbarButtons) {
|
|
11433
|
+
ToolbarButtons["undo"] = "undo";
|
|
11434
|
+
ToolbarButtons["redo"] = "redo";
|
|
11435
|
+
ToolbarButtons["bold"] = "bold";
|
|
11436
|
+
ToolbarButtons["italic"] = "italic";
|
|
11437
|
+
ToolbarButtons["underline"] = "underline";
|
|
11438
|
+
ToolbarButtons["strikeThrough"] = "strikeThrough";
|
|
11439
|
+
ToolbarButtons["subscript"] = "subscript";
|
|
11440
|
+
ToolbarButtons["superscript"] = "superscript";
|
|
11441
|
+
ToolbarButtons["justifyLeft"] = "justifyLeft";
|
|
11442
|
+
ToolbarButtons["justifyCenter"] = "justifyCenter";
|
|
11443
|
+
ToolbarButtons["justifyRight"] = "justifyRight";
|
|
11444
|
+
ToolbarButtons["justifyFull"] = "justifyFull";
|
|
11445
|
+
ToolbarButtons["indent"] = "indent";
|
|
11446
|
+
ToolbarButtons["outdent"] = "outdent";
|
|
11447
|
+
ToolbarButtons["insertUnorderedList"] = "insertUnorderedList";
|
|
11448
|
+
ToolbarButtons["insertOrderedList"] = "insertOrderedList";
|
|
11449
|
+
ToolbarButtons["heading"] = "heading";
|
|
11450
|
+
ToolbarButtons["fontName"] = "fontName";
|
|
11451
|
+
ToolbarButtons["fontSize"] = "fontSize";
|
|
11452
|
+
ToolbarButtons["textColor"] = "textColor";
|
|
11453
|
+
ToolbarButtons["backgroundColor"] = "backgroundColor";
|
|
11454
|
+
ToolbarButtons["customClasses"] = "customClasses";
|
|
11455
|
+
ToolbarButtons["link"] = "link";
|
|
11456
|
+
ToolbarButtons["unlink"] = "unlink";
|
|
11457
|
+
ToolbarButtons["insertImage"] = "insertImage";
|
|
11458
|
+
ToolbarButtons["insertVideo"] = "insertVideo";
|
|
11459
|
+
ToolbarButtons["insertHorizontalRule"] = "insertHorizontalRule";
|
|
11460
|
+
ToolbarButtons["removeFormat"] = "removeFormat";
|
|
11461
|
+
ToolbarButtons["toggleEditorMode"] = "toggleEditorMode";
|
|
11462
|
+
})(ToolbarButtons || (ToolbarButtons = {}));
|
|
11463
|
+
|
|
10976
11464
|
/*
|
|
10977
11465
|
* Public API Surface of bnsights-library
|
|
10978
11466
|
*/
|
|
@@ -10982,5 +11470,5 @@ var FileType;
|
|
|
10982
11470
|
* Generated bundle index. Do not edit.
|
|
10983
11471
|
*/
|
|
10984
11472
|
|
|
10985
|
-
export { AddButton, AppBaseComponent, Attribute, AutocompleteDTO, AutocompleteOptions, AutocompleteTextBoxComponent, BBSFControlsModule, BBSFDatePipe, BBSFDateTimePipe, BreadCrumb, BreadCrumbModel, CalendarComponent, CalendarEventDTO, CalendarOptions, CalendarView, CancelDTO, CheckBoxComponent, CheckBoxOptions, ConfirmationModalComponent, ConfirmationModalOptions, ControlFilterItem, ControlLayout, ControlOptionsBase, ControlUtility, Country, CustomValidation, CustomValidator, DataType, DateInputComponent, DatePickerOptions, DefaultIntl, DeleteButton, DropdownActionItem, DropdownActions, DropdownListComponent, DropdownListItem, DropdownOptions, EditButton, EditPersonalImage, EnglishArabicDTO, ErrorMassageValidation, ExportButton, FileDTO, FileType, FileUploadComponent, FileUploadModel, FileUploadOptions, FilterItem, FilterOptions, FilterType, FiltersButton, FontSize, ForceDirection, FormComponent, FormOptions, GlobalSettings, GridViewModel, HtmlEditorComponent, HtmlEditorOptions, IconPosition, ImageType, ImageUploadOptions, ImageUploaderComponent, InputType, Insert, JwPaginationComponent, LanguageMode, LanguageValidation, MapAutoCompleteComponent, MapAutoCompleteOptions, MapAutocompleteDTO, MapSearchTypes, MapZoomLevel, MarkDownIcons, MarkdownEditorComponent, MarkdownEditorOptions, MarkdownMode, MenuListType, Misc, MultiLingualHtmlEditorComponent, MultiLingualHtmlEditorOptions, MultiLingualTextAreaComponent, MultiLingualTextAreaOptions, MultiLingualTextBoxComponent, MultiLingualTextBoxOptions, MultilingualControlOptionsBase, MultipleFileUploadModel, NgTemplateNameDirective, OnPagingFiltersChangeService, PageHeaderComponentComponent, PageHeaderOptions, PagingActionMode, PagingComponent, PagingDTO, PagingOptions, Para, PermissionSets, PhoneComponent, PhoneOptions, PickerType, PreventDoubleClickDirective, ProfileImageUploadOptions, ProfileImageUploaderComponent, ProfilePictureDTO, RadioButtonComponent, RadioButtonItem, RadioButtonOptions, RangeNumber, RecaptchaComponent, RecaptchaModel, RecaptchaOptions, RenderComponentService, RepeaterComponent, RepeaterField, RepeaterFieldBuilderComponent, RepeaterItemFieldComponent, RepeaterOptions, RepeaterTableComponent, SaveDTO, SelectMode, StartView, Style, StyleConfirmationMode, TagInputView, TagsInputComponent, TagsInputDTO, TagsInputOptions, TextAreaComponent, TextAreaOptions, TextBoxModel, TextBoxOptions, TextboxComponent, ToggleSlideOptions, ToggleslideComponent, UploadPersonalImage, environment, options };
|
|
11473
|
+
export { AddButton, AppBaseComponent, Attribute, AutocompleteDTO, AutocompleteOptions, AutocompleteTextBoxComponent, BBSFControlsModule, BBSFDatePipe, BBSFDateTimePipe, BreadCrumb, BreadCrumbModel, CalendarComponent, CalendarEventDTO, CalendarOptions, CalendarView, CancelDTO, CheckBoxComponent, CheckBoxOptions, ConfirmationModalComponent, ConfirmationModalOptions, ControlFilterItem, ControlLayout, ControlOptionsBase, ControlUtility, Country, CustomValidation, CustomValidator, DataType, DateInputComponent, DatePickerOptions, DefaultIntl, DeleteButton, DropdownActionItem, DropdownActions, DropdownListComponent, DropdownListItem, DropdownOptions, EditButton, EditPersonalImage, EnglishArabicDTO, ErrorMassageValidation, ExportButton, FileDTO, FileType, FileUploadComponent, FileUploadModel, FileUploadOptions, FilterItem, FilterOptions, FilterType, FiltersButton, FontSize, ForceDirection, FormComponent, FormOptions, GlobalSettings, GridViewModel, HtmlEditorComponent, HtmlEditorOptions, IconPosition, ImageType, ImageUploadOptions, ImageUploaderComponent, InputType, Insert, JwPaginationComponent, LanguageMode, LanguageValidation, MapAutoCompleteComponent, MapAutoCompleteOptions, MapAutocompleteDTO, MapSearchTypes, MapZoomLevel, MarkDownIcons, MarkdownEditorComponent, MarkdownEditorOptions, MarkdownMode, MenuListType, Misc, MultiLingualHtmlEditorComponent, MultiLingualHtmlEditorOptions, MultiLingualTextAreaComponent, MultiLingualTextAreaOptions, MultiLingualTextBoxComponent, MultiLingualTextBoxOptions, MultilingualControlOptionsBase, MultipleFileUploadModel, NgTemplateNameDirective, OnPagingFiltersChangeService, PageHeaderComponentComponent, PageHeaderOptions, PagingActionMode, PagingComponent, PagingDTO, PagingOptions, Para, PermissionSets, PhoneComponent, PhoneOptions, PickerType, PreventDoubleClickDirective, ProfileImageUploadOptions, ProfileImageUploaderComponent, ProfilePictureDTO, RadioButtonComponent, RadioButtonItem, RadioButtonOptions, RangeNumber, RecaptchaComponent, RecaptchaModel, RecaptchaOptions, RenderComponentService, RepeaterComponent, RepeaterField, RepeaterFieldBuilderComponent, RepeaterItemFieldComponent, RepeaterOptions, RepeaterTableComponent, SaveDTO, SelectMode, StartView, Style, StyleConfirmationMode, TagInputView, TagsInputComponent, TagsInputDTO, TagsInputOptions, TextAreaComponent, TextAreaOptions, TextBoxModel, TextBoxOptions, TextboxComponent, ToggleSlideOptions, ToggleslideComponent, ToolbarButtons, UploadPersonalImage, environment, options };
|
|
10986
11474
|
//# sourceMappingURL=bnsights-bbsf-controls.mjs.map
|