@bnsights/bbsf-controls 1.0.62 → 1.0.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,6 +5,11 @@ BBSF Controls package is part of BBSF 3 packages. It has all the form controls t
5
5
  For more info please visit [BBSF Controls documenation](https://bbsfadmin.bnsights.com/controls) or [BBSF documentation](https://bnsightsprojects.visualstudio.com/BBSF%203/_wiki/wikis/BBSF-3.wiki/65/BBSF-Documentation)
6
6
 
7
7
  # Change Log
8
+
9
+ ##1.0.63 / 18-10-2022
10
+ ===================
11
+ * Fix Profile Image Upload control
12
+
8
13
  ##1.0.62 / 11-10-2022
9
14
  ===================
10
15
  * Fix modal dismiss in form submission success
@@ -3936,6 +3936,16 @@
3936
3936
  if (this.options.ImageUploadAcceptsTypes != null) {
3937
3937
  this.options.ImageUploadAcceptsTypes;
3938
3938
  }
3939
+ if (this.options.Value != null) {
3940
+ var imgURL = this.options.Value["fileURL"];
3941
+ if (imgURL != "" && imgURL != undefined && imgURL != null)
3942
+ this.ImageSource = imgURL;
3943
+ var element = this.options.Value;
3944
+ this.FileLikeObject = new ng2FileUpload.FileLikeObject({
3945
+ name: element.FileName,
3946
+ });
3947
+ this.uploader.addToQueue([this.FileLikeObject]);
3948
+ }
3939
3949
  if (this.options.LabelKey != null && this.options.LabelKey != "")
3940
3950
  this.options.LabelValue = this.UtilityService.getResourceValue(this.options.LabelKey);
3941
3951
  if (this.options.ImageUploadAcceptsTypes != null && this.options.ImageUploadAcceptsTypes.length > 0) {
@@ -4072,9 +4082,6 @@
4072
4082
  ProfileImageUploaderComponent.prototype.cropImage = function () {
4073
4083
  var _this = this;
4074
4084
  this.ProfilePictureDTO.FileName = this.EventFile.name;
4075
- this.ProfilePictureDTO.Original = this.EventFile.name + "Original";
4076
- this.ProfilePictureDTO.MediumPicture = this.EventFile.name + "MediumPicture";
4077
- this.ProfilePictureDTO.SmallPicture = this.EventFile.name + "SmallPicture";
4078
4085
  var Cropper = this.angularCropper.cropper;
4079
4086
  var profilePicturCropper = Cropper.getCroppedCanvas({
4080
4087
  width: 400,
@@ -4131,6 +4138,7 @@
4131
4138
  FileSizeInMB: ((BlobFile.size / 1000) / 1000),
4132
4139
  };
4133
4140
  _this.ProfilePictureDTO.profilePicture = FileObject;
4141
+ _this.ProfilePictureDTO.MediumPicture = FileObject.FileName + "," + FileObject.FileBase64;
4134
4142
  _this.files.push(BlobFile);
4135
4143
  break;
4136
4144
  case "AvatarPictureCropper":
@@ -4141,6 +4149,7 @@
4141
4149
  FileSizeInMB: ((BlobFile.size / 1000) / 1000),
4142
4150
  };
4143
4151
  _this.ProfilePictureDTO.AvatarPicture = FileObject;
4152
+ _this.ProfilePictureDTO.SmallPicture = FileObject.FileName + "," + FileObject.FileBase64;
4144
4153
  break;
4145
4154
  case "OriginalPictureCropper":
4146
4155
  FileObject = {
@@ -4150,6 +4159,7 @@
4150
4159
  FileSizeInMB: ((BlobFile.size / 1000) / 1000),
4151
4160
  };
4152
4161
  _this.ProfilePictureDTO.OriginalPicture = FileObject;
4162
+ _this.ProfilePictureDTO.Original = FileObject.FileName + "," + FileObject.FileBase64;
4153
4163
  _this.group.get(_this.options.Name).setValue(_this.ProfilePictureDTO);
4154
4164
  _this.OnChange.emit(_this.group.get(_this.options.Name).value);
4155
4165
  break;