iobroker.nspanel-lovelace-ui
Version:
NsPanel Lovelace UI is a Firmware for the nextion screen inside of NSPanel in the Design of Lovelace UI Design.
2 lines (1 loc) • 3.96 kB
JavaScript
import"./AdminComponentEasyAccessSet__mf_v__runtimeInit__mf_v__-9o5tLcPN.js";import{j as e}from"./createSvgIcon-Debf11BA.js";import{R as f}from"./AdminComponentEasyAccessSet__loadShare__react__loadShare__-CJmceRyn.js";import{A as _}from"./index-BTwTI1Tk.js";import{A as g}from"./AdminComponentEasyAccessSet__loadShare___mf_0_mui_mf_1_material__loadShare__-EKOPJIKX.js";import{A as n}from"./AdminComponentEasyAccessSet__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__-BJiKjF1c.js";import{I as y,a as C,W as x}from"./NavigationView-BGLEMtxw.js";import{S as d,T as l}from"./ThemeProvider-vboP8fwI.js";import"./defaultTheme-B6DpRwGi.js";import"./_commonjsHelpers-CE1G-McA.js";import"./Clear-CZb6d-di.js";import"./useTheme-Y4z6S2UP.js";import"./GlobalStyles-5ozVpP3B.js";(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const t of document.querySelectorAll('link[rel="modulepreload"]'))r(t);new MutationObserver(t=>{for(const o of t)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function m(t){const o={};return t.integrity&&(o.integrity=t.integrity),t.referrerPolicy&&(o.referrerPolicy=t.referrerPolicy),t.crossOrigin==="use-credentials"?o.credentials="include":t.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(t){if(t.ep)return;t.ep=!0;const o=m(t);fetch(t.href,o)}})();var u,h=_;u=h.createRoot,h.hydrateRoot;const S={},v={},A={},L={},N={},j={},b={},E={},O={},R={},w={},i={app:s=>({backgroundColor:s.palette.background.default,color:s.palette.text.primary,height:"100%"}),item:{padding:50,width:400}};class I extends n.GenericApp{constructor(a){const m={...a};super(a,m),this.state={...this.state,data:{myCustomAttribute:"red"},originalData:{myCustomAttribute:"red"},theme:this.createTheme()};const r={en:S,de:v,ru:A,pt:L,nl:N,fr:j,it:b,es:E,pl:O,uk:R,"zh-cn":w};n.I18n.setTranslations(r),n.I18n.setLanguage((navigator.language||navigator.userLanguage||"en").substring(0,2).toLowerCase())}render(){return this.state.loaded?e.jsx(d,{injectFirst:!0,children:e.jsx(l,{theme:this.state.theme,children:e.jsxs(g.Box,{sx:i.app,children:[e.jsx("div",{style:i.item,children:e.jsx(y,{oContext:{adapterName:"nspanel-lovelace-ui",socket:this.socket,instance:0,themeType:this.state.theme.palette.mode,isFloatComma:!0,dateFormat:"",forceUpdate:()=>{},systemConfig:{},theme:this.state.theme,_themeName:this.state.themeName,onCommandRunning:a=>{}},alive:!0,changed:JSON.stringify(this.state.originalData)!==JSON.stringify(this.state.data),themeName:this.state.theme.palette.mode,common:{},attr:"myCustomAttribute",data:this.state.data,originalData:this.state.originalData,onError:()=>{},schema:{url:"",i18n:!0,name:"AdminComponentEasyAccessSet/Components/IconSelect",type:"custom"},onChange:a=>this.setState({data:a})})}),e.jsx("div",{style:i.item,children:e.jsx(C,{})}),e.jsx("div",{style:i.item,children:e.jsx(x,{oContext:{adapterName:"nspanel-lovelace-ui",socket:this.socket,instance:0,themeType:this.state.theme.palette.mode,isFloatComma:!0,dateFormat:"",forceUpdate:()=>{},systemConfig:{},theme:this.state.theme,_themeName:this.state.themeName,onCommandRunning:a=>{}},alive:!0,changed:JSON.stringify(this.state.originalData)!==JSON.stringify(this.state.data),themeName:this.state.theme.palette.mode,common:{},attr:"myCustomAttribute",data:this.state.data,originalData:this.state.originalData,onError:()=>{},schema:{url:"",i18n:!0,name:"AdminComponentEasyAccessSet/Components/NavigationView",type:"custom"},onChange:a=>this.setState({data:a})})})]})})}):e.jsx(d,{injectFirst:!0,children:e.jsx(l,{theme:this.state.theme,children:e.jsx(n.Loader,{themeType:this.state.themeType})})})}}window.adapterName="adapter-component-template";const p=document.getElementById("root");p&&u(p).render(e.jsx(f.StrictMode,{children:e.jsx(I,{socket:{port:8081}})}));