{"version":3,"sources":["webpack:///./src/assets/img/management/add.svg","webpack:///./src/components/newPostModal.vue?015d","webpack:///./src/views/community/views/bacheca/bacheca.vue?5a6b","webpack:///./src/components/newPostModal.vue?6698","webpack:///./src/components/newPostModal.vue?fd35","webpack:///./src/components/newPostModal.vue","webpack:///./src/views/community/views/bacheca/bacheca.vue?b404","webpack:///./src/views/community/views/bacheca/bacheca.vue"],"names":["module","exports","_hoisted_1","class","_hoisted_2","key","_hoisted_3","src","render","_ctx","_cache","_component_localized_text","_component_post","posts","length","localizedKey","text","item","i","identifier","ref","post","$store","state","community","onRemoved","$event","canContent","showCommunityTitle","isFiera","onClick","newPost","_withId","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","$props","$setup","$data","$options","_component_uose_writer","_component_preview_post_attachment","_component_file_selector","_directive_userimage","$emit","title","getUserImage","user","name","$filters","date","todayDate","modelValue","vm","placeholderText","placeholderKey","preview","onRemoveAttachment","removeAttachment","attachment","accept","default","_","type","doPost","isCordova","window","cordova","uploading","uploadProgress","Date","doRec","recbuffer","communities","chatSearchCommunities","this","containerIdentifier","postType","publishedDate","store","globalSpinner","createOrUpdatePost","then","x","updatePostImage","finally","next","prev","lastLetter","searchCommunities","substr","query","chatSearch","makePreview","components","ProgressBar","UoseWriter","__exports__","communityIdentifier","init","slug","$route","params","path","indexOf","getBySlug","toString","getByParent","f","setTimeout","$refs","$el","classList","add","scrollIntoView","remove","$opModal","show","CommunityPostNew","postIdentifier","index","splice","Post"],"mappings":"mGAAAA,EAAOC,QAAU,IAA0B,wB,oCCA3C,W,8ECIA,MAAMC,EAAa,CAAEC,MAAO,yBACtBC,EAAa,CACjBC,IAAK,EACLF,MAAO,wBAEHG,EAA0B,eAAa,MAAO,CAAEC,IAAK,KAAc,MAAO,GAE1E,SAAUC,EAAOC,EAAUC,GAC/B,MAAMC,EAA4B,eAAkB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,iCCVrB,MAAMC,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAAS,GAAQ,CAAC,YAAY,qBAE1E,Q,wBCKf,IAAqB,EAArB,cAAqC,OAArC,c,oBAEI,KAAA7F,MAAqB,GACrB,KAAAgB,SAAmB,EACnB,KAAA8E,oBAA8B,GAE9B,UACIvB,KAAKwB,OAIT,aACI,IAAIC,EAAOzB,KAAK0B,OAAOC,OAAOF,KAE9B,GAAIA,EAAJ,CAGAzB,KAAKvD,QAAUuD,KAAK0B,OAAOE,KAAKC,QAAQ,UAAY,EACpD,IAAIzF,QAAkB,OAAgB0F,UAAU9B,KAAK0B,OAAOC,OAAOF,KAAKM,YACxE/B,KAAKuB,oBAAsBnF,EAAUL,WAErC,OAAWiG,YAAY5F,EAAUL,YAChCwE,KAAKC,IACFR,KAAKvE,MAAQ+E,EACVR,KAAK0B,OAAOV,MAAMiB,GACjBC,WAAW,KACP,IAAIjG,EAAY+D,KAAKmC,MAAcnC,KAAK0B,OAAOV,MAAMiB,GAClDhG,IACCA,EAAKmG,IAAIC,UAAUC,IAAI,aAEvBrG,EAAKmG,IAAIG,iBACTL,WAAW,KACPjG,EAAKmG,IAAIC,UAAUG,OAAO,cAC3B,OAER,QAKf,gBACIxC,KAAKyC,SAASC,KAAK,EAAc,CAC7BzC,oBAAqBD,KAAKuB,oBAC1BrB,SAAU,OAAuByC,kBAClC,KACC3C,KAAKwB,SAIb,UAAUoB,EAAwBC,GAC9B7C,KAAKvE,MAAMqH,OAAOD,EAAO,KAvC7B,gBADC,eAAM,uB,yBAVU,EAAO,gBAL3B,eAAQ,CACL1B,WAAY,CACR4B,KAAA,WAGa,WCTrB,MAAM,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAAS3H,KAErD,gB","file":"js/chunk-51d0531d557d926390d2.js","sourcesContent":["module.exports = __webpack_public_path__ + \"img/add.f97fc20c.svg\";","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader-v16/dist/index.js??ref--1-1!./newPostModal.vue?vue&type=style&index=0&id=3af260bb&scoped=true&lang=css\"","import { resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, createVNode as _createVNode } from \"vue\"\nimport _imports_0 from '@/assets/img/management/add.svg'\n\n\nconst _hoisted_1 = { class: \"hasAdminButtonsFooter\" }\nconst _hoisted_2 = {\n key: 1,\n class: \"adminButtonContainer\"\n}\nconst _hoisted_3 = /*#__PURE__*/_createVNode(\"img\", { src: _imports_0 }, null, -1)\n\nexport function render(_ctx: any,_cache: any) {\n const _component_localized_text = _resolveComponent(\"localized-text\")!\n const _component_post = _resolveComponent(\"post\")!\n\n return (_openBlock(), _createBlock(\"div\", _hoisted_1, [\n (_ctx.posts.length == 0)\n ? (_openBlock(), _createBlock(_component_localized_text, {\n key: 0,\n localizedKey: \"app_ancoranientealmomento\",\n text: \"Ancora niente al momento\",\n class: \"fs_14 greyBlue d-block ln_12 mt-5 text-center\"\n }))\n : _createCommentVNode(\"\", true),\n (_openBlock(true), _createBlock(_Fragment, null, _renderList(_ctx.posts, (item, i) => {\n return (_openBlock(), _createBlock(_component_post, {\n class: \"mb-3\",\n key: item.identifier,\n ref: item.identifier,\n post: item,\n \"community-identifier\": _ctx.$store.state.community.identifier,\n onRemoved: ($event: any) => (_ctx.onRemoved($event, i)),\n \"can-content\": _ctx.$store.state.community.canContent,\n showCommunityTitle: _ctx.isFiera\n }, null, 8, [\"post\", \"community-identifier\", \"onRemoved\", \"can-content\", \"showCommunityTitle\"]))\n }), 128)),\n (_ctx.$store.state.community.canContent && !_ctx.isFiera)\n ? (_openBlock(), _createBlock(\"div\", _hoisted_2, [\n _createVNode(\"div\", {\n class: \"managementButton\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (_ctx.newPost()))\n }, [\n _hoisted_3\n ])\n ]))\n : _createCommentVNode(\"\", true)\n ]))\n}","import { createVNode as _createVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, resolveDirective as _resolveDirective, withDirectives as _withDirectives, withCtx as _withCtx, withScopeId as _withScopeId, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\nimport _imports_0 from '@/assets/img/chevronLeft.svg'\nimport _imports_1 from '@/assets/img/management/cameraIcon.svg'\nimport _imports_2 from '@/assets/img/management/videoIcon.svg'\n\nconst _withId = /*#__PURE__*/_withScopeId(\"data-v-3af260bb\")\n\n_pushScopeId(\"data-v-3af260bb\")\nconst _hoisted_1 = { class: \"genericPadding hasHeader hasFooter bgWhite\" }\nconst _hoisted_2 = { class: \"header withShadow d-flex aling-items-center justify-content-between py-4\" }\nconst _hoisted_3 = /*#__PURE__*/_createVNode(\"img\", { src: _imports_0 }, null, -1)\nconst _hoisted_4 = { class: \"text-center\" }\nconst _hoisted_5 = {\n key: 0,\n class: \"fs_12 greyBlue\"\n}\nconst _hoisted_6 = /*#__PURE__*/_createVNode(\"div\", { class: \"sideContainer\" }, null, -1)\nconst _hoisted_7 = { class: \"postContainer\" }\nconst _hoisted_8 = { class: \"postLoader\" }\nconst _hoisted_9 = { class: \"d-flex align-items-center mb-4\" }\nconst _hoisted_10 = { class: \"userImage\" }\nconst _hoisted_11 = { class: \"fs_13 greyBlue d-block ln_12 mb-1\" }\nconst _hoisted_12 = { class: \"fs_10 greyBlue d-block ln_12\" }\nconst _hoisted_13 = /*#__PURE__*/_createVNode(\"div\", { class: \"d-flex align-items-center mt-3\" }, [\n /*#__PURE__*/_createVNode(\"img\", {\n src: _imports_1,\n class: \"me-2\"\n }),\n /*#__PURE__*/_createVNode(\"img\", { src: _imports_2 })\n], -1)\nconst _hoisted_14 = { class: \"footerButtonContainer\" }\nconst _hoisted_15 = { class: \"d-flex align-items-center\" }\n_popScopeId()\n\nexport const render = /*#__PURE__*/_withId((_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) => {\n const _component_localized_text = _resolveComponent(\"localized-text\")!\n const _component_uose_writer = _resolveComponent(\"uose-writer\")!\n const _component_preview_post_attachment = _resolveComponent(\"preview-post-attachment\")!\n const _component_file_selector = _resolveComponent(\"file-selector\")!\n const _directive_userimage = _resolveDirective(\"userimage\")!\n\n return (_openBlock(), _createBlock(\"div\", _hoisted_1, [\n _createVNode(\"div\", _hoisted_2, [\n _createVNode(\"div\", {\n class: \"sideContainer\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (_ctx.$emit('close')))\n }, [\n _hoisted_3\n ]),\n _createVNode(\"div\", _hoisted_4, [\n (_ctx.title)\n ? (_openBlock(), _createBlock(\"span\", _hoisted_5, _toDisplayString(_ctx.title), 1))\n : (_openBlock(), _createBlock(_component_localized_text, {\n key: 1,\n class: \"fs_12 greyBlue\",\n localizedKey: \"app_creaunpost\",\n text: \"Crea un post\"\n }))\n ]),\n _hoisted_6\n ]),\n _createVNode(\"div\", _hoisted_7, [\n _createVNode(\"div\", _hoisted_8, [\n _createVNode(\"div\", _hoisted_9, [\n _withDirectives(_createVNode(\"div\", _hoisted_10, null, 512), [\n [_directive_userimage, _ctx.$store.state.getUserImage(_ctx.$store.state.user.identifier)]\n ]),\n _createVNode(\"div\", null, [\n _createVNode(\"span\", _hoisted_11, _toDisplayString(_ctx.$store.state.user.name), 1),\n _createVNode(\"span\", _hoisted_12, _toDisplayString(_ctx.$filters.date(_ctx.todayDate, \"DD MMMM yyyy - HH:mm\")), 1)\n ])\n ]),\n _createVNode(_component_uose_writer, {\n modelValue: _ctx.vm.text,\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event: any) => (_ctx.vm.text = $event)),\n placeholderText: 'Scrivi qualcosa',\n placeholderKey: 'app_scriviqualcosa',\n \"max-height\": 200\n }, null, 8, [\"modelValue\"]),\n _createVNode(_component_preview_post_attachment, {\n preview: _ctx.preview,\n onRemoveAttachment: _ctx.removeAttachment\n }, null, 8, [\"preview\", \"onRemoveAttachment\"]),\n _createVNode(_component_file_selector, {\n modelValue: _ctx.vm.attachment,\n \"onUpdate:modelValue\": _cache[3] || (_cache[3] = ($event: any) => (_ctx.vm.attachment = $event)),\n accept: \".jpg, .jpeg, .png, .wav, .mp4, .pdf, .ppt, .mp3\"\n }, {\n default: _withId(() => [\n _hoisted_13\n ]),\n _: 1\n }, 8, [\"modelValue\"])\n ])\n ]),\n _createVNode(\"div\", _hoisted_14, [\n _createVNode(\"div\", _hoisted_15, [\n _createVNode(\"button\", {\n type: \"button\",\n class: \"genericButton bgWhite w-100 me-1\",\n onClick: _cache[4] || (_cache[4] = ($event: any) => (_ctx.$emit('close')))\n }, [\n _createVNode(_component_localized_text, {\n class: \"fs_14 spaceCadet\",\n localizedKey: \"app_annulla\",\n text: \"Annulla\"\n })\n ]),\n _createVNode(\"button\", {\n type: \"button\",\n class: \"genericButton bgGreyBlue w-100 ms-1\",\n onClick: _cache[5] || (_cache[5] = ($event: any) => (_ctx.doPost()))\n }, [\n _createVNode(_component_localized_text, {\n class: \"fs_14 white\",\n localizedKey: \"app_crea\",\n text: \"Crea\"\n })\n ])\n ])\n ])\n ]))\n})","\r\nimport { Options, Vue } from 'vue-class-component';\r\nimport { Prop, Watch } from 'vue-property-decorator';\r\nimport { getUniversalISOStringDate, makeFilePreview } from '@/utils';\r\nimport { CommunityClient, PostClient } from '@/services/Services';\r\nimport ProgressBar from '@/components/progressBar.vue';\r\nimport UoseWriter from '@/components/uoseWriter.vue';\r\nimport store from '@/store';\r\nimport * as OM from '@/model';\r\nimport * as VM from '@/viewModel';\r\n\r\n@Options({\r\n components: {\r\n ProgressBar,\r\n UoseWriter\r\n }\r\n})\r\nexport default class NewPostModal extends Vue {\r\n\r\n @Prop() title: string;\r\n @Prop() containerIdentifier: string;\r\n @Prop() postType: string;\r\n\r\n vm: VM.CreatePostVm = new VM.CreatePostVm();\r\n isCordova: boolean = !!window.cordova;\r\n uploading: boolean = false;\r\n uploadProgress: number = 0;\r\n todayDate: string = getUniversalISOStringDate(new Date());\r\n\r\n created() {\r\n this.vm.containerIdentifier = this.containerIdentifier;\r\n this.vm.postType = this.postType;\r\n }\r\n\r\n doPost() {\r\n delete this.vm.publishedDate;\r\n store.state.globalSpinner++;\r\n PostClient.createOrUpdatePost(this.vm)\r\n .then(x => {\r\n PostClient.updatePostImage(x, this.vm.attachment)\r\n .then(x => {\r\n this.$emit('close');\r\n })\r\n .finally(() => {\r\n store.state.globalSpinner--;\r\n this.uploading = false;\r\n });\r\n })\r\n }\r\n\r\n doRec: boolean = false;\r\n recbuffer: string = \"\";\r\n communities: OM.SearchResultVm[] = [];\r\n @Watch('vm.text')\r\n onTextChange(next, prev) {\r\n if(next.length - prev.length == 1){\r\n let lastLetter = next[next.length - 1];\r\n if(lastLetter == ' '){\r\n this.doRec = false;\r\n this.recbuffer = \"\";\r\n } else {\r\n if(this.doRec){\r\n this.recbuffer += lastLetter;\r\n this.searchCommunities(this.recbuffer);\r\n } else {\r\n if(lastLetter == '&'){\r\n this.doRec = true;\r\n }\r\n }\r\n }\r\n } else if(next.length - prev.length == -1) {\r\n this.recbuffer = this.recbuffer.substr(0, this.recbuffer.length - 1);\r\n this.searchCommunities(this.recbuffer);\r\n }\r\n }\r\n chatSearchCommunities: OM.SearchResultVm[] = [];\r\n searchCommunities(query) {\r\n CommunityClient.chatSearch(query)\r\n .then(x => {\r\n this.chatSearchCommunities = x;\r\n })\r\n }\r\n setCommunity(item: OM.SearchResultVm){\r\n this.communities\r\n }\r\n\r\n preview: any = null;\r\n @Watch('vm.attachment')\r\n onAttachmentChange(next, prev) {\r\n this.makePreview();\r\n }\r\n makePreview() {\r\n if(this.vm.attachment){\r\n if(typeof this.vm.attachment == \"string\"){\r\n this.preview = this.vm.attachment;\r\n } else {\r\n makeFilePreview(this.vm.attachment)\r\n .then(x => {\r\n this.preview = x;\r\n })\r\n }\r\n }\r\n }\r\n\r\n removeAttachment() {\r\n this.preview = \"\";\r\n this.vm.attachment = null;\r\n }\r\n\r\n}\r\n\r\n","import { render } from \"./newPostModal.vue?vue&type=template&id=3af260bb&scoped=true&ts=true\"\nimport script from \"./newPostModal.vue?vue&type=script&lang=ts\"\nexport * from \"./newPostModal.vue?vue&type=script&lang=ts\"\n\nimport \"./newPostModal.vue?vue&type=style&index=0&id=3af260bb&scoped=true&lang=css\"\n\nimport exportComponent from \"C:\\\\Users\\\\rekt\\\\source\\\\repos\\\\uose\\\\uoseapp_new\\\\node_modules\\\\vue-loader-v16\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-3af260bb\"]])\n\nexport default __exports__","\r\nimport { Options, Vue } from 'vue-class-component';\r\nimport { Watch } from 'vue-property-decorator';\r\nimport { CommunityClient, PostClient } from '@/services/Services';\r\nimport NewPostModal from '@/components/newPostModal.vue';\r\nimport Post from '@/components/post.vue';\r\nimport * as OM from '@/model';\r\nimport * as CONST from '@/const';\r\n\r\n@Options({\r\n components: {\r\n Post\r\n }\r\n})\r\nexport default class Bacheca extends Vue {\r\n\r\n posts: OM.PostVm[] = [];\r\n isFiera: boolean = false;\r\n communityIdentifier: string = \"\";\r\n\r\n created() {\r\n this.init();\r\n }\r\n \r\n @Watch(\"$route.params.slug\")\r\n async init() {\r\n var slug = this.$route.params.slug;\r\n\r\n if(!slug)\r\n return;\r\n\r\n this.isFiera = this.$route.path.indexOf(\"fiera\") > -1;\r\n var community = await CommunityClient.getBySlug(this.$route.params.slug.toString())\r\n this.communityIdentifier = community.identifier;\r\n\r\n PostClient.getByParent(community.identifier)\r\n .then(x => {\r\n this.posts = x;\r\n if(this.$route.query.f){\r\n setTimeout(() => {\r\n let post: any = this.$refs[this.$route.query.f];\r\n if(post){\r\n post.$el.classList.add('evidenzia');\r\n\r\n post.$el.scrollIntoView();\r\n setTimeout(() => {\r\n post.$el.classList.remove('evidenzia')\r\n }, 2000)\r\n }\r\n }, 200)\r\n }\r\n })\r\n }\r\n\r\n async newPost() {\r\n this.$opModal.show(NewPostModal, {\r\n containerIdentifier: this.communityIdentifier,\r\n postType: CONST.NotificationType.CommunityPostNew\r\n }, () => {\r\n this.init();\r\n });\r\n }\r\n\r\n onRemoved(postIdentifier: string, index: number) {\r\n this.posts.splice(index, 1);\r\n }\r\n\r\n}\r\n\r\n","import { render } from \"./bacheca.vue?vue&type=template&id=7561286d&ts=true\"\nimport script from \"./bacheca.vue?vue&type=script&lang=ts\"\nexport * from \"./bacheca.vue?vue&type=script&lang=ts\"\n\nimport exportComponent from \"C:\\\\Users\\\\rekt\\\\source\\\\repos\\\\uose\\\\uoseapp_new\\\\node_modules\\\\vue-loader-v16\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__"],"sourceRoot":""}