@bnsights/bbsf-controls 1.0.91 → 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.
@@ -489,7 +489,10 @@ class DateInputComponent {
489
489
  DateInputComponent.controlContainerstatic = this.controlContainer;
490
490
  }
491
491
  ngOnInit() {
492
- this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
492
+ if (this.options.ForceDirection)
493
+ this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
494
+ else
495
+ this.textDir = localStorage.getItem('language') == 'ar' ? 'rtl' : 'ltr';
493
496
  if (this.options.StartView == 3)
494
497
  this.startView = 'multi-year';
495
498
  else {
@@ -565,7 +568,7 @@ class DateInputComponent {
565
568
  if (!item)
566
569
  return;
567
570
  let DateValue;
568
- var tzoffset = (new Date()).getTimezoneOffset() * 60000; //offset in milliseconds
571
+ var tzoffset = (new Date()).getTimezoneOffset() * 60000; //offset in milliseconds
569
572
  if (this.options.SelectMode == 2) {
570
573
  for (let index = 0; index < item.value.length; index++) {
571
574
  item.value[index] = new Date(item.value[index] - tzoffset).toISOString().slice(0, -1);
@@ -602,7 +605,7 @@ DateInputComponent.controlContainerstatic = null;
602
605
  DateInputComponent.decorators = [
603
606
  { type: Component, args: [{
604
607
  selector: 'BBSF-DateTimePicker',
605
- 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",
608
+ 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",
606
609
  providers: [
607
610
  { provide: OwlDateTimeIntl, useClass: DefaultIntl }
608
611
  ]
@@ -1597,7 +1600,10 @@ class TextAreaComponent {
1597
1600
  TextAreaComponent.controlContainerstatic = this.controlContainer;
1598
1601
  }
1599
1602
  ngOnInit() {
1600
- this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
1603
+ if (this.options.ForceDirection)
1604
+ this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
1605
+ else
1606
+ this.textDir = localStorage.getItem('language') == 'ar' ? 'rtl' : 'ltr';
1601
1607
  this.controlValidationService.isCreatedBefor = false;
1602
1608
  this.group.addControl(this.options.Name, new FormControl(''));
1603
1609
  this.TextAreaFormControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
@@ -2196,7 +2202,10 @@ class CheckBoxComponent {
2196
2202
  CheckBoxComponent.controlContainerstatic = this.controlContainer;
2197
2203
  }
2198
2204
  ngOnInit() {
2199
- this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
2205
+ if (this.options.ForceDirection)
2206
+ this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
2207
+ else
2208
+ this.textDir = localStorage.getItem('language') == 'ar' ? 'rtl' : 'ltr';
2200
2209
  this.controlValidationService.isCreatedBefor = false;
2201
2210
  this.group.addControl(this.options.Name, new FormControl(''));
2202
2211
  this.CheckBoxFormControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
@@ -2317,7 +2326,10 @@ class DropdownListComponent {
2317
2326
  //console.log(environment["BBSF_AdminUrl"]);
2318
2327
  }
2319
2328
  ngOnInit() {
2320
- this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
2329
+ if (this.options.ForceDirection)
2330
+ this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
2331
+ else
2332
+ this.textDir = localStorage.getItem('language') == 'ar' ? 'rtl' : 'ltr';
2321
2333
  this.controlValidationService.isCreatedBefor = false;
2322
2334
  this.SelectedList = this.options.SelectedItems;
2323
2335
  this.dropdownSettings = {
@@ -2483,7 +2495,10 @@ class PhoneComponent {
2483
2495
  PhoneComponent.controlContainerstatic = this.controlContainer;
2484
2496
  }
2485
2497
  ngOnInit() {
2486
- this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
2498
+ if (this.options.ForceDirection)
2499
+ this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
2500
+ else
2501
+ this.textDir = localStorage.getItem('language') == 'ar' ? 'rtl' : 'ltr';
2487
2502
  this.controlValidationService.isCreatedBefor = false;
2488
2503
  this.group.addControl(this.options.Name, new FormControl(''));
2489
2504
  this.PhoneFormControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
@@ -2575,7 +2590,10 @@ class ToggleslideComponent {
2575
2590
  ToggleslideComponent.controlContainerstatic = this.controlContainer;
2576
2591
  }
2577
2592
  ngOnInit() {
2578
- this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
2593
+ if (this.options.ForceDirection)
2594
+ this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
2595
+ else
2596
+ this.textDir = localStorage.getItem('language') == 'ar' ? 'rtl' : 'ltr';
2579
2597
  this.group.addControl(this.options.Name, new FormControl(''));
2580
2598
  this.ToggleslideFormControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
2581
2599
  let validationRules = [];
@@ -2679,7 +2697,10 @@ class HtmlEditorComponent {
2679
2697
  HtmlEditorComponent.controlContainerstatic = this.controlContainer;
2680
2698
  }
2681
2699
  ngOnInit() {
2682
- this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
2700
+ if (this.options.ForceDirection)
2701
+ this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
2702
+ else
2703
+ this.textDir = localStorage.getItem('language') == 'ar' ? 'rtl' : 'ltr';
2683
2704
  this.editorConfig = {
2684
2705
  editable: !this.options.IsDisabled,
2685
2706
  spellcheck: true,
@@ -3629,17 +3650,17 @@ class ProfileImageUploaderComponent {
3629
3650
  this.controlValidationService = controlValidationService;
3630
3651
  this.globalSettings = globalSettings;
3631
3652
  this.files = [];
3632
- this.ImageSource = "./src/assets/images/user.svg";
3653
+ this.ImageSource = './src/assets/images/user.svg';
3633
3654
  this.OnChange = new EventEmitter();
3634
- this.ValidationMessage = "";
3635
- this.AcceptedType = "";
3655
+ this.ValidationMessage = '';
3656
+ this.AcceptedType = '';
3636
3657
  this.AcceptedTypeArray = [];
3637
3658
  this.ToolTipTypeArray = [];
3638
3659
  this.markAllAsTouched = false;
3639
3660
  this.imgUrl = null;
3640
3661
  this.config = null;
3641
- this.imageUrl = "";
3642
- this.imgwUrl = "";
3662
+ this.imageUrl = '';
3663
+ this.imgwUrl = '';
3643
3664
  this.mdlSampleIsOpen = false;
3644
3665
  this.validationRules = [];
3645
3666
  this.validationRulesasync = [];
@@ -3666,7 +3687,8 @@ class ProfileImageUploaderComponent {
3666
3687
  this.IsValid = () => {
3667
3688
  this.controlUtility.IsValid(this.ProfileImageUploadFormControl);
3668
3689
  };
3669
- ProfileImageUploaderComponent.controlContainerstatic = this.controlContainer;
3690
+ ProfileImageUploaderComponent.controlContainerstatic =
3691
+ this.controlContainer;
3670
3692
  this.uploader = new FileUploader({
3671
3693
  disableMultipart: false, // 'DisableMultipart' must be 'true' for formatDataFunction to be called.
3672
3694
  });
@@ -3677,7 +3699,8 @@ class ProfileImageUploaderComponent {
3677
3699
  this.controlValidationService.isCreatedBefor = false;
3678
3700
  if (!this.options.ViewType)
3679
3701
  this.options.ViewType = this.globalSettings.ViewType;
3680
- if (this.options.DefaultImageSrc != null && this.options.DefaultImageSrc != "")
3702
+ if (this.options.DefaultImageSrc != null &&
3703
+ this.options.DefaultImageSrc != '')
3681
3704
  this.ImageSource = this.options.DefaultImageSrc;
3682
3705
  this.config = {
3683
3706
  aspectRatio: 200 / 200,
@@ -3692,14 +3715,14 @@ class ProfileImageUploaderComponent {
3692
3715
  modal: true,
3693
3716
  checkCrossOrigin: false,
3694
3717
  cropBoxResizable: false,
3695
- autoCrop: true
3718
+ autoCrop: true,
3696
3719
  };
3697
3720
  if (this.options.ImageUploadAcceptsTypes != null) {
3698
3721
  this.options.ImageUploadAcceptsTypes;
3699
3722
  }
3700
3723
  if (this.options.Value != null) {
3701
- let imgURL = this.options.Value["fileURL"];
3702
- if (imgURL != "" && imgURL != undefined && imgURL != null)
3724
+ let imgURL = this.options.Value['fileURL'];
3725
+ if (imgURL != '' && imgURL != undefined && imgURL != null)
3703
3726
  this.ImageSource = imgURL;
3704
3727
  let element = this.options.Value;
3705
3728
  this.FileLikeObject = new FileLikeObject({
@@ -3707,25 +3730,33 @@ class ProfileImageUploaderComponent {
3707
3730
  });
3708
3731
  this.uploader.addToQueue([this.FileLikeObject]);
3709
3732
  }
3710
- if (this.options.LabelKey != null && this.options.LabelKey != "")
3733
+ if (this.options.LabelKey != null && this.options.LabelKey != '')
3711
3734
  this.options.LabelValue = this.UtilityService.getResourceValue(this.options.LabelKey);
3712
- if (this.options.ImageUploadAcceptsTypes != null && this.options.ImageUploadAcceptsTypes.length > 0) {
3735
+ if (this.options.ImageUploadAcceptsTypes != null &&
3736
+ this.options.ImageUploadAcceptsTypes.length > 0) {
3713
3737
  for (let index = 0; index < this.options.ImageUploadAcceptsTypes.length; index++) {
3714
3738
  const Type = this.options.ImageUploadAcceptsTypes[index];
3715
- this.AcceptedType = this.AcceptedType + Type + ",";
3739
+ this.AcceptedType =
3740
+ this.AcceptedType.toUpperCase() + Type.toUpperCase();
3716
3741
  }
3717
- this.AcceptedTypeArray = this.AcceptedType.split(",");
3742
+ this.AcceptedTypeArray = this.AcceptedType.split(',');
3718
3743
  for (let index = 0; index < this.AcceptedTypeArray.length; index++) {
3719
3744
  const element = this.AcceptedTypeArray[index];
3720
3745
  const TypeToolTipe = element.split('/')[1];
3721
- this.ToolTipTypeArray.push(TypeToolTipe);
3746
+ this.ToolTipTypeArray.push(TypeToolTipe.toUpperCase());
3722
3747
  }
3723
- this.ValidationMessage = this.ValidationMessage + ` Allowed extenstions (${this.ToolTipTypeArray}) `;
3748
+ this.ValidationMessage =
3749
+ this.ValidationMessage +
3750
+ this.UtilityService.getResourceValue('AllowedTypes') +
3751
+ ` (${this.ToolTipTypeArray}) `;
3724
3752
  }
3725
3753
  if (this.options.FileMaxSizeInMB > 0) {
3726
- this.ValidationMessage = this.ValidationMessage + ` <br />Max File Size ${this.options.FileMaxSizeInMB} MB`;
3754
+ this.ValidationMessage =
3755
+ this.ValidationMessage +
3756
+ ` <br /> ${this.UtilityService.getResourceValue('FileMaxSizeInMB')} ${this.options.FileMaxSizeInMB}`;
3727
3757
  }
3728
- if (this.options.ImageUploadAcceptsTypes != null && this.options.ImageUploadAcceptsTypes.length > 0) {
3758
+ if (this.options.ImageUploadAcceptsTypes != null &&
3759
+ this.options.ImageUploadAcceptsTypes.length > 0) {
3729
3760
  }
3730
3761
  this.group.addControl(this.options.Name, new FormControl(''));
3731
3762
  this.ProfileImageUploadFormControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
@@ -3778,12 +3809,17 @@ class ProfileImageUploaderComponent {
3778
3809
  const fileType = file.type;
3779
3810
  if (file.size > maxFileSize) {
3780
3811
  const formControl = this.ProfileImageUploadFormControl;
3781
- formControl.setErrors({ FileMaxSizeInMB: this.options.FileMaxSizeInMB + 'M' });
3812
+ formControl.setErrors({
3813
+ FileMaxSizeInMB: this.options.FileMaxSizeInMB + 'M',
3814
+ });
3782
3815
  formControl.markAsTouched();
3783
3816
  this.uploader.queue = [];
3784
3817
  return;
3785
3818
  }
3786
- if (this.options.ImageUploadAcceptsTypes != null && this.options.ImageUploadAcceptsTypes.length > 0 && !(this.AcceptedTypeArray.includes(fileType.toUpperCase()) || this.AcceptedTypeArray.includes(fileType.toLowerCase()))) {
3819
+ if (this.options.ImageUploadAcceptsTypes != null &&
3820
+ this.options.ImageUploadAcceptsTypes.length > 0 &&
3821
+ !(this.AcceptedTypeArray.includes(fileType.toUpperCase()) ||
3822
+ this.AcceptedTypeArray.includes(fileType.toLowerCase()))) {
3787
3823
  const formControl = this.ProfileImageUploadFormControl;
3788
3824
  formControl.setErrors({ ToolTipTypeError: this.ToolTipTypeArray });
3789
3825
  formControl.markAsTouched();
@@ -3801,7 +3837,9 @@ class ProfileImageUploaderComponent {
3801
3837
  const fileType = file.type;
3802
3838
  if (file.size > maxFileSize) {
3803
3839
  const formControl = this.ProfileImageUploadFormControl;
3804
- formControl.setErrors({ FileMaxSizeInMB: this.options.FileMaxSizeInMB + 'M' });
3840
+ formControl.setErrors({
3841
+ FileMaxSizeInMB: this.options.FileMaxSizeInMB + 'M',
3842
+ });
3805
3843
  formControl.markAsTouched();
3806
3844
  this.uploader.queue = [];
3807
3845
  return;
@@ -3813,7 +3851,9 @@ class ProfileImageUploaderComponent {
3813
3851
  this.imageUrl = reader.result.toString();
3814
3852
  this.openModal(true);
3815
3853
  let originalValue = this.group.get(this.options.Name).value;
3816
- if (this.options.PatchFunction && this.options.PatchPath && this.group.get(this.options.Name).valid) {
3854
+ if (this.options.PatchFunction &&
3855
+ this.options.PatchPath &&
3856
+ this.group.get(this.options.Name).valid) {
3817
3857
  this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
3818
3858
  }
3819
3859
  //Use this line to enable two way binding.
@@ -3827,7 +3867,7 @@ class ProfileImageUploaderComponent {
3827
3867
  let ItemList = this.group.get(this.options.Name).value;
3828
3868
  this.files.splice(this.files.indexOf(event), 1);
3829
3869
  ItemList = [];
3830
- if ((this.files.length == 0) && this.options.IsRequired) {
3870
+ if (this.files.length == 0 && this.options.IsRequired) {
3831
3871
  this.ProfileImageUploadFormControl.markAsTouched();
3832
3872
  this.ProfileImageUploadFormControl.setErrors(Validators.required);
3833
3873
  this.ProfileImageUploadFormControl.invalid;
@@ -3859,17 +3899,17 @@ class ProfileImageUploaderComponent {
3859
3899
  });
3860
3900
  profilePicturCropper.toBlob((blob) => {
3861
3901
  this.zone.run(() => {
3862
- this.getProfileImageBlobFile(blob, "profilePicturCropper");
3902
+ this.getProfileImageBlobFile(blob, 'profilePicturCropper');
3863
3903
  });
3864
3904
  });
3865
3905
  AvatarPictureCropper.toBlob((blob) => {
3866
3906
  this.zone.run(() => {
3867
- this.getProfileImageBlobFile(blob, "AvatarPictureCropper");
3907
+ this.getProfileImageBlobFile(blob, 'AvatarPictureCropper');
3868
3908
  });
3869
3909
  });
3870
3910
  OriginalPictureCropper.toBlob((blob) => {
3871
3911
  this.zone.run(() => {
3872
- this.getProfileImageBlobFile(blob, "OriginalPictureCropper");
3912
+ this.getProfileImageBlobFile(blob, 'OriginalPictureCropper');
3873
3913
  });
3874
3914
  });
3875
3915
  this.files = [];
@@ -3884,37 +3924,40 @@ class ProfileImageUploaderComponent {
3884
3924
  reader.onload = () => {
3885
3925
  let FileObject;
3886
3926
  switch (type) {
3887
- case "profilePicturCropper":
3888
- BlobFile.name = this.EventFile.name + "MediumPicture";
3927
+ case 'profilePicturCropper':
3928
+ BlobFile.name = this.EventFile.name + 'MediumPicture';
3889
3929
  FileObject = {
3890
- FileName: this.EventFile.name + "MediumPicture",
3930
+ FileName: this.EventFile.name + 'MediumPicture',
3891
3931
  FileType: this.EventFile.type,
3892
3932
  FileBase64: reader.result.toString().split(',')[1],
3893
- FileSizeInMB: ((BlobFile.size / 1000) / 1000),
3933
+ FileSizeInMB: BlobFile.size / 1000 / 1000,
3894
3934
  };
3895
3935
  this.ProfilePictureDTO.profilePicture = FileObject;
3896
- this.ProfilePictureDTO.MediumPicture = FileObject.FileName + "," + FileObject.FileBase64;
3936
+ this.ProfilePictureDTO.MediumPicture =
3937
+ FileObject.FileName + ',' + FileObject.FileBase64;
3897
3938
  this.files.push(BlobFile);
3898
3939
  break;
3899
- case "AvatarPictureCropper":
3940
+ case 'AvatarPictureCropper':
3900
3941
  FileObject = {
3901
- FileName: this.EventFile.name + "SmallPicture",
3942
+ FileName: this.EventFile.name + 'SmallPicture',
3902
3943
  FileType: this.EventFile.type,
3903
3944
  FileBase64: reader.result.toString().split(',')[1],
3904
- FileSizeInMB: ((BlobFile.size / 1000) / 1000),
3945
+ FileSizeInMB: BlobFile.size / 1000 / 1000,
3905
3946
  };
3906
3947
  this.ProfilePictureDTO.AvatarPicture = FileObject;
3907
- this.ProfilePictureDTO.SmallPicture = FileObject.FileName + "," + FileObject.FileBase64;
3948
+ this.ProfilePictureDTO.SmallPicture =
3949
+ FileObject.FileName + ',' + FileObject.FileBase64;
3908
3950
  break;
3909
- case "OriginalPictureCropper":
3951
+ case 'OriginalPictureCropper':
3910
3952
  FileObject = {
3911
- FileName: this.EventFile.name + "Original",
3953
+ FileName: this.EventFile.name + 'Original',
3912
3954
  FileType: this.EventFile.type,
3913
3955
  FileBase64: reader.result.toString().split(',')[1],
3914
- FileSizeInMB: ((BlobFile.size / 1000) / 1000),
3956
+ FileSizeInMB: BlobFile.size / 1000 / 1000,
3915
3957
  };
3916
3958
  this.ProfilePictureDTO.OriginalPicture = FileObject;
3917
- this.ProfilePictureDTO.Original = FileObject.FileName + "," + FileObject.FileBase64;
3959
+ this.ProfilePictureDTO.Original =
3960
+ FileObject.FileName + ',' + FileObject.FileBase64;
3918
3961
  this.group.get(this.options.Name).setValue(this.ProfilePictureDTO);
3919
3962
  this.OnChange.emit(this.group.get(this.options.Name).value);
3920
3963
  break;
@@ -4013,7 +4056,7 @@ class AutocompleteTextBoxComponent {
4013
4056
  // this.AutocompleteTextBoxControl.setValue(model);
4014
4057
  // this.AutocompleteTextBoxControl.updateValueAndValidity()
4015
4058
  // }
4016
- // }
4059
+ // }
4017
4060
  // else {
4018
4061
  // if (this.AutocompleteTextBoxControl.value == Value) {
4019
4062
  // this.AutocompleteTextBoxControl.setErrors({ NewSelectionValidationKey: this.NewSelectionValidationKey });
@@ -4052,7 +4095,10 @@ class AutocompleteTextBoxComponent {
4052
4095
  AutocompleteTextBoxComponent.controlContainerstatic = this.controlContainer;
4053
4096
  }
4054
4097
  ngOnInit() {
4055
- this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
4098
+ if (this.options.ForceDirection)
4099
+ this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
4100
+ else
4101
+ this.textDir = localStorage.getItem('language') == 'ar' ? 'rtl' : 'ltr';
4056
4102
  this.controlValidationService.isCreatedBefor = false;
4057
4103
  this.group.addControl(this.options.Name, new FormControl(''));
4058
4104
  this.AutocompleteTextBoxControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
@@ -4270,7 +4316,10 @@ class TagsInputComponent {
4270
4316
  this.changeValueSubscription.unsubscribe();
4271
4317
  }
4272
4318
  ngOnInit() {
4273
- this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
4319
+ if (this.options.ForceDirection)
4320
+ this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
4321
+ else
4322
+ this.textDir = localStorage.getItem('language') == 'ar' ? 'rtl' : 'ltr';
4274
4323
  this.controlValidationService.isCreatedBefor = false;
4275
4324
  this.options.DatasourceItemText = this.options.DatasourceItemText.toLowerCase();
4276
4325
  this.TagsFormGroup = new FormGroup({});
@@ -5082,7 +5131,10 @@ class TextboxComponent {
5082
5131
  TextboxComponent.controlContainerstatic = this.controlContainer;
5083
5132
  }
5084
5133
  ngOnInit() {
5085
- this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
5134
+ if (this.options.ForceDirection)
5135
+ this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
5136
+ else
5137
+ this.textDir = localStorage.getItem('language') == 'ar' ? 'rtl' : 'ltr';
5086
5138
  this.controlValidationService.isCreatedBefor = false;
5087
5139
  if (!this.options.MaxLength)
5088
5140
  this.options.MaxLength = this.globalSettings.MaxLengthTextBox;
@@ -6185,12 +6237,6 @@ var DataType;
6185
6237
  DataType["AreaOfFocus"] = "06a4cfb7-216a-4a60-8388-7a859aab90b4";
6186
6238
  })(DataType || (DataType = {}));
6187
6239
 
6188
- var ForceDirection;
6189
- (function (ForceDirection) {
6190
- ForceDirection[ForceDirection["English"] = 1] = "English";
6191
- ForceDirection[ForceDirection["Arabic"] = 2] = "Arabic";
6192
- })(ForceDirection || (ForceDirection = {}));
6193
-
6194
6240
  class ControlOptionsBase {
6195
6241
  constructor() {
6196
6242
  /** Sets an attribute disable="disabled" */
@@ -6217,12 +6263,18 @@ class DatePickerOptions extends ControlOptionsBase {
6217
6263
  this.StartView = StartView.Month;
6218
6264
  /**To set SelectMode to DatePicker is Single or Range */
6219
6265
  this.SelectMode = SelectMode.Single;
6220
- this.ForceDirection = ForceDirection.English;
6266
+ this.ForceDirection = null;
6221
6267
  /**Name of DatePicker control to compare value with it */
6222
6268
  this.StartControlToCompareWith = null;
6223
6269
  }
6224
6270
  }
6225
6271
 
6272
+ var ForceDirection;
6273
+ (function (ForceDirection) {
6274
+ ForceDirection[ForceDirection["English"] = 1] = "English";
6275
+ ForceDirection[ForceDirection["Arabic"] = 2] = "Arabic";
6276
+ })(ForceDirection || (ForceDirection = {}));
6277
+
6226
6278
  class DropdownOptions extends ControlOptionsBase {
6227
6279
  constructor() {
6228
6280
  super(...arguments);
@@ -7613,7 +7665,10 @@ class RecaptchaComponent {
7613
7665
  };
7614
7666
  }
7615
7667
  ngOnInit() {
7616
- this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
7668
+ if (this.options.ForceDirection)
7669
+ this.textDir = this.options.ForceDirection == 2 ? 'rtl' : 'ltr';
7670
+ else
7671
+ this.textDir = localStorage.getItem('language') == 'ar' ? 'rtl' : 'ltr';
7617
7672
  this.controlValidationService.isCreatedBefor = false;
7618
7673
  this.loadImage();
7619
7674
  if (!this.options.ViewType)