{"version":3,"sources":["assets/imgs/logo-green.svg","components/Header.jsx","components/images/views/logo-green.jsx","components/Footer.jsx","assets/icons/views/icon.jsx","assets/icons/views/icondistress.jsx","assets/icons/views/iconclose.jsx","components/DefaultButton.jsx","modules/MqttClient.jsx","components/Content.jsx","components/Sidebar.jsx","components/InfoTider.jsx","components/InfoMat.jsx","components/InfoPrivat.jsx","components/Info.jsx","App.jsx","assets/css/mainTheme.js","index.js"],"names":["module","exports","Head","styled","div","Header","React","Component","Logo","img","Image","props","className","children","src","logo","alt","Foot","footer","Footer","FillColor","theme","variants","primary","main","colors","teal1","distress","signalRed","distressactive","blue","selected","nav","navigation","select","disabled","greyD0","unselected","default","panelHeader","white","userSection","grey33","inInput","black4D","link","light","greyF0","SVG","svg","SVGS","Icon","mode","noicon","variant","icon","notext","linkCategory","title","xmlns","data-icon-name","data-disabled","style","marginRight","viewBox","id","data-name","fill","d","href","SelectIcon","IconClose","buttonBackground","buttons","background","buttonHover","hover","buttonDisabled","buttonColorDisabled","disabledColor","buttonColor","color","buttonBorder","borderColor","buttonBorderRadius","borderRadius","Btn","button","disableClick","console","log","Button","newVariant","ftn","onClick","this","type","name","onMouseEnter","onMouseLeave","label","defaultProps","_initialized","_client","_clientId","_alarmId","_onNewEvent","_onNewAck","_onNewStatus","MqttEvent","mqttClientId","eventId","locationId","time","TypeError","MqttClientId","EventId","Type","LocationId","Time","Math","floor","Date","now","json","obj","JSON","parse","err","error","MqttAck","status","Status","_onConnectionLost","errorCode","errorMessage","_onMessageArrived","message","messageType","destinationName","split","pop","ack","fromJson","payloadString","event","connect","isConnected","userName","config","USERNAME","password","PASSWORD","onSuccess","_onConnectionSuccess","onFailure","_onConnectionFailure","useSSL","subscribe","ORGANIZATION_ID","disconnect","initialize","alarmId","CLIENT_ID_PREFIX","Paho","Client","BROKER_URL","BROKER_PORT","BROKER_PATH","onConnectionLost","onMessageArrived","toggleConnection","sendAlarm","topic","clientId","send","_publish","stringify","setOnNewEventCallback","cb","setOnNewAckCallback","setOnNewStatusCallback","MainView","ButtonGroup","MainContent","_toggleButton","row","col","activate","activeButtons","state","isActive","index","i","length","undefined","splice","push","setState","_handleKeydown","e","currentRow","currentColumn","buttonsEnum","newRow","newColumn","keyCode","current","colorBg","mqttstatus","errorTextValue","_handleWindowSizeChange","width","window","innerWidth","j","createRef","currentValue","data","Event","code","document","dispatchEvent","curRow","curCol","isCurrent","isPressed","find","_findButtonInList","classNameList","join","eventid","x","y","MqttClient","addEventListener","_keypressToKeydownTranslation","removeEventListener","bgColor","DefaultButton","ref","_getClassname","_onMouseEnter","_onMouseLeave","backgroundColor","_sendIfNotActive","SideView","StyledLogo","Info","StyledLink","Sidebar","routeChange","bind","history","to","withRouter","Inf","Col1","Col2","InfoContent","InfoTider","InfoMat","InfoPrivate","InfoView","CloseButton","routes","path","info","InfoPrivat","InfoPage","exact","map","route","key","component","App","params","QueryString","location","search","render","greyE6","teal2","teal5","blue1","blue1hover","blue3","yellow1","size","mainTheme","secondary","grey","darkGrey","ReactDOM","StrictMode","getElementById"],"mappings":"8EAAAA,EAAOC,QAAU,IAA0B,wC,sxBCI3C,IAAMC,EAAOC,IAAOC,IAAV,KA0CKC,E,uKATX,OACE,kBAACH,EAAD,KACE,4C,GAJaI,IAAMC,W,+JC/B3B,IAUMC,EAAOL,IAAOM,IAAV,KAQKC,EAlBD,SAAAC,GAAU,IACdC,EAAwBD,EAAxBC,UAAWC,EAAaF,EAAbE,SACnB,OACE,yBAAKD,UAAWA,GACd,kBAACJ,EAAD,CAAMM,IAAKC,IAAMC,IAAI,YACpBH,I,uQCJP,IAAMI,EAAOd,IAAOe,OAAV,KAqBKC,MARf,WACE,OACE,kBAACF,EAAD,KACE,kBAAC,EAAD,Q,yeChBN,IAAMG,EAAYC,IAAMC,SAAS,OAAQ,UAAW,CAClDC,QAAS,CAAEC,KAAM,SAACb,GAAD,OAAWA,EAAMU,MAAMI,OAAOC,QAC/CC,SAAU,CAAEH,KAAM,SAACb,GAAD,OAAWA,E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ACTnQ,UAAW,UACXY,MAAO,WAGHwP,GACI,OAmEKC,GANG,CAChBxN,QAVc,CACdlD,QAlDc,CACd0D,MAAOxD,GAAOC,MACdgD,WAAYjD,GAAOqQ,MACnB3P,SAAUV,GAAOgQ,OACjBtM,YAAa1D,GAAOsQ,QACpBnN,MAAOnD,GAAOsQ,QACdhN,cAAetD,GAAOe,MACtB6C,aAAc2M,IA4CdE,UA1CgB,CAChBjN,MAAOxD,GAAOC,MACdgD,WAAYjD,GAAOsQ,QACnB5P,SAAUV,GAAO0Q,KACjBhN,YAAa1D,GAAOsQ,QACpBnN,MAAOnD,GAAOsQ,QACdhN,cAAetD,GAAO2Q,SACtB/M,aAAc2M,IAoCdrQ,SAjCe,CACfsD,MAAOxD,GAAOG,UACd8C,WAAYjD,GAAOqQ,MACnB3P,SAAUV,GAAO0Q,KACjBhN,YAAa1D,GAAOG,UACpBgD,MAAOnD,GAAOG,UACdmD,cAAetD,GAAO2Q,SACtB/M,aAAc2M,IA2BdlQ,KAdW,CACXmD,MAAOxD,GAAOC,MACdgD,WAAYjD,GAAOqQ,MACnBlN,MAAOnD,GAAOmQ,MACdzP,SAAUV,GAAOW,OACjB+C,YAAa1D,GAAOmQ,MACpB7M,cAAetD,GAAO2Q,SACtB/M,aAAc2M,IAQdnQ,eAzBqB,CACnBoD,MAAOxD,GAAOC,MACdgD,WAAYjD,GAAOG,UACnBO,SAAUV,GAAO0Q,KACjBhN,YAAa1D,GAAOG,UACpBgD,MAAOnD,GAAOG,UACdmD,cAAetD,GAAO2Q,SACtB/M,aAAc2M,KAwBhBvQ,WCxEF4Q,IAASb,OACP,kBAAC,IAAMc,WAAP,KACE,kBAAC,IAAD,CAAejR,MAAO4Q,IACpB,kBAAC,KAAD,KACE,kBAAC,GAAD,SAINpE,SAAS0E,eAAe,U","file":"static/js/main.03972cae.chunk.js","sourcesContent":["module.exports = __webpack_public_path__ + \"static/media/logo-green.c818dad8.svg\";","import React from \"react\";\r\nimport styled from \"styled-components\";\r\n\r\n\r\nconst Head = styled.div`\r\nposition: relative;\r\nbottom: 1.6em;\r\n text-align: center;\r\n text-justify: center;\r\n h2{\r\n position: relative;\r\n top: 1em;\r\n font-weight:bold;\r\n color: #005a4b;\r\n }\r\n opacity: 0.77;\r\n width: 100%;\r\n height: 100px;\r\n background-color: #d7ebeb;\r\n \r\n font-family: Arial, Helvetica, sans-serif;\r\n font-weight: bold;\r\n text-transform: uppercase;\r\n @media screen and (max-width: 500px) {\r\n height: auto;\r\n padding-bottom: 5px;\r\n h2{\r\n font-weight:bold;\r\n color: #005a4b;\r\n position: relative;\r\n top: 19px;\r\n }\r\n }\r\n`;\r\n\r\nclass Header extends React.Component {\r\n render() {\r\n return (\r\n \r\n

\r\n Service \r\n

\r\n \r\n );\r\n }\r\n}\r\nexport default Header;\r\n","import React from 'react';\r\nimport styled from 'styled-components';\r\nimport logo from '../../../assets/imgs/logo-green.svg';\r\n\r\nconst Image = props => {\r\n const { className, children } = props;\r\n return (\r\n
\r\n \r\n {children}\r\n
\r\n );\r\n};\r\n\r\nconst Logo = styled.img`\r\n height: 23.3px;\r\n width: 125.22px;\r\n path {\r\n color: red;\r\n }\r\n`;\r\n\r\nexport default Image;","import React from \"react\";\r\nimport styled from \"styled-components\";\r\n\r\nimport { LogoGreen } from \"../components/images\";\r\n\r\nconst Foot = styled.footer`\r\n position: fixed;\r\n bottom: 0;\r\n padding: 40px;\r\n color: #005a4b;\r\n font-weight: bold;\r\n text-transform: uppercase;\r\n\r\n @media screen and (max-width: 500px) {\r\n padding: 20px;\r\n }\r\n`;\r\n\r\nfunction Footer() {\r\n return (\r\n \r\n \r\n \r\n );\r\n}\r\n\r\nexport default Footer;\r\n","/* eslint-disable no-mixed-spaces-and-tabs */\r\nimport React from \"react\";\r\nimport styled, { ThemeProvider } from \"styled-components\";\r\nimport theme from \"styled-theming\";\r\n\r\nconst FillColor = theme.variants(\"mode\", \"variant\", {\r\n primary: { main: (props) => props.theme.colors.teal1 },\r\n distress: { main: (props) => props.theme.colors.signalRed },\r\n distressactive: { main: (props) => props.theme.colors.teal1 },\r\n blue: { main: (props) => props.theme.colors.teal1 },\r\n selected: {\r\n nav: (props) => props.theme.navigation.select,\r\n disabled: (props) => props.theme.colors.greyD0,\r\n },\r\n unselected: {\r\n nav: (props) => props.theme.navigation.default,\r\n disabled: (props) => props.theme.colors.greyD0,\r\n },\r\n panelHeader: { main: (props) => props.theme.colors.white },\r\n userSection: { main: (props) => props.theme.colors.grey33 },\r\n inInput: { main: (props) => props.theme.colors.black4D },\r\n link: { main: (props) => props.theme.colors.link },\r\n light: { main: (props) => props.theme.colors.greyF0 },\r\n});\r\n\r\n// styling for svg's\r\n\r\n// styling for svg's\r\nconst SVG = styled.svg`\r\n height: 6.5vw;\r\n width: 6.5vw;\r\n min-height: 2vw;\r\n min-width: 2vw;\r\n margin-left: 1.9em;\r\n fill: ${FillColor};\r\n @media screen and (max-width: 500px) {\r\n font-size: 4vw;\r\n margin-left: 2em;\r\n }\r\n`;\r\n\r\nconst SVGS = styled.svg`\r\n height: inherit;\r\n width: inherit;\r\n max-width: 2em;\r\n max-height: 2em;\r\n position: relative;\r\n top: 2em;\r\n fill: ${FillColor};\r\n`;\r\n\r\n/*const SVG = styled.svg`\r\n height: inherit;\r\n width: inherit;\r\n max-width: 3em;\r\n max-height:3em;\r\n position: relative;\r\n left: 0.9em;\r\n top: 0.5em;\r\n font-size: 40px;\r\n fill: #005A4B;\r\n @media screen and (max-width: 920px) {\r\n font-size: 30px;\r\n }\r\n @media screen and (max-width: 500px) {\r\n \r\n font-size: 35px;\r\n position: relative;\r\n top:0.24em;\r\n left: -2em;\r\n}\r\n\r\n transition: all 0.15s ease-in-out;\r\n\r\n`;\r\n\r\nconst SVGS = styled.svg`\r\n height: inherit;\r\n width: inherit;\r\n position: relative;\r\n top: 1em;\r\n max-width: 2em;\r\n max-height: 2em;\r\n fill: #005A4B;\r\n`;*/\r\n\r\nconst SelectIcon = (props) => {\r\n const { icon, variant, disabled, notext, className } = props;\r\n\r\n switch (icon) {\r\n case \"service\":\r\n return (\r\n \r\n \r\n service\r\n \r\n \r\n \r\n {\" \"}\r\n \r\n );\r\n\r\n case \"restaurant\":\r\n return (\r\n \r\n \r\n restaurant\r\n \r\n \r\n {\" \"}\r\n \r\n );\r\n\r\n case \"wc\":\r\n return (\r\n \r\n \r\n wc\r\n \r\n \r\n {\" \"}\r\n {\" \"}\r\n {\" \"}\r\n \r\n );\r\n\r\n case \"water\":\r\n return (\r\n \r\n \r\n water\r\n \r\n \r\n \r\n \r\n {\" \"}\r\n \r\n );\r\n\r\n case \"medicin\":\r\n return (\r\n \r\n \r\n medicin\r\n \r\n \r\n \r\n {\" \"}\r\n \r\n );\r\n\r\n case \"bed\":\r\n return (\r\n \r\n \r\n bed\r\n \r\n \r\n \r\n {\" \"}\r\n \r\n );\r\n\r\n case \"bath\":\r\n return (\r\n \r\n \r\n bath\r\n \r\n \r\n \r\n {\" \"}\r\n \r\n );\r\n\r\n case \"info\":\r\n return (\r\n \r\n \r\n info\r\n \r\n \r\n \r\n \r\n {\" \"}\r\n \r\n );\r\n case \"distressgreen\":\r\n return (\r\n \r\n \r\n distress\r\n \r\n \r\n \r\n \r\n {\" \"}\r\n \r\n );\r\n\r\n case \"distress\":\r\n return (\r\n \r\n \r\n distressgreen\r\n \r\n \r\n \r\n \r\n {\" \"}\r\n \r\n );\r\n\r\n default:\r\n // do nothing\r\n }\r\n};\r\n\r\nconst Icon = (props) => {\r\n const {\r\n mode,\r\n noicon,\r\n variant,\r\n icon,\r\n disabled,\r\n notext,\r\n linkCategory,\r\n className,\r\n title,\r\n } = props;\r\n\r\n return (\r\n \r\n {noicon\r\n ? null\r\n : SelectIcon({\r\n icon,\r\n variant,\r\n disabled,\r\n notext,\r\n linkCategory,\r\n className,\r\n title,\r\n })}\r\n \r\n );\r\n};\r\n\r\nexport default Icon;\r\n","import React from 'react';\r\nimport styled from 'styled-components';\r\n\r\n// styling for svg's\r\nconst SVG = styled.svg`\r\n height: inherit;\r\n width: inherit;\r\n max-width: 3em;\r\n max-height:3em;\r\n position: relative;\r\n left: 0.9em;\r\n margin-top: 10px;\r\n font-size: 50px;\r\n fill: #E6373C;\r\n /*transition: all 0.15s ease-in-out;*/\r\n @media screen and (max-width: 920px) {\r\n font-size: 40px;\r\n }\r\n @media screen and (max-width: 500px) {\r\n \r\n font-size: 35px;\r\n position: relative;\r\n bottom: 0.2em;\r\n left: -2em;\r\n}\r\n\r\n`;\r\n\r\n\r\nconst IconDistress = props => {\r\n const { icon, variant, disabled, notext, className } = props;\r\n\r\n switch (icon) {\r\n case 'distress':\r\n return (\r\n \r\n \r\n distress\r\n \r\n \r\n {' '}\r\n \r\n );\r\n case 'restaurant':\r\n return (\r\n \r\n \r\n restaurant\r\n \r\n \r\n {' '}\r\n \r\n );\r\n default:\r\n // do nothing\r\n}\r\n};\r\n\r\nexport default IconDistress;\r\n","import React from 'react';\r\nimport styled from 'styled-components';\r\n\r\n// styling for svg's\r\nconst SVG = styled.svg`\r\n height: inherit;\r\n width: inherit;\r\n align-items: center;\r\n max-width: 4em;\r\n max-height:4em;\r\n position: relative;\r\n fill: #005A4B;\r\n`;\r\n\r\n\r\nconst IconClose = props => {\r\n const { icon, variant, disabled, notext, className } = props;\r\n\r\n switch (icon) {\r\n case 'close':\r\n return (\r\n \r\n \r\n close\r\n \r\n \r\n {' '}\r\n \r\n );\r\n case 'restaurant':\r\n return (\r\n \r\n \r\n restaurant\r\n \r\n \r\n {' '}\r\n \r\n );\r\n default:\r\n // do nothing\r\n}\r\n};\r\n\r\nexport default IconClose;\r\n","/* eslint-disable react/prop-types */\r\nimport React from \"react\";\r\nimport styled, { ThemeProvider } from \"styled-components\";\r\nimport theme from \"styled-theming\";\r\nimport { Icon } from \"../assets/icons\";\r\n\r\nconst buttonBackground = theme.variants(\"mode\", \"variant\", {\r\n primary: { main: (props) => props.theme.buttons.primary.background },\r\n distress: { main: (props) => props.theme.buttons.distress.background },\r\n distressactive: {\r\n main: (props) => props.theme.buttons.distressactive.background,\r\n },\r\n blue: { main: (props) => props.theme.buttons.blue.background },\r\n});\r\n\r\nconst buttonHover = theme.variants(\"mode\", \"variant\", {\r\n primary: { main: (props) => props.theme.buttons.primary.hover },\r\n distress: { main: (props) => props.theme.buttons.distress.hover },\r\n distressactive: { main: (props) => props.theme.buttons.distressactive.hover },\r\n blue: { main: (props) => props.theme.buttons.blue.hover },\r\n});\r\n\r\nconst buttonDisabled = theme.variants(\"mode\", \"variant\", {\r\n primary: { main: (props) => props.theme.buttons.primary.disabled },\r\n distress: { main: (props) => props.theme.buttons.distress.disabled },\r\n distressactive: {\r\n main: (props) => props.theme.buttons.distressactive.disabled,\r\n },\r\n blue: { main: (props) => props.theme.buttons.blue.disabled },\r\n});\r\n\r\nconst buttonColorDisabled = theme.variants(\"mode\", \"variant\", {\r\n primary: { main: (props) => props.theme.buttons.primary.disabledColor },\r\n distress: { main: (props) => props.theme.buttons.distress.disabledColor },\r\n distressactive: {\r\n main: (props) => props.theme.buttons.distressactive.disabledColor,\r\n },\r\n blue: { main: (props) => props.theme.buttons.blue.disabledColor },\r\n});\r\n\r\nconst buttonColor = theme.variants(\"mode\", \"variant\", {\r\n primary: { main: (props) => props.theme.buttons.primary.color },\r\n distress: { main: (props) => props.theme.buttons.distress.color },\r\n distressactive: { main: (props) => props.theme.buttons.distressactive.color },\r\n blue: { main: (props) => props.theme.buttons.blue.color },\r\n});\r\n\r\nconst buttonBorder = theme.variants(\"mode\", \"variant\", {\r\n primary: { main: (props) => props.theme.buttons.primary.borderColor },\r\n distress: { main: (props) => props.theme.buttons.distress.borderColor },\r\n distressactive: {\r\n main: (props) => props.theme.buttons.distressactive.borderColor,\r\n },\r\n blue: { main: (props) => props.theme.buttons.blue.borderColor },\r\n});\r\n\r\nconst buttonBorderRadius = theme.variants(\"mode\", \"variant\", {\r\n primary: { main: (props) => props.theme.buttons.primary.borderRadius },\r\n distress: { main: (props) => props.theme.buttons.distress.borderRadius },\r\n distressactive: {\r\n main: (props) => props.theme.buttons.distressactive.borderRadius,\r\n },\r\n blue: { main: (props) => props.theme.buttons.blue.borderRadius },\r\n});\r\n\r\nconst Btn = styled.button`\r\nfont-weight: bold;\r\nfont-size: 2vw;\r\ntext-transform: uppercase;\r\ncursor: pointer;\r\n\r\nheight: auto;\r\nwidth: 15%;\r\nmargin: 40px;\r\nborder: none;\r\noutline: none;\r\npadding-top: 20px;\r\npadding-bottom: 20px;\r\nbox-shadow: 3px 5px 5px;\r\nborder-color: ${buttonBorder};\r\nbackground-color: ${buttonBackground};\r\ncolor: ${buttonColor};\r\nborder-radius: ${buttonBorderRadius};\r\n\r\n &.hover {\r\n @media only screen and (min-width: 601px){\r\n padding: 3px\r\n }\r\n border: 3px solid ${buttonHover};\r\n }\r\n\r\n &.focus {\r\n /* Visible in the full-colour space */\r\n box-shadow: 0px 0px 6px 6px ${buttonHover};\r\n outline: none;\r\n background-color:${buttonHover};\r\n color: #005A4B;\r\n fill: #005A4B;\r\n }\r\n :active{\r\n background-color:${buttonHover};\r\n color: #005A4B;\r\n }\r\n :focus-within\r\n .disabled,\r\n :disabled {\r\n /* color: ${buttonColorDisabled};\r\n background: ${buttonDisabled};\r\n border: 1px solid rgba(0, 0, 0, 0.15);\r\n border-color: ${buttonDisabled}; */\r\n text-decoration: none;\r\n cursor: not-allowed;\r\n } \r\n \r\n @media screen and (max-width: 600px) {\r\n height: auto;\r\n width: 80%;\r\n font-size: 20px;\r\n display: flex;\r\n margin-top: 0.2px;\r\n margin-bottom: 15px;\r\n }\r\n `;\r\n\r\n\r\nconst disableClick = () => console.log(\"Click disabled\");\r\n\r\nclass Button extends React.Component { \r\n constructor(props) {\r\n super(props);\r\n /*\r\n const {\r\n mode,\r\n main,\r\n variant,\r\n type,\r\n style,\r\n onClick,\r\n disabled,\r\n className,\r\n noicon,\r\n icon,\r\n notext,\r\n name,\r\n label,\r\n } = props;\r\n */\r\n\r\n this.newVariant = this.props.disabled ? \"disabled\" : this.props.variant;\r\n this.ftn = this.props.disabled ? disableClick : this.props.onClick;\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n \r\n {this.noicon ? null : (\r\n \r\n \r\n )}\r\n {this.props.label}\r\n {this.props.children}\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default Button;\r\n\r\nButton.defaultProps = {\r\n variant: \"primary\"\r\n};\r\n","import Paho from \"paho-mqtt\";\r\nimport { v4 as uuidv4 } from \"uuid\";\r\nimport config from \"../config.json\";\r\n\r\n/** @type {boolean} */\r\nlet _initialized = false;\r\n/** @type {Paho.Client} */\r\nlet _client = null;\r\n/** @type {string} */\r\nlet _clientId = null;\r\n/** @type {string} */\r\nlet _alarmId = null;\r\n\r\n/** @type {function(MqttEvent):void} */\r\nlet _onNewEvent = null;\r\n/** @type {function(MqttAck):void} */\r\nlet _onNewAck = null;\r\n/** @type {function(string):void} */\r\nlet _onNewStatus = null;\r\n\r\nexport class MqttEvent {\r\n /**\r\n * @param {string} mqttClientId\r\n * @param {string} eventId\r\n * @param {string} type\r\n * @param {string} [locationId]\r\n * @param {number} [time] Current time if not defined\r\n * @throws Throws error if required arguments are null or undefined\r\n */\r\n constructor(mqttClientId, eventId, type, locationId, time) {\r\n if (!mqttClientId) {\r\n throw new TypeError(\"mqttClientId is null!\");\r\n } else {\r\n this.MqttClientId = mqttClientId;\r\n }\r\n\r\n if (!eventId) {\r\n throw new TypeError(\"eventId is null!\");\r\n } else {\r\n this.EventId = eventId;\r\n }\r\n\r\n if (!type) {\r\n throw new TypeError(\"type is null!\");\r\n } else {\r\n this.Type = type;\r\n }\r\n\r\n if (!locationId) {\r\n this.LocationId = \"\";\r\n } else {\r\n this.LocationId = locationId;\r\n }\r\n\r\n if (!time) {\r\n this.Time = Math.floor(Date.now() / 1000);\r\n } else {\r\n this.Time = time;\r\n }\r\n }\r\n\r\n /**\r\n * @param {string} json\r\n * @returns {(MqttEvent|null)} `Event` if successful, otherwise `null`\r\n */\r\n static fromJson(json) {\r\n try {\r\n let obj = JSON.parse(json);\r\n return new MqttEvent(\r\n obj.MqttClientId,\r\n obj.EventId,\r\n obj.Type,\r\n obj.LocationId,\r\n obj.Time\r\n );\r\n } catch (err) {\r\n console.error(err);\r\n return null;\r\n }\r\n }\r\n}\r\n\r\nexport class MqttAck {\r\n /**\r\n * @param {string} mqttClientId\r\n * @param {string} eventId\r\n * @param {string} status\r\n * @param {number} [time] Current time if not defined\r\n * @throws Throws error if required arguments are null or undefined\r\n */\r\n constructor(mqttClientId, eventId, status, time) {\r\n if (!mqttClientId) {\r\n throw new TypeError(\"mqttClientId is null!\");\r\n } else {\r\n this.MqttClientId = mqttClientId;\r\n }\r\n\r\n if (!eventId) {\r\n throw new TypeError(\"eventId is null!\");\r\n } else {\r\n this.EventId = eventId;\r\n }\r\n\r\n if (!status) {\r\n throw new TypeError(\"eventId is null!\");\r\n } else {\r\n this.Status = status;\r\n }\r\n\r\n if (!time) {\r\n this.Time = Math.floor(Date.now() / 1000);\r\n } else {\r\n this.Time = time;\r\n }\r\n }\r\n /**\r\n * @param {string} json\r\n * @returns {(MqttAck|null)} `Event` if successful, otherwise `null`\r\n */\r\n static fromJson(json) {\r\n try {\r\n let obj = JSON.parse(json);\r\n return new MqttAck(obj.MqttClientId, obj.EventId, obj.Status, obj.Time);\r\n } catch (err) {\r\n console.error(err);\r\n return null;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * @param {string} alarmId\r\n */\r\nfunction initialize(alarmId) {\r\n if (_initialized) {\r\n return;\r\n }\r\n //_clientId = `${config.CLIENT_ID_PREFIX}-${alarmId}-${uuidv4()}`;\r\n _clientId = `${config.CLIENT_ID_PREFIX}-${alarmId}`;\r\n _client = new Paho.Client(\r\n config.BROKER_URL,\r\n config.BROKER_PORT,\r\n config.BROKER_PATH,\r\n _clientId\r\n );\r\n _client.onConnectionLost = _onConnectionLost;\r\n _client.onMessageArrived = _onMessageArrived;\r\n\r\n _alarmId = alarmId;\r\n\r\n _initialized = true;\r\n}\r\n\r\n/**\r\n * @param {Object} error\r\n * @param {number} error.errorCode\r\n * @param {string} error.errorMessage\r\n */\r\nfunction _onConnectionLost(error) {\r\n if (error.errorCode !== 0) {\r\n console.log(\"Connection Lost: \" + error.errorMessage);\r\n }\r\n}\r\n\r\n/**\r\n * @param {Paho.Message} message\r\n */\r\nfunction _onMessageArrived(message) {\r\n let topic = message.destinationName;\r\n let messageType = topic.split(\"/\").pop();\r\n if (messageType === \"ack\") {\r\n let ack = MqttAck.fromJson(message.payloadString);\r\n if (ack && _onNewAck) {\r\n let recId = ack.EventId.split(\".\")[0];\r\n if (recId === _alarmId) {\r\n _onNewAck(ack);\r\n }\r\n }\r\n } else if (messageType === \"event\") {\r\n let event = MqttEvent.fromJson(message.payloadString);\r\n if (event && _onNewEvent) {\r\n let recId = event.EventId.split(\".\")[0];\r\n if (recId === _alarmId) {\r\n _onNewEvent(event);\r\n }\r\n }\r\n }\r\n else if (messageType === \"status\") {\r\n let status = message.payloadString;\r\n if (_onNewStatus) {\r\n _onNewStatus(status);\r\n }\r\n }\r\n}\r\n\r\n\r\nfunction toggleConnection() {\r\n if (!_initialized) {\r\n return;\r\n }\r\n if (_client !== null) {\r\n if (_client.isConnected()) {\r\n disconnect();\r\n } else {\r\n connect();\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * @param {string} username\r\n * @param {string} password\r\n */\r\nfunction connect() {\r\n if (!_initialized) {\r\n return;\r\n }\r\n if (_client !== null && !_client.isConnected()) {\r\n _client.connect({\r\n userName: config.USERNAME,\r\n password: config.PASSWORD,\r\n onSuccess: _onConnectionSuccess,\r\n onFailure: _onConnectionFailure,\r\n useSSL: false,\r\n });\r\n }\r\n}\r\n\r\nfunction _onConnectionSuccess() {\r\n console.log(\"Connection Successfull!\");\r\n _client.subscribe(`tjx/${config.ORGANIZATION_ID}/server/+/ack`);\r\n _client.subscribe(`tjx/${config.ORGANIZATION_ID}/server/+/status`);\r\n _client.subscribe(`tjx/${config.ORGANIZATION_ID}/server/+/event`);\r\n}\r\n\r\nfunction _onConnectionFailure() {\r\n console.log(\"Connection Failed!\");\r\n}\r\n\r\nfunction disconnect() {\r\n if (!_initialized) {\r\n return;\r\n }\r\n if (_client !== null && _client.isConnected()) {\r\n _client.disconnect();\r\n }\r\n}\r\n\r\n/**\r\n * @param {string} topic\r\n * @param {string} message\r\n */\r\nfunction _publish(topic, message) {\r\n if (_client.isConnected()) {\r\n _client.send(topic, message);\r\n }\r\n}\r\n\r\n/**\r\n * @param {string} type\r\n * @param {string} eventId\r\n */\r\nfunction sendAlarm(type, eventId) {\r\n if (!_initialized) {\r\n return;\r\n }\r\n if (_client.isConnected()) {\r\n var topic = `tjx/${config.ORGANIZATION_ID}/client/${_client.clientId}/event`;\r\n var event = new MqttEvent(_client.clientId, `${_alarmId}.${eventId}`, type, _alarmId);\r\n var payload = JSON.stringify(event);\r\n _publish(topic, payload);\r\n }\r\n}\r\n\r\n/**\r\n * @param {function(MqttEvent):void} cb\r\n */\r\nfunction setOnNewEventCallback(cb) {\r\n if (!_initialized) {\r\n return;\r\n }\r\n _onNewEvent = cb;\r\n}\r\n\r\n/**\r\n * @param {function(MqttAck):void} cb\r\n */\r\nfunction setOnNewAckCallback(cb) {\r\n if (!_initialized) {\r\n return;\r\n }\r\n _onNewAck = cb;\r\n}\r\n/**\r\n * @param {function(string):void} cb\r\n */\r\nfunction setOnNewStatusCallback(cb) {\r\n if (!_initialized) {\r\n return;\r\n }\r\n _onNewStatus = cb;\r\n}\r\n\r\nexport default {\r\n initialize,\r\n toggleConnection,\r\n connect,\r\n disconnect,\r\n sendAlarm,\r\n setOnNewEventCallback,\r\n setOnNewAckCallback,\r\n setOnNewStatusCallback,\r\n};\r\n","import React from \"react\";\r\nimport Footer from \"./Footer\";\r\nimport PropTypes from \"prop-types\";\r\nimport DefaultButton from \"../components/DefaultButton\";\r\nimport styled from \"styled-components\";\r\nimport { Icon } from \"../assets/icons\";\r\nimport MqttClient, { MqttEvent, MqttAck } from \"../modules/MqttClient\";\r\n\r\nconst MainView = styled.div`\r\n width: 100%;\r\n height: auto;\r\n`;\r\n\r\nconst ButtonGroup = styled.div`\r\n width: 100%;\r\n display: flex;\r\n justify-content: center;\r\n margin-top: 40px;\r\n @media screen and (max-width: 600px) {\r\n width: 100%;\r\n height: auto;\r\n display: block;\r\n margin-top: 0.5px;\r\n justify-content: center;\r\n }\r\n`;\r\n\r\nclass MainContent extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.buttons = [];\r\n this.buttons[0] = [];\r\n this.buttons[1] = [];\r\n for (let i = 0; i < 2; i++) {\r\n for (let j = 0; j < 3; j++) {\r\n this.buttons[i][j] = React.createRef();\r\n }\r\n }\r\n this.state = {\r\n width: window.innerWidth,\r\n currentRow: 0,\r\n currentColumn: 0,\r\n activeButtons: [],\r\n colorBg: true,\r\n color: true,\r\n icon: true,\r\n errorTextValue: \"\",\r\n };\r\n }\r\n\r\n _changeColor() {\r\n this.setState({\r\n colorBg: !this.state.colorBg,\r\n color: !this.state.color,\r\n icon: !this.state.icon,\r\n });\r\n }\r\n\r\n _findButtonInList(currentValue) {\r\n return currentValue.row === this.row && currentValue.col === this.col;\r\n }\r\n\r\n _keypressToKeydownTranslation(e) {\r\n if (e.data.type === \"keypress\") {\r\n var event = new Event(\"keydown\");\r\n event.keyCode = e.data.code;\r\n document.dispatchEvent(event);\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param {number} row\r\n * @param {number} col\r\n * @param {boolean} [activate] `true` to activate button, `false` to deactivate, leave undefined to toggle\r\n */\r\n _toggleButton = (row, col, activate) => {\r\n const { activeButtons } = this.state;\r\n\r\n let isActive = false;\r\n let index = 0;\r\n for (var i = 0; i < activeButtons.length; i++) {\r\n if (activeButtons[i].row === row && activeButtons[i].col === col) {\r\n isActive = true;\r\n index = i;\r\n break;\r\n }\r\n }\r\n\r\n if (isActive) {\r\n if (activate === false || activate === undefined) {\r\n activeButtons.splice(index, 1);\r\n }\r\n } else {\r\n if (activate === true || activate === undefined) {\r\n activeButtons.push({ row: row, col: col });\r\n }\r\n }\r\n\r\n this.setState({ activeButtons: activeButtons });\r\n };\r\n\r\n _handleKeydown = (e) => {\r\n const { currentRow, currentColumn } = this.state;\r\n const buttonsEnum = {\r\n LEFT: 37,\r\n UP: 38,\r\n RIGHT: 39,\r\n DOWN: 40,\r\n OK: 13,\r\n RETURN: 10009,\r\n EXIT: 10182,\r\n };\r\n\r\n let decrementColumn = () => {\r\n return (\r\n (currentColumn - 1 + this.buttons[currentRow].length) %\r\n this.buttons[currentRow].length\r\n );\r\n };\r\n\r\n let incrementColumn = () => {\r\n return (\r\n (currentColumn + 1 + this.buttons[currentRow].length) %\r\n this.buttons[currentRow].length\r\n );\r\n };\r\n\r\n let decrementRow = () => {\r\n return (currentRow - 1 + this.buttons.length) % this.buttons.length;\r\n };\r\n\r\n let incrementRow = () => {\r\n return (currentRow + 1 + this.buttons.length) % this.buttons.length;\r\n };\r\n\r\n var newRow = currentRow;\r\n var newColumn = currentColumn;\r\n if (e.keyCode == buttonsEnum.LEFT) {\r\n newColumn = decrementColumn();\r\n } else if (e.keyCode == buttonsEnum.UP) {\r\n newRow = decrementRow();\r\n } else if (e.keyCode == buttonsEnum.RIGHT) {\r\n newColumn = incrementColumn();\r\n } else if (e.keyCode == buttonsEnum.DOWN) {\r\n newRow = incrementRow();\r\n } else if (e.keyCode == buttonsEnum.OK) {\r\n this.buttons[currentRow][currentColumn].current.props.onClick();\r\n //this._onButtonClick(currentRow, currentColumn);\r\n return;\r\n } else {\r\n return;\r\n }\r\n //this.buttons[newRow][newColumn].current.focus();\r\n this.setState({ currentRow: newRow, currentColumn: newColumn });\r\n };\r\n\r\n /**\r\n * @param {MqttAck} ack\r\n */\r\n _onNewAck = (ack) => {\r\n let index = ack.EventId.split(\".\").pop();\r\n switch (index) {\r\n case \"0\":\r\n this._toggleButton(0, 0, true);\r\n break;\r\n case \"1\":\r\n this._toggleButton(0, 1, true);\r\n break;\r\n case \"2\":\r\n this._toggleButton(0, 2, true);\r\n break;\r\n case \"3\":\r\n this._toggleButton(1, 0, true);\r\n break;\r\n case \"4\":\r\n this._toggleButton(1, 2, true);\r\n this.setState({\r\n colorBg: !this.state.colorBg,\r\n color: !this.state.color,\r\n icon: !this.state.icon,\r\n });\r\n break;\r\n default:\r\n break;\r\n }\r\n };\r\n\r\n _onNewStatus = (mqttstatus) => {\r\n if (mqttstatus === \"dead\") {\r\n this.setState({ errorTextValue: \"Connection down!\" });\r\n } else {\r\n this.setState({ errorTextValue: \"\" });\r\n }\r\n };\r\n\r\n /**\r\n * @param {MqttEvent} event\r\n */\r\n _onNewEvent = (event) => {\r\n if (event.Type === \"RESET\") {\r\n let index = event.EventId.split(\".\").pop();\r\n switch (index) {\r\n case \"0\":\r\n this._toggleButton(0, 0, false);\r\n break;\r\n case \"1\":\r\n this._toggleButton(0, 1, false);\r\n break;\r\n case \"2\":\r\n this._toggleButton(0, 2, false);\r\n break;\r\n case \"3\":\r\n this._toggleButton(1, 0, false);\r\n break;\r\n case \"4\":\r\n this._toggleButton(1, 2, false);\r\n this.setState({\r\n colorBg: !this.state.colorBg,\r\n color: !this.state.color,\r\n icon: !this.state.icon,\r\n });\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n };\r\n\r\n _onMouseEnter(row, col) {\r\n this.setState({ currentRow: row, currentColumn: col });\r\n }\r\n\r\n _onMouseLeave() {\r\n //this.setState({ currentRow: 0, currentColumn: 0 });\r\n }\r\n\r\n _getClassname(row, col) {\r\n let curRow = this.state.currentRow;\r\n let curCol = this.state.currentColumn;\r\n let isCurrent = row === curRow && col === curCol;\r\n let isPressed =\r\n this.state.activeButtons.find(this._findButtonInList, {\r\n row: row,\r\n col: col,\r\n }) !== undefined;\r\n let classNameList = [];\r\n\r\n if (isCurrent) {\r\n classNameList.push(\"hover\");\r\n }\r\n\r\n if (isPressed) {\r\n classNameList.push(\"focus\");\r\n }\r\n\r\n return classNameList.join(\" \");\r\n }\r\n\r\n _handleWindowSizeChange = () => {\r\n this.setState({ width: window.innerWidth });\r\n };\r\n\r\n _sendIfNotActive(type, eventid, x, y) {\r\n if (\r\n !this.state.activeButtons.find(this._findButtonInList, {\r\n row: x,\r\n col: y,\r\n })\r\n ) {\r\n MqttClient.sendAlarm(type, eventid);\r\n }\r\n }\r\n\r\n componentDidMount() {\r\n window.addEventListener(\"resize\", this._handleWindowSizeChange);\r\n document.addEventListener(\"keydown\", this._handleKeydown);\r\n window.addEventListener(\"message\", this._keypressToKeydownTranslation);\r\n MqttClient.setOnNewAckCallback(this._onNewAck);\r\n MqttClient.setOnNewStatusCallback(this._onNewStatus);\r\n MqttClient.setOnNewEventCallback(this._onNewEvent);\r\n }\r\n\r\n componentWillUnmount() {\r\n window.removeEventListener(\"resize\", this._handleWindowSizeChange);\r\n document.removeEventListener(\"keydown\", this._handleKeydown);\r\n window.removeEventListener(\"message\", this._keypressToKeydownTranslation);\r\n }\r\n\r\n render() {\r\n let bgColor = this.state.colorBg ? \"#B9E6E6\" : \"#E6373C\";\r\n let color = this.state.color ? \"#E6373C\" : \"#005A4B\";\r\n let icon = this.state.icon ? (\r\n \r\n ) : (\r\n \r\n );\r\n const { width } = this.state;\r\n const isMobile = width <= 500;\r\n if (isMobile) {\r\n return (\r\n \r\n \r\n {\r\n MqttClient.sendAlarm(\"mat\");\r\n }}\r\n onMouseEnter={() => {\r\n this._onMouseEnter(0, 0);\r\n }}\r\n onMouseLeave={() => {\r\n this._onMouseLeave();\r\n }}\r\n />\r\n {\r\n MqttClient.sendAlarm(\"toalett\");\r\n }}\r\n onMouseEnter={() => {\r\n this._onMouseEnter(0, 1);\r\n }}\r\n onMouseLeave={() => {\r\n this._onMouseLeave();\r\n }}\r\n />\r\n {\r\n MqttClient.sendAlarm(\"vatten\");\r\n }}\r\n onMouseEnter={() => {\r\n this._onMouseEnter(0, 2);\r\n }}\r\n onMouseLeave={() => {\r\n this._onMouseLeave();\r\n }}\r\n />\r\n \r\n \r\n {\r\n MqttClient.sendAlarm(\"medicin\");\r\n }}\r\n onMouseEnter={() => {\r\n this._onMouseEnter(1, 0);\r\n }}\r\n onMouseLeave={() => {\r\n this._onMouseLeave();\r\n }}\r\n />\r\n {\r\n }}\r\n onMouseEnter={() => {\r\n this._onMouseEnter(1, 1);\r\n }}\r\n onMouseLeave={() => {\r\n this._onMouseLeave();\r\n }}\r\n />\r\n {\r\n MqttClient.sendAlarm(\"distress\");\r\n }}\r\n onMouseEnter={() => {\r\n this._onMouseEnter(1, 2);\r\n }}\r\n onMouseLeave={() => {\r\n this._onMouseLeave();\r\n }}\r\n >\r\n {icon}\r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n } else {\r\n return (\r\n \r\n
\r\n

{this.state.errorTextValue}

\r\n
\r\n \r\n {\r\n this._sendIfNotActive(\"mat\", \"0\", 0, 0);\r\n }}\r\n onMouseEnter={() => {\r\n this._onMouseEnter(0, 0);\r\n }}\r\n onMouseLeave={() => {\r\n this._onMouseLeave();\r\n }}\r\n />\r\n {\r\n this._sendIfNotActive(\"toalett\", \"1\", 0, 1);\r\n }}\r\n onMouseEnter={() => {\r\n this._onMouseEnter(0, 1);\r\n }}\r\n onMouseLeave={() => {\r\n this._onMouseLeave();\r\n }}\r\n />\r\n {\r\n this._sendIfNotActive(\"vatten\", \"2\", 0, 2);\r\n }}\r\n onMouseEnter={() => {\r\n this._onMouseEnter(0, 2);\r\n }}\r\n onMouseLeave={() => {\r\n this._onMouseLeave();\r\n }}\r\n />\r\n \r\n \r\n {\r\n this._sendIfNotActive(\"medicin\", \"3\", 1, 0);\r\n }}\r\n onMouseEnter={() => {\r\n this._onMouseEnter(1, 0);\r\n }}\r\n onMouseLeave={() => {\r\n this._onMouseLeave();\r\n }}\r\n />\r\n {\r\n }}\r\n onMouseEnter={() => {\r\n this._onMouseEnter(1, 1);\r\n }}\r\n onMouseLeave={() => {\r\n this._onMouseLeave();\r\n }}\r\n />\r\n {\r\n this._sendIfNotActive(\"distress\", \"4\", 1, 2);\r\n }}\r\n onMouseEnter={() => {\r\n this._onMouseEnter(1, 2);\r\n }}\r\n onMouseLeave={() => {\r\n this._onMouseLeave();\r\n }}\r\n >\r\n {icon}\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n /* \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{}
\r\n
\r\n
*/\r\n );\r\n }\r\n }\r\n}\r\n\r\nMainContent.propTypes = {\r\n location: PropTypes.shape({\r\n search: PropTypes.string,\r\n }),\r\n};\r\n\r\nexport default MainContent;\r\n","import React from 'react';\r\nimport styled from 'styled-components';\r\nimport { Link, withRouter } from 'react-router-dom';\r\nimport { LogoGreen} from '../components/images';\r\n\r\n\r\nconst SideView = styled.div`\r\n overflow-x: hidden; \r\n overflow-y: auto; \r\n margin: 0;\r\n padding: 0;\r\n width: 100%;\r\n width: 200px;\r\n background-color: #D7EBEB;\r\n position: fixed;\r\n height: 100%;\r\n text-transform:uppercase;\r\n a{\r\n display: block;\r\n color: #005A4B;\r\n padding: 16px;\r\n text-decoration: none;\r\n }\r\n a:active{\r\n background-color: #F0F0F0;\r\n color: green;\r\n }\r\n a:hover:not(.active) {\r\n background-color: #F0F0F0;\r\n color: #005A4B;\r\n}\r\n\r\n@media screen and (max-width: 700px) {\r\n width: 100%;\r\n height: auto;\r\n position: relative;\r\n a {float: left;}\r\n}\r\n\r\n@media screen and (max-width: 400px) {\r\n a {\r\n text-align: center;\r\n float: none;\r\n }\r\n}\r\n`;\r\n\r\n \r\nconst StyledLogo = styled.div`\r\nposition: relative;\r\npadding-left: 42px;\r\nmargin: 4px;\r\nimg{\r\n width: 100%;\r\n height: auto;\r\n max-width:90px;\r\n}\r\n\r\n\r\n`;\r\n\r\nconst Info = styled.div`\r\npadding: 20px;\r\nmargin-bottom: 3em;\r\nfont-size:20px;\r\n\r\nh1{\r\n font-size:20px;\r\n font-style:bold;\r\n color: #005A4B;\r\n}\r\n\r\n@media screen and (max-width: 600px) {\r\n \r\n width: 100%;\r\n height: auto;\r\n position: relative;\r\n float: left;\r\ndiv.content {margin-left: 0;}\r\n}\r\n`;\r\nconst StyledLink = styled.div`\r\n margin-top: 2em;\r\n`;\r\n\r\nclass Sidebar extends React.Component {\r\n constructor(props){\r\n super(props); \r\n \r\n this.routeChange = this.routeChange.bind(this);\r\n}\r\nrouteChange() {\r\n let path = `/`;\r\n // eslint-disable-next-line react/prop-types\r\n this.props.history.push(path);\r\n}\r\n render() {\r\n return (\r\n \r\n \r\n

information

\r\n { this.routeChange()}}>\r\n \r\n \r\n \r\n
\r\n öppetider\r\n matsedel\r\n personligt\r\n Tillbaka \r\n
\r\n )\r\n\r\n }\r\n}\r\n\r\nexport default withRouter (Sidebar);\r\n\r\n","import React from 'react';\r\nimport styled from 'styled-components';\r\n\r\n\r\nconst Inf= styled.div`\r\n width:500px;\r\n height: auto;\r\n padding:10px;\r\n background-color: #D7EBEB;\r\n position: relative;\r\n margin-top: 4em;\r\n margin-left: 25em;\r\n overflow-x: hidden; \r\n overflow-y: auto; \r\n\r\n h3{\r\n color:#005A4B;\r\n padding:10px;\r\n font-size:25px;\r\n }\r\n p{\r\n color:#333333;\r\n padding-left:20px;\r\n font-size:20px;\r\n }\r\n @media screen and (max-width: 700px) {\r\n margin-top: 2em;\r\n margin-left: 4em;\r\n width: 400px;\r\n h3{\r\n color:#005A4B;\r\n padding:10px;\r\n font-size:calc(5px + 1.5vw);\r\n }\r\n p{\r\n color:#333333;\r\n padding-left:10px;\r\n font-size:calc(4px + 1.5vw);\r\n }\r\n }\r\n\r\n @media screen and (max-width: 500px) {\r\n width:100%;\r\n height: auto;\r\n margin-top: 1em;\r\n margin-left: -1em;\r\n }\r\n `;\r\n\r\nconst Col1= styled.div` \r\nul{\r\n list-style-type:none;\r\n padding: 20px;\r\n font-size:20px;\r\n } \r\nli{\r\n padding: 10px;\r\n font-size:15px;\r\n} \r\n\r\n@media screen and (max-width: 700px) {\r\n ul{\r\n list-style-type:none;\r\n padding: 20px;\r\n font-size:calc(3px + 1.5vw);\r\n } \r\nli{\r\n padding: 10px;\r\n font-size:calc(3px + 1.5vw);\r\n} \r\n }\r\n\r\n`;\r\n\r\nconst Col2= styled.div`\r\nul{\r\n list-style-type:none;\r\n padding: 20px;\r\n font-size:20px;\r\n } \r\nli{\r\n padding: 10px;\r\n font-size:15px;\r\n} \r\n\r\n@media screen and (max-width: 700px) {\r\n ul{\r\n list-style-type:none;\r\n padding: 20px;\r\n font-size:calc(3px + 1.5vw);\r\n } \r\nli{\r\n padding: 10px;\r\n font-size:calc(3px + 1.5vw);\r\n} \r\n } \r\n`;\r\n\r\nconst InfoContent = styled.div`\r\n overflow-x: hidden; \r\n overflow-y: auto; \r\n position: relative;\r\n left: 60px;\r\n display:flex;\r\n\r\n @media screen and (max-width: 400px) {\r\n width:100%;\r\n height: auto;\r\n margin-top: 1em;\r\n \r\n } \r\n`;\r\n\r\n\r\n\r\nfunction InfoTider () {\r\n \r\n return (\r\n \r\n

Våra öppettider

\r\n

Nedan kan du se våra öppettider

\r\n \r\n \r\n
    \r\n
  • \r\n Öppetider\r\n
  • \r\n
  • \r\n Måndag 08:00-17:00\r\n
  • \r\n
  • \r\n Tisdag 08:00-17:00\r\n
  • \r\n
  • \r\n Onsdag 08:00-17:00\r\n
  • \r\n
  • \r\n Torsdag 08:00-17:00\r\n
  • \r\n
  • \r\n Fredag 08:00-17:00\r\n
  • \r\n
\r\n
\r\n \r\n
    \r\n
  • \r\n Besökstider\r\n
  • \r\n
  • \r\n Måndag 08:00-17:00\r\n
  • \r\n
  • \r\n Tisdag 08:00-17:00\r\n
  • \r\n
  • \r\n Onsdag 08:00-17:00\r\n
  • \r\n
  • \r\n Torsdag 08:00-17:00\r\n
  • \r\n
  • \r\n Fredag 08:00-17:00\r\n
  • \r\n
\r\n
\r\n
\r\n

Övrig tid är jourtid

\r\n
\r\n )\r\n}\r\n\r\nexport default InfoTider;","import React from 'react';\r\nimport styled from 'styled-components';\r\n\r\n\r\nconst Inf= styled.div`\r\n padding:10px;\r\n width:700px;\r\n height: auto;\r\n padding:10px;\r\n background-color: #D7EBEB;\r\n position: relative;\r\n margin-top: 4em;\r\n margin-left: 25em;\r\n h3{\r\n color:#005A4B;\r\n padding:10px;\r\n text-transform: uppercase;\r\n text-align: center;\r\n font-size:20px;\r\n }\r\n\r\n h5{\r\n text-transform: capitalize;\r\n text-align: center;\r\n color: #46AFA0;\r\n font-size:15px;\r\n }\r\n p{\r\n color:#333333;\r\n text-align: center;\r\n font-size:10px;\r\n }\r\n\r\n @media screen and (max-width: 700px) {\r\n margin-top: 2em;\r\n margin-left: 4em;\r\n width: 400px;\r\n overflow: auto;\r\nh3{\r\n \r\n font-size:calc(4px + 1.5vw);\r\n }\r\n\r\n h5{\r\n \r\n font-size:calc(3px + 1.5vw);\r\n }\r\n p{\r\n \r\n font-size:calc(2px + 1.5vw);\r\n }\r\n }\r\n\r\n\r\n @media screen and (max-width: 500px) {\r\n width:100%;\r\n height: auto;\r\n margin-top: 1em;\r\n margin-left: -1em;\r\n overflow: auto;\r\n }\r\n `;\r\n\r\n\r\n\r\n\r\nfunction InfoMat () {\r\n \r\n return (\r\n \r\n

matsedel

\r\n
måndag
\r\n

chorizo med sambalamajonäs

\r\n

veg. syakorv med sambalamajonäs

\r\n
tisdag
\r\n

chorizo med sambalamajonäs

\r\n

veg. syakorv med sambalamajonäs

\r\n
onsdag
\r\n

chorizo med sambalamajonäs

\r\n

veg. syakorv med sambalamajonäs

\r\n
torsdag
\r\n

chorizo med sambalamajonäs

\r\n

veg. syakorv med sambalamajonäs

\r\n
fredag
\r\n

chorizo med sambalamajonäs

\r\n

veg. syakorv med sambalamajonäs

\r\n
\r\n )\r\n}\r\n\r\nexport default InfoMat;","import React from 'react';\r\nimport styled from 'styled-components';\r\n\r\n\r\nconst Inf= styled.div`\r\n padding:10px;\r\n background-color: #D7EBEB;\r\n position:relative;\r\n top: 200px;\r\n left: 400px; \r\n width: 50%;\r\n h5{\r\n text-transform: capitalize;\r\n text-align: center;\r\n color: #E6373C;\r\n font-size:calc(5px + 1.5vw);\r\n }\r\n\r\n @media screen and (max-width: 700px) {\r\n \r\n margin-left: -20em;\r\n \r\n }\r\n\r\n `;\r\n\r\n\r\n\r\nfunction InfoPrivate () {\r\n \r\n return (\r\n \r\n
Denna sida kräver inloggning!
\r\n
\r\n )\r\n}\r\n\r\nexport default InfoPrivate;","import React from 'react';\r\nimport styled from 'styled-components';\r\nimport {\r\n BrowserRouter as Router,\r\n Route, withRouter\r\n} from 'react-router-dom'\r\n\r\n\r\nimport Sidebar from './Sidebar';\r\nimport InfoTider from './InfoTider';\r\nimport InfoMat from './InfoMat';\r\nimport InfoPrivate from './InfoPrivat';\r\nimport { IconClose } from '../assets/icons';\r\n\r\n\r\n\r\n\r\nconst InfoView = styled.div`\r\n background-image: url('/bakgrundblue.svg');\r\n-webkit-background-size: cover;\r\n-moz-background-size: cover;\r\n-o-background-size: cover;\r\nbackground-size: cover;\r\n\r\nheight: auto;\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n :before {\r\n content: '';\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n background: inherit;\r\n z-index: -1;\r\n\r\n transition: all 2s linear;\r\n -moz-transition: all 2s linear;\r\n -webkit-transition: all 2s linear;\r\n -o-transition: all 2s linear;\r\n }\r\n\r\n @media screen and (min-width: 400px) {\r\n min-height: 100%;\r\n min-width: 1024px;\r\n width: 100%;\r\n }\r\n @media (max-width: 500px) {\r\n width: 100%;\r\n height:1000px;\r\n position: absolute;\r\n }\r\n `;\r\n \r\n const CloseButton = styled.button`\r\n outline: none;\r\n border: none;\r\n margin: 25px;\r\n padding:7.5px;\r\n float:right;\r\n border-radius: 20px;\r\n height:40px;\r\n width: 40px;\r\n:hover:not(.active) {\r\n background-color: #D7EBEB;\r\n color: #005A4B;\r\n}\r\n@media (max-width: 700px) {\r\n display: none;\r\n }\r\n`;\r\n\r\nconst routes = [\r\n { path: '/tider',\r\n // eslint-disable-next-line react/display-name\r\n info: () =>,\r\n },\r\n { path: '/mat',\r\n // eslint-disable-next-line react/display-name\r\n info: () => ,\r\n },\r\n { path: '/private',\r\n // eslint-disable-next-line react/display-name\r\n info: () => \r\n }\r\n]\r\n\r\n\r\nclass InfoPage extends React.Component { \r\n constructor(props){\r\n super(props); \r\n \r\n this.routeChange = this.routeChange.bind(this);\r\n }\r\n routeChange() {\r\n let path = `/`;\r\n // eslint-disable-next-line react/prop-types\r\n this.props.history.push(path);\r\n }\r\n \r\n render () {\r\n return (\r\n \r\n { this.routeChange()}}>\r\n \r\n \r\n \r\n \r\n {routes.map((route) => (\r\n \r\n ))}\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default withRouter (InfoPage);","import React from \"react\";\r\nimport styled from \"styled-components\";\r\nimport { Route, Switch } from \"react-router-dom\";\r\n\r\nimport Header from \"./components/Header\";\r\nimport MainContent from \"./components/Content\";\r\nimport InfoPage from \"./components/Info\";\r\nimport QueryString from \"query-string\"\r\n\r\nimport MqttClient from \"./modules/MqttClient\"\r\n\r\nconst MainView = styled.div`\r\n background-image: url(\"/bakgrundblue_optimized.svg\");\r\n -webkit-background-size: cover;\r\n -moz-background-size: cover;\r\n -o-background-size: cover;\r\n background-size: cover;\r\n position: fixed;\r\n :before {\r\n content: \"\";\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n background: inherit;\r\n z-index: -1;\r\n transition: all 2s linear;\r\n -moz-transition: all 2s linear;\r\n -webkit-transition: all 2s linear;\r\n -o-transition: all 2s linear;\r\n }\r\n\r\n @media screen and (min-width: 400px) {\r\n min-height: 100%;\r\n width: 100%;\r\n }\r\n\r\n@media screen and (max-width: 500px) {\r\n min-height: 100%;\r\n width: 100%;\r\n}\r\n`;\r\n\r\nfunction App() {\r\n // ...?building=HHH&department=VV&room=RRRR&bed=SS\r\n var params = QueryString.parse(window.location.search);\r\n console.log(params);\r\n var alarmid = \"1234\" + \"56\" + \"789\" + \"10\";\r\n MqttClient.initialize(alarmid);\r\n MqttClient.connect();\r\n return (\r\n <>\r\n \r\n
\r\n \r\n }*/\r\n component={MainContent}\r\n />\r\n \r\n } />\r\n
\r\n \r\n );\r\n}\r\n\r\nexport default App;\r\n","// object with the basic styles\r\nconst colors = {\r\n greyF0: \"#F0F0F0\", // Light\r\n greyE6: '#e6e6e6', // Use for disable\r\n teal1: \"#005A4B\", // Darkest\r\n teal2: \"#008273\", // Main Tjeders green\r\n teal5: \"#D7EBEB\",\r\n blue1: \"#009BAF\",\r\n blue1hover: \"#006c80\",\r\n blue3: \"#B9E6E6\",\r\n yellow1: \"#FFC84B\",\r\n signalRed: \"#E6373C\",\r\n white: '#FFFFFF',\r\n};\r\n\r\nconst size = {\r\n radius: \"15px\",\r\n};\r\n\r\nconst primary = {\r\n color: colors.teal1,\r\n background: colors.blue3,\r\n disabled: colors.greyE6,\r\n borderColor: colors.yellow1,\r\n hover: colors.yellow1,\r\n disabledColor: colors.white,\r\n borderRadius: size.radius,\r\n};\r\nconst secondary = {\r\n color: colors.teal1,\r\n background: colors.yellow1,\r\n disabled: colors.grey,\r\n borderColor: colors.yellow1,\r\n hover: colors.yellow1,\r\n disabledColor: colors.darkGrey,\r\n borderRadius: size.radius,\r\n};\r\n\r\nconst distress = {\r\n color: colors.signalRed,\r\n background: colors.blue3,\r\n disabled: colors.grey,\r\n borderColor: colors.signalRed,\r\n hover: colors.signalRed,\r\n disabledColor: colors.darkGrey,\r\n borderRadius: size.radius,\r\n};\r\n\r\nconst distressactive = {\r\n color: colors.teal1,\r\n background: colors.signalRed,\r\n disabled: colors.grey,\r\n borderColor: colors.signalRed,\r\n hover: colors.signalRed,\r\n disabledColor: colors.darkGrey,\r\n borderRadius: size.radius,\r\n };\r\n\r\nconst blue = {\r\n color: colors.teal1,\r\n background: colors.blue3,\r\n hover: colors.blue1,\r\n disabled: colors.greyD0,\r\n borderColor: colors.blue1,\r\n disabledColor: colors.darkGrey,\r\n borderRadius: size.radius,\r\n};\r\n\r\nconst buttons = {\r\n primary,\r\n secondary,\r\n distress,\r\n blue,\r\n distressactive,\r\n};\r\n\r\n\r\nconst mainTheme = {\r\n buttons,\r\n colors,\r\n\r\n};\r\n\r\nexport default mainTheme;","import React from \"react\";\r\nimport ReactDOM from \"react-dom\";\r\nimport App from \"./App\";\r\nimport { ThemeProvider } from \"styled-components\";\r\nimport mainTheme from \"./assets/css/mainTheme\";\r\nimport { BrowserRouter as Router } from \"react-router-dom\";\r\n\r\nReactDOM.render(\r\n \r\n \r\n \r\n \r\n \r\n \r\n ,\r\n document.getElementById(\"root\")\r\n);\r\n"],"sourceRoot":""}