@eui/components 18.2.17 → 18.2.19-snapshot-1759231200616

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.
@@ -1 +1 @@
1
- {"version":3,"file":"eui-file-upload.component.d.ts","sourceRoot":"","sources":["../../eui-file-upload/eui-file-upload.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,UAAU,EAKV,MAAM,EAEN,SAAS,EAET,YAAY,EAEZ,aAAa,EAEb,WAAW,EACd,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,oBAAoB,EAAqB,MAAM,gBAAgB,CAAC;AAEzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;;AAExE,qBAaa,sBAAuB,YAAW,oBAAoB,EAAE,MAAM,EAAE,aAAa;IAC7E,OAAO,SAAqB;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,SAAO;IACb,QAAQ,EAAE,MAAM,CAAC;IAChB,QAAQ,oBAAsB;IAG9B,SAAS,oBAA6D;IAEhF,IACW,UAAU,IAAI,MAAM,CAM9B;IAEM,KAAK,EAAE,IAAI,EAAE,CAAM;IACnB,cAAc,SAAK;IACnB,cAAc,SAAqC;IACnD,aAAa,EAAE,wBAAwB,EAAE,CAAM;IAC/C,WAAW,UAAS;IAEY,SAAS,EAAE,SAAS,CAAC,oBAAoB,CAAC,CAAC;IAE3D,UAAU,EAAE,SAAS,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAEpE,oBAAoB,EAAE,WAAW,CAAC;QAAE,SAAS,EAAE;YAAE,IAAI,EAAE,wBAAwB,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,YAAY,EAAE,OAAO,CAAA;SAAE,CAAA;KAAE,CAAC,CAAC;IAC3H,oBAAoB,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IAC/C,mBAAmB,E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edFiles.length > 0);
268
268
  }
269
269
  get isDropAreaDisabled() {
270
- return (!this.isMultiple && [...this.uploadedFiles, ...this.files].length === 1) || [...this.uploadedFiles, ...this.files].length === this.maxFiles;
270
+ return (!this.isMultiple && [...this.uploadedFiles, ...this.files].length >= 1) || [...this.uploadedFiles, ...this.files].length === this.maxFiles;
271
271
  }
272
272
  get isBrowseButtonDisabled() {
273
- return (!this.isMultiple && [...this.uploadedFiles, ...this.files].length === 1) || [...this.uploadedFiles, ...this.files].length === this.maxFiles;
273
+ return (!this.isMultiple && [...this.uploadedFiles, ...this.files].length >= 1) || [...this.uploadedFiles, ...this.files].length === this.maxFiles;
274
274
  }
275
275
  ngOnInit() {
276
276
  if (this.hasPreviewAsIcon) {
@@ -339,7 +339,9 @@ class EuiFileUploadComponent {
339
339
  this.onChange([...this.uploadedFiles, ...this.files]);
340
340
  }
341
341
  openBrowseWindow() {
342
- this.fileInputs.first.nativeElement.click();
342
+ if (!this.isBrowseButtonDisabled) {
343
+ this.fileInputs.first.nativeElement.click();
344
+ }
343
345
  }
344
346
  // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html
345
347
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -374,7 +376,7 @@ class EuiFileUploadComponent {
374
376
  useExisting: EuiFileUploadComponent,
375
377
  multi: true,
376
378
  },
377
- ], queries: [{ propertyName: "templates", predicate: EuiTemplateDirective }], viewQueries: [{ propertyName: "fileInputs", predicate: ["input"], descendants: true }], ngImport: i0, template: "@if (hasDragArea) {\n <div\n class=\"eui-file-upload__drop-area\"\n [class.eui-file-upload__drop-area--active]=\"dragEntered\"\n [class.eui-file-upload__drop-area--disabled]=\"isDropAreaDisabled\">\n <span class=\"eui-file-upload__fake-btn\">{{ 'eui.euifileupload.CHOOSE-FILE' | translate }}</span>\n <span>{{ 'eui.euifileupload.DRAG-AND-DROP-FILE-HERE' | translate }}</span>\n <input\n #input\n class=\"eui-file-upload__file-input\"\n attr.aria-label=\"{{ 'eui.euifileupload.CHOOSE-FILE' | translate }} 'or' {{\n 'eui.euifileupload.DRAG-AND-DROP-FILE-HERE' | translate\n }}\"\n type=\"file\"\n accept=\"{{ accept }}\"\n [attr.disabled]=\"isDropAreaDisabled ? 'disabled' : null\"\n [multiple]=\"isMultiple\"\n (dragenter)=\"onDragEnter()\"\n (dragleave)=\"onDragLeave()\" />\n </div>\n} @else {\n <div class=\"eui-file-upload__simple-input-file\">\n <label for=\"file-{{ randomNumberId }}\">\n @if (browseButtonTemplate) {\n <ng-template [ngTemplateOutlet]=\"browseButtonTemplate\"></ng-template>\n } @else {\n <button euiButton [attr.disabled]=\"isBrowseButtonDisabled ? 'disabled' : null\" type=\"button\" (click)=\"openBrowseWindow()\">{{ 'eui.euifileupload.CHOOSE-FILE' | translate }}</button>\n }\n </label>\n \n @if (isMultiple) {\n <input\n #input\n aria-label=\"Choose Multiple Files\"\n class=\"file-input\"\n id=\"file-{{ randomNumberId }}\"\n type=\"file\"\n accept=\"{{ accept }}\"\n multiple />\n } @else {\n <input\n #input\n aria-label=\"Choose a single file\"\n class=\"file-input\"\n id=\"file-{{ randomNumberId }}\"\n type=\"file\"\n accept=\"{{ accept }}\" />\n }\n </div>\n}\n\n@if (hasProgressBar) {\n @if (progressBarTemplate) {\n <ng-template\n [ngTemplateOutlet]=\"progressBarTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: { progress } }\">\n </ng-template>\n } @else {\n <eui-file-upload-progress [progress]=\"progress\"></eui-file-upload-progress>\n }\n}\n\n@for (uploadedFile of uploadedFiles; let i = $index; track $index) {\n <div>\n <eui-file-preview\n [isItemsClickable]=\"isItemsClickable\"\n [index]=\"i\"\n [file]=\"uploadedFile\"\n [hasPreview]=\"hasPreview\"\n [hasPreviewAsImage]=\"hasPreviewAsImage\"\n [hasPreviewAsIcon]=\"hasPreviewAsIcon\"\n [uploadedFileTemplate]=\"uploadedFileTemplate\"\n (itemClick)=\"onItemClick($event)\"\n (removeFromList)=\"removeFromUploadedList($event)\">\n </eui-file-preview>\n </div>\n}\n\n@for (file of files; let i = $index; track $index) {\n <div>\n <eui-file-preview\n isFileObject\n [isItemsClickable]=\"isItemsClickable\"\n [index]=\"i\"\n [file]=\"file\"\n [hasPreview]=\"hasPreview\"\n [hasPreviewAsImage]=\"hasPreviewAsImage\"\n [hasPreviewAsIcon]=\"hasPreviewAsIcon\"\n [uploadedFileTemplate]=\"uploadedFileTemplate\"\n (itemClick)=\"onItemClick($event)\"\n (removeFromList)=\"removeFromList($event)\">\n </eui-file-preview>\n </div>\n}\n\n@if (filesTotalSize && hasTotalSizeDisplayed) {\n <div class=\"eui-file-upload__total-size\">\n {{ filesTotalSize | filesize }} {{ 'eui.euifileupload.TOTAL-SIZE' | translate }}\n </div>\n}\n\n<ng-content></ng-content>\n\n@if (showResetBtn) {\n @if (resetButtonTemplate) {\n <ng-template [ngTemplateOutlet]=\"resetButtonTemplate\"></ng-template>\n } @else {\n <button euiButton type=\"button\" (click)=\"resetList()\">\n {{ 'eui.euifileupload.RESET-LIST' | translate }}\n </button>\n }\n}\n", styles: [".eui-18 .eui-file-upload__total-size{margin-bottom:1rem;font:var(--eui-f-m-bold)}.eui-18 .eui-file-upload__drop-area{outline:1px dashed var(--eui-c-info);border-radius:var(--eui-br-m);margin:0 0 10px;padding:30px;position:relative;-webkit-transition:.2s;transition:.2s}.eui-18 .eui-file-upload__drop-area--active{background-color:var(--eui-c-primary-bg);outline:3px dashed var(--eui-c-info);border-radius:var(--eui-br-m);margin:0 0 10px;padding:30px;position:relative;-webkit-transition:.2s;transition:.2s}.eui-18 .eui-file-upload__drop-area--disabled{opacity:.75;cursor:not-allowed}.eui-18 .eui-file-upload__drop-area--disabled .file-input{cursor:default}.eui-18 .eui-file-upload__fake-btn{background-color:#fff;border:var(--eui-bw-xs) solid #9e9ec4;border-radius:var(--eui-br-m);margin-right:8px;padding:8px 15px}.eui-18 .eui-file-upload__file-input{height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}.eui-18 .eui-file-upload__file-input:not(:disabled){cursor:pointer}.eui-18 .eui-file-upload__simple-input-file{margin-bottom:var(--eui-s-xs)}.eui-18 .eui-file-upload__simple-input-file .file-input{display:none}.eui-18 .eui-file-upload__preview{align-items:center;display:flex;justify-content:space-between;margin:5px 0}.eui-18 .eui-file-upload__preview--left{align-items:center;display:flex;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.eui-18 .eui-file-upload__preview--left__image{margin-right:var(--eui-s-m)}.eui-18 .eui-file-upload__preview--left__image img{width:180px}.eui-18 .eui-file-upload__preview--left__image .loading-container{text-align:center;width:180px}.eui-18 .eui-file-upload__preview--left__filename{display:block}.eui-18 .eui-file-upload__preview--right{align-items:center;display:flex;margin-left:auto}.eui-18 .eui-file-upload__progress-bar-container{margin-bottom:var(--eui-s-2xs)}.eui-18 .eui-file-upload__progress-bar-container .progress-bar{background-color:var(--eui-c-primary);height:var(--eui-s-2xs)}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.EuiButtonComponent, selector: "button[euiButton], a[euiButton]", inputs: ["e2eAttr", "id", "euiBasicButton", "euiButtonCall", "euiBlockButton", "euiIconButton", "euiLineWrap", "isChecked", "euiDisabled"], outputs: ["buttonClick"] }, { kind: "component", type: EuiFileUploadProgressComponent, selector: "eui-file-upload-progress", inputs: ["progress"] }, { kind: "component", type: EuiFilePreviewComponent, selector: "eui-file-preview", inputs: ["file", "uploadedFileTemplate", "index", "previewAsIconConfig", "hasPreview", "isFilenameDisplayed", "isFilesizeDisplayed", "isFiletypeDisplayed", "hasPreviewAsImage", "hasPreviewAsIcon", "isItemsClickable", "isFileObject"], outputs: ["removeFromList", "itemClick"] }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "pipe", type: EuiFileSizePipe, name: "filesize" }], encapsulation: i0.ViewEncapsulation.None }); }
379
+ ], queries: [{ propertyName: "templates", predicate: EuiTemplateDirective }], viewQueries: [{ propertyName: "fileInputs", predicate: ["input"], descendants: true }], ngImport: i0, template: "@if (hasDragArea) {\n <div\n class=\"eui-file-upload__drop-area\"\n [class.eui-file-upload__drop-area--active]=\"dragEntered\"\n [class.eui-file-upload__drop-area--disabled]=\"isDropAreaDisabled\">\n <span class=\"eui-file-upload__fake-btn\">{{ 'eui.euifileupload.CHOOSE-FILE' | translate }}</span>\n <span>{{ 'eui.euifileupload.DRAG-AND-DROP-FILE-HERE' | translate }}</span>\n <input\n #input\n class=\"eui-file-upload__file-input\"\n attr.aria-label=\"{{ 'eui.euifileupload.CHOOSE-FILE' | translate }} 'or' {{\n 'eui.euifileupload.DRAG-AND-DROP-FILE-HERE' | translate\n }}\"\n type=\"file\"\n accept=\"{{ accept }}\"\n [attr.disabled]=\"isDropAreaDisabled ? 'disabled' : null\"\n [multiple]=\"isMultiple\"\n (dragenter)=\"onDragEnter()\"\n (dragleave)=\"onDragLeave()\" />\n </div>\n} @else {\n <div class=\"eui-file-upload__simple-input-file\" [class.eui-file-upload__browse-button--disabled]=\"isBrowseButtonDisabled\">\n <label class=\"eui-file-upload__simple-input-file-label\" for=\"file-{{ randomNumberId }}\">\n @if (browseButtonTemplate) {\n <ng-template [ngTemplateOutlet]=\"browseButtonTemplate\"></ng-template>\n } @else {\n <button euiButton [attr.disabled]=\"isBrowseButtonDisabled ? 'disabled' : null\" type=\"button\" (click)=\"openBrowseWindow()\">{{ 'eui.euifileupload.CHOOSE-FILE' | translate }}</button>\n }\n </label>\n \n @if (isMultiple) {\n <input\n #input\n aria-label=\"Choose Multiple Files\"\n class=\"file-input\"\n id=\"file-{{ randomNumberId }}\"\n type=\"file\"\n accept=\"{{ accept }}\"\n multiple />\n } @else {\n <input\n #input\n aria-label=\"Choose a single file\"\n class=\"file-input\"\n id=\"file-{{ randomNumberId }}\"\n type=\"file\"\n accept=\"{{ accept }}\" />\n }\n </div>\n}\n\n@if (hasProgressBar) {\n @if (progressBarTemplate) {\n <ng-template\n [ngTemplateOutlet]=\"progressBarTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: { progress } }\">\n </ng-template>\n } @else {\n <eui-file-upload-progress [progress]=\"progress\"></eui-file-upload-progress>\n }\n}\n\n@for (uploadedFile of uploadedFiles; let i = $index; track $index) {\n <div>\n <eui-file-preview\n [isItemsClickable]=\"isItemsClickable\"\n [index]=\"i\"\n [file]=\"uploadedFile\"\n [hasPreview]=\"hasPreview\"\n [hasPreviewAsImage]=\"hasPreviewAsImage\"\n [hasPreviewAsIcon]=\"hasPreviewAsIcon\"\n [uploadedFileTemplate]=\"uploadedFileTemplate\"\n (itemClick)=\"onItemClick($event)\"\n (removeFromList)=\"removeFromUploadedList($event)\">\n </eui-file-preview>\n </div>\n}\n\n@for (file of files; let i = $index; track $index) {\n <div>\n <eui-file-preview\n isFileObject\n [isItemsClickable]=\"isItemsClickable\"\n [index]=\"i\"\n [file]=\"file\"\n [hasPreview]=\"hasPreview\"\n [hasPreviewAsImage]=\"hasPreviewAsImage\"\n [hasPreviewAsIcon]=\"hasPreviewAsIcon\"\n [uploadedFileTemplate]=\"uploadedFileTemplate\"\n (itemClick)=\"onItemClick($event)\"\n (removeFromList)=\"removeFromList($event)\">\n </eui-file-preview>\n </div>\n}\n\n@if (filesTotalSize && hasTotalSizeDisplayed) {\n <div class=\"eui-file-upload__total-size\">\n {{ filesTotalSize | filesize }} {{ 'eui.euifileupload.TOTAL-SIZE' | translate }}\n </div>\n}\n\n<ng-content></ng-content>\n\n@if (showResetBtn) {\n @if (resetButtonTemplate) {\n <ng-template [ngTemplateOutlet]=\"resetButtonTemplate\"></ng-template>\n } @else {\n <button euiButton type=\"button\" (click)=\"resetList()\">\n {{ 'eui.euifileupload.RESET-LIST' | translate }}\n </button>\n }\n}\n", styles: [".eui-18 .eui-file-upload__total-size{margin-bottom:1rem;font:var(--eui-f-m-bold)}.eui-18 .eui-file-upload__drop-area{outline:1px dashed var(--eui-c-info);border-radius:var(--eui-br-m);margin:0 0 10px;padding:30px;position:relative;-webkit-transition:.2s;transition:.2s}.eui-18 .eui-file-upload__drop-area--active{background-color:var(--eui-c-primary-bg);outline:3px dashed var(--eui-c-info);border-radius:var(--eui-br-m);margin:0 0 10px;padding:30px;position:relative;-webkit-transition:.2s;transition:.2s}.eui-18 .eui-file-upload__drop-area--disabled{opacity:.75;cursor:not-allowed}.eui-18 .eui-file-upload__drop-area--disabled .file-input{cursor:default}.eui-18 .eui-file-upload__fake-btn{background-color:#fff;border:var(--eui-bw-xs) solid #9e9ec4;border-radius:var(--eui-br-m);margin-right:8px;padding:8px 15px}.eui-18 .eui-file-upload__file-input{height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}.eui-18 .eui-file-upload__file-input:not(:disabled){cursor:pointer}.eui-18 .eui-file-upload__simple-input-file{margin-bottom:var(--eui-s-xs)}.eui-18 .eui-file-upload__simple-input-file .file-input{display:none}.eui-18 .eui-file-upload__preview{align-items:center;display:flex;justify-content:space-between;margin:5px 0}.eui-18 .eui-file-upload__preview--left{align-items:center;display:flex;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.eui-18 .eui-file-upload__preview--left__image{margin-right:var(--eui-s-m)}.eui-18 .eui-file-upload__preview--left__image img{width:180px}.eui-18 .eui-file-upload__preview--left__image .loading-container{text-align:center;width:180px}.eui-18 .eui-file-upload__preview--left__filename{display:block}.eui-18 .eui-file-upload__preview--right{align-items:center;display:flex;margin-left:auto}.eui-18 .eui-file-upload__progress-bar-container{margin-bottom:var(--eui-s-2xs)}.eui-18 .eui-file-upload__progress-bar-container .progress-bar{background-color:var(--eui-c-primary);height:var(--eui-s-2xs)}.eui-18 .eui-file-upload__browse-button--disabled .eui-file-upload__simple-input-file-label{pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.EuiButtonComponent, selector: "button[euiButton], a[euiButton]", inputs: ["e2eAttr", "id", "euiBasicButton", "euiButtonCall", "euiBlockButton", "euiIconButton", "euiLineWrap", "isChecked", "euiDisabled"], outputs: ["buttonClick"] }, { kind: "component", type: EuiFileUploadProgressComponent, selector: "eui-file-upload-progress", inputs: ["progress"] }, { kind: "component", type: EuiFilePreviewComponent, selector: "eui-file-preview", inputs: ["file", "uploadedFileTemplate", "index", "previewAsIconConfig", "hasPreview", "isFilenameDisplayed", "isFilesizeDisplayed", "isFiletypeDisplayed", "hasPreviewAsImage", "hasPreviewAsIcon", "isItemsClickable", "isFileObject"], outputs: ["removeFromList", "itemClick"] }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "pipe", type: EuiFileSizePipe, name: "filesize" }], encapsulation: i0.ViewEncapsulation.None }); }
378
380
  }
379
381
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EuiFileUploadComponent, decorators: [{
380
382
  type: Component,
@@ -384,7 +386,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
384
386
  useExisting: EuiFileUploadComponent,
385
387
  multi: true,
386
388
  },
387
- ], encapsulation: ViewEncapsulation.None, template: "@if (hasDragArea) {\n <div\n class=\"eui-file-upload__drop-area\"\n [class.eui-file-upload__drop-area--active]=\"dragEntered\"\n [class.eui-file-upload__drop-area--disabled]=\"isDropAreaDisabled\">\n <span class=\"eui-file-upload__fake-btn\">{{ 'eui.euifileupload.CHOOSE-FILE' | translate }}</span>\n <span>{{ 'eui.euifileupload.DRAG-AND-DROP-FILE-HERE' | translate }}</span>\n <input\n #input\n class=\"eui-file-upload__file-input\"\n attr.aria-label=\"{{ 'eui.euifileupload.CHOOSE-FILE' | translate }} 'or' {{\n 'eui.euifileupload.DRAG-AND-DROP-FILE-HERE' | translate\n }}\"\n type=\"file\"\n accept=\"{{ accept }}\"\n [attr.disabled]=\"isDropAreaDisabled ? 'disabled' : null\"\n [multiple]=\"isMultiple\"\n (dragenter)=\"onDragEnter()\"\n (dragleave)=\"onDragLeave()\" />\n </div>\n} @else {\n <div class=\"eui-file-upload__simple-input-file\">\n <label for=\"file-{{ randomNumberId }}\">\n @if (browseButtonTemplate) {\n <ng-template [ngTemplateOutlet]=\"browseButtonTemplate\"></ng-template>\n } @else {\n <button euiButton [attr.disabled]=\"isBrowseButtonDisabled ? 'disabled' : null\" type=\"button\" (click)=\"openBrowseWindow()\">{{ 'eui.euifileupload.CHOOSE-FILE' | translate }}</button>\n }\n </label>\n \n @if (isMultiple) {\n <input\n #input\n aria-label=\"Choose Multiple Files\"\n class=\"file-input\"\n id=\"file-{{ randomNumberId }}\"\n type=\"file\"\n accept=\"{{ accept }}\"\n multiple />\n } @else {\n <input\n #input\n aria-label=\"Choose a single file\"\n class=\"file-input\"\n id=\"file-{{ randomNumberId }}\"\n type=\"file\"\n accept=\"{{ accept }}\" />\n }\n </div>\n}\n\n@if (hasProgressBar) {\n @if (progressBarTemplate) {\n <ng-template\n [ngTemplateOutlet]=\"progressBarTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: { progress } }\">\n </ng-template>\n } @else {\n <eui-file-upload-progress [progress]=\"progress\"></eui-file-upload-progress>\n }\n}\n\n@for (uploadedFile of uploadedFiles; let i = $index; track $index) {\n <div>\n <eui-file-preview\n [isItemsClickable]=\"isItemsClickable\"\n [index]=\"i\"\n [file]=\"uploadedFile\"\n [hasPreview]=\"hasPreview\"\n [hasPreviewAsImage]=\"hasPreviewAsImage\"\n [hasPreviewAsIcon]=\"hasPreviewAsIcon\"\n [uploadedFileTemplate]=\"uploadedFileTemplate\"\n (itemClick)=\"onItemClick($event)\"\n (removeFromList)=\"removeFromUploadedList($event)\">\n </eui-file-preview>\n </div>\n}\n\n@for (file of files; let i = $index; track $index) {\n <div>\n <eui-file-preview\n isFileObject\n [isItemsClickable]=\"isItemsClickable\"\n [index]=\"i\"\n [file]=\"file\"\n [hasPreview]=\"hasPreview\"\n [hasPreviewAsImage]=\"hasPreviewAsImage\"\n [hasPreviewAsIcon]=\"hasPreviewAsIcon\"\n [uploadedFileTemplate]=\"uploadedFileTemplate\"\n (itemClick)=\"onItemClick($event)\"\n (removeFromList)=\"removeFromList($event)\">\n </eui-file-preview>\n </div>\n}\n\n@if (filesTotalSize && hasTotalSizeDisplayed) {\n <div class=\"eui-file-upload__total-size\">\n {{ filesTotalSize | filesize }} {{ 'eui.euifileupload.TOTAL-SIZE' | translate }}\n </div>\n}\n\n<ng-content></ng-content>\n\n@if (showResetBtn) {\n @if (resetButtonTemplate) {\n <ng-template [ngTemplateOutlet]=\"resetButtonTemplate\"></ng-template>\n } @else {\n <button euiButton type=\"button\" (click)=\"resetList()\">\n {{ 'eui.euifileupload.RESET-LIST' | translate }}\n </button>\n }\n}\n", styles: [".eui-18 .eui-file-upload__total-size{margin-bottom:1rem;font:var(--eui-f-m-bold)}.eui-18 .eui-file-upload__drop-area{outline:1px dashed var(--eui-c-info);border-radius:var(--eui-br-m);margin:0 0 10px;padding:30px;position:relative;-webkit-transition:.2s;transition:.2s}.eui-18 .eui-file-upload__drop-area--active{background-color:var(--eui-c-primary-bg);outline:3px dashed var(--eui-c-info);border-radius:var(--eui-br-m);margin:0 0 10px;padding:30px;position:relative;-webkit-transition:.2s;transition:.2s}.eui-18 .eui-file-upload__drop-area--disabled{opacity:.75;cursor:not-allowed}.eui-18 .eui-file-upload__drop-area--disabled .file-input{cursor:default}.eui-18 .eui-file-upload__fake-btn{background-color:#fff;border:var(--eui-bw-xs) solid #9e9ec4;border-radius:var(--eui-br-m);margin-right:8px;padding:8px 15px}.eui-18 .eui-file-upload__file-input{height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}.eui-18 .eui-file-upload__file-input:not(:disabled){cursor:pointer}.eui-18 .eui-file-upload__simple-input-file{margin-bottom:var(--eui-s-xs)}.eui-18 .eui-file-upload__simple-input-file .file-input{display:none}.eui-18 .eui-file-upload__preview{align-items:center;display:flex;justify-content:space-between;margin:5px 0}.eui-18 .eui-file-upload__preview--left{align-items:center;display:flex;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.eui-18 .eui-file-upload__preview--left__image{margin-right:var(--eui-s-m)}.eui-18 .eui-file-upload__preview--left__image img{width:180px}.eui-18 .eui-file-upload__preview--left__image .loading-container{text-align:center;width:180px}.eui-18 .eui-file-upload__preview--left__filename{display:block}.eui-18 .eui-file-upload__preview--right{align-items:center;display:flex;margin-left:auto}.eui-18 .eui-file-upload__progress-bar-container{margin-bottom:var(--eui-s-2xs)}.eui-18 .eui-file-upload__progress-bar-container .progress-bar{background-color:var(--eui-c-primary);height:var(--eui-s-2xs)}\n"] }]
389
+ ], encapsulation: ViewEncapsulation.None, template: "@if (hasDragArea) {\n <div\n class=\"eui-file-upload__drop-area\"\n [class.eui-file-upload__drop-area--active]=\"dragEntered\"\n [class.eui-file-upload__drop-area--disabled]=\"isDropAreaDisabled\">\n <span class=\"eui-file-upload__fake-btn\">{{ 'eui.euifileupload.CHOOSE-FILE' | translate }}</span>\n <span>{{ 'eui.euifileupload.DRAG-AND-DROP-FILE-HERE' | translate }}</span>\n <input\n #input\n class=\"eui-file-upload__file-input\"\n attr.aria-label=\"{{ 'eui.euifileupload.CHOOSE-FILE' | translate }} 'or' {{\n 'eui.euifileupload.DRAG-AND-DROP-FILE-HERE' | translate\n }}\"\n type=\"file\"\n accept=\"{{ accept }}\"\n [attr.disabled]=\"isDropAreaDisabled ? 'disabled' : null\"\n [multiple]=\"isMultiple\"\n (dragenter)=\"onDragEnter()\"\n (dragleave)=\"onDragLeave()\" />\n </div>\n} @else {\n <div class=\"eui-file-upload__simple-input-file\" [class.eui-file-upload__browse-button--disabled]=\"isBrowseButtonDisabled\">\n <label class=\"eui-file-upload__simple-input-file-label\" for=\"file-{{ randomNumberId }}\">\n @if (browseButtonTemplate) {\n <ng-template [ngTemplateOutlet]=\"browseButtonTemplate\"></ng-template>\n } @else {\n <button euiButton [attr.disabled]=\"isBrowseButtonDisabled ? 'disabled' : null\" type=\"button\" (click)=\"openBrowseWindow()\">{{ 'eui.euifileupload.CHOOSE-FILE' | translate }}</button>\n }\n </label>\n \n @if (isMultiple) {\n <input\n #input\n aria-label=\"Choose Multiple Files\"\n class=\"file-input\"\n id=\"file-{{ randomNumberId }}\"\n type=\"file\"\n accept=\"{{ accept }}\"\n multiple />\n } @else {\n <input\n #input\n aria-label=\"Choose a single file\"\n class=\"file-input\"\n id=\"file-{{ randomNumberId }}\"\n type=\"file\"\n accept=\"{{ accept }}\" />\n }\n </div>\n}\n\n@if (hasProgressBar) {\n @if (progressBarTemplate) {\n <ng-template\n [ngTemplateOutlet]=\"progressBarTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: { progress } }\">\n </ng-template>\n } @else {\n <eui-file-upload-progress [progress]=\"progress\"></eui-file-upload-progress>\n }\n}\n\n@for (uploadedFile of uploadedFiles; let i = $index; track $index) {\n <div>\n <eui-file-preview\n [isItemsClickable]=\"isItemsClickable\"\n [index]=\"i\"\n [file]=\"uploadedFile\"\n [hasPreview]=\"hasPreview\"\n [hasPreviewAsImage]=\"hasPreviewAsImage\"\n [hasPreviewAsIcon]=\"hasPreviewAsIcon\"\n [uploadedFileTemplate]=\"uploadedFileTemplate\"\n (itemClick)=\"onItemClick($event)\"\n (removeFromList)=\"removeFromUploadedList($event)\">\n </eui-file-preview>\n </div>\n}\n\n@for (file of files; let i = $index; track $index) {\n <div>\n <eui-file-preview\n isFileObject\n [isItemsClickable]=\"isItemsClickable\"\n [index]=\"i\"\n [file]=\"file\"\n [hasPreview]=\"hasPreview\"\n [hasPreviewAsImage]=\"hasPreviewAsImage\"\n [hasPreviewAsIcon]=\"hasPreviewAsIcon\"\n [uploadedFileTemplate]=\"uploadedFileTemplate\"\n (itemClick)=\"onItemClick($event)\"\n (removeFromList)=\"removeFromList($event)\">\n </eui-file-preview>\n </div>\n}\n\n@if (filesTotalSize && hasTotalSizeDisplayed) {\n <div class=\"eui-file-upload__total-size\">\n {{ filesTotalSize | filesize }} {{ 'eui.euifileupload.TOTAL-SIZE' | translate }}\n </div>\n}\n\n<ng-content></ng-content>\n\n@if (showResetBtn) {\n @if (resetButtonTemplate) {\n <ng-template [ngTemplateOutlet]=\"resetButtonTemplate\"></ng-template>\n } @else {\n <button euiButton type=\"button\" (click)=\"resetList()\">\n {{ 'eui.euifileupload.RESET-LIST' | translate }}\n </button>\n }\n}\n", styles: [".eui-18 .eui-file-upload__total-size{margin-bottom:1rem;font:var(--eui-f-m-bold)}.eui-18 .eui-file-upload__drop-area{outline:1px dashed var(--eui-c-info);border-radius:var(--eui-br-m);margin:0 0 10px;padding:30px;position:relative;-webkit-transition:.2s;transition:.2s}.eui-18 .eui-file-upload__drop-area--active{background-color:var(--eui-c-primary-bg);outline:3px dashed var(--eui-c-info);border-radius:var(--eui-br-m);margin:0 0 10px;padding:30px;position:relative;-webkit-transition:.2s;transition:.2s}.eui-18 .eui-file-upload__drop-area--disabled{opacity:.75;cursor:not-allowed}.eui-18 .eui-file-upload__drop-area--disabled .file-input{cursor:default}.eui-18 .eui-file-upload__fake-btn{background-color:#fff;border:var(--eui-bw-xs) solid #9e9ec4;border-radius:var(--eui-br-m);margin-right:8px;padding:8px 15px}.eui-18 .eui-file-upload__file-input{height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}.eui-18 .eui-file-upload__file-input:not(:disabled){cursor:pointer}.eui-18 .eui-file-upload__simple-input-file{margin-bottom:var(--eui-s-xs)}.eui-18 .eui-file-upload__simple-input-file .file-input{display:none}.eui-18 .eui-file-upload__preview{align-items:center;display:flex;justify-content:space-between;margin:5px 0}.eui-18 .eui-file-upload__preview--left{align-items:center;display:flex;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.eui-18 .eui-file-upload__preview--left__image{margin-right:var(--eui-s-m)}.eui-18 .eui-file-upload__preview--left__image img{width:180px}.eui-18 .eui-file-upload__preview--left__image .loading-container{text-align:center;width:180px}.eui-18 .eui-file-upload__preview--left__filename{display:block}.eui-18 .eui-file-upload__preview--right{align-items:center;display:flex;margin-left:auto}.eui-18 .eui-file-upload__progress-bar-container{margin-bottom:var(--eui-s-2xs)}.eui-18 .eui-file-upload__progress-bar-container .progress-bar{background-color:var(--eui-c-primary);height:var(--eui-s-2xs)}.eui-18 .eui-file-upload__browse-button--disabled .eui-file-upload__simple-input-file-label{pointer-events:none}\n"] }]
388
390
  }], propDecorators: { e2eAttr: [{
389
391
  type: Input
390
392
  }], progress: [{