platypush/platypush/backend/http/webapp/dist/static/js/chunk-31bc5041.821f5281.js.map

1 line
10 KiB
Plaintext

{"version":3,"sources":["webpack:///./src/components/panels/Switches/Index.vue","webpack:///./src/components/panels/Switches/Index.vue?93e8","webpack:///./src/components/panels/Switches/Index.vue?1a65","webpack:///./src/components/panels/Switches lazy ^\\.\\/.*\\/Index$ namespace object"],"names":["class","loading","Object","keys","plugins","length","pluginName","key","selectedPlugin","bus","emit","title","disabled","components","config","plugin-name","selected","refresh","name","Loading","mixins","Utils","data","methods","initPanels","this","forEach","componentName","split","map","token","toUpperCase","slice","join","comp","component","$options","request","mounted","render","__scopeId","webpackAsyncContext","req","__webpack_require__","o","Promise","resolve","then","e","Error","code","ids","id","all","module","exports"],"mappings":"8NACOA,MAAM,sB,GAGJA,MAAM,kB,SACJA,MAAM,c,SAMFA,MAAM,iB,EAEP,eAAwB,KAArBA,MAAM,cAAY,S,GAY1BA,MAAM,kB,EAEP,eAAwB,KAArBA,MAAM,cAAY,S,wGA1B3B,eA6BM,MA7BN,EA6BM,CA5BW,EAAAC,S,iBAAf,eAA0B,Y,sBAE1B,eAmBM,MAnBN,EAmBM,CAlB2BC,OAAOC,KAAK,EAAAC,SAASC,O,wCAApD,eAA8F,MAA9F,EAA4D,kC,mBAE5D,eAeM,2BAf0CH,OAAOC,KAAK,EAAAC,UAAO,SAAjCE,G,wBAAlC,eAeM,OAfDN,MAAM,gBAA4DO,IAAKD,EACtE,QAAK,mBAAE,EAAAE,eAAiB,EAAAA,iBAAmBF,EAAU,KAAUA,I,CACnE,eAOM,OAPDN,MAAK,CAAC,SAAQ,UAAoB,EAAAQ,iBAAmBF,K,CACxD,eAA+C,OAA1CN,MAAM,c,YAAc,eAAkB,I,wBACV,EAAAQ,iBAAmBF,G,iBAApD,eAIM,MAJN,EAIM,CAHJ,eAES,UAFA,QAAK,mCAAO,EAAAG,IAAIC,KAAI,UAAYJ,KAAU,UAAGK,MAAM,iBAAkBC,SAAU,EAAAX,S,CACtF,G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OACA,iBACA,iBACA,kBAED,sBAAuB,CACtB,OACA,iBACA,iBACA,kBAED,0BAA2B,CAC1B,OACA,iBACA,iBACA,kBAED,uBAAwB,CACvB,OACA,iBACA,iBACA,kBAED,qBAAsB,CACrB,OACA,iBACA,iBACA,kBAED,qBAAsB,CACrB,OACA,iBACA,iBACA,kBAED,gBAAiB,CAChB,OACA,iBACA,iBACA,mBAGF,SAASY,EAAoBC,GAC5B,IAAIC,EAAoBC,EAAEf,EAAKa,GAC9B,OAAOG,QAAQC,UAAUC,MAAK,WAC7B,IAAIC,EAAI,IAAIC,MAAM,uBAAyBP,EAAM,KAEjD,MADAM,EAAEE,KAAO,mBACHF,KAIR,IAAIG,EAAMtB,EAAIa,GAAMU,EAAKD,EAAI,GAC7B,OAAON,QAAQQ,IAAIF,EAAInB,MAAM,GAAGH,IAAIc,EAAoBK,IAAID,MAAK,WAChE,OAAOJ,EAAoBS,MAG7BX,EAAoBtC,KAAO,WAC1B,OAAOD,OAAOC,KAAK0B,IAEpBY,EAAoBW,GAAK,OACzBE,EAAOC,QAAUd","file":"static/js/chunk-31bc5041.821f5281.js","sourcesContent":["<template>\n <div class=\"switches-container\">\n <Loading v-if=\"loading\" />\n\n <div class=\"switch-plugins\">\n <div class=\"no-content\" v-if=\"!Object.keys(plugins).length\">No switch plugins configured</div>\n\n <div class=\"switch-plugin\" v-for=\"pluginName in Object.keys(plugins)\" :key=\"pluginName\"\n @click=\"selectedPlugin = selectedPlugin === pluginName ? null : pluginName\">\n <div class=\"header\" :class=\"{selected: selectedPlugin === pluginName}\">\n <div class=\"name col-10\" v-text=\"pluginName\" />\n <div class=\"refresh col-2\" v-if=\"selectedPlugin === pluginName\">\n <button @click.stop=\"bus.emit('refresh', pluginName)\" title=\"Refresh plugin\" :disabled=\"loading\">\n <i class=\"fa fa-sync\" />\n </button>\n </div>\n </div>\n\n <div class=\"body\" :class=\"{hidden: selectedPlugin !== pluginName}\">\n <component :is=\"components[pluginName]\" :config=\"plugins[pluginName]\" :plugin-name=\"pluginName\"\n :selected=\"selectedPlugin === pluginName\" :bus=\"bus\" />\n </div>\n </div>\n </div>\n\n <div class=\"refresh-button\">\n <button @click=\"refresh\" :disabled=\"loading\" title=\"Refresh plugins\">\n <i class=\"fa fa-sync\" />\n </button>\n </div>\n </div>\n</template>\n\n<script>\nimport Loading from \"@/components/Loading\";\nimport Utils from \"@/Utils\";\nimport {defineAsyncComponent} from \"vue\";\nimport mitt from \"mitt\";\n\nexport default {\n name: \"Switches\",\n components: {Loading},\n mixins: [Utils],\n\n data() {\n return {\n loading: false,\n plugins: {},\n components: {},\n selectedPlugin: null,\n bus: mitt(),\n }\n },\n\n methods: {\n initPanels() {\n this.components = {}\n\n Object.keys(this.plugins).forEach(async (pluginName) => {\n const componentName = pluginName.split('.').map((token) => token[0].toUpperCase() + token.slice(1)).join('')\n let comp = null\n try {\n comp = await import(`@/components/panels/Switches/${componentName}/Index`)\n } catch (e) {\n return\n }\n\n const component = defineAsyncComponent(async () => { return comp })\n this.$options.components[pluginName] = component\n this.components[pluginName] = component\n })\n },\n\n async refresh() {\n this.loading = true\n\n try {\n this.plugins = await this.request('utils.get_switch_plugins')\n this.initPanels()\n } finally {\n this.loading = false\n }\n },\n },\n\n mounted() {\n this.refresh()\n },\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import \"vars\";\n\n.switches-container {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n overflow: auto;\n\n .switch-plugins {\n background: $background-color;\n display: flex;\n flex-direction: column;\n box-shadow: $border-shadow-bottom-right;\n\n @media screen and (max-width: calc(#{$tablet - 1px})) {\n width: 100%;\n }\n\n @media screen and (min-width: $tablet) {\n width: 90%;\n border-radius: 1em;\n margin-top: 2em;\n }\n\n @media screen and (min-width: $desktop) {\n width: 500pt;\n margin-top: 3em;\n }\n }\n\n .no-content {\n padding: 1.5em;\n }\n\n .switch-plugin {\n display: flex;\n flex-direction: column;\n\n .header {\n display: flex;\n align-items: center;\n padding: 1em 1.5em 1em .5em;\n text-transform: uppercase;\n letter-spacing: .075em;\n border-bottom: $default-border-2;\n cursor: pointer;\n\n &:hover {\n background: $hover-bg;\n }\n\n &.selected {\n background: $selected-bg;\n box-shadow: $border-shadow-bottom-right;\n border: none;\n }\n\n .refresh {\n text-align: right;\n }\n\n button {\n padding: 0;\n margin: 0;\n border: none;\n background: none;\n\n &:hover {\n color: $default-hover-fg-2;\n }\n }\n }\n\n @media screen and (min-width: $tablet) {\n &:first-child {\n .header {\n border-radius: 1em 1em 0 0;\n }\n }\n\n &:last-child {\n .header {\n border-radius: 0 0 1em 1em;\n }\n }\n }\n\n .body {\n display: flex;\n border: $default-border-2;\n border-bottom: 0;\n box-shadow: $border-shadow-bottom;\n }\n }\n\n .refresh-button {\n position: fixed;\n bottom: 1.5em;\n right: 1.5em;\n\n button {\n width: 4em;\n height: 4em;\n border-radius: 2em;\n background: $refresh-button-bg;\n color: $refresh-button-fg;\n border: none;\n box-shadow: $border-shadow-bottom-right;\n\n &:hover {\n color: $default-hover-fg-2;\n }\n\n &:disabled {\n opacity: .7;\n }\n }\n }\n}\n</style>\n","import { render } from \"./Index.vue?vue&type=template&id=eac2ea44&scoped=true\"\nimport script from \"./Index.vue?vue&type=script&lang=js\"\nexport * from \"./Index.vue?vue&type=script&lang=js\"\n\nimport \"./Index.vue?vue&type=style&index=0&id=eac2ea44&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-eac2ea44\"\n\nexport default script","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader-v16/dist/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-v16/dist/index.js??ref--0-1!./Index.vue?vue&type=style&index=0&id=eac2ea44&lang=scss&scoped=true\"","var map = {\n\t\"./LightHue/Index\": [\n\t\t\"0219\",\n\t\t\"chunk-06539e5d\",\n\t\t\"chunk-5d632024\",\n\t\t\"chunk-e017dc3e\"\n\t],\n\t\"./Smartthings/Index\": [\n\t\t\"6e68\",\n\t\t\"chunk-06539e5d\",\n\t\t\"chunk-5d632024\",\n\t\t\"chunk-972487d6\"\n\t],\n\t\"./SwitchSwitchbot/Index\": [\n\t\t\"5083\",\n\t\t\"chunk-06539e5d\",\n\t\t\"chunk-5d632024\",\n\t\t\"chunk-0021f7ee\"\n\t],\n\t\"./SwitchTplink/Index\": [\n\t\t\"d11f\",\n\t\t\"chunk-06539e5d\",\n\t\t\"chunk-5d632024\",\n\t\t\"chunk-c4aee99e\"\n\t],\n\t\"./SwitchWemo/Index\": [\n\t\t\"bedd\",\n\t\t\"chunk-06539e5d\",\n\t\t\"chunk-5d632024\",\n\t\t\"chunk-60dbbc82\"\n\t],\n\t\"./ZigbeeMqtt/Index\": [\n\t\t\"65d6\",\n\t\t\"chunk-06539e5d\",\n\t\t\"chunk-5d632024\",\n\t\t\"chunk-07773226\"\n\t],\n\t\"./Zwave/Index\": [\n\t\t\"e170\",\n\t\t\"chunk-06539e5d\",\n\t\t\"chunk-5d632024\",\n\t\t\"chunk-0827360a\"\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(function() {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn Promise.all(ids.slice(1).map(__webpack_require__.e)).then(function() {\n\t\treturn __webpack_require__(id);\n\t});\n}\nwebpackAsyncContext.keys = function webpackAsyncContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackAsyncContext.id = \"c1da\";\nmodule.exports = webpackAsyncContext;"],"sourceRoot":""}