@bravura/ui 2.0.0 → 2.2.0

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.
@@ -126,6 +126,13 @@ class FileUploadComponent {
126
126
  this.dropHint = 'Please release the mouse button to start uploading.';
127
127
  /** Specifies the total number of files accepted. A falsy value removes the limit.*/
128
128
  this.limit = 0;
129
+ /**
130
+ * specify the number of maximum bytes that can be uploaded.
131
+ * if number is specified, bytes are assumed, otherwise enter a string for specific size type.
132
+ */
133
+ this.fileSize = '10MB';
134
+ /** @ignore */
135
+ this._fileSizeExceedMsg = '';
129
136
  /** @ignore */
130
137
  this._uploadingItems = [];
131
138
  /** @ignore */
@@ -232,7 +239,7 @@ class FileUploadComponent {
232
239
  event.stopPropagation();
233
240
  this._onDndStopFrame();
234
241
  const files = event.dataTransfer?.files;
235
- if (files?.length) {
242
+ if (files?.length && this._validateFileSize(files)) {
236
243
  this._uploadFiles(Array.from(files));
237
244
  }
238
245
  }
@@ -266,7 +273,7 @@ class FileUploadComponent {
266
273
  /** @ignore */
267
274
  _handleFileSelection() {
268
275
  const fileList = this._fileInput.nativeElement.files;
269
- if (fileList?.length) {
276
+ if (fileList?.length && this._validateFileSize(fileList)) {
270
277
  this._uploadFiles(Array.from(fileList));
271
278
  this._fileInput.nativeElement.value = '';
272
279
  }
@@ -279,6 +286,41 @@ class FileUploadComponent {
279
286
  get _initialising() {
280
287
  return !!this._initSubs && !this._initSubs.closed;
281
288
  }
289
+ returnFileSize(size) {
290
+ if (size < 1024) {
291
+ return `${size} bytes`;
292
+ }
293
+ else if (size >= 1024 && size < 1048576) {
294
+ return `${(size / 1024).toFixed(1)} KB`;
295
+ }
296
+ else {
297
+ return `${(size / 1048576).toFixed(1)} MB`;
298
+ }
299
+ }
300
+ _validateFileSize(files) {
301
+ this._fileSizeExceedMsg = '';
302
+ const maxSize = this.returnFileSize(this._getMaxBytes());
303
+ for (let i = 0; i < files.length; i++) {
304
+ if (files[i].size > this._getMaxBytes()) {
305
+ this._fileSizeExceedMsg = `Selected file/s has exceeded the allowable size of ${maxSize} per file`;
306
+ return false;
307
+ }
308
+ }
309
+ return true;
310
+ }
311
+ _getMaxBytes() {
312
+ if (typeof this.fileSize === 'string') {
313
+ if (this.fileSize.toUpperCase().endsWith('KB')) {
314
+ const kiloBytes = this.fileSize.substring(0, this.fileSize.indexOf('KB'));
315
+ return Number(kiloBytes) * 1024;
316
+ }
317
+ else if (this.fileSize.toUpperCase().endsWith('MB')) {
318
+ const megaBytes = this.fileSize.substring(0, this.fileSize.indexOf('MB'));
319
+ return Number(megaBytes) * 1048576;
320
+ }
321
+ }
322
+ return this.fileSize;
323
+ }
282
324
  _uploadFiles(files) {
283
325
  if (this._initialising || files.length > this.remaining) {
284
326
  return;
@@ -338,7 +380,7 @@ class FileUploadComponent {
338
380
  }
339
381
  }
340
382
  FileUploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: FileUploadComponent, deps: [{ token: FileUploadService }], target: i0.ɵɵFactoryTarget.Component });
341
- FileUploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: FileUploadComponent, selector: "bui-file-upload", inputs: { uploadActionText: "uploadActionText", fileUploadedLabel: "fileUploadedLabel", dragHint: "dragHint", dropHint: "dropHint", limit: "limit", types: "types" }, host: { listeners: { "dragenter": "onDragEnter($event)", "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "onDndDrop($event)" }, properties: { "class.bui-dnd-active": "_overFrame && remaining >= _numberOfFilesDragged", "class.bui-dnd-over": "_overDropZone && remaining >= _numberOfFilesDragged", "class.bui-dnd-invalid": "_invalidFilesDragged" }, classAttribute: "bui-host bui-file-upload" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => FileUploadComponent), multi: true }], viewQueries: [{ propertyName: "_fileInput", first: true, predicate: ["fileInput"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<div class=\"bui-file-upload-container\">\n\t<div\n\t\tclass=\"bui-file-upload-hint\"\n\t\t*ngIf=\"!_initialising && remaining > 0 && (!_itemAnimationInProgress || remaining > 1)\"\n\t>\n\t\t<ng-template [ngIf]=\"_invalidFilesDragged\" [ngIfElse]=\"validDnd\">\n\t\t\t<mat-icon [buiIcon]=\"'block'\" [size]=\"32\" color=\"warn\" variant=\"outlined\" style=\"opacity: 0.6\"></mat-icon>\n\t\t</ng-template>\n\t\t<ng-template #validDnd>\n\t\t\t<div *ngIf=\"!_overFrame && !_overDropZone\" class=\"bui-color-muted bui-upload-icon-link\" (click)=\"selectFiles()\">\n\t\t\t\t<mat-icon [buiIcon]=\"'fas fa-cloud-upload-alt'\" [size]=\"32\"></mat-icon>\n\t\t\t\t<a role=\"button\">{{ uploadActionText }}</a>\n\t\t\t</div>\n\t\t\t<div *ngIf=\"_overFrame && !_overDropZone\" class=\"bui-color-light\">{{ dragHint }}</div>\n\t\t\t<div *ngIf=\"_overDropZone\" class=\"bui-color-light\">{{ dropHint }}</div>\n\t\t</ng-template>\n\t</div>\n\t<div\n\t\tclass=\"bui-file-upload-list\"\n\t\t[@slideOut]=\"_uploadingItems.length\"\n\t\t(@slideOut.start)=\"_itemAnimationStart.next()\"\n\t\t(@slideOut.done)=\"_itemAnimationDone.next()\"\n\t\t*ngIf=\"_uploadingItems.length\"\n\t>\n\t\t<span class=\"bui-file-uploaded-label\">{{ fileUploadedLabel }}</span>\n\n\t\t<ng-container *ngFor=\"let item of _uploadingItems; let idx = index\">\n\t\t\t<div class=\"bui-file-upload-item\" [class.in-progress]=\"!item.done\" #itemDiv>\n\t\t\t\t<div class=\"bui-file-upload-item-name\">\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<mat-icon class=\"bui-color-muted\">description</mat-icon>\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\tclass=\"text\"\n\t\t\t\t\t\t\t*ngIf=\"item.done && !item.downloading; else staticName\"\n\t\t\t\t\t\t\thref=\"#{{ item.uploadedItem?.id }}\"\n\t\t\t\t\t\t\t(click)=\"$event.preventDefault(); _openItem(item)\"\n\t\t\t\t\t\t\tcontextmenu=\"false\"\n\t\t\t\t\t\t\tmatTooltip=\"Download\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ item.name }}\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t<ng-template #staticName>\n\t\t\t\t\t\t\t<span class=\"text\">{{ item.name }}</span>\n\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t</span>\n\t\t\t\t\t<div class=\"bui-file-upload-item-progress\">\n\t\t\t\t\t\t<mat-progress-bar\n\t\t\t\t\t\t\tmode=\"determinate\"\n\t\t\t\t\t\t\t[class.upload-completed]=\"item.done\"\n\t\t\t\t\t\t\t*ngIf=\"!item.downloading\"\n\t\t\t\t\t\t\t[value]=\"item.done ? 100 : item.progress * 100\"\n\t\t\t\t\t\t></mat-progress-bar>\n\t\t\t\t\t\t<mat-progress-bar mode=\"buffer\" *ngIf=\"item.downloading\"></mat-progress-bar>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<ng-template [ngIf]=\"item.done\" [ngIfElse]=\"inprogress\"> 100% </ng-template>\n\t\t\t\t\t\t\t<ng-template #inprogress>\n\t\t\t\t\t\t\t\t{{ item.progress | percent }}\n\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"bui-file-upload-item-action\">\n\t\t\t\t\t<button\n\t\t\t\t\t\tmat-icon-button\n\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t(click)=\"item.cancel()\"\n\t\t\t\t\t\t(mouseenter)=\"itemDiv.classList.add('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\t(mouseleave)=\"itemDiv.classList.remove('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\tmatTooltip=\"Delete\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<mat-icon [buiIcon]=\"'cancel'\" style=\"line-height: 0.9\"></mat-icon>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<mat-divider *ngIf=\"idx < _uploadingItems.length - 1\"></mat-divider>\n\t\t</ng-container>\n\t</div>\n\t<input\n\t\ttype=\"file\"\n\t\t#fileInput\n\t\tstyle=\"display: none\"\n\t\taccept=\"{{ _accept }}\"\n\t\t(change)=\"_handleFileSelection()\"\n\t\t[multiple]=\"remaining > 1\"\n\t/>\n</div>\n", styles: [":host:not([hidden]){display:block;border-style:dashed;border-width:1px;border-color:var(--bui-color-muted);transition:all .12s;padding:3px}:host:not([hidden]).bui-dnd-active,:host:not([hidden]).bui-dnd-over{padding:0;border-width:4px}:host:not([hidden]).bui-dnd-invalid{cursor:no-drop}:host:not([hidden]) .bui-file-upload-hint{margin:.5rem;height:40px;justify-content:center;display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-container{min-height:4rem;display:flex;align-items:center;flex-direction:column;justify-content:center;transition:initial}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link{cursor:pointer;transition:color .1s cubic-bezier(.55,0,.55,.2);display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link:hover{color:var(--bui-color-light)!important}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link>*{margin:4px}:host:not([hidden]) .bui-file-upload-list{align-self:stretch;margin-top:calc(1rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-uploaded-label{display:block;font-size:smaller;margin:0 calc(1rem - 4px) .5rem calc(1rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item{display:flex;align-items:center;margin:0 calc(1rem - 4px);padding:.25rem 0;justify-content:space-between}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item:last-child{margin-bottom:calc(.5rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item.in-progress .bui-file-upload-item-name{font-style:italic}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item.bui-file-upload-item-deleting{background-color:#8080801a;transition:background-color .1s cubic-bezier(.55,0,.55,.2)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name{flex-grow:1;font-size:80%;display:flex;align-items:center;flex-wrap:wrap}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name>span{word-break:break-all;display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name>span>mat-icon{width:20px;height:20px;font-size:20px}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name a{color:var(--bui-color-primary)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name .text{margin-left:.5rem;margin-right:.5rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress{flex-grow:1;min-width:50%;display:flex;justify-content:flex-start;align-items:center;margin:.5rem 0}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress .mat-progress-bar{max-width:100%;height:.4rem;border-radius:1rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress>span{margin-inline-start:.5rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-action{display:flex;align-items:center;height:1em;width:1.75em}:host:not([hidden]) .bui-file-upload-list .mat-divider{margin:0 calc(1rem - 4px) 0 calc(1rem - 4px)}:host:not([hidden]) .upload-completed{animation:pulse 1s ease-in-out}@keyframes pulse{0%{transform:scaleY(1)}50%{transform:scaleY(1.5)}to{transform:scaleY(1)}}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4.IconDirective, selector: "[buiIcon]", inputs: ["buiIcon", "size", "variant"] }, { kind: "component", type: i5.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i6.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "pipe", type: i2.PercentPipe, name: "percent" }], animations: [
383
+ FileUploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: FileUploadComponent, selector: "bui-file-upload", inputs: { uploadActionText: "uploadActionText", fileUploadedLabel: "fileUploadedLabel", dragHint: "dragHint", dropHint: "dropHint", limit: "limit", fileSize: "fileSize", types: "types" }, host: { listeners: { "dragenter": "onDragEnter($event)", "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "onDndDrop($event)" }, properties: { "class.bui-dnd-active": "_overFrame && remaining >= _numberOfFilesDragged", "class.bui-dnd-over": "_overDropZone && remaining >= _numberOfFilesDragged", "class.bui-dnd-invalid": "_invalidFilesDragged" }, classAttribute: "bui-host bui-file-upload" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => FileUploadComponent), multi: true }], viewQueries: [{ propertyName: "_fileInput", first: true, predicate: ["fileInput"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<div class=\"bui-file-upload-container\">\n\t<div\n\t\tclass=\"bui-file-upload-hint\"\n\t\t*ngIf=\"!_initialising && remaining > 0 && (!_itemAnimationInProgress || remaining > 1)\"\n\t>\n\t\t<ng-template [ngIf]=\"_invalidFilesDragged\" [ngIfElse]=\"validDnd\">\n\t\t\t<mat-icon [buiIcon]=\"'block'\" [size]=\"32\" color=\"warn\" variant=\"outlined\" style=\"opacity: 0.6\"></mat-icon>\n\t\t</ng-template>\n\t\t<ng-template #validDnd>\n\t\t\t<div *ngIf=\"!_overFrame && !_overDropZone\" class=\"bui-color-muted bui-upload-icon-link\" (click)=\"selectFiles()\">\n\t\t\t\t<mat-icon [buiIcon]=\"'fas fa-cloud-upload-alt'\" [size]=\"32\"></mat-icon>\n\t\t\t\t<a role=\"button\">{{ uploadActionText }}</a>\n\t\t\t</div>\n\t\t\t<div *ngIf=\"_overFrame && !_overDropZone\" class=\"bui-color-light\">{{ dragHint }}</div>\n\t\t\t<div *ngIf=\"_overDropZone\" class=\"bui-color-light\">{{ dropHint }}</div>\n\t\t</ng-template>\n\t</div>\n\t<div\n\t\tclass=\"bui-file-upload-list\"\n\t\t[@slideOut]=\"_uploadingItems.length\"\n\t\t(@slideOut.start)=\"_itemAnimationStart.next()\"\n\t\t(@slideOut.done)=\"_itemAnimationDone.next()\"\n\t\t*ngIf=\"_uploadingItems.length\"\n\t>\n\t\t<span class=\"bui-file-uploaded-label\">{{ fileUploadedLabel }}</span>\n\n\t\t<ng-container *ngFor=\"let item of _uploadingItems; let idx = index\">\n\t\t\t<div class=\"bui-file-upload-item\" [class.in-progress]=\"!item.done\" #itemDiv>\n\t\t\t\t<div class=\"bui-file-upload-item-name\">\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<mat-icon class=\"bui-color-muted\">description</mat-icon>\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\tclass=\"text\"\n\t\t\t\t\t\t\t*ngIf=\"item.done && !item.downloading; else staticName\"\n\t\t\t\t\t\t\thref=\"#{{ item.uploadedItem?.id }}\"\n\t\t\t\t\t\t\t(click)=\"$event.preventDefault(); _openItem(item)\"\n\t\t\t\t\t\t\tcontextmenu=\"false\"\n\t\t\t\t\t\t\tmatTooltip=\"Download\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ item.name }}\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t<ng-template #staticName>\n\t\t\t\t\t\t\t<span class=\"text\">{{ item.name }}</span>\n\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t</span>\n\t\t\t\t\t<div class=\"bui-file-upload-item-progress\">\n\t\t\t\t\t\t<mat-progress-bar\n\t\t\t\t\t\t\tmode=\"determinate\"\n\t\t\t\t\t\t\t[class.upload-completed]=\"item.done\"\n\t\t\t\t\t\t\t*ngIf=\"!item.downloading\"\n\t\t\t\t\t\t\t[value]=\"item.done ? 100 : item.progress * 100\"\n\t\t\t\t\t\t></mat-progress-bar>\n\t\t\t\t\t\t<mat-progress-bar mode=\"buffer\" *ngIf=\"item.downloading\"></mat-progress-bar>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<ng-template [ngIf]=\"item.done\" [ngIfElse]=\"inprogress\"> 100% </ng-template>\n\t\t\t\t\t\t\t<ng-template #inprogress>\n\t\t\t\t\t\t\t\t{{ item.progress | percent }}\n\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"bui-file-upload-item-action\">\n\t\t\t\t\t<button\n\t\t\t\t\t\tmat-icon-button\n\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t(click)=\"item.cancel()\"\n\t\t\t\t\t\t(mouseenter)=\"itemDiv.classList.add('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\t(mouseleave)=\"itemDiv.classList.remove('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\tmatTooltip=\"Delete\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<mat-icon [buiIcon]=\"'cancel'\" style=\"line-height: 0.9\"></mat-icon>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<mat-divider *ngIf=\"idx < _uploadingItems.length - 1\"></mat-divider>\n\t\t</ng-container>\n\t</div>\n\t<input\n\t\ttype=\"file\"\n\t\t#fileInput\n\t\tstyle=\"display: none\"\n\t\taccept=\"{{ _accept }}\"\n\t\t(change)=\"_handleFileSelection()\"\n\t\t[multiple]=\"remaining > 1\"\n\t/>\n\n\t<div *ngIf=\"_fileSizeExceedMsg\" class=\"bui-color-warn bui-file-size-exceed\">\n\t\t<span> {{ _fileSizeExceedMsg }}</span> <mat-icon role=\"button\" (click)=\"_fileSizeExceedMsg = ''\">cancel</mat-icon>\n\t</div>\n</div>\n", styles: [":host:not([hidden]){display:block;border-style:dashed;border-width:1px;border-color:var(--bui-color-muted);transition:all .12s;padding:3px}:host:not([hidden]).bui-dnd-active,:host:not([hidden]).bui-dnd-over{padding:0;border-width:4px}:host:not([hidden]) .bui-file-size-exceed{display:flex;align-items:center;margin-bottom:1rem}:host:not([hidden]) .bui-file-size-exceed mat-icon{margin-left:.2rem}:host:not([hidden]).bui-dnd-invalid{cursor:no-drop}:host:not([hidden]) .bui-file-upload-hint{margin:.5rem;height:40px;justify-content:center;display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-container{min-height:4rem;display:flex;align-items:center;flex-direction:column;justify-content:center;transition:initial}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link{cursor:pointer;transition:color .1s cubic-bezier(.55,0,.55,.2);display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link:hover{color:var(--bui-color-light)!important}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link>*{margin:4px}:host:not([hidden]) .bui-file-upload-list{align-self:stretch;margin-top:calc(1rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-uploaded-label{display:block;font-size:smaller;margin:0 calc(1rem - 4px) .5rem calc(1rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item{display:flex;align-items:center;margin:0 calc(1rem - 4px);padding:.25rem 0;justify-content:space-between}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item:last-child{margin-bottom:calc(.5rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item.in-progress .bui-file-upload-item-name{font-style:italic}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item.bui-file-upload-item-deleting{background-color:#8080801a;transition:background-color .1s cubic-bezier(.55,0,.55,.2)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name{flex-grow:1;font-size:80%;display:flex;align-items:center;flex-wrap:wrap}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name>span{word-break:break-all;display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name>span>mat-icon{width:20px;height:20px;font-size:20px}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name a{color:var(--bui-color-primary)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name .text{margin-left:.5rem;margin-right:.5rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress{flex-grow:1;min-width:50%;display:flex;justify-content:flex-start;align-items:center;margin:.5rem 0}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress .mat-progress-bar{max-width:100%;height:.4rem;border-radius:1rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress>span{margin-inline-start:.5rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-action{display:flex;align-items:center;height:1em;width:1.75em}:host:not([hidden]) .bui-file-upload-list .mat-divider{margin:0 calc(1rem - 4px) 0 calc(1rem - 4px)}:host:not([hidden]) .upload-completed{animation:pulse 1s ease-in-out}@keyframes pulse{0%{transform:scaleY(1)}50%{transform:scaleY(1.5)}to{transform:scaleY(1)}}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4.IconDirective, selector: "[buiIcon]", inputs: ["buiIcon", "size", "variant"] }, { kind: "component", type: i5.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i6.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "pipe", type: i2.PercentPipe, name: "percent" }], animations: [
342
384
  trigger('slideOut', [
343
385
  transition('* => *', [
344
386
  query(':leave', stagger(100, animate('0.25s', style({ height: 0, overflow: 'hidden' }))), { optional: true })
@@ -358,7 +400,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
358
400
  query(':leave', stagger(100, animate('0.25s', style({ height: 0, overflow: 'hidden' }))), { optional: true })
359
401
  ])
360
402
  ])
361
- ], template: "<div class=\"bui-file-upload-container\">\n\t<div\n\t\tclass=\"bui-file-upload-hint\"\n\t\t*ngIf=\"!_initialising && remaining > 0 && (!_itemAnimationInProgress || remaining > 1)\"\n\t>\n\t\t<ng-template [ngIf]=\"_invalidFilesDragged\" [ngIfElse]=\"validDnd\">\n\t\t\t<mat-icon [buiIcon]=\"'block'\" [size]=\"32\" color=\"warn\" variant=\"outlined\" style=\"opacity: 0.6\"></mat-icon>\n\t\t</ng-template>\n\t\t<ng-template #validDnd>\n\t\t\t<div *ngIf=\"!_overFrame && !_overDropZone\" class=\"bui-color-muted bui-upload-icon-link\" (click)=\"selectFiles()\">\n\t\t\t\t<mat-icon [buiIcon]=\"'fas fa-cloud-upload-alt'\" [size]=\"32\"></mat-icon>\n\t\t\t\t<a role=\"button\">{{ uploadActionText }}</a>\n\t\t\t</div>\n\t\t\t<div *ngIf=\"_overFrame && !_overDropZone\" class=\"bui-color-light\">{{ dragHint }}</div>\n\t\t\t<div *ngIf=\"_overDropZone\" class=\"bui-color-light\">{{ dropHint }}</div>\n\t\t</ng-template>\n\t</div>\n\t<div\n\t\tclass=\"bui-file-upload-list\"\n\t\t[@slideOut]=\"_uploadingItems.length\"\n\t\t(@slideOut.start)=\"_itemAnimationStart.next()\"\n\t\t(@slideOut.done)=\"_itemAnimationDone.next()\"\n\t\t*ngIf=\"_uploadingItems.length\"\n\t>\n\t\t<span class=\"bui-file-uploaded-label\">{{ fileUploadedLabel }}</span>\n\n\t\t<ng-container *ngFor=\"let item of _uploadingItems; let idx = index\">\n\t\t\t<div class=\"bui-file-upload-item\" [class.in-progress]=\"!item.done\" #itemDiv>\n\t\t\t\t<div class=\"bui-file-upload-item-name\">\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<mat-icon class=\"bui-color-muted\">description</mat-icon>\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\tclass=\"text\"\n\t\t\t\t\t\t\t*ngIf=\"item.done && !item.downloading; else staticName\"\n\t\t\t\t\t\t\thref=\"#{{ item.uploadedItem?.id }}\"\n\t\t\t\t\t\t\t(click)=\"$event.preventDefault(); _openItem(item)\"\n\t\t\t\t\t\t\tcontextmenu=\"false\"\n\t\t\t\t\t\t\tmatTooltip=\"Download\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ item.name }}\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t<ng-template #staticName>\n\t\t\t\t\t\t\t<span class=\"text\">{{ item.name }}</span>\n\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t</span>\n\t\t\t\t\t<div class=\"bui-file-upload-item-progress\">\n\t\t\t\t\t\t<mat-progress-bar\n\t\t\t\t\t\t\tmode=\"determinate\"\n\t\t\t\t\t\t\t[class.upload-completed]=\"item.done\"\n\t\t\t\t\t\t\t*ngIf=\"!item.downloading\"\n\t\t\t\t\t\t\t[value]=\"item.done ? 100 : item.progress * 100\"\n\t\t\t\t\t\t></mat-progress-bar>\n\t\t\t\t\t\t<mat-progress-bar mode=\"buffer\" *ngIf=\"item.downloading\"></mat-progress-bar>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<ng-template [ngIf]=\"item.done\" [ngIfElse]=\"inprogress\"> 100% </ng-template>\n\t\t\t\t\t\t\t<ng-template #inprogress>\n\t\t\t\t\t\t\t\t{{ item.progress | percent }}\n\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"bui-file-upload-item-action\">\n\t\t\t\t\t<button\n\t\t\t\t\t\tmat-icon-button\n\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t(click)=\"item.cancel()\"\n\t\t\t\t\t\t(mouseenter)=\"itemDiv.classList.add('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\t(mouseleave)=\"itemDiv.classList.remove('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\tmatTooltip=\"Delete\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<mat-icon [buiIcon]=\"'cancel'\" style=\"line-height: 0.9\"></mat-icon>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<mat-divider *ngIf=\"idx < _uploadingItems.length - 1\"></mat-divider>\n\t\t</ng-container>\n\t</div>\n\t<input\n\t\ttype=\"file\"\n\t\t#fileInput\n\t\tstyle=\"display: none\"\n\t\taccept=\"{{ _accept }}\"\n\t\t(change)=\"_handleFileSelection()\"\n\t\t[multiple]=\"remaining > 1\"\n\t/>\n</div>\n", styles: [":host:not([hidden]){display:block;border-style:dashed;border-width:1px;border-color:var(--bui-color-muted);transition:all .12s;padding:3px}:host:not([hidden]).bui-dnd-active,:host:not([hidden]).bui-dnd-over{padding:0;border-width:4px}:host:not([hidden]).bui-dnd-invalid{cursor:no-drop}:host:not([hidden]) .bui-file-upload-hint{margin:.5rem;height:40px;justify-content:center;display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-container{min-height:4rem;display:flex;align-items:center;flex-direction:column;justify-content:center;transition:initial}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link{cursor:pointer;transition:color .1s cubic-bezier(.55,0,.55,.2);display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link:hover{color:var(--bui-color-light)!important}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link>*{margin:4px}:host:not([hidden]) .bui-file-upload-list{align-self:stretch;margin-top:calc(1rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-uploaded-label{display:block;font-size:smaller;margin:0 calc(1rem - 4px) .5rem calc(1rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item{display:flex;align-items:center;margin:0 calc(1rem - 4px);padding:.25rem 0;justify-content:space-between}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item:last-child{margin-bottom:calc(.5rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item.in-progress .bui-file-upload-item-name{font-style:italic}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item.bui-file-upload-item-deleting{background-color:#8080801a;transition:background-color .1s cubic-bezier(.55,0,.55,.2)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name{flex-grow:1;font-size:80%;display:flex;align-items:center;flex-wrap:wrap}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name>span{word-break:break-all;display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name>span>mat-icon{width:20px;height:20px;font-size:20px}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name a{color:var(--bui-color-primary)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name .text{margin-left:.5rem;margin-right:.5rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress{flex-grow:1;min-width:50%;display:flex;justify-content:flex-start;align-items:center;margin:.5rem 0}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress .mat-progress-bar{max-width:100%;height:.4rem;border-radius:1rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress>span{margin-inline-start:.5rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-action{display:flex;align-items:center;height:1em;width:1.75em}:host:not([hidden]) .bui-file-upload-list .mat-divider{margin:0 calc(1rem - 4px) 0 calc(1rem - 4px)}:host:not([hidden]) .upload-completed{animation:pulse 1s ease-in-out}@keyframes pulse{0%{transform:scaleY(1)}50%{transform:scaleY(1.5)}to{transform:scaleY(1)}}\n"] }]
403
+ ], template: "<div class=\"bui-file-upload-container\">\n\t<div\n\t\tclass=\"bui-file-upload-hint\"\n\t\t*ngIf=\"!_initialising && remaining > 0 && (!_itemAnimationInProgress || remaining > 1)\"\n\t>\n\t\t<ng-template [ngIf]=\"_invalidFilesDragged\" [ngIfElse]=\"validDnd\">\n\t\t\t<mat-icon [buiIcon]=\"'block'\" [size]=\"32\" color=\"warn\" variant=\"outlined\" style=\"opacity: 0.6\"></mat-icon>\n\t\t</ng-template>\n\t\t<ng-template #validDnd>\n\t\t\t<div *ngIf=\"!_overFrame && !_overDropZone\" class=\"bui-color-muted bui-upload-icon-link\" (click)=\"selectFiles()\">\n\t\t\t\t<mat-icon [buiIcon]=\"'fas fa-cloud-upload-alt'\" [size]=\"32\"></mat-icon>\n\t\t\t\t<a role=\"button\">{{ uploadActionText }}</a>\n\t\t\t</div>\n\t\t\t<div *ngIf=\"_overFrame && !_overDropZone\" class=\"bui-color-light\">{{ dragHint }}</div>\n\t\t\t<div *ngIf=\"_overDropZone\" class=\"bui-color-light\">{{ dropHint }}</div>\n\t\t</ng-template>\n\t</div>\n\t<div\n\t\tclass=\"bui-file-upload-list\"\n\t\t[@slideOut]=\"_uploadingItems.length\"\n\t\t(@slideOut.start)=\"_itemAnimationStart.next()\"\n\t\t(@slideOut.done)=\"_itemAnimationDone.next()\"\n\t\t*ngIf=\"_uploadingItems.length\"\n\t>\n\t\t<span class=\"bui-file-uploaded-label\">{{ fileUploadedLabel }}</span>\n\n\t\t<ng-container *ngFor=\"let item of _uploadingItems; let idx = index\">\n\t\t\t<div class=\"bui-file-upload-item\" [class.in-progress]=\"!item.done\" #itemDiv>\n\t\t\t\t<div class=\"bui-file-upload-item-name\">\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<mat-icon class=\"bui-color-muted\">description</mat-icon>\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\tclass=\"text\"\n\t\t\t\t\t\t\t*ngIf=\"item.done && !item.downloading; else staticName\"\n\t\t\t\t\t\t\thref=\"#{{ item.uploadedItem?.id }}\"\n\t\t\t\t\t\t\t(click)=\"$event.preventDefault(); _openItem(item)\"\n\t\t\t\t\t\t\tcontextmenu=\"false\"\n\t\t\t\t\t\t\tmatTooltip=\"Download\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ item.name }}\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t<ng-template #staticName>\n\t\t\t\t\t\t\t<span class=\"text\">{{ item.name }}</span>\n\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t</span>\n\t\t\t\t\t<div class=\"bui-file-upload-item-progress\">\n\t\t\t\t\t\t<mat-progress-bar\n\t\t\t\t\t\t\tmode=\"determinate\"\n\t\t\t\t\t\t\t[class.upload-completed]=\"item.done\"\n\t\t\t\t\t\t\t*ngIf=\"!item.downloading\"\n\t\t\t\t\t\t\t[value]=\"item.done ? 100 : item.progress * 100\"\n\t\t\t\t\t\t></mat-progress-bar>\n\t\t\t\t\t\t<mat-progress-bar mode=\"buffer\" *ngIf=\"item.downloading\"></mat-progress-bar>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<ng-template [ngIf]=\"item.done\" [ngIfElse]=\"inprogress\"> 100% </ng-template>\n\t\t\t\t\t\t\t<ng-template #inprogress>\n\t\t\t\t\t\t\t\t{{ item.progress | percent }}\n\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"bui-file-upload-item-action\">\n\t\t\t\t\t<button\n\t\t\t\t\t\tmat-icon-button\n\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t(click)=\"item.cancel()\"\n\t\t\t\t\t\t(mouseenter)=\"itemDiv.classList.add('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\t(mouseleave)=\"itemDiv.classList.remove('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\tmatTooltip=\"Delete\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<mat-icon [buiIcon]=\"'cancel'\" style=\"line-height: 0.9\"></mat-icon>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<mat-divider *ngIf=\"idx < _uploadingItems.length - 1\"></mat-divider>\n\t\t</ng-container>\n\t</div>\n\t<input\n\t\ttype=\"file\"\n\t\t#fileInput\n\t\tstyle=\"display: none\"\n\t\taccept=\"{{ _accept }}\"\n\t\t(change)=\"_handleFileSelection()\"\n\t\t[multiple]=\"remaining > 1\"\n\t/>\n\n\t<div *ngIf=\"_fileSizeExceedMsg\" class=\"bui-color-warn bui-file-size-exceed\">\n\t\t<span> {{ _fileSizeExceedMsg }}</span> <mat-icon role=\"button\" (click)=\"_fileSizeExceedMsg = ''\">cancel</mat-icon>\n\t</div>\n</div>\n", styles: [":host:not([hidden]){display:block;border-style:dashed;border-width:1px;border-color:var(--bui-color-muted);transition:all .12s;padding:3px}:host:not([hidden]).bui-dnd-active,:host:not([hidden]).bui-dnd-over{padding:0;border-width:4px}:host:not([hidden]) .bui-file-size-exceed{display:flex;align-items:center;margin-bottom:1rem}:host:not([hidden]) .bui-file-size-exceed mat-icon{margin-left:.2rem}:host:not([hidden]).bui-dnd-invalid{cursor:no-drop}:host:not([hidden]) .bui-file-upload-hint{margin:.5rem;height:40px;justify-content:center;display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-container{min-height:4rem;display:flex;align-items:center;flex-direction:column;justify-content:center;transition:initial}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link{cursor:pointer;transition:color .1s cubic-bezier(.55,0,.55,.2);display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link:hover{color:var(--bui-color-light)!important}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link>*{margin:4px}:host:not([hidden]) .bui-file-upload-list{align-self:stretch;margin-top:calc(1rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-uploaded-label{display:block;font-size:smaller;margin:0 calc(1rem - 4px) .5rem calc(1rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item{display:flex;align-items:center;margin:0 calc(1rem - 4px);padding:.25rem 0;justify-content:space-between}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item:last-child{margin-bottom:calc(.5rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item.in-progress .bui-file-upload-item-name{font-style:italic}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item.bui-file-upload-item-deleting{background-color:#8080801a;transition:background-color .1s cubic-bezier(.55,0,.55,.2)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name{flex-grow:1;font-size:80%;display:flex;align-items:center;flex-wrap:wrap}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name>span{word-break:break-all;display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name>span>mat-icon{width:20px;height:20px;font-size:20px}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name a{color:var(--bui-color-primary)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name .text{margin-left:.5rem;margin-right:.5rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress{flex-grow:1;min-width:50%;display:flex;justify-content:flex-start;align-items:center;margin:.5rem 0}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress .mat-progress-bar{max-width:100%;height:.4rem;border-radius:1rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress>span{margin-inline-start:.5rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-action{display:flex;align-items:center;height:1em;width:1.75em}:host:not([hidden]) .bui-file-upload-list .mat-divider{margin:0 calc(1rem - 4px) 0 calc(1rem - 4px)}:host:not([hidden]) .upload-completed{animation:pulse 1s ease-in-out}@keyframes pulse{0%{transform:scaleY(1)}50%{transform:scaleY(1.5)}to{transform:scaleY(1)}}\n"] }]
362
404
  }], ctorParameters: function () { return [{ type: FileUploadService }]; }, propDecorators: { uploadActionText: [{
363
405
  type: Input
364
406
  }], fileUploadedLabel: [{
@@ -369,6 +411,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
369
411
  type: Input
370
412
  }], limit: [{
371
413
  type: Input
414
+ }], fileSize: [{
415
+ type: Input
372
416
  }], types: [{
373
417
  type: Input
374
418
  }], _fileInput: [{
@@ -1 +1 @@
1
- {"version":3,"file":"bravura-ui-file-upload.mjs","sources":["../../../projects/ui/file-upload/file-upload.service.ts","../../../projects/ui/file-upload/file-upload.component.ts","../../../projects/ui/file-upload/file-upload.component.html","../../../projects/ui/file-upload/file-upload.module.ts","../../../projects/ui/file-upload/bravura-ui-file-upload.ts"],"sourcesContent":["import { HttpEvent } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\n/**\n * This type represents a file or form item that has been sent as part of a multipart/form-data POST request.\n */\nexport class FileUploadItem {\n\t/** The original filename in the client's filesystem, as provided by the browser. */\n\tname: string;\n\n\t/** The size of the file item. */\n\tsize: number;\n\n\t/** An alpha-numeric string that uniquely identifies the file item. */\n\tid: string;\n\n\t/** The content type (MIME type) of the file. */\n\ttype: string;\n\n\t/** @internal */\n\tconstructor(_id: string, _name: string, _size: number, _type: string) {\n\t\tthis.id = _id;\n\t\tthis.name = _name;\n\t\tthis.size = _size;\n\t\tthis.type = _type;\n\t}\n}\n\n/**\n * This is an API for processing file upload requests.\n *\n * A sub class of this type handles multiple file requests, sent using multipart/form-data encoding type, as specified by RFC 1867.\n *\n * Please extend this type and provide it in an injector at the same level, or ancestral to that, of the `FileUploadComponent`.\n */\n@Injectable()\nexport abstract class FileUploadService {\n\t/**\n\t * Upload a list of selected files from the browser. The returned `Observable` array provides the update of the uploading progress\n\t * through HTTP events.\n\t */\n\tabstract upload(files: File[]): Array<Observable<HttpEvent<FileUploadItem>>>;\n\n\t/** List all the uploaded file items in the current HTTP session. This list excludes the files still in the process of being uploaded*/\n\tabstract list(): Observable<FileUploadItem[]>;\n\n\t/** Get the content of an uploaded file item as a `Blob`. */\n\tabstract get(id: string): Observable<Blob>;\n\n\t/** Delete an uploaded file item from the server. */\n\tabstract delete(id: string): Observable<void>;\n\n\t/** Delete all uploaded file items in the current HTTP session. */\n\tabstract clear?(): Observable<void>;\n}\n","import { animate, query, stagger, style, transition, trigger } from '@angular/animations';\nimport { HttpEvent, HttpEventType } from '@angular/common/http';\nimport { Component, ElementRef, forwardRef, HostListener, Input, OnDestroy, OnInit, ViewChild } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Observable, of, Subject, Subscription } from 'rxjs';\nimport { FileUploadItem, FileUploadService } from './file-upload.service';\n\n/** @ignore */\nclass UploadingItem {\n\tprogress = 0;\n\tuploadedItem: FileUploadItem | null | undefined;\n\tdownloadingSubs?: Subscription;\n\tprivate subscription: Subscription;\n\tprivate file?: File;\n\n\tconstructor(item: FileUploadItem, oncancel: (item: UploadingItem) => void);\n\tconstructor(\n\t\tevent$: Observable<HttpEvent<FileUploadItem>> | FileUploadItem,\n\t\tfile: File,\n\t\toncomplete: () => void,\n\t\toncancel: (item: UploadingItem) => void\n\t);\n\tconstructor(\n\t\tevent$: Observable<HttpEvent<FileUploadItem>> | FileUploadItem,\n\t\tfileOrOncancel?: File | ((item: UploadingItem) => void),\n\t\toncomplete?: () => void,\n\t\tprivate oncancel?: (item: UploadingItem) => void\n\t) {\n\t\tif (event$ instanceof Observable) {\n\t\t\tthis.file = fileOrOncancel as File;\n\t\t\tthis.subscription = event$.subscribe({\n\t\t\t\tnext: evt => {\n\t\t\t\t\tif (evt.type === HttpEventType.UploadProgress) {\n\t\t\t\t\t\tthis.progress = evt.loaded / (this.file as File).size;\n\t\t\t\t\t} else if (evt.type === HttpEventType.Response) {\n\t\t\t\t\t\tthis.uploadedItem = evt.body;\n\t\t\t\t\t\tthis.progress = 1;\n\t\t\t\t\t\toncomplete!();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tthis.subscription = of(event$).subscribe();\n\t\t\tthis.uploadedItem = event$;\n\t\t\tthis.oncancel = fileOrOncancel as (item: UploadingItem) => void;\n\t\t}\n\t}\n\n\tcancel() {\n\t\tthis.subscription.unsubscribe();\n\t\tthis.oncancel!(this);\n\t}\n\n\tget done() {\n\t\treturn !!this.uploadedItem;\n\t}\n\n\tget name() {\n\t\treturn this.uploadedItem?.name || this.file?.name;\n\t}\n\n\tget downloading() {\n\t\treturn this.downloadingSubs && !this.downloadingSubs.closed;\n\t}\n}\n/**\n * A control value accessor component to provide the user interface for uploading files.\n *\n * The application that integrates this UI must provide an implementation of `FileUploadService`.\n *\n * The control's value is a list of alpha-numerical strings, which are the identifiers to the uploaded files.\n *\n * Example:\n *\n * ```html\n * <form>\n * <bui-file-upload [(ngModel)]=\"uploadedFileIds\" name=\"myFiles\"></bui-file-upload>\n * </form>\n * ```\n *\n * @see FileUploadService\n */\n@Component({\n\thost: {\n\t\tclass: 'bui-host bui-file-upload',\n\t\t'[class.bui-dnd-active]': '_overFrame && remaining >= _numberOfFilesDragged',\n\t\t'[class.bui-dnd-over]': '_overDropZone && remaining >= _numberOfFilesDragged',\n\t\t'[class.bui-dnd-invalid]': '_invalidFilesDragged'\n\t},\n\tselector: 'bui-file-upload',\n\ttemplateUrl: './file-upload.component.html',\n\tstyleUrls: ['./file-upload.component.scss'],\n\tproviders: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => FileUploadComponent), multi: true }],\n\tanimations: [\n\t\ttrigger('slideOut', [\n\t\t\ttransition('* => *', [\n\t\t\t\tquery(':leave', stagger(100, animate('0.25s', style({ height: 0, overflow: 'hidden' }))), { optional: true })\n\t\t\t])\n\t\t])\n\t]\n})\nexport class FileUploadComponent implements OnInit, OnDestroy, ControlValueAccessor {\n\t/** @ignore */\n\t_value: string[] | null = null;\n\n\t/**\n\t * The caption of the button for opening file selection dialog.\n\t */\n\t@Input()\n\tuploadActionText = 'Drag files here to attach or browse';\n\n\t/**\n\t * The label for listing successful uploaded files.\n\t */\n\t@Input()\n\tfileUploadedLabel = 'List of files uploaded successfully';\n\n\t/**\n\t * The text to be displayed when the user starts to drag file items over the browser window.\n\t */\n\t@Input()\n\tdragHint = 'Please drag the files here.';\n\n\t/**\n\t * The text to be displayed when the user is dragging the file items over the drop zone.\n\t */\n\t@Input()\n\tdropHint = 'Please release the mouse button to start uploading.';\n\n\t/** Specifies the total number of files accepted. A falsy value removes the limit.*/\n\t@Input()\n\tlimit = 0;\n\n\t/**\n\t * Accepted MIME types\n\t *\n\t * @example ['text/*', 'image/png']\n\t */\n\t@Input()\n\tget types(): string[] {\n\t\treturn this._types;\n\t}\n\tset types(types: string[]) {\n\t\tif (Array.isArray(types) && types?.length) {\n\t\t\tthis._typeRegExps = [];\n\t\t\tthis._types = Array.from(types);\n\t\t\tthis._accept = this._types.join(',');\n\t\t\ttypes.forEach(t => this._typeRegExps.push(new RegExp(t.replace(/\\*/g, '.*'))));\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_uploadingItems: UploadingItem[] = [];\n\n\t/** @ignore */\n\t_accept = '*/*';\n\n\t/** @ignore */\n\t_itemAnimationStart = new Subject<void>();\n\t/** @ignore */\n\t_itemAnimationDone = new Subject<void>();\n\t/** @ignore */\n\t_itemAnimationInProgress = false;\n\n\tprivate _onChange = (_: string[]) => {};\n\tprivate _onTouch = () => {};\n\tprivate _frameDndEnter: (event: DragEvent) => void;\n\tprivate _frameDndLeave: () => void;\n\tprivate _frameDndOver: (event: DragEvent) => void;\n\tprivate _frameDndStop: () => void;\n\tprivate _overFrameCounter = 0;\n\tprivate _overCounter = 0;\n\tprivate _typeRegExps: RegExp[] = [/.*\\/.*/];\n\tprivate _types: string[] = ['*/*'];\n\tprivate _initSubs?: Subscription;\n\tprivate _numberOfFilesDragged = 0;\n\n\t@ViewChild('fileInput', { read: ElementRef, static: true })\n\tprivate _fileInput!: ElementRef<HTMLInputElement>;\n\n\tconstructor(private _service: FileUploadService) {\n\t\tthis._onChange([]);\n\t\tthis._onTouch();\n\t\tthis._frameDndEnter = this._onDndEnterFrame.bind(this);\n\t\tthis._frameDndLeave = this._onDndLeaveFrame.bind(this);\n\t\tthis._frameDndStop = this._onDndStopFrame.bind(this);\n\t\tthis._frameDndOver = event => event.preventDefault();\n\t}\n\n\t/** @internal */\n\tngOnInit(): void {\n\t\tdocument.addEventListener('dragenter', this._frameDndEnter);\n\t\tdocument.addEventListener('dragleave', this._frameDndLeave);\n\t\tdocument.addEventListener('dragend', this._frameDndStop);\n\t\tdocument.addEventListener('drop', this._frameDndStop);\n\t\tdocument.addEventListener('dragover', this._frameDndOver);\n\t\tthis._itemAnimationStart.subscribe(() => (this._itemAnimationInProgress = true));\n\t\tthis._itemAnimationDone.subscribe(() => (this._itemAnimationInProgress = false));\n\t}\n\n\tngOnDestroy(): void {\n\t\tdocument.removeEventListener('dragenter', this._frameDndEnter);\n\t\tdocument.removeEventListener('dragleave', this._frameDndLeave);\n\t\tdocument.removeEventListener('dragend', this._frameDndStop);\n\t\tdocument.removeEventListener('drop', this._frameDndStop);\n\t\tdocument.removeEventListener('dragover', this._frameDndOver);\n\t\tthis._itemAnimationStart.complete();\n\t\tthis._itemAnimationDone.complete();\n\t}\n\n\t/** @internal */\n\twriteValue(obj: any): void {\n\t\tif (Array.isArray(obj)) {\n\t\t\tif (!this._value) {\n\t\t\t\tthis._acceptChange(obj);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst common = obj.filter(v => this._value!.includes(v));\n\t\t\tif (common.length === obj.length && common.length === this._value.length) {\n\t\t\t\treturn; // no change\n\t\t\t}\n\t\t\tthis._acceptChange(obj);\n\t\t} else {\n\t\t\tthis._value = null;\n\t\t}\n\t}\n\n\t/** @internal */\n\tregisterOnChange(fn: any): void {\n\t\tthis._onChange = fn;\n\t}\n\n\t/** @internal */\n\tregisterOnTouched(fn: any): void {\n\t\tthis._onTouch = fn;\n\t}\n\n\t/** @internal */\n\t@HostListener('dragenter', ['$event'])\n\tonDragEnter(event: DragEvent) {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tthis._overCounter++;\n\t}\n\n\t/** @internal */\n\t@HostListener('dragover', ['$event'])\n\tonDragOver(event: Event) {\n\t\tevent.preventDefault();\n\t}\n\n\t/** @internal */\n\t@HostListener('dragleave', ['$event'])\n\tonDragLeave(event: Event) {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tthis._overCounter--;\n\t}\n\n\t/** @internal */\n\t@HostListener('drop', ['$event'])\n\tonDndDrop(event: DragEvent) {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tthis._onDndStopFrame();\n\t\tconst files = event.dataTransfer?.files;\n\t\tif (files?.length) {\n\t\t\tthis._uploadFiles(Array.from(files));\n\t\t}\n\t}\n\n\t/** Open the file selection dialog */\n\tselectFiles() {\n\t\tthis._fileInput.nativeElement.click();\n\t}\n\n\t/** @ignore */\n\t_openItem(item: UploadingItem) {\n\t\titem.downloadingSubs = this._service.get(item.uploadedItem!.id).subscribe(blob => {\n\t\t\tconst url = URL.createObjectURL(blob);\n\t\t\twindow.open(url, '_blank');\n\t\t});\n\t}\n\n\t/** @ignore */\n\tget _overFrame(): boolean {\n\t\treturn this._overFrameCounter > 0;\n\t}\n\n\t/** @ignore */\n\tget _overDropZone(): boolean {\n\t\treturn this._overCounter > 0;\n\t}\n\n\t/** Whether file uploading is in progress */\n\tget uploading(): boolean {\n\t\treturn this._uploadingItems.some(i => !i.done);\n\t}\n\n\t/** The remaining number of files allowed.*/\n\tget remaining(): number {\n\t\treturn this.limit ? this.limit - this._uploadingItems.length : Infinity;\n\t}\n\n\t/** @ignore */\n\t_handleFileSelection() {\n\t\tconst fileList = this._fileInput.nativeElement.files;\n\t\tif (fileList?.length) {\n\t\t\tthis._uploadFiles(Array.from(fileList));\n\t\t\tthis._fileInput.nativeElement.value = '';\n\t\t}\n\t}\n\n\t/** @ignore */\n\tget _invalidFilesDragged(): boolean {\n\t\treturn this._numberOfFilesDragged > this.remaining && (this._overFrame || this._overDropZone);\n\t}\n\n\t/** @ignore */\n\tget _initialising(): boolean {\n\t\treturn !!this._initSubs && !this._initSubs.closed;\n\t}\n\n\tprivate _uploadFiles(files: File[]) {\n\t\tif (this._initialising || files.length > this.remaining) {\n\t\t\treturn;\n\t\t}\n\t\tconst filtered = files.filter(\n\t\t\tf =>\n\t\t\t\t(!f.type || this._typeRegExps.some(regexp => f.type.match(regexp))) &&\n\t\t\t\t!this._uploadingItems.some(i => i.name === f.name)\n\t\t);\n\t\tconst observables = this._service.upload(filtered);\n\t\tconst items = filtered.map(\n\t\t\t(f, i) => new UploadingItem(observables[i], f, this._updateItems.bind(this), this._deleteItem.bind(this))\n\t\t);\n\t\tthis._uploadingItems = [...this._uploadingItems, ...items];\n\t}\n\n\tprivate _onDndEnterFrame(event: DragEvent) {\n\t\tevent.preventDefault();\n\t\tthis._numberOfFilesDragged = event.dataTransfer?.items?.length || 0;\n\t\tthis._overFrameCounter++;\n\t}\n\n\tprivate _onDndLeaveFrame() {\n\t\tthis._overFrameCounter--;\n\t}\n\n\tprivate _onDndStopFrame() {\n\t\tthis._overFrameCounter = 0;\n\t\tthis._overCounter = 0;\n\t}\n\n\tprivate _acceptChange(v: string[]) {\n\t\tthis._initSubs = this._service.list().subscribe(list => {\n\t\t\tthis._uploadingItems = list\n\t\t\t\t.filter(i => v.includes(i.id))\n\t\t\t\t.map(f => new UploadingItem(f, this._deleteItem.bind(this)));\n\t\t});\n\t}\n\n\tprivate _updateItems() {\n\t\tconst completed = this._uploadingItems.filter(i => !!i.uploadedItem);\n\t\tthis._uploadingItems = [...completed, ...this._uploadingItems.filter(i => !i.uploadedItem)];\n\t\tthis._updateValue(completed);\n\t}\n\n\tprivate _deleteItem(item: UploadingItem) {\n\t\tconst key = item.uploadedItem?.id;\n\t\tif (key) {\n\t\t\tthis._service.delete(key).subscribe(() => {\n\t\t\t\tthis._uploadingItems = this._uploadingItems.filter(i => i !== item);\n\t\t\t\tconst completed = this._uploadingItems.filter(i => !!i.uploadedItem);\n\t\t\t\tthis._updateValue(completed);\n\t\t\t});\n\t\t} else {\n\t\t\tthis._uploadingItems = this._uploadingItems.filter(i => i !== item);\n\t\t\tconst completed = this._uploadingItems.filter(i => !!i.uploadedItem);\n\t\t\tthis._updateValue(completed);\n\t\t}\n\t}\n\n\tprivate _updateValue(completed: UploadingItem[]) {\n\t\tconst completedIds = completed.map(c => c.uploadedItem!.id);\n\t\tthis._value = completedIds;\n\t\tif (!this._value.length) {\n\t\t\tthis._value = null;\n\t\t}\n\t\tthis._onChange(completedIds);\n\t}\n}\n","<div class=\"bui-file-upload-container\">\n\t<div\n\t\tclass=\"bui-file-upload-hint\"\n\t\t*ngIf=\"!_initialising && remaining > 0 && (!_itemAnimationInProgress || remaining > 1)\"\n\t>\n\t\t<ng-template [ngIf]=\"_invalidFilesDragged\" [ngIfElse]=\"validDnd\">\n\t\t\t<mat-icon [buiIcon]=\"'block'\" [size]=\"32\" color=\"warn\" variant=\"outlined\" style=\"opacity: 0.6\"></mat-icon>\n\t\t</ng-template>\n\t\t<ng-template #validDnd>\n\t\t\t<div *ngIf=\"!_overFrame && !_overDropZone\" class=\"bui-color-muted bui-upload-icon-link\" (click)=\"selectFiles()\">\n\t\t\t\t<mat-icon [buiIcon]=\"'fas fa-cloud-upload-alt'\" [size]=\"32\"></mat-icon>\n\t\t\t\t<a role=\"button\">{{ uploadActionText }}</a>\n\t\t\t</div>\n\t\t\t<div *ngIf=\"_overFrame && !_overDropZone\" class=\"bui-color-light\">{{ dragHint }}</div>\n\t\t\t<div *ngIf=\"_overDropZone\" class=\"bui-color-light\">{{ dropHint }}</div>\n\t\t</ng-template>\n\t</div>\n\t<div\n\t\tclass=\"bui-file-upload-list\"\n\t\t[@slideOut]=\"_uploadingItems.length\"\n\t\t(@slideOut.start)=\"_itemAnimationStart.next()\"\n\t\t(@slideOut.done)=\"_itemAnimationDone.next()\"\n\t\t*ngIf=\"_uploadingItems.length\"\n\t>\n\t\t<span class=\"bui-file-uploaded-label\">{{ fileUploadedLabel }}</span>\n\n\t\t<ng-container *ngFor=\"let item of _uploadingItems; let idx = index\">\n\t\t\t<div class=\"bui-file-upload-item\" [class.in-progress]=\"!item.done\" #itemDiv>\n\t\t\t\t<div class=\"bui-file-upload-item-name\">\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<mat-icon class=\"bui-color-muted\">description</mat-icon>\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\tclass=\"text\"\n\t\t\t\t\t\t\t*ngIf=\"item.done && !item.downloading; else staticName\"\n\t\t\t\t\t\t\thref=\"#{{ item.uploadedItem?.id }}\"\n\t\t\t\t\t\t\t(click)=\"$event.preventDefault(); _openItem(item)\"\n\t\t\t\t\t\t\tcontextmenu=\"false\"\n\t\t\t\t\t\t\tmatTooltip=\"Download\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ item.name }}\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t<ng-template #staticName>\n\t\t\t\t\t\t\t<span class=\"text\">{{ item.name }}</span>\n\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t</span>\n\t\t\t\t\t<div class=\"bui-file-upload-item-progress\">\n\t\t\t\t\t\t<mat-progress-bar\n\t\t\t\t\t\t\tmode=\"determinate\"\n\t\t\t\t\t\t\t[class.upload-completed]=\"item.done\"\n\t\t\t\t\t\t\t*ngIf=\"!item.downloading\"\n\t\t\t\t\t\t\t[value]=\"item.done ? 100 : item.progress * 100\"\n\t\t\t\t\t\t></mat-progress-bar>\n\t\t\t\t\t\t<mat-progress-bar mode=\"buffer\" *ngIf=\"item.downloading\"></mat-progress-bar>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<ng-template [ngIf]=\"item.done\" [ngIfElse]=\"inprogress\"> 100% </ng-template>\n\t\t\t\t\t\t\t<ng-template #inprogress>\n\t\t\t\t\t\t\t\t{{ item.progress | percent }}\n\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"bui-file-upload-item-action\">\n\t\t\t\t\t<button\n\t\t\t\t\t\tmat-icon-button\n\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t(click)=\"item.cancel()\"\n\t\t\t\t\t\t(mouseenter)=\"itemDiv.classList.add('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\t(mouseleave)=\"itemDiv.classList.remove('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\tmatTooltip=\"Delete\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<mat-icon [buiIcon]=\"'cancel'\" style=\"line-height: 0.9\"></mat-icon>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<mat-divider *ngIf=\"idx < _uploadingItems.length - 1\"></mat-divider>\n\t\t</ng-container>\n\t</div>\n\t<input\n\t\ttype=\"file\"\n\t\t#fileInput\n\t\tstyle=\"display: none\"\n\t\taccept=\"{{ _accept }}\"\n\t\t(change)=\"_handleFileSelection()\"\n\t\t[multiple]=\"remaining > 1\"\n\t/>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FileUploadComponent } from './file-upload.component';\nimport { MatIconModule } from '@angular/material/icon';\nimport { IconFontModule } from '@bravura/ui/icon-font';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDividerModule } from '@angular/material/divider';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\n@NgModule({\n\tdeclarations: [FileUploadComponent],\n\timports: [\n\t\tCommonModule,\n\t\tMatIconModule,\n\t\tIconFontModule,\n\t\tMatProgressBarModule,\n\t\tMatButtonModule,\n\t\tMatDividerModule,\n\t\tMatTooltipModule\n\t],\n\texports: [FileUploadComponent]\n})\nexport class FileUploadModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.FileUploadService"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAIA;;AAEG;MACU,cAAc,CAAA;;AAc1B,IAAA,WAAA,CAAY,GAAW,EAAE,KAAa,EAAE,KAAa,EAAE,KAAa,EAAA;AACnE,QAAA,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC;AACd,QAAA,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;AAClB,QAAA,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;AAClB,QAAA,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;KAClB;AACD,CAAA;AAED;;;;;;AAMG;MAEmB,iBAAiB,CAAA;;8GAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAjB,iBAAiB,EAAA,CAAA,CAAA;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBADtC,UAAU;;;AC7BX;AACA,MAAM,aAAa,CAAA;AAclB,IAAA,WAAA,CACC,MAA8D,EAC9D,cAAuD,EACvD,UAAuB,EACf,QAAwC,EAAA;QAAxC,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAgC;QAjBjD,IAAQ,CAAA,QAAA,GAAG,CAAC,CAAC;QAmBZ,IAAI,MAAM,YAAY,UAAU,EAAE;AACjC,YAAA,IAAI,CAAC,IAAI,GAAG,cAAsB,CAAC;AACnC,YAAA,IAAI,CAAC,Y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CAAC;AACnC,oBAAA,OAAO,EAAE;wBACR,YAAY;wBACZ,aAAa;wBACb,cAAc;wBACd,oBAAoB;wBACpB,eAAe;wBACf,gBAAgB;wBAChB,gBAAgB;AAChB,qBAAA;oBACD,OAAO,EAAE,CAAC,mBAAmB,CAAC;AAC9B,iBAAA,CAAA;;;ACtBD;;AAEG;;;;"}
1
+ {"version":3,"file":"bravura-ui-file-upload.mjs","sources":["../../../projects/ui/file-upload/file-upload.service.ts","../../../projects/ui/file-upload/file-upload.component.ts","../../../projects/ui/file-upload/file-upload.component.html","../../../projects/ui/file-upload/file-upload.module.ts","../../../projects/ui/file-upload/bravura-ui-file-upload.ts"],"sourcesContent":["import { HttpEvent } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\n/**\n * This type represents a file or form item that has been sent as part of a multipart/form-data POST request.\n */\nexport class FileUploadItem {\n\t/** The original filename in the client's filesystem, as provided by the browser. */\n\tname: string;\n\n\t/** The size of the file item. */\n\tsize: number;\n\n\t/** An alpha-numeric string that uniquely identifies the file item. */\n\tid: string;\n\n\t/** The content type (MIME type) of the file. */\n\ttype: string;\n\n\t/** @internal */\n\tconstructor(_id: string, _name: string, _size: number, _type: string) {\n\t\tthis.id = _id;\n\t\tthis.name = _name;\n\t\tthis.size = _size;\n\t\tthis.type = _type;\n\t}\n}\n\n/**\n * This is an API for processing file upload requests.\n *\n * A sub class of this type handles multiple file requests, sent using multipart/form-data encoding type, as specified by RFC 1867.\n *\n * Please extend this type and provide it in an injector at the same level, or ancestral to that, of the `FileUploadComponent`.\n */\n@Injectable()\nexport abstract class FileUploadService {\n\t/**\n\t * Upload a list of selected files from the browser. The returned `Observable` array provides the update of the uploading progress\n\t * through HTTP events.\n\t */\n\tabstract upload(files: File[]): Array<Observable<HttpEvent<FileUploadItem>>>;\n\n\t/** List all the uploaded file items in the current HTTP session. This list excludes the files still in the process of being uploaded*/\n\tabstract list(): Observable<FileUploadItem[]>;\n\n\t/** Get the content of an uploaded file item as a `Blob`. */\n\tabstract get(id: string): Observable<Blob>;\n\n\t/** Delete an uploaded file item from the server. */\n\tabstract delete(id: string): Observable<void>;\n\n\t/** Delete all uploaded file items in the current HTTP session. */\n\tabstract clear?(): Observable<void>;\n}\n","import { animate, query, stagger, style, transition, trigger } from '@angular/animations';\nimport { HttpEvent, HttpEventType } from '@angular/common/http';\nimport { Component, ElementRef, forwardRef, HostListener, Input, OnDestroy, OnInit, ViewChild } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Observable, of, Subject, Subscription } from 'rxjs';\nimport { FileUploadItem, FileUploadService } from './file-upload.service';\n\n/** @ignore */\nclass UploadingItem {\n\tprogress = 0;\n\tuploadedItem: FileUploadItem | null | undefined;\n\tdownloadingSubs?: Subscription;\n\tprivate subscription: Subscription;\n\tprivate file?: File;\n\n\tconstructor(item: FileUploadItem, oncancel: (item: UploadingItem) => void);\n\tconstructor(\n\t\tevent$: Observable<HttpEvent<FileUploadItem>> | FileUploadItem,\n\t\tfile: File,\n\t\toncomplete: () => void,\n\t\toncancel: (item: UploadingItem) => void\n\t);\n\tconstructor(\n\t\tevent$: Observable<HttpEvent<FileUploadItem>> | FileUploadItem,\n\t\tfileOrOncancel?: File | ((item: UploadingItem) => void),\n\t\toncomplete?: () => void,\n\t\tprivate oncancel?: (item: UploadingItem) => void\n\t) {\n\t\tif (event$ instanceof Observable) {\n\t\t\tthis.file = fileOrOncancel as File;\n\t\t\tthis.subscription = event$.subscribe({\n\t\t\t\tnext: evt => {\n\t\t\t\t\tif (evt.type === HttpEventType.UploadProgress) {\n\t\t\t\t\t\tthis.progress = evt.loaded / (this.file as File).size;\n\t\t\t\t\t} else if (evt.type === HttpEventType.Response) {\n\t\t\t\t\t\tthis.uploadedItem = evt.body;\n\t\t\t\t\t\tthis.progress = 1;\n\t\t\t\t\t\toncomplete!();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tthis.subscription = of(event$).subscribe();\n\t\t\tthis.uploadedItem = event$;\n\t\t\tthis.oncancel = fileOrOncancel as (item: UploadingItem) => void;\n\t\t}\n\t}\n\n\tcancel() {\n\t\tthis.subscription.unsubscribe();\n\t\tthis.oncancel!(this);\n\t}\n\n\tget done() {\n\t\treturn !!this.uploadedItem;\n\t}\n\n\tget name() {\n\t\treturn this.uploadedItem?.name || this.file?.name;\n\t}\n\n\tget downloading() {\n\t\treturn this.downloadingSubs && !this.downloadingSubs.closed;\n\t}\n}\n/**\n * A control value accessor component to provide the user interface for uploading files.\n *\n * The application that integrates this UI must provide an implementation of `FileUploadService`.\n *\n * The control's value is a list of alpha-numerical strings, which are the identifiers to the uploaded files.\n *\n * Example:\n *\n * ```html\n * <form>\n * <bui-file-upload [(ngModel)]=\"uploadedFileIds\" name=\"myFiles\"></bui-file-upload>\n * </form>\n * ```\n *\n * @see FileUploadService\n */\n@Component({\n\thost: {\n\t\tclass: 'bui-host bui-file-upload',\n\t\t'[class.bui-dnd-active]': '_overFrame && remaining >= _numberOfFilesDragged',\n\t\t'[class.bui-dnd-over]': '_overDropZone && remaining >= _numberOfFilesDragged',\n\t\t'[class.bui-dnd-invalid]': '_invalidFilesDragged'\n\t},\n\tselector: 'bui-file-upload',\n\ttemplateUrl: './file-upload.component.html',\n\tstyleUrls: ['./file-upload.component.scss'],\n\tproviders: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => FileUploadComponent), multi: true }],\n\tanimations: [\n\t\ttrigger('slideOut', [\n\t\t\ttransition('* => *', [\n\t\t\t\tquery(':leave', stagger(100, animate('0.25s', style({ height: 0, overflow: 'hidden' }))), { optional: true })\n\t\t\t])\n\t\t])\n\t]\n})\nexport class FileUploadComponent implements OnInit, OnDestroy, ControlValueAccessor {\n\t/** @ignore */\n\t_value: string[] | null = null;\n\n\t/**\n\t * The caption of the button for opening file selection dialog.\n\t */\n\t@Input()\n\tuploadActionText = 'Drag files here to attach or browse';\n\n\t/**\n\t * The label for listing successful uploaded files.\n\t */\n\t@Input()\n\tfileUploadedLabel = 'List of files uploaded successfully';\n\n\t/**\n\t * The text to be displayed when the user starts to drag file items over the browser window.\n\t */\n\t@Input()\n\tdragHint = 'Please drag the files here.';\n\n\t/**\n\t * The text to be displayed when the user is dragging the file items over the drop zone.\n\t */\n\t@Input()\n\tdropHint = 'Please release the mouse button to start uploading.';\n\n\t/** Specifies the total number of files accepted. A falsy value removes the limit.*/\n\t@Input()\n\tlimit = 0;\n\n\t/**\n\t * specify the number of maximum bytes that can be uploaded.\n\t * if number is specified, bytes are assumed, otherwise enter a string for specific size type.\n\t */\n\t@Input()\n\tfileSize: number | string = '10MB';\n\n\t/**\n\t * Accepted MIME types\n\t *\n\t * @example ['text/*', 'image/png']\n\t */\n\t@Input()\n\tget types(): string[] {\n\t\treturn this._types;\n\t}\n\tset types(types: string[]) {\n\t\tif (Array.isArray(types) && types?.length) {\n\t\t\tthis._typeRegExps = [];\n\t\t\tthis._types = Array.from(types);\n\t\t\tthis._accept = this._types.join(',');\n\t\t\ttypes.forEach(t => this._typeRegExps.push(new RegExp(t.replace(/\\*/g, '.*'))));\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_fileSizeExceedMsg: string = '';\n\n\t/** @ignore */\n\t_uploadingItems: UploadingItem[] = [];\n\n\t/** @ignore */\n\t_accept = '*/*';\n\n\t/** @ignore */\n\t_itemAnimationStart = new Subject<void>();\n\t/** @ignore */\n\t_itemAnimationDone = new Subject<void>();\n\t/** @ignore */\n\t_itemAnimationInProgress = false;\n\n\tprivate _onChange = (_: string[]) => {};\n\tprivate _onTouch = () => {};\n\tprivate _frameDndEnter: (event: DragEvent) => void;\n\tprivate _frameDndLeave: () => void;\n\tprivate _frameDndOver: (event: DragEvent) => void;\n\tprivate _frameDndStop: () => void;\n\tprivate _overFrameCounter = 0;\n\tprivate _overCounter = 0;\n\tprivate _typeRegExps: RegExp[] = [/.*\\/.*/];\n\tprivate _types: string[] = ['*/*'];\n\tprivate _initSubs?: Subscription;\n\tprivate _numberOfFilesDragged = 0;\n\n\t@ViewChild('fileInput', { read: ElementRef, static: true })\n\tprivate _fileInput!: ElementRef<HTMLInputElement>;\n\n\tconstructor(private _service: FileUploadService) {\n\t\tthis._onChange([]);\n\t\tthis._onTouch();\n\t\tthis._frameDndEnter = this._onDndEnterFrame.bind(this);\n\t\tthis._frameDndLeave = this._onDndLeaveFrame.bind(this);\n\t\tthis._frameDndStop = this._onDndStopFrame.bind(this);\n\t\tthis._frameDndOver = event => event.preventDefault();\n\t}\n\n\t/** @internal */\n\tngOnInit(): void {\n\t\tdocument.addEventListener('dragenter', this._frameDndEnter);\n\t\tdocument.addEventListener('dragleave', this._frameDndLeave);\n\t\tdocument.addEventListener('dragend', this._frameDndStop);\n\t\tdocument.addEventListener('drop', this._frameDndStop);\n\t\tdocument.addEventListener('dragover', this._frameDndOver);\n\t\tthis._itemAnimationStart.subscribe(() => (this._itemAnimationInProgress = true));\n\t\tthis._itemAnimationDone.subscribe(() => (this._itemAnimationInProgress = false));\n\t}\n\n\tngOnDestroy(): void {\n\t\tdocument.removeEventListener('dragenter', this._frameDndEnter);\n\t\tdocument.removeEventListener('dragleave', this._frameDndLeave);\n\t\tdocument.removeEventListener('dragend', this._frameDndStop);\n\t\tdocument.removeEventListener('drop', this._frameDndStop);\n\t\tdocument.removeEventListener('dragover', this._frameDndOver);\n\t\tthis._itemAnimationStart.complete();\n\t\tthis._itemAnimationDone.complete();\n\t}\n\n\t/** @internal */\n\twriteValue(obj: any): void {\n\t\tif (Array.isArray(obj)) {\n\t\t\tif (!this._value) {\n\t\t\t\tthis._acceptChange(obj);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst common = obj.filter(v => this._value!.includes(v));\n\t\t\tif (common.length === obj.length && common.length === this._value.length) {\n\t\t\t\treturn; // no change\n\t\t\t}\n\t\t\tthis._acceptChange(obj);\n\t\t} else {\n\t\t\tthis._value = null;\n\t\t}\n\t}\n\n\t/** @internal */\n\tregisterOnChange(fn: any): void {\n\t\tthis._onChange = fn;\n\t}\n\n\t/** @internal */\n\tregisterOnTouched(fn: any): void {\n\t\tthis._onTouch = fn;\n\t}\n\n\t/** @internal */\n\t@HostListener('dragenter', ['$event'])\n\tonDragEnter(event: DragEvent) {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tthis._overCounter++;\n\t}\n\n\t/** @internal */\n\t@HostListener('dragover', ['$event'])\n\tonDragOver(event: Event) {\n\t\tevent.preventDefault();\n\t}\n\n\t/** @internal */\n\t@HostListener('dragleave', ['$event'])\n\tonDragLeave(event: Event) {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tthis._overCounter--;\n\t}\n\n\t/** @internal */\n\t@HostListener('drop', ['$event'])\n\tonDndDrop(event: DragEvent) {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tthis._onDndStopFrame();\n\t\tconst files = event.dataTransfer?.files;\n\t\tif (files?.length && this._validateFileSize(files)) {\n\t\t\tthis._uploadFiles(Array.from(files));\n\t\t}\n\t}\n\n\t/** Open the file selection dialog */\n\tselectFiles() {\n\t\tthis._fileInput.nativeElement.click();\n\t}\n\n\t/** @ignore */\n\t_openItem(item: UploadingItem) {\n\t\titem.downloadingSubs = this._service.get(item.uploadedItem!.id).subscribe(blob => {\n\t\t\tconst url = URL.createObjectURL(blob);\n\t\t\twindow.open(url, '_blank');\n\t\t});\n\t}\n\n\t/** @ignore */\n\tget _overFrame(): boolean {\n\t\treturn this._overFrameCounter > 0;\n\t}\n\n\t/** @ignore */\n\tget _overDropZone(): boolean {\n\t\treturn this._overCounter > 0;\n\t}\n\n\t/** Whether file uploading is in progress */\n\tget uploading(): boolean {\n\t\treturn this._uploadingItems.some(i => !i.done);\n\t}\n\n\t/** The remaining number of files allowed.*/\n\tget remaining(): number {\n\t\treturn this.limit ? this.limit - this._uploadingItems.length : Infinity;\n\t}\n\n\t/** @ignore */\n\t_handleFileSelection() {\n\t\tconst fileList = this._fileInput.nativeElement.files;\n\t\tif (fileList?.length && this._validateFileSize(fileList)) {\n\t\t\tthis._uploadFiles(Array.from(fileList));\n\t\t\tthis._fileInput.nativeElement.value = '';\n\t\t}\n\t}\n\n\t/** @ignore */\n\tget _invalidFilesDragged(): boolean {\n\t\treturn this._numberOfFilesDragged > this.remaining && (this._overFrame || this._overDropZone);\n\t}\n\n\t/** @ignore */\n\tget _initialising(): boolean {\n\t\treturn !!this._initSubs && !this._initSubs.closed;\n\t}\n\n\tprivate returnFileSize(size: number) {\n\t\tif (size < 1024) {\n\t\t\treturn `${size} bytes`;\n\t\t} else if (size >= 1024 && size < 1048576) {\n\t\t\treturn `${(size / 1024).toFixed(1)} KB`;\n\t\t} else {\n\t\t\treturn `${(size / 1048576).toFixed(1)} MB`;\n\t\t}\n\t}\n\n\tprivate _validateFileSize(files: FileList) {\n\t\tthis._fileSizeExceedMsg = '';\n\t\tconst maxSize = this.returnFileSize(this._getMaxBytes());\n\t\tfor (let i = 0; i < files.length; i++) {\n\t\t\tif (files[i]!.size > this._getMaxBytes()) {\n\t\t\t\tthis._fileSizeExceedMsg = `Selected file/s has exceeded the allowable size of ${maxSize} per file`;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tprivate _getMaxBytes(): number {\n\t\tif (typeof this.fileSize === 'string') {\n\t\t\tif (this.fileSize.toUpperCase().endsWith('KB')) {\n\t\t\t\tconst kiloBytes = this.fileSize.substring(0, this.fileSize.indexOf('KB'));\n\t\t\t\treturn Number(kiloBytes) * 1024;\n\t\t\t} else if (this.fileSize.toUpperCase().endsWith('MB')) {\n\t\t\t\tconst megaBytes = this.fileSize.substring(0, this.fileSize.indexOf('MB'));\n\t\t\t\treturn Number(megaBytes) * 1048576;\n\t\t\t}\n\t\t}\n\t\treturn this.fileSize as number;\n\t}\n\n\tprivate _uploadFiles(files: File[]) {\n\t\tif (this._initialising || files.length > this.remaining) {\n\t\t\treturn;\n\t\t}\n\t\tconst filtered = files.filter(\n\t\t\tf =>\n\t\t\t\t(!f.type || this._typeRegExps.some(regexp => f.type.match(regexp))) &&\n\t\t\t\t!this._uploadingItems.some(i => i.name === f.name)\n\t\t);\n\t\tconst observables = this._service.upload(filtered);\n\t\tconst items = filtered.map(\n\t\t\t(f, i) => new UploadingItem(observables[i], f, this._updateItems.bind(this), this._deleteItem.bind(this))\n\t\t);\n\t\tthis._uploadingItems = [...this._uploadingItems, ...items];\n\t}\n\n\tprivate _onDndEnterFrame(event: DragEvent) {\n\t\tevent.preventDefault();\n\t\tthis._numberOfFilesDragged = event.dataTransfer?.items?.length || 0;\n\t\tthis._overFrameCounter++;\n\t}\n\n\tprivate _onDndLeaveFrame() {\n\t\tthis._overFrameCounter--;\n\t}\n\n\tprivate _onDndStopFrame() {\n\t\tthis._overFrameCounter = 0;\n\t\tthis._overCounter = 0;\n\t}\n\n\tprivate _acceptChange(v: string[]) {\n\t\tthis._initSubs = this._service.list().subscribe(list => {\n\t\t\tthis._uploadingItems = list\n\t\t\t\t.filter(i => v.includes(i.id))\n\t\t\t\t.map(f => new UploadingItem(f, this._deleteItem.bind(this)));\n\t\t});\n\t}\n\n\tprivate _updateItems() {\n\t\tconst completed = this._uploadingItems.filter(i => !!i.uploadedItem);\n\t\tthis._uploadingItems = [...completed, ...this._uploadingItems.filter(i => !i.uploadedItem)];\n\t\tthis._updateValue(completed);\n\t}\n\n\tprivate _deleteItem(item: UploadingItem) {\n\t\tconst key = item.uploadedItem?.id;\n\t\tif (key) {\n\t\t\tthis._service.delete(key).subscribe(() => {\n\t\t\t\tthis._uploadingItems = this._uploadingItems.filter(i => i !== item);\n\t\t\t\tconst completed = this._uploadingItems.filter(i => !!i.uploadedItem);\n\t\t\t\tthis._updateValue(completed);\n\t\t\t});\n\t\t} else {\n\t\t\tthis._uploadingItems = this._uploadingItems.filter(i => i !== item);\n\t\t\tconst completed = this._uploadingItems.filter(i => !!i.uploadedItem);\n\t\t\tthis._updateValue(completed);\n\t\t}\n\t}\n\n\tprivate _updateValue(completed: UploadingItem[]) {\n\t\tconst completedIds = completed.map(c => c.uploadedItem!.id);\n\t\tthis._value = completedIds;\n\t\tif (!this._value.length) {\n\t\t\tthis._value = null;\n\t\t}\n\t\tthis._onChange(completedIds);\n\t}\n}\n","<div class=\"bui-file-upload-container\">\n\t<div\n\t\tclass=\"bui-file-upload-hint\"\n\t\t*ngIf=\"!_initialising && remaining > 0 && (!_itemAnimationInProgress || remaining > 1)\"\n\t>\n\t\t<ng-template [ngIf]=\"_invalidFilesDragged\" [ngIfElse]=\"validDnd\">\n\t\t\t<mat-icon [buiIcon]=\"'block'\" [size]=\"32\" color=\"warn\" variant=\"outlined\" style=\"opacity: 0.6\"></mat-icon>\n\t\t</ng-template>\n\t\t<ng-template #validDnd>\n\t\t\t<div *ngIf=\"!_overFrame && !_overDropZone\" class=\"bui-color-muted bui-upload-icon-link\" (click)=\"selectFiles()\">\n\t\t\t\t<mat-icon [buiIcon]=\"'fas fa-cloud-upload-alt'\" [size]=\"32\"></mat-icon>\n\t\t\t\t<a role=\"button\">{{ uploadActionText }}</a>\n\t\t\t</div>\n\t\t\t<div *ngIf=\"_overFrame && !_overDropZone\" class=\"bui-color-light\">{{ dragHint }}</div>\n\t\t\t<div *ngIf=\"_overDropZone\" class=\"bui-color-light\">{{ dropHint }}</div>\n\t\t</ng-template>\n\t</div>\n\t<div\n\t\tclass=\"bui-file-upload-list\"\n\t\t[@slideOut]=\"_uploadingItems.length\"\n\t\t(@slideOut.start)=\"_itemAnimationStart.next()\"\n\t\t(@slideOut.done)=\"_itemAnimationDone.next()\"\n\t\t*ngIf=\"_uploadingItems.length\"\n\t>\n\t\t<span class=\"bui-file-uploaded-label\">{{ fileUploadedLabel }}</span>\n\n\t\t<ng-container *ngFor=\"let item of _uploadingItems; let idx = index\">\n\t\t\t<div class=\"bui-file-upload-item\" [class.in-progress]=\"!item.done\" #itemDiv>\n\t\t\t\t<div class=\"bui-file-upload-item-name\">\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<mat-icon class=\"bui-color-muted\">description</mat-icon>\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\tclass=\"text\"\n\t\t\t\t\t\t\t*ngIf=\"item.done && !item.downloading; else staticName\"\n\t\t\t\t\t\t\thref=\"#{{ item.uploadedItem?.id }}\"\n\t\t\t\t\t\t\t(click)=\"$event.preventDefault(); _openItem(item)\"\n\t\t\t\t\t\t\tcontextmenu=\"false\"\n\t\t\t\t\t\t\tmatTooltip=\"Download\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ item.name }}\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t<ng-template #staticName>\n\t\t\t\t\t\t\t<span class=\"text\">{{ item.name }}</span>\n\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t</span>\n\t\t\t\t\t<div class=\"bui-file-upload-item-progress\">\n\t\t\t\t\t\t<mat-progress-bar\n\t\t\t\t\t\t\tmode=\"determinate\"\n\t\t\t\t\t\t\t[class.upload-completed]=\"item.done\"\n\t\t\t\t\t\t\t*ngIf=\"!item.downloading\"\n\t\t\t\t\t\t\t[value]=\"item.done ? 100 : item.progress * 100\"\n\t\t\t\t\t\t></mat-progress-bar>\n\t\t\t\t\t\t<mat-progress-bar mode=\"buffer\" *ngIf=\"item.downloading\"></mat-progress-bar>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<ng-template [ngIf]=\"item.done\" [ngIfElse]=\"inprogress\"> 100% </ng-template>\n\t\t\t\t\t\t\t<ng-template #inprogress>\n\t\t\t\t\t\t\t\t{{ item.progress | percent }}\n\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"bui-file-upload-item-action\">\n\t\t\t\t\t<button\n\t\t\t\t\t\tmat-icon-button\n\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t(click)=\"item.cancel()\"\n\t\t\t\t\t\t(mouseenter)=\"itemDiv.classList.add('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\t(mouseleave)=\"itemDiv.classList.remove('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\tmatTooltip=\"Delete\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<mat-icon [buiIcon]=\"'cancel'\" style=\"line-height: 0.9\"></mat-icon>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<mat-divider *ngIf=\"idx < _uploadingItems.length - 1\"></mat-divider>\n\t\t</ng-container>\n\t</div>\n\t<input\n\t\ttype=\"file\"\n\t\t#fileInput\n\t\tstyle=\"display: none\"\n\t\taccept=\"{{ _accept }}\"\n\t\t(change)=\"_handleFileSelection()\"\n\t\t[multiple]=\"remaining > 1\"\n\t/>\n\n\t<div *ngIf=\"_fileSizeExceedMsg\" class=\"bui-color-warn bui-file-size-exceed\">\n\t\t<span> {{ _fileSizeExceedMsg }}</span> <mat-icon role=\"button\" (click)=\"_fileSizeExceedMsg = ''\">cancel</mat-icon>\n\t</div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FileUploadComponent } from './file-upload.component';\nimport { MatIconModule } from '@angular/material/icon';\nimport { IconFontModule } from '@bravura/ui/icon-font';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDividerModule } from '@angular/material/divider';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\n@NgModule({\n\tdeclarations: [FileUploadComponent],\n\timports: [\n\t\tCommonModule,\n\t\tMatIconModule,\n\t\tIconFontModule,\n\t\tMatProgressBarModule,\n\t\tMatButtonModule,\n\t\tMatDividerModule,\n\t\tMatTooltipModule\n\t],\n\texports: [FileUploadComponent]\n})\nexport class FileUploadModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.FileUploadService"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAIA;;AAEG;MACU,cAA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,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAV3B,YAAY;QACZ,aAAa;QACb,cAAc;QACd,oBAAoB;QACpB,eAAe;QACf,gBAAgB;QAChB,gBAAgB,CAAA,EAAA,CAAA,CAAA;2FAIL,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAb5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACT,YAAY,EAAE,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE;wBACR,YAAY;wBACZ,aAAa;wBACb,cAAc;wBACd,oBAAoB;wBACpB,eAAe;wBACf,gBAAgB;wBAChB,gBAAgB;AAChB,qBAAA;oBACD,OAAO,EAAE,CAAC,mBAAmB,CAAC;AAC9B,iBAAA,CAAA;;;ACtBD;;AAEG;;;;"}
@@ -0,0 +1,87 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, ChangeDetectionStrategy, Input, NgModule } from '@angular/core';
3
+ import { CommonModule } from '@angular/common';
4
+ import * as i1 from '@angular/material/card';
5
+ import { MatCardModule } from '@angular/material/card';
6
+
7
+ /**
8
+ * A `bui-panel` consists of a `mat-card` and a tinted backdrop.
9
+ *
10
+ * Unlike `mat-card`, `bui-panel` has a flat appearance by default and a transparent background.
11
+ * The backdrop is nearly transparent, blending the theme palette `color`
12
+ * and the effective background color of the DOM ancestors.
13
+ *
14
+ * `bui-panel` supports all the content child directives of `mat-card`.
15
+ *
16
+ */
17
+ class PanelComponent {
18
+ constructor(_cd) {
19
+ this._cd = _cd;
20
+ this._color = 'primary';
21
+ this._appearance = 'flat';
22
+ }
23
+ /**
24
+ * This property defines the background (shaded) and border colors of the panel
25
+ */
26
+ get color() {
27
+ return this._color;
28
+ }
29
+ set color(value) {
30
+ this._color = value;
31
+ this._cd.markForCheck();
32
+ }
33
+ /**
34
+ * In contrast to using a `mat-card` alone, a `bui-panel` does not have a elevated appearance by default.
35
+ *
36
+ * This property can change the default appearance to
37
+ *
38
+ * * `raised` - the original `mat-card` default
39
+ * * `outline` - a `mat-card` with borders
40
+ * * `flat` - no border or elevation
41
+ */
42
+ get appearance() {
43
+ return this._appearance;
44
+ }
45
+ set appearance(value) {
46
+ this._appearance = value;
47
+ this._cd.markForCheck();
48
+ }
49
+ ngOnInit() { }
50
+ }
51
+ PanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PanelComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
52
+ PanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: PanelComponent, selector: "bui-panel", inputs: { backdropClass: "backdropClass", cardClass: "cardClass", color: "color", appearance: "appearance" }, host: { classAttribute: "bui-panel bui-host" }, ngImport: i0, template: "<div class=\"bui-panel-backdrop {{ backdropClass }} bui-bg-{{ color || 'none' }}\"></div>\n<mat-card\n\tclass=\"bui-border-{{ color || 'none' }} {{ cardClass }} {{\n\t\tappearance === 'flat' ? 'mat-elevation-z' : appearance === 'outlined' ? 'mat-elevation-z bui-panel-border' : ''\n\t}}\"\n>\n\t<ng-content></ng-content>\n</mat-card>\n", styles: [":host{position:relative}:host .bui-panel-backdrop{position:absolute;top:0;left:0;right:0;bottom:0;border-radius:4px;opacity:.1}:host .mat-card{background-color:transparent}:host .bui-panel-border{border-width:1px;border-style:solid}\n"], dependencies: [{ kind: "component", type: i1.MatCard, selector: "mat-card", exportAs: ["matCard"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
53
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PanelComponent, decorators: [{
54
+ type: Component,
55
+ args: [{ selector: 'bui-panel', host: {
56
+ class: 'bui-panel bui-host'
57
+ }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"bui-panel-backdrop {{ backdropClass }} bui-bg-{{ color || 'none' }}\"></div>\n<mat-card\n\tclass=\"bui-border-{{ color || 'none' }} {{ cardClass }} {{\n\t\tappearance === 'flat' ? 'mat-elevation-z' : appearance === 'outlined' ? 'mat-elevation-z bui-panel-border' : ''\n\t}}\"\n>\n\t<ng-content></ng-content>\n</mat-card>\n", styles: [":host{position:relative}:host .bui-panel-backdrop{position:absolute;top:0;left:0;right:0;bottom:0;border-radius:4px;opacity:.1}:host .mat-card{background-color:transparent}:host .bui-panel-border{border-width:1px;border-style:solid}\n"] }]
58
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { backdropClass: [{
59
+ type: Input
60
+ }], cardClass: [{
61
+ type: Input
62
+ }], color: [{
63
+ type: Input
64
+ }], appearance: [{
65
+ type: Input
66
+ }] } });
67
+
68
+ class PanelModule {
69
+ }
70
+ PanelModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PanelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
71
+ PanelModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: PanelModule, declarations: [PanelComponent], imports: [CommonModule, MatCardModule], exports: [MatCardModule, PanelComponent] });
72
+ PanelModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PanelModule, imports: [CommonModule, MatCardModule, MatCardModule] });
73
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PanelModule, decorators: [{
74
+ type: NgModule,
75
+ args: [{
76
+ declarations: [PanelComponent],
77
+ imports: [CommonModule, MatCardModule],
78
+ exports: [MatCardModule, PanelComponent]
79
+ }]
80
+ }] });
81
+
82
+ /**
83
+ * Generated bundle index. Do not edit.
84
+ */
85
+
86
+ export { PanelComponent, PanelModule };
87
+ //# sourceMappingURL=bravura-ui-panel.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bravura-ui-panel.mjs","sources":["../../../projects/ui/panel/panel.component.ts","../../../projects/ui/panel/panel.component.html","../../../projects/ui/panel/panel.module.ts","../../../projects/ui/panel/bravura-ui-panel.ts"],"sourcesContent":["import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit } from '@angular/core';\nimport { ThemePalette } from '@angular/material/core';\n\n/**\n * A `bui-panel` consists of a `mat-card` and a tinted backdrop.\n *\n * Unlike `mat-card`, `bui-panel` has a flat appearance by default and a transparent background.\n * The backdrop is nearly transparent, blending the theme palette `color`\n * and the effective background color of the DOM ancestors.\n *\n * `bui-panel` supports all the content child directives of `mat-card`.\n *\n */\n@Component({\n\tselector: 'bui-panel',\n\ttemplateUrl: './panel.component.html',\n\tstyleUrls: ['./panel.component.scss'],\n\thost: {\n\t\tclass: 'bui-panel bui-host'\n\t},\n\tchangeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class PanelComponent implements OnInit {\n\t/**\n\t * Additional style classes on the tinted backdrop element.\n\t */\n\t@Input()\n\tbackdropClass?: string;\n\n\t/**\n\t * Additional style classes on the `<mat-card>` element.\n\t */\n\t@Input()\n\tcardClass?: string;\n\n\t/**\n\t * This property defines the background (shaded) and border colors of the panel\n\t */\n\t@Input()\n\tget color(): ThemePalette {\n\t\treturn this._color;\n\t}\n\tset color(value: ThemePalette) {\n\t\tthis._color = value;\n\t\tthis._cd.markForCheck();\n\t}\n\n\t/**\n\t * In contrast to using a `mat-card` alone, a `bui-panel` does not have a elevated appearance by default.\n\t *\n\t * This property can change the default appearance to\n\t *\n\t * * `raised` - the original `mat-card` default\n\t * * `outline` - a `mat-card` with borders\n\t * * `flat` - no border or elevation\n\t */\n\t@Input()\n\tget appearance(): 'outlined' | 'raised' | 'flat' {\n\t\treturn this._appearance;\n\t}\n\tset appearance(value: 'outlined' | 'raised' | 'flat') {\n\t\tthis._appearance = value;\n\t\tthis._cd.markForCheck();\n\t}\n\n\tprivate _color: ThemePalette = 'primary';\n\n\tprivate _appearance: 'outlined' | 'raised' | 'flat' = 'flat';\n\n\tconstructor(private _cd: ChangeDetectorRef) {}\n\n\tngOnInit(): void {}\n}\n","<div class=\"bui-panel-backdrop {{ backdropClass }} bui-bg-{{ color || 'none' }}\"></div>\n<mat-card\n\tclass=\"bui-border-{{ color || 'none' }} {{ cardClass }} {{\n\t\tappearance === 'flat' ? 'mat-elevation-z' : appearance === 'outlined' ? 'mat-elevation-z bui-panel-border' : ''\n\t}}\"\n>\n\t<ng-content></ng-content>\n</mat-card>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { PanelComponent } from './panel.component';\nimport { MatCardModule } from '@angular/material/card';\n\n@NgModule({\n\tdeclarations: [PanelComponent],\n\timports: [CommonModule, MatCardModule],\n\texports: [MatCardModule, PanelComponent]\n})\nexport class PanelModule {}\n\nexport { PanelComponent };\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAGA;;;;;;;;;AASG;MAUU,cAAc,CAAA;AA+C1B,IAAA,WAAA,CAAoB,GAAsB,EAAA;QAAtB,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;QAJlC,IAAM,CAAA,MAAA,GAAiB,SAAS,CAAC;QAEjC,IAAW,CAAA,WAAA,GAAmC,MAAM,CAAC;KAEf;AAlC9C;;AAEG;AACH,IAAA,IACI,KAAK,GAAA;QACR,OAAO,IAAI,CAAC,MAAM,CAAC;KACnB;IACD,IAAI,KAAK,CAAC,KAAmB,EAAA;AAC5B,QAAA,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;AACpB,QAAA,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;KACxB;AAED;;;;;;;;AAQG;AACH,IAAA,IACI,UAAU,GAAA;QACb,OAAO,IAAI,CAAC,WAAW,CAAC;KACxB;IACD,IAAI,UAAU,CAAC,KAAqC,EAAA;AAC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,CAAA,CAAA;yGAAX,WAAW,EAAA,YAAA,EAAA,CAJR,cAAc,CACnB,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,aAAa,CAAA,EAAA,OAAA,EAAA,CAC3B,aAAa,EAAE,cAAc,CAAA,EAAA,CAAA,CAAA;AAE3B,WAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,EAHb,OAAA,EAAA,CAAA,YAAY,EAAE,aAAa,EAC3B,aAAa,CAAA,EAAA,CAAA,CAAA;2FAEX,WAAW,EAAA,UAAA,EAAA,CAAA;kBALvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACT,YAAY,EAAE,CAAC,cAAc,CAAC;AAC9B,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;AACtC,oBAAA,OAAO,EAAE,CAAC,aAAa,EAAE,cAAc,CAAC;AACxC,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
@@ -58,6 +58,11 @@ export declare class FileUploadComponent implements OnInit, OnDestroy, ControlVa
58
58
  dropHint: string;
59
59
  /** Specifies the total number of files accepted. A falsy value removes the limit.*/
60
60
  limit: number;
61
+ /**
62
+ * specify the number of maximum bytes that can be uploaded.
63
+ * if number is specified, bytes are assumed, otherwise enter a string for specific size type.
64
+ */
65
+ fileSize: number | string;
61
66
  /**
62
67
  * Accepted MIME types
63
68
  *
@@ -66,6 +71,8 @@ export declare class FileUploadComponent implements OnInit, OnDestroy, ControlVa
66
71
  get types(): string[];
67
72
  set types(types: string[]);
68
73
  /** @ignore */
74
+ _fileSizeExceedMsg: string;
75
+ /** @ignore */
69
76
  _uploadingItems: UploadingItem[];
70
77
  /** @ignore */
71
78
  _accept: string;
@@ -124,6 +131,9 @@ export declare class FileUploadComponent implements OnInit, OnDestroy, ControlVa
124
131
  get _invalidFilesDragged(): boolean;
125
132
  /** @ignore */
126
133
  get _initialising(): boolean;
134
+ private returnFileSize;
135
+ private _validateFileSize;
136
+ private _getMaxBytes;
127
137
  private _uploadFiles;
128
138
  private _onDndEnterFrame;
129
139
  private _onDndLeaveFrame;
@@ -133,6 +143,6 @@ export declare class FileUploadComponent implements OnInit, OnDestroy, ControlVa
133
143
  private _deleteItem;
134
144
  private _updateValue;
135
145
  static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadComponent, never>;
136
- static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "bui-file-upload", never, { "uploadActionText": "uploadActionText"; "fileUploadedLabel": "fileUploadedLabel"; "dragHint": "dragHint"; "dropHint": "dropHint"; "limit": "limit"; "types": "types"; }, {}, never, never, false>;
146
+ static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "bui-file-upload", never, { "uploadActionText": "uploadActionText"; "fileUploadedLabel": "fileUploadedLabel"; "dragHint": "dragHint"; "dropHint": "dropHint"; "limit": "limit"; "fileSize": "fileSize"; "types": "types"; }, {}, never, never, false>;
137
147
  }
138
148
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bravura/ui",
3
3
  "description": "Bravura UI Components for Angular applications",
4
- "version": "2.0.0",
4
+ "version": "2.2.0",
5
5
  "keywords": [
6
6
  "Angular",
7
7
  "Angular Material",
@@ -113,6 +113,14 @@
113
113
  "node": "./fesm2015/bravura-ui-icon-font.mjs",
114
114
  "default": "./fesm2020/bravura-ui-icon-font.mjs"
115
115
  },
116
+ "./panel": {
117
+ "types": "./panel/index.d.ts",
118
+ "esm2020": "./esm2020/panel/bravura-ui-panel.mjs",
119
+ "es2020": "./fesm2020/bravura-ui-panel.mjs",
120
+ "es2015": "./fesm2015/bravura-ui-panel.mjs",
121
+ "node": "./fesm2015/bravura-ui-panel.mjs",
122
+ "default": "./fesm2020/bravura-ui-panel.mjs"
123
+ },
116
124
  "./phone-number": {
117
125
  "types": "./phone-number/index.d.ts",
118
126
  "esm2020": "./esm2020/phone-number/bravura-ui-phone-number.mjs",
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@bravura/ui/panel" />
5
+ export * from './public-api';
@@ -0,0 +1,46 @@
1
+ import { ChangeDetectorRef, OnInit } from '@angular/core';
2
+ import { ThemePalette } from '@angular/material/core';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * A `bui-panel` consists of a `mat-card` and a tinted backdrop.
6
+ *
7
+ * Unlike `mat-card`, `bui-panel` has a flat appearance by default and a transparent background.
8
+ * The backdrop is nearly transparent, blending the theme palette `color`
9
+ * and the effective background color of the DOM ancestors.
10
+ *
11
+ * `bui-panel` supports all the content child directives of `mat-card`.
12
+ *
13
+ */
14
+ export declare class PanelComponent implements OnInit {
15
+ private _cd;
16
+ /**
17
+ * Additional style classes on the tinted backdrop element.
18
+ */
19
+ backdropClass?: string;
20
+ /**
21
+ * Additional style classes on the `<mat-card>` element.
22
+ */
23
+ cardClass?: string;
24
+ /**
25
+ * This property defines the background (shaded) and border colors of the panel
26
+ */
27
+ get color(): ThemePalette;
28
+ set color(value: ThemePalette);
29
+ /**
30
+ * In contrast to using a `mat-card` alone, a `bui-panel` does not have a elevated appearance by default.
31
+ *
32
+ * This property can change the default appearance to
33
+ *
34
+ * * `raised` - the original `mat-card` default
35
+ * * `outline` - a `mat-card` with borders
36
+ * * `flat` - no border or elevation
37
+ */
38
+ get appearance(): 'outlined' | 'raised' | 'flat';
39
+ set appearance(value: 'outlined' | 'raised' | 'flat');
40
+ private _color;
41
+ private _appearance;
42
+ constructor(_cd: ChangeDetectorRef);
43
+ ngOnInit(): void;
44
+ static ɵfac: i0.ɵɵFactoryDeclaration<PanelComponent, never>;
45
+ static ɵcmp: i0.ɵɵComponentDeclaration<PanelComponent, "bui-panel", never, { "backdropClass": "backdropClass"; "cardClass": "cardClass"; "color": "color"; "appearance": "appearance"; }, {}, never, ["*"], false>;
46
+ }
@@ -0,0 +1,11 @@
1
+ import { PanelComponent } from './panel.component';
2
+ import * as i0 from "@angular/core";
3
+ import * as i1 from "./panel.component";
4
+ import * as i2 from "@angular/common";
5
+ import * as i3 from "@angular/material/card";
6
+ export declare class PanelModule {
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<PanelModule, never>;
8
+ static ɵmod: i0.ɵɵNgModuleDeclaration<PanelModule, [typeof i1.PanelComponent], [typeof i2.CommonModule, typeof i3.MatCardModule], [typeof i3.MatCardModule, typeof i1.PanelComponent]>;
9
+ static ɵinj: i0.ɵɵInjectorDeclaration<PanelModule>;
10
+ }
11
+ export { PanelComponent };
@@ -0,0 +1 @@
1
+ export * from './panel.module';