@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
|
@@ -648,6 +648,9 @@ var AssetService = /** @class */ (function () {
|
|
|
648
648
|
if (isFilter && this.keyword.length) {
|
|
649
649
|
params = params.set('keyword', this.keyword || '');
|
|
650
650
|
}
|
|
651
|
+
if (this.dialogConfig.allowedType) {
|
|
652
|
+
params = params.set('fileType', this.dialogConfig.allowedType);
|
|
653
|
+
}
|
|
651
654
|
return this._api.get(url, { params: params });
|
|
652
655
|
};
|
|
653
656
|
/**
|
|
@@ -1340,6 +1343,7 @@ var UploadAssetsService = /** @class */ (function () {
|
|
|
1340
1343
|
this.messageErrors = {
|
|
1341
1344
|
size: "File size should be upto",
|
|
1342
1345
|
ext: "Only supported file extension:",
|
|
1346
|
+
replace: "The replacement file should be the same extension with old one:",
|
|
1343
1347
|
};
|
|
1344
1348
|
this.errorObs$ = new BehaviorSubject(true);
|
|
1345
1349
|
this.baseUrl = this._env.asset2Url;
|
|
@@ -1471,7 +1475,7 @@ var UploadAssetsService = /** @class */ (function () {
|
|
|
1471
1475
|
* @param {?} parentAssetId
|
|
1472
1476
|
* @return {?}
|
|
1473
1477
|
*/
|
|
1474
|
-
UploadAssetsService.prototype.
|
|
1478
|
+
UploadAssetsService.prototype.uploadMultipleAssets = /**
|
|
1475
1479
|
* @param {?} parentAssetId
|
|
1476
1480
|
* @return {?}
|
|
1477
1481
|
*/
|
|
@@ -1486,7 +1490,7 @@ var UploadAssetsService = /** @class */ (function () {
|
|
|
1486
1490
|
for (var files_1 = __values(files), files_1_1 = files_1.next(); !files_1_1.done; files_1_1 = files_1.next()) {
|
|
1487
1491
|
var file = files_1_1.value;
|
|
1488
1492
|
/** @type {?} */
|
|
1489
|
-
var ext = "." + file.type.split('/')[1];
|
|
1493
|
+
var ext = file.type.indexOf('svg') > -1 ? '.svg' : "." + file.type.split('/')[1];
|
|
1490
1494
|
/** @type {?} */
|
|
1491
1495
|
var originName = file.name;
|
|
1492
1496
|
/** @type {?} */
|
|
@@ -3143,7 +3147,7 @@ var UploadDialogComponent = /** @class */ (function () {
|
|
|
3143
3147
|
var _this = this;
|
|
3144
3148
|
this.isLoading = true;
|
|
3145
3149
|
this.uploadAssetsService
|
|
3146
|
-
.
|
|
3150
|
+
.uploadMultipleAssets(this.data.currentAssetId)
|
|
3147
3151
|
.pipe(takeUntil(this.destroy$))
|
|
3148
3152
|
.subscribe((/**
|
|
3149
3153
|
* @param {?} res
|
|
@@ -3941,7 +3945,7 @@ var AssetDialogComponent = /** @class */ (function () {
|
|
|
3941
3945
|
var errors = [];
|
|
3942
3946
|
if (this.acceptTypes.indexOf(ext) < 0) {
|
|
3943
3947
|
/** @type {?} */
|
|
3944
|
-
var extError = this.assetService.messageErrors.
|
|
3948
|
+
var extError = this.assetService.messageErrors.replace + " " + this.acceptTypes.join(', ');
|
|
3945
3949
|
errors.push(extError);
|
|
3946
3950
|
}
|
|
3947
3951
|
if (this.assetService.supportedSize < file.size) {
|