@bnsights/bbsf-controls 1.0.32 → 1.0.35
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 +14 -4
- package/bnsights-bbsf-controls-1.0.35.tgz +0 -0
- package/bnsights-bbsf-controls.metadata.json +1 -1
- package/bundles/bnsights-bbsf-controls.umd.js +726 -312
- package/bundles/bnsights-bbsf-controls.umd.js.map +1 -1
- package/esm2015/lib/Shared/Models/AutocompleteOptions.js +5 -10
- package/esm2015/lib/Shared/Models/CalendarOptions.js +4 -2
- package/esm2015/lib/Shared/Models/CheckBoxOptions.js +4 -5
- package/esm2015/lib/Shared/Models/ControlOptionsBase.js +9 -0
- package/esm2015/lib/Shared/Models/DropdownOptions.js +4 -6
- package/esm2015/lib/Shared/Models/FileUploadOptions.js +4 -7
- package/esm2015/lib/Shared/Models/HtmlEditorOptions.js +4 -7
- package/esm2015/lib/Shared/Models/ImageUploadOptions.js +4 -7
- package/esm2015/lib/Shared/Models/MapAutoCompleteOptions.js +3 -9
- package/esm2015/lib/Shared/Models/MultiLingualHtmlEditorOptions.js +4 -12
- package/esm2015/lib/Shared/Models/MultiLingualTextAreaOptions.js +4 -12
- package/esm2015/lib/Shared/Models/MultilingualControlOptionsBase.js +14 -0
- package/esm2015/lib/Shared/Models/MultilingualTextBoxOptions.js +4 -12
- package/esm2015/lib/Shared/Models/PhoneOptions.js +4 -11
- package/esm2015/lib/Shared/Models/ProfileImageUploadOptions.js +4 -7
- package/esm2015/lib/Shared/Models/RadioButtonOptions.js +3 -8
- package/esm2015/lib/Shared/Models/RepeaterOptions.js +1 -2
- package/esm2015/lib/Shared/Models/TagsInputOptions.js +4 -9
- package/esm2015/lib/Shared/Models/TextAreaOptions.js +4 -7
- package/esm2015/lib/Shared/Models/TextBoxOptions.js +4 -7
- package/esm2015/lib/Shared/Models/ToggleslideOptions.js +4 -3
- package/esm2015/lib/Shared/Models/datePickerOptions.js +6 -8
- package/esm2015/lib/Shared/Pipes/bbsf-date-time.pipe.js +20 -0
- package/esm2015/lib/Shared/Pipes/bbsf-date.pipe.js +20 -0
- package/esm2015/lib/Shared/config/environment.js +2 -2
- package/esm2015/lib/Shared/services/ControlUtility.js +40 -4
- package/esm2015/lib/Shared/services/GlobalSettings.service.js +9 -1
- package/esm2015/lib/Shared/services/validationErrorMassage.service.js +16 -1
- package/esm2015/lib/controls/AutocompleteTextBox/AutocompleteTextBox.component.js +6 -3
- package/esm2015/lib/controls/CheckBox/CheckBox.component.js +5 -1
- package/esm2015/lib/controls/DateTimePicker/DateTimePicker.component.js +54 -4
- package/esm2015/lib/controls/DropdownList/DropdownList.component.js +6 -2
- package/esm2015/lib/controls/FileUplaod/FileUplaod.component.js +6 -4
- package/esm2015/lib/controls/Form/Form.component.js +2 -18
- package/esm2015/lib/controls/HtmlEditor/HtmlEditor.component.js +6 -2
- package/esm2015/lib/controls/ImageUpload/ImageUpload.component.js +12 -5
- package/esm2015/lib/controls/MapAutoComplete/MapAutoComplete.component.js +5 -1
- package/esm2015/lib/controls/MultiLingualHtmlEditor/MultiLingualHtmlEditor.component.js +14 -4
- package/esm2015/lib/controls/MultiLingualTextArea/MultiLingualTextArea.component.js +89 -10
- package/esm2015/lib/controls/MultiLingualTextBox/MultiLingualTextBox.component.js +89 -18
- package/esm2015/lib/controls/Paging/Paging.component.js +1 -3
- package/esm2015/lib/controls/Phone/Phone.component.js +6 -2
- package/esm2015/lib/controls/ProfileImageUploader/ProfileImageUploader.component.js +6 -2
- package/esm2015/lib/controls/RadioButton/RadioButton.component.js +6 -2
- package/esm2015/lib/controls/TagsInput/TagsInput.component.js +6 -2
- package/esm2015/lib/controls/TextArea/TextArea.component.js +48 -6
- package/esm2015/lib/controls/TextBox/TextBox.component.js +62 -24
- package/esm2015/lib/controls/Toggleslide/toggleslide.component.js +14 -3
- package/esm2015/lib/controls/bbsf-controls.module.js +12 -4
- package/esm2015/public-api.js +5 -1
- package/fesm2015/bnsights-bbsf-controls.js +592 -230
- package/fesm2015/bnsights-bbsf-controls.js.map +1 -1
- package/lib/Shared/Models/AutocompleteOptions.d.ts +3 -40
- package/lib/Shared/Models/CalendarOptions.d.ts +2 -8
- package/lib/Shared/Models/CheckBoxOptions.d.ts +2 -33
- package/lib/Shared/Models/ControlOptionsBase.d.ts +40 -0
- package/lib/Shared/Models/DropdownOptions.d.ts +2 -39
- package/lib/Shared/Models/FileUploadOptions.d.ts +2 -39
- package/lib/Shared/Models/HtmlEditorOptions.d.ts +2 -37
- package/lib/Shared/Models/ImageUploadOptions.d.ts +2 -38
- package/lib/Shared/Models/MapAutoCompleteOptions.d.ts +2 -40
- package/lib/Shared/Models/MultiLingualHtmlEditorOptions.d.ts +2 -77
- package/lib/Shared/Models/MultiLingualTextAreaOptions.d.ts +3 -76
- package/lib/Shared/Models/MultilingualControlOptionsBase.d.ts +71 -0
- package/lib/Shared/Models/MultilingualTextBoxOptions.d.ts +3 -76
- package/lib/Shared/Models/PhoneOptions.d.ts +2 -38
- package/lib/Shared/Models/ProfileImageUploadOptions.d.ts +2 -38
- package/lib/Shared/Models/RadioButtonOptions.d.ts +3 -39
- package/lib/Shared/Models/TagsInputOptions.d.ts +4 -43
- package/lib/Shared/Models/TextAreaOptions.d.ts +5 -42
- package/lib/Shared/Models/TextBoxOptions.d.ts +4 -41
- package/lib/Shared/Models/ToggleslideOptions.d.ts +3 -30
- package/lib/Shared/Models/datePickerOptions.d.ts +4 -40
- package/lib/Shared/Pipes/bbsf-date-time.pipe.d.ts +7 -0
- package/lib/Shared/Pipes/bbsf-date.pipe.d.ts +7 -0
- package/lib/Shared/services/ControlUtility.d.ts +5 -2
- package/lib/Shared/services/GlobalSettings.service.d.ts +4 -0
- package/lib/controls/DateTimePicker/DateTimePicker.component.d.ts +9 -0
- package/lib/controls/MultiLingualTextArea/MultiLingualTextArea.component.d.ts +13 -2
- package/lib/controls/MultiLingualTextBox/MultiLingualTextBox.component.d.ts +13 -2
- package/lib/controls/TextArea/TextArea.component.d.ts +7 -1
- package/lib/controls/TextBox/TextBox.component.d.ts +8 -3
- package/lib/controls/Toggleslide/toggleslide.component.d.ts +3 -1
- package/package.json +3 -3
- package/public-api.d.ts +4 -0
- package/src/lib/assets/Style.css +2 -2
- package/bnsights-bbsf-controls-1.0.32.tgz +0 -0
|
@@ -4,7 +4,7 @@ import timeGridPlugin from '@fullcalendar/timegrid';
|
|
|
4
4
|
import listPlugin from '@fullcalendar/list';
|
|
5
5
|
import interactionPlugin from '@fullcalendar/interaction';
|
|
6
6
|
import * as i0 from '@angular/core';
|
|
7
|
-
import { Injectable, Optional, EventEmitter, Component, Input, Output, ViewChild, NgZone, Directive, TemplateRef, ViewChildren, ComponentFactoryResolver, ViewContainerRef, NgModule, NO_ERRORS_SCHEMA, Injector } from '@angular/core';
|
|
7
|
+
import { Injectable, Optional, EventEmitter, Component, Input, Output, ViewChild, NgZone, Directive, TemplateRef, ViewChildren, ComponentFactoryResolver, ViewContainerRef, Pipe, NgModule, NO_ERRORS_SCHEMA, Injector } from '@angular/core';
|
|
8
8
|
import { BlockUIModule } from 'ng-block-ui';
|
|
9
9
|
import { ControlContainer, Validators, FormControl, FormGroupDirective, FormGroup, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
10
10
|
import { Http, HttpModule } from '@angular/http';
|
|
@@ -107,6 +107,12 @@ class ErrorMassageValidation {
|
|
|
107
107
|
case "max":
|
|
108
108
|
result = this.utilityService.getResourceValue("MaxValueValidationKey") + " " + error.value.max;
|
|
109
109
|
break;
|
|
110
|
+
case "IntegerNumberValidationKey":
|
|
111
|
+
result = this.utilityService.getResourceValue("IntegerNumberValidationKey");
|
|
112
|
+
break;
|
|
113
|
+
case "PositiveNumberValidationKey":
|
|
114
|
+
result = this.utilityService.getResourceValue("PositiveNumberValidationKey");
|
|
115
|
+
break;
|
|
110
116
|
case "validatePhoneNumber":
|
|
111
117
|
result = this.utilityService.getResourceValue("PhoneNumberValidationKey");
|
|
112
118
|
break;
|
|
@@ -122,6 +128,9 @@ class ErrorMassageValidation {
|
|
|
122
128
|
case "EnglishLetterOnly":
|
|
123
129
|
result = this.utilityService.getResourceValue("EnglishLetterOnly");
|
|
124
130
|
break;
|
|
131
|
+
case "ArabicIsRequiredAndOnly50CharactersEnglish":
|
|
132
|
+
result = this.utilityService.getResourceValue("ArabicIsRequiredAndOnly50CharactersEnglish");
|
|
133
|
+
break;
|
|
125
134
|
case "PasswordComplexityHasCapitalLetter":
|
|
126
135
|
result = this.utilityService.getResourceValue("PasswordComplexityHasCapitalLetter");
|
|
127
136
|
break;
|
|
@@ -152,6 +161,12 @@ class ErrorMassageValidation {
|
|
|
152
161
|
case "ToolTipTypeError":
|
|
153
162
|
result = this.utilityService.getResourceValue("ToolTipTypeError") + " " + error.value;
|
|
154
163
|
break;
|
|
164
|
+
case "InvalidEndDate":
|
|
165
|
+
result = this.utilityService.getResourceValue("InvalidEndDate");
|
|
166
|
+
break;
|
|
167
|
+
case "InvalidStartDate":
|
|
168
|
+
result = this.utilityService.getResourceValue("InvalidStartDate");
|
|
169
|
+
break;
|
|
155
170
|
default:
|
|
156
171
|
break;
|
|
157
172
|
}
|
|
@@ -178,9 +193,10 @@ var InputType;
|
|
|
178
193
|
})(InputType || (InputType = {}));
|
|
179
194
|
|
|
180
195
|
class ControlUtility {
|
|
181
|
-
constructor(ErrorHandler, controlValidationService) {
|
|
196
|
+
constructor(ErrorHandler, controlValidationService, utilityService) {
|
|
182
197
|
this.ErrorHandler = ErrorHandler;
|
|
183
198
|
this.controlValidationService = controlValidationService;
|
|
199
|
+
this.utilityService = utilityService;
|
|
184
200
|
}
|
|
185
201
|
getErrorValidation(Errorsitem, CustomValidation) {
|
|
186
202
|
let resulte = '';
|
|
@@ -212,6 +228,40 @@ class ControlUtility {
|
|
|
212
228
|
return valid ? null : error;
|
|
213
229
|
};
|
|
214
230
|
}
|
|
231
|
+
patchControlValue(originalValue, PatchFunction, PatchPath) {
|
|
232
|
+
var patchOp = [{
|
|
233
|
+
op: "replace",
|
|
234
|
+
path: PatchPath,
|
|
235
|
+
value: originalValue
|
|
236
|
+
}];
|
|
237
|
+
var patchService = PatchFunction.call(null, patchOp);
|
|
238
|
+
patchService.subscribe(r => console.log(r), erorr => this.utilityService.notifyErrorMessage(erorr));
|
|
239
|
+
}
|
|
240
|
+
arabicValidator(error) {
|
|
241
|
+
return (control) => {
|
|
242
|
+
if (!control.value)
|
|
243
|
+
return null;
|
|
244
|
+
if (control.value.match('[\u0600-\u06FF]')) {
|
|
245
|
+
if (control.value.match('[A-Za-z]') != null) {
|
|
246
|
+
//FOUND ENGLISH CHARS
|
|
247
|
+
var length = control.value.replace(/\W/g, '').replace(/[0-9]/g, '').length;
|
|
248
|
+
if (length > 50) {
|
|
249
|
+
return error;
|
|
250
|
+
}
|
|
251
|
+
else {
|
|
252
|
+
return null;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
else {
|
|
256
|
+
//NO ENGLISH CHARACTERS AT ALL
|
|
257
|
+
return null;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
else {
|
|
261
|
+
return error;
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
}
|
|
215
265
|
getInputType(type) {
|
|
216
266
|
return InputType[type];
|
|
217
267
|
}
|
|
@@ -297,7 +347,8 @@ ControlUtility.decorators = [
|
|
|
297
347
|
];
|
|
298
348
|
ControlUtility.ctorParameters = () => [
|
|
299
349
|
{ type: ErrorMassageValidation },
|
|
300
|
-
{ type: ControlValidationService }
|
|
350
|
+
{ type: ControlValidationService },
|
|
351
|
+
{ type: UtilityService }
|
|
301
352
|
];
|
|
302
353
|
|
|
303
354
|
var PickerType;
|
|
@@ -356,9 +407,37 @@ class DateInputComponent {
|
|
|
356
407
|
this.markAllAsTouched = false;
|
|
357
408
|
this.validationRules = [];
|
|
358
409
|
this.validationRulesasync = [];
|
|
410
|
+
this.comparedControl = null;
|
|
411
|
+
this.dateError = false;
|
|
359
412
|
this.resetError = () => {
|
|
360
413
|
this.controlValidationService.RemoveGlobalError();
|
|
361
414
|
};
|
|
415
|
+
this.checkIfEndDateAfterStartDate = () => {
|
|
416
|
+
if (!this.comparedControl.value || !this.group.get(this.options.Name).value) {
|
|
417
|
+
return null;
|
|
418
|
+
}
|
|
419
|
+
if (new Date(this.comparedControl.value) < new Date(this.group.get(this.options.Name).value)) {
|
|
420
|
+
this.comparedControl.setErrors(null);
|
|
421
|
+
return null;
|
|
422
|
+
}
|
|
423
|
+
else {
|
|
424
|
+
this.comparedControl.setErrors(null);
|
|
425
|
+
return { InvalidEndDate: true };
|
|
426
|
+
}
|
|
427
|
+
};
|
|
428
|
+
this.checkIfStartDateBeForEndDate = () => {
|
|
429
|
+
if (!this.comparedControl.value || !this.group.get(this.options.Name).value) {
|
|
430
|
+
return null;
|
|
431
|
+
}
|
|
432
|
+
if (new Date(this.comparedControl.value) < new Date(this.group.get(this.options.Name).value)) {
|
|
433
|
+
this.group.get(this.options.Name).setErrors(null);
|
|
434
|
+
return null;
|
|
435
|
+
}
|
|
436
|
+
else {
|
|
437
|
+
this.group.get(this.options.Name).setErrors(null);
|
|
438
|
+
return { InvalidStartDate: true };
|
|
439
|
+
}
|
|
440
|
+
};
|
|
362
441
|
//External Method
|
|
363
442
|
this.RemoveRequiredValidation = () => {
|
|
364
443
|
this.controlUtility.RemoveRequiredValidation(this.DatePickerFormControl, this.validationRules, this.options);
|
|
@@ -400,11 +479,17 @@ class DateInputComponent {
|
|
|
400
479
|
}
|
|
401
480
|
if (this.options.LabelKey != null && this.options.LabelKey != "")
|
|
402
481
|
this.options.LabelValue = this.UtilityService.getResourceValue(this.options.LabelKey);
|
|
403
|
-
this.DatePickerFormControl.setValidators(this.validationRules);
|
|
404
|
-
this.DatePickerFormControl.setAsyncValidators(this.validationRulesasync);
|
|
405
482
|
if (this.options.IsDisabled) {
|
|
406
483
|
this.DatePickerFormControl.disable();
|
|
407
484
|
}
|
|
485
|
+
if (this.options.StartControlToCompareWith) {
|
|
486
|
+
if (this.group.get(this.options.StartControlToCompareWith)) {
|
|
487
|
+
this.comparedControl = this.group.get(this.options.StartControlToCompareWith);
|
|
488
|
+
this.subscribeDateChanges();
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
this.DatePickerFormControl.setValidators(this.validationRules);
|
|
492
|
+
this.DatePickerFormControl.setAsyncValidators(this.validationRulesasync);
|
|
408
493
|
this.DateInputControlHost.ngSubmit.subscribe((value) => {
|
|
409
494
|
this.group.markAllAsTouched();
|
|
410
495
|
this.markAllAsTouched = true;
|
|
@@ -456,7 +541,23 @@ class DateInputComponent {
|
|
|
456
541
|
}
|
|
457
542
|
this.DatePickerFormControl.setValue(DateValue);
|
|
458
543
|
this.onChangeService.ChangeValue(this.options.Name);
|
|
459
|
-
|
|
544
|
+
let originalValue = DateValue;
|
|
545
|
+
if (this.options.PatchFunction && this.options.PatchPath && this.group.get(this.options.Name).valid) {
|
|
546
|
+
this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
|
|
547
|
+
}
|
|
548
|
+
this.OnChange.emit(originalValue);
|
|
549
|
+
}
|
|
550
|
+
subscribeDateChanges() {
|
|
551
|
+
const startDateChanges = this.comparedControl.valueChanges;
|
|
552
|
+
const endDateChanges = this.group.get(this.options.Name).valueChanges;
|
|
553
|
+
startDateChanges.subscribe(start => {
|
|
554
|
+
this.comparedControl.addValidators(this.checkIfStartDateBeForEndDate);
|
|
555
|
+
this.comparedControl.updateValueAndValidity();
|
|
556
|
+
});
|
|
557
|
+
endDateChanges.subscribe(end => {
|
|
558
|
+
this.DatePickerFormControl.addValidators(this.checkIfEndDateAfterStartDate);
|
|
559
|
+
this.DatePickerFormControl.updateValueAndValidity();
|
|
560
|
+
});
|
|
460
561
|
}
|
|
461
562
|
}
|
|
462
563
|
DateInputComponent.controlContainerstatic = null;
|
|
@@ -523,6 +624,14 @@ class GlobalSettings {
|
|
|
523
624
|
/**To Set LanguageMode To MultipleLanguageText */
|
|
524
625
|
this.LanguageMode = LanguageMode.Both_Languages_are_visible;
|
|
525
626
|
this.HideAstericsWhenRequired = false;
|
|
627
|
+
//**To set maxlength warning message when equals limit
|
|
628
|
+
this.MaxLengthWarningLimit = 10;
|
|
629
|
+
//**Set any texbox maxlength default value
|
|
630
|
+
this.MaxLengthTextBox = 255;
|
|
631
|
+
//**Set any textArea maxlength default value
|
|
632
|
+
this.MaxLengthTextArea = 1000;
|
|
633
|
+
//**Set default image source
|
|
634
|
+
this.DefaultImageSrc = "./src/assets/images/uploadimg.png";
|
|
526
635
|
}
|
|
527
636
|
}
|
|
528
637
|
GlobalSettings.ɵprov = i0.ɵɵdefineInjectable({ factory: function GlobalSettings_Factory() { return new GlobalSettings(); }, token: GlobalSettings, providedIn: "root" });
|
|
@@ -740,7 +849,6 @@ class FileUploadComponent {
|
|
|
740
849
|
this.uploader.queue = [];
|
|
741
850
|
return;
|
|
742
851
|
}
|
|
743
|
-
debugger;
|
|
744
852
|
let reader = new FileReader();
|
|
745
853
|
let fileObject = file.rawFile;
|
|
746
854
|
reader.readAsDataURL(fileObject);
|
|
@@ -770,12 +878,15 @@ class FileUploadComponent {
|
|
|
770
878
|
this.group.get(this.options.Name).setValue(this.multipleFileUploadModel);
|
|
771
879
|
}
|
|
772
880
|
};
|
|
773
|
-
this.
|
|
881
|
+
let originalValue = this.group.get(this.options.Name).value;
|
|
882
|
+
if (this.options.PatchFunction && this.options.PatchPath && this.group.get(this.options.Name).valid) {
|
|
883
|
+
this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
|
|
884
|
+
}
|
|
885
|
+
this.OnChange.emit(originalValue);
|
|
774
886
|
}
|
|
775
887
|
}
|
|
776
888
|
}
|
|
777
889
|
removeFromControlValue(item) {
|
|
778
|
-
debugger;
|
|
779
890
|
if (this.options.IsMultipleFile == false) {
|
|
780
891
|
this.fileUploadModel = null;
|
|
781
892
|
if (this.options.IsRequired == true) {
|
|
@@ -878,6 +989,16 @@ class MultiLingualTextBoxComponent {
|
|
|
878
989
|
this.markAllAsTouched = false;
|
|
879
990
|
this.ArabicLetterOnly = "";
|
|
880
991
|
this.EnglishLetterOnly = "";
|
|
992
|
+
//For Show warning message of max length limit
|
|
993
|
+
this.minCharsLimit = -1; //To disable chars limit feature by default
|
|
994
|
+
this.englishCurrentCharsCount = 0;
|
|
995
|
+
this.arabicCurrentCharsCount = 0;
|
|
996
|
+
this.showEnglishCharsLimitMsg = false;
|
|
997
|
+
this.showArabicCharsLimitMsg = false;
|
|
998
|
+
this.hasEnglishCharsLimitValidationError = false;
|
|
999
|
+
this.hasArabicCharsLimitValidationError = false;
|
|
1000
|
+
this.englishMaxLimitWarningMsg = "";
|
|
1001
|
+
this.arabicMaxLimitWarningMsg = "";
|
|
881
1002
|
//External Method
|
|
882
1003
|
this.RemoveRequiredValidation = () => {
|
|
883
1004
|
this.controlUtility.RemoveRequiredValidation(this.ArabicFormControl, this.EnglishValidationRules, this.options);
|
|
@@ -907,7 +1028,7 @@ class MultiLingualTextBoxComponent {
|
|
|
907
1028
|
this.CurrentLanguage = translate.currentLang != undefined ? translate.currentLang : translate.defaultLang;
|
|
908
1029
|
}
|
|
909
1030
|
getCustomErrorsMassages() {
|
|
910
|
-
this.ArabicLetterOnly = this.UtilityService.getResourceValue("
|
|
1031
|
+
this.ArabicLetterOnly = this.UtilityService.getResourceValue("ArabicIsRequiredAndOnly50CharactersEnglish");
|
|
911
1032
|
this.EnglishLetterOnly = this.UtilityService.getResourceValue("EnglishLetterOnly");
|
|
912
1033
|
}
|
|
913
1034
|
ngOnInit() {
|
|
@@ -932,6 +1053,8 @@ class MultiLingualTextBoxComponent {
|
|
|
932
1053
|
this.options.LanguageMode = this.globalSettings.LanguageMode;
|
|
933
1054
|
if (!this.options.MultiControlPlacementType)
|
|
934
1055
|
this.options.MultiControlPlacementType = this.globalSettings.MultiControlPlacementType;
|
|
1056
|
+
if (!this.options.MaxLength)
|
|
1057
|
+
this.options.MaxLength = this.globalSettings.MaxLengthTextBox;
|
|
935
1058
|
if (this.options.ArabicLabelKey != null && this.options.ArabicLabelKey != "")
|
|
936
1059
|
this.options.ArabicLabelValue = this.UtilityService.getResourceValue(this.options.ArabicLabelKey);
|
|
937
1060
|
if (this.options.EnglishLabelKey != null && this.options.EnglishLabelKey != "")
|
|
@@ -944,14 +1067,6 @@ class MultiLingualTextBoxComponent {
|
|
|
944
1067
|
this.ArabicValidationRules.push(Validation.functionBody);
|
|
945
1068
|
}
|
|
946
1069
|
}
|
|
947
|
-
if (this.options.CustomValidation.length > 0) {
|
|
948
|
-
let Validations = this.options.CustomValidation;
|
|
949
|
-
for (let index = 0; index < Validations.length; index++) {
|
|
950
|
-
const Validation = Validations[index];
|
|
951
|
-
this.EnglishValidationRules.push(Validation.functionBody);
|
|
952
|
-
this.ArabicValidationRules.push(Validation.functionBody);
|
|
953
|
-
}
|
|
954
|
-
}
|
|
955
1070
|
if (this.options.MinLength > 0) {
|
|
956
1071
|
this.ArabicValidationRules.push(Validators.minLength(this.options.MinLength));
|
|
957
1072
|
this.EnglishValidationRules.push(Validators.minLength(this.options.MinLength));
|
|
@@ -959,10 +1074,13 @@ class MultiLingualTextBoxComponent {
|
|
|
959
1074
|
if (this.options.MaxLength > 0) {
|
|
960
1075
|
this.EnglishValidationRules.push(Validators.maxLength(this.options.MaxLength));
|
|
961
1076
|
this.ArabicValidationRules.push(Validators.maxLength(this.options.MaxLength));
|
|
1077
|
+
if (!this.options.MaxLengthWarningLimit)
|
|
1078
|
+
this.options.MaxLengthWarningLimit = this.globalSettings.MaxLengthWarningLimit;
|
|
1079
|
+
this.minCharsLimit = this.options.MaxLength - this.options.MaxLengthWarningLimit;
|
|
962
1080
|
}
|
|
963
1081
|
this.showInputUsingLanguageMode();
|
|
964
1082
|
this.ArabicValidationRules.push(Validators.compose([
|
|
965
|
-
this.controlUtility.
|
|
1083
|
+
this.controlUtility.arabicValidator({ ArabicIsRequiredAndOnly50CharactersEnglish: this.ArabicLetterOnly }),
|
|
966
1084
|
]));
|
|
967
1085
|
this.EnglishValidationRules.push(Validators.compose([
|
|
968
1086
|
this.controlUtility.patternValidator(/^[\x00-\x7F]*$/, { EnglishLetterOnly: this.EnglishLetterOnly }),
|
|
@@ -1007,6 +1125,27 @@ class MultiLingualTextBoxComponent {
|
|
|
1007
1125
|
englishValue = this.EnglishFormControl.value;
|
|
1008
1126
|
}
|
|
1009
1127
|
}
|
|
1128
|
+
//Check for maxlength limit count
|
|
1129
|
+
//MaxLength should be gretaer than or equals chars limit so that minCharsLimit would be >= 0
|
|
1130
|
+
if (this.options.MaxLength && this.minCharsLimit >= 0) {
|
|
1131
|
+
this.englishCurrentCharsCount = this.EnglishFormControl.value.length;
|
|
1132
|
+
if (this.englishCurrentCharsCount >= this.minCharsLimit) {
|
|
1133
|
+
this.showEnglishCharsLimitMsg = true;
|
|
1134
|
+
this.hasEnglishCharsLimitValidationError = true;
|
|
1135
|
+
if (this.englishCurrentCharsCount == this.options.MaxLength)
|
|
1136
|
+
this.englishCharsLimitMsgClass = "danger";
|
|
1137
|
+
else
|
|
1138
|
+
this.englishCharsLimitMsgClass = "warning";
|
|
1139
|
+
}
|
|
1140
|
+
else {
|
|
1141
|
+
this.showEnglishCharsLimitMsg = false;
|
|
1142
|
+
this.hasEnglishCharsLimitValidationError = false;
|
|
1143
|
+
}
|
|
1144
|
+
var max = this.options.MaxLength;
|
|
1145
|
+
var current = this.englishCurrentCharsCount;
|
|
1146
|
+
var resource = this.UtilityService.getResourceValue("MaxLengthLimitWarning");
|
|
1147
|
+
this.englishMaxLimitWarningMsg = eval('`' + resource + '`');
|
|
1148
|
+
}
|
|
1010
1149
|
}
|
|
1011
1150
|
if (this.ArabicFormControl.value == "") {
|
|
1012
1151
|
this.ArabicWordCountArray = 0;
|
|
@@ -1028,6 +1167,27 @@ class MultiLingualTextBoxComponent {
|
|
|
1028
1167
|
arabicValue = this.ArabicFormControl.value;
|
|
1029
1168
|
}
|
|
1030
1169
|
}
|
|
1170
|
+
//Check for maxlength limit count
|
|
1171
|
+
//MaxLength should be gretaer than or equals chars limit so that minCharsLimit would be >= 0
|
|
1172
|
+
if (this.options.MaxLength && this.minCharsLimit >= 0) {
|
|
1173
|
+
this.arabicCurrentCharsCount = this.ArabicFormControl.value.length;
|
|
1174
|
+
if (this.arabicCurrentCharsCount >= this.minCharsLimit) {
|
|
1175
|
+
this.showArabicCharsLimitMsg = true;
|
|
1176
|
+
this.hasArabicCharsLimitValidationError = true;
|
|
1177
|
+
if (this.arabicCurrentCharsCount == this.options.MaxLength)
|
|
1178
|
+
this.arabicCharsLimitMsgClass = "danger";
|
|
1179
|
+
else
|
|
1180
|
+
this.arabicCharsLimitMsgClass = "warning";
|
|
1181
|
+
}
|
|
1182
|
+
else {
|
|
1183
|
+
this.showArabicCharsLimitMsg = false;
|
|
1184
|
+
this.hasArabicCharsLimitValidationError = false;
|
|
1185
|
+
}
|
|
1186
|
+
var max = this.options.MaxLength;
|
|
1187
|
+
var current = this.arabicCurrentCharsCount;
|
|
1188
|
+
var resource = this.UtilityService.getResourceValue("MaxLengthLimitWarning");
|
|
1189
|
+
this.arabicMaxLimitWarningMsg = eval('`' + resource + '`');
|
|
1190
|
+
}
|
|
1031
1191
|
}
|
|
1032
1192
|
let mulitLangModel = new EnglishArabicDTO();
|
|
1033
1193
|
mulitLangModel.Arabic = arabicValue;
|
|
@@ -1060,13 +1220,21 @@ class MultiLingualTextBoxComponent {
|
|
|
1060
1220
|
trimControlValue(type) {
|
|
1061
1221
|
const whitespace = ' ';
|
|
1062
1222
|
if (type == "En") {
|
|
1223
|
+
let originalValue = this.EnglishFormControl.value;
|
|
1224
|
+
if (this.options.PatchFunction && this.options.PatchPath && this.EnglishFormControl.valid) {
|
|
1225
|
+
this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
|
|
1226
|
+
}
|
|
1063
1227
|
if (this.EnglishFormControl.value.startsWith(whitespace) || this.EnglishFormControl.value.endsWith(whitespace)) {
|
|
1064
|
-
this.EnglishFormControl.patchValue(
|
|
1228
|
+
this.EnglishFormControl.patchValue(originalValue);
|
|
1065
1229
|
}
|
|
1066
1230
|
}
|
|
1067
1231
|
if (type == "Ar") {
|
|
1232
|
+
let originalValue = this.ArabicFormControl.value;
|
|
1233
|
+
if (this.options.PatchFunction && this.options.PatchPath && this.ArabicFormControl.valid) {
|
|
1234
|
+
this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
|
|
1235
|
+
}
|
|
1068
1236
|
if (this.ArabicFormControl.value.startsWith(whitespace) || this.ArabicFormControl.value.endsWith(whitespace)) {
|
|
1069
|
-
this.ArabicFormControl.patchValue(
|
|
1237
|
+
this.ArabicFormControl.patchValue(originalValue);
|
|
1070
1238
|
}
|
|
1071
1239
|
}
|
|
1072
1240
|
}
|
|
@@ -1147,18 +1315,32 @@ class MultiLingualTextBoxComponent {
|
|
|
1147
1315
|
this.ArabicFormControl.updateValueAndValidity();
|
|
1148
1316
|
this.EnglishFormControl.updateValueAndValidity();
|
|
1149
1317
|
}
|
|
1150
|
-
|
|
1151
|
-
this.IsShowArabicWordCount =
|
|
1318
|
+
onArabicFocus(isFocus) {
|
|
1319
|
+
this.IsShowArabicWordCount = isFocus;
|
|
1320
|
+
//onFocus
|
|
1321
|
+
if (isFocus) {
|
|
1322
|
+
if (this.hasArabicCharsLimitValidationError) //check if there was previous validation error
|
|
1323
|
+
this.showArabicCharsLimitMsg = true;
|
|
1324
|
+
}
|
|
1325
|
+
else //onFocusOut
|
|
1326
|
+
this.showArabicCharsLimitMsg = false;
|
|
1152
1327
|
}
|
|
1153
|
-
|
|
1154
|
-
this.IsShowEnglishWordCount =
|
|
1328
|
+
onEnglishFocus(isFocus) {
|
|
1329
|
+
this.IsShowEnglishWordCount = isFocus;
|
|
1330
|
+
//onFocus
|
|
1331
|
+
if (isFocus) {
|
|
1332
|
+
if (this.hasEnglishCharsLimitValidationError) //check if there was previous validation error
|
|
1333
|
+
this.showEnglishCharsLimitMsg = true;
|
|
1334
|
+
}
|
|
1335
|
+
else //onFocusOut
|
|
1336
|
+
this.showEnglishCharsLimitMsg = false;
|
|
1155
1337
|
}
|
|
1156
1338
|
}
|
|
1157
1339
|
MultiLingualTextBoxComponent.controlContainerstatic = null;
|
|
1158
1340
|
MultiLingualTextBoxComponent.decorators = [
|
|
1159
1341
|
{ type: Component, args: [{
|
|
1160
1342
|
selector: 'BBSF-MultiLingualTextBox',
|
|
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)=\"
|
|
1343
|
+
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)=\"onEnglishFocus(true)\" (focusout)=\"onEnglishFocus(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 <div *ngIf=\"showEnglishCharsLimitMsg\">\r\n <span class=\"badge b-character-warning float-end\" [ngClass]=\"{'badge-light-warning': englishCharsLimitMsgClass === 'warning', 'badge-light-danger' : englishCharsLimitMsgClass === 'danger' }\">\r\n {{englishMaxLimitWarningMsg}}\r\n </span>\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 <!-- <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)=\"onArabicFocus(true)\" (focusout)=\"onArabicFocus(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 *ngIf=\"showArabicCharsLimitMsg\">\r\n <span class=\"badge b-character-warning float-end\" [ngClass]=\"{'badge-light-warning': arabicCharsLimitMsgClass === 'warning', 'badge-light-danger' : arabicCharsLimitMsgClass === 'danger' }\">\r\n {{arabicMaxLimitWarningMsg}}\r\n </span>\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",
|
|
1162
1344
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}\n"]
|
|
1163
1345
|
},] }
|
|
1164
1346
|
];
|
|
@@ -1192,6 +1374,12 @@ class TextAreaComponent {
|
|
|
1192
1374
|
this.markAllAsTouched = false;
|
|
1193
1375
|
this.validationRules = [];
|
|
1194
1376
|
this.validationRulesasync = [];
|
|
1377
|
+
//For Show warning message of max length limit
|
|
1378
|
+
this.currentCharsCount = 0;
|
|
1379
|
+
this.showCharsLimitMsg = false;
|
|
1380
|
+
this.hasCharsLimitValidationError = false;
|
|
1381
|
+
this.minCharsLimit = -1; //To disable chars limit feature by default
|
|
1382
|
+
this.maxLimitWarningMsg = "";
|
|
1195
1383
|
this.resetError = () => {
|
|
1196
1384
|
this.controlValidationService.RemoveGlobalError();
|
|
1197
1385
|
};
|
|
@@ -1221,6 +1409,8 @@ class TextAreaComponent {
|
|
|
1221
1409
|
this.controlValidationService.isCreatedBefor = false;
|
|
1222
1410
|
this.group.addControl(this.options.Name, new FormControl(''));
|
|
1223
1411
|
this.TextAreaFormControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
|
|
1412
|
+
if (!this.options.MaxLength)
|
|
1413
|
+
this.options.MaxLength = this.globalSettings.MaxLengthTextArea;
|
|
1224
1414
|
if (!this.options.ViewType)
|
|
1225
1415
|
this.options.ViewType = this.globalSettings.ViewType;
|
|
1226
1416
|
if (this.options.LabelKey != null && this.options.LabelKey != "")
|
|
@@ -1238,6 +1428,9 @@ class TextAreaComponent {
|
|
|
1238
1428
|
}
|
|
1239
1429
|
if (this.options.MaxLength > 0) {
|
|
1240
1430
|
this.validationRules.push(Validators.maxLength(this.options.MaxLength));
|
|
1431
|
+
if (!this.options.MaxLengthWarningLimit)
|
|
1432
|
+
this.options.MaxLengthWarningLimit = this.globalSettings.MaxLengthWarningLimit;
|
|
1433
|
+
this.minCharsLimit = this.options.MaxLength - this.options.MaxLengthWarningLimit;
|
|
1241
1434
|
}
|
|
1242
1435
|
if (this.options.IsRequired) {
|
|
1243
1436
|
this.validationRules.push(Validators.required);
|
|
@@ -1269,8 +1462,11 @@ class TextAreaComponent {
|
|
|
1269
1462
|
return this.controlUtility.getInputType(type);
|
|
1270
1463
|
}
|
|
1271
1464
|
trimControlValue() {
|
|
1272
|
-
let
|
|
1273
|
-
this.TextAreaFormControl.patchValue(
|
|
1465
|
+
let originalValue = this.controlUtility.trimControlValue(this.TextAreaFormControl.value);
|
|
1466
|
+
this.TextAreaFormControl.patchValue(originalValue);
|
|
1467
|
+
if (this.options.PatchFunction && this.options.PatchPath && this.TextAreaFormControl.valid) {
|
|
1468
|
+
this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
|
|
1469
|
+
}
|
|
1274
1470
|
}
|
|
1275
1471
|
copyInputMessage(inputElement) {
|
|
1276
1472
|
this.controlUtility.CopyInputMessage(inputElement);
|
|
@@ -1294,17 +1490,45 @@ class TextAreaComponent {
|
|
|
1294
1490
|
}
|
|
1295
1491
|
}
|
|
1296
1492
|
}
|
|
1493
|
+
//Check for maxlength limit count
|
|
1494
|
+
//MaxLength should be gretaer than or equals chars limit so that minCharsLimit would be >= 0
|
|
1495
|
+
if (this.options.MaxLength && this.minCharsLimit >= 0) {
|
|
1496
|
+
this.currentCharsCount = this.TextAreaFormControl.value.length;
|
|
1497
|
+
if (this.currentCharsCount >= this.minCharsLimit) {
|
|
1498
|
+
this.showCharsLimitMsg = true;
|
|
1499
|
+
this.hasCharsLimitValidationError = true;
|
|
1500
|
+
if (this.currentCharsCount == this.options.MaxLength)
|
|
1501
|
+
this.charsLimitMsgClass = "danger";
|
|
1502
|
+
else
|
|
1503
|
+
this.charsLimitMsgClass = "warning";
|
|
1504
|
+
}
|
|
1505
|
+
else {
|
|
1506
|
+
this.showCharsLimitMsg = false;
|
|
1507
|
+
this.hasCharsLimitValidationError = false;
|
|
1508
|
+
}
|
|
1509
|
+
var max = this.options.MaxLength;
|
|
1510
|
+
var current = this.currentCharsCount;
|
|
1511
|
+
var resource = this.UtilityService.getResourceValue("MaxLengthLimitWarning");
|
|
1512
|
+
this.maxLimitWarningMsg = eval('`' + resource + '`');
|
|
1513
|
+
}
|
|
1297
1514
|
this.OnChange.emit(this.TextAreaFormControl.value);
|
|
1298
1515
|
}
|
|
1299
|
-
|
|
1300
|
-
this.IsShowWordCount =
|
|
1516
|
+
onFocus(isFocus) {
|
|
1517
|
+
this.IsShowWordCount = isFocus;
|
|
1518
|
+
//onFocus
|
|
1519
|
+
if (isFocus) {
|
|
1520
|
+
if (this.hasCharsLimitValidationError) //check if there was previous validation error
|
|
1521
|
+
this.showCharsLimitMsg = true;
|
|
1522
|
+
}
|
|
1523
|
+
else //onFocusOut
|
|
1524
|
+
this.showCharsLimitMsg = false;
|
|
1301
1525
|
}
|
|
1302
1526
|
}
|
|
1303
1527
|
TextAreaComponent.controlContainerstatic = null;
|
|
1304
1528
|
TextAreaComponent.decorators = [
|
|
1305
1529
|
{ type: Component, args: [{
|
|
1306
1530
|
selector: 'BBSF-TextArea',
|
|
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)=\"
|
|
1531
|
+
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)=\"onFocus(true)\" (focusout)=\"onFocus(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 *ngIf=\"showCharsLimitMsg\">\r\n <span class=\"badge b-character-warning float-end\" [ngClass]=\"{'badge-light-warning': charsLimitMsgClass === 'warning', 'badge-light-danger' : charsLimitMsgClass === 'danger' }\">\r\n {{maxLimitWarningMsg}}\r\n </span>\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",
|
|
1308
1532
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}.flip_V{transform:scaleY(-1)}\n"]
|
|
1309
1533
|
},] }
|
|
1310
1534
|
];
|
|
@@ -1347,6 +1571,16 @@ class MultiLingualTextAreaComponent {
|
|
|
1347
1571
|
this.markAllAsTouched = false;
|
|
1348
1572
|
this.ArabicLetterOnly = "";
|
|
1349
1573
|
this.EnglishLetterOnly = "";
|
|
1574
|
+
//For Show warning message of max length limit
|
|
1575
|
+
this.minCharsLimit = -1; //To disable chars limit feature by default
|
|
1576
|
+
this.englishCurrentCharsCount = 0;
|
|
1577
|
+
this.arabicCurrentCharsCount = 0;
|
|
1578
|
+
this.showEnglishCharsLimitMsg = false;
|
|
1579
|
+
this.showArabicCharsLimitMsg = false;
|
|
1580
|
+
this.hasEnglishCharsLimitValidationError = false;
|
|
1581
|
+
this.hasArabicCharsLimitValidationError = false;
|
|
1582
|
+
this.englishMaxLimitWarningMsg = "";
|
|
1583
|
+
this.arabicMaxLimitWarningMsg = "";
|
|
1350
1584
|
this.resetError = () => {
|
|
1351
1585
|
this.controlValidationService.RemoveGlobalError();
|
|
1352
1586
|
};
|
|
@@ -1378,7 +1612,7 @@ class MultiLingualTextAreaComponent {
|
|
|
1378
1612
|
MultiLingualTextAreaComponent.controlContainerstatic = this.controlContainer;
|
|
1379
1613
|
}
|
|
1380
1614
|
getCustomErrorsMassages() {
|
|
1381
|
-
this.ArabicLetterOnly = this.UtilityService.getResourceValue("
|
|
1615
|
+
this.ArabicLetterOnly = this.UtilityService.getResourceValue("ArabicIsRequiredAndOnly50CharactersEnglish");
|
|
1382
1616
|
this.EnglishLetterOnly = this.UtilityService.getResourceValue("EnglishLetterOnly");
|
|
1383
1617
|
}
|
|
1384
1618
|
ngOnInit() {
|
|
@@ -1395,6 +1629,8 @@ class MultiLingualTextAreaComponent {
|
|
|
1395
1629
|
this.options.LanguageMode = this.globalSettings.LanguageMode;
|
|
1396
1630
|
if (!this.options.MultiControlPlacementType)
|
|
1397
1631
|
this.options.MultiControlPlacementType = this.globalSettings.MultiControlPlacementType;
|
|
1632
|
+
if (!this.options.MaxLength)
|
|
1633
|
+
this.options.MaxLength = this.globalSettings.MaxLengthTextArea;
|
|
1398
1634
|
if (this.options.ArabicLabelKey != null && this.options.ArabicLabelKey != "")
|
|
1399
1635
|
this.options.ArabicLabelValue = this.UtilityService.getResourceValue(this.options.ArabicLabelKey);
|
|
1400
1636
|
if (this.options.EnglishLabelKey != null && this.options.EnglishLabelKey != "")
|
|
@@ -1435,10 +1671,13 @@ class MultiLingualTextAreaComponent {
|
|
|
1435
1671
|
if (this.options.MaxLength > 0) {
|
|
1436
1672
|
this.EnglishValidationRules.push(Validators.maxLength(this.options.MaxLength));
|
|
1437
1673
|
this.ArabicValidationRules.push(Validators.maxLength(this.options.MaxLength));
|
|
1674
|
+
if (!this.options.MaxLengthWarningLimit)
|
|
1675
|
+
this.options.MaxLengthWarningLimit = this.globalSettings.MaxLengthWarningLimit;
|
|
1676
|
+
this.minCharsLimit = this.options.MaxLength - this.options.MaxLengthWarningLimit;
|
|
1438
1677
|
}
|
|
1439
1678
|
this.showInputUsingLanguageMode();
|
|
1440
1679
|
this.ArabicValidationRules.push(Validators.compose([
|
|
1441
|
-
this.controlUtility.
|
|
1680
|
+
this.controlUtility.arabicValidator({ ArabicIsRequiredAndOnly50CharactersEnglish: this.ArabicLetterOnly }),
|
|
1442
1681
|
]));
|
|
1443
1682
|
this.EnglishValidationRules.push(Validators.compose([
|
|
1444
1683
|
this.controlUtility.patternValidator(/^[\x00-\x7F]*$/, { EnglishLetterOnly: this.EnglishLetterOnly }),
|
|
@@ -1482,6 +1721,27 @@ class MultiLingualTextAreaComponent {
|
|
|
1482
1721
|
englishValue = this.EnglishTextAreaFormControl.value;
|
|
1483
1722
|
}
|
|
1484
1723
|
}
|
|
1724
|
+
//Check for maxlength limit count
|
|
1725
|
+
//MaxLength should be gretaer than or equals chars limit so that minCharsLimit would be >= 0
|
|
1726
|
+
if (this.options.MaxLength && this.minCharsLimit >= 0) {
|
|
1727
|
+
this.englishCurrentCharsCount = this.EnglishTextAreaFormControl.value.length;
|
|
1728
|
+
if (this.englishCurrentCharsCount >= this.minCharsLimit) {
|
|
1729
|
+
this.showEnglishCharsLimitMsg = true;
|
|
1730
|
+
this.hasEnglishCharsLimitValidationError = true;
|
|
1731
|
+
if (this.englishCurrentCharsCount == this.options.MaxLength)
|
|
1732
|
+
this.englishCharsLimitMsgClass = "danger";
|
|
1733
|
+
else
|
|
1734
|
+
this.englishCharsLimitMsgClass = "warning";
|
|
1735
|
+
}
|
|
1736
|
+
else {
|
|
1737
|
+
this.showEnglishCharsLimitMsg = false;
|
|
1738
|
+
this.hasEnglishCharsLimitValidationError = false;
|
|
1739
|
+
}
|
|
1740
|
+
var max = this.options.MaxLength;
|
|
1741
|
+
var current = this.englishCurrentCharsCount;
|
|
1742
|
+
var resource = this.UtilityService.getResourceValue("MaxLengthLimitWarning");
|
|
1743
|
+
this.englishMaxLimitWarningMsg = eval('`' + resource + '`');
|
|
1744
|
+
}
|
|
1485
1745
|
}
|
|
1486
1746
|
if (this.ArabicTextAreaFormControl.value == "") {
|
|
1487
1747
|
this.ArabicWordCountArray = 0;
|
|
@@ -1503,6 +1763,27 @@ class MultiLingualTextAreaComponent {
|
|
|
1503
1763
|
arabicValue = this.ArabicTextAreaFormControl.value;
|
|
1504
1764
|
}
|
|
1505
1765
|
}
|
|
1766
|
+
//Check for maxlength limit count
|
|
1767
|
+
//MaxLength should be gretaer than or equals chars limit so that minCharsLimit would be >= 0
|
|
1768
|
+
if (this.options.MaxLength && this.minCharsLimit >= 0) {
|
|
1769
|
+
this.arabicCurrentCharsCount = this.ArabicTextAreaFormControl.value.length;
|
|
1770
|
+
if (this.arabicCurrentCharsCount >= this.minCharsLimit) {
|
|
1771
|
+
this.showArabicCharsLimitMsg = true;
|
|
1772
|
+
this.hasArabicCharsLimitValidationError = true;
|
|
1773
|
+
if (this.arabicCurrentCharsCount == this.options.MaxLength)
|
|
1774
|
+
this.arabicCharsLimitMsgClass = "danger";
|
|
1775
|
+
else
|
|
1776
|
+
this.arabicCharsLimitMsgClass = "warning";
|
|
1777
|
+
}
|
|
1778
|
+
else {
|
|
1779
|
+
this.showArabicCharsLimitMsg = false;
|
|
1780
|
+
this.hasArabicCharsLimitValidationError = false;
|
|
1781
|
+
}
|
|
1782
|
+
var max = this.options.MaxLength;
|
|
1783
|
+
var current = this.arabicCurrentCharsCount;
|
|
1784
|
+
var resource = this.UtilityService.getResourceValue("MaxLengthLimitWarning");
|
|
1785
|
+
this.arabicMaxLimitWarningMsg = eval('`' + resource + '`');
|
|
1786
|
+
}
|
|
1506
1787
|
}
|
|
1507
1788
|
let mulitLangModel = new EnglishArabicDTO();
|
|
1508
1789
|
mulitLangModel.Arabic = arabicValue;
|
|
@@ -1526,13 +1807,21 @@ class MultiLingualTextAreaComponent {
|
|
|
1526
1807
|
trimControlValue(type) {
|
|
1527
1808
|
const whitespace = ' ';
|
|
1528
1809
|
if (type == "En") {
|
|
1810
|
+
let originalValue = this.EnglishTextAreaFormControl.value;
|
|
1811
|
+
if (this.options.PatchFunction && this.options.PatchPath && this.EnglishTextAreaFormControl.valid) {
|
|
1812
|
+
this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
|
|
1813
|
+
}
|
|
1529
1814
|
if (this.EnglishTextAreaFormControl.value.startsWith(whitespace) || this.EnglishTextAreaFormControl.value.endsWith(whitespace)) {
|
|
1530
|
-
this.EnglishTextAreaFormControl.patchValue(
|
|
1815
|
+
this.EnglishTextAreaFormControl.patchValue(originalValue);
|
|
1531
1816
|
}
|
|
1532
1817
|
}
|
|
1533
1818
|
if (type == "Ar") {
|
|
1819
|
+
let originalValue = this.ArabicTextAreaFormControl.value;
|
|
1820
|
+
if (this.options.PatchFunction && this.options.PatchPath && this.ArabicTextAreaFormControl.valid) {
|
|
1821
|
+
this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
|
|
1822
|
+
}
|
|
1534
1823
|
if (this.ArabicTextAreaFormControl.value.startsWith(whitespace) || this.ArabicTextAreaFormControl.value.endsWith(whitespace)) {
|
|
1535
|
-
this.ArabicTextAreaFormControl.patchValue(
|
|
1824
|
+
this.ArabicTextAreaFormControl.patchValue(originalValue);
|
|
1536
1825
|
}
|
|
1537
1826
|
}
|
|
1538
1827
|
}
|
|
@@ -1613,18 +1902,32 @@ class MultiLingualTextAreaComponent {
|
|
|
1613
1902
|
this.ArabicTextAreaFormControl.updateValueAndValidity();
|
|
1614
1903
|
this.EnglishTextAreaFormControl.updateValueAndValidity();
|
|
1615
1904
|
}
|
|
1616
|
-
|
|
1617
|
-
this.IsShowArabicWordCount =
|
|
1905
|
+
onArabicFocus(isFocus) {
|
|
1906
|
+
this.IsShowArabicWordCount = isFocus;
|
|
1907
|
+
//onFocus
|
|
1908
|
+
if (isFocus) {
|
|
1909
|
+
if (this.hasArabicCharsLimitValidationError) //check if there was previous validation error
|
|
1910
|
+
this.showArabicCharsLimitMsg = true;
|
|
1911
|
+
}
|
|
1912
|
+
else //onFocusOut
|
|
1913
|
+
this.showArabicCharsLimitMsg = false;
|
|
1618
1914
|
}
|
|
1619
|
-
|
|
1620
|
-
this.IsShowEnglishWordCount =
|
|
1915
|
+
onEnglishFocus(isFocus) {
|
|
1916
|
+
this.IsShowEnglishWordCount = isFocus;
|
|
1917
|
+
//onFocus
|
|
1918
|
+
if (isFocus) {
|
|
1919
|
+
if (this.hasEnglishCharsLimitValidationError) //check if there was previous validation error
|
|
1920
|
+
this.showEnglishCharsLimitMsg = true;
|
|
1921
|
+
}
|
|
1922
|
+
else //onFocusOut
|
|
1923
|
+
this.showEnglishCharsLimitMsg = false;
|
|
1621
1924
|
}
|
|
1622
1925
|
}
|
|
1623
1926
|
MultiLingualTextAreaComponent.controlContainerstatic = null;
|
|
1624
1927
|
MultiLingualTextAreaComponent.decorators = [
|
|
1625
1928
|
{ type: Component, args: [{
|
|
1626
1929
|
selector: 'BBSF-MultiLingualTextArea',
|
|
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)=\"
|
|
1930
|
+
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)=\"onEnglishFocus(true)\" (focusout)=\"onEnglishFocus(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 (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 *ngIf=\"showEnglishCharsLimitMsg\">\r\n <span class=\"badge b-character-warning float-end\" [ngClass]=\"{'badge-light-warning': englishCharsLimitMsgClass === 'warning', 'badge-light-danger' : englishCharsLimitMsgClass === 'danger' }\">\r\n {{englishMaxLimitWarningMsg}}\r\n </span>\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.IsHideArabicLabel\">\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)=\"onArabicFocus(true)\" (focusout)=\"onArabicFocus(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 *ngIf=\"showArabicCharsLimitMsg\">\r\n <span class=\"badge b-character-warning float-end\" [ngClass]=\"{'badge-light-warning': arabicCharsLimitMsgClass === 'warning', 'badge-light-danger' : arabicCharsLimitMsgClass === 'danger' }\">\r\n {{arabicMaxLimitWarningMsg}}\r\n </span>\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",
|
|
1628
1931
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}\n"]
|
|
1629
1932
|
},] }
|
|
1630
1933
|
];
|
|
@@ -1724,6 +2027,10 @@ class CheckBoxComponent {
|
|
|
1724
2027
|
}
|
|
1725
2028
|
onValueChanged() {
|
|
1726
2029
|
this.OnChange.emit(this.CheckBoxFormControl.value);
|
|
2030
|
+
let originalValue = this.CheckBoxFormControl.value;
|
|
2031
|
+
if (this.options.PatchFunction && this.options.PatchPath && this.group.get(this.options.Name).valid) {
|
|
2032
|
+
this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
|
|
2033
|
+
}
|
|
1727
2034
|
}
|
|
1728
2035
|
}
|
|
1729
2036
|
CheckBoxComponent.controlContainerstatic = null;
|
|
@@ -1859,7 +2166,11 @@ class DropdownListComponent {
|
|
|
1859
2166
|
}
|
|
1860
2167
|
onItemSelect(item) {
|
|
1861
2168
|
this.onChangeService.ChangeValue(this.options.Name);
|
|
1862
|
-
|
|
2169
|
+
let originalValue = item;
|
|
2170
|
+
if (this.options.PatchFunction && this.options.PatchPath && this.group.get(this.options.Name).valid) {
|
|
2171
|
+
this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
|
|
2172
|
+
}
|
|
2173
|
+
this.OnChange.emit(originalValue);
|
|
1863
2174
|
//console.log(this.DropdownListFormControl.value)
|
|
1864
2175
|
}
|
|
1865
2176
|
Clear() {
|
|
@@ -2003,7 +2314,11 @@ class PhoneComponent {
|
|
|
2003
2314
|
}
|
|
2004
2315
|
onValueChanged() {
|
|
2005
2316
|
let Number = this.PhoneFormControl.value.internationalNumber;
|
|
2006
|
-
this.
|
|
2317
|
+
let originalValue = this.controlUtility.trimControlValue(Number);
|
|
2318
|
+
if (this.options.PatchFunction && this.options.PatchPath && this.group.get(this.options.Name).valid) {
|
|
2319
|
+
this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
|
|
2320
|
+
}
|
|
2321
|
+
this.OnChange.emit(originalValue);
|
|
2007
2322
|
}
|
|
2008
2323
|
}
|
|
2009
2324
|
PhoneComponent.controlContainerstatic = null;
|
|
@@ -2040,6 +2355,7 @@ class ToggleslideComponent {
|
|
|
2040
2355
|
this.globalSettings = globalSettings;
|
|
2041
2356
|
this.OnChange = new EventEmitter();
|
|
2042
2357
|
this.SlideValue = false;
|
|
2358
|
+
this.markAllAsTouched = false;
|
|
2043
2359
|
ToggleslideComponent.controlContainerstatic = this.controlContainer;
|
|
2044
2360
|
}
|
|
2045
2361
|
ngOnInit() {
|
|
@@ -2067,12 +2383,22 @@ class ToggleslideComponent {
|
|
|
2067
2383
|
resetError() {
|
|
2068
2384
|
this.controlValidationService.RemoveGlobalError();
|
|
2069
2385
|
}
|
|
2070
|
-
|
|
2071
|
-
|
|
2386
|
+
showGlobalError() {
|
|
2387
|
+
this.controlUtility.showGlobalError();
|
|
2388
|
+
}
|
|
2389
|
+
getErrorValidation(ErrorList) {
|
|
2390
|
+
if (this.markAllAsTouched && this.group.invalid) {
|
|
2391
|
+
this.showGlobalError();
|
|
2392
|
+
this.markAllAsTouched = false;
|
|
2393
|
+
}
|
|
2394
|
+
return this.controlUtility.getErrorValidationMassage(ErrorList, this.group, this.options);
|
|
2072
2395
|
}
|
|
2073
2396
|
changeValueToggle() {
|
|
2074
2397
|
this.OnChange.emit(this.SlideValue);
|
|
2075
2398
|
this.ToggleslideFormControl.setValue(this.SlideValue);
|
|
2399
|
+
if (this.options.PatchFunction && this.options.PatchPath && this.ToggleslideFormControl.valid) {
|
|
2400
|
+
this.controlUtility.patchControlValue(this.SlideValue, this.options.PatchFunction, this.options.PatchPath);
|
|
2401
|
+
}
|
|
2076
2402
|
}
|
|
2077
2403
|
}
|
|
2078
2404
|
ToggleslideComponent.controlContainerstatic = null;
|
|
@@ -2276,7 +2602,11 @@ class HtmlEditorComponent {
|
|
|
2276
2602
|
}
|
|
2277
2603
|
onValueChanged() {
|
|
2278
2604
|
this.HtmlEditorFormControl.setValue(this.HtmlEditorFormControl.value.trim());
|
|
2279
|
-
this.
|
|
2605
|
+
let originalValue = this.controlUtility.trimControlValue(this.HtmlEditorFormControl.value);
|
|
2606
|
+
if (this.options.PatchFunction && this.options.PatchPath && this.HtmlEditorFormControl.valid) {
|
|
2607
|
+
this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
|
|
2608
|
+
}
|
|
2609
|
+
this.OnChange.emit(originalValue);
|
|
2280
2610
|
}
|
|
2281
2611
|
}
|
|
2282
2612
|
HtmlEditorComponent.controlContainerstatic = null;
|
|
@@ -2561,8 +2891,13 @@ class MultiLingualHtmlEditorComponent {
|
|
|
2561
2891
|
if (type == "en") {
|
|
2562
2892
|
this.MultilingualHtmlEditorgroup.controls["English"].setValue(this.MultilingualHtmlEditorgroup.controls["English"].value.trim());
|
|
2563
2893
|
this.englishValue = this.MultilingualHtmlEditorgroup.controls["English"].value == null ? "" : this.MultilingualHtmlEditorgroup.controls["English"].value;
|
|
2564
|
-
if (this.englishValue)
|
|
2894
|
+
if (this.englishValue) {
|
|
2565
2895
|
this.EnglishHtmlEditorFormControl.setValue(this.englishValue);
|
|
2896
|
+
let originalValue = this.englishValue;
|
|
2897
|
+
if (this.options.PatchFunction && this.options.PatchPath && this.EnglishHtmlEditorFormControl.valid) {
|
|
2898
|
+
this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
|
|
2899
|
+
}
|
|
2900
|
+
}
|
|
2566
2901
|
let EngliswordCountArray = this.EnglishHtmlEditorFormControl.value.split(" ").length;
|
|
2567
2902
|
if (EngliswordCountArray > 0) {
|
|
2568
2903
|
if (EngliswordCountArray > this.options.MaxWordCount)
|
|
@@ -2574,8 +2909,13 @@ class MultiLingualHtmlEditorComponent {
|
|
|
2574
2909
|
if (type == "ar") {
|
|
2575
2910
|
this.MultilingualHtmlEditorgroup.controls["Arabic"].setValue(this.MultilingualHtmlEditorgroup.controls["Arabic"].value.trim());
|
|
2576
2911
|
this.arabicValue = this.MultilingualHtmlEditorgroup.controls["Arabic"].value == null ? "" : this.MultilingualHtmlEditorgroup.controls["Arabic"].value;
|
|
2577
|
-
if (this.arabicValue)
|
|
2912
|
+
if (this.arabicValue) {
|
|
2578
2913
|
this.ArabicHtmlEditorFormControl.setValue(this.arabicValue);
|
|
2914
|
+
let originalValue = this.arabicValue;
|
|
2915
|
+
if (this.options.PatchFunction && this.options.PatchPath && this.ArabicHtmlEditorFormControl.valid) {
|
|
2916
|
+
this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
|
|
2917
|
+
}
|
|
2918
|
+
}
|
|
2579
2919
|
let ArabicwordCountArray = this.ArabicHtmlEditorFormControl.value.split(" ").length;
|
|
2580
2920
|
if (ArabicwordCountArray > 0) {
|
|
2581
2921
|
if (ArabicwordCountArray > this.options.MaxWordCount)
|
|
@@ -2680,7 +3020,7 @@ MultiLingualHtmlEditorComponent.controlContainerstatic = null;
|
|
|
2680
3020
|
MultiLingualHtmlEditorComponent.decorators = [
|
|
2681
3021
|
{ type: Component, args: [{
|
|
2682
3022
|
selector: 'BBSF-MultiLingualHtmlEditor',
|
|
2683
|
-
template: "<div class=\"b-control b-multilangual-html-editor\">\r\n <div class=\"form-group validate is-invalid\" [formGroup]=\"group\">\r\n\r\n <div class=\"form-group row\" [formGroup]=\"MultilingualHtmlEditorgroup\">\r\n <div class=\"col-lg-6\">\r\n <div class=\"row\" *ngIf=\"ShowEnglishHtmlEditor\">\r\n <label class=\"b-label col-form-label col-sm-12 \" \r\n [ngClass]=\"(options.ViewType==1)?'col-md-9':'col-md-3'\"\r\n [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 \r\n <angular-editor class=\"form-control bnsights-control {{options.ExtraClasses_EN}} \" (change)=\"onTextChange('en')\" [class.is-invalid]=\"EnglishHtmlEditorFormControl.invalid && EnglishHtmlEditorFormControl.touched\"\r\n formControlName=\"English\" [config]=\"editorEnglishConfig\"></angular-editor>\r\n\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(EnglishHtmlEditorFormControl.invalid && EnglishHtmlEditorFormControl.touched)\">\r\n {{getErrorValidation(EnglishHtmlEditorFormControl.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\">\r\n {{(options.EnglishLabelDescription!=null&&options.EnglishLabelDescription!=\"\")?options.EnglishLabelDescription:options.LabelDescription}}\r\n </div>\r\n </div>\r\n\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 class=\"col-lg-6\">\r\n <div class=\"row\" *ngIf=\"ShowArabicHtmlEditor\">\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'\"\r\n [hidden]=\"options.
|
|
3023
|
+
template: "<div class=\"b-control b-multilangual-html-editor\">\r\n <div class=\"form-group validate is-invalid\" [formGroup]=\"group\">\r\n\r\n <div class=\"form-group row\" [formGroup]=\"MultilingualHtmlEditorgroup\">\r\n <div class=\"col-lg-6\">\r\n <div class=\"row\" *ngIf=\"ShowEnglishHtmlEditor\">\r\n <label class=\"b-label col-form-label col-sm-12 \" \r\n [ngClass]=\"(options.ViewType==1)?'col-md-9':'col-md-3'\"\r\n [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 \r\n <angular-editor class=\"form-control bnsights-control {{options.ExtraClasses_EN}} \" (change)=\"onTextChange('en')\" [class.is-invalid]=\"EnglishHtmlEditorFormControl.invalid && EnglishHtmlEditorFormControl.touched\"\r\n formControlName=\"English\" [config]=\"editorEnglishConfig\"></angular-editor>\r\n\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(EnglishHtmlEditorFormControl.invalid && EnglishHtmlEditorFormControl.touched)\">\r\n {{getErrorValidation(EnglishHtmlEditorFormControl.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\">\r\n {{(options.EnglishLabelDescription!=null&&options.EnglishLabelDescription!=\"\")?options.EnglishLabelDescription:options.LabelDescription}}\r\n </div>\r\n </div>\r\n\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 class=\"col-lg-6\">\r\n <div class=\"row\" *ngIf=\"ShowArabicHtmlEditor\">\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'\"\r\n [hidden]=\"options.IsHideArabicLabel\">\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 \r\n\r\n <angular-editor dir=\"rtl\" class=\"form-control bnsights-control {{options.ExtraClasses_AR}} \" (change)=\"onTextChange('ar')\" [class.is-invalid]=\"ArabicHtmlEditorFormControl.invalid && ArabicHtmlEditorFormControl.touched\"\r\n formControlName=\"Arabic\" [config]=\"editorArabicConfig\"></angular-editor>\r\n\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(ArabicHtmlEditorFormControl.invalid && ArabicHtmlEditorFormControl.touched)\">\r\n {{getErrorValidation(ArabicHtmlEditorFormControl.errors|keyvalue)}}\r\n </div>\r\n\r\n \r\n\r\n <div class=\"d-flex justify-content-between align-items-center\">\r\n <div class=\"control-desc text-dark\">\r\n {{(options.ArabicLabelDescription!=null&&options.ArabicLabelDescription!=\"\")?options.ArabicLabelDescription:options.LabelDescription}}\r\n </div>\r\n </div>\r\n\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\r\n\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n </div>\r\n\r\n</div>\r\n",
|
|
2684
3024
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}\n"]
|
|
2685
3025
|
},] }
|
|
2686
3026
|
];
|
|
@@ -2708,7 +3048,6 @@ class ImageUploaderComponent {
|
|
|
2708
3048
|
this.controlValidationService = controlValidationService;
|
|
2709
3049
|
this.globalSettings = globalSettings;
|
|
2710
3050
|
this.files = [];
|
|
2711
|
-
this.ImageSource = "./src/assets/images/uploadimg.png";
|
|
2712
3051
|
this.OnChange = new EventEmitter();
|
|
2713
3052
|
this.ValidationMessage = "";
|
|
2714
3053
|
this.AcceptedType = "";
|
|
@@ -2755,8 +3094,10 @@ class ImageUploaderComponent {
|
|
|
2755
3094
|
this.controlValidationService.isCreatedBefor = false;
|
|
2756
3095
|
if (!this.options.ViewType)
|
|
2757
3096
|
this.options.ViewType = this.globalSettings.ViewType;
|
|
2758
|
-
if (this.options.DefaultImageSrc
|
|
2759
|
-
this.
|
|
3097
|
+
if (!this.options.DefaultImageSrc)
|
|
3098
|
+
this.options.DefaultImageSrc = this.globalSettings.DefaultImageSrc;
|
|
3099
|
+
//Set img src by default value
|
|
3100
|
+
this.ImageSource = this.options.DefaultImageSrc;
|
|
2760
3101
|
if (this.options.AllowImageCropper) {
|
|
2761
3102
|
this.config = {
|
|
2762
3103
|
aspectRatio: this.options.ImageCropperWidth / this.options.ImageCropperHeight,
|
|
@@ -2913,7 +3254,11 @@ class ImageUploaderComponent {
|
|
|
2913
3254
|
this.files = [];
|
|
2914
3255
|
this.files.push(...event.addedFiles);
|
|
2915
3256
|
}
|
|
2916
|
-
this.
|
|
3257
|
+
let originalValue = this.ImageUploadFormControl.value;
|
|
3258
|
+
if (this.options.PatchFunction && this.options.PatchPath && this.ImageUploadFormControl.valid) {
|
|
3259
|
+
this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
|
|
3260
|
+
}
|
|
3261
|
+
this.OnChange.emit(originalValue);
|
|
2917
3262
|
};
|
|
2918
3263
|
}
|
|
2919
3264
|
}
|
|
@@ -2922,6 +3267,8 @@ class ImageUploaderComponent {
|
|
|
2922
3267
|
let ItemList = this.group.get(this.options.Name).value;
|
|
2923
3268
|
this.files = [];
|
|
2924
3269
|
ItemList = null;
|
|
3270
|
+
//Set Img src by default image (upload)
|
|
3271
|
+
this.ImageSource = this.options.DefaultImageSrc;
|
|
2925
3272
|
if ((this.files.length == 0) && this.options.IsRequired) {
|
|
2926
3273
|
this.ImageUploadFormControl.markAsTouched();
|
|
2927
3274
|
this.ImageUploadFormControl.setErrors(Validators.required);
|
|
@@ -3189,7 +3536,11 @@ class ProfileImageUploaderComponent {
|
|
|
3189
3536
|
reader.onload = () => {
|
|
3190
3537
|
this.imageUrl = reader.result.toString();
|
|
3191
3538
|
this.openModal(true);
|
|
3192
|
-
this.
|
|
3539
|
+
let originalValue = this.group.get(this.options.Name).value;
|
|
3540
|
+
if (this.options.PatchFunction && this.options.PatchPath && this.group.get(this.options.Name).valid) {
|
|
3541
|
+
this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
|
|
3542
|
+
}
|
|
3543
|
+
this.OnChange.emit(originalValue);
|
|
3193
3544
|
};
|
|
3194
3545
|
}
|
|
3195
3546
|
}
|
|
@@ -3519,13 +3870,16 @@ class AutocompleteTextBoxComponent {
|
|
|
3519
3870
|
else {
|
|
3520
3871
|
this.AutocompleteTextBoxControl.setValue(item);
|
|
3521
3872
|
this.AutocompleteTextBoxControl.updateValueAndValidity();
|
|
3873
|
+
let originalValue = this.AutocompleteTextBoxControl.value;
|
|
3874
|
+
if (this.options.PatchFunction && this.options.PatchPath && this.group.get(this.options.Name).valid) {
|
|
3875
|
+
this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
|
|
3876
|
+
}
|
|
3522
3877
|
this.OnChange.emit(this.AutocompleteTextBoxControl.value);
|
|
3523
3878
|
}
|
|
3524
3879
|
}
|
|
3525
3880
|
}
|
|
3526
3881
|
onChangeSearch(search) {
|
|
3527
3882
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3528
|
-
debugger;
|
|
3529
3883
|
this.Search = search;
|
|
3530
3884
|
this.SelectedValue = "";
|
|
3531
3885
|
yield this.suggestions$.subscribe((result) => {
|
|
@@ -3549,7 +3903,7 @@ AutocompleteTextBoxComponent.decorators = [
|
|
|
3549
3903
|
{ type: Component, args: [{
|
|
3550
3904
|
// tslint:disable-next-line: component-selector
|
|
3551
3905
|
selector: 'BBSF-AutocompleteTextBox',
|
|
3552
|
-
template: "<div class=\"b-control b-auto-complete-textbox\">\r\n <div class=\"form-group row validate is-invalid\" [formGroup]=\"group\">\r\n\r\n <label class=\"b-label col-form-label col-sm-12 \" [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\"\r\n
|
|
3906
|
+
template: "<div class=\"b-control b-auto-complete-textbox\">\r\n <div class=\"form-group row validate is-invalid\" [formGroup]=\"group\">\r\n\r\n <label class=\"b-label col-form-label col-sm-12 \" [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\"\r\n [hidden]=\"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)?'':'col-md-9'\">\r\n\r\n <!-- <input \r\n[(ngModel)]=\"Search\"\r\n value=\"{{Search}}\" \r\n autocomplete=\"off\"\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 [class.is-invalid]=\"AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched\"\r\n typeaheadOptionField=\"{{Value}}\"\r\n [typeahead]=\"suggestions$\"\r\n [typeaheadAsync]=\"true\"\r\n placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\" (typeaheadOnSelect)=\"handleResultSelected($event)\" (blur)=\"onBlur($event.target.value)\" /> -->\r\n <!-- \r\n <input ngxTypeahead autocomplete=\"off\"\r\n value=\"{{Search}}\"\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 [class.is-invalid]=\"AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched\"\r\n placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\" [taUrl]=\"options.ActionURL\"\r\n [taParams]=\"options.Params\" taQueryParam=\"{{QueryParam}}\" taApi=\"{{Api}}\" taListItemLabel=\"{{Value}}\" (taSelected)=\"handleResultSelected($event)\"> -->\r\n\r\n\r\n\r\n <ng-autocomplete *ngIf=\"!options.AllowNewSelection\" [data]=\"dataList\" [initialValue]=\"SelectedValue\"\r\n [searchKeyword]=\"keyword\" placeholder=\"{{options.Placeholder}}\" (selected)='selectEvent($event)'\r\n (inputChanged)='onChangeSearch($event)' historyIdentifier=\"dataList\" [itemTemplate]=\"itemTemplate\"\r\n [notFoundTemplate]=\"notFoundTemplate\" class=\"form-control bnsights-control {{options.ExtraClasses}}\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\" formControlName=\"{{options.Name}}\" aria-describedby=\"email-error\"\r\n aria-invalid=\"true\"\r\n [class.is-invalid]=\"AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched\">\r\n </ng-autocomplete>\r\n\r\n <ng-autocomplete *ngIf=\"options.AllowNewSelection\" [data]=\"dataList\" [initialValue]=\"SelectedValue\"\r\n [searchKeyword]=\"keyword\" placeholder=\"{{options.Placeholder}}\" (selected)='selectEvent($event)'\r\n (inputChanged)='onChangeSearch($event)' historyIdentifier=\"dataList\" [itemTemplate]=\"itemTemplate\"\r\n class=\"form-control bnsights-control {{options.ExtraClasses}}\" dir=\"{{options.ForceDirection==2?'rtl':''}}\"\r\n formControlName=\"{{options.Name}}\" aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n [class.is-invalid]=\"AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched\">\r\n </ng-autocomplete>\r\n\r\n\r\n\r\n <ng-template #itemTemplate let-item>\r\n <a [innerHTML]=\"item.value\"></a>\r\n </ng-template>\r\n\r\n <ng-template #notFoundTemplate let-notFound>\r\n <div [innerHTML]=\"notFound\"></div>\r\n </ng-template>\r\n\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched)\">\r\n {{getErrorValidation(AutocompleteTextBoxControl.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\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">\r\n {{resetError()}}</div>\r\n\r\n </div>\r\n </div>\r\n</div>",
|
|
3553
3907
|
styles: [""]
|
|
3554
3908
|
},] }
|
|
3555
3909
|
];
|
|
@@ -3732,7 +4086,11 @@ class TagsInputComponent {
|
|
|
3732
4086
|
this.TagsFormControl.invalid;
|
|
3733
4087
|
}
|
|
3734
4088
|
}
|
|
3735
|
-
this.
|
|
4089
|
+
let originalValue = this.TagsFormControl.value;
|
|
4090
|
+
if (this.options.PatchFunction && this.options.PatchPath && this.TagsFormControl.valid) {
|
|
4091
|
+
this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
|
|
4092
|
+
}
|
|
4093
|
+
this.OnChange.emit(originalValue);
|
|
3736
4094
|
}
|
|
3737
4095
|
onNoOptionsMatch(event) {
|
|
3738
4096
|
this.IsNoMatch = event;
|
|
@@ -3968,7 +4326,6 @@ class PagingComponent {
|
|
|
3968
4326
|
}
|
|
3969
4327
|
this.requestHandlerService.post(this.options.ActionPostURL, pagingDTO, null, params, null)
|
|
3970
4328
|
.subscribe((responseData) => {
|
|
3971
|
-
debugger;
|
|
3972
4329
|
this.result = responseData.items; //this.castItems(responseData.items);
|
|
3973
4330
|
let castedResult = plainToClass(this.options.TypeOfResponse, this.result, { excludeExtraneousValues: true });
|
|
3974
4331
|
this.Items.emit(castedResult);
|
|
@@ -3984,7 +4341,6 @@ class PagingComponent {
|
|
|
3984
4341
|
});
|
|
3985
4342
|
}
|
|
3986
4343
|
castItems(objectArr) {
|
|
3987
|
-
debugger;
|
|
3988
4344
|
let originalArray = [];
|
|
3989
4345
|
for (let index = 0; index < objectArr.length; index++) {
|
|
3990
4346
|
const element = objectArr[index];
|
|
@@ -4220,7 +4576,11 @@ class RadioButtonComponent {
|
|
|
4220
4576
|
return this.controlUtility.getErrorValidationMassage(ErrorList, this.group, this.options);
|
|
4221
4577
|
}
|
|
4222
4578
|
onValueChanged() {
|
|
4223
|
-
this.
|
|
4579
|
+
let originalValue = this.RadioButtonFormControl.value;
|
|
4580
|
+
if (this.options.PatchFunction && this.options.PatchPath && this.RadioButtonFormControl.valid) {
|
|
4581
|
+
this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
|
|
4582
|
+
}
|
|
4583
|
+
this.OnChange.emit(originalValue);
|
|
4224
4584
|
}
|
|
4225
4585
|
}
|
|
4226
4586
|
RadioButtonComponent.controlContainerstatic = null;
|
|
@@ -4269,7 +4629,12 @@ class TextboxComponent {
|
|
|
4269
4629
|
this.markAllAsTouched = false;
|
|
4270
4630
|
this.validationRules = [];
|
|
4271
4631
|
this.validationRulesasync = [];
|
|
4272
|
-
|
|
4632
|
+
//For Show warning message of max length limit
|
|
4633
|
+
this.currentCharsCount = 0;
|
|
4634
|
+
this.showCharsLimitMsg = false;
|
|
4635
|
+
this.hasCharsLimitValidationError = false;
|
|
4636
|
+
this.minCharsLimit = -1; //To disable chars limit feature by default
|
|
4637
|
+
this.maxLimitWarningMsg = "";
|
|
4273
4638
|
this.resetError = () => {
|
|
4274
4639
|
this.controlValidationService.RemoveGlobalError();
|
|
4275
4640
|
};
|
|
@@ -4295,21 +4660,10 @@ class TextboxComponent {
|
|
|
4295
4660
|
};
|
|
4296
4661
|
TextboxComponent.controlContainerstatic = this.controlContainer;
|
|
4297
4662
|
}
|
|
4298
|
-
// static showErrorOfInputs(errors: any) {
|
|
4299
|
-
// const controlContainerstatic = TextboxComponent.controlContainerstatic;
|
|
4300
|
-
// const formGroup = controlContainerstatic.control as FormGroup;
|
|
4301
|
-
// for (const key in errors) {
|
|
4302
|
-
// if (errors.hasOwnProperty(key)) {
|
|
4303
|
-
// for (const iterator of errors[key]) {
|
|
4304
|
-
// const formControl = formGroup.get(key) as FormControl;
|
|
4305
|
-
// formControl.setErrors({ "FluentApi": iterator });
|
|
4306
|
-
// formControl.markAsTouched();
|
|
4307
|
-
// }
|
|
4308
|
-
// }
|
|
4309
|
-
// }
|
|
4310
|
-
// }
|
|
4311
4663
|
ngOnInit() {
|
|
4312
4664
|
this.controlValidationService.isCreatedBefor = false;
|
|
4665
|
+
if (!this.options.MaxLength)
|
|
4666
|
+
this.options.MaxLength = this.globalSettings.MaxLengthTextBox;
|
|
4313
4667
|
if (!this.options.ViewType)
|
|
4314
4668
|
this.options.ViewType = this.globalSettings.ViewType;
|
|
4315
4669
|
if (this.options.MaskPattern != null && this.options.MaskPattern != "") {
|
|
@@ -4322,6 +4676,9 @@ class TextboxComponent {
|
|
|
4322
4676
|
if (this.options.LabelKey != null && this.options.LabelKey != "")
|
|
4323
4677
|
this.options.LabelValue = this.UtilityService.getResourceValue(this.options.LabelKey);
|
|
4324
4678
|
this.getCustomErrorsMassages();
|
|
4679
|
+
if (this.options.IsRequired) {
|
|
4680
|
+
this.validationRules.push(Validators.required);
|
|
4681
|
+
}
|
|
4325
4682
|
switch (this.options.Type) {
|
|
4326
4683
|
case InputType.Email:
|
|
4327
4684
|
this.validationRules.push(Validators.compose([
|
|
@@ -4333,7 +4690,12 @@ class TextboxComponent {
|
|
|
4333
4690
|
this.options.Placeholder = this.MaskPattern;
|
|
4334
4691
|
break;
|
|
4335
4692
|
case InputType.Number:
|
|
4336
|
-
this.validationRules.push(Validators.
|
|
4693
|
+
this.validationRules.push(Validators.compose([
|
|
4694
|
+
this.controlUtility.patternValidator(/^[0-9]*$/, { IntegerNumberValidationKey: "" }),
|
|
4695
|
+
]));
|
|
4696
|
+
this.validationRules.push(Validators.compose([
|
|
4697
|
+
this.controlUtility.patternValidator(/^[+]?([.]\d+|\d+[.]?\d*)$/, { PositiveNumberValidationKey: "" }),
|
|
4698
|
+
]));
|
|
4337
4699
|
if (this.options.NumberRange != null) {
|
|
4338
4700
|
this.validationRules.push(Validators.min(this.options.NumberRange.From));
|
|
4339
4701
|
this.validationRules.push(Validators.max(this.options.NumberRange.To));
|
|
@@ -4375,9 +4737,9 @@ class TextboxComponent {
|
|
|
4375
4737
|
}
|
|
4376
4738
|
if (this.options.MaxLength > 0) {
|
|
4377
4739
|
this.validationRules.push(Validators.maxLength(this.options.MaxLength));
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
this.
|
|
4740
|
+
if (!this.options.MaxLengthWarningLimit)
|
|
4741
|
+
this.options.MaxLengthWarningLimit = this.globalSettings.MaxLengthWarningLimit;
|
|
4742
|
+
this.minCharsLimit = this.options.MaxLength - this.options.MaxLengthWarningLimit;
|
|
4381
4743
|
}
|
|
4382
4744
|
this.TextBoxFormControl.setValidators(this.validationRules);
|
|
4383
4745
|
this.TextBoxFormControl.setAsyncValidators(this.validationRulesasync);
|
|
@@ -4407,8 +4769,11 @@ class TextboxComponent {
|
|
|
4407
4769
|
return this.controlUtility.getInputType(type);
|
|
4408
4770
|
}
|
|
4409
4771
|
trimControlValue() {
|
|
4410
|
-
let
|
|
4411
|
-
this.TextBoxFormControl.patchValue(
|
|
4772
|
+
let originalValue = this.controlUtility.trimControlValue(this.TextBoxFormControl.value);
|
|
4773
|
+
this.TextBoxFormControl.patchValue(originalValue);
|
|
4774
|
+
if (this.options.PatchFunction && this.options.PatchPath && this.TextBoxFormControl.valid) {
|
|
4775
|
+
this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
|
|
4776
|
+
}
|
|
4412
4777
|
}
|
|
4413
4778
|
copyInputMessage(inputElement) {
|
|
4414
4779
|
this.controlUtility.CopyInputMessage(inputElement);
|
|
@@ -4424,6 +4789,11 @@ class TextboxComponent {
|
|
|
4424
4789
|
this.EnglishLetterOnly = this.UtilityService.getResourceValue("EnglishLetterOnly");
|
|
4425
4790
|
}
|
|
4426
4791
|
onTextChange() {
|
|
4792
|
+
if (this.options.Type == InputType.Number)
|
|
4793
|
+
if (!this.TextBoxFormControl.value) {
|
|
4794
|
+
this.TextBoxFormControl.setErrors({ IntegerNumberValidationKey: "" });
|
|
4795
|
+
return;
|
|
4796
|
+
}
|
|
4427
4797
|
if (this.TextBoxFormControl.value == "") {
|
|
4428
4798
|
this.WordCountArray = 0;
|
|
4429
4799
|
this.WordCount = 0;
|
|
@@ -4441,18 +4811,46 @@ class TextboxComponent {
|
|
|
4441
4811
|
this.WordCount = this.WordCountArray;
|
|
4442
4812
|
}
|
|
4443
4813
|
}
|
|
4814
|
+
//Check for maxlength limit count
|
|
4815
|
+
//MaxLength should be gretaer than or equals chars limit so that minCharsLimit would be >= 0
|
|
4816
|
+
if (this.options.MaxLength && this.minCharsLimit >= 0) {
|
|
4817
|
+
this.currentCharsCount = this.TextBoxFormControl.value.length;
|
|
4818
|
+
if (this.currentCharsCount >= this.minCharsLimit) {
|
|
4819
|
+
this.showCharsLimitMsg = true;
|
|
4820
|
+
this.hasCharsLimitValidationError = true;
|
|
4821
|
+
if (this.currentCharsCount == this.options.MaxLength)
|
|
4822
|
+
this.charsLimitMsgClass = "danger";
|
|
4823
|
+
else
|
|
4824
|
+
this.charsLimitMsgClass = "warning";
|
|
4825
|
+
}
|
|
4826
|
+
else {
|
|
4827
|
+
this.showCharsLimitMsg = false;
|
|
4828
|
+
this.hasCharsLimitValidationError = false;
|
|
4829
|
+
}
|
|
4830
|
+
var max = this.options.MaxLength;
|
|
4831
|
+
var current = this.currentCharsCount;
|
|
4832
|
+
var resource = this.UtilityService.getResourceValue("MaxLengthLimitWarning");
|
|
4833
|
+
this.maxLimitWarningMsg = eval('`' + resource + '`');
|
|
4834
|
+
}
|
|
4444
4835
|
}
|
|
4445
4836
|
this.OnChange.emit(this.TextBoxFormControl.value);
|
|
4446
4837
|
}
|
|
4447
|
-
|
|
4448
|
-
this.IsShowWordCount =
|
|
4838
|
+
onFocus(isFocus) {
|
|
4839
|
+
this.IsShowWordCount = isFocus;
|
|
4840
|
+
//onFocus
|
|
4841
|
+
if (isFocus) {
|
|
4842
|
+
if (this.hasCharsLimitValidationError) //check if there was previous validation error
|
|
4843
|
+
this.showCharsLimitMsg = true;
|
|
4844
|
+
}
|
|
4845
|
+
else //onFocusOut
|
|
4846
|
+
this.showCharsLimitMsg = false;
|
|
4449
4847
|
}
|
|
4450
4848
|
}
|
|
4451
4849
|
TextboxComponent.controlContainerstatic = null;
|
|
4452
4850
|
TextboxComponent.decorators = [
|
|
4453
4851
|
{ type: Component, args: [{
|
|
4454
4852
|
selector: 'BBSF-TextBox',
|
|
4455
|
-
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)=\"
|
|
4853
|
+
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\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)=\"onFocus(true)\" (focusout)=\"onFocus(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 *ngIf=\"showCharsLimitMsg\">\r\n <span class=\"badge b-character-warning float-end\" [ngClass]=\"{'badge-light-warning': charsLimitMsgClass === 'warning', 'badge-light-danger' : charsLimitMsgClass === 'danger' }\">\r\n {{maxLimitWarningMsg}}\r\n </span>\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",
|
|
4456
4854
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}.flip_V{transform:scaleY(-1)}\n"]
|
|
4457
4855
|
},] }
|
|
4458
4856
|
];
|
|
@@ -4709,6 +5107,10 @@ class MapAutoCompleteComponent {
|
|
|
4709
5107
|
this.MapAutoCompleteModel.Longitude = location.longitude;
|
|
4710
5108
|
this.MapAutoCompleteFormControl.setValue(null);
|
|
4711
5109
|
this.MapAutoCompleteFormControl.setValue(this.MapAutoCompleteModel);
|
|
5110
|
+
let originalValue = this.MapAutoCompleteFormControl.value;
|
|
5111
|
+
if (this.options.PatchFunction && this.options.PatchPath && this.MapAutoCompleteFormControl.valid) {
|
|
5112
|
+
this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
|
|
5113
|
+
}
|
|
4712
5114
|
}
|
|
4713
5115
|
GermanAddressMapped(result) {
|
|
4714
5116
|
this.MapAutoCompleteModel == new MapAutocompleteDTO();
|
|
@@ -4977,23 +5379,7 @@ class FormComponent {
|
|
|
4977
5379
|
this.utilityService.notifyErrorMessage();
|
|
4978
5380
|
}
|
|
4979
5381
|
else {
|
|
4980
|
-
|
|
4981
|
-
if (err.status == 400) {
|
|
4982
|
-
this.controlValidationService.renderServerErrors(this.options.FormGroup, err, new RequestOptionsModel(), this.fromName);
|
|
4983
|
-
}
|
|
4984
|
-
else if (err.status == 401) {
|
|
4985
|
-
this.router.navigate(["/Admin/account/login"]);
|
|
4986
|
-
}
|
|
4987
|
-
else if (err.status == 510) {
|
|
4988
|
-
errorMessage = this.utilityService.getCurrentLanguage() == "en" ? "Can not delete this item as it is related to others" : "لا يمكن حذف هذا العنصر لأنه مرتبط بعناصر أخرى";
|
|
4989
|
-
if (!this.options.DisableErrorNotification)
|
|
4990
|
-
this.utilityService.notifyErrorMessage(errorMessage);
|
|
4991
|
-
}
|
|
4992
|
-
else {
|
|
4993
|
-
errorMessage = `error message is: ${err.error ? err.error.Message : err.message}`;
|
|
4994
|
-
if (!this.options.DisableErrorNotification)
|
|
4995
|
-
this.utilityService.notifyErrorMessage(errorMessage);
|
|
4996
|
-
}
|
|
5382
|
+
this.controlValidationService.renderServerErrors(this.options.FormGroup, err, new RequestOptionsModel(), this.fromName);
|
|
4997
5383
|
}
|
|
4998
5384
|
if (!this.options.DisableBlockUI)
|
|
4999
5385
|
this.utilityService.stopBlockUI();
|
|
@@ -5344,13 +5730,18 @@ var ForceDirection;
|
|
|
5344
5730
|
ForceDirection[ForceDirection["Arabic"] = 2] = "Arabic";
|
|
5345
5731
|
})(ForceDirection || (ForceDirection = {}));
|
|
5346
5732
|
|
|
5347
|
-
class
|
|
5733
|
+
class ControlOptionsBase {
|
|
5348
5734
|
constructor() {
|
|
5349
|
-
/** to set type of view if
|
|
5350
|
-
this.ViewType =
|
|
5351
|
-
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
|
|
5352
|
-
*/
|
|
5735
|
+
/** to set type of view if Control is Vertical or Horizontal */
|
|
5736
|
+
this.ViewType = null;
|
|
5737
|
+
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage */
|
|
5353
5738
|
this.CustomValidation = [];
|
|
5739
|
+
}
|
|
5740
|
+
}
|
|
5741
|
+
|
|
5742
|
+
class DatePickerOptions extends ControlOptionsBase {
|
|
5743
|
+
constructor() {
|
|
5744
|
+
super(...arguments);
|
|
5354
5745
|
/**To set First Day Of Week to DatePicker */
|
|
5355
5746
|
this.FirstDayOfWeek = 1;
|
|
5356
5747
|
/**To set PickerType to DatePicker is Calendar or Timer Or Both */
|
|
@@ -5360,17 +5751,16 @@ class DatePickerOptions {
|
|
|
5360
5751
|
/**To set SelectMode to DatePicker is Single or Range */
|
|
5361
5752
|
this.SelectMode = SelectMode.Single;
|
|
5362
5753
|
this.ForceDirection = ForceDirection.English;
|
|
5754
|
+
/**Name of DatePicker control to compare value with it */
|
|
5755
|
+
this.StartControlToCompareWith = null;
|
|
5363
5756
|
}
|
|
5364
5757
|
}
|
|
5365
5758
|
|
|
5366
|
-
class DropdownOptions {
|
|
5759
|
+
class DropdownOptions extends ControlOptionsBase {
|
|
5367
5760
|
constructor() {
|
|
5761
|
+
super(...arguments);
|
|
5368
5762
|
/** Disable Bootstrap DropdownList */
|
|
5369
5763
|
this.DisableBootstrapSelect = false;
|
|
5370
|
-
/** to set type of view if DropdownList is Vertical or Horizontal */
|
|
5371
|
-
this.ViewType = null;
|
|
5372
|
-
/** To Set Custom Validation*/
|
|
5373
|
-
this.CustomValidation = [];
|
|
5374
5764
|
/** Set key for item in DropdownList */
|
|
5375
5765
|
this.ItemTempletkey = "key";
|
|
5376
5766
|
/** Set value for item in DropdownList */
|
|
@@ -5379,27 +5769,19 @@ class DropdownOptions {
|
|
|
5379
5769
|
}
|
|
5380
5770
|
}
|
|
5381
5771
|
|
|
5382
|
-
class FileUploadOptions {
|
|
5772
|
+
class FileUploadOptions extends ControlOptionsBase {
|
|
5383
5773
|
constructor() {
|
|
5774
|
+
super(...arguments);
|
|
5384
5775
|
/** Ability to set FileInput required */
|
|
5385
5776
|
this.IsMultipleFile = false;
|
|
5386
5777
|
/** Sets boolean Value to Show IsDropZone Or Not */
|
|
5387
5778
|
this.IsDropZone = false;
|
|
5388
|
-
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
|
|
5389
|
-
*/
|
|
5390
|
-
this.CustomValidation = [];
|
|
5391
|
-
/** to set type of view if textbox is Vertical or Horizontal */
|
|
5392
|
-
this.ViewType = null;
|
|
5393
5779
|
}
|
|
5394
5780
|
}
|
|
5395
5781
|
|
|
5396
|
-
class HtmlEditorOptions {
|
|
5782
|
+
class HtmlEditorOptions extends ControlOptionsBase {
|
|
5397
5783
|
constructor() {
|
|
5398
|
-
|
|
5399
|
-
this.ViewType = null;
|
|
5400
|
-
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
|
|
5401
|
-
*/
|
|
5402
|
-
this.CustomValidation = [];
|
|
5784
|
+
super(...arguments);
|
|
5403
5785
|
/** to set Direction of HtmlEditor if HtmlEditor is Arabic or English */
|
|
5404
5786
|
this.ForceDirection = ForceDirection.English;
|
|
5405
5787
|
/** Set Height For */
|
|
@@ -5417,45 +5799,26 @@ var ImageType;
|
|
|
5417
5799
|
ImageType["None"] = "";
|
|
5418
5800
|
})(ImageType || (ImageType = {}));
|
|
5419
5801
|
|
|
5420
|
-
class ImageUploadOptions {
|
|
5802
|
+
class ImageUploadOptions extends ControlOptionsBase {
|
|
5421
5803
|
constructor() {
|
|
5804
|
+
super(...arguments);
|
|
5422
5805
|
/** Allow to Upload Multiple File */
|
|
5423
5806
|
this.IsMultiple = false;
|
|
5424
5807
|
/** Allow to Use Drop Zone */
|
|
5425
5808
|
this.AllowDropZone = false;
|
|
5426
|
-
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
|
|
5427
|
-
*/
|
|
5428
|
-
this.CustomValidation = [];
|
|
5429
|
-
/** to set type of view if FileInput is Vertical or Horizontal */
|
|
5430
|
-
this.ViewType = null;
|
|
5431
5809
|
/** Set List of Custom Attribute to FileInput */
|
|
5432
5810
|
this.FileUploadAcceptsTypes = [ImageType.ImageTypes];
|
|
5433
5811
|
}
|
|
5434
5812
|
}
|
|
5435
5813
|
|
|
5436
|
-
class MapAutoCompleteOptions {
|
|
5437
|
-
constructor() {
|
|
5438
|
-
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
|
|
5439
|
-
*/
|
|
5440
|
-
this.CustomValidation = [];
|
|
5441
|
-
/** to set type of view if MapAutoComplete is Vertical or Horizontal */
|
|
5442
|
-
this.ViewType = null;
|
|
5443
|
-
}
|
|
5814
|
+
class MapAutoCompleteOptions extends ControlOptionsBase {
|
|
5444
5815
|
}
|
|
5445
5816
|
|
|
5446
|
-
class PhoneOptions {
|
|
5817
|
+
class PhoneOptions extends ControlOptionsBase {
|
|
5447
5818
|
constructor() {
|
|
5448
|
-
|
|
5449
|
-
* Represent Css classes to Phonebox
|
|
5450
|
-
*/
|
|
5451
|
-
this.ExtraClasses = "form-control bnsights-control";
|
|
5452
|
-
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
|
|
5453
|
-
*/
|
|
5454
|
-
this.CustomValidation = [];
|
|
5819
|
+
super(...arguments);
|
|
5455
5820
|
/**Set List Of Countries As Preferred Countries*/
|
|
5456
5821
|
this.PreferredCountries = [];
|
|
5457
|
-
/** to set type of view if Phonebox is Vertical or Horizontal */
|
|
5458
|
-
this.ViewType = null;
|
|
5459
5822
|
this.ForceDirection = ForceDirection.English;
|
|
5460
5823
|
}
|
|
5461
5824
|
}
|
|
@@ -5463,13 +5826,9 @@ class PhoneOptions {
|
|
|
5463
5826
|
class RangeNumber {
|
|
5464
5827
|
}
|
|
5465
5828
|
|
|
5466
|
-
class TextAreaOptions {
|
|
5829
|
+
class TextAreaOptions extends ControlOptionsBase {
|
|
5467
5830
|
constructor() {
|
|
5468
|
-
|
|
5469
|
-
this.ViewType = null;
|
|
5470
|
-
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
|
|
5471
|
-
*/
|
|
5472
|
-
this.CustomValidation = [];
|
|
5831
|
+
super(...arguments);
|
|
5473
5832
|
/** to set Direction of TextArea if TextArea is Arabic or English */
|
|
5474
5833
|
this.ForceDirection = ForceDirection.English;
|
|
5475
5834
|
}
|
|
@@ -5481,17 +5840,13 @@ var IconPosition;
|
|
|
5481
5840
|
IconPosition[IconPosition["right"] = 2] = "right";
|
|
5482
5841
|
})(IconPosition || (IconPosition = {}));
|
|
5483
5842
|
|
|
5484
|
-
class TextBoxOptions {
|
|
5843
|
+
class TextBoxOptions extends ControlOptionsBase {
|
|
5485
5844
|
constructor() {
|
|
5845
|
+
super(...arguments);
|
|
5486
5846
|
/** set Range Number to Textbox with type number with From-Value and To-value*/
|
|
5487
5847
|
this.NumberRange = new RangeNumber();
|
|
5488
5848
|
/**Prevent AutoComplete of textbox*/
|
|
5489
5849
|
this.AutoComplete = "off";
|
|
5490
|
-
/** to set type of view if textbox is Vertical or Horizontal */
|
|
5491
|
-
this.ViewType = null;
|
|
5492
|
-
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
|
|
5493
|
-
*/
|
|
5494
|
-
this.CustomValidation = [];
|
|
5495
5850
|
/** to set Direction of textbox if textbox is Arabic or English */
|
|
5496
5851
|
this.ForceDirection = null;
|
|
5497
5852
|
/** to set Language of textbox if textbox language is Arabic or English */
|
|
@@ -5504,9 +5859,9 @@ class TextBoxOptions {
|
|
|
5504
5859
|
}
|
|
5505
5860
|
}
|
|
5506
5861
|
|
|
5507
|
-
class ToggleSlideOptions {
|
|
5862
|
+
class ToggleSlideOptions extends ControlOptionsBase {
|
|
5508
5863
|
constructor() {
|
|
5509
|
-
|
|
5864
|
+
super(...arguments);
|
|
5510
5865
|
this.ForceDirection = ForceDirection.English;
|
|
5511
5866
|
}
|
|
5512
5867
|
}
|
|
@@ -6365,6 +6720,42 @@ RepeaterTableComponent.propDecorators = {
|
|
|
6365
6720
|
options: [{ type: Input }]
|
|
6366
6721
|
};
|
|
6367
6722
|
|
|
6723
|
+
class BBSFDateTimePipe {
|
|
6724
|
+
constructor(datePipe) {
|
|
6725
|
+
this.datePipe = datePipe;
|
|
6726
|
+
}
|
|
6727
|
+
transform(value) {
|
|
6728
|
+
let latest_date = this.datePipe.transform(value, 'dd/MM/yyyy hh:mm a');
|
|
6729
|
+
return latest_date;
|
|
6730
|
+
}
|
|
6731
|
+
}
|
|
6732
|
+
BBSFDateTimePipe.decorators = [
|
|
6733
|
+
{ type: Pipe, args: [{
|
|
6734
|
+
name: 'bbsfDateTime'
|
|
6735
|
+
},] }
|
|
6736
|
+
];
|
|
6737
|
+
BBSFDateTimePipe.ctorParameters = () => [
|
|
6738
|
+
{ type: DatePipe }
|
|
6739
|
+
];
|
|
6740
|
+
|
|
6741
|
+
class BBSFDatePipe {
|
|
6742
|
+
constructor(datePipe) {
|
|
6743
|
+
this.datePipe = datePipe;
|
|
6744
|
+
}
|
|
6745
|
+
transform(value) {
|
|
6746
|
+
let latest_date = this.datePipe.transform(value, 'dd/MM/yyyy');
|
|
6747
|
+
return latest_date;
|
|
6748
|
+
}
|
|
6749
|
+
}
|
|
6750
|
+
BBSFDatePipe.decorators = [
|
|
6751
|
+
{ type: Pipe, args: [{
|
|
6752
|
+
name: 'bbsfDate'
|
|
6753
|
+
},] }
|
|
6754
|
+
];
|
|
6755
|
+
BBSFDatePipe.ctorParameters = () => [
|
|
6756
|
+
{ type: DatePipe }
|
|
6757
|
+
];
|
|
6758
|
+
|
|
6368
6759
|
let options;
|
|
6369
6760
|
let AppInjector;
|
|
6370
6761
|
FullCalendarModule.registerPlugins([
|
|
@@ -6412,7 +6803,9 @@ BBSFControlsModule.decorators = [
|
|
|
6412
6803
|
RepeaterFieldBuilderComponent,
|
|
6413
6804
|
NgTemplateNameDirective,
|
|
6414
6805
|
RepeaterItemFieldComponent,
|
|
6415
|
-
RepeaterTableComponent
|
|
6806
|
+
RepeaterTableComponent,
|
|
6807
|
+
BBSFDateTimePipe,
|
|
6808
|
+
BBSFDatePipe
|
|
6416
6809
|
],
|
|
6417
6810
|
imports: [
|
|
6418
6811
|
CommonModule,
|
|
@@ -6461,7 +6854,7 @@ BBSFControlsModule.decorators = [
|
|
|
6461
6854
|
AutocompleteLibModule,
|
|
6462
6855
|
BBSFUtilitiesModule,
|
|
6463
6856
|
InlineSVGModule.forRoot(),
|
|
6464
|
-
SweetAlert2Module
|
|
6857
|
+
SweetAlert2Module,
|
|
6465
6858
|
],
|
|
6466
6859
|
providers: [
|
|
6467
6860
|
ErrorMassageValidation,
|
|
@@ -6472,6 +6865,8 @@ BBSFControlsModule.decorators = [
|
|
|
6472
6865
|
NgbModal,
|
|
6473
6866
|
NgbActiveModal,
|
|
6474
6867
|
DatePipe,
|
|
6868
|
+
BBSFDateTimePipe,
|
|
6869
|
+
BBSFDatePipe,
|
|
6475
6870
|
RenderComponentService,
|
|
6476
6871
|
{ provide: OWL_DATE_TIME_LOCALE, useValue: ɵ0 },
|
|
6477
6872
|
],
|
|
@@ -6507,7 +6902,9 @@ BBSFControlsModule.decorators = [
|
|
|
6507
6902
|
RepeaterFieldBuilderComponent,
|
|
6508
6903
|
NgTemplateNameDirective,
|
|
6509
6904
|
RepeaterItemFieldComponent,
|
|
6510
|
-
RepeaterTableComponent
|
|
6905
|
+
RepeaterTableComponent,
|
|
6906
|
+
BBSFDateTimePipe,
|
|
6907
|
+
BBSFDatePipe
|
|
6511
6908
|
]
|
|
6512
6909
|
},] }
|
|
6513
6910
|
];
|
|
@@ -6519,7 +6916,7 @@ BBSFControlsModule.ctorParameters = () => [
|
|
|
6519
6916
|
// This file can be replaced during build by using the `fileReplacements` array.
|
|
6520
6917
|
// `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`.
|
|
6521
6918
|
// The list of file replacements can be found in `angular.json`.
|
|
6522
|
-
const environment = Object.assign({}, window.
|
|
6919
|
+
const environment = Object.assign({}, window.Environment);
|
|
6523
6920
|
/*
|
|
6524
6921
|
* In development mode, to ignore zone related error stack frames such as
|
|
6525
6922
|
* `zone.run`, `zoneDelegate.invokeTask` for easier debugging, you can
|
|
@@ -6528,6 +6925,19 @@ const environment = Object.assign({}, window.Envirnment);
|
|
|
6528
6925
|
*/
|
|
6529
6926
|
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
|
|
6530
6927
|
|
|
6928
|
+
class MultilingualControlOptionsBase {
|
|
6929
|
+
constructor() {
|
|
6930
|
+
/** to set type of view if MultipleLanguageText is Vertical or Horizontal */
|
|
6931
|
+
this.ViewType = null;
|
|
6932
|
+
/**To Set Value To MultipleLanguageText with Object From Type "EnglishArabicDTO" */
|
|
6933
|
+
this.Value = new EnglishArabicDTO();
|
|
6934
|
+
/**To Set LanguageMode To MultipleLanguageText */
|
|
6935
|
+
this.LanguageMode = null;
|
|
6936
|
+
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage */
|
|
6937
|
+
this.CustomValidation = [];
|
|
6938
|
+
}
|
|
6939
|
+
}
|
|
6940
|
+
|
|
6531
6941
|
class CustomValidation {
|
|
6532
6942
|
}
|
|
6533
6943
|
class CustomValidator {
|
|
@@ -6542,17 +6952,9 @@ class CustomValidator {
|
|
|
6542
6952
|
}
|
|
6543
6953
|
}
|
|
6544
6954
|
|
|
6545
|
-
class MultiLingualTextBoxOptions {
|
|
6955
|
+
class MultiLingualTextBoxOptions extends MultilingualControlOptionsBase {
|
|
6546
6956
|
constructor() {
|
|
6547
|
-
|
|
6548
|
-
*/
|
|
6549
|
-
this.CustomValidation = [];
|
|
6550
|
-
/**To Set Value To MultipleLanguageText with Object From Type "EnglishArabicDTO" */
|
|
6551
|
-
this.Value = new EnglishArabicDTO();
|
|
6552
|
-
/** to set type of view if textbox is Vertical or Horizontal */
|
|
6553
|
-
this.ViewType = null;
|
|
6554
|
-
/**To Set LanguageMode To MultipleLanguageText */
|
|
6555
|
-
this.LanguageMode = null;
|
|
6957
|
+
super(...arguments);
|
|
6556
6958
|
this.IconPositionEN = IconPosition.left;
|
|
6557
6959
|
this.IconPositionAR = IconPosition.right;
|
|
6558
6960
|
/*multi control placement type*/
|
|
@@ -6563,29 +6965,19 @@ class MultiLingualTextBoxOptions {
|
|
|
6563
6965
|
class Attribute {
|
|
6564
6966
|
}
|
|
6565
6967
|
|
|
6566
|
-
class MultiLingualTextAreaOptions {
|
|
6968
|
+
class MultiLingualTextAreaOptions extends MultilingualControlOptionsBase {
|
|
6567
6969
|
constructor() {
|
|
6568
|
-
|
|
6569
|
-
*/
|
|
6570
|
-
this.CustomValidation = [];
|
|
6571
|
-
/**To Set Value To MultipleLanguageText with Object From Type "EnglishArabicDTO" */
|
|
6572
|
-
this.Value = new EnglishArabicDTO();
|
|
6573
|
-
/** to set type of view if MultilingualTextArea is Vertical or Horizontal */
|
|
6574
|
-
this.ViewType = null;
|
|
6575
|
-
/**To Set LanguageMode To MultipleLanguageText */
|
|
6576
|
-
this.LanguageMode = null;
|
|
6970
|
+
super(...arguments);
|
|
6577
6971
|
/*multi control placement type*/
|
|
6578
6972
|
this.MultiControlPlacementType = null;
|
|
6579
6973
|
}
|
|
6580
6974
|
}
|
|
6581
6975
|
|
|
6582
|
-
class CheckBoxOptions {
|
|
6976
|
+
class CheckBoxOptions extends ControlOptionsBase {
|
|
6583
6977
|
constructor() {
|
|
6978
|
+
super(...arguments);
|
|
6584
6979
|
/**To set value to CheckBox */
|
|
6585
6980
|
this.Value = null;
|
|
6586
|
-
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
|
|
6587
|
-
*/
|
|
6588
|
-
this.CustomValidation = [];
|
|
6589
6981
|
this.ForceDirection = ForceDirection.English;
|
|
6590
6982
|
}
|
|
6591
6983
|
}
|
|
@@ -6593,30 +6985,18 @@ class CheckBoxOptions {
|
|
|
6593
6985
|
class DropdownListItem {
|
|
6594
6986
|
}
|
|
6595
6987
|
|
|
6596
|
-
class MultiLingualHtmlEditorOptions {
|
|
6988
|
+
class MultiLingualHtmlEditorOptions extends MultilingualControlOptionsBase {
|
|
6597
6989
|
constructor() {
|
|
6598
|
-
|
|
6599
|
-
*/
|
|
6600
|
-
this.CustomValidation = [];
|
|
6601
|
-
/**To Set Value To MultipleLanguageText with Object From Type "EnglishArabicDTO" */
|
|
6602
|
-
this.Value = new EnglishArabicDTO();
|
|
6603
|
-
/** to set type of view if MultipleLanguageText is Vertical or Horizontal */
|
|
6604
|
-
this.ViewType = null;
|
|
6990
|
+
super(...arguments);
|
|
6605
6991
|
/** Set Height For */
|
|
6606
6992
|
this.Height = 150;
|
|
6607
|
-
/**To Set LanguageMode To MultipleLanguageText */
|
|
6608
|
-
this.LanguageMode = null;
|
|
6609
6993
|
}
|
|
6610
6994
|
}
|
|
6611
6995
|
|
|
6612
|
-
class ProfileImageUploadOptions {
|
|
6996
|
+
class ProfileImageUploadOptions extends ControlOptionsBase {
|
|
6613
6997
|
constructor() {
|
|
6614
|
-
|
|
6615
|
-
*/
|
|
6998
|
+
super(...arguments);
|
|
6616
6999
|
this.AllowDropZone = false;
|
|
6617
|
-
this.CustomValidation = [];
|
|
6618
|
-
/** to set type of view if FileInput is Vertical or Horizontal */
|
|
6619
|
-
this.ViewType = null;
|
|
6620
7000
|
/** Set List of Custom Attribute to FileInput */
|
|
6621
7001
|
this.ImageUploadAcceptsTypes = [ImageType.ImageTypes];
|
|
6622
7002
|
}
|
|
@@ -6650,8 +7030,9 @@ class UploadPersonalImage {
|
|
|
6650
7030
|
}
|
|
6651
7031
|
}
|
|
6652
7032
|
|
|
6653
|
-
class CalendarOptions {
|
|
7033
|
+
class CalendarOptions extends ControlOptionsBase {
|
|
6654
7034
|
constructor() {
|
|
7035
|
+
super(...arguments);
|
|
6655
7036
|
/** Represent DefaultView Of Calendar*/
|
|
6656
7037
|
this.DefaultView = CalendarView.Month;
|
|
6657
7038
|
/** Represent CalendarViews Of Calendar*/
|
|
@@ -6669,21 +7050,15 @@ class CalendarOptions {
|
|
|
6669
7050
|
class CalendarEventDTO {
|
|
6670
7051
|
}
|
|
6671
7052
|
|
|
6672
|
-
class AutocompleteOptions {
|
|
7053
|
+
class AutocompleteOptions extends ControlOptionsBase {
|
|
6673
7054
|
constructor() {
|
|
6674
|
-
|
|
6675
|
-
|
|
6676
|
-
*/
|
|
7055
|
+
super(...arguments);
|
|
7056
|
+
/**Represent classes to textbox that allow us to select the AutoComplete by jquery or javascript */
|
|
6677
7057
|
this.ValidationToken = null;
|
|
6678
7058
|
/**To set value to textbox */
|
|
6679
7059
|
this.Value = null;
|
|
6680
7060
|
/** set Range Number to Textbox with type number with From-Value and To-value*/
|
|
6681
7061
|
this.NumberRange = new RangeNumber();
|
|
6682
|
-
/** to set type of view if textbox is Vertical or Horizontal */
|
|
6683
|
-
this.ViewType = null;
|
|
6684
|
-
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
|
|
6685
|
-
*/
|
|
6686
|
-
this.CustomValidation = [];
|
|
6687
7062
|
/** to set Direction of textbox if textbox is Arabic or English */
|
|
6688
7063
|
this.ForceDirection = ForceDirection.English;
|
|
6689
7064
|
/** allow add value of AutoComplete dosn't exist in list*/
|
|
@@ -6698,15 +7073,9 @@ class AutocompleteOptions {
|
|
|
6698
7073
|
class TagsInputDTO {
|
|
6699
7074
|
}
|
|
6700
7075
|
|
|
6701
|
-
class TagsInputOptions {
|
|
7076
|
+
class TagsInputOptions extends ControlOptionsBase {
|
|
6702
7077
|
constructor() {
|
|
6703
|
-
|
|
6704
|
-
this.Value = null;
|
|
6705
|
-
/** to set type of view if tagsinput is Vertical or Horizontal */
|
|
6706
|
-
this.ViewType = null;
|
|
6707
|
-
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
|
|
6708
|
-
*/
|
|
6709
|
-
this.CustomValidation = [];
|
|
7078
|
+
super(...arguments);
|
|
6710
7079
|
/** to set Direction of tagsinput if tagsinput is Arabic or English */
|
|
6711
7080
|
this.ForceDirection = ForceDirection.English;
|
|
6712
7081
|
/**Remove Last When User Click On Backspace */
|
|
@@ -6791,13 +7160,7 @@ class PagingOptions {
|
|
|
6791
7160
|
}
|
|
6792
7161
|
}
|
|
6793
7162
|
|
|
6794
|
-
class RadioButtonOptions {
|
|
6795
|
-
constructor() {
|
|
6796
|
-
this.ViewType = null;
|
|
6797
|
-
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
|
|
6798
|
-
*/
|
|
6799
|
-
this.CustomValidation = [];
|
|
6800
|
-
}
|
|
7163
|
+
class RadioButtonOptions extends ControlOptionsBase {
|
|
6801
7164
|
}
|
|
6802
7165
|
|
|
6803
7166
|
class RadioButtonItem {
|
|
@@ -6871,7 +7234,6 @@ class RepeaterField {
|
|
|
6871
7234
|
|
|
6872
7235
|
class RepeaterOptions {
|
|
6873
7236
|
constructor() {
|
|
6874
|
-
this.MinRequiredItems = 1;
|
|
6875
7237
|
this.ActionLabelKey = "";
|
|
6876
7238
|
this.AddButtonText = "Add";
|
|
6877
7239
|
this.DeleteButtonText = "Delete";
|
|
@@ -7203,5 +7565,5 @@ var FileType;
|
|
|
7203
7565
|
* Generated bundle index. Do not edit.
|
|
7204
7566
|
*/
|
|
7205
7567
|
|
|
7206
|
-
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, LanguageValidation, 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 };
|
|
7568
|
+
export { AppInjector, Attribute, AutocompleteDTO, AutocompleteOptions, AutocompleteTextBoxComponent, BBSFControlsModule, BBSFDatePipe, BBSFDateTimePipe, CalendarComponent, CalendarEventDTO, CalendarOptions, CalendarView, CancelDTO, CheckBoxComponent, CheckBoxOptions, ConfirmationModalComponent, ConfirmationModalOptions, ControlLayout, ControlOptionsBase, 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, LanguageValidation, MapAutoCompleteComponent, MapAutoCompleteOptions, MapAutocompleteDTO, MenuListType, Misc, MultiLingualHtmlEditorComponent, MultiLingualHtmlEditorOptions, MultiLingualTextAreaComponent, MultiLingualTextAreaOptions, MultiLingualTextBoxComponent, MultiLingualTextBoxOptions, MultilingualControlOptionsBase, 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 };
|
|
7207
7569
|
//# sourceMappingURL=bnsights-bbsf-controls.js.map
|