@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.
Files changed (92) hide show
  1. package/README.md +14 -4
  2. package/bnsights-bbsf-controls-1.0.35.tgz +0 -0
  3. package/bnsights-bbsf-controls.metadata.json +1 -1
  4. package/bundles/bnsights-bbsf-controls.umd.js +726 -312
  5. package/bundles/bnsights-bbsf-controls.umd.js.map +1 -1
  6. package/esm2015/lib/Shared/Models/AutocompleteOptions.js +5 -10
  7. package/esm2015/lib/Shared/Models/CalendarOptions.js +4 -2
  8. package/esm2015/lib/Shared/Models/CheckBoxOptions.js +4 -5
  9. package/esm2015/lib/Shared/Models/ControlOptionsBase.js +9 -0
  10. package/esm2015/lib/Shared/Models/DropdownOptions.js +4 -6
  11. package/esm2015/lib/Shared/Models/FileUploadOptions.js +4 -7
  12. package/esm2015/lib/Shared/Models/HtmlEditorOptions.js +4 -7
  13. package/esm2015/lib/Shared/Models/ImageUploadOptions.js +4 -7
  14. package/esm2015/lib/Shared/Models/MapAutoCompleteOptions.js +3 -9
  15. package/esm2015/lib/Shared/Models/MultiLingualHtmlEditorOptions.js +4 -12
  16. package/esm2015/lib/Shared/Models/MultiLingualTextAreaOptions.js +4 -12
  17. package/esm2015/lib/Shared/Models/MultilingualControlOptionsBase.js +14 -0
  18. package/esm2015/lib/Shared/Models/MultilingualTextBoxOptions.js +4 -12
  19. package/esm2015/lib/Shared/Models/PhoneOptions.js +4 -11
  20. package/esm2015/lib/Shared/Models/ProfileImageUploadOptions.js +4 -7
  21. package/esm2015/lib/Shared/Models/RadioButtonOptions.js +3 -8
  22. package/esm2015/lib/Shared/Models/RepeaterOptions.js +1 -2
  23. package/esm2015/lib/Shared/Models/TagsInputOptions.js +4 -9
  24. package/esm2015/lib/Shared/Models/TextAreaOptions.js +4 -7
  25. package/esm2015/lib/Shared/Models/TextBoxOptions.js +4 -7
  26. package/esm2015/lib/Shared/Models/ToggleslideOptions.js +4 -3
  27. package/esm2015/lib/Shared/Models/datePickerOptions.js +6 -8
  28. package/esm2015/lib/Shared/Pipes/bbsf-date-time.pipe.js +20 -0
  29. package/esm2015/lib/Shared/Pipes/bbsf-date.pipe.js +20 -0
  30. package/esm2015/lib/Shared/config/environment.js +2 -2
  31. package/esm2015/lib/Shared/services/ControlUtility.js +40 -4
  32. package/esm2015/lib/Shared/services/GlobalSettings.service.js +9 -1
  33. package/esm2015/lib/Shared/services/validationErrorMassage.service.js +16 -1
  34. package/esm2015/lib/controls/AutocompleteTextBox/AutocompleteTextBox.component.js +6 -3
  35. package/esm2015/lib/controls/CheckBox/CheckBox.component.js +5 -1
  36. package/esm2015/lib/controls/DateTimePicker/DateTimePicker.component.js +54 -4
  37. package/esm2015/lib/controls/DropdownList/DropdownList.component.js +6 -2
  38. package/esm2015/lib/controls/FileUplaod/FileUplaod.component.js +6 -4
  39. package/esm2015/lib/controls/Form/Form.component.js +2 -18
  40. package/esm2015/lib/controls/HtmlEditor/HtmlEditor.component.js +6 -2
  41. package/esm2015/lib/controls/ImageUpload/ImageUpload.component.js +12 -5
  42. package/esm2015/lib/controls/MapAutoComplete/MapAutoComplete.component.js +5 -1
  43. package/esm2015/lib/controls/MultiLingualHtmlEditor/MultiLingualHtmlEditor.component.js +14 -4
  44. package/esm2015/lib/controls/MultiLingualTextArea/MultiLingualTextArea.component.js +89 -10
  45. package/esm2015/lib/controls/MultiLingualTextBox/MultiLingualTextBox.component.js +89 -18
  46. package/esm2015/lib/controls/Paging/Paging.component.js +1 -3
  47. package/esm2015/lib/controls/Phone/Phone.component.js +6 -2
  48. package/esm2015/lib/controls/ProfileImageUploader/ProfileImageUploader.component.js +6 -2
  49. package/esm2015/lib/controls/RadioButton/RadioButton.component.js +6 -2
  50. package/esm2015/lib/controls/TagsInput/TagsInput.component.js +6 -2
  51. package/esm2015/lib/controls/TextArea/TextArea.component.js +48 -6
  52. package/esm2015/lib/controls/TextBox/TextBox.component.js +62 -24
  53. package/esm2015/lib/controls/Toggleslide/toggleslide.component.js +14 -3
  54. package/esm2015/lib/controls/bbsf-controls.module.js +12 -4
  55. package/esm2015/public-api.js +5 -1
  56. package/fesm2015/bnsights-bbsf-controls.js +592 -230
  57. package/fesm2015/bnsights-bbsf-controls.js.map +1 -1
  58. package/lib/Shared/Models/AutocompleteOptions.d.ts +3 -40
  59. package/lib/Shared/Models/CalendarOptions.d.ts +2 -8
  60. package/lib/Shared/Models/CheckBoxOptions.d.ts +2 -33
  61. package/lib/Shared/Models/ControlOptionsBase.d.ts +40 -0
  62. package/lib/Shared/Models/DropdownOptions.d.ts +2 -39
  63. package/lib/Shared/Models/FileUploadOptions.d.ts +2 -39
  64. package/lib/Shared/Models/HtmlEditorOptions.d.ts +2 -37
  65. package/lib/Shared/Models/ImageUploadOptions.d.ts +2 -38
  66. package/lib/Shared/Models/MapAutoCompleteOptions.d.ts +2 -40
  67. package/lib/Shared/Models/MultiLingualHtmlEditorOptions.d.ts +2 -77
  68. package/lib/Shared/Models/MultiLingualTextAreaOptions.d.ts +3 -76
  69. package/lib/Shared/Models/MultilingualControlOptionsBase.d.ts +71 -0
  70. package/lib/Shared/Models/MultilingualTextBoxOptions.d.ts +3 -76
  71. package/lib/Shared/Models/PhoneOptions.d.ts +2 -38
  72. package/lib/Shared/Models/ProfileImageUploadOptions.d.ts +2 -38
  73. package/lib/Shared/Models/RadioButtonOptions.d.ts +3 -39
  74. package/lib/Shared/Models/TagsInputOptions.d.ts +4 -43
  75. package/lib/Shared/Models/TextAreaOptions.d.ts +5 -42
  76. package/lib/Shared/Models/TextBoxOptions.d.ts +4 -41
  77. package/lib/Shared/Models/ToggleslideOptions.d.ts +3 -30
  78. package/lib/Shared/Models/datePickerOptions.d.ts +4 -40
  79. package/lib/Shared/Pipes/bbsf-date-time.pipe.d.ts +7 -0
  80. package/lib/Shared/Pipes/bbsf-date.pipe.d.ts +7 -0
  81. package/lib/Shared/services/ControlUtility.d.ts +5 -2
  82. package/lib/Shared/services/GlobalSettings.service.d.ts +4 -0
  83. package/lib/controls/DateTimePicker/DateTimePicker.component.d.ts +9 -0
  84. package/lib/controls/MultiLingualTextArea/MultiLingualTextArea.component.d.ts +13 -2
  85. package/lib/controls/MultiLingualTextBox/MultiLingualTextBox.component.d.ts +13 -2
  86. package/lib/controls/TextArea/TextArea.component.d.ts +7 -1
  87. package/lib/controls/TextBox/TextBox.component.d.ts +8 -3
  88. package/lib/controls/Toggleslide/toggleslide.component.d.ts +3 -1
  89. package/package.json +3 -3
  90. package/public-api.d.ts +4 -0
  91. package/src/lib/assets/Style.css +2 -2
  92. package/bnsights-bbsf-controls-1.0.32.tgz +0 -0
@@ -90,6 +90,12 @@
90
90
  case "max":
91
91
  result = this.utilityService.getResourceValue("MaxValueValidationKey") + " " + error.value.max;
92
92
  break;
93
+ case "IntegerNumberValidationKey":
94
+ result = this.utilityService.getResourceValue("IntegerNumberValidationKey");
95
+ break;
96
+ case "PositiveNumberValidationKey":
97
+ result = this.utilityService.getResourceValue("PositiveNumberValidationKey");
98
+ break;
93
99
  case "validatePhoneNumber":
94
100
  result = this.utilityService.getResourceValue("PhoneNumberValidationKey");
95
101
  break;
@@ -105,6 +111,9 @@
105
111
  case "EnglishLetterOnly":
106
112
  result = this.utilityService.getResourceValue("EnglishLetterOnly");
107
113
  break;
114
+ case "ArabicIsRequiredAndOnly50CharactersEnglish":
115
+ result = this.utilityService.getResourceValue("ArabicIsRequiredAndOnly50CharactersEnglish");
116
+ break;
108
117
  case "PasswordComplexityHasCapitalLetter":
109
118
  result = this.utilityService.getResourceValue("PasswordComplexityHasCapitalLetter");
110
119
  break;
@@ -135,6 +144,12 @@
135
144
  case "ToolTipTypeError":
136
145
  result = this.utilityService.getResourceValue("ToolTipTypeError") + " " + error.value;
137
146
  break;
147
+ case "InvalidEndDate":
148
+ result = this.utilityService.getResourceValue("InvalidEndDate");
149
+ break;
150
+ case "InvalidStartDate":
151
+ result = this.utilityService.getResourceValue("InvalidStartDate");
152
+ break;
138
153
  default:
139
154
  break;
140
155
  }
@@ -162,9 +177,10 @@
162
177
  })(exports.InputType || (exports.InputType = {}));
163
178
 
164
179
  var ControlUtility = /** @class */ (function () {
165
- function ControlUtility(ErrorHandler, controlValidationService) {
180
+ function ControlUtility(ErrorHandler, controlValidationService, utilityService) {
166
181
  this.ErrorHandler = ErrorHandler;
167
182
  this.controlValidationService = controlValidationService;
183
+ this.utilityService = utilityService;
168
184
  }
169
185
  ControlUtility.prototype.getErrorValidation = function (Errorsitem, CustomValidation) {
170
186
  var _this = this;
@@ -197,6 +213,41 @@
197
213
  return valid ? null : error;
198
214
  };
199
215
  };
216
+ ControlUtility.prototype.patchControlValue = function (originalValue, PatchFunction, PatchPath) {
217
+ var _this = this;
218
+ var patchOp = [{
219
+ op: "replace",
220
+ path: PatchPath,
221
+ value: originalValue
222
+ }];
223
+ var patchService = PatchFunction.call(null, patchOp);
224
+ patchService.subscribe(function (r) { return console.log(r); }, function (erorr) { return _this.utilityService.notifyErrorMessage(erorr); });
225
+ };
226
+ ControlUtility.prototype.arabicValidator = function (error) {
227
+ return function (control) {
228
+ if (!control.value)
229
+ return null;
230
+ if (control.value.match('[\u0600-\u06FF]')) {
231
+ if (control.value.match('[A-Za-z]') != null) {
232
+ //FOUND ENGLISH CHARS
233
+ var length = control.value.replace(/\W/g, '').replace(/[0-9]/g, '').length;
234
+ if (length > 50) {
235
+ return error;
236
+ }
237
+ else {
238
+ return null;
239
+ }
240
+ }
241
+ else {
242
+ //NO ENGLISH CHARACTERS AT ALL
243
+ return null;
244
+ }
245
+ }
246
+ else {
247
+ return error;
248
+ }
249
+ };
250
+ };
200
251
  ControlUtility.prototype.getInputType = function (type) {
201
252
  return exports.InputType[type];
202
253
  };
@@ -283,7 +334,8 @@
283
334
  ];
284
335
  ControlUtility.ctorParameters = function () { return [
285
336
  { type: ErrorMassageValidation },
286
- { type: bbsfUtilities.ControlValidationService }
337
+ { type: bbsfUtilities.ControlValidationService },
338
+ { type: bbsfUtilities.UtilityService }
287
339
  ]; };
288
340
 
289
341
  exports.PickerType = void 0;
@@ -344,9 +396,37 @@
344
396
  this.markAllAsTouched = false;
345
397
  this.validationRules = [];
346
398
  this.validationRulesasync = [];
399
+ this.comparedControl = null;
400
+ this.dateError = false;
347
401
  this.resetError = function () {
348
402
  _this.controlValidationService.RemoveGlobalError();
349
403
  };
404
+ this.checkIfEndDateAfterStartDate = function () {
405
+ if (!_this.comparedControl.value || !_this.group.get(_this.options.Name).value) {
406
+ return null;
407
+ }
408
+ if (new Date(_this.comparedControl.value) < new Date(_this.group.get(_this.options.Name).value)) {
409
+ _this.comparedControl.setErrors(null);
410
+ return null;
411
+ }
412
+ else {
413
+ _this.comparedControl.setErrors(null);
414
+ return { InvalidEndDate: true };
415
+ }
416
+ };
417
+ this.checkIfStartDateBeForEndDate = function () {
418
+ if (!_this.comparedControl.value || !_this.group.get(_this.options.Name).value) {
419
+ return null;
420
+ }
421
+ if (new Date(_this.comparedControl.value) < new Date(_this.group.get(_this.options.Name).value)) {
422
+ _this.group.get(_this.options.Name).setErrors(null);
423
+ return null;
424
+ }
425
+ else {
426
+ _this.group.get(_this.options.Name).setErrors(null);
427
+ return { InvalidStartDate: true };
428
+ }
429
+ };
350
430
  //External Method
351
431
  this.RemoveRequiredValidation = function () {
352
432
  _this.controlUtility.RemoveRequiredValidation(_this.DatePickerFormControl, _this.validationRules, _this.options);
@@ -389,11 +469,17 @@
389
469
  }
390
470
  if (this.options.LabelKey != null && this.options.LabelKey != "")
391
471
  this.options.LabelValue = this.UtilityService.getResourceValue(this.options.LabelKey);
392
- this.DatePickerFormControl.setValidators(this.validationRules);
393
- this.DatePickerFormControl.setAsyncValidators(this.validationRulesasync);
394
472
  if (this.options.IsDisabled) {
395
473
  this.DatePickerFormControl.disable();
396
474
  }
475
+ if (this.options.StartControlToCompareWith) {
476
+ if (this.group.get(this.options.StartControlToCompareWith)) {
477
+ this.comparedControl = this.group.get(this.options.StartControlToCompareWith);
478
+ this.subscribeDateChanges();
479
+ }
480
+ }
481
+ this.DatePickerFormControl.setValidators(this.validationRules);
482
+ this.DatePickerFormControl.setAsyncValidators(this.validationRulesasync);
397
483
  this.DateInputControlHost.ngSubmit.subscribe(function (value) {
398
484
  _this.group.markAllAsTouched();
399
485
  _this.markAllAsTouched = true;
@@ -445,7 +531,24 @@
445
531
  }
446
532
  this.DatePickerFormControl.setValue(DateValue);
447
533
  this.onChangeService.ChangeValue(this.options.Name);
448
- this.OnChange.emit(DateValue);
534
+ var originalValue = DateValue;
535
+ if (this.options.PatchFunction && this.options.PatchPath && this.group.get(this.options.Name).valid) {
536
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
537
+ }
538
+ this.OnChange.emit(originalValue);
539
+ };
540
+ DateInputComponent.prototype.subscribeDateChanges = function () {
541
+ var _this = this;
542
+ var startDateChanges = this.comparedControl.valueChanges;
543
+ var endDateChanges = this.group.get(this.options.Name).valueChanges;
544
+ startDateChanges.subscribe(function (start) {
545
+ _this.comparedControl.addValidators(_this.checkIfStartDateBeForEndDate);
546
+ _this.comparedControl.updateValueAndValidity();
547
+ });
548
+ endDateChanges.subscribe(function (end) {
549
+ _this.DatePickerFormControl.addValidators(_this.checkIfEndDateAfterStartDate);
550
+ _this.DatePickerFormControl.updateValueAndValidity();
551
+ });
449
552
  };
450
553
  return DateInputComponent;
451
554
  }());
@@ -517,6 +620,14 @@
517
620
  /**To Set LanguageMode To MultipleLanguageText */
518
621
  this.LanguageMode = exports.LanguageMode.Both_Languages_are_visible;
519
622
  this.HideAstericsWhenRequired = false;
623
+ //**To set maxlength warning message when equals limit
624
+ this.MaxLengthWarningLimit = 10;
625
+ //**Set any texbox maxlength default value
626
+ this.MaxLengthTextBox = 255;
627
+ //**Set any textArea maxlength default value
628
+ this.MaxLengthTextArea = 1000;
629
+ //**Set default image source
630
+ this.DefaultImageSrc = "./src/assets/images/uploadimg.png";
520
631
  }
521
632
  return GlobalSettings;
522
633
  }());
@@ -738,7 +849,6 @@
738
849
  this_1.uploader.queue = [];
739
850
  return { value: void 0 };
740
851
  }
741
- debugger;
742
852
  var reader_1 = new FileReader();
743
853
  var fileObject = file.rawFile;
744
854
  reader_1.readAsDataURL(fileObject);
@@ -768,7 +878,11 @@
768
878
  _this.group.get(_this.options.Name).setValue(_this.multipleFileUploadModel);
769
879
  }
770
880
  };
771
- this_1.OnChange.emit(this_1.group.get(this_1.options.Name).value);
881
+ var originalValue = this_1.group.get(this_1.options.Name).value;
882
+ if (this_1.options.PatchFunction && this_1.options.PatchPath && this_1.group.get(this_1.options.Name).valid) {
883
+ this_1.controlUtility.patchControlValue(originalValue, this_1.options.PatchFunction, this_1.options.PatchPath);
884
+ }
885
+ this_1.OnChange.emit(originalValue);
772
886
  }
773
887
  };
774
888
  var this_1 = this;
@@ -779,7 +893,6 @@
779
893
  }
780
894
  };
781
895
  FileUploadComponent.prototype.removeFromControlValue = function (item) {
782
- debugger;
783
896
  if (this.options.IsMultipleFile == false) {
784
897
  this.fileUploadModel = null;
785
898
  if (this.options.IsRequired == true) {
@@ -1205,6 +1318,16 @@
1205
1318
  this.markAllAsTouched = false;
1206
1319
  this.ArabicLetterOnly = "";
1207
1320
  this.EnglishLetterOnly = "";
1321
+ //For Show warning message of max length limit
1322
+ this.minCharsLimit = -1; //To disable chars limit feature by default
1323
+ this.englishCurrentCharsCount = 0;
1324
+ this.arabicCurrentCharsCount = 0;
1325
+ this.showEnglishCharsLimitMsg = false;
1326
+ this.showArabicCharsLimitMsg = false;
1327
+ this.hasEnglishCharsLimitValidationError = false;
1328
+ this.hasArabicCharsLimitValidationError = false;
1329
+ this.englishMaxLimitWarningMsg = "";
1330
+ this.arabicMaxLimitWarningMsg = "";
1208
1331
  //External Method
1209
1332
  this.RemoveRequiredValidation = function () {
1210
1333
  _this.controlUtility.RemoveRequiredValidation(_this.ArabicFormControl, _this.EnglishValidationRules, _this.options);
@@ -1234,12 +1357,12 @@
1234
1357
  this.CurrentLanguage = translate.currentLang != undefined ? translate.currentLang : translate.defaultLang;
1235
1358
  }
1236
1359
  MultiLingualTextBoxComponent.prototype.getCustomErrorsMassages = function () {
1237
- this.ArabicLetterOnly = this.UtilityService.getResourceValue("ArabicLetterOnly");
1360
+ this.ArabicLetterOnly = this.UtilityService.getResourceValue("ArabicIsRequiredAndOnly50CharactersEnglish");
1238
1361
  this.EnglishLetterOnly = this.UtilityService.getResourceValue("EnglishLetterOnly");
1239
1362
  };
1240
1363
  MultiLingualTextBoxComponent.prototype.ngOnInit = function () {
1241
1364
  return __awaiter(this, void 0, void 0, function () {
1242
- var _a, Validations, index, Validation, Validations, index, Validation;
1365
+ var _a, Validations, index, Validation;
1243
1366
  var _this = this;
1244
1367
  return __generator(this, function (_b) {
1245
1368
  switch (_b.label) {
@@ -1267,6 +1390,8 @@
1267
1390
  this.options.LanguageMode = this.globalSettings.LanguageMode;
1268
1391
  if (!this.options.MultiControlPlacementType)
1269
1392
  this.options.MultiControlPlacementType = this.globalSettings.MultiControlPlacementType;
1393
+ if (!this.options.MaxLength)
1394
+ this.options.MaxLength = this.globalSettings.MaxLengthTextBox;
1270
1395
  if (this.options.ArabicLabelKey != null && this.options.ArabicLabelKey != "")
1271
1396
  this.options.ArabicLabelValue = this.UtilityService.getResourceValue(this.options.ArabicLabelKey);
1272
1397
  if (this.options.EnglishLabelKey != null && this.options.EnglishLabelKey != "")
@@ -1279,14 +1404,6 @@
1279
1404
  this.ArabicValidationRules.push(Validation.functionBody);
1280
1405
  }
1281
1406
  }
1282
- if (this.options.CustomValidation.length > 0) {
1283
- Validations = this.options.CustomValidation;
1284
- for (index = 0; index < Validations.length; index++) {
1285
- Validation = Validations[index];
1286
- this.EnglishValidationRules.push(Validation.functionBody);
1287
- this.ArabicValidationRules.push(Validation.functionBody);
1288
- }
1289
- }
1290
1407
  if (this.options.MinLength > 0) {
1291
1408
  this.ArabicValidationRules.push(forms.Validators.minLength(this.options.MinLength));
1292
1409
  this.EnglishValidationRules.push(forms.Validators.minLength(this.options.MinLength));
@@ -1294,10 +1411,13 @@
1294
1411
  if (this.options.MaxLength > 0) {
1295
1412
  this.EnglishValidationRules.push(forms.Validators.maxLength(this.options.MaxLength));
1296
1413
  this.ArabicValidationRules.push(forms.Validators.maxLength(this.options.MaxLength));
1414
+ if (!this.options.MaxLengthWarningLimit)
1415
+ this.options.MaxLengthWarningLimit = this.globalSettings.MaxLengthWarningLimit;
1416
+ this.minCharsLimit = this.options.MaxLength - this.options.MaxLengthWarningLimit;
1297
1417
  }
1298
1418
  this.showInputUsingLanguageMode();
1299
1419
  this.ArabicValidationRules.push(forms.Validators.compose([
1300
- this.controlUtility.patternValidator(/^[^A-Za-z]*$/, { ArabicLetterOnly: this.ArabicLetterOnly }),
1420
+ this.controlUtility.arabicValidator({ ArabicIsRequiredAndOnly50CharactersEnglish: this.ArabicLetterOnly }),
1301
1421
  ]));
1302
1422
  this.EnglishValidationRules.push(forms.Validators.compose([
1303
1423
  this.controlUtility.patternValidator(/^[\x00-\x7F]*$/, { EnglishLetterOnly: this.EnglishLetterOnly }),
@@ -1346,6 +1466,27 @@
1346
1466
  englishValue = this.EnglishFormControl.value;
1347
1467
  }
1348
1468
  }
1469
+ //Check for maxlength limit count
1470
+ //MaxLength should be gretaer than or equals chars limit so that minCharsLimit would be >= 0
1471
+ if (this.options.MaxLength && this.minCharsLimit >= 0) {
1472
+ this.englishCurrentCharsCount = this.EnglishFormControl.value.length;
1473
+ if (this.englishCurrentCharsCount >= this.minCharsLimit) {
1474
+ this.showEnglishCharsLimitMsg = true;
1475
+ this.hasEnglishCharsLimitValidationError = true;
1476
+ if (this.englishCurrentCharsCount == this.options.MaxLength)
1477
+ this.englishCharsLimitMsgClass = "danger";
1478
+ else
1479
+ this.englishCharsLimitMsgClass = "warning";
1480
+ }
1481
+ else {
1482
+ this.showEnglishCharsLimitMsg = false;
1483
+ this.hasEnglishCharsLimitValidationError = false;
1484
+ }
1485
+ var max = this.options.MaxLength;
1486
+ var current = this.englishCurrentCharsCount;
1487
+ var resource = this.UtilityService.getResourceValue("MaxLengthLimitWarning");
1488
+ this.englishMaxLimitWarningMsg = eval('`' + resource + '`');
1489
+ }
1349
1490
  }
1350
1491
  if (this.ArabicFormControl.value == "") {
1351
1492
  this.ArabicWordCountArray = 0;
@@ -1367,6 +1508,27 @@
1367
1508
  arabicValue = this.ArabicFormControl.value;
1368
1509
  }
1369
1510
  }
1511
+ //Check for maxlength limit count
1512
+ //MaxLength should be gretaer than or equals chars limit so that minCharsLimit would be >= 0
1513
+ if (this.options.MaxLength && this.minCharsLimit >= 0) {
1514
+ this.arabicCurrentCharsCount = this.ArabicFormControl.value.length;
1515
+ if (this.arabicCurrentCharsCount >= this.minCharsLimit) {
1516
+ this.showArabicCharsLimitMsg = true;
1517
+ this.hasArabicCharsLimitValidationError = true;
1518
+ if (this.arabicCurrentCharsCount == this.options.MaxLength)
1519
+ this.arabicCharsLimitMsgClass = "danger";
1520
+ else
1521
+ this.arabicCharsLimitMsgClass = "warning";
1522
+ }
1523
+ else {
1524
+ this.showArabicCharsLimitMsg = false;
1525
+ this.hasArabicCharsLimitValidationError = false;
1526
+ }
1527
+ var max = this.options.MaxLength;
1528
+ var current = this.arabicCurrentCharsCount;
1529
+ var resource = this.UtilityService.getResourceValue("MaxLengthLimitWarning");
1530
+ this.arabicMaxLimitWarningMsg = eval('`' + resource + '`');
1531
+ }
1370
1532
  }
1371
1533
  var mulitLangModel = new EnglishArabicDTO();
1372
1534
  mulitLangModel.Arabic = arabicValue;
@@ -1399,13 +1561,21 @@
1399
1561
  MultiLingualTextBoxComponent.prototype.trimControlValue = function (type) {
1400
1562
  var whitespace = ' ';
1401
1563
  if (type == "En") {
1564
+ var originalValue = this.EnglishFormControl.value;
1565
+ if (this.options.PatchFunction && this.options.PatchPath && this.EnglishFormControl.valid) {
1566
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
1567
+ }
1402
1568
  if (this.EnglishFormControl.value.startsWith(whitespace) || this.EnglishFormControl.value.endsWith(whitespace)) {
1403
- this.EnglishFormControl.patchValue(this.EnglishFormControl.value.trim());
1569
+ this.EnglishFormControl.patchValue(originalValue);
1404
1570
  }
1405
1571
  }
1406
1572
  if (type == "Ar") {
1573
+ var originalValue = this.ArabicFormControl.value;
1574
+ if (this.options.PatchFunction && this.options.PatchPath && this.ArabicFormControl.valid) {
1575
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
1576
+ }
1407
1577
  if (this.ArabicFormControl.value.startsWith(whitespace) || this.ArabicFormControl.value.endsWith(whitespace)) {
1408
- this.ArabicFormControl.patchValue(this.ArabicFormControl.value.trim());
1578
+ this.ArabicFormControl.patchValue(originalValue);
1409
1579
  }
1410
1580
  }
1411
1581
  };
@@ -1486,11 +1656,25 @@
1486
1656
  this.ArabicFormControl.updateValueAndValidity();
1487
1657
  this.EnglishFormControl.updateValueAndValidity();
1488
1658
  };
1489
- MultiLingualTextBoxComponent.prototype.showArabicWordCount = function (value) {
1490
- this.IsShowArabicWordCount = value;
1659
+ MultiLingualTextBoxComponent.prototype.onArabicFocus = function (isFocus) {
1660
+ this.IsShowArabicWordCount = isFocus;
1661
+ //onFocus
1662
+ if (isFocus) {
1663
+ if (this.hasArabicCharsLimitValidationError) //check if there was previous validation error
1664
+ this.showArabicCharsLimitMsg = true;
1665
+ }
1666
+ else //onFocusOut
1667
+ this.showArabicCharsLimitMsg = false;
1491
1668
  };
1492
- MultiLingualTextBoxComponent.prototype.showEnglishWordCount = function (value) {
1493
- this.IsShowEnglishWordCount = value;
1669
+ MultiLingualTextBoxComponent.prototype.onEnglishFocus = function (isFocus) {
1670
+ this.IsShowEnglishWordCount = isFocus;
1671
+ //onFocus
1672
+ if (isFocus) {
1673
+ if (this.hasEnglishCharsLimitValidationError) //check if there was previous validation error
1674
+ this.showEnglishCharsLimitMsg = true;
1675
+ }
1676
+ else //onFocusOut
1677
+ this.showEnglishCharsLimitMsg = false;
1494
1678
  };
1495
1679
  return MultiLingualTextBoxComponent;
1496
1680
  }());
@@ -1498,7 +1682,7 @@
1498
1682
  MultiLingualTextBoxComponent.decorators = [
1499
1683
  { type: i0.Component, args: [{
1500
1684
  selector: 'BBSF-MultiLingualTextBox',
1501
- template: "<div class=\"b-control b-multilangual-textbox\">\r\n <div class=\"form-group validate is-invalid\" [formGroup]=\"group\">\r\n\r\n <div class=\"form-group row\" [formGroup]=\"MultiLanguagegroup\">\r\n <div [ngClass]=\"(options.MultiControlPlacementType==1)?'col-md-12':'col-md-6'\">\r\n <div class=\"row\" *ngIf=\"ShowEnglishTextBox\">\r\n <label class=\"b-label col-form-label col-sm-12\"\r\n [ngClass]=\"(options.ViewType==1)?'col-md-9':'col-md-3'\" [hidden]=\"options.IsHideEnglishLabel\">\r\n {{(options.EnglishLabelValue!=null&&options.EnglishLabelValue!=\"\")?options.EnglishLabelValue:options.LabelValue}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\"\r\n class=\"text-danger Required-text\" aria-required=\"true\">*</span>\r\n </label>\r\n\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n <div class=\"input-group align-items-center\">\r\n <div class=\"svg svg-icon-grey\" [ngClass]=\"(options.IconPositionEN==1)?'left-icon':'right-icon'\" *ngIf=\"options.Icon!=null\">\r\n <span [inlineSVG]=\"options.Icon\"></span>\r\n </div>\r\n <input class=\"form-control bnsights-control\"\r\n (focus)=\"showEnglishWordCount(true)\" (focusout)=\"showEnglishWordCount(false)\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\" formControlName=\"English\"\r\n [hidden]=\"options.IsHideEnglishFields\" maxlength=\"{{options.MaxLength}}\" minlength=\"{{options.MinLength}}\"\r\n [class.is-invalid]=\"EnglishFormControl.invalid && EnglishFormControl.touched\"\r\n placeholder=\"{{options.EnglishPlaceholder}}\" (change)=\"trimControlValue('En')\"\r\n (keyup)=\"onTextChange()\"\r\n (keydown)=\"EnglishWordCountArray>options.MaxWordCount&&$event.keyCode !=8?$event.preventDefault():null\"\r\n #userinputEnglish>\r\n <div class=\"input-group-append\" [hidden]=\"options.IsHideEnglishFields\" *ngIf=\"options.EnableCopyToClipboard\">\r\n <span class=\"input-group-text\" (click)=\"copyInputMessage(userinputEnglish)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"text-muted font-weight-500 word-count float-end\" *ngIf=\"options.MaxWordCount>0&&IsShowEnglishWordCount\">{{EnglishWordCount}}/{{options.MaxWordCount}}</div>\r\n <div class=\"text-danger Required-text\" *ngIf=\"(EnglishFormControl.invalid && EnglishFormControl.touched)\">\r\n {{getErrorValidation(EnglishFormControl.errors|keyvalue)}}\r\n </div>\r\n\r\n <div class=\"control-desc\" *ngIf=\"(options.LabelDescription!=null&&options.LabelDescription!='') ||(options.EnglishLabelDescription!=null&&options.EnglishLabelDescription!='')\">\r\n {{(options.EnglishLabelDescription!=null&&options.EnglishLabelDescription!=\"\")?options.EnglishLabelDescription:options.LabelDescription}}\r\n </div>\r\n <!-- <div *ngIf=\"EnglishFormControl.valid\">{{resetError()}}</div> -->\r\n <div *ngIf=\"group.valid\">{{resetError()}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div [ngClass]=\"(options.MultiControlPlacementType==1)?'col-md-12':'col-md-6'\">\r\n <div class=\"row\" *ngIf=\"ShowArabicTextBox\">\r\n <label class=\"b-label col-form-label col-sm-12\"\r\n [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\" [hidden]=\"options.IsHideArabicLabel\">\r\n {{(options.ArabicLabelValue!=null&&options.ArabicLabelValue!=\"\")?options.ArabicLabelValue:options.LabelValue}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\" class=\"text-danger Required-text\" aria-required=\"true\">*</span>\r\n </label>\r\n <div class=\" col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n <div class=\"input-group align-items-center\">\r\n <div class=\"svg svg-icon-grey\" [ngClass]=\"(options.IconPositionEN==1)?'right-icon':'left-icon'\" *ngIf=\"options.Icon!=null\">\r\n <span [inlineSVG]=\"options.Icon\"></span>\r\n </div>\r\n <input class=\"form-control bnsights-control\" dir=\"rtl\"\r\n (focus)=\"showArabicWordCount(true)\" (focusout)=\"showArabicWordCount(false)\"\r\n [hidden]=\"options.IsHideArabicFields\" aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n formControlName=\"Arabic\" maxlength=\"{{options.MaxLength}}\" minlength=\"{{options.MinLength}}\"\r\n [class.is-invalid]=\"ArabicFormControl.invalid && ArabicFormControl.touched\"\r\n placeholder=\"{{options.ArabicPlaceholder}}\" (keyup)=\"onTextChange()\"\r\n (keydown)=\"ArabicWordCountArray>options.MaxWordCount&&$event.keyCode !=8?$event.preventDefault():null\"\r\n (change)=\"trimControlValue('Ar')\" #userinputArabic>\r\n\r\n <div class=\"input-group-append\" [hidden]=\"options.IsHideArabicFields\" *ngIf=\"options.EnableCopyToClipboard\">\r\n <span class=\"input-group-text\" (click)=\"copyInputMessage(userinputArabic)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"text-muted font-weight-500 float-end word-count\" *ngIf=\"options.MaxWordCount>0&&IsShowArabicWordCount\">{{ArabicWordCount}}/{{options.MaxWordCount}}</div>\r\n <div class=\"text-danger Required-text\" *ngIf=\"(ArabicFormControl.invalid && ArabicFormControl.touched)\">\r\n {{getErrorValidation(ArabicFormControl.errors|keyvalue)}}\r\n </div>\r\n <div class=\"control-desc\" *ngIf=\"(options.LabelDescription!=null&&options.LabelDescription!='')||(options.ArabicLabelDescription!=null&&options.ArabicLabelDescription!='')\">\r\n {{(options.ArabicLabelDescription!=null&&options.ArabicLabelDescription!=\"\")?options.ArabicLabelDescription:options.LabelDescription}}\r\n </div>\r\n <!-- <div *ngIf=\"ArabicFormControl.valid\">{{resetError()}}</div> -->\r\n <div *ngIf=\"group.valid\">{{resetError()}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n</div>\r\n",
1685
+ 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",
1502
1686
  styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}\n"]
1503
1687
  },] }
1504
1688
  ];
@@ -1533,6 +1717,12 @@
1533
1717
  this.markAllAsTouched = false;
1534
1718
  this.validationRules = [];
1535
1719
  this.validationRulesasync = [];
1720
+ //For Show warning message of max length limit
1721
+ this.currentCharsCount = 0;
1722
+ this.showCharsLimitMsg = false;
1723
+ this.hasCharsLimitValidationError = false;
1724
+ this.minCharsLimit = -1; //To disable chars limit feature by default
1725
+ this.maxLimitWarningMsg = "";
1536
1726
  this.resetError = function () {
1537
1727
  _this.controlValidationService.RemoveGlobalError();
1538
1728
  };
@@ -1563,6 +1753,8 @@
1563
1753
  this.controlValidationService.isCreatedBefor = false;
1564
1754
  this.group.addControl(this.options.Name, new forms.FormControl(''));
1565
1755
  this.TextAreaFormControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
1756
+ if (!this.options.MaxLength)
1757
+ this.options.MaxLength = this.globalSettings.MaxLengthTextArea;
1566
1758
  if (!this.options.ViewType)
1567
1759
  this.options.ViewType = this.globalSettings.ViewType;
1568
1760
  if (this.options.LabelKey != null && this.options.LabelKey != "")
@@ -1580,6 +1772,9 @@
1580
1772
  }
1581
1773
  if (this.options.MaxLength > 0) {
1582
1774
  this.validationRules.push(forms.Validators.maxLength(this.options.MaxLength));
1775
+ if (!this.options.MaxLengthWarningLimit)
1776
+ this.options.MaxLengthWarningLimit = this.globalSettings.MaxLengthWarningLimit;
1777
+ this.minCharsLimit = this.options.MaxLength - this.options.MaxLengthWarningLimit;
1583
1778
  }
1584
1779
  if (this.options.IsRequired) {
1585
1780
  this.validationRules.push(forms.Validators.required);
@@ -1611,8 +1806,11 @@
1611
1806
  return this.controlUtility.getInputType(type);
1612
1807
  };
1613
1808
  TextAreaComponent.prototype.trimControlValue = function () {
1614
- var OrignalValue = this.controlUtility.trimControlValue(this.TextAreaFormControl.value);
1615
- this.TextAreaFormControl.patchValue(OrignalValue);
1809
+ var originalValue = this.controlUtility.trimControlValue(this.TextAreaFormControl.value);
1810
+ this.TextAreaFormControl.patchValue(originalValue);
1811
+ if (this.options.PatchFunction && this.options.PatchPath && this.TextAreaFormControl.valid) {
1812
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
1813
+ }
1616
1814
  };
1617
1815
  TextAreaComponent.prototype.copyInputMessage = function (inputElement) {
1618
1816
  this.controlUtility.CopyInputMessage(inputElement);
@@ -1636,10 +1834,38 @@
1636
1834
  }
1637
1835
  }
1638
1836
  }
1837
+ //Check for maxlength limit count
1838
+ //MaxLength should be gretaer than or equals chars limit so that minCharsLimit would be >= 0
1839
+ if (this.options.MaxLength && this.minCharsLimit >= 0) {
1840
+ this.currentCharsCount = this.TextAreaFormControl.value.length;
1841
+ if (this.currentCharsCount >= this.minCharsLimit) {
1842
+ this.showCharsLimitMsg = true;
1843
+ this.hasCharsLimitValidationError = true;
1844
+ if (this.currentCharsCount == this.options.MaxLength)
1845
+ this.charsLimitMsgClass = "danger";
1846
+ else
1847
+ this.charsLimitMsgClass = "warning";
1848
+ }
1849
+ else {
1850
+ this.showCharsLimitMsg = false;
1851
+ this.hasCharsLimitValidationError = false;
1852
+ }
1853
+ var max = this.options.MaxLength;
1854
+ var current = this.currentCharsCount;
1855
+ var resource = this.UtilityService.getResourceValue("MaxLengthLimitWarning");
1856
+ this.maxLimitWarningMsg = eval('`' + resource + '`');
1857
+ }
1639
1858
  this.OnChange.emit(this.TextAreaFormControl.value);
1640
1859
  };
1641
- TextAreaComponent.prototype.showWordCount = function (value) {
1642
- this.IsShowWordCount = value;
1860
+ TextAreaComponent.prototype.onFocus = function (isFocus) {
1861
+ this.IsShowWordCount = isFocus;
1862
+ //onFocus
1863
+ if (isFocus) {
1864
+ if (this.hasCharsLimitValidationError) //check if there was previous validation error
1865
+ this.showCharsLimitMsg = true;
1866
+ }
1867
+ else //onFocusOut
1868
+ this.showCharsLimitMsg = false;
1643
1869
  };
1644
1870
  return TextAreaComponent;
1645
1871
  }());
@@ -1647,7 +1873,7 @@
1647
1873
  TextAreaComponent.decorators = [
1648
1874
  { type: i0.Component, args: [{
1649
1875
  selector: 'BBSF-TextArea',
1650
- template: "<div class=\"b-control b-textarea\">\r\n <div class=\"form-group row validate is-invalid\" [formGroup]=\"group\">\r\n <label class=\"b-label col-form-label col-sm-12 \" [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\"\r\n *ngIf=\"!options.HideLabel\">\r\n {{options.LabelValue}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\" class=\"text-danger Required-text\"\r\n aria-required=\"true\">*</span>\r\n </label>\r\n\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'': ((options.HideLabel)?'col-md-12':'col-md-9')\">\r\n <div class=\"input-group\">\r\n <textarea class=\"form-control bnsights-control {{options.ExtraClasses}}\"\r\n (focus)=\"showWordCount(true)\" (focusout)=\"showWordCount(false)\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\" aria-describedby=\"email-error\"\r\n aria-invalid=\"true\" formControlName=\"{{options.Name}}\"\r\n [class.is-invalid]=\"TextAreaFormControl.invalid && TextAreaFormControl.touched\"\r\n placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\" autocomplete=\"{{options.AutoComplete}}\"\r\n (change)=\"trimControlValue()\" rows=\"{{options.Rows}}\" (keyup)=\"onTextChange()\" cols=\"{{options.Cols}}\"\r\n maxlength=\"{{options.MaxLength}}\" minlength=\"{{options.MinLength}}\"\r\n (keydown)=\"WordCountArray>options.MaxWordCount&&$event.keyCode !=8?$event.preventDefault():null\"\r\n #TextAreainput></textarea>\r\n <div class=\"input-group-append\" *ngIf=\"options.EnableCopyToClipboard\">\r\n <span class=\"input-group-text\" (click)=\"copyInputMessage(TextAreainput)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>\r\n </div>\r\n <div class=\"text-muted font-weight-500 word-count float-end\" *ngIf=\"options.MaxWordCount>0&&IsShowWordCount\">{{WordCount}}/{{options.MaxWordCount}} words</div>\r\n </div>\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(TextAreaFormControl.invalid && TextAreaFormControl.touched)\">\r\n {{getErrorValidation(TextAreaFormControl.errors|keyvalue)}}\r\n </div>\r\n <div class=\"control-desc text-dark\" *ngIf=\"options.LabelDescription!=null\">{{options.LabelDescription}}</div>\r\n <!-- <div *ngIf=\"TextAreaFormControl.valid\">{{resetError()}}</div> -->\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n\r\n </div>\r\n </div>\r\n</div>\r\n",
1876
+ 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",
1651
1877
  styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}.flip_V{transform:scaleY(-1)}\n"]
1652
1878
  },] }
1653
1879
  ];
@@ -1691,6 +1917,16 @@
1691
1917
  this.markAllAsTouched = false;
1692
1918
  this.ArabicLetterOnly = "";
1693
1919
  this.EnglishLetterOnly = "";
1920
+ //For Show warning message of max length limit
1921
+ this.minCharsLimit = -1; //To disable chars limit feature by default
1922
+ this.englishCurrentCharsCount = 0;
1923
+ this.arabicCurrentCharsCount = 0;
1924
+ this.showEnglishCharsLimitMsg = false;
1925
+ this.showArabicCharsLimitMsg = false;
1926
+ this.hasEnglishCharsLimitValidationError = false;
1927
+ this.hasArabicCharsLimitValidationError = false;
1928
+ this.englishMaxLimitWarningMsg = "";
1929
+ this.arabicMaxLimitWarningMsg = "";
1694
1930
  this.resetError = function () {
1695
1931
  _this.controlValidationService.RemoveGlobalError();
1696
1932
  };
@@ -1722,7 +1958,7 @@
1722
1958
  MultiLingualTextAreaComponent.controlContainerstatic = this.controlContainer;
1723
1959
  }
1724
1960
  MultiLingualTextAreaComponent.prototype.getCustomErrorsMassages = function () {
1725
- this.ArabicLetterOnly = this.UtilityService.getResourceValue("ArabicLetterOnly");
1961
+ this.ArabicLetterOnly = this.UtilityService.getResourceValue("ArabicIsRequiredAndOnly50CharactersEnglish");
1726
1962
  this.EnglishLetterOnly = this.UtilityService.getResourceValue("EnglishLetterOnly");
1727
1963
  };
1728
1964
  MultiLingualTextAreaComponent.prototype.ngOnInit = function () {
@@ -1747,6 +1983,8 @@
1747
1983
  this.options.LanguageMode = this.globalSettings.LanguageMode;
1748
1984
  if (!this.options.MultiControlPlacementType)
1749
1985
  this.options.MultiControlPlacementType = this.globalSettings.MultiControlPlacementType;
1986
+ if (!this.options.MaxLength)
1987
+ this.options.MaxLength = this.globalSettings.MaxLengthTextArea;
1750
1988
  if (this.options.ArabicLabelKey != null && this.options.ArabicLabelKey != "")
1751
1989
  this.options.ArabicLabelValue = this.UtilityService.getResourceValue(this.options.ArabicLabelKey);
1752
1990
  if (this.options.EnglishLabelKey != null && this.options.EnglishLabelKey != "")
@@ -1787,10 +2025,13 @@
1787
2025
  if (this.options.MaxLength > 0) {
1788
2026
  this.EnglishValidationRules.push(forms.Validators.maxLength(this.options.MaxLength));
1789
2027
  this.ArabicValidationRules.push(forms.Validators.maxLength(this.options.MaxLength));
2028
+ if (!this.options.MaxLengthWarningLimit)
2029
+ this.options.MaxLengthWarningLimit = this.globalSettings.MaxLengthWarningLimit;
2030
+ this.minCharsLimit = this.options.MaxLength - this.options.MaxLengthWarningLimit;
1790
2031
  }
1791
2032
  this.showInputUsingLanguageMode();
1792
2033
  this.ArabicValidationRules.push(forms.Validators.compose([
1793
- this.controlUtility.patternValidator(/^[^A-Za-z]*$/, { ArabicLetterOnly: this.ArabicLetterOnly }),
2034
+ this.controlUtility.arabicValidator({ ArabicIsRequiredAndOnly50CharactersEnglish: this.ArabicLetterOnly }),
1794
2035
  ]));
1795
2036
  this.EnglishValidationRules.push(forms.Validators.compose([
1796
2037
  this.controlUtility.patternValidator(/^[\x00-\x7F]*$/, { EnglishLetterOnly: this.EnglishLetterOnly }),
@@ -1837,6 +2078,27 @@
1837
2078
  englishValue = this.EnglishTextAreaFormControl.value;
1838
2079
  }
1839
2080
  }
2081
+ //Check for maxlength limit count
2082
+ //MaxLength should be gretaer than or equals chars limit so that minCharsLimit would be >= 0
2083
+ if (this.options.MaxLength && this.minCharsLimit >= 0) {
2084
+ this.englishCurrentCharsCount = this.EnglishTextAreaFormControl.value.length;
2085
+ if (this.englishCurrentCharsCount >= this.minCharsLimit) {
2086
+ this.showEnglishCharsLimitMsg = true;
2087
+ this.hasEnglishCharsLimitValidationError = true;
2088
+ if (this.englishCurrentCharsCount == this.options.MaxLength)
2089
+ this.englishCharsLimitMsgClass = "danger";
2090
+ else
2091
+ this.englishCharsLimitMsgClass = "warning";
2092
+ }
2093
+ else {
2094
+ this.showEnglishCharsLimitMsg = false;
2095
+ this.hasEnglishCharsLimitValidationError = false;
2096
+ }
2097
+ var max = this.options.MaxLength;
2098
+ var current = this.englishCurrentCharsCount;
2099
+ var resource = this.UtilityService.getResourceValue("MaxLengthLimitWarning");
2100
+ this.englishMaxLimitWarningMsg = eval('`' + resource + '`');
2101
+ }
1840
2102
  }
1841
2103
  if (this.ArabicTextAreaFormControl.value == "") {
1842
2104
  this.ArabicWordCountArray = 0;
@@ -1858,6 +2120,27 @@
1858
2120
  arabicValue = this.ArabicTextAreaFormControl.value;
1859
2121
  }
1860
2122
  }
2123
+ //Check for maxlength limit count
2124
+ //MaxLength should be gretaer than or equals chars limit so that minCharsLimit would be >= 0
2125
+ if (this.options.MaxLength && this.minCharsLimit >= 0) {
2126
+ this.arabicCurrentCharsCount = this.ArabicTextAreaFormControl.value.length;
2127
+ if (this.arabicCurrentCharsCount >= this.minCharsLimit) {
2128
+ this.showArabicCharsLimitMsg = true;
2129
+ this.hasArabicCharsLimitValidationError = true;
2130
+ if (this.arabicCurrentCharsCount == this.options.MaxLength)
2131
+ this.arabicCharsLimitMsgClass = "danger";
2132
+ else
2133
+ this.arabicCharsLimitMsgClass = "warning";
2134
+ }
2135
+ else {
2136
+ this.showArabicCharsLimitMsg = false;
2137
+ this.hasArabicCharsLimitValidationError = false;
2138
+ }
2139
+ var max = this.options.MaxLength;
2140
+ var current = this.arabicCurrentCharsCount;
2141
+ var resource = this.UtilityService.getResourceValue("MaxLengthLimitWarning");
2142
+ this.arabicMaxLimitWarningMsg = eval('`' + resource + '`');
2143
+ }
1861
2144
  }
1862
2145
  var mulitLangModel = new EnglishArabicDTO();
1863
2146
  mulitLangModel.Arabic = arabicValue;
@@ -1881,13 +2164,21 @@
1881
2164
  MultiLingualTextAreaComponent.prototype.trimControlValue = function (type) {
1882
2165
  var whitespace = ' ';
1883
2166
  if (type == "En") {
2167
+ var originalValue = this.EnglishTextAreaFormControl.value;
2168
+ if (this.options.PatchFunction && this.options.PatchPath && this.EnglishTextAreaFormControl.valid) {
2169
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
2170
+ }
1884
2171
  if (this.EnglishTextAreaFormControl.value.startsWith(whitespace) || this.EnglishTextAreaFormControl.value.endsWith(whitespace)) {
1885
- this.EnglishTextAreaFormControl.patchValue(this.EnglishTextAreaFormControl.value.trim());
2172
+ this.EnglishTextAreaFormControl.patchValue(originalValue);
1886
2173
  }
1887
2174
  }
1888
2175
  if (type == "Ar") {
2176
+ var originalValue = this.ArabicTextAreaFormControl.value;
2177
+ if (this.options.PatchFunction && this.options.PatchPath && this.ArabicTextAreaFormControl.valid) {
2178
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
2179
+ }
1889
2180
  if (this.ArabicTextAreaFormControl.value.startsWith(whitespace) || this.ArabicTextAreaFormControl.value.endsWith(whitespace)) {
1890
- this.ArabicTextAreaFormControl.patchValue(this.ArabicTextAreaFormControl.value.trim());
2181
+ this.ArabicTextAreaFormControl.patchValue(originalValue);
1891
2182
  }
1892
2183
  }
1893
2184
  };
@@ -1968,11 +2259,25 @@
1968
2259
  this.ArabicTextAreaFormControl.updateValueAndValidity();
1969
2260
  this.EnglishTextAreaFormControl.updateValueAndValidity();
1970
2261
  };
1971
- MultiLingualTextAreaComponent.prototype.showArabicWordCount = function (value) {
1972
- this.IsShowArabicWordCount = value;
2262
+ MultiLingualTextAreaComponent.prototype.onArabicFocus = function (isFocus) {
2263
+ this.IsShowArabicWordCount = isFocus;
2264
+ //onFocus
2265
+ if (isFocus) {
2266
+ if (this.hasArabicCharsLimitValidationError) //check if there was previous validation error
2267
+ this.showArabicCharsLimitMsg = true;
2268
+ }
2269
+ else //onFocusOut
2270
+ this.showArabicCharsLimitMsg = false;
1973
2271
  };
1974
- MultiLingualTextAreaComponent.prototype.showEnglishWordCount = function (value) {
1975
- this.IsShowEnglishWordCount = value;
2272
+ MultiLingualTextAreaComponent.prototype.onEnglishFocus = function (isFocus) {
2273
+ this.IsShowEnglishWordCount = isFocus;
2274
+ //onFocus
2275
+ if (isFocus) {
2276
+ if (this.hasEnglishCharsLimitValidationError) //check if there was previous validation error
2277
+ this.showEnglishCharsLimitMsg = true;
2278
+ }
2279
+ else //onFocusOut
2280
+ this.showEnglishCharsLimitMsg = false;
1976
2281
  };
1977
2282
  return MultiLingualTextAreaComponent;
1978
2283
  }());
@@ -1980,7 +2285,7 @@
1980
2285
  MultiLingualTextAreaComponent.decorators = [
1981
2286
  { type: i0.Component, args: [{
1982
2287
  selector: 'BBSF-MultiLingualTextArea',
1983
- template: "<div class=\"b-control b-multilangual-textarea\">\r\n <div class=\"form-group validate is-invalid\" [formGroup]=\"group\">\r\n\r\n <div class=\"form-group row\" [formGroup]=\"MultiLanguageTextAreagroup\">\r\n <div [ngClass]=\"(options.MultiControlPlacementType==1)?'col-md-12':'col-md-6'\">\r\n <div class=\"row\" *ngIf=\"ShowEngishTextArea\">\r\n <label class=\"b-label col-form-label col-sm-12 \"\r\n [ngClass]=\"(options.ViewType==1)?'col-md-9':'col-md-3'\" [hidden]=\"options.IsHideEnglishLabel\">\r\n {{(options.EnglishLabelValue!=null&&options.EnglishLabelValue!=\"\")?options.EnglishLabelValue:options.LabelValue+\"in English\"}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\"\r\n class=\"text-danger Required-text\" aria-required=\"true\">*</span>\r\n </label>\r\n\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n <div class=\"input-group\">\r\n <textarea class=\"form-control bnsights-control\" rows=\"{{options.Rows}}\" cols=\"{{options.Cols}}\"\r\n (focus)=\"showEnglishWordCount(true)\" (focusout)=\"showEnglishWordCount(false)\"\r\n maxlength=\"{{options.MaxLength}}\" minlength=\"{{options.MinLength}}\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n formControlName=\"English\" [hidden]=\"options.IsHideEnglishFields\"\r\n [class.is-invalid]=\"EnglishTextAreaFormControl.invalid && EnglishTextAreaFormControl.touched\"\r\n placeholder=\"{{options.EnglishPlaceholder}}\" (change)=\"trimControlValue('En')\"\r\n \r\n (keyup)=\"onTextChange()\"\r\n (keydown)=\"EnglishWordCountArray>options.MaxWordCount&&$event.keyCode !=8?$event.preventDefault():null\"\r\n #userinputTextAreaEnglish>\r\n </textarea>\r\n <div class=\"input-group-append\" [hidden]=\"options.IsHideEnglishFields\" *ngIf=\"options.EnableCopyToClipboard\">\r\n <span class=\"input-group-text\" (click)=\"copyInputMessage(userinputTextAreaEnglish)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>\r\n </div>\r\n\r\n\r\n </div>\r\n <div class=\"text-muted font-weight-500 float-end word-count\" *ngIf=\"options.MaxWordCount>0&&IsShowEnglishWordCount\">{{EnglishWordCount}}/{{options.MaxWordCount}}</div>\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(EnglishTextAreaFormControl.invalid && EnglishTextAreaFormControl.touched)\">\r\n {{getErrorValidation(EnglishTextAreaFormControl.errors|keyvalue)}}\r\n </div>\r\n <div class=\"control-desc\" *ngIf=\"(options.LabelDescription!=null&&options.LabelDescription!='') ||(options.EnglishLabelDescription!=null&&options.EnglishLabelDescription!='')\">\r\n {{(options.EnglishLabelDescription!=null&&options.EnglishLabelDescription!=\"\")?options.EnglishLabelDescription:options.LabelDescription}}\r\n </div>\r\n\r\n <!-- <div *ngIf=\"EnglishTextAreaFormControl.valid\">{{resetError()}}</div> -->\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n\r\n\r\n </div>\r\n </div>\r\n </div>\r\n <div [ngClass]=\"(options.MultiControlPlacementType==1)?'col-md-12':'col-md-6'\">\r\n <div class=\"row\" *ngIf=\"ShowArabicTextArea\">\r\n\r\n <label class=\"b-label col-form-label col-sm-12 \"\r\n [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\" [hidden]=\"options.IsHideArabicLable\">\r\n {{(options.ArabicLabelValue!=null&&options.ArabicLabelValue!=\"\")?options.ArabicLabelValue:options.LabelValue+\"in Arabic\"}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\"\r\n class=\"text-danger Required-text\" aria-required=\"true\">*</span>\r\n </label>\r\n <div class=\" col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n <div class=\"input-group\">\r\n <textarea class=\"form-control bnsights-control\" dir=\"rtl\" rows=\"{{options.Rows}}\" cols=\"{{options.Cols}}\"\r\n (focus)=\"showArabicWordCount(true)\" (focusout)=\"showArabicWordCount(false)\"\r\n [hidden]=\"options.IsHideArabicFields\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n formControlName=\"Arabic\" rows=\"{{options.Rows}}\"\r\n maxlength=\"{{options.MaxLength}}\" minlength=\"{{options.MinLength}}\"\r\n [class.is-invalid]=\"ArabicTextAreaFormControl.invalid && ArabicTextAreaFormControl.touched\"\r\n placeholder=\"{{options.ArabicPlaceholder}}\" (change)=\"trimControlValue('Ar')\"\r\n (keyup)=\"onTextChange()\"\r\n (keydown)=\"ArabicWordCountArray>options.MaxWordCount&&$event.keyCode !=8?$event.preventDefault():null\"\r\n #userinputTextAreaArabic>\r\n </textarea>\r\n <div class=\"input-group-append\" [hidden]=\"options.IsHideArabicFields\" *ngIf=\"options.EnableCopyToClipboard\">\r\n <span class=\"input-group-text\" (click)=\"copyInputMessage(userinputTextAreaArabic)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"text-muted font-weight-500 float-end word-count\" *ngIf=\"options.MaxWordCount>0&&IsShowArabicWordCount\">{{ArabicWordCount}}/{{options.MaxWordCount}}</div>\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(ArabicTextAreaFormControl.invalid && ArabicTextAreaFormControl.touched)\">\r\n {{getErrorValidation(ArabicTextAreaFormControl.errors|keyvalue)}}\r\n </div>\r\n <div class=\"control-desc\" *ngIf=\"(options.LabelDescription!=null&&options.LabelDescription!='')||(options.ArabicLabelDescription!=null&&options.ArabicLabelDescription!='')\">\r\n {{(options.ArabicLabelDescription!=null&&options.ArabicLabelDescription!=\"\")?options.ArabicLabelDescription:options.LabelDescription}}\r\n </div>\r\n <!-- <div *ngIf=\"ArabicTextAreaFormControl.valid\">{{resetError()}}</div> -->\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n",
2288
+ 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",
1984
2289
  styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}\n"]
1985
2290
  },] }
1986
2291
  ];
@@ -2082,6 +2387,10 @@
2082
2387
  };
2083
2388
  CheckBoxComponent.prototype.onValueChanged = function () {
2084
2389
  this.OnChange.emit(this.CheckBoxFormControl.value);
2390
+ var originalValue = this.CheckBoxFormControl.value;
2391
+ if (this.options.PatchFunction && this.options.PatchPath && this.group.get(this.options.Name).valid) {
2392
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
2393
+ }
2085
2394
  };
2086
2395
  return CheckBoxComponent;
2087
2396
  }());
@@ -2220,7 +2529,11 @@
2220
2529
  };
2221
2530
  DropdownListComponent.prototype.onItemSelect = function (item) {
2222
2531
  this.onChangeService.ChangeValue(this.options.Name);
2223
- this.OnChange.emit(item);
2532
+ var originalValue = item;
2533
+ if (this.options.PatchFunction && this.options.PatchPath && this.group.get(this.options.Name).valid) {
2534
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
2535
+ }
2536
+ this.OnChange.emit(originalValue);
2224
2537
  //console.log(this.DropdownListFormControl.value)
2225
2538
  };
2226
2539
  DropdownListComponent.prototype.Clear = function () {
@@ -2367,7 +2680,11 @@
2367
2680
  };
2368
2681
  PhoneComponent.prototype.onValueChanged = function () {
2369
2682
  var Number = this.PhoneFormControl.value.internationalNumber;
2370
- this.OnChange.emit(Number.trim());
2683
+ var originalValue = this.controlUtility.trimControlValue(Number);
2684
+ if (this.options.PatchFunction && this.options.PatchPath && this.group.get(this.options.Name).valid) {
2685
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
2686
+ }
2687
+ this.OnChange.emit(originalValue);
2371
2688
  };
2372
2689
  return PhoneComponent;
2373
2690
  }());
@@ -2405,6 +2722,7 @@
2405
2722
  this.globalSettings = globalSettings;
2406
2723
  this.OnChange = new i0.EventEmitter();
2407
2724
  this.SlideValue = false;
2725
+ this.markAllAsTouched = false;
2408
2726
  ToggleslideComponent.controlContainerstatic = this.controlContainer;
2409
2727
  }
2410
2728
  ToggleslideComponent.prototype.ngOnInit = function () {
@@ -2432,12 +2750,22 @@
2432
2750
  ToggleslideComponent.prototype.resetError = function () {
2433
2751
  this.controlValidationService.RemoveGlobalError();
2434
2752
  };
2435
- ToggleslideComponent.prototype.getErrorValidation = function (Errorsitem) {
2436
- return this.controlUtility.getErrorValidation(Errorsitem, this.options.CustomValidation);
2753
+ ToggleslideComponent.prototype.showGlobalError = function () {
2754
+ this.controlUtility.showGlobalError();
2755
+ };
2756
+ ToggleslideComponent.prototype.getErrorValidation = function (ErrorList) {
2757
+ if (this.markAllAsTouched && this.group.invalid) {
2758
+ this.showGlobalError();
2759
+ this.markAllAsTouched = false;
2760
+ }
2761
+ return this.controlUtility.getErrorValidationMassage(ErrorList, this.group, this.options);
2437
2762
  };
2438
2763
  ToggleslideComponent.prototype.changeValueToggle = function () {
2439
2764
  this.OnChange.emit(this.SlideValue);
2440
2765
  this.ToggleslideFormControl.setValue(this.SlideValue);
2766
+ if (this.options.PatchFunction && this.options.PatchPath && this.ToggleslideFormControl.valid) {
2767
+ this.controlUtility.patchControlValue(this.SlideValue, this.options.PatchFunction, this.options.PatchPath);
2768
+ }
2441
2769
  };
2442
2770
  return ToggleslideComponent;
2443
2771
  }());
@@ -2644,7 +2972,11 @@
2644
2972
  };
2645
2973
  HtmlEditorComponent.prototype.onValueChanged = function () {
2646
2974
  this.HtmlEditorFormControl.setValue(this.HtmlEditorFormControl.value.trim());
2647
- this.OnChange.emit(this.HtmlEditorFormControl.value);
2975
+ var originalValue = this.controlUtility.trimControlValue(this.HtmlEditorFormControl.value);
2976
+ if (this.options.PatchFunction && this.options.PatchPath && this.HtmlEditorFormControl.valid) {
2977
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
2978
+ }
2979
+ this.OnChange.emit(originalValue);
2648
2980
  };
2649
2981
  return HtmlEditorComponent;
2650
2982
  }());
@@ -2942,8 +3274,13 @@
2942
3274
  if (type == "en") {
2943
3275
  this.MultilingualHtmlEditorgroup.controls["English"].setValue(this.MultilingualHtmlEditorgroup.controls["English"].value.trim());
2944
3276
  this.englishValue = this.MultilingualHtmlEditorgroup.controls["English"].value == null ? "" : this.MultilingualHtmlEditorgroup.controls["English"].value;
2945
- if (this.englishValue)
3277
+ if (this.englishValue) {
2946
3278
  this.EnglishHtmlEditorFormControl.setValue(this.englishValue);
3279
+ var originalValue = this.englishValue;
3280
+ if (this.options.PatchFunction && this.options.PatchPath && this.EnglishHtmlEditorFormControl.valid) {
3281
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
3282
+ }
3283
+ }
2947
3284
  var EngliswordCountArray = this.EnglishHtmlEditorFormControl.value.split(" ").length;
2948
3285
  if (EngliswordCountArray > 0) {
2949
3286
  if (EngliswordCountArray > this.options.MaxWordCount)
@@ -2955,8 +3292,13 @@
2955
3292
  if (type == "ar") {
2956
3293
  this.MultilingualHtmlEditorgroup.controls["Arabic"].setValue(this.MultilingualHtmlEditorgroup.controls["Arabic"].value.trim());
2957
3294
  this.arabicValue = this.MultilingualHtmlEditorgroup.controls["Arabic"].value == null ? "" : this.MultilingualHtmlEditorgroup.controls["Arabic"].value;
2958
- if (this.arabicValue)
3295
+ if (this.arabicValue) {
2959
3296
  this.ArabicHtmlEditorFormControl.setValue(this.arabicValue);
3297
+ var originalValue = this.arabicValue;
3298
+ if (this.options.PatchFunction && this.options.PatchPath && this.ArabicHtmlEditorFormControl.valid) {
3299
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
3300
+ }
3301
+ }
2960
3302
  var ArabicwordCountArray = this.ArabicHtmlEditorFormControl.value.split(" ").length;
2961
3303
  if (ArabicwordCountArray > 0) {
2962
3304
  if (ArabicwordCountArray > this.options.MaxWordCount)
@@ -3062,7 +3404,7 @@
3062
3404
  MultiLingualHtmlEditorComponent.decorators = [
3063
3405
  { type: i0.Component, args: [{
3064
3406
  selector: 'BBSF-MultiLingualHtmlEditor',
3065
- 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.IsHideArabicLable\">\r\n {{(options.ArabicLabelValue!=null&&options.ArabicLabelValue!=\"\")?options.ArabicLabelValue:options.LabelValue+\"in Arabic\"}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\"\r\n class=\"text-danger Required-text\" aria-required=\"true\">*</span>\r\n </label>\r\n <div class=\" col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n \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",
3407
+ 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",
3066
3408
  styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}\n"]
3067
3409
  },] }
3068
3410
  ];
@@ -3091,7 +3433,6 @@
3091
3433
  this.controlValidationService = controlValidationService;
3092
3434
  this.globalSettings = globalSettings;
3093
3435
  this.files = [];
3094
- this.ImageSource = "./src/assets/images/uploadimg.png";
3095
3436
  this.OnChange = new i0.EventEmitter();
3096
3437
  this.ValidationMessage = "";
3097
3438
  this.AcceptedType = "";
@@ -3139,8 +3480,10 @@
3139
3480
  this.controlValidationService.isCreatedBefor = false;
3140
3481
  if (!this.options.ViewType)
3141
3482
  this.options.ViewType = this.globalSettings.ViewType;
3142
- if (this.options.DefaultImageSrc != null && this.options.DefaultImageSrc != "")
3143
- this.ImageSource = this.options.DefaultImageSrc;
3483
+ if (!this.options.DefaultImageSrc)
3484
+ this.options.DefaultImageSrc = this.globalSettings.DefaultImageSrc;
3485
+ //Set img src by default value
3486
+ this.ImageSource = this.options.DefaultImageSrc;
3144
3487
  if (this.options.AllowImageCropper) {
3145
3488
  this.config = {
3146
3489
  aspectRatio: this.options.ImageCropperWidth / this.options.ImageCropperHeight,
@@ -3299,7 +3642,11 @@
3299
3642
  _this.files = [];
3300
3643
  (_a = _this.files).push.apply(_a, __spreadArray([], __read(event.addedFiles)));
3301
3644
  }
3302
- _this.OnChange.emit(_this.ImageUploadFormControl.value);
3645
+ var originalValue = _this.ImageUploadFormControl.value;
3646
+ if (_this.options.PatchFunction && _this.options.PatchPath && _this.ImageUploadFormControl.valid) {
3647
+ _this.controlUtility.patchControlValue(originalValue, _this.options.PatchFunction, _this.options.PatchPath);
3648
+ }
3649
+ _this.OnChange.emit(originalValue);
3303
3650
  };
3304
3651
  }
3305
3652
  };
@@ -3314,6 +3661,8 @@
3314
3661
  var ItemList = this.group.get(this.options.Name).value;
3315
3662
  this.files = [];
3316
3663
  ItemList = null;
3664
+ //Set Img src by default image (upload)
3665
+ this.ImageSource = this.options.DefaultImageSrc;
3317
3666
  if ((this.files.length == 0) && this.options.IsRequired) {
3318
3667
  this.ImageUploadFormControl.markAsTouched();
3319
3668
  this.ImageUploadFormControl.setErrors(forms.Validators.required);
@@ -3590,7 +3939,11 @@
3590
3939
  reader_1.onload = function () {
3591
3940
  _this.imageUrl = reader_1.result.toString();
3592
3941
  _this.openModal(true);
3593
- _this.OnChange.emit(_this.group.get(_this.options.Name).value);
3942
+ var originalValue = _this.group.get(_this.options.Name).value;
3943
+ if (_this.options.PatchFunction && _this.options.PatchPath && _this.group.get(_this.options.Name).valid) {
3944
+ _this.controlUtility.patchControlValue(originalValue, _this.options.PatchFunction, _this.options.PatchPath);
3945
+ }
3946
+ _this.OnChange.emit(originalValue);
3594
3947
  };
3595
3948
  }
3596
3949
  };
@@ -3932,6 +4285,10 @@
3932
4285
  else {
3933
4286
  this.AutocompleteTextBoxControl.setValue(item);
3934
4287
  this.AutocompleteTextBoxControl.updateValueAndValidity();
4288
+ var originalValue = this.AutocompleteTextBoxControl.value;
4289
+ if (this.options.PatchFunction && this.options.PatchPath && this.group.get(this.options.Name).valid) {
4290
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
4291
+ }
3935
4292
  this.OnChange.emit(this.AutocompleteTextBoxControl.value);
3936
4293
  }
3937
4294
  }
@@ -3942,7 +4299,6 @@
3942
4299
  return __generator(this, function (_a) {
3943
4300
  switch (_a.label) {
3944
4301
  case 0:
3945
- debugger;
3946
4302
  this.Search = search;
3947
4303
  this.SelectedValue = "";
3948
4304
  return [4 /*yield*/, this.suggestions$.subscribe(function (result) {
@@ -3972,7 +4328,7 @@
3972
4328
  { type: i0.Component, args: [{
3973
4329
  // tslint:disable-next-line: component-selector
3974
4330
  selector: 'BBSF-AutocompleteTextBox',
3975
- 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\r\n *ngIf=\"!options.AllowNewSelection\"\r\n [data]=\"dataList\"\r\n [initialValue]=\"SelectedValue\"\r\n [searchKeyword]=\"keyword\"\r\n placeholder=\"{{options.Placeholder}}\"\r\n (selected)='selectEvent($event)'\r\n (inputChanged)='onChangeSearch($event)'\r\n historyIdentifier=\"dataList\"\r\n [itemTemplate]=\"itemTemplate\"\r\n [notFoundTemplate]=\"notFoundTemplate\"\r\n class=\"form-control bnsights-control {{options.ExtraClasses}}\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\"\r\n formControlName=\"{{options.Name}}\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n [class.is-invalid]=\"AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched\"\r\n >\r\n </ng-autocomplete>\r\n <ng-autocomplete\r\n *ngIf=\"options.AllowNewSelection\"\r\n [data]=\"dataList\"\r\n [initialValue]=\"SelectedValue\"\r\n [searchKeyword]=\"keyword\"\r\n placeholder=\"{{options.Placeholder}}\"\r\n (selected)='selectEvent($event)'\r\n (inputChanged)='onChangeSearch($event)'\r\n historyIdentifier=\"dataList\"\r\n [itemTemplate]=\"itemTemplate\"\r\n class=\"form-control bnsights-control {{options.ExtraClasses}}\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\"\r\n formControlName=\"{{options.Name}}\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n [class.is-invalid]=\"AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched\"\r\n >\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) \">{{resetError()}}</div>\r\n\r\n </div>\r\n </div>\r\n</div>\r\n",
4331
+ 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>",
3976
4332
  styles: [""]
3977
4333
  },] }
3978
4334
  ];
@@ -4168,7 +4524,11 @@
4168
4524
  this.TagsFormControl.invalid;
4169
4525
  }
4170
4526
  }
4171
- this.OnChange.emit(this.TagsFormControl.value);
4527
+ var originalValue = this.TagsFormControl.value;
4528
+ if (this.options.PatchFunction && this.options.PatchPath && this.TagsFormControl.valid) {
4529
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
4530
+ }
4531
+ this.OnChange.emit(originalValue);
4172
4532
  };
4173
4533
  TagsInputComponent.prototype.onNoOptionsMatch = function (event) {
4174
4534
  this.IsNoMatch = event;
@@ -4411,7 +4771,6 @@
4411
4771
  }
4412
4772
  this.requestHandlerService.post(this.options.ActionPostURL, pagingDTO, null, params, null)
4413
4773
  .subscribe(function (responseData) {
4414
- debugger;
4415
4774
  _this.result = responseData.items; //this.castItems(responseData.items);
4416
4775
  var castedResult = classTransformer.plainToClass(_this.options.TypeOfResponse, _this.result, { excludeExtraneousValues: true });
4417
4776
  _this.Items.emit(castedResult);
@@ -4427,7 +4786,6 @@
4427
4786
  });
4428
4787
  };
4429
4788
  PagingComponent.prototype.castItems = function (objectArr) {
4430
- debugger;
4431
4789
  var originalArray = [];
4432
4790
  for (var index = 0; index < objectArr.length; index++) {
4433
4791
  var element = objectArr[index];
@@ -4649,7 +5007,11 @@
4649
5007
  return this.controlUtility.getErrorValidationMassage(ErrorList, this.group, this.options);
4650
5008
  };
4651
5009
  RadioButtonComponent.prototype.onValueChanged = function () {
4652
- this.OnChange.emit(this.RadioButtonFormControl.value);
5010
+ var originalValue = this.RadioButtonFormControl.value;
5011
+ if (this.options.PatchFunction && this.options.PatchPath && this.RadioButtonFormControl.valid) {
5012
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
5013
+ }
5014
+ this.OnChange.emit(originalValue);
4653
5015
  };
4654
5016
  return RadioButtonComponent;
4655
5017
  }());
@@ -4700,7 +5062,12 @@
4700
5062
  this.markAllAsTouched = false;
4701
5063
  this.validationRules = [];
4702
5064
  this.validationRulesasync = [];
4703
- this.currentLanguage = "";
5065
+ //For Show warning message of max length limit
5066
+ this.currentCharsCount = 0;
5067
+ this.showCharsLimitMsg = false;
5068
+ this.hasCharsLimitValidationError = false;
5069
+ this.minCharsLimit = -1; //To disable chars limit feature by default
5070
+ this.maxLimitWarningMsg = "";
4704
5071
  this.resetError = function () {
4705
5072
  _this.controlValidationService.RemoveGlobalError();
4706
5073
  };
@@ -4726,22 +5093,11 @@
4726
5093
  };
4727
5094
  TextboxComponent.controlContainerstatic = this.controlContainer;
4728
5095
  }
4729
- // static showErrorOfInputs(errors: any) {
4730
- // const controlContainerstatic = TextboxComponent.controlContainerstatic;
4731
- // const formGroup = controlContainerstatic.control as FormGroup;
4732
- // for (const key in errors) {
4733
- // if (errors.hasOwnProperty(key)) {
4734
- // for (const iterator of errors[key]) {
4735
- // const formControl = formGroup.get(key) as FormControl;
4736
- // formControl.setErrors({ "FluentApi": iterator });
4737
- // formControl.markAsTouched();
4738
- // }
4739
- // }
4740
- // }
4741
- // }
4742
5096
  TextboxComponent.prototype.ngOnInit = function () {
4743
5097
  var _this = this;
4744
5098
  this.controlValidationService.isCreatedBefor = false;
5099
+ if (!this.options.MaxLength)
5100
+ this.options.MaxLength = this.globalSettings.MaxLengthTextBox;
4745
5101
  if (!this.options.ViewType)
4746
5102
  this.options.ViewType = this.globalSettings.ViewType;
4747
5103
  if (this.options.MaskPattern != null && this.options.MaskPattern != "") {
@@ -4754,6 +5110,9 @@
4754
5110
  if (this.options.LabelKey != null && this.options.LabelKey != "")
4755
5111
  this.options.LabelValue = this.UtilityService.getResourceValue(this.options.LabelKey);
4756
5112
  this.getCustomErrorsMassages();
5113
+ if (this.options.IsRequired) {
5114
+ this.validationRules.push(forms.Validators.required);
5115
+ }
4757
5116
  switch (this.options.Type) {
4758
5117
  case exports.InputType.Email:
4759
5118
  this.validationRules.push(forms.Validators.compose([
@@ -4765,7 +5124,12 @@
4765
5124
  this.options.Placeholder = this.MaskPattern;
4766
5125
  break;
4767
5126
  case exports.InputType.Number:
4768
- this.validationRules.push(forms.Validators.pattern('^[0-9]+(\.?[0-9]+)?$'));
5127
+ this.validationRules.push(forms.Validators.compose([
5128
+ this.controlUtility.patternValidator(/^[0-9]*$/, { IntegerNumberValidationKey: "" }),
5129
+ ]));
5130
+ this.validationRules.push(forms.Validators.compose([
5131
+ this.controlUtility.patternValidator(/^[+]?([.]\d+|\d+[.]?\d*)$/, { PositiveNumberValidationKey: "" }),
5132
+ ]));
4769
5133
  if (this.options.NumberRange != null) {
4770
5134
  this.validationRules.push(forms.Validators.min(this.options.NumberRange.From));
4771
5135
  this.validationRules.push(forms.Validators.max(this.options.NumberRange.To));
@@ -4807,9 +5171,9 @@
4807
5171
  }
4808
5172
  if (this.options.MaxLength > 0) {
4809
5173
  this.validationRules.push(forms.Validators.maxLength(this.options.MaxLength));
4810
- }
4811
- if (this.options.IsRequired) {
4812
- this.validationRules.push(forms.Validators.required);
5174
+ if (!this.options.MaxLengthWarningLimit)
5175
+ this.options.MaxLengthWarningLimit = this.globalSettings.MaxLengthWarningLimit;
5176
+ this.minCharsLimit = this.options.MaxLength - this.options.MaxLengthWarningLimit;
4813
5177
  }
4814
5178
  this.TextBoxFormControl.setValidators(this.validationRules);
4815
5179
  this.TextBoxFormControl.setAsyncValidators(this.validationRulesasync);
@@ -4839,8 +5203,11 @@
4839
5203
  return this.controlUtility.getInputType(type);
4840
5204
  };
4841
5205
  TextboxComponent.prototype.trimControlValue = function () {
4842
- var OrignalValue = this.controlUtility.trimControlValue(this.TextBoxFormControl.value);
4843
- this.TextBoxFormControl.patchValue(OrignalValue);
5206
+ var originalValue = this.controlUtility.trimControlValue(this.TextBoxFormControl.value);
5207
+ this.TextBoxFormControl.patchValue(originalValue);
5208
+ if (this.options.PatchFunction && this.options.PatchPath && this.TextBoxFormControl.valid) {
5209
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
5210
+ }
4844
5211
  };
4845
5212
  TextboxComponent.prototype.copyInputMessage = function (inputElement) {
4846
5213
  this.controlUtility.CopyInputMessage(inputElement);
@@ -4856,6 +5223,11 @@
4856
5223
  this.EnglishLetterOnly = this.UtilityService.getResourceValue("EnglishLetterOnly");
4857
5224
  };
4858
5225
  TextboxComponent.prototype.onTextChange = function () {
5226
+ if (this.options.Type == exports.InputType.Number)
5227
+ if (!this.TextBoxFormControl.value) {
5228
+ this.TextBoxFormControl.setErrors({ IntegerNumberValidationKey: "" });
5229
+ return;
5230
+ }
4859
5231
  if (this.TextBoxFormControl.value == "") {
4860
5232
  this.WordCountArray = 0;
4861
5233
  this.WordCount = 0;
@@ -4873,11 +5245,39 @@
4873
5245
  this.WordCount = this.WordCountArray;
4874
5246
  }
4875
5247
  }
5248
+ //Check for maxlength limit count
5249
+ //MaxLength should be gretaer than or equals chars limit so that minCharsLimit would be >= 0
5250
+ if (this.options.MaxLength && this.minCharsLimit >= 0) {
5251
+ this.currentCharsCount = this.TextBoxFormControl.value.length;
5252
+ if (this.currentCharsCount >= this.minCharsLimit) {
5253
+ this.showCharsLimitMsg = true;
5254
+ this.hasCharsLimitValidationError = true;
5255
+ if (this.currentCharsCount == this.options.MaxLength)
5256
+ this.charsLimitMsgClass = "danger";
5257
+ else
5258
+ this.charsLimitMsgClass = "warning";
5259
+ }
5260
+ else {
5261
+ this.showCharsLimitMsg = false;
5262
+ this.hasCharsLimitValidationError = false;
5263
+ }
5264
+ var max = this.options.MaxLength;
5265
+ var current = this.currentCharsCount;
5266
+ var resource = this.UtilityService.getResourceValue("MaxLengthLimitWarning");
5267
+ this.maxLimitWarningMsg = eval('`' + resource + '`');
5268
+ }
4876
5269
  }
4877
5270
  this.OnChange.emit(this.TextBoxFormControl.value);
4878
5271
  };
4879
- TextboxComponent.prototype.showWordCount = function (value) {
4880
- this.IsShowWordCount = value;
5272
+ TextboxComponent.prototype.onFocus = function (isFocus) {
5273
+ this.IsShowWordCount = isFocus;
5274
+ //onFocus
5275
+ if (isFocus) {
5276
+ if (this.hasCharsLimitValidationError) //check if there was previous validation error
5277
+ this.showCharsLimitMsg = true;
5278
+ }
5279
+ else //onFocusOut
5280
+ this.showCharsLimitMsg = false;
4881
5281
  };
4882
5282
  return TextboxComponent;
4883
5283
  }());
@@ -4885,7 +5285,7 @@
4885
5285
  TextboxComponent.decorators = [
4886
5286
  { type: i0.Component, args: [{
4887
5287
  selector: 'BBSF-TextBox',
4888
- template: "<div class=\"b-control b-textbox\">\r\n <div class=\"form-group row validate is-invalid\" [formGroup]=\"group\" [ngClass]=\"(options.NoMargin==true)?'':'NoMargin'\">\r\n <label class=\"b-label col-form-label col-sm-12 \" [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\" *ngIf=\"!options.HideLabel\">\r\n {{options.LabelValue}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\" class=\"text-danger Required-text\"\r\n aria-required=\"true\">*</span>\r\n </label>\r\n\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'': ((options.HideLabel)?'col-md-12':'col-md-9')\">\r\n <div class=\"input-group align-items-center\" *ngIf=\"MaskPattern!=null&&MaskPattern!=''\">\r\n <div class=\"svg svg-icon-grey\" [ngClass]=\"(options.IconPosition==1)?'left-icon':'right-icon'\" *ngIf=\"options.Icon!=null\">\r\n <span [inlineSVG]=\"options.Icon\"></span>\r\n </div>\r\n <input [mask]=\"MaskPattern\" placeHolderCharacter=\" \" [showMaskTyped]=\"true\" [validation]=\"true\"\r\n class=\"form-control bnsights-control {{options.ExtraClasses}}\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\" formControlName=\"{{options.Name}}\"\r\n type=\"{{getInputType(options.Type)}}\"\r\n [class.is-invalid]=\"TextBoxFormControl.invalid && TextBoxFormControl.touched\"\r\n placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\" autocomplete=\"{{options.AutoComplete}}\"\r\n (change)=\"trimControlValue()\" (keyup)=\"onTextChange()\"\r\n (keydown)=\"WordCountArray>options.MaxWordCount&&$event.keyCode !=8?$event.preventDefault():null\"\r\n #userinput>\r\n <div class=\"input-group-append\">\r\n <span class=\"input-group-text\" *ngIf=\"options.EnableCopyToClipboard\" (click)=\"copyInputMessage(userinput)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>\r\n </div>\r\n <div class=\"text-muted font-weight-500 word-count\" *ngIf=\"options.MaxWordCount>0&&IsShowWordCount\">{{WordCount}}/{{options.MaxWordCount}} Words</div>\r\n </div>\r\n\r\n <div class=\"input-group align-items-center\" *ngIf=\"MaskPattern==null||MaskPattern==''\">\r\n <div class=\"svg svg-icon-grey\" [ngClass]=\"(options.IconPosition==1)?'left-icon':'right-icon'\" *ngIf=\"options.Icon!=null\">\r\n <span [inlineSVG]=\"options.Icon\"></span>\r\n </div>\r\n <input class=\"form-control bnsights-control {{options.ExtraClasses}} \"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\"\r\n (focus)=\"showWordCount(true)\" (focusout)=\"showWordCount(false)\"\r\n maxlength=\"{{options.MaxLength}}\" minlength=\"{{options.MinLength}}\"\r\n aria-describedby=\"email-error\"\r\n aria-invalid=\"true\" formControlName=\"{{options.Name}}\" type=\"{{getInputType(options.Type)}}\"\r\n [class.is-invalid]=\"TextBoxFormControl.invalid && TextBoxFormControl.touched\"\r\n placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\" autocomplete=\"{{options.AutoComplete}}\"\r\n (change)=\"trimControlValue()\" (keyup)=\"onTextChange()\"\r\n (keydown)=\"WordCountArray>options.MaxWordCount&&$event.keyCode !=8?$event.preventDefault():null\"\r\n #userinput>\r\n <div class=\"input-group-append\" *ngIf=\"options.EnableCopyToClipboard\">\r\n <span class=\"input-group-text\" (click)=\"copyInputMessage(userinput)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>\r\n </div>\r\n <div class=\"text-muted font-weight-500 word-count float-end\" *ngIf=\"options.MaxWordCount>0&&IsShowWordCount\">{{WordCount}}/{{options.MaxWordCount}} Words</div>\r\n </div>\r\n <div class=\"text-danger Required-text\" dir=\"{{options.ForceDirection==2?'rtl':''}}\"\r\n *ngIf=\"(TextBoxFormControl.invalid && TextBoxFormControl.touched)\">\r\n {{getErrorValidation(TextBoxFormControl.errors|keyvalue)}}\r\n </div>\r\n <div class=\"control-desc\" *ngIf=\"options.LabelDescription!=null\">{{options.LabelDescription}}</div>\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n </div>\r\n </div>\r\n</div>\r\n",
5288
+ 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",
4889
5289
  styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}.flip_V{transform:scaleY(-1)}\n"]
4890
5290
  },] }
4891
5291
  ];
@@ -5153,6 +5553,10 @@
5153
5553
  this.MapAutoCompleteModel.Longitude = location.longitude;
5154
5554
  this.MapAutoCompleteFormControl.setValue(null);
5155
5555
  this.MapAutoCompleteFormControl.setValue(this.MapAutoCompleteModel);
5556
+ var originalValue = this.MapAutoCompleteFormControl.value;
5557
+ if (this.options.PatchFunction && this.options.PatchPath && this.MapAutoCompleteFormControl.valid) {
5558
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
5559
+ }
5156
5560
  };
5157
5561
  MapAutoCompleteComponent.prototype.GermanAddressMapped = function (result) {
5158
5562
  this.MapAutoCompleteModel == new MapAutocompleteDTO();
@@ -5434,23 +5838,7 @@
5434
5838
  this.utilityService.notifyErrorMessage();
5435
5839
  }
5436
5840
  else {
5437
- debugger;
5438
- if (err.status == 400) {
5439
- this.controlValidationService.renderServerErrors(this.options.FormGroup, err, new bbsfUtilities.RequestOptionsModel(), this.fromName);
5440
- }
5441
- else if (err.status == 401) {
5442
- this.router.navigate(["/Admin/account/login"]);
5443
- }
5444
- else if (err.status == 510) {
5445
- errorMessage = this.utilityService.getCurrentLanguage() == "en" ? "Can not delete this item as it is related to others" : "لا يمكن حذف هذا العنصر لأنه مرتبط بعناصر أخرى";
5446
- if (!this.options.DisableErrorNotification)
5447
- this.utilityService.notifyErrorMessage(errorMessage);
5448
- }
5449
- else {
5450
- errorMessage = "error message is: " + (err.error ? err.error.Message : err.message);
5451
- if (!this.options.DisableErrorNotification)
5452
- this.utilityService.notifyErrorMessage(errorMessage);
5453
- }
5841
+ this.controlValidationService.renderServerErrors(this.options.FormGroup, err, new bbsfUtilities.RequestOptionsModel(), this.fromName);
5454
5842
  }
5455
5843
  if (!this.options.DisableBlockUI)
5456
5844
  this.utilityService.stopBlockUI();
@@ -5814,72 +6202,77 @@
5814
6202
  ForceDirection[ForceDirection["Arabic"] = 2] = "Arabic";
5815
6203
  })(exports.ForceDirection || (exports.ForceDirection = {}));
5816
6204
 
5817
- var DatePickerOptions = /** @class */ (function () {
5818
- function DatePickerOptions() {
5819
- /** to set type of view if DatePicker is Vertical or Horizontal */
5820
- this.ViewType = exports.ControlLayout.Vertical;
5821
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
5822
- */
6205
+ var ControlOptionsBase = /** @class */ (function () {
6206
+ function ControlOptionsBase() {
6207
+ /** to set type of view if Control is Vertical or Horizontal */
6208
+ this.ViewType = null;
6209
+ /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage */
5823
6210
  this.CustomValidation = [];
6211
+ }
6212
+ return ControlOptionsBase;
6213
+ }());
6214
+
6215
+ var DatePickerOptions = /** @class */ (function (_super) {
6216
+ __extends(DatePickerOptions, _super);
6217
+ function DatePickerOptions() {
6218
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
5824
6219
  /**To set First Day Of Week to DatePicker */
5825
- this.FirstDayOfWeek = 1;
6220
+ _this.FirstDayOfWeek = 1;
5826
6221
  /**To set PickerType to DatePicker is Calendar or Timer Or Both */
5827
- this.PickerType = exports.PickerType.Calendar;
6222
+ _this.PickerType = exports.PickerType.Calendar;
5828
6223
  /**To set StartView to DatePicker is Year or Month Or Multi-Year */
5829
- this.StartView = exports.StartView.Month;
6224
+ _this.StartView = exports.StartView.Month;
5830
6225
  /**To set SelectMode to DatePicker is Single or Range */
5831
- this.SelectMode = exports.SelectMode.Single;
5832
- this.ForceDirection = exports.ForceDirection.English;
6226
+ _this.SelectMode = exports.SelectMode.Single;
6227
+ _this.ForceDirection = exports.ForceDirection.English;
6228
+ /**Name of DatePicker control to compare value with it */
6229
+ _this.StartControlToCompareWith = null;
6230
+ return _this;
5833
6231
  }
5834
6232
  return DatePickerOptions;
5835
- }());
6233
+ }(ControlOptionsBase));
5836
6234
 
5837
- var DropdownOptions = /** @class */ (function () {
6235
+ var DropdownOptions = /** @class */ (function (_super) {
6236
+ __extends(DropdownOptions, _super);
5838
6237
  function DropdownOptions() {
6238
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
5839
6239
  /** Disable Bootstrap DropdownList */
5840
- this.DisableBootstrapSelect = false;
5841
- /** to set type of view if DropdownList is Vertical or Horizontal */
5842
- this.ViewType = null;
5843
- /** To Set Custom Validation*/
5844
- this.CustomValidation = [];
6240
+ _this.DisableBootstrapSelect = false;
5845
6241
  /** Set key for item in DropdownList */
5846
- this.ItemTempletkey = "key";
6242
+ _this.ItemTempletkey = "key";
5847
6243
  /** Set value for item in DropdownList */
5848
- this.ItemTempletvalue = "value";
5849
- this.ForceDirection = exports.ForceDirection.English;
6244
+ _this.ItemTempletvalue = "value";
6245
+ _this.ForceDirection = exports.ForceDirection.English;
6246
+ return _this;
5850
6247
  }
5851
6248
  return DropdownOptions;
5852
- }());
6249
+ }(ControlOptionsBase));
5853
6250
 
5854
- var FileUploadOptions = /** @class */ (function () {
6251
+ var FileUploadOptions = /** @class */ (function (_super) {
6252
+ __extends(FileUploadOptions, _super);
5855
6253
  function FileUploadOptions() {
6254
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
5856
6255
  /** Ability to set FileInput required */
5857
- this.IsMultipleFile = false;
6256
+ _this.IsMultipleFile = false;
5858
6257
  /** Sets boolean Value to Show IsDropZone Or Not */
5859
- this.IsDropZone = false;
5860
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
5861
- */
5862
- this.CustomValidation = [];
5863
- /** to set type of view if textbox is Vertical or Horizontal */
5864
- this.ViewType = null;
6258
+ _this.IsDropZone = false;
6259
+ return _this;
5865
6260
  }
5866
6261
  return FileUploadOptions;
5867
- }());
6262
+ }(ControlOptionsBase));
5868
6263
 
5869
- var HtmlEditorOptions = /** @class */ (function () {
6264
+ var HtmlEditorOptions = /** @class */ (function (_super) {
6265
+ __extends(HtmlEditorOptions, _super);
5870
6266
  function HtmlEditorOptions() {
5871
- /** to set type of view if textbox is Vertical or Horizontal */
5872
- this.ViewType = null;
5873
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
5874
- */
5875
- this.CustomValidation = [];
6267
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
5876
6268
  /** to set Direction of HtmlEditor if HtmlEditor is Arabic or English */
5877
- this.ForceDirection = exports.ForceDirection.English;
6269
+ _this.ForceDirection = exports.ForceDirection.English;
5878
6270
  /** Set Height For */
5879
- this.Height = 150;
6271
+ _this.Height = 150;
6272
+ return _this;
5880
6273
  }
5881
6274
  return HtmlEditorOptions;
5882
- }());
6275
+ }(ControlOptionsBase));
5883
6276
 
5884
6277
  exports.ImageType = void 0;
5885
6278
  (function (ImageType) {
@@ -5891,51 +6284,40 @@
5891
6284
  ImageType["None"] = "";
5892
6285
  })(exports.ImageType || (exports.ImageType = {}));
5893
6286
 
5894
- var ImageUploadOptions = /** @class */ (function () {
6287
+ var ImageUploadOptions = /** @class */ (function (_super) {
6288
+ __extends(ImageUploadOptions, _super);
5895
6289
  function ImageUploadOptions() {
6290
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
5896
6291
  /** Allow to Upload Multiple File */
5897
- this.IsMultiple = false;
6292
+ _this.IsMultiple = false;
5898
6293
  /** Allow to Use Drop Zone */
5899
- this.AllowDropZone = false;
5900
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
5901
- */
5902
- this.CustomValidation = [];
5903
- /** to set type of view if FileInput is Vertical or Horizontal */
5904
- this.ViewType = null;
6294
+ _this.AllowDropZone = false;
5905
6295
  /** Set List of Custom Attribute to FileInput */
5906
- this.FileUploadAcceptsTypes = [exports.ImageType.ImageTypes];
6296
+ _this.FileUploadAcceptsTypes = [exports.ImageType.ImageTypes];
6297
+ return _this;
5907
6298
  }
5908
6299
  return ImageUploadOptions;
5909
- }());
6300
+ }(ControlOptionsBase));
5910
6301
 
5911
- var MapAutoCompleteOptions = /** @class */ (function () {
6302
+ var MapAutoCompleteOptions = /** @class */ (function (_super) {
6303
+ __extends(MapAutoCompleteOptions, _super);
5912
6304
  function MapAutoCompleteOptions() {
5913
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
5914
- */
5915
- this.CustomValidation = [];
5916
- /** to set type of view if MapAutoComplete is Vertical or Horizontal */
5917
- this.ViewType = null;
6305
+ return _super !== null && _super.apply(this, arguments) || this;
5918
6306
  }
5919
6307
  return MapAutoCompleteOptions;
5920
- }());
6308
+ }(ControlOptionsBase));
5921
6309
 
5922
- var PhoneOptions = /** @class */ (function () {
6310
+ var PhoneOptions = /** @class */ (function (_super) {
6311
+ __extends(PhoneOptions, _super);
5923
6312
  function PhoneOptions() {
5924
- /**
5925
- * Represent Css classes to Phonebox
5926
- */
5927
- this.ExtraClasses = "form-control bnsights-control";
5928
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
5929
- */
5930
- this.CustomValidation = [];
6313
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
5931
6314
  /**Set List Of Countries As Preferred Countries*/
5932
- this.PreferredCountries = [];
5933
- /** to set type of view if Phonebox is Vertical or Horizontal */
5934
- this.ViewType = null;
5935
- this.ForceDirection = exports.ForceDirection.English;
6315
+ _this.PreferredCountries = [];
6316
+ _this.ForceDirection = exports.ForceDirection.English;
6317
+ return _this;
5936
6318
  }
5937
6319
  return PhoneOptions;
5938
- }());
6320
+ }(ControlOptionsBase));
5939
6321
 
5940
6322
  var RangeNumber = /** @class */ (function () {
5941
6323
  function RangeNumber() {
@@ -5943,18 +6325,16 @@
5943
6325
  return RangeNumber;
5944
6326
  }());
5945
6327
 
5946
- var TextAreaOptions = /** @class */ (function () {
6328
+ var TextAreaOptions = /** @class */ (function (_super) {
6329
+ __extends(TextAreaOptions, _super);
5947
6330
  function TextAreaOptions() {
5948
- /** to set type of view if TextArea is Vertical or Horizontal */
5949
- this.ViewType = null;
5950
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
5951
- */
5952
- this.CustomValidation = [];
6331
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
5953
6332
  /** to set Direction of TextArea if TextArea is Arabic or English */
5954
- this.ForceDirection = exports.ForceDirection.English;
6333
+ _this.ForceDirection = exports.ForceDirection.English;
6334
+ return _this;
5955
6335
  }
5956
6336
  return TextAreaOptions;
5957
- }());
6337
+ }(ControlOptionsBase));
5958
6338
 
5959
6339
  exports.IconPosition = void 0;
5960
6340
  (function (IconPosition) {
@@ -5962,37 +6342,37 @@
5962
6342
  IconPosition[IconPosition["right"] = 2] = "right";
5963
6343
  })(exports.IconPosition || (exports.IconPosition = {}));
5964
6344
 
5965
- var TextBoxOptions = /** @class */ (function () {
6345
+ var TextBoxOptions = /** @class */ (function (_super) {
6346
+ __extends(TextBoxOptions, _super);
5966
6347
  function TextBoxOptions() {
6348
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
5967
6349
  /** set Range Number to Textbox with type number with From-Value and To-value*/
5968
- this.NumberRange = new RangeNumber();
6350
+ _this.NumberRange = new RangeNumber();
5969
6351
  /**Prevent AutoComplete of textbox*/
5970
- this.AutoComplete = "off";
5971
- /** to set type of view if textbox is Vertical or Horizontal */
5972
- this.ViewType = null;
5973
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
5974
- */
5975
- this.CustomValidation = [];
6352
+ _this.AutoComplete = "off";
5976
6353
  /** to set Direction of textbox if textbox is Arabic or English */
5977
- this.ForceDirection = null;
6354
+ _this.ForceDirection = null;
5978
6355
  /** to set Language of textbox if textbox language is Arabic or English */
5979
- this.LanguageValidation = null;
6356
+ _this.LanguageValidation = null;
5980
6357
  /** Set Type of TextBox ("text","password","email","number") */
5981
- this.Type = exports.InputType.Text;
5982
- this.IconPosition = exports.IconPosition.left;
5983
- this.NoMargin = false;
5984
- this.ValidationRules = [];
6358
+ _this.Type = exports.InputType.Text;
6359
+ _this.IconPosition = exports.IconPosition.left;
6360
+ _this.NoMargin = false;
6361
+ _this.ValidationRules = [];
6362
+ return _this;
5985
6363
  }
5986
6364
  return TextBoxOptions;
5987
- }());
6365
+ }(ControlOptionsBase));
5988
6366
 
5989
- var ToggleSlideOptions = /** @class */ (function () {
6367
+ var ToggleSlideOptions = /** @class */ (function (_super) {
6368
+ __extends(ToggleSlideOptions, _super);
5990
6369
  function ToggleSlideOptions() {
5991
- this.ViewType = null;
5992
- this.ForceDirection = exports.ForceDirection.English;
6370
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
6371
+ _this.ForceDirection = exports.ForceDirection.English;
6372
+ return _this;
5993
6373
  }
5994
6374
  return ToggleSlideOptions;
5995
- }());
6375
+ }(ControlOptionsBase));
5996
6376
 
5997
6377
  var RenderComponentService = /** @class */ (function () {
5998
6378
  function RenderComponentService(componentFactoryResolver) {
@@ -6861,6 +7241,44 @@
6861
7241
  options: [{ type: i0.Input }]
6862
7242
  };
6863
7243
 
7244
+ var BBSFDateTimePipe = /** @class */ (function () {
7245
+ function BBSFDateTimePipe(datePipe) {
7246
+ this.datePipe = datePipe;
7247
+ }
7248
+ BBSFDateTimePipe.prototype.transform = function (value) {
7249
+ var latest_date = this.datePipe.transform(value, 'dd/MM/yyyy hh:mm a');
7250
+ return latest_date;
7251
+ };
7252
+ return BBSFDateTimePipe;
7253
+ }());
7254
+ BBSFDateTimePipe.decorators = [
7255
+ { type: i0.Pipe, args: [{
7256
+ name: 'bbsfDateTime'
7257
+ },] }
7258
+ ];
7259
+ BBSFDateTimePipe.ctorParameters = function () { return [
7260
+ { type: common.DatePipe }
7261
+ ]; };
7262
+
7263
+ var BBSFDatePipe = /** @class */ (function () {
7264
+ function BBSFDatePipe(datePipe) {
7265
+ this.datePipe = datePipe;
7266
+ }
7267
+ BBSFDatePipe.prototype.transform = function (value) {
7268
+ var latest_date = this.datePipe.transform(value, 'dd/MM/yyyy');
7269
+ return latest_date;
7270
+ };
7271
+ return BBSFDatePipe;
7272
+ }());
7273
+ BBSFDatePipe.decorators = [
7274
+ { type: i0.Pipe, args: [{
7275
+ name: 'bbsfDate'
7276
+ },] }
7277
+ ];
7278
+ BBSFDatePipe.ctorParameters = function () { return [
7279
+ { type: common.DatePipe }
7280
+ ]; };
7281
+
6864
7282
  var options;
6865
7283
  exports.AppInjector = void 0;
6866
7284
  angular.FullCalendarModule.registerPlugins([
@@ -6909,7 +7327,9 @@
6909
7327
  RepeaterFieldBuilderComponent,
6910
7328
  NgTemplateNameDirective,
6911
7329
  RepeaterItemFieldComponent,
6912
- RepeaterTableComponent
7330
+ RepeaterTableComponent,
7331
+ BBSFDateTimePipe,
7332
+ BBSFDatePipe
6913
7333
  ],
6914
7334
  imports: [
6915
7335
  common.CommonModule,
@@ -6958,7 +7378,7 @@
6958
7378
  angularNgAutocomplete.AutocompleteLibModule,
6959
7379
  bbsfUtilities.BBSFUtilitiesModule,
6960
7380
  ngInlineSvg.InlineSVGModule.forRoot(),
6961
- ngxSweetalert2.SweetAlert2Module
7381
+ ngxSweetalert2.SweetAlert2Module,
6962
7382
  ],
6963
7383
  providers: [
6964
7384
  ErrorMassageValidation,
@@ -6969,6 +7389,8 @@
6969
7389
  ngBootstrap.NgbModal,
6970
7390
  ngBootstrap.NgbActiveModal,
6971
7391
  common.DatePipe,
7392
+ BBSFDateTimePipe,
7393
+ BBSFDatePipe,
6972
7394
  RenderComponentService,
6973
7395
  { provide: ngPickDatetime.OWL_DATE_TIME_LOCALE, useValue: ɵ0 },
6974
7396
  ],
@@ -7004,7 +7426,9 @@
7004
7426
  RepeaterFieldBuilderComponent,
7005
7427
  NgTemplateNameDirective,
7006
7428
  RepeaterItemFieldComponent,
7007
- RepeaterTableComponent
7429
+ RepeaterTableComponent,
7430
+ BBSFDateTimePipe,
7431
+ BBSFDatePipe
7008
7432
  ]
7009
7433
  },] }
7010
7434
  ];
@@ -7016,7 +7440,7 @@
7016
7440
  // This file can be replaced during build by using the `fileReplacements` array.
7017
7441
  // `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`.
7018
7442
  // The list of file replacements can be found in `angular.json`.
7019
- var environment = Object.assign({}, window.Envirnment);
7443
+ var environment = Object.assign({}, window.Environment);
7020
7444
  /*
7021
7445
  * In development mode, to ignore zone related error stack frames such as
7022
7446
  * `zone.run`, `zoneDelegate.invokeTask` for easier debugging, you can
@@ -7025,6 +7449,20 @@
7025
7449
  */
7026
7450
  // import 'zone.js/dist/zone-error'; // Included with Angular CLI.
7027
7451
 
7452
+ var MultilingualControlOptionsBase = /** @class */ (function () {
7453
+ function MultilingualControlOptionsBase() {
7454
+ /** to set type of view if MultipleLanguageText is Vertical or Horizontal */
7455
+ this.ViewType = null;
7456
+ /**To Set Value To MultipleLanguageText with Object From Type "EnglishArabicDTO" */
7457
+ this.Value = new EnglishArabicDTO();
7458
+ /**To Set LanguageMode To MultipleLanguageText */
7459
+ this.LanguageMode = null;
7460
+ /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage */
7461
+ this.CustomValidation = [];
7462
+ }
7463
+ return MultilingualControlOptionsBase;
7464
+ }());
7465
+
7028
7466
  var CustomValidation = /** @class */ (function () {
7029
7467
  function CustomValidation() {
7030
7468
  }
@@ -7045,24 +7483,18 @@
7045
7483
  return CustomValidator;
7046
7484
  }());
7047
7485
 
7048
- var MultiLingualTextBoxOptions = /** @class */ (function () {
7486
+ var MultiLingualTextBoxOptions = /** @class */ (function (_super) {
7487
+ __extends(MultiLingualTextBoxOptions, _super);
7049
7488
  function MultiLingualTextBoxOptions() {
7050
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
7051
- */
7052
- this.CustomValidation = [];
7053
- /**To Set Value To MultipleLanguageText with Object From Type "EnglishArabicDTO" */
7054
- this.Value = new EnglishArabicDTO();
7055
- /** to set type of view if textbox is Vertical or Horizontal */
7056
- this.ViewType = null;
7057
- /**To Set LanguageMode To MultipleLanguageText */
7058
- this.LanguageMode = null;
7059
- this.IconPositionEN = exports.IconPosition.left;
7060
- this.IconPositionAR = exports.IconPosition.right;
7489
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
7490
+ _this.IconPositionEN = exports.IconPosition.left;
7491
+ _this.IconPositionAR = exports.IconPosition.right;
7061
7492
  /*multi control placement type*/
7062
- this.MultiControlPlacementType = null;
7493
+ _this.MultiControlPlacementType = null;
7494
+ return _this;
7063
7495
  }
7064
7496
  return MultiLingualTextBoxOptions;
7065
- }());
7497
+ }(MultilingualControlOptionsBase));
7066
7498
 
7067
7499
  var Attribute = /** @class */ (function () {
7068
7500
  function Attribute() {
@@ -7070,34 +7502,28 @@
7070
7502
  return Attribute;
7071
7503
  }());
7072
7504
 
7073
- var MultiLingualTextAreaOptions = /** @class */ (function () {
7505
+ var MultiLingualTextAreaOptions = /** @class */ (function (_super) {
7506
+ __extends(MultiLingualTextAreaOptions, _super);
7074
7507
  function MultiLingualTextAreaOptions() {
7075
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
7076
- */
7077
- this.CustomValidation = [];
7078
- /**To Set Value To MultipleLanguageText with Object From Type "EnglishArabicDTO" */
7079
- this.Value = new EnglishArabicDTO();
7080
- /** to set type of view if MultilingualTextArea is Vertical or Horizontal */
7081
- this.ViewType = null;
7082
- /**To Set LanguageMode To MultipleLanguageText */
7083
- this.LanguageMode = null;
7508
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
7084
7509
  /*multi control placement type*/
7085
- this.MultiControlPlacementType = null;
7510
+ _this.MultiControlPlacementType = null;
7511
+ return _this;
7086
7512
  }
7087
7513
  return MultiLingualTextAreaOptions;
7088
- }());
7514
+ }(MultilingualControlOptionsBase));
7089
7515
 
7090
- var CheckBoxOptions = /** @class */ (function () {
7516
+ var CheckBoxOptions = /** @class */ (function (_super) {
7517
+ __extends(CheckBoxOptions, _super);
7091
7518
  function CheckBoxOptions() {
7519
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
7092
7520
  /**To set value to CheckBox */
7093
- this.Value = null;
7094
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
7095
- */
7096
- this.CustomValidation = [];
7097
- this.ForceDirection = exports.ForceDirection.English;
7521
+ _this.Value = null;
7522
+ _this.ForceDirection = exports.ForceDirection.English;
7523
+ return _this;
7098
7524
  }
7099
7525
  return CheckBoxOptions;
7100
- }());
7526
+ }(ControlOptionsBase));
7101
7527
 
7102
7528
  var DropdownListItem = /** @class */ (function () {
7103
7529
  function DropdownListItem() {
@@ -7105,36 +7531,28 @@
7105
7531
  return DropdownListItem;
7106
7532
  }());
7107
7533
 
7108
- var MultiLingualHtmlEditorOptions = /** @class */ (function () {
7534
+ var MultiLingualHtmlEditorOptions = /** @class */ (function (_super) {
7535
+ __extends(MultiLingualHtmlEditorOptions, _super);
7109
7536
  function MultiLingualHtmlEditorOptions() {
7110
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
7111
- */
7112
- this.CustomValidation = [];
7113
- /**To Set Value To MultipleLanguageText with Object From Type "EnglishArabicDTO" */
7114
- this.Value = new EnglishArabicDTO();
7115
- /** to set type of view if MultipleLanguageText is Vertical or Horizontal */
7116
- this.ViewType = null;
7537
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
7117
7538
  /** Set Height For */
7118
- this.Height = 150;
7119
- /**To Set LanguageMode To MultipleLanguageText */
7120
- this.LanguageMode = null;
7539
+ _this.Height = 150;
7540
+ return _this;
7121
7541
  }
7122
7542
  return MultiLingualHtmlEditorOptions;
7123
- }());
7543
+ }(MultilingualControlOptionsBase));
7124
7544
 
7125
- var ProfileImageUploadOptions = /** @class */ (function () {
7545
+ var ProfileImageUploadOptions = /** @class */ (function (_super) {
7546
+ __extends(ProfileImageUploadOptions, _super);
7126
7547
  function ProfileImageUploadOptions() {
7127
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
7128
- */
7129
- this.AllowDropZone = false;
7130
- this.CustomValidation = [];
7131
- /** to set type of view if FileInput is Vertical or Horizontal */
7132
- this.ViewType = null;
7548
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
7549
+ _this.AllowDropZone = false;
7133
7550
  /** Set List of Custom Attribute to FileInput */
7134
- this.ImageUploadAcceptsTypes = [exports.ImageType.ImageTypes];
7551
+ _this.ImageUploadAcceptsTypes = [exports.ImageType.ImageTypes];
7552
+ return _this;
7135
7553
  }
7136
7554
  return ProfileImageUploadOptions;
7137
- }());
7555
+ }(ControlOptionsBase));
7138
7556
 
7139
7557
  var SaveDTO = /** @class */ (function () {
7140
7558
  function SaveDTO() {
@@ -7168,22 +7586,25 @@
7168
7586
  return UploadPersonalImage;
7169
7587
  }());
7170
7588
 
7171
- var CalendarOptions = /** @class */ (function () {
7589
+ var CalendarOptions = /** @class */ (function (_super) {
7590
+ __extends(CalendarOptions, _super);
7172
7591
  function CalendarOptions() {
7592
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
7173
7593
  /** Represent DefaultView Of Calendar*/
7174
- this.DefaultView = exports.CalendarView.Month;
7594
+ _this.DefaultView = exports.CalendarView.Month;
7175
7595
  /** Represent CalendarViews Of Calendar*/
7176
- this.CalendarViews = [exports.CalendarView.Agenda, exports.CalendarView.Daily, exports.CalendarView.Month, exports.CalendarView.Weekly];
7596
+ _this.CalendarViews = [exports.CalendarView.Agenda, exports.CalendarView.Daily, exports.CalendarView.Month, exports.CalendarView.Weekly];
7177
7597
  /** Set Calendar Visible Of Calendar*/
7178
- this.CalendarVisible = true;
7598
+ _this.CalendarVisible = true;
7179
7599
  /** Set DefaultDate Of Calendar*/
7180
- this.DefaultDate = new Date();
7181
- this.Eventeditable = false;
7182
- this.Eventselectable = false;
7183
- this.dayMaxEvents = false;
7600
+ _this.DefaultDate = new Date();
7601
+ _this.Eventeditable = false;
7602
+ _this.Eventselectable = false;
7603
+ _this.dayMaxEvents = false;
7604
+ return _this;
7184
7605
  }
7185
7606
  return CalendarOptions;
7186
- }());
7607
+ }(ControlOptionsBase));
7187
7608
 
7188
7609
  var CalendarEventDTO = /** @class */ (function () {
7189
7610
  function CalendarEventDTO() {
@@ -7191,32 +7612,28 @@
7191
7612
  return CalendarEventDTO;
7192
7613
  }());
7193
7614
 
7194
- var AutocompleteOptions = /** @class */ (function () {
7615
+ var AutocompleteOptions = /** @class */ (function (_super) {
7616
+ __extends(AutocompleteOptions, _super);
7195
7617
  function AutocompleteOptions() {
7196
- /**
7197
- * Represent classes to textbox that allow us to select the AutoComplete by jquery or javascript
7198
- */
7199
- this.ValidationToken = null;
7618
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
7619
+ /**Represent classes to textbox that allow us to select the AutoComplete by jquery or javascript */
7620
+ _this.ValidationToken = null;
7200
7621
  /**To set value to textbox */
7201
- this.Value = null;
7622
+ _this.Value = null;
7202
7623
  /** set Range Number to Textbox with type number with From-Value and To-value*/
7203
- this.NumberRange = new RangeNumber();
7204
- /** to set type of view if textbox is Vertical or Horizontal */
7205
- this.ViewType = null;
7206
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
7207
- */
7208
- this.CustomValidation = [];
7624
+ _this.NumberRange = new RangeNumber();
7209
7625
  /** to set Direction of textbox if textbox is Arabic or English */
7210
- this.ForceDirection = exports.ForceDirection.English;
7626
+ _this.ForceDirection = exports.ForceDirection.English;
7211
7627
  /** allow add value of AutoComplete dosn't exist in list*/
7212
- this.AllowNewSelection = false;
7628
+ _this.AllowNewSelection = false;
7213
7629
  // /**a {key,value} (json) object to include as params for the json call. Each api supports different structure.*/
7214
7630
  // Params: object={};
7215
- this.QueryParam = 'query';
7216
- this.SelectedValue = null;
7631
+ _this.QueryParam = 'query';
7632
+ _this.SelectedValue = null;
7633
+ return _this;
7217
7634
  }
7218
7635
  return AutocompleteOptions;
7219
- }());
7636
+ }(ControlOptionsBase));
7220
7637
 
7221
7638
  var TagsInputDTO = /** @class */ (function () {
7222
7639
  function TagsInputDTO() {
@@ -7224,49 +7641,45 @@
7224
7641
  return TagsInputDTO;
7225
7642
  }());
7226
7643
 
7227
- var TagsInputOptions = /** @class */ (function () {
7644
+ var TagsInputOptions = /** @class */ (function (_super) {
7645
+ __extends(TagsInputOptions, _super);
7228
7646
  function TagsInputOptions() {
7229
- /**To set value to tagsinput */
7230
- this.Value = null;
7231
- /** to set type of view if tagsinput is Vertical or Horizontal */
7232
- this.ViewType = null;
7233
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
7234
- */
7235
- this.CustomValidation = [];
7647
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
7236
7648
  /** to set Direction of tagsinput if tagsinput is Arabic or English */
7237
- this.ForceDirection = exports.ForceDirection.English;
7649
+ _this.ForceDirection = exports.ForceDirection.English;
7238
7650
  /**Remove Last When User Click On Backspace */
7239
- this.RemoveLastOnBackspace = false;
7651
+ _this.RemoveLastOnBackspace = false;
7240
7652
  /** Allow User To Delete Tags */
7241
- this.CanDeleteTags = true;
7653
+ _this.CanDeleteTags = true;
7242
7654
  /** Allow User To Add Tags */
7243
- this.CanAddTags = true;
7655
+ _this.CanAddTags = true;
7244
7656
  /** Set Max Number Of Tags That User Can Be Select */
7245
- this.MaxNumberTags = 100;
7657
+ _this.MaxNumberTags = 100;
7246
7658
  /** Set Min Length Of Char To Call Search Function */
7247
- this.MinSearchLength = 1;
7659
+ _this.MinSearchLength = 1;
7248
7660
  /**Allow Scrolle Option In Dropdown */
7249
- this.ScrollableOptions = true;
7661
+ _this.ScrollableOptions = true;
7250
7662
  /** Set Max Number Of Tags That will Be Appear ON Dropdown */
7251
- this.MaxSearchResultsCount = 5;
7663
+ _this.MaxSearchResultsCount = 5;
7252
7664
  /**Value Name Of Tag Option In Dropdown */
7253
- this.DatasourceItemValue = "key";
7665
+ _this.DatasourceItemValue = "key";
7254
7666
  /**Text Of Tag That Will Show In Dropdown */
7255
- this.DatasourceItemText = "value";
7667
+ _this.DatasourceItemText = "value";
7256
7668
  /**Text Show when none of the given options match the entered text */
7257
- this.NoResultText = "No Item Matches";
7669
+ _this.NoResultText = "No Item Matches";
7258
7670
  /**Set Query Param Name By Default It's 'query'*/
7259
- this.QueryParamName = "query";
7671
+ _this.QueryParamName = "query";
7260
7672
  /**Set Query Param Name By Default It's 'query'*/
7261
- this.SelectedItemsParamName = "SelectedItems";
7673
+ _this.SelectedItemsParamName = "SelectedItems";
7262
7674
  /**Set Filter Param Name By Default It's 'query'*/
7263
- this.FilterParamName = "";
7675
+ _this.FilterParamName = "";
7264
7676
  /** allow add value of TagInput dosn't exist in list*/
7265
- this.AllowNewSelection = false;
7266
- this.ValidationToken = null;
7677
+ _this.AllowNewSelection = false;
7678
+ _this.ValidationToken = null;
7679
+ return _this;
7267
7680
  }
7268
7681
  return TagsInputOptions;
7269
- }());
7682
+ }(ControlOptionsBase));
7270
7683
 
7271
7684
  var FilterItem = /** @class */ (function () {
7272
7685
  function FilterItem() {
@@ -7320,15 +7733,13 @@
7320
7733
  return PagingOptions;
7321
7734
  }());
7322
7735
 
7323
- var RadioButtonOptions = /** @class */ (function () {
7736
+ var RadioButtonOptions = /** @class */ (function (_super) {
7737
+ __extends(RadioButtonOptions, _super);
7324
7738
  function RadioButtonOptions() {
7325
- this.ViewType = null;
7326
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
7327
- */
7328
- this.CustomValidation = [];
7739
+ return _super !== null && _super.apply(this, arguments) || this;
7329
7740
  }
7330
7741
  return RadioButtonOptions;
7331
- }());
7742
+ }(ControlOptionsBase));
7332
7743
 
7333
7744
  var RadioButtonItem = /** @class */ (function () {
7334
7745
  function RadioButtonItem() {
@@ -7409,7 +7820,6 @@
7409
7820
 
7410
7821
  var RepeaterOptions = /** @class */ (function () {
7411
7822
  function RepeaterOptions() {
7412
- this.MinRequiredItems = 1;
7413
7823
  this.ActionLabelKey = "";
7414
7824
  this.AddButtonText = "Add";
7415
7825
  this.DeleteButtonText = "Delete";
@@ -7747,6 +8157,8 @@
7747
8157
  exports.AutocompleteOptions = AutocompleteOptions;
7748
8158
  exports.AutocompleteTextBoxComponent = AutocompleteTextBoxComponent;
7749
8159
  exports.BBSFControlsModule = BBSFControlsModule;
8160
+ exports.BBSFDatePipe = BBSFDatePipe;
8161
+ exports.BBSFDateTimePipe = BBSFDateTimePipe;
7750
8162
  exports.CalendarComponent = CalendarComponent;
7751
8163
  exports.CalendarEventDTO = CalendarEventDTO;
7752
8164
  exports.CalendarOptions = CalendarOptions;
@@ -7755,6 +8167,7 @@
7755
8167
  exports.CheckBoxOptions = CheckBoxOptions;
7756
8168
  exports.ConfirmationModalComponent = ConfirmationModalComponent;
7757
8169
  exports.ConfirmationModalOptions = ConfirmationModalOptions;
8170
+ exports.ControlOptionsBase = ControlOptionsBase;
7758
8171
  exports.ControlUtility = ControlUtility;
7759
8172
  exports.CustomValidation = CustomValidation;
7760
8173
  exports.CustomValidator = CustomValidator;
@@ -7787,6 +8200,7 @@
7787
8200
  exports.MultiLingualTextAreaOptions = MultiLingualTextAreaOptions;
7788
8201
  exports.MultiLingualTextBoxComponent = MultiLingualTextBoxComponent;
7789
8202
  exports.MultiLingualTextBoxOptions = MultiLingualTextBoxOptions;
8203
+ exports.MultilingualControlOptionsBase = MultilingualControlOptionsBase;
7790
8204
  exports.MultipleFileUploadModel = MultipleFileUploadModel;
7791
8205
  exports.NgTemplateNameDirective = NgTemplateNameDirective;
7792
8206
  exports.OnPagingFiltersChangeService = OnPagingFiltersChangeService;