{"version":3,"sources":["webpack:///./src/store/modules/chat/state/index.js","webpack:///./src/store/modules/chat/getters/index.js","webpack:///./src/store/modules/chat/mutations/index.js","webpack:///./src/queries/modules/chat/chat.js","webpack:///./src/store/modules/chat/actions/index.js","webpack:///./src/store/modules/chat/index.js","webpack:///./src/developing/components/communication/subcomponents/Chat/TopicCard--OLD.vue?c979","webpack:///src/developing/components/communication/subcomponents/Chat/TopicCard--OLD.vue","webpack:///./src/developing/components/communication/subcomponents/Chat/TopicCard--OLD.vue?8a83","webpack:///./src/developing/components/communication/subcomponents/Chat/TopicCard--OLD.vue"],"names":["chatrooms","getChatrooms","state","classrooms","setError","generic","setSuccess","setProcessing","storeChatrooms","data","id","purgeClassroom","GET_CHATROOMS","gql","GET_CHATROOMS_BY_FILTER","GET_CHATROOM_BY_ID","GET_CHATROOM_BY_ASSOCIATIVE_KEY","SEND_CHATMESSAGES","context","commit","apolloClient","query","fetchPolicy","clientName","result","getChatRooms","status","success","error","message","console","log","full","getChatroomsByFilter","getChatroomById","Error","variables","chatroom","getChatRoomById","getChatroomByAssociativeKey","payload","getChatRoomByAssociativeKey","sendChatMessages","mutate","mutation","chatMessageSentResult","namespaced","getters","mutations","actions","render","_vm","this","_h","$createElement","_c","_self","attrs","slot","staticRenderFns","components","ChatUI","props","type","Object","required","beforeCreate","$store","Chat","registerModule","component"],"mappings":"osBAAe,OACbA,UAAW,ICDN,SAASC,EAAaC,GAC3B,OAAOA,EAAMC,W,gBCCFC,EAAWC,OACXC,EAAaD,OACbE,EAAgBF,OAEtB,SAASG,EAAeN,EAAOO,GACpCP,EAAMF,UAAUS,EAAKC,IAAMD,EAGtB,SAASE,EAAeT,GAC7BA,EAAMF,UAAY,G,0ECFPY,EAAgBC,eAAH,iGAgBbC,EAA0BD,eAAH,iHAevBE,EAAqBF,eAAH,6YA+BlBG,EAAkCH,eAAH,qdAgC/BI,EAAoBJ,eAAH,mRCjFvB,SAAeZ,EAAtB,kC,8DAAO,WAA4BiB,GAA5B,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EC,SAAS,EAAOC,OAAO,EAAMC,QAAS,GAAIG,KAAM,EAAF,MAzB9D,0D,wBC5KQ,cACbc,YAAY,EACZC,UACAC,YACAC,UACA/C,U,yCCVF,IAAIgD,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACA,EAAG,UAAU,CAACA,EAAG,SAAS,CAACE,MAAM,CAAC,KAAO,UAAU,UAAY,IAAIC,KAAK,aAAa,IAAI,IAC/LC,EAAkB,G,4CCgBtB,GACEC,WAAY,CACVC,OAAQ,WAAZ,oHAEEC,MAAO,CACLrD,KAAM,CACJsD,KAAMC,OACNC,UAAU,IAGdC,aAVF,WAWSd,KAAKe,OAAOjE,MAAMkE,MAAMhB,KAAKe,OAAOE,eAAe,OAAQ,EAApE,cC5BoZ,I,YCOhZC,EAAY,eACd,EACApB,EACAS,GACA,EACA,KACA,KACA,MAIa,aAAAW,E","file":"js/chunk-4670fcf2.becf60b1.js","sourcesContent":["export default {\n chatrooms: {}\n}\n","export function getChatrooms(state) {\n return state.classrooms;\n}\n","import * as generic from \"@/store/generic/mutations/result-status.js\";\n\nexport const setError = generic.setError;\nexport const setSuccess = generic.setSuccess;\nexport const setProcessing = generic.setProcessing;\n\nexport function storeChatrooms(state, data) {\n state.chatrooms[data.id] = data;\n}\n\nexport function purgeClassroom(state) {\n state.chatrooms = {};\n}\n","import { gql } from \"apollo-boost\";\n\n/* \n * extend type Query {\n * getChatrooms\n * : [ChatRoom]\n * }\n */\n\nexport const GET_CHATROOMS = gql`\n query getChatRooms {\n getChatRooms {\n id\n }\n }\n`;\n\n/* \n * extend type Query {\n * getChatRoomsByFilter\n * : [ChatRoom]\n * }\n */\n\n\nexport const GET_CHATROOMS_BY_FILTER = gql`\n query getChatRoomsByFilter {\n getChatRoomsByFilter {\n id\n }\n }\n`;\n\n/* \n * extend type Query {\n * getChatRoomById\n * : ChatRoom\n * }\n */\n\nexport const GET_CHATROOM_BY_ID = gql`\n query getChatRoomById ($id: ID!, $userUUID: String) {\n getChatRoomById (\n id: $id\n userUUID: $userUUID\n )\n {\n id\n chatMessageSet {\n id\n meta {\n date\n timestamp\n length\n }\n messages\n previousMessages\n }\n members\n activeUserList\n }\n }\n`;\n\n/* \n * extend type Query {\n * getChatRoomByAssociativeKey\n * : ChatRoom\n * }\n */\n\nexport const GET_CHATROOM_BY_ASSOCIATIVE_KEY = gql`\n query getChatRoomByAssociativeKey (\n $associateFeatureInput: [ChatAssociateFeatureInput]!\n ) {\n getChatRoomByAssociativeKey (\n associateFeatureInput: $associateFeatureInput\n )\n {\n id\n chatMessageSet {\n id\n meta {\n date\n timestamp\n length\n }\n messages\n previousMessages\n }\n members\n activeUserList\n } \n }\n`;\n\n/* \n * extend type Query {\n * sendChatMessages\n * : ChatRoom\n * }\n */\n\nexport const SEND_CHATMESSAGES = gql`\n mutation sendChatMessages (\n $chatroomID: ID!\n $chatMessagesInput: [ChatMessageInput]!\n ) {\n sendChatMessages (\n chatroomID: $chatroomID,\n chatMessagesInput: $chatMessagesInput\n )\n {\n id\n } \n }\n`;\n","/* eslint-disable no-console, no-case-declarations, no-unused-vars */\n// import axios from \"axios\";\nimport { apolloClient } from \"@/setup/apollo-setup\";\n// import { serverResponseStatusSet, error } from '@/utils/notification';\n\nimport {\n GET_CHATROOMS,\n GET_CHATROOMS_BY_FILTER,\n GET_CHATROOM_BY_ID,\n GET_CHATROOM_BY_ASSOCIATIVE_KEY,\n SEND_CHATMESSAGES,\n} from '@/queries/modules/chat/chat.js';\n\n/**\n * Action to Get All Chatroom List\n * ** Use it for development purpose only **\n *\n * @param {Object} context Vuex context object.\n * @property {Vuex method (Function)} commit : \"To commit a mutation\"\n *\n */\n\nexport async function getChatrooms(context) {\n // WIP\n const { commit } = context;\n commit('setProcessing', true);\n\n try {\n const result = await apolloClient\n .query({\n query: GET_CHATROOMS,\n fetchPolicy: 'network-only',\n context: { clientName: 'Prisma2' }\n })\n\n const { data } = await result;\n\n const chatrooms = data.getChatRooms;\n commit(\"storeChatrooms\", chatrooms)\n\n return { status: { success: true, error: false, message: \"\" }, data: chatrooms };\n\n } catch (e) {\n console.log(e);\n // commit('setError', serverResponseStatusSet(e));\n return { status: { success: false, error: true, message: \"\", full: e }};\n }\n}\n\n\n/**\n * Action to Get All Chatroom List by Filter (Reduce total chatroom to necessary amount)\n *\n * @param {Object} context Vuex context object.\n * @property {Vuex method (Function)} commit : \"To commit a mutation\"\n *\n */\n\nexport async function getChatroomsByFilter(context) {\n // WIP\n const { commit } = context;\n commit('setProcessing', true);\n\n try {\n const result = await apolloClient\n .query({\n query: GET_CHATROOMS_BY_FILTER,\n fetchPolicy: 'network-only',\n context: { clientName: 'Prisma2' }\n })\n\n const { data } = await result;\n\n const chatrooms = data.getChatRooms;\n commit(\"storeChatrooms\", chatrooms)\n\n return { status: { success: true, error: false, message: \"\" }, data: chatrooms };\n\n } catch (e) {\n console.log(e);\n // commit('setError', serverResponseStatusSet(e));\n return { status: { success: false, error: true, message: \"\", full: e }};\n }\n}\n\n\n/**\n * Action to Get Chatroom By Id\n *\n * @param {Object} context Vuex context object.\n * @property {Vuex method (Function)} commit : \"To commit a mutation\"\n *\n */\n\nexport async function getChatroomById(context, { id }) {\n // WIP\n const { commit } = context;\n commit('setProcessing', true);\n\n try {\n if (!id) throw new Error(\"No Chatroom Id\");\n\n const variables = {\n id\n }\n\n console.log(id);\n\n const result = await apolloClient\n .query({\n query: GET_CHATROOM_BY_ID,\n variables,\n fetchPolicy: 'network-only',\n context: { clientName: 'Prisma2' }\n })\n\n const { data } = await result;\n\n const chatroom = data.getChatRoomById;\n // TODO: Update Chatroom to Store and Cache;\n\n return { status: { success: true, error: false, message: \"\" }, data: chatroom };\n\n } catch (e) {\n console.log(e);\n // commit('setError', serverResponseStatusSet(e));\n return { status: { success: false, error: true, message: \"\", full: e }};\n }\n}\n\n\n/**\n * Action to Get Chatroom By Associative Key (Feature name and its ID)\n *\n * @param {Object} context Vuex context object.\n * @property {Vuex method (Function)} commit : \"To commit a mutation\"\n *\n */\n\nexport async function getChatroomByAssociativeKey(context, payload) {\n // WIP\n const { commit } = context;\n commit('setProcessing', true);\n\n const variables = payload;\n\n try {\n const result = await apolloClient\n .query({\n query: GET_CHATROOM_BY_ASSOCIATIVE_KEY,\n variables,\n fetchPolicy: 'network-only',\n context: { clientName: 'Prisma2' }\n });\n\n const { data } = result;\n\n const chatroom = data.getChatRoomByAssociativeKey;\n\n return { status: { success: true, error: false, message: \"\" }, data: chatroom };\n\n } catch (e) {\n console.log(e);\n // commit('setError', serverResponseStatusSet(e));\n return { status: { success: false, error: true, message: \"\", full: e }};\n }\n}\n\n\n/**\n * Action to Send Chat Message\n *\n * @param {Object} context Vuex context object.\n * @property {Vuex method (Function)} commit : \"To commit a mutation\"\n *\n */\n\nexport async function sendChatMessages(context, payload) {\n const { commit } = context;\n commit('setProcessing', true);\n\n // const { chatroomId, chatMessagesInput } = payload;\n const variables = payload;\n\n try {\n const result = await apolloClient\n .mutate({\n mutation: SEND_CHATMESSAGES,\n variables,\n context: { clientName: 'Prisma2' }\n });\n\n const { data } = result;\n\n const chatMessageSentResult = data.sendChatMessages;\n // commit(\"storeChatrooms\", chatrooms)\n\n return { status: { success: true, error: false, message: \"\" }, data: chatMessageSentResult };\n\n } catch (e) {\n console.log(e);\n // commit('setError', serverResponseStatusSet(e));\n return { status: { success: false, error: true, message: \"\", full: e }};\n }\n}\n","import state from \"./state\";\nimport * as getters from \"./getters\";\nimport * as mutations from \"./mutations\";\nimport * as actions from \"./actions\";\n\nexport default {\n namespaced: true,\n getters,\n mutations,\n actions,\n state\n};\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('vx-card',[_c('ChatUI',{attrs:{\"slot\":\"no-body\",\"activator\":[]},slot:\"no-body\"})],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n \n \n \n \n
\n \n \n \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!./TopicCard--OLD.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!./TopicCard--OLD.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./TopicCard--OLD.vue?vue&type=template&id=e1ce152e&\"\nimport script from \"./TopicCard--OLD.vue?vue&type=script&lang=js&\"\nexport * from \"./TopicCard--OLD.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"],"sourceRoot":""}