@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.
Files changed (32) hide show
  1. package/bundles/rs-pk-asset-management.umd.js +28 -7
  2. package/bundles/rs-pk-asset-management.umd.js.map +1 -1
  3. package/bundles/rs-pk-asset-management.umd.min.js +2 -2
  4. package/bundles/rs-pk-asset-management.umd.min.js.map +1 -1
  5. package/esm2015/lib/asset-management.component.js +6 -1
  6. package/esm2015/lib/components/partial/asset-dialog/asset-dialog.component.js +16 -9
  7. package/esm2015/lib/components/partial/asset-management-dialog/asset-management-dialog.component.js +2 -1
  8. package/esm2015/lib/components/partial/node-details/node-details.component.js +2 -1
  9. package/esm2015/lib/components/partial/upload-dialog/upload-dialog.component.js +6 -1
  10. package/esm2015/lib/models/asset.model.js +3 -1
  11. package/esm2015/lib/services/asset.service.js +3 -1
  12. package/esm2015/lib/services/upload-assets.service.js +1 -1
  13. package/esm5/lib/asset-management.component.js +6 -1
  14. package/esm5/lib/components/partial/asset-dialog/asset-dialog.component.js +14 -8
  15. package/esm5/lib/components/partial/asset-management-dialog/asset-management-dialog.component.js +2 -1
  16. package/esm5/lib/components/partial/node-details/node-details.component.js +2 -1
  17. package/esm5/lib/components/partial/upload-dialog/upload-dialog.component.js +6 -1
  18. package/esm5/lib/models/asset.model.js +3 -1
  19. package/esm5/lib/services/asset.service.js +3 -1
  20. package/esm5/lib/services/upload-assets.service.js +1 -1
  21. package/fesm2015/rs-pk-asset-management.js +30 -8
  22. package/fesm2015/rs-pk-asset-management.js.map +1 -1
  23. package/fesm5/rs-pk-asset-management.js +28 -7
  24. package/fesm5/rs-pk-asset-management.js.map +1 -1
  25. package/lib/asset-management.component.d.ts +1 -0
  26. package/lib/components/partial/asset-dialog/asset-dialog.component.d.ts +4 -2
  27. package/lib/components/partial/upload-dialog/upload-dialog.component.d.ts +1 -0
  28. package/lib/models/asset.model.d.ts +1 -0
  29. package/lib/services/asset.service.d.ts +1 -0
  30. package/lib/services/upload-assets.service.d.ts +1 -1
  31. package/package.json +1 -1
  32. package/rs-pk-asset-management.metadata.json +1 -1
@@ -174,6 +174,8 @@ if (false) {
174
174
  DialogConfig.prototype.limit;
175
175
  /** @type {?} */
176
176
  DialogConfig.prototype.allowedType;
177
+ /** @type {?} */
178
+ DialogConfig.prototype.maxSize;
177
179
  }
178
180
 
179
181
  /**
@@ -727,6 +729,8 @@ if (false) {
727
729
  AssetService.prototype.sortOrder;
728
730
  /** @type {?} */
729
731
  AssetService.prototype.dialogConfig;
732
+ /** @type {?} */
733
+ AssetService.prototype.maxSize;
730
734
  /**
731
735
  * @type {?}
732
736
  * @private
@@ -1712,6 +1716,7 @@ var AssetManagementDialogComponent = /** @class */ (function () {
1712
1716
  return;
1713
1717
  }
1714
1718
  this.assetService.dialogConfig = data;
1719
+ this.assetService.maxSize = data.maxSize;
1715
1720
  };
1716
1721
  /**
1717
1722
  * @return {?}
@@ -1778,6 +1783,7 @@ var AssetManagementComponent = /** @class */ (function () {
1778
1783
  * @return {?}
1779
1784
  */
1780
1785
  function () {
1786
+ this.assetService.maxSize = this.maxSize;
1781
1787
  initialReducer(this.svc.getDispatcher());
1782
1788
  this.bindSubscriber();
1783
1789
  };
@@ -1828,6 +1834,7 @@ var AssetManagementComponent = /** @class */ (function () {
1828
1834
  var config = {
1829
1835
  limit: this.limit,
1830
1836
  allowedType: this.allowedType,
1837
+ maxSize: this.maxSize
1831
1838
  };
1832
1839
  /** @type {?} */
1833
1840
  var dialogRef = this.dialog.open(AssetManagementDialogComponent, {
@@ -1876,6 +1883,7 @@ var AssetManagementComponent = /** @class */ (function () {
1876
1883
  isDialog: [{ type: Input }],
1877
1884
  limit: [{ type: Input }],
1878
1885
  allowedType: [{ type: Input }],
1886
+ maxSize: [{ type: Input }],
1879
1887
  assetChange: [{ type: Output }]
1880
1888
  };
1881
1889
  return AssetManagementComponent;
@@ -1888,6 +1896,8 @@ if (false) {
1888
1896
  /** @type {?} */
1889
1897
  AssetManagementComponent.prototype.allowedType;
1890
1898
  /** @type {?} */
1899
+ AssetManagementComponent.prototype.maxSize;
1900
+ /** @type {?} */
1891
1901
  AssetManagementComponent.prototype.assetChange;
1892
1902
  /**
1893
1903
  * @type {?}
@@ -3073,6 +3083,8 @@ if (false) {
3073
3083
  IData$3.prototype.currentAssetId;
3074
3084
  /** @type {?|undefined} */
3075
3085
  IData$3.prototype.fileType;
3086
+ /** @type {?|undefined} */
3087
+ IData$3.prototype.maxSize;
3076
3088
  }
3077
3089
  var UploadDialogComponent = /** @class */ (function () {
3078
3090
  function UploadDialogComponent(data, dialogRef, changeDetectorRef, uploadAssetsService) {
@@ -3088,6 +3100,9 @@ var UploadDialogComponent = /** @class */ (function () {
3088
3100
  this.data.fileType === 'Image'
3089
3101
  ? __spread(this.uploadAssetsService.imageExtension) : __spread(this.uploadAssetsService.documentExtension);
3090
3102
  }
3103
+ if (this.data.maxSize) {
3104
+ this.uploadAssetsService.supportedSize = this.data.maxSize * 1024 * 1024;
3105
+ }
3091
3106
  }
3092
3107
  /**
3093
3108
  * @return {?}
@@ -3729,13 +3744,14 @@ if (false) {
3729
3744
  IData$4.prototype.name;
3730
3745
  }
3731
3746
  var AssetDialogComponent = /** @class */ (function () {
3732
- function AssetDialogComponent(_env, dialog, data, dialogRef, fileSize, assetService, fileService, domSanitizer, svc) {
3747
+ function AssetDialogComponent(_env, dialog, data, dialogRef, fileSize, uploadAssetsService, assetsService, fileService, domSanitizer, svc) {
3733
3748
  this._env = _env;
3734
3749
  this.dialog = dialog;
3735
3750
  this.data = data;
3736
3751
  this.dialogRef = dialogRef;
3737
3752
  this.fileSize = fileSize;
3738
- this.assetService = assetService;
3753
+ this.uploadAssetsService = uploadAssetsService;
3754
+ this.assetsService = assetsService;
3739
3755
  this.fileService = fileService;
3740
3756
  this.domSanitizer = domSanitizer;
3741
3757
  this.svc = svc;
@@ -3763,6 +3779,7 @@ var AssetDialogComponent = /** @class */ (function () {
3763
3779
  * @return {?}
3764
3780
  */
3765
3781
  function () {
3782
+ this.uploadAssetsService.supportedSize = this.assetsService.maxSize * 1024 * 1024;
3766
3783
  this.linkDownload = this._env.asset2Url + "/File/Download/" + this.data.assetId;
3767
3784
  this.getAssetDetail();
3768
3785
  };
@@ -3934,13 +3951,13 @@ var AssetDialogComponent = /** @class */ (function () {
3934
3951
  var errors = [];
3935
3952
  if (this.acceptTypes.indexOf(ext) < 0) {
3936
3953
  /** @type {?} */
3937
- var extError = this.assetService.messageErrors.replace + " " + this.acceptTypes.join(', ');
3954
+ var extError = this.uploadAssetsService.messageErrors.replace + " " + this.acceptTypes.join(', ');
3938
3955
  errors.push(extError);
3939
3956
  }
3940
- if (this.assetService.supportedSize < file.size) {
3957
+ if (this.uploadAssetsService.supportedSize < file.size) {
3941
3958
  /** @type {?} */
3942
- var maxSize = this.fileSize.transform(this.assetService.supportedSize, 0);
3943
- errors.push(this.assetService.messageErrors.size + " " + maxSize);
3959
+ var maxSize = this.fileSize.transform(this.uploadAssetsService.supportedSize, 0);
3960
+ errors.push(this.uploadAssetsService.messageErrors.size + " " + maxSize);
3944
3961
  }
3945
3962
  if (errors.length) {
3946
3963
  this.replaceMessage = errors.join('<br/>');
@@ -4048,6 +4065,7 @@ var AssetDialogComponent = /** @class */ (function () {
4048
4065
  { type: MatDialogRef },
4049
4066
  { type: FileSizePipe },
4050
4067
  { type: UploadAssetsService },
4068
+ { type: AssetService },
4051
4069
  { type: FileService },
4052
4070
  { type: DomSanitizer },
4053
4071
  { type: AssetManagementService }
@@ -4111,7 +4129,9 @@ if (false) {
4111
4129
  */
4112
4130
  AssetDialogComponent.prototype.fileSize;
4113
4131
  /** @type {?} */
4114
- AssetDialogComponent.prototype.assetService;
4132
+ AssetDialogComponent.prototype.uploadAssetsService;
4133
+ /** @type {?} */
4134
+ AssetDialogComponent.prototype.assetsService;
4115
4135
  /**
4116
4136
  * @type {?}
4117
4137
  * @private
@@ -5627,6 +5647,7 @@ var NodeDetailsComponent = /** @class */ (function () {
5627
5647
  data: {
5628
5648
  currentAssetId: this.currentFolder.AssetId,
5629
5649
  fileType: this.assetService.dialogConfig.allowedType,
5650
+ maxSize: this.assetService.maxSize
5630
5651
  },
5631
5652
  panelClass: 'lib-dialog--medium',
5632
5653
  });