1147 lines
131 KiB
JavaScript
1147 lines
131 KiB
JavaScript
import { CommonModule, DOCUMENT, isPlatformBrowser } from '@angular/common';
|
|
import { HttpEventType } from '@angular/common/http';
|
|
import { ChangeDetectionStrategy, Component, ContentChildren, EventEmitter, Inject, Input, NgModule, Output, PLATFORM_ID, ViewChild, ViewEncapsulation, booleanAttribute, numberAttribute } from '@angular/core';
|
|
import { PrimeTemplate, SharedModule, TranslationKeys } from 'primeng/api';
|
|
import { ButtonModule } from 'primeng/button';
|
|
import { DomHandler } from 'primeng/dom';
|
|
import { PlusIcon } from 'primeng/icons/plus';
|
|
import { TimesIcon } from 'primeng/icons/times';
|
|
import { UploadIcon } from 'primeng/icons/upload';
|
|
import { MessagesModule } from 'primeng/messages';
|
|
import { ProgressBarModule } from 'primeng/progressbar';
|
|
import { RippleModule } from 'primeng/ripple';
|
|
import * as i0 from "@angular/core";
|
|
import * as i1 from "@angular/platform-browser";
|
|
import * as i2 from "@angular/common/http";
|
|
import * as i3 from "primeng/api";
|
|
import * as i4 from "@angular/common";
|
|
import * as i5 from "primeng/button";
|
|
import * as i6 from "primeng/progressbar";
|
|
import * as i7 from "primeng/messages";
|
|
import * as i8 from "primeng/ripple";
|
|
/**
|
|
* FileUpload is an advanced uploader with dragdrop support, multi file uploads, auto uploading, progress tracking and validations.
|
|
* @group Components
|
|
*/
|
|
export class FileUpload {
|
|
document;
|
|
platformId;
|
|
renderer;
|
|
el;
|
|
sanitizer;
|
|
zone;
|
|
http;
|
|
cd;
|
|
config;
|
|
/**
|
|
* Name of the request parameter to identify the files at backend.
|
|
* @group Props
|
|
*/
|
|
name;
|
|
/**
|
|
* Remote url to upload the files.
|
|
* @group Props
|
|
*/
|
|
url;
|
|
/**
|
|
* HTTP method to send the files to the url such as "post" and "put".
|
|
* @group Props
|
|
*/
|
|
method = 'post';
|
|
/**
|
|
* Used to select multiple files at once from file dialog.
|
|
* @group Props
|
|
*/
|
|
multiple;
|
|
/**
|
|
* Comma-separated list of pattern to restrict the allowed file types. Can be any combination of either the MIME types (such as "image/*") or the file extensions (such as ".jpg").
|
|
* @group Props
|
|
*/
|
|
accept;
|
|
/**
|
|
* Disables the upload functionality.
|
|
* @group Props
|
|
*/
|
|
disabled;
|
|
/**
|
|
* When enabled, upload begins automatically after selection is completed.
|
|
* @group Props
|
|
*/
|
|
auto;
|
|
/**
|
|
* Cross-site Access-Control requests should be made using credentials such as cookies, authorization headers or TLS client certificates.
|
|
* @group Props
|
|
*/
|
|
withCredentials;
|
|
/**
|
|
* Maximum file size allowed in bytes.
|
|
* @group Props
|
|
*/
|
|
maxFileSize;
|
|
/**
|
|
* Summary message of the invalid file size.
|
|
* @group Props
|
|
*/
|
|
invalidFileSizeMessageSummary = '{0}: Invalid file size, ';
|
|
/**
|
|
* Detail message of the invalid file size.
|
|
* @group Props
|
|
*/
|
|
invalidFileSizeMessageDetail = 'maximum upload size is {0}.';
|
|
/**
|
|
* Summary message of the invalid file type.
|
|
* @group Props
|
|
*/
|
|
invalidFileTypeMessageSummary = '{0}: Invalid file type, ';
|
|
/**
|
|
* Detail message of the invalid file type.
|
|
* @group Props
|
|
*/
|
|
invalidFileTypeMessageDetail = 'allowed file types: {0}.';
|
|
/**
|
|
* Detail message of the invalid file type.
|
|
* @group Props
|
|
*/
|
|
invalidFileLimitMessageDetail = 'limit is {0} at most.';
|
|
/**
|
|
* Summary message of the invalid file type.
|
|
* @group Props
|
|
*/
|
|
invalidFileLimitMessageSummary = 'Maximum number of files exceeded, ';
|
|
/**
|
|
* Inline style of the element.
|
|
* @group Props
|
|
*/
|
|
style;
|
|
/**
|
|
* Class of the element.
|
|
* @group Props
|
|
*/
|
|
styleClass;
|
|
/**
|
|
* Width of the image thumbnail in pixels.
|
|
* @group Props
|
|
*/
|
|
previewWidth = 50;
|
|
/**
|
|
* Label of the choose button. Defaults to PrimeNG Locale configuration.
|
|
* @group Props
|
|
*/
|
|
chooseLabel;
|
|
/**
|
|
* Label of the upload button. Defaults to PrimeNG Locale configuration.
|
|
* @group Props
|
|
*/
|
|
uploadLabel;
|
|
/**
|
|
* Label of the cancel button. Defaults to PrimeNG Locale configuration.
|
|
* @group Props
|
|
*/
|
|
cancelLabel;
|
|
/**
|
|
* Icon of the choose button.
|
|
* @group Props
|
|
*/
|
|
chooseIcon;
|
|
/**
|
|
* Icon of the upload button.
|
|
* @group Props
|
|
*/
|
|
uploadIcon;
|
|
/**
|
|
* Icon of the cancel button.
|
|
* @group Props
|
|
*/
|
|
cancelIcon;
|
|
/**
|
|
* Whether to show the upload button.
|
|
* @group Props
|
|
*/
|
|
showUploadButton = true;
|
|
/**
|
|
* Whether to show the cancel button.
|
|
* @group Props
|
|
*/
|
|
showCancelButton = true;
|
|
/**
|
|
* Defines the UI of the component.
|
|
* @group Props
|
|
*/
|
|
mode = 'advanced';
|
|
/**
|
|
* HttpHeaders class represents the header configuration options for an HTTP request.
|
|
* @group Props
|
|
*/
|
|
headers;
|
|
/**
|
|
* Whether to use the default upload or a manual implementation defined in uploadHandler callback. Defaults to PrimeNG Locale configuration.
|
|
* @group Props
|
|
*/
|
|
customUpload;
|
|
/**
|
|
* Maximum number of files that can be uploaded.
|
|
* @group Props
|
|
*/
|
|
fileLimit;
|
|
/**
|
|
* Style class of the upload button.
|
|
* @group Props
|
|
*/
|
|
uploadStyleClass;
|
|
/**
|
|
* Style class of the cancel button.
|
|
* @group Props
|
|
*/
|
|
cancelStyleClass;
|
|
/**
|
|
* Style class of the remove button.
|
|
* @group Props
|
|
*/
|
|
removeStyleClass;
|
|
/**
|
|
* Style class of the choose button.
|
|
* @group Props
|
|
*/
|
|
chooseStyleClass;
|
|
/**
|
|
* Callback to invoke before file upload is initialized.
|
|
* @param {FileBeforeUploadEvent} event - Custom upload event.
|
|
* @group Emits
|
|
*/
|
|
onBeforeUpload = new EventEmitter();
|
|
/**
|
|
* An event indicating that the request was sent to the server. Useful when a request may be retried multiple times, to distinguish between retries on the final event stream.
|
|
* @param {FileSendEvent} event - Custom send event.
|
|
* @group Emits
|
|
*/
|
|
onSend = new EventEmitter();
|
|
/**
|
|
* Callback to invoke when file upload is complete.
|
|
* @param {FileUploadEvent} event - Custom upload event.
|
|
* @group Emits
|
|
*/
|
|
onUpload = new EventEmitter();
|
|
/**
|
|
* Callback to invoke if file upload fails.
|
|
* @param {FileUploadErrorEvent} event - Custom error event.
|
|
* @group Emits
|
|
*/
|
|
onError = new EventEmitter();
|
|
/**
|
|
* Callback to invoke when files in queue are removed without uploading using clear all button.
|
|
* @param {Event} event - Browser event.
|
|
* @group Emits
|
|
*/
|
|
onClear = new EventEmitter();
|
|
/**
|
|
* Callback to invoke when a file is removed without uploading using clear button of a file.
|
|
* @param {FileRemoveEvent} event - Remove event.
|
|
* @group Emits
|
|
*/
|
|
onRemove = new EventEmitter();
|
|
/**
|
|
* Callback to invoke when files are selected.
|
|
* @param {FileSelectEvent} event - Select event.
|
|
* @group Emits
|
|
*/
|
|
onSelect = new EventEmitter();
|
|
/**
|
|
* Callback to invoke when files are being uploaded.
|
|
* @param {FileProgressEvent} event - Progress event.
|
|
* @group Emits
|
|
*/
|
|
onProgress = new EventEmitter();
|
|
/**
|
|
* Callback to invoke in custom upload mode to upload the files manually.
|
|
* @param {FileUploadHandlerEvent} event - Upload handler event.
|
|
* @group Emits
|
|
*/
|
|
uploadHandler = new EventEmitter();
|
|
/**
|
|
* This event is triggered if an error occurs while loading an image file.
|
|
* @param {Event} event - Browser event.
|
|
* @group Emits
|
|
*/
|
|
onImageError = new EventEmitter();
|
|
/**
|
|
* This event is triggered if an error occurs while loading an image file.
|
|
* @param {RemoveUploadedFileEvent} event - Remove event.
|
|
* @group Emits
|
|
*/
|
|
onRemoveUploadedFile = new EventEmitter();
|
|
templates;
|
|
advancedFileInput;
|
|
basicFileInput;
|
|
content;
|
|
set files(files) {
|
|
this._files = [];
|
|
for (let i = 0; i < files.length; i++) {
|
|
let file = files[i];
|
|
if (this.validate(file)) {
|
|
if (this.isImage(file)) {
|
|
file.objectURL = this.sanitizer.bypassSecurityTrustUrl(window.URL.createObjectURL(files[i]));
|
|
}
|
|
this._files.push(files[i]);
|
|
}
|
|
}
|
|
}
|
|
get files() {
|
|
return this._files;
|
|
}
|
|
get basicButtonLabel() {
|
|
if (this.auto || !this.hasFiles()) {
|
|
return this.chooseLabel;
|
|
}
|
|
return this.uploadLabel ?? this.files[0].name;
|
|
}
|
|
_files = [];
|
|
progress = 0;
|
|
dragHighlight;
|
|
msgs;
|
|
fileTemplate;
|
|
headerTemplate;
|
|
contentTemplate;
|
|
toolbarTemplate;
|
|
chooseIconTemplate;
|
|
uploadIconTemplate;
|
|
cancelIconTemplate;
|
|
emptyTemplate;
|
|
uploadedFileCount = 0;
|
|
focus;
|
|
uploading;
|
|
duplicateIEEvent; // flag to recognize duplicate onchange event for file input
|
|
translationSubscription;
|
|
dragOverListener;
|
|
uploadedFiles = [];
|
|
constructor(document, platformId, renderer, el, sanitizer, zone, http, cd, config) {
|
|
this.document = document;
|
|
this.platformId = platformId;
|
|
this.renderer = renderer;
|
|
this.el = el;
|
|
this.sanitizer = sanitizer;
|
|
this.zone = zone;
|
|
this.http = http;
|
|
this.cd = cd;
|
|
this.config = config;
|
|
}
|
|
ngAfterContentInit() {
|
|
this.templates?.forEach((item) => {
|
|
switch (item.getType()) {
|
|
case 'header':
|
|
this.headerTemplate = item.template;
|
|
break;
|
|
case 'file':
|
|
this.fileTemplate = item.template;
|
|
break;
|
|
case 'content':
|
|
this.contentTemplate = item.template;
|
|
break;
|
|
case 'toolbar':
|
|
this.toolbarTemplate = item.template;
|
|
break;
|
|
case 'chooseicon':
|
|
this.chooseIconTemplate = item.template;
|
|
break;
|
|
case 'uploadicon':
|
|
this.uploadIconTemplate = item.template;
|
|
break;
|
|
case 'cancelicon':
|
|
this.cancelIconTemplate = item.template;
|
|
break;
|
|
case 'empty':
|
|
this.emptyTemplate = item.template;
|
|
break;
|
|
default:
|
|
this.fileTemplate = item.template;
|
|
break;
|
|
}
|
|
});
|
|
}
|
|
ngOnInit() {
|
|
this.translationSubscription = this.config.translationObserver.subscribe(() => {
|
|
this.cd.markForCheck();
|
|
});
|
|
}
|
|
ngAfterViewInit() {
|
|
if (isPlatformBrowser(this.platformId)) {
|
|
if (this.mode === 'advanced') {
|
|
this.zone.runOutsideAngular(() => {
|
|
if (this.content) {
|
|
this.dragOverListener = this.renderer.listen(this.content.nativeElement, 'dragover', this.onDragOver.bind(this));
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
getTranslation(option) {
|
|
return this.config.getTranslation(option);
|
|
}
|
|
choose() {
|
|
this.advancedFileInput?.nativeElement.click();
|
|
}
|
|
onFileSelect(event) {
|
|
if (event.type !== 'drop' && this.isIE11() && this.duplicateIEEvent) {
|
|
this.duplicateIEEvent = false;
|
|
return;
|
|
}
|
|
this.msgs = [];
|
|
if (!this.multiple) {
|
|
this.files = [];
|
|
}
|
|
let files = event.dataTransfer ? event.dataTransfer.files : event.target.files;
|
|
for (let i = 0; i < files.length; i++) {
|
|
let file = files[i];
|
|
if (!this.isFileSelected(file)) {
|
|
if (this.validate(file)) {
|
|
if (this.isImage(file)) {
|
|
file.objectURL = this.sanitizer.bypassSecurityTrustUrl(window.URL.createObjectURL(files[i]));
|
|
}
|
|
this.files.push(files[i]);
|
|
}
|
|
}
|
|
}
|
|
this.onSelect.emit({ originalEvent: event, files: files, currentFiles: this.files });
|
|
// this will check the fileLimit with the uploaded files
|
|
this.checkFileLimit(files);
|
|
if (this.hasFiles() && this.auto && (this.mode !== 'advanced' || !this.isFileLimitExceeded())) {
|
|
this.upload();
|
|
}
|
|
if (event.type !== 'drop' && this.isIE11()) {
|
|
this.clearIEInput();
|
|
}
|
|
else {
|
|
this.clearInputElement();
|
|
}
|
|
}
|
|
isFileSelected(file) {
|
|
for (let sFile of this.files) {
|
|
if (sFile.name + sFile.type + sFile.size === file.name + file.type + file.size) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
isIE11() {
|
|
if (isPlatformBrowser(this.platformId)) {
|
|
return !!this.document.defaultView['MSInputMethodContext'] && !!this.document['documentMode'];
|
|
}
|
|
}
|
|
validate(file) {
|
|
this.msgs = this.msgs || [];
|
|
if (this.accept && !this.isFileTypeValid(file)) {
|
|
this.msgs.push({
|
|
severity: 'error',
|
|
summary: this.invalidFileTypeMessageSummary.replace('{0}', file.name),
|
|
detail: this.invalidFileTypeMessageDetail.replace('{0}', this.accept)
|
|
});
|
|
return false;
|
|
}
|
|
if (this.maxFileSize && file.size > this.maxFileSize) {
|
|
this.msgs.push({
|
|
severity: 'error',
|
|
summary: this.invalidFileSizeMessageSummary.replace('{0}', file.name),
|
|
detail: this.invalidFileSizeMessageDetail.replace('{0}', this.formatSize(this.maxFileSize))
|
|
});
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
isFileTypeValid(file) {
|
|
let acceptableTypes = this.accept?.split(',').map((type) => type.trim());
|
|
for (let type of acceptableTypes) {
|
|
let acceptable = this.isWildcard(type) ? this.getTypeClass(file.type) === this.getTypeClass(type) : file.type == type || this.getFileExtension(file).toLowerCase() === type.toLowerCase();
|
|
if (acceptable) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
getTypeClass(fileType) {
|
|
return fileType.substring(0, fileType.indexOf('/'));
|
|
}
|
|
isWildcard(fileType) {
|
|
return fileType.indexOf('*') !== -1;
|
|
}
|
|
getFileExtension(file) {
|
|
return '.' + file.name.split('.').pop();
|
|
}
|
|
isImage(file) {
|
|
return /^image\//.test(file.type);
|
|
}
|
|
onImageLoad(img) {
|
|
window.URL.revokeObjectURL(img.src);
|
|
}
|
|
/**
|
|
* Uploads the selected files.
|
|
* @group Method
|
|
*/
|
|
upload() {
|
|
if (this.customUpload) {
|
|
if (this.fileLimit) {
|
|
this.uploadedFileCount += this.files.length;
|
|
}
|
|
this.uploadHandler.emit({
|
|
files: this.files
|
|
});
|
|
this.cd.markForCheck();
|
|
}
|
|
else {
|
|
this.uploading = true;
|
|
this.msgs = [];
|
|
let formData = new FormData();
|
|
this.onBeforeUpload.emit({
|
|
formData: formData
|
|
});
|
|
for (let i = 0; i < this.files.length; i++) {
|
|
formData.append(this.name, this.files[i], this.files[i].name);
|
|
}
|
|
this.http
|
|
.request(this.method, this.url, {
|
|
body: formData,
|
|
headers: this.headers,
|
|
reportProgress: true,
|
|
observe: 'events',
|
|
withCredentials: this.withCredentials
|
|
})
|
|
.subscribe((event) => {
|
|
switch (event.type) {
|
|
case HttpEventType.Sent:
|
|
this.onSend.emit({
|
|
originalEvent: event,
|
|
formData: formData
|
|
});
|
|
break;
|
|
case HttpEventType.Response:
|
|
this.uploading = false;
|
|
this.progress = 0;
|
|
if (event['status'] >= 200 && event['status'] < 300) {
|
|
if (this.fileLimit) {
|
|
this.uploadedFileCount += this.files.length;
|
|
}
|
|
this.onUpload.emit({ originalEvent: event, files: this.files });
|
|
}
|
|
else {
|
|
this.onError.emit({ files: this.files });
|
|
}
|
|
this.uploadedFiles.push(...this.files);
|
|
this.clear();
|
|
break;
|
|
case HttpEventType.UploadProgress: {
|
|
if (event['loaded']) {
|
|
this.progress = Math.round((event['loaded'] * 100) / event['total']);
|
|
}
|
|
this.onProgress.emit({ originalEvent: event, progress: this.progress });
|
|
break;
|
|
}
|
|
}
|
|
this.cd.markForCheck();
|
|
}, (error) => {
|
|
this.uploading = false;
|
|
this.onError.emit({ files: this.files, error: error });
|
|
});
|
|
}
|
|
}
|
|
/**
|
|
* Clears the files list.
|
|
* @group Method
|
|
*/
|
|
clear() {
|
|
this.files = [];
|
|
this.uploadedFileCount = 0;
|
|
this.onClear.emit();
|
|
this.clearInputElement();
|
|
this.cd.markForCheck();
|
|
}
|
|
/**
|
|
* Removes a single file.
|
|
* @param {Event} event - Browser event.
|
|
* @param {Number} index - Index of the file.
|
|
* @group Method
|
|
*/
|
|
remove(event, index) {
|
|
this.clearInputElement();
|
|
this.onRemove.emit({ originalEvent: event, file: this.files[index] });
|
|
this.files.splice(index, 1);
|
|
this.checkFileLimit(this.files);
|
|
}
|
|
/**
|
|
* Removes uploaded file.
|
|
* @param {Number} index - Index of the file to be removed.
|
|
* @group Method
|
|
*/
|
|
removeUploadedFile(index) {
|
|
let removedFile = this.uploadedFiles.splice(index, 1)[0];
|
|
this.uploadedFiles = [...this.uploadedFiles];
|
|
this.onRemoveUploadedFile.emit({ file: removedFile, files: this.uploadedFiles });
|
|
}
|
|
isFileLimitExceeded() {
|
|
const isAutoMode = this.auto;
|
|
const totalFileCount = isAutoMode ? this.files.length : this.files.length + this.uploadedFileCount;
|
|
if (this.fileLimit && this.fileLimit <= totalFileCount && this.focus) {
|
|
this.focus = false;
|
|
}
|
|
return this.fileLimit && this.fileLimit < totalFileCount;
|
|
}
|
|
isChooseDisabled() {
|
|
if (this.auto) {
|
|
return this.fileLimit && this.fileLimit <= this.files.length;
|
|
}
|
|
else {
|
|
return this.fileLimit && this.fileLimit <= this.files.length + this.uploadedFileCount;
|
|
}
|
|
}
|
|
checkFileLimit(files) {
|
|
this.msgs ??= [];
|
|
const hasExistingValidationMessages = this.msgs.length > 0 && this.fileLimit < files.length;
|
|
if (this.isFileLimitExceeded() || hasExistingValidationMessages) {
|
|
this.msgs.push({
|
|
severity: 'error',
|
|
summary: this.invalidFileLimitMessageSummary.replace('{0}', this.fileLimit.toString()),
|
|
detail: this.invalidFileLimitMessageDetail.replace('{0}', this.fileLimit.toString())
|
|
});
|
|
}
|
|
}
|
|
clearInputElement() {
|
|
if (this.advancedFileInput && this.advancedFileInput.nativeElement) {
|
|
this.advancedFileInput.nativeElement.value = '';
|
|
}
|
|
if (this.basicFileInput && this.basicFileInput.nativeElement) {
|
|
this.basicFileInput.nativeElement.value = '';
|
|
}
|
|
}
|
|
clearIEInput() {
|
|
if (this.advancedFileInput && this.advancedFileInput.nativeElement) {
|
|
this.duplicateIEEvent = true; //IE11 fix to prevent onFileChange trigger again
|
|
this.advancedFileInput.nativeElement.value = '';
|
|
}
|
|
}
|
|
hasFiles() {
|
|
return this.files && this.files.length > 0;
|
|
}
|
|
onDragEnter(e) {
|
|
if (!this.disabled) {
|
|
e.stopPropagation();
|
|
e.preventDefault();
|
|
}
|
|
}
|
|
onDragOver(e) {
|
|
if (!this.disabled) {
|
|
DomHandler.addClass(this.content?.nativeElement, 'p-fileupload-highlight');
|
|
this.dragHighlight = true;
|
|
e.stopPropagation();
|
|
e.preventDefault();
|
|
}
|
|
}
|
|
onDragLeave(event) {
|
|
if (!this.disabled) {
|
|
DomHandler.removeClass(this.content?.nativeElement, 'p-fileupload-highlight');
|
|
}
|
|
}
|
|
onDrop(event) {
|
|
if (!this.disabled) {
|
|
DomHandler.removeClass(this.content?.nativeElement, 'p-fileupload-highlight');
|
|
event.stopPropagation();
|
|
event.preventDefault();
|
|
let files = event.dataTransfer ? event.dataTransfer.files : event.target.files;
|
|
let allowDrop = this.multiple || (files && files.length === 1);
|
|
if (allowDrop) {
|
|
this.onFileSelect(event);
|
|
}
|
|
}
|
|
}
|
|
onFocus() {
|
|
this.focus = true;
|
|
}
|
|
onBlur() {
|
|
this.focus = false;
|
|
}
|
|
formatSize(bytes) {
|
|
const k = 1024;
|
|
const dm = 3;
|
|
const sizes = this.getTranslation(TranslationKeys.FILE_SIZE_TYPES);
|
|
if (bytes === 0) {
|
|
return `0 ${sizes[0]}`;
|
|
}
|
|
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
const formattedSize = (bytes / Math.pow(k, i)).toFixed(dm);
|
|
return `${formattedSize} ${sizes[i]}`;
|
|
}
|
|
onBasicUploaderClick() {
|
|
if (this.hasFiles())
|
|
this.upload();
|
|
else
|
|
this.basicFileInput?.nativeElement.click();
|
|
}
|
|
onBasicKeydown(event) {
|
|
switch (event.code) {
|
|
case 'Space':
|
|
case 'Enter':
|
|
this.onBasicUploaderClick();
|
|
event.preventDefault();
|
|
break;
|
|
}
|
|
}
|
|
imageError(event) {
|
|
this.onImageError.emit(event);
|
|
}
|
|
getBlockableElement() {
|
|
return this.el.nativeElement.children[0];
|
|
}
|
|
get chooseButtonLabel() {
|
|
return this.chooseLabel || this.config.getTranslation(TranslationKeys.CHOOSE);
|
|
}
|
|
get uploadButtonLabel() {
|
|
return this.uploadLabel || this.config.getTranslation(TranslationKeys.UPLOAD);
|
|
}
|
|
get cancelButtonLabel() {
|
|
return this.cancelLabel || this.config.getTranslation(TranslationKeys.CANCEL);
|
|
}
|
|
get browseFilesLabel() {
|
|
return this.config.getTranslation(TranslationKeys.ARIA)[TranslationKeys.BROWSE_FILES];
|
|
}
|
|
ngOnDestroy() {
|
|
if (this.content && this.content.nativeElement) {
|
|
if (this.dragOverListener) {
|
|
this.dragOverListener();
|
|
this.dragOverListener = null;
|
|
}
|
|
}
|
|
if (this.translationSubscription) {
|
|
this.translationSubscription.unsubscribe();
|
|
}
|
|
}
|
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: FileUpload, deps: [{ token: DOCUMENT }, { token: PLATFORM_ID }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i1.DomSanitizer }, { token: i0.NgZone }, { token: i2.HttpClient }, { token: i0.ChangeDetectorRef }, { token: i3.PrimeNGConfig }], target: i0.ɵɵFactoryTarget.Component });
|
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.3.7", type: FileUpload, selector: "p-fileUpload", inputs: { name: "name", url: "url", method: "method", multiple: ["multiple", "multiple", booleanAttribute], accept: "accept", disabled: ["disabled", "disabled", booleanAttribute], auto: ["auto", "auto", booleanAttribute], withCredentials: ["withCredentials", "withCredentials", booleanAttribute], maxFileSize: ["maxFileSize", "maxFileSize", numberAttribute], invalidFileSizeMessageSummary: "invalidFileSizeMessageSummary", invalidFileSizeMessageDetail: "invalidFileSizeMessageDetail", invalidFileTypeMessageSummary: "invalidFileTypeMessageSummary", invalidFileTypeMessageDetail: "invalidFileTypeMessageDetail", invalidFileLimitMessageDetail: "invalidFileLimitMessageDetail", invalidFileLimitMessageSummary: "invalidFileLimitMessageSummary", style: "style", styleClass: "styleClass", previewWidth: ["previewWidth", "previewWidth", numberAttribute], chooseLabel: "chooseLabel", uploadLabel: "uploadLabel", cancelLabel: "cancelLabel", chooseIcon: "chooseIcon", uploadIcon: "uploadIcon", cancelIcon: "cancelIcon", showUploadButton: ["showUploadButton", "showUploadButton", booleanAttribute], showCancelButton: ["showCancelButton", "showCancelButton", booleanAttribute], mode: "mode", headers: "headers", customUpload: ["customUpload", "customUpload", booleanAttribute], fileLimit: ["fileLimit", "fileLimit", (value) => numberAttribute(value, null)], uploadStyleClass: "uploadStyleClass", cancelStyleClass: "cancelStyleClass", removeStyleClass: "removeStyleClass", chooseStyleClass: "chooseStyleClass", files: "files" }, outputs: { onBeforeUpload: "onBeforeUpload", onSend: "onSend", onUpload: "onUpload", onError: "onError", onClear: "onClear", onRemove: "onRemove", onSelect: "onSelect", onProgress: "onProgress", uploadHandler: "uploadHandler", onImageError: "onImageError", onRemoveUploadedFile: "onRemoveUploadedFile" }, host: { classAttribute: "p-element" }, queries: [{ propertyName: "templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "advancedFileInput", first: true, predicate: ["advancedfileinput"], descendants: true }, { propertyName: "basicFileInput", first: true, predicate: ["basicfileinput"], descendants: true }, { propertyName: "content", first: true, predicate: ["content"], descendants: true }], ngImport: i0, template: `
|
|
<div [ngClass]="'p-fileupload p-fileupload-advanced p-component'" [ngStyle]="style" [class]="styleClass" *ngIf="mode === 'advanced'" [attr.data-pc-name]="'fileupload'" [attr.data-pc-section]="'root'">
|
|
<input
|
|
[attr.aria-label]="browseFilesLabel"
|
|
#advancedfileinput
|
|
type="file"
|
|
(change)="onFileSelect($event)"
|
|
[multiple]="multiple"
|
|
[accept]="accept"
|
|
[disabled]="disabled || isChooseDisabled()"
|
|
[attr.title]="''"
|
|
[attr.data-pc-section]="'input'"
|
|
[style.display]="'none'"
|
|
/>
|
|
<div class="p-fileupload-buttonbar" [attr.data-pc-section]="'buttonbar'">
|
|
<ng-container *ngIf="!headerTemplate">
|
|
<span
|
|
class="p-button p-component p-fileupload-choose"
|
|
[ngClass]="{ 'p-focus': focus, 'p-disabled': disabled || isChooseDisabled() }"
|
|
(focus)="onFocus()"
|
|
(blur)="onBlur()"
|
|
pRipple
|
|
(click)="choose()"
|
|
(keydown.enter)="choose()"
|
|
tabindex="0"
|
|
[class]="chooseStyleClass"
|
|
[attr.data-pc-section]="'choosebutton'"
|
|
>
|
|
<input
|
|
[attr.aria-label]="browseFilesLabel"
|
|
#advancedfileinput
|
|
type="file"
|
|
(change)="onFileSelect($event)"
|
|
[multiple]="multiple"
|
|
[accept]="accept"
|
|
[disabled]="disabled || isChooseDisabled()"
|
|
[attr.title]="''"
|
|
[attr.data-pc-section]="'input'"
|
|
/>
|
|
<span *ngIf="chooseIcon" [ngClass]="'p-button-icon p-button-icon-left'" [class]="chooseIcon" [attr.aria-label]="true" [attr.data-pc-section]="'chooseicon'"></span>
|
|
<ng-container *ngIf="!chooseIcon">
|
|
<PlusIcon *ngIf="!chooseIconTemplate" [styleClass]="'p-button-icon p-button-icon-left'" [attr.aria-label]="true" [attr.data-pc-section]="'chooseicon'" />
|
|
<span *ngIf="chooseIconTemplate" class="p-button-icon p-button-icon-left" [attr.aria-label]="true" [attr.data-pc-section]="'chooseicon'">
|
|
<ng-template *ngTemplateOutlet="chooseIconTemplate"></ng-template>
|
|
</span>
|
|
</ng-container>
|
|
<span class="p-button-label" [attr.data-pc-section]="'choosebuttonlabel'">{{ chooseButtonLabel }}</span>
|
|
</span>
|
|
|
|
<p-button *ngIf="!auto && showUploadButton" type="button" [label]="uploadButtonLabel" (onClick)="upload()" [disabled]="!hasFiles() || isFileLimitExceeded()" [styleClass]="uploadStyleClass">
|
|
<span *ngIf="uploadIcon" [ngClass]="uploadIcon" [attr.aria-hidden]="true" class="p-button-icon p-button-icon-left"></span>
|
|
<ng-container *ngIf="!uploadIcon">
|
|
<UploadIcon *ngIf="!uploadIconTemplate" [styleClass]="'p-button-icon p-button-icon-left'" />
|
|
<span *ngIf="uploadIconTemplate" class="p-button-icon p-button-icon-left" [attr.aria-hidden]="true">
|
|
<ng-template *ngTemplateOutlet="uploadIconTemplate"></ng-template>
|
|
</span>
|
|
</ng-container>
|
|
</p-button>
|
|
<p-button *ngIf="!auto && showCancelButton" type="button" [label]="cancelButtonLabel" (onClick)="clear()" [disabled]="!hasFiles() || uploading" [styleClass]="cancelStyleClass">
|
|
<span *ngIf="cancelIcon" [ngClass]="cancelIcon" class="p-button-icon p-button-icon-left"></span>
|
|
<ng-container *ngIf="!cancelIcon">
|
|
<TimesIcon *ngIf="!cancelIconTemplate" [styleClass]="'p-button-icon p-button-icon-left'" [attr.aria-hidden]="true" />
|
|
<span *ngIf="cancelIconTemplate" class="p-button-icon p-button-icon-left" [attr.aria-hidden]="true">
|
|
<ng-template *ngTemplateOutlet="cancelIconTemplate"></ng-template>
|
|
</span>
|
|
</ng-container>
|
|
</p-button>
|
|
</ng-container>
|
|
<ng-container *ngTemplateOutlet="headerTemplate; context: { $implicit: files, uploadedFiles: uploadedFiles, chooseCallback: choose.bind(this), clearCallback: clear.bind(this), uploadCallback: upload.bind(this) }"></ng-container>
|
|
<ng-container *ngTemplateOutlet="toolbarTemplate"></ng-container>
|
|
</div>
|
|
<div #content class="p-fileupload-content" (dragenter)="onDragEnter($event)" (dragleave)="onDragLeave($event)" (drop)="onDrop($event)" [attr.data-pc-section]="'content'">
|
|
<p-progressBar [value]="progress" [showValue]="false" *ngIf="hasFiles()"></p-progressBar>
|
|
|
|
<p-messages [value]="msgs" [enableService]="false"></p-messages>
|
|
|
|
<div class="p-fileupload-files" *ngIf="hasFiles()">
|
|
<div *ngIf="!fileTemplate">
|
|
<div class="p-fileupload-row" *ngFor="let file of files; let i = index">
|
|
<div><img [src]="file.objectURL" *ngIf="isImage(file)" [width]="previewWidth" (error)="imageError($event)" /></div>
|
|
<div class="p-fileupload-filename">{{ file.name }}</div>
|
|
<div>{{ formatSize(file.size) }}</div>
|
|
<div>
|
|
<button type="button" pButton (click)="remove($event, i)" [disabled]="uploading" class="p-button-icon-only" [class]="removeStyleClass">
|
|
<TimesIcon *ngIf="!cancelIconTemplate" />
|
|
<ng-template *ngTemplateOutlet="cancelIconTemplate"></ng-template>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div *ngIf="fileTemplate">
|
|
<ng-template ngFor [ngForOf]="files" [ngForTemplate]="fileTemplate"></ng-template>
|
|
</div>
|
|
</div>
|
|
<ng-container *ngTemplateOutlet="contentTemplate; context: { $implicit: files, uploadedFiles: uploadedFiles, removeUploadedFileCallback: removeUploadedFile.bind(this), progress: progress, messages: msgs }"></ng-container>
|
|
<div *ngIf="emptyTemplate && !hasFiles() && !uploadedFileCount" class="p-fileupload-empty">
|
|
<ng-container *ngTemplateOutlet="emptyTemplate"></ng-container>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="p-fileupload p-fileupload-basic p-component" *ngIf="mode === 'basic'" [attr.data-pc-name]="'fileupload'">
|
|
<p-messages [value]="msgs" [enableService]="false"></p-messages>
|
|
<span
|
|
[ngClass]="{ 'p-button p-component p-fileupload-choose': true, 'p-button-icon-only': !basicButtonLabel, 'p-fileupload-choose-selected': hasFiles(), 'p-focus': focus, 'p-disabled': disabled }"
|
|
[ngStyle]="style"
|
|
[class]="styleClass"
|
|
(click)="onBasicUploaderClick()"
|
|
(keydown)="onBasicKeydown($event)"
|
|
tabindex="0"
|
|
pRipple
|
|
[attr.data-pc-section]="'choosebutton'"
|
|
>
|
|
<ng-container *ngIf="hasFiles() && !auto; else chooseSection">
|
|
<span *ngIf="uploadIcon" class="p-button-icon p-button-icon-left" [ngClass]="uploadIcon"></span>
|
|
<ng-container *ngIf="!uploadIcon">
|
|
<UploadIcon *ngIf="!uploadIconTemplate" [styleClass]="'p-button-icon p-button-icon-left'" />
|
|
<span *ngIf="uploadIconTemplate" class="p-button-icon p-button-icon-left">
|
|
<ng-template *ngTemplateOutlet="uploadIconTemplate"></ng-template>
|
|
</span>
|
|
</ng-container>
|
|
</ng-container>
|
|
<ng-template #chooseSection>
|
|
<span *ngIf="chooseIcon" class="p-button-icon p-button-icon-left pi" [ngClass]="chooseIcon"></span>
|
|
<ng-container *ngIf="!chooseIcon">
|
|
<PlusIcon [styleClass]="'p-button-icon p-button-icon-left pi'" *ngIf="!chooseIconTemplate" [attr.aria-hidden]="true" [attr.data-pc-section]="'uploadicon'" />
|
|
<span *ngIf="chooseIconTemplate" class="p-button-icon p-button-icon-left pi" [attr.aria-hidden]="true" [attr.data-pc-section]="'uploadicon'">
|
|
<ng-template *ngTemplateOutlet="chooseIconTemplate"></ng-template>
|
|
</span>
|
|
</ng-container>
|
|
</ng-template>
|
|
<span *ngIf="basicButtonLabel" class="p-button-label" [attr.data-pc-section]="'label'">{{ basicButtonLabel }}</span>
|
|
<input
|
|
[attr.aria-label]="browseFilesLabel"
|
|
#basicfileinput
|
|
type="file"
|
|
[accept]="accept"
|
|
[multiple]="multiple"
|
|
[disabled]="disabled"
|
|
(change)="onFileSelect($event)"
|
|
*ngIf="!hasFiles()"
|
|
(focus)="onFocus()"
|
|
(blur)="onBlur()"
|
|
[attr.data-pc-section]="'input'"
|
|
/>
|
|
</span>
|
|
</div>
|
|
`, isInline: true, styles: ["@layer primeng{.p-fileupload-content{position:relative}.p-fileupload-row{display:flex;align-items:center}.p-fileupload-row>div{flex:1 1 auto;width:25%}.p-fileupload-row>div:last-child{text-align:right}.p-fileupload-content .p-progressbar{width:100%;position:absolute;top:0;left:0}.p-button.p-fileupload-choose{position:relative;overflow:hidden}.p-button.p-fileupload-choose input[type=file],.p-fileupload-choose.p-fileupload-choose-selected input[type=file]{display:none}.p-fluid .p-fileupload .p-button{width:auto}.p-fileupload-filename{word-break:break-all}}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(() => i4.NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => i4.NgForOf), selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i0.forwardRef(() => i4.NgIf), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(() => i4.NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i0.forwardRef(() => i4.NgStyle), selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i0.forwardRef(() => i5.ButtonDirective), selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i0.forwardRef(() => i5.Button), selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i0.forwardRef(() => i6.ProgressBar), selector: "p-progressBar", inputs: ["value", "showValue", "styleClass", "style", "unit", "mode", "color"] }, { kind: "component", type: i0.forwardRef(() => i7.Messages), selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "directive", type: i0.forwardRef(() => i8.Ripple), selector: "[pRipple]" }, { kind: "component", type: i0.forwardRef(() => PlusIcon), selector: "PlusIcon" }, { kind: "component", type: i0.forwardRef(() => UploadIcon), selector: "UploadIcon" }, { kind: "component", type: i0.forwardRef(() => TimesIcon), selector: "TimesIcon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
}
|
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: FileUpload, decorators: [{
|
|
type: Component,
|
|
args: [{ selector: 'p-fileUpload', template: `
|
|
<div [ngClass]="'p-fileupload p-fileupload-advanced p-component'" [ngStyle]="style" [class]="styleClass" *ngIf="mode === 'advanced'" [attr.data-pc-name]="'fileupload'" [attr.data-pc-section]="'root'">
|
|
<input
|
|
[attr.aria-label]="browseFilesLabel"
|
|
#advancedfileinput
|
|
type="file"
|
|
(change)="onFileSelect($event)"
|
|
[multiple]="multiple"
|
|
[accept]="accept"
|
|
[disabled]="disabled || isChooseDisabled()"
|
|
[attr.title]="''"
|
|
[attr.data-pc-section]="'input'"
|
|
[style.display]="'none'"
|
|
/>
|
|
<div class="p-fileupload-buttonbar" [attr.data-pc-section]="'buttonbar'">
|
|
<ng-container *ngIf="!headerTemplate">
|
|
<span
|
|
class="p-button p-component p-fileupload-choose"
|
|
[ngClass]="{ 'p-focus': focus, 'p-disabled': disabled || isChooseDisabled() }"
|
|
(focus)="onFocus()"
|
|
(blur)="onBlur()"
|
|
pRipple
|
|
(click)="choose()"
|
|
(keydown.enter)="choose()"
|
|
tabindex="0"
|
|
[class]="chooseStyleClass"
|
|
[attr.data-pc-section]="'choosebutton'"
|
|
>
|
|
<input
|
|
[attr.aria-label]="browseFilesLabel"
|
|
#advancedfileinput
|
|
type="file"
|
|
(change)="onFileSelect($event)"
|
|
[multiple]="multiple"
|
|
[accept]="accept"
|
|
[disabled]="disabled || isChooseDisabled()"
|
|
[attr.title]="''"
|
|
[attr.data-pc-section]="'input'"
|
|
/>
|
|
<span *ngIf="chooseIcon" [ngClass]="'p-button-icon p-button-icon-left'" [class]="chooseIcon" [attr.aria-label]="true" [attr.data-pc-section]="'chooseicon'"></span>
|
|
<ng-container *ngIf="!chooseIcon">
|
|
<PlusIcon *ngIf="!chooseIconTemplate" [styleClass]="'p-button-icon p-button-icon-left'" [attr.aria-label]="true" [attr.data-pc-section]="'chooseicon'" />
|
|
<span *ngIf="chooseIconTemplate" class="p-button-icon p-button-icon-left" [attr.aria-label]="true" [attr.data-pc-section]="'chooseicon'">
|
|
<ng-template *ngTemplateOutlet="chooseIconTemplate"></ng-template>
|
|
</span>
|
|
</ng-container>
|
|
<span class="p-button-label" [attr.data-pc-section]="'choosebuttonlabel'">{{ chooseButtonLabel }}</span>
|
|
</span>
|
|
|
|
<p-button *ngIf="!auto && showUploadButton" type="button" [label]="uploadButtonLabel" (onClick)="upload()" [disabled]="!hasFiles() || isFileLimitExceeded()" [styleClass]="uploadStyleClass">
|
|
<span *ngIf="uploadIcon" [ngClass]="uploadIcon" [attr.aria-hidden]="true" class="p-button-icon p-button-icon-left"></span>
|
|
<ng-container *ngIf="!uploadIcon">
|
|
<UploadIcon *ngIf="!uploadIconTemplate" [styleClass]="'p-button-icon p-button-icon-left'" />
|
|
<span *ngIf="uploadIconTemplate" class="p-button-icon p-button-icon-left" [attr.aria-hidden]="true">
|
|
<ng-template *ngTemplateOutlet="uploadIconTemplate"></ng-template>
|
|
</span>
|
|
</ng-container>
|
|
</p-button>
|
|
<p-button *ngIf="!auto && showCancelButton" type="button" [label]="cancelButtonLabel" (onClick)="clear()" [disabled]="!hasFiles() || uploading" [styleClass]="cancelStyleClass">
|
|
<span *ngIf="cancelIcon" [ngClass]="cancelIcon" class="p-button-icon p-button-icon-left"></span>
|
|
<ng-container *ngIf="!cancelIcon">
|
|
<TimesIcon *ngIf="!cancelIconTemplate" [styleClass]="'p-button-icon p-button-icon-left'" [attr.aria-hidden]="true" />
|
|
<span *ngIf="cancelIconTemplate" class="p-button-icon p-button-icon-left" [attr.aria-hidden]="true">
|
|
<ng-template *ngTemplateOutlet="cancelIconTemplate"></ng-template>
|
|
</span>
|
|
</ng-container>
|
|
</p-button>
|
|
</ng-container>
|
|
<ng-container *ngTemplateOutlet="headerTemplate; context: { $implicit: files, uploadedFiles: uploadedFiles, chooseCallback: choose.bind(this), clearCallback: clear.bind(this), uploadCallback: upload.bind(this) }"></ng-container>
|
|
<ng-container *ngTemplateOutlet="toolbarTemplate"></ng-container>
|
|
</div>
|
|
<div #content class="p-fileupload-content" (dragenter)="onDragEnter($event)" (dragleave)="onDragLeave($event)" (drop)="onDrop($event)" [attr.data-pc-section]="'content'">
|
|
<p-progressBar [value]="progress" [showValue]="false" *ngIf="hasFiles()"></p-progressBar>
|
|
|
|
<p-messages [value]="msgs" [enableService]="false"></p-messages>
|
|
|
|
<div class="p-fileupload-files" *ngIf="hasFiles()">
|
|
<div *ngIf="!fileTemplate">
|
|
<div class="p-fileupload-row" *ngFor="let file of files; let i = index">
|
|
<div><img [src]="file.objectURL" *ngIf="isImage(file)" [width]="previewWidth" (error)="imageError($event)" /></div>
|
|
<div class="p-fileupload-filename">{{ file.name }}</div>
|
|
<div>{{ formatSize(file.size) }}</div>
|
|
<div>
|
|
<button type="button" pButton (click)="remove($event, i)" [disabled]="uploading" class="p-button-icon-only" [class]="removeStyleClass">
|
|
<TimesIcon *ngIf="!cancelIconTemplate" />
|
|
<ng-template *ngTemplateOutlet="cancelIconTemplate"></ng-template>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div *ngIf="fileTemplate">
|
|
<ng-template ngFor [ngForOf]="files" [ngForTemplate]="fileTemplate"></ng-template>
|
|
</div>
|
|
</div>
|
|
<ng-container *ngTemplateOutlet="contentTemplate; context: { $implicit: files, uploadedFiles: uploadedFiles, removeUploadedFileCallback: removeUploadedFile.bind(this), progress: progress, messages: msgs }"></ng-container>
|
|
<div *ngIf="emptyTemplate && !hasFiles() && !uploadedFileCount" class="p-fileupload-empty">
|
|
<ng-container *ngTemplateOutlet="emptyTemplate"></ng-container>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="p-fileupload p-fileupload-basic p-component" *ngIf="mode === 'basic'" [attr.data-pc-name]="'fileupload'">
|
|
<p-messages [value]="msgs" [enableService]="false"></p-messages>
|
|
<span
|
|
[ngClass]="{ 'p-button p-component p-fileupload-choose': true, 'p-button-icon-only': !basicButtonLabel, 'p-fileupload-choose-selected': hasFiles(), 'p-focus': focus, 'p-disabled': disabled }"
|
|
[ngStyle]="style"
|
|
[class]="styleClass"
|
|
(click)="onBasicUploaderClick()"
|
|
(keydown)="onBasicKeydown($event)"
|
|
tabindex="0"
|
|
pRipple
|
|
[attr.data-pc-section]="'choosebutton'"
|
|
>
|
|
<ng-container *ngIf="hasFiles() && !auto; else chooseSection">
|
|
<span *ngIf="uploadIcon" class="p-button-icon p-button-icon-left" [ngClass]="uploadIcon"></span>
|
|
<ng-container *ngIf="!uploadIcon">
|
|
<UploadIcon *ngIf="!uploadIconTemplate" [styleClass]="'p-button-icon p-button-icon-left'" />
|
|
<span *ngIf="uploadIconTemplate" class="p-button-icon p-button-icon-left">
|
|
<ng-template *ngTemplateOutlet="uploadIconTemplate"></ng-template>
|
|
</span>
|
|
</ng-container>
|
|
</ng-container>
|
|
<ng-template #chooseSection>
|
|
<span *ngIf="chooseIcon" class="p-button-icon p-button-icon-left pi" [ngClass]="chooseIcon"></span>
|
|
<ng-container *ngIf="!chooseIcon">
|
|
<PlusIcon [styleClass]="'p-button-icon p-button-icon-left pi'" *ngIf="!chooseIconTemplate" [attr.aria-hidden]="true" [attr.data-pc-section]="'uploadicon'" />
|
|
<span *ngIf="chooseIconTemplate" class="p-button-icon p-button-icon-left pi" [attr.aria-hidden]="true" [attr.data-pc-section]="'uploadicon'">
|
|
<ng-template *ngTemplateOutlet="chooseIconTemplate"></ng-template>
|
|
</span>
|
|
</ng-container>
|
|
</ng-template>
|
|
<span *ngIf="basicButtonLabel" class="p-button-label" [attr.data-pc-section]="'label'">{{ basicButtonLabel }}</span>
|
|
<input
|
|
[attr.aria-label]="browseFilesLabel"
|
|
#basicfileinput
|
|
type="file"
|
|
[accept]="accept"
|
|
[multiple]="multiple"
|
|
[disabled]="disabled"
|
|
(change)="onFileSelect($event)"
|
|
*ngIf="!hasFiles()"
|
|
(focus)="onFocus()"
|
|
(blur)="onBlur()"
|
|
[attr.data-pc-section]="'input'"
|
|
/>
|
|
</span>
|
|
</div>
|
|
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
class: 'p-element'
|
|
}, styles: ["@layer primeng{.p-fileupload-content{position:relative}.p-fileupload-row{display:flex;align-items:center}.p-fileupload-row>div{flex:1 1 auto;width:25%}.p-fileupload-row>div:last-child{text-align:right}.p-fileupload-content .p-progressbar{width:100%;position:absolute;top:0;left:0}.p-button.p-fileupload-choose{position:relative;overflow:hidden}.p-button.p-fileupload-choose input[type=file],.p-fileupload-choose.p-fileupload-choose-selected input[type=file]{display:none}.p-fluid .p-fileupload .p-button{width:auto}.p-fileupload-filename{word-break:break-all}}\n"] }]
|
|
}], ctorParameters: () => [{ type: Document, decorators: [{
|
|
type: Inject,
|
|
args: [DOCUMENT]
|
|
}] }, { type: undefined, decorators: [{
|
|
type: Inject,
|
|
args: [PLATFORM_ID]
|
|
}] }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i1.DomSanitizer }, { type: i0.NgZone }, { type: i2.HttpClient }, { type: i0.ChangeDetectorRef }, { type: i3.PrimeNGConfig }], propDecorators: { name: [{
|
|
type: Input
|
|
}], url: [{
|
|
type: Input
|
|
}], method: [{
|
|
type: Input
|
|
}], multiple: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], accept: [{
|
|
type: Input
|
|
}], disabled: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], auto: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], withCredentials: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], maxFileSize: [{
|
|
type: Input,
|
|
args: [{ transform: numberAttribute }]
|
|
}], invalidFileSizeMessageSummary: [{
|
|
type: Input
|
|
}], invalidFileSizeMessageDetail: [{
|
|
type: Input
|
|
}], invalidFileTypeMessageSummary: [{
|
|
type: Input
|
|
}], invalidFileTypeMessageDetail: [{
|
|
type: Input
|
|
}], invalidFileLimitMessageDetail: [{
|
|
type: Input
|
|
}], invalidFileLimitMessageSummary: [{
|
|
type: Input
|
|
}], style: [{
|
|
type: Input
|
|
}], styleClass: [{
|
|
type: Input
|
|
}], previewWidth: [{
|
|
type: Input,
|
|
args: [{ transform: numberAttribute }]
|
|
}], chooseLabel: [{
|
|
type: Input
|
|
}], uploadLabel: [{
|
|
type: Input
|
|
}], cancelLabel: [{
|
|
type: Input
|
|
}], chooseIcon: [{
|
|
type: Input
|
|
}], uploadIcon: [{
|
|
type: Input
|
|
}], cancelIcon: [{
|
|
type: Input
|
|
}], showUploadButton: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], showCancelButton: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], mode: [{
|
|
type: Input
|
|
}], headers: [{
|
|
type: Input
|
|
}], customUpload: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], fileLimit: [{
|
|
type: Input,
|
|
args: [{ transform: (value) => numberAttribute(value, null) }]
|
|
}], uploadStyleClass: [{
|
|
type: Input
|
|
}], cancelStyleClass: [{
|
|
type: Input
|
|
}], removeStyleClass: [{
|
|
type: Input
|
|
}], chooseStyleClass: [{
|
|
type: Input
|
|
}], onBeforeUpload: [{
|
|
type: Output
|
|
}], onSend: [{
|
|
type: Output
|
|
}], onUpload: [{
|
|
type: Output
|
|
}], onError: [{
|
|
type: Output
|
|
}], onClear: [{
|
|
type: Output
|
|
}], onRemove: [{
|
|
type: Output
|
|
}], onSelect: [{
|
|
type: Output
|
|
}], onProgress: [{
|
|
type: Output
|
|
}], uploadHandler: [{
|
|
type: Output
|
|
}], onImageError: [{
|
|
type: Output
|
|
}], onRemoveUploadedFile: [{
|
|
type: Output
|
|
}], templates: [{
|
|
type: ContentChildren,
|
|
args: [PrimeTemplate]
|
|
}], advancedFileInput: [{
|
|
type: ViewChild,
|
|
args: ['advancedfileinput']
|
|
}], basicFileInput: [{
|
|
type: ViewChild,
|
|
args: ['basicfileinput']
|
|
}], content: [{
|
|
type: ViewChild,
|
|
args: ['content']
|
|
}], files: [{
|
|
type: Input
|
|
}] } });
|
|
export class FileUploadModule {
|
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: FileUploadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.7", ngImport: i0, type: FileUploadModule, declarations: [FileUpload], imports: [CommonModule, SharedModule, ButtonModule, ProgressBarModule, MessagesModule, RippleModule, PlusIcon, UploadIcon, TimesIcon], exports: [FileUpload, SharedModule, ButtonModule, ProgressBarModule, MessagesModule] });
|
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: FileUploadModule, imports: [CommonModule, SharedModule, ButtonModule, ProgressBarModule, MessagesModule, RippleModule, PlusIcon, UploadIcon, TimesIcon, SharedModule, ButtonModule, ProgressBarModule, MessagesModule] });
|
|
}
|
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: FileUploadModule, decorators: [{
|
|
type: NgModule,
|
|
args: [{
|
|
imports: [CommonModule, SharedModule, ButtonModule, ProgressBarModule, MessagesModule, RippleModule, PlusIcon, UploadIcon, TimesIcon],
|
|
exports: [FileUpload, SharedModule, ButtonModule, ProgressBarModule, MessagesModule],
|
|
declarations: [FileUpload]
|
|
}]
|
|
}] });
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsZXVwbG9hZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9hcHAvY29tcG9uZW50cy9maWxldXBsb2FkL2ZpbGV1cGxvYWQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxRQUFRLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUM1RSxPQUFPLEVBQXlC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FthY2NlcHRdPVwiYWNjZXB0XCJcbiAgICAgICAgICAgICAgICBbZGlzYWJsZWRdPVwiZGlzYWJsZWQgfHwgaXNDaG9vc2VEaXNhYmxlZCgpXCJcbiAgICAgICAgICAgICAgICBbYXR0ci50aXRsZV09XCInJ1wiXG4gICAgICAgICAgICAgICAgW2F0dHIuZGF0YS1wYy1zZWN0aW9uXT1cIidpbnB1dCdcIlxuICAgICAgICAgICAgICAgIFtzdHlsZS5kaXNwbGF5XT1cIidub25lJ1wiXG4gICAgICAgICAgICAvPlxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cInAtZmlsZXVwbG9hZC1idXR0b25iYXJcIiBbYXR0ci5kYXRhLXBjLXNlY3Rpb25dPVwiJ2J1dHRvbmJhcidcIj5cbiAgICAgICAgICAgICAgICA8bmctY29udGFpbmVyICpuZ0lmPVwiIWhlYWRlclRlbXBsYXRlXCI+XG4gICAgICAgICAgICAgICAgICAgIDxzcGFuXG4gICAgICAgICAgICAgICAgICAgICAgICBjbGFzcz1cInAtYnV0dG9uIHAtY29tcG9uZW50IHAtZmlsZXVwbG9hZC1jaG9vc2VcIlxuICAgICAgICAgICAgICAgICAgICAgICAgW25nQ2xhc3NdPVwieyAncC1mb2N1cyc6IGZvY3VzLCAncC1kaXNhYmxlZCc6IGRpc2FibGVkIHx8IGlzQ2hvb3NlRGlzYWJsZWQoKSB9XCJcbiAgICAgICAgICAgICAgICAgICAgICAgIChmb2N1cyk9XCJvbkZvY3VzKClcIlxuICAgICAgICAgICAgICAgICAgICAgICAgKGJsdXIpPVwib25CbHVyKClcIlxuICAgICAgICAgICAgICAgICAgICAgICAgcFJpcHBsZVxuICAgICAgICAgICAgICAgICAgICAgICAgKGNsaWNrKT1cImNob29zZSgpXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIChrZXlkb3duLmVudGVyKT1cImNob29zZSgpXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRhYmluZGV4PVwiMFwiXG4gICAgICAgICAgICAgICAgICAgICAgICBbY2xhc3NdPVwiY2hvb3NlU3R5bGVDbGFzc1wiXG4gICAgICAgICAgICAgICAgICAgICAgICBbYXR0ci5kYXRhLXBjLXNlY3Rpb25dPVwiJ2Nob29zZWJ1dHRvbidcIlxuICAgICAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgICAgICA8aW5wdXRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBbYXR0ci5hcmlhLWxhYmVsXT1cImJyb3dzZUZpbGVzTGFiZWxcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICNhZHZhbmNlZGZpbGVpbnB1dFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU9XCJmaWxlXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY2hhbmdlKT1cIm9uRmlsZVNlbGVjdCgkZXZlbnQpXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBbbXVsdGlwbGVdPVwibXVsdGlwbGVcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFthY2NlcHRdPVwiYWNjZXB0XCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBbZGlzYWJsZWRdPVwiZGlzYWJsZWQgfHwgaXNDaG9vc2VEaXNhYmxlZCgpXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBbYXR0ci50aXRsZV09XCInJ1wiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgW2F0dHIuZGF0YS1wYy1zZWN0aW9uXT1cIidpbnB1dCdcIlxuICAgICAgICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuICpuZ0lmPVwiY2hvb3NlSWNvblwiIFtuZ0NsYXNzXT1cIidwLWJ1dHRvbi1pY29uIHAtYnV0dG9uLWljb24tbGVmdCdcIiBbY2xhc3NdPVwiY2hvb3NlSWNvblwiIFthdHRyLmFyaWEtbGFiZWxdPVwidHJ1ZVwiIFthdHRyLmRhdGEtcGMtc2VjdGlvbl09XCInY2hvb3NlaWNvbidcIj48L3NwYW4+XG4gICAgICAgICAgICAgICAgICAgICAgICA8bmctY29udGFpbmVyICpuZ0lmPVwiIWNob29zZUljb25cIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8UGx1c0ljb24gKm5nSWY9XCIhY2hvb3NlSWNvblRlbXBsYXRlXCIgW3N0eWxlQ2xhc3NdPVwiJ3AtYnV0dG9uLWljb24gcC1idXR0b24taWNvbi1sZWZ0J1wiIFthdHRyLmFyaWEtbGFiZWxdPVwidHJ1ZVwiIFthdHRyLmRhdGEtcGMtc2VjdGlvbl09XCInY2hvb3NlaWNvbidcIiAvPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuICpuZ0lmPVwiY2hvb3NlSWNvblRlbXBsYXRlXCIgY2xhc3M9XCJwLWJ1dHRvbi1pY29uIHAtYnV0dG9uLWljb24tbGVmdFwiIFthdHRyLmFyaWEtbGFiZWxdPVwidHJ1ZVwiIFthdHRyLmRhdGEtcGMtc2VjdGlvbl09XCInY2hvb3NlaWNvbidcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPG5nLXRlbXBsYXRlICpuZ1RlbXBsYXRlT3V0bGV0PVwiY2hvb3NlSWNvblRlbXBsYXRlXCI+PC9uZy10ZW1wbGF0ZT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3NwYW4+XG4gICAgICAgICAgICAgICAgICAgICAgICA8L25nLWNvbnRhaW5lcj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPVwicC1idXR0b24tbGFiZWxcIiBbYXR0ci5kYXRhLXBjLXNlY3Rpb25dPVwiJ2Nob29zZWJ1dHRvbmxhYmVsJ1wiPnt7IGNob29zZUJ1dHRvbkxhYmVsIH19PC9zcGFuPlxuICAgICAgICAgICAgICAgICAgICA8L3NwYW4+XG5cbiAgICAgICAgICAgICAgICAgICAgPHAtYnV0dG9uICpuZ0lmPVwiIWF1d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gICAgICAgIHBSaXBwbGVcbiAgICAgICAgICAgICAgICBbYXR0ci5kYXRhLXBjLXNlY3Rpb25dPVwiJ2Nob29zZWJ1dHRvbidcIlxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgIDxuZy1jb250YWluZXIgKm5nSWY9XCJoYXNGaWxlcygpICYmICFhdXRvOyBlbHNlIGNob29zZVNlY3Rpb25cIj5cbiAgICAgICAgICAgICAgICAgICAgPHNwYW4gKm5nSWY9XCJ1cGxvYWRJY29uXCIgY2xhc3M9XCJwLWJ1dHRvbi1pY29uIHAtYnV0dG9uLWljb24tbGVmdFwiIFtuZ0NsYXNzXT1cInVwbG9hZEljb25cIj48L3NwYW4+XG4gICAgICAgICAgICAgICAgICAgIDxuZy1jb250YWluZXIgKm5nSWY9XCIhdXBsb2FkSWNvblwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgPFVwbG9hZEljb24gKm5nSWY9XCIhdXBsb2FkSWNvblRlbXBsYXRlXCIgW3N0eWxlQ2xhc3NdPVwiJ3AtYnV0dG9uLWljb24gcC1idXR0b24taWNvbi1sZWZ0J1wiIC8+XG4gICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiAqbmdJZj1cInVwbG9hZEljb25UZW1wbGF0ZVwiIGNsYXNzPVwicC1idXR0b24taWNvbiBwLWJ1dHRvbi1pY29uLWxlZnRcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bmctdGVtcGxhdGUgKm5nVGVtcGxhdGVPdXRsZXQ9XCJ1cGxvYWRJY29uVGVtcGxhdGVcIj48L25nLXRlbXBsYXRlPlxuICAgICAgICAgICAgICAgICAgICAgICAgPC9zcGFuPlxuICAgICAgICAgICAgICAgICAgICA8L25nLWNvbnRhaW5lcj5cbiAgICAgICAgICAgICAgICA8L25nLWNvbnRhaW5lcj5cbiAgICAgICAgICAgICAgICA8bmctdGVtcGxhdGUgI2Nob29zZVNlY3Rpb24+XG4gICAgICAgICAgICAgICAgICAgIDxzcGFuICpuZ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0dG9uTGFiZWwgfX08L3NwYW4+XG4gICAgICAgICAgICAgICAgPGlucHV0XG4gICAgICAgICAgICAgICAgICAgIFthdHRyLmFyaWEtbGFiZWxdPVwiYnJvd3NlRmlsZXNMYWJlbFwiXG4gICAgICAgICAgICAgICAgICAgICNiYXNpY2ZpbGVpbnB1dFxuICAgICAgICAgICAgICAgICAgICB0eXBlPVwiZmlsZVwiXG4gICAgICAgICAgICAgICAgICAgIFthY2NlcHRdPVwiYWNjZXB0XCJcbiAgICAgICAgICAgICAgICAgICAgW211bHRpcGxlXT1cIm11bHRpcGxlXCJcbiAgICAgICAgICAgICAgICAgICAgW2Rpc2FibGVkXT1cImRpc2FibGVkXCJcbiAgICAgICAgICAgICAgICAgICAgKGNoYW5nZSk9XCJvbkZpbGVTZWxlY3QoJGV2ZW50KVwiXG4gICAgICAgICAgICAgICAgICAgICpuZ0lmPVwiIWhhc0ZpbGVzKClcIlxuICAgICAgICAgICAgICAgICAgICAoZm9jdXMpPVwib25Gb2N1cygpXCJcbiAgICAgICAgICAgICAgICAgICAgKGJsdXIpPVwib25CbHVyKClcIlxuICAgICAgICAgICAgICAgICAgICBbYXR0ci5kYXRhLXBjLXNlY3Rpb25dPVwiJ2lucHV0J1wiXG4gICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgIDwvc3Bhbj5cbiAgICAgICAgPC9kaXY+XG4gICAgYCxcbiAgICBjaGFuZ2VEZXRlY3Rpb246IENoYW5nZURldGVjdGlvblN0cmF0ZWd5Lk9uUHVzaCxcbiAgICBlbmNhcHN1bGF0aW9uOiBWaWV3RW5jYXBzdWxhdGlvbi5Ob25lLFxuICAgIHN0eWxlVXJsczogWycuL2ZpbGV1cGxvYWQuY3NzJ10sXG4gICAgaG9zdDoge1xuICAgICAgICBjbGFzczogJ3AtZWxlbWVudCdcbiAgICB9XG59KVxuZXhwb3J0IGNsYXNzIEZpbGVVcGxvYWQgaW1wbGVtZW50cyBBZnRlclZpZXdJbml0LCBBZnRlckNvb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gICBAVmlld0NoaWxkKCdjb250ZW50JykgY29udGVudDogRWxlbWVudFJlZiB8IHVuZGVmaW5lZDtcblxuICAgIEBJbnB1dCgpIHNldCBmaWxlcyhmaWxlcykge1xuICAgICAgICB0aGlzLl9maWxlcyA9IFtdO1xuXG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZmlsZXMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIGxldCBmaWxlID0gZmlsZXNbaV07XG5cbiAgICAgICAgICAgIGlmICh0aGlzLnZhbGlkYXRlKGZpbGUpKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuaXNJbWFnZShmaWxlKSkge1xuICAgICAgICAgICAgICAgICAgICAoPGFueT5maWxlKS5vYmplY3RVUkwgPSB0aGlzLnNhbml0aXplci5ieXBhc3NTZWN1cml0eVRydXN0VXJsKHdpbmRvdy5VUkwuY3JlYXRlT2JqZWN0VVJMKGZpbGVzW2ldKSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdGhpcy5fZmlsZXMucHVzaChmaWxlc1tpXSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBnZXQgZmlsZXMoKTogRmlsZVtdIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuX2ZpbGVzO1xuICAgIH1cblxuICAgIHB1YmxpYyBnZXQgYmFzaWNCdXR0b25MYWJlbCgpOiBzdHJpbmcge1xuICAgICAgICBpZiAodGhpcy5hdXRvIHx8ICF0aGlzLmhhc0ZpbGVzKCkpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLmNob29zZUxhYmVsIGFzIHN0cmluZztcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB0aGlzLnVwbG9hZExhYmVsID8/IHRoaXMuZmlsZXNbMF0ubmFtZTtcbiAgICB9XG5cbiAgICBwdWJsaWMgX2ZpbGVzOiBGaWxlW10gPSBbXTtcblxuICAgIHB1YmxpYyBwcm9ncm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AgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgY2FzZSAnY29udGVudCc6XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY29udGVudFRlbXBsYXRlID0gaXRlbS50ZW1wbGF0ZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICBjYXNlICd0b29sYmFyJzpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy50b29sYmFyVGVtcGxhdGUgPSBpdGVtLnRlbXBsYXRlO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgIGNhc2UgJ2Nob29zZWljb24nOlxuICAgICAgICAgICAgICAgICAgICB0aGlzLmNob29zZUljb25UZW1wbGF0ZSA9IGl0ZW0udGVtcGxhdGU7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgY2FzZSAndXBsb2FkaWNvbic6XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudXBsb2FkSWNvblRlbXBsYXRlID0gaXRlbS50ZW1wbGF0ZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICBjYXNlICdjYW5jZWxpY29uJzpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5jYW5jZWxJY29uVGVtcGxhdGUgPSBpdGVtLnRlbXBsYXRlO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgIGNhc2UgJ2VtcHR5JzpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5lbXB0eVRlbXBsYXRlID0gaXRlbS50ZW1wbGF0ZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICB0aGlzLmZpbGVUZW1wbGF0ZSA9IGl0ZW0udGVtcGxhdGU7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAg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6IGFueSkge1xuICAgICAgICBpZiAoZXZlbnQudHlwZSAhPT0gJ2Ryb3AnICYmIHRoaXMuaXNJRTExKCkgJiYgdGhpcy5kdXBsaWNhdGVJRUV2ZW50KSB7XG4gICAgICAgICAgICB0aGlzLmR1cGxpY2F0ZUlFRXZlbnQgPSBmYWxzZTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMubXNncyA9IFtdO1xuICAgICAgICBpZiAoIXRoaXMubXVsdGlwbGUpIHtcbiAgICAgICAgICAgIHRoaXMuZmlsZXMgPSBbXTtcbiAgICAgICAgfVxuXG4gICAgICAgIGxldCBmaWxlcyA9IGV2ZW50LmRhdGFUcmFuc2ZlciA/IGV2ZW50LmRhdGFUcmFuc2Zlci5maWxlcyA6IGV2ZW50LnRhcmdldC5maWxlcztcbiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBmaWxlcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgbGV0IGZpbGUgPSBmaWxlc1tpXTtcblxuICAgICAgICAgICAgaWYgKCF0aGlzLmlzRmlsZVNlbGVjdGVkKGZpbGUpKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMudmFsaWRhdGUoZmlsZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuaXNJbWFnZShmaWxlKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZmlsZS5vYmplY3RVUkwgPSB0aGlzLnNhbml0aXplci5ieXBhc3NTZWN1cml0eVRydXN0VXJsKHdpbmRvdy5VUkwuY3JlYXRlT2JqZWN0VVJMKGZpbGVzW2ldKSk7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICB0aGlzLmZpbGVzLnB1c2goZmlsZXNbaV0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMub25TZWxlY3QuZW1pdCh7I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aWxlVHlwZS5pbmRleE9mKCcqJykgIT09IC0xO1xuICAgIH1cblxuICAgIGdldEZpbGVFeHRlbnNpb24oZmlsZTogRmlsZSk6IHN0cmluZyB7XG4gICAgICAgIHJldHVybiAnLicgKyBmaWxlLm5hbWUuc3BsaXQoJy4nKS5wb3AoKTtcbiAgICB9XG5cbiAgICBpc0ltYWdlKGZpbGU6IEZpbGUpOiBib29sZWFuIHtcbiAgICAgICAgcmV0dXJuIC9eaW1hZ2VcXC8vLnRlc3QoZmlsZS50eXBlKTtcbiAgICB9XG5cbiAgICBvbkltYWdlTG9hZChpbWc6IGFueSkge1xuICAgICAgICB3aW5kb3cuVVJMLnJldm9rZU9iamVjdFVSTChpbWcuc3JjKTtcbiAgICB9XG4gICAgLyoqXG4gICAgICogVXBsb2FkcyB0aGUgc2VsZWN0ZWQgZmlsZXMuXG4gICAgICogQGdyb3VwIE1ldGhvZFxuICAgICAqL1xuICAgIHVwbG9hZCgpIHtcbiAgICAgICAgaWYgKHRoaXMuY3VzdG9tVXBsb2FkKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5maWxlTGltaXQpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnVwbG9hZGVkRmlsZUNvdW50ICs9IHRoaXMuZmlsZXMubGVuZ3RoO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB0aGlzLnVwbG9hZEhhbmRsZXIuZW1pdCh7XG4gICAgICAgICAgICAgICAgZmlsZXM6IHRoaXMuZmlsZXNcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICB0aGlzLmNkLm1hcmtGb3JDaGVjaygpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhpcy51cGxvYWRpbmcgPSB0cnVlO1xuICAgICAgICAgICAgdGhpcy5tc2dzID0gW107XG4gICAgICAgICAgICBsZXQgZm9ybURhdGEgPSBuZXcgRm9ybURhdGEoKTtcblxuICAgICAgICAgICAgdGhpcy5vbkJlZm9yZVVwbG9hZC5lbWl0KHtcbiAgICAgICAgICAgICAgICBmb3JtRGF0YTogZm9ybURhdGFcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHRoaXMuZmlsZXMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICBmb3JtRGF0YS5hcHBlbmQodGhpcy5uYW1lISwgdGhpcy5maWxlc1tpXSwgdGhpcy5maWxlc1tpXS5uYW1lKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdGhpcy5odHRwXG4gICAgICAgICAgICAgICAgLnJlcXVlc3QoPHN0cmluZz50aGlzLm1ldGhvZCwgdGhpcy51cmwgYXMgc3RyaW5nLCB7XG4gICAgICAgICAgICAgICAgICAgIGJvZHk6IGZvcm1EYXRhLFxuICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB0aGlzLmhlYWRlcnMsXG4gICAgICAgICAgICAgICAgICAgIHJlcG9ydFByb2dyZXNzOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICBvYnNlcnZlOiAnZXZlbnRzJyxcbiAgICAgICAgICAgICAgICAgICAgd2l0aENyZWRlbnRpYWxzOiB0aGlzLndpdGhDcmVkZW50aWFsc1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgLnN1YnNjcmliZShcbiAgICAgICAgICAgICAgICAgICAgKGV2ZW50OiBIdHRwRXZlbnQ8YW55PikgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChldmVudC50eXBlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBIdHRwRXZlbnRUeXBlLlNlbnQ6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMub25TZW5kLmVtaXQoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3JpZ2luYWxFdmVudDogZXZlbnQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JtRGF0YTogZm9ybURhdGFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgSHR0cEV2ZW50VHlwZS5SZXNwb25zZTpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy51cGxvYWRpbmcgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wcm9ncmVzcyA9IDA7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGV2ZW50WydzdGF0dXMnXSA+PSAyMDAgJiYgZXZlbnRbJ3N0YXR1cyddIDwgMzAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5maWxlTGltaXQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnVwbG9hZGVkRmlsZUNvdW50ICs9IHRoaXMuZmlsZXMubGVuZ3RoO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm9uVXBsb2FkLmVtaXQoeyBvcmlnaW5hbEV2ZW50OiBldmVudCwgZmlsZXM6IHRoaXMuZmlsZXMgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm9uRXJyb3IuZW1pdCh7IGZpbGVzOiB0aGlzLmZpbGVzIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudXBsb2FkZWRGaWxlcy5wdXNoKC4uLnRoaXMuZmlsZXMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmNsZWFyKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgSHR0cEV2ZW50VHlwZS5VcGxvYWRQcm9ncmVzczoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZXZlbnRbJ2xvYWRlZCddKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnByb2dyZXNzID0gTWF0aC5yb3VuZCgoZXZlbnRbJ2xvYWRlZCddICogMTAwKSAvIGV2ZW50Wyd0b3RhbCddISk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm9uUHJvZ3Jlc3MuZW1pdCh7IG9yaWdpbmFsRXZlbnQ6IGV2ZW50LCBwcm9ncmVzczogdGhpcy5wcm9ncmVzcyB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmNkLm1hcmtGb3JDaGVjaygpO1xuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAoZXJyb3I6IEVycm9yRXZlbnQpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudXBsb2FkaW5nID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm9uRXJyb3IuZW1pdCh7IGZpbGVzOiB0aGlzLmZpbGVzLCBlcnJvcjogZXJyb3IgfSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgfVxuICAgIC8qKlxuICAgICAqIENsZWFycyB0aGUgZmlsZXMgbGlzdC5cbiAgICAgKiBAZ3Jv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mZvY3VzID0gZmFsc2U7XG4gICAgfVxuXG4gICAgZm9ybWF0U2l6ZShieXRlczogbnVtYmVyKSB7XG4gICAgICAgIGNvbnN0IGsgPSAxMDI0O1xuICAgICAgICBjb25zdCBkbSA9IDM7XG4gICAgICAgIGNvbnN0IHNpemVzID0gdGhpcy5nZXRUcmFuc2xhdGlvbihUcmFuc2xhdGlvbktleXMuRklMRV9TSVpFX1RZUEVTKTtcblxuICAgICAgICBpZiAoYnl0ZXMgPT09IDApIHtcbiAgICAgICAgICAgIHJldHVybiBgMCAke3NpemVzWzBdfWA7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpID0gTWF0aC5mbG9vcihNYXRoLmxvZyhieXRlcykgLyBNYXRoLmxvZyhrKSk7XG4gICAgICAgIGNvbnN0IGZvcm1hdHRlZFNpemUgPSAoYnl0ZXMgLyBNYXRoLnBvdyhrLCBpKSkudG9GaXhlZChkbSk7XG5cbiAgICAgICAgcmV0dXJuIGAke2Zvcm1hdHRlZFNpemV9ICR7c2l6ZXNbaV19YDtcbiAgICB9XG5cbiAgICBvbkJhc2ljVXBsb2FkZXJDbGljaygpIHtcbiAgICAgICAgaWYgKHRoaXMuaGFzRmlsZXMoKSkgdGhpcy51cGxvYWQoKTtcbiAgICAgICAgZWxzZSB0aGlzLmJhc2ljRmlsZUlucHV0Py5uYXRpdmVFbGVtZW50LmNsaWNrKCk7XG4gICAgfVxuXG4gICAgb25CYXNpY0tleWRvd24oZXZlbnQ6IEtleWJvYXJkRXZlbnQpIHtcbiAgICAgICAgc3dpdGNoIChldmVudC5jb2RlKSB7XG4gICAgICAgICAgICBjYXNlICdTcGFjZSc6XG4gICAgICAgICAgICBjYXNlICdFbnRlcic6XG4gICAgICAgICAgICAgICAgdGhpcy5vbkJhc2ljVXBsb2FkZXJDbGljaygpO1xuXG4gICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxu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