@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
|
@@ -160,6 +160,8 @@ if (false) {
|
|
|
160
160
|
DialogConfig.prototype.limit;
|
|
161
161
|
/** @type {?} */
|
|
162
162
|
DialogConfig.prototype.allowedType;
|
|
163
|
+
/** @type {?} */
|
|
164
|
+
DialogConfig.prototype.maxSize;
|
|
163
165
|
}
|
|
164
166
|
|
|
165
167
|
/**
|
|
@@ -642,6 +644,8 @@ if (false) {
|
|
|
642
644
|
AssetService.prototype.sortOrder;
|
|
643
645
|
/** @type {?} */
|
|
644
646
|
AssetService.prototype.dialogConfig;
|
|
647
|
+
/** @type {?} */
|
|
648
|
+
AssetService.prototype.maxSize;
|
|
645
649
|
/**
|
|
646
650
|
* @type {?}
|
|
647
651
|
* @private
|
|
@@ -1488,6 +1492,7 @@ class AssetManagementDialogComponent {
|
|
|
1488
1492
|
return;
|
|
1489
1493
|
}
|
|
1490
1494
|
this.assetService.dialogConfig = data;
|
|
1495
|
+
this.assetService.maxSize = data.maxSize;
|
|
1491
1496
|
}
|
|
1492
1497
|
/**
|
|
1493
1498
|
* @return {?}
|
|
@@ -1552,6 +1557,7 @@ class AssetManagementComponent {
|
|
|
1552
1557
|
* @return {?}
|
|
1553
1558
|
*/
|
|
1554
1559
|
ngOnInit() {
|
|
1560
|
+
this.assetService.maxSize = this.maxSize;
|
|
1555
1561
|
initialReducer(this.svc.getDispatcher());
|
|
1556
1562
|
this.bindSubscriber();
|
|
1557
1563
|
}
|
|
@@ -1590,6 +1596,7 @@ class AssetManagementComponent {
|
|
|
1590
1596
|
const config = {
|
|
1591
1597
|
limit: this.limit,
|
|
1592
1598
|
allowedType: this.allowedType,
|
|
1599
|
+
maxSize: this.maxSize
|
|
1593
1600
|
};
|
|
1594
1601
|
/** @type {?} */
|
|
1595
1602
|
const dialogRef = this.dialog.open(AssetManagementDialogComponent, {
|
|
@@ -1636,6 +1643,7 @@ AssetManagementComponent.propDecorators = {
|
|
|
1636
1643
|
isDialog: [{ type: Input }],
|
|
1637
1644
|
limit: [{ type: Input }],
|
|
1638
1645
|
allowedType: [{ type: Input }],
|
|
1646
|
+
maxSize: [{ type: Input }],
|
|
1639
1647
|
assetChange: [{ type: Output }]
|
|
1640
1648
|
};
|
|
1641
1649
|
if (false) {
|
|
@@ -1646,6 +1654,8 @@ if (false) {
|
|
|
1646
1654
|
/** @type {?} */
|
|
1647
1655
|
AssetManagementComponent.prototype.allowedType;
|
|
1648
1656
|
/** @type {?} */
|
|
1657
|
+
AssetManagementComponent.prototype.maxSize;
|
|
1658
|
+
/** @type {?} */
|
|
1649
1659
|
AssetManagementComponent.prototype.assetChange;
|
|
1650
1660
|
/**
|
|
1651
1661
|
* @type {?}
|
|
@@ -2686,6 +2696,8 @@ if (false) {
|
|
|
2686
2696
|
IData$3.prototype.currentAssetId;
|
|
2687
2697
|
/** @type {?|undefined} */
|
|
2688
2698
|
IData$3.prototype.fileType;
|
|
2699
|
+
/** @type {?|undefined} */
|
|
2700
|
+
IData$3.prototype.maxSize;
|
|
2689
2701
|
}
|
|
2690
2702
|
class UploadDialogComponent {
|
|
2691
2703
|
/**
|
|
@@ -2708,6 +2720,9 @@ class UploadDialogComponent {
|
|
|
2708
2720
|
? [...this.uploadAssetsService.imageExtension]
|
|
2709
2721
|
: [...this.uploadAssetsService.documentExtension];
|
|
2710
2722
|
}
|
|
2723
|
+
if (this.data.maxSize) {
|
|
2724
|
+
this.uploadAssetsService.supportedSize = this.data.maxSize * 1024 * 1024;
|
|
2725
|
+
}
|
|
2711
2726
|
}
|
|
2712
2727
|
/**
|
|
2713
2728
|
* @return {?}
|
|
@@ -3279,18 +3294,20 @@ class AssetDialogComponent {
|
|
|
3279
3294
|
* @param {?} data
|
|
3280
3295
|
* @param {?} dialogRef
|
|
3281
3296
|
* @param {?} fileSize
|
|
3282
|
-
* @param {?}
|
|
3297
|
+
* @param {?} uploadAssetsService
|
|
3298
|
+
* @param {?} assetsService
|
|
3283
3299
|
* @param {?} fileService
|
|
3284
3300
|
* @param {?} domSanitizer
|
|
3285
3301
|
* @param {?} svc
|
|
3286
3302
|
*/
|
|
3287
|
-
constructor(_env, dialog, data, dialogRef, fileSize,
|
|
3303
|
+
constructor(_env, dialog, data, dialogRef, fileSize, uploadAssetsService, assetsService, fileService, domSanitizer, svc) {
|
|
3288
3304
|
this._env = _env;
|
|
3289
3305
|
this.dialog = dialog;
|
|
3290
3306
|
this.data = data;
|
|
3291
3307
|
this.dialogRef = dialogRef;
|
|
3292
3308
|
this.fileSize = fileSize;
|
|
3293
|
-
this.
|
|
3309
|
+
this.uploadAssetsService = uploadAssetsService;
|
|
3310
|
+
this.assetsService = assetsService;
|
|
3294
3311
|
this.fileService = fileService;
|
|
3295
3312
|
this.domSanitizer = domSanitizer;
|
|
3296
3313
|
this.svc = svc;
|
|
@@ -3315,6 +3332,7 @@ class AssetDialogComponent {
|
|
|
3315
3332
|
* @return {?}
|
|
3316
3333
|
*/
|
|
3317
3334
|
ngOnInit() {
|
|
3335
|
+
this.uploadAssetsService.supportedSize = this.assetsService.maxSize * 1024 * 1024;
|
|
3318
3336
|
this.linkDownload = `${this._env.asset2Url}/File/Download/${this.data.assetId}`;
|
|
3319
3337
|
this.getAssetDetail();
|
|
3320
3338
|
}
|
|
@@ -3457,13 +3475,13 @@ class AssetDialogComponent {
|
|
|
3457
3475
|
const errors = [];
|
|
3458
3476
|
if (this.acceptTypes.indexOf(ext) < 0) {
|
|
3459
3477
|
/** @type {?} */
|
|
3460
|
-
const extError = `${this.
|
|
3478
|
+
const extError = `${this.uploadAssetsService.messageErrors.replace} ${this.acceptTypes.join(', ')}`;
|
|
3461
3479
|
errors.push(extError);
|
|
3462
3480
|
}
|
|
3463
|
-
if (this.
|
|
3481
|
+
if (this.uploadAssetsService.supportedSize < file.size) {
|
|
3464
3482
|
/** @type {?} */
|
|
3465
|
-
const maxSize = this.fileSize.transform(this.
|
|
3466
|
-
errors.push(`${this.
|
|
3483
|
+
const maxSize = this.fileSize.transform(this.uploadAssetsService.supportedSize, 0);
|
|
3484
|
+
errors.push(`${this.uploadAssetsService.messageErrors.size} ${maxSize}`);
|
|
3467
3485
|
}
|
|
3468
3486
|
if (errors.length) {
|
|
3469
3487
|
this.replaceMessage = errors.join('<br/>');
|
|
@@ -3552,6 +3570,7 @@ AssetDialogComponent.ctorParameters = () => [
|
|
|
3552
3570
|
{ type: MatDialogRef },
|
|
3553
3571
|
{ type: FileSizePipe },
|
|
3554
3572
|
{ type: UploadAssetsService },
|
|
3573
|
+
{ type: AssetService },
|
|
3555
3574
|
{ type: FileService },
|
|
3556
3575
|
{ type: DomSanitizer },
|
|
3557
3576
|
{ type: AssetManagementService }
|
|
@@ -3613,7 +3632,9 @@ if (false) {
|
|
|
3613
3632
|
*/
|
|
3614
3633
|
AssetDialogComponent.prototype.fileSize;
|
|
3615
3634
|
/** @type {?} */
|
|
3616
|
-
AssetDialogComponent.prototype.
|
|
3635
|
+
AssetDialogComponent.prototype.uploadAssetsService;
|
|
3636
|
+
/** @type {?} */
|
|
3637
|
+
AssetDialogComponent.prototype.assetsService;
|
|
3617
3638
|
/**
|
|
3618
3639
|
* @type {?}
|
|
3619
3640
|
* @private
|
|
@@ -4898,6 +4919,7 @@ class NodeDetailsComponent {
|
|
|
4898
4919
|
data: {
|
|
4899
4920
|
currentAssetId: this.currentFolder.AssetId,
|
|
4900
4921
|
fileType: this.assetService.dialogConfig.allowedType,
|
|
4922
|
+
maxSize: this.assetService.maxSize
|
|
4901
4923
|
},
|
|
4902
4924
|
panelClass: 'lib-dialog--medium',
|
|
4903
4925
|
});
|