@bnsights/bbsf-controls 1.0.90 → 1.0.92

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.
@@ -799,7 +799,10 @@
799
799
  }
800
800
  DateInputComponent.prototype.ngOnInit = function () {
801
801
  var _this = this;
802
- this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
802
+ if (this.options.ForceDirection)
803
+ this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
804
+ else
805
+ this.textDir = localStorage.getItem('language') == 'ar' ? 'rtl' : 'ltr';
803
806
  if (this.options.StartView == 3)
804
807
  this.startView = 'multi-year';
805
808
  else {
@@ -875,7 +878,7 @@
875
878
  if (!item)
876
879
  return;
877
880
  var DateValue;
878
- var tzoffset = (new Date()).getTimezoneOffset() * 60000; //offset in milliseconds
881
+ var tzoffset = (new Date()).getTimezoneOffset() * 60000; //offset in milliseconds
879
882
  if (this.options.SelectMode == 2) {
880
883
  for (var index = 0; index < item.value.length; index++) {
881
884
  item.value[index] = new Date(item.value[index] - tzoffset).toISOString().slice(0, -1);
@@ -914,7 +917,7 @@
914
917
  DateInputComponent.decorators = [
915
918
  { type: i0.Component, args: [{
916
919
  selector: 'BBSF-DateTimePicker',
917
- template: "\r\n<div class=\"form-group bbsf-control bbsf-datetime-picker\" [formGroup]=\"group\">\r\n <div [ngClass]=\"(options.ViewType==1)?'bbsf-vertical':'bbsf-horizontal'\">\r\n <!--label-->\r\n <label *ngIf=\"!options.HideLabel\" class=\"bbsf-label {{options.LabelExtraClasses}}\">\r\n {{options.LabelValue}}\r\n </label>\r\n <!--Asterisk-->\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\" class=\"text-danger\"\r\n aria-required=\"true\">*</span>\r\n <div class=\"bbsf-input-container\">\r\n <!--input-->\r\n <input autocomplete=\"off\" (dateTimeChange)=\"onDateSelect($event)\"\r\n [dir]=\"textDir\"\r\n class=\"form-control bnsights-control {{options.ExtraClasses}} \"\r\n [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\" aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n formControlName=\"{{options.Name}}\" [owlDateTime]=\"dt1\" [owlDateTimeTrigger]=\"dt1\"\r\n [class.is-invalid]=\"DatePickerFormControl.invalid && DatePickerFormControl.touched\"\r\n [min]=\"options.StartDate\" [max]=\"options.EndDate\" [hour12Timer]=\"options.Hour12Timer\" [selectMode]=\"getSelectMode(options.SelectMode)\"\r\n placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\" #Dateinput>\r\n\r\n <owl-date-time [pickerType]=\"getPickerType(options.PickerType)\"\r\n [startView]=\"startView\" [firstDayOfWeek]=\"options.FirstDayOfWeek\"\r\n [hour12Timer]=\"options.Hour12Timer\" #dt1></owl-date-time>\r\n <!--icon-->\r\n <span class=\"copy-clipboard\" [owlDateTimeTrigger]=\"dt1\">\r\n <span class=\"svg-icon\">\r\n <svg id=\"Group_356\" data-name=\"Group 356\" xmlns=\"http://www.w3.org/2000/svg\" width=\"15\" height=\"15\" viewBox=\"0 0 48 48\">\r\n <path id=\"Path_6737\" data-name=\"Path 6737\" d=\"M11.583,1a1,1,0,0,0-2,0V5.7h2Z\" style=\"\"></path>\r\n <path id=\"Path_6738\" data-name=\"Path 6738\" d=\"M38.417,1a1,1,0,0,0-2,0V5.7h2Z\"></path>\r\n <path id=\"Path_6739\" data-name=\"Path 6739\" d=\"M0,43.146C0,45.822,1.826,48,4.07,48H43.928C46.174,48,48,45.822,48,43.146V17.121H0Z\" fill=\"#d5d5d5\"></path>\r\n <path id=\"Path_6740\" data-name=\"Path 6740\" d=\"M43.929,5.7H38.417v5.512a1,1,0,1,1-2,0V5.7H11.583v5.512a1,1,0,1,1-2,0V5.7H4.07C1.826,5.7,0,7.877,0,10.555v4.566H48V10.555C48,7.877,46.174,5.7,43.929,5.7Z\" fill=\"#595959\"></path>\r\n </svg>\r\n </span>\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"subtext-container\">\r\n <!-- LabelDescription-->\r\n <div class=\"bbsf-control-desc\" *ngIf=\"options.LabelDescription!=null\">{{options.LabelDescription}}</div>\r\n <!-- requiredText-->\r\n <div class=\"bbsf-validation\" *ngIf=\"(DatePickerFormControl.invalid && DatePickerFormControl.touched)\">\r\n {{getErrorValidation(DatePickerFormControl.errors|keyvalue)}}\r\n </div>\r\n </div>\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n</div>\r\n",
920
+ template: "\r\n<div class=\"form-group bbsf-control bbsf-datetime-picker\" [formGroup]=\"group\">\r\n <div [ngClass]=\"(options.ViewType==1)?'bbsf-vertical':'bbsf-horizontal'\">\r\n <!--label-->\r\n <label *ngIf=\"!options.HideLabel\" class=\"bbsf-label\r\n {{options.LabelExtraClasses}}\">\r\n {{options.LabelValue}}\r\n </label>\r\n <!--Asterisk-->\r\n <span\r\n *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\"\r\n class=\"text-danger\"\r\n aria-required=\"true\">*</span>\r\n <div class=\"bbsf-input-container\">\r\n <!--input-->\r\n <input autocomplete=\"off\" (dateTimeChange)=\"onDateSelect($event)\"\r\n [dir]=\"textDir\" class=\"form-control bnsights-control\r\n {{options.ExtraClasses}} \"\r\n [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n formControlName=\"{{options.Name}}\" [owlDateTime]=\"dt1\"\r\n [owlDateTimeTrigger]=\"dt1\"\r\n [class.is-invalid]=\"DatePickerFormControl.invalid &&\r\n DatePickerFormControl.touched\"\r\n [min]=\"options.StartDate\" [max]=\"options.EndDate\"\r\n [hour12Timer]=\"options.Hour12Timer\"\r\n [selectMode]=\"getSelectMode(options.SelectMode)\"\r\n placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\" #Dateinput>\r\n\r\n <owl-date-time [pickerType]=\"getPickerType(options.PickerType)\"\r\n [startView]=\"startView\" [firstDayOfWeek]=\"options.FirstDayOfWeek\"\r\n [hour12Timer]=\"options.Hour12Timer\" #dt1></owl-date-time>\r\n <!--icon-->\r\n <span class=\"copy-clipboard\" [owlDateTimeTrigger]=\"dt1\">\r\n <span class=\"svg-icon\">\r\n <svg id=\"Group_356\" data-name=\"Group 356\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"15\" height=\"15\" viewBox=\"0\r\n 0 48 48\">\r\n <path id=\"Path_6737\" data-name=\"Path 6737\"\r\n d=\"M11.583,1a1,1,0,0,0-2,0V5.7h2Z\" style=\"\"></path>\r\n <path id=\"Path_6738\" data-name=\"Path 6738\"\r\n d=\"M38.417,1a1,1,0,0,0-2,0V5.7h2Z\"></path>\r\n <path id=\"Path_6739\" data-name=\"Path 6739\"\r\n d=\"M0,43.146C0,45.822,1.826,48,4.07,48H43.928C46.174,48,48,45.822,48,43.146V17.121H0Z\"\r\n fill=\"#d5d5d5\"></path>\r\n <path id=\"Path_6740\" data-name=\"Path 6740\"\r\n d=\"M43.929,5.7H38.417v5.512a1,1,0,1,1-2,0V5.7H11.583v5.512a1,1,0,1,1-2,0V5.7H4.07C1.826,5.7,0,7.877,0,10.555v4.566H48V10.555C48,7.877,46.174,5.7,43.929,5.7Z\"\r\n fill=\"#595959\"></path>\r\n </svg>\r\n </span>\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"subtext-container\">\r\n <!-- LabelDescription-->\r\n <div class=\"bbsf-control-desc\" *ngIf=\"options.LabelDescription!=null\">{{options.LabelDescription}}</div>\r\n <!-- requiredText-->\r\n <div class=\"bbsf-validation\" *ngIf=\"(DatePickerFormControl.invalid &&\r\n DatePickerFormControl.touched)\">\r\n {{getErrorValidation(DatePickerFormControl.errors|keyvalue)}}\r\n </div>\r\n </div>\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched\r\n )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n</div>\r\n",
918
921
  providers: [
919
922
  { provide: ngPickDatetime.OwlDateTimeIntl, useClass: DefaultIntl }
920
923
  ]
@@ -1943,7 +1946,10 @@
1943
1946
  }
1944
1947
  TextAreaComponent.prototype.ngOnInit = function () {
1945
1948
  var _this = this;
1946
- this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
1949
+ if (this.options.ForceDirection)
1950
+ this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
1951
+ else
1952
+ this.textDir = localStorage.getItem('language') == 'ar' ? 'rtl' : 'ltr';
1947
1953
  this.controlValidationService.isCreatedBefor = false;
1948
1954
  this.group.addControl(this.options.Name, new forms.FormControl(''));
1949
1955
  this.TextAreaFormControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
@@ -2558,7 +2564,10 @@
2558
2564
  }
2559
2565
  CheckBoxComponent.prototype.ngOnInit = function () {
2560
2566
  var _this = this;
2561
- this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
2567
+ if (this.options.ForceDirection)
2568
+ this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
2569
+ else
2570
+ this.textDir = localStorage.getItem('language') == 'ar' ? 'rtl' : 'ltr';
2562
2571
  this.controlValidationService.isCreatedBefor = false;
2563
2572
  this.group.addControl(this.options.Name, new forms.FormControl(''));
2564
2573
  this.CheckBoxFormControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
@@ -2682,7 +2691,10 @@
2682
2691
  }
2683
2692
  DropdownListComponent.prototype.ngOnInit = function () {
2684
2693
  var _this = this;
2685
- this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
2694
+ if (this.options.ForceDirection)
2695
+ this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
2696
+ else
2697
+ this.textDir = localStorage.getItem('language') == 'ar' ? 'rtl' : 'ltr';
2686
2698
  this.controlValidationService.isCreatedBefor = false;
2687
2699
  this.SelectedList = this.options.SelectedItems;
2688
2700
  this.dropdownSettings = {
@@ -2788,7 +2800,7 @@
2788
2800
  { type: i0.Component, args: [{
2789
2801
  // tslint:disable-next-line: component-selector
2790
2802
  selector: 'BBSF-DropdownList',
2791
- template: "<div class=\"form-group bbsf-control bbsf-dropdown\" [formGroup]=\"group\">\r\n <div [ngClass]=\"(options.ViewType==1)?'bbsf-vertical':'bbsf-horizontal'\">\r\n <!--label-->\r\n <label *ngIf=\"!options.HideLabel\" class=\"bbsf-label {{options.LabelExtraClasses}}\">\r\n {{options.LabelValue}}\r\n <!--Asterisk-->\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\" class=\"text-danger\"\r\n aria-required=\"true\">*</span>\r\n </label>\r\n <div class=\"bbsf-input-container\">\r\n <!--input enabled bootstrap select-->\r\n <ng-select class=\"form-control\" *ngIf=\"options.DisableBootstrapSelect==false\" [dir]=\"textDir\"\r\n [bindValue]=\"options.ItemTempletkey\" [bindLabel]=\"options.ItemTempletvalue\" [items]=\"options.DataSource\"\r\n [notFoundText]=\"options.NotFoundText\" [maxSelectedItems]=\"options.LimitSelection\"\r\n [searchable]=\"options.AllowSearchFilter\" [multiple]=\"!options.SingleSelection\" [readonly]=\"options.IsDisabled\"\r\n [clearable]=\"true\" placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\"\r\n [selectableGroup]=\"true\" [selectableGroupAsModel]=\"false\" formControlName=\"{{options.Name}}\"\r\n [(ngModel)]=\"options.SelectedItems\" (change)=\"onItemSelect()\" (clear)=\"Clear()\"\r\n [class.is-invalid]=\"DropdownListFormControl.invalid && DropdownListFormControl.touched\"\r\n [closeOnSelect]=\"options.SingleSelection ? true : false\">\r\n <!--No checkbox-->\r\n <ng-template *ngIf=\"!options.ShowCheckbox\" ng-option-tmp let-item=\"item\" let-item$=\"item$\" let-index=\"index\">\r\n <label class=\"bbsf-label\" title=\"{{item.disabled ? options.DisabledItemsTooltipValue : ''}}\" id={{item.id}}>{{item.itemName}}</label>\r\n </ng-template>\r\n <!--checkbox-->\r\n <ng-template *ngIf=\"options.ShowCheckbox\" ng-option-tmp let-item=\"item\" let-item$=\"item$\" let-index=\"index\">\r\n <div class=\" bbsf-checkbox\">\r\n <div class=\"bbsf-input-container align-items-center\">\r\n <input class=\"bbsf-checkbox-input\" id=\"item-{{index}}\" type=\"checkbox\" [ngModelOptions]=\"{standalone: true}\" [ngModel]=\"item$.selected\" />\r\n <div class=\"label-subtext-container\">\r\n <label class=\"bbsf-label\" id={{item.id}}>{{item.itemName}}</label>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ng-select>\r\n <!--input disabled bootstrap select-->\r\n <select *ngIf=\"options.DisableBootstrapSelect\" class=\"form-control\"\r\n [dir]=\"textDir\" (change)=\"onItemSelect()\" [(ngModel)]=\"options.SelectedItems\" [disabled]=\"options.IsDisabled\" formControlName=\"{{options.Name}}\">\r\n <option value=\"\" disabled>--{{UtilityService.getResourceValue(\"select\")}}--</option>\r\n <option *ngFor=\"let item of options.DataSource\" value=\"{{item.id}}\" [ngValue]=\"item.id\">\r\n {{item.itemName}}\r\n </option>\r\n </select>\r\n <div class=\"subtext-container\">\r\n <!-- LabelDescription-->\r\n <div class=\"bbsf-control-desc\" *ngIf=\"options.LabelDescription!=null\">{{options.LabelDescription}}</div>\r\n <!-- requiredText-->\r\n <div class=\"bbsf-validation\" *ngIf=\"(DropdownListFormControl.invalid && DropdownListFormControl.touched)\">\r\n {{getErrorValidation(DropdownListFormControl.errors|keyvalue)}}\r\n </div>\r\n </div>\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n"
2803
+ template: "<div class=\"form-group bbsf-control bbsf-dropdown\" [formGroup]=\"group\">\r\n <div [ngClass]=\"(options.ViewType==1)?'bbsf-vertical':'bbsf-horizontal'\">\r\n <!--label-->\r\n <label *ngIf=\"!options.HideLabel\" class=\"bbsf-label {{options.LabelExtraClasses}}\">\r\n {{options.LabelValue}}\r\n <!--Asterisk-->\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\" class=\"text-danger\"\r\n aria-required=\"true\">*</span>\r\n </label>\r\n <div class=\"bbsf-input-container\">\r\n <!--input enabled bootstrap select-->\r\n <ng-select class=\"form-control\" *ngIf=\"options.DisableBootstrapSelect==false\" dir=\"{{options.ForceDirection==2?'rtl':''}}\"\r\n [bindValue]=\"options.ItemTempletkey\" [bindLabel]=\"options.ItemTempletvalue\" [items]=\"options.DataSource\"\r\n [notFoundText]=\"options.NotFoundText\" [maxSelectedItems]=\"options.LimitSelection\"\r\n [searchable]=\"options.AllowSearchFilter\" [multiple]=\"!options.SingleSelection\" [readonly]=\"options.IsDisabled\"\r\n [clearable]=\"true\" placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\"\r\n [selectableGroup]=\"true\" [selectableGroupAsModel]=\"false\" formControlName=\"{{options.Name}}\"\r\n [(ngModel)]=\"options.SelectedItems\" (change)=\"onItemSelect()\" (clear)=\"Clear()\"\r\n [class.is-invalid]=\"DropdownListFormControl.invalid && DropdownListFormControl.touched\"\r\n [closeOnSelect]=\"options.SingleSelection ? true : false\">\r\n <!--No checkbox-->\r\n <ng-template *ngIf=\"!options.ShowCheckbox\" ng-option-tmp let-item=\"item\" let-item$=\"item$\" let-index=\"index\">\r\n <label class=\"bbsf-label\" title=\"{{item.disabled ? options.DisabledItemsTooltipValue : ''}}\" id={{item.key}}>{{item.value}}</label>\r\n </ng-template>\r\n <!--checkbox-->\r\n <ng-template *ngIf=\"options.ShowCheckbox\" ng-option-tmp let-item=\"item\" let-item$=\"item$\" let-index=\"index\">\r\n <div class=\" bbsf-checkbox\">\r\n <div class=\"bbsf-input-container align-items-center\">\r\n <input class=\"bbsf-checkbox-input\" id=\"item-{{index}}\" type=\"checkbox\" [ngModelOptions]=\"{standalone: true}\" [ngModel]=\"item$.selected\" />\r\n <div class=\"label-subtext-container\">\r\n <label class=\"bbsf-label\" id={{item.key}}>{{item.value}}</label>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ng-select>\r\n <!--input disabled bootstrap select-->\r\n <select *ngIf=\"options.DisableBootstrapSelect\" class=\"form-control\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\" (change)=\"onItemSelect()\" [(ngModel)]=\"options.SelectedItems\" [disabled]=\"options.IsDisabled\" formControlName=\"{{options.Name}}\">\r\n <option value=\"\" disabled>--{{UtilityService.getResourceValue(\"select\")}}--</option>\r\n <option *ngFor=\"let item of options.DataSource\" value=\"{{item.key}}\" [ngValue]=\"item.key\">\r\n {{item.value}}\r\n </option>\r\n </select>\r\n <div class=\"subtext-container\">\r\n <!-- LabelDescription-->\r\n <div class=\"bbsf-control-desc\" *ngIf=\"options.LabelDescription!=null\">{{options.LabelDescription}}</div>\r\n <!-- requiredText-->\r\n <div class=\"bbsf-validation\" *ngIf=\"(DropdownListFormControl.invalid && DropdownListFormControl.touched)\">\r\n {{getErrorValidation(DropdownListFormControl.errors|keyvalue)}}\r\n </div>\r\n </div>\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n"
2792
2804
  },] }
2793
2805
  ];
2794
2806
  DropdownListComponent.ctorParameters = function () { return [
@@ -2851,7 +2863,10 @@
2851
2863
  }
2852
2864
  PhoneComponent.prototype.ngOnInit = function () {
2853
2865
  var _this = this;
2854
- this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
2866
+ if (this.options.ForceDirection)
2867
+ this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
2868
+ else
2869
+ this.textDir = localStorage.getItem('language') == 'ar' ? 'rtl' : 'ltr';
2855
2870
  this.controlValidationService.isCreatedBefor = false;
2856
2871
  this.group.addControl(this.options.Name, new forms.FormControl(''));
2857
2872
  this.PhoneFormControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
@@ -2944,7 +2959,10 @@
2944
2959
  ToggleslideComponent.controlContainerstatic = this.controlContainer;
2945
2960
  }
2946
2961
  ToggleslideComponent.prototype.ngOnInit = function () {
2947
- this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
2962
+ if (this.options.ForceDirection)
2963
+ this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
2964
+ else
2965
+ this.textDir = localStorage.getItem('language') == 'ar' ? 'rtl' : 'ltr';
2948
2966
  this.group.addControl(this.options.Name, new forms.FormControl(''));
2949
2967
  this.ToggleslideFormControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
2950
2968
  var validationRules = [];
@@ -3051,7 +3069,10 @@
3051
3069
  }
3052
3070
  HtmlEditorComponent.prototype.ngOnInit = function () {
3053
3071
  var _this = this;
3054
- this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
3072
+ if (this.options.ForceDirection)
3073
+ this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
3074
+ else
3075
+ this.textDir = localStorage.getItem('language') == 'ar' ? 'rtl' : 'ltr';
3055
3076
  this.editorConfig = {
3056
3077
  editable: !this.options.IsDisabled,
3057
3078
  spellcheck: true,
@@ -3768,13 +3789,13 @@
3768
3789
  this.options.FileUploadAcceptsTypes.length > 0) {
3769
3790
  for (var index = 0; index < this.options.FileUploadAcceptsTypes.length; index++) {
3770
3791
  var Type = this.options.FileUploadAcceptsTypes[index];
3771
- this.AcceptedType = this.AcceptedType + Type;
3792
+ this.AcceptedType = this.AcceptedType.toUpperCase() + Type.toUpperCase();
3772
3793
  }
3773
3794
  this.AcceptedTypeArray = this.AcceptedType.split(',');
3774
3795
  for (var index = 0; index < this.AcceptedTypeArray.length; index++) {
3775
3796
  var element = this.AcceptedTypeArray[index];
3776
3797
  var TypeToolTipe = element.split('/')[1];
3777
- this.ToolTipTypeArray.push(TypeToolTipe);
3798
+ this.ToolTipTypeArray.push(TypeToolTipe.toUpperCase());
3778
3799
  }
3779
3800
  this.ValidationMessage =
3780
3801
  this.ValidationMessage +
@@ -4032,17 +4053,17 @@
4032
4053
  this.controlValidationService = controlValidationService;
4033
4054
  this.globalSettings = globalSettings;
4034
4055
  this.files = [];
4035
- this.ImageSource = "./src/assets/images/user.svg";
4056
+ this.ImageSource = './src/assets/images/user.svg';
4036
4057
  this.OnChange = new i0.EventEmitter();
4037
- this.ValidationMessage = "";
4038
- this.AcceptedType = "";
4058
+ this.ValidationMessage = '';
4059
+ this.AcceptedType = '';
4039
4060
  this.AcceptedTypeArray = [];
4040
4061
  this.ToolTipTypeArray = [];
4041
4062
  this.markAllAsTouched = false;
4042
4063
  this.imgUrl = null;
4043
4064
  this.config = null;
4044
- this.imageUrl = "";
4045
- this.imgwUrl = "";
4065
+ this.imageUrl = '';
4066
+ this.imgwUrl = '';
4046
4067
  this.mdlSampleIsOpen = false;
4047
4068
  this.validationRules = [];
4048
4069
  this.validationRulesasync = [];
@@ -4069,7 +4090,8 @@
4069
4090
  this.IsValid = function () {
4070
4091
  _this.controlUtility.IsValid(_this.ProfileImageUploadFormControl);
4071
4092
  };
4072
- ProfileImageUploaderComponent.controlContainerstatic = this.controlContainer;
4093
+ ProfileImageUploaderComponent.controlContainerstatic =
4094
+ this.controlContainer;
4073
4095
  this.uploader = new ng2FileUpload.FileUploader({
4074
4096
  disableMultipart: false, // 'DisableMultipart' must be 'true' for formatDataFunction to be called.
4075
4097
  });
@@ -4081,7 +4103,8 @@
4081
4103
  this.controlValidationService.isCreatedBefor = false;
4082
4104
  if (!this.options.ViewType)
4083
4105
  this.options.ViewType = this.globalSettings.ViewType;
4084
- if (this.options.DefaultImageSrc != null && this.options.DefaultImageSrc != "")
4106
+ if (this.options.DefaultImageSrc != null &&
4107
+ this.options.DefaultImageSrc != '')
4085
4108
  this.ImageSource = this.options.DefaultImageSrc;
4086
4109
  this.config = {
4087
4110
  aspectRatio: 200 / 200,
@@ -4096,14 +4119,14 @@
4096
4119
  modal: true,
4097
4120
  checkCrossOrigin: false,
4098
4121
  cropBoxResizable: false,
4099
- autoCrop: true
4122
+ autoCrop: true,
4100
4123
  };
4101
4124
  if (this.options.ImageUploadAcceptsTypes != null) {
4102
4125
  this.options.ImageUploadAcceptsTypes;
4103
4126
  }
4104
4127
  if (this.options.Value != null) {
4105
- var imgURL = this.options.Value["fileURL"];
4106
- if (imgURL != "" && imgURL != undefined && imgURL != null)
4128
+ var imgURL = this.options.Value['fileURL'];
4129
+ if (imgURL != '' && imgURL != undefined && imgURL != null)
4107
4130
  this.ImageSource = imgURL;
4108
4131
  var element = this.options.Value;
4109
4132
  this.FileLikeObject = new ng2FileUpload.FileLikeObject({
@@ -4111,25 +4134,33 @@
4111
4134
  });
4112
4135
  this.uploader.addToQueue([this.FileLikeObject]);
4113
4136
  }
4114
- if (this.options.LabelKey != null && this.options.LabelKey != "")
4137
+ if (this.options.LabelKey != null && this.options.LabelKey != '')
4115
4138
  this.options.LabelValue = this.UtilityService.getResourceValue(this.options.LabelKey);
4116
- if (this.options.ImageUploadAcceptsTypes != null && this.options.ImageUploadAcceptsTypes.length > 0) {
4139
+ if (this.options.ImageUploadAcceptsTypes != null &&
4140
+ this.options.ImageUploadAcceptsTypes.length > 0) {
4117
4141
  for (var index = 0; index < this.options.ImageUploadAcceptsTypes.length; index++) {
4118
4142
  var Type = this.options.ImageUploadAcceptsTypes[index];
4119
- this.AcceptedType = this.AcceptedType + Type + ",";
4143
+ this.AcceptedType =
4144
+ this.AcceptedType.toUpperCase() + Type.toUpperCase();
4120
4145
  }
4121
- this.AcceptedTypeArray = this.AcceptedType.split(",");
4146
+ this.AcceptedTypeArray = this.AcceptedType.split(',');
4122
4147
  for (var index = 0; index < this.AcceptedTypeArray.length; index++) {
4123
4148
  var element = this.AcceptedTypeArray[index];
4124
4149
  var TypeToolTipe = element.split('/')[1];
4125
- this.ToolTipTypeArray.push(TypeToolTipe);
4150
+ this.ToolTipTypeArray.push(TypeToolTipe.toUpperCase());
4126
4151
  }
4127
- this.ValidationMessage = this.ValidationMessage + (" Allowed extenstions (" + this.ToolTipTypeArray + ") ");
4152
+ this.ValidationMessage =
4153
+ this.ValidationMessage +
4154
+ this.UtilityService.getResourceValue('AllowedTypes') +
4155
+ (" (" + this.ToolTipTypeArray + ") ");
4128
4156
  }
4129
4157
  if (this.options.FileMaxSizeInMB > 0) {
4130
- this.ValidationMessage = this.ValidationMessage + (" <br />Max File Size " + this.options.FileMaxSizeInMB + " MB");
4158
+ this.ValidationMessage =
4159
+ this.ValidationMessage +
4160
+ (" <br /> " + this.UtilityService.getResourceValue('FileMaxSizeInMB') + " " + this.options.FileMaxSizeInMB);
4131
4161
  }
4132
- if (this.options.ImageUploadAcceptsTypes != null && this.options.ImageUploadAcceptsTypes.length > 0) {
4162
+ if (this.options.ImageUploadAcceptsTypes != null &&
4163
+ this.options.ImageUploadAcceptsTypes.length > 0) {
4133
4164
  }
4134
4165
  this.group.addControl(this.options.Name, new forms.FormControl(''));
4135
4166
  this.ProfileImageUploadFormControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
@@ -4183,12 +4214,17 @@
4183
4214
  var fileType = file.type;
4184
4215
  if (file.size > maxFileSize) {
4185
4216
  var formControl = this.ProfileImageUploadFormControl;
4186
- formControl.setErrors({ FileMaxSizeInMB: this.options.FileMaxSizeInMB + 'M' });
4217
+ formControl.setErrors({
4218
+ FileMaxSizeInMB: this.options.FileMaxSizeInMB + 'M',
4219
+ });
4187
4220
  formControl.markAsTouched();
4188
4221
  this.uploader.queue = [];
4189
4222
  return;
4190
4223
  }
4191
- if (this.options.ImageUploadAcceptsTypes != null && this.options.ImageUploadAcceptsTypes.length > 0 && !(this.AcceptedTypeArray.includes(fileType.toUpperCase()) || this.AcceptedTypeArray.includes(fileType.toLowerCase()))) {
4224
+ if (this.options.ImageUploadAcceptsTypes != null &&
4225
+ this.options.ImageUploadAcceptsTypes.length > 0 &&
4226
+ !(this.AcceptedTypeArray.includes(fileType.toUpperCase()) ||
4227
+ this.AcceptedTypeArray.includes(fileType.toLowerCase()))) {
4192
4228
  var formControl = this.ProfileImageUploadFormControl;
4193
4229
  formControl.setErrors({ ToolTipTypeError: this.ToolTipTypeArray });
4194
4230
  formControl.markAsTouched();
@@ -4206,7 +4242,9 @@
4206
4242
  var fileType = file.type;
4207
4243
  if (file.size > maxFileSize_1) {
4208
4244
  var formControl = this_1.ProfileImageUploadFormControl;
4209
- formControl.setErrors({ FileMaxSizeInMB: this_1.options.FileMaxSizeInMB + 'M' });
4245
+ formControl.setErrors({
4246
+ FileMaxSizeInMB: this_1.options.FileMaxSizeInMB + 'M',
4247
+ });
4210
4248
  formControl.markAsTouched();
4211
4249
  this_1.uploader.queue = [];
4212
4250
  return { value: void 0 };
@@ -4218,7 +4256,9 @@
4218
4256
  _this.imageUrl = reader_1.result.toString();
4219
4257
  _this.openModal(true);
4220
4258
  var originalValue = _this.group.get(_this.options.Name).value;
4221
- if (_this.options.PatchFunction && _this.options.PatchPath && _this.group.get(_this.options.Name).valid) {
4259
+ if (_this.options.PatchFunction &&
4260
+ _this.options.PatchPath &&
4261
+ _this.group.get(_this.options.Name).valid) {
4222
4262
  _this.controlUtility.patchControlValue(originalValue, _this.options.PatchFunction, _this.options.PatchPath);
4223
4263
  }
4224
4264
  //Use this line to enable two way binding.
@@ -4238,7 +4278,7 @@
4238
4278
  var ItemList = this.group.get(this.options.Name).value;
4239
4279
  this.files.splice(this.files.indexOf(event), 1);
4240
4280
  ItemList = [];
4241
- if ((this.files.length == 0) && this.options.IsRequired) {
4281
+ if (this.files.length == 0 && this.options.IsRequired) {
4242
4282
  this.ProfileImageUploadFormControl.markAsTouched();
4243
4283
  this.ProfileImageUploadFormControl.setErrors(forms.Validators.required);
4244
4284
  this.ProfileImageUploadFormControl.invalid;
@@ -4271,17 +4311,17 @@
4271
4311
  });
4272
4312
  profilePicturCropper.toBlob(function (blob) {
4273
4313
  _this.zone.run(function () {
4274
- _this.getProfileImageBlobFile(blob, "profilePicturCropper");
4314
+ _this.getProfileImageBlobFile(blob, 'profilePicturCropper');
4275
4315
  });
4276
4316
  });
4277
4317
  AvatarPictureCropper.toBlob(function (blob) {
4278
4318
  _this.zone.run(function () {
4279
- _this.getProfileImageBlobFile(blob, "AvatarPictureCropper");
4319
+ _this.getProfileImageBlobFile(blob, 'AvatarPictureCropper');
4280
4320
  });
4281
4321
  });
4282
4322
  OriginalPictureCropper.toBlob(function (blob) {
4283
4323
  _this.zone.run(function () {
4284
- _this.getProfileImageBlobFile(blob, "OriginalPictureCropper");
4324
+ _this.getProfileImageBlobFile(blob, 'OriginalPictureCropper');
4285
4325
  });
4286
4326
  });
4287
4327
  this.files = [];
@@ -4297,37 +4337,40 @@
4297
4337
  reader.onload = function () {
4298
4338
  var FileObject;
4299
4339
  switch (type) {
4300
- case "profilePicturCropper":
4301
- BlobFile.name = _this.EventFile.name + "MediumPicture";
4340
+ case 'profilePicturCropper':
4341
+ BlobFile.name = _this.EventFile.name + 'MediumPicture';
4302
4342
  FileObject = {
4303
- FileName: _this.EventFile.name + "MediumPicture",
4343
+ FileName: _this.EventFile.name + 'MediumPicture',
4304
4344
  FileType: _this.EventFile.type,
4305
4345
  FileBase64: reader.result.toString().split(',')[1],
4306
- FileSizeInMB: ((BlobFile.size / 1000) / 1000),
4346
+ FileSizeInMB: BlobFile.size / 1000 / 1000,
4307
4347
  };
4308
4348
  _this.ProfilePictureDTO.profilePicture = FileObject;
4309
- _this.ProfilePictureDTO.MediumPicture = FileObject.FileName + "," + FileObject.FileBase64;
4349
+ _this.ProfilePictureDTO.MediumPicture =
4350
+ FileObject.FileName + ',' + FileObject.FileBase64;
4310
4351
  _this.files.push(BlobFile);
4311
4352
  break;
4312
- case "AvatarPictureCropper":
4353
+ case 'AvatarPictureCropper':
4313
4354
  FileObject = {
4314
- FileName: _this.EventFile.name + "SmallPicture",
4355
+ FileName: _this.EventFile.name + 'SmallPicture',
4315
4356
  FileType: _this.EventFile.type,
4316
4357
  FileBase64: reader.result.toString().split(',')[1],
4317
- FileSizeInMB: ((BlobFile.size / 1000) / 1000),
4358
+ FileSizeInMB: BlobFile.size / 1000 / 1000,
4318
4359
  };
4319
4360
  _this.ProfilePictureDTO.AvatarPicture = FileObject;
4320
- _this.ProfilePictureDTO.SmallPicture = FileObject.FileName + "," + FileObject.FileBase64;
4361
+ _this.ProfilePictureDTO.SmallPicture =
4362
+ FileObject.FileName + ',' + FileObject.FileBase64;
4321
4363
  break;
4322
- case "OriginalPictureCropper":
4364
+ case 'OriginalPictureCropper':
4323
4365
  FileObject = {
4324
- FileName: _this.EventFile.name + "Original",
4366
+ FileName: _this.EventFile.name + 'Original',
4325
4367
  FileType: _this.EventFile.type,
4326
4368
  FileBase64: reader.result.toString().split(',')[1],
4327
- FileSizeInMB: ((BlobFile.size / 1000) / 1000),
4369
+ FileSizeInMB: BlobFile.size / 1000 / 1000,
4328
4370
  };
4329
4371
  _this.ProfilePictureDTO.OriginalPicture = FileObject;
4330
- _this.ProfilePictureDTO.Original = FileObject.FileName + "," + FileObject.FileBase64;
4372
+ _this.ProfilePictureDTO.Original =
4373
+ FileObject.FileName + ',' + FileObject.FileBase64;
4331
4374
  _this.group.get(_this.options.Name).setValue(_this.ProfilePictureDTO);
4332
4375
  _this.OnChange.emit(_this.group.get(_this.options.Name).value);
4333
4376
  break;
@@ -4429,7 +4472,7 @@
4429
4472
  // this.AutocompleteTextBoxControl.setValue(model);
4430
4473
  // this.AutocompleteTextBoxControl.updateValueAndValidity()
4431
4474
  // }
4432
- // }
4475
+ // }
4433
4476
  // else {
4434
4477
  // if (this.AutocompleteTextBoxControl.value == Value) {
4435
4478
  // this.AutocompleteTextBoxControl.setErrors({ NewSelectionValidationKey: this.NewSelectionValidationKey });
@@ -4469,7 +4512,10 @@
4469
4512
  }
4470
4513
  AutocompleteTextBoxComponent.prototype.ngOnInit = function () {
4471
4514
  var _this = this;
4472
- this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
4515
+ if (this.options.ForceDirection)
4516
+ this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
4517
+ else
4518
+ this.textDir = localStorage.getItem('language') == 'ar' ? 'rtl' : 'ltr';
4473
4519
  this.controlValidationService.isCreatedBefor = false;
4474
4520
  this.group.addControl(this.options.Name, new forms.FormControl(''));
4475
4521
  this.AutocompleteTextBoxControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
@@ -4710,7 +4756,10 @@
4710
4756
  };
4711
4757
  TagsInputComponent.prototype.ngOnInit = function () {
4712
4758
  var _this = this;
4713
- this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
4759
+ if (this.options.ForceDirection)
4760
+ this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
4761
+ else
4762
+ this.textDir = localStorage.getItem('language') == 'ar' ? 'rtl' : 'ltr';
4714
4763
  this.controlValidationService.isCreatedBefor = false;
4715
4764
  this.options.DatasourceItemText = this.options.DatasourceItemText.toLowerCase();
4716
4765
  this.TagsFormGroup = new forms.FormGroup({});
@@ -5518,7 +5567,10 @@
5518
5567
  }
5519
5568
  TextboxComponent.prototype.ngOnInit = function () {
5520
5569
  var _this = this;
5521
- this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
5570
+ if (this.options.ForceDirection)
5571
+ this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
5572
+ else
5573
+ this.textDir = localStorage.getItem('language') == 'ar' ? 'rtl' : 'ltr';
5522
5574
  this.controlValidationService.isCreatedBefor = false;
5523
5575
  if (!this.options.MaxLength)
5524
5576
  this.options.MaxLength = this.globalSettings.MaxLengthTextBox;
@@ -6658,12 +6710,6 @@
6658
6710
  DataType["AreaOfFocus"] = "06a4cfb7-216a-4a60-8388-7a859aab90b4";
6659
6711
  })(exports.DataType || (exports.DataType = {}));
6660
6712
 
6661
- exports.ForceDirection = void 0;
6662
- (function (ForceDirection) {
6663
- ForceDirection[ForceDirection["English"] = 1] = "English";
6664
- ForceDirection[ForceDirection["Arabic"] = 2] = "Arabic";
6665
- })(exports.ForceDirection || (exports.ForceDirection = {}));
6666
-
6667
6713
  var ControlOptionsBase = /** @class */ (function () {
6668
6714
  function ControlOptionsBase() {
6669
6715
  /** Sets an attribute disable="disabled" */
@@ -6692,7 +6738,7 @@
6692
6738
  _this.StartView = exports.StartView.Month;
6693
6739
  /**To set SelectMode to DatePicker is Single or Range */
6694
6740
  _this.SelectMode = exports.SelectMode.Single;
6695
- _this.ForceDirection = exports.ForceDirection.English;
6741
+ _this.ForceDirection = null;
6696
6742
  /**Name of DatePicker control to compare value with it */
6697
6743
  _this.StartControlToCompareWith = null;
6698
6744
  return _this;
@@ -6700,6 +6746,12 @@
6700
6746
  return DatePickerOptions;
6701
6747
  }(ControlOptionsBase));
6702
6748
 
6749
+ exports.ForceDirection = void 0;
6750
+ (function (ForceDirection) {
6751
+ ForceDirection[ForceDirection["English"] = 1] = "English";
6752
+ ForceDirection[ForceDirection["Arabic"] = 2] = "Arabic";
6753
+ })(exports.ForceDirection || (exports.ForceDirection = {}));
6754
+
6703
6755
  var DropdownOptions = /** @class */ (function (_super) {
6704
6756
  __extends(DropdownOptions, _super);
6705
6757
  function DropdownOptions() {
@@ -7992,7 +8044,10 @@
7992
8044
  }
7993
8045
  RecaptchaComponent.prototype.ngOnInit = function () {
7994
8046
  var _this = this;
7995
- this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
8047
+ if (this.options.ForceDirection)
8048
+ this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
8049
+ else
8050
+ this.textDir = localStorage.getItem('language') == 'ar' ? 'rtl' : 'ltr';
7996
8051
  this.controlValidationService.isCreatedBefor = false;
7997
8052
  this.loadImage();
7998
8053
  if (!this.options.ViewType)