ngx-wapp-components 2.3.7-alpha.2 → 2.3.7-alpha.3
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.
|
@@ -6855,6 +6855,7 @@ class WImageFileUploaderComponent {
|
|
|
6855
6855
|
if (this.activeImageUpload == true) {
|
|
6856
6856
|
if (this.cropperImages.length > 0) {
|
|
6857
6857
|
let base64Images = this.mapToObjectB64(this.cropperImages);
|
|
6858
|
+
console.log(base64Images);
|
|
6858
6859
|
this.isUploadingMultiMode = true;
|
|
6859
6860
|
this.http.post(this.uploadUrl, base64Images, { headers: this.headers }).subscribe({
|
|
6860
6861
|
next: (imagesUploaded) => {
|
|
@@ -6971,7 +6972,8 @@ class WImageFileUploaderComponent {
|
|
|
6971
6972
|
}
|
|
6972
6973
|
}
|
|
6973
6974
|
updateImage(imagesToUpdate) {
|
|
6974
|
-
|
|
6975
|
+
console.log(imagesToUpdate);
|
|
6976
|
+
let updateUrlFinal = this.updateUrl.replace('{id}', this.identificatorValue);
|
|
6975
6977
|
this.http.put(updateUrlFinal, imagesToUpdate, { headers: this.headers }).subscribe({
|
|
6976
6978
|
next: (imagesUpdated) => {
|
|
6977
6979
|
this.disableMoveButtons = false;
|
|
@@ -7042,11 +7044,21 @@ class WImageFileUploaderComponent {
|
|
|
7042
7044
|
base64: img.base64,
|
|
7043
7045
|
name: this.sanitizeImageName(img.name),
|
|
7044
7046
|
fileBase64: img.fileBase64,
|
|
7045
|
-
...(
|
|
7047
|
+
...(this.activePositionProperty ? { position: this.startPostionFromZero ? 0 : 1 } : null),
|
|
7046
7048
|
...(this.activeTypeMediaProperty ? { typeMedia: TypeMedia.Image } : null)
|
|
7047
7049
|
};
|
|
7048
7050
|
});
|
|
7049
7051
|
}
|
|
7052
|
+
mapFromImageUploaded(images) {
|
|
7053
|
+
return images.map(img => {
|
|
7054
|
+
return {
|
|
7055
|
+
name: img.mediaName,
|
|
7056
|
+
position: img.position,
|
|
7057
|
+
base64: img.mediaUrl,
|
|
7058
|
+
typeMedia: TypeMedia.Url
|
|
7059
|
+
};
|
|
7060
|
+
});
|
|
7061
|
+
}
|
|
7050
7062
|
sanitizeImageName(name) {
|
|
7051
7063
|
name = name
|
|
7052
7064
|
.normalize('NFD')
|