@bnsights/bbsf-controls 1.0.33 → 1.0.36

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 (82) hide show
  1. package/README.md +14 -0
  2. package/bnsights-bbsf-controls-1.0.36.tgz +0 -0
  3. package/bnsights-bbsf-controls.metadata.json +1 -1
  4. package/bundles/bnsights-bbsf-controls.umd.js +383 -245
  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/TagsInputOptions.js +4 -9
  23. package/esm2015/lib/Shared/Models/TextAreaOptions.js +4 -7
  24. package/esm2015/lib/Shared/Models/TextBoxOptions.js +4 -7
  25. package/esm2015/lib/Shared/Models/ToggleslideOptions.js +4 -3
  26. package/esm2015/lib/Shared/Models/datePickerOptions.js +4 -8
  27. package/esm2015/lib/Shared/Pipes/bbsf-date-time.pipe.js +20 -0
  28. package/esm2015/lib/Shared/Pipes/bbsf-date.pipe.js +20 -0
  29. package/esm2015/lib/Shared/services/ControlUtility.js +17 -4
  30. package/esm2015/lib/controls/AutocompleteTextBox/AutocompleteTextBox.component.js +6 -2
  31. package/esm2015/lib/controls/CheckBox/CheckBox.component.js +5 -1
  32. package/esm2015/lib/controls/DateTimePicker/DateTimePicker.component.js +6 -2
  33. package/esm2015/lib/controls/DropdownList/DropdownList.component.js +6 -2
  34. package/esm2015/lib/controls/FileUplaod/FileUplaod.component.js +6 -2
  35. package/esm2015/lib/controls/HtmlEditor/HtmlEditor.component.js +6 -2
  36. package/esm2015/lib/controls/ImageUpload/ImageUpload.component.js +6 -2
  37. package/esm2015/lib/controls/MapAutoComplete/MapAutoComplete.component.js +5 -1
  38. package/esm2015/lib/controls/MultiLingualHtmlEditor/MultiLingualHtmlEditor.component.js +14 -4
  39. package/esm2015/lib/controls/MultiLingualTextArea/MultiLingualTextArea.component.js +12 -4
  40. package/esm2015/lib/controls/MultiLingualTextBox/MultiLingualTextBox.component.js +11 -3
  41. package/esm2015/lib/controls/Paging/JwPagination.component.js +3 -1
  42. package/esm2015/lib/controls/Paging/Paging.component.js +1 -1
  43. package/esm2015/lib/controls/Phone/Phone.component.js +6 -2
  44. package/esm2015/lib/controls/ProfileImageUploader/ProfileImageUploader.component.js +6 -2
  45. package/esm2015/lib/controls/RadioButton/RadioButton.component.js +6 -2
  46. package/esm2015/lib/controls/TagsInput/TagsInput.component.js +6 -2
  47. package/esm2015/lib/controls/TextArea/TextArea.component.js +6 -3
  48. package/esm2015/lib/controls/TextBox/TextBox.component.js +14 -6
  49. package/esm2015/lib/controls/Toggleslide/toggleslide.component.js +14 -3
  50. package/esm2015/lib/controls/bbsf-controls.module.js +14 -4
  51. package/esm2015/public-api.js +5 -1
  52. package/fesm2015/bnsights-bbsf-controls.js +247 -159
  53. package/fesm2015/bnsights-bbsf-controls.js.map +1 -1
  54. package/lib/Shared/Models/AutocompleteOptions.d.ts +3 -40
  55. package/lib/Shared/Models/CalendarOptions.d.ts +2 -8
  56. package/lib/Shared/Models/CheckBoxOptions.d.ts +2 -33
  57. package/lib/Shared/Models/ControlOptionsBase.d.ts +40 -0
  58. package/lib/Shared/Models/DropdownOptions.d.ts +2 -39
  59. package/lib/Shared/Models/FileUploadOptions.d.ts +2 -39
  60. package/lib/Shared/Models/HtmlEditorOptions.d.ts +2 -37
  61. package/lib/Shared/Models/ImageUploadOptions.d.ts +2 -38
  62. package/lib/Shared/Models/MapAutoCompleteOptions.d.ts +2 -40
  63. package/lib/Shared/Models/MultiLingualHtmlEditorOptions.d.ts +2 -77
  64. package/lib/Shared/Models/MultiLingualTextAreaOptions.d.ts +2 -76
  65. package/lib/Shared/Models/MultilingualControlOptionsBase.d.ts +71 -0
  66. package/lib/Shared/Models/MultilingualTextBoxOptions.d.ts +2 -76
  67. package/lib/Shared/Models/PhoneOptions.d.ts +2 -38
  68. package/lib/Shared/Models/ProfileImageUploadOptions.d.ts +2 -38
  69. package/lib/Shared/Models/RadioButtonOptions.d.ts +3 -39
  70. package/lib/Shared/Models/TagsInputOptions.d.ts +4 -43
  71. package/lib/Shared/Models/TextAreaOptions.d.ts +4 -42
  72. package/lib/Shared/Models/TextBoxOptions.d.ts +3 -41
  73. package/lib/Shared/Models/ToggleslideOptions.d.ts +3 -30
  74. package/lib/Shared/Models/datePickerOptions.d.ts +2 -40
  75. package/lib/Shared/Pipes/bbsf-date-time.pipe.d.ts +7 -0
  76. package/lib/Shared/Pipes/bbsf-date.pipe.d.ts +7 -0
  77. package/lib/Shared/services/ControlUtility.d.ts +4 -2
  78. package/lib/controls/Toggleslide/toggleslide.component.d.ts +3 -1
  79. package/package.json +3 -2
  80. package/public-api.d.ts +4 -0
  81. package/src/lib/assets/Style.css +2 -2
  82. package/bnsights-bbsf-controls-1.0.33.tgz +0 -0
@@ -4,7 +4,7 @@ import timeGridPlugin from '@fullcalendar/timegrid';
4
4
  import listPlugin from '@fullcalendar/list';
5
5
  import interactionPlugin from '@fullcalendar/interaction';
6
6
  import * as i0 from '@angular/core';
7
- import { Injectable, Optional, EventEmitter, Component, Input, Output, ViewChild, NgZone, Directive, TemplateRef, ViewChildren, ComponentFactoryResolver, ViewContainerRef, NgModule, NO_ERRORS_SCHEMA, Injector } from '@angular/core';
7
+ import { Injectable, Optional, EventEmitter, Component, Input, Output, ViewChild, NgZone, Directive, TemplateRef, ViewChildren, ComponentFactoryResolver, ViewContainerRef, Pipe, NgModule, NO_ERRORS_SCHEMA, Injector } from '@angular/core';
8
8
  import { BlockUIModule } from 'ng-block-ui';
9
9
  import { ControlContainer, Validators, FormControl, FormGroupDirective, FormGroup, ReactiveFormsModule, FormsModule } from '@angular/forms';
10
10
  import { Http, HttpModule } from '@angular/http';
@@ -45,6 +45,7 @@ import ArLocale from '@fullcalendar/core/locales/ar';
45
45
  import { TypeaheadModule } from 'ngx-bootstrap/typeahead';
46
46
  import { MatSlideToggleModule } from '@angular/material/slide-toggle';
47
47
  import { AngularEditorModule } from '@kolkov/angular-editor';
48
+ import { AutocompleteLibModule } from 'angular-ng-autocomplete';
48
49
  import { InlineSVGModule } from 'ng-inline-svg';
49
50
  import Swal from 'sweetalert2';
50
51
  import { SweetAlert2Module } from '@sweetalert2/ngx-sweetalert2';
@@ -192,9 +193,10 @@ var InputType;
192
193
  })(InputType || (InputType = {}));
193
194
 
194
195
  class ControlUtility {
195
- constructor(ErrorHandler, controlValidationService) {
196
+ constructor(ErrorHandler, controlValidationService, utilityService) {
196
197
  this.ErrorHandler = ErrorHandler;
197
198
  this.controlValidationService = controlValidationService;
199
+ this.utilityService = utilityService;
198
200
  }
199
201
  getErrorValidation(Errorsitem, CustomValidation) {
200
202
  let resulte = '';
@@ -226,8 +228,19 @@ class ControlUtility {
226
228
  return valid ? null : error;
227
229
  };
228
230
  }
231
+ patchControlValue(originalValue, PatchFunction, PatchPath) {
232
+ var patchOp = [{
233
+ op: "replace",
234
+ path: PatchPath,
235
+ value: originalValue
236
+ }];
237
+ var patchService = PatchFunction.call(null, patchOp);
238
+ patchService.subscribe(r => console.log(r), erorr => this.utilityService.notifyErrorMessage(erorr));
239
+ }
229
240
  arabicValidator(error) {
230
241
  return (control) => {
242
+ if (!control.value)
243
+ return null;
231
244
  if (control.value.match('[\u0600-\u06FF]')) {
232
245
  if (control.value.match('[A-Za-z]') != null) {
233
246
  //FOUND ENGLISH CHARS
@@ -334,7 +347,8 @@ ControlUtility.decorators = [
334
347
  ];
335
348
  ControlUtility.ctorParameters = () => [
336
349
  { type: ErrorMassageValidation },
337
- { type: ControlValidationService }
350
+ { type: ControlValidationService },
351
+ { type: UtilityService }
338
352
  ];
339
353
 
340
354
  var PickerType;
@@ -527,7 +541,11 @@ class DateInputComponent {
527
541
  }
528
542
  this.DatePickerFormControl.setValue(DateValue);
529
543
  this.onChangeService.ChangeValue(this.options.Name);
530
- this.OnChange.emit(DateValue);
544
+ let originalValue = DateValue;
545
+ if (this.options.PatchFunction && this.options.PatchPath && this.group.get(this.options.Name).valid) {
546
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
547
+ }
548
+ this.OnChange.emit(originalValue);
531
549
  }
532
550
  subscribeDateChanges() {
533
551
  const startDateChanges = this.comparedControl.valueChanges;
@@ -860,7 +878,11 @@ class FileUploadComponent {
860
878
  this.group.get(this.options.Name).setValue(this.multipleFileUploadModel);
861
879
  }
862
880
  };
863
- this.OnChange.emit(this.group.get(this.options.Name).value);
881
+ let originalValue = this.group.get(this.options.Name).value;
882
+ if (this.options.PatchFunction && this.options.PatchPath && this.group.get(this.options.Name).valid) {
883
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
884
+ }
885
+ this.OnChange.emit(originalValue);
864
886
  }
865
887
  }
866
888
  }
@@ -1198,13 +1220,21 @@ class MultiLingualTextBoxComponent {
1198
1220
  trimControlValue(type) {
1199
1221
  const whitespace = ' ';
1200
1222
  if (type == "En") {
1223
+ let originalValue = this.EnglishFormControl.value;
1224
+ if (this.options.PatchFunction && this.options.PatchPath && this.EnglishFormControl.valid) {
1225
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
1226
+ }
1201
1227
  if (this.EnglishFormControl.value.startsWith(whitespace) || this.EnglishFormControl.value.endsWith(whitespace)) {
1202
- this.EnglishFormControl.patchValue(this.EnglishFormControl.value.trim());
1228
+ this.EnglishFormControl.patchValue(originalValue);
1203
1229
  }
1204
1230
  }
1205
1231
  if (type == "Ar") {
1232
+ let originalValue = this.ArabicFormControl.value;
1233
+ if (this.options.PatchFunction && this.options.PatchPath && this.ArabicFormControl.valid) {
1234
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
1235
+ }
1206
1236
  if (this.ArabicFormControl.value.startsWith(whitespace) || this.ArabicFormControl.value.endsWith(whitespace)) {
1207
- this.ArabicFormControl.patchValue(this.ArabicFormControl.value.trim());
1237
+ this.ArabicFormControl.patchValue(originalValue);
1208
1238
  }
1209
1239
  }
1210
1240
  }
@@ -1432,8 +1462,11 @@ class TextAreaComponent {
1432
1462
  return this.controlUtility.getInputType(type);
1433
1463
  }
1434
1464
  trimControlValue() {
1435
- let OrignalValue = this.controlUtility.trimControlValue(this.TextAreaFormControl.value);
1436
- this.TextAreaFormControl.patchValue(OrignalValue);
1465
+ let originalValue = this.controlUtility.trimControlValue(this.TextAreaFormControl.value);
1466
+ this.TextAreaFormControl.patchValue(originalValue);
1467
+ if (this.options.PatchFunction && this.options.PatchPath && this.TextAreaFormControl.valid) {
1468
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
1469
+ }
1437
1470
  }
1438
1471
  copyInputMessage(inputElement) {
1439
1472
  this.controlUtility.CopyInputMessage(inputElement);
@@ -1774,13 +1807,21 @@ class MultiLingualTextAreaComponent {
1774
1807
  trimControlValue(type) {
1775
1808
  const whitespace = ' ';
1776
1809
  if (type == "En") {
1810
+ let originalValue = this.EnglishTextAreaFormControl.value;
1811
+ if (this.options.PatchFunction && this.options.PatchPath && this.EnglishTextAreaFormControl.valid) {
1812
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
1813
+ }
1777
1814
  if (this.EnglishTextAreaFormControl.value.startsWith(whitespace) || this.EnglishTextAreaFormControl.value.endsWith(whitespace)) {
1778
- this.EnglishTextAreaFormControl.patchValue(this.EnglishTextAreaFormControl.value.trim());
1815
+ this.EnglishTextAreaFormControl.patchValue(originalValue);
1779
1816
  }
1780
1817
  }
1781
1818
  if (type == "Ar") {
1819
+ let originalValue = this.ArabicTextAreaFormControl.value;
1820
+ if (this.options.PatchFunction && this.options.PatchPath && this.ArabicTextAreaFormControl.valid) {
1821
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
1822
+ }
1782
1823
  if (this.ArabicTextAreaFormControl.value.startsWith(whitespace) || this.ArabicTextAreaFormControl.value.endsWith(whitespace)) {
1783
- this.ArabicTextAreaFormControl.patchValue(this.ArabicTextAreaFormControl.value.trim());
1824
+ this.ArabicTextAreaFormControl.patchValue(originalValue);
1784
1825
  }
1785
1826
  }
1786
1827
  }
@@ -1886,7 +1927,7 @@ MultiLingualTextAreaComponent.controlContainerstatic = null;
1886
1927
  MultiLingualTextAreaComponent.decorators = [
1887
1928
  { type: Component, args: [{
1888
1929
  selector: 'BBSF-MultiLingualTextArea',
1889
- 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.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)=\"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",
1930
+ template: "<div class=\"b-control b-multilangual-textarea\">\r\n <div class=\"form-group validate is-invalid\" [formGroup]=\"group\">\r\n\r\n <div class=\"form-group row\" [formGroup]=\"MultiLanguageTextAreagroup\">\r\n <div [ngClass]=\"(options.MultiControlPlacementType==1)?'col-md-12':'col-md-6'\">\r\n <div class=\"row\" *ngIf=\"ShowEngishTextArea\">\r\n <label class=\"b-label col-form-label col-sm-12 \"\r\n [ngClass]=\"(options.ViewType==1)?'col-md-9':'col-md-3'\" [hidden]=\"options.IsHideEnglishLabel\">\r\n {{(options.EnglishLabelValue!=null&&options.EnglishLabelValue!=\"\")?options.EnglishLabelValue:options.LabelValue+\"in English\"}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\"\r\n class=\"text-danger Required-text\" aria-required=\"true\">*</span>\r\n </label>\r\n\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n <div class=\"input-group\">\r\n <textarea class=\"form-control bnsights-control\" rows=\"{{options.Rows}}\" cols=\"{{options.Cols}}\"\r\n (focus)=\"onEnglishFocus(true)\" (focusout)=\"onEnglishFocus(false)\"\r\n maxlength=\"{{options.MaxLength}}\" minlength=\"{{options.MinLength}}\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n formControlName=\"English\" [hidden]=\"options.IsHideEnglishFields\"\r\n [class.is-invalid]=\"EnglishTextAreaFormControl.invalid && EnglishTextAreaFormControl.touched\"\r\n placeholder=\"{{options.EnglishPlaceholder}}\" (change)=\"trimControlValue('En')\"\r\n (keyup)=\"onTextChange()\"\r\n (keydown)=\"EnglishWordCountArray>options.MaxWordCount&&$event.keyCode !=8?$event.preventDefault():null\"\r\n #userinputTextAreaEnglish>\r\n </textarea>\r\n <div class=\"input-group-append\" [hidden]=\"options.IsHideEnglishFields\" *ngIf=\"options.EnableCopyToClipboard\">\r\n <span class=\"input-group-text\" (click)=\"copyInputMessage(userinputTextAreaEnglish)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>\r\n </div>\r\n\r\n\r\n </div>\r\n <div class=\"text-muted font-weight-500 float-end word-count\" *ngIf=\"options.MaxWordCount>0&&IsShowEnglishWordCount\">{{EnglishWordCount}}/{{options.MaxWordCount}}</div>\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(EnglishTextAreaFormControl.invalid && EnglishTextAreaFormControl.touched)\">\r\n {{getErrorValidation(EnglishTextAreaFormControl.errors|keyvalue)}}\r\n </div>\r\n <div *ngIf=\"showEnglishCharsLimitMsg\">\r\n <span class=\"badge b-character-warning float-end\" [ngClass]=\"{'badge-light-warning': englishCharsLimitMsgClass === 'warning', 'badge-light-danger' : englishCharsLimitMsgClass === 'danger' }\">\r\n {{englishMaxLimitWarningMsg}}\r\n </span>\r\n </div>\r\n <div class=\"control-desc\" *ngIf=\"(options.LabelDescription!=null&&options.LabelDescription!='') ||(options.EnglishLabelDescription!=null&&options.EnglishLabelDescription!='')\">\r\n {{(options.EnglishLabelDescription!=null&&options.EnglishLabelDescription!=\"\")?options.EnglishLabelDescription:options.LabelDescription}}\r\n </div>\r\n\r\n <!-- <div *ngIf=\"EnglishTextAreaFormControl.valid\">{{resetError()}}</div> -->\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n\r\n\r\n </div>\r\n </div>\r\n </div>\r\n <div [ngClass]=\"(options.MultiControlPlacementType==1)?'col-md-12':'col-md-6'\">\r\n <div class=\"row\" *ngIf=\"ShowArabicTextArea\">\r\n\r\n <label class=\"b-label col-form-label col-sm-12 \"\r\n [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\" [hidden]=\"options.IsHideArabicLabel\">\r\n {{(options.ArabicLabelValue!=null&&options.ArabicLabelValue!=\"\")?options.ArabicLabelValue:options.LabelValue+\"in Arabic\"}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\"\r\n class=\"text-danger Required-text\" aria-required=\"true\">*</span>\r\n </label>\r\n <div class=\" col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n <div class=\"input-group\">\r\n <textarea class=\"form-control bnsights-control\" dir=\"rtl\" rows=\"{{options.Rows}}\" cols=\"{{options.Cols}}\"\r\n (focus)=\"onArabicFocus(true)\" (focusout)=\"onArabicFocus(false)\"\r\n [hidden]=\"options.IsHideArabicFields\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n formControlName=\"Arabic\" rows=\"{{options.Rows}}\"\r\n maxlength=\"{{options.MaxLength}}\" minlength=\"{{options.MinLength}}\"\r\n [class.is-invalid]=\"ArabicTextAreaFormControl.invalid && ArabicTextAreaFormControl.touched\"\r\n placeholder=\"{{options.ArabicPlaceholder}}\" (change)=\"trimControlValue('Ar')\"\r\n (keyup)=\"onTextChange()\"\r\n (keydown)=\"ArabicWordCountArray>options.MaxWordCount&&$event.keyCode !=8?$event.preventDefault():null\"\r\n #userinputTextAreaArabic>\r\n </textarea>\r\n <div class=\"input-group-append\" [hidden]=\"options.IsHideArabicFields\" *ngIf=\"options.EnableCopyToClipboard\">\r\n <span class=\"input-group-text\" (click)=\"copyInputMessage(userinputTextAreaArabic)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"text-muted font-weight-500 float-end word-count\" *ngIf=\"options.MaxWordCount>0&&IsShowArabicWordCount\">{{ArabicWordCount}}/{{options.MaxWordCount}}</div>\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(ArabicTextAreaFormControl.invalid && ArabicTextAreaFormControl.touched)\">\r\n {{getErrorValidation(ArabicTextAreaFormControl.errors|keyvalue)}}\r\n </div>\r\n <div *ngIf=\"showArabicCharsLimitMsg\">\r\n <span class=\"badge b-character-warning float-end\" [ngClass]=\"{'badge-light-warning': arabicCharsLimitMsgClass === 'warning', 'badge-light-danger' : arabicCharsLimitMsgClass === 'danger' }\">\r\n {{arabicMaxLimitWarningMsg}}\r\n </span>\r\n </div>\r\n <div class=\"control-desc\" *ngIf=\"(options.LabelDescription!=null&&options.LabelDescription!='')||(options.ArabicLabelDescription!=null&&options.ArabicLabelDescription!='')\">\r\n {{(options.ArabicLabelDescription!=null&&options.ArabicLabelDescription!=\"\")?options.ArabicLabelDescription:options.LabelDescription}}\r\n </div>\r\n <!-- <div *ngIf=\"ArabicTextAreaFormControl.valid\">{{resetError()}}</div> -->\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n",
1890
1931
  styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}\n"]
1891
1932
  },] }
1892
1933
  ];
@@ -1986,6 +2027,10 @@ class CheckBoxComponent {
1986
2027
  }
1987
2028
  onValueChanged() {
1988
2029
  this.OnChange.emit(this.CheckBoxFormControl.value);
2030
+ let originalValue = this.CheckBoxFormControl.value;
2031
+ if (this.options.PatchFunction && this.options.PatchPath && this.group.get(this.options.Name).valid) {
2032
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
2033
+ }
1989
2034
  }
1990
2035
  }
1991
2036
  CheckBoxComponent.controlContainerstatic = null;
@@ -2121,7 +2166,11 @@ class DropdownListComponent {
2121
2166
  }
2122
2167
  onItemSelect(item) {
2123
2168
  this.onChangeService.ChangeValue(this.options.Name);
2124
- this.OnChange.emit(item);
2169
+ let originalValue = item;
2170
+ if (this.options.PatchFunction && this.options.PatchPath && this.group.get(this.options.Name).valid) {
2171
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
2172
+ }
2173
+ this.OnChange.emit(originalValue);
2125
2174
  //console.log(this.DropdownListFormControl.value)
2126
2175
  }
2127
2176
  Clear() {
@@ -2265,7 +2314,11 @@ class PhoneComponent {
2265
2314
  }
2266
2315
  onValueChanged() {
2267
2316
  let Number = this.PhoneFormControl.value.internationalNumber;
2268
- this.OnChange.emit(Number.trim());
2317
+ let originalValue = this.controlUtility.trimControlValue(Number);
2318
+ if (this.options.PatchFunction && this.options.PatchPath && this.group.get(this.options.Name).valid) {
2319
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
2320
+ }
2321
+ this.OnChange.emit(originalValue);
2269
2322
  }
2270
2323
  }
2271
2324
  PhoneComponent.controlContainerstatic = null;
@@ -2302,6 +2355,7 @@ class ToggleslideComponent {
2302
2355
  this.globalSettings = globalSettings;
2303
2356
  this.OnChange = new EventEmitter();
2304
2357
  this.SlideValue = false;
2358
+ this.markAllAsTouched = false;
2305
2359
  ToggleslideComponent.controlContainerstatic = this.controlContainer;
2306
2360
  }
2307
2361
  ngOnInit() {
@@ -2329,12 +2383,22 @@ class ToggleslideComponent {
2329
2383
  resetError() {
2330
2384
  this.controlValidationService.RemoveGlobalError();
2331
2385
  }
2332
- getErrorValidation(Errorsitem) {
2333
- return this.controlUtility.getErrorValidation(Errorsitem, this.options.CustomValidation);
2386
+ showGlobalError() {
2387
+ this.controlUtility.showGlobalError();
2388
+ }
2389
+ getErrorValidation(ErrorList) {
2390
+ if (this.markAllAsTouched && this.group.invalid) {
2391
+ this.showGlobalError();
2392
+ this.markAllAsTouched = false;
2393
+ }
2394
+ return this.controlUtility.getErrorValidationMassage(ErrorList, this.group, this.options);
2334
2395
  }
2335
2396
  changeValueToggle() {
2336
2397
  this.OnChange.emit(this.SlideValue);
2337
2398
  this.ToggleslideFormControl.setValue(this.SlideValue);
2399
+ if (this.options.PatchFunction && this.options.PatchPath && this.ToggleslideFormControl.valid) {
2400
+ this.controlUtility.patchControlValue(this.SlideValue, this.options.PatchFunction, this.options.PatchPath);
2401
+ }
2338
2402
  }
2339
2403
  }
2340
2404
  ToggleslideComponent.controlContainerstatic = null;
@@ -2538,7 +2602,11 @@ class HtmlEditorComponent {
2538
2602
  }
2539
2603
  onValueChanged() {
2540
2604
  this.HtmlEditorFormControl.setValue(this.HtmlEditorFormControl.value.trim());
2541
- this.OnChange.emit(this.HtmlEditorFormControl.value);
2605
+ let originalValue = this.controlUtility.trimControlValue(this.HtmlEditorFormControl.value);
2606
+ if (this.options.PatchFunction && this.options.PatchPath && this.HtmlEditorFormControl.valid) {
2607
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
2608
+ }
2609
+ this.OnChange.emit(originalValue);
2542
2610
  }
2543
2611
  }
2544
2612
  HtmlEditorComponent.controlContainerstatic = null;
@@ -2823,8 +2891,13 @@ class MultiLingualHtmlEditorComponent {
2823
2891
  if (type == "en") {
2824
2892
  this.MultilingualHtmlEditorgroup.controls["English"].setValue(this.MultilingualHtmlEditorgroup.controls["English"].value.trim());
2825
2893
  this.englishValue = this.MultilingualHtmlEditorgroup.controls["English"].value == null ? "" : this.MultilingualHtmlEditorgroup.controls["English"].value;
2826
- if (this.englishValue)
2894
+ if (this.englishValue) {
2827
2895
  this.EnglishHtmlEditorFormControl.setValue(this.englishValue);
2896
+ let originalValue = this.englishValue;
2897
+ if (this.options.PatchFunction && this.options.PatchPath && this.EnglishHtmlEditorFormControl.valid) {
2898
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
2899
+ }
2900
+ }
2828
2901
  let EngliswordCountArray = this.EnglishHtmlEditorFormControl.value.split(" ").length;
2829
2902
  if (EngliswordCountArray > 0) {
2830
2903
  if (EngliswordCountArray > this.options.MaxWordCount)
@@ -2836,8 +2909,13 @@ class MultiLingualHtmlEditorComponent {
2836
2909
  if (type == "ar") {
2837
2910
  this.MultilingualHtmlEditorgroup.controls["Arabic"].setValue(this.MultilingualHtmlEditorgroup.controls["Arabic"].value.trim());
2838
2911
  this.arabicValue = this.MultilingualHtmlEditorgroup.controls["Arabic"].value == null ? "" : this.MultilingualHtmlEditorgroup.controls["Arabic"].value;
2839
- if (this.arabicValue)
2912
+ if (this.arabicValue) {
2840
2913
  this.ArabicHtmlEditorFormControl.setValue(this.arabicValue);
2914
+ let originalValue = this.arabicValue;
2915
+ if (this.options.PatchFunction && this.options.PatchPath && this.ArabicHtmlEditorFormControl.valid) {
2916
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
2917
+ }
2918
+ }
2841
2919
  let ArabicwordCountArray = this.ArabicHtmlEditorFormControl.value.split(" ").length;
2842
2920
  if (ArabicwordCountArray > 0) {
2843
2921
  if (ArabicwordCountArray > this.options.MaxWordCount)
@@ -2942,7 +3020,7 @@ MultiLingualHtmlEditorComponent.controlContainerstatic = null;
2942
3020
  MultiLingualHtmlEditorComponent.decorators = [
2943
3021
  { type: Component, args: [{
2944
3022
  selector: 'BBSF-MultiLingualHtmlEditor',
2945
- 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",
3023
+ template: "<div class=\"b-control b-multilangual-html-editor\">\r\n <div class=\"form-group validate is-invalid\" [formGroup]=\"group\">\r\n\r\n <div class=\"form-group row\" [formGroup]=\"MultilingualHtmlEditorgroup\">\r\n <div class=\"col-lg-6\">\r\n <div class=\"row\" *ngIf=\"ShowEnglishHtmlEditor\">\r\n <label class=\"b-label col-form-label col-sm-12 \" \r\n [ngClass]=\"(options.ViewType==1)?'col-md-9':'col-md-3'\"\r\n [hidden]=\"options.IsHideEnglishLabel\">\r\n {{(options.EnglishLabelValue!=null&&options.EnglishLabelValue!=\"\")?options.EnglishLabelValue:options.LabelValue+\"in English\"}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\"\r\n class=\"text-danger Required-text\" aria-required=\"true\">*</span>\r\n </label>\r\n\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n \r\n <angular-editor class=\"form-control bnsights-control {{options.ExtraClasses_EN}} \" (change)=\"onTextChange('en')\" [class.is-invalid]=\"EnglishHtmlEditorFormControl.invalid && EnglishHtmlEditorFormControl.touched\"\r\n formControlName=\"English\" [config]=\"editorEnglishConfig\"></angular-editor>\r\n\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(EnglishHtmlEditorFormControl.invalid && EnglishHtmlEditorFormControl.touched)\">\r\n {{getErrorValidation(EnglishHtmlEditorFormControl.errors|keyvalue)}}\r\n </div>\r\n\r\n <div class=\"d-flex justify-content-between align-items-center\">\r\n <div class=\"control-desc text-dark\">\r\n {{(options.EnglishLabelDescription!=null&&options.EnglishLabelDescription!=\"\")?options.EnglishLabelDescription:options.LabelDescription}}\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-lg-6\">\r\n <div class=\"row\" *ngIf=\"ShowArabicHtmlEditor\">\r\n\r\n <label class=\"b-label col-form-label col-sm-12 \"\r\n [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\"\r\n [hidden]=\"options.IsHideArabicLabel\">\r\n {{(options.ArabicLabelValue!=null&&options.ArabicLabelValue!=\"\")?options.ArabicLabelValue:options.LabelValue+\"in Arabic\"}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\"\r\n class=\"text-danger Required-text\" aria-required=\"true\">*</span>\r\n </label>\r\n <div class=\" col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n \r\n\r\n <angular-editor dir=\"rtl\" class=\"form-control bnsights-control {{options.ExtraClasses_AR}} \" (change)=\"onTextChange('ar')\" [class.is-invalid]=\"ArabicHtmlEditorFormControl.invalid && ArabicHtmlEditorFormControl.touched\"\r\n formControlName=\"Arabic\" [config]=\"editorArabicConfig\"></angular-editor>\r\n\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(ArabicHtmlEditorFormControl.invalid && ArabicHtmlEditorFormControl.touched)\">\r\n {{getErrorValidation(ArabicHtmlEditorFormControl.errors|keyvalue)}}\r\n </div>\r\n\r\n \r\n\r\n <div class=\"d-flex justify-content-between align-items-center\">\r\n <div class=\"control-desc text-dark\">\r\n {{(options.ArabicLabelDescription!=null&&options.ArabicLabelDescription!=\"\")?options.ArabicLabelDescription:options.LabelDescription}}\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n </div>\r\n\r\n\r\n\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n </div>\r\n\r\n</div>\r\n",
2946
3024
  styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}\n"]
2947
3025
  },] }
2948
3026
  ];
@@ -3176,7 +3254,11 @@ class ImageUploaderComponent {
3176
3254
  this.files = [];
3177
3255
  this.files.push(...event.addedFiles);
3178
3256
  }
3179
- this.OnChange.emit(this.ImageUploadFormControl.value);
3257
+ let originalValue = this.ImageUploadFormControl.value;
3258
+ if (this.options.PatchFunction && this.options.PatchPath && this.ImageUploadFormControl.valid) {
3259
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
3260
+ }
3261
+ this.OnChange.emit(originalValue);
3180
3262
  };
3181
3263
  }
3182
3264
  }
@@ -3454,7 +3536,11 @@ class ProfileImageUploaderComponent {
3454
3536
  reader.onload = () => {
3455
3537
  this.imageUrl = reader.result.toString();
3456
3538
  this.openModal(true);
3457
- this.OnChange.emit(this.group.get(this.options.Name).value);
3539
+ let originalValue = this.group.get(this.options.Name).value;
3540
+ if (this.options.PatchFunction && this.options.PatchPath && this.group.get(this.options.Name).valid) {
3541
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
3542
+ }
3543
+ this.OnChange.emit(originalValue);
3458
3544
  };
3459
3545
  }
3460
3546
  }
@@ -3784,6 +3870,10 @@ class AutocompleteTextBoxComponent {
3784
3870
  else {
3785
3871
  this.AutocompleteTextBoxControl.setValue(item);
3786
3872
  this.AutocompleteTextBoxControl.updateValueAndValidity();
3873
+ let originalValue = this.AutocompleteTextBoxControl.value;
3874
+ if (this.options.PatchFunction && this.options.PatchPath && this.group.get(this.options.Name).valid) {
3875
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
3876
+ }
3787
3877
  this.OnChange.emit(this.AutocompleteTextBoxControl.value);
3788
3878
  }
3789
3879
  }
@@ -3813,7 +3903,7 @@ AutocompleteTextBoxComponent.decorators = [
3813
3903
  { type: Component, args: [{
3814
3904
  // tslint:disable-next-line: component-selector
3815
3905
  selector: 'BBSF-AutocompleteTextBox',
3816
- 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",
3906
+ template: "<div class=\"b-control b-auto-complete-textbox\">\r\n <div class=\"form-group row validate is-invalid\" [formGroup]=\"group\">\r\n\r\n <label class=\"b-label col-form-label col-sm-12 \" [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\"\r\n [hidden]=\"options.HideLabel\">\r\n {{options.LabelValue}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\" class=\"text-danger Required-text\"\r\n aria-required=\"true\">*</span>\r\n </label>\r\n\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n\r\n <!-- <input \r\n[(ngModel)]=\"Search\"\r\n value=\"{{Search}}\" \r\n autocomplete=\"off\"\r\n class=\"form-control bnsights-control {{options.ExtraClasses}}\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\" formControlName=\"{{options.Name}}\"\r\n [class.is-invalid]=\"AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched\"\r\n typeaheadOptionField=\"{{Value}}\"\r\n [typeahead]=\"suggestions$\"\r\n [typeaheadAsync]=\"true\"\r\n placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\" (typeaheadOnSelect)=\"handleResultSelected($event)\" (blur)=\"onBlur($event.target.value)\" /> -->\r\n <!-- \r\n <input ngxTypeahead autocomplete=\"off\"\r\n value=\"{{Search}}\"\r\n class=\"form-control bnsights-control {{options.ExtraClasses}}\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\" formControlName=\"{{options.Name}}\"\r\n [class.is-invalid]=\"AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched\"\r\n placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\" [taUrl]=\"options.ActionURL\"\r\n [taParams]=\"options.Params\" taQueryParam=\"{{QueryParam}}\" taApi=\"{{Api}}\" taListItemLabel=\"{{Value}}\" (taSelected)=\"handleResultSelected($event)\"> -->\r\n\r\n\r\n\r\n <ng-autocomplete *ngIf=\"!options.AllowNewSelection\" [data]=\"dataList\" [initialValue]=\"SelectedValue\"\r\n [searchKeyword]=\"keyword\" placeholder=\"{{options.Placeholder}}\" (selected)='selectEvent($event)'\r\n (inputChanged)='onChangeSearch($event)' historyIdentifier=\"dataList\" [itemTemplate]=\"itemTemplate\"\r\n [notFoundTemplate]=\"notFoundTemplate\" class=\"form-control bnsights-control {{options.ExtraClasses}}\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\" formControlName=\"{{options.Name}}\" aria-describedby=\"email-error\"\r\n aria-invalid=\"true\"\r\n [class.is-invalid]=\"AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched\">\r\n </ng-autocomplete>\r\n\r\n <ng-autocomplete *ngIf=\"options.AllowNewSelection\" [data]=\"dataList\" [initialValue]=\"SelectedValue\"\r\n [searchKeyword]=\"keyword\" placeholder=\"{{options.Placeholder}}\" (selected)='selectEvent($event)'\r\n (inputChanged)='onChangeSearch($event)' historyIdentifier=\"dataList\" [itemTemplate]=\"itemTemplate\"\r\n class=\"form-control bnsights-control {{options.ExtraClasses}}\" dir=\"{{options.ForceDirection==2?'rtl':''}}\"\r\n formControlName=\"{{options.Name}}\" aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n [class.is-invalid]=\"AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched\">\r\n </ng-autocomplete>\r\n\r\n\r\n\r\n <ng-template #itemTemplate let-item>\r\n <a [innerHTML]=\"item.value\"></a>\r\n </ng-template>\r\n\r\n <ng-template #notFoundTemplate let-notFound>\r\n <div [innerHTML]=\"notFound\"></div>\r\n </ng-template>\r\n\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched)\">\r\n {{getErrorValidation(AutocompleteTextBoxControl.errors|keyvalue)}}\r\n </div>\r\n\r\n <div class=\"d-flex justify-content-between align-items-center\">\r\n <div class=\"control-desc text-dark\">{{options.LabelDescription}}</div>\r\n </div>\r\n\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">\r\n {{resetError()}}</div>\r\n\r\n </div>\r\n </div>\r\n</div>",
3817
3907
  styles: [""]
3818
3908
  },] }
3819
3909
  ];
@@ -3996,7 +4086,11 @@ class TagsInputComponent {
3996
4086
  this.TagsFormControl.invalid;
3997
4087
  }
3998
4088
  }
3999
- this.OnChange.emit(this.TagsFormControl.value);
4089
+ let originalValue = this.TagsFormControl.value;
4090
+ if (this.options.PatchFunction && this.options.PatchPath && this.TagsFormControl.valid) {
4091
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
4092
+ }
4093
+ this.OnChange.emit(originalValue);
4000
4094
  }
4001
4095
  onNoOptionsMatch(event) {
4002
4096
  this.IsNoMatch = event;
@@ -4300,6 +4394,8 @@ class JwPaginationComponent {
4300
4394
  }
4301
4395
  }
4302
4396
  ngOnChanges(changes) {
4397
+ if (changes.items.firstChange)
4398
+ return;
4303
4399
  // reset page if items array has changed
4304
4400
  if (changes.items.currentValue !== changes.items.previousValue) {
4305
4401
  this.setPage(this.initialPage);
@@ -4482,7 +4578,11 @@ class RadioButtonComponent {
4482
4578
  return this.controlUtility.getErrorValidationMassage(ErrorList, this.group, this.options);
4483
4579
  }
4484
4580
  onValueChanged() {
4485
- this.OnChange.emit(this.RadioButtonFormControl.value);
4581
+ let originalValue = this.RadioButtonFormControl.value;
4582
+ if (this.options.PatchFunction && this.options.PatchPath && this.RadioButtonFormControl.valid) {
4583
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
4584
+ }
4585
+ this.OnChange.emit(originalValue);
4486
4586
  }
4487
4587
  }
4488
4588
  RadioButtonComponent.controlContainerstatic = null;
@@ -4578,6 +4678,9 @@ class TextboxComponent {
4578
4678
  if (this.options.LabelKey != null && this.options.LabelKey != "")
4579
4679
  this.options.LabelValue = this.UtilityService.getResourceValue(this.options.LabelKey);
4580
4680
  this.getCustomErrorsMassages();
4681
+ if (this.options.IsRequired) {
4682
+ this.validationRules.push(Validators.required);
4683
+ }
4581
4684
  switch (this.options.Type) {
4582
4685
  case InputType.Email:
4583
4686
  this.validationRules.push(Validators.compose([
@@ -4640,9 +4743,6 @@ class TextboxComponent {
4640
4743
  this.options.MaxLengthWarningLimit = this.globalSettings.MaxLengthWarningLimit;
4641
4744
  this.minCharsLimit = this.options.MaxLength - this.options.MaxLengthWarningLimit;
4642
4745
  }
4643
- if (this.options.IsRequired) {
4644
- this.validationRules.push(Validators.required);
4645
- }
4646
4746
  this.TextBoxFormControl.setValidators(this.validationRules);
4647
4747
  this.TextBoxFormControl.setAsyncValidators(this.validationRulesasync);
4648
4748
  if (this.options.IsDisabled) {
@@ -4671,8 +4771,11 @@ class TextboxComponent {
4671
4771
  return this.controlUtility.getInputType(type);
4672
4772
  }
4673
4773
  trimControlValue() {
4674
- let OrignalValue = this.controlUtility.trimControlValue(this.TextBoxFormControl.value);
4675
- this.TextBoxFormControl.patchValue(OrignalValue);
4774
+ let originalValue = this.controlUtility.trimControlValue(this.TextBoxFormControl.value);
4775
+ this.TextBoxFormControl.patchValue(originalValue);
4776
+ if (this.options.PatchFunction && this.options.PatchPath && this.TextBoxFormControl.valid) {
4777
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
4778
+ }
4676
4779
  }
4677
4780
  copyInputMessage(inputElement) {
4678
4781
  this.controlUtility.CopyInputMessage(inputElement);
@@ -4688,6 +4791,11 @@ class TextboxComponent {
4688
4791
  this.EnglishLetterOnly = this.UtilityService.getResourceValue("EnglishLetterOnly");
4689
4792
  }
4690
4793
  onTextChange() {
4794
+ if (this.options.Type == InputType.Number)
4795
+ if (!this.TextBoxFormControl.value) {
4796
+ this.TextBoxFormControl.setErrors({ IntegerNumberValidationKey: "" });
4797
+ return;
4798
+ }
4691
4799
  if (this.TextBoxFormControl.value == "") {
4692
4800
  this.WordCountArray = 0;
4693
4801
  this.WordCount = 0;
@@ -5001,6 +5109,10 @@ class MapAutoCompleteComponent {
5001
5109
  this.MapAutoCompleteModel.Longitude = location.longitude;
5002
5110
  this.MapAutoCompleteFormControl.setValue(null);
5003
5111
  this.MapAutoCompleteFormControl.setValue(this.MapAutoCompleteModel);
5112
+ let originalValue = this.MapAutoCompleteFormControl.value;
5113
+ if (this.options.PatchFunction && this.options.PatchPath && this.MapAutoCompleteFormControl.valid) {
5114
+ this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
5115
+ }
5004
5116
  }
5005
5117
  GermanAddressMapped(result) {
5006
5118
  this.MapAutoCompleteModel == new MapAutocompleteDTO();
@@ -5620,13 +5732,18 @@ var ForceDirection;
5620
5732
  ForceDirection[ForceDirection["Arabic"] = 2] = "Arabic";
5621
5733
  })(ForceDirection || (ForceDirection = {}));
5622
5734
 
5623
- class DatePickerOptions {
5735
+ class ControlOptionsBase {
5624
5736
  constructor() {
5625
- /** to set type of view if DatePicker is Vertical or Horizontal */
5626
- this.ViewType = ControlLayout.Vertical;
5627
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
5628
- */
5737
+ /** to set type of view if Control is Vertical or Horizontal */
5738
+ this.ViewType = null;
5739
+ /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage */
5629
5740
  this.CustomValidation = [];
5741
+ }
5742
+ }
5743
+
5744
+ class DatePickerOptions extends ControlOptionsBase {
5745
+ constructor() {
5746
+ super(...arguments);
5630
5747
  /**To set First Day Of Week to DatePicker */
5631
5748
  this.FirstDayOfWeek = 1;
5632
5749
  /**To set PickerType to DatePicker is Calendar or Timer Or Both */
@@ -5641,14 +5758,11 @@ class DatePickerOptions {
5641
5758
  }
5642
5759
  }
5643
5760
 
5644
- class DropdownOptions {
5761
+ class DropdownOptions extends ControlOptionsBase {
5645
5762
  constructor() {
5763
+ super(...arguments);
5646
5764
  /** Disable Bootstrap DropdownList */
5647
5765
  this.DisableBootstrapSelect = false;
5648
- /** to set type of view if DropdownList is Vertical or Horizontal */
5649
- this.ViewType = null;
5650
- /** To Set Custom Validation*/
5651
- this.CustomValidation = [];
5652
5766
  /** Set key for item in DropdownList */
5653
5767
  this.ItemTempletkey = "key";
5654
5768
  /** Set value for item in DropdownList */
@@ -5657,27 +5771,19 @@ class DropdownOptions {
5657
5771
  }
5658
5772
  }
5659
5773
 
5660
- class FileUploadOptions {
5774
+ class FileUploadOptions extends ControlOptionsBase {
5661
5775
  constructor() {
5776
+ super(...arguments);
5662
5777
  /** Ability to set FileInput required */
5663
5778
  this.IsMultipleFile = false;
5664
5779
  /** Sets boolean Value to Show IsDropZone Or Not */
5665
5780
  this.IsDropZone = false;
5666
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
5667
- */
5668
- this.CustomValidation = [];
5669
- /** to set type of view if textbox is Vertical or Horizontal */
5670
- this.ViewType = null;
5671
5781
  }
5672
5782
  }
5673
5783
 
5674
- class HtmlEditorOptions {
5784
+ class HtmlEditorOptions extends ControlOptionsBase {
5675
5785
  constructor() {
5676
- /** to set type of view if textbox is Vertical or Horizontal */
5677
- this.ViewType = null;
5678
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
5679
- */
5680
- this.CustomValidation = [];
5786
+ super(...arguments);
5681
5787
  /** to set Direction of HtmlEditor if HtmlEditor is Arabic or English */
5682
5788
  this.ForceDirection = ForceDirection.English;
5683
5789
  /** Set Height For */
@@ -5695,45 +5801,26 @@ var ImageType;
5695
5801
  ImageType["None"] = "";
5696
5802
  })(ImageType || (ImageType = {}));
5697
5803
 
5698
- class ImageUploadOptions {
5804
+ class ImageUploadOptions extends ControlOptionsBase {
5699
5805
  constructor() {
5806
+ super(...arguments);
5700
5807
  /** Allow to Upload Multiple File */
5701
5808
  this.IsMultiple = false;
5702
5809
  /** Allow to Use Drop Zone */
5703
5810
  this.AllowDropZone = false;
5704
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
5705
- */
5706
- this.CustomValidation = [];
5707
- /** to set type of view if FileInput is Vertical or Horizontal */
5708
- this.ViewType = null;
5709
5811
  /** Set List of Custom Attribute to FileInput */
5710
5812
  this.FileUploadAcceptsTypes = [ImageType.ImageTypes];
5711
5813
  }
5712
5814
  }
5713
5815
 
5714
- class MapAutoCompleteOptions {
5715
- constructor() {
5716
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
5717
- */
5718
- this.CustomValidation = [];
5719
- /** to set type of view if MapAutoComplete is Vertical or Horizontal */
5720
- this.ViewType = null;
5721
- }
5816
+ class MapAutoCompleteOptions extends ControlOptionsBase {
5722
5817
  }
5723
5818
 
5724
- class PhoneOptions {
5819
+ class PhoneOptions extends ControlOptionsBase {
5725
5820
  constructor() {
5726
- /**
5727
- * Represent Css classes to Phonebox
5728
- */
5729
- this.ExtraClasses = "form-control bnsights-control";
5730
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
5731
- */
5732
- this.CustomValidation = [];
5821
+ super(...arguments);
5733
5822
  /**Set List Of Countries As Preferred Countries*/
5734
5823
  this.PreferredCountries = [];
5735
- /** to set type of view if Phonebox is Vertical or Horizontal */
5736
- this.ViewType = null;
5737
5824
  this.ForceDirection = ForceDirection.English;
5738
5825
  }
5739
5826
  }
@@ -5741,13 +5828,9 @@ class PhoneOptions {
5741
5828
  class RangeNumber {
5742
5829
  }
5743
5830
 
5744
- class TextAreaOptions {
5831
+ class TextAreaOptions extends ControlOptionsBase {
5745
5832
  constructor() {
5746
- /** to set type of view if TextArea is Vertical or Horizontal */
5747
- this.ViewType = null;
5748
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
5749
- */
5750
- this.CustomValidation = [];
5833
+ super(...arguments);
5751
5834
  /** to set Direction of TextArea if TextArea is Arabic or English */
5752
5835
  this.ForceDirection = ForceDirection.English;
5753
5836
  }
@@ -5759,17 +5842,13 @@ var IconPosition;
5759
5842
  IconPosition[IconPosition["right"] = 2] = "right";
5760
5843
  })(IconPosition || (IconPosition = {}));
5761
5844
 
5762
- class TextBoxOptions {
5845
+ class TextBoxOptions extends ControlOptionsBase {
5763
5846
  constructor() {
5847
+ super(...arguments);
5764
5848
  /** set Range Number to Textbox with type number with From-Value and To-value*/
5765
5849
  this.NumberRange = new RangeNumber();
5766
5850
  /**Prevent AutoComplete of textbox*/
5767
5851
  this.AutoComplete = "off";
5768
- /** to set type of view if textbox is Vertical or Horizontal */
5769
- this.ViewType = null;
5770
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
5771
- */
5772
- this.CustomValidation = [];
5773
5852
  /** to set Direction of textbox if textbox is Arabic or English */
5774
5853
  this.ForceDirection = null;
5775
5854
  /** to set Language of textbox if textbox language is Arabic or English */
@@ -5782,9 +5861,9 @@ class TextBoxOptions {
5782
5861
  }
5783
5862
  }
5784
5863
 
5785
- class ToggleSlideOptions {
5864
+ class ToggleSlideOptions extends ControlOptionsBase {
5786
5865
  constructor() {
5787
- this.ViewType = null;
5866
+ super(...arguments);
5788
5867
  this.ForceDirection = ForceDirection.English;
5789
5868
  }
5790
5869
  }
@@ -6643,6 +6722,42 @@ RepeaterTableComponent.propDecorators = {
6643
6722
  options: [{ type: Input }]
6644
6723
  };
6645
6724
 
6725
+ class BBSFDateTimePipe {
6726
+ constructor(datePipe) {
6727
+ this.datePipe = datePipe;
6728
+ }
6729
+ transform(value) {
6730
+ let latest_date = this.datePipe.transform(value, 'dd/MM/yyyy hh:mm a');
6731
+ return latest_date;
6732
+ }
6733
+ }
6734
+ BBSFDateTimePipe.decorators = [
6735
+ { type: Pipe, args: [{
6736
+ name: 'bbsfDateTime'
6737
+ },] }
6738
+ ];
6739
+ BBSFDateTimePipe.ctorParameters = () => [
6740
+ { type: DatePipe }
6741
+ ];
6742
+
6743
+ class BBSFDatePipe {
6744
+ constructor(datePipe) {
6745
+ this.datePipe = datePipe;
6746
+ }
6747
+ transform(value) {
6748
+ let latest_date = this.datePipe.transform(value, 'dd/MM/yyyy');
6749
+ return latest_date;
6750
+ }
6751
+ }
6752
+ BBSFDatePipe.decorators = [
6753
+ { type: Pipe, args: [{
6754
+ name: 'bbsfDate'
6755
+ },] }
6756
+ ];
6757
+ BBSFDatePipe.ctorParameters = () => [
6758
+ { type: DatePipe }
6759
+ ];
6760
+
6646
6761
  let options;
6647
6762
  let AppInjector;
6648
6763
  FullCalendarModule.registerPlugins([
@@ -6690,7 +6805,9 @@ BBSFControlsModule.decorators = [
6690
6805
  RepeaterFieldBuilderComponent,
6691
6806
  NgTemplateNameDirective,
6692
6807
  RepeaterItemFieldComponent,
6693
- RepeaterTableComponent
6808
+ RepeaterTableComponent,
6809
+ BBSFDateTimePipe,
6810
+ BBSFDatePipe
6694
6811
  ],
6695
6812
  imports: [
6696
6813
  CommonModule,
@@ -6736,9 +6853,10 @@ BBSFControlsModule.decorators = [
6736
6853
  FullCalendarModule,
6737
6854
  TypeaheadModule.forRoot(),
6738
6855
  AngularEditorModule,
6856
+ AutocompleteLibModule,
6739
6857
  BBSFUtilitiesModule,
6740
6858
  InlineSVGModule.forRoot(),
6741
- SweetAlert2Module
6859
+ SweetAlert2Module,
6742
6860
  ],
6743
6861
  providers: [
6744
6862
  ErrorMassageValidation,
@@ -6749,6 +6867,8 @@ BBSFControlsModule.decorators = [
6749
6867
  NgbModal,
6750
6868
  NgbActiveModal,
6751
6869
  DatePipe,
6870
+ BBSFDateTimePipe,
6871
+ BBSFDatePipe,
6752
6872
  RenderComponentService,
6753
6873
  { provide: OWL_DATE_TIME_LOCALE, useValue: ɵ0 },
6754
6874
  ],
@@ -6784,7 +6904,9 @@ BBSFControlsModule.decorators = [
6784
6904
  RepeaterFieldBuilderComponent,
6785
6905
  NgTemplateNameDirective,
6786
6906
  RepeaterItemFieldComponent,
6787
- RepeaterTableComponent
6907
+ RepeaterTableComponent,
6908
+ BBSFDateTimePipe,
6909
+ BBSFDatePipe
6788
6910
  ]
6789
6911
  },] }
6790
6912
  ];
@@ -6805,6 +6927,19 @@ const environment = Object.assign({}, window.Environment);
6805
6927
  */
6806
6928
  // import 'zone.js/dist/zone-error'; // Included with Angular CLI.
6807
6929
 
6930
+ class MultilingualControlOptionsBase {
6931
+ constructor() {
6932
+ /** to set type of view if MultipleLanguageText is Vertical or Horizontal */
6933
+ this.ViewType = null;
6934
+ /**To Set Value To MultipleLanguageText with Object From Type "EnglishArabicDTO" */
6935
+ this.Value = new EnglishArabicDTO();
6936
+ /**To Set LanguageMode To MultipleLanguageText */
6937
+ this.LanguageMode = null;
6938
+ /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage */
6939
+ this.CustomValidation = [];
6940
+ }
6941
+ }
6942
+
6808
6943
  class CustomValidation {
6809
6944
  }
6810
6945
  class CustomValidator {
@@ -6819,17 +6954,9 @@ class CustomValidator {
6819
6954
  }
6820
6955
  }
6821
6956
 
6822
- class MultiLingualTextBoxOptions {
6957
+ class MultiLingualTextBoxOptions extends MultilingualControlOptionsBase {
6823
6958
  constructor() {
6824
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
6825
- */
6826
- this.CustomValidation = [];
6827
- /**To Set Value To MultipleLanguageText with Object From Type "EnglishArabicDTO" */
6828
- this.Value = new EnglishArabicDTO();
6829
- /** to set type of view if textbox is Vertical or Horizontal */
6830
- this.ViewType = null;
6831
- /**To Set LanguageMode To MultipleLanguageText */
6832
- this.LanguageMode = null;
6959
+ super(...arguments);
6833
6960
  this.IconPositionEN = IconPosition.left;
6834
6961
  this.IconPositionAR = IconPosition.right;
6835
6962
  /*multi control placement type*/
@@ -6840,29 +6967,19 @@ class MultiLingualTextBoxOptions {
6840
6967
  class Attribute {
6841
6968
  }
6842
6969
 
6843
- class MultiLingualTextAreaOptions {
6970
+ class MultiLingualTextAreaOptions extends MultilingualControlOptionsBase {
6844
6971
  constructor() {
6845
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
6846
- */
6847
- this.CustomValidation = [];
6848
- /**To Set Value To MultipleLanguageText with Object From Type "EnglishArabicDTO" */
6849
- this.Value = new EnglishArabicDTO();
6850
- /** to set type of view if MultilingualTextArea is Vertical or Horizontal */
6851
- this.ViewType = null;
6852
- /**To Set LanguageMode To MultipleLanguageText */
6853
- this.LanguageMode = null;
6972
+ super(...arguments);
6854
6973
  /*multi control placement type*/
6855
6974
  this.MultiControlPlacementType = null;
6856
6975
  }
6857
6976
  }
6858
6977
 
6859
- class CheckBoxOptions {
6978
+ class CheckBoxOptions extends ControlOptionsBase {
6860
6979
  constructor() {
6980
+ super(...arguments);
6861
6981
  /**To set value to CheckBox */
6862
6982
  this.Value = null;
6863
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
6864
- */
6865
- this.CustomValidation = [];
6866
6983
  this.ForceDirection = ForceDirection.English;
6867
6984
  }
6868
6985
  }
@@ -6870,30 +6987,18 @@ class CheckBoxOptions {
6870
6987
  class DropdownListItem {
6871
6988
  }
6872
6989
 
6873
- class MultiLingualHtmlEditorOptions {
6990
+ class MultiLingualHtmlEditorOptions extends MultilingualControlOptionsBase {
6874
6991
  constructor() {
6875
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
6876
- */
6877
- this.CustomValidation = [];
6878
- /**To Set Value To MultipleLanguageText with Object From Type "EnglishArabicDTO" */
6879
- this.Value = new EnglishArabicDTO();
6880
- /** to set type of view if MultipleLanguageText is Vertical or Horizontal */
6881
- this.ViewType = null;
6992
+ super(...arguments);
6882
6993
  /** Set Height For */
6883
6994
  this.Height = 150;
6884
- /**To Set LanguageMode To MultipleLanguageText */
6885
- this.LanguageMode = null;
6886
6995
  }
6887
6996
  }
6888
6997
 
6889
- class ProfileImageUploadOptions {
6998
+ class ProfileImageUploadOptions extends ControlOptionsBase {
6890
6999
  constructor() {
6891
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
6892
- */
7000
+ super(...arguments);
6893
7001
  this.AllowDropZone = false;
6894
- this.CustomValidation = [];
6895
- /** to set type of view if FileInput is Vertical or Horizontal */
6896
- this.ViewType = null;
6897
7002
  /** Set List of Custom Attribute to FileInput */
6898
7003
  this.ImageUploadAcceptsTypes = [ImageType.ImageTypes];
6899
7004
  }
@@ -6927,8 +7032,9 @@ class UploadPersonalImage {
6927
7032
  }
6928
7033
  }
6929
7034
 
6930
- class CalendarOptions {
7035
+ class CalendarOptions extends ControlOptionsBase {
6931
7036
  constructor() {
7037
+ super(...arguments);
6932
7038
  /** Represent DefaultView Of Calendar*/
6933
7039
  this.DefaultView = CalendarView.Month;
6934
7040
  /** Represent CalendarViews Of Calendar*/
@@ -6946,21 +7052,15 @@ class CalendarOptions {
6946
7052
  class CalendarEventDTO {
6947
7053
  }
6948
7054
 
6949
- class AutocompleteOptions {
7055
+ class AutocompleteOptions extends ControlOptionsBase {
6950
7056
  constructor() {
6951
- /**
6952
- * Represent classes to textbox that allow us to select the AutoComplete by jquery or javascript
6953
- */
7057
+ super(...arguments);
7058
+ /**Represent classes to textbox that allow us to select the AutoComplete by jquery or javascript */
6954
7059
  this.ValidationToken = null;
6955
7060
  /**To set value to textbox */
6956
7061
  this.Value = null;
6957
7062
  /** set Range Number to Textbox with type number with From-Value and To-value*/
6958
7063
  this.NumberRange = new RangeNumber();
6959
- /** to set type of view if textbox is Vertical or Horizontal */
6960
- this.ViewType = null;
6961
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
6962
- */
6963
- this.CustomValidation = [];
6964
7064
  /** to set Direction of textbox if textbox is Arabic or English */
6965
7065
  this.ForceDirection = ForceDirection.English;
6966
7066
  /** allow add value of AutoComplete dosn't exist in list*/
@@ -6975,15 +7075,9 @@ class AutocompleteOptions {
6975
7075
  class TagsInputDTO {
6976
7076
  }
6977
7077
 
6978
- class TagsInputOptions {
7078
+ class TagsInputOptions extends ControlOptionsBase {
6979
7079
  constructor() {
6980
- /**To set value to tagsinput */
6981
- this.Value = null;
6982
- /** to set type of view if tagsinput is Vertical or Horizontal */
6983
- this.ViewType = null;
6984
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
6985
- */
6986
- this.CustomValidation = [];
7080
+ super(...arguments);
6987
7081
  /** to set Direction of tagsinput if tagsinput is Arabic or English */
6988
7082
  this.ForceDirection = ForceDirection.English;
6989
7083
  /**Remove Last When User Click On Backspace */
@@ -7068,13 +7162,7 @@ class PagingOptions {
7068
7162
  }
7069
7163
  }
7070
7164
 
7071
- class RadioButtonOptions {
7072
- constructor() {
7073
- this.ViewType = null;
7074
- /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
7075
- */
7076
- this.CustomValidation = [];
7077
- }
7165
+ class RadioButtonOptions extends ControlOptionsBase {
7078
7166
  }
7079
7167
 
7080
7168
  class RadioButtonItem {
@@ -7479,5 +7567,5 @@ var FileType;
7479
7567
  * Generated bundle index. Do not edit.
7480
7568
  */
7481
7569
 
7482
- export { AppInjector, Attribute, AutocompleteDTO, AutocompleteOptions, AutocompleteTextBoxComponent, BBSFControlsModule, CalendarComponent, CalendarEventDTO, CalendarOptions, CalendarView, CancelDTO, CheckBoxComponent, CheckBoxOptions, ConfirmationModalComponent, ConfirmationModalOptions, ControlLayout, ControlUtility, Country, CustomValidation, CustomValidator, DataType, DateInputComponent, DatePickerOptions, DropdownListComponent, DropdownListItem, DropdownOptions, EditPersonalImage, EnglishArabicDTO, ErrorMassageValidation, FileType, FileUploadComponent, FileUploadModel, FileUploadOptions, FilterItem, FilterType, FontSize, ForceDirection, FormComponent, FormOptions, GlobalSettings, HtmlEditorComponent, HtmlEditorOptions, IconPosition, ImageType, ImageUploadOptions, ImageUploaderComponent, InputType, Insert, JwPaginationComponent, LanguageMode, LanguageType, LanguageValidation, MapAutoCompleteComponent, MapAutoCompleteOptions, MapAutocompleteDTO, MenuListType, Misc, MultiLingualHtmlEditorComponent, MultiLingualHtmlEditorOptions, MultiLingualTextAreaComponent, MultiLingualTextAreaOptions, MultiLingualTextBoxComponent, MultiLingualTextBoxOptions, MultipleFileUploadModel, NgTemplateNameDirective, OnPagingFiltersChangeService, PagingActionMode, PagingComponent, PagingDTO, PagingOptions, Para, PermissionSets, PhoneComponent, PhoneOptions, PickerType, ProfileImageUploadOptions, ProfileImageUploaderComponent, ProfilePictureDTO, PropertyLocation, RadioButtonComponent, RadioButtonItem, RadioButtonOptions, RangeNumber, RenderComponentService, RepeaterComponent, RepeaterField, RepeaterFieldBuilderComponent, RepeaterItemFieldComponent, RepeaterOptions, RepeaterTableComponent, SaveDTO, SelectMode, StartView, Style, StyleConfirmationMode, TagsInputComponent, TagsInputDTO, TagsInputOptions, TextAreaComponent, TextAreaOptions, TextBoxOptions, TextboxComponent, ToggleSlideOptions, ToggleslideComponent, UploadPersonalImage, environment, options, ɵ0 };
7570
+ export { AppInjector, Attribute, AutocompleteDTO, AutocompleteOptions, AutocompleteTextBoxComponent, BBSFControlsModule, BBSFDatePipe, BBSFDateTimePipe, CalendarComponent, CalendarEventDTO, CalendarOptions, CalendarView, CancelDTO, CheckBoxComponent, CheckBoxOptions, ConfirmationModalComponent, ConfirmationModalOptions, ControlLayout, ControlOptionsBase, ControlUtility, Country, CustomValidation, CustomValidator, DataType, DateInputComponent, DatePickerOptions, DropdownListComponent, DropdownListItem, DropdownOptions, EditPersonalImage, EnglishArabicDTO, ErrorMassageValidation, FileType, FileUploadComponent, FileUploadModel, FileUploadOptions, FilterItem, FilterType, FontSize, ForceDirection, FormComponent, FormOptions, GlobalSettings, HtmlEditorComponent, HtmlEditorOptions, IconPosition, ImageType, ImageUploadOptions, ImageUploaderComponent, InputType, Insert, JwPaginationComponent, LanguageMode, LanguageType, LanguageValidation, MapAutoCompleteComponent, MapAutoCompleteOptions, MapAutocompleteDTO, MenuListType, Misc, MultiLingualHtmlEditorComponent, MultiLingualHtmlEditorOptions, MultiLingualTextAreaComponent, MultiLingualTextAreaOptions, MultiLingualTextBoxComponent, MultiLingualTextBoxOptions, MultilingualControlOptionsBase, MultipleFileUploadModel, NgTemplateNameDirective, OnPagingFiltersChangeService, PagingActionMode, PagingComponent, PagingDTO, PagingOptions, Para, PermissionSets, PhoneComponent, PhoneOptions, PickerType, ProfileImageUploadOptions, ProfileImageUploaderComponent, ProfilePictureDTO, PropertyLocation, RadioButtonComponent, RadioButtonItem, RadioButtonOptions, RangeNumber, RenderComponentService, RepeaterComponent, RepeaterField, RepeaterFieldBuilderComponent, RepeaterItemFieldComponent, RepeaterOptions, RepeaterTableComponent, SaveDTO, SelectMode, StartView, Style, StyleConfirmationMode, TagsInputComponent, TagsInputDTO, TagsInputOptions, TextAreaComponent, TextAreaOptions, TextBoxOptions, TextboxComponent, ToggleSlideOptions, ToggleslideComponent, UploadPersonalImage, environment, options, ɵ0 };
7483
7571
  //# sourceMappingURL=bnsights-bbsf-controls.js.map