{"version":3,"sources":["_metronic/layout/core/LayoutSetup.ts","_metronic/layout/components/header/Topbar.tsx","_metronic/layout/components/header/HeaderWrapper.tsx","app/ui/sensor/config/SensorArea.jsx","app/ui/sensor/config/display.jsx","_metronic/layout/core/MetronicSplashScreen.tsx","app/ui/dashboard/MyPlace.jsx","_metronic/helpers/AssetHelpers.ts","_metronic/helpers/RouterHelpers.ts","_metronic/helpers/components/KTSVG.tsx","_metronic/helpers/dataExamples.ts","_metronic/layout/core/DefaultLayoutConfig.ts","_metronic/layout/core/LayoutProvider.tsx","_metronic/layout/core/PageData.tsx","_metronic/partials/content/dropdown/Dropdown2.tsx","app/ui/sensor/config/my_great_place_styles.js","app/ui/sensor/config/Map.jsx","_metronic/partials/content/dropdown/Dropdown1.tsx","_metronic/layout/components/header/page-title/DefaultTitle.tsx","app/ui/sensor/config/DisplayGroup.jsx","_metronic/partials/layout/explore/Toggle.tsx","app/ui/sensor/config/chart/Chartj.jsx","_metronic/partials/widgets/mixed/MixedWidget1.tsx","_metronic/partials/widgets/mixed/MixedWidget7.tsx","_metronic/partials/widgets/mixed/MixedWidget10.tsx","_metronic/partials/widgets/mixed/MixedWidget49.tsx","_metronic/partials/widgets/mixed/MixedWidget20_1.tsx","_metronic/partials/widgets/mixed/SmartTile.tsx","_metronic/partials/widgets/mixed/SmartGasHealth.tsx","app/ui/dashboard/SensorView.jsx","DataLayer.jsx","app/ui/dashboard/SensorView2.jsx","app/ui/dashboard/SensorView3.jsx","app/ui/sensor/config/my_great_place.jsx","app/ui/sensor/config/Test.jsx","_metronic/assets/ts/_utils/_ElementStyleUtil.ts","_metronic/assets/ts/_utils/_DataUtil.ts","_metronic/assets/ts/_utils/_TypesHelpers.ts","_metronic/assets/ts/_utils/_DOMEventHandlerUtil.ts","_metronic/assets/ts/_utils/ElementAnimateUtil.ts","_metronic/assets/ts/_utils/DomHelpers.ts","_metronic/assets/ts/_utils/EventHandlerUtil.ts","_metronic/assets/ts/components/_CookieComponent.ts","_metronic/assets/ts/components/_DrawerComponent.ts","_metronic/assets/ts/components/_FeedbackComponent.ts","_metronic/assets/ts/components/_ImageInputComponent.ts","_metronic/assets/ts/components/_ScrollComponent.ts","_metronic/assets/ts/components/_ScrollTopComponent.ts","_metronic/assets/ts/components/_StepperComponent.ts","_metronic/assets/ts/components/_StickyComponent.ts","_metronic/assets/ts/components/_ToggleComponent.ts","_metronic/assets/ts/components/_PasswordMeterComponent.ts","_metronic/assets/ts/components/_PlaceComponent.ts","_metronic/assets/ts/components/MenuComponent.ts","_metronic/assets/ts/components/SearchComponent.ts","app/ui/common/commonResource2.jsx","app/ui/helpers/Dictionary.jsx","app/ui/sensor/helpers/calc_markers_visibility.js","app/ui/helpers/WindowDimension.jsx","app/ui/common/commonResource.jsx","app/modules/auth/components/Registration.tsx","app/modules/auth/components/ForgotPassword.tsx","app/modules/auth/redux/AuthCRUD.ts","app/modules/auth/redux/AuthRedux.ts","app/modules/auth/components/Login.jsx","app/modules/auth/AuthPage.tsx","app/modules/auth/__mocks__/usersTableMock.ts","app/modules/auth/Logout.tsx","app/modules/auth/redux/AuthInit.tsx","setup/redux/RootReducer.ts","setup/redux/Store.ts","reducer.js","_metronic/i18n/Metronici18n.tsx","_metronic/i18n/i18nProvider.tsx","_metronic/layout/components/toolbar/Toolbar1.tsx","_metronic/layout/components/toolbar/Toolbar.tsx","_metronic/layout/components/ScrollTop.tsx","_metronic/layout/MasterInit.tsx","_metronic/layout/MasterLayout.tsx","app/ui/helpers/commonResource.jsx","app/ui/layout/AllLayouts.jsx","app/ui/layout/AllAlerts.jsx","app/ui/dashboard/Dashboard.tsx","app/ui/sensor/config/TagConfig.jsx","app/ui/sensor/config/index.jsx","app/ui/layout/Alert.jsx","app/ui/layout/AllGroups.jsx","app/ui/layout/NewLayout.jsx","app/ui/layout/Design.jsx","app/ui/sensor/config/ObjectViewer.jsx","app/ui/helpers/LoadingSentrum.jsx","app/ui/dashboard/SubSectorManager.jsx","app/ui/dashboard/FacilityManager.jsx","app/ui/dashboard/FactoriesManager.jsx","app/ui/dashboard/BusinessUnitManager.jsx","app/ui/dashboard/BusinessUnitDetailManager.jsx","app/ui/dashboard/BusinessUnitDetailManager2.jsx","app/ui/dashboard/Smartgas1.jsx","app/routing/PrivateRoutes.tsx","app/modules/errors/components/Error500.tsx","app/modules/errors/components/Error404.tsx","app/modules/errors/ErrorsPage.tsx","app/ui/sensor/config/MainDashboard.jsx","app/ui/sensor/config/FactoryDashboard.jsx","app/ui/sensor/config/DetailDashboard.jsx","app/ui/sensor/config/ViewAll.jsx","app/routing/Routes.tsx","app/App.tsx","index.tsx","app/ui/sensor/helpers/marker_styles.js","app/ui/sensor/config/marker_example.jsx","app/ui/sensor/helpers/balloon_pos.js","app/ui/helpers/loading.jsx","_metronic/layout/components/aside/AsideMenuItemWithSub.tsx","_metronic/layout/components/aside/AsideMenuItem.tsx","_metronic/layout/components/aside/AsideMenuMain.jsx","_metronic/layout/components/aside/AsideMenu.tsx","_metronic/layout/components/aside/AsideDefault.tsx","app/ui/helpers/message.jsx","_metronic/partials/layout/header-menus/HeaderUserMenu.tsx","_metronic/partials/chat/ChatInner.tsx","_metronic/partials/modals/create-app/Main.tsx","_metronic/layout/components/Footer.tsx","_metronic/layout/components/Content.tsx"],"names":["LAYOUT_CONFIG_KEY","getEmptyCssClasses","header","headerContainer","headerMobile","headerMenu","aside","asideMenu","asideToggle","toolbar","toolbarContainer","content","contentContainer","footerContainer","sidebar","pageTitle","getEmptyHTMLAttributes","Map","getEmptyCSSVariables","body","LayoutSetup","classes","attributes","Object","assign","cssVariables","config","Array","from","document","forEach","attr","removeAttribute","name","setAttribute","main","backgroundImage","style","class","classList","add","push","width","fixed","desktop","tabletAndMobile","display","tabletAndMobileMode","type","layout","typeOptions","layouts","bodyStyles","height","heightAndTabletMobileMode","direction","this","responsive","set","responsiveBreakpoint","responsiveTarget","theme","minimized","hoverable","darkSkinEnabled","initLayout","initHeader","initPageTitle","initToolbar","initContent","initAside","initFooter","footer","initAsideMenu","fieldsToUpdate","updatedConfig","initCSSClasses","initCSSVariables","initHTMLAttributes","isLoaded","initConfig","localStorage","setItem","JSON","stringify","er","console","error","setLayout","ls","getItem","parse","DefaultLayoutConfig","getLayout","bootstrap","updatePartialConfig","Topbar","useLayout","useDataLayerValue","user","className","clsx","id","fontSize","firstName","left","title","path","HeaderWrapper","pathname","useLocation","useEffect","MenuComponent","reinitialization","window","location","hostname","toLowerCase","join","to","alt","src","toAbsoluteUrl","DefaultTitle","require","SensorArea","props","RADIAN","Math","PI","Gradients","item","lines","undefined","length","index","element","dataKey","x1","y1","x2","y2","offset","stopColor","stroke","stopOpacity","fillTopOpacity","fillBottomOpacity","Article","LineCode","Line","strokeWidth","dot","activeDot","r","fillOpacity","fill","stackId","renderCustomizedLabel","cx","cy","midAngle","innerRadius","outerRadius","percent","radius","x","cos","y","sin","textAnchor","dominantBaseline","toFixed","state","SensorList","map","note","defaultPosition","defaultPos","onStart","fontFamily","zIndex","position","href","url","target","displayName","color","captionWidth","float","valueWidth","textAlign","right","marginTop","value","icon","backgroundColor","isNotify","marginLeft","trigger","cursor","modal","close","onClick","borderBottom","dangerouslySetInnerHTML","__html","paddingTop","paddingLeft","padding","cellpadding","cellspacing","transform","transformOrigin","role","data","isEnableCartesianGrid","strokeDasharray","dy","xAxis","minTickGap","axisLine","interval","angle","dx","label","yAxis","tickLine","domain","isLegend","legend","verticalAlign","align","margin","top","isTooltip","labelLine","bottom","randomColor","Display","useState","connection","setConnection","reconnectRef","useRef","urlParams","URLSearchParams","search","isloading","setLoading","setsensorList","sensors","useFabricJSEditor","defaultStrokeColor","selection","selectedObjects","setSelectedObject","editor","onReady","text","setText","strokeColor","setStrokeColor","fillColor","setFillColor","isload","setisload","match","params","layoutName","imageData","devices","isZoom","globalJs","category","designObject","breadCrumbs","Data","DashboardStat","setState","hubService","process","start","then","result","current","onreconnecting","log","onclose","e","on","message","String","key","dataPacket","TimeStamp","round","Date","Packet","replace","newElements","entries","machineNo","lastUpdate","toString","object","packetType","Plant","notification","toastId","autoClose","hideProgressBar","closeOnClick","draggable","progress","transition","Bounce","eval","formula","catch","axios","method","headers","response","setTimeout","tempFeild1","newConnection","HubConnectionBuilder","withUrl","hub","withAutomaticReconnect","build","desginObject","version","objects","ds","lockMovementX","lockMovementY","lockScalingX","lockScalingY","lockRotation","hasControls","hasBorders","canvas","loadFromJSON","bodyCss","overflowX","hideAllNotification","toast","dismissAll","hideNotification","dismiss","getTransactionType","Flip","Slide","Zoom","getType","TYPE","INFO","ERROR","SUCCESS","WARNING","showNotification","isActive","render","update","info","warn","success","Notification","Type","Message","Position","Autoclose","pauseOnHover","backcss","sensorcss","getFullYear","code","breadcrumbs","overflow","MetronicSplashScreenContext","createContext","LayoutSplashScreen","visible","setCount","useContext","prev","MyPlace","shouldComponentUpdate","shouldPureComponentUpdate","Value","Link","greatPlaceStyle2","long_text","Component","defaultProps","checkIsActive","split","getCurrentUrl","indexOf","KTSVG","svgClassName","defaultMessages","time","template","defaultUserInfos","avatar","email","online","initials","messageFromClient","defaultAlerts","description","defaultLogs","settings_config","primaryColor","loader","scrolltop","menuIcon","megaMenu","menu","minimize","toolbar1","toolbar2","toolbar3","toolbar4","toolbar5","LayoutContext","disableSplashScreen","splashScreen","getElementById","setProperty","LayoutProvider","children","setConfig","setClasses","setAttributes","setCSSVariables","_themeConfig","enableSplashScreen","cl","remove","Provider","PageDataContext","setPageTitle","_title","setPageBreadcrumbs","_breadcrumbs","setPageDescription","_description","setPageCode","_code","PageDataProvider","pageDescription","pageBreadcrumbs","pageCode","usePageData","PageTitle","Dropdown2","K_HEIGHT","greatPlaceStyle","border","borderRadius","fontWeight","AnyReactComponent","center","lat","lng","zoom","K_MARGIN_TOP","K_MARGIN_RIGHT","K_MARGIN_BOTTOM","K_MARGIN_LEFT","K_HOVER_DISTANCE","loc","setLoc","locax","newState","obj","Lat","Lng","link","allSensors","bootstrapURLKeys","defaultCenter","defaultZoom","marker","Dropdown1","defaultValue","defaultChecked","isSeparator","DisplayGroup","Notifications","Toggle","ChartJS","register","CategoryScale","LinearScale","PointElement","LineElement","Title","Tooltip","Legend","Chartj","chartReference","React","createRef","refersh","sort","find","project","option","plugins","elements","line","tension","min","max","ticks","stepSize","labels","datasets","borderColor","RefreshData","datafield","status","labelsx","datax","chart","setInterval","ref","routeChange","MixedWidget1","factoryName","critical","warning","connected","alert","alldevice","val","parseFloat","MixedWidget7","chartColor","chartHeight","chartRef","ApexCharts","chartOptions","destroy","baseColor","getCSSVariableValue","lightColor","series","plotOptions","radialBar","hollow","size","dataLabels","show","offsetY","formatter","track","background","colors","lineCap","MixedWidget10","extra","Description","Name","Note","transformString","str","MixedWidget49","objList","ncu_fw_ver","filter","FieldName","imei","BAT_VOL","GAS_METER","F_DATETIME","RSSI","TANK_SIZE","pr","colurx","boxSizing","animation","Pg","MixedWidget20_1","timestamp","normal","parseInt","disable","SmartTile","funcsetGasInfo","t_NCU_FW_VER","deviceName","GateWay","t_IMEI","t_BAT_VOL","t_GAS_METER","t_F_DATETIME","t_RSSI","t_TANK_SIZE","GAS_PERCENT","t_GAS_PERCENT","d","E","SmartGasHealth","getSensorList","objectFit","SensorView","containerRef","isSubmitting","setSubmitting","token","dispatch","isChartLoading","setChartLoading","loadingMap","setLoadingMap","setdefaultProps","DeviceType","setDeviceType","InitialLoading2","setInitialLoading2","objBrowser","gpsData","PlayCount","setPlayCount","PlayUpToCount","setPlayUpToCount","setdata","gps_data","setgps_data","isPlaying","borderWidth","chartData","setChartData","factories","subSectorName","subSectorCode","sectorName","sectorCode","factroyName","factroyCode","unitName","unitCode","Sensor","Field","Live","Min","Max","Status","NormalRange","WarningRange","CriticalRange","DisableRange","live","setLive","annotation","annotations","line1","yMin","yMax","bezierCurve","lineTension","TablesWidget10","columns","useMemo","Header","accessor","useTable","initialState","pageIndex","pageSize","globalFilter","useGlobalFilter","usePagination","getTableProps","getTableBodyProps","prepareRow","headerGroups","page","canPreviousPage","canNextPage","pageOptions","pageCount","gotoPage","nextPage","previousPage","setPageSize","preGlobalFilteredRows","setGlobalFilter","colSpan","row","i","getRowProps","values","formatCode","priority","facilityName","createdOn","remain","disabled","onChange","Number","countdown","setCountdown","countdown2","setCountdown2","axioDefaultConfig","Authorization","_labels","_data","_gps_data","list","gps","Ignition","Bruno","person","ignition","endDate","waiting","dateConverter","currrent","date","normalRange","warningRange","criticalRange","disableRange","countdownInterval","prevCountdown","clearInterval","unitModels","automationChannel","startDate","timeEnd","newStartDate","newEndDate","ceil","getTime","floor","OnReset","Play","countdownInterval2","scrollTop","scrollHeight","handleWheel","event","clientHeight","deltaY","preventDefault","onClearFilter","onSelect","index2","onStop","onPlay","statusColorClass","initialValues","datex","Ftype","onSubmit","handleChange","errors","touched","handleBlur","handleSubmit","onBlur","substring","onWheel","DataLayerContext","DataLayer","reducer","useReducer","SensorView2","Bat","bat","Bluethooth","bluethooth","Version","TankSize","tanksize","SensorView3","package","MyGreatPlace","uv","pv","amt","ElementStyleUtil","property","important","attributeName","getPropertyValue","attibuteName","removeProperty","DataUtil","instance","instanceData","store","get","newMap","delete","has","v","k","getObjectPropertyValueByKey","hasOwnProperty","getUniqueIdWithPrefix","prefix","random","stringSnakeToCamel","m","toUpperCase","DOMEventHandlerUtil","selector","eventName","callBack","eventId","targets","querySelectorAll","call","parentElement","addEventListener","funcFromStore","removeEventListener","calee","currentTarget","ElementAnimateUtil","duration","complete","easings","t","b","c","change","performance","now","requestAnimationFrame","loop","animationName","animateClasses","cssClass","one","targetPos","getElementOffset","scrollPos","pageYOffset","documentElement","animate","scrollTo","getCSS","el","styleProp","defaultView","ownerDocument","getComputedStyle","variableName","hex","trim","getElementActualCss","prop","cache","css","getAttribute","cssText","offsetWidth","offsetHeight","attributeValue","getElementIndex","parentNode","getElementMatches","p","Element","prototype","f","matches","webkitMatchesSelector","tagName","getClientRects","rect","getBoundingClientRect","win","pageXOffset","getElementParents","s","parents","getHighestZindex","bufferNode","buffer","isNaN","getScrollTop","scrollingElement","getViewPort","innerWidth","innerHeight","insertAfterElement","referenceNode","insertBefore","nextSibling","isVisibleElement","throttle","timer","func","delay","getElementChild","childNodes","child","nodeType","getElementChildren","slide","dir","speed","callback","calcHeight","getElementActualHeight","calcPaddingTop","calcPaddingBottom","paddingBottom","slideUp","slideDown","getBreakpoint","breakpoint","getAttributeValueByBreakpoint","incomingAttr","jsonStr","matched","toJSON","resultKey","resultBreakpoint","EventHandlerUtil","metas","handlerId","meta","getEventMetasByName","setEventMetasByName","handerId","fired","getEventsMetaByHandlerId","setEventMetaByNameAndHandlerId","handler","setFiredByNameAndHandlerId","addEvent","removeEvent","CookieComponent","cookie","RegExp","decodeURIComponent","cookieOptions","options","expires","toUTCString","updatedCookie","encodeURIComponent","optionKey","optionValue","DrawerStore","instanceId","drawerComponentObj","defaultDrawerOptions","overlay","baseClass","overlayClass","DrawerComponent","_element","overlayElement","toggleElement","instanceUid","shown","lastWidth","closeElement","_handlers","togglers","_getOption","closers","_toggle","_hide","_update","hasBaseClass","contains","bodyCanvasAttr","optionName","_show","_deleteOverlay","_createOverlay","createElement","elementZIndex","overlayZindex","append","overlayClassOption","removeChild","_getDirection","_getWidth","toggle","hide","isShown","goElement","off","drawer","getInstance","hasInstace","elementId","hideAll","getAllInstances","dr","updateAll","handleDismiss","closest","createInstances","initGlobalHandlers","defaultImageInputOptions","defaultImageInputQueires","componentName","instanseQuery","inputQuery","wrapperQuery","cancelQuery","removeQuery","hiddenQuery","ImageInputComponent","_options","_queries","inputElement","wrapperElement","cancelElement","removeElement","hiddenElement","queries","uid","_change","files","reader","FileReader","onload","readAsDataURL","_cancel","_remove","querySelector","handlers","ImageInput","createInsance","defaultScrollOptions","saveState","ScrollComponent","getOption","hasAttribute","getHeightType","getAutoHeight","dependencies","wrappers","len","borderTop","setupHeight","getHeight","heightType","setupState","pos","setupScrollHandler","scrollHandler","cookieId","destroyScrollHandler","resetHeight","heghtType","Function","getElement","scroll","resize","createInstance","defaultScrollTopOptions","ScrollTopComponent","_scroll","_go","go","goTop","defaultStepperOptions","startIndex","animationSpeed","animationNextClass","animationPreviousClass","StepperComponent","steps","btnNext","btnPrev","btnSubmit","totatStepsNumber","passedStepIndex","currentStepIndex","_goTo","refreshUI","initHandlers","stepDirection","_getStepDirection","getStepContent","getLastStepIndex","getTotalStepsNumber","isLastStep","isFirstStep","animateClass","isBetweenStep","goto","goNext","getNextStepIndex","goPrev","getPrevStepIndex","goFirst","goLast","getCurrentStepIndex","getPassedStepIndex","stepper","defaultStickyOptions","reverse","animationClass","StickyComponent","instanceName","eventTriggerState","lastScrollTop","offsetNum","st","enable","dataStickyAttr","attrValueInStr","attrValue","zindex","widthTarget","targetElement","offsetLeft","sticky","defaultToggleOptions","ToggleComponent","attribute","_isEnabled","_disable","_enable","isEnabled","elementTargetAttr","elementToggleAttr","defaultPasswordMeterOptions","minLength","checkUppercase","checkLowercase","checkDigit","checkChar","scoreHighlightClass","defaultPasswordMeterQueires","visibilityQuery","highlightQuery","PasswordMeterComponent","visibilityElement","highlightElement","score","checkSteps","reset","highlight","check","visitbility","visibleIcon","hiddenIcon","focus","test","count","items","slice","total","checkScore","getCheckScore","getScore","checkLength","checkLowerCase","passwordMeter","defaultPlaceOptions","mode","defaultPlaceQueires","attrQuery","PlaceComponent","parentSelector","prepend","place","defaultMenuOptions","dropdown","hoverTimeout","accordion","slideSpeed","expand","triggerElement","_setTriggerElement","_isTriggerElement","_getItemOption","_getItemElement","itemElement","sub","subItem","_getItemParentElement","parentItem","_getItemParentElements","parent","unshift","_getDropdownPopperConfig","placementOption","placement","flipValue","flip","offsetValue","strategy","modifiers","rootBoundary","altBoundary","fallbackPlacements","_getItemChildElement","_getItemChildElements","_getItemSubElement","_getCss","_getItemSubType","_isItemSubShown","_isItemDropdownPermanent","_isItemParentShown","_isItemSubElement","_hasItemSub","_getItemLinkElement","_getItemToggleElement","_showDropdown","hideDropdowns","parentZindex","initDropdownPopper","appendChild","reference","attach","popper","createPopper","_hideDropdown","destroyDropdownPopper","_showAccordion","_hideAccordions","subElement","_hideAccordion","itemsToHide","itemToHide","_reset","removeClass","_destroy","_mouseout","timeout","_mouseover","clearTimeout","_dismiss","itemSubType","_link","_click","click","mouseover","mouseout","getItemTriggerType","getItemSubType","getItemLinkElement","getItemToggleElement","getItemSubElement","getItemParentElements","isItemSubShown","isItemParentShown","getTriggerElement","isItemDropdownPermanent","hideAccordions","elementMenu","menuData","subMenu","skip","updateDropdowns","forceUpdate","menuItem","menuInstance","menuItems","menuObj","stopPropagation","defaultSearchOptions","keypress","enter","showOnFocus","defaultSearchQueires","SearchComponent","contentElement","formElement","spinnerElement","clearElement","submitElement","toolbarElement","resultsElement","suggestionElement","emptyElement","processing","menuObject","_getElement","getResponsiveFormMode","blur","charCode","keyCode","input","clear","responsiveFormMode","isProcessing","getQuery","getMenu","getFormElement","Search","validateStatus","Dictionary","param","getIndex","keys","getItems","K_BEFORE_AFTER_SCALES","l","scale","reduce","sum","getWindowDimensions","useWindowDimensions","windowDimensions","setWindowDimensions","handleResize","ApiKey","RACT_APP_API_KEY","password","changepassword","registrationSchema","Yup","shape","required","when","is","oneOf","Registration","loading","setTempToken","Passwordaccesstoken","showPassword","setShowPassword","togglePasswordVisibility","formik","useFormik","validationSchema","setStatus","noValidate","placeholder","autoComplete","getFieldProps","forgotPasswordSchema","ForgotPassword","hasErrors","setHasErrors","isValid","API_URL","getUserByToken","firstname","saga","actionTypes","initialAuthState","accessToken","persistReducer","storage","whitelist","action","payload","actions","login","logout","requestUser","fulfillUser","setUser","takeLatest","loginSaga","put","registerSaga","userRequested","loginSchema","_token","Login","history","useHistory","isEndNode","facility","AuthPage","root","setBackgroundImage","backgroundImages","randomIndex","component","exact","UsersTableMock","Logout","useDispatch","auth","reload","table","username","refreshToken","roles","pic","fullname","lastname","occupation","companyName","phone","language","timeZone","website","emailSettings","emailNotification","sendCopyToPersonalEmail","activityRelatesEmail","youHaveNewNotifications","youAreSentADirectMessage","someoneAddsYouAsAsAConnection","uponNewOrder","newMembershipApproval","memberRegistration","updatesFromKeenthemes","newsAboutKeenthemesProductsAndFeatureUpdates","tipsOnGettingMoreOutOfKeen","thingsYouMissedSindeYouLastLoggedIntoKeen","newsAboutStartOnPartnerProductsAndOtherServices","tipsOnStartBusinessProducts","communication","sms","address","addressLine","city","postCode","socialNetworks","linkedIn","facebook","twitter","instagram","connect","connector","didRequest","showSplashScreen","setShowSplashScreen","useSelector","shallowEqual","a","rootSaga","rootReducer","combineReducers","all","sagaMiddleware","createSagaMiddleware","middleware","getDefaultMiddleware","immutableCheck","serializableCheck","thunk","configureStore","devTools","enhancers","reduxBatch","persistor","persistStore","run","serializedState","isLogged","loadState","I18N_CONFIG_KEY","REACT_APP_I18N_CONFIG_KEY","selectedLang","I18nContext","MetronicI18nProvider","lang","getConfig","allMessages","de","en","es","fr","ja","zh","I18nProvider","locale","messages","Toolbar1","Toolbar","ScrollTop","isFirstRun","reInitialization","stickyHeader","updateHeaderSticky","MasterInit","MasterLayout","AsideDefault","Content","Footer","validcoderegex","breadCrumb","GlobalFilter","setValue","setError","InitialLoading","setInitialLoading","handleErros","groupCode","pakages","AllLayout","sector","fK_SectorCode","AllAlerts","Dashboard","TagConfig","inputReference","useQuill","quill","quillRef","clipboard","dangerouslyPasteHTML","delta","oldDelta","source","hm","innerHTML","onkeyPress","fontStyle","rows","cols","Index","seX","setY","setItems","inputRef","currEditObject","setcurrEditObject","setFile","uploading","setUploading","isLoading","commentBox","setCommentBox","setFileName","isImageChanged","group","packages","newitem","uuidv4","luminosity","duplicate","copyItem","onSave","layoutTemp","editorData","onKeyPress","which","file","cb","onerror","getBase64","addCircle","addRectangle","addLine","fromx","fromy","tox","toy","atan2","points","pline","fabric","Polyline","opacity","originX","originY","selectable","renderAll","drawArrow","accept","FormData","onUploadProgress","loaded","Image","fromURL","oImg","hidden","for","updateText","addText","deleteSelected","borderStyle","newArr","updatePos","openOp","vl","Alert","setNotification","job","setJobs","setFacility","comment","validationRules","getNotificationType","getSheduleJobs","getfacility","getFormDetails","spread","getFormDetailsResponse","getnotifications","getJobs","fK_Layout","fK_NotificationCode","fK_SheduleJobCode","createdBy","resolvedBy","resolvedOn","closedBy","closedOn","AllGroups","NewLayout","setCode","copy","setCopy","copyMessage","setCopyMessage","copyMessageStatus","setCopyMessageStatus","orginalPacket","setOrginalPacket","clonePacket","setClonePacket","globalCss","onCopied","orginal","handleChange2","handleChangeOrginalPacket","handleChangeClonePacket","checked","Design","ObjectViewer","DisplayName","setDisplayName","Hub","setHub","filterList","setfilterList","pk","includes","HubFilter","Filter","LoadingSentrum","SectorManager","subSectors","IsRefesh","isExpired","newObjectArray","FacilityManager","detail","facilities","itemCount","FactoriesManager","CICL_Critical","CICL_Warning","CICL_Alert","CICL_AllConnect","CICL_Connect","BusinessUnitManager","factoryCode","businessUnits","factory","businessUnitModels","fK_SubSectorCode","fK_Factory","subsector","BusinessUnitDetailManager","units","packet","IsDataReceived","datapacket","Code","BusinessUnitDetailManager2","Smartgas1","GasInfo","setGasInfo","selected","setSelected","GasData","high","createBrowserHistory","PrivateRoutes","FactoryDetail","FactoryDetail2","SmartGas1","AlertMgt","Factory","Factories","Sector","Error500","Error404","ErrorsPage","DetailDashboard","ViewAll","Routes","App","basename","fallback","Chart","registerables","ReactDOM","textStyle_","K_SCALE_NORMAL","MapMarker","_onShowBallonStateChange","alive","onShowBallonStateChange","_onHoverStateChange","onHoverStateChange","_onMouseEnterContent","$onMouseAllow","_onMouseLeaveContent","_onCloseClick","onCloseClick","$hover","showBallon","hoveredAtTable","markerWidth","markerOffset","markerHolderStyle","origin","getMarkerHolderStyle","markerStyle","sizeOriginX","sizeOriginY","willChange","backgroundSize","backgroundRepeat","WebkitTransition","WebkitTransformOrigin","getMarkerStyle","zIndexStyle","textStyle","markerTextStyle","colorHex","colorHTML","calcMarkerTextStyle","showHint","hoverState","showBallonState","mapWidth","$geoService","getWidth","markerDim","$getDimensions","$dimensionKey","hintBaloonHorizontalPosStyle","K_BALLOON_WIDTH","leftX","rightX","mapOffset","getHintBaloonHorizontalPosStyle","hintBaloonVerticalPosClass","hintBalloonBottomOffsetClass","K_HINT_ARROW_WIDTH","noTransClass","noTransBalloonClass","imageClass","image","styleMarkerMarker","imageStyle","contrast","WebkitTransform","WebkitFilter","calcMarkerMarkerStyle","hintType","withText","onMouseEnter","onMouseLeave","prevProps","Loading","marginRight","AsideMenuItemWithSub","fontIcon","hasBullet","AsideMenuItem","active","AsideMenuMain","useIntl","index3","itm1","AsideMenu","asideMenuCSSClasses","scrollRef","ErrorMessage","HeaderUserMenu","lastName","appName","framework","dbName","dbType","nameOnCard","cardNumber","cardExpiryMonth","cardExpiryYear","cardCvv"],"mappings":"iSAcMA,EAAoE,eAsBnE,SAASC,IACd,MAAO,CACLC,OAAQ,GACRC,gBAAiB,GACjBC,aAAc,GACdC,WAAY,GACZC,MAAO,GACPC,UAAW,GACXC,YAAa,GACbC,QAAS,GACTC,iBAAkB,GAClBC,QAAS,GACTC,iBAAkB,GAClBC,gBAAiB,GACjBC,QAAS,GACTC,UAAW,IAIR,SAASC,IACd,MAAO,CACLT,UAAW,IAAIU,IACfb,aAAc,IAAIa,IAClBZ,WAAY,IAAIY,IAChBd,gBAAiB,IAAIc,IACrBF,UAAW,IAAIE,KAIZ,SAASC,IACd,MAAO,CACLC,KAAM,IAAIF,KAIP,IAAMG,EAAb,mGAOE,WACEA,EAAYC,QA1CP,CACLnB,OAAQ,GACRC,gBAAiB,GACjBC,aAAc,GACdC,WAAY,GACZC,MAAO,GACPC,UAAW,GACXC,YAAa,GACbC,QAAS,GACTC,iBAAkB,GAClBC,QAAS,GACTC,iBAAkB,GAClBC,gBAAiB,GACjBC,QAAS,GACTC,UAAW,MAoBf,gCAWE,WACEK,EAAYE,WAAaC,OAAOC,OAAO,GAAIR,OAZ/C,8BAeE,WACEI,EAAYK,aAAeP,MAhB/B,wBAmBE,SAA0BQ,GAAwB,IAAD,QAC/CC,MAAMC,KAAKC,SAASV,KAAKG,YAAYQ,SAAQ,SAACC,GAC5CF,SAASV,KAAKa,gBAAgBD,E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,oCAAoCE,GAAG,YAAtD,SAEE,sBACEF,UAAS,UAAK/E,EAAQR,gBAAb,8EADX,UAIE,sBAAKuF,UAAU,+BAAf,UACE,uBAAMA,UAAU,0BAAhB,WAA2C,IAAIqM,MAAOgF,cAAtD,WACA,mBAAGlM,KAAK,8BAA8BnF,UAAU,mCAAhD,SACE,qBAAK1D,MAAO,GAAI+E,IAAI,oEAMV,SAAZ9G,GACA,oBAAIyF,UAAU,wDAAd,SACE,oBAAIA,UAAU,YAAd,SACE,mBAAGmF,KAAK,IAAInF,UAAU,sBAAtB,SAC8C,YAA3Cc,OAAOC,SAASC,SAASC,eAA+B,mCACvD,qBAAKI,IAAKC,YAAc,wBAAyBF,IAAI,SAAS9E,MAAO,qB,gCCnCvF,oFAOMq6C,EAAoB,SAAC,GAAkB,IAAhB7hC,EAAe,EAAfA,SACnB7Z,EAAY4E,cAAZ5E,QACF8F,EAAWL,cAKjB,OAJAC,qBAAU,WACRo1B,IAAgBuC,YACf,CAACv3B,IAGF,qBAAKb,GAAG,uBAAuBF,UAAWC,kBAAKhF,EAAQT,iBAAiB0G,KAAK,MAA7E,SAMG4T,O","file":"static/js/main.ddcb2692.chunk.js","sourcesContent":["import {\r\n IAside,\r\n IContent,\r\n IFooter,\r\n IHeader,\r\n IToolbar,\r\n ILayout,\r\n ILayoutCSSClasses,\r\n ILayoutHTMLAttributes,\r\n ILayoutCSSVariables,\r\n IPageTitle,\r\n} from './LayoutModels'\r\nimport {DefaultLayoutConfig} from './DefaultLayoutConfig'\r\n\r\nconst LAYOUT_CONFIG_KEY = process.env.REACT_APP_BASE_LAYOUT_CONFIG_KEY || 'LayoutConfig'\r\n\r\nexport function getLayout(): ILayout {\r\n const ls = localStorage.getItem(LAYOUT_CONFIG_KEY)\r\n if (ls) {\r\n try {\r\n return JSON.parse(ls) as ILayout\r\n } catch (er) {\r\n console.error(er)\r\n }\r\n }\r\n return DefaultLayoutConfig\r\n}\r\n\r\nfunction setLayout(config: ILayout): void {\r\n try {\r\n localStorage.setItem(LAYOUT_CONFIG_KEY, JSON.stringify(config))\r\n } catch (er) {\r\n console.error(er)\r\n }\r\n}\r\n\r\nexport function getEmptyCssClasses() {\r\n return {\r\n header: [],\r\n headerContainer: [],\r\n headerMobile: [],\r\n headerMenu: [],\r\n aside: [],\r\n asideMenu: [],\r\n asideToggle: [],\r\n toolbar: [],\r\n toolbarContainer: [],\r\n content: [],\r\n contentContainer: [],\r\n footerContainer: [],\r\n sidebar: [],\r\n pageTitle: [],\r\n }\r\n}\r\n\r\nexport function getEmptyHTMLAttributes() {\r\n return {\r\n asideMenu: new Map(),\r\n headerMobile: new Map(),\r\n headerMenu: new Map(),\r\n headerContainer: new Map(),\r\n pageTitle: new Map(),\r\n }\r\n}\r\n\r\nexport function getEmptyCSSVariables() {\r\n return {\r\n body: new Map(),\r\n }\r\n}\r\n\r\nexport class LayoutSetup {\r\n public static isLoaded: boolean = false\r\n public static config: ILayout = getLayout()\r\n public static classes: ILayoutCSSClasses = getEmptyCssClasses()\r\n public static attributes: ILayoutHTMLAttributes = getEmptyHTMLAttributes()\r\n public static cssVariables: ILayoutCSSVariables = getEmptyCSSVariables()\r\n\r\n private static initCSSClasses(): void {\r\n LayoutSetup.classes = getEmptyCssClasses()\r\n }\r\n\r\n private static initHTMLAttributes(): void {\r\n LayoutSetup.attributes = Object.assign({}, getEmptyHTMLAttributes())\r\n }\r\n\r\n private static initCSSVariables(): void {\r\n LayoutSetup.cssVariables = getEmptyCSSVariables()\r\n }\r\n\r\n private static initLayout(config: ILayout): void {\r\n Array.from(document.body.attributes).forEach((attr) => {\r\n document.body.removeAttribute(attr.name)\r\n })\r\n document.body.setAttribute('style', '')\r\n document.body.setAttribute('id', 'kt_body')\r\n if (config.main?.body?.backgroundImage) {\r\n document.body.style.backgroundImage = `url('${config.main.body.backgroundImage}')`\r\n }\r\n\r\n if (config.main?.body?.class) {\r\n document.body.classList.add(config.main.body.class)\r\n }\r\n\r\n // if (config.loader.display) {\r\n // document.body.classList.add('page-loading')\r\n // document.body.classList.add('page-loading-enabled')\r\n // }\r\n }\r\n\r\n private static initHeader(config: IHeader): void {\r\n LayoutSetup.classes.headerContainer.push(\r\n config.width === 'fluid' ? 'container-fluid' : 'container'\r\n )\r\n\r\n if (config.fixed.desktop) {\r\n document.body.classList.add('header-fixed')\r\n }\r\n\r\n if (config.fixed.tabletAndMobile) {\r\n document.body.classList.add('header-tablet-and-mobile-fixed')\r\n }\r\n }\r\n\r\n private static initToolbar(config: IToolbar): void {\r\n if (!config.display) {\r\n return\r\n }\r\n\r\n document.body.classList.add('toolbar-enabled')\r\n LayoutSetup.classes.toolbarContainer.push(\r\n config.width === 'fluid' ? 'container-fluid' : 'container'\r\n )\r\n\r\n if (config.fixed.desktop) {\r\n document.body.classList.add('toolbar-fixed')\r\n }\r\n\r\n if (config.fixed.tabletAndMobileMode) {\r\n document.body.classList.add('toolbar-tablet-and-mobile-fixed')\r\n }\r\n\r\n // Height setup\r\n const type = config.layout\r\n const typeOptions = config.layouts[type]\r\n if (typeOptions) {\r\n let bodyStyles: string = ''\r\n if (typeOptions.height) {\r\n bodyStyles += ` --kt-toolbar-height: ${typeOptions.height};`\r\n }\r\n\r\n if (typeOptions.heightAndTabletMobileMode) {\r\n bodyStyles += ` --kt-toolbar-height-tablet-and-mobile: ${typeOptions.heightAndTabletMobileMode};`\r\n }\r\n document.body.setAttribute('style', bodyStyles)\r\n }\r\n }\r\n\r\n private static initPageTitle(config: IPageTitle): void {\r\n if (!config.display) {\r\n return\r\n }\r\n\r\n if (config.direction === 'column') {\r\n this.classes.pageTitle.push('flex-column')\r\n this.classes.pageTitle.push('align-items-start')\r\n } else {\r\n this.classes.pageTitle.push('align-items-center')\r\n this.classes.pageTitle.push('flex-wrap')\r\n }\r\n this.classes.pageTitle.push('me-3')\r\n\r\n if (config.responsive) {\r\n this.classes.pageTitle.push('mb-5')\r\n this.classes.pageTitle.push('mb-lg-0')\r\n\r\n LayoutSetup.attributes.pageTitle.set('data-kt-swapper', true)\r\n LayoutSetup.attributes.pageTitle.set('data-kt-swapper-mode', 'prepend')\r\n LayoutSetup.attributes.pageTitle.set(\r\n 'data-kt-swapper-parent',\r\n `{ default: '#kt_content_container', '${config.responsiveBreakpoint}': '${config.responsiveTarget}'}`\r\n )\r\n }\r\n }\r\n\r\n private static initContent(config: IContent): void {\r\n LayoutSetup.classes.contentContainer.push(\r\n config.width === 'fluid' ? 'container-fluid' : 'container'\r\n )\r\n // if (Theme::getOption('layout', 'content/container-class')) {\r\n // \tTheme::addHtmlClass('content-container', Theme::getOption('layout', 'content/container-class'));\r\n // }\r\n }\r\n\r\n private static initAside(config: IAside): void {\r\n // Check if aside is displayed\r\n if (!config.display) {\r\n return\r\n }\r\n\r\n // Enable Aside\r\n document.body.classList.add('aside-enabled')\r\n LayoutSetup.classes.aside.push(`aside-${config.theme}`)\r\n\r\n // Fixed Aside\r\n if (config.fixed) {\r\n document.body.classList.add('aside-fixed')\r\n }\r\n\r\n // Default minimized\r\n if (config.minimized) {\r\n document.body.setAttribute('data-kt-aside-minimize', 'on')\r\n }\r\n\r\n // Hoverable on minimize\r\n if (config.hoverable) {\r\n LayoutSetup.classes.aside.push('aside-hoverable')\r\n }\r\n }\r\n\r\n private static initAsideMenu(config: IAside): void {\r\n // if (Theme::getOption('layout', 'aside/menu') === 'documentation') {\r\n // \tself::$menu = new Menu( Theme::getOption('menu', 'documentation'), Theme::getPagePath() );\r\n // } else {\r\n // \tself::$menu = new Menu( Theme::getOption('menu', 'main'), Theme::getPagePath() );\r\n // }\r\n // if (Theme::getOption('layout', 'aside/menu-icons-display') === false) {\r\n // \tself::$menu->displayIcons(false);\r\n // }\r\n // self::$menu->setIconType(Theme::getOption('layout', 'aside/menu-icon'));\r\n }\r\n\r\n // private static initSidebar(sidebarConfig: ISidebarConfig): void {\r\n // // / Set Sidebar enabled class\r\n // if (sidebarConfig.display) {\r\n // document.body.classList.add('sidebar-enabled')\r\n // } else {\r\n // return\r\n // }\r\n\r\n // // Set Sidebar shown status\r\n // if (sidebarConfig.shown) {\r\n // document.body.setAttribute('data-sidebar', 'on')\r\n // }\r\n\r\n // // Set Sidebar background color class\r\n // ThemeSetup.classes.sidebar.push(sidebarConfig.bgColor)\r\n // }\r\n\r\n private static initFooter(config: IFooter): void {\r\n LayoutSetup.classes.footerContainer.push(`container${config.width === 'fluid' ? '-fluid' : ''}`)\r\n }\r\n\r\n private static initConfig(config: ILayout): void {\r\n if (config.main?.darkSkinEnabled) {\r\n document.body.classList.add('dark-skin')\r\n }\r\n\r\n // Init layout\r\n LayoutSetup.initLayout(config)\r\n if (config.main?.type !== 'default') {\r\n return\r\n }\r\n\r\n LayoutSetup.initHeader(config.header)\r\n LayoutSetup.initPageTitle(config.pageTitle as IPageTitle)\r\n LayoutSetup.initToolbar(config.toolbar)\r\n LayoutSetup.initContent(config.content)\r\n LayoutSetup.initAside(config.aside)\r\n LayoutSetup.initFooter(config.footer)\r\n LayoutSetup.initAsideMenu(config.aside)\r\n }\r\n\r\n public static updatePartialConfig(fieldsToUpdate: Partial): ILayout {\r\n const config = LayoutSetup.config\r\n const updatedConfig = {...config, ...fieldsToUpdate}\r\n LayoutSetup.initCSSClasses()\r\n LayoutSetup.initCSSVariables()\r\n LayoutSetup.initHTMLAttributes()\r\n LayoutSetup.isLoaded = false\r\n LayoutSetup.config = updatedConfig\r\n LayoutSetup.initConfig(Object.assign({}, updatedConfig))\r\n LayoutSetup.isLoaded = true // remove loading there\r\n return updatedConfig\r\n }\r\n\r\n public static setConfig(config: ILayout): void {\r\n setLayout(config)\r\n }\r\n\r\n public static bootstrap = (() => {\r\n LayoutSetup.updatePartialConfig(LayoutSetup.config)\r\n })()\r\n}\r\n","import clsx from 'clsx'\r\nimport React, { FC } from 'react'\r\nimport { KTSVG, toAbsoluteUrl } from '../../../helpers'\r\nimport { HeaderNotificationsMenu, HeaderUserMenu, QuickLinks } from '../../../partials'\r\nimport { useLayout } from '../../core'\r\nimport { useDataLayerValue } from '../../../../DataLayer'\r\n\r\nconst toolbarButtonMarginClass = 'ms-1 ms-lg-3',\r\n toolbarButtonHeightClass = 'w-30px h-30px w-md-40px h-md-40px',\r\n toolbarUserAvatarHeightClass = 'symbol-30px symbol-md-40px',\r\n toolbarButtonIconSizeClass = 'svg-icon-1'\r\n\r\nconst Topbar: FC = () => {\r\n const { config } = useLayout()\r\n const [{ user }, dispatch] = useDataLayerValue()\r\n\r\n return (\r\n
\r\n {/* Search\r\n
\r\n \r\n
*/}\r\n {/* Activities\r\n
\r\n \r\n \r\n
\r\n
\r\n */}\r\n {/* Quick links\r\n
\r\n \r\n \r\n
\r\n \r\n */}\r\n\r\n {/* CHAT \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n */}\r\n {/* NOTIFICATIONS \r\n
\r\n \r\n \r\n
\r\n \r\n */}\r\n\r\n {/* begin::User */}\r\n \r\n \r\n {user?.firstName[0] ?? \"T\"}\r\n \r\n \r\n\r\n \r\n\r\n {/* end::User */}\r\n\r\n {/* begin::Aside Toggler */}\r\n {config.header.left === 'menu' && (\r\n
\r\n \r\n \r\n
\r\n \r\n )}\r\n \r\n )\r\n}\r\nexport { Topbar }\r\n","/* eslint-disable react-hooks/exhaustive-deps */\r\nimport clsx from 'clsx'\r\nimport React, { useEffect } from 'react'\r\nimport { Link, useLocation } from 'react-router-dom'\r\nimport { MenuComponent } from '../../../assets/ts/components'\r\nimport { KTSVG, toAbsoluteUrl } from '../../../helpers'\r\nimport { useLayout } from '../../core'\r\nimport { Header } from './Header'\r\nimport { DefaultTitle } from './page-title/DefaultTitle'\r\nimport { Topbar } from './Topbar'\r\n\r\nexport function HeaderWrapper() {\r\n const { pathname } = useLocation()\r\n const { config, classes, attributes } = useLayout()\r\n const { header, aside } = config\r\n\r\n useEffect(() => {\r\n MenuComponent.reinitialization()\r\n }, [pathname])\r\n\r\n var content = 'INDUSTRYX'\r\n if (window.location.hostname.toLowerCase() === 'e2eq.lk') {\r\n content = 'E2EQ'\r\n }\r\n if (window.location.hostname.toLowerCase() === 'portal.smartgas.biz') {\r\n content = 'SMARTGAS'\r\n }\r\n\r\n\r\n\r\n return (\r\n \r\n \r\n {/* begin::Aside mobile toggle */}\r\n {aside.display && (\r\n
\r\n \r\n \r\n
\r\n \r\n )}\r\n {/* end::Aside mobile toggle */}\r\n {/* begin::Logo */}\r\n {!aside.display && (\r\n
\r\n \r\n Logo\r\n \r\n
\r\n )}\r\n {/* end::Logo */}\r\n\r\n\r\n
\r\n {content === 'INDUSTRYX' && (\r\n \r\n )}\r\n\r\n {content === 'E2EQ' && (\r\n\r\n header\r\n )}\r\n {content === 'SMARTGAS' && (\r\n\r\n header\r\n )}\r\n\r\n
\r\n\r\n\r\n {/* begin::Wrapper */}\r\n
\r\n\r\n {header.left === 'menu' && (\r\n
\r\n {/*
*/}\r\n
\r\n )}\r\n\r\n\r\n {header.left === 'page-title' && (\r\n
\r\n \r\n
\r\n )}\r\n\r\n
\r\n \r\n
\r\n
\r\n {/* end::Wrapper */}\r\n \r\n \r\n )\r\n}\r\n","import React, {useState, useEffect, useRef, PureComponent} from 'react'\r\nimport {\r\n PieChart,\r\n Pie,\r\n LineChart,\r\n BarChart,\r\n Bar,\r\n AreaChart,\r\n Label,\r\n Area,\r\n Line,\r\n XAxis,\r\n YAxis,\r\n CartesianGrid,\r\n Tooltip,\r\n Legend,\r\n Cell,\r\n ResponsiveContainer,\r\n} from 'recharts'\r\nimport parse from 'html-react-parser'\r\nimport ChartJ from './chart/Chartj'\r\n\r\nimport './../../../../_metronic/assets/sass/kntdashbaord.css'\r\nimport Draggable from 'react-draggable'\r\nimport Popup from 'reactjs-popup'\r\nimport 'reactjs-popup/dist/index.css'\r\nimport Chart from './chart/Chart'\r\nvar randomColor = require('randomcolor')\r\n\r\nfunction SensorArea(props) {\r\n const RADIAN = Math.PI / 180\r\n const Gradients = (item) => {\r\n var lines = []\r\n if (item.lines !== undefined && item.lines.length > 0) {\r\n for (let index = 0; index < item.lines.length; index++) {\r\n const element = item.lines[index]\r\n lines.push(\r\n \r\n \r\n \r\n \r\n )\r\n }\r\n }\r\n return lines\r\n }\r\n\r\n const Article = (item, LineCode) => {\r\n var lines = []\r\n if (item.lines !== undefined && item.lines.length > 0) {\r\n for (let index = 0; index < item.lines.length; index++) {\r\n const element = item.lines[index]\r\n switch (element?.Line ?? LineCode) {\r\n case 'Line':\r\n lines.push(\r\n \r\n )\r\n break\r\n case 'Area':\r\n lines.push(\r\n \r\n )\r\n break\r\n case 'Bar':\r\n lines.push(\r\n \r\n )\r\n break\r\n case 'Pie':\r\n lines.push(\r\n \r\n )\r\n break\r\n default:\r\n lines.push(\r\n \r\n )\r\n break\r\n }\r\n }\r\n }\r\n return lines\r\n }\r\n\r\n const htmlDecode = (input) => {\r\n var e = document.createElement('div')\r\n e.innerHTML = input\r\n return e.childNodes.length === 0 ? '' : e.childNodes[0].nodeValue\r\n }\r\n\r\n const renderCustomizedLabel = ({cx, cy, midAngle, innerRadius, outerRadius, percent, index}) => {\r\n const radius = innerRadius + (outerRadius - innerRadius) * 0.5\r\n const x = cx + radius * Math.cos(-midAngle * RADIAN)\r\n const y = cy + radius * Math.sin(-midAngle * RADIAN)\r\n\r\n return (\r\n cx ? 'start' : 'end'}\r\n dominantBaseline='central'\r\n >\r\n {`${(percent * 100).toFixed(0)}%`}\r\n \r\n )\r\n }\r\n\r\n /*try {\r\n // console.log(\"CODE\"+props.layout.globalJs)\r\n eval(props.layout.globalJs)\r\n } catch (error) {\r\n // console.log(\"E\"+error);\r\n }*/\r\n\r\n return (\r\n <>\r\n {props.state.SensorList.map((item, index) => {\r\n if (item.note === '


') {\r\n item.note = ''\r\n }\r\n\r\n return (\r\n <>\r\n false}>\r\n
\r\n \r\n {(item.type == 11 || item.type == 12) && item.displayName !== '' && (\r\n \r\n )}\r\n \r\n \r\n )}\r\n \r\n \r\n \r\n
\r\n )}\r\n\r\n {(item.type == 11 || item.type == 12) && item.displayName === '' && (\r\n
\r\n \r\n \r\n \r\n \r\n {' '}\r\n {item.value}\r\n \r\n {item.note === '' && (\r\n <>\r\n {item.icon === 'dot' && (\r\n \r\n )}\r\n {item.icon !== '' && item.icon !== 'dot' && (\r\n \r\n )}\r\n {item.isNotify === true && (\r\n \r\n {' '}\r\n \r\n )}\r\n \r\n )}\r\n\r\n {item.note !== '' && (\r\n <>\r\n {item.icon === 'dot' && (\r\n \r\n )}\r\n {item.icon !== '' && item.icon !== 'dot' && (\r\n \r\n )}\r\n {item.isNotify === true && (\r\n \r\n {' '}\r\n \r\n )}\r\n \r\n }\r\n position='top left'\r\n modal\r\n >\r\n {(close) => (\r\n
\r\n Documentation\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 {item.type == 20 && (\r\n \r\n \r\n \r\n \r\n \r\n {'' + item.displayName}\r\n \r\n \r\n \r\n \r\n {' '}\r\n {'' + item.value}\r\n \r\n \r\n \r\n {item.note === '' && (\r\n <>\r\n {item.icon === 'dot' && (\r\n <>\r\n \r\n {item.isNotify === true && (\r\n \r\n {' '}\r\n \r\n )}\r\n \r\n )}\r\n\r\n {item.icon !== '' && item.icon !== 'dot' && (\r\n <>\r\n \r\n {item.isNotify === true && (\r\n \r\n {' '}\r\n \r\n )}\r\n \r\n )}\r\n \r\n )}\r\n {item.note !== '' && (\r\n <>\r\n {item.isNotify === true && (\r\n \r\n {' '}\r\n \r\n )}\r\n {item.icon === 'dot' && (\r\n \r\n )}\r\n {item.icon !== '' && item.icon !== 'dot' && (\r\n \r\n )}\r\n \r\n }\r\n position='top left'\r\n modal\r\n >\r\n {(close) => (\r\n
\r\n Documentation\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 {item.type == 19 && (\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {item.type == 10 && (\r\n
\r\n \r\n {' '}\r\n {item.displayName}{' '}\r\n \r\n {item.icon === 'dot' && (\r\n <>\r\n \r\n {item.isNotify === true && (\r\n \r\n {' '}\r\n \r\n )}\r\n \r\n )}\r\n\r\n {item.icon !== '' && item.icon !== 'dot' && (\r\n <>\r\n \r\n {item.isNotify === true && (\r\n \r\n {' '}\r\n \r\n )}\r\n \r\n )}\r\n
\r\n )}\r\n\r\n {item.type == 14 && (\r\n
\r\n \r\n {Gradients(item)}\r\n {item.isEnableCartesianGrid && }\r\n \r\n \r\n \r\n \r\n\r\n {Article(item, 'Area')}\r\n {item.isLegend && (\r\n \r\n )}\r\n {item.isTooltip && }\r\n \r\n
\r\n )}\r\n\r\n {item.type == 13 && (\r\n
\r\n \r\n {item.isEnableCartesianGrid && }\r\n \r\n \r\n \r\n \r\n {item.isLegend && (\r\n \r\n )}\r\n\r\n {item.isTooltip && }\r\n {Article(item, 'Line')}\r\n \r\n
\r\n )}\r\n\r\n {item.type == 26 && (\r\n
\r\n <>\r\n \r\n \r\n
\r\n )}\r\n\r\n {item.type == 17 && (\r\n
\r\n \r\n \r\n {Article(item, 'Pie')}\r\n \r\n {item.isLegend && (\r\n \r\n )}\r\n \r\n
\r\n )}\r\n\r\n {item.type == 15 && (\r\n
\r\n \r\n {item.isEnableCartesianGrid && }\r\n \r\n \r\n \r\n \r\n\r\n {item.isLegend && (\r\n \r\n )}\r\n {item.isTooltip && }\r\n {Article(item, 'Bar')}\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 SensorArea\r\n//https://codesandbox.io/s/k2ds4?file=/src/App.js:128-4341\r\n","import React, {useState, useEffect, useRef} from 'react'\r\nimport './../../../../_metronic/assets/sass/kntdashbaord.css'\r\nimport {HubConnectionBuilder, JsonHubProtocol} from '@microsoft/signalr'\r\nimport axios from 'axios'\r\nimport {PageLink, PageTitle} from '../../../../_metronic/layout/core'\r\nimport useWindowDimensions from '../../helpers/WindowDimension'\r\nimport Dictionary from '../../helpers/Dictionary'\r\nimport {KTSVG, toAbsoluteUrl} from '../../../../_metronic/helpers'\r\nimport {Dropdown1} from '../../../../_metronic/partials'\r\nimport {AsideDefault} from '../../../../_metronic/layout/components/aside/AsideDefault'\r\nimport {Footer} from '../../../../_metronic/layout/components/Footer'\r\nimport {HeaderWrapper} from '../../../../_metronic/layout/components/header/HeaderWrapper'\r\nimport {PageDataProvider} from '../../../../_metronic/layout/core'\r\nimport {Content} from '../../../../_metronic/layout/components/Content'\r\nimport {\r\n ChartsWidget1,\r\n TablesWidget1,\r\n ListsWidget5,\r\n TablesWidget5,\r\n} from '../../../../_metronic/partials/widgets'\r\nimport {stat} from 'fs'\r\nimport Confetti from 'react-confetti'\r\nimport ImageMapper from 'react-image-mapper'\r\nimport Draggable from 'react-draggable'\r\nimport {v4 as uuidv4} from 'uuid'\r\nimport Popup from 'reactjs-popup'\r\nimport Chart from './chart/Chart'\r\nimport SensorArea from './SensorArea'\r\nimport 'reactjs-popup/dist/index.css'\r\nimport {auto, hide, right} from '@popperjs/core'\r\nimport {ToastContainer, toast, Slide, Zoom, Flip, Bounce} from 'react-toastify'\r\nimport ChartJ from './chart/Chartj'\r\nimport {FabricJSCanvas, useFabricJSEditor} from 'fabricjs-react'\r\nimport {fabric} from 'fabric'\r\nimport Map from './Map'\r\n\r\nimport 'react-toastify/dist/ReactToastify.css'\r\nvar randomColor = require('randomcolor')\r\n\r\nfunction Display(props) {\r\n const [connection, setConnection] = useState(null)\r\n const reconnectRef = useRef(0)\r\n const urlParams = new URLSearchParams(window.location.search)\r\n const [isloading, setLoading] = useState(true)\r\n const [item, setItem] = useState('')\r\n const [SensorList, setsensorList] = useState([])\r\n const sensors = useRef([])\r\n const {selectedObjects, setSelectedObject, editor, onReady} = useFabricJSEditor({\r\n defaultStrokeColor: 'red',\r\n selection: false,\r\n })\r\n const [text, setText] = useState('')\r\n const [strokeColor, setStrokeColor] = useState('')\r\n const [fillColor, setFillColor] = useState('')\r\n const [isload, setisload] = useState(true)\r\n\r\n //editor?.addRectangle({ fill: \"red\", stroke: \"blue\" });\r\n /*selectedObjects[0]?.set({\r\n fill: \"red\",\r\n stroke: \"blue\",\r\n /* //Movement:\r\n lockMovementX : true,\r\n lockMovementY : true,\r\n \r\n //Scaling:\r\n lockScalingX : true,\r\n lockScalingY : true,\r\n \r\n // Rotation:\r\n lockRotation : true,\r\n \r\n // Object's frame/bounidngBox:\r\n hasControls : false,\r\n hasBorders : false,\r\n //left: selectedObjects[0].left + 100,\r\n });\r\n \r\n setTimeout(() => {\r\n if(isload){\r\n const data = JSON.parse(\r\n '{\"version\":\"4.3.1\",\"objects\":[{\"type\":\"circle\",\"version\":\"4.3.1\",\"originX\":\"left\",\"originY\":\"top\",\"left\":100,\"top\":100,\"width\":40,\"height\":40,\"fill\":\"rgba(255, 255, 255, 0.0)\",\"stroke\":\"#000000\",\"strokeWidth\":1,\"strokeDashArray\":null,\"strokeLineCap\":\"butt\",\"strokeDashOffset\":0,\"strokeLineJoin\":\"miter\",\"strokeUniform\":false,\"strokeMiterLimit\":4,\"scaleX\":1,\"scaleY\":1,\"angle\":0,\"flipX\":false,\"flipY\":false,\"opacity\":1,\"shadow\":null,\"visible\":true,\"backgroundColor\":\"\",\"fillRule\":\"nonzero\",\"paintFirst\":\"fill\",\"globalCompositeOperation\":\"source-over\",\"skewX\":0,\"skewY\":0,\"radius\":20,\"startAngle\":0,\"endAngle\":6.283185307179586},{\"type\":\"text\",\"version\":\"4.3.1\",\"originX\":\"left\",\"originY\":\"top\",\"left\":253,\"top\":102,\"width\":95.55,\"height\":18.08,\"fill\":\"#000000\",\"stroke\":null,\"strokeWidth\":1,\"strokeDashArray\":null,\"strokeLineCap\":\"butt\",\"strokeDashOffset\":0,\"strokeLineJoin\":\"miter\",\"strokeUniform\":false,\"strokeMiterLimit\":4,\"scaleX\":2.43,\"scaleY\":2.43,\"angle\":0,\"flipX\":false,\"flipY\":false,\"opacity\":1,\"shadow\":null,\"visible\":true,\"backgroundColor\":\"\",\"fillRule\":\"nonzero\",\"paintFirst\":\"fill\",\"globalCompositeOperation\":\"source-over\",\"skewX\":0,\"skewY\":0,\"text\":\"Some text\",\"fontSize\":16,\"fontWeight\":\"normal\",\"fontFamily\":\"Arial\",\"fontStyle\":\"normal\",\"lineHeight\":1.16,\"underline\":false,\"overline\":false,\"linethrough\":false,\"textAlign\":\"left\",\"textBackgroundColor\":\"\",\"charSpacing\":0,\"minWidth\":20,\"splitByGrapheme\":false,\"styles\":{}},{\"type\":\"rect\",\"lockMovementX\":\"True\",\"version\":\"4.3.1\",\"originX\":\"left\",\"originY\":\"top\",\"left\":109,\"top\":212,\"width\":40,\"height\":40,\"fill\":\"rgba(255, 255, 255, 0.0)\",\"stroke\":\"#000000\",\"strokeWidth\":1,\"strokeDashArray\":null,\"strokeLineCap\":\"butt\",\"strokeDashOffset\":0,\"strokeLineJoin\":\"miter\",\"strokeUniform\":false,\"strokeMiterLimit\":4,\"scaleX\":1,\"scaleY\":1,\"angle\":0,\"flipX\":false,\"flipY\":false,\"opacity\":1,\"shadow\":null,\"visible\":true,\"backgroundColor\":\"\",\"fillRule\":\"nonzero\",\"paintFirst\":\"fill\",\"globalCompositeOperation\":\"source-over\",\"skewX\":0,\"skewY\":0,\"rx\":0,\"ry\":0},{\"type\":\"image\",\"version\":\"4.3.1\",\"originX\":\"left\",\"originY\":\"top\",\"left\":499,\"top\":86,\"width\":1200,\"height\":900,\"fill\":\"rgb(0,0,0)\",\"stroke\":null,\"strokeWidth\":0,\"strokeDashArray\":null,\"strokeLineCap\":\"butt\",\"strokeDashOffset\":0,\"strokeLineJoin\":\"miter\",\"strokeUniform\":false,\"strokeMiterLimit\":4,\"scaleX\":0.2,\"scaleY\":0.2,\"angle\":0,\"flipX\":false,\"flipY\":false,\"opacity\":1,\"shadow\":null,\"visible\":true,\"backgroundColor\":\"\",\"fillRule\":\"nonzero\",\"paintFirst\":\"fill\",\"globalCompositeOperation\":\"source-over\",\"skewX\":0,\"skewY\":0,\"cropX\":0,\"cropY\":0,\"src\":\"https://miro.medium.com/max/1200/1*mk1-6aYaf_Bes1E3Imhc0A.jpeg\",\"crossOrigin\":null,\"filters\":[]},{\"type\":\"polyline\",\"version\":\"4.3.1\",\"originX\":\"left\",\"originY\":\"top\",\"left\":483.78,\"top\":339.22,\"width\":50.88,\"height\":50.88,\"fill\":\"white\",\"stroke\":\"black\",\"strokeWidth\":2,\"strokeDashArray\":null,\"strokeLineCap\":\"butt\",\"strokeDashOffset\":0,\"strokeLineJoin\":\"miter\",\"strokeUniform\":false,\"strokeMiterLimit\":4,\"scaleX\":1,\"scaleY\":1,\"angle\":262.52,\"flipX\":false,\"flipY\":false,\"opacity\":1,\"shadow\":null,\"visible\":true,\"backgroundColor\":\"\",\"fillRule\":\"nonzero\",\"paintFirst\":\"fill\",\"globalCompositeOperation\":\"source-over\",\"skewX\":0,\"skewY\":0,\"points\":[{\"x\":100,\"y\":100},{\"x\":99.11611652351681,\"y\":100.88388347648318},{\"x\":145.58058261758407,\"y\":147.34834957055045},{\"x\":142.92893218813452,\"y\":150},{\"x\":150,\"y\":150},{\"x\":150,\"y\":142.92893218813452},{\"x\":147.34834957055045,\"y\":145.58058261758407},{\"x\":100.88388347648318,\"y\":99.11611652351681},{\"x\":100,\"y\":100}]},{\"type\":\"image\",\"version\":\"4.3.1\",\"originX\":\"left\",\"originY\":\"top\",\"left\":197,\"top\":132,\"width\":1200,\"height\":900,\"fill\":\"rgb(0,0,0)\",\"stroke\":null,\"strokeWidth\":0,\"strokeDashArray\":null,\"strokeLineCap\":\"butt\",\"strokeDashOffset\":0,\"strokeLineJoin\":\"miter\",\"strokeUniform\":false,\"strokeMiterLimit\":4,\"scaleX\":0.2,\"scaleY\":0.2,\"angle\":0,\"flipX\":false,\"flipY\":false,\"opacity\":1,\"shadow\":null,\"visible\":true,\"backgroundColor\":\"\",\"fillRule\":\"nonzero\",\"paintFirst\":\"fill\",\"globalCompositeOperation\":\"source-over\",\"skewX\":0,\"skewY\":0,\"cropX\":0,\"cropY\":0,\"src\":\"https://miro.medium.com/max/1200/1*mk1-6aYaf_Bes1E3Imhc0A.jpeg\",\"crossOrigin\":null,\"filters\":[]}]}'\r\n );\r\n editor?.canvas.loadFromJSON(data);\r\n console.log(JSON.stringify(editor?.canvas))\r\n setisload(false);\r\n }\r\n }, 5000);\r\n \r\n */\r\n\r\n const [layout, setLayout] = useState({\r\n id: props.match?.params?.id ?? props.layout, //urlParams.get('id')??props.layout,\r\n layoutName: '',\r\n imageData: null,\r\n devices: [],\r\n isZoom: false,\r\n globalJs: '',\r\n category: '',\r\n designObject: [],\r\n breadCrumbs: [],\r\n })\r\n const [state, setState] = useState({\r\n Data: {},\r\n DashboardStat: 'CONNECTING',\r\n SensorList: [],\r\n })\r\n\r\n const hubService = process.env.REACT_APP_MIDAS_HUB //\"https://signalr.midassit.com\";\r\n\r\n useEffect(() => {\r\n if (connection) {\r\n connection\r\n .start()\r\n .then((result) => {\r\n setState({\r\n ...state,\r\n DashboardStat: 'CONNECTED',\r\n })\r\n setLoading(false)\r\n reconnectRef.current = 0\r\n //console.log('Connected!');\r\n connection.onreconnecting((error) => {\r\n setState({\r\n ...state,\r\n DashboardStat: 'RECONNECTING',\r\n })\r\n console.log('Connection lost due to error . Reconnecting.')\r\n })\r\n\r\n // Reconnect if hub disconnects\r\n connection.onclose(function (e) {\r\n setState({\r\n ...state,\r\n DashboardStat: 'DISCONNECTED',\r\n })\r\n //console.log('Disconnected');\r\n })\r\n\r\n connection.on('ReceiveMessage', (message) => {\r\n if (typeof message === 'string' || message instanceof String) {\r\n message = JSON.parse(message)\r\n }\r\n //console.log(message)\r\n if (message.key !== 'SensorData') return\r\n\r\n let dataPacket = JSON.parse(message.data)\r\n\r\n if (\r\n dataPacket.TimeStamp === undefined ||\r\n Math.round((new Date() - new Date(dataPacket.TimeStamp)) / 1000) > 10\r\n ) {\r\n return\r\n } else {\r\n if (dataPacket.Packet !== layout.id.replace('ly', '')) {\r\n return\r\n }\r\n\r\n console.log(message.data)\r\n let newElements = {}\r\n Object.entries(dataPacket).map(([key, value]) => {\r\n newElements[key] = value\r\n })\r\n\r\n Object.entries(dataPacket).map(([key, value]) => {\r\n for (let index = 0; index < sensors.current.length; index++) {\r\n const element = sensors.current[index]\r\n\r\n if (element.machineNo === '') continue\r\n\r\n if (element.displayName === '') element.displayName = ' '\r\n\r\n if (element.icon === undefined) element.icon = 'dot'\r\n\r\n if (\r\n element.isNotify === undefined ||\r\n element.isNotify === '' ||\r\n element.isNotify === null\r\n )\r\n element.isNotify = false\r\n\r\n if (!element.lastUpdate) {\r\n element.lastUpdate = new Date()\r\n } else if (Math.round((new Date() - new Date(element.lastUpdate)) / 1000) > 60) {\r\n if (\r\n element.type == 14 ||\r\n element.type == 13 ||\r\n element.type == 17 ||\r\n element.type == 15\r\n ) {\r\n console.log(\r\n '[chart data cleared ' + element.machineNo.toString().toLowerCase() + ']'\r\n )\r\n element.value = []\r\n } else {\r\n element.value = '---'\r\n element.color = 'black'\r\n }\r\n }\r\n\r\n let object = element.object.toString().toLowerCase()\r\n let packetType = dataPacket.Plant + '.' + dataPacket.Packet\r\n if (props?.object !== undefined && props?.object !== '') {\r\n object = props?.object.toString().toLowerCase()\r\n }\r\n console.log(element.machineNo + '==' + key + ' ---' + packetType + '==' + object)\r\n if (\r\n element.machineNo.toString().toLowerCase() === key.toString().toLowerCase() &&\r\n packetType.toString().toLowerCase() === object\r\n ) {\r\n element.lastUpdate = new Date()\r\n element.value = value\r\n element.color = 'black'\r\n element.notification = {\r\n toastId: key.toString().toLowerCase(),\r\n position: 'top-right',\r\n type: 'info',\r\n autoClose: false, // or set time\r\n hideProgressBar: false,\r\n closeOnClick: true,\r\n // pauseOnHover: true,\r\n draggable: false,\r\n progress: undefined,\r\n transition: Bounce,\r\n }\r\n console.log(element.machineNo + ' ---------Y-------> ' + value)\r\n try {\r\n // alert(layout.globalJs)\r\n eval(layout.globalJs + ';' + element.formula)\r\n // eval(element.formula)\r\n } catch (error) {\r\n element.value = '---'\r\n element.color = 'black'\r\n // console.log(element.formula)\r\n console.log(error)\r\n }\r\n }\r\n }\r\n })\r\n setState({\r\n ...state,\r\n SensorList: sensors.current,\r\n DashboardStat: 'CONNECTED',\r\n })\r\n }\r\n })\r\n })\r\n .catch((e) => {\r\n console.log('Connection failed: ', e)\r\n })\r\n }\r\n }, [connection])\r\n\r\n useEffect(() => {\r\n axios({\r\n method: 'get',\r\n url: process.env.REACT_APP_BACKEND_API + '/api/sensor-monitor/layout?layout=' + layout.id,\r\n headers: {},\r\n }).then((response) => {\r\n setLayout({\r\n ...layout,\r\n category: response.data?.result?.category ?? 'MAP',\r\n layoutName: response.data.result.layoutName,\r\n imageData: 'data:image/png;base64,' + response.data.result.imageData,\r\n isZoom: response.data.result.isZoom,\r\n globalJs: response.data.result.globalJs,\r\n designObject: response.data.result.designObject,\r\n breadCrumbs: response.data.result.breadCrumbs,\r\n })\r\n // alert(response.data.result.imageData)\r\n\r\n try {\r\n //console.log(response.data.result.globalJs)\r\n eval(response.data.result.globalJs)\r\n } catch (error) {\r\n console.log(error)\r\n }\r\n\r\n setState({\r\n ...state,\r\n SensorList: response.data.result.devices,\r\n })\r\n\r\n sensors.current = response.data.result.devices\r\n\r\n setTimeout(() => {\r\n for (let index = 0; index < sensors.current.length; index++) {\r\n const element = sensors.current[index]\r\n try {\r\n eval(layout.globalJs + ';' + element.tempFeild1)\r\n } catch (error) {\r\n console.log(error)\r\n }\r\n }\r\n setState({\r\n ...state,\r\n SensorList: sensors.current,\r\n DashboardStat: 'INITIALIZATION',\r\n })\r\n setTimeout(() => {\r\n const newConnection = new HubConnectionBuilder()\r\n .withUrl(hubService + '/' + response.data.result.hub + '/Hub')\r\n .withAutomaticReconnect()\r\n .build()\r\n setConnection(newConnection)\r\n }, 100)\r\n }, 500)\r\n })\r\n }, [])\r\n\r\n if (editor != undefined && isload && layout.designObject.length > 0) {\r\n var desginObject = {\r\n version: '4.3.1',\r\n objects: [],\r\n }\r\n for (let index = 0; index < layout.designObject.length; index++) {\r\n const element = layout.designObject[index]\r\n var ds = JSON.parse(element.tempFeild1)\r\n //Movement:\r\n ds.lockMovementX = true\r\n ds.lockMovementY = true\r\n\r\n //Scaling:\r\n ds.lockScalingX = true\r\n ds.lockScalingY = true\r\n\r\n // Rotation:\r\n ds.lockRotation = true\r\n\r\n // Object's frame/bounidngBox:\r\n ds.hasControls = false\r\n ds.hasBorders = false\r\n desginObject.objects.push(ds)\r\n }\r\n editor?.canvas.loadFromJSON(desginObject)\r\n\r\n setisload(false)\r\n }\r\n\r\n let bodyCss = {\r\n overflowX: 'hidden',\r\n }\r\n\r\n function hideAllNotification() {\r\n toast.dismissAll()\r\n }\r\n\r\n function hideNotification(notification) {\r\n toast.dismiss(notification.toastId)\r\n }\r\n\r\n function getTransactionType(transition) {\r\n switch (transition.toLowerCase()) {\r\n case 'flip':\r\n return Flip\r\n case 'slide':\r\n return Slide\r\n case 'zoom':\r\n return Zoom\r\n\r\n default:\r\n return Bounce\r\n }\r\n }\r\n function getType(type) {\r\n switch (type.toLowerCase()) {\r\n case 'info':\r\n return toast.TYPE.INFO\r\n case 'error':\r\n return toast.TYPE.ERROR\r\n case 'success':\r\n return toast.TYPE.SUCCESS\r\n case 'warning':\r\n return toast.TYPE.WARNING\r\n default:\r\n return toast.TYPE.INFO\r\n }\r\n }\r\n\r\n function showNotification(notification) {\r\n notification.transition = getTransactionType(notification.transition)\r\n if (toast.isActive(notification.toastId)) {\r\n notification.render = notification.message\r\n notification.type = getType(notification.type)\r\n toast.update(notification.toastId, notification)\r\n return\r\n }\r\n\r\n switch (notification.type) {\r\n case 'error':\r\n toast.error(notification.message, notification)\r\n break\r\n case 'info':\r\n toast.info(notification.message, notification)\r\n break\r\n case 'warning':\r\n toast.warn(notification.message, notification)\r\n break\r\n case 'success':\r\n toast.success(notification.message, notification)\r\n break\r\n default:\r\n toast(notification.message)\r\n break\r\n }\r\n }\r\n\r\n function Notification(notification) {\r\n if (toast.isActive(notification.toastId)) {\r\n toast.dismiss(notification.toastId)\r\n }\r\n switch (notification.Type) {\r\n case 'error':\r\n toast.error(notification.Message, {\r\n toastId: notification?.toastId ?? 'default',\r\n position: notification?.Position ?? 'top-right',\r\n autoClose: notification?.Autoclose ?? 5000,\r\n hideProgressBar: true,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n })\r\n break\r\n\r\n case 'info':\r\n toast.info(notification.Message, {\r\n position: notification?.Position ?? 'top-right',\r\n autoClose: notification?.Autoclose ?? 5000,\r\n toastId: notification?.toastId ?? 'default',\r\n hideProgressBar: false,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n })\r\n break\r\n case 'warning':\r\n toast.warn(notification.Message, {\r\n position: notification?.Position ?? 'top-right',\r\n autoClose: notification?.Autoclose ?? 5000,\r\n toastId: notification.toastId ?? 'default',\r\n hideProgressBar: false,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n })\r\n break\r\n case 'success':\r\n toast.success(notification.Message, {\r\n position: notification?.Position ?? 'top-right',\r\n autoClose: notification?.Autoclose ?? 5000,\r\n toastId: notification?.toastId ?? 'default',\r\n hideProgressBar: false,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n })\r\n break\r\n default:\r\n toast('Wow so easy!')\r\n break\r\n }\r\n }\r\n\r\n let backcss = {\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0,\r\n margin: 'auto',\r\n width: '1200px',\r\n }\r\n\r\n let sensorcss = {\r\n position: 'absolute',\r\n width: '1200px',\r\n }\r\n\r\n if (!layout.isZoom) {\r\n backcss = {\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0,\r\n margin: 'auto',\r\n }\r\n\r\n sensorcss = {\r\n position: 'absolute',\r\n }\r\n\r\n bodyCss = {}\r\n }\r\n\r\n if (isloading) {\r\n return (\r\n <>\r\n \r\n {/* begin::Content */}\r\n
\r\n {/* begin::Logo */}\r\n

industryX Automation

\r\n\r\n {/* end::Logo */}\r\n {/* begin::Wrapper */}\r\n
\r\n
\r\n \r\n <>\r\n {' '}\r\n {state.DashboardStat}{' '}\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n {/* end::Wrapper */}\r\n
\r\n {/* end::Content */}\r\n {/* begin::Footer */}\r\n \r\n {/* end::Footer */}\r\n \r\n \r\n )\r\n }\r\n\r\n if (layout.category === 'MAP') {\r\n return (\r\n <>\r\n \r\n {layout.layoutName}\r\n \r\n \r\n \r\n )\r\n }\r\n\r\n return (\r\n <>\r\n \r\n {layout.layoutName}\r\n \r\n \r\n \r\n\r\n {/* */}\r\n \r\n
\r\n {/* \r\n {state.DashboardStat === 'DISABLED' && (\r\n \r\n {state.DashboardStat}\r\n \r\n )}\r\n {state.DashboardStat === 'ACTIVE' && (\r\n \r\n {state.DashboardStat}\r\n \r\n )}\r\n {state.DashboardStat === 'CONNECTED' && (\r\n \r\n {state.DashboardStat}\r\n \r\n )}\r\n {state.DashboardStat === 'CONNECTING' && (\r\n \r\n {state.DashboardStat}\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 Display\r\n//https://codesandbox.io/s/k2ds4?file=/src/App.js:128-4341\r\n","import React, {\r\n FC,\r\n createContext,\r\n useContext,\r\n useState,\r\n useEffect,\r\n SetStateAction,\r\n Dispatch,\r\n} from 'react'\r\n\r\nconst MetronicSplashScreenContext = createContext> | undefined>(\r\n undefined\r\n)\r\n\r\nconst MetronicSplashScreenProvider: FC = ({children}) => {\r\n const [count, setCount] = useState(0)\r\n let visible = count > 0\r\n\r\n useEffect(() => {\r\n const splashScreen = document.getElementById('splash-screen')\r\n\r\n // Show SplashScreen\r\n if (splashScreen && visible) {\r\n splashScreen.classList.remove('hidden')\r\n\r\n return () => {\r\n splashScreen.classList.add('hidden')\r\n }\r\n }\r\n\r\n // Hide SplashScreen\r\n let timeout: number\r\n if (splashScreen && !visible) {\r\n timeout = window.setTimeout(() => {\r\n splashScreen.classList.add('hidden')\r\n }, 3000)\r\n }\r\n\r\n return () => {\r\n clearTimeout(timeout)\r\n }\r\n }, [visible])\r\n\r\n return (\r\n \r\n {children}\r\n \r\n )\r\n}\r\n\r\nconst LayoutSplashScreen: FC<{visible?: boolean}> = ({visible = true}) => {\r\n // Everything are ready - remove splashscreen\r\n const setCount = useContext(MetronicSplashScreenContext)\r\n\r\n useEffect(() => {\r\n if (!visible) {\r\n return\r\n }\r\n\r\n if (setCount) {\r\n setCount((prev) => {\r\n return prev + 1\r\n })\r\n }\r\n\r\n return () => {\r\n if (setCount) {\r\n setCount((prev) => {\r\n return prev - 1\r\n })\r\n }\r\n }\r\n }, [setCount, visible])\r\n\r\n return null\r\n}\r\n\r\nexport {MetronicSplashScreenProvider, LayoutSplashScreen}\r\n","import React, {Component} from 'react'\r\nimport PropTypes from 'prop-types'\r\nimport shouldPureComponentUpdate from 'react-pure-render/function'\r\nimport Popup from 'reactjs-popup'\r\nimport 'reactjs-popup/dist/index.css'\r\nimport {greatPlaceStyle2} from '../sensor/config/my_great_place_styles.js'\r\n\r\nexport default class MyPlace extends Component {\r\n static propTypes = {\r\n text: PropTypes.string,\r\n long_text: PropTypes.string,\r\n isNotify: PropTypes.bool,\r\n Link: PropTypes.string,\r\n }\r\n\r\n static defaultProps = {}\r\n\r\n shouldComponentUpdate = shouldPureComponentUpdate\r\n\r\n render() {\r\n if (this.props.Type == 'Car') {\r\n return (\r\n <>\r\n \r\n alert('')}\r\n width={'70px'}\r\n src='https://cdn4.iconfinder.com/data/icons/VISTA/accounting/png/256/truck.png'\r\n />\r\n \r\n }\r\n position='right center'\r\n >\r\n
\r\n temp : {this.props.Value}°C
\r\n \r\n View More Details\r\n \r\n
\r\n \r\n \r\n )\r\n } else {\r\n if (!this.props.isNotify) {\r\n return (\r\n <>\r\n \r\n {this.props.text}\r\n {/* */}\r\n {/* {this.props.isNotify && (\r\n \r\n {' '}\r\n \r\n )}{' '} */}\r\n \r\n }\r\n position='right center'\r\n >\r\n
\r\n {this.props.long_text}\r\n {/* \r\n View More Details\r\n */}\r\n
\r\n \r\n \r\n )\r\n } else {\r\n return (\r\n <>\r\n \r\n {this.props.text}\r\n \r\n \r\n }\r\n position='right center'\r\n >\r\n
\r\n {this.props.long_text}\r\n {/* \r\n View More Details\r\n */}\r\n
\r\n \r\n \r\n )\r\n }\r\n }\r\n }\r\n}\r\n\r\nconst PopupExample = () => (\r\n Trigger} position='right center'>\r\n
Popup content here !!
\r\n
\r\n)\r\n","export const toAbsoluteUrl = (pathname: string) => process.env.PUBLIC_URL + pathname\r\n","export function getCurrentUrl(pathname: string) {\r\n return pathname.split(/[?#]/)[0]\r\n}\r\n\r\nexport function checkIsActive(pathname: string, url: string) {\r\n const current = getCurrentUrl(pathname)\r\n if (!current || !url) {\r\n return false\r\n }\r\n\r\n if (current === url) {\r\n return true\r\n }\r\n\r\n if (current.indexOf(url) > -1) {\r\n return true\r\n }\r\n\r\n return false\r\n}\r\n","import React from 'react'\r\nimport SVG from 'react-inlinesvg'\r\nimport {toAbsoluteUrl} from '../AssetHelpers'\r\ntype Props = {\r\n className?: string\r\n path: string\r\n svgClassName?: string\r\n}\r\n\r\nconst KTSVG: React.FC = ({className = '', path, svgClassName = 'mh-50px'}) => {\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport {KTSVG}\r\n","export interface MessageModel {\r\n user: number\r\n type: 'in' | 'out'\r\n text: string\r\n time: string\r\n template?: boolean\r\n}\r\n\r\nconst defaultMessages: Array = [\r\n {\r\n user: 4,\r\n type: 'in',\r\n text: 'How likely are you to recommend our company to your friends and family ?',\r\n time: '2 mins',\r\n },\r\n {\r\n user: 2,\r\n type: 'out',\r\n text: 'Hey there, we’re just writing to let you know that you’ve been subscribed to a repository on GitHub.',\r\n time: '5 mins',\r\n },\r\n {\r\n user: 4,\r\n type: 'in',\r\n text: 'Ok, Understood!',\r\n time: '1 Hour',\r\n },\r\n {\r\n user: 2,\r\n type: 'out',\r\n text: 'You’ll receive notifications for all issues, pull requests!',\r\n time: '2 Hours',\r\n },\r\n {\r\n user: 4,\r\n type: 'in',\r\n text: 'You can unwatch this repository immediately by clicking here: Keenthemes.com',\r\n time: '3 Hours',\r\n },\r\n {\r\n user: 2,\r\n type: 'out',\r\n text: 'Most purchased Business courses during this sale!',\r\n time: '4 Hours',\r\n },\r\n {\r\n user: 4,\r\n type: 'in',\r\n text: 'Company BBQ to celebrate the last quater achievements and goals. Food and drinks provided',\r\n time: '5 Hours',\r\n },\r\n {\r\n template: true,\r\n user: 2,\r\n type: 'out',\r\n text: '',\r\n time: 'Just now',\r\n },\r\n {\r\n template: true,\r\n user: 4,\r\n type: 'in',\r\n text: 'Right before vacation season we have the next Big Deal for you.',\r\n time: 'Just now',\r\n },\r\n]\r\n\r\nexport interface UserInfoModel {\r\n initials?: {label: string; state: 'warning' | 'danger' | 'primary' | 'success' | 'info'}\r\n name: string\r\n avatar?: string\r\n email: string\r\n position: string\r\n online: boolean\r\n}\r\n\r\nconst defaultUserInfos: Array = [\r\n {\r\n name: 'Emma Smith',\r\n avatar: 'avatars/150-1.jpg',\r\n email: 'e.smith@kpmg.com.au',\r\n position: 'Art Director',\r\n online: false,\r\n },\r\n {\r\n name: 'Melody Macy',\r\n initials: {label: 'M', state: 'danger'},\r\n email: 'melody@altbox.com',\r\n position: 'Marketing Analytic',\r\n online: true,\r\n },\r\n {\r\n name: 'Max Smith',\r\n avatar: 'avatars/150-2.jpg',\r\n email: 'max@kt.com',\r\n position: 'Software Enginer',\r\n online: false,\r\n },\r\n {\r\n name: 'Sean Bean',\r\n avatar: 'avatars/150-4.jpg',\r\n email: 'sean@dellito.com',\r\n position: 'Web Developer',\r\n online: false,\r\n },\r\n {\r\n name: 'Brian Cox',\r\n avatar: 'avatars/150-15.jpg',\r\n email: 'brian@exchange.com',\r\n position: 'UI/UX Designer',\r\n online: false,\r\n },\r\n {\r\n name: 'Mikaela Collins',\r\n initials: {label: 'M', state: 'warning'},\r\n email: 'mikaela@pexcom.com',\r\n position: 'Head Of Marketing',\r\n online: true,\r\n },\r\n {\r\n name: 'Francis Mitcham',\r\n avatar: 'avatars/150-8.jpg',\r\n email: 'f.mitcham@kpmg.com.au',\r\n position: 'Software Arcitect',\r\n online: false,\r\n },\r\n\r\n {\r\n name: 'Olivia Wild',\r\n initials: {label: 'O', state: 'danger'},\r\n email: 'olivia@corpmail.com',\r\n position: 'System Admin',\r\n online: true,\r\n },\r\n {\r\n name: 'Neil Owen',\r\n initials: {label: 'N', state: 'primary'},\r\n email: 'owen.neil@gmail.com',\r\n position: 'Account Manager',\r\n online: true,\r\n },\r\n {\r\n name: 'Dan Wilson',\r\n avatar: 'avatars/150-6.jpg',\r\n email: 'dam@consilting.com',\r\n position: 'Web Desinger',\r\n online: false,\r\n },\r\n {\r\n name: 'Emma Bold',\r\n initials: {label: 'E', state: 'danger'},\r\n email: 'emma@intenso.com',\r\n position: 'Corporate Finance',\r\n online: true,\r\n },\r\n {\r\n name: 'Ana Crown',\r\n avatar: 'avatars/150-7.jpg',\r\n email: 'ana.cf@limtel.com',\r\n position: 'Customer Relationship',\r\n online: false,\r\n },\r\n {\r\n name: 'Robert Doe',\r\n initials: {label: 'A', state: 'info'},\r\n email: 'robert@benko.com',\r\n position: 'Marketing Executive',\r\n online: true,\r\n },\r\n {\r\n name: 'John Miller',\r\n avatar: 'avatars/150-17.jpg',\r\n email: 'miller@mapple.com',\r\n position: 'Project Manager',\r\n online: false,\r\n },\r\n {\r\n name: 'Lucy Kunic',\r\n initials: {label: 'L', state: 'success'},\r\n email: 'lucy.m@fentech.com',\r\n position: 'SEO Master',\r\n online: true,\r\n },\r\n {\r\n name: 'Ethan Wilder',\r\n avatar: 'avatars/150-10.jpg',\r\n email: 'ethan@loop.com.au',\r\n position: 'Accountant',\r\n online: true,\r\n },\r\n]\r\n\r\nconst messageFromClient: MessageModel = {\r\n user: 4,\r\n type: 'in',\r\n text: 'Thank you for your awesome support!',\r\n time: 'Just now',\r\n}\r\n\r\nexport interface AlertModel {\r\n title: string\r\n description: string\r\n time: string\r\n icon: string\r\n state: 'primary' | 'danger' | 'warning' | 'success' | 'info'\r\n}\r\n\r\nconst defaultAlerts: Array = [\r\n {\r\n title: 'Project Alice',\r\n description: 'Phase 1 development',\r\n time: '1 hr',\r\n icon: 'icons/duotune/technology/teh008.svg',\r\n state: 'primary',\r\n },\r\n {\r\n title: 'HR Confidential',\r\n description: 'Confidential staff documents',\r\n time: '2 hrs',\r\n icon: 'icons/duotune/general/gen044.svg',\r\n state: 'danger',\r\n },\r\n {\r\n title: 'Company HR',\r\n description: 'Corporeate staff profiles',\r\n time: '5 hrs',\r\n icon: 'icons/duotune/finance/fin006.svg',\r\n state: 'warning',\r\n },\r\n {\r\n title: 'Project Redux',\r\n description: 'New frontend admin theme',\r\n time: '2 days',\r\n icon: 'icons/duotune/files/fil023.svg',\r\n state: 'success',\r\n },\r\n {\r\n title: 'Project Breafing',\r\n description: 'Product launch status update',\r\n time: '21 Jan',\r\n icon: 'icons/duotune/maps/map001.svg',\r\n state: 'primary',\r\n },\r\n {\r\n title: 'Banner Assets',\r\n description: 'Collection of banner images',\r\n time: '21 Jan',\r\n icon: 'icons/duotune/general/gen006.svg',\r\n state: 'info',\r\n },\r\n {\r\n title: 'Icon Assets',\r\n description: 'Collection of SVG icons',\r\n time: '20 March',\r\n icon: 'icons/duotune/art/art002.svg',\r\n state: 'warning',\r\n },\r\n]\r\nexport interface LogModel {\r\n code: string\r\n state: 'success' | 'danger' | 'warning'\r\n message: string\r\n time: string\r\n}\r\n\r\nconst defaultLogs: Array = [\r\n {code: '200 OK', state: 'success', message: 'New order', time: 'Just now'},\r\n {code: '500 ERR', state: 'danger', message: 'New customer', time: '2 hrs'},\r\n {code: '200 OK', state: 'success', message: 'Payment process', time: '5 hrs'},\r\n {code: '300 WRN', state: 'warning', message: 'Search query', time: '2 days'},\r\n {code: '200 OK', state: 'success', message: 'API connection', time: '1 week'},\r\n {code: '200 OK', state: 'success', message: 'Database restore', time: 'Mar 5'},\r\n {code: '300 WRN', state: 'warning', message: 'System update', time: 'May 15'},\r\n {code: '300 WRN', state: 'warning', message: 'Server OS update', time: 'Apr 3'},\r\n {code: '300 WRN', state: 'warning', message: 'API rollback', time: 'Jun 30'},\r\n {code: '500 ERR', state: 'danger', message: 'Refund process', time: 'Jul 10'},\r\n {code: '500 ERR', state: 'danger', message: 'Withdrawal process', time: 'Sep 10'},\r\n {code: '500 ERR', state: 'danger', message: 'Mail tasks', time: 'Dec 10'},\r\n]\r\n\r\nexport {defaultMessages, defaultUserInfos, defaultAlerts, defaultLogs, messageFromClient}\r\n","import {ILayout} from './LayoutModels'\r\n\r\nvar settings_config : ILayout = {\r\n main: {\r\n type: 'default',\r\n primaryColor: '#009EF7',\r\n darkSkinEnabled: true,\r\n },\r\n loader: {\r\n display: true,\r\n type: 'default', // Set default|spinner-message|spinner-logo to hide or show page loader\r\n },\r\n scrolltop: {\r\n display: true,\r\n },\r\n header: {\r\n display: true, // Set true|false to show or hide Header\r\n width: 'fluid', // Set fixed|fluid to change width type\r\n left: 'menu',\r\n fixed: {\r\n desktop: true, // Set true|false to set fixed Header for desktop mode\r\n tabletAndMobile: true, // Set true|false to set fixed Header for tablet and mobile modes\r\n },\r\n menuIcon: 'svg',\r\n },\r\n megaMenu: {\r\n display: true, // Set true|false to show or hide Mega Menu\r\n },\r\n aside: {\r\n display: true,\r\n theme: 'dark',\r\n menu: 'main',\r\n fixed: true,\r\n minimized: true,\r\n minimize: true,\r\n hoverable: true,\r\n menuIcon: 'svg',\r\n },\r\n content: {\r\n width: 'fixed', // Set fixed|fluid to change width\r\n layout: 'default',\r\n },\r\n toolbar: {\r\n display: true, // Display toolbar\r\n width: 'fluid', // Set fixed|fluid to change width type,\r\n fixed: {\r\n desktop: true,\r\n tabletAndMobileMode: true,\r\n },\r\n layout: 'toolbar1',\r\n layouts: {\r\n toolbar1: {\r\n height: '55px',\r\n heightAndTabletMobileMode: '55px',\r\n },\r\n toolbar2: {\r\n height: '75px',\r\n heightAndTabletMobileMode: '65px',\r\n },\r\n toolbar3: {\r\n height: '55px',\r\n heightAndTabletMobileMode: '55px',\r\n },\r\n toolbar4: {\r\n height: '65px',\r\n heightAndTabletMobileMode: '65px',\r\n },\r\n toolbar5: {\r\n height: '75px',\r\n heightAndTabletMobileMode: '65px',\r\n },\r\n },\r\n },\r\n footer: {\r\n width: 'fluid', // Set fixed|fluid to change width type\r\n },\r\n pageTitle: {\r\n display: true,\r\n breadCrumbs: true,\r\n description: false,\r\n layout: 'default',\r\n direction: 'row',\r\n responsive: true,\r\n responsiveBreakpoint: 'lg',\r\n responsiveTarget: '#kt_toolbar_container',\r\n },\r\n}\r\n\r\n\r\n\r\nif (window.location.hostname.toLowerCase() === 'e2eq.lk') {\r\n\r\n}\r\nif (window.location.hostname.toLowerCase() === 'portal.smartgas.biz') {\r\n settings_config.aside = {\r\n display: true,\r\n theme: 'light',\r\n menu: 'main',\r\n fixed: true,\r\n minimized: false,\r\n minimize: true,\r\n hoverable: true,\r\n menuIcon: 'svg',\r\n}\r\n}\r\n\r\n\r\nexport const DefaultLayoutConfig : ILayout = settings_config\r\n \r\n\r\n// export const DefaultLayoutConfig: ILayout = {\r\n// main: {\r\n// type: 'default',\r\n// primaryColor: '#009EF7',\r\n// darkSkinEnabled: true,\r\n// },\r\n// loader: {\r\n// display: true,\r\n// type: 'default', // Set default|spinner-message|spinner-logo to hide or show page loader\r\n// },\r\n// scrolltop: {\r\n// display: true,\r\n// },\r\n// header: {\r\n// display: true, // Set true|false to show or hide Header\r\n// width: 'fluid', // Set fixed|fluid to change width type\r\n// left: 'menu',\r\n// fixed: {\r\n// desktop: true, // Set true|false to set fixed Header for desktop mode\r\n// tabletAndMobile: true, // Set true|false to set fixed Header for tablet and mobile modes\r\n// },\r\n// menuIcon: 'svg',\r\n// },\r\n// megaMenu: {\r\n// display: true, // Set true|false to show or hide Mega Menu\r\n// },\r\n// aside: {\r\n// display: true,\r\n// theme: 'dark',\r\n// menu: 'main',\r\n// fixed: true,\r\n// minimized: true,\r\n// minimize: true,\r\n// hoverable: true,\r\n// menuIcon: 'svg',\r\n// },\r\n// content: {\r\n// width: 'fixed', // Set fixed|fluid to change width\r\n// layout: 'default',\r\n// },\r\n// toolbar: {\r\n// display: true, // Display toolbar\r\n// width: 'fluid', // Set fixed|fluid to change width type,\r\n// fixed: {\r\n// desktop: true,\r\n// tabletAndMobileMode: true,\r\n// },\r\n// layout: 'toolbar1',\r\n// layouts: {\r\n// toolbar1: {\r\n// height: '55px',\r\n// heightAndTabletMobileMode: '55px',\r\n// },\r\n// toolbar2: {\r\n// height: '75px',\r\n// heightAndTabletMobileMode: '65px',\r\n// },\r\n// toolbar3: {\r\n// height: '55px',\r\n// heightAndTabletMobileMode: '55px',\r\n// },\r\n// toolbar4: {\r\n// height: '65px',\r\n// heightAndTabletMobileMode: '65px',\r\n// },\r\n// toolbar5: {\r\n// height: '75px',\r\n// heightAndTabletMobileMode: '65px',\r\n// },\r\n// },\r\n// },\r\n// footer: {\r\n// width: 'fluid', // Set fixed|fluid to change width type\r\n// },\r\n// pageTitle: {\r\n// display: true,\r\n// breadCrumbs: true,\r\n// description: false,\r\n// layout: 'default',\r\n// direction: 'row',\r\n// responsive: true,\r\n// responsiveBreakpoint: 'lg',\r\n// responsiveTarget: '#kt_toolbar_container',\r\n// },\r\n// }\r\n","import React, {createContext, useContext, useState, useEffect} from 'react'\r\nimport {DefaultLayoutConfig} from './DefaultLayoutConfig'\r\nimport {\r\n getEmptyCssClasses,\r\n getEmptyCSSVariables,\r\n getEmptyHTMLAttributes,\r\n LayoutSetup,\r\n} from './LayoutSetup'\r\nimport {\r\n ILayout,\r\n ILayoutCSSVariables,\r\n ILayoutCSSClasses,\r\n ILayoutHTMLAttributes,\r\n} from './LayoutModels'\r\n\r\nexport interface LayoutContextModel {\r\n config: ILayout\r\n classes: ILayoutCSSClasses\r\n attributes: ILayoutHTMLAttributes\r\n cssVariables: ILayoutCSSVariables\r\n setLayout: (config: LayoutSetup) => void\r\n}\r\n\r\nconst LayoutContext = createContext({\r\n config: DefaultLayoutConfig,\r\n classes: getEmptyCssClasses(),\r\n attributes: getEmptyHTMLAttributes(),\r\n cssVariables: getEmptyCSSVariables(),\r\n setLayout: (config: LayoutSetup) => {},\r\n})\r\n\r\nconst enableSplashScreen = () => {\r\n const splashScreen = document.getElementById('splash-screen')\r\n if (splashScreen) {\r\n splashScreen.style.setProperty('display', 'flex')\r\n }\r\n}\r\n\r\nconst disableSplashScreen = () => {\r\n const splashScreen = document.getElementById('splash-screen')\r\n if (splashScreen) {\r\n splashScreen.style.setProperty('display', 'none')\r\n }\r\n}\r\n\r\nconst LayoutProvider: React.FC = ({children}) => {\r\n const [config, setConfig] = useState(LayoutSetup.config)\r\n const [classes, setClasses] = useState(LayoutSetup.classes)\r\n const [attributes, setAttributes] = useState(LayoutSetup.attributes)\r\n const [cssVariables, setCSSVariables] = useState(LayoutSetup.cssVariables)\r\n const setLayout = (_themeConfig: Partial) => {\r\n enableSplashScreen()\r\n const bodyClasses = Array.from(document.body.classList)\r\n bodyClasses.forEach((cl) => document.body.classList.remove(cl))\r\n LayoutSetup.updatePartialConfig(_themeConfig)\r\n setConfig(Object.assign({}, LayoutSetup.config))\r\n setClasses(LayoutSetup.classes)\r\n setAttributes(LayoutSetup.attributes)\r\n setCSSVariables(LayoutSetup.cssVariables)\r\n setTimeout(() => {\r\n disableSplashScreen()\r\n }, 500)\r\n }\r\n const value: LayoutContextModel = {\r\n config,\r\n classes,\r\n attributes,\r\n cssVariables,\r\n setLayout,\r\n }\r\n\r\n useEffect(() => {\r\n disableSplashScreen()\r\n }, [])\r\n\r\n return {children}\r\n}\r\n\r\nexport {LayoutContext, LayoutProvider}\r\n\r\nexport function useLayout() {\r\n return useContext(LayoutContext)\r\n}\r\n","/* eslint-disable react-hooks/exhaustive-deps */\r\nimport React, { FC, createContext, useContext, useEffect, useState } from 'react'\r\n\r\nexport interface PageLink {\r\n title: string\r\n path: string\r\n isActive: boolean\r\n isSeparator?: boolean\r\n}\r\n\r\nexport interface PageDataContextModel {\r\n pageTitle?: string\r\n setPageTitle: (_title: string) => void\r\n pageDescription?: string\r\n setPageDescription: (_description: string) => void\r\n pageBreadcrumbs?: Array\r\n setPageBreadcrumbs: (_breadcrumbs: Array) => void\r\n pageCode?: string\r\n setPageCode: (_code: string) => void\r\n}\r\n\r\nconst PageDataContext = createContext({\r\n setPageTitle: (_title: string) => { },\r\n setPageBreadcrumbs: (_breadcrumbs: Array) => { },\r\n setPageDescription: (_description: string) => { },\r\n setPageCode: (_code: string) => { },\r\n})\r\n\r\nconst PageDataProvider: React.FC = ({ children }) => {\r\n const [pageTitle, setPageTitle] = useState('')\r\n const [pageDescription, setPageDescription] = useState('')\r\n const [pageBreadcrumbs, setPageBreadcrumbs] = useState>([])\r\n const [pageCode, setPageCode] = useState('')\r\n const value: PageDataContextModel = {\r\n pageTitle,\r\n setPageTitle,\r\n pageDescription,\r\n setPageDescription,\r\n pageBreadcrumbs,\r\n setPageBreadcrumbs,\r\n pageCode,\r\n setPageCode,\r\n }\r\n return {children}\r\n}\r\n\r\nfunction usePageData() {\r\n return useContext(PageDataContext)\r\n}\r\n\r\ntype Props = {\r\n description?: string\r\n breadcrumbs?: Array\r\n code?: string\r\n}\r\n\r\nconst PageTitle: FC = ({ children, description, breadcrumbs, code = '' }) => {\r\n const { setPageTitle, setPageDescription, setPageBreadcrumbs, setPageCode } = usePageData()\r\n useEffect(() => {\r\n if (children) {\r\n setPageTitle(children.toString())\r\n }\r\n return () => {\r\n setPageTitle('')\r\n }\r\n }, [children])\r\n\r\n useEffect(() => {\r\n if (description) {\r\n setPageDescription(description)\r\n }\r\n return () => {\r\n setPageDescription('')\r\n }\r\n }, [description])\r\n\r\n useEffect(() => {\r\n if (code) {\r\n setPageCode(code)\r\n }\r\n return () => {\r\n setPageCode('')\r\n }\r\n }, [code])\r\n\r\n\r\n useEffect(() => {\r\n if (breadcrumbs) {\r\n setPageBreadcrumbs(breadcrumbs)\r\n }\r\n return () => {\r\n setPageBreadcrumbs([])\r\n }\r\n }, [breadcrumbs])\r\n\r\n return <>\r\n}\r\n\r\nconst PageDescription: React.FC = ({ children }) => {\r\n const { setPageDescription } = usePageData()\r\n useEffect(() => {\r\n if (children) {\r\n setPageDescription(children.toString())\r\n }\r\n return () => {\r\n setPageDescription('')\r\n }\r\n }, [children])\r\n return <>\r\n}\r\n\r\nexport { PageDescription, PageTitle, PageDataProvider, usePageData }\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport {FC} from 'react'\r\n\r\nconst Dropdown2: FC = () => {\r\n return (\r\n \r\n
\r\n
Quick Actions
\r\n
\r\n\r\n
\r\n\r\n \r\n\r\n \r\n\r\n \r\n \r\n New Group\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 {Dropdown2}\r\n","const K_WIDTH = 40\r\nconst K_HEIGHT = 40\r\n\r\nconst greatPlaceStyle = {\r\n // initially any map object has left top corner at lat lng coordinates\r\n // it's on you to set object origin to 0,0 coordinates\r\n position: 'absolute',\r\n width: K_WIDTH,\r\n height: K_HEIGHT,\r\n left: -K_WIDTH / 2,\r\n top: -K_HEIGHT / 2,\r\n border: '5px solid #f44336',\r\n borderRadius: K_HEIGHT,\r\n backgroundColor: 'white',\r\n textAlign: 'center',\r\n color: '#3f51b5',\r\n fontSize: 16,\r\n fontWeight: 'bold',\r\n padding: 4,\r\n}\r\n\r\nconst greatPlaceStyle2 = {\r\n // initially any map object has left top corner at lat lng coordinates\r\n // it's on you to set object origin to 0,0 coordinates\r\n position: 'absolute',\r\n width: 60,\r\n height: K_HEIGHT,\r\n left: -60 / 2,\r\n top: -K_HEIGHT / 2,\r\n border: '5px solid #f44336',\r\n borderRadius: K_HEIGHT,\r\n backgroundColor: 'white',\r\n textAlign: 'center',\r\n color: '#3f51b5',\r\n fontSize: 16,\r\n fontWeight: 'bold',\r\n padding: 4,\r\n}\r\n\r\nexport {greatPlaceStyle, greatPlaceStyle2}\r\n","import React, {useState, useEffect, useRef} from 'react'\r\nimport './../../../../_metronic/assets/sass/kntdashbaord.css'\r\nimport {HubConnectionBuilder, JsonHubProtocol} from '@microsoft/signalr'\r\nimport axios from 'axios'\r\n// import useWindowDimensions from '../../helpers/WindowDimension'\r\n// import Dictionary from '../../helpers/Dictionary'\r\n// import {KTSVG, toAbsoluteUrl} from '../../../../_metronic/helpers'\r\n// import {Dropdown1} from '../../../../_metronic/partials'\r\n// import {AsideDefault} from '../../../../_metronic/layout/components/aside/AsideDefault'\r\n// import {Footer} from '../../../../_metronic/layout/components/Footer'\r\n// import {HeaderWrapper} from '../../../../_metronic/layout/components/header/HeaderWrapper'\r\nimport {PageDataProvider} from '../../../../_metronic/layout/core'\r\n// import {Content} from '../../../../_metronic/layout/components/Content'\r\n// import {\r\n// ChartsWidget1,\r\n// TablesWidget1,\r\n// ListsWidget5,\r\n// TablesWidget5,\r\n// } from '../../../../_metronic/partials/widgets'\r\n// import {stat} from 'fs'\r\n// import Confetti from 'react-confetti'\r\n// import ImageMapper from 'react-image-mapper'\r\n// import Draggable from 'react-draggable'\r\n// import {v4 as uuidv4} from 'uuid'\r\n// import Popup from 'reactjs-popup'\r\n// import SensorArea from './SensorArea'\r\nimport 'reactjs-popup/dist/index.css'\r\n// import {auto, hide, right} from '@popperjs/core'\r\nimport {ToastContainer, toast, Slide, Zoom, Flip, Bounce} from 'react-toastify'\r\nimport GoogleMapReact from 'google-map-react'\r\nimport MyGreatPlace from './my_great_place.jsx'\r\n\r\nimport shouldPureComponentUpdate from 'react-pure-render/function'\r\n\r\nimport MarkerExample, {K_SCALE_NORMAL} from './marker_example.jsx'\r\n\r\nimport {getScale, getRealFromTo} from '../helpers/calc_markers_visibility.js'\r\nimport markerDescriptions from '../constants/marker_descriptions.js'\r\nimport {customDistanceToMouse} from '../helpers/custom_distance.js'\r\n\r\nimport {FabricJSCanvas, useFabricJSEditor} from 'fabricjs-react'\r\nimport {fabric} from 'fabric'\r\n\r\nimport 'react-toastify/dist/ReactToastify.css'\r\nimport {List} from 'immutable'\r\nvar randomColor = require('randomcolor')\r\n\r\nfunction Map(props) {\r\n const [connection, setConnection] = useState(null)\r\n const reconnectRef = useRef(0)\r\n const urlParams = new URLSearchParams(window.location.search)\r\n const [isloading, setLoading] = useState(true)\r\n const [item, setItem] = useState('')\r\n const [SensorList, setsensorList] = useState([])\r\n const sensors = useRef([])\r\n\r\n const {selectedObjects, setSelectedObject, editor, onReady} = useFabricJSEditor({\r\n defaultStrokeColor: 'red',\r\n selection: false,\r\n })\r\n const [text, setText] = useState('')\r\n const [strokeColor, setStrokeColor] = useState('')\r\n const [fillColor, setFillColor] = useState('')\r\n const [isload, setisload] = useState(true)\r\n\r\n const AnyReactComponent = ({text}) =>
{text}
\r\n const defaultProps = {\r\n center: {\r\n lat: 6.911979146490742,\r\n lng: 79.92597226721936,\r\n },\r\n zoom: 8,\r\n }\r\n\r\n const K_MARGIN_TOP = 30\r\n const K_MARGIN_RIGHT = 30\r\n const K_MARGIN_BOTTOM = 30\r\n const K_MARGIN_LEFT = 30\r\n\r\n const K_HOVER_DISTANCE = 30\r\n /*\r\n const initialStatex = [\r\n {\r\n name: 'KF',\r\n lat: 6.911979146490742,\r\n lng: 79.92597226721936,\r\n value: '',\r\n isNotify: false,\r\n link: '',\r\n type: '',\r\n },\r\n {\r\n name: 'EH',\r\n lat: 6.7064889452596015,\r\n lng: 79.94520235609559,\r\n value: '',\r\n isNotify: false,\r\n link: '',\r\n type: '',\r\n },\r\n ]*/\r\n\r\n //const initialStatex = []\r\n const [loc, setLoc] = useState([])\r\n const locax = useRef(loc)\r\n\r\n //editor?.addRectangle({ fill: \"red\", stroke: \"blue\" });\r\n /*selectedObjects[0]?.set({\r\n fill: \"red\",\r\n stroke: \"blue\",\r\n /* //Movement:\r\n lockMovementX : true,\r\n lockMovementY : true,\r\n \r\n //Scaling:\r\n lockScalingX : true,\r\n lockScalingY : true,\r\n \r\n // Rotation:\r\n lockRotation : true,\r\n \r\n // Object's frame/bounidngBox:\r\n hasControls : false,\r\n hasBorders : false,\r\n //left: selectedObjects[0].left + 100,\r\n });\r\n \r\n setTimeout(() => {\r\n if(isload){\r\n const data = JSON.parse(\r\n '{\"version\":\"4.3.1\",\"objects\":[{\"type\":\"circle\",\"version\":\"4.3.1\",\"originX\":\"left\",\"originY\":\"top\",\"left\":100,\"top\":100,\"width\":40,\"height\":40,\"fill\":\"rgba(255, 255, 255, 0.0)\",\"stroke\":\"#000000\",\"strokeWidth\":1,\"strokeDashArray\":null,\"strokeLineCap\":\"butt\",\"strokeDashOffset\":0,\"strokeLineJoin\":\"miter\",\"strokeUniform\":false,\"strokeMiterLimit\":4,\"scaleX\":1,\"scaleY\":1,\"angle\":0,\"flipX\":false,\"flipY\":false,\"opacity\":1,\"shadow\":null,\"visible\":true,\"backgroundColor\":\"\",\"fillRule\":\"nonzero\",\"paintFirst\":\"fill\",\"globalCompositeOperation\":\"source-over\",\"skewX\":0,\"skewY\":0,\"radius\":20,\"startAngle\":0,\"endAngle\":6.283185307179586},{\"type\":\"text\",\"version\":\"4.3.1\",\"originX\":\"left\",\"originY\":\"top\",\"left\":253,\"top\":102,\"width\":95.55,\"height\":18.08,\"fill\":\"#000000\",\"stroke\":null,\"strokeWidth\":1,\"strokeDashArray\":null,\"strokeLineCap\":\"butt\",\"strokeDashOffset\":0,\"strokeLineJoin\":\"miter\",\"strokeUniform\":false,\"strokeMiterLimit\":4,\"scaleX\":2.43,\"scaleY\":2.43,\"angle\":0,\"flipX\":false,\"flipY\":false,\"opacity\":1,\"shadow\":null,\"visible\":true,\"backgroundColor\":\"\",\"fillRule\":\"nonzero\",\"paintFirst\":\"fill\",\"globalCompositeOperation\":\"source-over\",\"skewX\":0,\"skewY\":0,\"text\":\"Some text\",\"fontSize\":16,\"fontWeight\":\"normal\",\"fontFamily\":\"Arial\",\"fontStyle\":\"normal\",\"lineHeight\":1.16,\"underline\":false,\"overline\":false,\"linethrough\":false,\"textAlign\":\"left\",\"textBackgroundColor\":\"\",\"charSpacing\":0,\"minWidth\":20,\"splitByGrapheme\":false,\"styles\":{}},{\"type\":\"rect\",\"lockMovementX\":\"True\",\"version\":\"4.3.1\",\"originX\":\"left\",\"originY\":\"top\",\"left\":109,\"top\":212,\"width\":40,\"height\":40,\"fill\":\"rgba(255, 255, 255, 0.0)\",\"stroke\":\"#000000\",\"strokeWidth\":1,\"strokeDashArray\":null,\"strokeLineCap\":\"butt\",\"strokeDashOffset\":0,\"strokeLineJoin\":\"miter\",\"strokeUniform\":false,\"strokeMiterLimit\":4,\"scaleX\":1,\"scaleY\":1,\"angle\":0,\"flipX\":false,\"flipY\":false,\"opacity\":1,\"shadow\":null,\"visible\":true,\"backgroundColor\":\"\",\"fillRule\":\"nonzero\",\"paintFirst\":\"fill\",\"globalCompositeOperation\":\"source-over\",\"skewX\":0,\"skewY\":0,\"rx\":0,\"ry\":0},{\"type\":\"image\",\"version\":\"4.3.1\",\"originX\":\"left\",\"originY\":\"top\",\"left\":499,\"top\":86,\"width\":1200,\"height\":900,\"fill\":\"rgb(0,0,0)\",\"stroke\":null,\"strokeWidth\":0,\"strokeDashArray\":null,\"strokeLineCap\":\"butt\",\"strokeDashOffset\":0,\"strokeLineJoin\":\"miter\",\"strokeUniform\":false,\"strokeMiterLimit\":4,\"scaleX\":0.2,\"scaleY\":0.2,\"angle\":0,\"flipX\":false,\"flipY\":false,\"opacity\":1,\"shadow\":null,\"visible\":true,\"backgroundColor\":\"\",\"fillRule\":\"nonzero\",\"paintFirst\":\"fill\",\"globalCompositeOperation\":\"source-over\",\"skewX\":0,\"skewY\":0,\"cropX\":0,\"cropY\":0,\"src\":\"https://miro.medium.com/max/1200/1*mk1-6aYaf_Bes1E3Imhc0A.jpeg\",\"crossOrigin\":null,\"filters\":[]},{\"type\":\"polyline\",\"version\":\"4.3.1\",\"originX\":\"left\",\"originY\":\"top\",\"left\":483.78,\"top\":339.22,\"width\":50.88,\"height\":50.88,\"fill\":\"white\",\"stroke\":\"black\",\"strokeWidth\":2,\"strokeDashArray\":null,\"strokeLineCap\":\"butt\",\"strokeDashOffset\":0,\"strokeLineJoin\":\"miter\",\"strokeUniform\":false,\"strokeMiterLimit\":4,\"scaleX\":1,\"scaleY\":1,\"angle\":262.52,\"flipX\":false,\"flipY\":false,\"opacity\":1,\"shadow\":null,\"visible\":true,\"backgroundColor\":\"\",\"fillRule\":\"nonzero\",\"paintFirst\":\"fill\",\"globalCompositeOperation\":\"source-over\",\"skewX\":0,\"skewY\":0,\"points\":[{\"x\":100,\"y\":100},{\"x\":99.11611652351681,\"y\":100.88388347648318},{\"x\":145.58058261758407,\"y\":147.34834957055045},{\"x\":142.92893218813452,\"y\":150},{\"x\":150,\"y\":150},{\"x\":150,\"y\":142.92893218813452},{\"x\":147.34834957055045,\"y\":145.58058261758407},{\"x\":100.88388347648318,\"y\":99.11611652351681},{\"x\":100,\"y\":100}]},{\"type\":\"image\",\"version\":\"4.3.1\",\"originX\":\"left\",\"originY\":\"top\",\"left\":197,\"top\":132,\"width\":1200,\"height\":900,\"fill\":\"rgb(0,0,0)\",\"stroke\":null,\"strokeWidth\":0,\"strokeDashArray\":null,\"strokeLineCap\":\"butt\",\"strokeDashOffset\":0,\"strokeLineJoin\":\"miter\",\"strokeUniform\":false,\"strokeMiterLimit\":4,\"scaleX\":0.2,\"scaleY\":0.2,\"angle\":0,\"flipX\":false,\"flipY\":false,\"opacity\":1,\"shadow\":null,\"visible\":true,\"backgroundColor\":\"\",\"fillRule\":\"nonzero\",\"paintFirst\":\"fill\",\"globalCompositeOperation\":\"source-over\",\"skewX\":0,\"skewY\":0,\"cropX\":0,\"cropY\":0,\"src\":\"https://miro.medium.com/max/1200/1*mk1-6aYaf_Bes1E3Imhc0A.jpeg\",\"crossOrigin\":null,\"filters\":[]}]}'\r\n );\r\n editor?.canvas.loadFromJSON(data);\r\n console.log(JSON.stringify(editor?.canvas))\r\n setisload(false);\r\n }\r\n }, 5000);\r\n \r\n */\r\n\r\n const [layout, setLayout] = useState({\r\n id: props.layout, //urlParams.get('id')??props.layout,\r\n layoutName: '',\r\n imageData: null,\r\n devices: [],\r\n isZoom: false,\r\n globalJs: '',\r\n designObject: [],\r\n })\r\n const [state, setState] = useState({\r\n Data: {},\r\n DashboardStat: 'CONNECTING',\r\n SensorList: [],\r\n loc: [],\r\n })\r\n\r\n const hubService = process.env.REACT_APP_MIDAS_HUB //\"https://signalr.midassit.com\";\r\n\r\n useEffect(() => {\r\n if (connection) {\r\n connection\r\n .start()\r\n .then((result) => {\r\n setState({\r\n ...state,\r\n DashboardStat: 'CONNECTED',\r\n })\r\n setLoading(false)\r\n reconnectRef.current = 0\r\n //console.log('Connected!');\r\n connection.onreconnecting((error) => {\r\n setState({\r\n ...state,\r\n DashboardStat: 'RECONNECTING',\r\n })\r\n console.log('Connection lost due to error . Reconnecting.')\r\n })\r\n\r\n // Reconnect if hub disconnects\r\n connection.onclose(function (e) {\r\n setState({\r\n ...state,\r\n DashboardStat: 'DISCONNECTED',\r\n })\r\n //console.log('Disconnected');\r\n })\r\n\r\n connection.on('ReceiveMessage', (message) => {\r\n //console.log(message)\r\n\r\n if (typeof message === 'string' || message instanceof String) {\r\n message = JSON.parse(message)\r\n }\r\n\r\n if (message.key !== 'SensorData') return\r\n\r\n let dataPacket = JSON.parse(message.data)\r\n\r\n /* */ if (\r\n dataPacket.TimeStamp === undefined ||\r\n Math.round((new Date() - new Date(dataPacket.TimeStamp)) / 1000) > 10\r\n ) {\r\n return\r\n } else {\r\n /*if (dataPacket.IsNotify) {\r\n toast.error(dataPacket.Message, {\r\n position: 'top-right',\r\n autoClose: 5000,\r\n hideProgressBar: true,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n })\r\n }*/\r\n\r\n if (dataPacket.Packet === layout.id.replace('ly', '')) {\r\n console.log(dataPacket)\r\n\r\n //console.log(JSON.stringify(loc))\r\n //console.log(testx)\r\n //console.log(dataPacket.Name)\r\n const newState = locax.current.map((obj) => {\r\n // 👇️ if id equals 2, update country property.\r\n\r\n if (\r\n dataPacket[obj.name] === undefined ||\r\n dataPacket[obj.name + '_gps'] === undefined\r\n )\r\n return obj\r\n\r\n // console.log(obj.name)\r\n // console.log(dataPacket[obj.name] + ' ' + dataPacket[obj.name + '_gps'])\r\n\r\n //console.log('XX' + dataPacket.Name)\r\n return {\r\n ...obj,\r\n value: dataPacket[obj.name],\r\n lat: dataPacket[obj.name + '_gps'].Lat, //6.7064889452596015, //,\r\n lng: dataPacket[obj.name + '_gps'].Lng, //79.94520235609559, //dataPacket[obj.name + '_gps'].Lat,\r\n isNotify: false,\r\n link: '/facility-detail-item/' + obj.code,\r\n type: 'Car',\r\n }\r\n\r\n // 👇️ otherwise return the object as is\r\n // return obj\r\n })\r\n\r\n locax.current = newState\r\n setLoc(newState)\r\n\r\n /* data.push({\r\n value: '17',\r\n lat: 6.7064889452596015,\r\n lng: 79.94520235609559,\r\n isNotify: false,\r\n link: '',\r\n type: 'Car',\r\n //}\r\n })*/\r\n //locax.current = newState\r\n //setLoc(newState)\r\n }\r\n\r\n //\r\n //console.log(dataPacket)\r\n //console.log(dataPacket.SensorValue)\r\n //let newElements = {}\r\n // Object.entries(dataPacket).map(([key, value]) => {\r\n // newElements[key] = value\r\n // })\r\n\r\n setState({\r\n ...state,\r\n SensorList: sensors.current,\r\n DashboardStat: 'CONNECTED',\r\n //loc: newState,\r\n })\r\n //console.log(JSON.stringify(state.loc))\r\n }\r\n })\r\n })\r\n .catch((e) => {\r\n console.log('Connection failed: ', e)\r\n })\r\n }\r\n }, [connection])\r\n\r\n useEffect(() => {\r\n axios({\r\n method: 'get',\r\n url: process.env.REACT_APP_BACKEND_API + '/api/sensor-monitor/layout?layout=' + layout.id,\r\n headers: {},\r\n }).then((response) => {\r\n setLayout({\r\n ...layout,\r\n layoutName: response.data.result.layoutName,\r\n imageData: 'data:image/png;base64,' + response.data.result.imageData,\r\n isZoom: response.data.result.isZoom,\r\n globalJs: response.data.result.globalJs,\r\n designObject: response.data.result.designObject,\r\n })\r\n\r\n var allSensors = []\r\n for (let index = 0; index < response.data.result.devices.length; index++) {\r\n const element = response.data.result.devices[index]\r\n allSensors.push({\r\n code: element.id,\r\n name: element.machineNo,\r\n value: '',\r\n lat: '',\r\n lng: '',\r\n isNotify: false,\r\n link: '',\r\n type: 'Car',\r\n //}\r\n })\r\n }\r\n //console.log('sssssssssssssssss' + JSON.stringify(allSensors))\r\n locax.current = allSensors\r\n\r\n setState({\r\n ...state,\r\n SensorList: response.data.result.devices,\r\n })\r\n\r\n sensors.current = response.data.result.devices\r\n\r\n setTimeout(() => {\r\n for (let index = 0; index < sensors.current.length; index++) {\r\n const element = sensors.current[index]\r\n try {\r\n eval(layout.globalJs + ';' + element.tempFeild1)\r\n } catch (error) {\r\n console.log(error)\r\n }\r\n }\r\n setState({\r\n ...state,\r\n SensorList: sensors.current,\r\n DashboardStat: 'INITIALIZATION',\r\n })\r\n setTimeout(() => {\r\n const newConnection = new HubConnectionBuilder()\r\n .withUrl(hubService + '/' + response.data.result.hub + '/Hub')\r\n .withAutomaticReconnect()\r\n .build()\r\n setConnection(newConnection)\r\n }, 100)\r\n }, 500)\r\n })\r\n }, [])\r\n\r\n if (editor != undefined && isload && layout.designObject.length > 0) {\r\n var desginObject = {\r\n version: '4.3.1',\r\n objects: [],\r\n }\r\n for (let index = 0; index < layout.designObject.length; index++) {\r\n const element = layout.designObject[index]\r\n var ds = JSON.parse(element.tempFeild1)\r\n //Movement:\r\n ds.lockMovementX = true\r\n ds.lockMovementY = true\r\n\r\n //Scaling:\r\n ds.lockScalingX = true\r\n ds.lockScalingY = true\r\n\r\n // Rotation:\r\n ds.lockRotation = true\r\n\r\n // Object's frame/bounidngBox:\r\n ds.hasControls = false\r\n ds.hasBorders = false\r\n desginObject.objects.push(ds)\r\n }\r\n editor?.canvas.loadFromJSON(desginObject)\r\n\r\n setisload(false)\r\n }\r\n\r\n let bodyCss = {\r\n overflowX: 'hidden',\r\n }\r\n\r\n function hideAllNotification() {\r\n toast.dismissAll()\r\n }\r\n\r\n function hideNotification(notification) {\r\n toast.dismiss(notification.toastId)\r\n }\r\n\r\n function getTransactionType(transition) {\r\n switch (transition.toLowerCase()) {\r\n case 'flip':\r\n return Flip\r\n case 'slide':\r\n return Slide\r\n case 'zoom':\r\n return Zoom\r\n\r\n default:\r\n return Bounce\r\n }\r\n }\r\n function getType(type) {\r\n switch (type.toLowerCase()) {\r\n case 'info':\r\n return toast.TYPE.INFO\r\n case 'error':\r\n return toast.TYPE.ERROR\r\n case 'success':\r\n return toast.TYPE.SUCCESS\r\n case 'warning':\r\n return toast.TYPE.WARNING\r\n default:\r\n return toast.TYPE.INFO\r\n }\r\n }\r\n\r\n function showNotification(notification) {\r\n notification.transition = getTransactionType(notification.transition)\r\n if (toast.isActive(notification.toastId)) {\r\n notification.render = notification.message\r\n notification.type = getType(notification.type)\r\n toast.update(notification.toastId, notification)\r\n return\r\n }\r\n\r\n switch (notification.type) {\r\n case 'error':\r\n toast.error(notification.message, notification)\r\n break\r\n case 'info':\r\n toast.info(notification.message, notification)\r\n break\r\n case 'warning':\r\n toast.warn(notification.message, notification)\r\n break\r\n case 'success':\r\n toast.success(notification.message, notification)\r\n break\r\n default:\r\n toast(notification.message)\r\n break\r\n }\r\n }\r\n\r\n function Notification(notification) {\r\n if (toast.isActive(notification.toastId)) {\r\n toast.dismiss(notification.toastId)\r\n }\r\n switch (notification.Type) {\r\n case 'error':\r\n toast.error(notification.Message, {\r\n toastId: notification?.toastId ?? 'default',\r\n position: notification?.Position ?? 'top-right',\r\n autoClose: notification?.Autoclose ?? 5000,\r\n hideProgressBar: true,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n })\r\n break\r\n\r\n case 'info':\r\n toast.info(notification.Message, {\r\n position: notification?.Position ?? 'top-right',\r\n autoClose: notification?.Autoclose ?? 5000,\r\n toastId: notification?.toastId ?? 'default',\r\n hideProgressBar: false,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n })\r\n break\r\n case 'warning':\r\n toast.warn(notification.Message, {\r\n position: notification?.Position ?? 'top-right',\r\n autoClose: notification?.Autoclose ?? 5000,\r\n toastId: notification.toastId ?? 'default',\r\n hideProgressBar: false,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n })\r\n break\r\n case 'success':\r\n toast.success(notification.Message, {\r\n position: notification?.Position ?? 'top-right',\r\n autoClose: notification?.Autoclose ?? 5000,\r\n toastId: notification?.toastId ?? 'default',\r\n hideProgressBar: false,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n })\r\n break\r\n default:\r\n toast('Wow so easy!')\r\n break\r\n }\r\n }\r\n\r\n let backcss = {\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0,\r\n margin: 'auto',\r\n width: '1200px',\r\n }\r\n\r\n let sensorcss = {\r\n position: 'absolute',\r\n width: '1200px',\r\n }\r\n\r\n if (!layout.isZoom) {\r\n backcss = {\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0,\r\n margin: 'auto',\r\n }\r\n\r\n sensorcss = {\r\n position: 'absolute',\r\n }\r\n\r\n bodyCss = {}\r\n }\r\n {\r\n /*\r\n if (isloading) {\r\n return (\r\n <>\r\n \r\n \r\n
\r\n

Elysium Automation

\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 return (\r\n \r\n \r\n {/* */}\r\n \r\n
\r\n {/*

\r\n {layout.layoutName}
\r\n Elysium IOT\r\n \r\n {state.DashboardStat === 'DISABLED' && (\r\n \r\n {state.DashboardStat}\r\n \r\n )}\r\n {state.DashboardStat === 'ACTIVE' && (\r\n \r\n {state.DashboardStat}\r\n \r\n )}\r\n {state.DashboardStat === 'CONNECTED' && (\r\n \r\n {state.DashboardStat}\r\n \r\n )}\r\n {state.DashboardStat === 'CONNECTING' && (\r\n \r\n {state.DashboardStat}\r\n \r\n )}\r\n

/*}\r\n {/*
\r\n {new Date().getFullYear()} ©\r\n \r\n overleap | Elysium\r\n \r\n
*/}\r\n
\r\n \r\n {loc.map(\r\n (marker, index) =>\r\n marker.lat != '' && (\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 Map\r\n//https://codesandbox.io/s/k2ds4?file=/src/App.js:128-4341\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React from 'react'\r\n\r\nexport function Dropdown1() {\r\n return (\r\n
\r\n
\r\n
Filter Options
\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\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 Reset\r\n \r\n\r\n \r\n
\r\n
\r\n
\r\n )\r\n}\r\n","import clsx from 'clsx'\r\nimport React, { FC } from 'react'\r\nimport { Link } from 'react-router-dom'\r\nimport { useLayout } from '../../../core/LayoutProvider'\r\nimport { usePageData } from '../../../core/PageData'\r\n\r\nconst DefaultTitle: FC = () => {\r\n const { pageTitle, pageDescription, pageBreadcrumbs } = usePageData()\r\n const { config, attributes, classes } = useLayout()\r\n return (\r\n \r\n\r\n {/* begin::Title */}\r\n {pageTitle && (\r\n

\r\n {pageTitle}\r\n {pageDescription && config.pageTitle && config.pageTitle.description && (\r\n <>\r\n \r\n {pageDescription}\r\n \r\n )}\r\n

\r\n )}\r\n {/* end::Title */}\r\n\r\n {pageBreadcrumbs &&\r\n pageBreadcrumbs.length > 0 &&\r\n config.pageTitle &&\r\n config.pageTitle.breadCrumbs && (\r\n <>\r\n {config.pageTitle.direction === 'row' && (\r\n \r\n )}\r\n
    \r\n {Array.from(pageBreadcrumbs).map((item, index) => (\r\n \r\n {!item.isSeparator ? (\r\n \r\n {item.title}\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n ))}\r\n
  • {pageTitle}
  • \r\n
\r\n \r\n )}\r\n \r\n )\r\n}\r\n\r\nexport { DefaultTitle }\r\n","import React, {useState, useEffect, useRef} from 'react'\r\nimport './../../../../_metronic/assets/sass/kntdashbaord.css'\r\nimport {HubConnectionBuilder, JsonHubProtocol} from '@microsoft/signalr'\r\nimport axios from 'axios'\r\nimport useWindowDimensions from '../../helpers/WindowDimension'\r\nimport Dictionary from '../../helpers/Dictionary'\r\nimport {KTSVG, toAbsoluteUrl} from '../../../../_metronic/helpers'\r\nimport {Dropdown1} from '../../../../_metronic/partials'\r\nimport {AsideDefault} from '../../../../_metronic/layout/components/aside/AsideDefault'\r\nimport {Footer} from '../../../../_metronic/layout/components/Footer'\r\nimport {HeaderWrapper} from '../../../../_metronic/layout/components/header/HeaderWrapper'\r\nimport {PageDataProvider} from '../../../../_metronic/layout/core'\r\nimport {Content} from '../../../../_metronic/layout/components/Content'\r\nimport {\r\n ChartsWidget1,\r\n TablesWidget1,\r\n ListsWidget5,\r\n TablesWidget5,\r\n} from '../../../../_metronic/partials/widgets'\r\nimport {stat} from 'fs'\r\nimport Confetti from 'react-confetti'\r\nimport ImageMapper from 'react-image-mapper'\r\nimport Draggable from 'react-draggable'\r\nimport {v4 as uuidv4} from 'uuid'\r\nimport Popup from 'reactjs-popup'\r\nimport 'reactjs-popup/dist/index.css'\r\nimport SensorArea from './SensorArea'\r\nimport {auto, hide, right} from '@popperjs/core'\r\nimport {ToastContainer, toast, Slide, Zoom, Flip, Bounce} from 'react-toastify'\r\n\r\nimport {FabricJSCanvas, useFabricJSEditor} from 'fabricjs-react'\r\nimport {fabric} from 'fabric'\r\n\r\nimport 'react-toastify/dist/ReactToastify.css'\r\nvar randomColor = require('randomcolor')\r\n\r\nfunction DisplayGroup(props) {\r\n const [connection, setConnection] = useState(null)\r\n const reconnectRef = useRef(0)\r\n const urlParams = new URLSearchParams(window.location.search)\r\n const {selectedObjects, setSelectedObject, editor, onReady} = useFabricJSEditor({\r\n defaultStrokeColor: 'red',\r\n })\r\n const [isloading, setLoading] = useState(true)\r\n const [item, setItem] = useState('')\r\n const [SensorList, setsensorList] = useState([])\r\n const sensors = useRef([])\r\n const [text, setText] = useState('')\r\n const [strokeColor, setStrokeColor] = useState('')\r\n const [fillColor, setFillColor] = useState('')\r\n const [isload, setisload] = useState(true)\r\n\r\n const [layout, setLayout] = useState({\r\n id: props.match?.params?.id ?? props.layout, //urlParams.get('id')??props.layout,\r\n layoutName: '',\r\n imageData: null,\r\n devices: [],\r\n isZoom: false,\r\n globalJs: '',\r\n hub: '',\r\n designObject: [],\r\n })\r\n const [state, setState] = useState({\r\n Data: {},\r\n DashboardStat: 'CONNECTING',\r\n SensorList: [],\r\n })\r\n\r\n const hubService = process.env.REACT_APP_MIDAS_HUB // \"https://signalr.midassit.com\";\r\n\r\n useEffect(() => {\r\n if (connection) {\r\n connection\r\n .start()\r\n .then((result) => {\r\n setState({\r\n ...state,\r\n DashboardStat: 'CONNECTED',\r\n })\r\n setLoading(false)\r\n reconnectRef.current = 0\r\n //// console.log('Connected!');\r\n connection.onreconnecting((error) => {\r\n setState({\r\n ...state,\r\n DashboardStat: 'RECONNECTING',\r\n })\r\n // // console.log('Connection lost due to error . Reconnecting.')\r\n })\r\n\r\n // Reconnect if hub disconnects\r\n connection.onclose(function (e) {\r\n setState({\r\n ...state,\r\n DashboardStat: 'DISCONNECTED',\r\n })\r\n //// console.log('Disconnected');\r\n })\r\n\r\n connection.on('ReceiveMessage', (message) => {\r\n if (typeof message === 'string' || message instanceof String) {\r\n message = JSON.parse(message)\r\n }\r\n\r\n // if (message.key !== \"SensorData\")\r\n // return;\r\n\r\n let dataPacket = JSON.parse(message.data)\r\n\r\n if (\r\n dataPacket.TimeStamp === undefined ||\r\n Math.round((new Date() - new Date(dataPacket.TimeStamp)) / 1000) > 10\r\n ) {\r\n return\r\n } else {\r\n if (dataPacket?.Notifications !== undefined && dataPacket?.Notifications.length > 0) {\r\n toast.dismiss()\r\n for (let index = 0; index < dataPacket?.Notifications.length; index++) {\r\n const notification = dataPacket?.Notifications[index]\r\n switch (notification.Type) {\r\n case 'error':\r\n toast.error(notification.Message, {\r\n position: notification?.Position ?? 'top-right',\r\n autoClose: notification?.Autoclose ?? 5000,\r\n hideProgressBar: true,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n })\r\n break\r\n\r\n case 'info':\r\n toast.info(notification.Message, {\r\n position: notification?.Position ?? 'top-right',\r\n autoClose: notification?.Autoclose ?? 5000,\r\n hideProgressBar: false,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n })\r\n break\r\n case 'warning':\r\n toast.warn(notification.Message, {\r\n position: notification?.Position ?? 'top-right',\r\n autoClose: notification?.Autoclose ?? 5000,\r\n hideProgressBar: false,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n })\r\n break\r\n case 'success':\r\n toast.success(notification.Message, {\r\n position: notification?.Position ?? 'top-right',\r\n autoClose: notification?.Autoclose ?? 5000,\r\n hideProgressBar: false,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n })\r\n break\r\n default:\r\n toast('Wow so easy!')\r\n break\r\n }\r\n }\r\n }\r\n\r\n let newElements = {}\r\n Object.entries(dataPacket).map(([key, value]) => {\r\n newElements[key] = value\r\n })\r\n\r\n Object.entries(dataPacket).map(([key, value]) => {\r\n for (let index = 0; index < sensors.current.length; index++) {\r\n const element = sensors.current[index]\r\n if (element.machineNo === '') continue\r\n\r\n if (element.icon === undefined) element.icon = 'dot'\r\n\r\n if (\r\n element.isNotify === undefined ||\r\n element.isNotify === '' ||\r\n element.isNotify === null\r\n )\r\n element.isNotify = false\r\n\r\n if (!element.lastUpdate) {\r\n element.lastUpdate = new Date()\r\n } else if (Math.round((new Date() - new Date(element.lastUpdate)) / 1000) > 60) {\r\n //element.value = \"---\";\r\n //element.color = 'black';\r\n if (\r\n element.type == 14 ||\r\n element.type == 13 ||\r\n element.type == 17 ||\r\n element.type == 15\r\n ) {\r\n //// console.log(\"[chart data cleared \"+element.machineNo.toString().toLowerCase()+\"]\");\r\n element.value = []\r\n } else {\r\n element.value = '---'\r\n element.color = 'black'\r\n }\r\n }\r\n\r\n let object = element.object.toString().toLowerCase()\r\n if (props?.object !== undefined && props?.object !== '') {\r\n object = props?.object.toString().toLowerCase()\r\n }\r\n\r\n //console.log(\"\"+message.packetType.toString().toLowerCase()+\" === \"+object)\r\n\r\n if (\r\n element.machineNo.toString().toLowerCase() === key.toString().toLowerCase() &&\r\n message.packetType.toString().toLowerCase() === object\r\n ) {\r\n console.log(message)\r\n // console.log(\"[DB PACKET \"+element.machineNo.toString().toLowerCase()+\"]\"+JSON.stringify(value));\r\n element.lastUpdate = new Date()\r\n element.value = value\r\n element.color = 'black'\r\n element.notification = {\r\n toastId: key.toString().toLowerCase(),\r\n position: 'top-right',\r\n type: 'info',\r\n autoClose: false, // or set time\r\n hideProgressBar: false,\r\n closeOnClick: true,\r\n // pauseOnHover: true,\r\n draggable: false,\r\n progress: undefined,\r\n transition: Bounce,\r\n }\r\n try {\r\n // alert(layout.globalJs)\r\n eval(layout.globalJs + ';' + element.formula)\r\n // eval(element.formula)\r\n } catch (error) {\r\n element.value = '---'\r\n element.color = 'black'\r\n // // console.log(element.formula)\r\n // console.log(error);\r\n }\r\n }\r\n }\r\n })\r\n setState({\r\n ...state,\r\n SensorList: sensors.current,\r\n DashboardStat: 'CONNECTED',\r\n })\r\n }\r\n })\r\n })\r\n .catch((e) => {\r\n // console.log('Connection failed: ', e);\r\n })\r\n }\r\n }, [connection])\r\n\r\n useEffect(() => {\r\n axios({\r\n method: 'get',\r\n url: process.env.REACT_APP_BACKEND_API + '/api/sensor-monitor/layout?layout=' + layout.id,\r\n headers: {},\r\n }).then((response) => {\r\n setLayout({\r\n ...layout,\r\n layoutName: response.data.result.layoutName,\r\n imageData: 'data:image/png;base64,' + response.data.result.imageData,\r\n isZoom: response.data.result.isZoom,\r\n globalJs: response.data.result.globalJs,\r\n hub: response.data.result.hub,\r\n designObject: response.data.result.designObject,\r\n })\r\n\r\n /* try {\r\n //// console.log(response.data.result.globalJs)\r\n eval(response.data.result.globalJs)\r\n } catch (error) {\r\n // console.log(error);\r\n }*/\r\n\r\n setState({\r\n ...state,\r\n SensorList: response.data.result.devices,\r\n })\r\n\r\n sensors.current = response.data.result.devices\r\n\r\n setTimeout(() => {\r\n for (let index = 0; index < sensors.current.length; index++) {\r\n const element = sensors.current[index]\r\n try {\r\n eval(layout.globalJs + ';' + element.tempFeild1)\r\n } catch (error) {\r\n // console.log(error);\r\n }\r\n }\r\n setState({\r\n ...state,\r\n SensorList: sensors.current,\r\n DashboardStat: 'INITIALIZATION',\r\n })\r\n setTimeout(() => {\r\n const newConnection = new HubConnectionBuilder()\r\n .withUrl(hubService + '/' + response.data.result.hub + '/Hub') //\r\n .withAutomaticReconnect()\r\n .build()\r\n setConnection(newConnection)\r\n }, 100)\r\n }, 500)\r\n })\r\n }, [])\r\n\r\n if (editor != undefined && isload && layout.designObject.length > 0) {\r\n var desginObject = {\r\n version: '4.3.1',\r\n objects: [],\r\n }\r\n for (let index = 0; index < layout.designObject.length; index++) {\r\n const element = layout.designObject[index]\r\n var ds = JSON.parse(element.tempFeild1)\r\n //Movement:\r\n ds.lockMovementX = true\r\n ds.lockMovementY = true\r\n\r\n //Scaling:\r\n ds.lockScalingX = true\r\n ds.lockScalingY = true\r\n\r\n // Rotation:\r\n ds.lockRotation = true\r\n\r\n // Object's frame/bounidngBox:\r\n ds.hasControls = false\r\n ds.hasBorders = false\r\n desginObject.objects.push(ds)\r\n }\r\n editor?.canvas.loadFromJSON(desginObject)\r\n setisload(false)\r\n }\r\n\r\n let bodyCss = {\r\n overflowX: 'hidden',\r\n }\r\n\r\n function hideAllNotification() {\r\n toast.dismissAll()\r\n }\r\n\r\n function hideNotification(notification) {\r\n toast.dismiss(notification.toastId)\r\n }\r\n\r\n function getTransactionType(transition) {\r\n switch (transition.toLowerCase()) {\r\n case 'flip':\r\n return Flip\r\n case 'slide':\r\n return Slide\r\n case 'zoom':\r\n return Zoom\r\n\r\n default:\r\n return Bounce\r\n }\r\n }\r\n function getType(type) {\r\n switch (type.toLowerCase()) {\r\n case 'info':\r\n return toast.TYPE.INFO\r\n case 'error':\r\n return toast.TYPE.ERROR\r\n case 'success':\r\n return toast.TYPE.SUCCESS\r\n case 'warning':\r\n return toast.TYPE.WARNING\r\n default:\r\n return toast.TYPE.INFO\r\n }\r\n }\r\n\r\n function showNotification(notification) {\r\n notification.transition = getTransactionType(notification.transition)\r\n if (toast.isActive(notification.toastId)) {\r\n notification.render = notification.message\r\n notification.type = getType(notification.type)\r\n toast.update(notification.toastId, notification)\r\n return\r\n }\r\n\r\n switch (notification.type) {\r\n case 'error':\r\n toast.error(notification.message, notification)\r\n break\r\n case 'info':\r\n toast.info(notification.message, notification)\r\n break\r\n case 'warning':\r\n toast.warn(notification.message, notification)\r\n break\r\n case 'success':\r\n toast.success(notification.message, notification)\r\n break\r\n default:\r\n toast(notification.message)\r\n break\r\n }\r\n }\r\n\r\n function Notification(notification) {\r\n if (toast.isActive(notification.toastId)) {\r\n toast.dismiss(notification.toastId)\r\n }\r\n switch (notification.Type) {\r\n case 'error':\r\n toast.error(notification.Message, {\r\n toastId: notification?.toastId ?? 'default',\r\n position: notification?.Position ?? 'top-right',\r\n autoClose: notification?.Autoclose ?? 5000,\r\n hideProgressBar: true,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n })\r\n break\r\n\r\n case 'info':\r\n toast.info(notification.Message, {\r\n position: notification?.Position ?? 'top-right',\r\n autoClose: notification?.Autoclose ?? 5000,\r\n toastId: notification?.toastId ?? 'default',\r\n hideProgressBar: false,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n })\r\n break\r\n case 'warning':\r\n toast.warn(notification.Message, {\r\n position: notification?.Position ?? 'top-right',\r\n autoClose: notification?.Autoclose ?? 5000,\r\n toastId: notification.toastId ?? 'default',\r\n hideProgressBar: false,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n })\r\n break\r\n case 'success':\r\n toast.success(notification.Message, {\r\n position: notification?.Position ?? 'top-right',\r\n autoClose: notification?.Autoclose ?? 5000,\r\n toastId: notification?.toastId ?? 'default',\r\n hideProgressBar: false,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n })\r\n break\r\n default:\r\n toast('Wow so easy!')\r\n break\r\n }\r\n }\r\n\r\n let backcss = {\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0,\r\n margin: 'auto',\r\n width: '1200px',\r\n }\r\n\r\n let sensorcss = {\r\n position: 'absolute',\r\n width: '1200px',\r\n }\r\n\r\n if (!layout.isZoom) {\r\n backcss = {\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0,\r\n margin: 'auto',\r\n }\r\n\r\n sensorcss = {\r\n position: 'absolute',\r\n }\r\n\r\n bodyCss = {}\r\n }\r\n if (isloading) {\r\n return (\r\n <>\r\n
\r\n {/* begin::Content */}\r\n
\r\n
\r\n
\r\n \r\n <>\r\n {' '}\r\n {state.DashboardStat}{' '}\r\n \r\n \r\n
\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\nexport default DisplayGroup\r\n//https://codesandbox.io/s/k2ds4?file=/src/App.js:128-4341\r\n","import React, {FC} from 'react'\r\n\r\nconst Toggle: FC = () => (\r\n \r\n Explore\r\n \r\n)\r\n\r\nexport {Toggle}\r\n","import React, {useState, useEffect, useRef, PureComponent, useMemo} from 'react'\r\nimport {\r\n Chart as ChartJS,\r\n CategoryScale,\r\n LinearScale,\r\n PointElement,\r\n LineElement,\r\n Title,\r\n Tooltip,\r\n Legend,\r\n} from 'chart.js'\r\nimport {Line} from 'react-chartjs-2'\r\nimport parse from 'html-react-parser'\r\nimport axios from 'axios'\r\nimport {stat} from 'fs'\r\n\r\nChartJS.register(CategoryScale, LinearScale, PointElement, LineElement, Title, Tooltip, Legend)\r\n\r\nfunction Chartj(props) {\r\n // console.log(JSON.stringify(props?.item?.datasets))\r\n const labels = []\r\n const chartReference = React.createRef()\r\n const [state, setState] = useState({\r\n config: props?.item?.config ?? {\r\n label: props?.item?.config?.label ?? 'TimeStamp',\r\n data: props?.item?.config?.data ?? 'C_value',\r\n url: props?.item?.config?.url ?? '/api/sensor/getall',\r\n refersh: props?.item?.config?.refersh ?? 5000,\r\n sort: props?.item?.config?.sort ?? 'TimeStamp: -1',\r\n find: props?.item?.config?.find ?? 'TimeStamp : today',\r\n project: props?.item?.config?.project ?? 'TimeStamp: 1, C_value: 1',\r\n },\r\n name: 'React',\r\n option: props?.item?.option ?? {\r\n responsive: props?.item?.responsive ?? true,\r\n plugins: props?.item?.plugins ?? {\r\n legend: {\r\n position: 'top',\r\n },\r\n title: props?.item?.title ?? {\r\n display: true,\r\n text: 'chart name',\r\n },\r\n elements: {line: {tension: 0.4}},\r\n },\r\n y: props?.item?.y ?? {\r\n min: props?.item?.y?.min ?? -30,\r\n max: props?.item?.y?.max ?? 10,\r\n ticks: props?.item?.y?.ticks ?? {\r\n min: 0,\r\n max: 150,\r\n stepSize: 20,\r\n },\r\n },\r\n x: props?.item?.y ?? {},\r\n },\r\n data: props?.item?.data ?? {\r\n labels,\r\n datasets: props?.item?.datasets ?? [\r\n {\r\n label: '',\r\n data: [],\r\n tension: 0.4,\r\n borderColor: 'rgb(255, 99, 132)',\r\n backgroundColor: 'rgba(255, 99, 132, 0.5)',\r\n },\r\n ],\r\n },\r\n })\r\n\r\n useEffect(() => {\r\n RefreshData()\r\n setInterval(() => {\r\n RefreshData()\r\n }, state.config?.refersh)\r\n }, [])\r\n\r\n function RefreshData() {\r\n var datafield = {}\r\n datafield['sort'] = state.config.sort\r\n datafield['find'] = state.config.find\r\n datafield['project'] = state.config.project\r\n axios({\r\n method: 'post',\r\n url: process.env.REACT_APP_BACKEND_API + state.config.url,\r\n headers: {},\r\n data: datafield,\r\n }).then((response) => {\r\n if (response.data.status == 'S') {\r\n const labelsx = []\r\n const datax = []\r\n for (let index = 0; index < response.data.result.length; index++) {\r\n const element = response.data.result[index]\r\n labelsx.push(element[state.config.label])\r\n datax.push(element[state.config.data])\r\n }\r\n const chart = chartReference.current\r\n chart.data.labels = labelsx\r\n state.data.datasets[0].data = datax\r\n chart.data.datasets[0] = state.data.datasets[0]\r\n chart.update('none')\r\n }\r\n })\r\n }\r\n\r\n return (\r\n \r\n <>\r\n {state.option.plugins.title.text}\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default Chartj\r\n//https://codesandbox.io/s/k2ds4?file=/src/App.js:128-4341\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React from 'react'\r\nimport { Dropdown1 } from '../../content/dropdown/Dropdown1'\r\nimport { KTSVG } from '../../../helpers'\r\n\r\ntype Props = {\r\n className: string\r\n color: string\r\n factoryName: string\r\n critical: string\r\n warning: string\r\n connected: number\r\n alldevice: number\r\n alert: string\r\n link: string\r\n}\r\n\r\n\r\n\r\nconst routeChange = (link: any) => {\r\n window.location.href = link;\r\n // alert('asa' + link)\r\n}\r\n\r\nconst MixedWidget1: React.FC = ({ className, color, factoryName, critical, warning, connected, alert, alldevice, link }) => {\r\n\r\n let val = '';\r\n color = 'success'\r\n\r\n if (alldevice === 0 || alldevice == undefined) {\r\n color = 'dark'\r\n val = '0%'\r\n } else {\r\n val = Math.round((connected / alldevice) * 100) + \"%\";\r\n }\r\n\r\n if (parseFloat(critical ?? 0) > 0) {\r\n color = 'danger'\r\n }\r\n\r\n if (connected === 0) {\r\n color = 'dark'\r\n }\r\n\r\n\r\n return (\r\n
routeChange(link)}>\r\n {/* begin::Body */}\r\n
\r\n {/* begin::Header */}\r\n
\r\n {/* begin::Heading */}\r\n
\r\n

{factoryName}

\r\n
\r\n\r\n {!(val == '0%' || alldevice == undefined) && (<>\r\n \r\n \r\n )}\r\n\r\n {/*\r\n \r\n \r\n \r\n begin::Menu */}\r\n {/* end::Menu */}\r\n
\r\n
\r\n {/* end::Heading */}\r\n {/* begin::Balance */}\r\n
\r\n Crtical \r\n \r\n {critical}\r\n \r\n
\r\n {/* end::Balance */}\r\n
\r\n {/* end::Header */}\r\n {/* begin::Items */}\r\n \r\n\r\n {/* begin::Item */}\r\n
\r\n
\r\n {/* begin::Title */}\r\n
\r\n \r\n Warrnings\r\n \r\n
\r\n \r\n
\r\n
\r\n {/* end::Title */}\r\n {/* begin::Label */}\r\n
\r\n
{warning}
\r\n \r\n
\r\n {/* end::Label */}\r\n
\r\n {/* end::Description */}\r\n
\r\n {/* end::Item */}\r\n {/* begin::Item */}\r\n
\r\n\r\n
\r\n {/* begin::Title */}\r\n \r\n {/* end::Title */}\r\n {/* begin::Label */}\r\n
\r\n
{val}
\r\n \r\n
\r\n {/* end::Label */}\r\n
\r\n {/* end::Description */}\r\n
\r\n
\r\n\r\n
\r\n {/* begin::Title */}\r\n \r\n {/* end::Title */}\r\n {/* begin::Label */}\r\n
\r\n
{alldevice}
\r\n \r\n
\r\n {/* end::Label */}\r\n
\r\n {/* end::Description */}\r\n
\r\n\r\n\r\n {/* end::Item */}\r\n {/* begin::Item */}\r\n
\r\n\r\n
\r\n {/* begin::Title */}\r\n
\r\n \r\n Alerts\r\n \r\n
Past 24 hours
\r\n
\r\n {/* end::Title */}\r\n {/* begin::Label */}\r\n
\r\n
{alert}
\r\n \r\n
\r\n {/* end::Label */}\r\n
\r\n {/* end::Description */}\r\n
\r\n {/* end::Item */}\r\n
\r\n {/* end::Items */}\r\n\r\n
\r\n\r\n {/* end::Body */}\r\n \r\n )\r\n\r\n return (\r\n
routeChange(link)} style={{ cursor: 'pointer' }}>\r\n {/* begin::Body */}\r\n
\r\n {/* begin::Header */}\r\n
\r\n {/* begin::Heading */}\r\n
\r\n

{factoryName}

\r\n
\r\n {!(val == '0%' || alldevice == undefined) && (<>\r\n \r\n \r\n )}\r\n\r\n {/*\r\n \r\n \r\n \r\n begin::Menu */}\r\n {/* end::Menu */}\r\n
\r\n
\r\n {/* end::Heading */}\r\n {/* begin::Balance */}\r\n
\r\n Crtical\r\n\r\n \r\n {critical}\r\n \r\n
\r\n {/* end::Balance */}\r\n
\r\n {/* end::Header */}\r\n {/* begin::Items */}\r\n \r\n {/* begin::Item */}\r\n
\r\n\r\n
\r\n {/* begin::Title */}\r\n
\r\n \r\n Total\r\n \r\n
\r\n
\r\n {/* end::Title */}\r\n {/* begin::Label */}\r\n
\r\n
{alldevice}
\r\n \r\n
\r\n {/* end::Label */}\r\n
\r\n {/* end::Description */}\r\n
\r\n {/* end::Item */}\r\n {/* begin::Item */}\r\n
\r\n\r\n
\r\n {/* begin::Title */}\r\n
\r\n \r\n Warrnings\r\n \r\n
\r\n \r\n
\r\n
\r\n {/* end::Title */}\r\n {/* begin::Label */}\r\n
\r\n
{warning}
\r\n \r\n
\r\n {/* end::Label */}\r\n
\r\n {/* end::Description */}\r\n
\r\n {/* end::Item */}\r\n {/* begin::Item */}\r\n
\r\n\r\n
\r\n {/* begin::Title */}\r\n \r\n {/* end::Title */}\r\n {/* begin::Label */}\r\n
\r\n
{val}
\r\n \r\n
\r\n {/* end::Label */}\r\n
\r\n {/* end::Description */}\r\n
\r\n {/* end::Item */}\r\n {/* begin::Item */}\r\n
\r\n\r\n
\r\n {/* begin::Title */}\r\n
\r\n \r\n Alerts\r\n \r\n
Past 24 hours
\r\n
\r\n {/* end::Title */}\r\n {/* begin::Label */}\r\n
\r\n
{alert}
\r\n \r\n
\r\n {/* end::Label */}\r\n
\r\n {/* end::Description */}\r\n
\r\n {/* end::Item */}\r\n
\r\n {/* end::Items */}\r\n
\r\n {/* end::Body */}\r\n \r\n )\r\n}\r\n\r\nexport { MixedWidget1 }\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, { useEffect, useRef } from 'react'\r\nimport ApexCharts, { ApexOptions } from 'apexcharts'\r\nimport { KTSVG } from '../../../helpers'\r\nimport { getCSSVariableValue } from '../../../assets/ts/_utils'\r\nimport { Dropdown1 } from '../../content/dropdown/Dropdown1'\r\n\r\ntype Props = {\r\n className: string\r\n chartColor: string\r\n chartHeight: string\r\n}\r\n\r\nconst MixedWidget7: React.FC = ({ className, chartColor, chartHeight }) => {\r\n const chartRef = useRef(null)\r\n\r\n useEffect(() => {\r\n if (!chartRef.current) {\r\n return\r\n }\r\n\r\n const chart = new ApexCharts(chartRef.current, chartOptions(chartColor, chartHeight))\r\n if (chart) {\r\n chart.render()\r\n }\r\n\r\n return () => {\r\n if (chart) {\r\n chart.destroy()\r\n }\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [chartRef])\r\n\r\n return (\r\n
\r\n {/* begin::Beader */}\r\n
\r\n

\r\n Action Needed\r\n Check and Verified following Attempts\r\n

\r\n\r\n
\r\n {/* begin::Menu */}\r\n \r\n \r\n \r\n \r\n {/* end::Menu */}\r\n
\r\n
\r\n {/* end::Header */}\r\n\r\n {/* begin::Body */}\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n

\r\n Notes:  make sure\r\n to verify all alerts\r\n
\r\n & warnings\r\n

\r\n\r\n \r\n Take Action\r\n \r\n
\r\n
\r\n {/* end::Body */}\r\n
\r\n )\r\n}\r\n\r\nconst chartOptions = (chartColor: string, chartHeight: string): ApexOptions => {\r\n const baseColor = getCSSVariableValue('--bs-' + chartColor)\r\n const lightColor = getCSSVariableValue('--bs-light-' + chartColor)\r\n const labelColor = getCSSVariableValue('--bs-gray-700')\r\n\r\n return {\r\n series: [74],\r\n chart: {\r\n fontFamily: 'inherit',\r\n height: chartHeight,\r\n type: 'radialBar',\r\n },\r\n plotOptions: {\r\n radialBar: {\r\n hollow: {\r\n margin: 0,\r\n size: '65%',\r\n },\r\n dataLabels: {\r\n name: {\r\n show: false,\r\n fontWeight: '700',\r\n },\r\n value: {\r\n color: labelColor,\r\n fontSize: '30px',\r\n fontWeight: '700',\r\n offsetY: 12,\r\n show: true,\r\n formatter: function (val) {\r\n return val + '%'\r\n },\r\n },\r\n },\r\n track: {\r\n background: lightColor,\r\n strokeWidth: '100%',\r\n },\r\n },\r\n },\r\n colors: [baseColor],\r\n stroke: {\r\n lineCap: 'round',\r\n },\r\n labels: ['Progress'],\r\n }\r\n}\r\n\r\nexport { MixedWidget7 }\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, { useEffect, useRef } from 'react'\r\nimport ApexCharts, { ApexOptions } from 'apexcharts'\r\nimport { getCSSVariableValue } from '../../../assets/ts/_utils'\r\nimport { link } from 'fs'\r\nimport { config } from 'process'\r\n\r\ntype Props = {\r\n className: string\r\n chartColor: string\r\n chartHeight: string\r\n name: string\r\n min: string\r\n max: string\r\n val: number\r\n Link: string\r\n extra: string,\r\n type: string,\r\n\r\n}\r\n\r\nconst routeChange = (link: any) => {\r\n window.location.href = link;\r\n // alert('asa' + link)\r\n}\r\n\r\nconst MixedWidget10: React.FC = ({ className, chartColor, chartHeight, name, min, max, val, Link, extra, type }) => {\r\n\r\n const chartRef = useRef(null)\r\n let obj = JSON.parse(extra)\r\n\r\n var color = ''\r\n if (type === \"OFFLINE\") {\r\n color = 'dark'\r\n return (\r\n
routeChange(Link)} style={{ cursor: 'pointer' }}>\r\n {/* begin::Body */}\r\n
\r\n {/* begin::Stats */}\r\n
\r\n
\r\n
\r\n \r\n {obj?.Description}\r\n \r\n
{obj?.Name}
\r\n
{obj?.Note}
\r\n
\r\n
---
\r\n
\r\n
\r\n {/* end::Stats */}\r\n\r\n\r\n
\r\n {/* end::Body */}\r\n
\r\n )\r\n }\r\n\r\n\r\n\r\n return (\r\n
routeChange(Link)} style={{ cursor: 'pointer' }}>\r\n {/* begin::Body */}\r\n
\r\n {/* begin::Stats */}\r\n
\r\n
\r\n
\r\n \r\n {obj?.Description}\r\n \r\n
{obj?.Name}
\r\n
{obj?.Note}
\r\n
\r\n
{val}°C
\r\n
\r\n <>\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n {/* end::Stats */}\r\n\r\n\r\n
\r\n {/* end::Body */}\r\n
\r\n )\r\n}\r\n\r\n\r\nexport { MixedWidget10 }\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, { useEffect, useRef } from 'react'\r\nimport ApexCharts, { ApexOptions } from 'apexcharts'\r\nimport { getCSSVariableValue } from '../../../assets/ts/_utils'\r\nimport { link } from 'fs'\r\nimport { config } from 'process'\r\nimport { KTSVG, toAbsoluteUrl } from '../../../../_metronic/helpers'\r\n\r\ntype Props = {\r\n className: string\r\n chartColor: string\r\n chartHeight: string\r\n name: string\r\n min: string\r\n max: string\r\n val: number\r\n Link: string\r\n type: string,\r\n data: string\r\n}\r\n\r\nconst transformString = (str: any) => {\r\n // Remove \"smartgas.\" part and split by ':'\r\n const parts = str.replace('smartgas.', '').split(':');\r\n\r\n // Join parts with '_', prefix first part with 'c'\r\n return str;// `c_${parts.join('_')}`;\r\n};\r\n\r\nconst routeChange = (link: any) => {\r\n window.location.href = link;\r\n // alert('asa' + link)\r\n}\r\n\r\nconst MixedWidget49: React.FC = ({ className, chartColor, chartHeight, name, min, max, val, Link, type, data }) => {\r\n\r\n\r\n\r\n const chartRef = useRef(null)\r\n\r\n var color = ''\r\n // if (type === \"OFFLINE\") {\r\n // color = 'dark'\r\n // return (\r\n //
routeChange(Link)} style={{ cursor: 'pointer' }}>\r\n // {/* begin::Body */}\r\n //
\r\n // {/* begin::Stats */}\r\n //
\r\n //
\r\n //
\r\n // \r\n // ssssss\r\n // \r\n //
fffff
\r\n //
ereeee
\r\n //
\r\n //
---
\r\n //
\r\n //
\r\n // {/* end::Stats */}\r\n\r\n\r\n //
\r\n // {/* end::Body */}\r\n //
\r\n // )\r\n // }\r\n //console.log(data)\r\n var objList = JSON.parse(data);\r\n\r\n //\"Pg\":\"smartgas.a4:c1:38:fa:92:a9\"}\r\n //var Pg = objList.filter((item: any) => item.FieldName == \"PG\")[0]\r\n ////var obj = objList.filter((item: any) => item.FieldName == \"MCU_TEMP\")[0]\r\n var ncu_fw_ver = objList.filter((item: any) => item.FieldName == \"NCU_FW_VER\")[0]\r\n var imei = objList.filter((item: any) => item.FieldName == \"IMEI\")[0]\r\n var BAT_VOL = objList.filter((item: any) => item.FieldName == \"BAT_VOL\")[0]\r\n ////var DATETIME = objList.filter((item: any) => item.FieldName == \"DATETIME\")[0]\r\n var GAS_METER = objList.filter((item: any) => item.FieldName == \"GAS_METER\")[0]\r\n\r\n //var pr = ((GAS_METER.Value / 400.0) * 100); //\r\n var F_DATETIME = objList.filter((item: any) => item.FieldName == \"F_DATETIME\")[0]\r\n //var CSQ = objList.filter((item: any) => item.FieldName == \"CSQ\")[0]\r\n var RSSI = objList.filter((item: any) => item.FieldName == \"RSSI\")[0] ?? \"\"\r\n\r\n var TANK_SIZE = objList.filter((item: any) => item.FieldName == \"TANK_SIZE\")[0]\r\n var GAS_PERCENT = objList.filter((item: any) => item.FieldName == \"GAS_PERCENT\")[0] ?? 0\r\n var pr = GAS_PERCENT.Value ?? 0\r\n var colurx = '#900C3F';\r\n if (pr > 70) {\r\n colurx = '#09932c';\r\n }\r\n else if (pr > 45) {\r\n colurx = '#FFC300'\r\n }\r\n else {\r\n colurx = '#900C3F';\r\n }\r\n\r\n return (\r\n
routeChange(Link)} style={{ cursor: 'pointer' }}>\r\n\r\n\r\n\r\n {/* begin::Body */}\r\n
\r\n {/* begin::Stats */}\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 Footer\r\n
\r\n
\r\n
\r\n\r\n \r\n {imei?.Value ?? \"--\"} {/*JSON.stringify(objList)} */}\r\n \r\n
Tank Level: {GAS_METER?.Value} cm | Size: {TANK_SIZE?.Value ?? \"--- lb\"}
\r\n\r\n
\r\n
\r\n
{pr}%
\r\n
\r\n\r\n\r\n
\r\n <>\r\n \r\n \r\n \r\n
\r\n
\r\n <>\r\n
{F_DATETIME?.Value}
\r\n V {ncu_fw_ver?.Value ?? \"--\"} Battery {BAT_VOL?.Value} {RSSI?.Value}\r\n \r\n
\r\n
\r\n\r\n\r\n
\r\n {/* end::Stats */}\r\n\r\n\r\n
\r\n {/* end::Body */}\r\n
\r\n )\r\n}\r\n\r\n\r\nexport { MixedWidget49 }\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React from 'react'\r\nimport { Dropdown1 } from '../../content/dropdown/Dropdown1'\r\nimport { KTSVG } from '../../../helpers'\r\n\r\n\r\n\r\ntype Props = {\r\n className: string\r\n color: string\r\n factoryName: string\r\n critical: string\r\n warning: string\r\n connected: number\r\n alldevice: number\r\n alert: string\r\n link: string,\r\n key: string,\r\n timestamp: string\r\n code: string,\r\n user: any\r\n}\r\n\r\n\r\nconst routeChange = (link: any) => {\r\n window.location.href = link;\r\n}\r\n\r\nconst MixedWidget20_1: React.FC = ({ className, color, factoryName, critical, warning, connected, alert, alldevice, link, key, timestamp, code, user }) => {\r\n let val = '';\r\n color = 'success'\r\n\r\n if (alldevice === 0 || alldevice == undefined) {\r\n color = 'dark'\r\n val = '0%'\r\n } else {\r\n val = Math.round((connected / alldevice) * 100) + \"%\";\r\n }\r\n\r\n if (parseFloat(critical ?? 0) > 0) {\r\n color = 'danger'\r\n }\r\n if (connected === 0) {\r\n color = 'dark'\r\n }\r\n\r\n var normal = (connected ?? 0) - parseInt(critical ?? 0) - parseInt(warning ?? 0);\r\n var disable = (alldevice ?? 0) - (connected ?? 0);\r\n return (\r\n
\r\n {/* begin::Body */}\r\n
\r\n {/* begin::Header */}\r\n
routeChange(link)} >\r\n {/* begin::Heading */}\r\n
\r\n

{factoryName}

\r\n
\r\n\r\n {!(val == '0%' || alldevice == undefined) && (<>\r\n \r\n \r\n )}\r\n\r\n {/*\r\n \r\n \r\n \r\n begin::Menu */}\r\n {/* end::Menu */}\r\n
\r\n
\r\n {/* end::Heading */}\r\n {/* begin::Balance */}\r\n
\r\n Critical \r\n \r\n {critical}\r\n \r\n
\r\n {/* end::Balance */}\r\n
\r\n {/* end::Header */}\r\n {/* begin::Items */}\r\n \r\n\r\n {/* begin::Item */}\r\n
\r\n
\r\n {/* begin::Title */}\r\n
\r\n \r\n Warnings\r\n \r\n
\r\n Normal {normal}\r\n
\r\n
\r\n {/* end::Title */}\r\n {/* begin::Label */}\r\n
\r\n
{warning}
\r\n \r\n
\r\n {/* end::Label */}\r\n
\r\n {/* end::Description */}\r\n
\r\n {/* end::Item */}\r\n {/* begin::Item */}\r\n
\r\n\r\n
\r\n {/* begin::Title */}\r\n
\r\n \r\n Connections\r\n \r\n
\r\n Disable {disable}\r\n
\r\n
\r\n {/* end::Title */}\r\n {/* begin::Label */}\r\n
\r\n
{val}
\r\n \r\n
\r\n {/* end::Label */}\r\n
\r\n {/* end::Description */}\r\n
\r\n
\r\n
\r\n {/* begin::Title */}\r\n \r\n {/* end::Title */}\r\n {/* begin::Label */}\r\n
\r\n
{alldevice}
\r\n \r\n
\r\n {/* end::Label */}\r\n
\r\n {/* end::Description */}\r\n
\r\n {/* end::Item */}\r\n {/* begin::Item */}\r\n
\r\n\r\n
\r\n {/* begin::Title */}\r\n
\r\n \r\n Alerts\r\n \r\n
Past 24 hours
\r\n
\r\n {/* end::Title */}\r\n {/* begin::Label */}\r\n
\r\n
\r\n {alert}\r\n\r\n
\r\n \r\n
\r\n {/* end::Label */}\r\n
\r\n {/* end::Description */}\r\n
\r\n {/* begin::Title */}\r\n
\r\n
{timestamp}
{(user == 'Administrator' || user == 'Content_Admin') && edit facility info}\r\n
\r\n {/* end::Description */}\r\n\r\n {/* end::Item */}\r\n
\r\n {/* end::Items */}\r\n\r\n
\r\n\r\n {/* end::Body */}\r\n \r\n )\r\n}\r\n\r\n\r\nexport { MixedWidget20_1 }\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, { useEffect, useRef } from 'react'\r\nimport ApexCharts, { ApexOptions } from 'apexcharts'\r\nimport { getCSSVariableValue } from '../../../assets/ts/_utils'\r\nimport { link } from 'fs'\r\nimport { config } from 'process'\r\nimport { KTSVG, toAbsoluteUrl } from '../../../helpers'\r\n\r\ntype Props = {\r\n className: string\r\n chartColor: string\r\n chartHeight: string\r\n name: string\r\n min: string\r\n max: string\r\n val: number\r\n Link: string\r\n type: string\r\n data: string\r\n funcsetGasInfo: any\r\n}\r\n\r\nconst transformString = (str: any) => {\r\n // Remove \"smartgas.\" part and split by ':'\r\n const parts = str.replace('smartgas.', '').split(':');\r\n\r\n // Join parts with '_', prefix first part with 'c'\r\n return str;// `c_${parts.join('_')}`;\r\n};\r\n\r\nconst routeChange = (link: any) => {\r\n window.location.href = link;\r\n // alert('asa' + link)\r\n}\r\n\r\nconst SmartTile: React.FC = ({ className, chartColor, chartHeight, name, min, max, val, Link, type, data, funcsetGasInfo }) => {\r\n\r\n\r\n\r\n const chartRef = useRef(null)\r\n var color = ''\r\n\r\n var objList = JSON.parse(data);\r\n //\"Pg\":\"smartgas.a4:c1:38:fa:92:a9\"}\r\n //var Pg = objList.filter((item: any) => item.FieldName == \"PG\")[0]\r\n ////var obj = objList.filter((item: any) => item.FieldName == \"MCU_TEMP\")[0]\r\n var ncu_fw_ver = objList?.t_NCU_FW_VER\r\n var deviceName = objList?.GateWay;\r\n var imei = objList?.t_IMEI\r\n var BAT_VOL = objList.t_BAT_VOL\r\n ////var DATETIME = objList.filter((item: any) => item.FieldName == \"DATETIME\")[0]\r\n var GAS_METER = objList?.t_GAS_METER\r\n\r\n //var pr = ((GAS_METER.Value / 400.0) * 100); //\r\n var F_DATETIME = objList?.t_F_DATETIME\r\n //var CSQ = objList.filter((item: any) => item.FieldName == \"CSQ\")[0]\r\n var RSSI = objList?.t_RSSI ?? \"\"\r\n\r\n var TANK_SIZE = objList?.t_TANK_SIZE\r\n var GAS_PERCENT = objList?.t_GAS_PERCENT ?? 0\r\n var pr = GAS_PERCENT ?? 0\r\n var colurx = '#900C3F';\r\n if (pr > 70) {\r\n colurx = '#09932c';\r\n }\r\n else if (pr > 45) {\r\n colurx = '#FFC300'\r\n }\r\n else {\r\n colurx = '#900C3F';\r\n }\r\n\r\n return (\r\n
routeChange(Link)} style={{ cursor: 'pointer' }}>\r\n\r\n\r\n\r\n {/* begin::Body */}\r\n
\r\n {/* begin::Stats */}\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 Footer\r\n
\r\n
\r\n
\r\n\r\n \r\n
funcsetGasInfo('smartgas.' + transformString(imei))} > {deviceName ?? imei} {/*JSON.stringify(objList)} */}
\r\n
\r\n\r\n
Tank Level: {GAS_METER} cm | Size: {TANK_SIZE ?? \"--- lb\"}
\r\n\r\n
\r\n
\r\n
{pr}%
\r\n
\r\n\r\n\r\n
\r\n\r\n {objList?.E == 'E' && <>\r\n \r\n \r\n }\r\n {objList?.E == 'L' && <>\r\n \r\n \r\n }\r\n
\r\n
\r\n <>\r\n
{objList?.Date}
\r\n V {ncu_fw_ver ?? \"--\"} Battery {BAT_VOL} {RSSI}\r\n \r\n
\r\n
\r\n\r\n\r\n
\r\n {/* end::Stats */}\r\n\r\n\r\n
\r\n {/* end::Body */}\r\n
\r\n )\r\n}\r\n\r\n\r\nexport { SmartTile }\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, { useEffect, useRef } from 'react'\r\nimport ApexCharts, { ApexOptions } from 'apexcharts'\r\nimport { getCSSVariableValue } from '../../../assets/ts/_utils'\r\nimport { link } from 'fs'\r\nimport { config } from 'process'\r\nimport { KTSVG, toAbsoluteUrl } from '../../../helpers'\r\n\r\ntype Props = {\r\n className: string\r\n chartColor: string\r\n chartHeight: string\r\n name: string\r\n min: string\r\n max: string\r\n val: number\r\n Link: string\r\n type: string\r\n data: string\r\n getSensorList: any\r\n}\r\n\r\nconst transformString = (str: any) => {\r\n // Remove \"smartgas.\" part and split by ':'\r\n const parts = str.replace('smartgas.', '').split(':');\r\n\r\n // Join parts with '_', prefix first part with 'c'\r\n return str;// `c_${parts.join('_')}`;\r\n};\r\n\r\nconst routeChange = (link: any) => {\r\n window.location.href = link;\r\n // alert('asa' + link)\r\n}\r\n\r\nconst SmartGasHealth: React.FC = ({ className, chartColor, chartHeight, name, min, max, val, Link, type, data, getSensorList }) => {\r\n\r\n function getSensorListData2() {\r\n getSensorList(data)\r\n }\r\n\r\n var url = \"\"\r\n var name = \"\"\r\n if (data === \"H\") {\r\n url = \"https://portal.smartgas.biz/media/bg/smartgas/normal.png\";\r\n name = \"Healthy\"\r\n } else if (data === \"W\") {\r\n url = \"https://portal.smartgas.biz/media/bg/smartgas/warning.png\";\r\n name = \"Caution\"\r\n } else {\r\n url = \"https://portal.smartgas.biz/media/bg/smartgas/error.png\";\r\n name = \"Error\"\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

{val}

\r\n
\r\n

{name}

\r\n
\r\n
\r\n\r\n \r\n\r\n\r\n return (\r\n
routeChange(Link)} style={{ cursor: 'pointer' }}>\r\n\r\n\r\n\r\n {/* begin::Body */}\r\n
\r\n {/* begin::Stats */}\r\n
\r\n

dadasdadas

\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 {/* end::Stats */}\r\n\r\n\r\n
\r\n {/* end::Body */}\r\n
\r\n )\r\n}\r\n\r\n\r\nexport { SmartGasHealth }\r\n","import React, {useState, useEffect, useRef} from 'react'\r\nimport './../../../_metronic/assets/sass/kntdashbaord.css'\r\nimport {HubConnectionBuilder, JsonHubProtocol} from '@microsoft/signalr'\r\nimport {PageLink, PageTitle} from '../../../_metronic/layout/core'\r\nimport axios from 'axios'\r\nimport {Formik, Form, Field} from 'formik'\r\nimport 'reactjs-popup/dist/index.css'\r\nimport {ToastContainer, toast, Slide, Zoom, Flip, Bounce} from 'react-toastify'\r\nimport {FabricJSCanvas, useFabricJSEditor} from 'fabricjs-react'\r\nimport GoogleMapReact from 'google-map-react'\r\nimport MyGreatPlace from './MyPlace.jsx'\r\nimport Drive from './Drive.jsx'\r\nimport {Line} from 'react-chartjs-2'\r\nimport {\r\n Chart as ChartJS,\r\n CategoryScale,\r\n LinearScale,\r\n PointElement,\r\n LineElement,\r\n Title,\r\n Tooltip,\r\n Legend,\r\n Filler,\r\n} from 'chart.js'\r\nimport {axioDefaultConfig} from '../common/commonResource2'\r\nimport {useDataLayerValue} from '../../../DataLayer'\r\nimport {KTSVG, toAbsoluteUrl} from '../../../_metronic/helpers'\r\nimport {useTable, useFilters, useGlobalFilter, usePagination, useAsyncDebounce} from 'react-table'\r\nimport ErrorMessage from '../helpers/message'\r\nimport Loading from '../helpers/loading'\r\nimport {func, number} from 'prop-types'\r\nimport {auto, right} from '@popperjs/core'\r\n\r\nChartJS.register(CategoryScale, LinearScale, PointElement, LineElement, Title, Tooltip, Legend)\r\n\r\nfunction SensorView(props) {\r\n const containerRef = useRef(null) // Create a ref for the scroll container\r\n const [isSubmitting, setSubmitting] = useState(false)\r\n const [{token}, dispatch] = useDataLayerValue()\r\n const labels = []\r\n const chartReference = React.createRef()\r\n const breadCrumbs = useRef([])\r\n const hubService = process.env.REACT_APP_MIDAS_HUB\r\n const [connection, setConnection] = useState(null)\r\n const reconnectRef = useRef(0)\r\n const urlParams = new URLSearchParams(window.location.search)\r\n const [isloading, setLoading] = useState(true)\r\n const [isChartLoading, setChartLoading] = useState(true)\r\n const [loadingMap, setLoadingMap] = useState(false)\r\n const [defaultProps, setdefaultProps] = useState({\r\n center: {\r\n lat: 6.911979146490742,\r\n lng: 79.92597226721936,\r\n },\r\n zoom: 10,\r\n })\r\n const [SensorList, setsensorList] = useState([])\r\n const sensors = useRef([])\r\n const [DeviceType, setDeviceType] = useState('24h')\r\n const [InitialLoading2, setInitialLoading2] = useState(true)\r\n const filter = useRef('0')\r\n const objBrowser = useRef(null)\r\n const gpsData = useRef([])\r\n const [PlayCount, setPlayCount] = useState(0)\r\n const [PlayUpToCount, setPlayUpToCount] = useState(-1)\r\n //const PlayCount = useRef(0)\r\n const [data, setdata] = useState([])\r\n //const gps_data = useRef([])\r\n const [gps_data, setgps_data] = useState([])\r\n const isPlaying = useRef(false) //setIsPlaying] = useState(false)\r\n const [chartData, setChartData] = useState({\r\n labels: [],\r\n datasets: [\r\n {\r\n label: '',\r\n data: [],\r\n backgroundColor: 'rgba(75,192,192,0.4)',\r\n borderColor: 'rgba(75,192,192,1)',\r\n borderWidth: 1,\r\n },\r\n ],\r\n })\r\n\r\n const {selectedObjects, setSelectedObject, editor, onReady} = useFabricJSEditor({\r\n defaultStrokeColor: 'red',\r\n selection: false,\r\n })\r\n\r\n const [layout, setLayout] = useState({\r\n id: 'dashboard',\r\n layoutName: '',\r\n imageData: null,\r\n devices: [],\r\n isZoom: false,\r\n globalJs: '',\r\n designObject: [],\r\n factories: [],\r\n subSectorName: '',\r\n subSectorCode: '',\r\n sectorName: '',\r\n sectorCode: '',\r\n factroyName: '',\r\n factroyCode: '',\r\n unitName: '',\r\n unitCode: '',\r\n Sensor: [],\r\n Packet: '',\r\n Field: '',\r\n data: [],\r\n //gpsdata: [],\r\n })\r\n\r\n const [live, setLive] = useState({\r\n Live: '',\r\n Min: '',\r\n Max: '',\r\n Status: '',\r\n Note: '',\r\n Description: '',\r\n NormalRange: '',\r\n WarningRange: '',\r\n CriticalRange: '',\r\n DisableRange: '',\r\n })\r\n\r\n const [state, setState] = useState({\r\n Data: {},\r\n DashboardStat: 'CONNECTING',\r\n SensorList: [],\r\n name: '',\r\n\r\n option: {\r\n responsive: true,\r\n plugins: {\r\n annotation: {\r\n annotations: {\r\n line1: {\r\n type: 'line',\r\n yMin: 60,\r\n yMax: 60,\r\n borderColor: 'rgb(255, 99, 132)',\r\n borderWidth: 2,\r\n },\r\n },\r\n },\r\n legend: {\r\n position: 'top',\r\n },\r\n title: {\r\n display: true,\r\n text: 'Line Chart',\r\n },\r\n bezierCurve: false,\r\n elements: {\r\n line: {\r\n tension: 0,\r\n },\r\n },\r\n },\r\n },\r\n data: {\r\n labels,\r\n datasets: [\r\n {\r\n label: '',\r\n data: [],\r\n lineTension: 0,\r\n borderColor: 'rgb(255, 99, 132)',\r\n backgroundColor: 'rgba(255, 99, 132, 0.5)',\r\n },\r\n ],\r\n },\r\n })\r\n\r\n function TablesWidget10() {\r\n const columns = React.useMemo(\r\n () => [\r\n {\r\n Header: ' ',\r\n columns: [\r\n {\r\n accessor: 'code',\r\n },\r\n {\r\n accessor: 'formatCode',\r\n },\r\n {\r\n accessor: 'description',\r\n },\r\n {\r\n accessor: 'createdOn',\r\n },\r\n {\r\n accessor: 'status',\r\n },\r\n {\r\n accessor: 'priority',\r\n },\r\n {\r\n accessor: 'fK_SectorCode',\r\n },\r\n {\r\n accessor: 'facilityName',\r\n },\r\n {\r\n accessor: 'remain',\r\n },\r\n ],\r\n },\r\n ],\r\n []\r\n )\r\n\r\n const {\r\n getTableProps,\r\n getTableBodyProps,\r\n headerGroups,\r\n prepareRow,\r\n page,\r\n canPreviousPage,\r\n canNextPage,\r\n pageOptions,\r\n pageCount,\r\n gotoPage,\r\n nextPage,\r\n previousPage,\r\n setPageSize,\r\n state: {pageIndex, pageSize, globalFilter},\r\n preGlobalFilteredRows,\r\n setGlobalFilter,\r\n } = useTable(\r\n {\r\n columns,\r\n data,\r\n initialState: {pageIndex: 0, pageSize: 20, globalFilter: ''},\r\n },\r\n useGlobalFilter,\r\n usePagination\r\n )\r\n const [error, setError] = useState({status: 'E', text: ''})\r\n\r\n const [{user, token}, dispatch] = useDataLayerValue()\r\n\r\n if (InitialLoading2) return \r\n\r\n return (\r\n
\r\n {/* begin::Header */}\r\n
\r\n

\r\n Last 24h Alerts\r\n Alert Management\r\n

\r\n \r\n \r\n
\r\n
\r\n
\r\n {/* end::Header */}\r\n {/* begin::Body */}\r\n
\r\n {/* begin::Table container */}\r\n
\r\n {/* begin::Table */}\r\n \r\n \r\n Ticket\r\n Description\r\n \r\n \r\n {page.length === 0 && (\r\n \r\n \r\n No Data Found!\r\n \r\n \r\n )}\r\n {page.map((row, i) => {\r\n prepareRow(row)\r\n return (\r\n \r\n {/* {row.cells.map((cell) => {\r\n return {cell.render('Cell')}\r\n })}*/}\r\n \r\n {\r\n \r\n {row.values.formatCode}\r\n \r\n }\r\n \r\n \r\n {row.values.description}{' '}\r\n \r\n {row.values.priority}\r\n \r\n {\r\n \r\n {row.values.facilityName}\r\n \r\n }\r\n
\r\n {row.values.createdOn}\r\n {row.values.status == 'Opened' && (\r\n \r\n {' '}\r\n OPENED ({row.values.remain})\r\n \r\n )}\r\n {row.values.status == 'Resolved' && (\r\n \r\n {' '}\r\n RESOLVED\r\n \r\n )}\r\n {row.values.status == 'Closed' && (\r\n \r\n {' '}\r\n CLOSED\r\n \r\n )}\r\n \r\n \r\n )\r\n })}\r\n \r\n \r\n {/* \r\n Pagination can be built however you'd like. \r\n This is just a very basic UI implementation:\r\n */}\r\n \r\n
\r\n {/* end::Table container */}\r\n
\r\n {/* begin::Body */}\r\n \r\n )\r\n }\r\n const [countdown, setCountdown] = useState(60)\r\n const [countdown2, setCountdown2] = useState(0)\r\n // useEffect(() => {\r\n // if (connection) {\r\n // connection\r\n // .start()\r\n // .then((result) => {\r\n // setState({\r\n // ...state,\r\n // DashboardStat: 'CONNECTED',\r\n // })\r\n // setLoading(false)\r\n // reconnectRef.current = 0\r\n // connection.onreconnecting((error) => {\r\n // setState({\r\n // ...state,\r\n // DashboardStat: 'RECONNECTING',\r\n // })\r\n // console.log('Connection lost due to error . Reconnecting.')\r\n // })\r\n\r\n // // Reconnect if hub disconnects\r\n // connection.onclose(function (e) {\r\n // setState({\r\n // ...state,\r\n // DashboardStat: 'DISCONNECTED',\r\n // })\r\n // //console.log('Disconnected');\r\n // })\r\n\r\n // connection.on('ReceiveMessage', (message) => {\r\n // if (typeof message === 'string' || message instanceof String) {\r\n // message = JSON.parse(message)\r\n // }\r\n // if (message.key !== 'SensorData') return\r\n\r\n // let dataPacket = JSON.parse(message.data)\r\n // if (\r\n // dataPacket.TimeStamp === undefined ||\r\n // Math.round((new Date() - new Date(dataPacket.TimeStamp)) / 1000) > 10\r\n // ) {\r\n // return\r\n // }\r\n\r\n // console.log(message)\r\n // let newElements = {}\r\n // Object.entries(dataPacket).map(([key, value]) => {\r\n // newElements[key] = value\r\n // })\r\n\r\n // Object.entries(dataPacket).map(([key, value]) => {\r\n // for (let index = 0; index < sensors.current.length; index++) {\r\n // const element = sensors.current[index]\r\n // if (element.machineNo === '') continue\r\n\r\n // if (element.displayName === '') element.displayName = ' '\r\n\r\n // if (element.icon === undefined) element.icon = 'dot'\r\n\r\n // if (\r\n // element.isNotify === undefined ||\r\n // element.isNotify === '' ||\r\n // element.isNotify === null\r\n // )\r\n // element.isNotify = false\r\n\r\n // if (!element.lastUpdate) {\r\n // element.lastUpdate = new Date()\r\n // } else if (Math.round((new Date() - new Date(element.lastUpdate)) / 1000) > 60) {\r\n // // console.log('[DB PACKET ' + element.machineNo.toString().toLowerCase() + ']')\r\n // if (\r\n // element.type == 14 ||\r\n // element.type == 13 ||\r\n // element.type == 17 ||\r\n // element.type == 15\r\n // ) {\r\n // //console.log(\"[chart data cleared \"+element.machineNo.toString().toLowerCase()+\"]\");\r\n // element.value = []\r\n // } else {\r\n // element.value = '---'\r\n // element.color = 'black'\r\n // }\r\n // }\r\n\r\n // let object = element.object.toString().toLowerCase()\r\n // let packetType = dataPacket.Plant + '.' + dataPacket.Packet\r\n\r\n // if (\r\n // element.object.toString().toLowerCase() === key.toString().toLowerCase() &&\r\n // packetType.toString().toLowerCase() === element.pakages\r\n // ) {\r\n // element.lastUpdate = new Date()\r\n // element.value = value\r\n // element.color = 'black'\r\n // element.notification = {\r\n // toastId: key.toString().toLowerCase(),\r\n // position: 'top-right',\r\n // type: 'info',\r\n // autoClose: false, // or set time\r\n // hideProgressBar: false,\r\n // closeOnClick: true,\r\n // // pauseOnHover: true,\r\n // draggable: false,\r\n // progress: undefined,\r\n // transition: Bounce,\r\n // }\r\n // try {\r\n // // alert(layout.globalJs)\r\n // eval(layout.globalJs + ';' + element.formula)\r\n // // eval(element.formula)\r\n // } catch (error) {\r\n // element.value = '---'\r\n // element.color = 'black'\r\n // // console.log(element.formula)\r\n // console.log(error)\r\n // }\r\n // }\r\n // }\r\n // })\r\n // setState({\r\n // ...state,\r\n // SensorList: sensors.current,\r\n // DashboardStat: 'CONNECTED',\r\n // })\r\n // })\r\n // })\r\n // .catch((e) => {})\r\n // }\r\n // }, [connection])\r\n\r\n useEffect(() => {\r\n const countdownInterval = setInterval(() => {\r\n // Decrease the countdown value every second\r\n setCountdown((prevCountdown) => (prevCountdown - 1 < 0 ? 0 : prevCountdown - 1))\r\n }, 1000)\r\n\r\n // Cleanup function to clear the interval when the component unmounts\r\n return () => clearInterval(countdownInterval)\r\n }, []) // Empty dependency array ensures the effect runs only once\r\n\r\n useEffect(() => {\r\n axios({\r\n method: 'get',\r\n url:\r\n process.env.REACT_APP_BACKEND_API +\r\n '/api/sensors/' +\r\n (props.match?.params?.code ?? 'dream'),\r\n headers: {...axioDefaultConfig.headers, Authorization: 'Bearer ' + token},\r\n }).then((response) => {\r\n // alert(response.data.result.unitModels[0].object)\r\n if (response.data.status == 'S') {\r\n setLayout({\r\n ...layout,\r\n //subSectorName: response.data.result.subSectors[0].name,\r\n //subSectorCode: response.data.result.subSectors[0].code,\r\n //sectorName: response.data.result.name,\r\n //sectorCode: response.data.result.code,\r\n //factroyName: response.data.result.subSectors[0].factories[0].name,\r\n //factroyCode: response.data.result.subSectors[0].factories[0].code,\r\n //unitName: response.data.result.businessUnitModels[0].name,\r\n //unitCode: response.data.result.businessUnitModels[0].code,\r\n Sensor: response.data.result.unitModels[0],\r\n breadCrumbs: response.data.result.breadCrumbs,\r\n })\r\n objBrowser.current = response.data.result.unitModels[0]\r\n // setBreadCrum(response)\r\n\r\n RefreshData(response.data.result.unitModels[0])\r\n setInterval(() => {\r\n RefreshData(response.data.result.unitModels[0])\r\n }, 60000)\r\n\r\n setState({\r\n ...state,\r\n SensorList: response.data.result.unitModels,\r\n })\r\n sensors.current = response.data.result.unitModels\r\n setTimeout(() => {\r\n for (let index = 0; index < sensors.current.length; index++) {\r\n const element = sensors.current[index]\r\n try {\r\n eval(layout.globalJs + ';' + element.tempFeild1)\r\n } catch (error) {\r\n console.log(error)\r\n }\r\n }\r\n setState({\r\n ...state,\r\n SensorList: sensors.current,\r\n DashboardStat: 'INITIALIZATION',\r\n })\r\n\r\n setTimeout(() => {\r\n const newConnection = new HubConnectionBuilder()\r\n .withUrl(\r\n process.env.REACT_APP_MIDAS_HUB +\r\n '/' +\r\n response.data.result.automationChannel +\r\n '/Hub'\r\n )\r\n .withAutomaticReconnect()\r\n .build()\r\n setConnection(newConnection)\r\n }, 100)\r\n }, 500)\r\n }\r\n })\r\n }, [])\r\n\r\n // function RefreshData2() {\r\n // //alert('asdasd')\r\n // setChartLoading(true)\r\n // const chart = chartReference.current\r\n // setTimeout(() => {\r\n // setChartLoading(false)\r\n\r\n // chart.data.datasets[0] = [\r\n // {\r\n // label: '',\r\n // data: [],\r\n // lineTension: 0,\r\n // borderColor: 'rgb(53, 162, 235)',\r\n // backgroundColor: 'rgba(53, 162, 235, 0.5)',\r\n // },\r\n // ][0]\r\n // chart.update('none')\r\n // }, 10)\r\n // }\r\n\r\n function RefreshData(obj) {\r\n if (filter.current === '1') return\r\n //alert(filter.current)\r\n if (obj?.name == undefined) return\r\n const chart = chartReference.current\r\n const sector = ''\r\n axios({\r\n ...axioDefaultConfig,\r\n method: 'get',\r\n url: process.env.REACT_APP_BACKEND_API + '/api/get-alerts-tag?tag=' + obj.code,\r\n headers: {...axioDefaultConfig.headers, Authorization: 'Bearer ' + token},\r\n })\r\n .then(function (response) {\r\n setInitialLoading2(false)\r\n setdata(response?.data?.data)\r\n })\r\n .catch(function (error) {})\r\n\r\n var datafield = {}\r\n datafield['sensorCode'] = obj.code\r\n datafield['sort'] = 'TimeStamp: 1'\r\n datafield['find'] = 't_' + obj.object + ' : {$exists:true}, TimeStamp : ' + DeviceType\r\n datafield['project'] =\r\n 'TimeStamp: 1, ' +\r\n 't_' +\r\n obj.object +\r\n ' : 1, t_' +\r\n obj.object +\r\n '_gps : 1, t_' +\r\n obj.object +\r\n '_Ignition : 1 '\r\n axios({\r\n method: 'post',\r\n url: process.env.REACT_APP_BACKEND_API + '/api/sensor/getall',\r\n headers: {},\r\n data: datafield,\r\n }).then((response) => {\r\n if (response.data.status == 'S') {\r\n setChartLoading(false)\r\n gpsData.current = response.data\r\n // setLayout({\r\n // ...layout,\r\n // gpsdata: response.data,\r\n // })\r\n const _labels = []\r\n const _data = []\r\n const _gps_data = []\r\n for (let index = 0; index < response.data.result.list.length; index++) {\r\n const element = response.data.result.list[index]\r\n _labels.push(element['TimeStamp'])\r\n _data.push(element['t_' + obj.object])\r\n // console.log(element['t_' + obj.object + '_gps'])\r\n\r\n var gps = element['t_' + objBrowser.current.object + '_gps']\r\n var Ignition = element['t_' + objBrowser.current.object + '_Ignition'] ?? 'NA'\r\n if (gps?.Lat ?? 0 != 0) {\r\n const Bruno = _gps_data.find(\r\n (person) =>\r\n person.lat === gps?.Lat && person.lng === gps?.Lng && person.ignition === Ignition\r\n )\r\n if (Bruno === undefined) {\r\n _gps_data.push({\r\n lat: gps?.Lat,\r\n lng: gps?.Lng,\r\n value: element['t_' + objBrowser.current.object],\r\n text: element['TimeStamp'],\r\n endDate: element['TimeStamp'],\r\n waiting: 0,\r\n ignition: Ignition,\r\n })\r\n } else {\r\n Bruno.ignition = Ignition\r\n Bruno.waiting = dateConverter(Bruno.endDate, element['TimeStamp'])\r\n Bruno.text = `${element['TimeStamp']} /n waiting ${dateConverter(\r\n Bruno.endDate,\r\n element['TimeStamp']\r\n )}`\r\n }\r\n }\r\n // var gps = element['t_' + obj.object + '_gps']\r\n // if (gps?.Lat ?? 0 != 0) {\r\n // _gps_data.push({\r\n // lat: gps?.Lat,\r\n // lng: gps?.Lng,\r\n // value: element['t_' + obj.object],\r\n // text: element['TimeStamp'],\r\n // })\r\n // }\r\n }\r\n setCountdown(60)\r\n setLive({\r\n Live: response.data.result.currrent,\r\n Min: response.data.result.min,\r\n Max: response.data.result.max,\r\n Date: response.data.result.date,\r\n Status: response.data.result.status,\r\n Note: response.data.result.note,\r\n Description: response.data.result.description,\r\n NormalRange: response.data.result.normalRange,\r\n WarningRange: response.data.result.warningRange,\r\n CriticalRange: response.data.result.criticalRange,\r\n DisableRange: response.data.result.disableRange,\r\n Lat: response.data.result?.Lat ?? '-',\r\n Lng: response.data.result?.Lng ?? '-',\r\n ignition: response.data.result?.ignition ?? '-',\r\n })\r\n setgps_data(_gps_data)\r\n // gps_data.current = _gps_data\r\n setChartData({\r\n labels: _labels,\r\n datasets: [\r\n {\r\n label: '',\r\n data: _data,\r\n lineTension: 0,\r\n backgroundColor: 'rgba(75,192,192,0.4)',\r\n borderColor: 'rgba(75,192,192,1)',\r\n borderWidth: 1,\r\n },\r\n ],\r\n })\r\n setLoading(false)\r\n }\r\n })\r\n }\r\n\r\n function hideAllNotification() {\r\n toast.dismissAll()\r\n }\r\n\r\n function hideNotification(notification) {\r\n toast.dismiss(notification.toastId)\r\n }\r\n\r\n function getTransactionType(transition) {\r\n switch (transition.toLowerCase()) {\r\n case 'flip':\r\n return Flip\r\n case 'slide':\r\n return Slide\r\n case 'zoom':\r\n return Zoom\r\n\r\n default:\r\n return Bounce\r\n }\r\n }\r\n function getType(type) {\r\n switch (type.toLowerCase()) {\r\n case 'info':\r\n return toast.TYPE.INFO\r\n case 'error':\r\n return toast.TYPE.ERROR\r\n case 'success':\r\n return toast.TYPE.SUCCESS\r\n case 'warning':\r\n return toast.TYPE.WARNING\r\n default:\r\n return toast.TYPE.INFO\r\n }\r\n }\r\n\r\n function showNotification(notification) {\r\n notification.transition = getTransactionType(notification.transition)\r\n if (toast.isActive(notification.toastId)) {\r\n notification.render = notification.message\r\n notification.type = getType(notification.type)\r\n toast.update(notification.toastId, notification)\r\n return\r\n }\r\n\r\n switch (notification.type) {\r\n case 'error':\r\n toast.error(notification.message, notification)\r\n break\r\n case 'info':\r\n toast.info(notification.message, notification)\r\n break\r\n case 'warning':\r\n toast.warn(notification.message, notification)\r\n break\r\n case 'success':\r\n toast.success(notification.message, notification)\r\n break\r\n default:\r\n toast(notification.message)\r\n break\r\n }\r\n }\r\n\r\n function Notification(notification) {\r\n if (toast.isActive(notification.toastId)) {\r\n toast.dismiss(notification.toastId)\r\n }\r\n switch (notification.Type) {\r\n case 'error':\r\n toast.error(notification.Message, {\r\n toastId: notification?.toastId ?? 'default',\r\n position: notification?.Position ?? 'top-right',\r\n autoClose: notification?.Autoclose ?? 5000,\r\n hideProgressBar: true,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n })\r\n break\r\n\r\n case 'info':\r\n toast.info(notification.Message, {\r\n position: notification?.Position ?? 'top-right',\r\n autoClose: notification?.Autoclose ?? 5000,\r\n toastId: notification?.toastId ?? 'default',\r\n hideProgressBar: false,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n })\r\n break\r\n case 'warning':\r\n toast.warn(notification.Message, {\r\n position: notification?.Position ?? 'top-right',\r\n autoClose: notification?.Autoclose ?? 5000,\r\n toastId: notification.toastId ?? 'default',\r\n hideProgressBar: false,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n })\r\n break\r\n case 'success':\r\n toast.success(notification.Message, {\r\n position: notification?.Position ?? 'top-right',\r\n autoClose: notification?.Autoclose ?? 5000,\r\n toastId: notification?.toastId ?? 'default',\r\n hideProgressBar: false,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n })\r\n break\r\n default:\r\n toast('Wow so easy!')\r\n break\r\n }\r\n }\r\n\r\n const dateConverter = (startDate, timeEnd) => {\r\n const newStartDate = new Date(startDate)\r\n const newEndDate = new Date(timeEnd)\r\n const one_day = 1000 * 60\r\n let result\r\n result = Math.ceil((newEndDate.getTime() - newStartDate.getTime()) / one_day)\r\n console.log('date Converter result', result)\r\n if (result < 0) {\r\n return '0'\r\n }\r\n\r\n return `${Math.floor(result / 60)}h ${result % 60}min`\r\n }\r\n\r\n function OnReset() {\r\n const _gps_data = []\r\n for (let index = 0; index < gpsData.current.result.list.length; index++) {\r\n const element = gpsData.current.result.list[index]\r\n if (element == null) continue\r\n\r\n var gps = element['t_' + objBrowser.current.object + '_gps']\r\n var Ignition = element['t_' + objBrowser.current.object + '_Ignition'] ?? 'NA'\r\n if (gps?.Lat ?? 0 != 0) {\r\n const Bruno = _gps_data.find(\r\n (person) =>\r\n person.lat === gps?.Lat && person.lng === gps?.Lng && person.ignition === Ignition\r\n )\r\n if (Bruno === undefined) {\r\n _gps_data.push({\r\n lat: gps?.Lat,\r\n lng: gps?.Lng,\r\n value: element['t_' + objBrowser.current.object],\r\n text: element['TimeStamp'],\r\n endDate: element['TimeStamp'],\r\n waiting: 0,\r\n ignition: Ignition,\r\n })\r\n } else {\r\n Bruno.ignition = Ignition\r\n Bruno.waiting = dateConverter(Bruno.endDate, element['TimeStamp'])\r\n Bruno.text = `${element['TimeStamp']} /n waiting ${dateConverter(\r\n Bruno.endDate,\r\n element['TimeStamp']\r\n )}`\r\n }\r\n }\r\n }\r\n setgps_data(_gps_data)\r\n isPlaying.current = false\r\n filter.current = '0'\r\n setPlayUpToCount(-1)\r\n setPlayCount(0)\r\n setdefaultProps({\r\n ...defaultProps,\r\n zoom: 10,\r\n })\r\n }\r\n\r\n function Play() {\r\n const countdownInterval2 = setInterval(() => {\r\n //gps_data.current = _gps_data\r\n setPlayCount((prevCountdown) => {\r\n const _gps_data = []\r\n for (\r\n let index = 0;\r\n index <\r\n (gpsData.current.result.list.length > prevCountdown\r\n ? prevCountdown\r\n : gpsData.current.result.list.length);\r\n index++\r\n ) {\r\n const element = gpsData.current.result.list[index]\r\n if (element == null) continue\r\n\r\n var gps = element['t_' + objBrowser.current.object + '_gps']\r\n var Ignition = element['t_' + objBrowser.current.object + '_Ignition'] ?? 'NA'\r\n if (gps?.Lat ?? 0 != 0) {\r\n const Bruno = _gps_data.find(\r\n (person) =>\r\n person.lat === gps?.Lat && person.lng === gps?.Lng && person.ignition === Ignition\r\n )\r\n if (Bruno === undefined) {\r\n _gps_data.push({\r\n lat: gps?.Lat,\r\n lng: gps?.Lng,\r\n value: element['t_' + objBrowser.current.object],\r\n text: element['TimeStamp'],\r\n endDate: element['TimeStamp'],\r\n waiting: 0,\r\n ignition: Ignition,\r\n })\r\n } else {\r\n Bruno.ignition = Ignition\r\n Bruno.waiting = dateConverter(Bruno.endDate, element['TimeStamp'])\r\n Bruno.text = `${element['TimeStamp']} /n waiting ${dateConverter(\r\n Bruno.endDate,\r\n element['TimeStamp']\r\n )}`\r\n }\r\n }\r\n }\r\n // alert(prevCountdown)\r\n // alert(gpsData.current.result.list.length)\r\n // alert(_gps_data.length)\r\n setgps_data(_gps_data)\r\n\r\n if (gpsData.current.result.list.length < prevCountdown || !isPlaying.current) {\r\n OnReset()\r\n\r\n clearInterval(countdownInterval2)\r\n }\r\n return prevCountdown + 1\r\n })\r\n }, 500)\r\n }\r\n\r\n // useEffect(() => {\r\n // setdefaultProps({\r\n // center: {\r\n // lat: gps_data[PlayUpToCount].lat,\r\n // lng: gps_data[PlayUpToCount].lng,\r\n // },\r\n // zoom: 10,\r\n // })\r\n // }, [PlayUpToCount])\r\n\r\n useEffect(() => {\r\n if (containerRef.current) {\r\n containerRef.current.scrollTop = containerRef.current.scrollHeight\r\n }\r\n }, [gps_data])\r\n // Prevent user from scrolling up (if needed)\r\n const handleWheel = (event) => {\r\n if (containerRef.current) {\r\n const {scrollTop, scrollHeight, clientHeight} = containerRef.current\r\n // Prevent scrolling up\r\n if (scrollTop === 0 && event.deltaY < 0) {\r\n event.preventDefault() // Prevent scrolling up\r\n }\r\n }\r\n }\r\n\r\n function onClearFilter() {\r\n filter.current = '0'\r\n setPlayUpToCount(-1)\r\n setPlayCount(0)\r\n RefreshData(objBrowser.current)\r\n }\r\n\r\n function onSelect(index2) {\r\n setdefaultProps({\r\n center: {\r\n lat: Number(gps_data[index2].lat),\r\n lng: Number(gps_data[index2].lng),\r\n },\r\n zoom: 15,\r\n })\r\n filter.current = '1'\r\n setPlayUpToCount(index2)\r\n }\r\n\r\n function onStop() {\r\n isPlaying.current = false\r\n // setIsPlaying(false)\r\n }\r\n\r\n function onPlay() {\r\n setgps_data([])\r\n isPlaying.current = true\r\n // setIsPlaying(true)\r\n setPlayUpToCount(-1)\r\n setPlayCount(0)\r\n filter.current = '1'\r\n setdefaultProps({\r\n ...defaultProps,\r\n zoom: 15,\r\n })\r\n setTimeout(() => {\r\n Play()\r\n }, 200)\r\n }\r\n // function timeonchange(e) {\r\n // setDeviceType(e.target.value)\r\n // setChartLoading(true)\r\n // setTimeout(() => {\r\n // RefreshData(layout.Sensor)\r\n // }, 100)\r\n // }\r\n\r\n var statusColorClass = 'btn btn-sm btn-light-dark'\r\n if (live.Status == 'NORMAL') {\r\n statusColorClass = 'btn btn-sm btn-light-success'\r\n } else if (live.Status == 'WARNING') {\r\n statusColorClass = 'btn btn-sm btn-light-warning'\r\n } else if (live.Status == 'CRITICAL') {\r\n statusColorClass = 'btn btn-sm btn-light-danger'\r\n }\r\n\r\n return (\r\n <>\r\n {layout?.Sensor?.name} \r\n
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n Data Visualized (24h){' '}\r\n
\r\n \r\n {layout?.Sensor?.description}\r\n {filter.current == '0' && (\r\n <>\r\n \r\n   Last Update at {live?.Date} \r\n \r\n \r\n )}\r\n {filter.current == '1' && (\r\n <>\r\n   Filtered Apply\r\n \r\n    Clear Filers\r\n \r\n \r\n )}\r\n \r\n

\r\n
\r\n\r\n
\r\n {countdown <= 10 && filter.current == '0' && (\r\n <>\r\n Auto refresh in {countdown} seconds\r\n \r\n )}\r\n {countdown > 10 && filter.current == '0' && (\r\n <>\r\n

Auto refresh in {countdown} seconds

{' '}\r\n \r\n )}\r\n
\r\n
\r\n
\r\n \r\n {live.Live}°C\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n {\r\n filter.current = '1'\r\n // alert('HI EX' + values.datex)\r\n var datafield = {}\r\n datafield['sensorCode'] = layout.Sensor.code\r\n datafield['sort'] = 'TimeStamp: 1'\r\n datafield['date'] = values.datex\r\n datafield['Ftype'] = values.Ftype\r\n datafield['find'] = 't_' + layout.Sensor.object + ' : {$exists:true}, TimeStamp : DT'\r\n datafield['project'] =\r\n 'TimeStamp: 1, ' +\r\n 't_' +\r\n layout.Sensor.object +\r\n ' : 1, t_' +\r\n layout.Sensor.object +\r\n '_gps : 1, t_' +\r\n layout.Sensor.object +\r\n '_Ignition : 1 '\r\n axios({\r\n method: 'post',\r\n url: process.env.REACT_APP_BACKEND_API + '/api/sensor/getall',\r\n headers: {},\r\n data: datafield,\r\n }).then((response) => {\r\n const _labels = []\r\n const _data = []\r\n const _gps_data = []\r\n if (response.data.status == 'S') {\r\n setChartLoading(false)\r\n gpsData.current = response.data\r\n // setLayout({\r\n // ...layout,\r\n // gpsdata: response.data,\r\n // })\r\n\r\n for (let index = 0; index < response.data.result.list.length; index++) {\r\n const element = response.data.result.list[index]\r\n _labels.push(element['TimeStamp'])\r\n _data.push(element['t_' + layout.Sensor.object])\r\n // console.log(element['t_' + obj.object + '_gps'])\r\n\r\n var gps = element['t_' + objBrowser.current.object + '_gps']\r\n var Ignition = element['t_' + objBrowser.current.object + '_Ignition'] ?? 'NA'\r\n if (gps?.Lat ?? 0 != 0) {\r\n const Bruno = _gps_data.find(\r\n (person) =>\r\n person.lat === gps?.Lat &&\r\n person.lng === gps?.Lng &&\r\n person.ignition === Ignition\r\n )\r\n if (Bruno === undefined) {\r\n _gps_data.push({\r\n lat: gps?.Lat,\r\n lng: gps?.Lng,\r\n value: element['t_' + objBrowser.current.object],\r\n text: element['TimeStamp'],\r\n endDate: element['TimeStamp'],\r\n waiting: 0,\r\n ignition: Ignition,\r\n })\r\n } else {\r\n Bruno.ignition = Ignition\r\n Bruno.waiting = dateConverter(Bruno.endDate, element['TimeStamp'])\r\n Bruno.text = `${element['TimeStamp']} /n waiting ${dateConverter(\r\n Bruno.endDate,\r\n element['TimeStamp']\r\n )}`\r\n }\r\n }\r\n // var gps = element['t_' + obj.object + '_gps']\r\n // if (gps?.Lat ?? 0 != 0) {\r\n // _gps_data.push({\r\n // lat: gps?.Lat,\r\n // lng: gps?.Lng,\r\n // value: element['t_' + obj.object],\r\n // text: element['TimeStamp'],\r\n // })\r\n // }\r\n }\r\n\r\n setLive({\r\n Live: response.data.result.currrent,\r\n Min: response.data.result.min,\r\n Max: response.data.result.max,\r\n Date: response.data.result.date,\r\n Status: response.data.result.status,\r\n Note: response.data.result.note,\r\n Description: response.data.result.description,\r\n NormalRange: response.data.result.normalRange,\r\n WarningRange: response.data.result.warningRange,\r\n CriticalRange: response.data.result.criticalRange,\r\n DisableRange: response.data.result.disableRange,\r\n Lat: response.data.result?.Lat ?? '-',\r\n Lng: response.data.result?.Lng ?? '-',\r\n ignition: response.data.result?.ignition ?? '-',\r\n })\r\n setgps_data(_gps_data)\r\n setChartData({\r\n labels: _labels,\r\n datasets: [\r\n {\r\n label: '',\r\n data: _data,\r\n lineTension: 0,\r\n backgroundColor: 'rgba(75,192,192,0.4)',\r\n borderColor: 'rgba(75,192,192,1)',\r\n borderWidth: 1,\r\n },\r\n ],\r\n })\r\n setLoading(false)\r\n } else {\r\n setgps_data([])\r\n setChartData({\r\n labels: _labels,\r\n datasets: [\r\n {\r\n label: '',\r\n data: _data,\r\n lineTension: 0,\r\n backgroundColor: 'rgba(75,192,192,0.4)',\r\n borderColor: 'rgba(75,192,192,1)',\r\n borderWidth: 1,\r\n },\r\n ],\r\n })\r\n setLoading(false)\r\n }\r\n // const _labels = []\r\n // const _data = []\r\n // if (response.data.status == 'S') {\r\n // setChartLoading(false)\r\n\r\n // for (let index = 0; index < response.data.result.list.length; index++) {\r\n // const element = response.data.result.list[index]\r\n // _labels.push(element['TimeStamp'])\r\n // _data.push(element['t_' + layout.Sensor.object])\r\n // }\r\n\r\n // setChartData({\r\n // labels: _labels,\r\n // datasets: [\r\n // {\r\n // label: '',\r\n // data: _data,\r\n // lineTension: 0,\r\n // backgroundColor: 'rgba(75,192,192,0.4)',\r\n // borderColor: 'rgba(75,192,192,1)',\r\n // borderWidth: 1,\r\n // },\r\n // ],\r\n // })\r\n // setLoading(false)\r\n // } else {\r\n // setChartData({\r\n // labels: _labels,\r\n // datasets: [\r\n // {\r\n // label: '',\r\n // data: _data,\r\n // lineTension: 0,\r\n // backgroundColor: 'rgba(75,192,192,0.4)',\r\n // borderColor: 'rgba(75,192,192,1)',\r\n // borderWidth: 1,\r\n // },\r\n // ],\r\n // })\r\n // setLoading(false)\r\n // }\r\n })\r\n //()\r\n }}\r\n >\r\n {({values, errors, touched, handleChange, handleBlur, handleSubmit}) => (\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 {!isSubmitting && (\r\n \r\n Filter   \r\n \r\n )}\r\n {isSubmitting && (\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n {isChartLoading && <>Loading}\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 Data Visualized (24h)\r\n \r\n {layout?.Sensor?.description} |\r\n \r\n Last Update at {live?.Date} \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

Critical Level

\r\n
{live?.CriticalRange} Range
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {' '}\r\n \r\n \r\n
\r\n
\r\n

Warning Level

\r\n
{live?.WarningRange} Range
\r\n
\r\n
\r\n
\r\n \r\n
\r\n {' '}\r\n \r\n \r\n
\r\n
\r\n

Normal Level

\r\n
{live?.NormalRange} Range
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n

Disable Level

\r\n
\r\n {live?.DisableRange.substring(0, 15) + '...'} Range\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n {gps_data.length > 0 && (\r\n <>\r\n
\r\n {/* begin::Header */}\r\n
\r\n

\r\n Map View \r\n {/* {PlayCount} */}\r\n \r\n

\r\n\r\n \r\n
\r\n {!isPlaying.current && (\r\n <>\r\n {' '}\r\n \r\n \r\n )}\r\n {isPlaying.current && (\r\n <>\r\n {' '}\r\n \r\n \r\n )}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n {gps_data.map((marker, index) => (\r\n <>\r\n {PlayUpToCount == index && (\r\n <>\r\n onSelect(index)}\r\n className={\r\n 'col-lg-12 notice d-flex rounded border border-dashed mb-1 bg-light-danger border-danger border-dark'\r\n }\r\n >\r\n
\r\n  \r\n {marker.endDate}\r\n
\r\n
\r\n W Time {marker.waiting} | IG :{' '}\r\n {marker.ignition == 1 ? (\r\n

ON

\r\n ) : marker.ignition == 0 ? (\r\n

OFF

\r\n ) : (\r\n '-'\r\n )}{' '}\r\n | {marker.value} °C\r\n
\r\n
\r\n
\r\n \r\n )}\r\n {PlayUpToCount != index && (\r\n <>\r\n onSelect(index)}\r\n className={\r\n 'col-lg-12 notice d-flex rounded border border-dashed mb-1 border-dark'\r\n }\r\n >\r\n
\r\n {/* {gps_data?.length - 1 === index && (\r\n <>\r\n \r\n \r\n )} */}\r\n  \r\n {marker.endDate}\r\n
\r\n W Time {marker.waiting} | IG :{' '}\r\n {marker.ignition == 1 ? (\r\n

ON

\r\n ) : marker.ignition == 0 ? (\r\n

OFF

\r\n ) : (\r\n '-'\r\n )}{' '}\r\n | {marker.value} °C\r\n
\r\n
\r\n
\r\n \r\n )}\r\n \r\n ))}\r\n \r\n
\r\n {PlayUpToCount > 0 && (\r\n <>\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n )}\r\n {PlayUpToCount == -1 && (\r\n <>\r\n
\r\n \r\n {gps_data.map((marker, index) => (\r\n \r\n ))}\r\n {/*\r\n { lat :6.9123483,\r\n lng:80.0322383,\r\n }\r\n key={index}\r\n lat={marker.lat}\r\n lng={marker.lng}\r\n text={''}\r\n isNotify={''} \r\n Link={''}\r\n Type={''}\r\n Value={''}\r\n \r\n {\r\n \r\n } */}\r\n \r\n
\r\n \r\n )}\r\n
\r\n \r\n \r\n {/* begin::Body */}\r\n \r\n \r\n )}\r\n {/* {gps_data.length > 0 && (\r\n <>\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n

Critical Level

\r\n
{gps_data[gps_data.length - 1].text}
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n

Warning Level

\r\n
{live?.WarningRange} Range
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n

Normal Level

\r\n
{live?.NormalRange} Range
\r\n
\r\n
\r\n \r\n\r\n \r\n \r\n
\r\n
\r\n

Disable Level

\r\n
{live?.DisableRange} Range
\r\n
\r\n
\r\n \r\n \r\n \r\n )} */}\r\n {/* {JSON.stringify(gps_data)} */}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n Minimum Temprature\r\n Based On Last 24hours\r\n

\r\n \r\n
\r\n \r\n {live.Min}°C\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n

\r\n Maximum Temprature\r\n Based On Last 24hours\r\n

\r\n \r\n
\r\n \r\n {live.Max}°C\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 return (\r\n <>\r\n {layout?.Sensor?.name} \r\n <>\r\n <>\r\n
\r\n
\r\n
\r\n

\r\n Data Visualized \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 SensorView\r\n","import React, {createContext, useContext, useReducer} from 'react'\r\n\r\nexport const DataLayerContext = createContext()\r\n\r\nexport const DataLayer = ({initialState, reducer, children}) => (\r\n \r\n {children}\r\n \r\n)\r\n\r\nexport const useDataLayerValue = () => useContext(DataLayerContext)\r\n","import React, {useState, useEffect, useRef} from 'react'\r\nimport './../../../_metronic/assets/sass/kntdashbaord.css'\r\nimport {HubConnectionBuilder, JsonHubProtocol} from '@microsoft/signalr'\r\nimport {PageLink, PageTitle} from '../../../_metronic/layout/core'\r\nimport axios from 'axios'\r\nimport {Formik, Form, Field} from 'formik'\r\nimport 'reactjs-popup/dist/index.css'\r\nimport {ToastContainer, toast, Slide, Zoom, Flip, Bounce} from 'react-toastify'\r\nimport {FabricJSCanvas, useFabricJSEditor} from 'fabricjs-react'\r\nimport GoogleMapReact from 'google-map-react'\r\nimport MyGreatPlace from './MyPlace.jsx'\r\nimport Drive from './Drive.jsx'\r\nimport {Line} from 'react-chartjs-2'\r\nimport {\r\n Chart as ChartJS,\r\n CategoryScale,\r\n LinearScale,\r\n PointElement,\r\n LineElement,\r\n Title,\r\n Tooltip,\r\n Legend,\r\n Filler,\r\n} from 'chart.js'\r\nimport {axioDefaultConfig} from '../common/commonResource2'\r\nimport {useDataLayerValue} from '../../../DataLayer'\r\nimport {KTSVG, toAbsoluteUrl} from '../../../_metronic/helpers'\r\nimport {useTable, useFilters, useGlobalFilter, usePagination, useAsyncDebounce} from 'react-table'\r\nimport ErrorMessage from '../helpers/message'\r\nimport Loading from '../helpers/loading'\r\nimport {func, number} from 'prop-types'\r\nimport {auto, right} from '@popperjs/core'\r\n\r\nChartJS.register(CategoryScale, LinearScale, PointElement, LineElement, Title, Tooltip, Legend)\r\n\r\nfunction SensorView2(props) {\r\n const containerRef = useRef(null) // Create a ref for the scroll container\r\n const [isSubmitting, setSubmitting] = useState(false)\r\n const [{token}, dispatch] = useDataLayerValue()\r\n const labels = []\r\n const chartReference = React.createRef()\r\n const breadCrumbs = useRef([])\r\n const hubService = process.env.REACT_APP_MIDAS_HUB\r\n const [connection, setConnection] = useState(null)\r\n const reconnectRef = useRef(0)\r\n const urlParams = new URLSearchParams(window.location.search)\r\n const [isloading, setLoading] = useState(true)\r\n const [isChartLoading, setChartLoading] = useState(true)\r\n const [loadingMap, setLoadingMap] = useState(false)\r\n const [defaultProps, setdefaultProps] = useState({\r\n center: {\r\n lat: 6.911979146490742,\r\n lng: 79.92597226721936,\r\n },\r\n zoom: 18,\r\n })\r\n const [SensorList, setsensorList] = useState([])\r\n const sensors = useRef([])\r\n const [DeviceType, setDeviceType] = useState('24h')\r\n const [InitialLoading2, setInitialLoading2] = useState(true)\r\n const filter = useRef('0')\r\n const objBrowser = useRef(null)\r\n const gpsData = useRef([])\r\n const [PlayCount, setPlayCount] = useState(0)\r\n const [PlayUpToCount, setPlayUpToCount] = useState(-1)\r\n //const PlayCount = useRef(0)\r\n const [data, setdata] = useState([])\r\n //const gps_data = useRef([])\r\n const [gps_data, setgps_data] = useState([])\r\n const isPlaying = useRef(false) //setIsPlaying] = useState(false)\r\n const [chartData, setChartData] = useState({\r\n labels: [],\r\n datasets: [\r\n {\r\n label: '',\r\n data: [],\r\n backgroundColor: 'rgba(75,192,192,0.4)',\r\n borderColor: 'rgba(75,192,192,1)',\r\n borderWidth: 1,\r\n },\r\n ],\r\n })\r\n\r\n const {selectedObjects, setSelectedObject, editor, onReady} = useFabricJSEditor({\r\n defaultStrokeColor: 'red',\r\n selection: false,\r\n })\r\n\r\n const [layout, setLayout] = useState({\r\n id: 'dashboard',\r\n layoutName: '',\r\n imageData: null,\r\n devices: [],\r\n isZoom: false,\r\n globalJs: '',\r\n designObject: [],\r\n factories: [],\r\n subSectorName: '',\r\n subSectorCode: '',\r\n sectorName: '',\r\n sectorCode: '',\r\n factroyName: '',\r\n factroyCode: '',\r\n unitName: '',\r\n unitCode: '',\r\n Sensor: [],\r\n Packet: '',\r\n Field: '',\r\n data: [],\r\n //gpsdata: [],\r\n })\r\n\r\n const [live, setLive] = useState({\r\n Live: '',\r\n Min: '',\r\n Max: '',\r\n Status: '',\r\n Note: '',\r\n Description: '',\r\n NormalRange: '',\r\n WarningRange: '',\r\n CriticalRange: '',\r\n DisableRange: '',\r\n })\r\n\r\n const [state, setState] = useState({\r\n Data: {},\r\n DashboardStat: 'CONNECTING',\r\n SensorList: [],\r\n name: '',\r\n\r\n option: {\r\n responsive: true,\r\n plugins: {\r\n annotation: {\r\n annotations: {\r\n line1: {\r\n type: 'line',\r\n yMin: 60,\r\n yMax: 60,\r\n borderColor: 'rgb(255, 99, 132)',\r\n borderWidth: 2,\r\n },\r\n },\r\n },\r\n legend: {\r\n position: 'top',\r\n },\r\n title: {\r\n display: true,\r\n text: 'Line Chart',\r\n },\r\n bezierCurve: false,\r\n elements: {\r\n line: {\r\n tension: 0,\r\n },\r\n },\r\n },\r\n },\r\n data: {\r\n labels,\r\n datasets: [\r\n {\r\n label: '',\r\n data: [],\r\n lineTension: 0,\r\n borderColor: 'rgb(255, 99, 132)',\r\n backgroundColor: 'rgba(255, 99, 132, 0.5)',\r\n },\r\n ],\r\n },\r\n })\r\n\r\n function TablesWidget10() {\r\n const columns = React.useMemo(\r\n () => [\r\n {\r\n Header: ' ',\r\n columns: [\r\n {\r\n accessor: 'code',\r\n },\r\n {\r\n accessor: 'formatCode',\r\n },\r\n {\r\n accessor: 'description',\r\n },\r\n {\r\n accessor: 'createdOn',\r\n },\r\n {\r\n accessor: 'status',\r\n },\r\n {\r\n accessor: 'priority',\r\n },\r\n {\r\n accessor: 'fK_SectorCode',\r\n },\r\n {\r\n accessor: 'facilityName',\r\n },\r\n {\r\n accessor: 'remain',\r\n },\r\n ],\r\n },\r\n ],\r\n []\r\n )\r\n\r\n const {\r\n getTableProps,\r\n getTableBodyProps,\r\n headerGroups,\r\n prepareRow,\r\n page,\r\n canPreviousPage,\r\n canNextPage,\r\n pageOptions,\r\n pageCount,\r\n gotoPage,\r\n nextPage,\r\n previousPage,\r\n setPageSize,\r\n state: {pageIndex, pageSize, globalFilter},\r\n preGlobalFilteredRows,\r\n setGlobalFilter,\r\n } = useTable(\r\n {\r\n columns,\r\n data,\r\n initialState: {pageIndex: 0, pageSize: 20, globalFilter: ''},\r\n },\r\n useGlobalFilter,\r\n usePagination\r\n )\r\n const [error, setError] = useState({status: 'E', text: ''})\r\n\r\n const [{user, token}, dispatch] = useDataLayerValue()\r\n\r\n if (InitialLoading2) return \r\n\r\n return (\r\n
\r\n {/* begin::Header */}\r\n
\r\n

\r\n Last 24h Alerts\r\n Alert Management\r\n

\r\n \r\n \r\n
\r\n
\r\n
\r\n {/* end::Header */}\r\n {/* begin::Body */}\r\n
\r\n {/* begin::Table container */}\r\n
\r\n {/* begin::Table */}\r\n \r\n \r\n Ticket\r\n Description\r\n \r\n \r\n {page.length === 0 && (\r\n \r\n \r\n No Data Found!\r\n \r\n \r\n )}\r\n {page.map((row, i) => {\r\n prepareRow(row)\r\n return (\r\n \r\n {/* {row.cells.map((cell) => {\r\n return {cell.render('Cell')}\r\n })}*/}\r\n \r\n {\r\n \r\n {row.values.formatCode}\r\n \r\n }\r\n \r\n \r\n {row.values.description}{' '}\r\n \r\n {row.values.priority}\r\n \r\n {\r\n \r\n {row.values.facilityName}\r\n \r\n }\r\n
\r\n {row.values.createdOn}\r\n {row.values.status == 'Opened' && (\r\n \r\n {' '}\r\n OPENED ({row.values.remain})\r\n \r\n )}\r\n {row.values.status == 'Resolved' && (\r\n \r\n {' '}\r\n RESOLVED\r\n \r\n )}\r\n {row.values.status == 'Closed' && (\r\n \r\n {' '}\r\n CLOSED\r\n \r\n )}\r\n \r\n \r\n )\r\n })}\r\n \r\n \r\n {/* \r\n Pagination can be built however you'd like. \r\n This is just a very basic UI implementation:\r\n */}\r\n \r\n
\r\n {/* end::Table container */}\r\n
\r\n {/* begin::Body */}\r\n \r\n )\r\n }\r\n const [countdown, setCountdown] = useState(60)\r\n const [countdown2, setCountdown2] = useState(0)\r\n // useEffect(() => {\r\n // if (connection) {\r\n // connection\r\n // .start()\r\n // .then((result) => {\r\n // setState({\r\n // ...state,\r\n // DashboardStat: 'CONNECTED',\r\n // })\r\n // setLoading(false)\r\n // reconnectRef.current = 0\r\n // connection.onreconnecting((error) => {\r\n // setState({\r\n // ...state,\r\n // DashboardStat: 'RECONNECTING',\r\n // })\r\n // console.log('Connection lost due to error . Reconnecting.')\r\n // })\r\n\r\n // // Reconnect if hub disconnects\r\n // connection.onclose(function (e) {\r\n // setState({\r\n // ...state,\r\n // DashboardStat: 'DISCONNECTED',\r\n // })\r\n // //console.log('Disconnected');\r\n // })\r\n\r\n // connection.on('ReceiveMessage', (message) => {\r\n // if (typeof message === 'string' || message instanceof String) {\r\n // message = JSON.parse(message)\r\n // }\r\n // if (message.key !== 'SensorData') return\r\n\r\n // let dataPacket = JSON.parse(message.data)\r\n // if (\r\n // dataPacket.TimeStamp === undefined ||\r\n // Math.round((new Date() - new Date(dataPacket.TimeStamp)) / 1000) > 10\r\n // ) {\r\n // return\r\n // }\r\n\r\n // console.log(message)\r\n // let newElements = {}\r\n // Object.entries(dataPacket).map(([key, value]) => {\r\n // newElements[key] = value\r\n // })\r\n\r\n // Object.entries(dataPacket).map(([key, value]) => {\r\n // for (let index = 0; index < sensors.current.length; index++) {\r\n // const element = sensors.current[index]\r\n // if (element.machineNo === '') continue\r\n\r\n // if (element.displayName === '') element.displayName = ' '\r\n\r\n // if (element.icon === undefined) element.icon = 'dot'\r\n\r\n // if (\r\n // element.isNotify === undefined ||\r\n // element.isNotify === '' ||\r\n // element.isNotify === null\r\n // )\r\n // element.isNotify = false\r\n\r\n // if (!element.lastUpdate) {\r\n // element.lastUpdate = new Date()\r\n // } else if (Math.round((new Date() - new Date(element.lastUpdate)) / 1000) > 60) {\r\n // // console.log('[DB PACKET ' + element.machineNo.toString().toLowerCase() + ']')\r\n // if (\r\n // element.type == 14 ||\r\n // element.type == 13 ||\r\n // element.type == 17 ||\r\n // element.type == 15\r\n // ) {\r\n // //console.log(\"[chart data cleared \"+element.machineNo.toString().toLowerCase()+\"]\");\r\n // element.value = []\r\n // } else {\r\n // element.value = '---'\r\n // element.color = 'black'\r\n // }\r\n // }\r\n\r\n // let object = element.object.toString().toLowerCase()\r\n // let packetType = dataPacket.Plant + '.' + dataPacket.Packet\r\n\r\n // if (\r\n // element.object.toString().toLowerCase() === key.toString().toLowerCase() &&\r\n // packetType.toString().toLowerCase() === element.pakages\r\n // ) {\r\n // element.lastUpdate = new Date()\r\n // element.value = value\r\n // element.color = 'black'\r\n // element.notification = {\r\n // toastId: key.toString().toLowerCase(),\r\n // position: 'top-right',\r\n // type: 'info',\r\n // autoClose: false, // or set time\r\n // hideProgressBar: false,\r\n // closeOnClick: true,\r\n // // pauseOnHover: true,\r\n // draggable: false,\r\n // progress: undefined,\r\n // transition: Bounce,\r\n // }\r\n // try {\r\n // // alert(layout.globalJs)\r\n // eval(layout.globalJs + ';' + element.formula)\r\n // // eval(element.formula)\r\n // } catch (error) {\r\n // element.value = '---'\r\n // element.color = 'black'\r\n // // console.log(element.formula)\r\n // console.log(error)\r\n // }\r\n // }\r\n // }\r\n // })\r\n // setState({\r\n // ...state,\r\n // SensorList: sensors.current,\r\n // DashboardStat: 'CONNECTED',\r\n // })\r\n // })\r\n // })\r\n // .catch((e) => {})\r\n // }\r\n // }, [connection])\r\n\r\n useEffect(() => {\r\n const countdownInterval = setInterval(() => {\r\n // Decrease the countdown value every second\r\n setCountdown((prevCountdown) => (prevCountdown - 1 < 0 ? 0 : prevCountdown - 1))\r\n }, 1000)\r\n\r\n // Cleanup function to clear the interval when the component unmounts\r\n return () => clearInterval(countdownInterval)\r\n }, []) // Empty dependency array ensures the effect runs only once\r\n\r\n useEffect(() => {\r\n axios({\r\n method: 'get',\r\n url:\r\n process.env.REACT_APP_BACKEND_API +\r\n '/api/v2/sensors/' +\r\n (props.match?.params?.code ?? props.code),\r\n headers: {...axioDefaultConfig.headers, Authorization: 'Bearer ' + token},\r\n }).then((response) => {\r\n // alert(response.data.result.unitModels[0].object)\r\n if (response.data.status == 'S') {\r\n setLayout({\r\n ...layout,\r\n //subSectorName: response.data.result.subSectors[0].name,\r\n //subSectorCode: response.data.result.subSectors[0].code,\r\n //sectorName: response.data.result.name,\r\n //sectorCode: response.data.result.code,\r\n //factroyName: response.data.result.subSectors[0].factories[0].name,\r\n //factroyCode: response.data.result.subSectors[0].factories[0].code,\r\n //unitName: response.data.result.businessUnitModels[0].name,\r\n //unitCode: response.data.result.businessUnitModels[0].code,\r\n Sensor: response.data.result.unitModels[0],\r\n breadCrumbs: response.data.result.breadCrumbs,\r\n })\r\n objBrowser.current = response.data.result.unitModels[0]\r\n // setBreadCrum(response)\r\n\r\n RefreshData(response.data.result.unitModels[0])\r\n // setInterval(() => {\r\n // RefreshData(response.data.result.unitModels[0])\r\n // }, 60000)\r\n\r\n setState({\r\n ...state,\r\n SensorList: response.data.result.unitModels,\r\n })\r\n sensors.current = response.data.result.unitModels\r\n setTimeout(() => {\r\n for (let index = 0; index < sensors.current.length; index++) {\r\n const element = sensors.current[index]\r\n try {\r\n eval(layout.globalJs + ';' + element.tempFeild1)\r\n } catch (error) {\r\n console.log(error)\r\n }\r\n }\r\n setState({\r\n ...state,\r\n SensorList: sensors.current,\r\n DashboardStat: 'INITIALIZATION',\r\n })\r\n\r\n setTimeout(() => {\r\n const newConnection = new HubConnectionBuilder()\r\n .withUrl(\r\n process.env.REACT_APP_MIDAS_HUB +\r\n '/' +\r\n response.data.result.automationChannel +\r\n '/Hub'\r\n )\r\n .withAutomaticReconnect()\r\n .build()\r\n setConnection(newConnection)\r\n }, 100)\r\n }, 500)\r\n }\r\n })\r\n }, [])\r\n\r\n // function RefreshData2() {\r\n // //alert('asdasd')\r\n // setChartLoading(true)\r\n // const chart = chartReference.current\r\n // setTimeout(() => {\r\n // setChartLoading(false)\r\n\r\n // chart.data.datasets[0] = [\r\n // {\r\n // label: '',\r\n // data: [],\r\n // lineTension: 0,\r\n // borderColor: 'rgb(53, 162, 235)',\r\n // backgroundColor: 'rgba(53, 162, 235, 0.5)',\r\n // },\r\n // ][0]\r\n // chart.update('none')\r\n // }, 10)\r\n // }\r\n\r\n function RefreshData(obj) {\r\n if (filter.current === '1') return\r\n //alert(filter.current)\r\n if (obj?.name == undefined) return\r\n const chart = chartReference.current\r\n const sector = ''\r\n // axios({\r\n // ...axioDefaultConfig,\r\n // method: 'get',\r\n // url: process.env.REACT_APP_BACKEND_API + '/api/get-alerts-tag?tag=' + obj.code,\r\n // headers: {...axioDefaultConfig.headers, Authorization: 'Bearer ' + token},\r\n // })\r\n // .then(function (response) {\r\n // setInitialLoading2(false)\r\n // setdata(response?.data?.data)\r\n // })\r\n // .catch(function (error) {})\r\n\r\n var datafield = {}\r\n datafield['sensorCode'] = obj.code\r\n datafield['sort'] = 'TimeStamp: 1'\r\n datafield['find'] = 't_GAS_PERCENT : {$exists:true}, TimeStamp : ' + DeviceType\r\n datafield['project'] =\r\n 'TimeStamp: 1, ' +\r\n 't_GAS_PERCENT : 1,' +\r\n 't_BAT_VOL : 1,' +\r\n 't_NCU_FW_VER : 1,' +\r\n 't_GW_NAME : 1,' +\r\n 't_RSSI : 1,' +\r\n 't_TANK_SIZE : 1,' +\r\n 't_LATITUDE : 1,' +\r\n 't_LONGITUDE : 1,' +\r\n obj.object +\r\n ' : 1, t_' +\r\n obj.object +\r\n '_gps : 1, t_' +\r\n obj.object +\r\n '_Ignition : 1 '\r\n axios({\r\n method: 'post',\r\n url: process.env.REACT_APP_BACKEND_API + '/api/v1/sensor/getall',\r\n headers: {},\r\n data: datafield,\r\n }).then((response) => {\r\n if (response.data.status == 'S') {\r\n setChartLoading(false)\r\n gpsData.current = response.data\r\n // setLayout({\r\n // ...layout,\r\n // gpsdata: response.data,\r\n // })\r\n const _labels = []\r\n const _data = []\r\n const _gps_data = []\r\n for (let index = 0; index < response.data.result.list.length; index++) {\r\n const element = response.data.result.list[index]\r\n _labels.push(element['TimeStamp'])\r\n _data.push(element['t_GAS_PERCENT'])\r\n }\r\n\r\n setCountdown(60)\r\n setLive({\r\n Live: response.data.result.currrent,\r\n Min: response.data.result.min,\r\n Max: response.data.result.max,\r\n Date: response.data.result.date,\r\n Status: response.data.result.status,\r\n Note: response.data.result.note,\r\n Description: response.data.result.description,\r\n NormalRange: response.data.result.normalRange,\r\n WarningRange: response.data.result.warningRange,\r\n CriticalRange: response.data.result.criticalRange,\r\n DisableRange: response.data.result.disableRange,\r\n Lat: response.data.result?.Lat ?? '-',\r\n Lng: response.data.result?.Lng ?? '-',\r\n ignition: response.data.result?.ignition ?? '-',\r\n Bat: response.data.result?.bat ?? '-',\r\n Bluethooth: response.data.result?.bluethooth ?? '-',\r\n Version: response.data.result?.version ?? '-',\r\n TankSize: response.data.result?.tanksize ?? '-',\r\n })\r\n\r\n _gps_data.push({\r\n lat: response.data.result?.lat,\r\n lng: response.data.result?.lng,\r\n value: response.data.result.currrent + '%',\r\n text: response.data.result.currrent + '%',\r\n endDate: '',\r\n waiting: 0,\r\n ignition: 'asdas',\r\n })\r\n\r\n setgps_data(_gps_data)\r\n setChartData({\r\n labels: _labels,\r\n datasets: [\r\n {\r\n label: '',\r\n data: _data,\r\n lineTension: 0,\r\n backgroundColor: 'rgba(75,192,192,0.4)',\r\n borderColor: 'rgba(75,192,192,1)',\r\n borderWidth: 1,\r\n },\r\n ],\r\n })\r\n setLoading(false)\r\n }\r\n })\r\n }\r\n\r\n function hideAllNotification() {\r\n toast.dismissAll()\r\n }\r\n\r\n function hideNotification(notification) {\r\n toast.dismiss(notification.toastId)\r\n }\r\n\r\n function getTransactionType(transition) {\r\n switch (transition.toLowerCase()) {\r\n case 'flip':\r\n return Flip\r\n case 'slide':\r\n return Slide\r\n case 'zoom':\r\n return Zoom\r\n\r\n default:\r\n return Bounce\r\n }\r\n }\r\n function getType(type) {\r\n switch (type.toLowerCase()) {\r\n case 'info':\r\n return toast.TYPE.INFO\r\n case 'error':\r\n return toast.TYPE.ERROR\r\n case 'success':\r\n return toast.TYPE.SUCCESS\r\n case 'warning':\r\n return toast.TYPE.WARNING\r\n default:\r\n return toast.TYPE.INFO\r\n }\r\n }\r\n\r\n function showNotification(notification) {\r\n notification.transition = getTransactionType(notification.transition)\r\n if (toast.isActive(notification.toastId)) {\r\n notification.render = notification.message\r\n notification.type = getType(notification.type)\r\n toast.update(notification.toastId, notification)\r\n return\r\n }\r\n\r\n switch (notification.type) {\r\n case 'error':\r\n toast.error(notification.message, notification)\r\n break\r\n case 'info':\r\n toast.info(notification.message, notification)\r\n break\r\n case 'warning':\r\n toast.warn(notification.message, notification)\r\n break\r\n case 'success':\r\n toast.success(notification.message, notification)\r\n break\r\n default:\r\n toast(notification.message)\r\n break\r\n }\r\n }\r\n\r\n function Notification(notification) {\r\n if (toast.isActive(notification.toastId)) {\r\n toast.dismiss(notification.toastId)\r\n }\r\n switch (notification.Type) {\r\n case 'error':\r\n toast.error(notification.Message, {\r\n toastId: notification?.toastId ?? 'default',\r\n position: notification?.Position ?? 'top-right',\r\n autoClose: notification?.Autoclose ?? 5000,\r\n hideProgressBar: true,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n })\r\n break\r\n\r\n case 'info':\r\n toast.info(notification.Message, {\r\n position: notification?.Position ?? 'top-right',\r\n autoClose: notification?.Autoclose ?? 5000,\r\n toastId: notification?.toastId ?? 'default',\r\n hideProgressBar: false,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n })\r\n break\r\n case 'warning':\r\n toast.warn(notification.Message, {\r\n position: notification?.Position ?? 'top-right',\r\n autoClose: notification?.Autoclose ?? 5000,\r\n toastId: notification.toastId ?? 'default',\r\n hideProgressBar: false,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n })\r\n break\r\n case 'success':\r\n toast.success(notification.Message, {\r\n position: notification?.Position ?? 'top-right',\r\n autoClose: notification?.Autoclose ?? 5000,\r\n toastId: notification?.toastId ?? 'default',\r\n hideProgressBar: false,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n })\r\n break\r\n default:\r\n toast('Wow so easy!')\r\n break\r\n }\r\n }\r\n\r\n const dateConverter = (startDate, timeEnd) => {\r\n const newStartDate = new Date(startDate)\r\n const newEndDate = new Date(timeEnd)\r\n const one_day = 1000 * 60\r\n let result\r\n result = Math.ceil((newEndDate.getTime() - newStartDate.getTime()) / one_day)\r\n console.log('date Converter result', result)\r\n if (result < 0) {\r\n return '0'\r\n }\r\n\r\n return `${Math.floor(result / 60)}h ${result % 60}min`\r\n }\r\n\r\n useEffect(() => {\r\n if (containerRef.current) {\r\n containerRef.current.scrollTop = containerRef.current.scrollHeight\r\n }\r\n }, [gps_data])\r\n // Prevent user from scrolling up (if needed)\r\n const handleWheel = (event) => {\r\n if (containerRef.current) {\r\n const {scrollTop, scrollHeight, clientHeight} = containerRef.current\r\n // Prevent scrolling up\r\n if (scrollTop === 0 && event.deltaY < 0) {\r\n event.preventDefault() // Prevent scrolling up\r\n }\r\n }\r\n }\r\n\r\n function onClearFilter() {\r\n filter.current = '0'\r\n setPlayUpToCount(-1)\r\n setPlayCount(0)\r\n RefreshData(objBrowser.current)\r\n }\r\n\r\n function onSelect(index2) {\r\n setdefaultProps({\r\n center: {\r\n lat: Number(gps_data[index2].lat),\r\n lng: Number(gps_data[index2].lng),\r\n },\r\n zoom: 15,\r\n })\r\n filter.current = '1'\r\n setPlayUpToCount(index2)\r\n }\r\n\r\n var statusColorClass = 'btn btn-sm btn-light-dark'\r\n if (live.Status == 'NORMAL') {\r\n statusColorClass = 'btn btn-sm btn-light-success'\r\n } else if (live.Status == 'WARNING') {\r\n statusColorClass = 'btn btn-sm btn-light-warning'\r\n } else if (live.Status == 'CRITICAL') {\r\n statusColorClass = 'btn btn-sm btn-light-danger'\r\n }\r\n\r\n var pr = live.Live ?? 0\r\n var colurx = '#900C3F'\r\n if (pr > 70) {\r\n colurx = '#09932c'\r\n } else if (pr > 45) {\r\n colurx = '#FFC300'\r\n } else {\r\n colurx = '#900C3F'\r\n }\r\n\r\n return (\r\n <>\r\n {layout?.Sensor?.name} \r\n
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n Data Visualized
\r\n \r\n {layout?.Sensor?.description}\r\n {filter.current == '0' && (\r\n <>\r\n \r\n   Last Update at {live?.Date} \r\n \r\n \r\n )}\r\n {filter.current == '1' && (\r\n <>\r\n   Filtered Apply\r\n \r\n    Clear Filers\r\n \r\n \r\n )}\r\n \r\n

\r\n
\r\n
\r\n {/*
\r\n {countdown <= 10 && filter.current == '0' && (\r\n <>\r\n Auto refresh in {countdown} seconds\r\n \r\n )}\r\n {countdown > 10 && filter.current == '0' && (\r\n <>\r\n

Auto refresh in {countdown} seconds

{' '}\r\n \r\n )}\r\n
*/}\r\n {live.Status == 'CRITICAL' && (\r\n
\r\n \r\n \r\n
\r\n
\r\n

Critical Level

\r\n
{live?.CriticalRange} Range
\r\n
\r\n
\r\n
\r\n
\r\n )}\r\n {live.Status == 'WARNING' && (\r\n
\r\n {' '}\r\n \r\n \r\n
\r\n
\r\n

Warning Level

\r\n
{live?.WarningRange} Range
\r\n
\r\n
\r\n
\r\n
\r\n )}\r\n {live.Status == 'NORMAL' && (\r\n
\r\n {' '}\r\n \r\n \r\n
\r\n
\r\n

Normal Level

\r\n
{live?.NormalRange} Range
\r\n
\r\n
\r\n
\r\n
\r\n )}\r\n {live.Status == 'DISABLED' && (\r\n
\r\n \r\n \r\n
\r\n
\r\n

Disable Level

\r\n
\r\n {live?.DisableRange.substring(0, 15) + '...'} Range\r\n
\r\n
\r\n
\r\n
\r\n
\r\n )}\r\n {live.Live && (\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 {live.Live}%\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 filter.current = '1'\r\n // alert('HI EX' + values.datex)\r\n var datafield = {}\r\n datafield['sensorCode'] = layout.Sensor.code\r\n\r\n datafield['sort'] = 'TimeStamp: 1'\r\n datafield['date'] = values.datex\r\n datafield['Ftype'] = values.Ftype\r\n datafield['find'] = 't_GAS_PERCENT : {$exists:true}, TimeStamp : DT'\r\n\r\n datafield['project'] =\r\n 'TimeStamp: 1, ' +\r\n 't_GAS_PERCENT : 1,' +\r\n 't_BAT_VOL : 1,' +\r\n 't_NCU_FW_VER : 1,' +\r\n 't_GW_NAME : 1,' +\r\n 't_RSSI : 1,' +\r\n 't_TANK_SIZE : 1,' +\r\n 't_LATITUDE : 1,' +\r\n 't_LONGITUDE : 1,' +\r\n layout.Sensor.object +\r\n ' : 1, t_' +\r\n layout.Sensor.object +\r\n '_gps : 1, t_' +\r\n layout.Sensor.object +\r\n '_Ignition : 1 '\r\n axios({\r\n method: 'post',\r\n url: process.env.REACT_APP_BACKEND_API + '/api/v1/sensor/getall',\r\n headers: {},\r\n data: datafield,\r\n }).then((response) => {\r\n const _labels = []\r\n const _data = []\r\n const _gps_data = []\r\n if (response.data.status == 'S') {\r\n setChartLoading(false)\r\n gpsData.current = response.data\r\n // setLayout({\r\n // ...layout,\r\n // gpsdata: response.data,\r\n // })\r\n\r\n for (let index = 0; index < response.data.result.list.length; index++) {\r\n const element = response.data.result.list[index]\r\n _labels.push(element['TimeStamp'])\r\n _data.push(element['t_GAS_PERCENT'])\r\n // console.log(element['t_' + obj.object + '_gps'])\r\n }\r\n\r\n setLive({\r\n Live: response.data.result.currrent,\r\n Min: response.data.result.min,\r\n Max: response.data.result.max,\r\n Date: response.data.result.date,\r\n Status: response.data.result.status,\r\n Note: response.data.result.note,\r\n Description: response.data.result.description,\r\n NormalRange: response.data.result.normalRange,\r\n WarningRange: response.data.result.warningRange,\r\n CriticalRange: response.data.result.criticalRange,\r\n DisableRange: response.data.result.disableRange,\r\n Lat: response.data.result?.Lat ?? '-',\r\n Lng: response.data.result?.Lng ?? '-',\r\n ignition: response.data.result?.ignition ?? '-',\r\n Bat: response.data.result?.bat ?? '-',\r\n Bluethooth: response.data.result?.bluethooth ?? '-',\r\n Version: response.data.result?.version ?? '-',\r\n TankSize: response.data.result?.tanksize ?? '-',\r\n })\r\n\r\n _gps_data.push({\r\n lat: response.data.result?.lat,\r\n lng: response.data.result?.lng,\r\n value: response.data.result.currrent + '%',\r\n text: response.data.result.currrent + '%',\r\n endDate: '',\r\n waiting: 0,\r\n ignition: '',\r\n })\r\n\r\n setgps_data(_gps_data)\r\n\r\n setChartData({\r\n labels: _labels,\r\n datasets: [\r\n {\r\n label: '',\r\n data: _data,\r\n lineTension: 0,\r\n backgroundColor: 'rgba(75,192,192,0.4)',\r\n borderColor: 'rgba(75,192,192,1)',\r\n borderWidth: 1,\r\n },\r\n ],\r\n })\r\n setLoading(false)\r\n console.log('response', response)\r\n } else {\r\n setgps_data([])\r\n setChartData({\r\n labels: _labels,\r\n datasets: [\r\n {\r\n label: '',\r\n data: _data,\r\n lineTension: 0,\r\n backgroundColor: 'rgba(75,192,192,0.4)',\r\n borderColor: 'rgba(75,192,192,1)',\r\n borderWidth: 1,\r\n },\r\n ],\r\n })\r\n setLoading(false)\r\n }\r\n // const _labels = []\r\n // const _data = []\r\n // if (response.data.status == 'S') {\r\n // setChartLoading(false)\r\n\r\n // for (let index = 0; index < response.data.result.list.length; index++) {\r\n // const element = response.data.result.list[index]\r\n // _labels.push(element['TimeStamp'])\r\n // _data.push(element['t_' + layout.Sensor.object])\r\n // }\r\n\r\n // setChartData({\r\n // labels: _labels,\r\n // datasets: [\r\n // {\r\n // label: '',\r\n // data: _data,\r\n // lineTension: 0,\r\n // backgroundColor: 'rgba(75,192,192,0.4)',\r\n // borderColor: 'rgba(75,192,192,1)',\r\n // borderWidth: 1,\r\n // },\r\n // ],\r\n // })\r\n // setLoading(false)\r\n // } else {\r\n // setChartData({\r\n // labels: _labels,\r\n // datasets: [\r\n // {\r\n // label: '',\r\n // data: _data,\r\n // lineTension: 0,\r\n // backgroundColor: 'rgba(75,192,192,0.4)',\r\n // borderColor: 'rgba(75,192,192,1)',\r\n // borderWidth: 1,\r\n // },\r\n // ],\r\n // })\r\n // setLoading(false)\r\n // }\r\n })\r\n //()\r\n }}\r\n >\r\n {({values, errors, touched, handleChange, handleBlur, handleSubmit}) => (\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 {!isSubmitting && (\r\n \r\n Filter   \r\n \r\n )}\r\n {isSubmitting && (\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n {isChartLoading && <>Loading}\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 Data Visualized (24h)\r\n \r\n {layout?.Sensor?.description} |\r\n \r\n Last Update at {live?.Date} \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

Battey Level

\r\n
{live?.Bat}
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {' '}\r\n \r\n \r\n
\r\n
\r\n

Bluetooth Strength

\r\n
{live?.Bluethooth}
\r\n
\r\n
\r\n
\r\n \r\n
\r\n {' '}\r\n \r\n
\r\n Footer\r\n
\r\n
\r\n
\r\n

Tank Size

\r\n
{live?.TankSize}
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n

Version

\r\n
\r\n {live?.Version}\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n {gps_data.length > 0 && (\r\n <>\r\n
\r\n {/* begin::Header */}\r\n
\r\n

\r\n Map View \r\n {/* {PlayCount} */}\r\n \r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n {gps_data.map((marker, index) => (\r\n \r\n ))}\r\n {/*\r\n { lat :6.9123483,\r\n lng:80.0322383,\r\n }\r\n key={index}\r\n lat={marker.lat}\r\n lng={marker.lng}\r\n text={''}\r\n isNotify={''} \r\n Link={''}\r\n Type={''}\r\n Value={''}\r\n \r\n {\r\n \r\n } */}\r\n \r\n
\r\n
\r\n
\r\n
\r\n {/* begin::Body */}\r\n
\r\n \r\n )}\r\n\r\n {/* {JSON.stringify(gps_data)} */}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n Minimum Gas Level\r\n Based On Last 24hours\r\n

\r\n \r\n
\r\n \r\n {live.Min}%\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n

\r\n Maximum Gas Level\r\n Based On Last 24hours\r\n

\r\n \r\n
\r\n \r\n {live.Max}%\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n )\r\n\r\n return (\r\n <>\r\n {layout?.Sensor?.name} \r\n <>\r\n <>\r\n
\r\n
\r\n
\r\n

\r\n Data Visualized \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 SensorView2\r\n","import React, {useState, useEffect, useRef} from 'react'\r\nimport './../../../_metronic/assets/sass/kntdashbaord.css'\r\nimport {HubConnectionBuilder, JsonHubProtocol} from '@microsoft/signalr'\r\nimport {PageLink, PageTitle} from '../../../_metronic/layout/core'\r\nimport axios from 'axios'\r\nimport {Formik, Form, Field} from 'formik'\r\nimport 'reactjs-popup/dist/index.css'\r\nimport {ToastContainer, toast, Slide, Zoom, Flip, Bounce} from 'react-toastify'\r\nimport {FabricJSCanvas, useFabricJSEditor} from 'fabricjs-react'\r\nimport GoogleMapReact from 'google-map-react'\r\nimport MyGreatPlace from './MyPlace.jsx'\r\nimport Drive from './Drive.jsx'\r\nimport {Line} from 'react-chartjs-2'\r\nimport {\r\n Chart as ChartJS,\r\n CategoryScale,\r\n LinearScale,\r\n PointElement,\r\n LineElement,\r\n Title,\r\n Tooltip,\r\n Legend,\r\n Filler,\r\n} from 'chart.js'\r\nimport {axioDefaultConfig} from '../common/commonResource2'\r\nimport {useDataLayerValue} from '../../../DataLayer'\r\nimport {KTSVG, toAbsoluteUrl} from '../../../_metronic/helpers'\r\nimport {useTable, useFilters, useGlobalFilter, usePagination, useAsyncDebounce} from 'react-table'\r\nimport ErrorMessage from '../helpers/message'\r\nimport Loading from '../helpers/loading'\r\nimport {func, number} from 'prop-types'\r\nimport {auto, right} from '@popperjs/core'\r\n\r\nChartJS.register(CategoryScale, LinearScale, PointElement, LineElement, Title, Tooltip, Legend)\r\n\r\nfunction SensorView3(props) {\r\n const containerRef = useRef(null) // Create a ref for the scroll container\r\n const [isSubmitting, setSubmitting] = useState(false)\r\n const [{token}, dispatch] = useDataLayerValue()\r\n const labels = []\r\n const chartReference = React.createRef()\r\n const breadCrumbs = useRef([])\r\n const hubService = process.env.REACT_APP_MIDAS_HUB\r\n const [connection, setConnection] = useState(null)\r\n const reconnectRef = useRef(0)\r\n const urlParams = new URLSearchParams(window.location.search)\r\n const [isloading, setLoading] = useState(true)\r\n const [isChartLoading, setChartLoading] = useState(true)\r\n const [loadingMap, setLoadingMap] = useState(false)\r\n const [defaultProps, setdefaultProps] = useState({\r\n center: {\r\n lat: 6.911979146490742,\r\n lng: 79.92597226721936,\r\n },\r\n zoom: 18,\r\n })\r\n const [SensorList, setsensorList] = useState([])\r\n const sensors = useRef([])\r\n const [DeviceType, setDeviceType] = useState('24h')\r\n const [InitialLoading2, setInitialLoading2] = useState(true)\r\n const filter = useRef('0')\r\n const objBrowser = useRef(null)\r\n const gpsData = useRef([])\r\n const [PlayCount, setPlayCount] = useState(0)\r\n const [PlayUpToCount, setPlayUpToCount] = useState(-1)\r\n //const PlayCount = useRef(0)\r\n const [data, setdata] = useState([])\r\n //const gps_data = useRef([])\r\n const [gps_data, setgps_data] = useState([])\r\n const isPlaying = useRef(false) //setIsPlaying] = useState(false)\r\n const [chartData, setChartData] = useState({\r\n labels: [],\r\n datasets: [\r\n {\r\n label: '',\r\n data: [],\r\n backgroundColor: 'rgba(75,192,192,0.4)',\r\n borderColor: 'rgba(75,192,192,1)',\r\n borderWidth: 1,\r\n },\r\n ],\r\n })\r\n\r\n const {selectedObjects, setSelectedObject, editor, onReady} = useFabricJSEditor({\r\n defaultStrokeColor: 'red',\r\n selection: false,\r\n })\r\n\r\n const [layout, setLayout] = useState({\r\n id: 'dashboard',\r\n layoutName: '',\r\n imageData: null,\r\n devices: [],\r\n isZoom: false,\r\n globalJs: '',\r\n designObject: [],\r\n factories: [],\r\n subSectorName: '',\r\n subSectorCode: '',\r\n sectorName: '',\r\n sectorCode: '',\r\n factroyName: '',\r\n factroyCode: '',\r\n unitName: '',\r\n unitCode: '',\r\n Sensor: [],\r\n Packet: '',\r\n Field: '',\r\n data: [],\r\n //gpsdata: [],\r\n })\r\n\r\n const [live, setLive] = useState({\r\n Live: '',\r\n Min: '',\r\n Max: '',\r\n Status: '',\r\n Note: '',\r\n Description: '',\r\n NormalRange: '',\r\n WarningRange: '',\r\n CriticalRange: '',\r\n DisableRange: '',\r\n })\r\n\r\n const [state, setState] = useState({\r\n Data: {},\r\n DashboardStat: 'CONNECTING',\r\n SensorList: [],\r\n name: '',\r\n\r\n option: {\r\n responsive: true,\r\n plugins: {\r\n annotation: {\r\n annotations: {\r\n line1: {\r\n type: 'line',\r\n yMin: 60,\r\n yMax: 60,\r\n borderColor: 'rgb(255, 99, 132)',\r\n borderWidth: 2,\r\n },\r\n },\r\n },\r\n legend: {\r\n position: 'top',\r\n },\r\n title: {\r\n display: true,\r\n text: 'Line Chart',\r\n },\r\n bezierCurve: false,\r\n elements: {\r\n line: {\r\n tension: 0,\r\n },\r\n },\r\n },\r\n },\r\n data: {\r\n labels,\r\n datasets: [\r\n {\r\n label: '',\r\n data: [],\r\n lineTension: 0,\r\n borderColor: 'rgb(255, 99, 132)',\r\n backgroundColor: 'rgba(255, 99, 132, 0.5)',\r\n },\r\n ],\r\n },\r\n })\r\n\r\n function TablesWidget10() {\r\n const columns = React.useMemo(\r\n () => [\r\n {\r\n Header: ' ',\r\n columns: [\r\n {\r\n accessor: 'code',\r\n },\r\n {\r\n accessor: 'formatCode',\r\n },\r\n {\r\n accessor: 'description',\r\n },\r\n {\r\n accessor: 'createdOn',\r\n },\r\n {\r\n accessor: 'status',\r\n },\r\n {\r\n accessor: 'priority',\r\n },\r\n {\r\n accessor: 'fK_SectorCode',\r\n },\r\n {\r\n accessor: 'facilityName',\r\n },\r\n {\r\n accessor: 'remain',\r\n },\r\n ],\r\n },\r\n ],\r\n []\r\n )\r\n\r\n const {\r\n getTableProps,\r\n getTableBodyProps,\r\n headerGroups,\r\n prepareRow,\r\n page,\r\n canPreviousPage,\r\n canNextPage,\r\n pageOptions,\r\n pageCount,\r\n gotoPage,\r\n nextPage,\r\n previousPage,\r\n setPageSize,\r\n state: {pageIndex, pageSize, globalFilter},\r\n preGlobalFilteredRows,\r\n setGlobalFilter,\r\n } = useTable(\r\n {\r\n columns,\r\n data,\r\n initialState: {pageIndex: 0, pageSize: 20, globalFilter: ''},\r\n },\r\n useGlobalFilter,\r\n usePagination\r\n )\r\n const [error, setError] = useState({status: 'E', text: ''})\r\n\r\n const [{user, token}, dispatch] = useDataLayerValue()\r\n\r\n if (InitialLoading2) return \r\n\r\n return (\r\n
\r\n {/* begin::Header */}\r\n
\r\n

\r\n Last 24h Alerts\r\n Alert Management\r\n

\r\n \r\n \r\n
\r\n
\r\n
\r\n {/* end::Header */}\r\n {/* begin::Body */}\r\n
\r\n {/* begin::Table container */}\r\n
\r\n {/* begin::Table */}\r\n \r\n \r\n Ticket\r\n Description\r\n \r\n \r\n {page.length === 0 && (\r\n \r\n \r\n No Data Found!\r\n \r\n \r\n )}\r\n {page.map((row, i) => {\r\n prepareRow(row)\r\n return (\r\n \r\n {/* {row.cells.map((cell) => {\r\n return {cell.render('Cell')}\r\n })}*/}\r\n \r\n {\r\n \r\n {row.values.formatCode}\r\n \r\n }\r\n \r\n \r\n {row.values.description}{' '}\r\n \r\n {row.values.priority}\r\n \r\n {\r\n \r\n {row.values.facilityName}\r\n \r\n }\r\n
\r\n {row.values.createdOn}\r\n {row.values.status == 'Opened' && (\r\n \r\n {' '}\r\n OPENED ({row.values.remain})\r\n \r\n )}\r\n {row.values.status == 'Resolved' && (\r\n \r\n {' '}\r\n RESOLVED\r\n \r\n )}\r\n {row.values.status == 'Closed' && (\r\n \r\n {' '}\r\n CLOSED\r\n \r\n )}\r\n \r\n \r\n )\r\n })}\r\n \r\n \r\n {/* \r\n Pagination can be built however you'd like. \r\n This is just a very basic UI implementation:\r\n */}\r\n \r\n
\r\n {/* end::Table container */}\r\n
\r\n {/* begin::Body */}\r\n \r\n )\r\n }\r\n const [countdown, setCountdown] = useState(60)\r\n const [countdown2, setCountdown2] = useState(0)\r\n // useEffect(() => {\r\n // if (connection) {\r\n // connection\r\n // .start()\r\n // .then((result) => {\r\n // setState({\r\n // ...state,\r\n // DashboardStat: 'CONNECTED',\r\n // })\r\n // setLoading(false)\r\n // reconnectRef.current = 0\r\n // connection.onreconnecting((error) => {\r\n // setState({\r\n // ...state,\r\n // DashboardStat: 'RECONNECTING',\r\n // })\r\n // console.log('Connection lost due to error . Reconnecting.')\r\n // })\r\n\r\n // // Reconnect if hub disconnects\r\n // connection.onclose(function (e) {\r\n // setState({\r\n // ...state,\r\n // DashboardStat: 'DISCONNECTED',\r\n // })\r\n // //console.log('Disconnected');\r\n // })\r\n\r\n // connection.on('ReceiveMessage', (message) => {\r\n // if (typeof message === 'string' || message instanceof String) {\r\n // message = JSON.parse(message)\r\n // }\r\n // if (message.key !== 'SensorData') return\r\n\r\n // let dataPacket = JSON.parse(message.data)\r\n // if (\r\n // dataPacket.TimeStamp === undefined ||\r\n // Math.round((new Date() - new Date(dataPacket.TimeStamp)) / 1000) > 10\r\n // ) {\r\n // return\r\n // }\r\n\r\n // console.log(message)\r\n // let newElements = {}\r\n // Object.entries(dataPacket).map(([key, value]) => {\r\n // newElements[key] = value\r\n // })\r\n\r\n // Object.entries(dataPacket).map(([key, value]) => {\r\n // for (let index = 0; index < sensors.current.length; index++) {\r\n // const element = sensors.current[index]\r\n // if (element.machineNo === '') continue\r\n\r\n // if (element.displayName === '') element.displayName = ' '\r\n\r\n // if (element.icon === undefined) element.icon = 'dot'\r\n\r\n // if (\r\n // element.isNotify === undefined ||\r\n // element.isNotify === '' ||\r\n // element.isNotify === null\r\n // )\r\n // element.isNotify = false\r\n\r\n // if (!element.lastUpdate) {\r\n // element.lastUpdate = new Date()\r\n // } else if (Math.round((new Date() - new Date(element.lastUpdate)) / 1000) > 60) {\r\n // // console.log('[DB PACKET ' + element.machineNo.toString().toLowerCase() + ']')\r\n // if (\r\n // element.type == 14 ||\r\n // element.type == 13 ||\r\n // element.type == 17 ||\r\n // element.type == 15\r\n // ) {\r\n // //console.log(\"[chart data cleared \"+element.machineNo.toString().toLowerCase()+\"]\");\r\n // element.value = []\r\n // } else {\r\n // element.value = '---'\r\n // element.color = 'black'\r\n // }\r\n // }\r\n\r\n // let object = element.object.toString().toLowerCase()\r\n // let packetType = dataPacket.Plant + '.' + dataPacket.Packet\r\n\r\n // if (\r\n // element.object.toString().toLowerCase() === key.toString().toLowerCase() &&\r\n // packetType.toString().toLowerCase() === element.pakages\r\n // ) {\r\n // element.lastUpdate = new Date()\r\n // element.value = value\r\n // element.color = 'black'\r\n // element.notification = {\r\n // toastId: key.toString().toLowerCase(),\r\n // position: 'top-right',\r\n // type: 'info',\r\n // autoClose: false, // or set time\r\n // hideProgressBar: false,\r\n // closeOnClick: true,\r\n // // pauseOnHover: true,\r\n // draggable: false,\r\n // progress: undefined,\r\n // transition: Bounce,\r\n // }\r\n // try {\r\n // // alert(layout.globalJs)\r\n // eval(layout.globalJs + ';' + element.formula)\r\n // // eval(element.formula)\r\n // } catch (error) {\r\n // element.value = '---'\r\n // element.color = 'black'\r\n // // console.log(element.formula)\r\n // console.log(error)\r\n // }\r\n // }\r\n // }\r\n // })\r\n // setState({\r\n // ...state,\r\n // SensorList: sensors.current,\r\n // DashboardStat: 'CONNECTED',\r\n // })\r\n // })\r\n // })\r\n // .catch((e) => {})\r\n // }\r\n // }, [connection])\r\n\r\n useEffect(() => {\r\n const countdownInterval = setInterval(() => {\r\n // Decrease the countdown value every second\r\n setCountdown((prevCountdown) => (prevCountdown - 1 < 0 ? 0 : prevCountdown - 1))\r\n }, 1000)\r\n\r\n // Cleanup function to clear the interval when the component unmounts\r\n return () => clearInterval(countdownInterval)\r\n }, []) // Empty dependency array ensures the effect runs only once\r\n\r\n useEffect(() => {\r\n axios({\r\n method: 'get',\r\n url:\r\n process.env.REACT_APP_BACKEND_API +\r\n '/api/v2/sensors/' +\r\n (props.match?.params?.code ?? props.code),\r\n headers: {...axioDefaultConfig.headers, Authorization: 'Bearer ' + token},\r\n }).then((response) => {\r\n // alert(response.data.result.unitModels[0].object)\r\n if (response.data.status == 'S') {\r\n setLayout({\r\n ...layout,\r\n //subSectorName: response.data.result.subSectors[0].name,\r\n //subSectorCode: response.data.result.subSectors[0].code,\r\n //sectorName: response.data.result.name,\r\n //sectorCode: response.data.result.code,\r\n //factroyName: response.data.result.subSectors[0].factories[0].name,\r\n //factroyCode: response.data.result.subSectors[0].factories[0].code,\r\n //unitName: response.data.result.businessUnitModels[0].name,\r\n //unitCode: response.data.result.businessUnitModels[0].code,\r\n Sensor: response.data.result.unitModels[0],\r\n breadCrumbs: response.data.result.breadCrumbs,\r\n })\r\n objBrowser.current = response.data.result.unitModels[0]\r\n // setBreadCrum(response)\r\n\r\n RefreshData(response.data.result.unitModels[0])\r\n // setInterval(() => {\r\n // RefreshData(response.data.result.unitModels[0])\r\n // }, 60000)\r\n\r\n setState({\r\n ...state,\r\n SensorList: response.data.result.unitModels,\r\n })\r\n sensors.current = response.data.result.unitModels\r\n setTimeout(() => {\r\n for (let index = 0; index < sensors.current.length; index++) {\r\n const element = sensors.current[index]\r\n try {\r\n eval(layout.globalJs + ';' + element.tempFeild1)\r\n } catch (error) {\r\n console.log(error)\r\n }\r\n }\r\n setState({\r\n ...state,\r\n SensorList: sensors.current,\r\n DashboardStat: 'INITIALIZATION',\r\n })\r\n\r\n setTimeout(() => {\r\n const newConnection = new HubConnectionBuilder()\r\n .withUrl(\r\n process.env.REACT_APP_MIDAS_HUB +\r\n '/' +\r\n response.data.result.automationChannel +\r\n '/Hub'\r\n )\r\n .withAutomaticReconnect()\r\n .build()\r\n setConnection(newConnection)\r\n }, 100)\r\n }, 500)\r\n }\r\n })\r\n }, [])\r\n\r\n // function RefreshData2() {\r\n // //alert('asdasd')\r\n // setChartLoading(true)\r\n // const chart = chartReference.current\r\n // setTimeout(() => {\r\n // setChartLoading(false)\r\n\r\n // chart.data.datasets[0] = [\r\n // {\r\n // label: '',\r\n // data: [],\r\n // lineTension: 0,\r\n // borderColor: 'rgb(53, 162, 235)',\r\n // backgroundColor: 'rgba(53, 162, 235, 0.5)',\r\n // },\r\n // ][0]\r\n // chart.update('none')\r\n // }, 10)\r\n // }\r\n\r\n function RefreshData(obj) {\r\n if (filter.current === '1') return\r\n //alert(filter.current)\r\n if (obj?.name == undefined) return\r\n const chart = chartReference.current\r\n const sector = ''\r\n // axios({\r\n // ...axioDefaultConfig,\r\n // method: 'get',\r\n // url: process.env.REACT_APP_BACKEND_API + '/api/get-alerts-tag?tag=' + obj.code,\r\n // headers: {...axioDefaultConfig.headers, Authorization: 'Bearer ' + token},\r\n // })\r\n // .then(function (response) {\r\n // setInitialLoading2(false)\r\n // setdata(response?.data?.data)\r\n // })\r\n // .catch(function (error) {})\r\n\r\n var datafield = {}\r\n datafield['sensorCode'] = obj.code\r\n datafield['sort'] = 'TimeStamp: 1'\r\n datafield['find'] = 't_GAS_PERCENT : {$exists:true}, TimeStamp : ' + DeviceType\r\n datafield['project'] =\r\n 'TimeStamp: 1, ' +\r\n 't_GAS_PERCENT : 1,' +\r\n 't_BAT_VOL : 1,' +\r\n 't_NCU_FW_VER : 1,' +\r\n 't_GW_NAME : 1,' +\r\n 't_RSSI : 1,' +\r\n 't_TANK_SIZE : 1,' +\r\n 't_LATITUDE : 1,' +\r\n 't_LONGITUDE : 1,' +\r\n obj.object +\r\n ' : 1, t_' +\r\n obj.object +\r\n '_gps : 1, t_' +\r\n obj.object +\r\n '_Ignition : 1 '\r\n axios({\r\n method: 'post',\r\n url: process.env.REACT_APP_BACKEND_API + '/api/v1/sensor/getall',\r\n headers: {},\r\n data: datafield,\r\n }).then((response) => {\r\n if (response.data.status == 'S') {\r\n setChartLoading(false)\r\n gpsData.current = response.data\r\n // setLayout({\r\n // ...layout,\r\n // gpsdata: response.data,\r\n // })\r\n const _labels = []\r\n const _data = []\r\n const _gps_data = []\r\n for (let index = 0; index < response.data.result.list.length; index++) {\r\n const element = response.data.result.list[index]\r\n _labels.push(element['TimeStamp'])\r\n _data.push(element['t_GAS_PERCENT'])\r\n }\r\n\r\n setCountdown(60)\r\n setLive({\r\n Live: response.data.result.currrent,\r\n Min: response.data.result.min,\r\n Max: response.data.result.max,\r\n Date: response.data.result.date,\r\n Status: response.data.result.status,\r\n Note: response.data.result.note,\r\n Description: response.data.result.description,\r\n NormalRange: response.data.result.normalRange,\r\n WarningRange: response.data.result.warningRange,\r\n CriticalRange: response.data.result.criticalRange,\r\n DisableRange: response.data.result.disableRange,\r\n Lat: response.data.result?.Lat ?? '-',\r\n Lng: response.data.result?.Lng ?? '-',\r\n ignition: response.data.result?.ignition ?? '-',\r\n Bat: response.data.result?.bat ?? '-',\r\n Bluethooth: response.data.result?.bluethooth ?? '-',\r\n Version: response.data.result?.version ?? '-',\r\n TankSize: response.data.result?.tanksize ?? '-',\r\n package: response.data.result?.package ?? '-',\r\n })\r\n\r\n _gps_data.push({\r\n lat: response.data.result?.lat,\r\n lng: response.data.result?.lng,\r\n value: response.data.result.currrent + '%',\r\n text: response.data.result.currrent + '%',\r\n endDate: '',\r\n waiting: 0,\r\n ignition: 'asdas',\r\n })\r\n\r\n setgps_data(_gps_data)\r\n setChartData({\r\n labels: _labels,\r\n datasets: [\r\n {\r\n label: '',\r\n data: _data,\r\n lineTension: 0,\r\n backgroundColor: 'rgba(75,192,192,0.4)',\r\n borderColor: 'rgba(75,192,192,1)',\r\n borderWidth: 1,\r\n },\r\n ],\r\n })\r\n setLoading(false)\r\n }\r\n })\r\n }\r\n\r\n function hideAllNotification() {\r\n toast.dismissAll()\r\n }\r\n\r\n function hideNotification(notification) {\r\n toast.dismiss(notification.toastId)\r\n }\r\n\r\n function getTransactionType(transition) {\r\n switch (transition.toLowerCase()) {\r\n case 'flip':\r\n return Flip\r\n case 'slide':\r\n return Slide\r\n case 'zoom':\r\n return Zoom\r\n\r\n default:\r\n return Bounce\r\n }\r\n }\r\n function getType(type) {\r\n switch (type.toLowerCase()) {\r\n case 'info':\r\n return toast.TYPE.INFO\r\n case 'error':\r\n return toast.TYPE.ERROR\r\n case 'success':\r\n return toast.TYPE.SUCCESS\r\n case 'warning':\r\n return toast.TYPE.WARNING\r\n default:\r\n return toast.TYPE.INFO\r\n }\r\n }\r\n\r\n function showNotification(notification) {\r\n notification.transition = getTransactionType(notification.transition)\r\n if (toast.isActive(notification.toastId)) {\r\n notification.render = notification.message\r\n notification.type = getType(notification.type)\r\n toast.update(notification.toastId, notification)\r\n return\r\n }\r\n\r\n switch (notification.type) {\r\n case 'error':\r\n toast.error(notification.message, notification)\r\n break\r\n case 'info':\r\n toast.info(notification.message, notification)\r\n break\r\n case 'warning':\r\n toast.warn(notification.message, notification)\r\n break\r\n case 'success':\r\n toast.success(notification.message, notification)\r\n break\r\n default:\r\n toast(notification.message)\r\n break\r\n }\r\n }\r\n\r\n function Notification(notification) {\r\n if (toast.isActive(notification.toastId)) {\r\n toast.dismiss(notification.toastId)\r\n }\r\n switch (notification.Type) {\r\n case 'error':\r\n toast.error(notification.Message, {\r\n toastId: notification?.toastId ?? 'default',\r\n position: notification?.Position ?? 'top-right',\r\n autoClose: notification?.Autoclose ?? 5000,\r\n hideProgressBar: true,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n })\r\n break\r\n\r\n case 'info':\r\n toast.info(notification.Message, {\r\n position: notification?.Position ?? 'top-right',\r\n autoClose: notification?.Autoclose ?? 5000,\r\n toastId: notification?.toastId ?? 'default',\r\n hideProgressBar: false,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n })\r\n break\r\n case 'warning':\r\n toast.warn(notification.Message, {\r\n position: notification?.Position ?? 'top-right',\r\n autoClose: notification?.Autoclose ?? 5000,\r\n toastId: notification.toastId ?? 'default',\r\n hideProgressBar: false,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n })\r\n break\r\n case 'success':\r\n toast.success(notification.Message, {\r\n position: notification?.Position ?? 'top-right',\r\n autoClose: notification?.Autoclose ?? 5000,\r\n toastId: notification?.toastId ?? 'default',\r\n hideProgressBar: false,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n })\r\n break\r\n default:\r\n toast('Wow so easy!')\r\n break\r\n }\r\n }\r\n\r\n const dateConverter = (startDate, timeEnd) => {\r\n const newStartDate = new Date(startDate)\r\n const newEndDate = new Date(timeEnd)\r\n const one_day = 1000 * 60\r\n let result\r\n result = Math.ceil((newEndDate.getTime() - newStartDate.getTime()) / one_day)\r\n console.log('date Converter result', result)\r\n if (result < 0) {\r\n return '0'\r\n }\r\n\r\n return `${Math.floor(result / 60)}h ${result % 60}min`\r\n }\r\n\r\n useEffect(() => {\r\n if (containerRef.current) {\r\n containerRef.current.scrollTop = containerRef.current.scrollHeight\r\n }\r\n }, [gps_data])\r\n // Prevent user from scrolling up (if needed)\r\n const handleWheel = (event) => {\r\n if (containerRef.current) {\r\n const {scrollTop, scrollHeight, clientHeight} = containerRef.current\r\n // Prevent scrolling up\r\n if (scrollTop === 0 && event.deltaY < 0) {\r\n event.preventDefault() // Prevent scrolling up\r\n }\r\n }\r\n }\r\n\r\n function onClearFilter() {\r\n filter.current = '0'\r\n setPlayUpToCount(-1)\r\n setPlayCount(0)\r\n RefreshData(objBrowser.current)\r\n }\r\n\r\n function onSelect(index2) {\r\n setdefaultProps({\r\n center: {\r\n lat: Number(gps_data[index2].lat),\r\n lng: Number(gps_data[index2].lng),\r\n },\r\n zoom: 15,\r\n })\r\n filter.current = '1'\r\n setPlayUpToCount(index2)\r\n }\r\n\r\n var statusColorClass = 'btn btn-sm btn-light-dark'\r\n if (live.Status == 'NORMAL') {\r\n statusColorClass = 'btn btn-sm btn-light-success'\r\n } else if (live.Status == 'WARNING') {\r\n statusColorClass = 'btn btn-sm btn-light-warning'\r\n } else if (live.Status == 'CRITICAL') {\r\n statusColorClass = 'btn btn-sm btn-light-danger'\r\n }\r\n\r\n var pr = live.Live ?? 0\r\n var colurx = '#900C3F'\r\n if (pr > 70) {\r\n colurx = '#09932c'\r\n } else if (pr > 45) {\r\n colurx = '#FFC300'\r\n } else {\r\n colurx = '#900C3F'\r\n }\r\n\r\n return (\r\n <>\r\n

props.funcsetGasInfo('')} style={{cursor: 'pointer'}}>\r\n {' '}\r\n Go to Back\r\n

\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n Data Visualized
\r\n \r\n {layout?.Sensor?.description}\r\n {filter.current == '0' && (\r\n <>\r\n \r\n   Last Update at {live?.Date} \r\n \r\n \r\n )}\r\n {filter.current == '1' && (\r\n <>\r\n   Filtered Apply\r\n \r\n    Clear Filers\r\n \r\n \r\n )}\r\n \r\n

\r\n
\r\n
\r\n {/*
\r\n {countdown <= 10 && filter.current == '0' && (\r\n <>\r\n Auto refresh in {countdown} seconds\r\n \r\n )}\r\n {countdown > 10 && filter.current == '0' && (\r\n <>\r\n

Auto refresh in {countdown} seconds

{' '}\r\n \r\n )}\r\n
*/}\r\n {live.Status == 'CRITICAL' && (\r\n
\r\n \r\n \r\n
\r\n
\r\n

Critical Level

\r\n
{live?.CriticalRange} Range
\r\n
\r\n
\r\n
\r\n
\r\n )}\r\n {live.Status == 'WARNING' && (\r\n
\r\n {' '}\r\n \r\n \r\n
\r\n
\r\n

Warning Level

\r\n
{live?.WarningRange} Range
\r\n
\r\n
\r\n
\r\n
\r\n )}\r\n {live.Status == 'NORMAL' && (\r\n
\r\n {' '}\r\n \r\n \r\n
\r\n
\r\n

Normal Level

\r\n
{live?.NormalRange} Range
\r\n
\r\n
\r\n
\r\n
\r\n )}\r\n {live.Status == 'DISABLED' && (\r\n
\r\n \r\n \r\n
\r\n
\r\n

Disable Level

\r\n
\r\n {live?.DisableRange.substring(0, 15) + '...'} Range\r\n
\r\n
\r\n
\r\n
\r\n
\r\n )}\r\n {live.Live && (\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 {live.Live}%\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 filter.current = '1'\r\n // alert('HI EX' + values.datex)\r\n var datafield = {}\r\n datafield['sensorCode'] = layout.Sensor.code\r\n\r\n datafield['sort'] = 'TimeStamp: 1'\r\n datafield['date'] = values.datex\r\n datafield['Ftype'] = values.Ftype\r\n datafield['find'] = 't_GAS_PERCENT : {$exists:true}, TimeStamp : DT'\r\n\r\n datafield['project'] =\r\n 'TimeStamp: 1, ' +\r\n 't_GAS_PERCENT : 1,' +\r\n 't_BAT_VOL : 1,' +\r\n 't_NCU_FW_VER : 1,' +\r\n 't_GW_NAME : 1,' +\r\n 't_RSSI : 1,' +\r\n 't_TANK_SIZE : 1,' +\r\n 't_LATITUDE : 1,' +\r\n 't_LONGITUDE : 1,' +\r\n layout.Sensor.object +\r\n ' : 1, t_' +\r\n layout.Sensor.object +\r\n '_gps : 1, t_' +\r\n layout.Sensor.object +\r\n '_Ignition : 1 '\r\n axios({\r\n method: 'post',\r\n url: process.env.REACT_APP_BACKEND_API + '/api/v1/sensor/getall',\r\n headers: {},\r\n data: datafield,\r\n }).then((response) => {\r\n const _labels = []\r\n const _data = []\r\n const _gps_data = []\r\n if (response.data.status == 'S') {\r\n setChartLoading(false)\r\n gpsData.current = response.data\r\n // setLayout({\r\n // ...layout,\r\n // gpsdata: response.data,\r\n // })\r\n\r\n for (let index = 0; index < response.data.result.list.length; index++) {\r\n const element = response.data.result.list[index]\r\n _labels.push(element['TimeStamp'])\r\n _data.push(element['t_GAS_PERCENT'])\r\n // console.log(element['t_' + obj.object + '_gps'])\r\n }\r\n\r\n setLive({\r\n Live: response.data.result.currrent,\r\n Min: response.data.result.min,\r\n Max: response.data.result.max,\r\n Date: response.data.result.date,\r\n Status: response.data.result.status,\r\n Note: response.data.result.note,\r\n Description: response.data.result.description,\r\n NormalRange: response.data.result.normalRange,\r\n WarningRange: response.data.result.warningRange,\r\n CriticalRange: response.data.result.criticalRange,\r\n DisableRange: response.data.result.disableRange,\r\n Lat: response.data.result?.Lat ?? '-',\r\n Lng: response.data.result?.Lng ?? '-',\r\n ignition: response.data.result?.ignition ?? '-',\r\n Bat: response.data.result?.bat ?? '-',\r\n Bluethooth: response.data.result?.bluethooth ?? '-',\r\n Version: response.data.result?.version ?? '-',\r\n TankSize: response.data.result?.tanksize ?? '-',\r\n package: response.data.result?.package ?? '-',\r\n })\r\n\r\n _gps_data.push({\r\n lat: response.data.result?.lat,\r\n lng: response.data.result?.lng,\r\n value: response.data.result.currrent + '%',\r\n text: response.data.result.currrent + '%',\r\n endDate: '',\r\n waiting: 0,\r\n ignition: '',\r\n })\r\n\r\n setgps_data(_gps_data)\r\n\r\n setChartData({\r\n labels: _labels,\r\n datasets: [\r\n {\r\n label: '',\r\n data: _data,\r\n lineTension: 0,\r\n backgroundColor: 'rgba(75,192,192,0.4)',\r\n borderColor: 'rgba(75,192,192,1)',\r\n borderWidth: 1,\r\n },\r\n ],\r\n })\r\n setLoading(false)\r\n console.log('response', response)\r\n } else {\r\n setgps_data([])\r\n setChartData({\r\n labels: _labels,\r\n datasets: [\r\n {\r\n label: '',\r\n data: _data,\r\n lineTension: 0,\r\n backgroundColor: 'rgba(75,192,192,0.4)',\r\n borderColor: 'rgba(75,192,192,1)',\r\n borderWidth: 1,\r\n },\r\n ],\r\n })\r\n setLoading(false)\r\n }\r\n // const _labels = []\r\n // const _data = []\r\n // if (response.data.status == 'S') {\r\n // setChartLoading(false)\r\n\r\n // for (let index = 0; index < response.data.result.list.length; index++) {\r\n // const element = response.data.result.list[index]\r\n // _labels.push(element['TimeStamp'])\r\n // _data.push(element['t_' + layout.Sensor.object])\r\n // }\r\n\r\n // setChartData({\r\n // labels: _labels,\r\n // datasets: [\r\n // {\r\n // label: '',\r\n // data: _data,\r\n // lineTension: 0,\r\n // backgroundColor: 'rgba(75,192,192,0.4)',\r\n // borderColor: 'rgba(75,192,192,1)',\r\n // borderWidth: 1,\r\n // },\r\n // ],\r\n // })\r\n // setLoading(false)\r\n // } else {\r\n // setChartData({\r\n // labels: _labels,\r\n // datasets: [\r\n // {\r\n // label: '',\r\n // data: _data,\r\n // lineTension: 0,\r\n // backgroundColor: 'rgba(75,192,192,0.4)',\r\n // borderColor: 'rgba(75,192,192,1)',\r\n // borderWidth: 1,\r\n // },\r\n // ],\r\n // })\r\n // setLoading(false)\r\n // }\r\n })\r\n //()\r\n }}\r\n >\r\n {({values, errors, touched, handleChange, handleBlur, handleSubmit}) => (\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 {!isSubmitting && (\r\n \r\n Filter   \r\n \r\n )}\r\n {isSubmitting && (\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n {isChartLoading && <>Loading}\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 Data Visualized (24h)\r\n \r\n {layout?.Sensor?.description} |\r\n \r\n Last Update at {live?.Date} \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

MAC ADRC

\r\n
\r\n

{live?.package}

{' '}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {' '}\r\n \r\n \r\n
\r\n
\r\n

Battey Level

\r\n
{live?.Bat}
\r\n
\r\n
\r\n
\r\n \r\n
\r\n {' '}\r\n \r\n \r\n
\r\n
\r\n

Bluetooth Strength

\r\n
{live?.Bluethooth}
\r\n
\r\n
\r\n
\r\n \r\n
\r\n {' '}\r\n \r\n
\r\n Footer\r\n
\r\n
\r\n
\r\n

Tank Size

\r\n
{live?.TankSize}
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n

Version

\r\n
\r\n {live?.Version}\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n {gps_data.length > 0 && (\r\n <>\r\n
\r\n {/* begin::Header */}\r\n
\r\n

\r\n Map View \r\n {/* {PlayCount} */}\r\n \r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n {gps_data.map((marker, index) => (\r\n \r\n ))}\r\n {/*\r\n { lat :6.9123483,\r\n lng:80.0322383,\r\n }\r\n key={index}\r\n lat={marker.lat}\r\n lng={marker.lng}\r\n text={''}\r\n isNotify={''} \r\n Link={''}\r\n Type={''}\r\n Value={''}\r\n \r\n {\r\n \r\n } */}\r\n \r\n
\r\n
\r\n
\r\n
\r\n {/* begin::Body */}\r\n
\r\n \r\n )}\r\n\r\n {/* {JSON.stringify(gps_data)} */}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n Minimum Gas Level\r\n Based On Last 24hours\r\n

\r\n \r\n
\r\n \r\n {live.Min}%\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n

\r\n Maximum Gas Level\r\n Based On Last 24hours\r\n

\r\n \r\n
\r\n \r\n {live.Max}%\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n )\r\n\r\n return (\r\n <>\r\n {layout?.Sensor?.name} \r\n <>\r\n <>\r\n
\r\n
\r\n
\r\n

\r\n Data Visualized \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 SensorView3\r\n","import React, {Component} from 'react'\r\nimport PropTypes from 'prop-types'\r\nimport shouldPureComponentUpdate from 'react-pure-render/function'\r\nimport Popup from 'reactjs-popup'\r\nimport 'reactjs-popup/dist/index.css'\r\nimport {greatPlaceStyle} from './my_great_place_styles.js'\r\n\r\nexport default class MyGreatPlace extends Component {\r\n static propTypes = {\r\n text: PropTypes.string,\r\n isNotify: PropTypes.bool,\r\n Link: PropTypes.string,\r\n }\r\n\r\n static defaultProps = {}\r\n\r\n shouldComponentUpdate = shouldPureComponentUpdate\r\n\r\n render() {\r\n if (this.props.Type == 'Car') {\r\n return (\r\n <>\r\n \r\n alert('')}\r\n width={'50px'}\r\n src='https://cdn4.iconfinder.com/data/icons/VISTA/accounting/png/256/truck.png'\r\n />\r\n \r\n }\r\n position='right center'\r\n >\r\n
\r\n temp : {this.props.Value}°C
\r\n \r\n View More Details\r\n \r\n
\r\n \r\n \r\n )\r\n } else {\r\n if (!this.props.isNotify) {\r\n return (\r\n <>\r\n {this.props.text}}\r\n position='right center'\r\n >\r\n \r\n \r\n \r\n )\r\n } else {\r\n return (\r\n <>\r\n \r\n {this.props.text}{' '}\r\n alert('')}\r\n width={'50px'}\r\n src='https://media.tenor.com/3mZe43RbInsAAAAi/alert-blink.gif'\r\n />\r\n \r\n }\r\n position='right center'\r\n >\r\n \r\n \r\n \r\n )\r\n }\r\n }\r\n }\r\n}\r\n\r\nconst PopupExample = () => (\r\n Trigger} position='right center'>\r\n
Popup content here !!
\r\n
\r\n)\r\n","import React, { useState, useEffect, useRef,PureComponent } from \"react\";\r\nimport './../../../../_metronic/assets/sass/kntdashbaord.css'\r\nimport { HubConnectionBuilder, JsonHubProtocol } from '@microsoft/signalr'\r\nimport axios from 'axios'\r\nimport useWindowDimensions from '../../helpers/WindowDimension'\r\nimport Dictionary from '../../helpers/Dictionary'\r\nimport { KTSVG, toAbsoluteUrl } from '../../../../_metronic/helpers'\r\nimport { Dropdown1 } from '../../../../_metronic/partials'\r\nimport { AsideDefault } from '../../../../_metronic/layout/components/aside/AsideDefault'\r\nimport { Footer } from '../../../../_metronic/layout/components/Footer'\r\nimport { HeaderWrapper } from '../../../../_metronic/layout/components/header/HeaderWrapper'\r\nimport { PageDataProvider } from '../../../../_metronic/layout/core'\r\nimport { Content } from '../../../../_metronic/layout/components/Content'\r\nimport { ChartsWidget1, TablesWidget1, ListsWidget5, TablesWidget5, } from '../../../../_metronic/partials/widgets'\r\nimport { stat } from 'fs'\r\nimport Confetti from 'react-confetti'\r\nimport ImageMapper from \"react-image-mapper\";\r\nimport Draggable from \"react-draggable\";\r\nimport { v4 as uuidv4 } from \"uuid\";\r\nimport Popup from 'reactjs-popup';\r\nimport SensorArea from './SensorArea'\r\nimport 'reactjs-popup/dist/index.css'\r\nimport { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer } from 'recharts';\r\n\r\nimport { auto, hide, right } from \"@popperjs/core\";\r\n\r\nvar randomColor = require(\"randomcolor\");\r\n\r\n\r\n\r\nfunction Display(props) {\r\n\r\n \r\n const [connection, setConnection] = useState(null)\r\n const reconnectRef = useRef(0);\r\n const urlParams = new URLSearchParams(window.location.search);\r\n const [isloading, setLoading] = useState(true);\r\n const [item, setItem] = useState(\"\");\r\n const [SensorList, setsensorList] = useState([]);\r\n const sensors = useRef([]);\r\n \r\n \r\n const [layout, setLayout] = useState(\r\n {\r\n id: props.match?.params?.id ?? props.layout, //urlParams.get('id')??props.layout,\r\n layoutName: \"\",\r\n imageData: null,\r\n devices: [],\r\n isZoom: false\r\n });\r\n const [state, setState] = useState({\r\n Data: {},\r\n DashboardStat: 'CONNECTING',\r\n SensorList: []\r\n })\r\n \r\n const hubService = process.env.REACT_APP_MIDAS_HUB ;//\"https://signalr.midassit.com\";\r\n \r\n useEffect(() => {\r\n if (connection) {\r\n connection\r\n .start()\r\n .then((result) => {\r\n setState({\r\n ...state,\r\n DashboardStat: 'CONNECTED',\r\n })\r\n setLoading(false)\r\n reconnectRef.current = 0;\r\n console.log('Connected!');\r\n connection.onreconnecting((error) => {\r\n setState({\r\n ...state,\r\n DashboardStat: 'RECONNECTING',\r\n })\r\n console.log('Connection lost due to error . Reconnecting.')\r\n })\r\n \r\n // Reconnect if hub disconnects\r\n connection.onclose(function (e) {\r\n setState({\r\n ...state,\r\n DashboardStat: 'DISCONNECTED',\r\n })\r\n console.log('Disconnected');\r\n })\r\n \r\n connection.on('ReceiveMessage', (message) => {\r\n \r\n if (typeof message === 'string' || message instanceof String)\r\n {\r\n message = JSON.parse(message);\r\n }\r\n \r\n if (message.key !== \"SensorData\")\r\n return;\r\n \r\n let dataPacket = JSON.parse(message.data)\r\n //console.log(\"[DB PACKET]\"+JSON.stringify(dataPacket));\r\n if (dataPacket.TimeStamp === undefined || Math.round((new Date() - new Date(dataPacket.TimeStamp)) / 1000) > 10) {\r\n return\r\n } else {\r\n \r\n let newElements = {};\r\n Object.entries(dataPacket).map(([key, value]) => {\r\n newElements[key] = value;\r\n });\r\n \r\n Object.entries(dataPacket).map(([key, value]) => {\r\n for (let index = 0; index < sensors.current.length; index++) {\r\n const element = sensors.current[index];\r\n if (element.machineNo === '')\r\n continue;\r\n \r\n if (element.icon === undefined)\r\n element.icon = 'dot';\r\n \r\n if (element.isNotify === undefined || element.isNotify === '' || element.isNotify === null)\r\n element.isNotify = false;\r\n \r\n if (!element.lastUpdate) {\r\n element.lastUpdate = new Date();\r\n }\r\n else if (Math.round((new Date() - new Date(element.lastUpdate)) / 1000) > 60) {\r\n element.value = \"---\";\r\n element.color = 'black';\r\n }\r\n \r\n let object = element.object.toString().toLowerCase();\r\n if (props?.object !== undefined && props?.object !== '') {\r\n object = props?.object.toString().toLowerCase();\r\n }\r\n \r\n \r\n if (element.machineNo.toString().toLowerCase() === key.toString().toLowerCase() && message.packetType.toString().toLowerCase() === object) {\r\n element.lastUpdate = new Date();\r\n element.value = value;\r\n element.color = 'black';\r\n try {\r\n eval(element.formula)\r\n } catch (error) {\r\n element.value = '---'\r\n element.color = 'black';\r\n console.log(element.formula)\r\n console.log(error);\r\n }\r\n }\r\n }\r\n });\r\n setState({\r\n ...state,\r\n SensorList: sensors.current,\r\n DashboardStat: 'CONNECTED',\r\n });\r\n }\r\n })\r\n })\r\n .catch((e) => {\r\n console.log('Connection failed: ', e);\r\n })\r\n }\r\n }, [connection])\r\n \r\n useEffect(() => {\r\n axios({\r\n method: 'get',\r\n url: process.env.REACT_APP_BACKEND_API + '/api/sensor-monitor/layout?layout=' + layout.id,\r\n headers: {},\r\n }).then((response) => {\r\n \r\n setLayout({\r\n ...layout,\r\n layoutName: response.data.result.layoutName,\r\n imageData: \"data:image/png;base64,\" + response.data.result.imageData,\r\n isZoom: response.data.result.isZoom\r\n })\r\n \r\n setState({\r\n ...state,\r\n SensorList: response.data.result.devices\r\n })\r\n \r\n setTimeout(() => {\r\n const newConnection = new HubConnectionBuilder()\r\n .withUrl(hubService + '/Automation/Hub')\r\n .withAutomaticReconnect()\r\n .build();\r\n setConnection(newConnection);\r\n \r\n }, 100);\r\n sensors.current = response.data.result.devices\r\n })\r\n \r\n }, []);\r\n \r\n let bodyCss = {\r\n overflowX: \"hidden\" \r\n }\r\n \r\n let backcss = {\r\n top: 0, left: 0, right: 0,\r\n bottom: 0, margin: \"auto\", width: \"1200px\"\r\n }\r\n \r\n let sensorcss = {\r\n position: \"absolute\", width: \"1200px\"\r\n }\r\n \r\n if (!layout.isZoom) {\r\n backcss = {\r\n top: 0, left: 0, right: 0,\r\n bottom: 0, margin: \"auto\"\r\n }\r\n \r\n sensorcss = {\r\n position: \"absolute\"\r\n }\r\n \r\n bodyCss = {\r\n \r\n }\r\n }\r\n\r\n const data = [\r\n {\r\n name: 'Page A',\r\n uv: 4000,\r\n pv: 2400,\r\n amt: 2400,\r\n },\r\n {\r\n name: 'Page B',\r\n uv: 3000,\r\n pv: 1398,\r\n amt: 2210,\r\n },\r\n {\r\n name: 'Page C',\r\n uv: 2000,\r\n pv: 9800,\r\n amt: 2290,\r\n },\r\n {\r\n name: 'Page D',\r\n uv: 2780,\r\n pv: 3908,\r\n amt: 2000,\r\n },\r\n {\r\n name: 'Page E',\r\n uv: 1890,\r\n pv: 4800,\r\n amt: 2181,\r\n },\r\n {\r\n name: 'Page F',\r\n uv: 2390,\r\n pv: 3800,\r\n amt: 2500,\r\n },\r\n {\r\n name: 'Page G',\r\n uv: 3490,\r\n pv: 4300,\r\n amt: 2100,\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\nexport default Display;\r\n//https://codesandbox.io/s/k2ds4?file=/src/App.js:128-4341\r\n","export class ElementStyleUtil {\r\n public static set(element: HTMLElement, property: string, value?: any, important?: boolean) {\r\n if (important) {\r\n element.style.setProperty(property, value, 'important')\r\n } else {\r\n element.style.setProperty(property, value)\r\n }\r\n }\r\n\r\n public static get(element: HTMLElement, attributeName: string) {\r\n return element.style.getPropertyValue(attributeName)\r\n }\r\n\r\n public static remove(element: HTMLElement, attibuteName: string) {\r\n element.style.removeProperty(attibuteName)\r\n }\r\n}\r\n","export class DataUtil {\r\n static store: Map> = new Map()\r\n\r\n public static set(instance: HTMLElement | undefined, key: string, data: any): void {\r\n if (!instance) {\r\n return\r\n }\r\n\r\n const instanceData = DataUtil.store.get(instance)\r\n if (!instanceData) {\r\n const newMap = new Map().set(key, data)\r\n DataUtil.store.set(instance, newMap)\r\n return\r\n }\r\n\r\n instanceData.set(key, data)\r\n }\r\n\r\n public static get(instance: HTMLElement, key: string): any | undefined {\r\n const instanceData = DataUtil.store.get(instance)\r\n if (!instanceData) {\r\n return\r\n }\r\n\r\n return instanceData.get(key)\r\n }\r\n\r\n public static remove(instance: HTMLElement, key: string): void {\r\n const instanceData = DataUtil.store.get(instance)\r\n if (!instanceData) {\r\n return\r\n }\r\n\r\n instanceData.delete(key)\r\n }\r\n\r\n public static has(instance: HTMLElement, key: string): boolean {\r\n const instanceData = DataUtil.store.get(instance)\r\n if (instanceData) {\r\n return instanceData.has(key)\r\n }\r\n\r\n return false\r\n }\r\n\r\n public static getAllInstancesByKey(key: string) {\r\n const result: any[] = []\r\n DataUtil.store.forEach((val) => {\r\n val.forEach((v, k) => {\r\n if (k === key) {\r\n result.push(v)\r\n }\r\n })\r\n })\r\n return result\r\n }\r\n}\r\n","function getObjectPropertyValueByKey(obj: any, key: string): any | undefined {\r\n const map = new Map(Object.entries(obj))\r\n if (obj.hasOwnProperty(key) && map) {\r\n return map.get(key)\r\n }\r\n}\r\n\r\n/**\r\n * Generates unique ID for give prefix.\r\n * @param {string} prefix Prefix for generated ID\r\n * @returns {boolean}\r\n */\r\nfunction getUniqueIdWithPrefix(prefix: string | undefined): string {\r\n const result = Math.floor(Math.random() * new Date().getTime()).toString()\r\n if (!prefix) {\r\n return result\r\n }\r\n\r\n return `${prefix}${result}`\r\n}\r\n\r\n/* eslint-disable no-useless-escape */\r\nfunction stringSnakeToCamel(str: string): string {\r\n return str.replace(/(\\-\\w)/g, function (m) {\r\n return m[1].toUpperCase()\r\n })\r\n}\r\n\r\nfunction toJSON(value: string | JSON): JSON | undefined {\r\n if (typeof value !== 'string') {\r\n return value\r\n }\r\n\r\n if (!value) {\r\n return undefined\r\n }\r\n\r\n // (\"'\" => \"\\\"\");\r\n const result = value\r\n .toString()\r\n .split('')\r\n .map((el) => (el !== \"'\" ? el : '\"'))\r\n .join('')\r\n var jsonStr = result.replace(/(\\w+:)|(\\w+ :)/g, function (matched) {\r\n return '\"' + matched.substring(0, matched.length - 1) + '\":'\r\n })\r\n try {\r\n return JSON.parse(jsonStr)\r\n } catch {\r\n return undefined\r\n }\r\n}\r\n\r\nexport {getObjectPropertyValueByKey, getUniqueIdWithPrefix, stringSnakeToCamel, toJSON}\r\n","import {getUniqueIdWithPrefix} from './_TypesHelpers'\r\n\r\nexport class DOMEventHandlerUtil {\r\n public static store = new Map()\r\n\r\n public static on(\r\n element: HTMLElement,\r\n selector: string,\r\n eventName: string,\r\n callBack: any\r\n ): string {\r\n const eventId = getUniqueIdWithPrefix('DOMEvent')\r\n DOMEventHandlerUtil.store.set(eventId, (e: Event) => {\r\n const targets = element.querySelectorAll(selector)\r\n let target: HTMLElement | null = e.target as HTMLElement\r\n while (target && target !== element) {\r\n for (let i = 0; i < targets.length; i++) {\r\n if (target === targets[i]) {\r\n callBack.call(target, e)\r\n }\r\n }\r\n\r\n if (target.parentElement) {\r\n target = target.parentElement\r\n } else {\r\n target = null\r\n }\r\n }\r\n })\r\n element.addEventListener(eventName, DOMEventHandlerUtil.store.get(eventId))\r\n return eventId\r\n }\r\n\r\n public static off(element: HTMLElement, eventName: string, eventId: string): void {\r\n const funcFromStore = DOMEventHandlerUtil.store.get(eventId)\r\n if (!funcFromStore) {\r\n return\r\n }\r\n\r\n element.removeEventListener(eventName, funcFromStore)\r\n DOMEventHandlerUtil.store.delete(eventId)\r\n }\r\n\r\n public static one(element: HTMLElement, eventName: string, callBack: Function): void {\r\n element.addEventListener(eventName, function calee(e) {\r\n // remove event\r\n if (e.target && e.target.removeEventListener) {\r\n e.target.removeEventListener(e.type, calee)\r\n }\r\n\r\n if (element && e && e.currentTarget) {\r\n // if (element && element.removeEventListener && e && e.currentTarget) {\r\n e.currentTarget.removeEventListener(e.type, calee)\r\n }\r\n\r\n // call hander\r\n return callBack(e)\r\n })\r\n }\r\n}\r\n","import {DOMEventHandlerUtil} from './_DOMEventHandlerUtil'\r\nimport {ElementStyleUtil} from './_ElementStyleUtil'\r\nimport {getElementOffset} from './DomHelpers'\r\n\r\nexport class ElementAnimateUtil {\r\n public static animate(\r\n from: number,\r\n to: number,\r\n duration: number,\r\n update: Function,\r\n complete?: Function\r\n ) {\r\n /**\r\n * TinyAnimate.easings\r\n * Adapted from jQuery Easing\r\n */\r\n const easings = {\r\n linear: function (t: number, b: number, c: number, d: number) {\r\n return (c * t) / d + b\r\n },\r\n }\r\n\r\n // Create mock done() function if necessary\r\n if (!complete) {\r\n complete = function () {}\r\n }\r\n\r\n // Animation loop\r\n // let canceled = false;\r\n const change = to - from\r\n\r\n function loop(timestamp: number) {\r\n var time = (timestamp || +new Date()) - start\r\n\r\n if (time >= 0) {\r\n update(easings.linear(time, from, change, duration))\r\n }\r\n if (time >= 0 && time >= duration) {\r\n update(to)\r\n if (complete) {\r\n complete()\r\n }\r\n } else {\r\n window.requestAnimationFrame(loop)\r\n }\r\n }\r\n\r\n update(from)\r\n\r\n // Start animation loop\r\n const start =\r\n window.performance && window.performance.now ? window.performance.now() : +new Date()\r\n\r\n window.requestAnimationFrame(loop)\r\n }\r\n\r\n public static animateClass(\r\n element: HTMLElement,\r\n animationName: string,\r\n callBack?: Function\r\n ): void {\r\n const animateClasses = animationName.split(' ')\r\n animateClasses.forEach((cssClass) => element.classList.add(cssClass))\r\n DOMEventHandlerUtil.one(element, 'animationend', function () {\r\n animateClasses.forEach((cssClass) => element.classList.remove(cssClass))\r\n })\r\n\r\n if (callBack) {\r\n DOMEventHandlerUtil.one(element, 'animationend', callBack)\r\n }\r\n }\r\n\r\n public static transitionEnd(element: HTMLElement, callBack: Function) {\r\n DOMEventHandlerUtil.one(element, 'transitionend', callBack)\r\n }\r\n\r\n public static animationEnd(element: HTMLElement, callBack: Function) {\r\n DOMEventHandlerUtil.one(element, 'animationend', callBack)\r\n }\r\n\r\n public static animationDelay(element: HTMLElement, value: string) {\r\n ElementStyleUtil.set(element, 'animation-delay', value)\r\n }\r\n\r\n public static animationDuration(element: HTMLElement, value: string) {\r\n ElementStyleUtil.set(element, 'animation-duration', value)\r\n }\r\n\r\n public static scrollTo(element: HTMLElement | null, offset: number, duration: number = 500) {\r\n let targetPos = element ? getElementOffset(element).top : 0\r\n let scrollPos =\r\n window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0\r\n\r\n if (offset) {\r\n scrollPos += offset\r\n targetPos = targetPos - offset\r\n }\r\n\r\n const from = scrollPos\r\n const to = targetPos\r\n\r\n ElementAnimateUtil.animate(from, to, duration, function (value: number) {\r\n document.documentElement.scrollTop = value\r\n // document.body.parentNode.scrollTop = value;\r\n document.body.scrollTop = value\r\n }) //, easing, done\r\n }\r\n public static scrollTop(offset: number, duration: number) {\r\n ElementAnimateUtil.scrollTo(null, offset, duration)\r\n }\r\n}\r\n","import {OffsetModel} from './models/OffsetModel'\r\nimport {ViewPortModel} from './models/ViewPortModel'\r\nimport {ElementStyleUtil} from './_ElementStyleUtil'\r\nimport {DataUtil} from './_DataUtil'\r\nimport {ElementAnimateUtil} from './ElementAnimateUtil'\r\nimport {getObjectPropertyValueByKey, toJSON} from './_TypesHelpers'\r\n\r\nfunction getCSS(el: HTMLElement, styleProp: string) {\r\n const defaultView = (el.ownerDocument || document).defaultView\r\n\r\n if (!defaultView) {\r\n return ''\r\n }\r\n\r\n // sanitize property name to css notation\r\n // (hyphen separated words eg. font-Size)\r\n styleProp = styleProp.replace(/([A-Z])/g, '-$1').toLowerCase()\r\n\r\n return defaultView.getComputedStyle(el, null).getPropertyValue(styleProp)\r\n}\r\n\r\nfunction getCSSVariableValue(variableName: string) {\r\n let hex = getComputedStyle(document.documentElement).getPropertyValue(variableName)\r\n if (hex && hex.length > 0) {\r\n hex = hex.trim()\r\n }\r\n\r\n return hex\r\n}\r\n\r\nfunction getElementActualCss(el: HTMLElement, prop: any, cache: boolean) {\r\n let css = ''\r\n\r\n if (!el.getAttribute('kt-hidden-' + prop) || cache === false) {\r\n let value\r\n\r\n // the element is hidden so:\r\n // making the el block so we can meassure its height but still be hidden\r\n css = el.style.cssText\r\n el.style.cssText = 'position: absolute; visibility: hidden; display: block;'\r\n\r\n if (prop === 'width') {\r\n value = el.offsetWidth\r\n } else if (prop === 'height') {\r\n value = el.offsetHeight\r\n }\r\n\r\n el.style.cssText = css\r\n\r\n // store it in cache\r\n if (value !== undefined) {\r\n el.setAttribute('kt-hidden-' + prop, value.toString())\r\n return parseFloat(value.toString())\r\n }\r\n return 0\r\n } else {\r\n // store it in cache\r\n const attributeValue = el.getAttribute('kt-hidden-' + prop)\r\n if (attributeValue || attributeValue === '0') {\r\n return parseFloat(attributeValue)\r\n }\r\n }\r\n}\r\n\r\nfunction getElementActualHeight(el: HTMLElement) {\r\n return getElementActualCss(el, 'height', false)\r\n}\r\n\r\nfunction getElementActualWidth(el: HTMLElement, cache?: boolean) {\r\n return getElementActualCss(el, 'width', false)\r\n}\r\n\r\nfunction getElementIndex(element: HTMLElement) {\r\n if (element.parentNode) {\r\n const c = element.parentNode.children\r\n for (let i = 0; i < c.length; i++) {\r\n if (c[i] === element) return i\r\n }\r\n }\r\n return -1\r\n}\r\n\r\n// https://developer.mozilla.org/en-US/docs/Web/API/Element/matches\r\nfunction getElementMatches(element: HTMLElement, selector: string) {\r\n const p = Element.prototype\r\n const f = p.matches || p.webkitMatchesSelector\r\n\r\n if (element && element.tagName) {\r\n return f.call(element, selector)\r\n } else {\r\n return false\r\n }\r\n}\r\n\r\nfunction getElementOffset(el: HTMLElement): OffsetModel {\r\n // Return zeros for disconnected and hidden (display: none) elements (gh-2310)\r\n // Support: IE <=11 only\r\n // Running getBoundingClientRect on a\r\n // disconnected node in IE throws an error\r\n if (!el.getClientRects().length) {\r\n return {top: 0, left: 0}\r\n }\r\n\r\n // Get document-relative position by adding viewport scroll to viewport-relative gBCR\r\n const rect = el.getBoundingClientRect()\r\n const win = el.ownerDocument.defaultView\r\n if (win) {\r\n return {\r\n top: rect.top + win.pageYOffset,\r\n left: rect.left + win.pageXOffset,\r\n }\r\n }\r\n\r\n return rect\r\n}\r\n\r\nfunction getElementParents(element: Element, selector: string) {\r\n // Element.matches() polyfill\r\n if (!Element.prototype.matches) {\r\n Element.prototype.matches = function (s) {\r\n const matches = (document || this.ownerDocument).querySelectorAll(s)\r\n let i = matches.length\r\n while (--i >= 0 && matches.item(i) !== this) {}\r\n return i > -1\r\n }\r\n }\r\n\r\n // Set up a parent array\r\n const parents = []\r\n\r\n let el: Element | null = element\r\n\r\n // Push each parent element to the array\r\n for (; el && el !== document.body; el = el.parentElement) {\r\n if (selector) {\r\n if (el.matches(selector)) {\r\n parents.push(el)\r\n }\r\n continue\r\n }\r\n parents.push(el)\r\n }\r\n\r\n // Return our parent array\r\n return parents\r\n}\r\n\r\nfunction getHighestZindex(el: HTMLElement) {\r\n let bufferNode: Node | null = el as Node\r\n let buffer = el\r\n while (bufferNode && bufferNode !== document) {\r\n // Ignore z-index if position is set to a value where z-index is ignored by the browser\r\n // This makes behavior of this function consistent across browsers\r\n // WebKit always returns auto if the element is positioned\r\n const position = buffer.style.getPropertyValue('position')\r\n if (position === 'absolute' || position === 'relative' || position === 'fixed') {\r\n // IE returns 0 when zIndex is not specified\r\n // other browsers return a string\r\n // we ignore the case of nested elements with an explicit value of 0\r\n //
\r\n const value = parseInt(buffer.style.getPropertyValue('z-index'))\r\n if (!isNaN(value) && value !== 0) {\r\n return value\r\n }\r\n }\r\n\r\n bufferNode = bufferNode.parentNode\r\n buffer = bufferNode as HTMLElement\r\n }\r\n return null\r\n}\r\n\r\nfunction getScrollTop(): number {\r\n return (document.scrollingElement || document.documentElement).scrollTop\r\n}\r\n\r\n// https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth\r\nfunction getViewPort(): ViewPortModel {\r\n return {\r\n width: window.innerWidth,\r\n height: window.innerHeight,\r\n }\r\n}\r\n\r\nfunction insertAfterElement(el: HTMLElement, referenceNode: HTMLElement) {\r\n return referenceNode.parentNode?.insertBefore(el, referenceNode.nextSibling)\r\n}\r\n\r\nfunction isElementHasClasses(element: HTMLElement, classesStr: string): boolean {\r\n const classes = classesStr.split(' ')\r\n for (let i = 0; i < classes.length; i++) {\r\n if (!element.classList.contains(classes[i])) {\r\n return false\r\n }\r\n }\r\n\r\n return true\r\n}\r\n\r\nfunction isVisibleElement(element: HTMLElement): boolean {\r\n return !(element.offsetWidth === 0 && element.offsetHeight === 0)\r\n}\r\n\r\n// Throttle function: Input as function which needs to be throttled and delay is the time interval in milliseconds\r\nfunction throttle(timer: number | undefined, func: Function, delay?: number) {\r\n // If setTimeout is already scheduled, no need to do anything\r\n if (timer) {\r\n return\r\n }\r\n\r\n // Schedule a setTimeout after delay seconds\r\n timer = window.setTimeout(function () {\r\n func()\r\n\r\n // Once setTimeout function execution is finished, timerId = undefined so that in
\r\n // the next scroll event function execution can be scheduled by the setTimeout\r\n timer = undefined\r\n }, delay)\r\n}\r\n\r\nfunction getElementChildren(element: HTMLElement, selector: string): Array | null {\r\n if (!element || !element.childNodes) {\r\n return null\r\n }\r\n\r\n const result: Array = []\r\n for (let i = 0; i < element.childNodes.length; i++) {\r\n const child = element.childNodes[i]\r\n // child.nodeType == 1 => Element, Text, Comment, ProcessingInstruction, CDATASection, EntityReference\r\n if (child.nodeType === 1 && getElementMatches(child as HTMLElement, selector)) {\r\n result.push(child as HTMLElement)\r\n }\r\n }\r\n\r\n return result\r\n}\r\n\r\nfunction getElementChild(element: HTMLElement, selector: string): HTMLElement | null {\r\n const children = getElementChildren(element, selector)\r\n return children ? children[0] : null\r\n}\r\n\r\nfunction isMobileDevice(): boolean {\r\n let test = getViewPort().width < +getBreakpoint('lg') ? true : false\r\n\r\n if (test === false) {\r\n // For use within normal web clients\r\n test = navigator.userAgent.match(/iPad/i) != null\r\n }\r\n\r\n return test\r\n}\r\n\r\nfunction slide(el: HTMLElement, dir: string, speed: number, callback: any) {\r\n if (\r\n !el ||\r\n (dir === 'up' && isVisibleElement(el) === false) ||\r\n (dir === 'down' && isVisibleElement(el) === true)\r\n ) {\r\n return\r\n }\r\n\r\n speed = speed ? speed : 600\r\n let calcHeight = getElementActualHeight(el)\r\n let calcPaddingTop: number = 0\r\n let calcPaddingBottom: number = 0\r\n\r\n if (ElementStyleUtil.get(el, 'padding-top') && DataUtil.get(el, 'slide-padding-top') !== true) {\r\n DataUtil.set(el, 'slide-padding-top', ElementStyleUtil.get(el, 'padding-top'))\r\n }\r\n\r\n if (\r\n ElementStyleUtil.get(el, 'padding-bottom') &&\r\n DataUtil.has(el, 'slide-padding-bottom') !== true\r\n ) {\r\n DataUtil.set(el, 'slide-padding-bottom', ElementStyleUtil.get(el, 'padding-bottom'))\r\n }\r\n\r\n if (DataUtil.has(el, 'slide-padding-top')) {\r\n calcPaddingTop = parseInt(DataUtil.get(el, 'slide-padding-top'))\r\n }\r\n\r\n if (DataUtil.has(el, 'slide-padding-bottom')) {\r\n calcPaddingBottom = parseInt(DataUtil.get(el, 'slide-padding-bottom'))\r\n }\r\n\r\n if (dir === 'up') {\r\n // up\r\n el.style.cssText = 'display: block; overflow: hidden;'\r\n\r\n if (calcPaddingTop) {\r\n ElementAnimateUtil.animate(0, calcPaddingTop, speed, function (value: number) {\r\n el.style.paddingTop = calcPaddingTop - value + 'px'\r\n })\r\n }\r\n\r\n if (calcPaddingBottom) {\r\n ElementAnimateUtil.animate(0, calcPaddingBottom, speed, function (value: number) {\r\n el.style.paddingBottom = calcPaddingBottom - value + 'px'\r\n })\r\n }\r\n\r\n ElementAnimateUtil.animate(\r\n 0,\r\n calcHeight || 0,\r\n speed,\r\n function (value: number) {\r\n el.style.height = (calcHeight || 0) - value + 'px'\r\n },\r\n function () {\r\n el.style.height = ''\r\n el.style.display = 'none'\r\n\r\n if (typeof callback === 'function') {\r\n callback()\r\n }\r\n }\r\n )\r\n } else if (dir === 'down') {\r\n // down\r\n el.style.cssText = 'display: block; overflow: hidden;'\r\n\r\n if (calcPaddingTop) {\r\n ElementAnimateUtil.animate(\r\n 0,\r\n calcPaddingTop,\r\n speed,\r\n function (value: number) {\r\n //\r\n el.style.paddingTop = value + 'px'\r\n },\r\n function () {\r\n el.style.paddingTop = ''\r\n }\r\n )\r\n }\r\n\r\n if (calcPaddingBottom) {\r\n ElementAnimateUtil.animate(\r\n 0,\r\n calcPaddingBottom,\r\n speed,\r\n function (value: number) {\r\n el.style.paddingBottom = value + 'px'\r\n },\r\n function () {\r\n el.style.paddingBottom = ''\r\n }\r\n )\r\n }\r\n\r\n ElementAnimateUtil.animate(\r\n 0,\r\n calcHeight || 0,\r\n speed,\r\n function (value: number) {\r\n el.style.height = value + 'px'\r\n },\r\n function () {\r\n el.style.height = ''\r\n el.style.display = ''\r\n el.style.overflow = ''\r\n\r\n if (typeof callback === 'function') {\r\n callback()\r\n }\r\n }\r\n )\r\n }\r\n}\r\n\r\nfunction slideUp(el: HTMLElement, speed: number, callback: any) {\r\n slide(el, 'up', speed, callback)\r\n}\r\n\r\nfunction slideDown(el: HTMLElement, speed: number, callback: any) {\r\n slide(el, 'down', speed, callback)\r\n}\r\n\r\nfunction getBreakpoint(breakpoint: string) {\r\n let value: number | string = getCSSVariableValue('--bs-' + breakpoint)\r\n if (value) {\r\n value = parseInt(value.trim())\r\n }\r\n\r\n return value\r\n}\r\n\r\nfunction getAttributeValueByBreakpoint(incomingAttr: string): string | JSON {\r\n let value = toJSON(incomingAttr)\r\n if (typeof value !== 'object') {\r\n return incomingAttr\r\n }\r\n\r\n const width = getViewPort().width\r\n let resultKey\r\n let resultBreakpoint = -1\r\n let breakpoint\r\n\r\n for (let key in value) {\r\n if (key === 'default') {\r\n breakpoint = 0\r\n } else {\r\n breakpoint = getBreakpoint(key) ? +getBreakpoint(key) : parseInt(key)\r\n }\r\n\r\n if (breakpoint <= width && breakpoint > resultBreakpoint) {\r\n resultKey = key\r\n resultBreakpoint = breakpoint\r\n }\r\n }\r\n\r\n return resultKey ? getObjectPropertyValueByKey(value, resultKey) : value\r\n}\r\n\r\nfunction colorLighten(color: string, amount: number) {\r\n const addLight = (_color: string, _amount: number) => {\r\n const cc = parseInt(_color, 16) + _amount\r\n const cNum = cc > 255 ? 255 : cc\r\n const c = cNum.toString(16).length > 1 ? cNum.toString(16) : `0${cNum.toString(16)}`\r\n return c\r\n }\r\n\r\n color = color.indexOf('#') >= 0 ? color.substring(1, color.length) : color\r\n amount = parseInt(((255 * amount) / 100).toString())\r\n return (color = `#${addLight(color.substring(0, 2), amount)}${addLight(\r\n color.substring(2, 4),\r\n amount\r\n )}${addLight(color.substring(4, 6), amount)}`)\r\n}\r\n\r\nfunction colorDarken(color: string, amount: number) {\r\n const subtractLight = (_color: string, _amount: number) => {\r\n const cc = parseInt(color, 16) - amount\r\n const cNum = cc < 0 ? 0 : cc\r\n const c = cNum.toString(16).length > 1 ? cNum.toString(16) : `0${cNum.toString(16)}`\r\n return c\r\n }\r\n\r\n color = color.indexOf('#') >= 0 ? color.substring(1, color.length) : color\r\n amount = parseInt(((255 * amount) / 100).toString())\r\n\r\n return (color = `#${subtractLight(color.substring(0, 2), amount)}${subtractLight(\r\n color.substring(2, 4),\r\n amount\r\n )}${subtractLight(color.substring(4, 6), amount)}`)\r\n}\r\n\r\nexport {\r\n getBreakpoint,\r\n getCSS,\r\n getCSSVariableValue,\r\n getElementActualCss,\r\n getElementActualHeight,\r\n getElementActualWidth,\r\n getElementIndex,\r\n getElementMatches,\r\n getElementOffset,\r\n getElementParents,\r\n getHighestZindex,\r\n getScrollTop,\r\n getViewPort,\r\n insertAfterElement,\r\n isElementHasClasses,\r\n isVisibleElement,\r\n throttle,\r\n getElementChildren,\r\n getElementChild,\r\n isMobileDevice,\r\n slide,\r\n slideUp,\r\n slideDown,\r\n getAttributeValueByBreakpoint,\r\n colorLighten,\r\n colorDarken,\r\n}\r\n","import {DataUtil} from './_DataUtil'\r\nimport {getUniqueIdWithPrefix} from './_TypesHelpers'\r\n\r\nexport interface EventMeta {\r\n name: string\r\n callback: Function\r\n one: boolean\r\n fired: boolean\r\n}\r\n\r\nexport class EventHandlerUtil {\r\n static store: Map> = new Map()\r\n\r\n private static setEventMetasByName(name: string, metas: Map): void {\r\n EventHandlerUtil.store.set(name, metas)\r\n }\r\n\r\n private static getEventMetasByName(name: string): Map | undefined {\r\n return EventHandlerUtil.store.get(name)\r\n }\r\n\r\n private static setEventMetaByNameAndHandlerId(\r\n name: string,\r\n handlerId: string,\r\n meta: EventMeta\r\n ): void {\r\n let metas = EventHandlerUtil.getEventMetasByName(name)\r\n if (!metas) {\r\n metas = new Map()\r\n }\r\n\r\n metas.set(handlerId, meta)\r\n EventHandlerUtil.setEventMetasByName(name, metas)\r\n }\r\n\r\n private static getEventsMetaByHandlerId(name: string, handlerId: string): EventMeta | undefined {\r\n const metas = EventHandlerUtil.store.get(name)\r\n if (!metas) {\r\n return\r\n }\r\n\r\n return metas.get(handlerId)\r\n }\r\n\r\n private static setFiredByNameAndHandlerId(name: string, handerId: string, fired: boolean): void {\r\n const meta = EventHandlerUtil.getEventsMetaByHandlerId(name, handerId)\r\n if (!meta) {\r\n return\r\n }\r\n\r\n meta.fired = fired\r\n EventHandlerUtil.setEventMetaByNameAndHandlerId(name, handerId, meta)\r\n }\r\n\r\n private static addEvent(\r\n element: HTMLElement,\r\n name: string,\r\n callback: Function,\r\n one: boolean = false\r\n ) {\r\n const handlerId = getUniqueIdWithPrefix('event')\r\n DataUtil.set(element, name, handlerId)\r\n const meta: EventMeta = {\r\n name: name,\r\n callback: callback,\r\n one: one,\r\n fired: false,\r\n }\r\n\r\n EventHandlerUtil.setEventMetaByNameAndHandlerId(name, handlerId, meta)\r\n }\r\n\r\n private static removeEvent(element: HTMLElement, name: string) {\r\n const handlerId = DataUtil.get(element, name)\r\n if (!handlerId) {\r\n return\r\n }\r\n\r\n const metas = EventHandlerUtil.getEventMetasByName(name)\r\n if (!metas) {\r\n return\r\n }\r\n\r\n metas.delete(handlerId)\r\n EventHandlerUtil.setEventMetasByName(name, metas)\r\n }\r\n\r\n public static trigger(element: HTMLElement, name: string, e?: Event) {\r\n if (DataUtil.has(element, name)) {\r\n const handlerId = DataUtil.get(element, name)\r\n if (!handlerId) {\r\n return undefined\r\n }\r\n\r\n const handler = EventHandlerUtil.getEventsMetaByHandlerId(name, handlerId)\r\n if (handler) {\r\n if (handler.name === name) {\r\n if (handler.one === true) {\r\n if (handler.fired === false) {\r\n EventHandlerUtil.setFiredByNameAndHandlerId(name, handlerId, true)\r\n return handler.callback.call(this, e)\r\n }\r\n } else {\r\n return handler.callback.call(this, e)\r\n }\r\n }\r\n }\r\n }\r\n\r\n return null\r\n }\r\n\r\n public static on = function (element: HTMLElement, name: string, callBack: Function): void {\r\n EventHandlerUtil.addEvent(element, name, callBack, false)\r\n }\r\n\r\n public static one(element: HTMLElement, name: string, callBack: Function): void {\r\n EventHandlerUtil.addEvent(element, name, callBack, true)\r\n }\r\n\r\n public static off(element: HTMLElement, name: string): void {\r\n EventHandlerUtil.removeEvent(element, name)\r\n }\r\n}\r\n","/* eslint-disable no-useless-escape */\r\n// DOCS: https://javascript.info/cookie\r\nexport class CookieComponent {\r\n /**\r\n * Returns the cookie with the given name, or undefined if not found\r\n *\r\n * @param {string} name - cookie name\r\n * @returns string | null\r\n */\r\n public static get(name: string): string | undefined {\r\n let matches = document.cookie.match(\r\n new RegExp('(?:^|; )' + name.replace(/([\\.$?*|{}\\(\\)\\[\\]\\\\\\/\\+^])/g, '\\\\$1') + '=([^;]*)')\r\n )\r\n return matches ? decodeURIComponent(matches[1]) : undefined\r\n }\r\n\r\n /**\r\n * Please note that a cookie value is encoded,\r\n * so getCookie uses a built-in decodeURIComponent function to decode it.\r\n *\r\n * @param {string} name - cookie name\r\n * @param {string | number | boolean} value - cookie value\r\n * @param {any} cookieOptions - cookie options\r\n * @returns void\r\n */\r\n public static set(name: string, value: string | number | boolean, cookieOptions: any): void {\r\n const options = {\r\n path: '/',\r\n // add other defaults here if necessary\r\n ...cookieOptions,\r\n }\r\n\r\n if (options.expires instanceof Date) {\r\n options.expires = options.expires.toUTCString()\r\n }\r\n\r\n let updatedCookie = encodeURIComponent(name) + '=' + encodeURIComponent(value)\r\n\r\n for (let optionKey in options) {\r\n updatedCookie += '; ' + optionKey\r\n let optionValue = options[optionKey]\r\n if (optionValue !== true) {\r\n updatedCookie += '=' + optionValue\r\n }\r\n }\r\n\r\n document.cookie = updatedCookie\r\n }\r\n\r\n /**\r\n * To delete a cookie, we can call it with a negative expiration date\r\n *\r\n * @param {string} name\r\n */\r\n public static delete(name: string): void {\r\n CookieComponent.set(name, '', {\r\n 'max-age': -1,\r\n })\r\n }\r\n}\r\n","import {\r\n EventHandlerUtil,\r\n getUniqueIdWithPrefix,\r\n getObjectPropertyValueByKey,\r\n stringSnakeToCamel,\r\n getAttributeValueByBreakpoint,\r\n throttle,\r\n getCSS,\r\n DOMEventHandlerUtil,\r\n ElementStyleUtil,\r\n} from '../_utils'\r\n\r\nexport class DrawerStore {\r\n static store: Map = new Map()\r\n\r\n public static set(instanceId: string, drawerComponentObj: DrawerComponent): void {\r\n if (DrawerStore.has(instanceId)) {\r\n return\r\n }\r\n\r\n DrawerStore.store.set(instanceId, drawerComponentObj)\r\n }\r\n\r\n public static get(instanceId: string): DrawerComponent | undefined {\r\n if (!DrawerStore.has(instanceId)) {\r\n return\r\n }\r\n return DrawerStore.store.get(instanceId)\r\n }\r\n\r\n public static remove(instanceId: string): void {\r\n if (!DrawerStore.has(instanceId)) {\r\n return\r\n }\r\n\r\n DrawerStore.store.delete(instanceId)\r\n }\r\n\r\n public static has(instanceId: string): boolean {\r\n return DrawerStore.store.has(instanceId)\r\n }\r\n\r\n public static getAllInstances() {\r\n return DrawerStore.store\r\n }\r\n}\r\n\r\nexport interface DrawerOptions {\r\n overlay: boolean\r\n baseClass: string\r\n overlayClass: string\r\n direction: string\r\n}\r\n\r\nconst defaultDrawerOptions: DrawerOptions = {\r\n overlay: true,\r\n baseClass: 'drawer',\r\n overlayClass: 'drawer-overlay',\r\n direction: 'end',\r\n}\r\n\r\nclass DrawerComponent {\r\n element: HTMLElement\r\n overlayElement: HTMLElement | null = null\r\n toggleElement: HTMLElement | null = null\r\n options: DrawerOptions\r\n instanceUid: string\r\n name: string = ''\r\n shown: boolean = false\r\n lastWidth: number = 0\r\n closeElement: HTMLElement | null = null\r\n\r\n constructor(_element: HTMLElement, options: DrawerOptions) {\r\n this.element = _element\r\n this.options = Object.assign(defaultDrawerOptions, options)\r\n this.instanceUid = getUniqueIdWithPrefix('drawer')\r\n this.overlayElement = null\r\n this.name = this.element.getAttribute('data-kt-drawer-name') || ''\r\n this.shown = false\r\n this.toggleElement = null\r\n // Event Handlers\r\n this._handlers()\r\n // Update Instance\r\n this._update()\r\n // Bind Instance\r\n DrawerStore.set(this.element.id, this)\r\n }\r\n\r\n private _handlers = () => {\r\n const togglers = this._getOption('toggle') as string\r\n const closers = this._getOption('close') as string\r\n\r\n if (togglers !== null && togglers.length > 0) {\r\n DOMEventHandlerUtil.on(document.body, togglers, 'click', (e: Event) => {\r\n e.preventDefault()\r\n this.toggleElement = document.getElementById(togglers)\r\n this._toggle()\r\n })\r\n }\r\n\r\n if (closers !== null && closers.length > 0) {\r\n DOMEventHandlerUtil.on(document.body, closers, 'click', (e: Event) => {\r\n e.preventDefault()\r\n this.closeElement = document.getElementById(closers)\r\n\r\n this._hide()\r\n })\r\n }\r\n }\r\n\r\n private _update = () => {\r\n const width = String(this._getOption('width'))\r\n const direction = String(this._getOption('direction'))\r\n\r\n // Reset state\r\n const hasBaseClass = this.element.classList.contains(`${this.options.baseClass}-on`)\r\n const bodyCanvasAttr = String(document.body.getAttribute(`data-kt-drawer-${this.name}-`))\r\n\r\n if (hasBaseClass === true && bodyCanvasAttr === 'on') {\r\n this.shown = true\r\n } else {\r\n this.shown = false\r\n }\r\n\r\n // Activate/deactivate\r\n if (this._getOption('activate') === true) {\r\n this.element.classList.add(this.options.baseClass)\r\n this.element.classList.add(`${this.options.baseClass}-${direction}`)\r\n ElementStyleUtil.set(this.element, 'width', width, true)\r\n\r\n this.lastWidth = parseInt(width)\r\n } else {\r\n ElementStyleUtil.set(this.element, 'width', '')\r\n this.element.classList.remove(this.options.baseClass)\r\n this.element.classList.remove(`${this.options.baseClass}-${direction}`)\r\n this._hide()\r\n }\r\n }\r\n\r\n private _getOption = (name: string) => {\r\n const attr = this.element.getAttribute(`data-kt-drawer-${name}`)\r\n if (attr) {\r\n let value = getAttributeValueByBreakpoint(attr)\r\n if (value !== null && String(value) === 'true') {\r\n return true\r\n } else {\r\n if (value !== null && String(value) === 'false') {\r\n return false\r\n }\r\n }\r\n\r\n return value\r\n } else {\r\n const optionName = stringSnakeToCamel(name)\r\n const option = getObjectPropertyValueByKey(this.options, optionName)\r\n if (option) {\r\n return getAttributeValueByBreakpoint(option)\r\n } else {\r\n return null\r\n }\r\n }\r\n }\r\n\r\n private _toggle = () => {\r\n if (EventHandlerUtil.trigger(this.element, 'kt.drawer.toggle') === false) {\r\n return\r\n }\r\n\r\n if (this.shown) {\r\n this._hide()\r\n } else {\r\n this._show()\r\n }\r\n\r\n EventHandlerUtil.trigger(this.element, 'kt.drawer.toggled')\r\n }\r\n\r\n private _hide = () => {\r\n if (EventHandlerUtil.trigger(this.element, 'kt.drawer.hide') === false) {\r\n return\r\n }\r\n\r\n this.shown = false\r\n this._deleteOverlay()\r\n document.body.removeAttribute(`data-kt-drawer-${this.name}`)\r\n document.body.removeAttribute(`data-kt-drawer`)\r\n this.element.classList.remove(`${this.options.baseClass}-on`)\r\n if (this.toggleElement != null) {\r\n this.toggleElement.classList.remove('active')\r\n }\r\n\r\n EventHandlerUtil.trigger(this.element, 'kt.drawer.after.hidden')\r\n }\r\n\r\n private _show = () => {\r\n if (EventHandlerUtil.trigger(this.element, 'kt.drawer.show') === false) {\r\n return\r\n }\r\n\r\n this.shown = true\r\n this._createOverlay()\r\n document.body.setAttribute(`data-kt-drawer-${this.name}`, 'on')\r\n document.body.setAttribute('data-kt-drawer', 'on')\r\n this.element.classList.add(`${this.options.baseClass}-on`)\r\n if (this.toggleElement !== null) {\r\n this.toggleElement.classList.add('active')\r\n }\r\n\r\n EventHandlerUtil.trigger(this.element, 'kt.drawer.shown')\r\n }\r\n\r\n private _createOverlay = () => {\r\n if (this._getOption('overlay') === true) {\r\n this.overlayElement = document.createElement('DIV')\r\n const elementZIndex = getCSS(this.element, 'z-index')\r\n if (elementZIndex) {\r\n const overlayZindex = parseInt(elementZIndex) - 1\r\n ElementStyleUtil.set(this.overlayElement, 'z-index', overlayZindex) // update\r\n }\r\n document.body.append(this.overlayElement)\r\n const overlayClassOption = this._getOption('overlay-class')\r\n if (overlayClassOption) {\r\n this.overlayElement.classList.add(overlayClassOption.toString())\r\n }\r\n this.overlayElement.addEventListener('click', (e) => {\r\n e.preventDefault()\r\n this._hide()\r\n })\r\n }\r\n }\r\n\r\n private _deleteOverlay = () => {\r\n if (this.overlayElement !== null && this.overlayElement.parentNode) {\r\n this.overlayElement.parentNode.removeChild(this.overlayElement)\r\n }\r\n }\r\n\r\n private _getDirection = () => {\r\n return String(this._getOption('direction')) === 'left' ? 'left' : 'right'\r\n }\r\n\r\n private _getWidth = () => {\r\n let width = this._getOption('width')\r\n if (width && width === 'auto') {\r\n width = getCSS(this.element, 'width')\r\n }\r\n\r\n return width\r\n }\r\n\r\n ///////////////////////\r\n // ** Public API ** //\r\n ///////////////////////\r\n public toggle = () => {\r\n this._toggle()\r\n }\r\n\r\n public show = () => {\r\n this._show()\r\n }\r\n\r\n public hide = () => {\r\n this._hide()\r\n }\r\n\r\n public isShown = () => {\r\n return this.shown\r\n }\r\n\r\n public update = () => {\r\n this._update()\r\n }\r\n\r\n public goElement = () => {\r\n return this.element\r\n }\r\n\r\n // Event API\r\n public on = (name: string, handler: Function) => {\r\n return EventHandlerUtil.on(this.element, name, handler)\r\n }\r\n\r\n public one = (name: string, handler: Function) => {\r\n return EventHandlerUtil.one(this.element, name, handler)\r\n }\r\n\r\n public off = (name: string) => {\r\n return EventHandlerUtil.off(this.element, name)\r\n }\r\n\r\n public trigger = (name: string, event: Event) => {\r\n return EventHandlerUtil.trigger(this.element, name, event)\r\n }\r\n\r\n // Static methods\r\n public static hasInstace = (elementId: string): boolean => {\r\n return DrawerStore.has(elementId)\r\n }\r\n\r\n public static getInstance = (elementId: string) => {\r\n return DrawerStore.get(elementId)\r\n }\r\n\r\n public static hideAll = () => {\r\n const oldInstances = DrawerStore.getAllInstances()\r\n oldInstances.forEach((dr) => {\r\n dr.hide()\r\n })\r\n }\r\n\r\n public static updateAll = () => {\r\n const oldInstances = DrawerStore.getAllInstances()\r\n oldInstances.forEach((dr) => {\r\n dr.update()\r\n })\r\n }\r\n\r\n // Create Instances\r\n public static createInstances(selector: string): void {\r\n const elements = document.body.querySelectorAll(selector)\r\n elements.forEach((element) => {\r\n const item = element as HTMLElement\r\n let drawer = DrawerComponent.getInstance(item.id)\r\n if (!drawer) {\r\n drawer = new DrawerComponent(item, defaultDrawerOptions)\r\n }\r\n drawer.element = item\r\n drawer.hide()\r\n })\r\n }\r\n\r\n // Dismiss instances\r\n public static handleDismiss = () => {\r\n // External drawer toggle handler\r\n DOMEventHandlerUtil.on(document.body, '[data-kt-drawer-dismiss=\"true\"]', 'click', () => {\r\n /* @ts-ignore */\r\n const element = this.closest('[data-kt-drawer=\"true\"]')\r\n if (element) {\r\n const drawer = DrawerComponent.getInstance(element)\r\n if (drawer && drawer.isShown()) {\r\n drawer.hide()\r\n }\r\n }\r\n })\r\n }\r\n\r\n // Global Initialization\r\n public static initGlobalHandlers(): void {\r\n // Window Resize Handling\r\n window.addEventListener('resize', function () {\r\n let timer: number | undefined\r\n throttle(\r\n timer,\r\n () => {\r\n // Locate and update Drawer instances on window resize\r\n const elements = document.body.querySelectorAll('[data-kt-drawer=\"true\"]')\r\n elements.forEach((el) => {\r\n const item = el as HTMLElement\r\n const instance = DrawerComponent.getInstance(item.id)\r\n if (instance) {\r\n instance.element = item\r\n instance.update()\r\n }\r\n })\r\n },\r\n 200\r\n )\r\n })\r\n }\r\n\r\n public static bootstrap = () => {\r\n DrawerComponent.createInstances('[data-kt-drawer=\"true\"]')\r\n DrawerComponent.initGlobalHandlers()\r\n DrawerComponent.handleDismiss()\r\n }\r\n\r\n public static reinitialization = () => {\r\n DrawerComponent.createInstances('[data-kt-drawer=\"true\"]')\r\n DrawerComponent.hideAll()\r\n DrawerComponent.updateAll()\r\n DrawerComponent.handleDismiss()\r\n }\r\n}\r\n\r\nexport {DrawerComponent, defaultDrawerOptions}\r\n","import {\r\n DataUtil,\r\n ElementStyleUtil,\r\n EventHandlerUtil,\r\n getUniqueIdWithPrefix,\r\n getAttributeValueByBreakpoint,\r\n} from '../_utils/index'\r\n\r\nexport interface FeedbackOptions {\r\n width?: number\r\n placement?: string\r\n content?: string\r\n type?: string\r\n}\r\n\r\nconst defaultFeedbackOptions: FeedbackOptions = {\r\n width: 100,\r\n placement: 'top-center',\r\n content: '',\r\n type: 'popup',\r\n}\r\n\r\nclass FeedbackComponent {\r\n element: HTMLElement\r\n options: FeedbackOptions\r\n instanceUid: string\r\n shown: boolean\r\n\r\n constructor(_element: HTMLElement, options: FeedbackOptions) {\r\n this.element = _element\r\n this.options = Object.assign(defaultFeedbackOptions, options)\r\n this.instanceUid = getUniqueIdWithPrefix('feedback')\r\n this.shown = false\r\n\r\n // Event handlers\r\n this._handlers() // will add in the show popup\r\n DataUtil.set(this.element, 'feedback', this)\r\n }\r\n\r\n private _handlers = () => {\r\n this.element.addEventListener('click', (e: Event) => {\r\n e.preventDefault()\r\n this._go()\r\n })\r\n }\r\n\r\n private _go = () => {}\r\n\r\n private showPopup = () => {\r\n this.element = document.createElement('DIV')\r\n\r\n this.element.classList.add('feedback feedback-popup')\r\n this.element.innerHTML = this.options.content || ''\r\n\r\n if (this.options.placement === 'top-center') {\r\n this.setPopupTopCenterPosition()\r\n }\r\n\r\n document.body.appendChild(this.element)\r\n this.element.classList.add('feedback-shown')\r\n this.shown = true\r\n }\r\n\r\n private setPopupTopCenterPosition = () => {\r\n const width = getAttributeValueByBreakpoint(this.options.width?.toString() || '0')\r\n const height = ElementStyleUtil.get(this.element, 'height')\r\n this.element.classList.add('feedback-top-center')\r\n ElementStyleUtil.set(this.element, 'width', width)\r\n ElementStyleUtil.set(this.element, 'left', '50%')\r\n ElementStyleUtil.set(this.element, 'top', '-' + height)\r\n }\r\n\r\n private hidePopup = () => {\r\n this.element.remove()\r\n }\r\n\r\n ///////////////////////\r\n // ** Public API ** //\r\n ///////////////////////\r\n public show = () => {\r\n if (EventHandlerUtil.trigger(this.element, 'kt.feedback.show') === false) {\r\n return\r\n }\r\n\r\n if (this.options.type === 'popup') {\r\n this.showPopup()\r\n }\r\n\r\n EventHandlerUtil.trigger(this.element, 'kt.feedback.shown')\r\n\r\n return this\r\n }\r\n\r\n public hide = () => {\r\n if (EventHandlerUtil.trigger(this.element, 'kt.feedback.hide') === false) {\r\n return\r\n }\r\n\r\n if (this.options.type === 'popup') {\r\n this.hidePopup()\r\n }\r\n\r\n this.shown = false\r\n EventHandlerUtil.trigger(this.element, 'kt.feedback.hidden')\r\n return this\r\n }\r\n\r\n public isShown = () => {\r\n return this.isShown\r\n }\r\n\r\n public getElement = () => {\r\n return this.element\r\n }\r\n\r\n // Event API\r\n public on = (name: string, handler: Function) => {\r\n return EventHandlerUtil.on(this.element, name, handler)\r\n }\r\n\r\n public one = (name: string, handler: Function) => {\r\n return EventHandlerUtil.one(this.element, name, handler)\r\n }\r\n\r\n public off = (name: string) => {\r\n return EventHandlerUtil.off(this.element, name)\r\n }\r\n\r\n public trigger = (name: string, event: Event) => {\r\n return EventHandlerUtil.trigger(this.element, name, event)\r\n }\r\n\r\n // Create Instances\r\n public static createInstances(selector: string) {\r\n throw new Error('not implemented')\r\n }\r\n\r\n // Static methods\r\n public static hasInstace(element: HTMLElement) {\r\n throw new Error('not implemented')\r\n }\r\n\r\n public static getInstance(element: HTMLElement) {\r\n throw new Error('not implemented')\r\n }\r\n\r\n public static bootstrap(attr: string = '[data-Feedback]') {\r\n throw new Error('not implemented')\r\n }\r\n}\r\n\r\nexport {FeedbackComponent, defaultFeedbackOptions}\r\n","import {EventHandlerUtil, DataUtil, getUniqueIdWithPrefix, getCSS} from '../_utils/index'\r\n\r\nexport interface IImageInputOptions {}\r\n\r\nexport interface IImageInputQueries {\r\n componentName: string\r\n instanseQuery: string\r\n inputQuery: string\r\n wrapperQuery: string\r\n cancelQuery: string\r\n removeQuery: string\r\n hiddenQuery: string\r\n}\r\n\r\nconst defaultImageInputOptions = {}\r\n\r\nconst defaultImageInputQueires: IImageInputQueries = {\r\n componentName: 'image-input',\r\n instanseQuery: '[data-kt-image-input]',\r\n inputQuery: 'input[type=\"file\"]',\r\n wrapperQuery: '.image-input-wrapper',\r\n cancelQuery: '[data-kt-image-input-action=\"cancel\"]',\r\n removeQuery: '[data-kt-image-input-action=\"remove\"]',\r\n hiddenQuery: 'input[type=\"hidden\"]',\r\n}\r\n\r\nclass ImageInputComponent {\r\n element: HTMLElement\r\n inputElement: HTMLInputElement | null\r\n wrapperElement: HTMLElement | null\r\n cancelElement: HTMLElement | null\r\n removeElement: HTMLElement | null\r\n hiddenElement: HTMLInputElement | null\r\n src: string = ''\r\n options: IImageInputOptions\r\n queries: IImageInputQueries\r\n uid: string\r\n value: string = ''\r\n\r\n constructor(_element: HTMLElement, _options: IImageInputOptions, _queries: IImageInputQueries) {\r\n // Variables\r\n this.options = Object.assign(defaultImageInputOptions, _options)\r\n this.queries = _queries\r\n this.uid = getUniqueIdWithPrefix(this.queries.componentName)\r\n\r\n // Elements\r\n this.element = _element\r\n this.inputElement = this.element.querySelector(this.queries.inputQuery)\r\n this.wrapperElement = this.element.querySelector(this.queries.wrapperQuery)\r\n this.cancelElement = this.element.querySelector(this.queries.cancelQuery)\r\n this.removeElement = this.element.querySelector(this.queries.removeQuery)\r\n this.hiddenElement = this.element.querySelector(this.queries.hiddenQuery)\r\n if (this.wrapperElement) {\r\n this.src = getCSS(this.wrapperElement, 'backgroundImage')\r\n }\r\n\r\n // Event Handlers\r\n this.handlers()\r\n\r\n DataUtil.set(this.element, this.queries.componentName, this)\r\n }\r\n\r\n private handlers(): void {\r\n this.element.addEventListener('change', this._change)\r\n if (this.cancelElement) {\r\n this.cancelElement.addEventListener('click', this._cancel)\r\n }\r\n\r\n if (this.removeElement) {\r\n this.removeElement.addEventListener('click', this._cancel)\r\n }\r\n }\r\n\r\n // Event Handlers\r\n private _change = (e: Event) => {\r\n e.preventDefault()\r\n\r\n if (this.inputElement !== null && this.inputElement.files && this.inputElement.files[0]) {\r\n // Fire change event\r\n if (EventHandlerUtil.trigger(this.element, 'kt.imageinput.change', e) === false) {\r\n return\r\n }\r\n\r\n const reader = new FileReader()\r\n\r\n reader.onload = (e: ProgressEvent) => {\r\n if (this.wrapperElement && e.target) {\r\n this.wrapperElement.style.setProperty('background-image', `url('${e.target.result}')`)\r\n }\r\n }\r\n\r\n reader.readAsDataURL(this.inputElement.files[0])\r\n this.element.classList.add('image-input-changed')\r\n this.element.classList.remove('image-input-empty')\r\n\r\n // Fire removed event\r\n EventHandlerUtil.trigger(this.element, 'kt.imageinput.changed', e)\r\n }\r\n }\r\n\r\n private _cancel = (e: Event) => {\r\n e.preventDefault()\r\n\r\n // Fire cancel event\r\n if (EventHandlerUtil.trigger(this.element, 'kt.imageinput.cancel', e) === false) {\r\n return\r\n }\r\n\r\n this.element.classList.remove('image-input-changed')\r\n this.element.classList.remove('image-input-empty')\r\n this.element.style.setProperty('background-image', this.src)\r\n if (this.inputElement) {\r\n this.inputElement.value = ''\r\n }\r\n\r\n if (this.hiddenElement !== null) {\r\n this.hiddenElement.value = '0'\r\n }\r\n\r\n // Fire canceled event\r\n EventHandlerUtil.trigger(this.element, 'kt.imageinput.canceled', e)\r\n }\r\n\r\n private _remove = (e: Event) => {\r\n e.preventDefault()\r\n\r\n // Fire remove event\r\n if (EventHandlerUtil.trigger(this.element, 'kt.imageinput.remove', e) === false) {\r\n return\r\n }\r\n\r\n this.element.classList.remove('image-input-changed')\r\n this.element.classList.add('image-input-empty')\r\n if (this.wrapperElement) {\r\n this.wrapperElement.style.setProperty('background-image', 'none')\r\n }\r\n\r\n if (this.inputElement) {\r\n this.inputElement.value = ''\r\n }\r\n\r\n if (this.hiddenElement !== null) {\r\n this.hiddenElement.value = '1'\r\n }\r\n\r\n // Fire removed event\r\n EventHandlerUtil.trigger(this.element, 'kt.imageinput.removed', e)\r\n }\r\n\r\n ///////////////////////\r\n // ** Public API ** //\r\n ///////////////////////\r\n public getInputElement(): HTMLInputElement | null {\r\n return this.inputElement\r\n }\r\n\r\n public getElement(): HTMLElement {\r\n return this.element\r\n }\r\n\r\n // Event API\r\n public on = (name: string, handler: Function) => {\r\n return EventHandlerUtil.on(this.element, name, handler)\r\n }\r\n\r\n public one = (name: string, handler: Function) => {\r\n return EventHandlerUtil.one(this.element, name, handler)\r\n }\r\n\r\n public off = (name: string) => {\r\n return EventHandlerUtil.off(this.element, name)\r\n }\r\n\r\n public trigger = (name: string, event: Event) => {\r\n return EventHandlerUtil.trigger(this.element, name, event)\r\n }\r\n\r\n // Static methods\r\n public static getInstance = (\r\n el: HTMLElement,\r\n componentName: string = defaultImageInputQueires.componentName\r\n ) => {\r\n const ImageInput = DataUtil.get(el, componentName)\r\n if (ImageInput) {\r\n return ImageInput\r\n }\r\n\r\n return null\r\n }\r\n\r\n public static createInstances = (\r\n selector: string = defaultImageInputQueires.instanseQuery,\r\n options: IImageInputOptions = defaultImageInputOptions,\r\n queries: IImageInputQueries = defaultImageInputQueires\r\n ) => {\r\n const elements = document.body.querySelectorAll(selector)\r\n elements.forEach((el) => {\r\n const item = el as HTMLElement\r\n let ImageInput = ImageInputComponent.getInstance(item)\r\n if (!ImageInput) {\r\n ImageInput = new ImageInputComponent(item, options, queries)\r\n }\r\n })\r\n }\r\n\r\n public static createInsance = (\r\n selector: string = defaultImageInputQueires.instanseQuery,\r\n options: IImageInputOptions = defaultImageInputOptions,\r\n queries: IImageInputQueries = defaultImageInputQueires\r\n ): ImageInputComponent | undefined => {\r\n const element = document.body.querySelector(selector)\r\n if (!element) {\r\n return\r\n }\r\n const item = element as HTMLElement\r\n let ImageInput = ImageInputComponent.getInstance(item)\r\n if (!ImageInput) {\r\n ImageInput = new ImageInputComponent(item, options, queries)\r\n }\r\n return ImageInput\r\n }\r\n\r\n public static bootstrap = (selector: string = defaultImageInputQueires.instanseQuery) => {\r\n ImageInputComponent.createInstances(selector)\r\n }\r\n\r\n public static reinitialization = (selector: string = defaultImageInputQueires.instanseQuery) => {\r\n ImageInputComponent.createInstances(selector)\r\n }\r\n}\r\nexport {ImageInputComponent, defaultImageInputOptions, defaultImageInputQueires}\r\n","import {\r\n DataUtil,\r\n getObjectPropertyValueByKey,\r\n stringSnakeToCamel,\r\n getAttributeValueByBreakpoint,\r\n getViewPort,\r\n isVisibleElement,\r\n throttle,\r\n getCSS,\r\n ElementStyleUtil,\r\n} from '../_utils/index'\r\nimport {CookieComponent} from './_CookieComponent'\r\n\r\nexport interface ScrollOptions {\r\n saveState?: boolean\r\n}\r\n\r\nconst defaultScrollOptions: ScrollOptions = {\r\n saveState: true,\r\n}\r\n\r\nclass ScrollComponent {\r\n element: HTMLElement\r\n options: ScrollOptions\r\n id: string\r\n\r\n constructor(_element: HTMLElement, options: ScrollOptions) {\r\n this.element = _element\r\n this.options = Object.assign(defaultScrollOptions, options)\r\n this.id = this.element.getAttribute('id') || ''\r\n this.update()\r\n // this.element.setAttribute('data-kt-scrolltop', 'true')\r\n DataUtil.set(this.element, 'scroll', this)\r\n }\r\n\r\n private getOption = (name: string) => {\r\n if (this.element.hasAttribute('data-kt-scroll-' + name) === true) {\r\n const attr = this.element.getAttribute('data-kt-scroll-' + name) || ''\r\n let value: string | JSON | boolean = getAttributeValueByBreakpoint(attr)\r\n if (value !== null && String(value) === 'true') {\r\n value = true\r\n } else if (value !== null && String(value) === 'false') {\r\n value = false\r\n }\r\n\r\n return value\r\n } else {\r\n const optionName = stringSnakeToCamel(name)\r\n const option = getObjectPropertyValueByKey(this.options, optionName)\r\n if (option) {\r\n return getAttributeValueByBreakpoint(option)\r\n } else {\r\n return null\r\n }\r\n }\r\n }\r\n\r\n private getHeightType = () => {\r\n if (this.getOption('height')) {\r\n return 'height'\r\n }\r\n if (this.getOption('min-height')) {\r\n return 'min-height'\r\n }\r\n if (this.getOption('max-height')) {\r\n return 'max-height'\r\n }\r\n }\r\n\r\n private getAutoHeight = () => {\r\n let height: number | string = getViewPort().height\r\n const dependencies = this.getOption('dependencies')\r\n const wrappers = this.getOption('wrappers')\r\n const offset = this.getOption('offset')\r\n\r\n // Height dependencies\r\n if (dependencies !== null) {\r\n const elements = document.querySelectorAll(dependencies as string)\r\n if (elements && elements.length > 0) {\r\n for (let i = 0, len = elements.length; i < len; i++) {\r\n const element = elements[i] as HTMLElement\r\n if (isVisibleElement(element) === false) {\r\n continue\r\n }\r\n\r\n height = height - parseInt(getCSS(element, 'height'))\r\n height = height - parseInt(getCSS(element, 'margin-top'))\r\n height = height - parseInt(getCSS(element, 'margin-bottom'))\r\n\r\n const borderTop = getCSS(element, 'border-top')\r\n if (borderTop) {\r\n height = height - parseInt(borderTop)\r\n }\r\n\r\n const borderBottom = getCSS(element, 'border-bottom')\r\n if (borderBottom) {\r\n height = height - parseInt(borderBottom)\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Wrappers\r\n if (wrappers !== null) {\r\n var elements = document.querySelectorAll(wrappers as string)\r\n if (elements && elements.length > 0) {\r\n for (let i = 0, len = elements.length; i < len; i++) {\r\n const element = elements[i] as HTMLElement\r\n\r\n if (!isVisibleElement(element)) {\r\n continue\r\n }\r\n\r\n height = height - parseInt(getCSS(element, 'margin-top'))\r\n height = height - parseInt(getCSS(element, 'margin-bottom'))\r\n height = height - parseInt(getCSS(element, 'padding-top'))\r\n height = height - parseInt(getCSS(element, 'padding-bottom'))\r\n\r\n const borderTop = getCSS(element, 'border-top')\r\n if (borderTop) {\r\n height = height - parseInt(borderTop)\r\n }\r\n\r\n const borderBottom = getCSS(element, 'border-bottom')\r\n if (borderBottom) {\r\n height = height - parseInt(borderBottom)\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Custom offset\r\n if (offset !== null) {\r\n height = height - parseInt(offset as string)\r\n }\r\n\r\n height = height - parseInt(getCSS(this.element, 'margin-top'))\r\n height = height - parseInt(getCSS(this.element, 'margin-bottom'))\r\n\r\n const borderTop = getCSS(this.element, 'border-top')\r\n if (borderTop) {\r\n height = height - parseInt(borderTop)\r\n }\r\n\r\n const borderBottom = getCSS(this.element, 'border-bottom')\r\n if (borderBottom) {\r\n height = height - parseInt(borderBottom)\r\n }\r\n\r\n height = String(height) + 'px'\r\n\r\n return height\r\n }\r\n\r\n private setupHeight = () => {\r\n let height = this.getHeight()\r\n let heightType = this.getHeightType() as string\r\n\r\n // Set height\r\n if (height !== null && height.length > 0) {\r\n ElementStyleUtil.set(this.element, heightType, height)\r\n } else {\r\n ElementStyleUtil.set(this.element, heightType, '')\r\n }\r\n }\r\n\r\n private setupState = () => {\r\n if (this.getOption('save-state') === true && this.id) {\r\n const cookie = CookieComponent.get(this.id + 'st')\r\n if (cookie) {\r\n var pos = parseInt(cookie)\r\n\r\n if (pos > 0) {\r\n this.element.scrollTop = pos\r\n }\r\n }\r\n }\r\n }\r\n\r\n private setupScrollHandler = () => {\r\n if (this.getOption('save-state') === true && this.id) {\r\n this.element.addEventListener('scroll', this.scrollHandler)\r\n } else {\r\n this.element.removeEventListener('scroll', this.scrollHandler)\r\n }\r\n }\r\n\r\n private scrollHandler = () => {\r\n const cookieId = this.id + 'st'\r\n CookieComponent.set(cookieId, this.element.scrollTop, {})\r\n }\r\n\r\n private destroyScrollHandler = () => {\r\n this.element.removeEventListener('scroll', this.scrollHandler)\r\n }\r\n\r\n private resetHeight = () => {\r\n const heghtType = this.getHeightType()\r\n if (heghtType) {\r\n ElementStyleUtil.set(this.element, heghtType, '')\r\n }\r\n }\r\n\r\n ///////////////////////\r\n // ** Public API ** //\r\n ///////////////////////\r\n public update = () => {\r\n // Activate/deactivate\r\n if (\r\n this.getOption('activate') === true ||\r\n !this.element.hasAttribute('data-kt-scroll-activate')\r\n ) {\r\n this.setupHeight()\r\n this.setupScrollHandler()\r\n this.setupState()\r\n } else {\r\n this.resetHeight()\r\n this.destroyScrollHandler()\r\n }\r\n }\r\n\r\n public getHeight = () => {\r\n const heightType = this.getHeightType()\r\n const height = this.getOption(heightType || '')\r\n if (height instanceof Function) {\r\n return height.call(height)\r\n } else if (height !== null && typeof height === 'string' && height.toLowerCase() === 'auto') {\r\n return this.getAutoHeight()\r\n } else {\r\n return height\r\n }\r\n }\r\n\r\n public getElement = () => {\r\n return this.element\r\n }\r\n\r\n // Static methods\r\n public static hasInstace(element: HTMLElement) {\r\n return DataUtil.has(element, 'scroll')\r\n }\r\n\r\n public static getInstance(element: HTMLElement) {\r\n if (element !== null && ScrollComponent.hasInstace(element)) {\r\n return DataUtil.get(element, 'scroll')\r\n }\r\n }\r\n\r\n // Create Instances\r\n public static createInstances(selector: string) {\r\n const elements = document.body.querySelectorAll(selector)\r\n elements.forEach((element: Element) => {\r\n const item = element as HTMLElement\r\n let scroll = ScrollComponent.getInstance(item)\r\n if (!scroll) {\r\n scroll = new ScrollComponent(item, defaultScrollOptions)\r\n }\r\n })\r\n }\r\n\r\n public static destroyAll(attr: string = '[data-kt-scroll=\"true\"]') {}\r\n\r\n public static bootstrap(attr: string = '[data-kt-scroll=\"true\"]') {\r\n ScrollComponent.createInstances(attr)\r\n ScrollComponent.resize()\r\n }\r\n\r\n public static createInstance = (\r\n element: HTMLElement,\r\n options: ScrollOptions = defaultScrollOptions\r\n ): ScrollComponent | undefined => {\r\n let scroll = ScrollComponent.getInstance(element)\r\n if (!scroll) {\r\n scroll = new ScrollComponent(element, options)\r\n }\r\n return scroll\r\n }\r\n\r\n public static reinitialization(attr: string = '[data-kt-scroll=\"true\"]') {\r\n ScrollComponent.createInstances(attr)\r\n }\r\n\r\n public static resize() {\r\n // Window Resize Handling\r\n window.addEventListener('resize', function () {\r\n let timer\r\n throttle(\r\n timer,\r\n () => {\r\n // Locate and update Drawer instances on window resize\r\n const elements = document.body.querySelectorAll('[data-kt-scroll=\"true\"]')\r\n elements.forEach((element: Element) => {\r\n const instance = ScrollComponent.getInstance(element as HTMLElement)\r\n if (instance) {\r\n instance.update()\r\n }\r\n })\r\n },\r\n 200\r\n )\r\n })\r\n }\r\n}\r\n\r\nexport {ScrollComponent, defaultScrollOptions}\r\n","import {\r\n getScrollTop,\r\n getAttributeValueByBreakpoint,\r\n throttle,\r\n getObjectPropertyValueByKey,\r\n stringSnakeToCamel,\r\n getUniqueIdWithPrefix,\r\n DataUtil,\r\n ElementAnimateUtil,\r\n} from '../_utils/index'\r\n\r\nexport interface IScrollTopOptions {\r\n offset: number\r\n speed: number\r\n}\r\n\r\nconst defaultScrollTopOptions: IScrollTopOptions = {\r\n offset: 200,\r\n speed: 600,\r\n}\r\n\r\nclass ScrollTopComponent {\r\n element: HTMLElement\r\n options: IScrollTopOptions\r\n instanceUid: string\r\n\r\n constructor(_element: HTMLElement, options: IScrollTopOptions) {\r\n this.element = _element\r\n this.options = Object.assign(defaultScrollTopOptions, options)\r\n this.instanceUid = getUniqueIdWithPrefix('scrolltop')\r\n\r\n // Event Handlers\r\n this._handlers()\r\n\r\n // Bind Instance\r\n DataUtil.set(this.element, 'scrolltop', this)\r\n }\r\n\r\n private _handlers = () => {\r\n let timer: number\r\n window.addEventListener('scroll', () => {\r\n throttle(timer, () => {\r\n this._scroll()\r\n })\r\n })\r\n\r\n this.element.addEventListener('click', (e: Event) => {\r\n e.preventDefault()\r\n this._go()\r\n })\r\n }\r\n\r\n private _scroll = () => {\r\n const offset = parseInt(this._getOption('offset') as string)\r\n const pos = getScrollTop() // current vertical position\r\n if (pos > offset) {\r\n if (!document.body.hasAttribute('data-kt-scrolltop')) {\r\n document.body.setAttribute('data-kt-scrolltop', 'on')\r\n }\r\n } else {\r\n if (document.body.hasAttribute('data-kt-scrolltop')) {\r\n document.body.removeAttribute('data-kt-scrolltop')\r\n }\r\n }\r\n }\r\n\r\n private _go = () => {\r\n const speed = parseInt(this._getOption('speed') as string)\r\n ElementAnimateUtil.scrollTop(0, speed)\r\n }\r\n\r\n private _getOption = (name: string) => {\r\n const attr = this.element.getAttribute(`data-kt-scrolltop-${name}`)\r\n if (attr) {\r\n const value = getAttributeValueByBreakpoint(attr)\r\n return value !== null && String(value) === 'true'\r\n }\r\n\r\n const optionName = stringSnakeToCamel(name)\r\n const option = getObjectPropertyValueByKey(this.options, optionName)\r\n if (option) {\r\n return getAttributeValueByBreakpoint(option)\r\n }\r\n\r\n return null\r\n }\r\n\r\n ///////////////////////\r\n // ** Public API ** //\r\n ///////////////////////\r\n\r\n // Plugin API\r\n public go = () => {\r\n return this._go()\r\n }\r\n\r\n public getElement = () => {\r\n return this.element\r\n }\r\n\r\n // Static methods\r\n public static getInstance = (el: HTMLElement) => {\r\n const scrollTop = DataUtil.get(el, 'scrolltop')\r\n if (scrollTop) {\r\n return scrollTop\r\n }\r\n\r\n return null\r\n }\r\n\r\n public static createInstances = (selector: string) => {\r\n const elements = document.body.querySelectorAll(selector)\r\n elements.forEach((el) => {\r\n const item = el as HTMLElement\r\n let scrollTop = ScrollTopComponent.getInstance(item)\r\n if (!scrollTop) {\r\n scrollTop = new ScrollTopComponent(item, defaultScrollTopOptions)\r\n }\r\n })\r\n }\r\n\r\n public static createInsance = (\r\n selector: string,\r\n options: IScrollTopOptions = defaultScrollTopOptions\r\n ): ScrollTopComponent | undefined => {\r\n const element = document.body.querySelector(selector)\r\n if (!element) {\r\n return\r\n }\r\n const item = element as HTMLElement\r\n let scrollTop = ScrollTopComponent.getInstance(item)\r\n if (!scrollTop) {\r\n scrollTop = new ScrollTopComponent(item, options)\r\n }\r\n return scrollTop\r\n }\r\n\r\n public static bootstrap = () => {\r\n ScrollTopComponent.createInstances('[data-kt-scrolltop=\"true\"]')\r\n }\r\n\r\n public static reinitialization = () => {\r\n ScrollTopComponent.createInstances('[data-kt-scrolltop=\"true\"]')\r\n }\r\n\r\n public static goTop = () => {\r\n ElementAnimateUtil.scrollTop(0, defaultScrollTopOptions.speed)\r\n }\r\n}\r\nexport {ScrollTopComponent, defaultScrollTopOptions}\r\n","import {\r\n getElementIndex,\r\n getUniqueIdWithPrefix,\r\n ElementAnimateUtil,\r\n EventHandlerUtil,\r\n DataUtil,\r\n DOMEventHandlerUtil,\r\n ElementStyleUtil,\r\n} from '../_utils/index'\r\n\r\nexport interface IStepperOptions {\r\n startIndex: number\r\n animation: boolean\r\n animationSpeed: string\r\n animationNextClass: string\r\n animationPreviousClass: string\r\n}\r\n\r\nconst defaultStepperOptions: IStepperOptions = {\r\n startIndex: 1,\r\n animation: false,\r\n animationSpeed: '0.3s',\r\n animationNextClass: 'animate__animated animate__slideInRight animate__fast',\r\n animationPreviousClass: 'animate__animated animate__slideInLeft animate__fast',\r\n}\r\n\r\nclass StepperComponent {\r\n element: HTMLElement\r\n options: IStepperOptions\r\n instanceUid: string\r\n steps: NodeListOf\r\n btnNext: HTMLElement | null\r\n btnPrev: HTMLElement | null\r\n btnSubmit: HTMLElement | null\r\n totatStepsNumber: number = 0\r\n passedStepIndex: number = 0\r\n currentStepIndex: number = 1\r\n\r\n constructor(_element: HTMLElement, options: IStepperOptions) {\r\n this.element = _element\r\n this.options = Object.assign(defaultStepperOptions, options)\r\n this.instanceUid = getUniqueIdWithPrefix('stepper')\r\n\r\n // Elements\r\n this.steps = this.element.querySelectorAll('[data-kt-stepper-element=\"nav\"]')\r\n this.btnNext = this.element.querySelector('[data-kt-stepper-action=\"next\"]')\r\n this.btnPrev = this.element.querySelector('[data-kt-stepper-action=\"previous\"]')\r\n this.btnSubmit = this.element.querySelector('[data-kt-stepper-action=\"submit\"]')\r\n\r\n // Variables\r\n this.totatStepsNumber = this.steps?.length | 0\r\n this.passedStepIndex = 0\r\n this.currentStepIndex = 1\r\n\r\n // Set Current Step\r\n if (this.options.startIndex > 1) {\r\n this._goTo(this.options.startIndex)\r\n }\r\n\r\n // Event Handlers\r\n this.initHandlers()\r\n\r\n // Bind Instance\r\n DataUtil.set(this.element, 'stepper', this)\r\n }\r\n\r\n private _goTo = (index: number) => {\r\n EventHandlerUtil.trigger(this.element, 'kt.stepper.change')\r\n // Skip if this step is already shown\r\n if (index === this.currentStepIndex || index > this.totatStepsNumber || index < 0) {\r\n return\r\n }\r\n\r\n // Validate step number\r\n index = parseInt(index.toString())\r\n // Set current step\r\n this.passedStepIndex = this.currentStepIndex\r\n this.currentStepIndex = index\r\n\r\n // Refresh elements\r\n this.refreshUI()\r\n\r\n EventHandlerUtil.trigger(this.element, 'kt.stepper.changed')\r\n }\r\n\r\n private initHandlers = () => {\r\n this.btnNext?.addEventListener('click', (e: Event) => {\r\n e.preventDefault()\r\n\r\n EventHandlerUtil.trigger(this.element, 'kt.stepper.next', e)\r\n })\r\n\r\n this.btnPrev?.addEventListener('click', (e: Event) => {\r\n e.preventDefault()\r\n\r\n EventHandlerUtil.trigger(this.element, 'kt.stepper.previous', e)\r\n })\r\n\r\n DOMEventHandlerUtil.on(this.element, '[data-kt-stepper-action=\"step\"]', 'click', (e: Event) => {\r\n e.preventDefault()\r\n\r\n if (this.steps && this.steps.length > 0) {\r\n for (let i = 0; i < this.steps.length; i++) {\r\n if ((this.steps[i] as HTMLElement) === this.element) {\r\n let index = i + 1\r\n\r\n const stepDirection = this._getStepDirection(index)\r\n EventHandlerUtil.trigger(this.element, `stepper.${stepDirection}`, e)\r\n return\r\n }\r\n }\r\n }\r\n })\r\n }\r\n\r\n private _getStepDirection = (index: number) => {\r\n return index > this.currentStepIndex ? 'next' : 'previous'\r\n }\r\n\r\n private getStepContent = (index: number) => {\r\n const content = this.element.querySelectorAll('[data-kt-stepper-element=\"content\"]')\r\n if (!content) {\r\n return false\r\n }\r\n\r\n if (content[index - 1]) {\r\n return content[index - 1]\r\n }\r\n\r\n return false\r\n }\r\n\r\n private getLastStepIndex = () => {\r\n return this.totatStepsNumber\r\n }\r\n\r\n private getTotalStepsNumber = () => {\r\n return this.totatStepsNumber\r\n }\r\n\r\n private refreshUI = () => {\r\n let state = ''\r\n\r\n if (this.isLastStep()) {\r\n state = 'last'\r\n } else if (this.isFirstStep()) {\r\n state = 'first'\r\n } else {\r\n state = 'between'\r\n }\r\n\r\n // Set state class\r\n this.element.classList.remove('last')\r\n this.element.classList.remove('first')\r\n this.element.classList.remove('between')\r\n\r\n this.element.classList.add(state)\r\n\r\n // Step Items\r\n const elements = this.element.querySelectorAll(\r\n '[data-kt-stepper-element=\"nav\"], [data-kt-stepper-element=\"content\"], [data-kt-stepper-element=\"info\"]'\r\n )\r\n\r\n if (!elements || elements.length <= 0) {\r\n return\r\n }\r\n\r\n for (var i = 0, len = elements.length; i < len; i++) {\r\n var element = elements[i] as HTMLElement\r\n var index = getElementIndex(element) + 1\r\n\r\n element.classList.remove('current')\r\n element.classList.remove('completed')\r\n element.classList.remove('pending')\r\n\r\n if (index === this.currentStepIndex) {\r\n element.classList.add('current')\r\n\r\n if (\r\n this.options.animation !== false &&\r\n element.getAttribute('data-kt-stepper-element') === 'content'\r\n ) {\r\n ElementStyleUtil.set(element, 'animationDuration', this.options.animationSpeed)\r\n\r\n const animation =\r\n this._getStepDirection(this.passedStepIndex) === 'previous'\r\n ? this.options.animationPreviousClass\r\n : this.options.animationNextClass\r\n ElementAnimateUtil.animateClass(element, animation)\r\n }\r\n } else {\r\n if (index < this.currentStepIndex) {\r\n element.classList.add('completed')\r\n } else {\r\n element.classList.add('pending')\r\n }\r\n }\r\n }\r\n }\r\n\r\n private isLastStep = () => {\r\n return this.currentStepIndex === this.totatStepsNumber\r\n }\r\n\r\n private isFirstStep = () => {\r\n return this.currentStepIndex === 1\r\n }\r\n\r\n private isBetweenStep = () => {\r\n return this.isLastStep() === false && this.isFirstStep() === false\r\n }\r\n\r\n // ///////////////////////\r\n // // ** Public API ** //\r\n // ///////////////////////\r\n\r\n // // Plugin API\r\n public goto = (index: number) => {\r\n return this._goTo(index)\r\n }\r\n\r\n public goNext = () => {\r\n return this.goto(this.getNextStepIndex())\r\n }\r\n\r\n public goPrev = () => {\r\n return this.goto(this.getPrevStepIndex())\r\n }\r\n\r\n public goFirst = () => {\r\n return this.goto(1)\r\n }\r\n\r\n public goLast = () => {\r\n return this.goto(this.getLastStepIndex())\r\n }\r\n\r\n public getCurrentStepIndex = () => {\r\n return this.currentStepIndex\r\n }\r\n\r\n public getNextStepIndex = () => {\r\n if (this.totatStepsNumber >= this.currentStepIndex + 1) {\r\n return this.currentStepIndex + 1\r\n } else {\r\n return this.totatStepsNumber\r\n }\r\n }\r\n\r\n public getPassedStepIndex = () => {\r\n return this.passedStepIndex\r\n }\r\n\r\n public getPrevStepIndex = () => {\r\n if (this.currentStepIndex - 1 > 1) {\r\n return this.currentStepIndex - 1\r\n } else {\r\n return 1\r\n }\r\n }\r\n\r\n public getElement = (index: number) => {\r\n return this.element\r\n }\r\n\r\n // Event API\r\n public on = (name: string, handler: Function) => {\r\n return EventHandlerUtil.on(this.element, name, handler)\r\n }\r\n\r\n public one = (name: string, handler: Function) => {\r\n return EventHandlerUtil.one(this.element, name, handler)\r\n }\r\n\r\n public off = (name: string) => {\r\n return EventHandlerUtil.off(this.element, name)\r\n }\r\n\r\n public destroy = () => {\r\n console.log('destroy stepper')\r\n }\r\n\r\n public trigger = (name: string, event: Event) => {\r\n return EventHandlerUtil.trigger(this.element, name, event)\r\n }\r\n\r\n // Static methods\r\n public static hasInstace(element: HTMLElement): boolean {\r\n return DataUtil.has(element, 'stepper')\r\n }\r\n\r\n public static getInstance(element: HTMLElement): StepperComponent | null {\r\n if (element !== null && StepperComponent.hasInstace(element)) {\r\n return DataUtil.get(element, 'stepper')\r\n }\r\n return null\r\n }\r\n\r\n // Create Instances\r\n public static createInstances(selector: string): void {\r\n const elements = document.body.querySelectorAll(selector)\r\n elements.forEach((element) => {\r\n const item = element as HTMLElement\r\n let stepper = StepperComponent.getInstance(item)\r\n if (!stepper) {\r\n stepper = new StepperComponent(item, defaultStepperOptions)\r\n }\r\n })\r\n }\r\n\r\n public static createInsance = (\r\n element: HTMLElement,\r\n options: IStepperOptions = defaultStepperOptions\r\n ): StepperComponent | null => {\r\n if (!element) {\r\n return null\r\n }\r\n let stepper = StepperComponent.getInstance(element)\r\n if (!stepper) {\r\n stepper = new StepperComponent(element, options)\r\n }\r\n return stepper\r\n }\r\n\r\n public static bootstrap(attr: string = '[data-kt-stepper]') {\r\n StepperComponent.createInstances(attr)\r\n }\r\n}\r\n\r\nexport {StepperComponent, defaultStepperOptions}\r\n","import {\r\n getElementOffset,\r\n getScrollTop,\r\n getAttributeValueByBreakpoint,\r\n getUniqueIdWithPrefix,\r\n getObjectPropertyValueByKey,\r\n stringSnakeToCamel,\r\n getCSS,\r\n DataUtil,\r\n ElementAnimateUtil,\r\n ElementStyleUtil,\r\n EventHandlerUtil,\r\n} from '../_utils/index'\r\n\r\nexport interface StickyOptions {\r\n offset: number\r\n reverse: boolean\r\n animation: boolean\r\n animationSpeed: string\r\n animationClass: string\r\n}\r\n\r\nconst defaultStickyOptions: StickyOptions = {\r\n offset: 200,\r\n reverse: false,\r\n animation: true,\r\n animationSpeed: '0.3s',\r\n animationClass: 'animation-slide-in-down',\r\n}\r\n\r\nclass StickyComponent {\r\n element: HTMLElement\r\n options: StickyOptions\r\n instanceUid: string\r\n instanceName: string | null = ''\r\n attributeName: string\r\n eventTriggerState: boolean\r\n lastScrollTop: number\r\n\r\n constructor(_element: HTMLElement, options: StickyOptions) {\r\n this.element = _element\r\n this.options = Object.assign(defaultStickyOptions, options)\r\n this.instanceUid = getUniqueIdWithPrefix('sticky')\r\n this.instanceName = this.element.getAttribute('data-kt-sticky-name')\r\n this.attributeName = 'data-kt-sticky-' + this.instanceName\r\n this.eventTriggerState = true\r\n this.lastScrollTop = 0\r\n\r\n // Event Handlers\r\n window.addEventListener('scroll', this.scroll)\r\n\r\n // Initial Launch\r\n this.scroll()\r\n\r\n DataUtil.set(this.element, 'sticky', this)\r\n }\r\n\r\n private scroll = () => {\r\n let offset = this.getOption('offset')\r\n let reverse = this.getOption('reverse')\r\n\r\n // Exit if false\r\n if (offset === false) {\r\n return\r\n }\r\n\r\n let offsetNum = 0\r\n if (typeof offset === 'string') {\r\n offsetNum = parseInt(offset)\r\n }\r\n\r\n const st = getScrollTop()\r\n\r\n // Reverse scroll mode\r\n if (reverse === true) {\r\n // Release on reverse scroll mode\r\n if (st > offsetNum && this.lastScrollTop < st) {\r\n if (document.body.hasAttribute(this.attributeName) === false) {\r\n this.enable()\r\n document.body.setAttribute(this.attributeName, 'on')\r\n }\r\n\r\n if (this.eventTriggerState === true) {\r\n EventHandlerUtil.trigger(this.element, 'kt.sticky.on')\r\n EventHandlerUtil.trigger(this.element, 'kt.sticky.change')\r\n\r\n this.eventTriggerState = false\r\n }\r\n } else {\r\n // Back scroll mode\r\n if (document.body.hasAttribute(this.attributeName)) {\r\n this.disable()\r\n document.body.removeAttribute(this.attributeName)\r\n }\r\n\r\n if (this.eventTriggerState === false) {\r\n EventHandlerUtil.trigger(this.element, 'kt.sticky.off')\r\n EventHandlerUtil.trigger(this.element, 'kt.sticky.change')\r\n\r\n this.eventTriggerState = true\r\n }\r\n }\r\n\r\n this.lastScrollTop = st\r\n return\r\n }\r\n\r\n // Classic scroll mode\r\n if (st > offsetNum) {\r\n if (document.body.hasAttribute(this.attributeName) === false) {\r\n this.enable()\r\n document.body.setAttribute(this.attributeName, 'on')\r\n }\r\n\r\n if (this.eventTriggerState === true) {\r\n EventHandlerUtil.trigger(this.element, 'kt.sticky.on')\r\n EventHandlerUtil.trigger(this.element, 'kt.sticky.change')\r\n this.eventTriggerState = false\r\n }\r\n } else {\r\n // back scroll mode\r\n if (document.body.hasAttribute(this.attributeName) === true) {\r\n this.disable()\r\n document.body.removeAttribute(this.attributeName)\r\n }\r\n\r\n if (this.eventTriggerState === false) {\r\n EventHandlerUtil.trigger(this.element, 'kt.sticky.off')\r\n EventHandlerUtil.trigger(this.element, 'kt.sticky.change')\r\n this.eventTriggerState = true\r\n }\r\n }\r\n }\r\n\r\n private getOption = (name: string) => {\r\n const dataStickyAttr = 'data-kt-sticky-' + name\r\n if (this.element.hasAttribute(dataStickyAttr) === true) {\r\n const attrValueInStr = this.element.getAttribute(dataStickyAttr)\r\n const attrValue = getAttributeValueByBreakpoint(attrValueInStr || '')\r\n if (attrValue !== null && String(attrValue) === 'true') {\r\n return true\r\n } else if (attrValue !== null && String(attrValue) === 'false') {\r\n return false\r\n }\r\n\r\n return attrValue\r\n } else {\r\n const optionName = stringSnakeToCamel(name)\r\n const option = getObjectPropertyValueByKey(this.options, optionName)\r\n if (option) {\r\n return getAttributeValueByBreakpoint(option)\r\n }\r\n }\r\n }\r\n\r\n private disable = () => {\r\n ElementStyleUtil.remove(this.element, 'top')\r\n ElementStyleUtil.remove(this.element, 'width')\r\n ElementStyleUtil.remove(this.element, 'left')\r\n ElementStyleUtil.remove(this.element, 'right')\r\n ElementStyleUtil.remove(this.element, 'z-index')\r\n ElementStyleUtil.remove(this.element, 'position')\r\n }\r\n\r\n private enable = (update: boolean = false) => {\r\n const top = this.getOption('top')\r\n const left = this.getOption('left')\r\n // const right = this.getOption(\"right\");\r\n let width = this.getOption('width')\r\n const zindex = this.getOption('zindex')\r\n\r\n if (update !== true && this.getOption('animation') === true) {\r\n ElementStyleUtil.set(this.element, 'animationDuration', this.getOption('animationSpeed'))\r\n ElementAnimateUtil.animateClass(this.element, 'animation ' + this.getOption('animationClass'))\r\n }\r\n\r\n if (zindex !== null) {\r\n ElementStyleUtil.set(this.element, 'z-index', zindex)\r\n ElementStyleUtil.set(this.element, 'position', 'fixed')\r\n }\r\n\r\n if (top !== null) {\r\n ElementStyleUtil.set(this.element, 'top', top)\r\n }\r\n\r\n if (width !== null && width !== undefined) {\r\n const widthTarget = getObjectPropertyValueByKey(width, 'target')\r\n if (widthTarget) {\r\n const targetElement = document.querySelector(widthTarget)\r\n if (targetElement) {\r\n width = getCSS(targetElement, 'width')\r\n }\r\n }\r\n ElementStyleUtil.set(this.element, 'width', width)\r\n }\r\n\r\n if (left !== null) {\r\n if (String(left).toLowerCase() === 'auto') {\r\n var offsetLeft = getElementOffset(this.element).left\r\n\r\n if (offsetLeft > 0) {\r\n ElementStyleUtil.set(this.element, 'left', String(offsetLeft) + 'px')\r\n }\r\n }\r\n }\r\n }\r\n\r\n public update = () => {\r\n if (document.body.hasAttribute(this.attributeName) === true) {\r\n this.disable()\r\n document.body.removeAttribute(this.attributeName)\r\n this.enable(true)\r\n document.body.setAttribute(this.attributeName, 'on')\r\n }\r\n }\r\n\r\n // Event API\r\n public on = (name: string, callBack: Function) => {\r\n return EventHandlerUtil.on(this.element, name, callBack)\r\n }\r\n\r\n public one = (name: string, callback: Function) => {\r\n return EventHandlerUtil.one(this.element, name, callback)\r\n }\r\n\r\n public off = (name: string) => {\r\n return EventHandlerUtil.off(this.element, name)\r\n }\r\n\r\n public trigger = (name: string) => {\r\n return EventHandlerUtil.trigger(this.element, name)\r\n }\r\n\r\n // Static methods\r\n public static hasInstace(element: HTMLElement) {\r\n return DataUtil.has(element, 'sticky')\r\n }\r\n\r\n public static getInstance(element: HTMLElement) {\r\n if (element !== null && StickyComponent.hasInstace(element)) {\r\n return DataUtil.get(element, 'sticky')\r\n }\r\n }\r\n\r\n // Create Instances\r\n public static createInstances(selector: string) {\r\n const elements = document.body.querySelectorAll(selector)\r\n elements.forEach((element) => {\r\n const item = element as HTMLElement\r\n let sticky = StickyComponent.getInstance(item)\r\n if (!sticky) {\r\n sticky = new StickyComponent(item, defaultStickyOptions)\r\n }\r\n })\r\n }\r\n\r\n public static createInsance = (\r\n selector: string,\r\n options: StickyOptions = defaultStickyOptions\r\n ): StickyComponent | undefined => {\r\n const element = document.body.querySelector(selector)\r\n if (!element) {\r\n return\r\n }\r\n const item = element as HTMLElement\r\n let sticky = StickyComponent.getInstance(item)\r\n if (!sticky) {\r\n sticky = new StickyComponent(item, options)\r\n }\r\n return sticky\r\n }\r\n\r\n public static bootstrap(attr: string = '[data-kt-sticky=\"true\"]') {\r\n StickyComponent.createInstances(attr)\r\n }\r\n\r\n public static reInitialization(attr: string = '[data-kt-sticky=\"true\"]') {\r\n StickyComponent.createInstances(attr)\r\n }\r\n}\r\n\r\nexport {StickyComponent, defaultStickyOptions}\r\n","import {DataUtil, getUniqueIdWithPrefix, EventHandlerUtil} from '../_utils/index'\r\n// Helpers\r\nimport {CookieComponent} from './_CookieComponent'\r\n\r\nexport interface ToggleOptions {\r\n saveState: boolean\r\n targetState?: string\r\n toggleState?: string\r\n targetToggleMode?: string\r\n}\r\n\r\nconst defaultToggleOptions: ToggleOptions = {\r\n saveState: false,\r\n}\r\n\r\nclass ToggleComponent {\r\n element: HTMLElement\r\n instanceUid: string\r\n options: ToggleOptions\r\n state: string = ''\r\n target: HTMLElement | null = null\r\n attribute: string = ''\r\n\r\n constructor(_element: HTMLElement, options: ToggleOptions) {\r\n this.options = Object.assign(defaultToggleOptions, options)\r\n this.instanceUid = getUniqueIdWithPrefix('toggle')\r\n this.element = _element\r\n\r\n const elementTargetAttr = this.element.getAttribute('data-kt-toggle-target')\r\n if (elementTargetAttr) {\r\n this.target = document.querySelector(elementTargetAttr)\r\n }\r\n const elementToggleAttr = this.element.getAttribute('data-kt-toggle-state')\r\n this.state = elementToggleAttr || ''\r\n this.attribute = 'data-kt-' + this.element.getAttribute('data-kt-toggle-name')\r\n\r\n // Event Handlers\r\n this._handlers()\r\n\r\n // Update Instance\r\n // Bind Instance\r\n DataUtil.set(this.element, 'toggle', this)\r\n }\r\n\r\n private _handlers = () => {\r\n this.element.addEventListener('click', (e: Event) => {\r\n e.preventDefault()\r\n this._toggle()\r\n })\r\n }\r\n\r\n // Event handlers\r\n private _toggle = () => {\r\n // Trigger \"after.toggle\" event\r\n EventHandlerUtil.trigger(this.element, 'kt.toggle.change')\r\n\r\n if (this._isEnabled()) {\r\n this._disable()\r\n } else {\r\n this._enable()\r\n }\r\n\r\n // Trigger \"before.toggle\" event\r\n EventHandlerUtil.trigger(this.element, 'kt.toggle.changed')\r\n return this\r\n }\r\n\r\n private _enable = () => {\r\n if (this._isEnabled()) {\r\n return\r\n }\r\n\r\n EventHandlerUtil.trigger(this.element, 'kt.toggle.enable')\r\n this.target?.setAttribute(this.attribute, 'on')\r\n if (this.state.length > 0) {\r\n this.element.classList.add(this.state)\r\n }\r\n\r\n if (this.options.saveState) {\r\n CookieComponent.set(this.attribute, 'on', {})\r\n }\r\n\r\n EventHandlerUtil.trigger(this.element, 'kt.toggle.enabled')\r\n return this\r\n }\r\n\r\n private _disable = () => {\r\n if (!this._isEnabled()) {\r\n return false\r\n }\r\n\r\n EventHandlerUtil.trigger(this.element, 'kt.toggle.disable')\r\n this.target?.removeAttribute(this.attribute)\r\n\r\n if (this.state.length > 0) {\r\n this.element.classList.remove(this.state)\r\n }\r\n\r\n if (this.options.saveState) {\r\n CookieComponent.delete(this.attribute)\r\n }\r\n\r\n EventHandlerUtil.trigger(this.element, 'kt.toggle.disabled')\r\n return this\r\n }\r\n\r\n private _isEnabled = () => {\r\n if (!this.target) {\r\n return false\r\n }\r\n\r\n return String(this.target.getAttribute(this.attribute)).toLowerCase() === 'on'\r\n }\r\n\r\n ///////////////////////\r\n // ** Public API ** //\r\n ///////////////////////\r\n\r\n // Plugin API\r\n // Plugin API\r\n public toggle = () => {\r\n return this._toggle()\r\n }\r\n\r\n public enable = () => {\r\n return this._enable()\r\n }\r\n\r\n public disable = () => {\r\n return this._disable()\r\n }\r\n\r\n public isEnabled = () => {\r\n return this._isEnabled()\r\n }\r\n\r\n public goElement = () => {\r\n return this.element\r\n }\r\n\r\n // Event API\r\n public on = (name: string, handler: Function) => {\r\n return EventHandlerUtil.on(this.element, name, handler)\r\n }\r\n\r\n public one = (name: string, handler: Function) => {\r\n return EventHandlerUtil.one(this.element, name, handler)\r\n }\r\n\r\n public off = (name: string) => {\r\n return EventHandlerUtil.off(this.element, name)\r\n }\r\n\r\n public trigger = (name: string, event?: Event) => {\r\n return EventHandlerUtil.trigger(this.element, name, event)\r\n }\r\n\r\n // Static methods\r\n public static getInstance = (el: HTMLElement) => {\r\n const toggleElement = DataUtil.get(el, 'toggle')\r\n if (toggleElement) {\r\n return toggleElement\r\n }\r\n\r\n return null\r\n }\r\n\r\n public static createInstances = (selector: string) => {\r\n const elements = document.body.querySelectorAll(selector)\r\n elements.forEach((el) => {\r\n const item = el as HTMLElement\r\n let toggleElement = ToggleComponent.getInstance(item)\r\n if (!toggleElement) {\r\n toggleElement = new ToggleComponent(item, defaultToggleOptions)\r\n }\r\n })\r\n }\r\n\r\n public static createInsance = (\r\n selector: string,\r\n options: ToggleOptions = defaultToggleOptions\r\n ): ToggleComponent | undefined => {\r\n const element = document.body.querySelector(selector)\r\n if (!element) {\r\n return\r\n }\r\n const item = element as HTMLElement\r\n let toggle = ToggleComponent.getInstance(item)\r\n if (!toggle) {\r\n toggle = new ToggleComponent(item, options)\r\n }\r\n return toggle\r\n }\r\n\r\n public static reinitialization = () => {\r\n ToggleComponent.createInstances('[data-kt-toggle]')\r\n }\r\n\r\n public static bootstrap = () => {\r\n ToggleComponent.createInstances('[data-kt-toggle]')\r\n }\r\n}\r\n\r\nexport {ToggleComponent, defaultToggleOptions}\r\n","/* eslint-disable array-callback-return */\r\n/* eslint-disable no-useless-escape */\r\nimport {DataUtil} from '../_utils/index'\r\n\r\nexport interface IPasswordMeterOptions {\r\n minLength: number\r\n checkUppercase: boolean\r\n checkLowercase: boolean\r\n checkDigit: boolean\r\n checkChar: boolean\r\n scoreHighlightClass: string\r\n}\r\n\r\nexport interface IPasswordMeterQueries {\r\n componentName: string\r\n instanseQuery: string\r\n inputQuery: string\r\n visibilityQuery: string\r\n highlightQuery: string\r\n}\r\n\r\nconst defaultPasswordMeterOptions = {\r\n minLength: 8,\r\n checkUppercase: true,\r\n checkLowercase: true,\r\n checkDigit: true,\r\n checkChar: true,\r\n scoreHighlightClass: 'active',\r\n}\r\n\r\nconst defaultPasswordMeterQueires: IPasswordMeterQueries = {\r\n componentName: 'password-meter',\r\n instanseQuery: '[data-kt-password-meter]',\r\n inputQuery: 'input[type]',\r\n visibilityQuery: '[data-kt-password-meter-control=\"visibility\"]',\r\n highlightQuery: '[data-kt-password-meter-control=\"highlight\"]',\r\n}\r\n\r\nclass PasswordMeterComponent {\r\n element: HTMLElement\r\n inputElement: HTMLInputElement | null\r\n visibilityElement: HTMLElement | null\r\n highlightElement: HTMLElement | null\r\n options: IPasswordMeterOptions\r\n queries: IPasswordMeterQueries\r\n score: number\r\n checkSteps: number\r\n\r\n constructor(\r\n _element: HTMLElement,\r\n _options: IPasswordMeterOptions,\r\n _queries: IPasswordMeterQueries\r\n ) {\r\n this.element = _element\r\n this.options = Object.assign(defaultPasswordMeterOptions, _options)\r\n this.queries = _queries\r\n this.score = 0\r\n this.checkSteps = 5\r\n\r\n // Elements\r\n this.inputElement = this.element.querySelector(this.queries.inputQuery)\r\n this.visibilityElement = this.element.querySelector(this.queries.visibilityQuery)\r\n this.highlightElement = this.element.querySelector(this.queries.highlightQuery)\r\n\r\n // Event Handlers\r\n this.handlers()\r\n\r\n DataUtil.set(this.element, this.queries.componentName, this)\r\n }\r\n\r\n private handlers(): void {\r\n if (this.inputElement) {\r\n this.inputElement.addEventListener('input', () => {\r\n this.check()\r\n })\r\n }\r\n\r\n if (this.visibilityElement) {\r\n this.visibilityElement.addEventListener('click', () => {\r\n this.visitbility()\r\n })\r\n }\r\n }\r\n\r\n private visitbility() {\r\n if (this.visibilityElement && this.inputElement) {\r\n const visibleIcon = this.visibilityElement.querySelector(\r\n 'i:not(.d-none), .svg-icon:not(.d-none)'\r\n )\r\n\r\n const hiddenIcon = this.visibilityElement.querySelector('i.d-none, .svg-icon.d-none')\r\n\r\n const typeAttr = this.inputElement.getAttribute('type') || ''\r\n\r\n if (typeAttr === 'password') {\r\n this.inputElement.setAttribute('type', 'text')\r\n } else {\r\n this.inputElement.setAttribute('type', 'password')\r\n }\r\n\r\n visibleIcon?.classList.add('d-none')\r\n hiddenIcon?.classList.remove('d-none')\r\n\r\n this.inputElement.focus()\r\n }\r\n }\r\n\r\n private checkScore(): number {\r\n return 0\r\n }\r\n\r\n private checkLength(): boolean {\r\n if (this.inputElement) {\r\n return this.inputElement.value.length >= this.options.minLength // 20 score\r\n }\r\n\r\n return false\r\n }\r\n\r\n private checkLowerCase(): boolean {\r\n const val = this.inputElement ? this.inputElement.value : ''\r\n return /[a-z]/.test(val) // 20 score\r\n }\r\n\r\n private checkUppercase(): boolean {\r\n const val = this.inputElement ? this.inputElement.value : ''\r\n return /[A-Z]/.test(val) // 20 score\r\n }\r\n\r\n private checkDigit(): boolean {\r\n const val = this.inputElement ? this.inputElement.value : ''\r\n return /[0-9]/.test(val) // 20 score\r\n }\r\n\r\n private checkChar(): boolean {\r\n const val = this.inputElement ? this.inputElement.value : ''\r\n return /[~`!#$%\\^&*+=\\-\\[\\]\\\\';,/{}|\\\\\":<>\\?]/g.test(val) // 20 score\r\n }\r\n\r\n private getCheckScore(): number {\r\n let count = 1\r\n if (this.options.checkUppercase) {\r\n count++\r\n }\r\n\r\n if (this.options.checkLowercase) {\r\n count++\r\n }\r\n\r\n if (this.options.checkDigit) {\r\n count++\r\n }\r\n\r\n if (this.options.checkChar) {\r\n count++\r\n }\r\n\r\n this.checkSteps = count\r\n return 100 / this.checkSteps\r\n }\r\n\r\n private highlight() {\r\n const items = this.highlightElement\r\n ? [].slice.call(this.highlightElement.querySelectorAll('div'))\r\n : []\r\n const total = items.length\r\n let index = 0\r\n const checkScore = this.getCheckScore()\r\n const score = this.getScore()\r\n\r\n items.map((item: HTMLElement) => {\r\n index++\r\n if (checkScore * index * (this.checkSteps / total) <= score) {\r\n item.classList.add('active')\r\n } else {\r\n item.classList.remove('active')\r\n }\r\n })\r\n }\r\n\r\n ///////////////////////\r\n // ** Public API ** //\r\n ///////////////////////\r\n public reset = () => {\r\n this.score = 0\r\n this.highlight()\r\n }\r\n\r\n public getScore() {\r\n return this.score\r\n }\r\n\r\n public check() {\r\n let score = 0\r\n const checkScore = this.checkScore()\r\n if (this.checkLength()) {\r\n score = score + checkScore\r\n }\r\n\r\n if (this.options.checkUppercase && this.checkLowerCase()) {\r\n score = score + checkScore\r\n }\r\n\r\n if (this.options.checkLowercase && this.checkUppercase()) {\r\n score = score + checkScore\r\n }\r\n\r\n if (this.options.checkDigit && this.checkDigit()) {\r\n score = score + checkScore\r\n }\r\n\r\n if (this.options.checkChar && this.checkChar()) {\r\n score = score + checkScore\r\n }\r\n\r\n this.score = score\r\n this.highlight()\r\n }\r\n\r\n // Static methods\r\n public static getInstance = (\r\n el: HTMLElement,\r\n componentName: string = defaultPasswordMeterQueires.componentName\r\n ) => {\r\n const passwordMeter = DataUtil.get(el, componentName)\r\n if (passwordMeter) {\r\n return passwordMeter\r\n }\r\n\r\n return null\r\n }\r\n\r\n public static createInstances = (\r\n selector: string = defaultPasswordMeterQueires.instanseQuery,\r\n options: IPasswordMeterOptions = defaultPasswordMeterOptions,\r\n queries: IPasswordMeterQueries = defaultPasswordMeterQueires\r\n ) => {\r\n const elements = document.body.querySelectorAll(selector)\r\n elements.forEach((el) => {\r\n const item = el as HTMLElement\r\n let passwordMeter = PasswordMeterComponent.getInstance(item)\r\n if (!passwordMeter) {\r\n passwordMeter = new PasswordMeterComponent(item, options, queries)\r\n }\r\n })\r\n }\r\n\r\n public static createInsance = (\r\n selector: string = defaultPasswordMeterQueires.instanseQuery,\r\n options: IPasswordMeterOptions = defaultPasswordMeterOptions,\r\n queries: IPasswordMeterQueries = defaultPasswordMeterQueires\r\n ): PasswordMeterComponent | undefined => {\r\n const element = document.body.querySelector(selector)\r\n if (!element) {\r\n return\r\n }\r\n const item = element as HTMLElement\r\n let passwordMeter = PasswordMeterComponent.getInstance(item)\r\n if (!passwordMeter) {\r\n passwordMeter = new PasswordMeterComponent(item, options, queries)\r\n }\r\n return passwordMeter\r\n }\r\n\r\n public static bootstrap = (selector: string = defaultPasswordMeterQueires.instanseQuery) => {\r\n PasswordMeterComponent.createInstances(selector)\r\n }\r\n\r\n public static reinitialization = (\r\n selector: string = defaultPasswordMeterQueires.instanseQuery\r\n ) => {\r\n PasswordMeterComponent.createInstances(selector)\r\n }\r\n}\r\nexport {PasswordMeterComponent, defaultPasswordMeterOptions, defaultPasswordMeterQueires}\r\n","import {\r\n DataUtil,\r\n getAttributeValueByBreakpoint,\r\n stringSnakeToCamel,\r\n getObjectPropertyValueByKey,\r\n EventHandlerUtil,\r\n throttle,\r\n} from '../_utils/index'\r\n\r\nexport interface IPlaceOptions {\r\n mode: string\r\n}\r\n\r\nexport interface IPlaceQueries {\r\n componentName: string\r\n instanseQuery: string\r\n attrQuery: string\r\n}\r\n\r\nconst defaultPlaceOptions: IPlaceOptions = {\r\n mode: 'append',\r\n}\r\n\r\nconst defaultPlaceQueires: IPlaceQueries = {\r\n componentName: 'place',\r\n instanseQuery: '[data-kt-place=\"true\"]',\r\n attrQuery: 'data-kt-place-',\r\n}\r\n\r\nclass PlaceComponent {\r\n element: HTMLElement\r\n options: IPlaceOptions\r\n queries: IPlaceQueries\r\n\r\n constructor(_element: HTMLElement, _options: IPlaceOptions, _queries: IPlaceQueries) {\r\n this.element = _element\r\n this.options = Object.assign(defaultPlaceOptions, _options)\r\n this.queries = _queries\r\n\r\n // Initial update\r\n this.update()\r\n\r\n DataUtil.set(this.element, this.queries.componentName, this)\r\n }\r\n\r\n private getOption(name: string) {\r\n const attr = this.element.getAttribute(`${this.queries.attrQuery}${name}`)\r\n if (attr) {\r\n let value = getAttributeValueByBreakpoint(attr)\r\n if (attr != null && String(value) === 'true') {\r\n return true\r\n } else if (value !== null && String(value) === 'false') {\r\n return false\r\n }\r\n return value\r\n } else {\r\n const optionName = stringSnakeToCamel(name)\r\n const option = getObjectPropertyValueByKey(this.options, optionName)\r\n if (option) {\r\n return getAttributeValueByBreakpoint(option)\r\n } else {\r\n return null\r\n }\r\n }\r\n }\r\n\r\n ///////////////////////\r\n // ** Public API ** //\r\n ///////////////////////\r\n public update = () => {\r\n const parentSelector = this.getOption('parent')?.toString()\r\n const mode = this.getOption('mode')\r\n const parentElement = parentSelector ? document.querySelector(parentSelector) : null\r\n\r\n if (parentElement && this.element.parentNode !== parentElement) {\r\n if (mode === 'prepend') {\r\n parentElement.prepend(this.element)\r\n } else if (mode === 'append') {\r\n parentElement.append(this.element)\r\n }\r\n }\r\n }\r\n\r\n // Event API\r\n public on = (name: string, handler: Function) => {\r\n return EventHandlerUtil.on(this.element, name, handler)\r\n }\r\n\r\n public one = (name: string, handler: Function) => {\r\n return EventHandlerUtil.one(this.element, name, handler)\r\n }\r\n\r\n public off = (name: string) => {\r\n return EventHandlerUtil.off(this.element, name)\r\n }\r\n\r\n public trigger = (name: string, event: Event) => {\r\n return EventHandlerUtil.trigger(this.element, name, event)\r\n }\r\n\r\n // Static methods\r\n public static getInstance = (\r\n el: HTMLElement,\r\n componentName: string = defaultPlaceQueires.componentName\r\n ): PlaceComponent | null => {\r\n const place = DataUtil.get(el, componentName)\r\n if (place) {\r\n return place as PlaceComponent\r\n }\r\n\r\n return null\r\n }\r\n\r\n public static createInstances = (\r\n selector: string = defaultPlaceQueires.instanseQuery,\r\n options: IPlaceOptions = defaultPlaceOptions,\r\n queries: IPlaceQueries = defaultPlaceQueires\r\n ) => {\r\n const elements = document.body.querySelectorAll(selector)\r\n elements.forEach((el) => {\r\n const item = el as HTMLElement\r\n let place = PlaceComponent.getInstance(item)\r\n if (!place) {\r\n place = new PlaceComponent(item, options, queries)\r\n }\r\n })\r\n }\r\n\r\n public static createInsance = (\r\n selector: string = defaultPlaceQueires.instanseQuery,\r\n options: IPlaceOptions = defaultPlaceOptions,\r\n queries: IPlaceQueries = defaultPlaceQueires\r\n ): PlaceComponent | undefined => {\r\n const element = document.body.querySelector(selector)\r\n if (!element) {\r\n return\r\n }\r\n const item = element as HTMLElement\r\n let place = PlaceComponent.getInstance(item)\r\n if (!place) {\r\n place = new PlaceComponent(item, options, queries)\r\n }\r\n return place\r\n }\r\n\r\n public static bootstrap = (selector: string = defaultPlaceQueires.instanseQuery) => {\r\n PlaceComponent.createInstances(selector)\r\n }\r\n\r\n public static reinitialization = (selector: string = defaultPlaceQueires.instanseQuery) => {\r\n PlaceComponent.createInstances(selector)\r\n }\r\n}\r\n\r\n// Window resize handler\r\nwindow.addEventListener('resize', function () {\r\n let timer\r\n\r\n throttle(\r\n timer,\r\n () => {\r\n // Locate and update Offcanvas instances on window resize\r\n const elements = document.querySelectorAll(defaultPlaceQueires.instanseQuery)\r\n elements.forEach((el) => {\r\n const place = PlaceComponent.getInstance(el as HTMLElement)\r\n if (place) {\r\n place.update()\r\n }\r\n })\r\n },\r\n 200\r\n )\r\n})\r\n\r\nexport {PlaceComponent, defaultPlaceOptions, defaultPlaceQueires}\r\n","import {createPopper, VirtualElement} from '@popperjs/core'\r\nimport {\r\n getElementChild,\r\n getElementParents,\r\n getAttributeValueByBreakpoint,\r\n getUniqueIdWithPrefix,\r\n DataUtil,\r\n ElementStyleUtil,\r\n EventHandlerUtil,\r\n insertAfterElement,\r\n slideUp,\r\n slideDown,\r\n DOMEventHandlerUtil,\r\n throttle,\r\n getHighestZindex,\r\n} from '../_utils/index'\r\n\r\nexport interface MenuOptions {\r\n dropdown: {\r\n hoverTimeout: number\r\n zindex: number\r\n }\r\n accordion: {\r\n slideSpeed: number\r\n expand: boolean\r\n }\r\n}\r\n\r\nconst defaultMenuOptions: MenuOptions = {\r\n dropdown: {\r\n hoverTimeout: 200,\r\n zindex: 105,\r\n },\r\n accordion: {\r\n slideSpeed: 250,\r\n expand: false,\r\n },\r\n}\r\n\r\ntype PopperPlacement =\r\n | 'right'\r\n | 'auto'\r\n | 'auto-start'\r\n | 'auto-end'\r\n | 'top'\r\n | 'bottom'\r\n | 'left'\r\n | 'top-start'\r\n | 'top-end'\r\n | 'bottom-start'\r\n | 'bottom-end'\r\n | 'right-start'\r\n | 'right-end'\r\n | 'left-start'\r\n | 'left-end'\r\n | undefined\r\n\r\nclass MenuComponent {\r\n element: HTMLElement\r\n options: MenuOptions\r\n instanceUid: string\r\n triggerElement: HTMLElement | null = null\r\n\r\n constructor(_element: HTMLElement, options: MenuOptions) {\r\n this.element = _element\r\n this.options = Object.assign(defaultMenuOptions, options)\r\n this.instanceUid = getUniqueIdWithPrefix('menu')\r\n // this.element.setAttribute('data-kt-menu', 'true')\r\n this._setTriggerElement()\r\n this._update()\r\n DataUtil.set(this.element, 'menu', this)\r\n return this\r\n }\r\n\r\n // Set external trigger element\r\n private _setTriggerElement = () => {\r\n const target = document.querySelector(\r\n `[data-kt-menu-target=\"#${this.element.getAttribute('id')}\"`\r\n )\r\n\r\n if (target) {\r\n this.triggerElement = target as HTMLElement\r\n } else if (this.element.closest('[data-kt-menu-trigger]')) {\r\n this.triggerElement = this.element.closest('[data-kt-menu-trigger]') as HTMLElement\r\n } else if (\r\n this.element.parentNode &&\r\n getElementChild(this.element.parentNode as HTMLElement, '[data-kt-menu-trigger]')\r\n ) {\r\n const child = getElementChild(\r\n this.element.parentNode as HTMLElement,\r\n '[data-kt-menu-trigger]'\r\n )\r\n if (child) {\r\n this.triggerElement = child\r\n }\r\n }\r\n\r\n if (this.triggerElement) {\r\n DataUtil.set(this.triggerElement, 'menu', this)\r\n }\r\n }\r\n\r\n // Test if menu has external trigger element\r\n private _isTriggerElement = (item: HTMLElement) => {\r\n return this.triggerElement === item\r\n }\r\n\r\n // Get item option(through html attributes)\r\n private _getItemOption = (item: HTMLElement, name: string) => {\r\n let value = null\r\n if (item && item.hasAttribute('data-kt-menu-' + name)) {\r\n const attr = item.getAttribute('data-kt-menu-' + name) || ''\r\n value = getAttributeValueByBreakpoint(attr)\r\n if (value !== null && String(value) === 'true') {\r\n value = true\r\n } else if (value !== null && String(value) === 'false') {\r\n value = false\r\n }\r\n }\r\n return value\r\n }\r\n\r\n // Get item element\r\n private _getItemElement = (_element: HTMLElement) => {\r\n // Element is the external trigger element\r\n if (this._isTriggerElement(_element)) {\r\n return _element\r\n }\r\n\r\n // Element has item toggler attribute\r\n if (_element.hasAttribute('data-kt-menu-trigger')) {\r\n return _element\r\n }\r\n\r\n // Element has item DOM reference in it's data storage\r\n const itemElement = DataUtil.get(_element, 'item')\r\n if (itemElement) {\r\n return itemElement\r\n }\r\n\r\n // Item is parent of element\r\n const item = _element.closest('.menu-item[data-kt-menu-trigger]')\r\n if (item) {\r\n return item\r\n }\r\n\r\n // Element's parent has item DOM reference in it's data storage\r\n const sub = _element.closest('.menu-sub')\r\n if (sub) {\r\n const subItem = DataUtil.get(sub as HTMLElement, 'item')\r\n if (subItem) {\r\n return subItem\r\n }\r\n }\r\n }\r\n\r\n // Get item parent element\r\n private _getItemParentElement = (item: HTMLElement) => {\r\n const sub = item.closest('.menu-sub')\r\n if (!sub) {\r\n return null\r\n }\r\n\r\n const subItem = DataUtil.get(sub as HTMLElement, 'item')\r\n if (subItem) {\r\n return subItem\r\n }\r\n\r\n const parentItem = sub.closest('.menu-item[data-kt-menu-trigger]')\r\n if (sub && parentItem) {\r\n return parentItem\r\n }\r\n\r\n return null\r\n }\r\n\r\n // Get item parent elements\r\n private _getItemParentElements = (item: HTMLElement) => {\r\n const parents = []\r\n let parent\r\n let i = 0\r\n let buffer = item\r\n\r\n do {\r\n parent = this._getItemParentElement(buffer)\r\n if (parent) {\r\n parents.push(parent)\r\n buffer = parent\r\n }\r\n\r\n i++\r\n } while (parent !== null && i < 20)\r\n\r\n if (this.triggerElement) {\r\n parents.unshift(this.triggerElement)\r\n }\r\n\r\n return parents\r\n }\r\n\r\n // Prepare popper config for dropdown(see: https://popper.js.org/docs/v2/)\r\n private _getDropdownPopperConfig = (item: HTMLElement) => {\r\n // Placement\r\n const placementOption = this._getItemOption(item, 'placement')\r\n let placement: PopperPlacement = 'right'\r\n if (placementOption) {\r\n placement = placementOption as PopperPlacement\r\n }\r\n\r\n // Flip\r\n const flipValue = this._getItemOption(item, 'flip')\r\n const flip = flipValue ? flipValue.toString().split(',') : []\r\n\r\n // Offset\r\n const offsetValue = this._getItemOption(item, 'offset')\r\n const offset = offsetValue ? offsetValue.toString().split(',') : []\r\n\r\n // Strategy\r\n const strategy: 'absolute' | 'fixed' | undefined =\r\n this._getItemOption(item, 'overflow') === true ? 'absolute' : 'fixed'\r\n\r\n return {\r\n placement: placement,\r\n strategy: strategy,\r\n modifiers: [\r\n {\r\n name: 'offset',\r\n options: {\r\n offset: offset,\r\n },\r\n },\r\n {\r\n name: 'preventOverflow',\r\n options: {\r\n //altBoundary: true,\r\n //altAxis: true,\r\n rootBoundary: 'clippingParents',\r\n },\r\n },\r\n {\r\n name: 'flip',\r\n options: {\r\n altBoundary: true,\r\n fallbackPlacements: flip,\r\n },\r\n },\r\n ],\r\n }\r\n }\r\n\r\n // Get item child element\r\n private _getItemChildElement = (item: HTMLElement) => {\r\n let selector = item\r\n\r\n const subItem = DataUtil.get(item, 'sub')\r\n if (subItem) {\r\n selector = subItem\r\n }\r\n\r\n if (selector) {\r\n //element = selector.querySelector('.show.menu-item[data-kt-menu-trigger]');\r\n const element = selector.querySelector('.menu-item[data-kt-menu-trigger]')\r\n if (element) {\r\n return element\r\n }\r\n }\r\n return null\r\n }\r\n\r\n // Get item child elements\r\n private _getItemChildElements = (item: HTMLElement) => {\r\n const children = []\r\n let child\r\n let i = 0\r\n let buffer = item\r\n do {\r\n child = this._getItemChildElement(buffer)\r\n if (child) {\r\n children.push(child)\r\n buffer = child as HTMLElement\r\n }\r\n\r\n i++\r\n } while (child !== null && i < 20)\r\n\r\n return children\r\n }\r\n\r\n // Get item sub element\r\n private _getItemSubElement = (item: HTMLElement) => {\r\n if (!item) {\r\n return null\r\n }\r\n\r\n if (this._isTriggerElement(item)) {\r\n return this.element\r\n }\r\n\r\n if (item.classList.contains('menu-sub')) {\r\n return item\r\n } else if (DataUtil.has(item, 'sub')) {\r\n return DataUtil.get(item, 'sub')\r\n } else {\r\n return getElementChild(item, '.menu-sub')\r\n }\r\n }\r\n\r\n private _getCss = (el: HTMLElement, styleProp: string) => {\r\n const defaultView = (el.ownerDocument || document).defaultView\r\n if (!defaultView) {\r\n return ''\r\n }\r\n\r\n // sanitize property name to css notation\r\n // (hyphen separated words eg. font-Size)\r\n styleProp = styleProp.replace(/([A-Z])/g, '-$1').toLowerCase()\r\n\r\n return defaultView.getComputedStyle(el, null).getPropertyValue(styleProp)\r\n }\r\n\r\n // Get item sub type\r\n private _getItemSubType = (element: HTMLElement) => {\r\n const sub = this._getItemSubElement(element)\r\n if (sub && parseInt(this._getCss(sub, 'z-index')) > 0) {\r\n return 'dropdown'\r\n } else {\r\n return 'accordion'\r\n }\r\n }\r\n\r\n // Test if item's sub is shown\r\n private _isItemSubShown = (item: HTMLElement) => {\r\n let sub = this._getItemSubElement(item)\r\n if (sub) {\r\n if (this._getItemSubType(item) === 'dropdown') {\r\n return sub.classList.contains('show') && sub.hasAttribute('data-popper-placement')\r\n } else {\r\n return item.classList.contains('show')\r\n }\r\n }\r\n\r\n return false\r\n }\r\n\r\n // Test if item dropdown is permanent\r\n private _isItemDropdownPermanent = (item: HTMLElement) => {\r\n return this._getItemOption(item, 'permanent') === true\r\n }\r\n\r\n // Test if item's parent is shown\r\n private _isItemParentShown = (item: HTMLElement) => {\r\n return getElementParents(item, '.menu-item.show').length > 0\r\n }\r\n\r\n // Test of it is item sub element\r\n private _isItemSubElement = (item: HTMLElement) => {\r\n return item.classList.contains('menu-sub')\r\n }\r\n\r\n // Test if item has sub\r\n private _hasItemSub = (item: HTMLElement) => {\r\n return item.classList.contains('menu-item') && item.hasAttribute('data-kt-menu-trigger')\r\n }\r\n\r\n // Get link element\r\n private _getItemLinkElement = (item: HTMLElement) => {\r\n return getElementChild(item, '.menu-link')\r\n }\r\n\r\n // Get toggle element\r\n private _getItemToggleElement = (item: HTMLElement) => {\r\n if (this.triggerElement) {\r\n return this.triggerElement\r\n }\r\n\r\n return this._getItemLinkElement(item)\r\n }\r\n\r\n // Show item dropdown\r\n private _showDropdown = (item: HTMLElement) => {\r\n if (EventHandlerUtil.trigger(this.element, 'kt.menu.dropdown.show') === false) {\r\n return\r\n }\r\n\r\n // Hide all currently shown dropdowns except current one\r\n MenuComponent.hideDropdowns(item)\r\n\r\n // const toggle = this._isTriggerElement(item) ? item : this._getItemLinkElement(item);\r\n const sub = this._getItemSubElement(item)\r\n const width = this._getItemOption(item, 'width')\r\n const height = this._getItemOption(item, 'height')\r\n\r\n let zindex = this.options.dropdown.zindex\r\n const parentZindex = getHighestZindex(item) // update\r\n // Apply a new z-index if dropdown's toggle element or it's parent has greater z-index // update\r\n if (parentZindex !== null && parentZindex >= zindex) {\r\n zindex = parentZindex + 1\r\n }\r\n\r\n if (zindex) {\r\n ElementStyleUtil.set(sub, 'z-index', zindex)\r\n }\r\n\r\n if (width) {\r\n ElementStyleUtil.set(sub, 'width', width)\r\n }\r\n\r\n if (height) {\r\n ElementStyleUtil.set(sub, 'height', height)\r\n }\r\n\r\n this.initDropdownPopper(item, sub)\r\n\r\n item.classList.add('show')\r\n item.classList.add('menu-dropdown')\r\n sub.classList.add('show')\r\n\r\n // Append the sub the the root of the menu\r\n if (this._getItemOption(item, 'overflow') === true) {\r\n document.body.appendChild(sub)\r\n DataUtil.set(item, 'sub', sub)\r\n DataUtil.set(sub, 'item', item)\r\n DataUtil.set(sub, 'menu', this)\r\n } else {\r\n DataUtil.set(sub, 'item', item)\r\n }\r\n\r\n EventHandlerUtil.trigger(this.element, 'kt.menu.dropdown.shown')\r\n }\r\n\r\n // Init dropdown popper(new)\r\n private initDropdownPopper = (item: HTMLElement, sub: HTMLElement) => {\r\n // Setup popper instance\r\n let reference\r\n const attach = this._getItemOption(item, 'attach') as string\r\n\r\n if (attach) {\r\n if (attach === 'parent') {\r\n reference = item.parentNode\r\n } else {\r\n reference = document.querySelector(attach)\r\n }\r\n } else {\r\n reference = item\r\n }\r\n\r\n if (reference) {\r\n const popper = createPopper(\r\n reference as Element | VirtualElement,\r\n sub,\r\n this._getDropdownPopperConfig(item)\r\n )\r\n DataUtil.set(item, 'popper', popper)\r\n }\r\n }\r\n\r\n // Hide item dropdown\r\n private _hideDropdown = (item: HTMLElement) => {\r\n if (EventHandlerUtil.trigger(this.element, 'kt.menu.dropdown.hide') === false) {\r\n return\r\n }\r\n\r\n const sub = this._getItemSubElement(item)\r\n ElementStyleUtil.set(sub, 'z-index', '')\r\n ElementStyleUtil.set(sub, 'width', '')\r\n ElementStyleUtil.set(sub, 'height', '')\r\n item.classList.remove('show')\r\n item.classList.remove('menu-dropdown')\r\n sub.classList.remove('show')\r\n\r\n // Append the sub back to it's parent\r\n if (this._getItemOption(item, 'overflow') === true) {\r\n if (item.classList.contains('menu-item')) {\r\n item.appendChild(sub)\r\n } else {\r\n insertAfterElement(this.element, item)\r\n }\r\n\r\n DataUtil.remove(item, 'sub')\r\n DataUtil.remove(sub, 'item')\r\n DataUtil.remove(sub, 'menu')\r\n }\r\n\r\n if (DataUtil.has(item, 'popper') === true) {\r\n DataUtil.get(item, 'popper').destroy()\r\n DataUtil.remove(item, 'popper')\r\n }\r\n\r\n // Destroy popper(new)\r\n this.destroyDropdownPopper(item)\r\n EventHandlerUtil.trigger(this.element, 'kt.menu.dropdown.hidden')\r\n }\r\n\r\n // Destroy dropdown popper(new)\r\n private destroyDropdownPopper = (item: HTMLElement) => {\r\n if (DataUtil.has(item, 'popper') === true) {\r\n DataUtil.get(item, 'popper').destroy()\r\n DataUtil.remove(item, 'popper')\r\n }\r\n\r\n EventHandlerUtil.trigger(this.element, 'kt.menu.dropdown.hidden')\r\n }\r\n\r\n private _showAccordion = (item: HTMLElement) => {\r\n if (EventHandlerUtil.trigger(this.element, 'kt.menu.accordion.show') === false) {\r\n return\r\n }\r\n\r\n if (this.options.accordion.expand === false) {\r\n this._hideAccordions(item)\r\n }\r\n\r\n if (DataUtil.has(item, 'popper') === true) {\r\n this._hideDropdown(item)\r\n }\r\n\r\n item.classList.add('hover') // updateWW\r\n item.classList.add('showing')\r\n\r\n const subElement = this._getItemSubElement(item)\r\n if (subElement) {\r\n const sub = subElement as HTMLElement\r\n slideDown(sub, this.options.accordion.slideSpeed, () => {\r\n item.classList.remove('showing')\r\n item.classList.add('show')\r\n sub.classList.add('show')\r\n EventHandlerUtil.trigger(this.element, 'kt.menu.accordion.shown')\r\n })\r\n }\r\n }\r\n\r\n private _hideAccordion = (item: HTMLElement) => {\r\n if (EventHandlerUtil.trigger(this.element, 'kt.menu.accordion.hide') === false) {\r\n return\r\n }\r\n\r\n const sub = this._getItemSubElement(item)\r\n item.classList.add('hiding')\r\n\r\n if (sub) {\r\n slideUp(sub, this.options.accordion.slideSpeed, () => {\r\n item.classList.remove('hiding')\r\n item.classList.remove('show')\r\n sub.classList.remove('show')\r\n item.classList.remove('hover') // update\r\n EventHandlerUtil.trigger(this.element, 'kt.menu.accordion.hidden')\r\n })\r\n }\r\n }\r\n\r\n // Hide all shown accordions of item\r\n private _hideAccordions = (item: HTMLElement) => {\r\n const itemsToHide = this.element.querySelectorAll('.show[data-kt-menu-trigger]')\r\n if (itemsToHide && itemsToHide.length > 0) {\r\n for (var i = 0, len = itemsToHide.length; i < len; i++) {\r\n const itemToHide = itemsToHide[i] as HTMLElement\r\n\r\n if (\r\n this._getItemSubType(itemToHide) === 'accordion' &&\r\n itemToHide !== item &&\r\n item.contains(itemToHide) === false &&\r\n itemToHide.contains(item) === false\r\n ) {\r\n this._hideAccordion(itemToHide)\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Event Handlers\r\n // Reset item state classes if item sub type changed\r\n private _reset = (item: HTMLElement) => {\r\n if (this._hasItemSub(item) === false) {\r\n return\r\n }\r\n\r\n const sub = this._getItemSubElement(item)\r\n\r\n // Reset sub state if sub type is changed during the window resize\r\n if (DataUtil.has(item, 'type') && DataUtil.get(item, 'type') !== this._getItemSubType(item)) {\r\n // updated\r\n item.classList.remove('hover')\r\n item.classList.remove('show')\r\n item.classList.remove('show')\r\n if (sub && sub.removeClass) {\r\n sub.removeClass(sub, 'show')\r\n }\r\n } // updated\r\n }\r\n\r\n // TODO: not done\r\n private _destroy = () => {}\r\n\r\n // Update all item state classes if item sub type changed\r\n private _update = () => {\r\n const items = this.element.querySelectorAll('.menu-item[data-kt-menu-trigger]')\r\n items.forEach((el) => this._reset(el as HTMLElement))\r\n }\r\n\r\n // Hide item sub\r\n private _hide = (item: HTMLElement) => {\r\n if (!item) {\r\n return\r\n }\r\n\r\n if (this._isItemSubShown(item) === false) {\r\n return\r\n }\r\n\r\n if (this._getItemSubType(item) === 'dropdown') {\r\n this._hideDropdown(item)\r\n } else if (this._getItemSubType(item) === 'accordion') {\r\n this._hideAccordion(item)\r\n }\r\n }\r\n\r\n // Show item sub\r\n private _show = (item: HTMLElement) => {\r\n if (!item) {\r\n return\r\n }\r\n\r\n if (this._isItemSubShown(item) === true) {\r\n return\r\n }\r\n\r\n if (this._getItemSubType(item) === 'dropdown') {\r\n this._showDropdown(item) // // show current dropdown\r\n } else if (this._getItemSubType(item) === 'accordion') {\r\n this._showAccordion(item)\r\n }\r\n\r\n // Remember last submenu type\r\n\r\n DataUtil.set(item, 'type', this._getItemSubType(item)) // updated\r\n }\r\n\r\n // Toggle item sub\r\n private _toggle = (item: HTMLElement) => {\r\n if (!item) {\r\n return\r\n }\r\n\r\n if (this._isItemSubShown(item) === true) {\r\n this._hide(item)\r\n } else {\r\n this._show(item)\r\n }\r\n }\r\n\r\n // Mouseout handle\r\n private _mouseout = (element: HTMLElement, e: MouseEvent) => {\r\n const item = this._getItemElement(element)\r\n if (!item) {\r\n return\r\n }\r\n\r\n if (this._getItemOption(item, 'trigger') !== 'hover') {\r\n return\r\n }\r\n\r\n const timeout = setTimeout(() => {\r\n if (DataUtil.get(item, 'hover') === '1') {\r\n this._hide(item)\r\n }\r\n }, this.options.dropdown.hoverTimeout)\r\n\r\n DataUtil.set(item, 'hover', '1')\r\n DataUtil.set(item, 'timeout', timeout)\r\n }\r\n\r\n // Mouseover handle\r\n private _mouseover = (element: HTMLElement, e: MouseEvent) => {\r\n const item = this._getItemElement(element)\r\n if (!item) {\r\n return\r\n }\r\n\r\n if (this._getItemOption(item, 'trigger') !== 'hover') {\r\n return\r\n }\r\n\r\n if (DataUtil.get(item, 'hover') === '1') {\r\n clearTimeout(DataUtil.get(item, 'timeout'))\r\n DataUtil.remove(item, 'hover')\r\n DataUtil.remove(item, 'timeout')\r\n }\r\n\r\n this._show(item)\r\n }\r\n\r\n // Dismiss handler\r\n private _dismiss = (element: HTMLElement, e: Event) => {\r\n const item = this._getItemElement(element)\r\n const items = this._getItemChildElements(item)\r\n //if ( item !== null && _getItemOption(item, 'trigger') === 'click' && _getItemSubType(item) === 'dropdown' ) {\r\n const itemSubType = this._getItemSubType(item)\r\n if (item !== null && itemSubType === 'dropdown') {\r\n this._hide(item) // hide items dropdown\r\n\r\n // Hide all child elements as well\r\n if (items.length > 0) {\r\n for (let i = 0, len = items.length; i < len; i++) {\r\n //if ( _getItemOption(item, 'trigger') === 'click' && _getItemSubType(item) === 'dropdown' ) {\r\n if (items[i] !== null && this._getItemSubType(items[i] as HTMLElement) === 'dropdown') {\r\n this._hide(items[i] as HTMLElement)\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Link handler\r\n private _link = (element: HTMLElement, e: Event) => {\r\n if (EventHandlerUtil.trigger(this.element, 'kt.menu.link.click') === false) {\r\n return\r\n }\r\n\r\n // Dismiss all shown dropdowns\r\n MenuComponent.hideDropdowns(undefined)\r\n EventHandlerUtil.trigger(this.element, 'kt.menu.link.clicked')\r\n }\r\n\r\n private _click = (element: HTMLElement, e: Event) => {\r\n e.preventDefault()\r\n const item = this._getItemElement(element)\r\n if (this._getItemOption(item, 'trigger') !== 'click') {\r\n return\r\n }\r\n\r\n if (this._getItemOption(item, 'toggle') === false) {\r\n this._show(item)\r\n } else {\r\n this._toggle(item)\r\n }\r\n }\r\n\r\n ///////////////////////\r\n // ** Public API ** //\r\n ///////////////////////\r\n public click = (element: HTMLElement, e: Event) => {\r\n return this._click(element, e)\r\n }\r\n\r\n public link = (element: HTMLElement, e: Event) => {\r\n return this._link(element, e)\r\n }\r\n\r\n public dismiss = (element: HTMLElement, e: Event) => {\r\n return this._dismiss(element, e)\r\n }\r\n\r\n public mouseover = (element: HTMLElement, e: Event) => {\r\n return this._mouseover(element, e as MouseEvent)\r\n }\r\n\r\n public mouseout = (element: HTMLElement, e: Event) => {\r\n return this._mouseout(element, e as MouseEvent)\r\n }\r\n\r\n // General Methods\r\n public getItemTriggerType = (item: HTMLElement) => {\r\n return this._getItemOption(item, 'trigger')\r\n }\r\n\r\n public getItemSubType = (element: HTMLElement) => {\r\n return this._getItemSubType(element)\r\n }\r\n\r\n public show = (item: HTMLElement) => {\r\n return this._show(item)\r\n }\r\n\r\n public hide = (item: HTMLElement) => {\r\n return this._hide(item)\r\n }\r\n\r\n public reset = (item: HTMLElement) => {\r\n return this._reset(item)\r\n }\r\n\r\n public update = () => {\r\n return this._update()\r\n }\r\n\r\n public getElement = () => {\r\n return this.element\r\n }\r\n\r\n public getItemLinkElement = (item: HTMLElement) => {\r\n return this._getItemLinkElement(item)\r\n }\r\n\r\n public getItemToggleElement = (item: HTMLElement) => {\r\n return this._getItemToggleElement(item)\r\n }\r\n\r\n public getItemSubElement = (item: HTMLElement) => {\r\n return this._getItemSubElement(item)\r\n }\r\n\r\n public getItemParentElements = (item: HTMLElement) => {\r\n return this._getItemParentElements(item)\r\n }\r\n\r\n public isItemSubShown = (item: HTMLElement) => {\r\n return this._isItemSubShown(item)\r\n }\r\n\r\n public isItemParentShown = (item: HTMLElement) => {\r\n return this._isItemParentShown(item)\r\n }\r\n\r\n public getTriggerElement = () => {\r\n return this.triggerElement\r\n }\r\n\r\n public isItemDropdownPermanent = (item: HTMLElement) => {\r\n return this._isItemDropdownPermanent(item)\r\n }\r\n\r\n // Accordion Mode Methods\r\n public hideAccordions = (item: HTMLElement) => {\r\n return this._hideAccordions(item)\r\n }\r\n\r\n // Event API\r\n public on = (name: string, handler: any) => {\r\n return EventHandlerUtil.on(this.element, name, handler)\r\n }\r\n\r\n public one = (name: string, handler: any) => {\r\n return EventHandlerUtil.one(this.element, name, handler)\r\n }\r\n\r\n public off = (name: string) => {\r\n return EventHandlerUtil.off(this.element, name)\r\n }\r\n\r\n // public static methods\r\n // Get KTMenu instance by element\r\n public static getInstance = (element: HTMLElement) => {\r\n // Element has menu DOM reference in it's DATA storage\r\n const elementMenu = DataUtil.get(element, 'menu')\r\n if (elementMenu) {\r\n return elementMenu\r\n }\r\n\r\n // Element has .menu parent\r\n const menu = element.closest('.menu')\r\n if (menu) {\r\n const menuData = DataUtil.get(menu as HTMLElement, 'menu')\r\n if (menuData) {\r\n return menuData\r\n }\r\n }\r\n\r\n // Element has a parent with DOM reference to .menu in it's DATA storage\r\n if (element.classList.contains('menu-link')) {\r\n const sub = element.closest('.menu-sub')\r\n if (sub) {\r\n const subMenu = DataUtil.get(sub as HTMLElement, 'menu')\r\n if (subMenu) {\r\n return subMenu\r\n }\r\n }\r\n }\r\n\r\n return null\r\n }\r\n\r\n // Hide all dropdowns and skip one if provided\r\n public static hideDropdowns = (skip: HTMLElement | undefined) => {\r\n const items = document.querySelectorAll('.show.menu-dropdown[data-kt-menu-trigger]')\r\n\r\n if (items && items.length > 0) {\r\n for (let i = 0, len = items.length; i < len; i++) {\r\n const item = items[i]\r\n const menu = MenuComponent.getInstance(item as HTMLElement)\r\n\r\n if (menu && menu.getItemSubType(item) === 'dropdown') {\r\n if (skip) {\r\n if (\r\n menu.getItemSubElement(item).contains(skip) === false &&\r\n item.contains(skip) === false &&\r\n item !== skip\r\n ) {\r\n menu.hide(item)\r\n }\r\n } else {\r\n menu.hide(item)\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n public static updateDropdowns = () => {\r\n const items = document.querySelectorAll('.show.menu-dropdown[data-kt-menu-trigger]')\r\n if (items && items.length > 0) {\r\n for (var i = 0, len = items.length; i < len; i++) {\r\n var item = items[i]\r\n\r\n if (DataUtil.has(item as HTMLElement, 'popper')) {\r\n DataUtil.get(item as HTMLElement, 'popper').forceUpdate()\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Global handlers\r\n public static createInstances = (selector: string) => {\r\n // Initialize menus\r\n document.querySelectorAll(selector).forEach((el) => {\r\n const menuItem = el as HTMLElement\r\n let menuInstance = MenuComponent.getInstance(menuItem)\r\n if (!menuInstance) {\r\n menuInstance = new MenuComponent(el as HTMLElement, defaultMenuOptions)\r\n }\r\n })\r\n }\r\n\r\n public static initGlobalHandlers = () => {\r\n // Dropdown handler\r\n document.addEventListener('click', (e) => {\r\n const menuItems = document.querySelectorAll('.show.menu-dropdown[data-kt-menu-trigger]')\r\n if (menuItems && menuItems.length > 0) {\r\n for (let i = 0; i < menuItems.length; i++) {\r\n const item = menuItems[i] as HTMLElement\r\n const menuObj = MenuComponent.getInstance(item) as MenuComponent\r\n if (menuObj && menuObj.getItemSubType(item) === 'dropdown') {\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n const menu = menuObj.getElement()\r\n const sub = menuObj.getItemSubElement(item) as HTMLElement\r\n if (item === e.target || item.contains(e.target as HTMLElement)) {\r\n continue\r\n }\r\n\r\n if (sub && (sub === e.target || sub.contains(e.target as HTMLElement))) {\r\n continue\r\n }\r\n menuObj.hide(item)\r\n }\r\n }\r\n }\r\n })\r\n\r\n // Sub toggle handler\r\n DOMEventHandlerUtil.on(\r\n document.body,\r\n '.menu-item[data-kt-menu-trigger] > .menu-link, [data-kt-menu-trigger]:not(.menu-item):not([data-kt-menu-trigger=\"auto\"])',\r\n 'click',\r\n function (this: HTMLElement, e: Event) {\r\n const menu = MenuComponent.getInstance(this) as MenuComponent\r\n if (menu) {\r\n return menu.click(this, e)\r\n }\r\n }\r\n )\r\n\r\n // // Link handler\r\n DOMEventHandlerUtil.on(\r\n document.body,\r\n '.menu-item:not([data-kt-menu-trigger]) > .menu-link',\r\n 'click',\r\n function (this: HTMLElement, e: Event) {\r\n e.stopPropagation()\r\n const menu = MenuComponent.getInstance(this)\r\n if (menu && menu.link) {\r\n return menu.link(this, e)\r\n }\r\n }\r\n )\r\n\r\n // Dismiss handler\r\n DOMEventHandlerUtil.on(\r\n document.body,\r\n '[data-kt-menu-dismiss=\"true\"]',\r\n 'click',\r\n function (this: HTMLElement, e: Event) {\r\n const menu = MenuComponent.getInstance(this) as MenuComponent\r\n if (menu) {\r\n return menu.dismiss(this, e)\r\n }\r\n }\r\n )\r\n\r\n // Mouseover handler\r\n DOMEventHandlerUtil.on(\r\n document.body,\r\n '[data-kt-menu-trigger], .menu-sub',\r\n 'mouseover',\r\n function (this: HTMLElement, e: Event) {\r\n const menu = MenuComponent.getInstance(this) as MenuComponent\r\n if (menu && menu.getItemSubType(this) === 'dropdown') {\r\n return menu.mouseover(this, e)\r\n }\r\n }\r\n )\r\n\r\n // Mouseout handler\r\n DOMEventHandlerUtil.on(\r\n document.body,\r\n '[data-kt-menu-trigger], .menu-sub',\r\n 'mouseout',\r\n function (this: HTMLElement, e: Event) {\r\n const menu = MenuComponent.getInstance(this) as MenuComponent\r\n if (menu && menu.getItemSubType(this) === 'dropdown') {\r\n return menu.mouseout(this, e)\r\n }\r\n }\r\n )\r\n\r\n // Resize handler\r\n window.addEventListener('resize', () => {\r\n let timer\r\n throttle(\r\n timer,\r\n () => {\r\n // Locate and update Drawer instances on window resize\r\n const elements = document.querySelectorAll('[data-kt-menu=\"true\"]')\r\n elements.forEach((el) => {\r\n const menu = MenuComponent.getInstance(el as HTMLElement)\r\n if (menu) {\r\n menu.update()\r\n }\r\n })\r\n },\r\n 200\r\n )\r\n })\r\n }\r\n\r\n public static bootstrap = () => {\r\n MenuComponent.initGlobalHandlers()\r\n MenuComponent.createInstances('[data-kt-menu=\"true\"]')\r\n }\r\n\r\n public static reinitialization = () => {\r\n MenuComponent.createInstances('[data-kt-menu=\"true\"]')\r\n }\r\n\r\n public static createInsance = (\r\n selector: string,\r\n options: MenuOptions = defaultMenuOptions\r\n ): MenuComponent | undefined => {\r\n const element = document.body.querySelector(selector)\r\n if (!element) {\r\n return\r\n }\r\n const item = element as HTMLElement\r\n let menu = MenuComponent.getInstance(item)\r\n if (!menu) {\r\n menu = new MenuComponent(item, options)\r\n }\r\n return menu\r\n }\r\n}\r\n\r\nexport {MenuComponent, defaultMenuOptions}\r\n","import {\r\n EventHandlerUtil,\r\n DataUtil,\r\n getBreakpoint,\r\n getAttributeValueByBreakpoint,\r\n stringSnakeToCamel,\r\n getObjectPropertyValueByKey,\r\n getViewPort,\r\n isVisibleElement,\r\n throttle,\r\n} from '../_utils/index'\r\n\r\nimport {MenuComponent, defaultMenuOptions} from './MenuComponent'\r\n\r\nexport interface ISearchOptions {\r\n minLength: number // Miniam text lenght to query search\r\n keypress: boolean // Enable search on keypress\r\n enter: boolean // Enable search on enter key press\r\n layout: 'menu' | 'inline' // Use 'menu' or 'inline' layout options to display search results\r\n responsive?: number // Pass integer value or bootstrap compatible breakpoint key(sm,md,lg,xl,xxl) to enable reponsive form mode for device width below the breakpoint value\r\n showOnFocus: boolean // Always show menu on input focus\r\n}\r\n\r\nexport interface ISearchQueries {\r\n componentName: string\r\n instanseQuery: string\r\n attrQuery: string\r\n}\r\n\r\nconst defaultSearchOptions: ISearchOptions = {\r\n minLength: 2, // Miniam text lenght to query search\r\n keypress: true, // Enable search on keypress\r\n enter: true, // Enable search on enter key press\r\n layout: 'menu', // Use 'menu' or 'inline' layout options to display search results\r\n showOnFocus: true, // Always show menu on input focus\r\n}\r\n\r\nconst defaultSearchQueires: ISearchQueries = {\r\n componentName: 'search',\r\n instanseQuery: '[data-kt-search]',\r\n attrQuery: 'data-kt-search-',\r\n}\r\n\r\nclass SearchComponent {\r\n element: HTMLElement\r\n contentElement: HTMLElement\r\n formElement: HTMLFormElement\r\n inputElement: HTMLInputElement\r\n spinnerElement: HTMLElement\r\n clearElement: HTMLElement\r\n toggleElement: HTMLElement\r\n submitElement: HTMLElement\r\n toolbarElement: HTMLElement\r\n resultsElement: HTMLElement\r\n suggestionElement: HTMLElement\r\n emptyElement: HTMLElement\r\n layout: any\r\n\r\n options: ISearchOptions\r\n queries: ISearchQueries\r\n\r\n processing: boolean = false\r\n menuObject: MenuComponent | undefined\r\n\r\n constructor(_element: HTMLElement, _options: ISearchOptions, _queries: ISearchQueries) {\r\n // Variables\r\n this.options = Object.assign(defaultSearchOptions, _options)\r\n this.queries = _queries\r\n\r\n // Elements\r\n this.element = _element\r\n this.contentElement = this._getElement('content') as HTMLElement\r\n this.formElement = this._getElement('form') as HTMLFormElement\r\n this.inputElement = this._getElement('input') as HTMLInputElement\r\n this.spinnerElement = this._getElement('spinner') as HTMLElement\r\n this.clearElement = this._getElement('clear') as HTMLElement\r\n this.toggleElement = this._getElement('toggle') as HTMLElement\r\n this.submitElement = this._getElement('submit') as HTMLElement\r\n this.toolbarElement = this._getElement('toolbar') as HTMLElement\r\n\r\n this.resultsElement = this._getElement('results') as HTMLElement\r\n this.suggestionElement = this._getElement('suggestion') as HTMLElement\r\n this.emptyElement = this._getElement('empty') as HTMLElement\r\n\r\n // Layout\r\n this.layout = this.getOption('layout')\r\n if (this.layout === 'menu') {\r\n this.menuObject = new MenuComponent(this.contentElement, defaultMenuOptions)\r\n }\r\n\r\n // Update\r\n this.update()\r\n\r\n // Event Handlers\r\n this.handlers()\r\n\r\n DataUtil.set(this.element, this.queries.componentName, this)\r\n }\r\n\r\n private _getElement = (name: string) => {\r\n return this.element.querySelector('[data-kt-search-element=\"' + name + '\"]')\r\n }\r\n\r\n // Get option\r\n private getOption = (name: string) => {\r\n const attr = this.element.getAttribute(`${this.queries.attrQuery}${name}`)\r\n if (attr) {\r\n let value = getAttributeValueByBreakpoint(attr)\r\n\r\n if (value !== null && String(value) === 'true') {\r\n return true\r\n } else if (value !== null && String(value) === 'false') {\r\n return false\r\n }\r\n\r\n return value\r\n } else {\r\n const optionName = stringSnakeToCamel(name)\r\n\r\n const option = getObjectPropertyValueByKey(this.options, optionName)\r\n if (option) {\r\n return getAttributeValueByBreakpoint(option)\r\n } else {\r\n return null\r\n }\r\n }\r\n }\r\n\r\n // Check if responsive form mode is enabled\r\n private getResponsiveFormMode = () => {\r\n const responsive = this.getOption('responsive') as string\r\n const width = getViewPort().width\r\n\r\n if (!responsive) {\r\n return null\r\n }\r\n\r\n const breakpoint = getBreakpoint(responsive)\r\n let breakPointNum = -1\r\n if (!breakpoint) {\r\n breakPointNum = parseInt(responsive)\r\n } else {\r\n breakPointNum = +breakpoint\r\n }\r\n\r\n if (width < breakPointNum) {\r\n return 'on'\r\n } else {\r\n return 'off'\r\n }\r\n }\r\n\r\n // Focus\r\n private focus = () => {\r\n this.element.classList.add('focus')\r\n\r\n if (\r\n this.getOption('show-on-focus') === true ||\r\n this.inputElement.value.length >= this.options.minLength\r\n ) {\r\n this.show()\r\n }\r\n }\r\n\r\n // Blur\r\n private blur = () => {\r\n this.element.classList.remove('focus')\r\n }\r\n\r\n // Enter\r\n private enter = (e: KeyboardEvent) => {\r\n const key = e.charCode || e.keyCode || 0\r\n\r\n if (key === 13) {\r\n e.preventDefault()\r\n\r\n this.search()\r\n }\r\n }\r\n\r\n // Input\r\n private input = () => {\r\n if (this.getOption('min-length')) {\r\n const minLength = parseInt(this.getOption('min-length') as string)\r\n\r\n if (this.inputElement.value.length >= minLength) {\r\n this.search()\r\n } else if (this.inputElement.value.length === 0) {\r\n this.clear()\r\n }\r\n }\r\n }\r\n\r\n private handlers(): void {\r\n // Focus\r\n this.inputElement.addEventListener('focus', this.focus)\r\n\r\n // Blur\r\n this.inputElement.addEventListener('blur', this.blur)\r\n\r\n // Keypress\r\n if (this.getOption('keypress') === true) {\r\n this.inputElement.addEventListener('input', this.input)\r\n }\r\n\r\n // Submit\r\n if (this.submitElement) {\r\n this.submitElement.addEventListener('click', this.search)\r\n }\r\n\r\n // Enter\r\n if (this.getOption('enter') === true) {\r\n this.inputElement.addEventListener('keypress', this.enter)\r\n }\r\n\r\n // Clear\r\n if (this.clearElement) {\r\n this.clearElement.addEventListener('click', this.clear)\r\n }\r\n\r\n // Menu\r\n if (this.menuObject) {\r\n // Toggle menu\r\n if (this.toggleElement) {\r\n this.toggleElement.addEventListener('click', this.show)\r\n\r\n this.menuObject.on('kt.menu.dropdown.show', function () {\r\n // @ts-ignore\r\n if (isVisibleElement(this.toggleElement)) {\r\n // @ts-ignore\r\n this.toggleElement.classList.add('active')\r\n // @ts-ignore\r\n this.toggleElement.classList.add('show')\r\n }\r\n })\r\n\r\n this.menuObject.on('kt.menu.dropdown.hide', function () {\r\n // @ts-ignore\r\n if (isVisibleElement(this.toggleElement)) {\r\n // @ts-ignore\r\n this.toggleElement.classList.remove('active')\r\n // @ts-ignore\r\n this.toggleElement.classList.remove('show')\r\n }\r\n })\r\n }\r\n\r\n this.menuObject.on('kt.menu.dropdown.shown', function () {\r\n // @ts-ignore\r\n this.inputElement.focus()\r\n })\r\n }\r\n\r\n // Window resize handling\r\n window.addEventListener('resize', () => {\r\n let timer\r\n\r\n throttle(\r\n timer,\r\n () => {\r\n this.update()\r\n },\r\n 200\r\n )\r\n })\r\n }\r\n\r\n ///////////////////////\r\n // ** Public API ** //\r\n ///////////////////////\r\n // Update\r\n public update = () => {\r\n // Handle responsive form\r\n if (this.layout === 'menu') {\r\n let responsiveFormMode = this.getResponsiveFormMode()\r\n\r\n if (responsiveFormMode === 'on' && this.contentElement.contains(this.formElement) === false) {\r\n this.contentElement.prepend(this.formElement)\r\n this.formElement.classList.remove('d-none')\r\n } else if (\r\n responsiveFormMode === 'off' &&\r\n this.contentElement.contains(this.formElement) === true\r\n ) {\r\n this.element.prepend(this.formElement)\r\n this.formElement.classList.add('d-none')\r\n }\r\n }\r\n }\r\n\r\n // Show menu\r\n public show = () => {\r\n if (this.menuObject) {\r\n this.update()\r\n\r\n this.menuObject.show(this.element)\r\n }\r\n }\r\n\r\n // Hide menu\r\n public hide = () => {\r\n if (this.menuObject) {\r\n this.update()\r\n\r\n this.menuObject.hide(this.element)\r\n }\r\n }\r\n\r\n // Search\r\n public search = () => {\r\n if (this.processing === false) {\r\n // Show search spinner\r\n if (this.spinnerElement) {\r\n this.spinnerElement.classList.remove('d-none')\r\n }\r\n\r\n // Hide search clear button\r\n if (this.clearElement) {\r\n this.clearElement.classList.add('d-none')\r\n }\r\n\r\n // Hide search toolbar\r\n if (this.toolbarElement) {\r\n this.toolbarElement.classList.add('d-none')\r\n }\r\n\r\n // Focus input\r\n this.inputElement.focus()\r\n\r\n this.processing = true\r\n EventHandlerUtil.trigger(this.element, 'kt.search.process')\r\n }\r\n }\r\n\r\n // Complete\r\n public complete = () => {\r\n if (this.spinnerElement) {\r\n this.spinnerElement.classList.add('d-none')\r\n }\r\n\r\n // Show search toolbar\r\n if (this.clearElement) {\r\n this.clearElement.classList.remove('d-none')\r\n }\r\n\r\n if (this.inputElement.value.length === 0) {\r\n this.clear()\r\n }\r\n\r\n // Focus input\r\n this.inputElement.focus()\r\n\r\n this.show()\r\n\r\n this.processing = false\r\n }\r\n\r\n // Clear\r\n public clear = () => {\r\n if (EventHandlerUtil.trigger(this.element, 'kt.search.clear') === false) {\r\n return\r\n }\r\n\r\n // Clear and focus input\r\n this.inputElement.value = ''\r\n this.inputElement.focus()\r\n\r\n // Hide clear icon\r\n if (this.clearElement) {\r\n this.clearElement.classList.add('d-none')\r\n }\r\n\r\n // Show search toolbar\r\n if (this.toolbarElement) {\r\n this.toolbarElement.classList.remove('d-none')\r\n }\r\n\r\n // Hide menu\r\n if (this.getOption('show-on-focus') === false) {\r\n this.hide()\r\n }\r\n\r\n EventHandlerUtil.trigger(this.element, 'kt.search.cleared')\r\n }\r\n\r\n public isProcessing = () => {\r\n return this.processing\r\n }\r\n\r\n public getQuery = () => {\r\n return this.inputElement.value\r\n }\r\n\r\n public getMenu = () => {\r\n return this.menuObject\r\n }\r\n\r\n public getFormElement = () => {\r\n return this.formElement\r\n }\r\n\r\n public getInputElement(): HTMLInputElement {\r\n return this.inputElement\r\n }\r\n\r\n public getContentElement(): HTMLElement {\r\n return this.contentElement\r\n }\r\n\r\n public getElement(): HTMLElement {\r\n return this.element\r\n }\r\n\r\n // Event API\r\n public on = (name: string, handler: Function) => {\r\n return EventHandlerUtil.on(this.element, name, handler)\r\n }\r\n\r\n public one = (name: string, handler: Function) => {\r\n return EventHandlerUtil.one(this.element, name, handler)\r\n }\r\n\r\n public off = (name: string) => {\r\n return EventHandlerUtil.off(this.element, name)\r\n }\r\n\r\n // Static methods\r\n public static getInstance = (\r\n el: HTMLElement,\r\n componentName: string = defaultSearchQueires.componentName\r\n ) => {\r\n const Search = DataUtil.get(el, componentName)\r\n if (Search) {\r\n return Search\r\n }\r\n\r\n return null\r\n }\r\n\r\n public static createInstances = (\r\n selector: string = defaultSearchQueires.instanseQuery,\r\n options: ISearchOptions = defaultSearchOptions,\r\n queries: ISearchQueries = defaultSearchQueires\r\n ) => {\r\n const elements = document.body.querySelectorAll(selector)\r\n elements.forEach((el) => {\r\n const item = el as HTMLElement\r\n let Search = SearchComponent.getInstance(item)\r\n if (!Search) {\r\n Search = new SearchComponent(item, options, queries)\r\n }\r\n })\r\n }\r\n\r\n public static createInsance = (\r\n selector: string = defaultSearchQueires.instanseQuery,\r\n options: ISearchOptions = defaultSearchOptions,\r\n queries: ISearchQueries = defaultSearchQueires\r\n ): SearchComponent | undefined => {\r\n const element = document.body.querySelector(selector)\r\n if (!element) {\r\n return\r\n }\r\n const item = element as HTMLElement\r\n let Search = SearchComponent.getInstance(item)\r\n if (!Search) {\r\n Search = new SearchComponent(item, options, queries)\r\n }\r\n return Search\r\n }\r\n\r\n public static bootstrap = (selector: string = defaultSearchQueires.instanseQuery) => {\r\n SearchComponent.createInstances(selector)\r\n }\r\n\r\n public static reinitialization = (selector: string = defaultSearchQueires.instanseQuery) => {\r\n SearchComponent.createInstances(selector)\r\n }\r\n}\r\nexport {SearchComponent, defaultSearchOptions, defaultSearchQueires}\r\n","export const axioDefaultConfig = {\r\n method: 'get',\r\n url: 'https://localhost:44321/api/contractors',\r\n data: {},\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n },\r\n validateStatus: function (status) {\r\n return status >= 200 && status < 400 // default\r\n },\r\n }\r\n export const phoneRegex =\r\n /^(?:0|94|\\+94)?(?:(11|21|23|24|25|26|27|31|32|33|34|35|36|37|38|41|45|47|51|52|54|55|57|63|65|66|67|81|912)(0|2|3|4|5|7|9)|7(0|1|2|4|5|6|7|8)\\d)\\d{6}$/\r\n \r\n export const nicRegex =\r\n /^(?:19|20)?\\d{2}(?:[0-35-8]\\d\\d(? el.l + sum, 0)\r\n\r\nexport function getScale(rowIndex, rowFrom, rowTo, K_SCALE_NORMAL) {\r\n if (rowIndex >= rowFrom && rowIndex <= rowTo) {\r\n return K_SCALE_NORMAL\r\n }\r\n\r\n if (K_BEFORE_AFTER_SCALES.length) {\r\n if (rowIndex < rowFrom) {\r\n let deltaS = rowFrom\r\n for (let index = K_BEFORE_AFTER_SCALES.length - 1; index >= 0; --index) {\r\n deltaS -= K_BEFORE_AFTER_SCALES[index].l\r\n if (rowIndex >= deltaS) {\r\n return K_BEFORE_AFTER_SCALES[index].scale\r\n }\r\n }\r\n\r\n // yes, the code can be here (dirty calculus)\r\n return K_BEFORE_AFTER_SCALES[0].scale\r\n }\r\n\r\n if (rowIndex > rowTo) {\r\n let deltaS = rowTo\r\n for (let index = K_BEFORE_AFTER_SCALES.length - 1; index >= 0; --index) {\r\n deltaS += K_BEFORE_AFTER_SCALES[index].l\r\n if (rowIndex <= deltaS) {\r\n return K_BEFORE_AFTER_SCALES[index].scale\r\n }\r\n }\r\n\r\n // yes, the code can be here (dirty calculus)\r\n return K_BEFORE_AFTER_SCALES[0].scale\r\n }\r\n }\r\n return K_SCALE_NORMAL\r\n}\r\n\r\n// this calculations is not precise (dirty)\r\nfunction _getRealFromTo(rowFrom, rowTo, maxVisibleRows, totalSize) {\r\n let addFrom =\r\n rowFrom + maxVisibleRows + K_SCALES_SUM > totalSize - 1\r\n ? rowFrom + maxVisibleRows + K_SCALES_SUM - (totalSize - 1)\r\n : 0\r\n\r\n const dadd = K_SCALES_SUM - rowFrom\r\n let addTo = dadd >= 0 ? dadd : 0\r\n\r\n return {\r\n rowFrom: Math.max(0, rowFrom - K_SCALES_SUM - addFrom),\r\n rowTo: Math.min(totalSize - 1, rowFrom + maxVisibleRows + K_SCALES_SUM + addTo),\r\n }\r\n}\r\n\r\nexport function getRealFromTo(rowFrom, rowTo, maxVisibleRows, totalSize) {\r\n const current = _getRealFromTo(rowFrom, rowTo, maxVisibleRows, totalSize)\r\n\r\n const result = {\r\n rowFrom: current.rowFrom,\r\n rowTo: current.rowTo,\r\n }\r\n\r\n return result\r\n}\r\n","import React, {useState, useEffect, useRef} from 'react'\r\n\r\nfunction getWindowDimensions() {\r\n\tconst {innerWidth: width, innerHeight: height} = window\r\n\treturn {\r\n\t width,\r\n\t height,\r\n\t}\r\n }\r\n \r\n function useWindowDimensions() {\r\n\tconst [windowDimensions, setWindowDimensions] = useState(getWindowDimensions())\r\n \r\n\tuseEffect(() => {\r\n\t function handleResize() {\r\n\t\tsetWindowDimensions(getWindowDimensions())\r\n\t }\r\n \r\n\t window.addEventListener('resize', handleResize)\r\n\t return () => window.removeEventListener('resize', handleResize)\r\n\t}, [])\r\n \r\n\treturn windowDimensions\r\n }\r\n\r\n \r\nexport default useWindowDimensions;","import {env} from 'process'\r\n\r\nexport const axioDefaultConfig = {\r\n method: 'get',\r\n url: 'https://localhost:44321/api/contractors',\r\n data: {},\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n ApiKey: process.env.RACT_APP_API_KEY,\r\n },\r\n validateStatus: function (status) {\r\n return status >= 200 && status < 400 // default\r\n },\r\n}\r\n\r\nexport const phoneRegex =\r\n /(^(?:0|94|\\+94)?(?:(11|21|23|24|25|26|27|31|32|33|34|35|36|37|38|41|45|47|51|52|54|55|57|63|65|66|67|81|912)(0|2|3|4|5|7|9)|7(0|1|2|4|5|6|7|8)\\d)\\d{6}$)/\r\n\r\nexport const nicRegex =\r\n /(^(?:19|20)?\\d{2}((?:[0-35-8]\\d\\d(? (val && val.length > 0 ? true : false),\r\n then: Yup.string().oneOf([Yup.ref('password')], \"Password and Confirmed Password are not matched\"),\r\n }),\r\n // acceptTerms: Yup.bool().required('You must accept the terms and conditions'),\r\n})\r\n\r\nexport function Registration() {\r\n const [loading, setLoading] = useState(false)\r\n //const dispatch = useDispatch()\r\n const [{ token }, dispatch] = useDataLayerValue();\r\n const [tempToken, setTempToken] = useState('');\r\n\r\n const urlParams = new URLSearchParams(window.location.search);\r\n const Passwordaccesstoken = String(urlParams.get('token'));\r\n const [password, setPassword] = useState('');\r\n const [showPassword, setShowPassword] = useState(false);\r\n\r\n const handlePasswordChange = (event: any) => {\r\n setPassword(event.target.value);\r\n };\r\n\r\n const togglePasswordVisibility = () => {\r\n setShowPassword(!showPassword);\r\n };\r\n\r\n const formik = useFormik({\r\n initialValues,\r\n validationSchema: registrationSchema,\r\n onSubmit: (values, { setStatus, setSubmitting }) => {\r\n values.token = Passwordaccesstoken; // Set the additional token value\r\n console.log(values)\r\n setLoading(true)\r\n setTimeout(() => {\r\n axios({\r\n ...axioDefaultConfig,\r\n method: 'post',\r\n url: process.env.REACT_APP_BACKEND_API + '/api/accounts/ResetPasswordConfirm',\r\n data: values,\r\n })\r\n .then(function (response) {\r\n if (response?.data?.token !== '' && response?.data?.token !== null) {\r\n setTempToken(response?.data?.token)\r\n setTimeout(() => {\r\n axios({\r\n ...axioDefaultConfig,\r\n method: 'post',\r\n url: process.env.REACT_APP_BACKEND_API + '/api/accounts/token',\r\n data: values,\r\n }).then(function (response) {\r\n if (response?.data?.token !== '' && response?.data?.token !== null) {\r\n values.token = response?.data?.token\r\n setTempToken(response?.data?.token)\r\n dispatch({\r\n type: 'SET_USER',\r\n user: response?.data?.user,\r\n })\r\n dispatch({\r\n type: 'SET_TOKEN',\r\n token: values.token,\r\n })\r\n //history.push('/facility/' + response?.data?.user.facility)\r\n return\r\n } else {\r\n setLoading(false)\r\n setSubmitting(false)\r\n setStatus(response.data.message)\r\n }\r\n })\r\n .catch(function (error) {\r\n setLoading(false)\r\n setSubmitting(false)\r\n setStatus('The login detail is incorrect')\r\n })\r\n }, 1000)\r\n\r\n // dispatch(auth.actions.login(response?.data?.token))\r\n // dispatch(auth.actions.setUser(response?.data))\r\n } else {\r\n setLoading(false);\r\n setSubmitting(false)\r\n setStatus(response.data.message)\r\n }\r\n })\r\n .catch(function (error) {\r\n setLoading(false)\r\n setSubmitting(false)\r\n setStatus('The login detail is incorrect')\r\n })\r\n }, 1000)\r\n },\r\n })\r\n\r\n return (\r\n \r\n {/* begin::Heading */}\r\n
\r\n {/* begin::Title */}\r\n

Confirm your registration

\r\n\r\n
\r\n\r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n {formik.status && (\r\n
\r\n
{formik.status}
\r\n
\r\n )}\r\n\r\n {/* begin::Form group Firstname */}\r\n\r\n {/* end::Form group */}\r\n\r\n {/* begin::Form group Email */}\r\n
\r\n \r\n \r\n {formik.touched.email && formik.errors.email && (\r\n
\r\n
\r\n {formik.errors.email}\r\n
\r\n
\r\n )}\r\n
\r\n {/* end::Form group */}\r\n\r\n {/* begin::Form group Password */}\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n {formik.touched.password && formik.errors.password && (\r\n
\r\n
\r\n {formik.errors.password}\r\n
\r\n
\r\n )}\r\n
\r\n
\r\n
\r\n {/* end::Form group */}\r\n\r\n {/* begin::Form group Confirm password */}\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n {formik.touched.changepassword && formik.errors.changepassword && (\r\n
\r\n
\r\n {formik.errors.changepassword}\r\n
\r\n
\r\n )}\r\n
\r\n {/* end::Form group */}\r\n\r\n {/* begin::Form group */}\r\n {/*
\r\n
\r\n \r\n \r\n I Agree the{' '}\r\n \r\n terms and conditions\r\n \r\n .\r\n \r\n {formik.touched.acceptTerms && formik.errors.acceptTerms && (\r\n
\r\n
\r\n {formik.errors.acceptTerms}\r\n
\r\n
\r\n )}\r\n
\r\n
*/}\r\n {/* end::Form group */}\r\n\r\n {/* begin::Form group */}\r\n
\r\n \r\n {!loading && Submit}\r\n {loading && (\r\n \r\n Please wait...{' '}\r\n \r\n \r\n )}\r\n \r\n {/* \r\n \r\n Cancel\r\n \r\n */}\r\n
\r\n {/* end::Form group */}\r\n \r\n )\r\n}\r\n\r\n","import React, { useState } from 'react'\r\nimport * as Yup from 'yup'\r\nimport clsx from 'clsx'\r\nimport { Link } from 'react-router-dom'\r\nimport { useFormik } from 'formik'\r\nimport { requestPassword } from '../redux/AuthCRUD'\r\nimport { axioDefaultConfig } from '../../../../app/ui/common/commonResource'\r\nimport axios from 'axios'\r\n\r\nconst initialValues = {\r\n email: '',\r\n}\r\n\r\nconst forgotPasswordSchema = Yup.object().shape({\r\n email: Yup.string()\r\n .email('Wrong email format')\r\n .min(3, 'Minimum 3 symbols')\r\n .max(50, 'Maximum 50 symbols')\r\n .required('Email is required'),\r\n})\r\n\r\nexport function ForgotPassword() {\r\n\r\n const [isSubmitting, setSubmitting] = useState(false)\r\n const [hasErrors, setHasErrors] = useState(undefined)\r\n const formik = useFormik({\r\n\r\n initialValues,\r\n validationSchema: forgotPasswordSchema,\r\n onSubmit: (values, { setStatus }) => {\r\n setSubmitting(true)\r\n setHasErrors(undefined)\r\n setTimeout(() => {\r\n\r\n\r\n console.log(values)\r\n axios({\r\n ...axioDefaultConfig,\r\n method: 'post',\r\n url: process.env.REACT_APP_BACKEND_API + '/api/accounts/ForgetPassword',\r\n data: values,\r\n })\r\n .then(function (response) {\r\n console.log(response);\r\n\r\n if (response?.data?.token !== '' && response?.data?.token !== null) {\r\n\r\n // setTempToken(response?.data?.token)\r\n setHasErrors(false)\r\n // setLoading(false)\r\n // setSubmitting(false)\r\n setStatus(response?.data.text)\r\n setSubmitting(false)\r\n\r\n // dispatch(auth.actions.login(response?.data?.token))\r\n // dispatch(auth.actions.setUser(response?.data))\r\n } else {\r\n\r\n setSubmitting(false)\r\n setStatus(response.data.message)\r\n }\r\n })\r\n .catch(() => {\r\n setHasErrors(true)\r\n setSubmitting(false)\r\n setStatus('The login detail is incorrect')\r\n })\r\n }, 1000)\r\n\r\n },\r\n })\r\n\r\n\r\n return (\r\n <>\r\n \r\n
\r\n {/* begin::Title */}\r\n

Forgot Password ?

\r\n {/* end::Title */}\r\n\r\n {/* begin::Link */}\r\n
Enter your email to reset your password.
\r\n {/* end::Link */}\r\n
\r\n\r\n {/* begin::Title */}\r\n {hasErrors === true && (\r\n
\r\n
\r\n Sorry, looks like there are some errors detected, please try again.\r\n
\r\n
\r\n )}\r\n\r\n {hasErrors === false && (\r\n
\r\n
Password reset request was sent successfully. Please check your email to reset your password
\r\n
\r\n )}\r\n {/* end::Title */}\r\n\r\n {/* begin::Form group */}\r\n
\r\n \r\n \r\n {formik.touched.email && formik.errors.email && (\r\n
\r\n
\r\n {formik.errors.email}\r\n
\r\n
\r\n )}\r\n
\r\n {/* end::Form group */}\r\n\r\n {/* begin::Form group */}\r\n
\r\n \r\n \r\n \r\n Cancel\r\n \r\n {' '}\r\n
\r\n {/*
\r\n \r\n Submit\r\n {isSubmitting && (\r\n \r\n Please wait...\r\n \r\n \r\n )}\r\n \r\n \r\n \r\n Cancel\r\n \r\n {' '}\r\n
*/}\r\n {/* end::Form group */}\r\n \r\n \r\n )\r\n}\r\n","import axios from 'axios'\r\nimport {AuthModel} from '../models/AuthModel'\r\nimport {UserModel} from '../models/UserModel'\r\n\r\nconst API_URL = process.env.REACT_APP_API_URL || 'api'\r\n\r\nexport const GET_USER_BY_ACCESSTOKEN_URL = `${API_URL}/auth/get-user`\r\nexport const LOGIN_URL = `${API_URL}/auth/login`\r\nexport const REGISTER_URL = `${API_URL}/auth/register`\r\nexport const REQUEST_PASSWORD_URL = `${API_URL}/auth/forgot-password`\r\n\r\n// Server should return AuthModel\r\nexport function login(UserName: string, Password: string) {\r\n return axios.post('http://13.233.53.129:5000/api/users/login/0', {\"UserName\":UserName, \"Password\":Password})\r\n}\r\n\r\n// Server should return AuthModel\r\nexport function register(email: string, firstname: string, lastname: string, password: string) {\r\n return axios.post(REGISTER_URL, {\r\n email,\r\n firstname,\r\n lastname,\r\n password,\r\n })\r\n}\r\n\r\n// Server should return object => { result: boolean } (Is Email in DB)\r\nexport function requestPassword(email: string) {\r\n return axios.post<{result: boolean}>(REQUEST_PASSWORD_URL, {email})\r\n}\r\n\r\nexport function getUserByToken() {\r\n // Authorization head should be fulfilled in interceptor.\r\n // Check common redux folder => setupAxios\r\n console.log(\"Get User Infomations\")\r\n return {data : ({firstname:'gevan'}) }; // axios.get(GET_USER_BY_ACCESSTOKEN_URL)\r\n}\r\n","import {Action} from '@reduxjs/toolkit'\r\nimport {persistReducer} from 'redux-persist'\r\nimport storage from 'redux-persist/lib/storage'\r\nimport {put, takeLatest} from 'redux-saga/effects'\r\nimport {UserModel} from '../models/UserModel'\r\nimport {getUserByToken} from './AuthCRUD'\r\n\r\nexport interface ActionWithPayload extends Action {\r\n payload?: T\r\n}\r\n\r\nexport const actionTypes = {\r\n Login: '[Login] Action',\r\n Logout: '[Logout] Action',\r\n Register: '[Register] Action',\r\n UserRequested: '[Request User] Action',\r\n UserLoaded: '[Load User] Auth API',\r\n SetUser: '[Set User] Action',\r\n}\r\n\r\nconst initialAuthState: IAuthState = {\r\n user: undefined,\r\n accessToken: undefined,\r\n}\r\n\r\nexport interface IAuthState {\r\n user?: UserModel\r\n accessToken?: string\r\n}\r\n\r\nexport const reducer = persistReducer(\r\n {storage, key: 'v100-demo1-auth', whitelist: ['user', 'accessToken']},\r\n (state: IAuthState = initialAuthState, action: ActionWithPayload) => {\r\n switch (action.type) {\r\n case actionTypes.Login: {\r\n const accessToken = action.payload?.accessToken\r\n return {accessToken, user: undefined}\r\n }\r\n\r\n case actionTypes.Register: {\r\n const accessToken = action.payload?.accessToken\r\n return {accessToken, user: undefined}\r\n }\r\n\r\n case actionTypes.Logout: {\r\n return initialAuthState\r\n }\r\n\r\n case actionTypes.UserRequested: {\r\n return {...state, user: undefined}\r\n }\r\n\r\n case actionTypes.UserLoaded: {\r\n const user = action.payload?.user\r\n return {...state, user}\r\n }\r\n\r\n case actionTypes.SetUser: {\r\n const user = action.payload?.user\r\n return {...state, user}\r\n }\r\n\r\n default:\r\n return state\r\n }\r\n }\r\n)\r\n\r\nexport const actions = {\r\n login: (accessToken: string) => ({type: actionTypes.Login, payload: {accessToken}}),\r\n register: (accessToken: string) => ({\r\n type: actionTypes.Register,\r\n payload: {accessToken},\r\n }),\r\n logout: () => ({type: actionTypes.Logout}),\r\n requestUser: () => ({\r\n type: actionTypes.UserRequested,\r\n }),\r\n fulfillUser: (user: UserModel) => ({type: actionTypes.UserLoaded, payload: {user}}),\r\n setUser: (user: UserModel) => ({type: actionTypes.SetUser, payload: {user}}),\r\n}\r\n\r\nexport function* saga() {\r\n yield takeLatest(actionTypes.Login, function* loginSaga() {\r\n yield put(actions.requestUser())\r\n })\r\n\r\n yield takeLatest(actionTypes.Register, function* registerSaga() {\r\n yield put(actions.requestUser())\r\n })\r\n\r\n yield takeLatest(actionTypes.UserRequested, function* userRequested() {\r\n\t console.log(\"aaa\");\r\n const {data: user} = yield getUserByToken()\r\n yield put(actions.fulfillUser(user))\r\n })\r\n}\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, {useState} from 'react'\r\nimport {useHistory} from 'react-router-dom'\r\nimport {useDispatch} from 'react-redux'\r\nimport * as Yup from 'yup'\r\nimport clsx from 'clsx'\r\nimport {Link} from 'react-router-dom'\r\nimport {useFormik} from 'formik'\r\nimport * as auth from '../redux/AuthRedux'\r\nimport {login} from '../redux/AuthCRUD'\r\nimport {KTSVG, toAbsoluteUrl} from '../../../../_metronic/helpers'\r\n\r\nimport {useDataLayerValue} from '../../../../DataLayer'\r\nimport axios from 'axios'\r\nimport {axioDefaultConfig} from '../../../ui/common/commonResource2'\r\nimport {stat} from 'fs'\r\n\r\nconst loginSchema = Yup.object().shape({\r\n email: Yup.string()\r\n .email('Wrong email format')\r\n .min(3, 'Minimum 3 symbols')\r\n .max(50, 'Maximum 50 symbols')\r\n .required('Email is required'),\r\n password: Yup.string()\r\n .min(3, 'Minimum 3 symbols')\r\n .max(50, 'Maximum 50 symbols')\r\n .required('Password is required'),\r\n})\r\n\r\nconst initialValues = {\r\n email: '',\r\n password: '',\r\n _token: '',\r\n}\r\n\r\nexport function Login(props) {\r\n console.log('test')\r\n const history = useHistory()\r\n const [loading, setLoading] = useState(false)\r\n const [{token}, dispatch] = useDataLayerValue()\r\n const [tempToken, setTempToken] = useState('')\r\n const formik = useFormik({\r\n initialValues,\r\n validationSchema: loginSchema,\r\n onSubmit: (values, {setStatus, setSubmitting}) => {\r\n setLoading(true)\r\n //console.log('asaa')\r\n //setTimeout(() => {\r\n axios({\r\n ...axioDefaultConfig,\r\n method: 'post',\r\n url: process.env.REACT_APP_BACKEND_API + '/api/accounts/token',\r\n data: values,\r\n })\r\n .then(function (response) {\r\n if (response?.data?.token !== '' && response?.data?.token !== null) {\r\n values._token = response?.data?.token\r\n setTempToken(response?.data?.token)\r\n dispatch({\r\n type: 'SET_USER',\r\n user: response?.data?.user,\r\n })\r\n dispatch({\r\n type: 'SET_TOKEN',\r\n token: values._token,\r\n })\r\n if (response?.data?.user.isEndNode) {\r\n if (window.location.hostname.toLowerCase() === 'portal.smartgas.biz') {\r\n history.push('/facility-detail2/' + response?.data?.user.facility)\r\n } else {\r\n history.push('/facility-detail/' + response?.data?.user.facility)\r\n }\r\n } else {\r\n history.push('/facility/' + response?.data?.user.facility)\r\n }\r\n // Redirect to new page\r\n //history.push('/facility/' + response?.data?.user.facility)\r\n return\r\n } else {\r\n setLoading(false)\r\n setSubmitting(false)\r\n setStatus(response.data.message)\r\n }\r\n })\r\n .catch(function (error) {\r\n console.log('asaa')\r\n setLoading(false)\r\n setSubmitting(false)\r\n setStatus('The login detail is incorrect')\r\n })\r\n // }, 5000)\r\n },\r\n })\r\n\r\n var content = 'INDUSRTYX'\r\n if (window.location.hostname.toLowerCase() === 'e2eq.lk') {\r\n content = 'E2EQ'\r\n }\r\n if (window.location.hostname.toLowerCase() === 'portal.smartgas.biz') {\r\n content = 'SMARTGAS'\r\n }\r\n\r\n return (\r\n \r\n {content === 'INDUSRTYX' && (\r\n
\r\n \r\n
\r\n )}\r\n\r\n {content === 'E2EQ' && (\r\n
\r\n Footer\r\n
\r\n )}\r\n\r\n {content === 'SMARTGAS' && (\r\n
\r\n \r\n
\r\n )}\r\n\r\n {/* begin::Form group */}\r\n
\r\n \r\n \r\n {formik.touched.email && formik.errors.email && (\r\n
\r\n {formik.errors.email}\r\n
\r\n )}\r\n
\r\n {/* end::Form group */}\r\n\r\n {/* begin::Form group */}\r\n
\r\n \r\n \r\n {formik.touched.password && formik.errors.password && (\r\n
\r\n
\r\n {formik.errors.password}\r\n
\r\n
\r\n )}\r\n
\r\n {/* end::Form group */}\r\n\r\n {/* begin::Wrapper */}\r\n
\r\n
\r\n\r\n {/* begin::Link */}\r\n \r\n Forgot Password ?\r\n \r\n {/* end::Link */}\r\n
\r\n {/* end::Wrapper */}\r\n\r\n {/* begin::Action */}\r\n
\r\n \r\n {!loading && (\r\n \r\n Continue   \r\n \r\n \r\n )}\r\n {loading && (\r\n \r\n Please wait...\r\n \r\n \r\n )}\r\n \r\n
\r\n {/* end::Action \r\n\r\n
\r\n Not a Member yet?{' '}\r\n \r\n Sign up\r\n \r\n
*/}\r\n\r\n {content === 'E2EQ' && (\r\n
\r\n
\r\n Footer\r\n
\r\n )}\r\n {/* {content === 'SMARTGAS' && (\r\n
\r\n
\r\n Footer\r\n
\r\n )} */}\r\n\r\n {content === 'INDUSTRYX' && (\r\n
\r\n
\r\n Footer\r\n
\r\n )}\r\n \r\n )\r\n\r\n return (\r\n
\r\n {/* begin::Heading */}\r\n\r\n
\r\n

industryX IOT

\r\n
\r\n {/* begin::Heading\r\n */}\r\n {formik.status ? (\r\n
\r\n
{formik.status}
\r\n
\r\n ) : (\r\n
\r\n )}\r\n\r\n {/* begin::Form group */}\r\n
\r\n \r\n \r\n {formik.touched.email && formik.errors.email && (\r\n
\r\n {formik.errors.email}\r\n
\r\n )}\r\n
\r\n {/* end::Form group */}\r\n\r\n {/* begin::Form group */}\r\n
\r\n
\r\n
\r\n {/* begin::Label */}\r\n \r\n {/* end::Label */}\r\n {/* begin::Link */}\r\n\r\n {/* end::Link */}\r\n
\r\n
\r\n \r\n {formik.touched.password && formik.errors.password && (\r\n
\r\n
\r\n {formik.errors.password}\r\n
\r\n
\r\n )}\r\n
\r\n {/* end::Form group */}\r\n\r\n {/* begin::Action */}\r\n
\r\n \r\n {!loading && Continue}\r\n {loading && (\r\n \r\n Please wait...\r\n \r\n \r\n )}\r\n \r\n
\r\n {/* end::Action */}\r\n \r\n
\r\n )\r\n}\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, { useEffect, useState } from 'react'\r\nimport { Redirect, Route, Switch } from 'react-router-dom'\r\nimport { Registration } from './components/Registration'\r\nimport { ForgotPassword } from './components/ForgotPassword'\r\nimport { Login } from './components/Login'\r\nimport { toAbsoluteUrl } from '../../../_metronic/helpers'\r\n\r\n\r\nexport function AuthPage() {\r\n useEffect(() => {\r\n const root = document.getElementById('root')\r\n if (root) {\r\n root.style.height = '100%'\r\n }\r\n return () => {\r\n if (root) {\r\n root.style.height = 'auto'\r\n }\r\n }\r\n }, [])\r\n\r\n const [backgroundImage, setBackgroundImage] = useState('');\r\n\r\n useEffect(() => {\r\n // Array of background image URLs\r\n var backgroundImages = [\r\n\r\n toAbsoluteUrl('/media/bg/industryx/1.jpg'),\r\n toAbsoluteUrl('/media/bg/industryx/2.jpg'),\r\n toAbsoluteUrl('/media/bg/industryx/3.jpg'),\r\n toAbsoluteUrl('/media/bg/industryx/4.jpg'),\r\n toAbsoluteUrl('/media/bg/industryx/5.jpg'),\r\n toAbsoluteUrl('/media/bg/industryx/6.jpg'),\r\n\r\n ];\r\n\r\n var content = 'INDUSRTYX'\r\n if (window.location.hostname.toLowerCase() === 'e2eq.lk') {\r\n backgroundImages = [\r\n\r\n toAbsoluteUrl('/media/bg/e2eq/1.jpg'),\r\n toAbsoluteUrl('/media/bg/e2eq/2.jpg'),\r\n toAbsoluteUrl('/media/bg/e2eq/3.jpg'),\r\n toAbsoluteUrl('/media/bg/e2eq/4.jpg'),\r\n toAbsoluteUrl('/media/bg/e2eq/5.jpg'),\r\n toAbsoluteUrl('/media/bg/e2eq/6.jpg'),\r\n\r\n ];\r\n }\r\n if (window.location.hostname.toLowerCase() === 'portal.smartgas.biz') {\r\n backgroundImages = [\r\n\r\n toAbsoluteUrl('/media/bg/smartgas/1.jpg'),\r\n toAbsoluteUrl('/media/bg/smartgas/2.jpg'),\r\n toAbsoluteUrl('/media/bg/smartgas/3.jpg'),\r\n toAbsoluteUrl('/media/bg/smartgas/4.jpg'),\r\n toAbsoluteUrl('/media/bg/smartgas/5.jpg'),\r\n toAbsoluteUrl('/media/bg/smartgas/6.jpg'),\r\n\r\n ];\r\n }\r\n // Generate a random index to select a background image from the array\r\n const randomIndex = Math.floor(Math.random() * backgroundImages.length);\r\n\r\n // Set the selected background image URL\r\n setBackgroundImage(backgroundImages[randomIndex]);\r\n }, []);\r\n\r\n return (\r\n\r\n
\r\n {/* begin::Body */}\r\n
\r\n {/* begin::Form */}\r\n
\r\n {/* begin::Wrapper */}\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {/* end::Wrapper */}\r\n
\r\n {/* end::Form */}\r\n\r\n {/* begin::Footer */}\r\n
\r\n {/* begin::Links */}\r\n
\r\n\r\n\r\n
\r\n {new Date().getFullYear()} © \r\n \r\n \r\n
\r\n\r\n
\r\n {/* end::Links */}\r\n
\r\n {/* end::Footer */}\r\n
\r\n {/* end::Body */}\r\n\r\n {/* begin::Aside */}\r\n \r\n {/* begin::Content */}\r\n\r\n {/* end::Content */}\r\n
\r\n {/* end::Aside */}\r\n
\r\n )\r\n}\r\n\r\n","import {toAbsoluteUrl} from '../../../../_metronic/helpers'\r\nimport {UserModel} from '../models/UserModel'\r\n\r\nexport class UsersTableMock {\r\n public static table: Array = [\r\n {\r\n id: 1,\r\n username: 'admin',\r\n password: 'demo',\r\n email: 'admin@demo.com',\r\n auth: {\r\n accessToken: 'access-token-8f3ae836da744329a6f93bf20594b5cc',\r\n refreshToken: 'access-token-f8c137a2c98743f48b643e71161d90aa',\r\n },\r\n roles: [1], // Administrator\r\n pic: toAbsoluteUrl('/media/avatars/150-2.jpg'),\r\n fullname: 'Sean S',\r\n firstname: 'Sean',\r\n lastname: 'Stark',\r\n occupation: 'CEO',\r\n companyName: 'Keenthemes',\r\n phone: '456669067890',\r\n language: 'en',\r\n timeZone: 'International Date Line West',\r\n website: 'https://keenthemes.com',\r\n emailSettings: {\r\n emailNotification: true,\r\n sendCopyToPersonalEmail: false,\r\n activityRelatesEmail: {\r\n youHaveNewNotifications: false,\r\n youAreSentADirectMessage: false,\r\n someoneAddsYouAsAsAConnection: true,\r\n uponNewOrder: false,\r\n newMembershipApproval: false,\r\n memberRegistration: true,\r\n },\r\n updatesFromKeenthemes: {\r\n newsAboutKeenthemesProductsAndFeatureUpdates: false,\r\n tipsOnGettingMoreOutOfKeen: false,\r\n thingsYouMissedSindeYouLastLoggedIntoKeen: true,\r\n newsAboutStartOnPartnerProductsAndOtherServices: true,\r\n tipsOnStartBusinessProducts: true,\r\n },\r\n },\r\n communication: {\r\n email: true,\r\n sms: true,\r\n phone: false,\r\n },\r\n address: {\r\n addressLine: 'L-12-20 Vertex, Cybersquare',\r\n city: 'San Francisco',\r\n state: 'California',\r\n postCode: '45000',\r\n },\r\n socialNetworks: {\r\n linkedIn: 'https://linkedin.com/admin',\r\n facebook: 'https://facebook.com/admin',\r\n twitter: 'https://twitter.com/admin',\r\n instagram: 'https://instagram.com/admin',\r\n },\r\n },\r\n {\r\n id: 2,\r\n username: 'user',\r\n password: 'demo',\r\n email: 'user@demo.com',\r\n auth: {\r\n accessToken: 'access-token-6829bba69dd3421d8762-991e9e806dbf',\r\n refreshToken: 'access-token-f8e4c61a318e4d618b6c199ef96b9e55',\r\n },\r\n roles: [2], // Manager\r\n pic: toAbsoluteUrl('/media/avatars/150-1.jpg'),\r\n fullname: 'Megan F',\r\n firstname: 'Megan',\r\n lastname: 'Fox',\r\n occupation: 'Deputy Head of Keenthemes in New York office',\r\n companyName: 'Keenthemes',\r\n phone: '456669067891',\r\n language: 'en',\r\n timeZone: 'International Date Line West',\r\n communication: {\r\n email: true,\r\n sms: true,\r\n phone: false,\r\n },\r\n emailSettings: {\r\n emailNotification: true,\r\n sendCopyToPersonalEmail: false,\r\n activityRelatesEmail: {\r\n youHaveNewNotifications: false,\r\n youAreSentADirectMessage: false,\r\n someoneAddsYouAsAsAConnection: true,\r\n uponNewOrder: false,\r\n newMembershipApproval: false,\r\n memberRegistration: true,\r\n },\r\n updatesFromKeenthemes: {\r\n newsAboutKeenthemesProductsAndFeatureUpdates: false,\r\n tipsOnGettingMoreOutOfKeen: false,\r\n thingsYouMissedSindeYouLastLoggedIntoKeen: true,\r\n newsAboutStartOnPartnerProductsAndOtherServices: true,\r\n tipsOnStartBusinessProducts: true,\r\n },\r\n },\r\n address: {\r\n addressLine: '3487 Ingram Road',\r\n city: 'Greensboro',\r\n state: 'North Carolina',\r\n postCode: '27409',\r\n },\r\n socialNetworks: {\r\n linkedIn: 'https://linkedin.com/user',\r\n facebook: 'https://facebook.com/user',\r\n twitter: 'https://twitter.com/user',\r\n instagram: 'https://instagram.com/user',\r\n },\r\n },\r\n {\r\n id: 3,\r\n username: 'guest',\r\n password: 'demo',\r\n email: 'guest@demo.com',\r\n auth: {\r\n accessToken: 'access-token-d2dff7b82f784de584b60964abbe45b9',\r\n refreshToken: 'access-token-c999ccfe74aa40d0aa1a64c5e620c1a5',\r\n },\r\n roles: [3], // Guest\r\n pic: toAbsoluteUrl('/media/avatars/150-5.jpg'),\r\n fullname: 'Manu G',\r\n firstname: 'Manu',\r\n lastname: 'Ginobili',\r\n occupation: 'CFO',\r\n companyName: 'Keenthemes',\r\n phone: '456669067892',\r\n language: 'en',\r\n timeZone: 'International Date Line West',\r\n communication: {\r\n email: true,\r\n sms: true,\r\n phone: false,\r\n },\r\n emailSettings: {\r\n emailNotification: true,\r\n sendCopyToPersonalEmail: false,\r\n activityRelatesEmail: {\r\n youHaveNewNotifications: false,\r\n youAreSentADirectMessage: false,\r\n someoneAddsYouAsAsAConnection: true,\r\n uponNewOrder: false,\r\n newMembershipApproval: false,\r\n memberRegistration: true,\r\n },\r\n updatesFromKeenthemes: {\r\n newsAboutKeenthemesProductsAndFeatureUpdates: false,\r\n tipsOnGettingMoreOutOfKeen: false,\r\n thingsYouMissedSindeYouLastLoggedIntoKeen: true,\r\n newsAboutStartOnPartnerProductsAndOtherServices: true,\r\n tipsOnStartBusinessProducts: true,\r\n },\r\n },\r\n address: {\r\n addressLine: '1467 Griffin Street',\r\n city: 'Phoenix',\r\n state: 'Arizona',\r\n postCode: '85012',\r\n },\r\n socialNetworks: {\r\n linkedIn: 'https://linkedin.com/guest',\r\n facebook: 'https://facebook.com/guest',\r\n twitter: 'https://twitter.com/guest',\r\n instagram: 'https://instagram.com/guest',\r\n },\r\n },\r\n ]\r\n}\r\n","import React, {useEffect} from 'react'\r\nimport {useDispatch} from 'react-redux'\r\nimport {Redirect, Switch} from 'react-router-dom'\r\nimport * as auth from './redux/AuthRedux'\r\n\r\nexport function Logout() {\r\n const dispatch = useDispatch()\r\n useEffect(() => {\r\n dispatch(auth.actions.logout())\r\n document.location.reload()\r\n }, [dispatch])\r\n\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\n","import {FC, useRef, useEffect, useState} from 'react'\r\nimport {shallowEqual, useSelector, connect, useDispatch, ConnectedProps} from 'react-redux'\r\nimport {LayoutSplashScreen} from '../../../../_metronic/layout/core'\r\nimport * as auth from './AuthRedux'\r\nimport {getUserByToken} from './AuthCRUD'\r\nimport {RootState} from '../../../../setup'\r\n\r\nconst mapState = (state: RootState) => ({auth: state.auth})\r\nconst connector = connect(mapState, auth.actions)\r\ntype PropsFromRedux = ConnectedProps\r\n\r\nconst AuthInit: FC = (props) => {\r\n const didRequest = useRef(false)\r\n const dispatch = useDispatch()\r\n const [showSplashScreen, setShowSplashScreen] = useState(true)\r\n const accessToken = useSelector(({auth}) => auth.accessToken, shallowEqual)\r\n\r\n // We should request user by authToken before rendering the application\r\n useEffect(() => {\r\n const requestUser = async () => {\r\n try {\r\n\t\tconsole.log(\"bbb\");\r\n if (!didRequest.current) {\r\n const {data: user} = await getUserByToken()\r\n dispatch(props.fulfillUser(user))\r\n }\r\n } catch (error) {\r\n console.error(error)\r\n if (!didRequest.current) {\r\n dispatch(props.logout())\r\n }\r\n } finally {\r\n setShowSplashScreen(false)\r\n }\r\n\r\n return () => (didRequest.current = true)\r\n }\r\n\r\n if (accessToken) {\r\n requestUser()\r\n } else {\r\n dispatch(props.logout())\r\n setShowSplashScreen(false)\r\n }\r\n // eslint-disable-next-line\r\n }, [])\r\n\r\n return showSplashScreen ? : <>{props.children}\r\n}\r\n\r\nexport default connector(AuthInit)\r\n","import {all} from 'redux-saga/effects'\r\nimport {combineReducers} from 'redux'\r\n\r\nimport * as auth from '../../app/modules/auth'\r\n\r\nexport const rootReducer = combineReducers({\r\n auth: auth.reducer,\r\n})\r\n\r\nexport type RootState = ReturnType\r\n\r\nexport function* rootSaga() {\r\n yield all([auth.saga()])\r\n}\r\n","import {configureStore, getDefaultMiddleware} from '@reduxjs/toolkit'\r\nimport createSagaMiddleware from 'redux-saga'\r\nimport {reduxBatch} from '@manaflair/redux-batch'\r\nimport {persistStore} from 'redux-persist'\r\nimport {rootReducer, rootSaga} from './RootReducer'\r\n\r\nconst sagaMiddleware = createSagaMiddleware()\r\nconst middleware = [\r\n ...getDefaultMiddleware({\r\n immutableCheck: false,\r\n serializableCheck: false,\r\n thunk: true,\r\n }),\r\n sagaMiddleware,\r\n]\r\n\r\nconst store = configureStore({\r\n reducer: rootReducer,\r\n middleware,\r\n devTools: process.env.NODE_ENV !== 'production',\r\n enhancers: [reduxBatch],\r\n})\r\n\r\nexport type AppDispatch = typeof store.dispatch\r\n\r\n/**\r\n * @see https://github.com/rt2zz/redux-persist#persiststorestore-config-callback\r\n * @see https://github.com/rt2zz/redux-persist#persistor-object\r\n */\r\nexport const persistor = persistStore(store)\r\n\r\nsagaMiddleware.run(rootSaga)\r\n\r\nexport default store\r\n","const loadState = () => {\r\n try {\r\n const serializedState = localStorage.getItem('state')\r\n if (serializedState === null) {\r\n return {\r\n user: null,\r\n token: null,\r\n isLogged: false,\r\n }\r\n }\r\n return JSON.parse(serializedState)\r\n } catch (e) {\r\n return undefined\r\n }\r\n}\r\n\r\nconst saveState = (state) => {\r\n try {\r\n const serializedState = JSON.stringify(state)\r\n localStorage.setItem('state', serializedState)\r\n } catch (e) {\r\n // Ignore write errors;\r\n }\r\n}\r\n\r\nexport const initialState = loadState()\r\n\r\nconst reducer = (state, action) => {\r\n console.log(action)\r\n\r\n switch (action.type) {\r\n case 'SET_USER':\r\n return {\r\n ...state,\r\n user: action.user,\r\n }\r\n case 'SET_TOKEN':\r\n saveState({\r\n ...state,\r\n token: action.token,\r\n })\r\n return {\r\n ...state,\r\n token: action.token,\r\n }\r\n default:\r\n return state\r\n }\r\n}\r\n\r\nexport default reducer\r\n","import React, {FC, createContext, useContext} from 'react'\r\n\r\nconst I18N_CONFIG_KEY = process.env.REACT_APP_I18N_CONFIG_KEY || 'i18nConfig'\r\n\r\ntype Props = {\r\n selectedLang: 'de' | 'en' | 'es' | 'fr' | 'ja' | 'zh'\r\n}\r\nconst initialState: Props = {\r\n selectedLang: 'en',\r\n}\r\n\r\nfunction getConfig(): Props {\r\n const ls = localStorage.getItem(I18N_CONFIG_KEY)\r\n if (ls) {\r\n try {\r\n return JSON.parse(ls) as Props\r\n } catch (er) {\r\n console.error(er)\r\n }\r\n }\r\n return initialState\r\n}\r\n\r\n// Side effect\r\nexport function setLanguage(lang: string) {\r\n localStorage.setItem(I18N_CONFIG_KEY, JSON.stringify({selectedLang: lang}))\r\n window.location.reload()\r\n}\r\n\r\nconst I18nContext = createContext(initialState)\r\n\r\nconst useLang = () => {\r\n return useContext(I18nContext).selectedLang\r\n}\r\n\r\nconst MetronicI18nProvider: FC = ({children}) => {\r\n const lang = getConfig()\r\n return {children}\r\n}\r\n\r\nexport {MetronicI18nProvider, useLang}\r\n","import {FC} from 'react'\r\nimport {useLang} from './Metronici18n'\r\nimport {IntlProvider} from 'react-intl'\r\nimport '@formatjs/intl-relativetimeformat/polyfill'\r\nimport '@formatjs/intl-relativetimeformat/locale-data/en'\r\nimport '@formatjs/intl-relativetimeformat/locale-data/de'\r\nimport '@formatjs/intl-relativetimeformat/locale-data/es'\r\nimport '@formatjs/intl-relativetimeformat/locale-data/fr'\r\nimport '@formatjs/intl-relativetimeformat/locale-data/ja'\r\nimport '@formatjs/intl-relativetimeformat/locale-data/zh'\r\n\r\nimport deMessages from './messages/de.json'\r\nimport enMessages from './messages/en.json'\r\nimport esMessages from './messages/es.json'\r\nimport frMessages from './messages/fr.json'\r\nimport jaMessages from './messages/ja.json'\r\nimport zhMessages from './messages/zh.json'\r\n\r\nconst allMessages = {\r\n de: deMessages,\r\n en: enMessages,\r\n es: esMessages,\r\n fr: frMessages,\r\n ja: jaMessages,\r\n zh: zhMessages,\r\n}\r\n\r\nconst I18nProvider: FC = ({children}) => {\r\n const locale = useLang()\r\n const messages = allMessages[locale]\r\n\r\n return (\r\n \r\n {children}\r\n \r\n )\r\n}\r\n\r\nexport {I18nProvider}\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport clsx from 'clsx'\r\nimport React, { FC } from 'react'\r\nimport { KTSVG } from '../../../helpers'\r\nimport { useLayout } from '../../core'\r\nimport { usePageData } from '../../core/PageData'\r\nimport { DefaultTitle } from '../header/page-title/DefaultTitle'\r\n\r\nconst Toolbar1: FC = () => {\r\n const { pageTitle, pageDescription, pageBreadcrumbs, pageCode } = usePageData()\r\n const { classes } = useLayout()\r\n\r\n return (\r\n
\r\n {/* begin::Container */}\r\n \r\n \r\n\r\n {/* begin::Actions */}\r\n
\r\n {/* begin::Wrapper */}\r\n
\r\n {/* begin::Menu */}\r\n {/* \r\n \r\n Filter\r\n \r\n\r\n end::Menu */}\r\n
\r\n {/* end::Wrapper */}\r\n\r\n {/* begin::Button */}\r\n {(pageCode != '') &&\r\n \r\n View Layout\r\n }\r\n {/* end::Button */}\r\n
\r\n {/* end::Actions */}\r\n
\r\n {/* end::Container */}\r\n \r\n )\r\n}\r\n\r\nexport { Toolbar1 }\r\n","import React from 'react'\r\nimport {useLayout} from '../../core/LayoutProvider'\r\nimport {Toolbar1} from './Toolbar1'\r\n\r\nconst Toolbar = () => {\r\n const {config} = useLayout()\r\n\r\n switch (config.toolbar.layout) {\r\n case 'toolbar1':\r\n return \r\n\r\n default:\r\n return \r\n }\r\n}\r\n\r\nexport {Toolbar}\r\n","import React, {useEffect, useRef} from 'react'\r\nimport {useLocation} from 'react-router-dom'\r\nimport {\r\n // ScrollComponent,\r\n ScrollTopComponent,\r\n MenuComponent,\r\n DrawerComponent,\r\n ToggleComponent,\r\n StickyComponent,\r\n} from '../../assets/ts/components'\r\nimport {KTSVG} from '../../helpers'\r\n\r\nexport function ScrollTop() {\r\n const {pathname} = useLocation()\r\n const isFirstRun = useRef(true)\r\n\r\n const pluginsReinitialization = () => {\r\n setTimeout(() => {\r\n // ScrollTopComponent.reinitialization()\r\n MenuComponent.reinitialization()\r\n StickyComponent.reInitialization()\r\n setTimeout(() => {\r\n ToggleComponent.reinitialization()\r\n DrawerComponent.reinitialization()\r\n // ScrollComponent.reinitialization()\r\n }, 70)\r\n }, 140)\r\n }\r\n\r\n const scrollTop = () => {\r\n ScrollTopComponent.goTop()\r\n }\r\n\r\n const updateHeaderSticky = () => {\r\n const stickyHeader = document.body.querySelectorAll(`[data-kt-sticky-name=\"header\"]`)\r\n if (stickyHeader && stickyHeader.length > 0) {\r\n const sticky = StickyComponent.getInstance(stickyHeader[0] as HTMLElement)\r\n if (sticky) {\r\n sticky.update()\r\n }\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n if (isFirstRun.current) {\r\n isFirstRun.current = false\r\n } else {\r\n pluginsReinitialization()\r\n }\r\n\r\n updateHeaderSticky()\r\n setTimeout(() => {\r\n scrollTop()\r\n }, 0)\r\n }, [pathname])\r\n\r\n return (\r\n
\r\n \r\n
\r\n )\r\n}\r\n","import {useEffect, useRef} from 'react'\r\nimport {\r\n MenuComponent,\r\n DrawerComponent,\r\n ScrollComponent,\r\n ScrollTopComponent,\r\n StickyComponent,\r\n ToggleComponent,\r\n} from '../assets/ts/components'\r\n\r\nimport {useLayout} from './core'\r\n\r\nexport function MasterInit() {\r\n const {config} = useLayout()\r\n const isFirstRun = useRef(true)\r\n const pluginsInitialization = () => {\r\n isFirstRun.current = false\r\n setTimeout(() => {\r\n ToggleComponent.bootstrap()\r\n ScrollTopComponent.bootstrap()\r\n DrawerComponent.bootstrap()\r\n StickyComponent.bootstrap()\r\n MenuComponent.bootstrap()\r\n ScrollComponent.bootstrap()\r\n }, 200)\r\n }\r\n\r\n useEffect(() => {\r\n if (isFirstRun.current) {\r\n isFirstRun.current = false\r\n pluginsInitialization()\r\n }\r\n }, [config])\r\n\r\n return <>\r\n}\r\n","import React from 'react'\r\nimport { AsideDefault } from './components/aside/AsideDefault'\r\nimport { Footer } from './components/Footer'\r\nimport { HeaderWrapper } from './components/header/HeaderWrapper'\r\nimport { Toolbar } from './components/toolbar/Toolbar'\r\nimport { ScrollTop } from './components/ScrollTop'\r\nimport { Content } from './components/Content'\r\nimport { MasterInit } from './MasterInit'\r\nimport { PageDataProvider } from './core'\r\nimport {\r\n DrawerMessenger,\r\n ExploreMain,\r\n ActivityDrawer,\r\n Main,\r\n InviteUsers,\r\n UpgradePlan,\r\n} from '../partials'\r\nimport { DefaultTitle } from './components/header/page-title/DefaultTitle'\r\nimport { MenuInnerWithSub } from './components/header/MenuInnerWithSub'\r\n\r\n\r\nconst MasterLayout: React.FC = ({ children }) => {\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 {children}\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\n}\r\n\r\nexport { MasterLayout }\r\n","export const axioDefaultConfig = {\r\n method: 'get',\r\n url: 'https://localhost:44321/api/contractors',\r\n data: {},\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n },\r\n validateStatus: function (status) {\r\n return status >= 200 && status < 400 // default\r\n },\r\n}\r\n \r\nexport const validcoderegex = /^[a-z0-9]{1,15}$/;\r\nexport const vehicleRegex = /^([0-9]{1,3}|[A-Z]{1,3})-[0-9]{1,4}$/\r\n\r\nexport const options = {\r\n position: 'top-right',\r\n autoClose: 5000,\r\n hideProgressBar: false,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n // and so on ...\r\n}\r\n","import React, {useState, useEffect, useRef} from 'react'\r\nimport {PageLink, PageTitle} from '../../../_metronic/layout/core'\r\nimport {KTSVG, toAbsoluteUrl} from '../../../_metronic/helpers'\r\nimport {useTable, useFilters, useGlobalFilter, usePagination, useAsyncDebounce} from 'react-table'\r\nimport axios from 'axios'\r\nimport ErrorMessage from '../helpers/message'\r\nimport Loading from '../helpers/loading'\r\nimport {axioDefaultConfig} from '../helpers/commonResource'\r\nimport {useDataLayerValue} from '../../../DataLayer'\r\n\r\nconst breadCrumb = [\r\n {\r\n title: 'Home',\r\n path: '/dashboard',\r\n isSeparator: false,\r\n isActive: false,\r\n },\r\n {\r\n title: '',\r\n path: '',\r\n isSeparator: true,\r\n isActive: false,\r\n },\r\n]\r\n\r\nlet data = []\r\nfunction GlobalFilter({preGlobalFilteredRows, globalFilter, setGlobalFilter}) {\r\n //const count = preGlobalFilteredRows.length\r\n const [value, setValue] = React.useState(globalFilter)\r\n\r\n const onChange = (value) => {\r\n setGlobalFilter(value)\r\n }\r\n\r\n return (\r\n
\r\n \r\n\r\n {\r\n setValue(e.target.value)\r\n onChange(e.target.value)\r\n }}\r\n />\r\n
\r\n )\r\n}\r\n\r\nfunction TablesWidget10() {\r\n const columns = React.useMemo(\r\n () => [\r\n {\r\n Header: ' ',\r\n columns: [\r\n {\r\n accessor: 'code',\r\n },\r\n {\r\n accessor: 'description',\r\n },\r\n {\r\n accessor: 'category',\r\n },\r\n {\r\n accessor: 'groupCode',\r\n },\r\n {\r\n accessor: 'pakages',\r\n },\r\n ],\r\n },\r\n ],\r\n []\r\n )\r\n\r\n const {\r\n getTableProps,\r\n getTableBodyProps,\r\n headerGroups,\r\n prepareRow,\r\n page,\r\n canPreviousPage,\r\n canNextPage,\r\n pageOptions,\r\n pageCount,\r\n gotoPage,\r\n nextPage,\r\n previousPage,\r\n setPageSize,\r\n state: {pageIndex, pageSize, globalFilter},\r\n preGlobalFilteredRows,\r\n setGlobalFilter,\r\n } = useTable(\r\n {\r\n columns,\r\n data,\r\n initialState: {pageIndex: 0, pageSize: 20, globalFilter: ''},\r\n },\r\n useGlobalFilter,\r\n usePagination\r\n )\r\n const [error, setError] = useState({status: 'E', text: ''})\r\n const [InitialLoading, setInitialLoading] = useState(true)\r\n //const [{token, user}, dispatch] = useDataLayerValue()\r\n const [{user}, dispatch] = useDataLayerValue()\r\n function handleErros(error) {\r\n if (error?.response?.status === 401) {\r\n /* dispatch({\r\n type: 'SET_TOKEN',\r\n token: null,\r\n }) */\r\n return\r\n }\r\n\r\n if (error?.response?.data?.status === 'E') {\r\n setError(error?.response?.data)\r\n return\r\n }\r\n const message = Object.entries(error?.response?.data?.errors)\r\n .map(([key, value]) => value)\r\n .join(',')\r\n setError({status: 'E', text: message})\r\n }\r\n\r\n /// Loading\r\n useEffect(() => {\r\n console.log('asa')\r\n axios({\r\n ...axioDefaultConfig,\r\n method: 'get',\r\n url: process.env.REACT_APP_BACKEND_API + '/api/sensor-monitor/layouts',\r\n // headers: {...axioDefaultConfig.headers, Authorization: 'Bearer ' + token},\r\n })\r\n .then(function (response) {\r\n console.log('dd')\r\n setInitialLoading(false)\r\n if (response?.data?.status === 'S') {\r\n console.log(response?.data?.result)\r\n data = response?.data?.result\r\n setGlobalFilter('')\r\n }\r\n })\r\n .catch(function (error) {\r\n handleErros(error)\r\n })\r\n }, [])\r\n\r\n if (InitialLoading) return \r\n\r\n return (\r\n
\r\n {/* begin::Header */}\r\n
\r\n

\r\n All Layouts\r\n {data.length} Registered\r\n

\r\n \r\n \r\n
\r\n \r\n
\r\n\r\n {user.email === 'gevan@overleap.lk' && (\r\n \r\n \r\n New Layout\r\n \r\n )}\r\n
\r\n
\r\n {/* end::Header */}\r\n {/* begin::Body */}\r\n
\r\n {/* begin::Table container */}\r\n
\r\n {/* begin::Table */}\r\n \r\n \r\n Code\r\n Description\r\n Category\r\n Group\r\n {/* {headerGroups.map((headerGroup) => (\r\n \r\n {headerGroup.headers.map((column) => (\r\n {column.render('Header')}\r\n ))}\r\n \r\n ))}*/}\r\n \r\n \r\n {page.length === 0 && (\r\n \r\n \r\n No Data Found!\r\n \r\n \r\n )}\r\n {page.map((row, i) => {\r\n prepareRow(row)\r\n return (\r\n \r\n {/* {row.cells.map((cell) => {\r\n return {cell.render('Cell')}\r\n })}*/}\r\n {row.values.code}\r\n {row.values.description}\r\n {row.values.category}\r\n {row.values.groupCode}\r\n \r\n
\r\n {(row.values.pakages === '' || row.values.pakages === null) && (\r\n <>\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {row.values.pakages !== '' && row.values.pakages !== null && (\r\n <>\r\n \r\n \r\n \r\n \r\n )}\r\n {user.email === 'gevan@overleap.lk' && (\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 Pagination can be built however you'd like. \r\n This is just a very basic UI implementation:\r\n */}\r\n \r\n
\r\n {/* end::Table container */}\r\n
\r\n {/* begin::Body */}\r\n \r\n )\r\n}\r\n\r\nfunction AllLayout() {\r\n return (\r\n <>\r\n All Layout(s)\r\n
\r\n \r\n
\r\n \r\n )\r\n}\r\n\r\nexport default AllLayout\r\n","import React, {useState, useEffect, useRef} from 'react'\r\nimport {PageLink, PageTitle} from '../../../_metronic/layout/core'\r\nimport {KTSVG, toAbsoluteUrl} from '../../../_metronic/helpers'\r\nimport {useTable, useFilters, useGlobalFilter, usePagination, useAsyncDebounce} from 'react-table'\r\nimport axios from 'axios'\r\nimport ErrorMessage from '../helpers/message'\r\nimport Loading from '../helpers/loading'\r\nimport {axioDefaultConfig} from '../helpers/commonResource'\r\nimport {useDataLayerValue} from '../../../DataLayer'\r\n\r\nconst breadCrumb = [\r\n {\r\n title: 'Home',\r\n path: '/dashboard',\r\n isSeparator: false,\r\n isActive: false,\r\n },\r\n {\r\n title: '',\r\n path: '',\r\n isSeparator: true,\r\n isActive: false,\r\n },\r\n]\r\n\r\nlet data = []\r\nfunction GlobalFilter({preGlobalFilteredRows, globalFilter, setGlobalFilter}) {\r\n //const count = preGlobalFilteredRows.length\r\n const [value, setValue] = React.useState(globalFilter)\r\n const [{token, user}, dispatch] = useDataLayerValue()\r\n\r\n const onChange = (value) => {\r\n setGlobalFilter(value)\r\n }\r\n\r\n return (\r\n
\r\n \r\n\r\n {\r\n setValue(e.target.value)\r\n onChange(e.target.value)\r\n }}\r\n />\r\n
\r\n )\r\n}\r\n\r\nfunction TablesWidget10(props) {\r\n console.log(JSON.stringify(props))\r\n const columns = React.useMemo(\r\n () => [\r\n {\r\n Header: ' ',\r\n columns: [\r\n {\r\n accessor: 'code',\r\n },\r\n {\r\n accessor: 'formatCode',\r\n },\r\n {\r\n accessor: 'description',\r\n },\r\n {\r\n accessor: 'createdOn',\r\n },\r\n {\r\n accessor: 'status',\r\n },\r\n {\r\n accessor: 'priority',\r\n },\r\n {\r\n accessor: 'fK_SectorCode',\r\n },\r\n {\r\n accessor: 'facilityName',\r\n },\r\n {\r\n accessor: 'remain',\r\n },\r\n ],\r\n },\r\n ],\r\n []\r\n )\r\n\r\n const {\r\n getTableProps,\r\n getTableBodyProps,\r\n headerGroups,\r\n prepareRow,\r\n page,\r\n canPreviousPage,\r\n canNextPage,\r\n pageOptions,\r\n pageCount,\r\n gotoPage,\r\n nextPage,\r\n previousPage,\r\n setPageSize,\r\n state: {pageIndex, pageSize, globalFilter},\r\n preGlobalFilteredRows,\r\n setGlobalFilter,\r\n } = useTable(\r\n {\r\n columns,\r\n data,\r\n initialState: {pageIndex: 0, pageSize: 20, globalFilter: ''},\r\n },\r\n useGlobalFilter,\r\n usePagination\r\n )\r\n const [error, setError] = useState({status: 'E', text: ''})\r\n const [InitialLoading, setInitialLoading] = useState(true)\r\n const [{user, token}, dispatch] = useDataLayerValue()\r\n function handleErros(error) {\r\n if (error?.response?.status === 401) {\r\n dispatch({\r\n type: 'SET_TOKEN',\r\n token: null,\r\n })\r\n return\r\n }\r\n\r\n if (error?.response?.data?.status === 'E') {\r\n setError(error?.response?.data)\r\n return\r\n }\r\n const message = Object.entries(error?.response?.data?.errors)\r\n .map(([key, value]) => value)\r\n .join(',')\r\n setError({status: 'E', text: message})\r\n }\r\n\r\n /// Loading\r\n useEffect(() => {\r\n const sector = props.props.match?.params?.sector ?? ''\r\n axios({\r\n ...axioDefaultConfig,\r\n method: 'get',\r\n url:\r\n process.env.REACT_APP_BACKEND_API +\r\n '/api/get-alerts?facility=' +\r\n sector +\r\n '&code=' +\r\n user.facility,\r\n headers: {...axioDefaultConfig.headers, Authorization: 'Bearer ' + token},\r\n })\r\n .then(function (response) {\r\n setInitialLoading(false)\r\n data = response?.data?.data\r\n setGlobalFilter('')\r\n })\r\n .catch(function (error) {\r\n handleErros(error)\r\n })\r\n }, [])\r\n\r\n if (InitialLoading) return \r\n\r\n return (\r\n
\r\n {/* begin::Header */}\r\n
\r\n

\r\n All Alerts\r\n Alert Management\r\n

\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n {/* end::Header */}\r\n {/* begin::Body */}\r\n
\r\n {/* begin::Table container */}\r\n
\r\n {/* begin::Table */}\r\n \r\n \r\n Ticket\r\n Description\r\n \r\n \r\n \r\n {page.length === 0 && (\r\n \r\n \r\n No Data Found!\r\n \r\n \r\n )}\r\n {page.map((row, i) => {\r\n prepareRow(row)\r\n return (\r\n \r\n {/* {row.cells.map((cell) => {\r\n return {cell.render('Cell')}\r\n })}*/}\r\n \r\n {{row.values.formatCode}}\r\n \r\n \r\n {row.values.description}{' '}\r\n \r\n {row.values.priority}\r\n \r\n {\r\n \r\n {row.values.facilityName}\r\n \r\n }\r\n
\r\n {row.values.createdOn}\r\n {row.values.status == 'Opened' && (\r\n \r\n {' '}\r\n OPENED ({row.values.remain})\r\n \r\n )}\r\n {row.values.status == 'Resolved' && (\r\n \r\n {' '}\r\n RESOLVED\r\n \r\n )}\r\n {row.values.status == 'Closed' && (\r\n \r\n {' '}\r\n CLOSED\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 Pagination can be built however you'd like. \r\n This is just a very basic UI implementation:\r\n */}\r\n \r\n
\r\n {/* end::Table container */}\r\n
\r\n {/* begin::Body */}\r\n \r\n )\r\n}\r\n\r\nfunction AllAlerts(props) {\r\n return (\r\n <>\r\n All Alerts(s)\r\n
\r\n \r\n
\r\n \r\n )\r\n}\r\n\r\nexport default AllAlerts\r\n","import React from \"react\";\r\n//import ChromeDinoGame from 'react-chrome-dino';\r\n\r\nexport function Dashboard() {\r\n return
\r\n /* return
\r\n\r\n \r\n
*/\r\n}\r\n\r\n\r\nexport default Dashboard\r\n","import React, {useState, useEffect, useRef, PureComponent, Component} from 'react'\r\nimport {useQuill} from 'react-quilljs'\r\n// or const { useQuill } = require('react-quilljs');\r\nimport 'quill/dist/quill.snow.css' // Add css for snow theme\r\n\r\nfunction TagConfig(props) {\r\n const inputReference = useRef(null)\r\n const {quill, quillRef} = useQuill('#editor', {\r\n theme: 'snow',\r\n })\r\n\r\n React.useEffect(() => {\r\n if (quill) {\r\n quill.clipboard.dangerouslyPasteHTML(props?.item?.note ?? '')\r\n if (inputReference) {\r\n inputReference.current.focus()\r\n }\r\n\r\n quill.on('text-change', (delta, oldDelta, source) => {\r\n var hm = quill.root.innerHTML\r\n // console.log('Text change!');\r\n // console.log(quill.getText()); // Get text only\r\n //console.log(quill.getContents()); // Get delta contents\r\n // console.log(quill.root.innerHTML); // Get innerHTML using quill\r\n //console.log(quillRef.current.firstChild.innerHTML); // Get innerHTML using quillRef\r\n /* if (quill.root.innerHTML && quill.root.innerHTML.substr(quill.root.innerHTML.length - 11) == \"


\") {\r\n hm = quill.root.innerHTML.substr(0, quill.root.innerHTML.length - 11) + \"

\"\r\n }*/\r\n props.item.note = hm\r\n })\r\n }\r\n }, [quill])\r\n\r\n return (\r\n <>\r\n
\r\n \r\n Packet Name\r\n \r\n props.onkeyPress(e, props.index, 'OBJECT')}\r\n className='form-control form-control-solid '\r\n value={props.item.object}\r\n placeholder='Packet Name'\r\n type='text'\r\n />\r\n \r\n [Plant] / [Plant.PacketType] / [PacketType]\r\n \r\n

\r\n
\r\n
\r\n Tag/Field Name\r\n props.onkeyPress(e, props.index, 'NAME')}\r\n className='form-control form-control-solid '\r\n value={props.item.machineNo}\r\n placeholder='Tag Name'\r\n type='text'\r\n />\r\n \r\n view object browser\r\n \r\n

\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n Display Text\r\n props.onkeyPress(e, props.index, 'DISPLAY_NAME')}\r\n className='form-control form-control-solid '\r\n value={props.item?.displayName}\r\n placeholder='Tag Name'\r\n type='text'\r\n />\r\n \r\n Type\r\n props.handleChange(e, props.index, 'TYPE')}\r\n className='form-control form-control-solid '\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\n \r\n
\r\n X coordinate\r\n props.onkeyPress(e, props.index, 'X')}\r\n className='form-control form-control-solid '\r\n value={props.item?.defaultPos?.x}\r\n placeholder='X'\r\n />\r\n \r\n Y coordinate\r\n props.onkeyPress(e, props.index, 'Y')}\r\n className='form-control form-control-solid '\r\n value={props.item?.defaultPos?.y}\r\n placeholder='Y'\r\n />\r\n
\r\n
\r\n
\r\n

\r\n [CODE - INITIAL]\r\n props.onkeyPress(e, props.index, 'INIT')}\r\n className='form-control form-control-solid '\r\n value={props.item.tempFeild1}\r\n placeholder='Intial'\r\n type='text'\r\n />\r\n \r\n View Documentation\r\n \r\n
\r\n
\r\n
\r\n

\r\n [Code - RUNTIME/Data Manipulation]\r\n props.onkeyPress(e, props.index, 'FORMULA')}\r\n className='form-control form-control-solid '\r\n value={props.item.formula}\r\n placeholder='Code here'\r\n type='text'\r\n />\r\n
\r\n \r\n View Documentation\r\n \r\n
\r\n
\r\n
\r\n {' '}\r\n Document/Instructions\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 Send\r\n \r\n
\r\n
\r\n \r\n )\r\n}\r\n\r\nexport {ChatInner}\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, {FC, useEffect, useRef, useState} from 'react'\r\nimport {KTSVG, toAbsoluteUrl} from '../../../helpers'\r\nimport {Formik, Form, FormikValues, Field, ErrorMessage} from 'formik'\r\nimport * as Yup from 'yup'\r\nimport {StepperComponent} from '../../../assets/ts/components'\r\n\r\ninterface ICreateAccount {\r\n appName: string\r\n category: string\r\n framework: string\r\n dbName: string\r\n dbType: string\r\n nameOnCard: string\r\n cardNumber: string\r\n cardExpiryMonth: string\r\n cardExpiryYear: string\r\n cardCvv: string\r\n saveCard: string\r\n}\r\n\r\nconst inits: ICreateAccount = {\r\n appName: '',\r\n category: '1',\r\n framework: '1',\r\n dbName: '',\r\n dbType: '1',\r\n nameOnCard: 'Max Doe',\r\n cardNumber: '4111 1111 1111 1111',\r\n cardExpiryMonth: '1',\r\n cardExpiryYear: '2025',\r\n cardCvv: '123',\r\n saveCard: '1',\r\n}\r\n\r\nconst createAppSchema = [\r\n Yup.object({\r\n appName: Yup.string().required().label('App name'),\r\n category: Yup.string().required().label('Category'),\r\n }),\r\n Yup.object({\r\n framework: Yup.string().required().label('Framework'),\r\n }),\r\n Yup.object({\r\n dbName: Yup.string().required().label('Database name'),\r\n dbType: Yup.string().required().label('Database engine'),\r\n }),\r\n Yup.object({\r\n nameOnCard: Yup.string().required().label('Name'),\r\n cardNumber: Yup.string().required().label('Card Number'),\r\n cardExpiryMonth: Yup.string().required().label('Expiration Month'),\r\n cardExpiryYear: Yup.string().required().label('Expiration Year'),\r\n cardCvv: Yup.string().required().label('CVV'),\r\n }),\r\n]\r\n\r\nconst Main: FC = () => {\r\n const stepperRef = useRef(null)\r\n const stepper = useRef(null)\r\n const [currentSchema, setCurrentSchema] = useState(createAppSchema[0])\r\n const [initValues] = useState(inits)\r\n\r\n const loadStepper = () => {\r\n stepper.current = StepperComponent.createInsance(stepperRef.current as HTMLDivElement)\r\n }\r\n\r\n const prevStep = () => {\r\n if (!stepper.current) {\r\n return\r\n }\r\n\r\n stepper.current.goPrev()\r\n\r\n setCurrentSchema(createAppSchema[stepper.current.currentStepIndex - 1])\r\n }\r\n\r\n const submitStep = (values: ICreateAccount, actions: FormikValues) => {\r\n if (!stepper.current) {\r\n return\r\n }\r\n\r\n setCurrentSchema(createAppSchema[stepper.current.currentStepIndex])\r\n\r\n if (stepper.current.currentStepIndex !== stepper.current.totatStepsNumber) {\r\n stepper.current.goNext()\r\n } else {\r\n stepper.current.goto(1)\r\n actions.resetForm()\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n if (!stepperRef.current) {\r\n return\r\n }\r\n\r\n loadStepper()\r\n }, [stepperRef])\r\n\r\n return (\r\n \r\n \r\n )\r\n}\r\n\r\nexport {Main}\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport { FC } from 'react'\r\nimport { useLayout } from '../core'\r\nimport { KTSVG, toAbsoluteUrl } from '../../../_metronic/helpers'\r\n\r\nvar content = 'INDUSRTYX'\r\nif (window.location.hostname.toLowerCase() === 'e2eq.lk') {\r\n content = 'E2EQ'\r\n} if (window.location.hostname.toLowerCase() === 'portal.smartgas.biz') {\r\n content = 'SMARTGAS'\r\n}\r\n\r\nconst Footer: FC = () => {\r\n const { classes } = useLayout()\r\n return (\r\n \r\n {/* end::Container */}\r\n \r\n )\r\n}\r\n\r\nexport { Footer }\r\n","import React, { useEffect } from 'react'\r\nimport { useLocation } from 'react-router'\r\nimport clsx from 'clsx'\r\nimport { useLayout } from '../core'\r\nimport { DrawerComponent } from '../../assets/ts/components'\r\nimport { DefaultTitle } from './header/page-title/DefaultTitle'\r\n\r\nconst Content: React.FC = ({ children }) => {\r\n const { classes } = useLayout()\r\n const location = useLocation()\r\n useEffect(() => {\r\n DrawerComponent.hideAll()\r\n }, [location])\r\n\r\n return (\r\n
\r\n {/*\r\n
\r\n \r\n
\r\n */}\r\n {children}\r\n
\r\n )\r\n}\r\n\r\nexport { Content }\r\n"],"sourceRoot":""}