{"version":3,"sources":["webpack:///./src/ui-components/dropzone/DropzoneComponent.less?918e","webpack:///./src/ui-components/dropzone/DropzoneComponent.vue?9c10","webpack:///./src/ui-components/dropzone/DropzoneComponent.ts","webpack:///./src/ui-components/dropzone/DropzoneComponent.vue?7fda","webpack:///./src/ui-components/dropzone/DropzoneComponent.vue?6f9e","webpack:///./src/ui-components/dropzone/DropzoneComponent.vue","webpack:///./src/assets/images/scholars/add-new-scholars/delete.svg","webpack:///./src/assets/images/upload-icon.svg"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","loadedImg","attrs","url","_e","directives","name","rawName","value","uploaded","expression","ref","dropzoneOptions","on","fileAdded","success","error","completed","fileExceeded","fileRemoved","manuallyAdded","_v","class","_s","errorMsg","$event","dltConfirmation","removeAllFiles","onFilePicked","chooseFiles","saveImg","staticRenderFns","Dropzone","fileType","$refs","fileUpload","click","event","files","target","examineFile","fileReader","FileReader","imageUrl","addEventListener","result","myVueDropzone","manuallyAddFile","readAsDataURL","file","getAcceptedFiles","validFile","length","URL","createObjectURL","xhr","processQueue","response","includes","type","size","message","Vue","tslib_1","Prop","default","method","process","API_CONST","UPLOAD_CSV","headers","APP_UTILITIES","getCookie","maxFilesize","maxFiles","includeStyling","chunking","addRemoveLinks","acceptedFiles","autoProcessQueue","clickable","previewsContainer","thumbnailWidth","thumbnailHeight","parallelUploads","Component","components","vue2Dropzone","component","module","exports"],"mappings":"2IAAA,W,2CCAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,kBAAkB,CAACF,EAAG,MAAM,CAACE,YAAY,YAAY,CAAEN,EAAIO,UAAkB,SAAEH,EAAG,MAAM,CAACI,MAAM,CAAC,GAAK,YAAY,CAACJ,EAAG,SAAS,CAACE,YAAY,iBAAiB,CAAEN,EAAO,IAAEI,EAAG,MAAM,CAACI,MAAM,CAAC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AUe,OAAQ,EACvBrB,KAAKuC,MAAMY,cAAcnB,qBAC1B,EA1GsB,CAASmC,SAgChCC,QArBDC,eAAK,CAACC,QAAQ,WACb,MAAO,CACLC,OAAQ,OACN/D,IAAK,UAAGgE,yCAA4B,OAAGC,OAAUC,WAAU,YAAW,EACtEC,QAAS,CACP,OAAW,MACX,cAAiB,UAAF,OAAYC,OAAcC,UAAU,gBAErDC,YAAa,EACbC,SAAU,EACVC,gBAAgB,EAChBC,UAAU,EACVC,gBAAgB,EAChBC,cAAe,iCACfC,kBAAkB,EAClBC,WAAW,EACXC,mBAAmB,EACnBC,eAAgB,IAChBC,gBAAiB,IACjBC,gBAAiB,OACf,sCA/BSpD,EAAQ,QAL5BqD,eAAU,CACPC,WAAY,CACR,eAAgBC,QAGHvD,WCkCNA,IC7C+Y,I,wBCQ1ZwD,EAAY,eACd,EACA/F,EACAsC,GACA,EACA,KACA,WACA,MAIa,aAAAyD,E,gCCnBfC,EAAOC,QAAU,IAA0B,2B,uBCA3CD,EAAOC,QAAU,IAA0B","file":"js/chunk-037f4b76.b0be3dca40b56233ab90.1730771797376.min.js","sourcesContent":["export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--10-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--10-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--10-oneOf-1-2!../../../node_modules/less-loader/dist/cjs.js??ref--10-oneOf-1-3!./DropzoneComponent.less?vue&type=style&index=0&id=8f5c4246&lang=less&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"flex-container\"},[_c('div',{staticClass:\"dropzone\"},[(_vm.loadedImg.uploaded)?_c('div',{attrs:{\"id\":\"preview\"}},[_c('figure',{staticClass:\"preview-image\"},[(_vm.url)?_c('img',{attrs:{\"src\":_vm.url,\"alt\":\"img\"}}):_vm._e()])]):_vm._e(),_c('vue-dropzone',{directives:[{name:\"show\",rawName:\"v-show\",value:(!_vm.loadedImg.uploaded),expression:\"!loadedImg.uploaded\"}],ref:\"myVueDropzone\",attrs:{\"include-styling\":false,\"useCustomSlot\":true,\"id\":\"dropzone\",\"options\":_vm.dropzoneOptions},on:{\"vdropzone-file-added\":_vm.fileAdded,\"vdropzone-success\":_vm.success,\"vdropzone-error\":_vm.error,\"vdropzone-queue-complete\":_vm.completed,\"vdropzone-max-files-exceeded\":_vm.fileExceeded,\"vdropzone-removed-file\":_vm.fileRemoved,\"vdropzone-file-added-manually\":_vm.manuallyAdded}},[_c('div',{staticClass:\"dropzone-container\"},[_c('div',{staticClass:\"file-selector\"},[_c('div',{staticClass:\"upload-logo upload-logo-area\"},[_c('span',{staticClass:\"upload-icon\"},[_c('img',{attrs:{\"src\":require(\"@/assets/images/upload-icon.svg\"),\"alt\":\"Upload Image\"}})]),_c('label',[_vm._v(\"Drag or drop to upload file\")]),_c('label',[_vm._v(\"or\")]),_c('label',{staticClass:\"underline\"},[_vm._v(\"Select file from computer\")])])])]),_c('div')]),(!_vm.loadedImg.uploaded && !_vm.loadedImg.error)?_c('div',{staticClass:\"info-message\"},[_vm._v(\"Your \"),_c('strong',[_vm._v(\".PNG\")]),_vm._v(\" or \"),_c('strong',[_vm._v(\".JPG\")]),_vm._v(\" must be 1MB or smaller. For best results we recommend using a transparent .png. \")]):_vm._e(),(_vm.loadedImg.error)?_c('div',{staticClass:\"info-message error\",class:[_vm.loadedImg.error && !_vm.loadedImg.uploaded && 'error-message-no-upload']},[_vm._v(_vm._s(_vm.loadedImg.errorMsg))]):_vm._e()],1),_c('div',{staticClass:\"modal-action-buttons\"},[_c('div',{staticClass:\"delete-icon\"},[(_vm.loadedImg.uploaded)?_c('img',{attrs:{\"bx-attr\":\"delete\",\"alt\":\"delete name\",\"src\":require(\"@/assets/images/scholars/add-new-scholars/delete.svg\")},on:{\"click\":function($event){_vm.dltConfirmation=!_vm.dltConfirmation}}}):_vm._e(),(_vm.dltConfirmation)?_c('div',{staticClass:\"save-info-popup\"},[_c('p',[_vm._v(\"Are you sure you want to delete your logo file?\")]),_c('button',{staticClass:\"btn-primary\",attrs:{\"bx-attr\":\"savePopup\"},on:{\"click\":function($event){_vm.dltConfirmation = false}}},[_vm._v(\"Cancel\")]),_c('a',{staticClass:\"close-link\",attrs:{\"bx-attr\":\"cancelChanges\"},on:{\"click\":_vm.removeAllFiles}},[_vm._v(\"Delete Logo\")])]):_vm._e()]),_c('input',{ref:\"fileUpload\",attrs:{\"type\":\"file\",\"accept\":\"image/jpeg,image/png,image/jpg\",\"hidden\":\"\"},on:{\"change\":_vm.onFilePicked}}),_c('button',{class:[_vm.loadedImg.uploaded ? 'btn-secondary': 'btn-primary'],attrs:{\"type\":\"button\"},on:{\"click\":_vm.chooseFiles}},[_vm._v(\"Upload\")]),(_vm.loadedImg.uploaded)?_c('button',{staticClass:\"btn-primary\",attrs:{\"type\":\"button\"},on:{\"click\":_vm.saveImg}},[_vm._v(\"Save\")]):_vm._e()])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import API_CONST from '@/constants/ApiConst';\nimport APP_UTILITIES from '@/utilities/commonFunctions';\nimport { Vue, Component, Prop } from 'vue-property-decorator';\nimport vue2Dropzone from \"vue2-dropzone\";\nimport \"vue2-dropzone/dist/vue2Dropzone.min.css\";\n\n@Component({\n components: {\n 'vue-dropzone': vue2Dropzone\n }\n})\nexport default class Dropzone extends Vue {\n private url = '';\n private fileType = ['image/png', 'image/jpg', 'image/jpeg'];\n private loadedImg = { uploaded:false, error: false, errorMsg: `We haved trouble uploading your photo. Please ensure that it is either JPG or PNG, and\n does not exceed 1MB in size. Try again`};\n private dltConfirmation = false;\n $refs!: {\n myVueDropzone: any,\n fileUpload: any\n }\n\n @Prop({default:() => {\n return {\n method: 'POST',\n url: `${process.env.VUE_APP_BASE_URL}${API_CONST.UPLOAD_CSV}?siteId=`+1,\n headers: {\n 'Accept' : '*/*',\n 'Authorization': `Bearer ${APP_UTILITIES.getCookie('auth_token')}`\n },\n maxFilesize: 1,\n maxFiles: 1,\n includeStyling: false,\n chunking: false,\n addRemoveLinks: true,\n acceptedFiles: 'image/jpeg,image/jpg,image/png',\n autoProcessQueue: false,\n clickable: true,\n previewsContainer: false,\n thumbnailWidth: 250,\n thumbnailHeight: 140,\n parallelUploads: 1,\n }}}) \n dropzoneOptions !: any\n\n private chooseFiles() {\n this.$refs.fileUpload.click();\n }\n\n private onFilePicked(event: any) {\n const files = event.target.files;\n if(this.examineFile(files[0])) {\n const fileReader = new FileReader();\n let imageUrl: string | ArrayBuffer | null = '';\n fileReader.addEventListener('loadend', () => {\n imageUrl = fileReader.result;\n this.$refs.myVueDropzone.removeAllFiles();\n this.$refs.myVueDropzone.manuallyAddFile(files[0], imageUrl);\n })\n fileReader.readAsDataURL(files[0])\n }\n }\n\n private fileAdded(file: any) {\n const files = this.$refs.myVueDropzone.getAcceptedFiles();\n const validFile = this.examineFile(file);\n if(!files.length && validFile) {\n this.loadedImg.uploaded = true;\n this.loadedImg.error = false;\n this.url = URL.createObjectURL(file);\n } \n }\n\n private manuallyAdded(file: any) {\n this.url = URL.createObjectURL(file);\n }\n \n private fileRemoved(file:any, error: any, xhr: any) {\n\n }\n\n private saveImg() {\n this.$refs.myVueDropzone.processQueue();\n }\n\n private success(file: any, response: any) {\n\n }\n\n private examineFile(file: any) {\n if(!this.fileType.includes(file.type) || file.size > 1000000) {\n this.loadedImg.error = true;\n return false;\n } else {\n this.loadedImg.error = false;\n return true;\n }\n }\n\n private fileExceeded(file: any) {\n this.loadedImg.error = true;\n }\n\n private error(file: any, message: any, xhr: any) {\n this.loadedImg.error = true;\n }\n\n private completed() {\n \n }\n\n removeAllFiles() {\n this.url = '';\n this.dltConfirmation = false;\n this.loadedImg.uploaded = false;\n this.loadedImg.error = false;\n this.$refs.myVueDropzone.removeAllFiles();\n }\n\n }\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Dropzone from '@/ui-components/dropzone/DropzoneComponent';\nexport default Dropzone;\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--13-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DropzoneComponent.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--13-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DropzoneComponent.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./DropzoneComponent.vue?vue&type=template&id=8f5c4246&scoped=true&\"\nimport script from \"./DropzoneComponent.vue?vue&type=script&lang=ts&\"\nexport * from \"./DropzoneComponent.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./DropzoneComponent.less?vue&type=style&index=0&id=8f5c4246&lang=less&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"8f5c4246\",\n null\n \n)\n\nexport default component.exports","module.exports = __webpack_public_path__ + \"img/delete.da5cc411.svg\";","module.exports = __webpack_public_path__ + \"img/upload-icon.afce82f8.svg\";"],"sourceRoot":""}