@bnsights/bbsf-controls 1.0.26 → 1.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -18
- package/bnsights-bbsf-controls-1.0.29.tgz +0 -0
- package/bnsights-bbsf-controls.metadata.json +1 -1
- package/bundles/bnsights-bbsf-controls.umd.js +535 -372
- package/bundles/bnsights-bbsf-controls.umd.js.map +1 -1
- package/esm2015/lib/Shared/Models/RepeaterField.js +1 -1
- package/esm2015/lib/Shared/Models/RepeaterOptions.js +2 -1
- package/esm2015/lib/Shared/services/validationErrorMassage.service.js +12 -12
- package/esm2015/lib/controls/ConfirmationModal/ConfirmationModal.component.js +2 -2
- package/esm2015/lib/controls/DateTimePicker/DateTimePicker.component.js +8 -3
- package/esm2015/lib/controls/ImageUpload/ImageUpload.component.js +7 -5
- package/esm2015/lib/controls/MultiLingualTextArea/MultiLingualTextArea.component.js +3 -3
- package/esm2015/lib/controls/MultiLingualTextBox/MultiLingualTextBox.component.js +3 -3
- package/esm2015/lib/controls/Paging/Paging.component.js +2 -2
- package/esm2015/lib/controls/Repeater/repeater/repeater.component.js +15 -9
- package/esm2015/lib/controls/Repeater/repeater-field-builder/repeater-field-builder.component.js +372 -336
- package/esm2015/lib/controls/Repeater/repeater-table/repeater-table.component.js +105 -0
- package/esm2015/lib/controls/TextArea/TextArea.component.js +2 -2
- package/esm2015/lib/controls/TextBox/TextBox.component.js +2 -2
- package/esm2015/lib/controls/bbsf-controls.module.js +4 -1
- package/esm2015/public-api.js +2 -1
- package/fesm2015/bnsights-bbsf-controls.js +523 -370
- package/fesm2015/bnsights-bbsf-controls.js.map +1 -1
- package/lib/Shared/Models/RepeaterField.d.ts +1 -0
- package/lib/Shared/Models/RepeaterOptions.d.ts +3 -0
- package/lib/controls/DateTimePicker/DateTimePicker.component.d.ts +3 -1
- package/lib/controls/ImageUpload/ImageUpload.component.d.ts +1 -1
- package/lib/controls/Repeater/repeater/repeater.component.d.ts +2 -1
- package/lib/controls/Repeater/repeater-field-builder/repeater-field-builder.component.d.ts +3 -0
- package/lib/controls/Repeater/repeater-table/repeater-table.component.d.ts +16 -0
- package/package.json +2 -2
- package/public-api.d.ts +1 -0
- package/src/lib/assets/Style.css +0 -9
- package/bnsights-bbsf-controls-1.0.26.tgz +0 -0
|
@@ -18,10 +18,10 @@ import { SearchCountryField, NgxIntlTelInputModule } from 'ngx-intl-tel-input';
|
|
|
18
18
|
import { UtilityService, ControlValidationService, BBSFTranslateService, RequestOptionsModel, RequestHandlerService, BBSFUtilitiesModule } from '@bnsights/bbsf-utilities';
|
|
19
19
|
import { BsDatepickerModule } from 'ngx-bootstrap/datepicker';
|
|
20
20
|
import { Subject, Observable, noop, of } from 'rxjs';
|
|
21
|
+
import { DateTimeAdapter, OwlDateTimeModule, OwlNativeDateTimeModule, OWL_DATE_TIME_LOCALE } from 'ng-pick-datetime';
|
|
21
22
|
import { FileUploader, FileLikeObject, FileUploadModule } from 'ng2-file-upload';
|
|
22
23
|
import { __decorate, __awaiter } from 'tslib';
|
|
23
24
|
import { Expose, plainToClass } from 'class-transformer';
|
|
24
|
-
import { OwlDateTimeModule, OwlNativeDateTimeModule, OWL_DATE_TIME_LOCALE } from 'ng-pick-datetime';
|
|
25
25
|
import { NgMultiSelectDropDownModule } from 'ng-multiselect-dropdown';
|
|
26
26
|
import { AngularMultiSelectModule } from 'angular2-multiselect-dropdown';
|
|
27
27
|
import { NgxSummernoteModule } from 'ngx-summernote';
|
|
@@ -96,22 +96,22 @@ class ErrorMassageValidation {
|
|
|
96
96
|
result = this.utilityService.getResourceValue("NumberValidationKey");
|
|
97
97
|
break;
|
|
98
98
|
case "maxlength":
|
|
99
|
-
result = this.utilityService.getResourceValue("MaxLenghtValidationKey") + error.value.requiredLength;
|
|
99
|
+
result = this.utilityService.getResourceValue("MaxLenghtValidationKey") + " " + error.value.requiredLength;
|
|
100
100
|
break;
|
|
101
101
|
case "minlength":
|
|
102
|
-
result = this.utilityService.getResourceValue("MinLenghtValidationKey") + error.value.requiredLength;
|
|
102
|
+
result = this.utilityService.getResourceValue("MinLenghtValidationKey") + " " + error.value.requiredLength;
|
|
103
103
|
break;
|
|
104
104
|
case "min":
|
|
105
|
-
result = this.utilityService.getResourceValue("MinValueValidationKey") + error.value.min;
|
|
105
|
+
result = this.utilityService.getResourceValue("MinValueValidationKey") + " " + error.value.min;
|
|
106
106
|
break;
|
|
107
107
|
case "max":
|
|
108
|
-
result = this.utilityService.getResourceValue("MaxValueValidationKey") + error.value.max;
|
|
108
|
+
result = this.utilityService.getResourceValue("MaxValueValidationKey") + " " + error.value.max;
|
|
109
109
|
break;
|
|
110
110
|
case "validatePhoneNumber":
|
|
111
111
|
result = this.utilityService.getResourceValue("PhoneNumberValidationKey");
|
|
112
112
|
break;
|
|
113
113
|
case "mask":
|
|
114
|
-
result = this.utilityService.getResourceValue("MaskValidationKey") + error.value.requiredMask;
|
|
114
|
+
result = this.utilityService.getResourceValue("MaskValidationKey") + " " + error.value.requiredMask;
|
|
115
115
|
break;
|
|
116
116
|
case "PasswordComplexityHasNumber":
|
|
117
117
|
result = this.utilityService.getResourceValue("PasswordComplexityHasNumber");
|
|
@@ -132,25 +132,25 @@ class ErrorMassageValidation {
|
|
|
132
132
|
result = this.utilityService.getResourceValue("PasswordComplexityHasSpecialLetter");
|
|
133
133
|
break;
|
|
134
134
|
case "MaxWordCountValidationKey":
|
|
135
|
-
result = this.utilityService.getResourceValue("MaxWordCountValidationKey") + error.value;
|
|
135
|
+
result = this.utilityService.getResourceValue("MaxWordCountValidationKey") + " " + error.value;
|
|
136
136
|
break;
|
|
137
137
|
case "NewSelectionValidationKey":
|
|
138
138
|
result = this.utilityService.getResourceValue("NewSelectionValidationKey");
|
|
139
139
|
break;
|
|
140
140
|
case "MaxFileCountValidationKey":
|
|
141
|
-
result = this.utilityService.getResourceValue("MaxFileCountValidationKey") + error.value;
|
|
141
|
+
result = this.utilityService.getResourceValue("MaxFileCountValidationKey") + " " + error.value;
|
|
142
142
|
break;
|
|
143
143
|
case "MinFileCountValidationKey":
|
|
144
|
-
result = this.utilityService.getResourceValue("MinFileCountValidationKey") + error.value;
|
|
144
|
+
result = this.utilityService.getResourceValue("MinFileCountValidationKey") + " " + error.value;
|
|
145
145
|
break;
|
|
146
146
|
case "MaxSizeForAllFilesInMB":
|
|
147
|
-
result = this.utilityService.getResourceValue("MaxSizeForAllFilesInMB") + error.value;
|
|
147
|
+
result = this.utilityService.getResourceValue("MaxSizeForAllFilesInMB") + " " + error.value;
|
|
148
148
|
break;
|
|
149
149
|
case "FileMaxSizeInMB":
|
|
150
|
-
result = this.utilityService.getResourceValue("FileMaxSizeInMB") + error.value;
|
|
150
|
+
result = this.utilityService.getResourceValue("FileMaxSizeInMB") + " " + error.value;
|
|
151
151
|
break;
|
|
152
152
|
case "ToolTipTypeError":
|
|
153
|
-
result = this.utilityService.getResourceValue("ToolTipTypeError") + error.value;
|
|
153
|
+
result = this.utilityService.getResourceValue("ToolTipTypeError") + " " + error.value;
|
|
154
154
|
break;
|
|
155
155
|
default:
|
|
156
156
|
break;
|
|
@@ -341,7 +341,7 @@ OnPagingFiltersChangeService.decorators = [
|
|
|
341
341
|
|
|
342
342
|
class DateInputComponent {
|
|
343
343
|
// tslint:disable-next-line: max-line-length
|
|
344
|
-
constructor(datepipe, onChangeService, ErrorHandler, controlUtility, controlContainer, DateInputControlHost, UtilityService, translate, controlValidationService) {
|
|
344
|
+
constructor(datepipe, onChangeService, ErrorHandler, controlUtility, controlContainer, DateInputControlHost, UtilityService, translate, controlValidationService, dateTimeAdapter) {
|
|
345
345
|
this.datepipe = datepipe;
|
|
346
346
|
this.onChangeService = onChangeService;
|
|
347
347
|
this.ErrorHandler = ErrorHandler;
|
|
@@ -351,6 +351,7 @@ class DateInputComponent {
|
|
|
351
351
|
this.UtilityService = UtilityService;
|
|
352
352
|
this.translate = translate;
|
|
353
353
|
this.controlValidationService = controlValidationService;
|
|
354
|
+
this.dateTimeAdapter = dateTimeAdapter;
|
|
354
355
|
this.OnChange = new EventEmitter();
|
|
355
356
|
this.markAllAsTouched = false;
|
|
356
357
|
this.validationRules = [];
|
|
@@ -381,6 +382,8 @@ class DateInputComponent {
|
|
|
381
382
|
DateInputComponent.controlContainerstatic = this.controlContainer;
|
|
382
383
|
}
|
|
383
384
|
ngOnInit() {
|
|
385
|
+
// Update the DateTimeAdapter Language with the current thread langauge
|
|
386
|
+
this.dateTimeAdapter.setLocale(this.UtilityService.getCurrentLanguage() == "ar" ? "ar" : "en-UK");
|
|
384
387
|
this.controlValidationService.isCreatedBefor = false;
|
|
385
388
|
this.group.addControl(this.options.Name, new FormControl(''));
|
|
386
389
|
this.DatePickerFormControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
|
|
@@ -473,7 +476,8 @@ DateInputComponent.ctorParameters = () => [
|
|
|
473
476
|
{ type: FormGroupDirective },
|
|
474
477
|
{ type: UtilityService },
|
|
475
478
|
{ type: BBSFTranslateService },
|
|
476
|
-
{ type: ControlValidationService }
|
|
479
|
+
{ type: ControlValidationService },
|
|
480
|
+
{ type: DateTimeAdapter }
|
|
477
481
|
];
|
|
478
482
|
DateInputComponent.propDecorators = {
|
|
479
483
|
group: [{ type: Input }],
|
|
@@ -958,7 +962,7 @@ class MultiLingualTextBoxComponent {
|
|
|
958
962
|
}
|
|
959
963
|
this.showInputUsingLanguageMode();
|
|
960
964
|
this.ArabicValidationRules.push(Validators.compose([
|
|
961
|
-
this.controlUtility.patternValidator(
|
|
965
|
+
this.controlUtility.patternValidator(/^[^A-Za-z]*$/, { ArabicLetterOnly: this.ArabicLetterOnly }),
|
|
962
966
|
]));
|
|
963
967
|
this.EnglishValidationRules.push(Validators.compose([
|
|
964
968
|
this.controlUtility.patternValidator(/^[\x00-\x7F]*$/, { EnglishLetterOnly: this.EnglishLetterOnly }),
|
|
@@ -1154,7 +1158,7 @@ MultiLingualTextBoxComponent.controlContainerstatic = null;
|
|
|
1154
1158
|
MultiLingualTextBoxComponent.decorators = [
|
|
1155
1159
|
{ type: Component, args: [{
|
|
1156
1160
|
selector: 'BBSF-MultiLingualTextBox',
|
|
1157
|
-
template: "<div class=\"b-control b-multilangual-textbox\">\r\n
|
|
1161
|
+
template: "<div class=\"b-control b-multilangual-textbox\">\r\n <div class=\"form-group validate is-invalid\" [formGroup]=\"group\">\r\n\r\n <div class=\"form-group row\" [formGroup]=\"MultiLanguagegroup\">\r\n <div [ngClass]=\"(options.MultiControlPlacementType==1)?'col-md-12':'col-md-6'\">\r\n <div class=\"row\" *ngIf=\"ShowEnglishTextBox\">\r\n <label class=\"b-label col-form-label col-sm-12\"\r\n [ngClass]=\"(options.ViewType==1)?'col-md-9':'col-md-3'\" [hidden]=\"options.IsHideEnglishLabel\">\r\n {{(options.EnglishLabelValue!=null&&options.EnglishLabelValue!=\"\")?options.EnglishLabelValue:options.LabelValue}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\"\r\n class=\"text-danger Required-text\" aria-required=\"true\">*</span>\r\n </label>\r\n\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n <div class=\"input-group align-items-center\">\r\n <div class=\"svg svg-icon-grey\" [ngClass]=\"(options.IconPositionEN==1)?'left-icon':'right-icon'\" *ngIf=\"options.Icon!=null\">\r\n <span [inlineSVG]=\"options.Icon\"></span>\r\n </div>\r\n <input class=\"form-control bnsights-control\"\r\n (focus)=\"showEnglishWordCount(true)\" (focusout)=\"showEnglishWordCount(false)\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\" formControlName=\"English\"\r\n [hidden]=\"options.IsHideEnglishFields\" maxlength=\"{{options.MaxLength}}\" minlength=\"{{options.MinLength}}\"\r\n [class.is-invalid]=\"EnglishFormControl.invalid && EnglishFormControl.touched\"\r\n placeholder=\"{{options.EnglishPlaceholder}}\" (change)=\"trimControlValue('En')\"\r\n (keyup)=\"onTextChange()\"\r\n (keydown)=\"EnglishWordCountArray>options.MaxWordCount&&$event.keyCode !=8?$event.preventDefault():null\"\r\n #userinputEnglish>\r\n <div class=\"input-group-append\" [hidden]=\"options.IsHideEnglishFields\" *ngIf=\"options.EnableCopyToClipboard\">\r\n <span class=\"input-group-text\" (click)=\"copyInputMessage(userinputEnglish)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"text-muted font-weight-500 word-count float-end\" *ngIf=\"options.MaxWordCount>0&&IsShowEnglishWordCount\">{{EnglishWordCount}}/{{options.MaxWordCount}}</div>\r\n <div class=\"text-danger Required-text\" *ngIf=\"(EnglishFormControl.invalid && EnglishFormControl.touched)\">\r\n {{getErrorValidation(EnglishFormControl.errors|keyvalue)}}\r\n </div>\r\n\r\n <div class=\"control-desc\" *ngIf=\"(options.LabelDescription!=null&&options.LabelDescription!='') ||(options.EnglishLabelDescription!=null&&options.EnglishLabelDescription!='')\">\r\n {{(options.EnglishLabelDescription!=null&&options.EnglishLabelDescription!=\"\")?options.EnglishLabelDescription:options.LabelDescription}}\r\n </div>\r\n <!-- <div *ngIf=\"EnglishFormControl.valid\">{{resetError()}}</div> -->\r\n <div *ngIf=\"group.valid\">{{resetError()}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div [ngClass]=\"(options.MultiControlPlacementType==1)?'col-md-12':'col-md-6'\">\r\n <div class=\"row\" *ngIf=\"ShowArabicTextBox\">\r\n <label class=\"b-label col-form-label col-sm-12\"\r\n [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\" [hidden]=\"options.IsHideArabicLabel\">\r\n {{(options.ArabicLabelValue!=null&&options.ArabicLabelValue!=\"\")?options.ArabicLabelValue:options.LabelValue}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\" class=\"text-danger Required-text\" aria-required=\"true\">*</span>\r\n </label>\r\n <div class=\" col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n <div class=\"input-group align-items-center\">\r\n <div class=\"svg svg-icon-grey\" [ngClass]=\"(options.IconPositionEN==1)?'right-icon':'left-icon'\" *ngIf=\"options.Icon!=null\">\r\n <span [inlineSVG]=\"options.Icon\"></span>\r\n </div>\r\n <input class=\"form-control bnsights-control\" dir=\"rtl\"\r\n (focus)=\"showArabicWordCount(true)\" (focusout)=\"showArabicWordCount(false)\"\r\n [hidden]=\"options.IsHideArabicFields\" aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n formControlName=\"Arabic\" maxlength=\"{{options.MaxLength}}\" minlength=\"{{options.MinLength}}\"\r\n [class.is-invalid]=\"ArabicFormControl.invalid && ArabicFormControl.touched\"\r\n placeholder=\"{{options.ArabicPlaceholder}}\" (keyup)=\"onTextChange()\"\r\n (keydown)=\"ArabicWordCountArray>options.MaxWordCount&&$event.keyCode !=8?$event.preventDefault():null\"\r\n (change)=\"trimControlValue('Ar')\" #userinputArabic>\r\n\r\n <div class=\"input-group-append\" [hidden]=\"options.IsHideArabicFields\" *ngIf=\"options.EnableCopyToClipboard\">\r\n <span class=\"input-group-text\" (click)=\"copyInputMessage(userinputArabic)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"text-muted font-weight-500 float-end word-count\" *ngIf=\"options.MaxWordCount>0&&IsShowArabicWordCount\">{{ArabicWordCount}}/{{options.MaxWordCount}}</div>\r\n <div class=\"text-danger Required-text\" *ngIf=\"(ArabicFormControl.invalid && ArabicFormControl.touched)\">\r\n {{getErrorValidation(ArabicFormControl.errors|keyvalue)}}\r\n </div>\r\n <div class=\"control-desc\" *ngIf=\"(options.LabelDescription!=null&&options.LabelDescription!='')||(options.ArabicLabelDescription!=null&&options.ArabicLabelDescription!='')\">\r\n {{(options.ArabicLabelDescription!=null&&options.ArabicLabelDescription!=\"\")?options.ArabicLabelDescription:options.LabelDescription}}\r\n </div>\r\n <!-- <div *ngIf=\"ArabicFormControl.valid\">{{resetError()}}</div> -->\r\n <div *ngIf=\"group.valid\">{{resetError()}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n</div>\r\n",
|
|
1158
1162
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}\n"]
|
|
1159
1163
|
},] }
|
|
1160
1164
|
];
|
|
@@ -1300,7 +1304,7 @@ TextAreaComponent.controlContainerstatic = null;
|
|
|
1300
1304
|
TextAreaComponent.decorators = [
|
|
1301
1305
|
{ type: Component, args: [{
|
|
1302
1306
|
selector: 'BBSF-TextArea',
|
|
1303
|
-
template: "<div class=\"b-control b-textarea\">\r\n <div class=\"form-group row validate is-invalid\" [formGroup]=\"group\">\r\n <label class=\"b-label col-form-label col-sm-12 \" [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\"\r\n *ngIf=\"!options.HideLabel\">\r\n {{options.LabelValue}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\" class=\"text-danger Required-text\"\r\n aria-required=\"true\">*</span>\r\n </label>\r\n\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'': ((options.HideLabel)?'col-md-12':'col-md-9')\">\r\n <div class=\"input-group\">\r\n <textarea class=\"form-control bnsights-control {{options.ExtraClasses}}\"\r\n (focus)=\"showWordCount(true)\" (focusout)=\"showWordCount(false)\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\"
|
|
1307
|
+
template: "<div class=\"b-control b-textarea\">\r\n <div class=\"form-group row validate is-invalid\" [formGroup]=\"group\">\r\n <label class=\"b-label col-form-label col-sm-12 \" [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\"\r\n *ngIf=\"!options.HideLabel\">\r\n {{options.LabelValue}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\" class=\"text-danger Required-text\"\r\n aria-required=\"true\">*</span>\r\n </label>\r\n\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'': ((options.HideLabel)?'col-md-12':'col-md-9')\">\r\n <div class=\"input-group\">\r\n <textarea class=\"form-control bnsights-control {{options.ExtraClasses}}\"\r\n (focus)=\"showWordCount(true)\" (focusout)=\"showWordCount(false)\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\" aria-describedby=\"email-error\"\r\n aria-invalid=\"true\" formControlName=\"{{options.Name}}\"\r\n [class.is-invalid]=\"TextAreaFormControl.invalid && TextAreaFormControl.touched\"\r\n placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\" autocomplete=\"{{options.AutoComplete}}\"\r\n (change)=\"trimControlValue()\" rows=\"{{options.Rows}}\" (keyup)=\"onTextChange()\" cols=\"{{options.Cols}}\"\r\n maxlength=\"{{options.MaxLength}}\" minlength=\"{{options.MinLength}}\"\r\n (keydown)=\"WordCountArray>options.MaxWordCount&&$event.keyCode !=8?$event.preventDefault():null\"\r\n #TextAreainput></textarea>\r\n <div class=\"input-group-append\" *ngIf=\"options.EnableCopyToClipboard\">\r\n <span class=\"input-group-text\" (click)=\"copyInputMessage(TextAreainput)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>\r\n </div>\r\n <div class=\"text-muted font-weight-500 word-count float-end\" *ngIf=\"options.MaxWordCount>0&&IsShowWordCount\">{{WordCount}}/{{options.MaxWordCount}} words</div>\r\n </div>\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(TextAreaFormControl.invalid && TextAreaFormControl.touched)\">\r\n {{getErrorValidation(TextAreaFormControl.errors|keyvalue)}}\r\n </div>\r\n <div class=\"control-desc text-dark\" *ngIf=\"options.LabelDescription!=null\">{{options.LabelDescription}}</div>\r\n <!-- <div *ngIf=\"TextAreaFormControl.valid\">{{resetError()}}</div> -->\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
1304
1308
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}.flip_V{transform:scaleY(-1)}\n"]
|
|
1305
1309
|
},] }
|
|
1306
1310
|
];
|
|
@@ -1434,7 +1438,7 @@ class MultiLingualTextAreaComponent {
|
|
|
1434
1438
|
}
|
|
1435
1439
|
this.showInputUsingLanguageMode();
|
|
1436
1440
|
this.ArabicValidationRules.push(Validators.compose([
|
|
1437
|
-
this.controlUtility.patternValidator(
|
|
1441
|
+
this.controlUtility.patternValidator(/^[^A-Za-z]*$/, { ArabicLetterOnly: this.ArabicLetterOnly }),
|
|
1438
1442
|
]));
|
|
1439
1443
|
this.EnglishValidationRules.push(Validators.compose([
|
|
1440
1444
|
this.controlUtility.patternValidator(/^[\x00-\x7F]*$/, { EnglishLetterOnly: this.EnglishLetterOnly }),
|
|
@@ -1620,7 +1624,7 @@ MultiLingualTextAreaComponent.controlContainerstatic = null;
|
|
|
1620
1624
|
MultiLingualTextAreaComponent.decorators = [
|
|
1621
1625
|
{ type: Component, args: [{
|
|
1622
1626
|
selector: 'BBSF-MultiLingualTextArea',
|
|
1623
|
-
template: "<div class=\"b-control b-multilangual-textarea\">\r\n
|
|
1627
|
+
template: "<div class=\"b-control b-multilangual-textarea\">\r\n <div class=\"form-group validate is-invalid\" [formGroup]=\"group\">\r\n\r\n <div class=\"form-group row\" [formGroup]=\"MultiLanguageTextAreagroup\">\r\n <div [ngClass]=\"(options.MultiControlPlacementType==1)?'col-md-12':'col-md-6'\">\r\n <div class=\"row\" *ngIf=\"ShowEngishTextArea\">\r\n <label class=\"b-label col-form-label col-sm-12 \"\r\n [ngClass]=\"(options.ViewType==1)?'col-md-9':'col-md-3'\" [hidden]=\"options.IsHideEnglishLabel\">\r\n {{(options.EnglishLabelValue!=null&&options.EnglishLabelValue!=\"\")?options.EnglishLabelValue:options.LabelValue+\"in English\"}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\"\r\n class=\"text-danger Required-text\" aria-required=\"true\">*</span>\r\n </label>\r\n\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n <div class=\"input-group\">\r\n <textarea class=\"form-control bnsights-control\" rows=\"{{options.Rows}}\" cols=\"{{options.Cols}}\"\r\n (focus)=\"showEnglishWordCount(true)\" (focusout)=\"showEnglishWordCount(false)\"\r\n maxlength=\"{{options.MaxLength}}\" minlength=\"{{options.MinLength}}\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n formControlName=\"English\" [hidden]=\"options.IsHideEnglishFields\"\r\n [class.is-invalid]=\"EnglishTextAreaFormControl.invalid && EnglishTextAreaFormControl.touched\"\r\n placeholder=\"{{options.EnglishPlaceholder}}\" (change)=\"trimControlValue('En')\"\r\n \r\n (keyup)=\"onTextChange()\"\r\n (keydown)=\"EnglishWordCountArray>options.MaxWordCount&&$event.keyCode !=8?$event.preventDefault():null\"\r\n #userinputTextAreaEnglish>\r\n </textarea>\r\n <div class=\"input-group-append\" [hidden]=\"options.IsHideEnglishFields\" *ngIf=\"options.EnableCopyToClipboard\">\r\n <span class=\"input-group-text\" (click)=\"copyInputMessage(userinputTextAreaEnglish)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>\r\n </div>\r\n\r\n\r\n </div>\r\n <div class=\"text-muted font-weight-500 float-end word-count\" *ngIf=\"options.MaxWordCount>0&&IsShowEnglishWordCount\">{{EnglishWordCount}}/{{options.MaxWordCount}}</div>\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(EnglishTextAreaFormControl.invalid && EnglishTextAreaFormControl.touched)\">\r\n {{getErrorValidation(EnglishTextAreaFormControl.errors|keyvalue)}}\r\n </div>\r\n <div class=\"control-desc\" *ngIf=\"(options.LabelDescription!=null&&options.LabelDescription!='') ||(options.EnglishLabelDescription!=null&&options.EnglishLabelDescription!='')\">\r\n {{(options.EnglishLabelDescription!=null&&options.EnglishLabelDescription!=\"\")?options.EnglishLabelDescription:options.LabelDescription}}\r\n </div>\r\n\r\n <!-- <div *ngIf=\"EnglishTextAreaFormControl.valid\">{{resetError()}}</div> -->\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n\r\n\r\n </div>\r\n </div>\r\n </div>\r\n <div [ngClass]=\"(options.MultiControlPlacementType==1)?'col-md-12':'col-md-6'\">\r\n <div class=\"row\" *ngIf=\"ShowArabicTextArea\">\r\n\r\n <label class=\"b-label col-form-label col-sm-12 \"\r\n [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\" [hidden]=\"options.IsHideArabicLable\">\r\n {{(options.ArabicLabelValue!=null&&options.ArabicLabelValue!=\"\")?options.ArabicLabelValue:options.LabelValue+\"in Arabic\"}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\"\r\n class=\"text-danger Required-text\" aria-required=\"true\">*</span>\r\n </label>\r\n <div class=\" col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n <div class=\"input-group\">\r\n <textarea class=\"form-control bnsights-control\" dir=\"rtl\" rows=\"{{options.Rows}}\" cols=\"{{options.Cols}}\"\r\n (focus)=\"showArabicWordCount(true)\" (focusout)=\"showArabicWordCount(false)\"\r\n [hidden]=\"options.IsHideArabicFields\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n formControlName=\"Arabic\" rows=\"{{options.Rows}}\"\r\n maxlength=\"{{options.MaxLength}}\" minlength=\"{{options.MinLength}}\"\r\n [class.is-invalid]=\"ArabicTextAreaFormControl.invalid && ArabicTextAreaFormControl.touched\"\r\n placeholder=\"{{options.ArabicPlaceholder}}\" (change)=\"trimControlValue('Ar')\"\r\n (keyup)=\"onTextChange()\"\r\n (keydown)=\"ArabicWordCountArray>options.MaxWordCount&&$event.keyCode !=8?$event.preventDefault():null\"\r\n #userinputTextAreaArabic>\r\n </textarea>\r\n <div class=\"input-group-append\" [hidden]=\"options.IsHideArabicFields\" *ngIf=\"options.EnableCopyToClipboard\">\r\n <span class=\"input-group-text\" (click)=\"copyInputMessage(userinputTextAreaArabic)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"text-muted font-weight-500 float-end word-count\" *ngIf=\"options.MaxWordCount>0&&IsShowArabicWordCount\">{{ArabicWordCount}}/{{options.MaxWordCount}}</div>\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(ArabicTextAreaFormControl.invalid && ArabicTextAreaFormControl.touched)\">\r\n {{getErrorValidation(ArabicTextAreaFormControl.errors|keyvalue)}}\r\n </div>\r\n <div class=\"control-desc\" *ngIf=\"(options.LabelDescription!=null&&options.LabelDescription!='')||(options.ArabicLabelDescription!=null&&options.ArabicLabelDescription!='')\">\r\n {{(options.ArabicLabelDescription!=null&&options.ArabicLabelDescription!=\"\")?options.ArabicLabelDescription:options.LabelDescription}}\r\n </div>\r\n <!-- <div *ngIf=\"ArabicTextAreaFormControl.valid\">{{resetError()}}</div> -->\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
1624
1628
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}\n"]
|
|
1625
1629
|
},] }
|
|
1626
1630
|
];
|
|
@@ -2783,7 +2787,7 @@ class ImageUploaderComponent {
|
|
|
2783
2787
|
this.FileLikeObject = new FileLikeObject({
|
|
2784
2788
|
name: element.FileName,
|
|
2785
2789
|
size: element.FileSizeInMB * 1000 * 1000,
|
|
2786
|
-
type: element.FileType
|
|
2790
|
+
type: element.FileType,
|
|
2787
2791
|
});
|
|
2788
2792
|
this.uploader.addToQueue([this.FileLikeObject]);
|
|
2789
2793
|
}
|
|
@@ -2798,15 +2802,17 @@ class ImageUploaderComponent {
|
|
|
2798
2802
|
const TypeToolTipe = element.split('/')[1];
|
|
2799
2803
|
this.ToolTipTypeArray.push(TypeToolTipe);
|
|
2800
2804
|
}
|
|
2801
|
-
this.ValidationMessage = this.ValidationMessage +
|
|
2805
|
+
this.ValidationMessage = this.ValidationMessage + this.UtilityService.getResourceValue("AllowedTypes") + ` (${this.ToolTipTypeArray}) `;
|
|
2802
2806
|
}
|
|
2803
2807
|
if (this.options.FileMaxSizeInMB > 0) {
|
|
2804
|
-
this.ValidationMessage = this.ValidationMessage + ` <br />
|
|
2808
|
+
this.ValidationMessage = this.ValidationMessage + ` <br /> ${this.UtilityService.getResourceValue("FileMaxSizeInMB")} ${this.options.FileMaxSizeInMB}`;
|
|
2805
2809
|
}
|
|
2806
2810
|
if (this.options.FileUploadAcceptsTypes != null && this.options.FileUploadAcceptsTypes.length > 0) {
|
|
2807
2811
|
}
|
|
2808
2812
|
this.group.addControl(this.options.Name, new FormControl(''));
|
|
2809
2813
|
this.ImageUploadFormControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
|
|
2814
|
+
if (this.options.Value != null)
|
|
2815
|
+
this.group.get(this.options.Name).setValue(this.options.Value);
|
|
2810
2816
|
if (this.options.LabelKey != null && this.options.LabelKey != "")
|
|
2811
2817
|
this.options.LabelValue = this.UtilityService.getResourceValue(this.options.LabelKey);
|
|
2812
2818
|
if (this.options.CustomValidation.length > 0) {
|
|
@@ -2976,7 +2982,7 @@ ImageUploaderComponent.controlContainerstatic = null;
|
|
|
2976
2982
|
ImageUploaderComponent.decorators = [
|
|
2977
2983
|
{ type: Component, args: [{
|
|
2978
2984
|
selector: 'BBSF-ImageUpload',
|
|
2979
|
-
template: "<div class=\"b-control b-image-upload\">\r\n <div class=\"form-group row validate is-invalid\" [formGroup]=\"group\">\r\n <label class=\"b-label col-form-label col-sm-12 \" [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\" [hidden]=\"options.HideLabel\">\r\n {{options.LabelValue}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\" class=\"text-danger Required-text\" aria-required=\"true\"
|
|
2985
|
+
template: "<div class=\"b-control b-image-upload\">\r\n <div class=\"form-group row validate is-invalid\" [formGroup]=\"group\">\r\n <label class=\"b-label col-form-label col-sm-12 \" [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\" [hidden]=\"options.HideLabel\">\r\n {{options.LabelValue}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\" class=\"text-danger Required-text\" aria-required=\"true\">* </span>\r\n\r\n <ejs-tooltip id=\"tooltip\" content='{{ValidationMessage}}' tipPointerPosition='Middle'>\r\n <i class=\"fa fa-info-circle\" data-plugin=\"tooltip\" data-html=\"true\">\r\n </i>\r\n </ejs-tooltip>\r\n </label>\r\n\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n\r\n <div *ngIf=\"options.AllowDropZone\" style=\"max-width:200px !important; max-height: 200px !important;\" class=\"d-inline-flex h-auto w-auto overflow-hidden m-0 {{options.ExtraClasses}}\" ngx-dropzone [disabled]=\"options.IsDisabled\" [accept]=\"AcceptedType\" [multiple]=\"options.IsMultiple\"\r\n (change)=\"onFileChange($event)\" aria-describedby=\"email-error\" aria-invalid=\"true\" ngDefaultControl formControlName=\"{{options.Name}}\" [maxFileSize]=\"options.FileMaxSizeInMB\"\r\n id=\"{{options.Name}}\" [class.is-invalid]=\"ImageUploadFormControl.invalid && ImageUploadFormControl.touched\">\r\n <ngx-dropzone-label class=\"h-100 m-0\" style=\"max-width: 200px !important;\">\r\n <div class=\"h-100\">\r\n <img [src]=\"ImageSource\" class=\"h-100 w-100\" />\r\n </div>\r\n </ngx-dropzone-label>\r\n\r\n\r\n <ngx-dropzone-image-preview style=\"max-width:200px !important; max-height: 200px !important;\" *ngFor=\"let f of files\" [file]=\"f\" [removable]=\"true\" (removed)=\"removeFromControlValue(f)\"\r\n ngProjectAs=\"ngx-dropzone-preview\" class=\"b-img-preview w-100 h-100 m-0\">\r\n </ngx-dropzone-image-preview>\r\n </div>\r\n\r\n <div class=\"ImageUploadClassSelector\" *ngIf=\"!options.AllowDropZone\">\r\n <ngx-dropzone-label class=\"h-100 m-0\" *ngIf=\"files.length==0\">\r\n <div style=\"max-width:200px !important; max-height: 200px !important;\" class=\"h-100 file-fake-input\" #element (click)=\"showImageUploader(element)\">\r\n <img [src]=\"ImageSource\" class=\"h-100 w-100\" />\r\n </div>\r\n </ngx-dropzone-label>\r\n\r\n <div style=\"border: none !important; max-width:200px !important; max-height: 200px !important;\" class=\" fileSelector customImageUploadPlacment d-inline-flex h-auto w-auto overflow-hidden m-0 {{options.ExtraClasses}}\" ngx-dropzone [disabled]=\"options.IsDisabled\" [accept]=\"AcceptedType\" [multiple]=\"options.IsMultiple\"\r\n (change)=\"onFileChange($event)\" aria-describedby=\"email-error\" aria-invalid=\"true\" ngDefaultControl formControlName=\"{{options.Name}}\" [maxFileSize]=\"options.FileMaxSizeInMB\"\r\n id=\"{{options.Name}}\" [class.is-invalid]=\"ImageUploadFormControl.invalid && ImageUploadFormControl.touched\">\r\n\r\n\r\n\r\n <ngx-dropzone-image-preview style=\"max-width:200px !important; max-height: 200px !important;\" *ngFor=\"let f of files\" [file]=\"f\" [removable]=\"true\" (removed)=\"removeFromControlValue(f)\"\r\n ngProjectAs=\"ngx-dropzone-preview\" class=\"b-img-preview w-100 h-100 m-0\">\r\n </ngx-dropzone-image-preview>\r\n </div>\r\n </div>\r\n\r\n\r\n <div id=\"mdlSample\" class=\"modal fade\" role=\"dialog\" style=\"z-index: 11 !important ;\"\r\n [ngStyle]=\"{'display': mdlSampleIsOpen ? 'block' : 'none', 'opacity': 1}\">\r\n <div class=\"modal-dialog modal-lg\">\r\n <div class=\"modal-content\">\r\n <div class=\"modal-header\">\r\n <h4 class=\"modal-title\">\r\n {{UtilityService.getResourceValue(\"CropImage\")}}\r\n </h4>\r\n <button type=\"button\" class=\"btn-close\" aria-hidden=\"true\" data-dismiss=\"modal\" aria-label=\"Close\" (click)=\"openModal(false)\"></button>\r\n </div>\r\n <div class=\"modal-body py-5\">\r\n <div *ngIf=\"imageUrl\">\r\n <angular-cropper #angularCropper [cropperOptions]=\"config\" [imageUrl]=\"imageUrl\">\r\n </angular-cropper>\r\n <img [src]=\"imgwUrl\" />\r\n </div>\r\n <div style=\"text-align:center;\">\r\n <div class=\"btn-group\">\r\n <button type=\"button\" (click)=\"zoomImage(0.1)\" class=\"btn btn-default\" data-method=\"zoom\" data-option=\"0.1\" title=\"Zoom In\">\r\n <span class=\"docs-tooltip\" data-toggle=\"tooltip\" title=\"\" data-original-title=\"cropper.zoom(0.1)\">\r\n <span class=\"fa fa-search-plus\"></span>\r\n </span>\r\n </button>\r\n <button type=\"button\" (click)=\"zoomImage(-0.1)\" class=\"btn btn-default\" data-method=\"zoom\" data-option=\"-0.1\" title=\"Zoom Out\">\r\n <span class=\"docs-tooltip\" data-toggle=\"tooltip\" title=\"\" data-original-title=\"cropper.zoom(-0.1)\">\r\n <span class=\"fa fa-search-minus\"></span>\r\n </span>\r\n </button>\r\n </div>\r\n <div class=\"btn-group\">\r\n <button type=\"button\" (click)=\"moveImage(-10,0)\" class=\"btn btn-default\" data-method=\"move\" data-option=\"-10\" data-second-option=\"0\" title=\"Move Left\">\r\n <span class=\"docs-tooltip\" data-toggle=\"tooltip\" title=\"\" data-original-title=\"cropper.move(-10, 0)\" aria-describedby=\"tooltip631939\">\r\n <span class=\"fa fa-arrow-left\"></span>\r\n </span>\r\n </button>\r\n <button type=\"button\" (click)=\"moveImage(10,0)\" class=\"btn btn-default\" data-method=\"move\" data-option=\"10\" data-second-option=\"0\" title=\"Move Right\">\r\n <span class=\"docs-tooltip\" data-toggle=\"tooltip\" title=\"\" data-original-title=\"cropper.move(10, 0)\">\r\n <span class=\"fa fa-arrow-right\"></span>\r\n </span>\r\n </button>\r\n <button type=\"button\" (click)=\"moveImage(0,-10)\" class=\"btn btn-default\" data-method=\"move\" data-option=\"0\" data-second-option=\"-10\" title=\"Move Up\">\r\n <span class=\"docs-tooltip\" data-toggle=\"tooltip\" title=\"\" data-original-title=\"cropper.move(0, -10)\">\r\n <span class=\"fa fa-arrow-up\"></span>\r\n </span>\r\n </button>\r\n <button type=\"button\" (click)=\"moveImage(0,10)\" class=\"btn btn-default\" data-method=\"move\" data-option=\"0\" data-second-option=\"10\" title=\"Move Down\">\r\n <span class=\"docs-tooltip\" data-toggle=\"tooltip\" title=\"\" data-original-title=\"cropper.move(0, 10)\">\r\n <span class=\"fa fa-arrow-down\"></span>\r\n </span>\r\n </button>\r\n </div>\r\n <div class=\"btn-group\">\r\n <button type=\"button\" (click)=\"rotateImage(-45)\" class=\"btn btn-default\" data-method=\"rotate\" data-option=\"-45\" title=\"Rotate Left\">\r\n <span class=\"docs-tooltip\" data-toggle=\"tooltip\" title=\"\" data-original-title=\"cropper.rotate(-45)\" aria-describedby=\"tooltip236044\">\r\n <span class=\"fa fa-undo-alt\"></span>\r\n </span>\r\n </button>\r\n <button type=\"button\" (click)=\"rotateImage(45)\" class=\"btn btn-default\" data-method=\"rotate\" data-option=\"45\" title=\"Rotate Right\">\r\n <span class=\"docs-tooltip\" data-toggle=\"tooltip\" title=\"\" data-original-title=\"cropper.rotate(45)\">\r\n <span class=\"fa fa-redo-alt\"></span>\r\n </span>\r\n </button>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n <div class=\"modal-footer\" align=\"right\">\r\n <button type=\"button\" id=\"btnClose\" class=\"btn btn-default\" (click)=\"openModal(false)\">\r\n <i class=\"fa fa-times fa-fw\"></i> {{UtilityService.getResourceValue(\"CancelLabel\")}}\r\n </button>\r\n <button type=\"button\" (click)=\"cropImage()\" id=\"btnOK\" class=\"btn btn-success\">\r\n <i class=\"fa fa-check fa-fw\"></i>\r\n {{UtilityService.getResourceValue(\"Crop\")}}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"text-danger Required-text\" *ngIf=\"(ImageUploadFormControl.invalid && ImageUploadFormControl.touched)\">\r\n {{getErrorValidation(ImageUploadFormControl.errors|keyvalue)}}\r\n </div>\r\n\r\n <div class=\"d-flex justify-content-between align-items-center\">\r\n <div class=\"control-desc text-dark\">{{options.LabelDescription}}</div>\r\n </div>\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n </div>\r\n\r\n </div>\r\n</div>\r\n",
|
|
2980
2986
|
styles: [".e-tip-content{background-color:#afafaf;color:#fff;padding-left:10px;padding-right:10px;padding-top:2px}.my-drop-zone{border:dotted 3px lightgray}.nv-file-over{border:dotted 3px red}.another-file-over-class{border:dotted 3px green}html,body{height:100%}.modal{display:none;position:fixed;z-index:1;padding-top:100px;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:#000;background-color:#0006}.modal-content{position:relative;background-color:#fefefe;margin:auto;padding:0;border:1px solid #888;width:80%;box-shadow:0 4px 8px #0003,0 6px 20px #00000030;-webkit-animation-name:animatetop;-webkit-animation-duration:.4s;animation-name:animatetop;animation-duration:.4s}@keyframes animatetop{0%{top:-300px;opacity:0}to{top:0;opacity:1}}.close{color:#fff;float:right;font-size:28px;font-weight:bold}.ImageUploadClassSelector img{cursor:pointer}.d-inline-flex.h-auto.m-0.overflow-hidden.w-auto.ng-untouched.ng-pristine.ng-valid{border-radius:40px;border-color:#c7c7c7}\n"]
|
|
2981
2987
|
},] }
|
|
2982
2988
|
];
|
|
@@ -3999,7 +4005,7 @@ class PagingComponent {
|
|
|
3999
4005
|
PagingComponent.decorators = [
|
|
4000
4006
|
{ type: Component, args: [{
|
|
4001
4007
|
selector: 'BBSF-Paging',
|
|
4002
|
-
template: "<div class=\"b-control b-paging\" *ngIf=\"(result.length > 0)\">\r\n <div class=\"d-flex justify-content-between align-items-center\" *ngIf=\"!options.IsLoadMoreControl\">\r\n <div class=\"b-pagination\">\r\n <jw-pagination [items]=\"items\" *ngIf=\"!((Pages==1)&&options.HidePaginationWhenPageSizeEqualOne)\"\r\n (changePage)=\"onChangePage($event)\" [pageSize]=\"options.PageSize\" [ShowFirstAndLast]=\"options.ShowFirstAndLast\"\r\n [initialPage]=\"1\" [maxPages]=\"10\"></jw-pagination>\r\n </div>\r\n <div class=\"b-pages d-flex\" *ngIf=\"!((Pages==1)&&options.HidePaginationWhenPageSizeEqualOne)\" >\r\n <select (change)=\"changePageSize($event)\" *ngIf=\"options.ShowPageSizeOption\">\r\n <option>10</option>\r\n <option>20</option>\r\n <option>50</option>\r\n <option>100</option>\r\n <option>200</option>\r\n </select>\r\n <div class=\"b-items ml-3\">\r\n <strong>{{totalRow}}</strong> {{utilityService.getResourceValue(\"ItemsIn\")}} <strong> {{Pages}}</strong> {{utilityService.getResourceValue(\"Pages\")}}\r\n </div>\r\n </div>\r\n </div>\r\n \r\n <div class=\"row\" style=\"align-self:center; align-items: center; text-align: center;\" *ngIf=\"options.IsLoadMoreControl\">\r\n <div class=\"search-results\" infinite-scroll [infiniteScrollDistance]=\"ScrollDistance\"\r\n [infiniteScrollUpDistance]=\"ScrollUpDistance\" [infiniteScrollThrottle]=\"Throttle\" (scrolled)=\"options.IsInfiniteScroll==true?onScrollDown():null\"\r\n [scrollWindow]=\"options.ScrollWindow\" [infiniteScrollContainer]=\"options.InfiniteScrollContainer\">\r\n </div>\r\n <button class=\"btn btn-
|
|
4008
|
+
template: "<div class=\"b-control b-paging\" *ngIf=\"(result.length > 0)\">\r\n <div class=\"d-flex justify-content-between align-items-center\" *ngIf=\"!options.IsLoadMoreControl\">\r\n <div class=\"b-pagination\">\r\n <jw-pagination [items]=\"items\" *ngIf=\"!((Pages==1)&&options.HidePaginationWhenPageSizeEqualOne)\"\r\n (changePage)=\"onChangePage($event)\" [pageSize]=\"options.PageSize\" [ShowFirstAndLast]=\"options.ShowFirstAndLast\"\r\n [initialPage]=\"1\" [maxPages]=\"10\"></jw-pagination>\r\n </div>\r\n <div class=\"b-pages d-flex\" *ngIf=\"!((Pages==1)&&options.HidePaginationWhenPageSizeEqualOne)\" >\r\n <select (change)=\"changePageSize($event)\" *ngIf=\"options.ShowPageSizeOption\">\r\n <option>10</option>\r\n <option>20</option>\r\n <option>50</option>\r\n <option>100</option>\r\n <option>200</option>\r\n </select>\r\n <div class=\"b-items ml-3\">\r\n <strong>{{totalRow}}</strong> {{utilityService.getResourceValue(\"ItemsIn\")}} <strong> {{Pages}}</strong> {{utilityService.getResourceValue(\"Pages\")}}\r\n </div>\r\n </div>\r\n </div>\r\n \r\n <div class=\"row\" style=\"align-self:center; align-items: center; text-align: center;\" *ngIf=\"options.IsLoadMoreControl\">\r\n <div class=\"search-results\" infinite-scroll [infiniteScrollDistance]=\"ScrollDistance\"\r\n [infiniteScrollUpDistance]=\"ScrollUpDistance\" [infiniteScrollThrottle]=\"Throttle\" (scrolled)=\"options.IsInfiniteScroll==true?onScrollDown():null\"\r\n [scrollWindow]=\"options.ScrollWindow\" [infiniteScrollContainer]=\"options.InfiniteScrollContainer\">\r\n </div>\r\n <button class=\"btn btn-info\" (click)=\"onScrollDown()\" *ngIf=\"!(result.length==totalRow)\">{{utilityService.getResourceValue(\"LoadMore\")}}</button>\r\n </div>\r\n</div>\r\n",
|
|
4003
4009
|
styles: [".ngx-pager-container{text-align:center;padding:25px 0 0}.ngx-pager-container li{display:inline-block;margin:0 4px}.ngx-pager-container li a{display:block;width:26px;height:26px;border:1px solid #707070;text-align:center;color:#3e4e59;font-size:14px;line-height:24px;border-radius:5px;text-decoration:none}.ngx-pager-container li a:hover{color:#fff;background:#0a0e03}.ngx-pager-container li.invisible{display:none}.ngx-pager-container li.active{background:#0a0e03;border-radius:5px}.ngx-pager-container li.active a{border:none;color:#fff}\n"]
|
|
4004
4010
|
},] }
|
|
4005
4011
|
];
|
|
@@ -4440,7 +4446,7 @@ TextboxComponent.controlContainerstatic = null;
|
|
|
4440
4446
|
TextboxComponent.decorators = [
|
|
4441
4447
|
{ type: Component, args: [{
|
|
4442
4448
|
selector: 'BBSF-TextBox',
|
|
4443
|
-
template: "<div class=\"b-control b-textbox\">\r\n
|
|
4449
|
+
template: "<div class=\"b-control b-textbox\">\r\n <div class=\"form-group row validate is-invalid\" [formGroup]=\"group\" [ngClass]=\"(options.NoMargin==true)?'':'NoMargin'\">\r\n <label class=\"b-label col-form-label col-sm-12 \" [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\" *ngIf=\"!options.HideLabel\">\r\n {{options.LabelValue}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\" class=\"text-danger Required-text\"\r\n aria-required=\"true\">*</span>\r\n </label>\r\n\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'': ((options.HideLabel)?'col-md-12':'col-md-9')\">\r\n <div class=\"input-group align-items-center\" *ngIf=\"MaskPattern!=null&&MaskPattern!=''\">\r\n <div class=\"svg svg-icon-grey\" [ngClass]=\"(options.IconPosition==1)?'left-icon':'right-icon'\" *ngIf=\"options.Icon!=null\">\r\n <span [inlineSVG]=\"options.Icon\"></span>\r\n </div>\r\n <input [mask]=\"MaskPattern\" placeHolderCharacter=\" \" [showMaskTyped]=\"true\" [validation]=\"true\"\r\n class=\"form-control bnsights-control {{options.ExtraClasses}}\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\" formControlName=\"{{options.Name}}\"\r\n type=\"{{getInputType(options.Type)}}\"\r\n [class.is-invalid]=\"TextBoxFormControl.invalid && TextBoxFormControl.touched\"\r\n placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\" autocomplete=\"{{options.AutoComplete}}\"\r\n (change)=\"trimControlValue()\" (keyup)=\"onTextChange()\"\r\n (keydown)=\"WordCountArray>options.MaxWordCount&&$event.keyCode !=8?$event.preventDefault():null\"\r\n #userinput>\r\n <div class=\"input-group-append\">\r\n <span class=\"input-group-text\" *ngIf=\"options.EnableCopyToClipboard\" (click)=\"copyInputMessage(userinput)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>\r\n </div>\r\n <div class=\"text-muted font-weight-500 word-count\" *ngIf=\"options.MaxWordCount>0&&IsShowWordCount\">{{WordCount}}/{{options.MaxWordCount}} Words</div>\r\n </div>\r\n\r\n <div class=\"input-group align-items-center\" *ngIf=\"MaskPattern==null||MaskPattern==''\">\r\n <div class=\"svg svg-icon-grey\" [ngClass]=\"(options.IconPosition==1)?'left-icon':'right-icon'\" *ngIf=\"options.Icon!=null\">\r\n <span [inlineSVG]=\"options.Icon\"></span>\r\n </div>\r\n <input class=\"form-control bnsights-control {{options.ExtraClasses}} \"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\"\r\n (focus)=\"showWordCount(true)\" (focusout)=\"showWordCount(false)\"\r\n maxlength=\"{{options.MaxLength}}\" minlength=\"{{options.MinLength}}\"\r\n aria-describedby=\"email-error\"\r\n aria-invalid=\"true\" formControlName=\"{{options.Name}}\" type=\"{{getInputType(options.Type)}}\"\r\n [class.is-invalid]=\"TextBoxFormControl.invalid && TextBoxFormControl.touched\"\r\n placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\" autocomplete=\"{{options.AutoComplete}}\"\r\n (change)=\"trimControlValue()\" (keyup)=\"onTextChange()\"\r\n (keydown)=\"WordCountArray>options.MaxWordCount&&$event.keyCode !=8?$event.preventDefault():null\"\r\n #userinput>\r\n <div class=\"input-group-append\" *ngIf=\"options.EnableCopyToClipboard\">\r\n <span class=\"input-group-text\" (click)=\"copyInputMessage(userinput)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>\r\n </div>\r\n <div class=\"text-muted font-weight-500 word-count float-end\" *ngIf=\"options.MaxWordCount>0&&IsShowWordCount\">{{WordCount}}/{{options.MaxWordCount}} Words</div>\r\n </div>\r\n <div class=\"text-danger Required-text\" dir=\"{{options.ForceDirection==2?'rtl':''}}\"\r\n *ngIf=\"(TextBoxFormControl.invalid && TextBoxFormControl.touched)\">\r\n {{getErrorValidation(TextBoxFormControl.errors|keyvalue)}}\r\n </div>\r\n <div class=\"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) \">{{resetError()}}</div>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
4444
4450
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}.flip_V{transform:scaleY(-1)}\n"]
|
|
4445
4451
|
},] }
|
|
4446
4452
|
];
|
|
@@ -5062,7 +5068,7 @@ class ConfirmationModalComponent {
|
|
|
5062
5068
|
showCancelButton: true,
|
|
5063
5069
|
confirmButtonColor: this.btnColor,
|
|
5064
5070
|
cancelButtonColor: '#f5f8fa',
|
|
5065
|
-
cancelButtonText: this.utilityService.getResourceValue("
|
|
5071
|
+
cancelButtonText: this.utilityService.getResourceValue("CancelLabel"),
|
|
5066
5072
|
confirmButtonText: this.options.SubmitButtonText,
|
|
5067
5073
|
showCloseButton: true,
|
|
5068
5074
|
}).then((result) => {
|
|
@@ -5170,16 +5176,23 @@ class RepeaterComponent {
|
|
|
5170
5176
|
constructor() {
|
|
5171
5177
|
this.templateRefs = [];
|
|
5172
5178
|
this.items = [];
|
|
5179
|
+
this.originalItems = [];
|
|
5173
5180
|
this.repeaterContext = { index: 0, delete: null, elements: null };
|
|
5174
5181
|
}
|
|
5175
5182
|
ngOnInit() {
|
|
5176
5183
|
this.currentTemplate = this.initialTemplate;
|
|
5177
5184
|
this.repeaterGroup = new FormGroup({});
|
|
5178
5185
|
this.group.addControl(this.options.Name, this.repeaterGroup);
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
this.
|
|
5186
|
+
if (this.options.RepeaterValue.length > 0) {
|
|
5187
|
+
this.originalItems = this.options.RepeaterValue;
|
|
5188
|
+
for (let index = 0; index < this.options.RepeaterValue.length; index++) {
|
|
5189
|
+
this.items.push(index + 1);
|
|
5190
|
+
}
|
|
5182
5191
|
}
|
|
5192
|
+
else
|
|
5193
|
+
for (let index = 0; index < this.options.MinRequiredItems; index++) {
|
|
5194
|
+
this.items.push(index);
|
|
5195
|
+
}
|
|
5183
5196
|
this.repeaterGroup.valueChanges.subscribe((res) => {
|
|
5184
5197
|
let result = [];
|
|
5185
5198
|
let rowNumber = [];
|
|
@@ -5243,11 +5256,10 @@ class RepeaterComponent {
|
|
|
5243
5256
|
}
|
|
5244
5257
|
}
|
|
5245
5258
|
}
|
|
5246
|
-
|
|
5247
|
-
this.items = this.items.filter((res) => res != item);
|
|
5259
|
+
this.items = this.items.filter((res) => res != this.items[Index]);
|
|
5248
5260
|
}
|
|
5249
|
-
|
|
5250
|
-
this.items.push(this.items.length + 1);
|
|
5261
|
+
addItem() {
|
|
5262
|
+
this.items.push(this.items[this.items.length - 1] + 1);
|
|
5251
5263
|
}
|
|
5252
5264
|
ngAfterViewInit() {
|
|
5253
5265
|
let templateRefs = this._templates["_results"].map((item) => item["template"]);
|
|
@@ -5262,7 +5274,7 @@ class RepeaterComponent {
|
|
|
5262
5274
|
RepeaterComponent.decorators = [
|
|
5263
5275
|
{ type: Component, args: [{
|
|
5264
5276
|
selector: 'BBSF-repeater',
|
|
5265
|
-
template: "<
|
|
5277
|
+
template: "<ng-container *ngFor='let item of items ; index as i'>\r\n {{setCurrentIndex(i)}}\r\n <ng-container *ngTemplateOutlet=\"currentTemplate; context: repeaterContext\">\r\n </ng-container>\r\n\r\n</ng-container>\r\n\r\n<ng-container *ngTemplateOutlet=\"add\">\r\n</ng-container>\r\n\r\n<ng-template *ngFor=\"let RepeaterField of options.RepeaterStructure ; index as i\" name=\"R{{i}}\" let-Index=\"itemIndex\"\r\n let-control=\"controlIndex\">\r\n <repeater-field-builder *ngIf=\"RepeaterField\" [RepeaterField]=\"RepeaterField\" [itemNumber]=\"Index\"\r\n [itemsValue]=\"originalItems\" [controlNumber]=\"control\" [group]=\"repeaterGroup\">\r\n </repeater-field-builder>\r\n</ng-template>\r\n\r\n<ng-template #delete let-item=\"itemIndex\">\r\n <button class=\"{{options.DeleteButtonExtraClasses}}\" type=\"button\" (click)=\"deleteItem(item)\"\r\n [disabled]=\"items.length ==options.MinRequiredItems&&options.IsRequired\"> <span\r\n [innerHTML]=\"options.DeleteButtonText\"></span></button>\r\n</ng-template>\r\n\r\n<ng-template #add>\r\n <button class=\"{{options.AddButtonExtraClasses}}\" type=\"button\" (click)=\"addItem()\"><span\r\n [innerHTML]=\"options.AddButtonText\"></span></button>\r\n</ng-template>\r\n\r\n\r\n\r\n\r\n\r\n<!-- <ng-template adHost></ng-template> -->\r\n",
|
|
5266
5278
|
styles: [""]
|
|
5267
5279
|
},] }
|
|
5268
5280
|
];
|
|
@@ -5513,11 +5525,23 @@ class RepeaterFieldBuilderComponent {
|
|
|
5513
5525
|
constructor(renderComponentService, TextControlHost) {
|
|
5514
5526
|
this.renderComponentService = renderComponentService;
|
|
5515
5527
|
this.TextControlHost = TextControlHost;
|
|
5528
|
+
this.itemsValue = [];
|
|
5529
|
+
this.itemValue = null;
|
|
5516
5530
|
}
|
|
5517
5531
|
ngOnInit() {
|
|
5518
5532
|
}
|
|
5519
5533
|
ngAfterViewInit() {
|
|
5520
5534
|
setTimeout(() => {
|
|
5535
|
+
if (this.itemsValue.length > 0)
|
|
5536
|
+
this.itemValue = this.itemsValue[this.itemNumber];
|
|
5537
|
+
if (this.itemValue) {
|
|
5538
|
+
for (const key in this.itemValue) {
|
|
5539
|
+
if (Object.prototype.hasOwnProperty.call(this.itemValue, key) && key == this.RepeaterField.ControlOptions.Name) {
|
|
5540
|
+
const element = this.itemValue[key];
|
|
5541
|
+
this.value = element;
|
|
5542
|
+
}
|
|
5543
|
+
}
|
|
5544
|
+
}
|
|
5521
5545
|
this.Item.clear();
|
|
5522
5546
|
switch (this.RepeaterField.ControlType) {
|
|
5523
5547
|
///TextBox
|
|
@@ -5534,6 +5558,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5534
5558
|
Text.MaxLength = this.RepeaterField.ControlOptions.maxLength;
|
|
5535
5559
|
if (this.RepeaterField.ControlOptions.minLength)
|
|
5536
5560
|
Text.MinLength = this.RepeaterField.ControlOptions.minLength;
|
|
5561
|
+
Text.Value = this.value;
|
|
5537
5562
|
this.renderComponentService.renderDynamicComponent(this.Item, TextboxComponent, this.group, Text);
|
|
5538
5563
|
break;
|
|
5539
5564
|
case DataType.Name:
|
|
@@ -5549,6 +5574,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5549
5574
|
if (this.RepeaterField.ControlOptions.minLength)
|
|
5550
5575
|
Name.MinLength = this.RepeaterField.ControlOptions.minLength;
|
|
5551
5576
|
Name.Type = InputType.Text;
|
|
5577
|
+
Name.Value = this.value;
|
|
5552
5578
|
this.renderComponentService.renderDynamicComponent(this.Item, TextboxComponent, this.group, Name);
|
|
5553
5579
|
break;
|
|
5554
5580
|
case DataType.Email:
|
|
@@ -5560,6 +5586,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5560
5586
|
Email.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
5561
5587
|
Email.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
5562
5588
|
Email.Type = InputType.Email;
|
|
5589
|
+
Email.Value = this.value;
|
|
5563
5590
|
this.renderComponentService.renderDynamicComponent(this.Item, TextboxComponent, this.group, Email);
|
|
5564
5591
|
break;
|
|
5565
5592
|
case DataType.Number:
|
|
@@ -5575,6 +5602,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5575
5602
|
rangeNumber.To = this.RepeaterField.ControlOptions.maxLength;
|
|
5576
5603
|
rangeNumber.From = this.RepeaterField.ControlOptions.minLength;
|
|
5577
5604
|
Number.NumberRange = rangeNumber;
|
|
5605
|
+
Number.Value = this.value;
|
|
5578
5606
|
this.renderComponentService.renderDynamicComponent(this.Item, TextboxComponent, this.group, Number);
|
|
5579
5607
|
break;
|
|
5580
5608
|
///DateTime
|
|
@@ -5589,6 +5617,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5589
5617
|
Date.PickerType = PickerType.Calendar;
|
|
5590
5618
|
Date.SelectMode = SelectMode.Single;
|
|
5591
5619
|
Date.StartView = StartView.Month;
|
|
5620
|
+
Date.Value = this.value;
|
|
5592
5621
|
this.renderComponentService.renderDynamicComponent(this.Item, DateInputComponent, this.group, Date);
|
|
5593
5622
|
break;
|
|
5594
5623
|
case DataType.DateTime:
|
|
@@ -5602,6 +5631,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5602
5631
|
DateTime.PickerType = PickerType.Both;
|
|
5603
5632
|
DateTime.SelectMode = SelectMode.Single;
|
|
5604
5633
|
DateTime.StartView = StartView.Month;
|
|
5634
|
+
DateTime.Value = this.value;
|
|
5605
5635
|
this.renderComponentService.renderDynamicComponent(this.Item, DateInputComponent, this.group, DateTime);
|
|
5606
5636
|
break;
|
|
5607
5637
|
case DataType.Time:
|
|
@@ -5615,6 +5645,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5615
5645
|
Time.PickerType = PickerType.Timer;
|
|
5616
5646
|
Time.SelectMode = SelectMode.Single;
|
|
5617
5647
|
Time.StartView = StartView.Month;
|
|
5648
|
+
Time.Value = this.value;
|
|
5618
5649
|
this.renderComponentService.renderDynamicComponent(this.Item, DateInputComponent, this.group, Time);
|
|
5619
5650
|
break;
|
|
5620
5651
|
//Dropdown
|
|
@@ -5630,6 +5661,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5630
5661
|
SingleSelect.SingleSelection = true;
|
|
5631
5662
|
SingleSelect.ShowCheckbox = false;
|
|
5632
5663
|
SingleSelect.AllowSearchFilter = this.RepeaterField.ControlOptions.hasSearch;
|
|
5664
|
+
SingleSelect.SelectedItems = this.value;
|
|
5633
5665
|
this.renderComponentService.renderDynamicComponent(this.Item, DropdownListComponent, this.group, SingleSelect);
|
|
5634
5666
|
break;
|
|
5635
5667
|
case DataType.MulipleSelect:
|
|
@@ -5644,6 +5676,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5644
5676
|
MulipleSelect.SingleSelection = false;
|
|
5645
5677
|
MulipleSelect.ShowCheckbox = false;
|
|
5646
5678
|
MulipleSelect.AllowSearchFilter = this.RepeaterField.ControlOptions.hasSearch;
|
|
5679
|
+
MulipleSelect.SelectedItems = this.value;
|
|
5647
5680
|
this.renderComponentService.renderDynamicComponent(this.Item, DropdownListComponent, this.group, MulipleSelect);
|
|
5648
5681
|
break;
|
|
5649
5682
|
case DataType.Goal:
|
|
@@ -5658,6 +5691,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5658
5691
|
Goal.SingleSelection = !this.RepeaterField.ControlOptions.isMultiple;
|
|
5659
5692
|
Goal.ShowCheckbox = false;
|
|
5660
5693
|
Goal.AllowSearchFilter = this.RepeaterField.ControlOptions.hasSearch;
|
|
5694
|
+
Goal.SelectedItems = this.value;
|
|
5661
5695
|
this.renderComponentService.renderDynamicComponent(this.Item, DropdownListComponent, this.group, Goal);
|
|
5662
5696
|
break;
|
|
5663
5697
|
case DataType.Challenge:
|
|
@@ -5673,6 +5707,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5673
5707
|
Challenge.SingleSelection = !this.RepeaterField.ControlOptions.isMultiple;
|
|
5674
5708
|
Challenge.ShowCheckbox = false;
|
|
5675
5709
|
Challenge.AllowSearchFilter = this.RepeaterField.ControlOptions.hasSearch;
|
|
5710
|
+
Challenge.SelectedItems = this.value;
|
|
5676
5711
|
this.renderComponentService.renderDynamicComponent(this.Item, DropdownListComponent, this.group, Challenge);
|
|
5677
5712
|
break;
|
|
5678
5713
|
case DataType.InnovationLab:
|
|
@@ -5687,6 +5722,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5687
5722
|
InnovationLab.SingleSelection = !this.RepeaterField.ControlOptions.isMultiple;
|
|
5688
5723
|
InnovationLab.ShowCheckbox = false;
|
|
5689
5724
|
InnovationLab.AllowSearchFilter = this.RepeaterField.ControlOptions.hasSearch;
|
|
5725
|
+
InnovationLab.SelectedItems = this.value;
|
|
5690
5726
|
this.renderComponentService.renderDynamicComponent(this.Item, DropdownListComponent, this.group, InnovationLab);
|
|
5691
5727
|
break;
|
|
5692
5728
|
case DataType.Country:
|
|
@@ -5701,6 +5737,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5701
5737
|
Country.SingleSelection = !this.RepeaterField.ControlOptions.isMultiple;
|
|
5702
5738
|
Country.ShowCheckbox = false;
|
|
5703
5739
|
Country.AllowSearchFilter = this.RepeaterField.ControlOptions.hasSearch;
|
|
5740
|
+
Country.SelectedItems = this.value;
|
|
5704
5741
|
this.renderComponentService.renderDynamicComponent(this.Item, DropdownListComponent, this.group, Country);
|
|
5705
5742
|
break;
|
|
5706
5743
|
//FileUpload
|
|
@@ -5713,6 +5750,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5713
5750
|
File.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
5714
5751
|
File.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
5715
5752
|
File.FileMaxSizeInMB = this.RepeaterField.ControlOptions.maxFileSizeInMB;
|
|
5753
|
+
File.Value = this.value;
|
|
5716
5754
|
this.renderComponentService.renderDynamicComponent(this.Item, FileUploadComponent, this.group, File);
|
|
5717
5755
|
break;
|
|
5718
5756
|
case DataType.MultiFile:
|
|
@@ -5726,6 +5764,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5726
5764
|
MultiFile.MaxSizeForAllFilesInMB = this.RepeaterField.ControlOptions.maxFileSizeInMB;
|
|
5727
5765
|
MultiFile.MaxNoOfFiles = this.RepeaterField.ControlOptions.maxFileCount;
|
|
5728
5766
|
MultiFile.IsMultipleFile = true;
|
|
5767
|
+
MultiFile.Value = this.value;
|
|
5729
5768
|
this.renderComponentService.renderDynamicComponent(this.Item, FileUploadComponent, this.group, MultiFile);
|
|
5730
5769
|
break;
|
|
5731
5770
|
//ImageUpload
|
|
@@ -5739,6 +5778,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5739
5778
|
Image.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
5740
5779
|
if (this.RepeaterField.ControlOptions.maxFileSizeInMB)
|
|
5741
5780
|
Image.FileMaxSizeInMB = this.RepeaterField.ControlOptions.maxFileSizeInMB;
|
|
5781
|
+
Image.Value = this.value;
|
|
5742
5782
|
this.renderComponentService.renderDynamicComponent(this.Item, ImageUploaderComponent, this.group, Image);
|
|
5743
5783
|
break;
|
|
5744
5784
|
case DataType.CoverPhoto:
|
|
@@ -5751,6 +5791,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5751
5791
|
CoverPhoto.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
5752
5792
|
if (this.RepeaterField.ControlOptions.maxFileSizeInMB)
|
|
5753
5793
|
CoverPhoto.FileMaxSizeInMB = this.RepeaterField.ControlOptions.maxFileSizeInMB;
|
|
5794
|
+
CoverPhoto.Value = this.value;
|
|
5754
5795
|
this.renderComponentService.renderDynamicComponent(this.Item, ImageUploaderComponent, this.group, CoverPhoto);
|
|
5755
5796
|
break;
|
|
5756
5797
|
//Mobile
|
|
@@ -5766,6 +5807,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5766
5807
|
Mobile.PhoneValidation = true;
|
|
5767
5808
|
Mobile.SelectFirstCountry = true;
|
|
5768
5809
|
Mobile.EnablePlaceholder = true;
|
|
5810
|
+
Mobile.Value = this.value;
|
|
5769
5811
|
this.renderComponentService.renderDynamicComponent(this.Item, PhoneComponent, this.group, Mobile);
|
|
5770
5812
|
break;
|
|
5771
5813
|
//MultilineText
|
|
@@ -5783,6 +5825,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5783
5825
|
MultilineText.MinLength = this.RepeaterField.ControlOptions.minLength;
|
|
5784
5826
|
MultilineText.Rows = this.RepeaterField.ControlOptions.rows;
|
|
5785
5827
|
MultilineText.ForceDirection = this.RepeaterField.ControlOptions.ForceDirection;
|
|
5828
|
+
MultilineText.Value = this.value;
|
|
5786
5829
|
this.renderComponentService.renderDynamicComponent(this.Item, TextAreaComponent, this.group, MultilineText);
|
|
5787
5830
|
break;
|
|
5788
5831
|
//HTML
|
|
@@ -5800,6 +5843,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5800
5843
|
HTML.MinLength = this.RepeaterField.ControlOptions.minLength;
|
|
5801
5844
|
HTML.Height = this.RepeaterField.ControlOptions.rows;
|
|
5802
5845
|
HTML.ForceDirection = this.RepeaterField.ControlOptions.ForceDirection;
|
|
5846
|
+
HTML.Value = this.value;
|
|
5803
5847
|
this.renderComponentService.renderDynamicComponent(this.Item, HtmlEditorComponent, this.group, HTML);
|
|
5804
5848
|
break;
|
|
5805
5849
|
//Boolean
|
|
@@ -5809,6 +5853,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5809
5853
|
Boolean.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
5810
5854
|
Boolean.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
5811
5855
|
Boolean.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
5856
|
+
Boolean.Value = this.value;
|
|
5812
5857
|
Boolean.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
5813
5858
|
this.renderComponentService.renderDynamicComponent(this.Item, ToggleslideComponent, this.group, Boolean);
|
|
5814
5859
|
break;
|
|
@@ -5820,6 +5865,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5820
5865
|
Location.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
5821
5866
|
Location.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
5822
5867
|
Location.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
5868
|
+
Location.Value = this.value;
|
|
5823
5869
|
Location.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
5824
5870
|
this.renderComponentService.renderDynamicComponent(this.Item, MapAutoCompleteComponent, this.group, Location);
|
|
5825
5871
|
break;
|
|
@@ -5829,341 +5875,342 @@ class RepeaterFieldBuilderComponent {
|
|
|
5829
5875
|
}, 0);
|
|
5830
5876
|
}
|
|
5831
5877
|
ngOnChanges(changes) {
|
|
5832
|
-
if (changes.itemNumber
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
|
|
5846
|
-
|
|
5847
|
-
|
|
5848
|
-
|
|
5849
|
-
|
|
5850
|
-
|
|
5851
|
-
|
|
5852
|
-
|
|
5853
|
-
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5896
|
-
|
|
5897
|
-
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
|
|
5947
|
-
|
|
5948
|
-
|
|
5949
|
-
|
|
5950
|
-
|
|
5951
|
-
|
|
5952
|
-
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
|
|
5956
|
-
|
|
5957
|
-
|
|
5958
|
-
|
|
5959
|
-
|
|
5960
|
-
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6022
|
-
|
|
6023
|
-
|
|
6024
|
-
|
|
6025
|
-
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
|
|
6032
|
-
|
|
6033
|
-
|
|
6034
|
-
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6042
|
-
|
|
6043
|
-
|
|
6044
|
-
|
|
6045
|
-
|
|
6046
|
-
|
|
6047
|
-
|
|
6048
|
-
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
|
|
6054
|
-
|
|
6055
|
-
|
|
6056
|
-
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
|
|
6063
|
-
|
|
6064
|
-
|
|
6065
|
-
|
|
6066
|
-
|
|
6067
|
-
|
|
6068
|
-
|
|
6069
|
-
|
|
6070
|
-
|
|
6071
|
-
|
|
6072
|
-
|
|
6073
|
-
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
|
|
6084
|
-
|
|
6085
|
-
|
|
6086
|
-
|
|
6087
|
-
|
|
6088
|
-
|
|
6089
|
-
|
|
6090
|
-
|
|
6091
|
-
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
|
|
6126
|
-
|
|
6127
|
-
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
|
|
5878
|
+
if (changes.itemNumber)
|
|
5879
|
+
if (changes.itemNumber.previousValue) {
|
|
5880
|
+
let name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.previousValue.toString() + "." + this.controlNumber.toString();
|
|
5881
|
+
let value = this.group.controls[name].value;
|
|
5882
|
+
this.Item.clear();
|
|
5883
|
+
this.group.removeControl(name);
|
|
5884
|
+
switch (this.RepeaterField.ControlType) {
|
|
5885
|
+
///TextBox
|
|
5886
|
+
case DataType.Text:
|
|
5887
|
+
let Text = new TextBoxOptions();
|
|
5888
|
+
Text.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
5889
|
+
Text.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
5890
|
+
Text.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
5891
|
+
Text.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
5892
|
+
Text.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
5893
|
+
Text.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
5894
|
+
Text.Type = InputType.Text;
|
|
5895
|
+
if (this.RepeaterField.ControlOptions.maxLength)
|
|
5896
|
+
Text.MaxLength = this.RepeaterField.ControlOptions.maxLength;
|
|
5897
|
+
if (this.RepeaterField.ControlOptions.minLength)
|
|
5898
|
+
Text.MinLength = this.RepeaterField.ControlOptions.minLength;
|
|
5899
|
+
Text.Value = value;
|
|
5900
|
+
this.renderComponentService.renderDynamicComponent(this.Item, TextboxComponent, this.group, Text);
|
|
5901
|
+
break;
|
|
5902
|
+
case DataType.Name:
|
|
5903
|
+
let Name = new TextBoxOptions();
|
|
5904
|
+
Name.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
5905
|
+
Name.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
5906
|
+
Name.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
5907
|
+
Name.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
5908
|
+
Name.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
5909
|
+
Name.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
5910
|
+
if (this.RepeaterField.ControlOptions.maxLength)
|
|
5911
|
+
Name.MaxLength = this.RepeaterField.ControlOptions.maxLength;
|
|
5912
|
+
if (this.RepeaterField.ControlOptions.minLength)
|
|
5913
|
+
Name.MinLength = this.RepeaterField.ControlOptions.minLength;
|
|
5914
|
+
Name.Type = InputType.Text;
|
|
5915
|
+
Name.Value = value;
|
|
5916
|
+
this.renderComponentService.renderDynamicComponent(this.Item, TextboxComponent, this.group, Name);
|
|
5917
|
+
break;
|
|
5918
|
+
case DataType.Email:
|
|
5919
|
+
let Email = new TextBoxOptions();
|
|
5920
|
+
Email.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
5921
|
+
Email.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
5922
|
+
Email.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
5923
|
+
Email.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
5924
|
+
Email.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
5925
|
+
Email.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
5926
|
+
Email.Type = InputType.Email;
|
|
5927
|
+
Email.Value = value;
|
|
5928
|
+
this.renderComponentService.renderDynamicComponent(this.Item, TextboxComponent, this.group, Email);
|
|
5929
|
+
break;
|
|
5930
|
+
case DataType.Number:
|
|
5931
|
+
let Number = new TextBoxOptions();
|
|
5932
|
+
Number.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
5933
|
+
Number.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
5934
|
+
Number.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
5935
|
+
Number.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
5936
|
+
Number.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
5937
|
+
Number.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
5938
|
+
Number.Type = InputType.Number;
|
|
5939
|
+
let rangeNumber = new RangeNumber();
|
|
5940
|
+
rangeNumber.To = this.RepeaterField.ControlOptions.maxLength;
|
|
5941
|
+
rangeNumber.From = this.RepeaterField.ControlOptions.minLength;
|
|
5942
|
+
Number.NumberRange = rangeNumber;
|
|
5943
|
+
Number.Value = value;
|
|
5944
|
+
this.renderComponentService.renderDynamicComponent(this.Item, TextboxComponent, this.group, Number);
|
|
5945
|
+
break;
|
|
5946
|
+
///DateTime
|
|
5947
|
+
case DataType.Date:
|
|
5948
|
+
let Date = new DatePickerOptions();
|
|
5949
|
+
Date.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
5950
|
+
Date.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
5951
|
+
Date.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
5952
|
+
Date.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
5953
|
+
Date.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
5954
|
+
Date.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
5955
|
+
Date.PickerType = PickerType.Calendar;
|
|
5956
|
+
Date.SelectMode = SelectMode.Single;
|
|
5957
|
+
Date.StartView = StartView.Month;
|
|
5958
|
+
Date.Value = value;
|
|
5959
|
+
this.renderComponentService.renderDynamicComponent(this.Item, DateInputComponent, this.group, Date);
|
|
5960
|
+
break;
|
|
5961
|
+
case DataType.DateTime:
|
|
5962
|
+
let DateTime = new DatePickerOptions();
|
|
5963
|
+
DateTime.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
5964
|
+
DateTime.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
5965
|
+
DateTime.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
5966
|
+
DateTime.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
5967
|
+
DateTime.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
5968
|
+
DateTime.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
5969
|
+
DateTime.PickerType = PickerType.Both;
|
|
5970
|
+
DateTime.SelectMode = SelectMode.Single;
|
|
5971
|
+
DateTime.StartView = StartView.Month;
|
|
5972
|
+
DateTime.Value = value;
|
|
5973
|
+
this.renderComponentService.renderDynamicComponent(this.Item, DateInputComponent, this.group, DateTime);
|
|
5974
|
+
break;
|
|
5975
|
+
case DataType.Time:
|
|
5976
|
+
let Time = new DatePickerOptions();
|
|
5977
|
+
Time.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
5978
|
+
Time.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
5979
|
+
Time.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
5980
|
+
Time.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
5981
|
+
Time.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
5982
|
+
Time.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
5983
|
+
Time.PickerType = PickerType.Timer;
|
|
5984
|
+
Time.SelectMode = SelectMode.Single;
|
|
5985
|
+
Time.StartView = StartView.Month;
|
|
5986
|
+
Time.Value = value;
|
|
5987
|
+
this.renderComponentService.renderDynamicComponent(this.Item, DateInputComponent, this.group, Time);
|
|
5988
|
+
break;
|
|
5989
|
+
//Dropdown
|
|
5990
|
+
case DataType.SingleSelect:
|
|
5991
|
+
let SingleSelect = new DropdownOptions();
|
|
5992
|
+
SingleSelect.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
5993
|
+
SingleSelect.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
5994
|
+
SingleSelect.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
5995
|
+
SingleSelect.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
5996
|
+
SingleSelect.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
5997
|
+
SingleSelect.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
5998
|
+
SingleSelect.DataSource = this.RepeaterField.ControlOptions.dataSource;
|
|
5999
|
+
SingleSelect.SingleSelection = true;
|
|
6000
|
+
SingleSelect.ShowCheckbox = false;
|
|
6001
|
+
SingleSelect.AllowSearchFilter = this.RepeaterField.ControlOptions.hasSearch;
|
|
6002
|
+
SingleSelect.SelectedItems = value;
|
|
6003
|
+
this.renderComponentService.renderDynamicComponent(this.Item, DropdownListComponent, this.group, SingleSelect);
|
|
6004
|
+
break;
|
|
6005
|
+
case DataType.MulipleSelect:
|
|
6006
|
+
let MulipleSelect = new DropdownOptions();
|
|
6007
|
+
MulipleSelect.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6008
|
+
MulipleSelect.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6009
|
+
MulipleSelect.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6010
|
+
MulipleSelect.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6011
|
+
MulipleSelect.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6012
|
+
MulipleSelect.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6013
|
+
MulipleSelect.DataSource = this.RepeaterField.ControlOptions.dataSource;
|
|
6014
|
+
MulipleSelect.SingleSelection = false;
|
|
6015
|
+
MulipleSelect.ShowCheckbox = false;
|
|
6016
|
+
MulipleSelect.AllowSearchFilter = this.RepeaterField.ControlOptions.hasSearch;
|
|
6017
|
+
MulipleSelect.SelectedItems = value;
|
|
6018
|
+
this.renderComponentService.renderDynamicComponent(this.Item, DropdownListComponent, this.group, MulipleSelect);
|
|
6019
|
+
break;
|
|
6020
|
+
case DataType.Goal:
|
|
6021
|
+
let Goal = new DropdownOptions();
|
|
6022
|
+
Goal.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6023
|
+
Goal.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6024
|
+
Goal.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6025
|
+
Goal.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6026
|
+
Goal.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6027
|
+
Goal.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6028
|
+
Goal.DataSource = this.RepeaterField.ControlOptions.dataSource;
|
|
6029
|
+
Goal.SingleSelection = !this.RepeaterField.ControlOptions.isMultiple;
|
|
6030
|
+
Goal.ShowCheckbox = false;
|
|
6031
|
+
Goal.AllowSearchFilter = this.RepeaterField.ControlOptions.hasSearch;
|
|
6032
|
+
Goal.SelectedItems = value;
|
|
6033
|
+
this.renderComponentService.renderDynamicComponent(this.Item, DropdownListComponent, this.group, Goal);
|
|
6034
|
+
break;
|
|
6035
|
+
case DataType.Challenge:
|
|
6036
|
+
let Challenge = new DropdownOptions();
|
|
6037
|
+
Challenge.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6038
|
+
Challenge.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6039
|
+
Challenge.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6040
|
+
Challenge.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6041
|
+
Challenge.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6042
|
+
Challenge.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6043
|
+
Challenge.DataSource = this.RepeaterField.ControlOptions.dataSource;
|
|
6044
|
+
Challenge.DataSource = this.RepeaterField.ControlOptions.dataSource;
|
|
6045
|
+
Challenge.SingleSelection = !this.RepeaterField.ControlOptions.isMultiple;
|
|
6046
|
+
Challenge.ShowCheckbox = false;
|
|
6047
|
+
Challenge.AllowSearchFilter = this.RepeaterField.ControlOptions.hasSearch;
|
|
6048
|
+
Challenge.SelectedItems = value;
|
|
6049
|
+
this.renderComponentService.renderDynamicComponent(this.Item, DropdownListComponent, this.group, Challenge);
|
|
6050
|
+
break;
|
|
6051
|
+
case DataType.InnovationLab:
|
|
6052
|
+
let InnovationLab = new DropdownOptions();
|
|
6053
|
+
InnovationLab.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6054
|
+
InnovationLab.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6055
|
+
InnovationLab.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6056
|
+
InnovationLab.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6057
|
+
InnovationLab.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6058
|
+
InnovationLab.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6059
|
+
InnovationLab.DataSource = this.RepeaterField.ControlOptions.dataSource;
|
|
6060
|
+
InnovationLab.SingleSelection = !this.RepeaterField.ControlOptions.isMultiple;
|
|
6061
|
+
InnovationLab.ShowCheckbox = false;
|
|
6062
|
+
InnovationLab.AllowSearchFilter = this.RepeaterField.ControlOptions.hasSearch;
|
|
6063
|
+
InnovationLab.SelectedItems = value;
|
|
6064
|
+
this.renderComponentService.renderDynamicComponent(this.Item, DropdownListComponent, this.group, InnovationLab);
|
|
6065
|
+
break;
|
|
6066
|
+
case DataType.Country:
|
|
6067
|
+
let Country = new DropdownOptions();
|
|
6068
|
+
Country.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6069
|
+
Country.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6070
|
+
Country.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6071
|
+
Country.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6072
|
+
Country.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6073
|
+
Country.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6074
|
+
Country.DataSource = this.RepeaterField.ControlOptions.dataSource;
|
|
6075
|
+
Country.SingleSelection = !this.RepeaterField.ControlOptions.isMultiple;
|
|
6076
|
+
Country.ShowCheckbox = false;
|
|
6077
|
+
Country.AllowSearchFilter = this.RepeaterField.ControlOptions.hasSearch;
|
|
6078
|
+
Country.SelectedItems = value;
|
|
6079
|
+
this.renderComponentService.renderDynamicComponent(this.Item, DropdownListComponent, this.group, Country);
|
|
6080
|
+
break;
|
|
6081
|
+
//FileUpload
|
|
6082
|
+
case DataType.File:
|
|
6083
|
+
let File = new FileUploadOptions();
|
|
6084
|
+
File.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6085
|
+
File.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6086
|
+
File.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6087
|
+
File.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6088
|
+
File.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6089
|
+
File.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6090
|
+
File.FileMaxSizeInMB = this.RepeaterField.ControlOptions.maxFileSizeInMB;
|
|
6091
|
+
File.Value = value;
|
|
6092
|
+
this.renderComponentService.renderDynamicComponent(this.Item, FileUploadComponent, this.group, File);
|
|
6093
|
+
break;
|
|
6094
|
+
case DataType.MultiFile:
|
|
6095
|
+
let MultiFile = new FileUploadOptions();
|
|
6096
|
+
File.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6097
|
+
File.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6098
|
+
File.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6099
|
+
File.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6100
|
+
File.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6101
|
+
File.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6102
|
+
MultiFile.MaxSizeForAllFilesInMB = this.RepeaterField.ControlOptions.maxFileSizeInMB;
|
|
6103
|
+
MultiFile.MaxNoOfFiles = this.RepeaterField.ControlOptions.maxFileCount;
|
|
6104
|
+
MultiFile.IsMultipleFile = true;
|
|
6105
|
+
MultiFile.Value = value;
|
|
6106
|
+
this.renderComponentService.renderDynamicComponent(this.Item, FileUploadComponent, this.group, MultiFile);
|
|
6107
|
+
break;
|
|
6108
|
+
//ImageUpload
|
|
6109
|
+
case DataType.Image:
|
|
6110
|
+
let Image = new ImageUploadOptions();
|
|
6111
|
+
Image.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6112
|
+
Image.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6113
|
+
Image.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6114
|
+
Image.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6115
|
+
Image.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6116
|
+
Image.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6117
|
+
if (this.RepeaterField.ControlOptions.maxFileSizeInMB)
|
|
6118
|
+
Image.FileMaxSizeInMB = this.RepeaterField.ControlOptions.maxFileSizeInMB;
|
|
6119
|
+
Image.Value = value;
|
|
6120
|
+
this.renderComponentService.renderDynamicComponent(this.Item, ImageUploaderComponent, this.group, Image);
|
|
6121
|
+
break;
|
|
6122
|
+
case DataType.CoverPhoto:
|
|
6123
|
+
let CoverPhoto = new ImageUploadOptions();
|
|
6124
|
+
CoverPhoto.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6125
|
+
CoverPhoto.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6126
|
+
CoverPhoto.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6127
|
+
CoverPhoto.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6128
|
+
CoverPhoto.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6129
|
+
CoverPhoto.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6130
|
+
if (this.RepeaterField.ControlOptions.maxFileSizeInMB)
|
|
6131
|
+
CoverPhoto.FileMaxSizeInMB = this.RepeaterField.ControlOptions.maxFileSizeInMB;
|
|
6132
|
+
CoverPhoto.Value = value;
|
|
6133
|
+
this.renderComponentService.renderDynamicComponent(this.Item, ImageUploaderComponent, this.group, CoverPhoto);
|
|
6134
|
+
break;
|
|
6135
|
+
//Mobile
|
|
6136
|
+
case DataType.Mobile:
|
|
6137
|
+
let Mobile = new PhoneOptions();
|
|
6138
|
+
Mobile.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6139
|
+
Mobile.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6140
|
+
Mobile.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6141
|
+
Mobile.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6142
|
+
Mobile.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6143
|
+
Mobile.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6144
|
+
Mobile.AllowSearch = true;
|
|
6145
|
+
Mobile.PhoneValidation = true;
|
|
6146
|
+
Mobile.SelectFirstCountry = true;
|
|
6147
|
+
Mobile.EnablePlaceholder = true;
|
|
6148
|
+
Mobile.Value = value;
|
|
6149
|
+
this.renderComponentService.renderDynamicComponent(this.Item, PhoneComponent, this.group, Mobile);
|
|
6150
|
+
break;
|
|
6151
|
+
//MultilineText
|
|
6152
|
+
case DataType.MultilineText:
|
|
6153
|
+
let MultilineText = new TextAreaOptions();
|
|
6154
|
+
MultilineText.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6155
|
+
MultilineText.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6156
|
+
MultilineText.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6157
|
+
MultilineText.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6158
|
+
MultilineText.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6159
|
+
MultilineText.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6160
|
+
if (this.RepeaterField.ControlOptions.maxLength)
|
|
6161
|
+
MultilineText.MaxLength = this.RepeaterField.ControlOptions.maxLength;
|
|
6162
|
+
if (this.RepeaterField.ControlOptions.minLength)
|
|
6163
|
+
MultilineText.MinLength = this.RepeaterField.ControlOptions.minLength;
|
|
6164
|
+
MultilineText.Rows = this.RepeaterField.ControlOptions.rows;
|
|
6165
|
+
MultilineText.ForceDirection = this.RepeaterField.ControlOptions.ForceDirection;
|
|
6166
|
+
MultilineText.Value = value;
|
|
6167
|
+
this.renderComponentService.renderDynamicComponent(this.Item, TextAreaComponent, this.group, MultilineText);
|
|
6168
|
+
break;
|
|
6169
|
+
//HTML
|
|
6170
|
+
case DataType.HTML:
|
|
6171
|
+
let HTML = new HtmlEditorOptions();
|
|
6172
|
+
HTML.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6173
|
+
HTML.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6174
|
+
HTML.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6175
|
+
HTML.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6176
|
+
HTML.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6177
|
+
HTML.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6178
|
+
if (this.RepeaterField.ControlOptions.maxLength)
|
|
6179
|
+
HTML.MaxLength = this.RepeaterField.ControlOptions.maxLength;
|
|
6180
|
+
if (this.RepeaterField.ControlOptions.minLength)
|
|
6181
|
+
HTML.MinLength = this.RepeaterField.ControlOptions.minLength;
|
|
6182
|
+
HTML.Height = this.RepeaterField.ControlOptions.rows;
|
|
6183
|
+
HTML.ForceDirection = this.RepeaterField.ControlOptions.ForceDirection;
|
|
6184
|
+
HTML.Value = value;
|
|
6185
|
+
this.renderComponentService.renderDynamicComponent(this.Item, HtmlEditorComponent, this.group, HTML);
|
|
6186
|
+
break;
|
|
6187
|
+
//Boolean
|
|
6188
|
+
case DataType.Boolean:
|
|
6189
|
+
let Boolean = new ToggleSlideOptions();
|
|
6190
|
+
Boolean.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6191
|
+
Boolean.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6192
|
+
Boolean.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6193
|
+
Boolean.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6194
|
+
Boolean.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6195
|
+
Boolean.Value = value;
|
|
6196
|
+
this.renderComponentService.renderDynamicComponent(this.Item, ToggleslideComponent, this.group, Boolean);
|
|
6197
|
+
break;
|
|
6198
|
+
//Location
|
|
6199
|
+
case DataType.Location:
|
|
6200
|
+
let Location = new MapAutoCompleteOptions();
|
|
6201
|
+
Location.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6202
|
+
Location.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6203
|
+
Location.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6204
|
+
Location.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6205
|
+
Location.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6206
|
+
Location.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6207
|
+
Location.Value = value;
|
|
6208
|
+
this.renderComponentService.renderDynamicComponent(this.Item, MapAutoCompleteComponent, this.group, Location);
|
|
6209
|
+
break;
|
|
6210
|
+
default:
|
|
6211
|
+
break;
|
|
6212
|
+
}
|
|
6165
6213
|
}
|
|
6166
|
-
}
|
|
6167
6214
|
}
|
|
6168
6215
|
}
|
|
6169
6216
|
RepeaterFieldBuilderComponent.decorators = [
|
|
@@ -6181,7 +6228,8 @@ RepeaterFieldBuilderComponent.propDecorators = {
|
|
|
6181
6228
|
group: [{ type: Input }],
|
|
6182
6229
|
itemNumber: [{ type: Input }],
|
|
6183
6230
|
controlNumber: [{ type: Input }],
|
|
6184
|
-
RepeaterField: [{ type: Input }]
|
|
6231
|
+
RepeaterField: [{ type: Input }],
|
|
6232
|
+
itemsValue: [{ type: Input }]
|
|
6185
6233
|
};
|
|
6186
6234
|
|
|
6187
6235
|
class RepeaterItemFieldComponent {
|
|
@@ -6203,6 +6251,108 @@ RepeaterItemFieldComponent.propDecorators = {
|
|
|
6203
6251
|
itemIndex: [{ type: Input }]
|
|
6204
6252
|
};
|
|
6205
6253
|
|
|
6254
|
+
class RepeaterTableComponent {
|
|
6255
|
+
constructor(utilityService) {
|
|
6256
|
+
this.utilityService = utilityService;
|
|
6257
|
+
this.items = [];
|
|
6258
|
+
this.originalItems = [];
|
|
6259
|
+
}
|
|
6260
|
+
ngOnInit() {
|
|
6261
|
+
this.repeaterGroup = new FormGroup({});
|
|
6262
|
+
this.group.addControl(this.options.Name, this.repeaterGroup);
|
|
6263
|
+
if (this.options.RepeaterValue.length > 0) {
|
|
6264
|
+
this.originalItems = this.options.RepeaterValue;
|
|
6265
|
+
for (let index = 0; index < this.options.RepeaterValue.length; index++) {
|
|
6266
|
+
this.items.push(index + 1);
|
|
6267
|
+
}
|
|
6268
|
+
}
|
|
6269
|
+
else
|
|
6270
|
+
for (let index = 0; index < this.options.MinRequiredItems; index++) {
|
|
6271
|
+
this.items.push(index);
|
|
6272
|
+
}
|
|
6273
|
+
this.repeaterGroup.valueChanges.subscribe((res) => {
|
|
6274
|
+
let result = [];
|
|
6275
|
+
let rowNumber = [];
|
|
6276
|
+
let addItems = [];
|
|
6277
|
+
for (const key in this.repeaterGroup.controls) {
|
|
6278
|
+
if (Object.prototype.hasOwnProperty.call(this.repeaterGroup.controls, key)) {
|
|
6279
|
+
const keySplitArr = key.split('.');
|
|
6280
|
+
let item = {
|
|
6281
|
+
[keySplitArr[1]]: { [keySplitArr[0]]: this.group.controls[this.options.Name].value[key] }
|
|
6282
|
+
};
|
|
6283
|
+
addItems.push(item);
|
|
6284
|
+
if (!rowNumber.includes(keySplitArr[1]))
|
|
6285
|
+
rowNumber.push(keySplitArr[1]);
|
|
6286
|
+
}
|
|
6287
|
+
}
|
|
6288
|
+
for (let index = 0; index < rowNumber.length; index++) {
|
|
6289
|
+
const row = rowNumber[index];
|
|
6290
|
+
let addObject = {};
|
|
6291
|
+
let filteredElements = addItems.filter(item => item[row]);
|
|
6292
|
+
for (let index = 0; index < filteredElements.length; index++) {
|
|
6293
|
+
const filteredElement = filteredElements[index];
|
|
6294
|
+
for (const key in filteredElement) {
|
|
6295
|
+
if (Object.prototype.hasOwnProperty.call(filteredElement, key)) {
|
|
6296
|
+
const element = filteredElement[key];
|
|
6297
|
+
for (const key in element) {
|
|
6298
|
+
if (Object.prototype.hasOwnProperty.call(element, key)) {
|
|
6299
|
+
const value = element[key];
|
|
6300
|
+
addObject[key] = value;
|
|
6301
|
+
}
|
|
6302
|
+
}
|
|
6303
|
+
}
|
|
6304
|
+
}
|
|
6305
|
+
}
|
|
6306
|
+
result.push(addObject);
|
|
6307
|
+
}
|
|
6308
|
+
this.options.RepeaterValue = result;
|
|
6309
|
+
});
|
|
6310
|
+
}
|
|
6311
|
+
deleteItem(Index) {
|
|
6312
|
+
if (this.items.length == this.options.MinRequiredItems && this.options.IsRequired)
|
|
6313
|
+
return;
|
|
6314
|
+
let deletedControls = [];
|
|
6315
|
+
let controlNames = this.options.RepeaterStructure.map(e => e.ControlOptions.Name);
|
|
6316
|
+
for (const key in this.repeaterGroup.controls) {
|
|
6317
|
+
if (Object.prototype.hasOwnProperty.call(this.repeaterGroup.controls, key)) {
|
|
6318
|
+
for (let index = 0; index < controlNames.length; index++) {
|
|
6319
|
+
const element = controlNames[index];
|
|
6320
|
+
const keySplitArr = key.split('.');
|
|
6321
|
+
if (keySplitArr[0] + keySplitArr[1] == `${element}${Index}`) {
|
|
6322
|
+
const element = this.repeaterGroup.controls[key];
|
|
6323
|
+
deletedControls.push({ [key]: element });
|
|
6324
|
+
}
|
|
6325
|
+
}
|
|
6326
|
+
}
|
|
6327
|
+
}
|
|
6328
|
+
for (let index = 0; index < deletedControls.length; index++) {
|
|
6329
|
+
const element = deletedControls[index];
|
|
6330
|
+
for (const key in element) {
|
|
6331
|
+
if (Object.prototype.hasOwnProperty.call(element, key)) {
|
|
6332
|
+
this.repeaterGroup.removeControl(key);
|
|
6333
|
+
}
|
|
6334
|
+
}
|
|
6335
|
+
}
|
|
6336
|
+
this.items = this.items.filter((res) => res != this.items[Index]);
|
|
6337
|
+
}
|
|
6338
|
+
addItem() {
|
|
6339
|
+
this.items.push(this.items[this.items.length - 1] + 1);
|
|
6340
|
+
}
|
|
6341
|
+
}
|
|
6342
|
+
RepeaterTableComponent.decorators = [
|
|
6343
|
+
{ type: Component, args: [{
|
|
6344
|
+
selector: 'BBSF-repeater-table',
|
|
6345
|
+
template: "<div class=\"b-control b-repeater-table\">\r\n <table class=\"{{options.RepeaterTableExtraClasses}}\">\r\n <thead>\r\n <tr class=\"{{options.RepeaterTableRowExtraClasses}}\">\r\n <th *ngFor=\"let item of options.RepeaterStructure\" class=\"min-w-150px\">{{item.HeaderTitle}}</th>\r\n <th>{{utilityService.getResourceValue(options.ActionLabelKey)}}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let item of items ; index as i\">\r\n <td *ngFor=\"let RepeaterField of options.RepeaterStructure ; index as r\">\r\n <repeater-field-builder [RepeaterField]=\"RepeaterField\" [itemNumber]=\"i\" [itemsValue]=\"originalItems\"\r\n [controlNumber]=\"r\" [group]=\"repeaterGroup\"></repeater-field-builder>\r\n </td>\r\n <td>\r\n <button class=\"{{options.DeleteButtonExtraClasses}}\" type=\"button\" (click)=\"deleteItem(i)\"\r\n [disabled]=\"(items.length ==options.MinRequiredItems&&options.IsRequired) ||(originalItems.length-1>=i)\"> <span\r\n [innerHTML]=\"options.DeleteButtonText\"></span></button>\r\n </td>\r\n </tr>\r\n </tbody>\r\n <tfoot>\r\n <tr>\r\n <button class=\"{{options.AddButtonExtraClasses}}\" type=\"button\" (click)=\"addItem()\"><span\r\n [innerHTML]=\"options.AddButtonText\"></span></button>\r\n </tr>\r\n </tfoot>\r\n </table>\r\n</div>"
|
|
6346
|
+
},] }
|
|
6347
|
+
];
|
|
6348
|
+
RepeaterTableComponent.ctorParameters = () => [
|
|
6349
|
+
{ type: UtilityService }
|
|
6350
|
+
];
|
|
6351
|
+
RepeaterTableComponent.propDecorators = {
|
|
6352
|
+
group: [{ type: Input }],
|
|
6353
|
+
options: [{ type: Input }]
|
|
6354
|
+
};
|
|
6355
|
+
|
|
6206
6356
|
let options;
|
|
6207
6357
|
let AppInjector;
|
|
6208
6358
|
FullCalendarModule.registerPlugins([
|
|
@@ -6250,6 +6400,7 @@ BBSFControlsModule.decorators = [
|
|
|
6250
6400
|
RepeaterFieldBuilderComponent,
|
|
6251
6401
|
NgTemplateNameDirective,
|
|
6252
6402
|
RepeaterItemFieldComponent,
|
|
6403
|
+
RepeaterTableComponent
|
|
6253
6404
|
],
|
|
6254
6405
|
imports: [
|
|
6255
6406
|
CommonModule,
|
|
@@ -6344,6 +6495,7 @@ BBSFControlsModule.decorators = [
|
|
|
6344
6495
|
RepeaterFieldBuilderComponent,
|
|
6345
6496
|
NgTemplateNameDirective,
|
|
6346
6497
|
RepeaterItemFieldComponent,
|
|
6498
|
+
RepeaterTableComponent
|
|
6347
6499
|
]
|
|
6348
6500
|
},] }
|
|
6349
6501
|
];
|
|
@@ -6708,6 +6860,7 @@ class RepeaterField {
|
|
|
6708
6860
|
class RepeaterOptions {
|
|
6709
6861
|
constructor() {
|
|
6710
6862
|
this.MinRequiredItems = 1;
|
|
6863
|
+
this.ActionLabelKey = "";
|
|
6711
6864
|
this.AddButtonText = "Add";
|
|
6712
6865
|
this.DeleteButtonText = "Delete";
|
|
6713
6866
|
this.RepeaterValue = [];
|
|
@@ -7038,5 +7191,5 @@ var FileType;
|
|
|
7038
7191
|
* Generated bundle index. Do not edit.
|
|
7039
7192
|
*/
|
|
7040
7193
|
|
|
7041
|
-
export { AppInjector, Attribute, AutocompleteDTO, AutocompleteOptions, AutocompleteTextBoxComponent, BBSFControlsModule, CalendarComponent, CalendarEventDTO, CalendarOptions, CalendarView, CancelDTO, CheckBoxComponent, CheckBoxOptions, ConfirmationModalComponent, ConfirmationModalOptions, ControlLayout, ControlUtility, Country, CustomValidation, CustomValidator, DataType, DateInputComponent, DatePickerOptions, DropdownListComponent, DropdownListItem, DropdownOptions, EditPersonalImage, EnglishArabicDTO, ErrorMassageValidation, FileType, FileUploadComponent, FileUploadModel, FileUploadOptions, FilterItem, FilterType, FontSize, ForceDirection, FormComponent, FormOptions, GlobalSettings, HtmlEditorComponent, HtmlEditorOptions, IconPosition, ImageType, ImageUploadOptions, ImageUploaderComponent, InputType, Insert, JwPaginationComponent, LanguageMode, LanguageType, MapAutoCompleteComponent, MapAutoCompleteOptions, MapAutocompleteDTO, MenuListType, Misc, MultiLingualHtmlEditorComponent, MultiLingualHtmlEditorOptions, MultiLingualTextAreaComponent, MultiLingualTextAreaOptions, MultiLingualTextBoxComponent, MultiLingualTextBoxOptions, MultipleFileUploadModel, NgTemplateNameDirective, OnPagingFiltersChangeService, PagingActionMode, PagingComponent, PagingDTO, PagingOptions, Para, PermissionSets, PhoneComponent, PhoneOptions, PickerType, ProfileImageUploadOptions, ProfileImageUploaderComponent, ProfilePictureDTO, PropertyLocation, RadioButtonComponent, RadioButtonItem, RadioButtonOptions, RangeNumber, RenderComponentService, RepeaterComponent, RepeaterField, RepeaterFieldBuilderComponent, RepeaterItemFieldComponent, RepeaterOptions, SaveDTO, SelectMode, StartView, Style, StyleConfirmationMode, TagsInputComponent, TagsInputDTO, TagsInputOptions, TextAreaComponent, TextAreaOptions, TextBoxOptions, TextboxComponent, ToggleSlideOptions, ToggleslideComponent, UploadPersonalImage, environment, options, ɵ0 };
|
|
7194
|
+
export { AppInjector, Attribute, AutocompleteDTO, AutocompleteOptions, AutocompleteTextBoxComponent, BBSFControlsModule, CalendarComponent, CalendarEventDTO, CalendarOptions, CalendarView, CancelDTO, CheckBoxComponent, CheckBoxOptions, ConfirmationModalComponent, ConfirmationModalOptions, ControlLayout, ControlUtility, Country, CustomValidation, CustomValidator, DataType, DateInputComponent, DatePickerOptions, DropdownListComponent, DropdownListItem, DropdownOptions, EditPersonalImage, EnglishArabicDTO, ErrorMassageValidation, FileType, FileUploadComponent, FileUploadModel, FileUploadOptions, FilterItem, FilterType, FontSize, ForceDirection, FormComponent, FormOptions, GlobalSettings, HtmlEditorComponent, HtmlEditorOptions, IconPosition, ImageType, ImageUploadOptions, ImageUploaderComponent, InputType, Insert, JwPaginationComponent, LanguageMode, LanguageType, MapAutoCompleteComponent, MapAutoCompleteOptions, MapAutocompleteDTO, MenuListType, Misc, MultiLingualHtmlEditorComponent, MultiLingualHtmlEditorOptions, MultiLingualTextAreaComponent, MultiLingualTextAreaOptions, MultiLingualTextBoxComponent, MultiLingualTextBoxOptions, MultipleFileUploadModel, NgTemplateNameDirective, OnPagingFiltersChangeService, PagingActionMode, PagingComponent, PagingDTO, PagingOptions, Para, PermissionSets, PhoneComponent, PhoneOptions, PickerType, ProfileImageUploadOptions, ProfileImageUploaderComponent, ProfilePictureDTO, PropertyLocation, RadioButtonComponent, RadioButtonItem, RadioButtonOptions, RangeNumber, RenderComponentService, RepeaterComponent, RepeaterField, RepeaterFieldBuilderComponent, RepeaterItemFieldComponent, RepeaterOptions, RepeaterTableComponent, SaveDTO, SelectMode, StartView, Style, StyleConfirmationMode, TagsInputComponent, TagsInputDTO, TagsInputOptions, TextAreaComponent, TextAreaOptions, TextBoxOptions, TextboxComponent, ToggleSlideOptions, ToggleslideComponent, UploadPersonalImage, environment, options, ɵ0 };
|
|
7042
7195
|
//# sourceMappingURL=bnsights-bbsf-controls.js.map
|