{"version":3,"sources":["webpack:///./src/views/public/ExpirationPage.vue?2bf0","webpack:///./src/components/_org_image.vue?2f02","webpack:///src/components/_org_image.vue","webpack:///./src/components/_org_image.vue?9a06","webpack:///./src/components/_org_image.vue","webpack:///./src/views/public/ExpirationPage.vue?eefc","webpack:///src/views/public/ExpirationPage.vue","webpack:///./src/views/public/ExpirationPage.vue?cf09","webpack:///./src/views/public/ExpirationPage.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","class","hasImage","style","_v","_s","organization","name","substring","staticRenderFns","component","staticClass","attrs","width","height","creator","nonCurrentRecords","$t","_l","record","key","id","filename","on","$event","preventDefault","replaceRecord","revalidation_interval","stillValid","_e","noFile"],"mappings":"0JAAA,yBAA+jB,EAAG,G,kCCAlkB,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,MAAM,CAAC,qBAAsB,iBAAkB,CAAE,gBAAiBN,EAAIO,SAAU,YAAaP,EAAIO,WAAYC,MAAOR,EAAY,UAAG,CAAEA,EAAY,SAAEI,EAAG,MAAM,CAACI,MAAOR,EAAY,WAAII,EAAG,OAAO,CAACJ,EAAIS,GAAG,OAAOT,EAAIU,GAAGV,EAAIW,aAAaC,KAAOZ,EAAIW,aAAaC,KAAKC,UAAU,EAAG,GAAK,IAAI,WAC9XC,EAAkB,GCStB,GACE,MAAF,CACI,aAAJ,CACM,KAAN,OACM,UAAN,GAEI,UAAJ,CACM,KAAN,OACM,QAAN,SAGE,SAAF,CACI,SADJ,WAEM,OAAN,kBACQ,MAAR,OACQ,OAAR,OACQ,cAAR,QACA,wBAEI,SARJ,WASM,OAAN,gCACQ,mBAAR,8DACQ,oBAAR,YACQ,kBAAR,UACQ,sBAAR,aAGI,SAhBJ,WAiBM,QAAN,qCCtCoV,I,YCOhVC,EAAY,eACd,EACAhB,EACAe,GACA,EACA,KACA,KACA,MAIa,OA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,WAgBM,OAAN,sCAEI,QAlBJ,WAmBM,OAAN,kCAGE,QAAF,CACI,WADJ,WAEM,OAAN,qDAEI,cAJJ,SAIA,KAAM,IAAN,OACA,qCAEA,cAKM,KAAN,cACQ,OAAR,aACQ,KAAR,OACQ,KAAR,OACQ,KAAR,IAGM,KAAN,gCAAQ,IAAR,eACQ,EAAR,iEAEQ,EAAR,qBAAU,IAAV,cACA,oBACY,UAAZ,YACY,SAAZ,OACY,UAAZ,OACY,KAAZ,OACY,SAAZ,EACY,WAAZ,8BAGU,EAAV,+BACU,EAAV,mBAAY,KAAZ,gCAAY,OAAZ,gBAAY,KAAZ,2BAzBQ,KAAR,iEA6BI,OArCJ,SAqCA,GACM,IAAN,oBAAQ,WAAR,iCACM,KAAN,oEAEM,KAAN,kCACM,KAAN,mBAAQ,KAAR,mCAAQ,OAAR,mBAAQ,KAAR,wBAGI,WA7CJ,SA6CA,GACM,IAAN,oBAAQ,WAAR,iCACM,KAAN,oEAEM,KAAN,kCACM,KAAN,mBAAQ,KAAR,oCAAQ,OAAR,mBAAQ,KAAR,wBAGI,KArDJ,WAsDM,IAAN,sBACM,OAAN,mDCxKuW,I,wBCQnWC,EAAY,eACd,EACAhB,EACAe,GACA,EACA,KACA,WACA,MAIa,aAAAC,E","file":"js/public_expiration_page~21833f8f.7348ebd8.js","sourcesContent":["import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/lib/loader.js??ref--9-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ExpirationPage.vue?vue&type=style&index=0&id=359feddf&lang=sass&scoped=true&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/lib/loader.js??ref--9-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ExpirationPage.vue?vue&type=style&index=0&id=359feddf&lang=sass&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{class:['user-image-wrapper', 'rounded-circle', { 'has-initials': !_vm.hasImage, 'has-image': _vm.hasImage }],style:(_vm.divStyle)},[(_vm.hasImage)?_c('div',{style:(_vm.imgStyle)}):_c('span',[_vm._v(\"\\n \"+_vm._s(_vm.organization.name ? _vm.organization.name.substring(0, 1) : '')+\"\\n\")])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <div :class=\"['user-image-wrapper', 'rounded-circle', { 'has-initials': !hasImage, 'has-image': hasImage }]\" :style=\"divStyle\">\n <div v-if='hasImage' :style='imgStyle'></div>\n <span v-else>\n {{ organization.name ? organization.name.substring(0, 1) : ''}}\n </span>\n </div>\n</template>\n\n<script>\n export default {\n props: {\n organization: {\n type: Object,\n required: true\n },\n propStyle: {\n type: Object,\n default: Object\n }\n },\n computed: {\n divStyle() {\n return Object.assign({}, {\n width: '45px',\n height: '45px',\n 'line-height': '45px',\n }, this.$props.propStyle)\n },\n imgStyle() {\n return Object.assign({}, this.divStyle , {\n 'background-image': 'url(' + this.previewUrl(this.$props.organization.logo_url) + ')',\n 'background-repeat': 'no-repeat',\n 'background-size': 'contain',\n 'background-position': '50% 50%'\n })\n },\n hasImage() {\n return !!this.$props.organization.logo_url\n }\n }\n }\n</script>\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./_org_image.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./_org_image.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./_org_image.vue?vue&type=template&id=0dba7058&\"\nimport script from \"./_org_image.vue?vue&type=script&lang=js&\"\nexport * from \"./_org_image.vue?vue&type=script&lang=js&\"\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 null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"upload-file-wrapper\"},[_c('div',{staticClass:\"company-identification-wrapper\"},[(_vm.organization.active)?_c('div',{staticClass:\"sender-pic\"},[_c('org-image',{staticClass:\"org-pic\",attrs:{\"organization\":_vm.organization,\"propStyle\":{ width: '80px', height: '80px', 'line-height': '80px' }}})],1):_c('div',{staticClass:\"sender-pic\"},[_c('user-image',{attrs:{\"user\":_vm.creator,\"propStyle\":{ width: '80px', height: '80px', 'line-height': '80px' }}})],1),(_vm.nonCurrentRecords.length)?_c('div',[_c('p',[_vm._v(\"\\n \"+_vm._s(_vm.$t('public.see_email'))+\"\\n \")]),_c('a',{attrs:{\"target\":\"false\",\"href\":\"https://support.relatico.com/en/article/someone-emailed-me-requesting-a-new-file-version-1w5qtqf/\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('public.how_it_works'))+\"\\n \")]),_c('div',{staticClass:\"new-version-upload\"},[_c('h1',[_vm._v(\"\\n \"+_vm._s(_vm.$t('versions.expiration.upload_files'))+\"\\n \")]),_c('ol',_vm._l((_vm.nonCurrentRecords),function(record){return _c('li',{key:record.id},[_c('h5',[_vm._v(_vm._s(record.filename))]),_c('form',{on:{\"submit\":function($event){$event.preventDefault();return _vm.replaceRecord(record, $event)}}},[_c('fieldset',[_c('input',{attrs:{\"type\":\"file\",\"name\":\"file\"}}),_c('input',{staticClass:\"btn btn-primary btn-sm\",attrs:{\"type\":\"submit\",\"value\":\"Upload\"}}),(record.revalidation_interval > 0)?_c('a',{staticClass:\"btn btn-neutral btn-sm\",attrs:{\"href\":\"#\"},on:{\"click\":function($event){$event.preventDefault();return _vm.stillValid(record)}}},[_vm._v(_vm._s(_vm.$t('versions.expiration.still_valid')))]):_vm._e(),_c('a',{staticClass:\"btn btn-neutral btn-sm\",attrs:{\"href\":\"#\"},on:{\"click\":function($event){$event.preventDefault();return _vm.noFile(record)}}},[_vm._v(_vm._s(_vm.$t('versions.expiration.no_file')))])])])])}),0)])]):_c('div',[_c('p',[_c('strong',[_vm._v(_vm._s(_vm.$t('public.thank_you')))])])])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <div class=\"upload-file-wrapper\">\n <div class=\"company-identification-wrapper\">\n <div v-if=\"organization.active\" class=\"sender-pic\">\n <org-image :organization='organization' :propStyle=\"{ width: '80px', height: '80px', 'line-height': '80px' }\" class=\"org-pic\" />\n </div>\n <div v-else class=\"sender-pic\">\n <user-image :user='creator' :propStyle=\"{ width: '80px', height: '80px', 'line-height': '80px' }\" />\n </div>\n\n <div v-if=\"nonCurrentRecords.length\">\n <p>\n {{ $t('public.see_email')}}\n </p>\n\n <a target=\"false\" href=\"https://support.relatico.com/en/article/someone-emailed-me-requesting-a-new-file-version-1w5qtqf/\">\n {{ $t('public.how_it_works')}}\n </a>\n\n <div class=\"new-version-upload\">\n <h1>\n {{ $t('versions.expiration.upload_files')}}\n </h1>\n <ol>\n <li v-for='record in nonCurrentRecords' :key='record.id'>\n <h5>{{ record.filename }}</h5>\n <form @submit.prevent='replaceRecord(record, $event)'>\n <fieldset>\n <input type='file' name='file' />\n <input type='submit' class='btn btn-primary btn-sm' value=\"Upload\" />\n <a v-if=\"record.revalidation_interval > 0\" href=\"#\" @click.prevent='stillValid(record)' class='btn btn-neutral btn-sm'>{{ $t('versions.expiration.still_valid')}}</a>\n <a href=\"#\" @click.prevent='noFile(record)' class='btn btn-neutral btn-sm'>{{ $t('versions.expiration.no_file')}}</a>\n </fieldset>\n </form>\n </li>\n </ol>\n </div>\n </div>\n <div v-else>\n <p>\n <strong>{{ $t('public.thank_you')}}</strong>\n </p>\n </div>\n </div>\n\n </div>\n</template>\n\n<script>\n import Uppy from '@uppy/core'\n import XHRUpload from '@uppy/xhr-upload'\n\n import _user_image from '../../components/_user_image'\n import _org_image from '../../components/_org_image'\n\n export default {\n components: {\n 'user-image': _user_image,\n 'org-image': _org_image,\n },\n created() {\n this.store.sendMetrics({name: 'public_expiration_page', params: this.$route.params, path: this.$route.fullPath})\n if(this.isIE()) {\n this.$router.push({ name: 'unsupported_browser' })\n }\n\n this.uppy = Uppy()\n this.uppy.use(XHRUpload, {\n endpoint: `${this.baseApiUrl}/inline/upload`,\n method: 'post',\n formData: true,\n fieldName: 'file',\n limit: 1,\n withCredentials: true,\n headers: {\n 'Client-ID': process.env.VUE_APP_FRONTEND_CLIENT_ID\n },\n getResponseData (responseText, response) {\n return JSON.parse(responseText)\n }\n }).setMeta({ prefix: 'records/' })\n\n\n this.store.getPublicExpirationPage(this.$route.params.uuid)\n },\n data() {\n return {\n uppy: null,\n resolved: {}\n }\n },\n computed: {\n folderUUID() {\n return this.$route.params.uuid\n },\n expirationPage() {\n return this.state.expirationPage || {}\n },\n records() {\n return this.expirationPage.records || []\n },\n nonCurrentRecords() {\n return this.records.filter(({id, next_record_id, status}) => {\n return !next_record_id && (status == 'expired' || status == 'soon' || status == 'current') && !this.resolved[id]\n })\n },\n organization(){\n return this.expirationPage.organization || {}\n },\n creator(){\n return this.expirationPage.creator || {}\n }\n },\n methods: {\n loadFolder() {\n return this.store.getPublicExpirationPage(this.folderUUID)\n },\n replaceRecord(record, e) {\n const file = new FormData(e.target).get('file')\n\n if (!file || file.size == 0) {\n this.$toastr.alert(this.$t('record.upload_new_version.select_file'))\n return\n }\n\n this.uppy.addFile({\n source: 'file input',\n name: file.name,\n type: file.type,\n data: file\n })\n\n this.uppy.upload().then(({successful}) => {\n this.resolved = Object.assign({}, this.resolved, { [record.id]: true })\n\n successful.forEach(({uploadURL}) => {\n const params = Object.assign({}, {\n folder_id: record.folder_id,\n filename: file.name,\n mime_type: file.type,\n size: file.size,\n location: uploadURL,\n contact_id: this.expirationPage.contact_id\n })\n\n this.store.publicReplaceRecord(record, params)\n this.store.sendMetrics({name: 'replace_file_from_public_page', params: this.$route.params, path: this.$route.fullPath})\n })\n })\n },\n noFile(record) {\n const params = Object.assign({}, { contact_id: this.expirationPage.contact_id })\n this.resolved = Object.assign({}, this.resolved, { [record.id]: true })\n\n this.store.noReplacementForRecord(record, params)\n this.store.sendMetrics({name: 'no_replace_file_from_public_page', params: this.$route.params, path: this.$route.fullPath})\n\n },\n stillValid(record) {\n const params = Object.assign({}, { contact_id: this.expirationPage.contact_id })\n this.resolved = Object.assign({}, this.resolved, { [record.id]: true })\n\n this.store.markRecordAsStillValid(record, params)\n this.store.sendMetrics({name: 'still_valid_file_from_public_page', params: this.$route.params, path: this.$route.fullPath})\n\n },\n isIE() {\n let ua = navigator.userAgent\n return ua.indexOf(\"MSIE \") > -1 || ua.indexOf(\"Trident/\") > -1\n }\n }\n }\n</script>\n\n<style lang=\"sass\" scoped>\n @import \"../../styles/upload_page\"\n</style>\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ExpirationPage.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ExpirationPage.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ExpirationPage.vue?vue&type=template&id=359feddf&scoped=true&\"\nimport script from \"./ExpirationPage.vue?vue&type=script&lang=js&\"\nexport * from \"./ExpirationPage.vue?vue&type=script&lang=js&\"\nimport style0 from \"./ExpirationPage.vue?vue&type=style&index=0&id=359feddf&lang=sass&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 \"359feddf\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}