{"version":3,"sources":["components/shared/NotificationHook.tsx","components/App.tsx","serviceWorker.ts","index.tsx","utils/functions.tsx","enums/routes.ts","reducers/authReducer.ts","reducers/notificationReducer.ts","reducers/groupReducers.ts","reducers/deviceReducers.ts","reducers/deviceIdentityReducers.ts","reducers/settingsReducer.ts","reducers/collectionReducers.ts","reducers/collectionItemReducers.ts","reducers/eventItemReducers.ts","reducers/dashboardItemReducers.ts","reducers/pageSizeReducer.ts","reducers/index.ts","store/configureStore.ts","configs.ts","actions/pageSizeAction.ts","constants/index.ts","components/shared/Portal.tsx","utils/ThemeContext.tsx"],"names":["NotificationHook","notificationState","useSelector","state","notification","dispatch","useDispatch","Portal","toggle","title","message","onDismiss","type","TOGGLE_NOTIFICATION","dismissable","position","persist","theme","i","NotFound","React","lazy","Home","Account","Auth","SignUp","PublicBreakdown","App","memo","props","states","auth","authStatee","pageSize","useState","setValue","checkApi","axios","get","response","newValue","data","version","store","window","confirm","caches","keys","then","names","Promise","all","map","name","delete","location","reload","console","error","useEffect","intervalId","setInterval","clearInterval","Suspense","fallback","Loader","exact","from","to","AppRoutes","path","component","Login","withRouter","isLocalhost","Boolean","hostname","match","registerValidSW","swUrl","config","navigator","serviceWorker","register","registration","onupdatefound","installingWorker","installing","onstatechange","controller","log","onUpdate","onSuccess","catch","ReactDOM","render","loading","persistor","StrictMode","document","getElementById","URL","process","href","origin","addEventListener","fetch","headers","contentType","status","indexOf","ready","unregister","checkValidServiceWorker","getDateDifference","date","dayjs","diff","formatDateTime","format","formatDate","timeAgo","dateString","givenDate","Date","_date","setMinutes","getMinutes","getTimezoneOffset","getTime","minutes","Math","floor","hours","remainingMinutes","days","remainingHours","weeks","remainingDays","months","remainingWeeks","years","remainingMonths","convertUTCDateToLocalDate","newDate","err","convertFormDateToUTC","localDateTime","localDate","toISOString","slice","convertToUtc","extend","utc","d","convertDateToUTCWithStartTime","split","Number","year","month","day","UTC","convertDateToUTCWithEndTime","convertPeriodToFromAndTo","period","utcNow","currHour","currDay","hour","st","setFullYear","setHours","setSeconds","sm","slm","startOfLastMonth","locatTime","firstMonth","currYear","convertUTCDateToLocalDateLineChart","category","convertStringToJson","strValue","JSON","parse","AppRoute","renderProps","HomeRoutes","TriggerRoutes","GroupRoutes","ViewDeviceRoutes","ViewEventActionRoutes","ViewDeviceItemRoutes","ViewCollectionRoutes","ViewBatsRoutes","AssetsRoutes","Triggers","Groups","Devices","EventActions","DeviceItem","dataCollection","Viewbats","BatDashboard","BatsReport","ViewRoomData","Report","BatAdmin","SvgDashboard","Notification","ViewNotification","AssetManagement","AssetConfiguration","ServiceReport","BreakdownReport","Breakdown","WorkOrder","BreakdownDetails","WorkOrderDetails","ServicingDetails","ServiceAssetDetails","Servicing","Maintanance","EditService","CreateService","ViewAsset","initialState","isFetching","isAuthenticated","groups","devices","deviceIdentities","dashboardRefresh","configs","dashbordRefreshRate","collections","collectionItem","eventItems","eventTriggers","dashItems","eventSize","dataValueSize","assetLandingPageRowSize","triggerLandingPageRowSize","combineReducers","action","RECEIVE_AUTH_USER","LOG_AUTH_ERROR","REQUEST_AUTH_USER","SIGNOUT_USER","token","user","RECEIVE_GROUPS","LOG_GROUP_ERROR","statusText","CLEAR_GROUPS","RECEIVE_DEVICES","RESET_DEVICE","LOG_DEVICE_ERROR","devicesIdentity","RECEIVE_DEVICE_IDENTITY","deviceIdentity","CLEAR_DEVICE_IDENTITY","settings","SET_DATA_REFRESH_TIME","RECEIVE_COLLECTIONS","collection","CLEAR_COLLECTIONS","collectionItems","RECEIVE_COLLECTION_ITEMS","CLEAR_COLLECTION_ITEMS","RECEIVE_EVENT_ITEMS","eventItem","RESET","eventTrigger","RECEIVE_EVENT_TRIGGER","RECEIVE_ITEMS","items","CLEAR_ITEMS","RECIEVE_EVENT_SIZE","RECIEVE_DATAVALUE_SIZE","RECIEVE_ASSET_SIZE","assetSize","RECIEVE_TRIGGER_SIZE","triggerSize","VERSION","persistConfig","key","appName","storage","whitelist","persistedReducer","persistReducer","reducers","createStore","composeWithDevTools","applyMiddleware","thunk","persistStore","APILIST","delay","port","toastDelay","tokenStorage","socket","context","filePath","context2","history","createBrowserHistory","requestTimeOut","apiList","tablePageSize","revieveEventPageSize","constants","revieveDataValuePageSize","recieveAssetDataPageSize","recieveTriggerDataPageSize","ChartType","DashboardItemStatus","CLEAR_AUTH_DATA","DAYSOFWEEK","label","value","SENSORSTYPESCOLUMN","accessor","isHidden","DASHBOARDDATASOURCECOLUMN","ACTUATORCOLUMNS","ATTRIBUTESCOLUMNS","ACTUATORS","DASHBOARDITEMTYPES","HTTPREQUESTMETHODS","TIMERULEOPERATORS","STRINGRULEOPRATORS","NUMBERRULEOPERATORS","COLLECTIONRULESOPERATOR","ACTIONTYPES","ACTIONTYPESFRONTSEARCH","Tank","Gauge","BarGraph","LineGraph","Doughnut","PieChart","SENSORSTYPES","DURATION","AUTOMATIONACTIONTYPES","AUTOMATIONTYPES","RecipientType","NotificationPriority","Severity","DEVICETYPES","fullscreen","centered","size","disableBackdropDismiss","PortalComponent","el","portalRoot","componentDidMount","appendChild","componentWillUnmount","removeChild","createElement","children","this","createPortal","ThemeContext","createContext","undefined","ThemeProvider","localStorage","getItem","setTheme","Provider","toggleTheme","newTheme","setItem","className","useTheme","useContext","Error"],"mappings":";4RAmCeA,EA3BmC,WAAiC,IAAD,QACxEC,EAAoBC,aAAY,SAACC,GAAa,OAAKA,EAAMC,gBACzDC,EAAWC,cAMjB,OACI,gBAACC,EAAA,EAAe,KACZ,gBAAC,IAAY,CACTC,OAAyB,OAAjBP,QAAiB,IAAjBA,GAA+B,QAAd,EAAjBA,EAAmBG,oBAAY,WAAd,EAAjB,EAAiCI,OACzCC,MAAwB,OAAjBR,QAAiB,IAAjBA,GAA+B,QAAd,EAAjBA,EAAmBG,oBAAY,WAAd,EAAjB,EAAiCK,MACxCC,QAA0B,OAAjBT,QAAiB,IAAjBA,GAA+B,QAAd,EAAjBA,EAAmBG,oBAAY,WAAd,EAAjB,EAAiCM,QAC1CC,UAVkB,WAC1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,MACPG,SAAU,OAEZ,CACEH,MAAO,QACPG,SAAU,SAEZ,CACEH,MAAO,UACPG,SAAU,YAIDI,EAAmC,CAC9C,CACEP,MAAO,KACPG,SAAU,KACVC,UAAU,GAEZ,CACEJ,MAAO,WACPG,SAAU,WACVC,UAAU,GAEZ,CACEJ,MAAO,YACPG,SAAU,YACVC,UAAU,GAEZ,CACEJ,MAAO,OACPG,SAAU,QAEZ,CACEH,MAAO,YACPG,SAAU,QAEZ,CACEH,MAAO,gBACPG,SAAU,gBAEZ,CACEH,MAAO,iBACPG,SAAU,aAEZ,CACEH,MAAO,gBACPG,SAAU,mBAIDK,EAAY,CACvB,CACER,MAAO,UACPC,MAAO,GAET,CACED,MAAO,SACPC,MAAO,GAET,CACED,MAAO,UACPC,MAAO,IA8BEQ,EAAqB,CAChC,CACET,MAAO,cACPC,MAAO,GAET,CACED,MAAO,wBACPC,MAAO,IAET,CACED,MAAO,mBACPC,MAAO,IAET,CACED,MAAO,eACPC,MAAO,IAET,CACED,MAAO,kBACPC,MAAO,IAET,CACED,MAAO,YACPC,MAAO,IAET,CACED,MAAO,qBACPC,MAAO,IAET,CACED,MAAO,OACPC,MAAO,GAET,CACED,MAAO,QACPC,MAAO,GAET,CACED,MAAO,eACPC,MAAO,GAET,CACED,MAAO,YACPC,MAAO,GAET,CACED,MAAO,aACPC,MAAO,GAET,CACED,MAAO,iBACPC,MAAO,GAET,CACED,MAAO,iBACPC,MAAO,GAET,CACED,MAAO,kBACPC,MAAO,GAET,CACED,MAAO,QACPC,MAAO,IAIES,EAA0C,CACrD,CACEV,MAAO,MACPC,MAAO,OAET,CACED,MAAO,OACPC,MAAO,QAET,CACED,MAAO,MACPC,MAAO,OAET,CACED,MAAO,QACPC,MAAO,SAET,CACED,MAAO,SACPC,MAAO,UAET,CACED,MAAO,OACPC,MAAO,QAET,CACED,MAAO,UACPC,MAAO,WAET,CACED,MAAO,QACPC,MAAO,SAET,CACED,MAAO,UACPC,MAAO,YAIEU,EAAyC,CACpD,CACEX,MAAO,qBACPC,MAAO,KAET,CACED,MAAO,qBACPC,MAAO,KAET,CACED,MAAO,qBACPC,MAAO,KAET,CACED,MAAO,sBACPC,MAAO,MAET,CACED,MAAO,sBACPC,MAAO,OAIEW,EAA0C,CACrD,CACEZ,MAAO,WACPC,MAAO,YAET,CACED,MAAO,aACPC,MAAO,aAET,CACED,MAAO,WACPC,MAAO,WAET,CACED,MAAO,SACPC,MAAO,UAET,CACED,MAAO,SACPC,MAAO,UAET,CACED,MAAO,YACPC,MAAO,aAIEY,EAA2C,CACtD,CACEb,MAAO,IACPC,MAAO,KAET,CACED,MAAO,KACPC,MAAO,MAET,CACED,MAAO,IACPC,MAAO,KAET,CACED,MAAO,KACPC,MAAO,MAET,CACED,MAAO,IACPC,MAAO,KAET,CACED,MAAO,KACPC,MAAO,MAET,CACED,MAAO,SACPC,MAAO,UAET,CACED,MAAO,YACPC,MAAO,cAKEa,EAA+C,CAC1D,CACEd,MAAO,iBACPC,MAAO,YAET,CACED,MAAO,eACPC,MAAO,gBAET,CACED,MAAO,eACPC,MAAO,UAET,CACED,MAAO,aACPC,MAAO,eAIEc,EAAmC,CAE9C,CACEf,MAAO,MACPC,MAAO,IACN,CACDD,MAAO,sBACPC,MAAO,GAET,CACED,MAAO,wBACPC,MAAO,GAET,CACED,MAAO,QACPC,MAAO,GAET,CACED,MAAO,MACPC,MAAO,GAET,CACED,MAAO,WACPC,MAAO,GAET,CACED,MAAO,gBACPC,MAAO,GAET,CACED,MAAO,eACPC,MAAO,IAIEe,EAA8C,CACzD,CACEhB,MAAO,sBACPC,MAAO,uBAET,CACED,MAAO,wBACPC,MAAO,yBAET,CACED,MAAO,QACPC,MAAO,SAET,CACED,MAAO,MACPC,MAAO,OAET,CACED,MAAO,WACPC,MAAO,YAET,CACED,MAAO,gBACPC,MAAO,iBAET,CACED,MAAO,eACPC,MAAO,kBAwBV,SAlBWL,OAAS,eAATA,IAAS,iBAATA,IAAS,uBAATA,IAAS,yBAATA,IAAS,uBAATA,IAAS,uBAATA,IAAS,iBAATA,IAAS,yBAATA,IAAS,+BAATA,IAAS,uCAATA,IAAS,4BAATA,IAAS,0CAATA,IAAS,gDAATA,IAAS,sCAATA,IAAS,8BAATA,IAAS,gDAkBpB,CAlBWA,MAAS,KAuBpB,SAHWC,OAAmB,WAAnBA,IAAmB,aAG9B,CAHWA,MAAmB,KAMrBD,EAAUqB,KAiBVrB,EAAUsB,MAaVtB,EAAUuB,SAaVvB,EAAUwB,UAaVxB,EAAUyB,SAaVzB,EAAU0B,SAvEb,IA8FMC,EAAe,CAC1B,CACEvB,MAAO,UACPC,MAAO,GAET,CACED,MAAO,SACPC,MAAO,GAET,CACED,MAAO,MACPC,MAAO,GAET,CACED,MAAO,SACPC,MAAO,GAET,CACED,MAAO,SACPC,MAAO,GAET,CACED,MAAO,cACPC,MAAO,GAET,CACED,MAAO,UACPC,MAAO,GAET,CACED,MAAO,OACPC,MAAO,GAET,CACED,MAAO,WACPC,MAAO,GACN,CACDD,MAAO,QACPC,MAAO,IAKEuB,EAAW,CACtB,CACExB,MAAO,OACPC,MAAO,UAET,CACED,MAAO,OACPC,MAAO,UAET,CACED,MAAO,MACPC,MAAO,SAKEwB,EAAwB,CACnC,CACEzB,MAAO,MACPC,MAAO,OAET,CACED,MAAO,QACPC,MAAO,SAET,CACED,MAAO,WACPC,MAAO,YAET,CACED,MAAO,YACPC,MAAO,aAET,CACED,MAAO,sBACPC,MAAO,uBAET,CACED,MAAO,wBACPC,MAAO,yBAET,CACED,MAAO,WACPC,MAAO,aAIEyB,EAAkB,CAC7B,CACE1B,MAAO,YACPC,MAAO,cAYE0B,EAAgB,CAC3B,CACE3B,MAAO,MACPC,MAAO,GAET,CACED,MAAO,QACPC,MAAO,GAET,CACED,MAAO,OACPC,MAAO,GAET,CACED,MAAO,gBACPC,MAAO,IAIE2B,EAAuB,CAClC,CACE5B,MAAO,SACPC,MAAO,MAET,CACED,MAAO,SACPC,MAAO,UAET,CACED,MAAO,O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AAqB,UAAVxW,EAAoB,OAAS,QAC9CqW,EAASG,GACTL,aAAaM,QAAQ,QAASD,MAK5B,yBAAKE,UAAS,gBAAW1W,IAAU4V,KAK5Be,EAAW,WACtB,IAAM3E,EAAU4E,qBAAWb,GAC3B,IAAK/D,EAAS,MAAM,IAAI6E,MAAM,gDAC9B,OAAO7E,I","file":"static/js/main.83b6dddd.chunk.js","sourcesContent":["import * as React from \"react\"\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport PortalComponent from \"./Portal\";\r\nimport { Notification } from \"@sebgroup/react-components/dist/notification\";\r\nimport { States } from \"../../interfaces/states\";\r\nimport { TOGGLE_NOTIFICATION } from \"../../constants\";\r\n\r\n\r\nconst NotificationHook: React.FunctionComponent = (): React.ReactElement => {\r\n const notificationState = useSelector((state: States) => state.notification);\r\n const dispatch = useDispatch();\r\n\r\n const onDismissNotification = (): void => {\r\n dispatch({ type: TOGGLE_NOTIFICATION, notification: {...notificationState?.notification, toggle: false} });\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n\r\n\r\n )\r\n}\r\n\r\n\r\nexport default NotificationHook;","import React, { useEffect } from \"react\";\r\nimport { Loader } from \"@sebgroup/react-components/dist/Loader\";\r\nimport { AppRoute } from \"../utils/functions\";\r\nimport { Redirect, Switch, RouteComponentProps, withRouter } from \"react-router\";\r\n\r\nimport { AuthState, States } from '../interfaces/states';\r\nimport { useSelector } from 'react-redux';\r\nimport { store } from \"../store/configureStore\";\r\nimport { receiveAuth, authActions } from '../actions/authActions';\r\n\r\n\r\n\r\nimport { actionTypes } from \"../types\";\r\nimport NotificationHook from \"./shared/NotificationHook\";\r\nimport { AppRoutes, HomeRoutes } from '../enums/routes';\r\nimport Signup from './account/signupForm/Signup';\r\nimport CheckApiValue from \"./shared/version\";\r\nimport { version } from \"../actions/pageSizeAction\";\r\nimport axios from \"axios\";\r\nimport { ThemeProvider } from \"../utils/ThemeContext\";\r\n\r\n\r\nconst NotFound: React.LazyExoticComponent> = React.lazy(() => import(\"./notFound/404\"));\r\nconst Home: any = React.lazy(() => import(\"./home/Home\"));\r\nconst Account: any = React.lazy(() => import(\"./account/Account\"));\r\nconst Auth: any = React.lazy(() => import(\"./account/signinForm/Signin\"));\r\nconst SignUp: any = React.lazy(() => import(\"./account/signupForm/Signup\"));\r\nconst PublicBreakdown: any = React.lazy(() => import(\"./account/publicUrls/PublicBreakdown\"));\r\n//const Settings: any = React.lazy(() => import(\"./settings/index\"));\r\n\r\n\r\nexport interface SharedProps extends RouteComponentProps {\r\n actions: actionTypes;\r\n}\r\n\r\nconst App: React.FunctionComponent = React.memo((props: SharedProps): React.ReactElement => {\r\n const authState: AuthState = useSelector((states: States) => states?.auth);\r\n const authStatee = useSelector((states: States) => states?.pageSize);\r\n\r\n\r\n\r\n\r\n const [value, setValue] = React.useState(null);\r\n\r\n const checkApi = async () => {\r\n try {\r\n const response = await axios.get('https://api.prod.senshost.com/frontend/version');\r\n const newValue = response.data;\r\n setValue(newValue);\r\n if (!authStatee?.version) {\r\n store.dispatch(version(''));\r\n }\r\n\r\n if (newValue !== authStatee?.version) {\r\n store.dispatch(version(newValue));\r\n if (window.confirm('New version available. The page will refresh.')) {\r\n // Clear all caches\r\n caches.keys().then((names) => {\r\n Promise.all(names.map(name => caches.delete(name))).then(() => {\r\n // Perform a hard reload\r\n window.location.reload();\r\n });\r\n });\r\n }\r\n }\r\n } catch (error) {\r\n console.error('Error fetching data from API:', error);\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n const intervalId = setInterval(checkApi, 60000); // 300000ms = 5 minutes\r\n\r\n return () => clearInterval(intervalId); // Clear interval on component unmount\r\n }, []);\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n // useEffect(() => {\r\n // if ('serviceWorker' in navigator) {\r\n // navigator.serviceWorker.addEventListener('message', (event) => {\r\n // console?.log(event?.data);\r\n // if (event.data.type === 'CHECK_VERSION') {\r\n // const apiVersion = event.data.apiVersion;\r\n // if (apiVersion !== authStatee?.version) {\r\n // store.dispatch(version(apiVersion));\r\n\r\n // alert('New version available. The page will refresh.');\r\n // caches.keys().then((cacheNames) => {\r\n // return Promise.all(cacheNames.map((cache) => caches.delete(cache)));\r\n // }).then(() => {\r\n // window.location.reload();\r\n // });\r\n // }\r\n // }\r\n // });\r\n // }\r\n // }, []);\r\n\r\n\r\n return (\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\nexport default withRouter(App);","// This optional code is used to register a service worker.\r\n// register() is not called by default.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on subsequent visits to a page, after all the\r\n// existing tabs open on the page have been closed, since previously cached\r\n// resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model and instructions on how to\r\n// opt-in, read https://bit.ly/CRA-PWA\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === 'localhost' ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === '[::1]' ||\r\n // 127.0.0.0/8 are considered localhost for IPv4.\r\n window.location.hostname.match(\r\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n )\r\n);\r\n\r\ntype Config = {\r\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\r\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\r\n};\r\n\r\nexport function register(config?: Config) {\r\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(\r\n process.env.PUBLIC_URL,\r\n window.location.href\r\n );\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n return;\r\n }\r\n\r\n window.addEventListener('load', () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Let's check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl, config);\r\n\r\n // Add some additional logging to localhost, pointing developers to the\r\n // service worker/PWA documentation.\r\n navigator.serviceWorker.ready.then(() => {\r\n console.log(\r\n 'This web app is being served cache-first by a service ' +\r\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\r\n );\r\n });\r\n } else {\r\n // Is not localhost. Just register service worker\r\n registerValidSW(swUrl, config);\r\n }\r\n });\r\n }\r\n}\r\n\r\n\r\nfunction registerValidSW(swUrl: string, config?: Config) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n \r\n const installingWorker = registration.installing;\r\n if (installingWorker == null) {\r\n return;\r\n }\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the updated precached content has been fetched,\r\n // but the previous service worker will still serve the older\r\n // content until all client tabs are closed.\r\n console.log(\r\n 'New content is available and will be used when all ' +\r\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\r\n );\r\n\r\n // Execute callback\r\n if (config && config.onUpdate) {\r\n config.onUpdate(registration);\r\n }\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // \"Content is cached for offline use.\" message.\r\n console.log('Content is cached for offline use.');\r\n\r\n // Execute callback\r\n if (config && config.onSuccess) {\r\n config.onSuccess(registration);\r\n }\r\n }\r\n }\r\n };\r\n };\r\n })\r\n .catch(error => {\r\n console.error('Error during service worker registration:', error);\r\n });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl, {\r\n headers: { 'Service-Worker': 'script' }\r\n })\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n const contentType = response.headers.get('content-type');\r\n if (\r\n response.status === 404 ||\r\n (contentType != null && contentType.indexOf('javascript') === -1)\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl, config);\r\n }\r\n })\r\n .catch(() => {\r\n console.log(\r\n 'No internet connection found. App is running in offline mode.'\r\n );\r\n });\r\n}\r\n\r\nexport function unregister() {\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.ready\r\n .then(registration => {\r\n registration.unregister();\r\n })\r\n .catch(error => {\r\n console.error(error.message);\r\n });\r\n }\r\n}\r\n","import React from \"react\";\r\nimport ReactDOM from \"react-dom\";\r\nimport { Provider } from \"react-redux\";\r\n\r\nimport { PersistGate } from \"redux-persist/integration/react\";\r\nimport { Loader } from \"@sebgroup/react-components/dist/Loader\";\r\n\r\nimport { HashRouter as Browser } from \"react-router-dom\";\r\nimport \"url-search-params-polyfill\";\r\n\r\nimport App from \"./components/App\";\r\nimport * as serviceWorker from \"./serviceWorker\";\r\n\r\n\r\nimport \"./styles/main.scss\";\r\nimport \"./assets/css/style.css\";\r\nimport \"./assets/css/signin.css\"\r\nimport { store, persistor } from \"./store/configureStore\";\r\nimport 'dayjs/locale/es' // load on demand\r\n\r\n\r\nReactDOM.render(\r\n \r\n } persistor={persistor}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n ,\r\n document.getElementById(\"root\")\r\n);\r\n\r\n// If you want your app to work offline and load faster, you can change\r\n// unregister() to register() below. Note this comes with some pitfalls.\r\n// Learn more about service workers: https://bit.ly/CRA-PWA\r\nserviceWorker.register();\r\n","\r\nimport React from 'react';\r\nimport { Route, RouteProps } from 'react-router';\r\nimport utc from 'dayjs/plugin/utc'\r\n\r\nimport dayjs, { Dayjs } from \"dayjs\";\r\n\r\nimport { integer } from 'aws-sdk/clients/cloudfront';\r\n\r\nexport function validateEmail(email: string): boolean {\r\n var re = /\\S+@\\S+\\.\\S+/;\r\n return re.test(email);\r\n}\r\n\r\nexport function covertDateTimeField(date: Date | string): string {\r\n if (dayjs(date).isValid()) {\r\n return dayjs(date).format(\"DD - MMM h:mm A\");\r\n }\r\n return date as string;\r\n}\r\n\r\nexport function getDateDifference(date: Date): integer {\r\n return dayjs(date).diff(dayjs(), 'day');\r\n}\r\n\r\nexport function formatDateTime(date: Date | string, format?: string) {\r\n if (date) {\r\n return dayjs(date).format(format || \"MMM DD, YYYY hh:mm:ss A\");\r\n }\r\n\r\n return date;\r\n}\r\n\r\n\r\nexport function formatDate(date: Date | string, format?: string) {\r\n if (date) {\r\n return dayjs(date).format(format || \"YYYY-MM-DD\");\r\n }\r\n\r\n return date;\r\n}\r\n\r\nexport function timeAgo(dateString: string): string {\r\n const givenDate = new Date(dateString);\r\n var _date = new Date(dateString);\r\n\r\n // var newDate = new Date(dateString);\r\n\r\n // const now = new Date();\r\n var _now = new Date();\r\n\r\n givenDate.setMinutes(_date.getMinutes() - _date.getTimezoneOffset());\r\n\r\n // now.setMinutes(_now.getMinutes() - _now.getTimezoneOffset());\r\n\r\n\r\n const now = new Date();\r\n const diff = now.getTime() - givenDate.getTime();\r\n\r\n const minutes = Math.floor(diff / (1000 * 60));\r\n if (minutes < 60) {\r\n return `${minutes} minutes ago`;\r\n }\r\n\r\n const hours = Math.floor(minutes / 60);\r\n const remainingMinutes = minutes % 60;\r\n if (hours < 24) {\r\n return `${hours} hours and ${remainingMinutes} minutes ago`;\r\n }\r\n\r\n const days = Math.floor(hours / 24);\r\n const remainingHours = hours % 24;\r\n if (days < 7) {\r\n return `${days} days and ${remainingHours} hours ago`;\r\n }\r\n\r\n const weeks = Math.floor(days / 7);\r\n const remainingDays = days % 7;\r\n if (weeks < 4) {\r\n return `${weeks} weeks and ${remainingDays} days ago`;\r\n }\r\n\r\n const months = Math.floor(weeks / 4);\r\n const remainingWeeks = weeks % 4;\r\n if (months < 12) {\r\n return `${months} months and ${remainingWeeks} weeks ago`;\r\n }\r\n\r\n const years = Math.floor(months / 12);\r\n const remainingMonths = months % 12;\r\n return `${years} years and ${remainingMonths} months ago`;\r\n}\r\n\r\nexport function convertUTCDateToLocalDate(date: Date | string) {\r\n try {\r\n if (date) {\r\n var _date = new Date(date);\r\n var newDate = new Date(date);\r\n\r\n newDate.setMinutes(_date.getMinutes() - _date.getTimezoneOffset());\r\n return dayjs(newDate).format(\"DD - MMM -YYYY hh:mm a\");\r\n }\r\n return date;\r\n } catch (err) {\r\n return [] as any;\r\n }\r\n}\r\nexport function convertDateToUTC(date: Date | string): string {\r\n try {\r\n if (date) {\r\n const _date = new Date(date);\r\n const utcDate = new Date(\r\n Date.UTC(\r\n _date.getFullYear(),\r\n _date.getMonth(),\r\n _date.getDate(),\r\n _date.getHours(),\r\n _date.getMinutes(),\r\n _date.getSeconds(),\r\n _date.getMilliseconds()\r\n )\r\n );\r\n return utcDate.toISOString(); // Returns the date in UTC ISO 8601 format\r\n }\r\n return \"\";\r\n } catch (err) {\r\n console.error(\"Error converting date to UTC:\", err);\r\n return \"\";\r\n }\r\n}\r\n\r\n\r\nexport function convertFormDateToUTC(localDateTime: string): string {\r\n const localDate = new Date(localDateTime);\r\n const utcDate = new Date(localDate.getTime() - localDate.getTimezoneOffset() * 60000);\r\n return utcDate.toISOString().slice(0, 16);\r\n};\r\n\r\n\r\nexport function convertToUtc(date: any) {\r\n try {\r\n if (date) {\r\n dayjs.extend(utc)\r\n var d = new Date(date)\r\n var day = dayjs(d).utc().format();\r\n\r\n // dayjs.utc().format()\r\n\r\n\r\n // var _date = new Date(date);\r\n // var newDate = new Date(date);\r\n\r\n // newDate.setMinutes(_date.getMinutes() - _date.getTimezoneOffset());\r\n return day;\r\n }\r\n return date;\r\n } catch (err) {\r\n return \"Error\" as any;\r\n }\r\n}\r\n\r\n\r\nexport function convertUTCDateToLocalDateChart(date: Date | string) {\r\n try {\r\n if (date) {\r\n var _date = new Date(date);\r\n var newDate = new Date(date);\r\n newDate.setMinutes(_date.getMinutes() - _date.getTimezoneOffset());\r\n\r\n return dayjs(newDate).format(\"DD - MMM hh:mm:ss a\");\r\n }\r\n return date;\r\n } catch (err) {\r\n return [] as any;\r\n }\r\n}\r\n\r\nexport function convertDateToUTCWithStartTime(dateString: string): string {\r\n const [year, month, day] = dateString.split('-').map(Number);\r\n const date = new Date(Date.UTC(year, month - 1, day, 0, 0, 0));\r\n return date.toISOString();\r\n}\r\n\r\nexport function convertDateToUTCWithEndTime(dateString: string): string {\r\n const [year, month, day] = dateString.split('-').map(Number);\r\n const date = new Date(Date.UTC(year, month - 1, day, 23, 59, 0));\r\n return date.toISOString();\r\n}\r\n\r\n\r\nexport function convertPeriodToFromAndTo(period: string) {\r\n try {\r\n if (period) {\r\n dayjs.extend(utc)\r\n\r\n var utcNow = dayjs.utc().format();\r\n var currHour = dayjs.utc().get('hour');\r\n var currDay = dayjs().get('day');\r\n\r\n if (period == 'LastHour') {\r\n var lastHour = dayjs().utc().hour(dayjs.utc().hour() - 1).format();\r\n var currHours = dayjs().utc().hour(currHour).format();\r\n return (({ 'from': lastHour, 'to': currHours }))\r\n }\r\n else if (period == 'Today') {\r\n var st = new Date();\r\n st.setFullYear(dayjs().year(), dayjs().month())\r\n st.setHours(0); st.setMinutes(0); st.setSeconds(0);\r\n var startOfDay = dayjs(st).utc().format();\r\n\r\n return ({ 'from': startOfDay, 'to': utcNow })\r\n\r\n }\r\n else if (period == 'ThisWeek') {\r\n var weekfirstDay = dayjs().utc().day(dayjs().utc().day() - currDay).format();\r\n\r\n return ({ 'from': weekfirstDay, 'to': utcNow })\r\n\r\n }\r\n else if (period == 'Last7Days') {\r\n var lastSevenDays = dayjs().utc().day(dayjs().utc().day() - 7).format();\r\n\r\n return ({ 'from': lastSevenDays, 'to': utcNow })\r\n\r\n }\r\n else if (period == 'Last30Days') {\r\n var lastThirtyDays = dayjs().utc().day(dayjs().utc().day() - 30).format();\r\n\r\n return ({ 'from': lastThirtyDays, 'to': utcNow })\r\n\r\n }\r\n else if (period == 'ThisMonth') {\r\n var sm = new Date(dayjs().year(), dayjs().month(), 1, 0, 0, 0);\r\n\r\n var startOfMonth = dayjs(sm).utc().format();\r\n\r\n\r\n return ({ 'from': startOfMonth, 'to': utcNow })\r\n\r\n }\r\n else if (period == 'LastMonth') {\r\n var slm = new Date(dayjs().year(), (dayjs().month() - 1), 1, 0, 0, 0);\r\n var startOfLastMonth = dayjs(slm).utc().format();\r\n\r\n var locatTime = new Date(dayjs().year(), dayjs().month(), 1, 0, 0, 0);\r\n locatTime.setMinutes(locatTime.getMinutes() - 1)\r\n var elm = dayjs(locatTime).utc();\r\n var endOfLastMonth = elm.format();\r\n\r\n return ({ 'from': startOfLastMonth, 'to': endOfLastMonth })\r\n\r\n }\r\n else if (period == 'ThisYear') {\r\n var firstMonth = dayjs().month(0).format();\r\n var currYear = dayjs().get('year');\r\n var currYears = dayjs().year(currYear).format();\r\n\r\n return ({ 'from': firstMonth, 'to': currYears })\r\n }\r\n }\r\n return period;\r\n } catch (err) {\r\n return [] as any;\r\n }\r\n}\r\n\r\n\r\n\r\nexport function convertBreakdownPeriodToFromAndTo(period: string, year: string) {\r\n try {\r\n if (period) {\r\n dayjs.extend(utc)\r\n\r\n var utcNow = dayjs.utc().format();\r\n var currHour = dayjs.utc().get('hour');\r\n var currDay = dayjs().get('day');\r\n\r\n\r\n if (period == 'LastSixMonth') {\r\n var slm = new Date(dayjs().year(), (dayjs().month() - 6), 1, 0, 0, 0);\r\n var startOfLastMonth = dayjs(slm).utc().format();\r\n\r\n var locatTime = new Date(dayjs().year(), dayjs().month(), 1, 0, 0, 0);\r\n locatTime.setMinutes(locatTime.getMinutes() - 1)\r\n var elm = dayjs(locatTime).utc();\r\n var endOfLastMonth = elm.format();\r\n\r\n return ({ 'from': startOfLastMonth, 'to': endOfLastMonth })\r\n\r\n }\r\n else if (period == 'FirstSixMonth') {\r\n var slm = new Date(dayjs().year(), (dayjs().month() + 6), 1, 0, 0, 0);\r\n var startOfLastMonth = dayjs(slm).utc().format();\r\n\r\n var locatTime = new Date(dayjs().year(), dayjs().month(), 1, 0, 0, 0);\r\n locatTime.setMinutes(locatTime.getMinutes() - 1)\r\n var elm = dayjs(locatTime).utc();\r\n var endOfLastMonth = elm.format();\r\n\r\n return ({ 'from': startOfLastMonth, 'to': endOfLastMonth })\r\n\r\n }\r\n else if (period == 'ThisYear') {\r\n var firstMonth = dayjs().month(0).format();\r\n var currYear = dayjs().get('year');\r\n var currYears = dayjs().year(currYear).format();\r\n\r\n return ({ 'from': firstMonth, 'to': currYears })\r\n }\r\n }\r\n return period;\r\n } catch (err) {\r\n return [] as any;\r\n }\r\n}\r\n\r\n\r\n\r\nexport function convertUTCDateToLocalDateLineChart(date: Date | string, category: any) {\r\n try {\r\n if (date) {\r\n var _date = new Date(date);\r\n var newDate = new Date(date);\r\n newDate.setMinutes(_date.getMinutes() - _date.getTimezoneOffset());\r\n if (category == 'Today') {\r\n return dayjs(newDate).format(\"hh:mm a\");\r\n } else if (category == 'LastHour') {\r\n return dayjs(newDate).format(\"hh:mm a\");\r\n } else {\r\n return dayjs(newDate).format(\"DD - MMM\\nhh:mm a\");\r\n }\r\n }\r\n return date;\r\n } catch (err) {\r\n return [] as any;\r\n }\r\n}\r\n\r\nexport function convertStringToJson(strValue: string): T {\r\n try {\r\n return JSON.parse(strValue);\r\n } catch (err) {\r\n return [] as any;\r\n }\r\n}\r\n\r\ninterface AppRouteProps extends RouteProps {\r\n component: any\r\n props?: any;\r\n}\r\n\r\nexport const AppRoute = (props: AppRouteProps) => (\r\n {\r\n return (\r\n <>\r\n \r\n \r\n )\r\n }\r\n } />\r\n);\r\n\r\nexport const validEmail = (email: string) => {\r\n const re = /\\S+@\\S+\\.\\S+/;\r\n return re.test(email) ? undefined : \"invalid email\";\r\n}","import BreakdownReport from '../components/home/Assets/Report/BreakdownReport';\r\nimport WorkOrder from '../components/home/Assets/WorkOrder';\r\n\r\n\r\n\r\nexport enum AppRoutes {\r\n Home = \"/home\",\r\n Account = \"/account\",\r\n Login = \"/auth/signin\",\r\n PublicBreakdown = \"/public/reportbreakdown\",\r\n SignUp = \"/auth/signup\",\r\n}\r\n\r\nexport enum HomeRoutes { \r\n Devices = AppRoutes.Home + \"/devices\",\r\n AddAndEditDevice = AppRoutes.Home + \"/add-device\",\r\n // Login = AppRoutes.Auth + \"/signin\",\r\n // SignUp = AppRoutes.Auth + \"/signup\",\r\n Maintanance = AppRoutes.Home + \"/maintanance\",\r\n Servicing = AppRoutes.Home + \"/servicing\",\r\n EditService = AppRoutes.Home + \"/edit-service/:id\",\r\n CreateService = AppRoutes.Home + \"/create-service\",\r\n ServicingDetails = AppRoutes.Home + \"/service-details/:id\",\r\n ServiceAssetDetails = AppRoutes.Home + \"/service-detail/:serviceId/asset/:assetId\",\r\n DeviceItem = AppRoutes.Home + \"/device-data\",\r\n Dashboard = AppRoutes.Home + \"/dashboard\",\r\n DashboardItem = AppRoutes.Home + \"/dashboard/:id\", \r\n Groups = AppRoutes.Home + \"/user-group\", \r\n ItemGroup = AppRoutes.Home + \"/item-group\",\r\n Schedule = AppRoutes.Home + \"/report-schedule\",\r\n CreateSchedule = AppRoutes.Home + \"/create-schedule\",\r\n UserProfile = AppRoutes.Home + \"/user-profile\",\r\n Users = AppRoutes.Home + \"/users\",\r\n Actions = AppRoutes.Home + \"/Actions\",\r\n Rules = AppRoutes.Home + \"/Rules\",\r\n Triggers = AppRoutes.Home + \"/triggers\",\r\n settings = AppRoutes.Home + \"/settings\",\r\n dataCollection = AppRoutes.Home + \"/data\",\r\n Report = AppRoutes.Home + \"/reports\",\r\n Events = AppRoutes.Home + \"/events\",\r\n EventActions = AppRoutes.Home + \"/event-actions/:eventId\",\r\n Viewbats = AppRoutes.Home + \"/view-bats\",\r\n AssetManagement = AppRoutes.Home + \"/assets\",\r\n AssetConfiguration = AppRoutes.Home + \"/asset-configuration\",\r\n ServiceReport = AppRoutes.Home + \"/service-report\",\r\n BreakdownReport = AppRoutes.Home + \"/breakdown-report\",\r\n Breakdown = AppRoutes.Home + \"/breakdown\",\r\n WorkOrder = AppRoutes.Home + \"/workorder\",\r\n BreakdownDetails = AppRoutes.Home + \"/breakdownDetails/:breakdownId\",\r\n WorkOrderDetails = AppRoutes.Home + \"/workorderDetails/:orderId\",\r\n ViewAsset = AppRoutes.Home + \"/view-assets\",\r\n BatAdmin = AppRoutes.Home + \"/admin-statistics\",\r\n BatDashboard = AppRoutes.Home + \"/bats\",\r\n ViewRoomData = AppRoutes.Home + \"/view-room/:roomId\",\r\n SvgDashboard = AppRoutes.Home + \"/view-svg-dashboard\",\r\n ViewMap = AppRoutes.Home + \"/view-map\",\r\n Notification = AppRoutes.Home + \"/view-notifications\",\r\n ViewNotification = AppRoutes.Home + \"/view-notification\",\r\n BatsReport = AppRoutes.Home + \"/audit-report\",\r\n}\r\n\r\nexport enum TriggerRoutes {\r\n EditTrigger = HomeRoutes.Triggers + \"/:triggerId\",\r\n CreateTrigger = HomeRoutes.Triggers + \"/create\"\r\n}\r\n\r\nexport enum GroupRoutes {\r\n ViewGroupdetails = HomeRoutes.Groups + \"/:groupId\"\r\n}\r\n\r\nexport enum ViewDeviceRoutes {\r\n ViewDevice = HomeRoutes.Devices + \"/:deviceId\",\r\n}\r\n\r\nexport enum ViewEventActionRoutes {\r\n ViewEventActions = HomeRoutes.EventActions,\r\n}\r\n\r\nexport enum ViewDeviceItemRoutes {\r\n ViewDeviceItem = HomeRoutes.DeviceItem + \"/:deviceId\",\r\n}\r\n\r\nexport enum ViewCollectionRoutes {\r\n ViewCollection = HomeRoutes.dataCollection + \"/:collectionId\",\r\n}\r\n\r\nexport enum ViewBatsRoutes {\r\n Viewbats = HomeRoutes.Viewbats,\r\n BatDashboard = HomeRoutes.BatDashboard,\r\n BatsReport = HomeRoutes.BatsReport,\r\n ViewRoomData = HomeRoutes.ViewRoomData,\r\n Report = HomeRoutes.Report,\r\n BatAdmin = HomeRoutes.BatAdmin,\r\n SvgDashboard = HomeRoutes.SvgDashboard,\r\n Notification = HomeRoutes.Notification,\r\n ViewNotification = HomeRoutes.ViewNotification + \"/:notificationId\"\r\n}\r\n\r\nexport enum AssetsRoutes { \r\n AssetManagement = HomeRoutes.AssetManagement, \r\n AssetConfiguration = HomeRoutes.AssetConfiguration,\r\n ServiceReport = HomeRoutes.ServiceReport,\r\n BreakdownReport = HomeRoutes.BreakdownReport,\r\n Breakdown = HomeRoutes.Breakdown, \r\n WorkOrder = HomeRoutes.WorkOrder,\r\n BreakdownDetails = HomeRoutes.BreakdownDetails,\r\n WorkOrderDetails = HomeRoutes.WorkOrderDetails, \r\n ServicingDetails = HomeRoutes.ServicingDetails,\r\n ServiceAssetDetails = HomeRoutes.ServiceAssetDetails,\r\n Servicing = HomeRoutes.Servicing,\r\n Maintanance = HomeRoutes.Maintanance,\r\n EditService = HomeRoutes.EditService,\r\n CreateService = HomeRoutes.CreateService,\r\n ViewAsset = HomeRoutes.ViewAsset + \"/:assetId\",\r\n}","import { authActions } from \"../actions\";\r\nimport configs from \"../configs\";\r\nimport {\r\n RECEIVE_AUTH_USER,\r\n REQUEST_AUTH_USER,\r\n SIGNOUT_USER,\r\n LOG_AUTH_ERROR,\r\n} from \"../constants\";\r\nimport { AuthState, States } from '../interfaces/states';\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\n\r\nconst initialState: AuthState = {\r\n isFetching: false,\r\n auth: null,\r\n error: null,\r\n isAuthenticated: false\r\n};\r\n\r\nexport default (state: AuthState = initialState, action: authActions) => {\r\n // const authState: AuthState = useSelector((states: States) => states?.auth);\r\n switch (action.type) {\r\n case RECEIVE_AUTH_USER: {\r\n return {\r\n ...state,\r\n auth: action.auth,\r\n error: null,\r\n isAuthenticated: true,\r\n isFetching: false\r\n\r\n };\r\n }\r\n case LOG_AUTH_ERROR: {\r\n return { ...state, error: action.error, isFetching: false };\r\n }\r\n case REQUEST_AUTH_USER: {\r\n return { ...state, isFetching: true };\r\n }\r\n case SIGNOUT_USER: {\r\n return {\r\n ...state,\r\n isAuthenticated: false,\r\n auth: null,\r\n token: null,\r\n isFetching: false,\r\n user: false,\r\n version: state?.auth?.version\r\n };\r\n }\r\n default: {\r\n return state;\r\n }\r\n\r\n }\r\n\r\n}","import { NotificationProps } from \"@sebgroup/react-components/dist/notification/Notification\";\r\n\r\nimport {\r\n TOGGLE_NOTIFICATION\r\n} from \"../constants\";\r\nimport { NotificationState } from '../interfaces/states';\r\nimport { notificationActions } from \"../actions/notificationActions\";\r\n\r\nconst initialState: NotificationState = {\r\n notification: {} as NotificationProps\r\n};\r\n\r\nexport default (state = initialState, action: notificationActions) => {\r\n switch (action.type) {\r\n case TOGGLE_NOTIFICATION: {\r\n return { ...state, notification: action.notification };\r\n }\r\n default: {\r\n return state;\r\n }\r\n\r\n }\r\n\r\n}","\r\nimport {\r\n RECEIVE_GROUPS,\r\n LOG_GROUP_ERROR,\r\n CLEAR_GROUPS\r\n} from \"../constants\";\r\nimport { GroupState } from '../interfaces/states';\r\nimport { groupActions } from \"../actions/groupActions\";\r\n\r\nconst initialState: GroupState = {\r\n groups: [],\r\n isFetching: false,\r\n error: null,\r\n};\r\n\r\nexport default (state = initialState, action: groupActions): GroupState => {\r\n switch (action.type) {\r\n case RECEIVE_GROUPS: {\r\n return { ...state, groups: [...state?.groups, ...action?.groups] };\r\n }\r\n case LOG_GROUP_ERROR: {\r\n return { ...state, error: { message: action.error?.message, type: action?.error?.response?.statusText } };\r\n }\r\n\r\n case CLEAR_GROUPS: {\r\n return initialState;\r\n }\r\n default: {\r\n return state;\r\n }\r\n\r\n }\r\n\r\n}","\r\nimport {\r\n RECEIVE_DEVICES,\r\n RESET,\r\n LOG_DEVICE_ERROR,\r\n RESET_DEVICE\r\n} from \"../constants\";\r\nimport { DeviceState } from '../interfaces/states';\r\nimport { deviceActions } from \"../actions/deviceActions\";\r\n\r\nconst initialState: DeviceState = {\r\n devices: [],\r\n deviceIdentities: [],\r\n isFetching: false,\r\n error: null,\r\n};\r\n\r\n\r\nexport default (state = initialState, action: deviceActions): DeviceState => {\r\n switch (action.type) {\r\n case RECEIVE_DEVICES: {\r\n return { ...state, devices: [...state?.devices, ...action?.devices] };\r\n }\r\n case RESET_DEVICE: {\r\n return initialState;\r\n }\r\n case LOG_DEVICE_ERROR: {\r\n return { ...state, error: { message: action.error?.message, type: action?.error?.response?.statusText } };\r\n }\r\n default: {\r\n return state;\r\n }\r\n\r\n }\r\n\r\n}","\r\nimport {\r\n RECEIVE_DEVICE_IDENTITY,\r\n LOG_DEVICE_ERROR,\r\n CLEAR_DEVICE_IDENTITY\r\n} from \"../constants\";\r\nimport { DeviceIdentityState } from '../interfaces/states';\r\nimport { deviceIdentityActions } from \"../actions/deviceIdentityActions\";\r\n\r\nconst initialState: DeviceIdentityState = {\r\n deviceIdentities: [],\r\n isFetching: false,\r\n error: null,\r\n};\r\n\r\n\r\nexport default (state = initialState, action: deviceIdentityActions): DeviceIdentityState => {\r\n switch (action.type) {\r\n case RECEIVE_DEVICE_IDENTITY: {\r\n return { ...state, deviceIdentities: [...state?.deviceIdentities, ...action?.deviceIdentity] };\r\n }\r\n case LOG_DEVICE_ERROR: {\r\n return { ...state, error: { message: action.error?.message, type: action?.error?.response?.statusText } };\r\n }\r\n case CLEAR_DEVICE_IDENTITY: {\r\n return initialState;\r\n }\r\n default: {\r\n return state;\r\n }\r\n\r\n }\r\n\r\n}","\r\nimport {\r\n SET_DATA_REFRESH_TIME,\r\n} from \"../constants\";\r\nimport { SettingsState } from '../interfaces/states';\r\nimport { settingActions } from \"../actions/settingActions\";\r\nimport configs from \"../configs\"\r\nexport const initialState: SettingsState = {\r\n dashboardRefresh: (configs.dashbordRefreshRate * (1000 * 60)), // 5 seconds is default\r\n};\r\n\r\nexport default (state = initialState, action: settingActions): SettingsState => {\r\n switch (action.type) {\r\n case SET_DATA_REFRESH_TIME: {\r\n return { ...state, dashboardRefresh: (action.dashboardRefresh * 1000 * 60) };\r\n }\r\n default: {\r\n return state;\r\n }\r\n\r\n }\r\n\r\n}","\r\nimport {\r\n RECEIVE_COLLECTIONS,\r\n LOG_DEVICE_ERROR,\r\n CLEAR_COLLECTIONS\r\n} from \"../constants\";\r\nimport { CollectionState } from '../interfaces/states';\r\nimport { collectionActions } from \"../actions/collectionActions\";\r\n\r\nconst initialState: CollectionState = {\r\n collections: [],\r\n isFetching: false,\r\n error: null,\r\n};\r\n\r\n\r\nexport default (state = initialState, action: collectionActions): CollectionState => {\r\n switch (action.type) {\r\n case RECEIVE_COLLECTIONS: {\r\n return { ...state, collections: [...state?.collections, ...action?.collection] };\r\n }\r\n case CLEAR_COLLECTIONS: {\r\n return initialState;\r\n }\r\n case LOG_DEVICE_ERROR: {\r\n return { ...state, error: { message: action.error?.message, type: action?.error?.response?.statusText } };\r\n }\r\n default: {\r\n return state;\r\n }\r\n\r\n }\r\n\r\n}","import {\r\n RECEIVE_COLLECTION_ITEMS,\r\n LOG_DEVICE_ERROR,\r\n CLEAR_COLLECTION_ITEMS\r\n} from \"../constants\";\r\nimport { CollectionItemState } from '../interfaces/states';\r\nimport { collectionItemActions } from \"../actions/collectionItemActions\";\r\n\r\nconst initialState: CollectionItemState = {\r\n collectionItem: [],\r\n isFetching: false,\r\n error: null,\r\n};\r\n\r\n\r\nexport default (state = initialState, action: collectionItemActions): CollectionItemState => {\r\n switch (action.type) {\r\n case RECEIVE_COLLECTION_ITEMS: {\r\n return { ...state, collectionItem: [...state?.collectionItem, ...action?.collectionItem] };\r\n }\r\n case CLEAR_COLLECTION_ITEMS: {\r\n return initialState;\r\n }\r\n case LOG_DEVICE_ERROR: {\r\n return { ...state, error: { message: action.error?.message, type: action?.error?.response?.statusText } };\r\n }\r\n default: {\r\n return state;\r\n }\r\n\r\n }\r\n\r\n}","\r\nimport {\r\n RECEIVE_EVENT_ITEMS,\r\n RECEIVE_EVENT_TRIGGER,\r\n LOG_DEVICE_ERROR,\r\n RESET\r\n} from \"../constants\";\r\nimport { EventItemState } from '../interfaces/states';\r\nimport { eventItemActions } from \"../actions/eventItemActions\";\r\n\r\nconst initialState: EventItemState = {\r\n eventItems: [],\r\n eventTriggers:[],\r\n isFetching: false,\r\n error: null,\r\n};\r\n\r\n\r\nexport default (state = initialState, action: eventItemActions): EventItemState => {\r\n switch (action.type) {\r\n case RECEIVE_EVENT_ITEMS: {\r\n return { ...state, eventItems: [...state?.eventItems, ...action?.eventItem] };\r\n }\r\n case RESET: {\r\n return { ...state, eventTriggers: [state?.eventTriggers, ...action?.eventTrigger] };\r\n }\r\n case RECEIVE_EVENT_TRIGGER: {\r\n return { ...state, eventTriggers: [state?.eventTriggers, action?.eventTrigger] };\r\n }\r\n case LOG_DEVICE_ERROR: {\r\n return { ...state, error: { message: action.error?.message, type: action?.error?.response?.statusText } };\r\n }\r\n default: {\r\n return state;\r\n }\r\n\r\n }\r\n\r\n}","\r\nimport {\r\n RECEIVE_ITEMS,\r\n LOG_DEVICE_ERROR,\r\n CLEAR_ITEMS\r\n} from \"../constants\";\r\nimport { DashboardItemState } from '../interfaces/states';\r\nimport { dashboardItemsActions } from \"../actions/dashboardItemActions\";\r\n\r\nconst initialState: DashboardItemState = {\r\n dashItems: [],\r\n isFetching: false,\r\n error: null,\r\n};\r\n\r\n\r\nexport default (state = initialState, action: dashboardItemsActions): DashboardItemState => {\r\n switch (action.type) {\r\n case RECEIVE_ITEMS: {\r\n return { ...state, dashItems: [...state?.dashItems, ...action?.items] };\r\n }\r\n case CLEAR_ITEMS: {\r\n return initialState;\r\n }\r\n case LOG_DEVICE_ERROR: {\r\n return { ...state, error: { message: action.error?.message, type: action?.error?.response?.statusText } };\r\n }\r\n default: {\r\n return state;\r\n }\r\n\r\n }\r\n\r\n}","\r\nimport {\r\n RECIEVE_DATAVALUE_SIZE,\r\n RECIEVE_EVENT_SIZE,\r\n LOG_DEVICE_ERROR,\r\n RECIEVE_ASSET_SIZE,\r\n RECIEVE_TRIGGER_SIZE,\r\n VERSION\r\n} from \"../constants\";\r\nimport { PageSizeState } from '../interfaces/states';\r\nimport { PageSizeAction } from \"../actions/pageSizeAction\";\r\n\r\nconst initialState: PageSizeState = {\r\n eventSize: 10,\r\n dataValueSize: 10,\r\n assetLandingPageRowSize: 10,\r\n triggerLandingPageRowSize:10,\r\n isFetching: false,\r\n version:'',\r\n error: null,\r\n};\r\n\r\n\r\nexport default (state = initialState, action: PageSizeAction): PageSizeState => {\r\n switch (action.type) {\r\n case RECIEVE_EVENT_SIZE: {\r\n return {...state, eventSize: action?.eventSize };\r\n }\r\n\r\n case RECIEVE_DATAVALUE_SIZE: {\r\n return {...state, dataValueSize: action?.dataValueSize };\r\n }\r\n\r\n case RECIEVE_ASSET_SIZE: {\r\n return {...state, assetLandingPageRowSize: action?.assetSize };\r\n }\r\n case RECIEVE_TRIGGER_SIZE: {\r\n return {...state, triggerLandingPageRowSize: action?.triggerSize };\r\n }\r\n\r\n case VERSION: {\r\n return {...state, version: action?.version };\r\n }\r\n case LOG_DEVICE_ERROR: {\r\n return { ...state, error: { message: action.error?.message, type: action?.error?.response?.statusText } };\r\n }\r\n default: {\r\n return state;\r\n }\r\n\r\n }\r\n\r\n}","import auth from \"./authReducer\";\r\nimport notification from \"./notificationReducer\";\r\nimport groups from \"./groupReducers\";\r\nimport devices from \"./deviceReducers\";\r\nimport devicesIdentity from \"./deviceIdentityReducers\";\r\nimport settings from \"./settingsReducer\";\r\nimport collections from \"./collectionReducers\";\r\nimport collectionItems from \"./collectionItemReducers\";\r\nimport eventItems from \"./eventItemReducers\";\r\nimport dashItems from \"./dashboardItemReducers\";\r\nimport pageSize from \"./pageSizeReducer\";\r\n\r\nimport { combineReducers } from 'redux';\r\n\r\nexport default combineReducers({\r\n auth,\r\n notification,\r\n groups,\r\n devices,\r\n devicesIdentity,\r\n settings,\r\n collections,\r\n collectionItems,\r\n eventItems,\r\n dashItems,\r\n pageSize\r\n});\r\n","import { persistStore, persistReducer } from 'redux-persist'\r\nimport storage from 'redux-persist/lib/storage';\r\nimport { createStore, applyMiddleware } from 'redux';\r\nimport thunk from 'redux-thunk';\r\nimport reducers from \"../reducers\";\r\nimport { composeWithDevTools } from 'redux-devtools-extension';\r\nimport configs from '../configs';\r\n\r\nconst persistConfig = {\r\n key: configs.appName,\r\n storage,\r\n whitelist: ['auth', 'settings','pageSize'] // only navigation will be persisted\r\n};\r\n\r\n\r\nconst persistedReducer = persistReducer(persistConfig, reducers);\r\n\r\n\r\nconst store = createStore(\r\n persistedReducer,\r\n composeWithDevTools(\r\n applyMiddleware(thunk),\r\n )\r\n);\r\nconst persistor = persistStore(store);\r\n\r\nexport { store, persistor }\r\n","import { createBrowserHistory } from \"history\";\r\n\r\n//API CALL TYPE\r\n//const TYPE_LOCAL = \"LOCAL\";\r\nconst TYPE_REST = \"REST\";\r\n//console.log(77, process.env.NODE_ENV);\r\n\r\n//resources\r\n// const API_URL =\r\n// process.env.NODE_ENV === \"production\" ? \"\" : \"https://dev.senshost.net/api\";\r\n//const API_URL = \"http://senshost.com:8015/api\";\r\nconst SOCKET_URL = \"mqtt://senshost.com\";\r\n//API contexts\r\n//We will pass this to swagger class constractor if we need different base urls\r\n//const DEFAULT = \"\";\r\n//const SECONDARY = \"/something\";\r\n\r\nexport enum APILIST {\r\n AUTH = \"Auth\",\r\n ACCOUNT = \"Account\",\r\n ACCOUNTS = \"Accounts\",\r\n DEVICE = \"Device\",\r\n DEVICES = \"Devices\",\r\n DEVICEITEM = \"dataValue\",\r\n DEVICEIDENTITY = \"device-identity\",\r\n COLLECTION = \"Collection\",\r\n EVENT = \"events\",\r\n BUILDING = \"buildings\",\r\n BATS = \"bats\",\r\n ASSET = \"assets\",\r\n LEVEL = \"level\",\r\n ROOM = \"room\",\r\n TRIGGER = \"Trigger\",\r\n COLLECTIONITEM = \"collection-items\",\r\n Group = \"Group\",\r\n Sensor = \"DataField\",\r\n SensorValue = \"DataValue\",\r\n Actuator = \"actuator\",\r\n Attribute = \"attribute\",\r\n Action = \"Action\",\r\n User = \"user\",\r\n Settings = \"Settings\",\r\n Dashboard = \"dashboard\",\r\n DashboardItem = \"dashboardItem\",\r\n Trigger = \"Trigger\",\r\n}\r\n\r\n//CONFIG DATA (Please change here only)\r\nconst configs = {\r\n delay: 500,\r\n // version: '10',\r\n dashbordRefreshRate: 1,\r\n port: 8015,\r\n appName: \"senhost\",\r\n toastDelay: 5000,\r\n tokenStorage: \"TOKEN_PERSIST\", \r\n socket: SOCKET_URL,\r\n type: TYPE_REST,\r\n context: \"https://api.prod.senshost.com/api\",\r\n filePath: \"https://api.prod.senshost.com/Files\",\r\n // context: \"http://127.0.0.1:8002/api\",\r\n // filePath: \"http://127.0.0.1:8002/Files\",\r\n context2: \"https://api.prod.senshost.com\",\r\n history: createBrowserHistory(),\r\n requestTimeOut: 100000,\r\n apiList: APILIST,\r\n tablePageSize: 10,\r\n};\r\nexport default configs;\r\n","import * as constants from '../constants';\r\nimport { PageSizeActions } from '../interfaces/actions';\r\nimport { AxiosError } from 'axios';\r\n\r\nexport function revieveEventPageSize(eventSize: number): PageSizeActions {\r\n return {\r\n type: constants.RECIEVE_EVENT_SIZE,\r\n eventSize,\r\n }\r\n}\r\n\r\nexport function revieveDataValuePageSize(dataValueSize: number): PageSizeActions {\r\n return {\r\n type: constants.RECIEVE_DATAVALUE_SIZE,\r\n dataValueSize,\r\n }\r\n}\r\n\r\nexport function recieveAssetDataPageSize(assetSize: number): PageSizeActions {\r\n return {\r\n type: constants.RECIEVE_ASSET_SIZE,\r\n assetSize,\r\n }\r\n} \r\n\r\nexport function recieveTriggerDataPageSize(triggerSize: number): PageSizeActions {\r\n return {\r\n type: constants.RECIEVE_TRIGGER_SIZE,\r\n triggerSize,\r\n }\r\n}\r\n\r\nexport function version(version: string): PageSizeActions {\r\n return {\r\n type: constants.VERSION,\r\n version,\r\n }\r\n}\r\n\r\n\r\n\r\nexport function reset(): PageSizeActions {\r\n return {\r\n type: constants.RESET\r\n }\r\n}\r\n\r\n\r\n\r\nexport function logGroupsError(error: AxiosError): PageSizeActions {\r\n return {\r\n type: constants.LOG_GROUP_ERROR,\r\n error,\r\n }\r\n}\r\n\r\n\r\nexport type PageSizeAction = PageSizeActions;","import { DropdownItem } from \"@sebgroup/react-components/dist/Dropdown/Dropdown\";\r\nimport { ModalProps } from \"@sebgroup/react-components/dist/Modal/Modal\";\r\nimport { Column } from \"@sebgroup/react-components/dist/Table/Table\";\r\nimport { max } from \"d3\";\r\nimport { DashboardPropertiesOptions } from \"../components/home/dashboardItem/modals/AddDashboardItem\";\r\n\r\nexport const RECEIVE_AUTH_USER = \"RECEIVE_AUTH_USER\";\r\nexport type RECEIVE_AUTH_USER = typeof RECEIVE_AUTH_USER;\r\nexport const LOG_AUTH_ERROR = \"LOG_AUTH_ERROR\";\r\nexport type LOG_AUTH_ERROR = typeof LOG_AUTH_ERROR;\r\nexport const CLEAR_AUTH_DATA = 'CLEAR_AUTH_DATA';\r\nexport const REQUEST_AUTH_USER = \"REQUEST_AUTH_USER\";\r\nexport type REQUEST_AUTH_USER = typeof REQUEST_AUTH_USER;\r\nexport const SIGNOUT_USER = \"SIGNOUT_USER\";\r\nexport type SIGNOUT_USER = typeof SIGNOUT_USER;\r\n\r\nexport const SET_DATA_REFRESH_TIME = \"SET_DATA_REFRESH_TIME\";\r\nexport type SET_DATA_REFRESH_TIME = typeof SET_DATA_REFRESH_TIME;\r\n\r\nexport const TOGGLE_NOTIFICATION = \"TOGGLE_NOTIFICATION\";\r\nexport type TOGGLE_NOTIFICATION = typeof TOGGLE_NOTIFICATION;\r\n\r\nexport const RECEIVE_GROUPS = \"RECEIVE_GROUPS\";\r\nexport const LOG_GROUP_ERROR = \"LOG_GROUP_ERROR\";\r\n\r\nexport const RECEIVE_DEVICES = \"RECEIVE_DEVICES\";\r\nexport const RESET_DEVICE = \"RESET_DEVICE\";\r\nexport type RESET_DEVICE = typeof RESET_DEVICE;\r\nexport const CLEAR_GROUPS = \"CLEAR_GROUPS\";\r\nexport type CLEAR_GROUPS = typeof CLEAR_GROUPS;\r\nexport const RESET = \"RESET\";\r\nexport const RECEIVE_DEVICE_IDENTITY = \"RECEIVE_DEVICE_IDENTITY\";\r\nexport const CLEAR_DEVICE_IDENTITY = \"CLEAR_DEVICE_IDENTITY\";\r\nexport type CLEAR_DEVICE_IDENTITY = typeof CLEAR_DEVICE_IDENTITY;\r\nexport const RECEIVE_COLLECTIONS = \"RECEIVE_COLLECTIONS\";\r\nexport const CLEAR_COLLECTIONS = \"CLEAR_COLLECTIONS\";\r\nexport type CLEAR_COLLECTIONS = typeof CLEAR_COLLECTIONS;\r\nexport const RECEIVE_ITEMS = \"RECEIVE_ITEMS\";\r\nexport const CLEAR_ITEMS = \"CLEAR_ITEMS\";\r\nexport type CLEAR_ITEMS = typeof CLEAR_ITEMS;\r\nexport const RECEIVE_COLLECTION_ITEMS = \"RECEIVE_COLLECTION_ITEMS\";\r\nexport const RECEIVE_EVENT_ITEMS = \"RECEIVE_EVENT_ITEMS\";\r\nexport const RECEIVE_EVENT_TRIGGER = \"RECEIVE_EVENT_TRIGGER\";\r\nexport const CLEAR_COLLECTION_ITEMS = \"CLEAR_COLLECTION_ITEMS\";\r\nexport type CLEAR_COLLECTION_ITEMS = typeof CLEAR_COLLECTION_ITEMS;\r\nexport const RECIEVE_EVENT_SIZE = \"RECIEVE_EVENT_SIZE\";\r\nexport const RECIEVE_ASSET_SIZE = \"RECIEVE_ASSET_SIZE\";\r\nexport const RECIEVE_TRIGGER_SIZE = \"RECIEVE_TRIGGER_SIZE\";\r\nexport const VERSION = \"VERSION\";\r\nexport const RECIEVE_DATAVALUE_SIZE = \"RECIEVE_DATAVALUE_SIZE\";\r\nexport const LOG_DEVICE_ERROR = \"LOG_GROUP_ERROR\";\r\n\r\n\r\n// 3. Add the days of week for selection\r\nexport const DAYSOFWEEK = [\r\n { label: \"Monday\", value: \"monday\" },\r\n { label: \"Tuesday\", value: \"tuesday\" },\r\n { label: \"Wednesday\", value: \"wednesday\" },\r\n { label: \"Thursday\", value: \"thursday\" },\r\n { label: \"Friday\", value: \"friday\" },\r\n { label: \"Saturday\", value: \"saturday\" },\r\n { label: \"Sunday\", value: \"sunday\" },\r\n];\r\n\r\nexport const SENSORSTYPESCOLUMN: Array = [\r\n {\r\n label: \"id\",\r\n accessor: \"id\",\r\n isHidden: true,\r\n },\r\n {\r\n label: \"deviceId\",\r\n accessor: \"deviceId\",\r\n isHidden: true,\r\n },\r\n {\r\n label: \"Type\",\r\n accessor: \"dataType\",\r\n isHidden: true,\r\n },\r\n {\r\n label: \"Type\",\r\n accessor: \"sensorDataType\",\r\n },\r\n {\r\n label: \"Name\",\r\n accessor: \"name\",\r\n },\r\n {\r\n label: \"Compensation Value\",\r\n accessor: \"compensationValue\",\r\n },\r\n];\r\n\r\nexport const DASHBOARDDATASOURCECOLUMN: Array = [\r\n {\r\n label: \"Device\",\r\n accessor: \"device\",\r\n },\r\n {\r\n label: \"Device Source\",\r\n accessor: \"deviceSource\"\r\n },\r\n {\r\n label: \"Sensor\",\r\n accessor: \"sensor\",\r\n },\r\n {\r\n label: \"Label\",\r\n accessor: \"label\",\r\n },\r\n {\r\n label: \"Color\",\r\n accessor: \"color\",\r\n },\r\n];\r\n\r\nexport const ACTUATORCOLUMNS: Array = [\r\n {\r\n label: \"id\",\r\n accessor: \"id\",\r\n isHidden: true,\r\n },\r\n {\r\n label: \"deviceId\",\r\n accessor: \"deviceId\",\r\n isHidden: true,\r\n },\r\n {\r\n label: \"accountId\",\r\n accessor: \"accountId\",\r\n isHidden: true,\r\n },\r\n {\r\n label: \"Name\",\r\n accessor: \"name\",\r\n },\r\n {\r\n label: \"Type\",\r\n accessor: \"actuatorType\",\r\n },\r\n {\r\n label: \"ON\",\r\n accessor: \"ON\",\r\n },\r\n {\r\n label: \"OFF\",\r\n accessor: \"OFF\",\r\n },\r\n {\r\n label: \"Value\",\r\n accessor: \"value\",\r\n },\r\n {\r\n label: \"Message\",\r\n accessor: \"message\",\r\n },\r\n];\r\n\r\nexport const ATTRIBUTESCOLUMNS: Array = [\r\n {\r\n label: \"id\",\r\n accessor: \"id\",\r\n isHidden: true,\r\n },\r\n {\r\n label: \"deviceId\",\r\n accessor: \"deviceId\",\r\n isHidden: true,\r\n },\r\n {\r\n label: \"accountId\",\r\n accessor: \"accountId\",\r\n isHidden: true,\r\n },\r\n {\r\n label: \"Name\",\r\n accessor: \"name\",\r\n },\r\n {\r\n label: \"Data Type\",\r\n accessor: \"type\",\r\n },\r\n {\r\n label: \"Current Value\",\r\n accessor: \"currentValue\",\r\n },\r\n {\r\n label: \"Previous Value\",\r\n accessor: \"lastValue\",\r\n },\r\n {\r\n label: \"Last Modified\",\r\n accessor: \"lastUpdateDate\",\r\n }\r\n];\r\n\r\nexport const ACTUATORS = [\r\n {\r\n label: \"Digital\",\r\n value: 0,\r\n },\r\n {\r\n label: \"Analog\",\r\n value: 1,\r\n },\r\n {\r\n label: \"Message\",\r\n value: 2,\r\n },\r\n];\r\n\r\nexport const PROPERTIESCOLUMNS: Array = [\r\n {\r\n label: \"id\",\r\n accessor: \"id\",\r\n isHidden: true,\r\n },\r\n {\r\n label: \"Property name\",\r\n accessor: \"propertyName\",\r\n isHidden: true,\r\n },\r\n {\r\n label: \"Property\",\r\n accessor: \"propertyLabel\",\r\n },\r\n {\r\n label: \"Custom label\",\r\n accessor: \"otherPropertyLabel\",\r\n isHidden: true,\r\n },\r\n {\r\n label: \"Value\",\r\n accessor: \"propertyValue\",\r\n },\r\n];\r\n\r\nexport const DASHBOARDITEMTYPES = [\r\n {\r\n label: \"Simple Text\",\r\n value: 9\r\n },\r\n {\r\n label: \"Environment Aggregate\",\r\n value: 12\r\n },\r\n {\r\n label: \"Device Aggregate\",\r\n value: 13\r\n },\r\n {\r\n label: \"Event Viewer\",\r\n value: 14\r\n },\r\n {\r\n label: \"Environment Map\",\r\n value: 15\r\n },\r\n {\r\n label: \"Indicator\",\r\n value: 10\r\n },\r\n {\r\n label: \"Environment Widget\",\r\n value: 11\r\n },\r\n {\r\n label: \"Tank\",\r\n value: 0,\r\n },\r\n {\r\n label: \"Gauge\",\r\n value: 1,\r\n },\r\n {\r\n label: \"ColoredGuage\",\r\n value: 8,\r\n },\r\n {\r\n label: \"Bar graph\",\r\n value: 2,\r\n },\r\n {\r\n label: \"Line graph\",\r\n value: 3,\r\n },\r\n {\r\n label: \"Doughnut graph\",\r\n value: 4,\r\n },\r\n {\r\n label: \"PieChart graph\",\r\n value: 5,\r\n },\r\n {\r\n label: \"Multiline graph\",\r\n value: 7,\r\n },\r\n {\r\n label: \"other\",\r\n value: 6,\r\n }\r\n];\r\n\r\nexport const HTTPREQUESTMETHODS: Array = [\r\n {\r\n label: \"GET\",\r\n value: \"GET\",\r\n },\r\n {\r\n label: \"POST\",\r\n value: \"POST\",\r\n },\r\n {\r\n label: \"PUT\",\r\n value: \"PUT\",\r\n },\r\n {\r\n label: \"PATCH\",\r\n value: \"PATCH\",\r\n },\r\n {\r\n label: \"DELETE\",\r\n value: \"DELETE\",\r\n },\r\n {\r\n label: \"HEAD\",\r\n value: \"HEAD\",\r\n },\r\n {\r\n label: \"OPTIONS\",\r\n value: \"OPTIONS\",\r\n },\r\n {\r\n label: \"TRACE\",\r\n value: \"TRACE\",\r\n },\r\n {\r\n label: \"CONNECT\",\r\n value: \"CONNECT\",\r\n },\r\n];\r\n\r\nexport const TIMERULEOPERATORS: Array = [\r\n {\r\n label: \"Last received is >\",\r\n value: \">\",\r\n },\r\n {\r\n label: \"Last received is <\",\r\n value: \"<\",\r\n },\r\n {\r\n label: \"Last received is =\",\r\n value: \"=\",\r\n },\r\n {\r\n label: \"Last received is <=\",\r\n value: \"<=\",\r\n },\r\n {\r\n label: \"Last received is >=\",\r\n value: \">=\",\r\n },\r\n];\r\n\r\nexport const STRINGRULEOPRATORS: Array = [\r\n {\r\n label: \"Contains\",\r\n value: \"contains\",\r\n },\r\n {\r\n label: \"Start with\",\r\n value: \"startWith\",\r\n },\r\n {\r\n label: \"End with\",\r\n value: \"endWith\",\r\n },\r\n {\r\n label: \"Length\",\r\n value: \"length\",\r\n },\r\n {\r\n label: \"Equals\",\r\n value: \"equals\",\r\n },\r\n {\r\n label: \"Not Equal\",\r\n value: \"notequal\",\r\n },\r\n];\r\n\r\nexport const NUMBERRULEOPERATORS: Array = [\r\n {\r\n label: \">\",\r\n value: \">\",\r\n },\r\n {\r\n label: \">=\",\r\n value: \">=\",\r\n },\r\n {\r\n label: \"<\",\r\n value: \"<\",\r\n },\r\n {\r\n label: \"<=\",\r\n value: \"<=\",\r\n },\r\n {\r\n label: \"=\",\r\n value: \"=\",\r\n },\r\n {\r\n label: \"!=\",\r\n value: \"!=\",\r\n },\r\n {\r\n label: \"Within\",\r\n value: \"Within\",\r\n },\r\n {\r\n label: \"NotWithin\",\r\n value: \"NotWithin\",\r\n },\r\n\r\n];\r\n\r\nexport const COLLECTIONRULESOPERATOR: Array = [\r\n {\r\n label: \"Exist in value\",\r\n value: \"in-value\",\r\n },\r\n {\r\n label: \"Not in value\",\r\n value: \"not-in-value\",\r\n },\r\n {\r\n label: \"Exist in key\",\r\n value: \"in-key\",\r\n },\r\n {\r\n label: \"Not in key\",\r\n value: \"not-in-key\",\r\n }\r\n];\r\n\r\nexport const ACTIONTYPES: Array = [\r\n\r\n {\r\n label: \"All\",\r\n value: '',\r\n }, {\r\n label: \"Rest service action\",\r\n value: 0,\r\n },\r\n {\r\n label: \"Mqqt published action\",\r\n value: 1,\r\n },\r\n {\r\n label: \"Email\",\r\n value: 2,\r\n },\r\n {\r\n label: \"SMS\" || \"Telegram\",\r\n value: 3,\r\n },\r\n {\r\n label: \"Actuator\",\r\n value: 4,\r\n },\r\n {\r\n label: \"Set Attribute\",\r\n value: 5,\r\n },\r\n {\r\n label: \"Notification\",\r\n value: 6,\r\n },\r\n];\r\n\r\nexport const ACTIONTYPESFRONTSEARCH: Array = [\r\n {\r\n label: \"Rest service action\",\r\n value: 'Rest service action',\r\n },\r\n {\r\n label: \"Mqqt published action\",\r\n value: 'Mqqt published action',\r\n },\r\n {\r\n label: \"Email\",\r\n value: 'Email',\r\n },\r\n {\r\n label: \"SMS\",\r\n value: 'SMS',\r\n },\r\n {\r\n label: \"Actuator\",\r\n value: 'Actuator',\r\n },\r\n {\r\n label: \"Set Attribute\",\r\n value: 'Set Attribute',\r\n },\r\n {\r\n label: \"Notification\",\r\n value: 'Notification',\r\n },\r\n];\r\n\r\n\r\n\r\nexport enum ChartType {\r\n Tank = 0,\r\n Gauge = 1,\r\n BarGraph = 2,\r\n LineGraph = 3,\r\n Doughnut = 4,\r\n PieChart = 5,\r\n Other = 6,\r\n Multiline = 7,\r\n ColoredGuage = 8,\r\n SimpleTextWidget = 9,\r\n GateWidget = 10,\r\n EnvironmentWidget = 11,\r\n EnvironmentAggregate = 12,\r\n DeviceAggregate = 13,\r\n EventViewer = 14,\r\n EnvironmentMapWidget = 15,\r\n\r\n}\r\n\r\nexport enum DashboardItemStatus {\r\n On = 1,\r\n Off = 0,\r\n}\r\nexport const DASHBOARDPROPERTIES: Array = [\r\n {\r\n type: ChartType.Tank,\r\n properties: [\r\n {\r\n label: \"Capacity\",\r\n value: \"capacity\",\r\n },\r\n {\r\n label: \"Current Value\",\r\n value: \"value\",\r\n },\r\n {\r\n label: \"Refresh rate\",\r\n value: \"refreshRate\",\r\n },\r\n ],\r\n },\r\n {\r\n type: ChartType.Gauge,\r\n properties: [\r\n {\r\n label: \"Minimum value\",\r\n value: \"minimumValue\",\r\n },\r\n {\r\n label: \"Maximum value\",\r\n value: \"maximumValue\",\r\n },\r\n ],\r\n },\r\n {\r\n type: ChartType.BarGraph,\r\n properties: [\r\n {\r\n label: \"X-axis label\",\r\n value: \"x-axis\",\r\n },\r\n {\r\n label: \"Y-axis label\",\r\n value: \"y-axis\",\r\n },\r\n ],\r\n },\r\n {\r\n type: ChartType.LineGraph,\r\n properties: [\r\n {\r\n label: \"X-axis label\",\r\n value: \"x-axis\",\r\n },\r\n {\r\n label: \"Y-axis label\",\r\n value: \"y-axis\",\r\n },\r\n ],\r\n },\r\n {\r\n type: ChartType.Doughnut,\r\n properties: [\r\n {\r\n label: \"Value\",\r\n value: \"value\",\r\n },\r\n {\r\n label: \"Name\",\r\n value: \"name\",\r\n },\r\n ],\r\n },\r\n {\r\n type: ChartType.PieChart,\r\n properties: [\r\n {\r\n label: \"Value\",\r\n value: \"value\",\r\n },\r\n {\r\n label: \"Name\",\r\n value: \"name\",\r\n },\r\n ],\r\n },\r\n {\r\n type: 4,\r\n properties: [\r\n {\r\n label: \"Other\",\r\n value: \"other\",\r\n },\r\n ],\r\n },\r\n];\r\n\r\nexport const SENSORSTYPES = [\r\n {\r\n label: \"decimal\",\r\n value: 0,\r\n },\r\n {\r\n label: \"String\",\r\n value: 1,\r\n },\r\n {\r\n label: \"int\",\r\n value: 2,\r\n },\r\n {\r\n label: \"double\",\r\n value: 3,\r\n },\r\n {\r\n label: \"Number\",\r\n value: 4,\r\n },\r\n {\r\n label: \"NumberRange\",\r\n value: 5,\r\n },\r\n {\r\n label: \"RawText\",\r\n value: 6,\r\n },\r\n {\r\n label: \"Json\",\r\n value: 7,\r\n },\r\n {\r\n label: \"Location\",\r\n value: 8,\r\n }, {\r\n label: \"Image\",\r\n value: 9,\r\n },\r\n];\r\n\r\n\r\nexport const DURATION = [\r\n {\r\n label: \"Secs\",\r\n value: 'second',\r\n },\r\n {\r\n label: \"Mins\",\r\n value: 'minute',\r\n },\r\n {\r\n label: \"Hrs\",\r\n value: 'hour',\r\n }\r\n];\r\n\r\n\r\nexport const AUTOMATIONACTIONTYPES = [\r\n {\r\n label: \"SMS\",\r\n value: 'sms',\r\n },\r\n {\r\n label: \"EMAIL\",\r\n value: 'email',\r\n },\r\n {\r\n label: \"TELEGRAM\",\r\n value: 'telegram',\r\n },\r\n {\r\n label: \"Attribute\",\r\n value: 'attribute',\r\n },\r\n {\r\n label: \"Rest service action\",\r\n value: 'rest service action',\r\n },\r\n {\r\n label: \"Mqqt published action\",\r\n value: 'mqqt published action',\r\n },\r\n {\r\n label: \"Actuator\",\r\n value: 'actuator',\r\n }\r\n];\r\n\r\nexport const AUTOMATIONTYPES = [\r\n {\r\n label: \"Threshold\",\r\n value: 'Threshold',\r\n },\r\n // {\r\n // label: \"Numeric Monitoring\",\r\n // value: 'NumericMonitoring',\r\n // },\r\n // {\r\n // label: \"Text Monitoring\",\r\n // value: 'TextMonitoring',\r\n // }\r\n];\r\n\r\nexport const RecipientType = [\r\n {\r\n label: \"All\",\r\n value: 0,\r\n },\r\n {\r\n label: \"Group\",\r\n value: 1,\r\n },\r\n {\r\n label: \"User\",\r\n value: 2,\r\n },\r\n {\r\n label: \"Account Owner\",\r\n value: 3,\r\n }\r\n];\r\n\r\nexport const NotificationPriority = [\r\n {\r\n label: \"Select\",\r\n value: null,\r\n },\r\n {\r\n label: \"Normal\",\r\n value: \"normal\",\r\n },\r\n {\r\n label: \"High\",\r\n value: \"high\",\r\n }\r\n];\r\n\r\nexport const Severity = [\r\n {\r\n label: \"Select\",\r\n value: null,\r\n },\r\n {\r\n label: \"Info\",\r\n value: \"Info\",\r\n },\r\n {\r\n label: \"Warning\",\r\n value: \"Warning\",\r\n },\r\n {\r\n label: \"Critical\",\r\n value: \"Critical\",\r\n },\r\n];\r\n\r\nexport const DEVICETYPES = [\r\n {\r\n label: \"Please Select\",\r\n value: '',\r\n },\r\n {\r\n label: \"class A end Node\",\r\n value: 'ClassAEndNode',\r\n },\r\n {\r\n label: \"Class B end Node\",\r\n value: 'ClassBEndNode',\r\n },\r\n {\r\n label: \"Class C end Node\",\r\n value: 'ClassCEndNode',\r\n },\r\n {\r\n label: \"Environment\",\r\n value: 'Environment',\r\n },\r\n {\r\n label: \"Gateway\",\r\n value: 'Gateway',\r\n },\r\n {\r\n label: \"Pvol\",\r\n value: 'Pvol',\r\n },\r\n {\r\n label: \"Beacon Station\",\r\n value: 'BeaconStation',\r\n },\r\n];\r\n\r\nexport const initialState: ModalProps = {\r\n toggle: false,\r\n fullscreen: false,\r\n position: null,\r\n centered: false,\r\n size: 'modal-lg',\r\n disableBackdropDismiss: true,\r\n onDismiss: null,\r\n};\r\n","import * as React from \"react\";\r\nimport { createPortal } from \"react-dom\";\r\n\r\nexport default class PortalComponent extends React.PureComponent<{ children: any }, {}> {\r\n private el: HTMLDivElement;\r\n private portalRoot: HTMLElement;\r\n\r\n constructor(props: { children: any }) {\r\n super(props);\r\n this.el = document.createElement(\"div\");\r\n this.portalRoot = document.getElementById(\"portal\");\r\n }\r\n\r\n componentDidMount = () => {\r\n this.portalRoot?.appendChild(this.el);\r\n };\r\n\r\n componentWillUnmount = () => {\r\n this.portalRoot?.removeChild(this.el);\r\n };\r\n\r\n render() {\r\n const { children } = this.props;\r\n return createPortal(children, this.el);\r\n }\r\n}","import React, { createContext, useState, useContext, ReactNode } from 'react';\r\n\r\ntype Theme = 'light' | 'dark';\r\n\r\ninterface ThemeContextProps {\r\n theme: Theme;\r\n toggleTheme: () => void;\r\n}\r\n\r\nconst ThemeContext = createContext(undefined);\r\n\r\nexport const ThemeProvider: React.FC<{ children: ReactNode }> = ({ children }) => {\r\n const [theme, setTheme] = useState(() => {\r\n // Initialize with localStorage or default to 'light'\r\n return (localStorage.getItem('theme') as Theme) || 'light';\r\n });\r\n\r\n const toggleTheme = () => {\r\n const newTheme = theme === 'light' ? 'dark' : 'light';\r\n setTheme(newTheme);\r\n localStorage.setItem('theme', newTheme); // Persist theme\r\n };\r\n\r\n return (\r\n \r\n
{children}
\r\n
\r\n );\r\n};\r\n\r\nexport const useTheme = () => {\r\n const context = useContext(ThemeContext);\r\n if (!context) throw new Error('useTheme must be used within a ThemeProvider');\r\n return context;\r\n};\r\n"],"sourceRoot":""}