source: trip-planner-front/node_modules/.cache/babel-webpack/b6ce82ba7fca045ec24b884a893d5858.json@ 571e0df

Last change on this file since 571e0df was 6fe77af, checked in by Ema <ema_spirova@…>, 3 years ago

add location feature

  • Property mode set to 100644
File size: 96.6 KB
Line 
1{"ast":null,"code":"import * as i0 from '@angular/core';\nimport { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, ContentChildren, ViewChild, NgModule } from '@angular/core';\nimport * as i7 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i4 from 'primeng/button';\nimport { ButtonModule } from 'primeng/button';\nimport * as i6 from 'primeng/messages';\nimport { MessagesModule } from 'primeng/messages';\nimport * as i5 from 'primeng/progressbar';\nimport { ProgressBarModule } from 'primeng/progressbar';\nimport { DomHandler } from 'primeng/dom';\nimport * as i3 from 'primeng/api';\nimport { TranslationKeys, PrimeTemplate, SharedModule } from 'primeng/api';\nimport * as i8 from 'primeng/ripple';\nimport { RippleModule } from 'primeng/ripple';\nimport * as i2 from '@angular/common/http';\nimport { HttpEventType } from '@angular/common/http';\nimport * as i1 from '@angular/platform-browser';\nconst _c0 = [\"advancedfileinput\"];\nconst _c1 = [\"basicfileinput\"];\nconst _c2 = [\"content\"];\n\nfunction FileUpload_div_0_p_button_8_Template(rf, ctx) {\n if (rf & 1) {\n const _r11 = i0.ɵɵgetCurrentView();\n\n i0.ɵɵelementStart(0, \"p-button\", 17);\n i0.ɵɵlistener(\"onClick\", function FileUpload_div_0_p_button_8_Template_p_button_onClick_0_listener() {\n i0.ɵɵrestoreView(_r11);\n const ctx_r10 = i0.ɵɵnextContext(2);\n return ctx_r10.upload();\n });\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const ctx_r3 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"label\", ctx_r3.uploadButtonLabel)(\"icon\", ctx_r3.uploadIcon)(\"disabled\", !ctx_r3.hasFiles() || ctx_r3.isFileLimitExceeded());\n }\n}\n\nfunction FileUpload_div_0_p_button_9_Template(rf, ctx) {\n if (rf & 1) {\n const _r13 = i0.ɵɵgetCurrentView();\n\n i0.ɵɵelementStart(0, \"p-button\", 17);\n i0.ɵɵlistener(\"onClick\", function FileUpload_div_0_p_button_9_Template_p_button_onClick_0_listener() {\n i0.ɵɵrestoreView(_r13);\n const ctx_r12 = i0.ɵɵnextContext(2);\n return ctx_r12.clear();\n });\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const ctx_r4 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"label\", ctx_r4.cancelButtonLabel)(\"icon\", ctx_r4.cancelIcon)(\"disabled\", !ctx_r4.hasFiles() || ctx_r4.uploading);\n }\n}\n\nfunction FileUpload_div_0_ng_container_10_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\n\nfunction FileUpload_div_0_p_progressBar_13_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"p-progressBar\", 18);\n }\n\n if (rf & 2) {\n const ctx_r7 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"value\", ctx_r7.progress)(\"showValue\", false);\n }\n}\n\nfunction FileUpload_div_0_div_15_div_1_div_1_img_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"img\", 26);\n }\n\n if (rf & 2) {\n const file_r17 = i0.ɵɵnextContext().$implicit;\n const ctx_r19 = i0.ɵɵnextContext(4);\n i0.ɵɵproperty(\"src\", file_r17.objectURL, i0.ɵɵsanitizeUrl)(\"width\", ctx_r19.previewWidth);\n }\n}\n\nfunction FileUpload_div_0_div_15_div_1_div_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r22 = i0.ɵɵgetCurrentView();\n\n i0.ɵɵelementStart(0, \"div\", 22);\n i0.ɵɵelementStart(1, \"div\");\n i0.ɵɵtemplate(2, FileUpload_div_0_div_15_div_1_div_1_img_2_Template, 1, 2, \"img\", 23);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(3, \"div\", 24);\n i0.ɵɵtext(4);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(5, \"div\");\n i0.ɵɵtext(6);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(7, \"div\");\n i0.ɵɵelementStart(8, \"button\", 25);\n i0.ɵɵlistener(\"click\", function FileUpload_div_0_div_15_div_1_div_1_Template_button_click_8_listener($event) {\n const restoredCtx = i0.ɵɵrestoreView(_r22);\n const i_r18 = restoredCtx.index;\n const ctx_r21 = i0.ɵɵnextContext(4);\n return ctx_r21.remove($event, i_r18);\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const file_r17 = ctx.$implicit;\n const ctx_r16 = i0.ɵɵnextContext(4);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", ctx_r16.isImage(file_r17));\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate(file_r17.name);\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate(ctx_r16.formatSize(file_r17.size));\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"disabled\", ctx_r16.uploading);\n }\n}\n\nfunction FileUpload_div_0_div_15_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\");\n i0.ɵɵtemplate(1, FileUpload_div_0_div_15_div_1_div_1_Template, 9, 4, \"div\", 21);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const ctx_r14 = i0.ɵɵnextContext(3);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngForOf\", ctx_r14.files);\n }\n}\n\nfunction FileUpload_div_0_div_15_div_2_ng_template_1_Template(rf, ctx) {}\n\nfunction FileUpload_div_0_div_15_div_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\");\n i0.ɵɵtemplate(1, FileUpload_div_0_div_15_div_2_ng_template_1_Template, 0, 0, \"ng-template\", 27);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const ctx_r15 = i0.ɵɵnextContext(3);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngForOf\", ctx_r15.files)(\"ngForTemplate\", ctx_r15.fileTemplate);\n }\n}\n\nfunction FileUpload_div_0_div_15_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 19);\n i0.ɵɵtemplate(1, FileUpload_div_0_div_15_div_1_Template, 2, 1, \"div\", 20);\n i0.ɵɵtemplate(2, FileUpload_div_0_div_15_div_2_Template, 2, 2, \"div\", 20);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const ctx_r8 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", !ctx_r8.fileTemplate);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx_r8.fileTemplate);\n }\n}\n\nfunction FileUpload_div_0_ng_container_16_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\n\nconst _c3 = function (a0, a1) {\n return {\n \"p-focus\": a0,\n \"p-disabled\": a1\n };\n};\n\nconst _c4 = function (a0) {\n return {\n $implicit: a0\n };\n};\n\nfunction FileUpload_div_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r25 = i0.ɵɵgetCurrentView();\n\n i0.ɵɵelementStart(0, \"div\", 2);\n i0.ɵɵelementStart(1, \"div\", 3);\n i0.ɵɵelementStart(2, \"span\", 4);\n i0.ɵɵlistener(\"focus\", function FileUpload_div_0_Template_span_focus_2_listener() {\n i0.ɵɵrestoreView(_r25);\n const ctx_r24 = i0.ɵɵnextContext();\n return ctx_r24.onFocus();\n })(\"blur\", function FileUpload_div_0_Template_span_blur_2_listener() {\n i0.ɵɵrestoreView(_r25);\n const ctx_r26 = i0.ɵɵnextContext();\n return ctx_r26.onBlur();\n })(\"click\", function FileUpload_div_0_Template_span_click_2_listener() {\n i0.ɵɵrestoreView(_r25);\n const ctx_r27 = i0.ɵɵnextContext();\n return ctx_r27.choose();\n })(\"keydown.enter\", function FileUpload_div_0_Template_span_keydown_enter_2_listener() {\n i0.ɵɵrestoreView(_r25);\n const ctx_r28 = i0.ɵɵnextContext();\n return ctx_r28.choose();\n });\n i0.ɵɵelementStart(3, \"input\", 5, 6);\n i0.ɵɵlistener(\"change\", function FileUpload_div_0_Template_input_change_3_listener($event) {\n i0.ɵɵrestoreView(_r25);\n const ctx_r29 = i0.ɵɵnextContext();\n return ctx_r29.onFileSelect($event);\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelement(5, \"span\", 7);\n i0.ɵɵelementStart(6, \"span\", 8);\n i0.ɵɵtext(7);\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(8, FileUpload_div_0_p_button_8_Template, 1, 3, \"p-button\", 9);\n i0.ɵɵtemplate(9, FileUpload_div_0_p_button_9_Template, 1, 3, \"p-button\", 9);\n i0.ɵɵtemplate(10, FileUpload_div_0_ng_container_10_Template, 1, 0, \"ng-container\", 10);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(11, \"div\", 11, 12);\n i0.ɵɵlistener(\"dragenter\", function FileUpload_div_0_Template_div_dragenter_11_listener($event) {\n i0.ɵɵrestoreView(_r25);\n const ctx_r30 = i0.ɵɵnextContext();\n return ctx_r30.onDragEnter($event);\n })(\"dragleave\", function FileUpload_div_0_Template_div_dragleave_11_listener($event) {\n i0.ɵɵrestoreView(_r25);\n const ctx_r31 = i0.ɵɵnextContext();\n return ctx_r31.onDragLeave($event);\n })(\"drop\", function FileUpload_div_0_Template_div_drop_11_listener($event) {\n i0.ɵɵrestoreView(_r25);\n const ctx_r32 = i0.ɵɵnextContext();\n return ctx_r32.onDrop($event);\n });\n i0.ɵɵtemplate(13, FileUpload_div_0_p_progressBar_13_Template, 1, 2, \"p-progressBar\", 13);\n i0.ɵɵelement(14, \"p-messages\", 14);\n i0.ɵɵtemplate(15, FileUpload_div_0_div_15_Template, 3, 2, \"div\", 15);\n i0.ɵɵtemplate(16, FileUpload_div_0_ng_container_16_Template, 1, 0, \"ng-container\", 16);\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵclassMap(ctx_r0.styleClass);\n i0.ɵɵproperty(\"ngClass\", \"p-fileupload p-fileupload-advanced p-component\")(\"ngStyle\", ctx_r0.style);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngClass\", i0.ɵɵpureFunction2(22, _c3, ctx_r0.focus, ctx_r0.disabled || ctx_r0.isChooseDisabled()));\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"multiple\", ctx_r0.multiple)(\"accept\", ctx_r0.accept)(\"disabled\", ctx_r0.disabled || ctx_r0.isChooseDisabled());\n i0.ɵɵattribute(\"title\", \"\");\n i0.ɵɵadvance(2);\n i0.ɵɵclassMap(ctx_r0.chooseIcon);\n i0.ɵɵproperty(\"ngClass\", \"p-button-icon p-button-icon-left\");\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate(ctx_r0.chooseButtonLabel);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", !ctx_r0.auto && ctx_r0.showUploadButton);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", !ctx_r0.auto && ctx_r0.showCancelButton);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r0.toolbarTemplate);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"ngIf\", ctx_r0.hasFiles());\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"value\", ctx_r0.msgs)(\"enableService\", false);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx_r0.hasFiles());\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r0.contentTemplate)(\"ngTemplateOutletContext\", i0.ɵɵpureFunction1(25, _c4, ctx_r0.files));\n }\n}\n\nfunction FileUpload_div_1_input_6_Template(rf, ctx) {\n if (rf & 1) {\n const _r36 = i0.ɵɵgetCurrentView();\n\n i0.ɵɵelementStart(0, \"input\", 32, 33);\n i0.ɵɵlistener(\"change\", function FileUpload_div_1_input_6_Template_input_change_0_listener($event) {\n i0.ɵɵrestoreView(_r36);\n const ctx_r35 = i0.ɵɵnextContext(2);\n return ctx_r35.onFileSelect($event);\n })(\"focus\", function FileUpload_div_1_input_6_Template_input_focus_0_listener() {\n i0.ɵɵrestoreView(_r36);\n const ctx_r37 = i0.ɵɵnextContext(2);\n return ctx_r37.onFocus();\n })(\"blur\", function FileUpload_div_1_input_6_Template_input_blur_0_listener() {\n i0.ɵɵrestoreView(_r36);\n const ctx_r38 = i0.ɵɵnextContext(2);\n return ctx_r38.onBlur();\n });\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const ctx_r33 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"accept\", ctx_r33.accept)(\"multiple\", ctx_r33.multiple)(\"disabled\", ctx_r33.disabled);\n }\n}\n\nconst _c5 = function (a1, a2, a3, a4) {\n return {\n \"p-button p-component p-fileupload-choose\": true,\n \"p-button-icon-only\": a1,\n \"p-fileupload-choose-selected\": a2,\n \"p-focus\": a3,\n \"p-disabled\": a4\n };\n};\n\nfunction FileUpload_div_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r40 = i0.ɵɵgetCurrentView();\n\n i0.ɵɵelementStart(0, \"div\", 28);\n i0.ɵɵelement(1, \"p-messages\", 14);\n i0.ɵɵelementStart(2, \"span\", 29);\n i0.ɵɵlistener(\"mouseup\", function FileUpload_div_1_Template_span_mouseup_2_listener() {\n i0.ɵɵrestoreView(_r40);\n const ctx_r39 = i0.ɵɵnextContext();\n return ctx_r39.onBasicUploaderClick();\n })(\"keydown\", function FileUpload_div_1_Template_span_keydown_2_listener() {\n i0.ɵɵrestoreView(_r40);\n const ctx_r41 = i0.ɵɵnextContext();\n return ctx_r41.onBasicUploaderClick();\n });\n i0.ɵɵelement(3, \"span\", 30);\n i0.ɵɵelementStart(4, \"span\", 8);\n i0.ɵɵtext(5);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(6, FileUpload_div_1_input_6_Template, 2, 3, \"input\", 31);\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"value\", ctx_r1.msgs)(\"enableService\", false);\n i0.ɵɵadvance(1);\n i0.ɵɵclassMap(ctx_r1.styleClass);\n i0.ɵɵproperty(\"ngClass\", i0.ɵɵpureFunction4(9, _c5, !ctx_r1.chooseLabel, ctx_r1.hasFiles(), ctx_r1.focus, ctx_r1.disabled))(\"ngStyle\", ctx_r1.style);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngClass\", ctx_r1.hasFiles() && !ctx_r1.auto ? ctx_r1.uploadIcon : ctx_r1.chooseIcon);\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate(ctx_r1.auto ? ctx_r1.chooseLabel : ctx_r1.hasFiles() ? ctx_r1.files[0].name : ctx_r1.chooseLabel);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", !ctx_r1.hasFiles());\n }\n}\n\nclass FileUpload {\n constructor(el, sanitizer, zone, http, cd, config) {\n this.el = el;\n this.sanitizer = sanitizer;\n this.zone = zone;\n this.http = http;\n this.cd = cd;\n this.config = config;\n this.method = 'post';\n this.invalidFileSizeMessageSummary = '{0}: Invalid file size, ';\n this.invalidFileSizeMessageDetail = 'maximum upload size is {0}.';\n this.invalidFileTypeMessageSummary = '{0}: Invalid file type, ';\n this.invalidFileTypeMessageDetail = 'allowed file types: {0}.';\n this.invalidFileLimitMessageDetail = 'limit is {0} at most.';\n this.invalidFileLimitMessageSummary = 'Maximum number of files exceeded, ';\n this.previewWidth = 50;\n this.chooseIcon = 'pi pi-plus';\n this.uploadIcon = 'pi pi-upload';\n this.cancelIcon = 'pi pi-times';\n this.showUploadButton = true;\n this.showCancelButton = true;\n this.mode = 'advanced';\n this.onBeforeUpload = new EventEmitter();\n this.onSend = new EventEmitter();\n this.onUpload = new EventEmitter();\n this.onError = new EventEmitter();\n this.onClear = new EventEmitter();\n this.onRemove = new EventEmitter();\n this.onSelect = new EventEmitter();\n this.onProgress = new EventEmitter();\n this.uploadHandler = new EventEmitter();\n this._files = [];\n this.progress = 0;\n this.uploadedFileCount = 0;\n }\n\n set files(files) {\n this._files = [];\n\n for (let i = 0; i < files.length; i++) {\n let file = files[i];\n\n if (this.validate(file)) {\n if (this.isImage(file)) {\n file.objectURL = this.sanitizer.bypassSecurityTrustUrl(window.URL.createObjectURL(files[i]));\n }\n\n this._files.push(files[i]);\n }\n }\n }\n\n get files() {\n return this._files;\n }\n\n ngAfterContentInit() {\n this.templates.forEach(item => {\n switch (item.getType()) {\n case 'file':\n this.fileTemplate = item.template;\n break;\n\n case 'content':\n this.contentTemplate = item.template;\n break;\n\n case 'toolbar':\n this.toolbarTemplate = item.template;\n break;\n\n default:\n this.fileTemplate = item.template;\n break;\n }\n });\n }\n\n ngOnInit() {\n this.translationSubscription = this.config.translationObserver.subscribe(() => {\n this.cd.markForCheck();\n });\n }\n\n ngAfterViewInit() {\n if (this.mode === 'advanced') {\n this.zone.runOutsideAngular(() => {\n if (this.content) this.content.nativeElement.addEventListener('dragover', this.onDragOver.bind(this));\n });\n }\n }\n\n choose() {\n this.advancedFileInput.nativeElement.click();\n }\n\n onFileSelect(event) {\n if (event.type !== 'drop' && this.isIE11() && this.duplicateIEEvent) {\n this.duplicateIEEvent = false;\n return;\n }\n\n this.msgs = [];\n\n if (!this.multiple) {\n this.files = [];\n }\n\n let files = event.dataTransfer ? event.dataTransfer.files : event.target.files;\n\n for (let i = 0; i < files.length; i++) {\n let file = files[i];\n\n if (!this.isFileSelected(file)) {\n if (this.validate(file)) {\n if (this.isImage(file)) {\n file.objectURL = this.sanitizer.bypassSecurityTrustUrl(window.URL.createObjectURL(files[i]));\n }\n\n this.files.push(files[i]);\n }\n }\n }\n\n this.onSelect.emit({\n originalEvent: event,\n files: files,\n currentFiles: this.files\n });\n\n if (this.fileLimit && this.mode == \"advanced\") {\n this.checkFileLimit();\n }\n\n if (this.hasFiles() && this.auto && (!(this.mode === \"advanced\") || !this.isFileLimitExceeded())) {\n this.upload();\n }\n\n if (event.type !== 'drop' && this.isIE11()) {\n this.clearIEInput();\n } else {\n this.clearInputElement();\n }\n }\n\n isFileSelected(file) {\n for (let sFile of this.files) {\n if (sFile.name + sFile.type + sFile.size === file.name + file.type + file.size) {\n return true;\n }\n }\n\n return false;\n }\n\n isIE11() {\n return !!window['MSInputMethodContext'] && !!document['documentMode'];\n }\n\n validate(file) {\n if (this.accept && !this.isFileTypeValid(file)) {\n this.msgs.push({\n severity: 'error',\n summary: this.invalidFileTypeMessageSummary.replace('{0}', file.name),\n detail: this.invalidFileTypeMessageDetail.replace('{0}', this.accept)\n });\n return false;\n }\n\n if (this.maxFileSize && file.size > this.maxFileSize) {\n this.msgs.push({\n severity: 'error',\n summary: this.invalidFileSizeMessageSummary.replace('{0}', file.name),\n detail: this.invalidFileSizeMessageDetail.replace('{0}', this.formatSize(this.maxFileSize))\n });\n return false;\n }\n\n return true;\n }\n\n isFileTypeValid(file) {\n let acceptableTypes = this.accept.split(',').map(type => type.trim());\n\n for (let type of acceptableTypes) {\n let acceptable = this.isWildcard(type) ? this.getTypeClass(file.type) === this.getTypeClass(type) : file.type == type || this.getFileExtension(file).toLowerCase() === type.toLowerCase();\n\n if (acceptable) {\n return true;\n }\n }\n\n return false;\n }\n\n getTypeClass(fileType) {\n return fileType.substring(0, fileType.indexOf('/'));\n }\n\n isWildcard(fileType) {\n return fileType.indexOf('*') !== -1;\n }\n\n getFileExtension(file) {\n return '.' + file.name.split('.').pop();\n }\n\n isImage(file) {\n return /^image\\//.test(file.type);\n }\n\n onImageLoad(img) {\n window.URL.revokeObjectURL(img.src);\n }\n\n upload() {\n if (this.customUpload) {\n if (this.fileLimit) {\n this.uploadedFileCount += this.files.length;\n }\n\n this.uploadHandler.emit({\n files: this.files\n });\n this.cd.markForCheck();\n } else {\n this.uploading = true;\n this.msgs = [];\n let formData = new FormData();\n this.onBeforeUpload.emit({\n 'formData': formData\n });\n\n for (let i = 0; i < this.files.length; i++) {\n formData.append(this.name, this.files[i], this.files[i].name);\n }\n\n this.http[this.method](this.url, formData, {\n headers: this.headers,\n reportProgress: true,\n observe: 'events',\n withCredentials: this.withCredentials\n }).subscribe(event => {\n switch (event.type) {\n case HttpEventType.Sent:\n this.onSend.emit({\n originalEvent: event,\n 'formData': formData\n });\n break;\n\n case HttpEventType.Response:\n this.uploading = false;\n this.progress = 0;\n\n if (event['status'] >= 200 && event['status'] < 300) {\n if (this.fileLimit) {\n this.uploadedFileCount += this.files.length;\n }\n\n this.onUpload.emit({\n originalEvent: event,\n files: this.files\n });\n } else {\n this.onError.emit({\n files: this.files\n });\n }\n\n this.clear();\n break;\n\n case HttpEventType.UploadProgress:\n {\n if (event['loaded']) {\n this.progress = Math.round(event['loaded'] * 100 / event['total']);\n }\n\n this.onProgress.emit({\n originalEvent: event,\n progress: this.progress\n });\n break;\n }\n }\n\n this.cd.markForCheck();\n }, error => {\n this.uploading = false;\n this.onError.emit({\n files: this.files,\n error: error\n });\n });\n }\n }\n\n clear() {\n this.files = [];\n this.onClear.emit();\n this.clearInputElement();\n this.cd.markForCheck();\n }\n\n remove(event, index) {\n this.clearInputElement();\n this.onRemove.emit({\n originalEvent: event,\n file: this.files[index]\n });\n this.files.splice(index, 1);\n }\n\n isFileLimitExceeded() {\n if (this.fileLimit && this.fileLimit <= this.files.length + this.uploadedFileCount && this.focus) {\n this.focus = false;\n }\n\n return this.fileLimit && this.fileLimit < this.files.length + this.uploadedFileCount;\n }\n\n isChooseDisabled() {\n return this.fileLimit && this.fileLimit <= this.files.length + this.uploadedFileCount;\n }\n\n checkFileLimit() {\n if (this.isFileLimitExceeded()) {\n this.msgs.push({\n severity: 'error',\n summary: this.invalidFileLimitMessageSummary.replace('{0}', this.fileLimit.toString()),\n detail: this.invalidFileLimitMessageDetail.replace('{0}', this.fileLimit.toString())\n });\n }\n }\n\n clearInputElement() {\n if (this.advancedFileInput && this.advancedFileInput.nativeElement) {\n this.advancedFileInput.nativeElement.value = '';\n }\n\n if (this.basicFileInput && this.basicFileInput.nativeElement) {\n this.basicFileInput.nativeElement.value = '';\n }\n }\n\n clearIEInput() {\n if (this.advancedFileInput && this.advancedFileInput.nativeElement) {\n this.duplicateIEEvent = true; //IE11 fix to prevent onFileChange trigger again\n\n this.advancedFileInput.nativeElement.value = '';\n }\n }\n\n hasFiles() {\n return this.files && this.files.length > 0;\n }\n\n onDragEnter(e) {\n if (!this.disabled) {\n e.stopPropagation();\n e.preventDefault();\n }\n }\n\n onDragOver(e) {\n if (!this.disabled) {\n DomHandler.addClass(this.content.nativeElement, 'p-fileupload-highlight');\n this.dragHighlight = true;\n e.stopPropagation();\n e.preventDefault();\n }\n }\n\n onDragLeave(event) {\n if (!this.disabled) {\n DomHandler.removeClass(this.content.nativeElement, 'p-fileupload-highlight');\n }\n }\n\n onDrop(event) {\n if (!this.disabled) {\n DomHandler.removeClass(this.content.nativeElement, 'p-fileupload-highlight');\n event.stopPropagation();\n event.preventDefault();\n let files = event.dataTransfer ? event.dataTransfer.files : event.target.files;\n let allowDrop = this.multiple || files && files.length === 1;\n\n if (allowDrop) {\n this.onFileSelect(event);\n }\n }\n }\n\n onFocus() {\n this.focus = true;\n }\n\n onBlur() {\n this.focus = false;\n }\n\n formatSize(bytes) {\n if (bytes == 0) {\n return '0 B';\n }\n\n let k = 1000,\n dm = 3,\n sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],\n i = Math.floor(Math.log(bytes) / Math.log(k));\n return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];\n }\n\n onBasicUploaderClick() {\n if (this.hasFiles()) this.upload();else this.basicFileInput.nativeElement.click();\n }\n\n getBlockableElement() {\n return this.el.nativeElement.children[0];\n }\n\n get chooseButtonLabel() {\n return this.chooseLabel || this.config.getTranslation(TranslationKeys.CHOOSE);\n }\n\n get uploadButtonLabel() {\n return this.uploadLabel || this.config.getTranslation(TranslationKeys.UPLOAD);\n }\n\n get cancelButtonLabel() {\n return this.cancelLabel || this.config.getTranslation(TranslationKeys.CANCEL);\n }\n\n ngOnDestroy() {\n if (this.content && this.content.nativeElement) {\n this.content.nativeElement.removeEventListener('dragover', this.onDragOver);\n }\n\n if (this.translationSubscription) {\n this.translationSubscription.unsubscribe();\n }\n }\n\n}\n\nFileUpload.ɵfac = function FileUpload_Factory(t) {\n return new (t || FileUpload)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.DomSanitizer), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i2.HttpClient), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i3.PrimeNGConfig));\n};\n\nFileUpload.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: FileUpload,\n selectors: [[\"p-fileUpload\"]],\n contentQueries: function FileUpload_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, PrimeTemplate, 4);\n }\n\n if (rf & 2) {\n let _t;\n\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.templates = _t);\n }\n },\n viewQuery: function FileUpload_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c0, 5);\n i0.ɵɵviewQuery(_c1, 5);\n i0.ɵɵviewQuery(_c2, 5);\n }\n\n if (rf & 2) {\n let _t;\n\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.advancedFileInput = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.basicFileInput = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.content = _t.first);\n }\n },\n hostAttrs: [1, \"p-element\"],\n inputs: {\n name: \"name\",\n url: \"url\",\n method: \"method\",\n multiple: \"multiple\",\n accept: \"accept\",\n disabled: \"disabled\",\n auto: \"auto\",\n withCredentials: \"withCredentials\",\n maxFileSize: \"maxFileSize\",\n invalidFileSizeMessageSummary: \"invalidFileSizeMessageSummary\",\n invalidFileSizeMessageDetail: \"invalidFileSizeMessageDetail\",\n invalidFileTypeMessageSummary: \"invalidFileTypeMessageSummary\",\n invalidFileTypeMessageDetail: \"invalidFileTypeMessageDetail\",\n invalidFileLimitMessageDetail: \"invalidFileLimitMessageDetail\",\n invalidFileLimitMessageSummary: \"invalidFileLimitMessageSummary\",\n style: \"style\",\n styleClass: \"styleClass\",\n previewWidth: \"previewWidth\",\n chooseLabel: \"chooseLabel\",\n uploadLabel: \"uploadLabel\",\n cancelLabel: \"cancelLabel\",\n chooseIcon: \"chooseIcon\",\n uploadIcon: \"uploadIcon\",\n cancelIcon: \"cancelIcon\",\n showUploadButton: \"showUploadButton\",\n showCancelButton: \"showCancelButton\",\n mode: \"mode\",\n headers: \"headers\",\n customUpload: \"customUpload\",\n fileLimit: \"fileLimit\",\n files: \"files\"\n },\n outputs: {\n onBeforeUpload: \"onBeforeUpload\",\n onSend: \"onSend\",\n onUpload: \"onUpload\",\n onError: \"onError\",\n onClear: \"onClear\",\n onRemove: \"onRemove\",\n onSelect: \"onSelect\",\n onProgress: \"onProgress\",\n uploadHandler: \"uploadHandler\"\n },\n decls: 2,\n vars: 2,\n consts: [[3, \"ngClass\", \"ngStyle\", \"class\", 4, \"ngIf\"], [\"class\", \"p-fileupload p-fileupload-basic p-component\", 4, \"ngIf\"], [3, \"ngClass\", \"ngStyle\"], [1, \"p-fileupload-buttonbar\"], [\"pRipple\", \"\", \"tabindex\", \"0\", 1, \"p-button\", \"p-component\", \"p-fileupload-choose\", 3, \"ngClass\", \"focus\", \"blur\", \"click\", \"keydown.enter\"], [\"type\", \"file\", 3, \"multiple\", \"accept\", \"disabled\", \"change\"], [\"advancedfileinput\", \"\"], [3, \"ngClass\"], [1, \"p-button-label\"], [\"type\", \"button\", 3, \"label\", \"icon\", \"disabled\", \"onClick\", 4, \"ngIf\"], [4, \"ngTemplateOutlet\"], [1, \"p-fileupload-content\", 3, \"dragenter\", \"dragleave\", \"drop\"], [\"content\", \"\"], [3, \"value\", \"showValue\", 4, \"ngIf\"], [3, \"value\", \"enableService\"], [\"class\", \"p-fileupload-files\", 4, \"ngIf\"], [4, \"ngTemplateOutlet\", \"ngTemplateOutletContext\"], [\"type\", \"button\", 3, \"label\", \"icon\", \"disabled\", \"onClick\"], [3, \"value\", \"showValue\"], [1, \"p-fileupload-files\"], [4, \"ngIf\"], [\"class\", \"p-fileupload-row\", 4, \"ngFor\", \"ngForOf\"], [1, \"p-fileupload-row\"], [3, \"src\", \"width\", 4, \"ngIf\"], [1, \"p-fileupload-filename\"], [\"type\", \"button\", \"icon\", \"pi pi-times\", \"pButton\", \"\", 3, \"disabled\", \"click\"], [3, \"src\", \"width\"], [\"ngFor\", \"\", 3, \"ngForOf\", \"ngForTemplate\"], [1, \"p-fileupload\", \"p-fileupload-basic\", \"p-component\"], [\"tabindex\", \"0\", \"pRipple\", \"\", 3, \"ngClass\", \"ngStyle\", \"mouseup\", \"keydown\"], [1, \"p-button-icon\", \"p-button-icon-left\", \"pi\", 3, \"ngClass\"], [\"type\", \"file\", 3, \"accept\", \"multiple\", \"disabled\", \"change\", \"focus\", \"blur\", 4, \"ngIf\"], [\"type\", \"file\", 3, \"accept\", \"multiple\", \"disabled\", \"change\", \"focus\", \"blur\"], [\"basicfileinput\", \"\"]],\n template: function FileUpload_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, FileUpload_div_0_Template, 17, 27, \"div\", 0);\n i0.ɵɵtemplate(1, FileUpload_div_1_Template, 7, 14, \"div\", 1);\n }\n\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", ctx.mode === \"advanced\");\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx.mode === \"basic\");\n }\n },\n directives: [i7.NgIf, i7.NgClass, i7.NgStyle, i8.Ripple, i7.NgTemplateOutlet, i6.Messages, i4.Button, i5.ProgressBar, i7.NgForOf, i4.ButtonDirective],\n styles: [\".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\"],\n encapsulation: 2,\n changeDetection: 0\n});\n\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(FileUpload, [{\n type: Component,\n args: [{\n selector: 'p-fileUpload',\n template: `\n <div [ngClass]=\"'p-fileupload p-fileupload-advanced p-component'\" [ngStyle]=\"style\" [class]=\"styleClass\" *ngIf=\"mode === 'advanced'\">\n <div class=\"p-fileupload-buttonbar\">\n <span class=\"p-button p-component p-fileupload-choose\" [ngClass]=\"{'p-focus': focus, 'p-disabled':disabled || isChooseDisabled()}\" (focus)=\"onFocus()\" (blur)=\"onBlur()\" pRipple\n (click)=\"choose()\" (keydown.enter)=\"choose()\" tabindex=\"0\">\n <input #advancedfileinput type=\"file\" (change)=\"onFileSelect($event)\" [multiple]=\"multiple\" [accept]=\"accept\" [disabled]=\"disabled || isChooseDisabled()\" [attr.title]=\"''\">\n <span [ngClass]=\"'p-button-icon p-button-icon-left'\" [class]=\"chooseIcon\"></span>\n <span class=\"p-button-label\">{{chooseButtonLabel}}</span>\n </span>\n\n <p-button *ngIf=\"!auto&&showUploadButton\" type=\"button\" [label]=\"uploadButtonLabel\" [icon]=\"uploadIcon\" (onClick)=\"upload()\" [disabled]=\"!hasFiles() || isFileLimitExceeded()\"></p-button>\n <p-button *ngIf=\"!auto&&showCancelButton\" type=\"button\" [label]=\"cancelButtonLabel\" [icon]=\"cancelIcon\" (onClick)=\"clear()\" [disabled]=\"!hasFiles() || uploading\"></p-button>\n\n <ng-container *ngTemplateOutlet=\"toolbarTemplate\"></ng-container>\n </div>\n <div #content class=\"p-fileupload-content\" (dragenter)=\"onDragEnter($event)\" (dragleave)=\"onDragLeave($event)\" (drop)=\"onDrop($event)\">\n <p-progressBar [value]=\"progress\" [showValue]=\"false\" *ngIf=\"hasFiles()\"></p-progressBar>\n\n <p-messages [value]=\"msgs\" [enableService]=\"false\"></p-messages>\n\n <div class=\"p-fileupload-files\" *ngIf=\"hasFiles()\">\n <div *ngIf=\"!fileTemplate\">\n <div class=\"p-fileupload-row\" *ngFor=\"let file of files; let i = index;\">\n <div><img [src]=\"file.objectURL\" *ngIf=\"isImage(file)\" [width]=\"previewWidth\" /></div>\n <div class=\"p-fileupload-filename\">{{file.name}}</div>\n <div>{{formatSize(file.size)}}</div>\n <div>\n <button type=\"button\" icon=\"pi pi-times\" pButton (click)=\"remove($event,i)\" [disabled]=\"uploading\"></button>\n </div>\n </div>\n </div>\n <div *ngIf=\"fileTemplate\">\n <ng-template ngFor [ngForOf]=\"files\" [ngForTemplate]=\"fileTemplate\"></ng-template>\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"contentTemplate; context: {$implicit: files}\"></ng-container>\n </div>\n </div>\n <div class=\"p-fileupload p-fileupload-basic p-component\" *ngIf=\"mode === 'basic'\">\n <p-messages [value]=\"msgs\" [enableService]=\"false\"></p-messages>\n <span [ngClass]=\"{'p-button p-component p-fileupload-choose': true, 'p-button-icon-only': !chooseLabel, 'p-fileupload-choose-selected': hasFiles(),'p-focus': focus, 'p-disabled':disabled}\"\n [ngStyle]=\"style\" [class]=\"styleClass\" (mouseup)=\"onBasicUploaderClick()\" (keydown)=\"onBasicUploaderClick()\" tabindex=\"0\" pRipple>\n <span class=\"p-button-icon p-button-icon-left pi\" [ngClass]=\"hasFiles()&&!auto ? uploadIcon : chooseIcon\"></span>\n <span class=\"p-button-label\">{{auto ? chooseLabel : hasFiles() ? files[0].name : chooseLabel}}</span>\n <input #basicfileinput type=\"file\" [accept]=\"accept\" [multiple]=\"multiple\" [disabled]=\"disabled\"\n (change)=\"onFileSelect($event)\" *ngIf=\"!hasFiles()\" (focus)=\"onFocus()\" (blur)=\"onBlur()\">\n </span>\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'class': 'p-element'\n },\n styles: [\".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\"]\n }]\n }], function () {\n return [{\n type: i0.ElementRef\n }, {\n type: i1.DomSanitizer\n }, {\n type: i0.NgZone\n }, {\n type: i2.HttpClient\n }, {\n type: i0.ChangeDetectorRef\n }, {\n type: i3.PrimeNGConfig\n }];\n }, {\n name: [{\n type: Input\n }],\n url: [{\n type: Input\n }],\n method: [{\n type: Input\n }],\n multiple: [{\n type: Input\n }],\n accept: [{\n type: Input\n }],\n disabled: [{\n type: Input\n }],\n auto: [{\n type: Input\n }],\n withCredentials: [{\n type: Input\n }],\n maxFileSize: [{\n type: Input\n }],\n invalidFileSizeMessageSummary: [{\n type: Input\n }],\n invalidFileSizeMessageDetail: [{\n type: Input\n }],\n invalidFileTypeMessageSummary: [{\n type: Input\n }],\n invalidFileTypeMessageDetail: [{\n type: Input\n }],\n invalidFileLimitMessageDetail: [{\n type: Input\n }],\n invalidFileLimitMessageSummary: [{\n type: Input\n }],\n style: [{\n type: Input\n }],\n styleClass: [{\n type: Input\n }],\n previewWidth: [{\n type: Input\n }],\n chooseLabel: [{\n type: Input\n }],\n uploadLabel: [{\n type: Input\n }],\n cancelLabel: [{\n type: Input\n }],\n chooseIcon: [{\n type: Input\n }],\n uploadIcon: [{\n type: Input\n }],\n cancelIcon: [{\n type: Input\n }],\n showUploadButton: [{\n type: Input\n }],\n showCancelButton: [{\n type: Input\n }],\n mode: [{\n type: Input\n }],\n headers: [{\n type: Input\n }],\n customUpload: [{\n type: Input\n }],\n fileLimit: [{\n type: Input\n }],\n onBeforeUpload: [{\n type: Output\n }],\n onSend: [{\n type: Output\n }],\n onUpload: [{\n type: Output\n }],\n onError: [{\n type: Output\n }],\n onClear: [{\n type: Output\n }],\n onRemove: [{\n type: Output\n }],\n onSelect: [{\n type: Output\n }],\n onProgress: [{\n type: Output\n }],\n uploadHandler: [{\n type: Output\n }],\n templates: [{\n type: ContentChildren,\n args: [PrimeTemplate]\n }],\n advancedFileInput: [{\n type: ViewChild,\n args: ['advancedfileinput']\n }],\n basicFileInput: [{\n type: ViewChild,\n args: ['basicfileinput']\n }],\n content: [{\n type: ViewChild,\n args: ['content']\n }],\n files: [{\n type: Input\n }]\n });\n})();\n\nclass FileUploadModule {}\n\nFileUploadModule.ɵfac = function FileUploadModule_Factory(t) {\n return new (t || FileUploadModule)();\n};\n\nFileUploadModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: FileUploadModule\n});\nFileUploadModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, SharedModule, ButtonModule, ProgressBarModule, MessagesModule, RippleModule], SharedModule, ButtonModule, ProgressBarModule, MessagesModule]\n});\n\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(FileUploadModule, [{\n type: NgModule,\n args: [{\n imports: [CommonModule, SharedModule, ButtonModule, ProgressBarModule, MessagesModule, RippleModule],\n exports: [FileUpload, SharedModule, ButtonModule, ProgressBarModule, MessagesModule],\n declarations: [FileUpload]\n }]\n }], null, null);\n})();\n/**\n * Generated bundle index. Do not edit.\n */\n\n\nexport { FileUpload, FileUploadModule };","map":{"version":3,"sources":["C:/Users/DELL/Desktop/bachelor-thesis/trip-planner-front/node_modules/primeng/fesm2015/primeng-fileupload.mjs"],"names":["i0","EventEmitter","Component","ChangeDetectionStrategy","ViewEncapsulation","Input","Output","ContentChildren","ViewChild","NgModule","i7","CommonModule","i4","ButtonModule","i6","MessagesModule","i5","ProgressBarModule","DomHandler","i3","TranslationKeys","PrimeTemplate","SharedModule","i8","RippleModule","i2","HttpEventType","i1","FileUpload","constructor","el","sanitizer","zone","http","cd","config","method","invalidFileSizeMessageSummary","invalidFileSizeMessageDetail","invalidFileTypeMessageSummary","invalidFileTypeMessageDetail","invalidFileLimitMessageDetail","invalidFileLimitMessageSummary","previewWidth","chooseIcon","uploadIcon","cancelIcon","showUploadButton","showCancelButton","mode","onBeforeUpload","onSend","onUpload","onError","onClear","onRemove","onSelect","onProgress","uploadHandler","_files","progress","uploadedFileCount","files","i","length","file","validate","isImage","objectURL","bypassSecurityTrustUrl","window","URL","createObjectURL","push","ngAfterContentInit","templates","forEach","item","getType","fileTemplate","template","contentTemplate","toolbarTemplate","ngOnInit","translationSubscription","translationObserver","subscribe","markForCheck","ngAfterViewInit","runOutsideAngular","content","nativeElement","addEventListener","onDragOver","bind","choose","advancedFileInput","click","onFileSelect","event","type","isIE11","duplicateIEEvent","msgs","multiple","dataTransfer","target","isFileSelected","emit","originalEvent","currentFiles","fileLimit","checkFileLimit","hasFiles","auto","isFileLimitExceeded","upload","clearIEInput","clearInputElement","sFile","name","size","document","accept","isFileTypeValid","severity","summary","replace","detail","maxFileSize","formatSize","acceptableTypes","split","map","trim","acceptable","isWildcard","getTypeClass","getFileExtension","toLowerCase","fileType","substring","indexOf","pop","test","onImageLoad","img","revokeObjectURL","src","customUpload","uploading","formData","FormData","append","url","headers","reportProgress","observe","withCredentials","Sent","Response","clear","UploadProgress","Math","round","error","remove","index","splice","focus","isChooseDisabled","toString","value","basicFileInput","onDragEnter","e","disabled","stopPropagation","preventDefault","addClass","dragHighlight","onDragLeave","removeClass","onDrop","allowDrop","onFocus","onBlur","bytes","k","dm","sizes","floor","log","parseFloat","pow","toFixed","onBasicUploaderClick","getBlockableElement","children","chooseButtonLabel","chooseLabel","getTranslation","CHOOSE","uploadButtonLabel","uploadLabel","UPLOAD","cancelButtonLabel","cancelLabel","CANCEL","ngOnDestroy","removeEventListener","unsubscribe","ɵfac","ElementRef","DomSanitizer","NgZone","HttpClient","ChangeDetectorRef","PrimeNGConfig","ɵcmp","NgIf","NgClass","NgStyle","Ripple","NgTemplateOutlet","Messages","Button","ProgressBar","NgForOf","ButtonDirective","args","selector","changeDetection","OnPush","encapsulation","None","host","styles","style","styleClass","FileUploadModule","ɵmod","ɵinj","imports","exports","declarations"],"mappings":"AAAA,OAAO,KAAKA,EAAZ,MAAoB,eAApB;AACA,SAASC,YAAT,EAAuBC,SAAvB,EAAkCC,uBAAlC,EAA2DC,iBAA3D,EAA8EC,KAA9E,EAAqFC,MAArF,EAA6FC,eAA7F,EAA8GC,SAA9G,EAAyHC,QAAzH,QAAyI,eAAzI;AACA,OAAO,KAAKC,EAAZ,MAAoB,iBAApB;AACA,SAASC,YAAT,QAA6B,iBAA7B;AACA,OAAO,KAAKC,EAAZ,MAAoB,gBAApB;AACA,SAASC,YAAT,QAA6B,gBAA7B;AACA,OAAO,KAAKC,EAAZ,MAAoB,kBAApB;AACA,SAASC,cAAT,QAA+B,kBAA/B;AACA,OAAO,KAAKC,EAAZ,MAAoB,qBAApB;AACA,SAASC,iBAAT,QAAkC,qBAAlC;AACA,SAASC,UAAT,QAA2B,aAA3B;AACA,OAAO,KAAKC,EAAZ,MAAoB,aAApB;AACA,SAASC,eAAT,EAA0BC,aAA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","sourcesContent":["import * as i0 from '@angular/core';\nimport { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, ContentChildren, ViewChild, NgModule } from '@angular/core';\nimport * as i7 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i4 from 'primeng/button';\nimport { ButtonModule } from 'primeng/button';\nimport * as i6 from 'primeng/messages';\nimport { MessagesModule } from 'primeng/messages';\nimport * as i5 from 'primeng/progressbar';\nimport { ProgressBarModule } from 'primeng/progressbar';\nimport { DomHandler } from 'primeng/dom';\nimport * as i3 from 'primeng/api';\nimport { TranslationKeys, PrimeTemplate, SharedModule } from 'primeng/api';\nimport * as i8 from 'primeng/ripple';\nimport { RippleModule } from 'primeng/ripple';\nimport * as i2 from '@angular/common/http';\nimport { HttpEventType } from '@angular/common/http';\nimport * as i1 from '@angular/platform-browser';\n\nclass FileUpload {\n constructor(el, sanitizer, zone, http, cd, config) {\n this.el = el;\n this.sanitizer = sanitizer;\n this.zone = zone;\n this.http = http;\n this.cd = cd;\n this.config = config;\n this.method = 'post';\n this.invalidFileSizeMessageSummary = '{0}: Invalid file size, ';\n this.invalidFileSizeMessageDetail = 'maximum upload size is {0}.';\n this.invalidFileTypeMessageSummary = '{0}: Invalid file type, ';\n this.invalidFileTypeMessageDetail = 'allowed file types: {0}.';\n this.invalidFileLimitMessageDetail = 'limit is {0} at most.';\n this.invalidFileLimitMessageSummary = 'Maximum number of files exceeded, ';\n this.previewWidth = 50;\n this.chooseIcon = 'pi pi-plus';\n this.uploadIcon = 'pi pi-upload';\n this.cancelIcon = 'pi pi-times';\n this.showUploadButton = true;\n this.showCancelButton = true;\n this.mode = 'advanced';\n this.onBeforeUpload = new EventEmitter();\n this.onSend = new EventEmitter();\n this.onUpload = new EventEmitter();\n this.onError = new EventEmitter();\n this.onClear = new EventEmitter();\n this.onRemove = new EventEmitter();\n this.onSelect = new EventEmitter();\n this.onProgress = new EventEmitter();\n this.uploadHandler = new EventEmitter();\n this._files = [];\n this.progress = 0;\n this.uploadedFileCount = 0;\n }\n set files(files) {\n this._files = [];\n for (let i = 0; i < files.length; i++) {\n let file = files[i];\n if (this.validate(file)) {\n if (this.isImage(file)) {\n file.objectURL = this.sanitizer.bypassSecurityTrustUrl((window.URL.createObjectURL(files[i])));\n }\n this._files.push(files[i]);\n }\n }\n }\n get files() {\n return this._files;\n }\n ngAfterContentInit() {\n this.templates.forEach((item) => {\n switch (item.getType()) {\n case 'file':\n this.fileTemplate = item.template;\n break;\n case 'content':\n this.contentTemplate = item.template;\n break;\n case 'toolbar':\n this.toolbarTemplate = item.template;\n break;\n default:\n this.fileTemplate = item.template;\n break;\n }\n });\n }\n ngOnInit() {\n this.translationSubscription = this.config.translationObserver.subscribe(() => {\n this.cd.markForCheck();\n });\n }\n ngAfterViewInit() {\n if (this.mode === 'advanced') {\n this.zone.runOutsideAngular(() => {\n if (this.content)\n this.content.nativeElement.addEventListener('dragover', this.onDragOver.bind(this));\n });\n }\n }\n choose() {\n this.advancedFileInput.nativeElement.click();\n }\n onFileSelect(event) {\n if (event.type !== 'drop' && this.isIE11() && this.duplicateIEEvent) {\n this.duplicateIEEvent = false;\n return;\n }\n this.msgs = [];\n if (!this.multiple) {\n this.files = [];\n }\n let files = event.dataTransfer ? event.dataTransfer.files : event.target.files;\n for (let i = 0; i < files.length; i++) {\n let file = files[i];\n if (!this.isFileSelected(file)) {\n if (this.validate(file)) {\n if (this.isImage(file)) {\n file.objectURL = this.sanitizer.bypassSecurityTrustUrl((window.URL.createObjectURL(files[i])));\n }\n this.files.push(files[i]);\n }\n }\n }\n this.onSelect.emit({ originalEvent: event, files: files, currentFiles: this.files });\n if (this.fileLimit && this.mode == \"advanced\") {\n this.checkFileLimit();\n }\n if (this.hasFiles() && this.auto && (!(this.mode === \"advanced\") || !this.isFileLimitExceeded())) {\n this.upload();\n }\n if (event.type !== 'drop' && this.isIE11()) {\n this.clearIEInput();\n }\n else {\n this.clearInputElement();\n }\n }\n isFileSelected(file) {\n for (let sFile of this.files) {\n if ((sFile.name + sFile.type + sFile.size) === (file.name + file.type + file.size)) {\n return true;\n }\n }\n return false;\n }\n isIE11() {\n return !!window['MSInputMethodContext'] && !!document['documentMode'];\n }\n validate(file) {\n if (this.accept && !this.isFileTypeValid(file)) {\n this.msgs.push({\n severity: 'error',\n summary: this.invalidFileTypeMessageSummary.replace('{0}', file.name),\n detail: this.invalidFileTypeMessageDetail.replace('{0}', this.accept)\n });\n return false;\n }\n if (this.maxFileSize && file.size > this.maxFileSize) {\n this.msgs.push({\n severity: 'error',\n summary: this.invalidFileSizeMessageSummary.replace('{0}', file.name),\n detail: this.invalidFileSizeMessageDetail.replace('{0}', this.formatSize(this.maxFileSize))\n });\n return false;\n }\n return true;\n }\n isFileTypeValid(file) {\n let acceptableTypes = this.accept.split(',').map(type => type.trim());\n for (let type of acceptableTypes) {\n let acceptable = this.isWildcard(type) ? this.getTypeClass(file.type) === this.getTypeClass(type)\n : file.type == type || this.getFileExtension(file).toLowerCase() === type.toLowerCase();\n if (acceptable) {\n return true;\n }\n }\n return false;\n }\n getTypeClass(fileType) {\n return fileType.substring(0, fileType.indexOf('/'));\n }\n isWildcard(fileType) {\n return fileType.indexOf('*') !== -1;\n }\n getFileExtension(file) {\n return '.' + file.name.split('.').pop();\n }\n isImage(file) {\n return /^image\\//.test(file.type);\n }\n onImageLoad(img) {\n window.URL.revokeObjectURL(img.src);\n }\n upload() {\n if (this.customUpload) {\n if (this.fileLimit) {\n this.uploadedFileCount += this.files.length;\n }\n this.uploadHandler.emit({\n files: this.files\n });\n this.cd.markForCheck();\n }\n else {\n this.uploading = true;\n this.msgs = [];\n let formData = new FormData();\n this.onBeforeUpload.emit({\n 'formData': formData\n });\n for (let i = 0; i < this.files.length; i++) {\n formData.append(this.name, this.files[i], this.files[i].name);\n }\n this.http[this.method](this.url, formData, {\n headers: this.headers, reportProgress: true, observe: 'events', withCredentials: this.withCredentials\n }).subscribe((event) => {\n switch (event.type) {\n case HttpEventType.Sent:\n this.onSend.emit({\n originalEvent: event,\n 'formData': formData\n });\n break;\n case HttpEventType.Response:\n this.uploading = false;\n this.progress = 0;\n if (event['status'] >= 200 && event['status'] < 300) {\n if (this.fileLimit) {\n this.uploadedFileCount += this.files.length;\n }\n this.onUpload.emit({ originalEvent: event, files: this.files });\n }\n else {\n this.onError.emit({ files: this.files });\n }\n this.clear();\n break;\n case HttpEventType.UploadProgress: {\n if (event['loaded']) {\n this.progress = Math.round((event['loaded'] * 100) / event['total']);\n }\n this.onProgress.emit({ originalEvent: event, progress: this.progress });\n break;\n }\n }\n this.cd.markForCheck();\n }, error => {\n this.uploading = false;\n this.onError.emit({ files: this.files, error: error });\n });\n }\n }\n clear() {\n this.files = [];\n this.onClear.emit();\n this.clearInputElement();\n this.cd.markForCheck();\n }\n remove(event, index) {\n this.clearInputElement();\n this.onRemove.emit({ originalEvent: event, file: this.files[index] });\n this.files.splice(index, 1);\n }\n isFileLimitExceeded() {\n if (this.fileLimit && this.fileLimit <= this.files.length + this.uploadedFileCount && this.focus) {\n this.focus = false;\n }\n return this.fileLimit && this.fileLimit < this.files.length + this.uploadedFileCount;\n }\n isChooseDisabled() {\n return this.fileLimit && this.fileLimit <= this.files.length + this.uploadedFileCount;\n }\n checkFileLimit() {\n if (this.isFileLimitExceeded()) {\n this.msgs.push({\n severity: 'error',\n summary: this.invalidFileLimitMessageSummary.replace('{0}', this.fileLimit.toString()),\n detail: this.invalidFileLimitMessageDetail.replace('{0}', this.fileLimit.toString())\n });\n }\n }\n clearInputElement() {\n if (this.advancedFileInput && this.advancedFileInput.nativeElement) {\n this.advancedFileInput.nativeElement.value = '';\n }\n if (this.basicFileInput && this.basicFileInput.nativeElement) {\n this.basicFileInput.nativeElement.value = '';\n }\n }\n clearIEInput() {\n if (this.advancedFileInput && this.advancedFileInput.nativeElement) {\n this.duplicateIEEvent = true; //IE11 fix to prevent onFileChange trigger again\n this.advancedFileInput.nativeElement.value = '';\n }\n }\n hasFiles() {\n return this.files && this.files.length > 0;\n }\n onDragEnter(e) {\n if (!this.disabled) {\n e.stopPropagation();\n e.preventDefault();\n }\n }\n onDragOver(e) {\n if (!this.disabled) {\n DomHandler.addClass(this.content.nativeElement, 'p-fileupload-highlight');\n this.dragHighlight = true;\n e.stopPropagation();\n e.preventDefault();\n }\n }\n onDragLeave(event) {\n if (!this.disabled) {\n DomHandler.removeClass(this.content.nativeElement, 'p-fileupload-highlight');\n }\n }\n onDrop(event) {\n if (!this.disabled) {\n DomHandler.removeClass(this.content.nativeElement, 'p-fileupload-highlight');\n event.stopPropagation();\n event.preventDefault();\n let files = event.dataTransfer ? event.dataTransfer.files : event.target.files;\n let allowDrop = this.multiple || (files && files.length === 1);\n if (allowDrop) {\n this.onFileSelect(event);\n }\n }\n }\n onFocus() {\n this.focus = true;\n }\n onBlur() {\n this.focus = false;\n }\n formatSize(bytes) {\n if (bytes == 0) {\n return '0 B';\n }\n let k = 1000, dm = 3, sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'], i = Math.floor(Math.log(bytes) / Math.log(k));\n return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];\n }\n onBasicUploaderClick() {\n if (this.hasFiles())\n this.upload();\n else\n this.basicFileInput.nativeElement.click();\n }\n getBlockableElement() {\n return this.el.nativeElement.children[0];\n }\n get chooseButtonLabel() {\n return this.chooseLabel || this.config.getTranslation(TranslationKeys.CHOOSE);\n }\n get uploadButtonLabel() {\n return this.uploadLabel || this.config.getTranslation(TranslationKeys.UPLOAD);\n }\n get cancelButtonLabel() {\n return this.cancelLabel || this.config.getTranslation(TranslationKeys.CANCEL);\n }\n ngOnDestroy() {\n if (this.content && this.content.nativeElement) {\n this.content.nativeElement.removeEventListener('dragover', this.onDragOver);\n }\n if (this.translationSubscription) {\n this.translationSubscription.unsubscribe();\n }\n }\n}\nFileUpload.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: FileUpload, deps: [{ token: i0.ElementRef }, { token: i1.DomSanitizer }, { token: i0.NgZone }, { token: i2.HttpClient }, { token: i0.ChangeDetectorRef }, { token: i3.PrimeNGConfig }], target: i0.ɵɵFactoryTarget.Component });\nFileUpload.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.0.0\", type: FileUpload, selector: \"p-fileUpload\", inputs: { name: \"name\", url: \"url\", method: \"method\", multiple: \"multiple\", accept: \"accept\", disabled: \"disabled\", auto: \"auto\", withCredentials: \"withCredentials\", maxFileSize: \"maxFileSize\", invalidFileSizeMessageSummary: \"invalidFileSizeMessageSummary\", invalidFileSizeMessageDetail: \"invalidFileSizeMessageDetail\", invalidFileTypeMessageSummary: \"invalidFileTypeMessageSummary\", invalidFileTypeMessageDetail: \"invalidFileTypeMessageDetail\", invalidFileLimitMessageDetail: \"invalidFileLimitMessageDetail\", invalidFileLimitMessageSummary: \"invalidFileLimitMessageSummary\", style: \"style\", styleClass: \"styleClass\", previewWidth: \"previewWidth\", chooseLabel: \"chooseLabel\", uploadLabel: \"uploadLabel\", cancelLabel: \"cancelLabel\", chooseIcon: \"chooseIcon\", uploadIcon: \"uploadIcon\", cancelIcon: \"cancelIcon\", showUploadButton: \"showUploadButton\", showCancelButton: \"showCancelButton\", mode: \"mode\", headers: \"headers\", customUpload: \"customUpload\", fileLimit: \"fileLimit\", files: \"files\" }, outputs: { onBeforeUpload: \"onBeforeUpload\", onSend: \"onSend\", onUpload: \"onUpload\", onError: \"onError\", onClear: \"onClear\", onRemove: \"onRemove\", onSelect: \"onSelect\", onProgress: \"onProgress\", uploadHandler: \"uploadHandler\" }, 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: `\n <div [ngClass]=\"'p-fileupload p-fileupload-advanced p-component'\" [ngStyle]=\"style\" [class]=\"styleClass\" *ngIf=\"mode === 'advanced'\">\n <div class=\"p-fileupload-buttonbar\">\n <span class=\"p-button p-component p-fileupload-choose\" [ngClass]=\"{'p-focus': focus, 'p-disabled':disabled || isChooseDisabled()}\" (focus)=\"onFocus()\" (blur)=\"onBlur()\" pRipple\n (click)=\"choose()\" (keydown.enter)=\"choose()\" tabindex=\"0\">\n <input #advancedfileinput type=\"file\" (change)=\"onFileSelect($event)\" [multiple]=\"multiple\" [accept]=\"accept\" [disabled]=\"disabled || isChooseDisabled()\" [attr.title]=\"''\">\n <span [ngClass]=\"'p-button-icon p-button-icon-left'\" [class]=\"chooseIcon\"></span>\n <span class=\"p-button-label\">{{chooseButtonLabel}}</span>\n </span>\n\n <p-button *ngIf=\"!auto&&showUploadButton\" type=\"button\" [label]=\"uploadButtonLabel\" [icon]=\"uploadIcon\" (onClick)=\"upload()\" [disabled]=\"!hasFiles() || isFileLimitExceeded()\"></p-button>\n <p-button *ngIf=\"!auto&&showCancelButton\" type=\"button\" [label]=\"cancelButtonLabel\" [icon]=\"cancelIcon\" (onClick)=\"clear()\" [disabled]=\"!hasFiles() || uploading\"></p-button>\n\n <ng-container *ngTemplateOutlet=\"toolbarTemplate\"></ng-container>\n </div>\n <div #content class=\"p-fileupload-content\" (dragenter)=\"onDragEnter($event)\" (dragleave)=\"onDragLeave($event)\" (drop)=\"onDrop($event)\">\n <p-progressBar [value]=\"progress\" [showValue]=\"false\" *ngIf=\"hasFiles()\"></p-progressBar>\n\n <p-messages [value]=\"msgs\" [enableService]=\"false\"></p-messages>\n\n <div class=\"p-fileupload-files\" *ngIf=\"hasFiles()\">\n <div *ngIf=\"!fileTemplate\">\n <div class=\"p-fileupload-row\" *ngFor=\"let file of files; let i = index;\">\n <div><img [src]=\"file.objectURL\" *ngIf=\"isImage(file)\" [width]=\"previewWidth\" /></div>\n <div class=\"p-fileupload-filename\">{{file.name}}</div>\n <div>{{formatSize(file.size)}}</div>\n <div>\n <button type=\"button\" icon=\"pi pi-times\" pButton (click)=\"remove($event,i)\" [disabled]=\"uploading\"></button>\n </div>\n </div>\n </div>\n <div *ngIf=\"fileTemplate\">\n <ng-template ngFor [ngForOf]=\"files\" [ngForTemplate]=\"fileTemplate\"></ng-template>\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"contentTemplate; context: {$implicit: files}\"></ng-container>\n </div>\n </div>\n <div class=\"p-fileupload p-fileupload-basic p-component\" *ngIf=\"mode === 'basic'\">\n <p-messages [value]=\"msgs\" [enableService]=\"false\"></p-messages>\n <span [ngClass]=\"{'p-button p-component p-fileupload-choose': true, 'p-button-icon-only': !chooseLabel, 'p-fileupload-choose-selected': hasFiles(),'p-focus': focus, 'p-disabled':disabled}\"\n [ngStyle]=\"style\" [class]=\"styleClass\" (mouseup)=\"onBasicUploaderClick()\" (keydown)=\"onBasicUploaderClick()\" tabindex=\"0\" pRipple>\n <span class=\"p-button-icon p-button-icon-left pi\" [ngClass]=\"hasFiles()&&!auto ? uploadIcon : chooseIcon\"></span>\n <span class=\"p-button-label\">{{auto ? chooseLabel : hasFiles() ? files[0].name : chooseLabel}}</span>\n <input #basicfileinput type=\"file\" [accept]=\"accept\" [multiple]=\"multiple\" [disabled]=\"disabled\"\n (change)=\"onFileSelect($event)\" *ngIf=\"!hasFiles()\" (focus)=\"onFocus()\" (blur)=\"onBlur()\">\n </span>\n </div>\n `, isInline: true, styles: [\".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\"], components: [{ type: i4.Button, selector: \"p-button\", inputs: [\"type\", \"iconPos\", \"icon\", \"badge\", \"label\", \"disabled\", \"loading\", \"loadingIcon\", \"style\", \"styleClass\", \"badgeClass\"], outputs: [\"onClick\", \"onFocus\", \"onBlur\"] }, { type: i5.ProgressBar, selector: \"p-progressBar\", inputs: [\"value\", \"showValue\", \"style\", \"styleClass\", \"unit\", \"mode\"] }, { type: i6.Messages, selector: \"p-messages\", inputs: [\"value\", \"closable\", \"style\", \"styleClass\", \"enableService\", \"key\", \"escape\", \"severity\", \"showTransitionOptions\", \"hideTransitionOptions\"], outputs: [\"valueChange\"] }], directives: [{ type: i7.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { type: i7.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { type: i7.NgStyle, selector: \"[ngStyle]\", inputs: [\"ngStyle\"] }, { type: i8.Ripple, selector: \"[pRipple]\" }, { type: i7.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\"] }, { type: i7.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { type: i4.ButtonDirective, selector: \"[pButton]\", inputs: [\"iconPos\", \"loadingIcon\", \"label\", \"icon\", \"loading\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: FileUpload, decorators: [{\n type: Component,\n args: [{ selector: 'p-fileUpload', template: `\n <div [ngClass]=\"'p-fileupload p-fileupload-advanced p-component'\" [ngStyle]=\"style\" [class]=\"styleClass\" *ngIf=\"mode === 'advanced'\">\n <div class=\"p-fileupload-buttonbar\">\n <span class=\"p-button p-component p-fileupload-choose\" [ngClass]=\"{'p-focus': focus, 'p-disabled':disabled || isChooseDisabled()}\" (focus)=\"onFocus()\" (blur)=\"onBlur()\" pRipple\n (click)=\"choose()\" (keydown.enter)=\"choose()\" tabindex=\"0\">\n <input #advancedfileinput type=\"file\" (change)=\"onFileSelect($event)\" [multiple]=\"multiple\" [accept]=\"accept\" [disabled]=\"disabled || isChooseDisabled()\" [attr.title]=\"''\">\n <span [ngClass]=\"'p-button-icon p-button-icon-left'\" [class]=\"chooseIcon\"></span>\n <span class=\"p-button-label\">{{chooseButtonLabel}}</span>\n </span>\n\n <p-button *ngIf=\"!auto&&showUploadButton\" type=\"button\" [label]=\"uploadButtonLabel\" [icon]=\"uploadIcon\" (onClick)=\"upload()\" [disabled]=\"!hasFiles() || isFileLimitExceeded()\"></p-button>\n <p-button *ngIf=\"!auto&&showCancelButton\" type=\"button\" [label]=\"cancelButtonLabel\" [icon]=\"cancelIcon\" (onClick)=\"clear()\" [disabled]=\"!hasFiles() || uploading\"></p-button>\n\n <ng-container *ngTemplateOutlet=\"toolbarTemplate\"></ng-container>\n </div>\n <div #content class=\"p-fileupload-content\" (dragenter)=\"onDragEnter($event)\" (dragleave)=\"onDragLeave($event)\" (drop)=\"onDrop($event)\">\n <p-progressBar [value]=\"progress\" [showValue]=\"false\" *ngIf=\"hasFiles()\"></p-progressBar>\n\n <p-messages [value]=\"msgs\" [enableService]=\"false\"></p-messages>\n\n <div class=\"p-fileupload-files\" *ngIf=\"hasFiles()\">\n <div *ngIf=\"!fileTemplate\">\n <div class=\"p-fileupload-row\" *ngFor=\"let file of files; let i = index;\">\n <div><img [src]=\"file.objectURL\" *ngIf=\"isImage(file)\" [width]=\"previewWidth\" /></div>\n <div class=\"p-fileupload-filename\">{{file.name}}</div>\n <div>{{formatSize(file.size)}}</div>\n <div>\n <button type=\"button\" icon=\"pi pi-times\" pButton (click)=\"remove($event,i)\" [disabled]=\"uploading\"></button>\n </div>\n </div>\n </div>\n <div *ngIf=\"fileTemplate\">\n <ng-template ngFor [ngForOf]=\"files\" [ngForTemplate]=\"fileTemplate\"></ng-template>\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"contentTemplate; context: {$implicit: files}\"></ng-container>\n </div>\n </div>\n <div class=\"p-fileupload p-fileupload-basic p-component\" *ngIf=\"mode === 'basic'\">\n <p-messages [value]=\"msgs\" [enableService]=\"false\"></p-messages>\n <span [ngClass]=\"{'p-button p-component p-fileupload-choose': true, 'p-button-icon-only': !chooseLabel, 'p-fileupload-choose-selected': hasFiles(),'p-focus': focus, 'p-disabled':disabled}\"\n [ngStyle]=\"style\" [class]=\"styleClass\" (mouseup)=\"onBasicUploaderClick()\" (keydown)=\"onBasicUploaderClick()\" tabindex=\"0\" pRipple>\n <span class=\"p-button-icon p-button-icon-left pi\" [ngClass]=\"hasFiles()&&!auto ? uploadIcon : chooseIcon\"></span>\n <span class=\"p-button-label\">{{auto ? chooseLabel : hasFiles() ? files[0].name : chooseLabel}}</span>\n <input #basicfileinput type=\"file\" [accept]=\"accept\" [multiple]=\"multiple\" [disabled]=\"disabled\"\n (change)=\"onFileSelect($event)\" *ngIf=\"!hasFiles()\" (focus)=\"onFocus()\" (blur)=\"onBlur()\">\n </span>\n </div>\n `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {\n 'class': 'p-element'\n }, styles: [\".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\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.DomSanitizer }, { type: i0.NgZone }, { type: i2.HttpClient }, { type: i0.ChangeDetectorRef }, { type: i3.PrimeNGConfig }]; }, propDecorators: { name: [{\n type: Input\n }], url: [{\n type: Input\n }], method: [{\n type: Input\n }], multiple: [{\n type: Input\n }], accept: [{\n type: Input\n }], disabled: [{\n type: Input\n }], auto: [{\n type: Input\n }], withCredentials: [{\n type: Input\n }], maxFileSize: [{\n type: Input\n }], invalidFileSizeMessageSummary: [{\n type: Input\n }], invalidFileSizeMessageDetail: [{\n type: Input\n }], invalidFileTypeMessageSummary: [{\n type: Input\n }], invalidFileTypeMessageDetail: [{\n type: Input\n }], invalidFileLimitMessageDetail: [{\n type: Input\n }], invalidFileLimitMessageSummary: [{\n type: Input\n }], style: [{\n type: Input\n }], styleClass: [{\n type: Input\n }], previewWidth: [{\n type: Input\n }], chooseLabel: [{\n type: Input\n }], uploadLabel: [{\n type: Input\n }], cancelLabel: [{\n type: Input\n }], chooseIcon: [{\n type: Input\n }], uploadIcon: [{\n type: Input\n }], cancelIcon: [{\n type: Input\n }], showUploadButton: [{\n type: Input\n }], showCancelButton: [{\n type: Input\n }], mode: [{\n type: Input\n }], headers: [{\n type: Input\n }], customUpload: [{\n type: Input\n }], fileLimit: [{\n type: Input\n }], onBeforeUpload: [{\n type: Output\n }], onSend: [{\n type: Output\n }], onUpload: [{\n type: Output\n }], onError: [{\n type: Output\n }], onClear: [{\n type: Output\n }], onRemove: [{\n type: Output\n }], onSelect: [{\n type: Output\n }], onProgress: [{\n type: Output\n }], uploadHandler: [{\n type: Output\n }], templates: [{\n type: ContentChildren,\n args: [PrimeTemplate]\n }], advancedFileInput: [{\n type: ViewChild,\n args: ['advancedfileinput']\n }], basicFileInput: [{\n type: ViewChild,\n args: ['basicfileinput']\n }], content: [{\n type: ViewChild,\n args: ['content']\n }], files: [{\n type: Input\n }] } });\nclass FileUploadModule {\n}\nFileUploadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: FileUploadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nFileUploadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: FileUploadModule, declarations: [FileUpload], imports: [CommonModule, SharedModule, ButtonModule, ProgressBarModule, MessagesModule, RippleModule], exports: [FileUpload, SharedModule, ButtonModule, ProgressBarModule, MessagesModule] });\nFileUploadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: FileUploadModule, imports: [[CommonModule, SharedModule, ButtonModule, ProgressBarModule, MessagesModule, RippleModule], SharedModule, ButtonModule, ProgressBarModule, MessagesModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: FileUploadModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [CommonModule, SharedModule, ButtonModule, ProgressBarModule, MessagesModule, RippleModule],\n exports: [FileUpload, SharedModule, ButtonModule, ProgressBarModule, MessagesModule],\n declarations: [FileUpload]\n }]\n }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { FileUpload, FileUploadModule };\n"]},"metadata":{},"sourceType":"module"}
Note: See TracBrowser for help on using the repository browser.