{"version":3,"sources":["webpack:///./src/views/helpdesk/Wrapper.vue?942d","webpack:///src/views/helpdesk/Wrapper.vue","webpack:///./src/views/helpdesk/Wrapper.vue?56a6","webpack:///./src/views/helpdesk/Wrapper.vue","webpack:///./node_modules/@quisit/mipe-utils/mixins/storeGenerator/reusableModule.js","webpack:///./node_modules/@quisit/mipe-utils/mixins/storeGenerator/helpers.js","webpack:///./node_modules/@quisit/mipe-utils/mixins/storeGenerator/index.js"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticRenderFns","name","mixins","data","component","state","points","mutations","model","namespaced","unRegisterStore","store","undefined","unregisterModule","registerStore","module","preserveState","registerModule","namespace","namespacedHelpers","unRegisterMixin","$store","moduleName","sessionStorage","removeItem","shouldRecovery","shouldUseSessionStorage","computed","watch","storeGeneratorMixinCreated","mapMutations","reusableModule","setStateDynamicModule","immediate","window","addEventListener","registerDestroyOnRefresh","recoveryData","removeEventListener","methods","$destroy","$options","JSON","parse","getItem","models","Object","keys","dataWithoutReference","forEach","toSave","setItem","stringify","args","exclude","length","$data","property","includes","arg","persistLazyData"],"mappings":"yHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,gBAC/FE,EAAkB,G,YCOtB,mBAEA,GACEC,KAAM,kBACNC,OAAQ,CAAC,EAAX,aACEC,KAAM,WAAR,OACA,gBCdgW,I,YCO5VC,EAAY,eACd,EACAX,EACAO,GACA,EACA,KACA,KACA,MAIa,aAAAI,E,+EClBA,OACbC,MAAO,KAAM,CACXF,KAAM,GACNG,OAAQ,KAEVC,UAAW,CACV,sBAAsBF,EAAOG,GAC1BH,EAAMF,KAAOK,IAGjBC,YAAY,G,YCRP,MAAMC,EAAkB,CAACC,EAAMV,UACZW,GAArBD,EAAMN,MAAMJ,IACbU,EAAME,iBAAiBZ,IAIda,EAAgB,CAACH,EAAOV,EAAMc,EAAQC,UACzBJ,G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oB,KAAKU,UAAUF,KAG3D,YAAYG,EAAO,GAAIC,GAAU,GAC/B,IAAIJ,EAAS,GAEK,GAAfG,EAAKE,OACNL,EAASvD,KAAK6D,MAGXF,EACDR,OAAOC,KAAKpD,KAAK6D,OAAOP,QAAQQ,IAC1BJ,EAAKK,SAASD,KAChBP,EAAOO,GAAY9D,KAAK8D,MAI5BJ,EAAKJ,QAAQU,IACXT,EAAOS,GAAOhE,KAAKgE,KAMzBhE,KAAKiE,gBAAgB,CAAE,CAACjE,KAAK8C,SAASxC,MAAOiD","file":"js/chunk-b5283bea.b566feda.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('router-view')}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\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!./Wrapper.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!./Wrapper.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Wrapper.vue?vue&type=template&id=56b49904&\"\nimport script from \"./Wrapper.vue?vue&type=script&lang=js&\"\nexport * from \"./Wrapper.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","export default {\n state: () => ({\n data: {},\n points: {}\n }),\n mutations: {\n setStateDynamicModule(state, model) {\n state.data = model;\n },\n },\n namespaced: true,\n};","import { createNamespacedHelpers } from 'vuex';\n\nexport const unRegisterStore = (store,name) => {\n if(store.state[name] != undefined){\n store.unregisterModule(name);\n }\n}\n\nexport const registerStore = (store, name, module, preserveState) => {\n if(store.state[name] == undefined){\n store.registerModule(name, module, { preserveState });\n }\n\n return {\n namespace: name,\n namespacedHelpers: createNamespacedHelpers(name),\n };\n}","import reusableModule from \"./reusableModule\";\nimport { registerStore, unRegisterStore } from \"./helpers\";\n\nexport const unRegisterMixin = { \n destroyed() {\n unRegisterStore(this.$store, this.moduleName || \"moduleGenerated\");\n sessionStorage.removeItem(this.moduleName || \"moduleGenerated\");\n },\n}\n\nexport default {\n data(){\n //config variables\n return {\n //change value in method created of component\n shouldRecovery: true,\n shouldUseSessionStorage: true,\n moduleName: \"moduleGenerated\", // you can change name module in implementation component\n }\n },\n computed: {\n moduleData(){\n return this.$store.state[this.moduleName].data;\n }\n },\n watch: {\n storeGeneratorMixinCreated: {\n handler(){\n const { namespacedHelpers : { mapMutations } } = registerStore(this.$store, this.moduleName, reusableModule, false);\n let mutations = mapMutations([\"setStateDynamicModule\"]);\n // set mutations in methods\n this[\"setStateDynamicModule\"] = mutations.setStateDynamicModule;\n },\n immediate: true\n }\n },\n created(){\n window.addEventListener('beforeunload', this.registerDestroyOnRefresh)\n },\n mounted(){\n this.recoveryData();\n },\n destroyed() {\n window.removeEventListener('beforeunload', this.registerDestroyOnRefresh);\n },\n methods: {\n registerDestroyOnRefresh(){\n this.$destroy();\n },\n recoveryData(){\n\n let data = this.$store.state[this.moduleName].data[this.$options.name] || \n (JSON.parse(sessionStorage.getItem(this.moduleName)) || {})[this.$options.name];\n\n if(this.shouldRecovery && data){\n let models = Object.keys(data);\n let dataWithoutReference = {...data};\n\n models.forEach(model => {\n this[model] = dataWithoutReference[model];\n })\n }\n },\n persistLazyData(toSave){\n\n const data = {\n ...this.$store.state[this.moduleName].data,\n ...toSave\n }\n\n this.setStateDynamicModule(data);\n\n if(this.shouldUseSessionStorage)\n sessionStorage.setItem(this.moduleName, JSON.stringify(toSave));\n \n },\n persistData(args = [], exclude = false){\n let toSave = {};\n\n if(args.length == 0)\n toSave = this.$data;\n else {\n \n if(exclude){\n Object.keys(this.$data).forEach(property => {\n if(!args.includes(property)){\n toSave[property] = this[property];\n }\n });\n } else {\n args.forEach(arg => {\n toSave[arg] = this[arg];\n });\n }\n\n }\n\n this.persistLazyData({ [this.$options.name]: toSave });\n }\n },\n}"],"sourceRoot":""}