@rs-pk/asset-management 1.0.17 → 1.0.19

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 (34) hide show
  1. package/bundles/rs-pk-asset-management.umd.js +29 -8
  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-item/asset-item.component.js +1 -1
  8. package/esm2015/lib/components/partial/asset-management-dialog/asset-management-dialog.component.js +2 -1
  9. package/esm2015/lib/components/partial/node-details/node-details.component.js +2 -1
  10. package/esm2015/lib/components/partial/upload-dialog/upload-dialog.component.js +6 -1
  11. package/esm2015/lib/models/asset.model.js +3 -1
  12. package/esm2015/lib/services/asset.service.js +3 -1
  13. package/esm2015/lib/services/upload-assets.service.js +1 -1
  14. package/esm5/lib/asset-management.component.js +6 -1
  15. package/esm5/lib/components/partial/asset-dialog/asset-dialog.component.js +14 -8
  16. package/esm5/lib/components/partial/asset-item/asset-item.component.js +1 -1
  17. package/esm5/lib/components/partial/asset-management-dialog/asset-management-dialog.component.js +2 -1
  18. package/esm5/lib/components/partial/node-details/node-details.component.js +2 -1
  19. package/esm5/lib/components/partial/upload-dialog/upload-dialog.component.js +6 -1
  20. package/esm5/lib/models/asset.model.js +3 -1
  21. package/esm5/lib/services/asset.service.js +3 -1
  22. package/esm5/lib/services/upload-assets.service.js +1 -1
  23. package/fesm2015/rs-pk-asset-management.js +31 -9
  24. package/fesm2015/rs-pk-asset-management.js.map +1 -1
  25. package/fesm5/rs-pk-asset-management.js +29 -8
  26. package/fesm5/rs-pk-asset-management.js.map +1 -1
  27. package/lib/asset-management.component.d.ts +1 -0
  28. package/lib/components/partial/asset-dialog/asset-dialog.component.d.ts +4 -2
  29. package/lib/components/partial/upload-dialog/upload-dialog.component.d.ts +1 -0
  30. package/lib/models/asset.model.d.ts +1 -0
  31. package/lib/services/asset.service.d.ts +1 -0
  32. package/lib/services/upload-assets.service.d.ts +1 -1
  33. package/package.json +1 -1
  34. 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, assetService, fileService, domSanitizer, svc) {
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.assetService = assetService;
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.assetService.messageErrors.replace + " " + this.acceptTypes.join(', ');
4150
+ var extError = this.uploadAssetsService.messageErrors.replace + " " + this.acceptTypes.join(', ');
4134
4151
  errors.push(extError);
4135
4152
  }
4136
- if (this.assetService.supportedSize < file.size) {
4153
+ if (this.uploadAssetsService.supportedSize < file.size) {
4137
4154
  /** @type {?} */
4138
- var maxSize = this.fileSize.transform(this.assetService.supportedSize, 0);
4139
- errors.push(this.assetService.messageErrors.size + " " + maxSize);
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.assetService;
4328
+ AssetDialogComponent.prototype.uploadAssetsService;
4329
+ /** @type {?} */
4330
+ AssetDialogComponent.prototype.assetsService;
4311
4331
  /**
4312
4332
  * @type {?}
4313
4333
  * @private
@@ -4447,7 +4467,7 @@
4447
4467
  { type: core.Component, args: [{
4448
4468
  selector: 'lib-asset-item',
4449
4469
  template: "<div class=\"asset-wrapper\">\n <div class=\"asset-content\">\n <div class=\"asset-content__header\">\n <button class=\"asset-content__header--button\" mat-raised-button (click)=\"onChange()\">\n <mat-checkbox\n class=\"checkbox\"\n [checked]=\"checkSelectedAsset\"\n ></mat-checkbox>\n </button>\n <button\n class=\"asset-content__header--button edit-button\"\n mat-raised-button\n (click)=\"editAsset()\"\n >\n <mat-icon>edit</mat-icon>\n </button>\n </div>\n <div class=\"asset-content__body\">\n <ng-container [ngSwitch]=\"asset.FileType\">\n <ng-container *ngSwitchCase=\"fileType.IMAGE\">\n <img\n class=\"image\"\n [src]=\"asset.UrlThumbnail\"\n [alt]=\"asset.OriginalFileName\"\n />\n </ng-container>\n <ng-container *ngSwitchCase=\"fileType.DOCUMENT\">\n <img [src]=\"base64PNG[asset.Extension]\" [alt]=\"asset.OriginalFileName\" [ngClass]=\"asset.Extension\" />\n </ng-container>\n </ng-container>\n </div>\n <div class=\"asset-content__footer\">\n <div\n class=\"asset-content__footer--info\"\n [ngClass]=\"{\n 'file-type__document': asset.FileType === fileType.DOCUMENT\n }\"\n >\n <p\n class=\"name\"\n [matTooltip]=\"asset.OriginalFileNameWithoutExtension\"\n matTooltipClass=\"width-auto\"\n >\n {{ asset.OriginalFileNameWithoutExtension }}\n </p>\n <p class=\"info\">\n <span class=\"extension\">{{ asset.Extension }}</span>\n <span\n *ngIf=\"\n asset.FileType === fileType.IMAGE && asset?.Extension !== 'svg'\n \"\n >\n - {{ asset.Width }}x{{ asset.Height }}</span\n >\n <span *ngIf=\"asset.Size\"> - {{ asset.Size }}</span>\n </p>\n </div>\n <div class=\"asset-content__footer--file-type\">\n <span>{{ asset.FileType }}</span>\n </div>\n </div>\n </div>\n</div>\n",
4450
- styles: [":host::ng-deep .asset-wrapper{padding:5px}:host::ng-deep .asset-wrapper .asset-content{overflow:hidden;position:relative;border-radius:10px;border:1px solid #d8d8d8;font-size:14px;transition:.3s cubic-bezier(.25,.8,.25,1)}:host::ng-deep .asset-wrapper .asset-content:hover{box-shadow:0 0 8px rgba(0,0,0,.17),0 0 0 rgba(0,0,0,.06)}:host::ng-deep .asset-wrapper .asset-content__header{position:absolute;z-index:1;top:0;left:0;width:100%;display:flex;justify-content:space-between;padding:14px}:host::ng-deep .asset-wrapper .asset-content__header--button{width:30px;height:30px;min-width:30px;display:flex;align-items:center;justify-content:center;text-align:center;color:rgba(0,0,0,.65);background:rgba(255,255,255,.6)}:host::ng-deep .asset-wrapper .asset-content__header--button:hover{background:#fff}:host::ng-deep .asset-wrapper .asset-content__header--button.edit-button{transition:.3s cubic-bezier(.25,.8,.25,1);opacity:0}:host::ng-deep .asset-wrapper .asset-content__header--button .mat-icon{font-size:22px}:host::ng-deep .asset-wrapper .asset-content__header--button .mat-checkbox{pointer-events:none;display:flex;align-items:center}:host::ng-deep .asset-wrapper .asset-content__header--button .mat-checkbox .mat-checkbox-layout{margin:0}:host::ng-deep .asset-wrapper .asset-content__header--button .mat-checkbox .mat-checkbox-layout .mat-checkbox-frame{color:#767676}:host::ng-deep .asset-wrapper .asset-content__body{padding-bottom:66.66%;background:#f1f1f1;position:relative}:host::ng-deep .asset-wrapper .asset-content__body img{max-width:100%;max-height:100%;-o-object-fit:contain;object-fit:contain;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}:host::ng-deep .asset-wrapper .asset-content__body img.image{background-image:url(data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEBLAEsAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAAUABQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD+/ivFPFOf+EjvxzjbBgdv+PeDp+OfxzSt4q18AkageASB9ntu3OM+Vn8c5rsdG0fT9d06DVdUgN1f3XmefP5ksO/ypXhj/dwvHGu2ONF+VF3bQSM0AeYUV7IPCWgjgWRA/wCvi4P85SaKAPGm5Vh7H+VeyeERjQLEDoPP/WeQ/wAzRRQB0tFFFAH/2Q==)}:host::ng-deep .asset-wrapper .asset-content__body img.csv,:host::ng-deep .asset-wrapper .asset-content__body img.pdf,:host::ng-deep .asset-wrapper .asset-content__body img.zip{width:75%;height:75%}:host::ng-deep .asset-wrapper .asset-content__footer{display:flex;align-items:center;justify-content:space-between;padding:5px 8px}:host::ng-deep .asset-wrapper .asset-content__footer--info{max-width:calc(100% - 50px)}:host::ng-deep .asset-wrapper .asset-content__footer--info p{margin:0;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host::ng-deep .asset-wrapper .asset-content__footer--info .info{font-size:12px;color:#979797}:host::ng-deep .asset-wrapper .asset-content__footer--info .info .extension{text-transform:uppercase}:host::ng-deep .asset-wrapper .asset-content__footer--info.file-type__document{max-width:calc(100% - 70px)}:host::ng-deep .asset-wrapper .asset-content__footer--file-type{border-radius:5px;background-color:#d8d8d8;padding:2px 6px;font-size:12px}:host::ng-deep .asset-wrapper .asset-content:hover .edit-button{opacity:1!important}"]
4470
+ styles: [":host::ng-deep .asset-wrapper{padding:5px}:host::ng-deep .asset-wrapper .asset-content{overflow:hidden;position:relative;border-radius:10px;border:1px solid #d8d8d8;font-size:14px;transition:.3s cubic-bezier(.25,.8,.25,1)}:host::ng-deep .asset-wrapper .asset-content:hover{box-shadow:0 0 8px rgba(0,0,0,.17),0 0 0 rgba(0,0,0,.06)}:host::ng-deep .asset-wrapper .asset-content__header{position:absolute;z-index:1;top:0;left:0;width:100%;display:flex;justify-content:space-between;padding:14px}:host::ng-deep .asset-wrapper .asset-content__header--button{width:30px;height:30px;min-width:30px;display:flex;align-items:center;justify-content:center;text-align:center;color:rgba(0,0,0,.65);background:rgba(255,255,255,.6)}:host::ng-deep .asset-wrapper .asset-content__header--button:hover{background:#fff}:host::ng-deep .asset-wrapper .asset-content__header--button.edit-button{transition:.3s cubic-bezier(.25,.8,.25,1);opacity:0}:host::ng-deep .asset-wrapper .asset-content__header--button .mat-icon{font-size:22px}:host::ng-deep .asset-wrapper .asset-content__header--button .mat-checkbox{pointer-events:none;display:flex;align-items:center}:host::ng-deep .asset-wrapper .asset-content__header--button .mat-checkbox .mat-checkbox-layout{display:block;margin:0}:host::ng-deep .asset-wrapper .asset-content__header--button .mat-checkbox .mat-checkbox-layout .mat-checkbox-frame{color:#767676}:host::ng-deep .asset-wrapper .asset-content__body{padding-bottom:66.66%;background:#f1f1f1;position:relative}:host::ng-deep .asset-wrapper .asset-content__body img{max-width:100%;max-height:100%;-o-object-fit:contain;object-fit:contain;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}:host::ng-deep .asset-wrapper .asset-content__body img.image{background-image:url(data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEBLAEsAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAAUABQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD+/ivFPFOf+EjvxzjbBgdv+PeDp+OfxzSt4q18AkageASB9ntu3OM+Vn8c5rsdG0fT9d06DVdUgN1f3XmefP5ksO/ypXhj/dwvHGu2ONF+VF3bQSM0AeYUV7IPCWgjgWRA/wCvi4P85SaKAPGm5Vh7H+VeyeERjQLEDoPP/WeQ/wAzRRQB0tFFFAH/2Q==)}:host::ng-deep .asset-wrapper .asset-content__body img.csv,:host::ng-deep .asset-wrapper .asset-content__body img.pdf,:host::ng-deep .asset-wrapper .asset-content__body img.zip{width:75%;height:75%}:host::ng-deep .asset-wrapper .asset-content__footer{display:flex;align-items:center;justify-content:space-between;padding:5px 8px}:host::ng-deep .asset-wrapper .asset-content__footer--info{max-width:calc(100% - 50px)}:host::ng-deep .asset-wrapper .asset-content__footer--info p{margin:0;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host::ng-deep .asset-wrapper .asset-content__footer--info .info{font-size:12px;color:#979797}:host::ng-deep .asset-wrapper .asset-content__footer--info .info .extension{text-transform:uppercase}:host::ng-deep .asset-wrapper .asset-content__footer--info.file-type__document{max-width:calc(100% - 70px)}:host::ng-deep .asset-wrapper .asset-content__footer--file-type{border-radius:5px;background-color:#d8d8d8;padding:2px 6px;font-size:12px}:host::ng-deep .asset-wrapper .asset-content:hover .edit-button{opacity:1!important}"]
4451
4471
  }] }
4452
4472
  ];
4453
4473
  /** @nocollapse */
@@ -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
  });