{"version":3,"sources":["webpack:///./src/modules/properties/api/properties.ts","webpack:///./src/modules/properties/components/PropertyOriginSelector.vue?c493","webpack:///./src/modules/properties/components/Properties.vue?1afa","webpack:///./src/modules/properties/components/PropertyOriginSelector.vue?ac11","webpack:///./src/modules/properties/components/PropertyOriginSelector.vue?0570","webpack:///./src/modules/properties/components/PropertyOriginSelector.vue?ec34","webpack:///./src/modules/properties/components/PropertyOriginSelector.vue","webpack:///./src/modules/properties/components/Properties.vue?40e1","webpack:///./src/modules/properties/components/Properties.vue?76ff","webpack:///./src/modules/properties/components/Properties.vue","webpack:///./src/modules/properties/components/Properties.vue?97f6"],"names":["this","MasterAccountId","state","auth","user","getProps","Promise","get","response","appResponse","data","IsSuccess","devices","Result","Error","ErrorCodes","join","updateProps","props","updateMasterAccountId","post","ConfigItems","render","_vm","_h","$createElement","_c","_self","directives","name","rawName","value","expression","staticClass","attrs","slot","_v","_s","$t","length","origins","on","updateSelectedOrigin","_e","selectedOrigin","updatePropsData","saveProps","staticRenderFns","model","callback","$$v","_l","item","key","origin","$emit","PropertyOriginSelector","component","loading","api","created","forEach","elem","propertyId","fixed","map","n","filter","i","ar","indexOf","appMessage","show","Integration","components","PropSettings"],"mappings":"4LAMA,aAGE,aACEA,KAAKC,gBAAkB,OAAMC,MAAMC,MAAQ,OAAMD,MAAMC,KAAKC,KACtD,OAAMF,MAAMC,KAAKC,KAAKH,gBACtB,KAwCV,OArCe,YAAAI,SAAb,W,kCAAyBC,SAAO,W,yEAG1B,SAAM,OAAoBC,IAAI,2B,OAGlC,GALMC,EAEF,SAEEC,EAA8CD,EAASE,KACzDD,EAAYE,UAEd,OADMC,EAA6BH,EAAYI,OAASJ,EAAYI,OAAS,GACtE,CAAP,EAAOD,GAEP,MAAM,IAAIE,MAAML,EAAYM,WAAWC,KAAK,cAInC,YAAAC,YAAb,SAAyBC,G,8HAKnB,OAJJlB,KAAKmB,wBACClB,EAAkBD,KAAKC,gBAGzB,GAAM,OAAoBmB,KAAK,+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EAAK6B,OAAS,IACxB7B,EAAKmD,SAAQ,SAACC,GACY,UAApBA,EAAKC,WACPD,EAAKE,OAAQ,EAEbF,EAAKE,OAAQ,KAGjBhE,KAAKwC,QAAc,OAAJ9B,QAAI,IAAJA,OAAI,EAAJA,EACXuD,KAAI,SAACC,GAAM,OAAAA,EAAEZ,UACda,QAAO,SAACf,EAAMgB,EAAGC,GAAO,OAAAA,EAAGC,QAAQlB,KAAUgB,KAChDpE,KAAKkB,MAAQR,GAAc,IAE7BV,KAAK0D,SAAU,E,YAIV,YAAAb,gBAAP,SAAuBnC,GACrBV,KAAKkB,MAAQR,GAGR,YAAAgC,qBAAP,SAA4BE,GAC1B5C,KAAK4C,eAAiBA,GAEX,YAAAE,UAAb,W,oHAGI,O,sBADA9C,KAAK0D,SAAU,EACf,GAAM1D,KAAK2D,IAAI1C,YAAYjB,KAAKkB,Q,cAAhC,SACAlB,KAAK0D,SAAU,EACfa,EAAA,KAAWC,KAAKxE,KAAKsC,GAAG,kCAAmC,W,6BAE3DtC,KAAK0D,SAAU,EACfa,EAAA,KAAWC,KAAKxE,KAAKsC,GAAG,gCAAiC,S,+BA/C1CmC,EAAW,gBAN/B,eAAU,CACTC,WAAY,CACVC,aAAY,OACZnB,uBAAsB,MAGLiB,GAkDrB,EAlDA,CAAyC,QAApB,IChDgW,ICQjX,G,UAAY,eACd,EACAnD,EACAyB,GACA,EACA,KACA,KACA,OAIa,e,yFCnBf","file":"js/chunk-6db721f8.9f3f43ea.js","sourcesContent":["import { ContactProperty } from 'modules/installation-wizard/classes/contactProperty';\nimport { AppResponse } from 'modules/core/interfaces/appResponse';\nimport AuthorizedApiClient from 'modules/auth/models/authorizedApiClient';\nimport { AxiosResponse } from 'axios';\nimport store from '@/store/index';\n\nexport class PropertiesApi {\n public MasterAccountId: string;\n\n public constructor() {\n this.MasterAccountId = store.state.auth && store.state.auth.user\n ? store.state.auth.user.MasterAccountId\n : null;\n }\n\n public async getProps(): Promise {\n const response: AxiosResponse<\n AppResponse\n > = await AuthorizedApiClient.get('/account/GetProperties');\n\n const appResponse: AppResponse = response.data;\n if (appResponse.IsSuccess) {\n const devices: ContactProperty[] = appResponse.Result ? appResponse.Result : [];\n return devices;\n } else {\n throw new Error(appResponse.ErrorCodes.join(','));\n }\n }\n\n public async updateProps(props: ContactProperty[]) {\n this.updateMasterAccountId();\n const MasterAccountId = this.MasterAccountId;\n const response: AxiosResponse<\n AppResponse\n > = await AuthorizedApiClient.post('/contact/ConfigureProperties', {\n MasterAccountId,\n ConfigItems: props,\n });\n\n const appResponse: AppResponse = response.data;\n if (appResponse.IsSuccess) {\n return appResponse.Result;\n } else {\n throw new Error(appResponse.ErrorCodes.join(','));\n }\n }\n\n private updateMasterAccountId() {\n this.MasterAccountId = store.state.auth && store.state.auth.user\n ? store.state.auth.user.MasterAccountId\n : null;\n }\n}\n\n","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PropertyOriginSelector.vue?vue&type=style&index=0&id=59819408&prod&lang=css\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:\"loading\",rawName:\"v-loading\",value:(_vm.loading),expression:\"loading\"}],staticClass:\"page-properties\"},[_c('el-card',[_c('div',{attrs:{\"slot\":\"header\"},slot:\"header\"},[_c('span',{staticClass:\"card-title\"},[_vm._v(_vm._s(_vm.$t('integrations.integration.props')))])]),(_vm.props.length > 0)?_c('property-origin-selector',{attrs:{\"origins\":_vm.origins},on:{\"update\":_vm.updateSelectedOrigin}}):_vm._e(),(_vm.props.length > 0)?_c('prop-settings',{attrs:{\"data\":_vm.props,\"origin\":_vm.selectedOrigin},on:{\"update\":_vm.updatePropsData}}):_vm._e(),(_vm.props.length > 0)?_c('el-button',{staticClass:\"save-props\",attrs:{\"size\":\"small\",\"type\":\"primary\",\"plain\":\"\"},on:{\"click\":_vm.saveProps}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('integrations.integration.save'))+\"\\n \")]):_vm._e(),(_vm.props.length <= 0)?_c('div',[_vm._v(\"\\n \"+_vm._s(_vm.$t('properties.noProps'))+\"\\n \")]):_vm._e()],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('el-select',{staticClass:\"selector\",attrs:{\"clearable\":\"\",\"placeholder\":_vm.$t('properties.selectSource')},on:{\"change\":_vm.updateSelectedOrigin},model:{value:(_vm.value),callback:function ($$v) {_vm.value=$$v},expression:\"value\"}},_vm._l((_vm.origins),function(item){return _c('el-option',{key:item,attrs:{\"label\":item,\"value\":item}})}),1),_c('br'),_c('br')],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\n\n@Component\nexport default class PropertyOriginSelector extends Vue {\n @Prop() public origins!: string[];\n public value: string = '';\n\n public updateSelectedOrigin(origin: string) {\n this.$emit('update', origin);\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/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PropertyOriginSelector.vue?vue&type=script&lang=ts\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PropertyOriginSelector.vue?vue&type=script&lang=ts\"","import { render, staticRenderFns } from \"./PropertyOriginSelector.vue?vue&type=template&id=59819408\"\nimport script from \"./PropertyOriginSelector.vue?vue&type=script&lang=ts\"\nexport * from \"./PropertyOriginSelector.vue?vue&type=script&lang=ts\"\nimport style0 from \"./PropertyOriginSelector.vue?vue&type=style&index=0&id=59819408&prod&lang=css\"\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","\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 { Component, Vue } from 'vue-property-decorator';\nimport { PropertiesApi } from '../api/properties';\nimport PropSettings from 'modules/common/components/PropSettings.vue';\nimport appMessage from 'modules/core/models/appMessage';\nimport { ContactProperty } from 'modules/installation-wizard/classes/contactProperty';\nimport PropertyOriginSelector from './PropertyOriginSelector.vue';\n\n@Component({\n components: {\n PropSettings,\n PropertyOriginSelector,\n },\n})\nexport default class Integration extends Vue {\n public loading: boolean = false;\n public props: ContactProperty[] = [];\n public origins: string[] = []\n public selectedOrigin: string = '';\n private api: PropertiesApi;\n\n constructor() {\n super();\n this.api = new PropertiesApi();\n }\n\n public async created() {\n this.loading = true;\n const data = await this.api.getProps();\n if (data && data.length > 0) {\n data.forEach((elem: ContactProperty) => {\n if (elem.propertyId === 'cname') {\n elem.fixed = true;\n } else {\n elem.fixed = false;\n }\n });\n this.origins = data\n ?.map((n) => n.origin)\n .filter((item, i, ar) => ar.indexOf(item) === i);\n this.props = data ? data : [];\n }\n this.loading = false;\n }\n \n\n public updatePropsData(data: ContactProperty[]) {\n this.props = data;\n }\n\n public updateSelectedOrigin(selectedOrigin: string){\n this.selectedOrigin = selectedOrigin;\n }\n public async saveProps() {\n try {\n this.loading = true;\n await this.api.updateProps(this.props);\n this.loading = false;\n appMessage.show(this.$t('properties.propsUpdatedSuccess'), 'success');\n } catch (error) {\n this.loading = false;\n appMessage.show(this.$t('properties.propsUpdatedError'), 'error');\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/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Properties.vue?vue&type=script&lang=ts\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Properties.vue?vue&type=script&lang=ts\"","import { render, staticRenderFns } from \"./Properties.vue?vue&type=template&id=775fe007\"\nimport script from \"./Properties.vue?vue&type=script&lang=ts\"\nexport * from \"./Properties.vue?vue&type=script&lang=ts\"\nimport style0 from \"./Properties.vue?vue&type=style&index=0&id=775fe007&prod&lang=scss\"\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 * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Properties.vue?vue&type=style&index=0&id=775fe007&prod&lang=scss\""],"sourceRoot":""}