@rs-pk/asset-management 1.0.0 → 1.0.11
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/bundles/rs-pk-asset-management.umd.js +8 -4
- package/bundles/rs-pk-asset-management.umd.js.map +1 -1
- package/bundles/rs-pk-asset-management.umd.min.js +2 -2
- package/bundles/rs-pk-asset-management.umd.min.js.map +1 -1
- package/esm2015/lib/components/partial/asset-dialog/asset-dialog.component.js +2 -2
- package/esm2015/lib/components/partial/upload-dialog/upload-dialog.component.js +2 -2
- package/esm2015/lib/services/asset.service.js +4 -1
- package/esm2015/lib/services/upload-assets.service.js +4 -3
- package/esm5/lib/components/partial/asset-dialog/asset-dialog.component.js +2 -2
- package/esm5/lib/components/partial/upload-dialog/upload-dialog.component.js +2 -2
- package/esm5/lib/services/asset.service.js +4 -1
- package/esm5/lib/services/upload-assets.service.js +4 -3
- package/fesm2015/rs-pk-asset-management.js +8 -4
- package/fesm2015/rs-pk-asset-management.js.map +1 -1
- package/fesm5/rs-pk-asset-management.js +8 -4
- package/fesm5/rs-pk-asset-management.js.map +1 -1
- package/lib/services/upload-assets.service.d.ts +2 -1
- package/package.json +1 -1
- package/rs-pk-asset-management.metadata.json +1 -1
|
@@ -844,6 +844,9 @@
|
|
|
844
844
|
if (isFilter && this.keyword.length) {
|
|
845
845
|
params = params.set('keyword', this.keyword || '');
|
|
846
846
|
}
|
|
847
|
+
if (this.dialogConfig.allowedType) {
|
|
848
|
+
params = params.set('fileType', this.dialogConfig.allowedType);
|
|
849
|
+
}
|
|
847
850
|
return this._api.get(url, { params: params });
|
|
848
851
|
};
|
|
849
852
|
/**
|
|
@@ -1536,6 +1539,7 @@
|
|
|
1536
1539
|
this.messageErrors = {
|
|
1537
1540
|
size: "File size should be upto",
|
|
1538
1541
|
ext: "Only supported file extension:",
|
|
1542
|
+
replace: "The replacement file should be the same extension with old one:",
|
|
1539
1543
|
};
|
|
1540
1544
|
this.errorObs$ = new rxjs.BehaviorSubject(true);
|
|
1541
1545
|
this.baseUrl = this._env.asset2Url;
|
|
@@ -1667,7 +1671,7 @@
|
|
|
1667
1671
|
* @param {?} parentAssetId
|
|
1668
1672
|
* @return {?}
|
|
1669
1673
|
*/
|
|
1670
|
-
UploadAssetsService.prototype.
|
|
1674
|
+
UploadAssetsService.prototype.uploadMultipleAssets = /**
|
|
1671
1675
|
* @param {?} parentAssetId
|
|
1672
1676
|
* @return {?}
|
|
1673
1677
|
*/
|
|
@@ -1682,7 +1686,7 @@
|
|
|
1682
1686
|
for (var files_1 = __values(files), files_1_1 = files_1.next(); !files_1_1.done; files_1_1 = files_1.next()) {
|
|
1683
1687
|
var file = files_1_1.value;
|
|
1684
1688
|
/** @type {?} */
|
|
1685
|
-
var ext = "." + file.type.split('/')[1];
|
|
1689
|
+
var ext = file.type.indexOf('svg') > -1 ? '.svg' : "." + file.type.split('/')[1];
|
|
1686
1690
|
/** @type {?} */
|
|
1687
1691
|
var originName = file.name;
|
|
1688
1692
|
/** @type {?} */
|
|
@@ -3339,7 +3343,7 @@
|
|
|
3339
3343
|
var _this = this;
|
|
3340
3344
|
this.isLoading = true;
|
|
3341
3345
|
this.uploadAssetsService
|
|
3342
|
-
.
|
|
3346
|
+
.uploadMultipleAssets(this.data.currentAssetId)
|
|
3343
3347
|
.pipe(operators.takeUntil(this.destroy$))
|
|
3344
3348
|
.subscribe((/**
|
|
3345
3349
|
* @param {?} res
|
|
@@ -4137,7 +4141,7 @@
|
|
|
4137
4141
|
var errors = [];
|
|
4138
4142
|
if (this.acceptTypes.indexOf(ext) < 0) {
|
|
4139
4143
|
/** @type {?} */
|
|
4140
|
-
var extError = this.assetService.messageErrors.
|
|
4144
|
+
var extError = this.assetService.messageErrors.replace + " " + this.acceptTypes.join(', ');
|
|
4141
4145
|
errors.push(extError);
|
|
4142
4146
|
}
|
|
4143
4147
|
if (this.assetService.supportedSize < file.size) {
|