@wizishop/img-manager 15.2.1 → 15.2.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.
- package/esm2020/lib/components/images-view/images-view.component.mjs +4 -4
- package/esm2020/lib/components/img-editor/img-editor.component.mjs +1 -1
- package/esm2020/lib/components/img-upload/img-upload.component.mjs +13 -10
- package/esm2020/lib/services/api.service.mjs +1 -1
- package/esm2020/lib/services/img-manager.service.mjs +1 -1
- package/esm2020/lib/services/pexels.service.mjs +2 -2
- package/fesm2015/wizishop-img-manager.mjs +17 -14
- package/fesm2015/wizishop-img-manager.mjs.map +1 -1
- package/fesm2020/wizishop-img-manager.mjs +16 -13
- package/fesm2020/wizishop-img-manager.mjs.map +1 -1
- package/lib/services/api.service.d.ts +8 -8
- package/lib/services/img-manager.service.d.ts +4 -4
- package/lib/services/rename-picture.service.d.ts +1 -1
- package/lib/services/upload.service.d.ts +3 -2
- package/package.json +1 -1
- package/wizishop-img-manager-15.2.3.tgz +0 -0
- package/wz-img-manager.scss +58 -58
- package/wizishop-img-manager-15.2.1.tgz +0 -0
|
@@ -1083,17 +1083,20 @@ class ImgUploadComponent {
|
|
|
1083
1083
|
formData.append('image', file, file.name);
|
|
1084
1084
|
imgToUploadList.push(this.uploadService.uploadFile(formData));
|
|
1085
1085
|
}
|
|
1086
|
-
forkJoin(imgToUploadList).subscribe(
|
|
1087
|
-
|
|
1086
|
+
forkJoin(imgToUploadList).subscribe({
|
|
1087
|
+
next: (img) => {
|
|
1088
|
+
this.onImgUpload(img),
|
|
1089
|
+
this.isLoading = false;
|
|
1090
|
+
},
|
|
1091
|
+
error: error => {
|
|
1092
|
+
if (error?.error?.message && error.statusText !== 'Bad Request') {
|
|
1093
|
+
this.alertService.openAlertWithBackendResponse(this.errorUploadingImg, error.error.message);
|
|
1094
|
+
}
|
|
1095
|
+
else {
|
|
1096
|
+
this.alertService.openAlert(this.errorUploadingImg);
|
|
1097
|
+
}
|
|
1088
1098
|
this.isLoading = false;
|
|
1089
|
-
}, error => {
|
|
1090
|
-
if (error?.error?.message && error.statusText !== 'Bad Request') {
|
|
1091
|
-
this.alertService.openAlertWithBackendResponse(this.errorUploadingImg, error.error.message);
|
|
1092
|
-
}
|
|
1093
|
-
else {
|
|
1094
|
-
this.alertService.openAlert(this.errorUploadingImg);
|
|
1095
1099
|
}
|
|
1096
|
-
this.isLoading = false;
|
|
1097
1100
|
});
|
|
1098
1101
|
}
|
|
1099
1102
|
/**
|
|
@@ -1172,7 +1175,7 @@ class PexelsService {
|
|
|
1172
1175
|
request = `/search?query=${toSearch}&per_page=${perPage}&page=${page}&locale=${this.lang}`;
|
|
1173
1176
|
}
|
|
1174
1177
|
else { // Search by category or display Pexels selection
|
|
1175
|
-
const shopCategory = this.apiService.
|
|
1178
|
+
const shopCategory = this.apiService.getShopCategory();
|
|
1176
1179
|
// Search by shop category
|
|
1177
1180
|
if (shopCategory && shopCategory !== 'other' && shopCategory !== 'btob') {
|
|
1178
1181
|
request = `/search?query=${shopCategory}&per_page=${perPage}&page=${page}&locale=en-US`;
|
|
@@ -3397,11 +3400,11 @@ class ImagesViewComponent {
|
|
|
3397
3400
|
}
|
|
3398
3401
|
this.isTotalRetrieved = false;
|
|
3399
3402
|
this.imgManager.getShopTotalImgList(this.params).pipe(take(1)).subscribe({
|
|
3400
|
-
next:
|
|
3403
|
+
next: total => {
|
|
3401
3404
|
this.previousSearchValue = searchValue;
|
|
3402
3405
|
this.isTotalRetrieved = true;
|
|
3403
|
-
this.length =
|
|
3404
|
-
this.tableFilters.totalItems =
|
|
3406
|
+
this.length = total;
|
|
3407
|
+
this.tableFilters.totalItems = total;
|
|
3405
3408
|
},
|
|
3406
3409
|
error: error => {
|
|
3407
3410
|
//this.alertService.openAlert(this.errorGetTotalImg);
|