@rs-pk/asset-management 1.0.17 → 1.0.18
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 +28 -7
- 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/asset-management.component.js +6 -1
- package/esm2015/lib/components/partial/asset-dialog/asset-dialog.component.js +16 -9
- package/esm2015/lib/components/partial/asset-management-dialog/asset-management-dialog.component.js +2 -1
- package/esm2015/lib/components/partial/node-details/node-details.component.js +2 -1
- package/esm2015/lib/components/partial/upload-dialog/upload-dialog.component.js +6 -1
- package/esm2015/lib/models/asset.model.js +3 -1
- package/esm2015/lib/services/asset.service.js +3 -1
- package/esm2015/lib/services/upload-assets.service.js +1 -1
- package/esm5/lib/asset-management.component.js +6 -1
- package/esm5/lib/components/partial/asset-dialog/asset-dialog.component.js +14 -8
- package/esm5/lib/components/partial/asset-management-dialog/asset-management-dialog.component.js +2 -1
- package/esm5/lib/components/partial/node-details/node-details.component.js +2 -1
- package/esm5/lib/components/partial/upload-dialog/upload-dialog.component.js +6 -1
- package/esm5/lib/models/asset.model.js +3 -1
- package/esm5/lib/services/asset.service.js +3 -1
- package/esm5/lib/services/upload-assets.service.js +1 -1
- package/fesm2015/rs-pk-asset-management.js +30 -8
- package/fesm2015/rs-pk-asset-management.js.map +1 -1
- package/fesm5/rs-pk-asset-management.js +28 -7
- package/fesm5/rs-pk-asset-management.js.map +1 -1
- package/lib/asset-management.component.d.ts +1 -0
- package/lib/components/partial/asset-dialog/asset-dialog.component.d.ts +4 -2
- package/lib/components/partial/upload-dialog/upload-dialog.component.d.ts +1 -0
- package/lib/models/asset.model.d.ts +1 -0
- package/lib/services/asset.service.d.ts +1 -0
- package/lib/services/upload-assets.service.d.ts +1 -1
- package/package.json +1 -1
- package/rs-pk-asset-management.metadata.json +1 -1
|
@@ -370,6 +370,8 @@
|
|
|
370
370
|
DialogConfig.prototype.limit;
|
|
371
371
|
/** @type {?} */
|
|
372
372
|
DialogConfig.prototype.allowedType;
|
|
373
|
+
/** @type {?} */
|
|
374
|
+
DialogConfig.prototype.maxSize;
|
|
373
375
|
}
|
|
374
376
|
|
|
375
377
|
/**
|
|
@@ -923,6 +925,8 @@
|
|
|
923
925
|
AssetService.prototype.sortOrder;
|
|
924
926
|
/** @type {?} */
|
|
925
927
|
AssetService.prototype.dialogConfig;
|
|
928
|
+
/** @type {?} */
|
|
929
|
+
AssetService.prototype.maxSize;
|
|
926
930
|
/**
|
|
927
931
|
* @type {?}
|
|
928
932
|
* @private
|
|
@@ -1908,6 +1912,7 @@
|
|
|
1908
1912
|
return;
|
|
1909
1913
|
}
|
|
1910
1914
|
this.assetService.dialogConfig = data;
|
|
1915
|
+
this.assetService.maxSize = data.maxSize;
|
|
1911
1916
|
};
|
|
1912
1917
|
/**
|
|
1913
1918
|
* @return {?}
|
|
@@ -1974,6 +1979,7 @@
|
|
|
1974
1979
|
* @return {?}
|
|
1975
1980
|
*/
|
|
1976
1981
|
function () {
|
|
1982
|
+
this.assetService.maxSize = this.maxSize;
|
|
1977
1983
|
initialReducer(this.svc.getDispatcher());
|
|
1978
1984
|
this.bindSubscriber();
|
|
1979
1985
|
};
|
|
@@ -2024,6 +2030,7 @@
|
|
|
2024
2030
|
var config = {
|
|
2025
2031
|
limit: this.limit,
|
|
2026
2032
|
allowedType: this.allowedType,
|
|
2033
|
+
maxSize: this.maxSize
|
|
2027
2034
|
};
|
|
2028
2035
|
/** @type {?} */
|
|
2029
2036
|
var dialogRef = this.dialog.open(AssetManagementDialogComponent, {
|
|
@@ -2072,6 +2079,7 @@
|
|
|
2072
2079
|
isDialog: [{ type: core.Input }],
|
|
2073
2080
|
limit: [{ type: core.Input }],
|
|
2074
2081
|
allowedType: [{ type: core.Input }],
|
|
2082
|
+
maxSize: [{ type: core.Input }],
|
|
2075
2083
|
assetChange: [{ type: core.Output }]
|
|
2076
2084
|
};
|
|
2077
2085
|
return AssetManagementComponent;
|
|
@@ -2084,6 +2092,8 @@
|
|
|
2084
2092
|
/** @type {?} */
|
|
2085
2093
|
AssetManagementComponent.prototype.allowedType;
|
|
2086
2094
|
/** @type {?} */
|
|
2095
|
+
AssetManagementComponent.prototype.maxSize;
|
|
2096
|
+
/** @type {?} */
|
|
2087
2097
|
AssetManagementComponent.prototype.assetChange;
|
|
2088
2098
|
/**
|
|
2089
2099
|
* @type {?}
|
|
@@ -3269,6 +3279,8 @@
|
|
|
3269
3279
|
IData$3.prototype.currentAssetId;
|
|
3270
3280
|
/** @type {?|undefined} */
|
|
3271
3281
|
IData$3.prototype.fileType;
|
|
3282
|
+
/** @type {?|undefined} */
|
|
3283
|
+
IData$3.prototype.maxSize;
|
|
3272
3284
|
}
|
|
3273
3285
|
var UploadDialogComponent = /** @class */ (function () {
|
|
3274
3286
|
function UploadDialogComponent(data, dialogRef, changeDetectorRef, uploadAssetsService) {
|
|
@@ -3284,6 +3296,9 @@
|
|
|
3284
3296
|
this.data.fileType === 'Image'
|
|
3285
3297
|
? __spread(this.uploadAssetsService.imageExtension) : __spread(this.uploadAssetsService.documentExtension);
|
|
3286
3298
|
}
|
|
3299
|
+
if (this.data.maxSize) {
|
|
3300
|
+
this.uploadAssetsService.supportedSize = this.data.maxSize * 1024 * 1024;
|
|
3301
|
+
}
|
|
3287
3302
|
}
|
|
3288
3303
|
/**
|
|
3289
3304
|
* @return {?}
|
|
@@ -3925,13 +3940,14 @@
|
|
|
3925
3940
|
IData$4.prototype.name;
|
|
3926
3941
|
}
|
|
3927
3942
|
var AssetDialogComponent = /** @class */ (function () {
|
|
3928
|
-
function AssetDialogComponent(_env, dialog, data, dialogRef, fileSize,
|
|
3943
|
+
function AssetDialogComponent(_env, dialog, data, dialogRef, fileSize, uploadAssetsService, assetsService, fileService, domSanitizer, svc) {
|
|
3929
3944
|
this._env = _env;
|
|
3930
3945
|
this.dialog = dialog;
|
|
3931
3946
|
this.data = data;
|
|
3932
3947
|
this.dialogRef = dialogRef;
|
|
3933
3948
|
this.fileSize = fileSize;
|
|
3934
|
-
this.
|
|
3949
|
+
this.uploadAssetsService = uploadAssetsService;
|
|
3950
|
+
this.assetsService = assetsService;
|
|
3935
3951
|
this.fileService = fileService;
|
|
3936
3952
|
this.domSanitizer = domSanitizer;
|
|
3937
3953
|
this.svc = svc;
|
|
@@ -3959,6 +3975,7 @@
|
|
|
3959
3975
|
* @return {?}
|
|
3960
3976
|
*/
|
|
3961
3977
|
function () {
|
|
3978
|
+
this.uploadAssetsService.supportedSize = this.assetsService.maxSize * 1024 * 1024;
|
|
3962
3979
|
this.linkDownload = this._env.asset2Url + "/File/Download/" + this.data.assetId;
|
|
3963
3980
|
this.getAssetDetail();
|
|
3964
3981
|
};
|
|
@@ -4130,13 +4147,13 @@
|
|
|
4130
4147
|
var errors = [];
|
|
4131
4148
|
if (this.acceptTypes.indexOf(ext) < 0) {
|
|
4132
4149
|
/** @type {?} */
|
|
4133
|
-
var extError = this.
|
|
4150
|
+
var extError = this.uploadAssetsService.messageErrors.replace + " " + this.acceptTypes.join(', ');
|
|
4134
4151
|
errors.push(extError);
|
|
4135
4152
|
}
|
|
4136
|
-
if (this.
|
|
4153
|
+
if (this.uploadAssetsService.supportedSize < file.size) {
|
|
4137
4154
|
/** @type {?} */
|
|
4138
|
-
var maxSize = this.fileSize.transform(this.
|
|
4139
|
-
errors.push(this.
|
|
4155
|
+
var maxSize = this.fileSize.transform(this.uploadAssetsService.supportedSize, 0);
|
|
4156
|
+
errors.push(this.uploadAssetsService.messageErrors.size + " " + maxSize);
|
|
4140
4157
|
}
|
|
4141
4158
|
if (errors.length) {
|
|
4142
4159
|
this.replaceMessage = errors.join('<br/>');
|
|
@@ -4244,6 +4261,7 @@
|
|
|
4244
4261
|
{ type: dialog.MatDialogRef },
|
|
4245
4262
|
{ type: FileSizePipe },
|
|
4246
4263
|
{ type: UploadAssetsService },
|
|
4264
|
+
{ type: AssetService },
|
|
4247
4265
|
{ type: FileService },
|
|
4248
4266
|
{ type: platformBrowser.DomSanitizer },
|
|
4249
4267
|
{ type: AssetManagementService }
|
|
@@ -4307,7 +4325,9 @@
|
|
|
4307
4325
|
*/
|
|
4308
4326
|
AssetDialogComponent.prototype.fileSize;
|
|
4309
4327
|
/** @type {?} */
|
|
4310
|
-
AssetDialogComponent.prototype.
|
|
4328
|
+
AssetDialogComponent.prototype.uploadAssetsService;
|
|
4329
|
+
/** @type {?} */
|
|
4330
|
+
AssetDialogComponent.prototype.assetsService;
|
|
4311
4331
|
/**
|
|
4312
4332
|
* @type {?}
|
|
4313
4333
|
* @private
|
|
@@ -5823,6 +5843,7 @@
|
|
|
5823
5843
|
data: {
|
|
5824
5844
|
currentAssetId: this.currentFolder.AssetId,
|
|
5825
5845
|
fileType: this.assetService.dialogConfig.allowedType,
|
|
5846
|
+
maxSize: this.assetService.maxSize
|
|
5826
5847
|
},
|
|
5827
5848
|
panelClass: 'lib-dialog--medium',
|
|
5828
5849
|
});
|