Updated web app files

This commit is contained in:
Fabio Manganiello 2023-03-24 16:45:55 +01:00
parent 567e9d4e21
commit a71017df33
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774
216 changed files with 187 additions and 187 deletions

View file

@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><link rel="stylesheet" href="/fonts/poppins.css"><title>platypush</title><script defer="defer" type="module" src="/static/js/chunk-vendors.95bedba1.js"></script><script defer="defer" type="module" src="/static/js/app.d0179f42.js"></script><link href="/static/css/chunk-vendors.0fcd36f0.css" rel="stylesheet"><link href="/static/css/app.aa0132dc.css" rel="stylesheet"><script defer="defer" src="/static/js/chunk-vendors-legacy.79dede0c.js" nomodule></script><script defer="defer" src="/static/js/app-legacy.d0b74440.js" nomodule></script></head><body><noscript><strong>We're sorry but platypush doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html> <!doctype html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><link rel="stylesheet" href="/fonts/poppins.css"><title>platypush</title><script defer="defer" type="module" src="/static/js/chunk-vendors.95bedba1.js"></script><script defer="defer" type="module" src="/static/js/app.274251a2.js"></script><link href="/static/css/chunk-vendors.0fcd36f0.css" rel="stylesheet"><link href="/static/css/app.39aaef6e.css" rel="stylesheet"><script defer="defer" src="/static/js/chunk-vendors-legacy.79dede0c.js" nomodule></script><script defer="defer" src="/static/js/app-legacy.78eb7d54.js" nomodule></script></head><body><noscript><strong>We're sorry but platypush doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,2 +0,0 @@
"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[1399,3459],{3459:function(t,n,e){e.r(n),e.d(n,{default:function(){return f}});var o=e(6252),l=e(3577),i=e(3540),r={key:0,src:i,class:"loading"},c={key:1,class:"fas fa-circle-exclamation error"};function a(t,n,e,i,a,u){var s=(0,o.up)("Icon");return(0,o.wg)(),(0,o.iD)("div",{class:(0,l.C_)(["entity-icon-container",{"with-color-fill":!!u.colorFill}]),style:(0,l.j5)(u.colorFillStyle)},[e.loading?((0,o.wg)(),(0,o.iD)("img",r)):e.error?((0,o.wg)(),(0,o.iD)("i",c)):((0,o.wg)(),(0,o.j4)(s,(0,l.vs)((0,o.dG)({key:2},u.computedIconNormalized)),null,16))],6)}var u=e(4648),s=(e(7941),e(7042),e(1478)),d={name:"EntityIcon",components:{Icon:s.Z},props:{loading:{type:Boolean,default:!1},error:{type:Boolean,default:!1},entity:{type:Object,required:!0},icon:{type:Object,default:function(){}},hasColorFill:{type:Boolean,default:!1}},data:function(){return{component:null,modalVisible:!1}},computed:{computedIcon:function(){var t,n,e=(0,u.Z)({},(null===(t=this.entity)||void 0===t||null===(n=t.meta)||void 0===n?void 0:n.icon)||{});return Object.keys(this.icon||{}).length&&(e=this.icon),(0,u.Z)({},e)},colorFill:function(){return this.hasColorFill&&this.computedIcon.color},colorFillStyle:function(){return this.colorFill&&!this.error?{background:this.colorFill}:{}},computedIconNormalized:function(){var t=(0,u.Z)({},this.computedIcon);return this.colorFill&&delete t.color,t},type:function(){var t=this.entity.type||"";return t.charAt(0).toUpperCase()+t.slice(1)}}},p=e(3744);const v=(0,p.Z)(d,[["render",a],["__scopeId","data-v-4fad24e6"]]);var f=v},1399:function(t,n,e){e.r(n),e.d(n,{default:function(){return k}});e(8309);var o=e(6252),l=e(3577),i={class:"entity sensor-container"},r={class:"head"},c={class:"col-1 icon"},a={class:"col-s-8 col-m-9 label"},u=["textContent"],s={key:0,class:"col-s-3 col-m-2 pull-right"},d=["textContent"],p=["textContent"];function v(t,n,e,v,f,y){var m=(0,o.up)("EntityIcon");return(0,o.wg)(),(0,o.iD)("div",i,[(0,o._)("div",r,[(0,o._)("div",c,[(0,o.Wm)(m,{entity:t.value,loading:t.loading,error:t.error},null,8,["entity","loading","error"])]),(0,o._)("div",a,[(0,o._)("div",{class:"name",textContent:(0,l.zw)(t.value.name)},null,8,u)]),null!=t.value.value?((0,o.wg)(),(0,o.iD)("div",s,[null!=t.value.unit?((0,o.wg)(),(0,o.iD)("span",{key:0,class:"unit",textContent:(0,l.zw)(t.value.unit)},null,8,d)):(0,o.kq)("",!0),(0,o._)("span",{class:"value",textContent:(0,l.zw)(t.value.value)},null,8,p)])):(0,o.kq)("",!0)])])}var f=e(7909),y=e(3459),m={name:"Sensor",components:{EntityIcon:y["default"]},mixins:[f["default"]]},h=e(3744);const g=(0,h.Z)(m,[["render",v],["__scopeId","data-v-8b992454"]]);var k=g},3540:function(t,n,e){t.exports=e.p+"static/img/spinner.c0bee445.gif"}}]);
//# sourceMappingURL=1399-legacy.7e768542.js.map

File diff suppressed because one or more lines are too long

View file

@ -1,2 +0,0 @@
"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[1399,3459],{3459:function(t,e,n){n.r(e),n.d(e,{default:function(){return y}});var l=n(6252),o=n(3577),i=n(3540);const c={key:0,src:i,class:"loading"},r={key:1,class:"fas fa-circle-exclamation error"};function a(t,e,n,i,a,s){const u=(0,l.up)("Icon");return(0,l.wg)(),(0,l.iD)("div",{class:(0,o.C_)(["entity-icon-container",{"with-color-fill":!!s.colorFill}]),style:(0,o.j5)(s.colorFillStyle)},[n.loading?((0,l.wg)(),(0,l.iD)("img",c)):n.error?((0,l.wg)(),(0,l.iD)("i",r)):((0,l.wg)(),(0,l.j4)(u,(0,o.vs)((0,l.dG)({key:2},s.computedIconNormalized)),null,16))],6)}var s=n(1478),u={name:"EntityIcon",components:{Icon:s.Z},props:{loading:{type:Boolean,default:!1},error:{type:Boolean,default:!1},entity:{type:Object,required:!0},icon:{type:Object,default:()=>{}},hasColorFill:{type:Boolean,default:!1}},data(){return{component:null,modalVisible:!1}},computed:{computedIcon(){let t={...this.entity?.meta?.icon||{}};return Object.keys(this.icon||{}).length&&(t=this.icon),{...t}},colorFill(){return this.hasColorFill&&this.computedIcon.color},colorFillStyle(){return this.colorFill&&!this.error?{background:this.colorFill}:{}},computedIconNormalized(){const t={...this.computedIcon};return this.colorFill&&delete t.color,t},type(){let t=this.entity.type||"";return t.charAt(0).toUpperCase()+t.slice(1)}}},d=n(3744);const p=(0,d.Z)(u,[["render",a],["__scopeId","data-v-4fad24e6"]]);var y=p},1399:function(t,e,n){n.r(e),n.d(e,{default:function(){return k}});var l=n(6252),o=n(3577);const i={class:"entity sensor-container"},c={class:"head"},r={class:"col-1 icon"},a={class:"col-s-8 col-m-9 label"},s=["textContent"],u={key:0,class:"col-s-3 col-m-2 pull-right"},d=["textContent"],p=["textContent"];function y(t,e,n,y,v,m){const h=(0,l.up)("EntityIcon");return(0,l.wg)(),(0,l.iD)("div",i,[(0,l._)("div",c,[(0,l._)("div",r,[(0,l.Wm)(h,{entity:t.value,loading:t.loading,error:t.error},null,8,["entity","loading","error"])]),(0,l._)("div",a,[(0,l._)("div",{class:"name",textContent:(0,o.zw)(t.value.name)},null,8,s)]),null!=t.value.value?((0,l.wg)(),(0,l.iD)("div",u,[null!=t.value.unit?((0,l.wg)(),(0,l.iD)("span",{key:0,class:"unit",textContent:(0,o.zw)(t.value.unit)},null,8,d)):(0,l.kq)("",!0),(0,l._)("span",{class:"value",textContent:(0,o.zw)(t.value.value)},null,8,p)])):(0,l.kq)("",!0)])])}var v=n(7909),m=n(3459),h={name:"Sensor",components:{EntityIcon:m["default"]},mixins:[v["default"]]},f=n(3744);const g=(0,f.Z)(h,[["render",y],["__scopeId","data-v-8b992454"]]);var k=g},3540:function(t,e,n){t.exports=n.p+"static/img/spinner.c0bee445.gif"}}]);
//# sourceMappingURL=1399.bdb0670a.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,2 @@
"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[2018],{2018:function(e,n,t){t.r(n),t.d(n,{default:function(){return h}});t(8309);var a=t(6252),l=t(3577),i={class:"entity device-container"},c={class:"head"},r={class:"col-1 icon"},o={class:"col-11 label"},s=["textContent"];function u(e,n,t,u,d,v){var p=(0,a.up)("EntityIcon");return(0,a.wg)(),(0,a.iD)("div",i,[(0,a._)("div",c,[(0,a._)("div",r,[(0,a.Wm)(p,{entity:e.value,loading:e.loading,error:e.error},null,8,["entity","loading","error"])]),(0,a._)("div",o,[(0,a._)("div",{class:"name",textContent:(0,l.zw)(e.value.name)},null,8,s)])])])}var d=t(7909),v=t(3459),p={name:"Device",components:{EntityIcon:v["default"]},mixins:[d["default"]]},f=t(3744);const y=(0,f.Z)(p,[["render",u],["__scopeId","data-v-17e94e49"]]);var h=y}}]);
//# sourceMappingURL=2018-legacy.3926893f.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"static/js/2018-legacy.3926893f.js","mappings":"kMACOA,MAAM,2B,GACJA,MAAM,Q,GACJA,MAAM,c,GAONA,MAAM,gB,yFATf,QAaM,MAbN,EAaM,EAZJ,OAWM,MAXN,EAWM,EAVJ,OAKM,MALN,EAKM,EAJJ,QAGmB,GAFhBC,OAAQ,EAAAC,MACRC,QAAS,EAAAA,QACTC,MAAO,EAAAA,OAHV,wCAMF,OAEM,MAFN,EAEM,EADJ,OAAwC,OAAnCJ,MAAM,O,aAAO,QAAmB,EAAN,MAACK,OAAhC,e,yBAUR,GACEA,KAAM,SACNC,WAAY,CAACC,WAAAA,EAAA,YACbC,OAAQ,CAACC,EAAA,a,UCjBX,MAAMC,GAA2B,OAAgB,EAAQ,CAAC,CAAC,SAASC,GAAQ,CAAC,YAAY,qBAEzF,O","sources":["webpack://platypush/./src/components/panels/Entities/Device.vue","webpack://platypush/./src/components/panels/Entities/Device.vue?1785"],"sourcesContent":["<template>\n <div class=\"entity device-container\">\n <div class=\"head\">\n <div class=\"col-1 icon\">\n <EntityIcon\n :entity=\"value\"\n :loading=\"loading\"\n :error=\"error\" />\n </div>\n\n <div class=\"col-11 label\">\n <div class=\"name\" v-text=\"value.name\" />\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport EntityMixin from \"./EntityMixin\"\nimport EntityIcon from \"./EntityIcon\"\n\nexport default {\n name: 'Device',\n components: {EntityIcon},\n mixins: [EntityMixin],\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import \"common\";\n\n.device-container {\n .icon {\n margin-right: 1em;\n }\n}\n</style>\n","import { render } from \"./Device.vue?vue&type=template&id=17e94e49&scoped=true\"\nimport script from \"./Device.vue?vue&type=script&lang=js\"\nexport * from \"./Device.vue?vue&type=script&lang=js\"\n\nimport \"./Device.vue?vue&type=style&index=0&id=17e94e49&lang=scss&scoped=true\"\n\nimport exportComponent from \"/home/blacklight/git_tree/platypush/platypush/backend/http/webapp/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-17e94e49\"]])\n\nexport default __exports__"],"names":["class","entity","value","loading","error","name","components","EntityIcon","mixins","EntityMixin","__exports__","render"],"sourceRoot":""}

View file

@ -0,0 +1,2 @@
"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[2018],{2018:function(n,e,t){t.r(e),t.d(e,{default:function(){return h}});var a=t(6252),l=t(3577);const c={class:"entity device-container"},i={class:"head"},o={class:"col-1 icon"},s={class:"col-11 label"},r=["textContent"];function u(n,e,t,u,d,v){const p=(0,a.up)("EntityIcon");return(0,a.wg)(),(0,a.iD)("div",c,[(0,a._)("div",i,[(0,a._)("div",o,[(0,a.Wm)(p,{entity:n.value,loading:n.loading,error:n.error},null,8,["entity","loading","error"])]),(0,a._)("div",s,[(0,a._)("div",{class:"name",textContent:(0,l.zw)(n.value.name)},null,8,r)])])])}var d=t(7909),v=t(3459),p={name:"Device",components:{EntityIcon:v["default"]},mixins:[d["default"]]},f=t(3744);const y=(0,f.Z)(p,[["render",u],["__scopeId","data-v-17e94e49"]]);var h=y}}]);
//# sourceMappingURL=2018.c8212358.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"static/js/2018.c8212358.js","mappings":"gMACOA,MAAM,2B,GACJA,MAAM,Q,GACJA,MAAM,c,GAONA,MAAM,gB,2FATf,QAaM,MAbN,EAaM,EAZJ,OAWM,MAXN,EAWM,EAVJ,OAKM,MALN,EAKM,EAJJ,QAGmB,GAFhBC,OAAQ,EAAAC,MACRC,QAAS,EAAAA,QACTC,MAAO,EAAAA,OAHV,wCAMF,OAEM,MAFN,EAEM,EADJ,OAAwC,OAAnCJ,MAAM,O,aAAO,QAAmB,EAAN,MAACK,OAAhC,e,yBAUR,GACEA,KAAM,SACNC,WAAY,CAACC,WAAU,cACvBC,OAAQ,CAACC,EAAA,a,UCjBX,MAAMC,GAA2B,OAAgB,EAAQ,CAAC,CAAC,SAASC,GAAQ,CAAC,YAAY,qBAEzF,O","sources":["webpack://platypush/./src/components/panels/Entities/Device.vue","webpack://platypush/./src/components/panels/Entities/Device.vue?1785"],"sourcesContent":["<template>\n <div class=\"entity device-container\">\n <div class=\"head\">\n <div class=\"col-1 icon\">\n <EntityIcon\n :entity=\"value\"\n :loading=\"loading\"\n :error=\"error\" />\n </div>\n\n <div class=\"col-11 label\">\n <div class=\"name\" v-text=\"value.name\" />\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport EntityMixin from \"./EntityMixin\"\nimport EntityIcon from \"./EntityIcon\"\n\nexport default {\n name: 'Device',\n components: {EntityIcon},\n mixins: [EntityMixin],\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import \"common\";\n\n.device-container {\n .icon {\n margin-right: 1em;\n }\n}\n</style>\n","import { render } from \"./Device.vue?vue&type=template&id=17e94e49&scoped=true\"\nimport script from \"./Device.vue?vue&type=script&lang=js\"\nexport * from \"./Device.vue?vue&type=script&lang=js\"\n\nimport \"./Device.vue?vue&type=style&index=0&id=17e94e49&lang=scss&scoped=true\"\n\nimport exportComponent from \"/home/blacklight/git_tree/platypush/platypush/backend/http/webapp/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-17e94e49\"]])\n\nexport default __exports__"],"names":["class","entity","value","loading","error","name","components","EntityIcon","mixins","EntityMixin","__exports__","render"],"sourceRoot":""}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,2 @@
"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[2306],{2306:function(e,t,l){l.r(t),l.d(t,{default:function(){return x}});l(8309),l(1539),l(3948);var n=l(6252),a=l(3577),u=l(9963),i={class:"entity switch-container"},s={class:"col-1 icon"},o={class:"col-s-8 col-m-9 label"},r=["textContent"],c={class:"col-s-3 col-m-2 buttons pull-right"},v=["textContent"],d={class:"row"},p={class:"input"},f=["disabled"],h={key:0,value:"",selected:""},g=["value","selected","textContent"];function w(e,t,l,w,y,k){var m,_=(0,n.up)("EntityIcon");return(0,n.wg)(),(0,n.iD)("div",i,[(0,n._)("div",{class:(0,a.C_)(["head",{collapsed:e.collapsed}])},[(0,n._)("div",s,[(0,n.Wm)(_,{entity:e.value,loading:e.loading,error:e.error},null,8,["entity","loading","error"])]),(0,n._)("div",o,[(0,n._)("div",{class:"name",textContent:(0,a.zw)(e.value.name)},null,8,r)]),(0,n._)("div",c,[null!=(null===(m=e.value)||void 0===m?void 0:m.value)?((0,n.wg)(),(0,n.iD)("span",{key:0,class:"value",textContent:(0,a.zw)(e.value.values[e.value.value]||e.value.value)},null,8,v)):(0,n.kq)("",!0),k.hasValues?((0,n.wg)(),(0,n.iD)("button",{key:1,onClick:t[0]||(t[0]=(0,u.iM)((function(t){return e.collapsed=!e.collapsed}),["stop"]))},[(0,n._)("i",{class:(0,a.C_)(["fas",{"fa-angle-up":!e.collapsed,"fa-angle-down":e.collapsed}])},null,2)])):(0,n.kq)("",!0)])],2),e.collapsed?(0,n.kq)("",!0):((0,n.wg)(),(0,n.iD)("div",{key:0,class:"body",onClick:t[2]||(t[2]=(0,u.iM)((function(){return k.prevent&&k.prevent.apply(k,arguments)}),["stop"]))},[(0,n._)("div",d,[(0,n._)("div",p,[(0,n._)("select",{onInput:t[1]||(t[1]=function(){return k.setValue&&k.setValue.apply(k,arguments)}),ref:"values",disabled:e.loading},[e.value.is_write_only?((0,n.wg)(),(0,n.iD)("option",h,"--")):(0,n.kq)("",!0),((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(k.displayValues,(function(t,l){return(0,n.wg)(),(0,n.iD)("option",{value:l,selected:l==e.value.value,key:l,textContent:(0,a.zw)(t)},null,8,g)})),128))],40,f)])])]))])}var y=l(8534),k=(l(5666),l(2479),l(7909)),m=l(3459),_={name:"EnumSwitch",components:{EntityIcon:m["default"]},mixins:[k["default"]],computed:{hasValues:function(){var e;return!!Object.values((null===this||void 0===this||null===(e=this.value)||void 0===e?void 0:e.values)||{}).length},displayValues:function(){var e,t;return(null===(e=this.value)||void 0===e?void 0:e.values)instanceof Array?this.value.values.reduce((function(e,t){return e[t]=t,e}),{}):(null===(t=this.value)||void 0===t?void 0:t.values)||{}}},methods:{prevent:function(e){return e.stopPropagation(),!1},setValue:function(e){var t=this;return(0,y.Z)(regeneratorRuntime.mark((function l(){var n,a;return regeneratorRuntime.wrap((function(l){while(1)switch(l.prev=l.next){case 0:if(null!==(n=e.target.value)&&void 0!==n&&n.length){l.next=2;break}return l.abrupt("return");case 2:return t.$emit("loading",!0),t.value.is_write_only&&(a=t,setTimeout((function(){a.$refs.values.value=""}),1e3)),l.prev=4,l.next=7,t.request("entities.execute",{id:t.value.id,action:"set",value:e.target.value});case 7:return l.prev=7,t.$emit("loading",!1),l.finish(7);case 10:case"end":return l.stop()}}),l,null,[[4,,7,10]])})))()}}},b=l(3744);const C=(0,b.Z)(_,[["render",w],["__scopeId","data-v-1bc82e80"]]);var x=C}}]);
//# sourceMappingURL=2306-legacy.8182246b.js.map

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,2 @@
"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[2306],{2306:function(e,l,t){t.r(l),t.d(l,{default:function(){return b}});var a=t(6252),s=t(3577),n=t(9963);const i={class:"entity switch-container"},u={class:"col-1 icon"},o={class:"col-s-8 col-m-9 label"},c=["textContent"],v={class:"col-s-3 col-m-2 buttons pull-right"},d=["textContent"],r={class:"row"},p={class:"input"},h=["disabled"],g={key:0,value:"",selected:""},y=["value","selected","textContent"];function w(e,l,t,w,f,_){const k=(0,a.up)("EntityIcon");return(0,a.wg)(),(0,a.iD)("div",i,[(0,a._)("div",{class:(0,s.C_)(["head",{collapsed:e.collapsed}])},[(0,a._)("div",u,[(0,a.Wm)(k,{entity:e.value,loading:e.loading,error:e.error},null,8,["entity","loading","error"])]),(0,a._)("div",o,[(0,a._)("div",{class:"name",textContent:(0,s.zw)(e.value.name)},null,8,c)]),(0,a._)("div",v,[null!=e.value?.value?((0,a.wg)(),(0,a.iD)("span",{key:0,class:"value",textContent:(0,s.zw)(e.value.values[e.value.value]||e.value.value)},null,8,d)):(0,a.kq)("",!0),_.hasValues?((0,a.wg)(),(0,a.iD)("button",{key:1,onClick:l[0]||(l[0]=(0,n.iM)((l=>e.collapsed=!e.collapsed),["stop"]))},[(0,a._)("i",{class:(0,s.C_)(["fas",{"fa-angle-up":!e.collapsed,"fa-angle-down":e.collapsed}])},null,2)])):(0,a.kq)("",!0)])],2),e.collapsed?(0,a.kq)("",!0):((0,a.wg)(),(0,a.iD)("div",{key:0,class:"body",onClick:l[2]||(l[2]=(0,n.iM)(((...e)=>_.prevent&&_.prevent(...e)),["stop"]))},[(0,a._)("div",r,[(0,a._)("div",p,[(0,a._)("select",{onInput:l[1]||(l[1]=(...e)=>_.setValue&&_.setValue(...e)),ref:"values",disabled:e.loading},[e.value.is_write_only?((0,a.wg)(),(0,a.iD)("option",g,"--")):(0,a.kq)("",!0),((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(_.displayValues,((l,t)=>((0,a.wg)(),(0,a.iD)("option",{value:t,selected:t==e.value.value,key:t,textContent:(0,s.zw)(l)},null,8,y)))),128))],40,h)])])]))])}var f=t(7909),_=t(3459),k={name:"EnumSwitch",components:{EntityIcon:_["default"]},mixins:[f["default"]],computed:{hasValues(){return!!Object.values(this?.value?.values||{}).length},displayValues(){return this.value?.values instanceof Array?this.value.values.reduce(((e,l)=>(e[l]=l,e)),{}):this.value?.values||{}}},methods:{prevent(e){return e.stopPropagation(),!1},async setValue(e){if(e.target.value?.length){if(this.$emit("loading",!0),this.value.is_write_only){const e=this;setTimeout((()=>{e.$refs.values.value=""}),1e3)}try{await this.request("entities.execute",{id:this.value.id,action:"set",value:e.target.value})}finally{this.$emit("loading",!1)}}}}},m=t(3744);const C=(0,m.Z)(k,[["render",w],["__scopeId","data-v-1bc82e80"]]);var b=C}}]);
//# sourceMappingURL=2306.c228cea9.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show more