@kando-env/kando-ui 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (649) hide show
  1. package/.DS_Store +0 -0
  2. package/.babelrc +10 -0
  3. package/.eslintrc.json +25 -0
  4. package/.nvmrc +1 -0
  5. package/.prettierrc.json +6 -0
  6. package/.storybook/main.js +11 -0
  7. package/.storybook/preview-head.html +43 -0
  8. package/.storybook/preview.js +15 -0
  9. package/.storybook/webpack.config.js +48 -0
  10. package/babel.config.js +15 -0
  11. package/demo-server.js +11 -0
  12. package/index.html +14 -0
  13. package/javascript/.DS_Store +0 -0
  14. package/javascript/bundles/.DS_Store +0 -0
  15. package/javascript/bundles/overview/.DS_Store +0 -0
  16. package/javascript/bundles/overview/views/.DS_Store +0 -0
  17. package/lib-build/CovidView/views/components/Body.js +90 -0
  18. package/lib-build/CovidView/views/components/Map.js +142 -0
  19. package/lib-build/CovidView/views/components/MapStyle.scss +387 -0
  20. package/lib-build/CovidView/views/components/Sidebar.js +50 -0
  21. package/lib-build/CovidView/views/components/SidebarStyle.scss +11 -0
  22. package/lib-build/CovidView/views/components/Summary.js +145 -0
  23. package/lib-build/CovidView/views/components/SummaryStyle.scss +61 -0
  24. package/lib-build/CovidView/views/components/areas/Area.js +171 -0
  25. package/lib-build/CovidView/views/components/areas/AreaPolygonWBE.js +241 -0
  26. package/lib-build/CovidView/views/components/areas/AreaPolygonsWBE.js +81 -0
  27. package/lib-build/CovidView/views/components/areas/AreasList.js +123 -0
  28. package/lib-build/CovidView/views/components/areas/AreasStyle.scss +237 -0
  29. package/lib-build/CovidView/views/components/areas/Sort.js +59 -0
  30. package/lib-build/CovidView/views/components/areas/TrendPopupContent/TrendPopupContent.js +148 -0
  31. package/lib-build/CovidView/views/components/areas/TrendPopupContent/index.js +13 -0
  32. package/lib-build/CovidView/views/components/areas/TrendPopupContent/styles.scss +30 -0
  33. package/lib-build/CovidView/views/covidView.js +46 -0
  34. package/lib-build/DashboardV2/AreaDashboard.js +116 -0
  35. package/lib-build/DashboardV2/SiteDashboard.js +364 -0
  36. package/lib-build/DashboardV2/WaterAuthorityDashboard.js +45 -0
  37. package/lib-build/DashboardV2/index.js +31 -0
  38. package/lib-build/DashboardV2/styles.scss +126 -0
  39. package/lib-build/DashboardV2/types/IDashboardData.js +5 -0
  40. package/lib-build/EventsView/views/_colors.scss +1 -0
  41. package/lib-build/EventsView/views/components/Body.js +76 -0
  42. package/lib-build/EventsView/views/components/areas/AreaPolygon.js +53 -0
  43. package/lib-build/EventsView/views/components/areas/AreaPolygons.js +63 -0
  44. package/lib-build/EventsView/views/components/edges/Edge.js +75 -0
  45. package/lib-build/EventsView/views/components/edges/Edges.js +50 -0
  46. package/lib-build/EventsView/views/components/events/EventIndicator.js +274 -0
  47. package/lib-build/EventsView/views/components/events/EventPath.js +94 -0
  48. package/lib-build/EventsView/views/components/events/EventsStyle.scss +725 -0
  49. package/lib-build/EventsView/views/components/events/MoreInfo.js +72 -0
  50. package/lib-build/EventsView/views/components/events/Sidebar.js +62 -0
  51. package/lib-build/EventsView/views/components/events/event_info/EarlyWarnings.js +151 -0
  52. package/lib-build/EventsView/views/components/events/event_info/EventDetails.js +100 -0
  53. package/lib-build/EventsView/views/components/events/event_info/EventInfo.js +138 -0
  54. package/lib-build/EventsView/views/components/events/event_info/EventInfoStyle.scss +508 -0
  55. package/lib-build/EventsView/views/components/events/event_info/EventTimeRange.js +152 -0
  56. package/lib-build/EventsView/views/components/events/event_info/HistoricalInformation.js +44 -0
  57. package/lib-build/EventsView/views/components/events/event_info/MiniEventTree.js +116 -0
  58. package/lib-build/EventsView/views/components/events/event_info/MobileEventPath.js +39 -0
  59. package/lib-build/EventsView/views/components/events/event_info/PollutionDischarge.js +64 -0
  60. package/lib-build/EventsView/views/components/events/event_info/charts/EventDetailsLineChart.js +75 -0
  61. package/lib-build/EventsView/views/components/events/event_info/charts/EventDetailsPieChart.js +121 -0
  62. package/lib-build/EventsView/views/components/events/event_info/damage_type/DamageType.js +109 -0
  63. package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/agriculture.svg +29 -0
  64. package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/bacteria-process.svg +90 -0
  65. package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/effluent.svg +55 -0
  66. package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/energy.svg +42 -0
  67. package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/equipment.svg +82 -0
  68. package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/extra-biological-sludge.svg +40 -0
  69. package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/overflow.svg +26 -0
  70. package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/pipes-bluckages.svg +29 -0
  71. package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/pipes-infrastructure.svg +31 -0
  72. package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/reuse.svg +29 -0
  73. package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/sea-rivers.svg +54 -0
  74. package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/sludge.svg +37 -0
  75. package/lib-build/EventsView/views/components/events/event_info/samplings/Sampling.js +28 -0
  76. package/lib-build/EventsView/views/components/events/event_info/samplings/Samplings.js +36 -0
  77. package/lib-build/EventsView/views/components/events/event_info/sources/Source.js +118 -0
  78. package/lib-build/EventsView/views/components/events/event_info/sources/Sources.js +46 -0
  79. package/lib-build/EventsView/views/components/events/events_list/EventItem.js +139 -0
  80. package/lib-build/EventsView/views/components/events/events_list/EventsList.js +298 -0
  81. package/lib-build/EventsView/views/components/events/events_list/Filter/Filter.js +137 -0
  82. package/lib-build/EventsView/views/components/events/events_list/Filter/FilterContainer.js +382 -0
  83. package/lib-build/EventsView/views/components/events/events_list/Filter/FilterItem.js +218 -0
  84. package/lib-build/EventsView/views/components/events/events_list/Filter/FiltersDropDown.js +68 -0
  85. package/lib-build/EventsView/views/components/events/events_list/Filter/OptionsDropDown.js +139 -0
  86. package/lib-build/EventsView/views/components/events/events_list/Sort.js +92 -0
  87. package/lib-build/EventsView/views/components/map/FloatingGraph.js +83 -0
  88. package/lib-build/EventsView/views/components/map/Map.js +162 -0
  89. package/lib-build/EventsView/views/components/map/mapStyle.scss +387 -0
  90. package/lib-build/EventsView/views/components/points/PointMarker.js +453 -0
  91. package/lib-build/EventsView/views/components/points/PointMarkers.js +30 -0
  92. package/lib-build/EventsView/views/eventsView.js +47 -0
  93. package/lib-build/ProjectManagement/api/index.js +19 -0
  94. package/lib-build/ProjectManagement/components/kpi-list-item.js +88 -0
  95. package/lib-build/ProjectManagement/components/kpi-percentage-item.js +98 -0
  96. package/lib-build/ProjectManagement/components/kpi.js +71 -0
  97. package/lib-build/ProjectManagement/components/legend-icon.js +61 -0
  98. package/lib-build/ProjectManagement/components/link-to-item.js +67 -0
  99. package/lib-build/ProjectManagement/components/list-of-points.js +111 -0
  100. package/lib-build/ProjectManagement/components/map-view.js +128 -0
  101. package/lib-build/ProjectManagement/components/metrics.js +94 -0
  102. package/lib-build/ProjectManagement/components/node-label.js +66 -0
  103. package/lib-build/ProjectManagement/components/period-selector-button.js +68 -0
  104. package/lib-build/ProjectManagement/components/period-selector.js +79 -0
  105. package/lib-build/ProjectManagement/components/point-preview.js +298 -0
  106. package/lib-build/ProjectManagement/components/project-management.js +262 -0
  107. package/lib-build/ProjectManagement/components/tree-legend.js +100 -0
  108. package/lib-build/ProjectManagement/components/tree-view.js +281 -0
  109. package/lib-build/ProjectManagement/stores/project-management-store.js +32 -0
  110. package/lib-build/ProjectManagement/util/constants.js +10 -0
  111. package/lib-build/ProjectManagement/util/treeUtil.js +45 -0
  112. package/lib-build/ProjectManagement/util/url.js +24 -0
  113. package/lib-build/Router.js +64 -0
  114. package/lib-build/assets/NVL_trends/down.png +0 -0
  115. package/lib-build/assets/NVL_trends/same.png +0 -0
  116. package/lib-build/assets/NVL_trends/up.png +0 -0
  117. package/lib-build/assets/area_statuses/invalid-sampling.png +0 -0
  118. package/lib-build/assets/area_statuses/missing-sampling.png +0 -0
  119. package/lib-build/assets/area_statuses/pending-sampling.png +0 -0
  120. package/lib-build/assets/area_statuses/valid-sampling.png +0 -0
  121. package/lib-build/assets/factory-icon.png +0 -0
  122. package/lib-build/assets/flask.svg +7 -0
  123. package/lib-build/assets/kando_logo.png +0 -0
  124. package/lib-build/assets/line-chart.svg +56 -0
  125. package/lib-build/assets/missing/authority.png +0 -0
  126. package/lib-build/assets/missing/group.png +0 -0
  127. package/lib-build/assets/missing/point.png +0 -0
  128. package/lib-build/assets/no_events.svg +31 -0
  129. package/lib-build/assets/no_results.svg +327 -0
  130. package/lib-build/assets/point_icons/WWTP-icon.svg +26 -0
  131. package/lib-build/assets/point_icons/blue-circle.svg +3 -0
  132. package/lib-build/assets/point_icons/bright-blue-circle.svg +3 -0
  133. package/lib-build/assets/point_icons/factory-icon.svg +23 -0
  134. package/lib-build/assets/point_icons/green-circle.png +0 -0
  135. package/lib-build/assets/point_icons/green-circle.svg +3 -0
  136. package/lib-build/assets/point_icons/observation-icon.svg +12 -0
  137. package/lib-build/assets/point_icons/pink-circle.svg +3 -0
  138. package/lib-build/assets/point_icons/pump-station-icon.svg +15 -0
  139. package/lib-build/assets/point_icons/red-pin-red-shadow.png +0 -0
  140. package/lib-build/assets/point_icons/sampling-icon.svg +9 -0
  141. package/lib-build/assets/point_icons/white-pin-black-shadow.png +0 -0
  142. package/lib-build/assets/point_icons/white-pin-red-shadow.png +0 -0
  143. package/lib-build/assets/point_icons/yellow-circle.svg +3 -0
  144. package/lib-build/assets/sewer.svg +3 -0
  145. package/lib-build/assets/user.svg +44 -0
  146. package/lib-build/assets/white-point.png +0 -0
  147. package/lib-build/index.js +34 -0
  148. package/lib-build/shared/TimeRangeSelector/TimeRangeSelector.js +111 -0
  149. package/lib-build/shared/TimeRangeSelector/constants.js +8 -0
  150. package/lib-build/shared/TimeRangeSelector/index.js +13 -0
  151. package/lib-build/shared/TimeRangeSelector/styles.scss +65 -0
  152. package/lib-build/shared/components/Breadcrumbs/Breadcrumbs.js +42 -0
  153. package/lib-build/shared/components/Breadcrumbs/index.js +13 -0
  154. package/lib-build/shared/components/Breadcrumbs/styles.scss +8 -0
  155. package/lib-build/shared/components/ContentLoader/ContentLoader.js +71 -0
  156. package/lib-build/shared/components/ContentLoader/index.js +13 -0
  157. package/lib-build/shared/components/DamageType/DamageType.js +263 -0
  158. package/lib-build/shared/components/DamageType/index.js +13 -0
  159. package/lib-build/shared/components/DamageType/styles.scss +50 -0
  160. package/lib-build/shared/components/DischargeHeatmap/DischargeHeatmap.js +218 -0
  161. package/lib-build/shared/components/DischargeHeatmap/index.js +13 -0
  162. package/lib-build/shared/components/DischargeHeatmap/styles.scss +17 -0
  163. package/lib-build/shared/components/ErrorBoundary.js +72 -0
  164. package/lib-build/shared/components/Events/Events.js +240 -0
  165. package/lib-build/shared/components/Events/index.js +13 -0
  166. package/lib-build/shared/components/Events/styles.scss +131 -0
  167. package/lib-build/shared/components/Graph/Graph.js +213 -0
  168. package/lib-build/shared/components/Graph/index.js +13 -0
  169. package/lib-build/shared/components/KandoModal/KandoModal.js +118 -0
  170. package/lib-build/shared/components/KandoModal/index.js +13 -0
  171. package/lib-build/shared/components/KandoModal/styles.scss +19 -0
  172. package/lib-build/shared/components/KandoNavbar/KandoNavbar.js +290 -0
  173. package/lib-build/shared/components/KandoNavbar/NavbarStyle.scss +238 -0
  174. package/lib-build/shared/components/KandoNavbar/index.js +13 -0
  175. package/lib-build/shared/components/LiveEvents/CarouselSlide.js +62 -0
  176. package/lib-build/shared/components/LiveEvents/LiveEvents.js +58 -0
  177. package/lib-build/shared/components/LiveEvents/index.js +13 -0
  178. package/lib-build/shared/components/LiveEvents/styles.scss +80 -0
  179. package/lib-build/shared/components/Map/Map.js +90 -0
  180. package/lib-build/shared/components/Map/index.js +13 -0
  181. package/lib-build/shared/components/Map/styles.scss +7 -0
  182. package/lib-build/shared/components/NarrowHeader.js +57 -0
  183. package/lib-build/shared/components/PointInfo/PointInfo.js +83 -0
  184. package/lib-build/shared/components/PointInfo/index.js +13 -0
  185. package/lib-build/shared/components/PointInfo/styles.scss +48 -0
  186. package/lib-build/shared/components/Search/Search.js +159 -0
  187. package/lib-build/shared/components/Search/index.js +13 -0
  188. package/lib-build/shared/components/Search/styles.scss +27 -0
  189. package/lib-build/shared/components/Sector/Sector.js +176 -0
  190. package/lib-build/shared/components/Sector/index.js +13 -0
  191. package/lib-build/shared/components/Sector/styles.scss +14 -0
  192. package/lib-build/shared/components/Sector/svgs/Brewing.svg +93 -0
  193. package/lib-build/shared/components/Sector/svgs/Cowshed.svg +23 -0
  194. package/lib-build/shared/components/Sector/svgs/Garage.svg +24 -0
  195. package/lib-build/shared/components/Sector/svgs/Missing.svg +36 -0
  196. package/lib-build/shared/components/Sector/svgs/barrel.svg +93 -0
  197. package/lib-build/shared/components/Sector/svgs/beer.svg +13 -0
  198. package/lib-build/shared/components/Sector/svgs/beverage.svg +13 -0
  199. package/lib-build/shared/components/Sector/svgs/car-repair.svg +24 -0
  200. package/lib-build/shared/components/Sector/svgs/car-wash.svg +36 -0
  201. package/lib-build/shared/components/Sector/svgs/chemistry.svg +30 -0
  202. package/lib-build/shared/components/Sector/svgs/conductor-manufacturer.svg +17 -0
  203. package/lib-build/shared/components/Sector/svgs/cosmetic-manufacturer.svg +23 -0
  204. package/lib-build/shared/components/Sector/svgs/cow.svg +23 -0
  205. package/lib-build/shared/components/Sector/svgs/cpu.svg +17 -0
  206. package/lib-build/shared/components/Sector/svgs/dairy.svg +18 -0
  207. package/lib-build/shared/components/Sector/svgs/dippel-oil.svg +17 -0
  208. package/lib-build/shared/components/Sector/svgs/food-donation.svg +29 -0
  209. package/lib-build/shared/components/Sector/svgs/food-factory.svg +17 -0
  210. package/lib-build/shared/components/Sector/svgs/garbage-truck-1.svg +34 -0
  211. package/lib-build/shared/components/Sector/svgs/gas-station.svg +26 -0
  212. package/lib-build/shared/components/Sector/svgs/glass-manufacturer.svg +21 -0
  213. package/lib-build/shared/components/Sector/svgs/glass.svg +21 -0
  214. package/lib-build/shared/components/Sector/svgs/hand-washing.svg +17 -0
  215. package/lib-build/shared/components/Sector/svgs/hospital.svg +28 -0
  216. package/lib-build/shared/components/Sector/svgs/hotel.svg +24 -0
  217. package/lib-build/shared/components/Sector/svgs/laundromat.svg +26 -0
  218. package/lib-build/shared/components/Sector/svgs/leather-factory.svg +23 -0
  219. package/lib-build/shared/components/Sector/svgs/leather.svg +23 -0
  220. package/lib-build/shared/components/Sector/svgs/lipstick.svg +23 -0
  221. package/lib-build/shared/components/Sector/svgs/meat.svg +24 -0
  222. package/lib-build/shared/components/Sector/svgs/metal-coating-plant.svg +21 -0
  223. package/lib-build/shared/components/Sector/svgs/metal-facbrication.svg +20 -0
  224. package/lib-build/shared/components/Sector/svgs/milk.svg +18 -0
  225. package/lib-build/shared/components/Sector/svgs/oil-rig.svg +17 -0
  226. package/lib-build/shared/components/Sector/svgs/petrochemical.svg +13 -0
  227. package/lib-build/shared/components/Sector/svgs/pie.svg +17 -0
  228. package/lib-build/shared/components/Sector/svgs/pills.svg +22 -0
  229. package/lib-build/shared/components/Sector/svgs/plant-unkown-3.svg +36 -0
  230. package/lib-build/shared/components/Sector/svgs/plastic-rubber.svg +43 -0
  231. package/lib-build/shared/components/Sector/svgs/printer.svg +17 -0
  232. package/lib-build/shared/components/Sector/svgs/recycling.svg +17 -0
  233. package/lib-build/shared/components/Sector/svgs/refinery.svg +18 -0
  234. package/lib-build/shared/components/Sector/svgs/repair.svg +13 -0
  235. package/lib-build/shared/components/Sector/svgs/sewing-machine.svg +22 -0
  236. package/lib-build/shared/components/Sector/svgs/shop.svg +24 -0
  237. package/lib-build/shared/components/Sector/svgs/soda.svg +13 -0
  238. package/lib-build/shared/components/Sector/svgs/spray-gun.svg +21 -0
  239. package/lib-build/shared/components/Sector/svgs/washing-machine.svg +26 -0
  240. package/lib-build/shared/components/Sector/svgs/waste.svg +43 -0
  241. package/lib-build/shared/components/Sector/svgs/welder-a.svg +20 -0
  242. package/lib-build/shared/components/Sector/svgs/wine-glass.svg +15 -0
  243. package/lib-build/shared/components/Toggle/Toggle.js +62 -0
  244. package/lib-build/shared/components/Toggle/index.js +13 -0
  245. package/lib-build/shared/components/Toggle/styles.scss +44 -0
  246. package/lib-build/shared/components/TrendGraph/TrendGraph.js +217 -0
  247. package/lib-build/shared/components/TrendGraph/index.js +13 -0
  248. package/lib-build/shared/components/TrendGraph/styles.scss +2 -0
  249. package/lib-build/shared/components/TrendGraphNVL/TrendGraphNVL.js +167 -0
  250. package/lib-build/shared/components/TrendGraphNVL/index.js +13 -0
  251. package/lib-build/shared/components/TrendGraphNVL/styles.scss +16 -0
  252. package/lib-build/shared/helpers/kql.js +51 -0
  253. package/lib-build/shared/helpers/time.js +21 -0
  254. package/lib-build/shared/models/IAction.js +1 -0
  255. package/lib-build/shared/models/IAppState.js +5 -0
  256. package/lib-build/shared/redux/WBE/actionTypes.js +8 -0
  257. package/lib-build/shared/redux/WBE/actions.js +15 -0
  258. package/lib-build/shared/redux/WBE/models/IAreaWBE.js +5 -0
  259. package/lib-build/shared/redux/WBE/models/IWBE.js +5 -0
  260. package/lib-build/shared/redux/WBE/models/IWBEState.js +5 -0
  261. package/lib-build/shared/redux/WBE/reducer.js +40 -0
  262. package/lib-build/shared/redux/areas/actionTypes.js +12 -0
  263. package/lib-build/shared/redux/areas/actions.js +40 -0
  264. package/lib-build/shared/redux/areas/models/IArea.js +5 -0
  265. package/lib-build/shared/redux/areas/models/IAreasState.js +5 -0
  266. package/lib-build/shared/redux/areas/reducer.js +56 -0
  267. package/lib-build/shared/redux/context/actionTypes.js +8 -0
  268. package/lib-build/shared/redux/context/actions.js +15 -0
  269. package/lib-build/shared/redux/context/models/INavContext.js +5 -0
  270. package/lib-build/shared/redux/context/models/INavContextState.js +5 -0
  271. package/lib-build/shared/redux/context/reducer.js +40 -0
  272. package/lib-build/shared/redux/edges/actionTypes.js +14 -0
  273. package/lib-build/shared/redux/edges/actions.js +48 -0
  274. package/lib-build/shared/redux/edges/models/IEdge.js +5 -0
  275. package/lib-build/shared/redux/edges/models/IEdgesState.js +5 -0
  276. package/lib-build/shared/redux/edges/reducer.js +79 -0
  277. package/lib-build/shared/redux/events/actionTypes.js +28 -0
  278. package/lib-build/shared/redux/events/actions.js +112 -0
  279. package/lib-build/shared/redux/events/models/IEvent.js +5 -0
  280. package/lib-build/shared/redux/events/models/IEventsState.js +5 -0
  281. package/lib-build/shared/redux/events/models/ISource.js +5 -0
  282. package/lib-build/shared/redux/events/reducer.js +196 -0
  283. package/lib-build/shared/redux/filters/IFilter.js +5 -0
  284. package/lib-build/shared/redux/filters/IFilterItem.js +5 -0
  285. package/lib-build/shared/redux/global/actionTypes.js +24 -0
  286. package/lib-build/shared/redux/global/actions.js +91 -0
  287. package/lib-build/shared/redux/global/models/IGlobalState.js +5 -0
  288. package/lib-build/shared/redux/global/reducer.js +92 -0
  289. package/lib-build/shared/redux/points/actionTypes.js +10 -0
  290. package/lib-build/shared/redux/points/actions.js +32 -0
  291. package/lib-build/shared/redux/points/models/IGroup.js +5 -0
  292. package/lib-build/shared/redux/points/models/IPoint.js +5 -0
  293. package/lib-build/shared/redux/points/models/IPointsState.js +5 -0
  294. package/lib-build/shared/redux/points/reducer.js +37 -0
  295. package/lib-build/shared/redux/rootActionTypes.js +8 -0
  296. package/lib-build/shared/redux/rootActions.js +14 -0
  297. package/lib-build/shared/redux/rootReducer.js +55 -0
  298. package/lib-build/shared/redux/rootStore.js +40 -0
  299. package/lib-build/shared/utilities/ActionUtility.js +17 -0
  300. package/lib-build/shared/utilities/ErrorBoundary.js +76 -0
  301. package/lib-build/shared/utilities/KandoDate.js +29 -0
  302. package/lib-build/shared/utilities/KandoModal.js +65 -0
  303. package/lib-build/shared/utilities/LocalStorage.js +48 -0
  304. package/lib-build/shared/utilities/TimeFormat.js +70 -0
  305. package/lib-build/shared/utilities/Truncate.js +81 -0
  306. package/lib-build/shared/utilities/custom_hooks/useClickOutside.js +26 -0
  307. package/lib-build/shared/utilities/custom_hooks/useKandoFetch.js +82 -0
  308. package/lib-build/shared/utilities/custom_hooks/useQueryURL.js +15 -0
  309. package/lib-build/shared/utilities/custom_hooks/useRemoveExistingLayers.js +34 -0
  310. package/lib-build/shared/utilities/custom_hooks/useUpdateEventBodyTail.js +62 -0
  311. package/lib-build/shared/utilities/i18n.js +33 -0
  312. package/package.json +131 -3
  313. package/public/favicon.ico +0 -0
  314. package/public/index.html +43 -0
  315. package/src/bundles/CovidView/views/components/Body.tsx +59 -0
  316. package/src/bundles/CovidView/views/components/Map.tsx +110 -0
  317. package/src/bundles/CovidView/views/components/MapStyle.scss +387 -0
  318. package/src/bundles/CovidView/views/components/Sidebar.tsx +32 -0
  319. package/src/bundles/CovidView/views/components/SidebarStyle.scss +11 -0
  320. package/src/bundles/CovidView/views/components/Summary.tsx +134 -0
  321. package/src/bundles/CovidView/views/components/SummaryStyle.scss +61 -0
  322. package/src/bundles/CovidView/views/components/areas/Area.tsx +130 -0
  323. package/src/bundles/CovidView/views/components/areas/AreaPolygonWBE.tsx +186 -0
  324. package/src/bundles/CovidView/views/components/areas/AreaPolygonsWBE.tsx +71 -0
  325. package/src/bundles/CovidView/views/components/areas/AreasList.tsx +84 -0
  326. package/src/bundles/CovidView/views/components/areas/AreasStyle.scss +237 -0
  327. package/src/bundles/CovidView/views/components/areas/Sort.tsx +40 -0
  328. package/src/bundles/CovidView/views/components/areas/TrendPopupContent/TrendPopupContent.tsx +112 -0
  329. package/src/bundles/CovidView/views/components/areas/TrendPopupContent/index.ts +3 -0
  330. package/src/bundles/CovidView/views/components/areas/TrendPopupContent/styles.scss +30 -0
  331. package/src/bundles/CovidView/views/covidView.tsx +30 -0
  332. package/src/bundles/DashboardV2/AreaDashboard.tsx +59 -0
  333. package/src/bundles/DashboardV2/SiteDashboard.tsx +218 -0
  334. package/src/bundles/DashboardV2/WaterAuthorityDashboard.tsx +33 -0
  335. package/src/bundles/DashboardV2/index.ts +5 -0
  336. package/src/bundles/DashboardV2/styles.scss +126 -0
  337. package/src/bundles/DashboardV2/types/IDashboardData.ts +28 -0
  338. package/src/bundles/EventsView/views/_colors.scss +1 -0
  339. package/src/bundles/EventsView/views/components/Body.tsx +73 -0
  340. package/src/bundles/EventsView/views/components/areas/AreaPolygon.tsx +42 -0
  341. package/src/bundles/EventsView/views/components/areas/AreaPolygons.tsx +43 -0
  342. package/src/bundles/EventsView/views/components/edges/Edge.tsx +60 -0
  343. package/src/bundles/EventsView/views/components/edges/Edges.tsx +41 -0
  344. package/src/bundles/EventsView/views/components/events/EventIndicator.tsx +241 -0
  345. package/src/bundles/EventsView/views/components/events/EventPath.tsx +88 -0
  346. package/src/bundles/EventsView/views/components/events/EventsStyle.scss +725 -0
  347. package/src/bundles/EventsView/views/components/events/MoreInfo.tsx +48 -0
  348. package/src/bundles/EventsView/views/components/events/Sidebar.tsx +49 -0
  349. package/src/bundles/EventsView/views/components/events/event_info/EarlyWarnings.tsx +146 -0
  350. package/src/bundles/EventsView/views/components/events/event_info/EventDetails.tsx +106 -0
  351. package/src/bundles/EventsView/views/components/events/event_info/EventInfo.tsx +102 -0
  352. package/src/bundles/EventsView/views/components/events/event_info/EventInfoStyle.scss +508 -0
  353. package/src/bundles/EventsView/views/components/events/event_info/EventTimeRange.tsx +109 -0
  354. package/src/bundles/EventsView/views/components/events/event_info/HistoricalInformation.tsx +37 -0
  355. package/src/bundles/EventsView/views/components/events/event_info/MiniEventTree.tsx +89 -0
  356. package/src/bundles/EventsView/views/components/events/event_info/MobileEventPath.tsx +29 -0
  357. package/src/bundles/EventsView/views/components/events/event_info/PollutionDischarge.tsx +57 -0
  358. package/src/bundles/EventsView/views/components/events/event_info/charts/EventDetailsLineChart.tsx +61 -0
  359. package/src/bundles/EventsView/views/components/events/event_info/charts/EventDetailsPieChart.tsx +107 -0
  360. package/src/bundles/EventsView/views/components/events/event_info/damage_type/DamageType.tsx +98 -0
  361. package/src/bundles/EventsView/views/components/events/event_info/damage_type/svgs/agriculture.svg +29 -0
  362. package/src/bundles/EventsView/views/components/events/event_info/damage_type/svgs/bacteria-process.svg +90 -0
  363. package/src/bundles/EventsView/views/components/events/event_info/damage_type/svgs/effluent.svg +55 -0
  364. package/src/bundles/EventsView/views/components/events/event_info/damage_type/svgs/energy.svg +42 -0
  365. package/src/bundles/EventsView/views/components/events/event_info/damage_type/svgs/equipment.svg +82 -0
  366. package/src/bundles/EventsView/views/components/events/event_info/damage_type/svgs/extra-biological-sludge.svg +40 -0
  367. package/src/bundles/EventsView/views/components/events/event_info/damage_type/svgs/overflow.svg +26 -0
  368. package/src/bundles/EventsView/views/components/events/event_info/damage_type/svgs/pipes-bluckages.svg +29 -0
  369. package/src/bundles/EventsView/views/components/events/event_info/damage_type/svgs/pipes-infrastructure.svg +31 -0
  370. package/src/bundles/EventsView/views/components/events/event_info/damage_type/svgs/reuse.svg +29 -0
  371. package/src/bundles/EventsView/views/components/events/event_info/damage_type/svgs/sea-rivers.svg +54 -0
  372. package/src/bundles/EventsView/views/components/events/event_info/damage_type/svgs/sludge.svg +37 -0
  373. package/src/bundles/EventsView/views/components/events/event_info/samplings/Sampling.tsx +26 -0
  374. package/src/bundles/EventsView/views/components/events/event_info/samplings/Samplings.tsx +32 -0
  375. package/src/bundles/EventsView/views/components/events/event_info/sources/Source.tsx +120 -0
  376. package/src/bundles/EventsView/views/components/events/event_info/sources/Sources.tsx +35 -0
  377. package/src/bundles/EventsView/views/components/events/events_list/EventItem.tsx +122 -0
  378. package/src/bundles/EventsView/views/components/events/events_list/EventsList.tsx +242 -0
  379. package/src/bundles/EventsView/views/components/events/events_list/Filter/Filter.tsx +91 -0
  380. package/src/bundles/EventsView/views/components/events/events_list/Filter/FilterContainer.tsx +302 -0
  381. package/src/bundles/EventsView/views/components/events/events_list/Filter/FilterItem.tsx +180 -0
  382. package/src/bundles/EventsView/views/components/events/events_list/Filter/FiltersDropDown.tsx +48 -0
  383. package/src/bundles/EventsView/views/components/events/events_list/Filter/OptionsDropDown.tsx +97 -0
  384. package/src/bundles/EventsView/views/components/events/events_list/Sort.tsx +70 -0
  385. package/src/bundles/EventsView/views/components/map/FloatingGraph.tsx +61 -0
  386. package/src/bundles/EventsView/views/components/map/Map.tsx +137 -0
  387. package/src/bundles/EventsView/views/components/map/mapStyle.scss +387 -0
  388. package/src/bundles/EventsView/views/components/points/PointMarker.tsx +447 -0
  389. package/src/bundles/EventsView/views/components/points/PointMarkers.tsx +23 -0
  390. package/src/bundles/EventsView/views/eventsView.tsx +32 -0
  391. package/src/bundles/ProjectManagement/api/index.js +10 -0
  392. package/src/bundles/ProjectManagement/components/kpi-list-item.jsx +57 -0
  393. package/src/bundles/ProjectManagement/components/kpi-percentage-item.jsx +69 -0
  394. package/src/bundles/ProjectManagement/components/kpi.jsx +23 -0
  395. package/src/bundles/ProjectManagement/components/legend-icon.jsx +14 -0
  396. package/src/bundles/ProjectManagement/components/link-to-item.jsx +16 -0
  397. package/src/bundles/ProjectManagement/components/list-of-points.jsx +76 -0
  398. package/src/bundles/ProjectManagement/components/map-view.jsx +95 -0
  399. package/src/bundles/ProjectManagement/components/metrics.jsx +42 -0
  400. package/src/bundles/ProjectManagement/components/node-label.jsx +23 -0
  401. package/src/bundles/ProjectManagement/components/period-selector-button.jsx +23 -0
  402. package/src/bundles/ProjectManagement/components/period-selector.jsx +25 -0
  403. package/src/bundles/ProjectManagement/components/point-preview.jsx +225 -0
  404. package/src/bundles/ProjectManagement/components/project-management.jsx +229 -0
  405. package/src/bundles/ProjectManagement/components/tree-legend.jsx +59 -0
  406. package/src/bundles/ProjectManagement/components/tree-view.jsx +215 -0
  407. package/src/bundles/ProjectManagement/stores/project-management-store.js +16 -0
  408. package/src/bundles/ProjectManagement/util/constants.js +2 -0
  409. package/src/bundles/ProjectManagement/util/treeUtil.js +32 -0
  410. package/src/bundles/ProjectManagement/util/url.js +10 -0
  411. package/src/bundles/Router.tsx +56 -0
  412. package/src/bundles/assets/NVL_trends/down.png +0 -0
  413. package/src/bundles/assets/NVL_trends/same.png +0 -0
  414. package/src/bundles/assets/NVL_trends/up.png +0 -0
  415. package/src/bundles/assets/area_statuses/invalid-sampling.png +0 -0
  416. package/src/bundles/assets/area_statuses/missing-sampling.png +0 -0
  417. package/src/bundles/assets/area_statuses/pending-sampling.png +0 -0
  418. package/src/bundles/assets/area_statuses/valid-sampling.png +0 -0
  419. package/src/bundles/assets/factory-icon.png +0 -0
  420. package/src/bundles/assets/flask.svg +7 -0
  421. package/src/bundles/assets/kando_logo.png +0 -0
  422. package/src/bundles/assets/line-chart.svg +56 -0
  423. package/src/bundles/assets/missing/authority.png +0 -0
  424. package/src/bundles/assets/missing/group.png +0 -0
  425. package/src/bundles/assets/missing/point.png +0 -0
  426. package/src/bundles/assets/no_events.svg +31 -0
  427. package/src/bundles/assets/no_results.svg +327 -0
  428. package/src/bundles/assets/point_icons/WWTP-icon.svg +26 -0
  429. package/src/bundles/assets/point_icons/blue-circle.svg +3 -0
  430. package/src/bundles/assets/point_icons/bright-blue-circle.svg +3 -0
  431. package/src/bundles/assets/point_icons/factory-icon.svg +23 -0
  432. package/src/bundles/assets/point_icons/green-circle.png +0 -0
  433. package/src/bundles/assets/point_icons/green-circle.svg +3 -0
  434. package/src/bundles/assets/point_icons/observation-icon.svg +12 -0
  435. package/src/bundles/assets/point_icons/pink-circle.svg +3 -0
  436. package/src/bundles/assets/point_icons/pump-station-icon.svg +15 -0
  437. package/src/bundles/assets/point_icons/red-pin-red-shadow.png +0 -0
  438. package/src/bundles/assets/point_icons/sampling-icon.svg +9 -0
  439. package/src/bundles/assets/point_icons/white-pin-black-shadow.png +0 -0
  440. package/src/bundles/assets/point_icons/white-pin-red-shadow.png +0 -0
  441. package/src/bundles/assets/point_icons/yellow-circle.svg +3 -0
  442. package/src/bundles/assets/sewer.svg +3 -0
  443. package/src/bundles/assets/user.svg +44 -0
  444. package/src/bundles/assets/white-point.png +0 -0
  445. package/src/bundles/index.js +26 -0
  446. package/src/bundles/shared/TimeRangeSelector/TimeRangeSelector.tsx +79 -0
  447. package/src/bundles/shared/TimeRangeSelector/constants.ts +1 -0
  448. package/src/bundles/shared/TimeRangeSelector/index.ts +3 -0
  449. package/src/bundles/shared/TimeRangeSelector/styles.scss +65 -0
  450. package/src/bundles/shared/components/Breadcrumbs/Breadcrumbs.tsx +34 -0
  451. package/src/bundles/shared/components/Breadcrumbs/index.ts +3 -0
  452. package/src/bundles/shared/components/Breadcrumbs/styles.scss +8 -0
  453. package/src/bundles/shared/components/ContentLoader/ContentLoader.tsx +39 -0
  454. package/src/bundles/shared/components/ContentLoader/index.ts +1 -0
  455. package/src/bundles/shared/components/DamageType/DamageType.tsx +234 -0
  456. package/src/bundles/shared/components/DamageType/index.ts +3 -0
  457. package/src/bundles/shared/components/DamageType/styles.scss +50 -0
  458. package/src/bundles/shared/components/DischargeHeatmap/DischargeHeatmap.tsx +205 -0
  459. package/src/bundles/shared/components/DischargeHeatmap/index.ts +3 -0
  460. package/src/bundles/shared/components/DischargeHeatmap/styles.scss +17 -0
  461. package/src/bundles/shared/components/ErrorBoundary.jsx +40 -0
  462. package/src/bundles/shared/components/Events/Events.tsx +205 -0
  463. package/src/bundles/shared/components/Events/index.ts +3 -0
  464. package/src/bundles/shared/components/Events/styles.scss +131 -0
  465. package/src/bundles/shared/components/Graph/Graph.tsx +156 -0
  466. package/src/bundles/shared/components/Graph/index.ts +3 -0
  467. package/src/bundles/shared/components/KandoModal/KandoModal.tsx +88 -0
  468. package/src/bundles/shared/components/KandoModal/index.ts +3 -0
  469. package/src/bundles/shared/components/KandoModal/styles.scss +19 -0
  470. package/src/bundles/shared/components/KandoNavbar/KandoNavbar.tsx +232 -0
  471. package/src/bundles/shared/components/KandoNavbar/NavbarStyle.scss +238 -0
  472. package/src/bundles/shared/components/KandoNavbar/index.ts +3 -0
  473. package/src/bundles/shared/components/LiveEvents/CarouselSlide.tsx +80 -0
  474. package/src/bundles/shared/components/LiveEvents/LiveEvents.tsx +38 -0
  475. package/src/bundles/shared/components/LiveEvents/index.ts +3 -0
  476. package/src/bundles/shared/components/LiveEvents/styles.scss +80 -0
  477. package/src/bundles/shared/components/Map/Map.tsx +79 -0
  478. package/src/bundles/shared/components/Map/index.ts +3 -0
  479. package/src/bundles/shared/components/Map/styles.scss +7 -0
  480. package/src/bundles/shared/components/NarrowHeader.jsx +18 -0
  481. package/src/bundles/shared/components/PointInfo/PointInfo.tsx +80 -0
  482. package/src/bundles/shared/components/PointInfo/index.ts +3 -0
  483. package/src/bundles/shared/components/PointInfo/styles.scss +48 -0
  484. package/src/bundles/shared/components/Search/Search.tsx +106 -0
  485. package/src/bundles/shared/components/Search/index.ts +3 -0
  486. package/src/bundles/shared/components/Search/styles.scss +27 -0
  487. package/src/bundles/shared/components/Sector/Sector.tsx +156 -0
  488. package/src/bundles/shared/components/Sector/index.ts +3 -0
  489. package/src/bundles/shared/components/Sector/styles.scss +14 -0
  490. package/src/bundles/shared/components/Sector/svgs/Brewing.svg +93 -0
  491. package/src/bundles/shared/components/Sector/svgs/Cowshed.svg +23 -0
  492. package/src/bundles/shared/components/Sector/svgs/Garage.svg +24 -0
  493. package/src/bundles/shared/components/Sector/svgs/Missing.svg +36 -0
  494. package/src/bundles/shared/components/Sector/svgs/barrel.svg +93 -0
  495. package/src/bundles/shared/components/Sector/svgs/beer.svg +13 -0
  496. package/src/bundles/shared/components/Sector/svgs/beverage.svg +13 -0
  497. package/src/bundles/shared/components/Sector/svgs/car-repair.svg +24 -0
  498. package/src/bundles/shared/components/Sector/svgs/car-wash.svg +36 -0
  499. package/src/bundles/shared/components/Sector/svgs/chemistry.svg +30 -0
  500. package/src/bundles/shared/components/Sector/svgs/conductor-manufacturer.svg +17 -0
  501. package/src/bundles/shared/components/Sector/svgs/cosmetic-manufacturer.svg +23 -0
  502. package/src/bundles/shared/components/Sector/svgs/cow.svg +23 -0
  503. package/src/bundles/shared/components/Sector/svgs/cpu.svg +17 -0
  504. package/src/bundles/shared/components/Sector/svgs/dairy.svg +18 -0
  505. package/src/bundles/shared/components/Sector/svgs/dippel-oil.svg +17 -0
  506. package/src/bundles/shared/components/Sector/svgs/food-donation.svg +29 -0
  507. package/src/bundles/shared/components/Sector/svgs/food-factory.svg +17 -0
  508. package/src/bundles/shared/components/Sector/svgs/garbage-truck-1.svg +34 -0
  509. package/src/bundles/shared/components/Sector/svgs/gas-station.svg +26 -0
  510. package/src/bundles/shared/components/Sector/svgs/glass-manufacturer.svg +21 -0
  511. package/src/bundles/shared/components/Sector/svgs/glass.svg +21 -0
  512. package/src/bundles/shared/components/Sector/svgs/hand-washing.svg +17 -0
  513. package/src/bundles/shared/components/Sector/svgs/hospital.svg +28 -0
  514. package/src/bundles/shared/components/Sector/svgs/hotel.svg +24 -0
  515. package/src/bundles/shared/components/Sector/svgs/laundromat.svg +26 -0
  516. package/src/bundles/shared/components/Sector/svgs/leather-factory.svg +23 -0
  517. package/src/bundles/shared/components/Sector/svgs/leather.svg +23 -0
  518. package/src/bundles/shared/components/Sector/svgs/lipstick.svg +23 -0
  519. package/src/bundles/shared/components/Sector/svgs/meat.svg +24 -0
  520. package/src/bundles/shared/components/Sector/svgs/metal-coating-plant.svg +21 -0
  521. package/src/bundles/shared/components/Sector/svgs/metal-facbrication.svg +20 -0
  522. package/src/bundles/shared/components/Sector/svgs/milk.svg +18 -0
  523. package/src/bundles/shared/components/Sector/svgs/oil-rig.svg +17 -0
  524. package/src/bundles/shared/components/Sector/svgs/petrochemical.svg +13 -0
  525. package/src/bundles/shared/components/Sector/svgs/pie.svg +17 -0
  526. package/src/bundles/shared/components/Sector/svgs/pills.svg +22 -0
  527. package/src/bundles/shared/components/Sector/svgs/plant-unkown-3.svg +36 -0
  528. package/src/bundles/shared/components/Sector/svgs/plastic-rubber.svg +43 -0
  529. package/src/bundles/shared/components/Sector/svgs/printer.svg +17 -0
  530. package/src/bundles/shared/components/Sector/svgs/recycling.svg +17 -0
  531. package/src/bundles/shared/components/Sector/svgs/refinery.svg +18 -0
  532. package/src/bundles/shared/components/Sector/svgs/repair.svg +13 -0
  533. package/src/bundles/shared/components/Sector/svgs/sewing-machine.svg +22 -0
  534. package/src/bundles/shared/components/Sector/svgs/shop.svg +24 -0
  535. package/src/bundles/shared/components/Sector/svgs/soda.svg +13 -0
  536. package/src/bundles/shared/components/Sector/svgs/spray-gun.svg +21 -0
  537. package/src/bundles/shared/components/Sector/svgs/washing-machine.svg +26 -0
  538. package/src/bundles/shared/components/Sector/svgs/waste.svg +43 -0
  539. package/src/bundles/shared/components/Sector/svgs/welder-a.svg +20 -0
  540. package/src/bundles/shared/components/Sector/svgs/wine-glass.svg +15 -0
  541. package/src/bundles/shared/components/Toggle/Toggle.tsx +51 -0
  542. package/src/bundles/shared/components/Toggle/index.ts +3 -0
  543. package/src/bundles/shared/components/Toggle/styles.scss +44 -0
  544. package/src/bundles/shared/components/TrendGraph/TrendGraph.tsx +166 -0
  545. package/src/bundles/shared/components/TrendGraph/index.ts +3 -0
  546. package/src/bundles/shared/components/TrendGraph/styles.scss +2 -0
  547. package/src/bundles/shared/components/TrendGraphNVL/TrendGraphNVL.tsx +134 -0
  548. package/src/bundles/shared/components/TrendGraphNVL/index.ts +3 -0
  549. package/src/bundles/shared/components/TrendGraphNVL/styles.scss +16 -0
  550. package/src/bundles/shared/helpers/kql.ts +39 -0
  551. package/src/bundles/shared/helpers/time.ts +12 -0
  552. package/src/bundles/shared/models/IAction.ts +9 -0
  553. package/src/bundles/shared/models/IAppState.ts +18 -0
  554. package/src/bundles/shared/redux/WBE/actionTypes.ts +1 -0
  555. package/src/bundles/shared/redux/WBE/actions.ts +8 -0
  556. package/src/bundles/shared/redux/WBE/models/IAreaWBE.ts +21 -0
  557. package/src/bundles/shared/redux/WBE/models/IWBE.ts +7 -0
  558. package/src/bundles/shared/redux/WBE/models/IWBEState.ts +5 -0
  559. package/src/bundles/shared/redux/WBE/reducer.ts +24 -0
  560. package/src/bundles/shared/redux/areas/actionTypes.ts +3 -0
  561. package/src/bundles/shared/redux/areas/actions.ts +31 -0
  562. package/src/bundles/shared/redux/areas/models/IArea.ts +6 -0
  563. package/src/bundles/shared/redux/areas/models/IAreasState.ts +6 -0
  564. package/src/bundles/shared/redux/areas/reducer.ts +44 -0
  565. package/src/bundles/shared/redux/context/actionTypes.ts +1 -0
  566. package/src/bundles/shared/redux/context/actions.ts +8 -0
  567. package/src/bundles/shared/redux/context/models/INavContext.ts +4 -0
  568. package/src/bundles/shared/redux/context/models/INavContextState.ts +5 -0
  569. package/src/bundles/shared/redux/context/reducer.ts +25 -0
  570. package/src/bundles/shared/redux/edges/actionTypes.ts +4 -0
  571. package/src/bundles/shared/redux/edges/actions.ts +37 -0
  572. package/src/bundles/shared/redux/edges/models/IEdge.ts +9 -0
  573. package/src/bundles/shared/redux/edges/models/IEdgesState.ts +6 -0
  574. package/src/bundles/shared/redux/edges/reducer.ts +59 -0
  575. package/src/bundles/shared/redux/events/actionTypes.ts +11 -0
  576. package/src/bundles/shared/redux/events/actions.ts +100 -0
  577. package/src/bundles/shared/redux/events/models/IEvent.ts +29 -0
  578. package/src/bundles/shared/redux/events/models/IEventsState.ts +9 -0
  579. package/src/bundles/shared/redux/events/models/ISource.ts +6 -0
  580. package/src/bundles/shared/redux/events/reducer.ts +167 -0
  581. package/src/bundles/shared/redux/filters/IFilter.ts +13 -0
  582. package/src/bundles/shared/redux/filters/IFilterItem.ts +9 -0
  583. package/src/bundles/shared/redux/global/actionTypes.ts +9 -0
  584. package/src/bundles/shared/redux/global/actions.ts +76 -0
  585. package/src/bundles/shared/redux/global/models/IGlobalState.ts +16 -0
  586. package/src/bundles/shared/redux/global/reducer.ts +81 -0
  587. package/src/bundles/shared/redux/points/actionTypes.ts +3 -0
  588. package/src/bundles/shared/redux/points/actions.ts +24 -0
  589. package/src/bundles/shared/redux/points/models/IGroup.ts +7 -0
  590. package/src/bundles/shared/redux/points/models/IPoint.ts +16 -0
  591. package/src/bundles/shared/redux/points/models/IPointsState.ts +6 -0
  592. package/src/bundles/shared/redux/points/reducer.ts +26 -0
  593. package/src/bundles/shared/redux/rootActionTypes.ts +1 -0
  594. package/src/bundles/shared/redux/rootActions.ts +7 -0
  595. package/src/bundles/shared/redux/rootReducer.ts +33 -0
  596. package/src/bundles/shared/redux/rootStore.ts +34 -0
  597. package/src/bundles/shared/utilities/ActionUtility.ts +9 -0
  598. package/src/bundles/shared/utilities/ErrorBoundary.tsx +40 -0
  599. package/src/bundles/shared/utilities/KandoDate.ts +11 -0
  600. package/src/bundles/shared/utilities/KandoModal.tsx +40 -0
  601. package/src/bundles/shared/utilities/LocalStorage.tsx +31 -0
  602. package/src/bundles/shared/utilities/TimeFormat.tsx +64 -0
  603. package/src/bundles/shared/utilities/Truncate.tsx +54 -0
  604. package/src/bundles/shared/utilities/custom_hooks/useClickOutside.ts +18 -0
  605. package/src/bundles/shared/utilities/custom_hooks/useKandoFetch.ts +45 -0
  606. package/src/bundles/shared/utilities/custom_hooks/useQueryURL.ts +7 -0
  607. package/src/bundles/shared/utilities/custom_hooks/useRemoveExistingLayers.tsx +24 -0
  608. package/src/bundles/shared/utilities/custom_hooks/useUpdateEventBodyTail.tsx +52 -0
  609. package/src/bundles/shared/utilities/i18n.tsx +9 -0
  610. package/src/index.js +21 -0
  611. package/src/init-api-mock.js +11 -0
  612. package/src/locals.js +12296 -0
  613. package/src/react-app-env.d.ts +1 -0
  614. package/src/stories/examples/Button.stories.tsx +37 -0
  615. package/src/stories/examples/Button.tsx +48 -0
  616. package/src/stories/examples/Header.stories.tsx +19 -0
  617. package/src/stories/examples/Header.tsx +47 -0
  618. package/src/stories/examples/Introduction.stories.mdx +211 -0
  619. package/src/stories/examples/Page.stories.tsx +22 -0
  620. package/src/stories/examples/Page.tsx +67 -0
  621. package/src/stories/examples/assets/code-brackets.svg +1 -0
  622. package/src/stories/examples/assets/colors.svg +1 -0
  623. package/src/stories/examples/assets/comments.svg +1 -0
  624. package/src/stories/examples/assets/direction.svg +1 -0
  625. package/src/stories/examples/assets/flow.svg +1 -0
  626. package/src/stories/examples/assets/plugin.svg +1 -0
  627. package/src/stories/examples/assets/repo.svg +1 -0
  628. package/src/stories/examples/assets/stackalt.svg +1 -0
  629. package/src/stories/examples/button.css +30 -0
  630. package/src/stories/examples/header.css +26 -0
  631. package/src/stories/examples/page.css +69 -0
  632. package/static/fonts/Gilroy-ExtraBold.otf +0 -0
  633. package/static/fonts/Gilroy-Light.otf +0 -0
  634. package/static/fonts/Gilroy-Regular.otf +0 -0
  635. package/static/fonts/Gilroy-SemiBold.otf +0 -0
  636. package/static/fonts/IBMPlexSerif-Italic.ttf +0 -0
  637. package/static/mockServiceWorker.js +323 -0
  638. package/temp-fix-paths/fix-paths.test.js +143 -0
  639. package/temp-fix-paths/lib.js +97 -0
  640. package/temp-fix-paths/run.js +4 -0
  641. package/temp-fix-paths/test-dir/a/a.ts +0 -0
  642. package/temp-fix-paths/test-dir/a/aa/aa.ts +0 -0
  643. package/temp-fix-paths/test-dir/a/aa/aaa/aaa.ts +8 -0
  644. package/temp-fix-paths/test-dir/b/b.ts +0 -0
  645. package/temp-fix-paths/test-dir/b/bb/bb.ts +0 -0
  646. package/temp-fix-paths/test-dir/b/bb/bbb/bbb.ts +1 -0
  647. package/tsconfig.json +39 -0
  648. package/types/global/index.d.ts +28 -0
  649. package/index.js +0 -1
@@ -0,0 +1,453 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
6
+
7
+ Object.defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+ exports.default = void 0;
11
+
12
+ var _react = _interopRequireWildcard(require("react"));
13
+
14
+ var _reactDom = _interopRequireDefault(require("react-dom"));
15
+
16
+ var _reactRedux = require("react-redux");
17
+
18
+ var _useRemoveExistingLayers = _interopRequireWildcard(require("../../../../shared/utilities/custom_hooks/useRemoveExistingLayers"));
19
+
20
+ var _i18n = _interopRequireDefault(require("../../../../shared/utilities/i18n"));
21
+
22
+ var _lineChart = _interopRequireDefault(require("../../../../assets/line-chart.svg"));
23
+
24
+ var _jquery = _interopRequireDefault(require("jquery"));
25
+
26
+ var _actions = require("../../../../shared/redux/global/actions");
27
+
28
+ var _whitePoint = _interopRequireDefault(require("../../../../assets/white-point.png"));
29
+
30
+ var _whitePinRedShadow = _interopRequireDefault(require("../../../../assets/point_icons/white-pin-red-shadow.png"));
31
+
32
+ var _whitePinBlackShadow = _interopRequireDefault(require("../../../../assets/point_icons/white-pin-black-shadow.png"));
33
+
34
+ var _redPinRedShadow = _interopRequireDefault(require("../../../../assets/point_icons/red-pin-red-shadow.png"));
35
+
36
+ var _yellowCircle = _interopRequireDefault(require("../../../../assets/point_icons/yellow-circle.svg"));
37
+
38
+ var _brightBlueCircle = _interopRequireDefault(require("../../../../assets/point_icons/bright-blue-circle.svg"));
39
+
40
+ var _greenCircle = _interopRequireDefault(require("../../../../assets/point_icons/green-circle.svg"));
41
+
42
+ var _pinkCircle = _interopRequireDefault(require("../../../../assets/point_icons/pink-circle.svg"));
43
+
44
+ var _blueCircle = _interopRequireDefault(require("../../../../assets/point_icons/blue-circle.svg"));
45
+
46
+ var _WWTPIcon = _interopRequireDefault(require("../../../../assets/point_icons/WWTP-icon.svg"));
47
+
48
+ var _factoryIcon = _interopRequireDefault(require("../../../../assets/point_icons/factory-icon.svg"));
49
+
50
+ var _pumpStationIcon = _interopRequireDefault(require("../../../../assets/point_icons/pump-station-icon.svg"));
51
+
52
+ var _observationIcon = _interopRequireDefault(require("../../../../assets/point_icons/observation-icon.svg"));
53
+
54
+ var _samplingIcon = _interopRequireDefault(require("../../../../assets/point_icons/sampling-icon.svg"));
55
+
56
+ var _DamageType = _interopRequireDefault(require("../events/event_info/damage_type/DamageType"));
57
+
58
+ var _TimeFormat = _interopRequireDefault(require("../../../../shared/utilities/TimeFormat"));
59
+
60
+ var _Sector = _interopRequireDefault(require("../../../../shared/components/Sector"));
61
+
62
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
63
+
64
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
65
+
66
+ function mapStateToProps(state) {
67
+ var events_data = state.events_data;
68
+ return {
69
+ events_data: events_data
70
+ };
71
+ }
72
+
73
+ var PointMarker = function PointMarker(props) {
74
+ var L = props.L,
75
+ map = props.map,
76
+ point = props.point,
77
+ events_data = props.events_data;
78
+ var focusedEvent = events_data.focusedEvent;
79
+ var dispatch = (0, _reactRedux.useDispatch)(); // iconSize: [width, height],
80
+ // Icon Anchor: [(-right)(+left), (-down)(+up)]
81
+
82
+ var selectedBackground = function selectedBackground() {
83
+ return L.icon({
84
+ iconUrl: _redPinRedShadow.default,
85
+ iconSize: [67, 70],
86
+ iconAnchor: [32, 54],
87
+ popupAnchor: [0, -30]
88
+ });
89
+ };
90
+
91
+ var belongsToSourceBackground = function belongsToSourceBackground() {
92
+ return L.icon({
93
+ iconUrl: _whitePinRedShadow.default,
94
+ iconSize: [67, 70],
95
+ iconAnchor: [32, 54],
96
+ popupAnchor: [0, -30]
97
+ });
98
+ };
99
+
100
+ var standardBackground = function standardBackground() {
101
+ var secondary = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
102
+ var third = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
103
+ return L.icon({
104
+ iconUrl: _whitePinBlackShadow.default,
105
+ iconSize: secondary ? [20, 20] : [43, 46],
106
+ iconAnchor: secondary && third ? [-2, 19] : secondary ? [-2, 44] : [20, 42],
107
+ popupAnchor: [0, -30]
108
+ });
109
+ };
110
+
111
+ var combinedFactoryIcon = [L.icon({
112
+ iconUrl: _yellowCircle.default,
113
+ iconSize: [25, 24],
114
+ iconAnchor: [10.7, 33.7],
115
+ popupAnchor: [0, -30]
116
+ }), L.icon({
117
+ iconUrl: _factoryIcon.default,
118
+ iconSize: [15, 15],
119
+ iconAnchor: [5, 30],
120
+ popupAnchor: [0, -30]
121
+ })];
122
+ var combinedPumpStationIcon = [L.icon({
123
+ iconUrl: _greenCircle.default,
124
+ iconSize: [25, 24],
125
+ iconAnchor: [10.7, 33.7],
126
+ popupAnchor: [0, -30]
127
+ }), L.icon({
128
+ iconUrl: _pumpStationIcon.default,
129
+ iconSize: [20, 20],
130
+ iconAnchor: [7, 32],
131
+ popupAnchor: [0, -30]
132
+ })];
133
+ var combinedWWTPIcon = [L.icon({
134
+ iconUrl: _brightBlueCircle.default,
135
+ iconSize: [25, 25],
136
+ iconAnchor: [10.7, 33.7],
137
+ popupAnchor: [0, -30]
138
+ }), L.icon({
139
+ iconUrl: _WWTPIcon.default,
140
+ iconSize: [20, 20],
141
+ iconAnchor: [8, 31],
142
+ popupAnchor: [0, -30]
143
+ })];
144
+
145
+ var markerBelongsToSelectedSource = function markerBelongsToSelectedSource() {
146
+ var source;
147
+
148
+ if (events_data.focusedEvent !== null) {
149
+ source = events_data.focusedEvent.sources.filter(function (source) {
150
+ return source.point_id === point.id;
151
+ })[0];
152
+ }
153
+
154
+ return events_data.focusedEvent !== null && source && events_data.focusedEvent.selected_source === source.point_id;
155
+ };
156
+
157
+ var markerBelongsToSource = function markerBelongsToSource() {
158
+ return events_data.focusedEvent !== null && events_data.focusedEvent.sources.filter(function (source) {
159
+ return source.point_id === point.id;
160
+ })[0];
161
+ };
162
+
163
+ var matchIconToPoint = function matchIconToPoint(point) {
164
+ switch (point.group.type) {
165
+ case "Groups::Factory":
166
+ if (combinedFactoryIcon.length === 2) {
167
+ if (markerBelongsToSelectedSource()) {
168
+ combinedFactoryIcon.unshift(selectedBackground());
169
+ } else if (markerBelongsToSource()) {
170
+ combinedFactoryIcon.unshift(belongsToSourceBackground());
171
+ } else {
172
+ combinedFactoryIcon.unshift(standardBackground());
173
+ }
174
+ }
175
+
176
+ return combinedFactoryIcon;
177
+ break;
178
+
179
+ case "Groups::PumpStation":
180
+ if (combinedPumpStationIcon.length === 2) {
181
+ if (markerBelongsToSelectedSource()) {
182
+ combinedPumpStationIcon.unshift(selectedBackground());
183
+ } else if (markerBelongsToSource()) {
184
+ combinedPumpStationIcon.unshift(belongsToSourceBackground());
185
+ } else {
186
+ combinedPumpStationIcon.unshift(standardBackground());
187
+ }
188
+ }
189
+
190
+ return combinedPumpStationIcon;
191
+ break;
192
+
193
+ case "Groups::WastewaterTreatmentPlant":
194
+ if (combinedWWTPIcon.length === 2) {
195
+ if (markerBelongsToSelectedSource()) {
196
+ combinedWWTPIcon.unshift(selectedBackground());
197
+ } else if (markerBelongsToSource()) {
198
+ combinedWWTPIcon.unshift(belongsToSourceBackground());
199
+ } else {
200
+ combinedWWTPIcon.unshift(standardBackground());
201
+ }
202
+ }
203
+
204
+ return combinedWWTPIcon;
205
+ break;
206
+
207
+ default:
208
+ return null;
209
+ }
210
+ };
211
+
212
+ var createManholePoint = function createManholePoint(markerLocation) {
213
+ var pointIcon = L.icon({
214
+ iconUrl: _whitePoint.default,
215
+ iconSize: [9, 9],
216
+ iconAnchor: [4.5, 4.5]
217
+ });
218
+ var manholeIcon = L.marker(markerLocation, {
219
+ icon: pointIcon,
220
+ riseOnHover: true
221
+ }).addTo(map);
222
+ manholeIcon.bindTooltip("".concat(point.group.name, " (").concat(point.id, ")"));
223
+ manholeIcon["kando_object_id"] = point.id;
224
+ manholeIcon["kando_object"] = "Point";
225
+ };
226
+
227
+ var createCustomIconPoint = function createCustomIconPoint(markerLocation) {
228
+ // @ts-ignore
229
+ matchIconToPoint(point) !== null && matchIconToPoint(point).map(function (icon) {
230
+ var pointCustomIcon = L.marker(markerLocation, {
231
+ icon: icon,
232
+ riseOnHover: false
233
+ }).addTo(map);
234
+ pointCustomIcon.bindTooltip("".concat(point.group.name, " (").concat(point.id, ")"));
235
+ pointCustomIcon["kando_object_id"] = point.id;
236
+ pointCustomIcon["kando_object"] = "Point";
237
+ });
238
+ };
239
+
240
+ var createSamplingIconPoint = function createSamplingIconPoint(markerLocation, secondaryIcon) {
241
+ // iconSize: [width, height],
242
+ // Icon Anchor: [(-right)(+left), (-down)(+up)]
243
+ var samplingIcon = [L.icon({
244
+ iconUrl: _blueCircle.default,
245
+ iconSize: secondaryIcon ? [10, 10] : [25, 24],
246
+ iconAnchor: secondaryIcon ? [-7, 15] : [10.7, 33.7],
247
+ popupAnchor: [0, -30]
248
+ }), L.icon({
249
+ iconUrl: _samplingIcon.default,
250
+ iconSize: secondaryIcon ? [7, 7] : [13, 15],
251
+ iconAnchor: secondaryIcon ? [-8, 13] : [5, 30],
252
+ popupAnchor: [0, -30]
253
+ })];
254
+
255
+ if (markerBelongsToSelectedSource() && !secondaryIcon) {
256
+ samplingIcon.unshift(selectedBackground());
257
+ } else if (markerBelongsToSource() && !secondaryIcon) {
258
+ samplingIcon.unshift(belongsToSourceBackground());
259
+ } else {
260
+ samplingIcon.unshift(standardBackground(secondaryIcon, true));
261
+ }
262
+
263
+ samplingIcon.map(function (icon) {
264
+ var pointCustomIcon = L.marker(markerLocation, {
265
+ icon: icon,
266
+ riseOnHover: false
267
+ }).addTo(map);
268
+ pointCustomIcon.bindTooltip("".concat(point.group.name, " (").concat(point.id, ")"));
269
+ pointCustomIcon["kando_object_id"] = point.id;
270
+ pointCustomIcon["kando_object"] = "Sampling";
271
+ });
272
+ };
273
+
274
+ var createObservationIconPoint = function createObservationIconPoint(markerLocation, secondaryIcon) {
275
+ // iconSize: [width, height],
276
+ // Icon Anchor: [(-right)(+left), (-down)(+up)]
277
+ var observationIcon = [L.icon({
278
+ iconUrl: _pinkCircle.default,
279
+ iconSize: secondaryIcon ? [10, 10] : [25, 24],
280
+ iconAnchor: secondaryIcon ? [-7, 40] : [10.7, 33.7],
281
+ popupAnchor: [0, -30]
282
+ }), L.icon({
283
+ iconUrl: _observationIcon.default,
284
+ iconSize: secondaryIcon ? [7, 7] : [13, 15],
285
+ iconAnchor: secondaryIcon ? [-8, 38] : [5, 30],
286
+ popupAnchor: [0, -30]
287
+ })];
288
+
289
+ if (markerBelongsToSelectedSource() && !secondaryIcon) {
290
+ observationIcon.unshift(selectedBackground());
291
+ } else if (markerBelongsToSource() && !secondaryIcon) {
292
+ observationIcon.unshift(belongsToSourceBackground());
293
+ } else {
294
+ observationIcon.unshift(standardBackground(secondaryIcon));
295
+ }
296
+
297
+ observationIcon.map(function (icon) {
298
+ var pointCustomIcon = L.marker(markerLocation, {
299
+ icon: icon,
300
+ riseOnHover: false
301
+ }).addTo(map);
302
+ pointCustomIcon.bindTooltip("".concat(point.group.name, " (").concat(point.id, ")"));
303
+ pointCustomIcon["kando_object_id"] = point.id;
304
+ pointCustomIcon["kando_object"] = "Observation";
305
+ });
306
+ };
307
+
308
+ var popupContent = function popupContent(obs) {
309
+ if (obs === null) {
310
+ return "\n <div class=\"event-popup\">\n <div class=\"popup-graph-icon popup-graph-icon-".concat(point.id, "\">\n <img src=\"").concat(_lineChart.default, "\"/>\n </div>\n <div class=\"popup-content\">\n <h5 class=\"popup-content__site-name\"><b>").concat(point.group.name, "</b></h5>\n <hr/>\n \n <div id=\"sector\"></div>\n </div>\n </div>\n ");
311
+ } else {
312
+ return "\n <div class=\"event-popup\">\n <div class=\"popup-graph-icon popup-graph-icon-".concat(obs.id, "\">\n <img src=\"").concat(_lineChart.default, "\"/>\n </div>\n <div class=\"popup-content\">\n <h5 class=\"popup-content__site-name\"><b>").concat(point.group.name, "</b></h5>\n <div class=\"popup-content__severity\">\n <p>").concat(_i18n.default.t("events_overview.severity"), "</p>\n <span class=\"").concat('popup-content__severity--' + obs.severity, "\"><b>").concat(_i18n.default.t("events_overview.severities.".concat(obs.severity)), "</b></span>\n </div>\n \n <hr/>\n \n <div class=\"popup-content__damage-type\" id=\"damage-type-popup\">\n <p>").concat(_i18n.default.t("events_overview.local_damage_type"), "</p>\n </div>\n \n <hr/>\n\n <div class=\"popup-content__discharge-time\">\n <div>\n <p>").concat(_i18n.default.t("events_overview.first_seen"), "</p>\n <span><b id=\"first-seen-popup\"></b></span>\n </div>\n <div>\n <p>").concat(_i18n.default.t("events_overview.last_seen"), "</p>\n <span><b id=\"last-seen-popup\"></b></span>\n </div> \n </div>\n </div>\n </div>\n ");
313
+ }
314
+ };
315
+
316
+ (0, _useRemoveExistingLayers.default)(map, point, "Point");
317
+ (0, _useRemoveExistingLayers.default)(map, point, "Observation");
318
+ (0, _useRemoveExistingLayers.default)(map, point, "Sampling");
319
+
320
+ var pointIsObservation = function pointIsObservation() {
321
+ return focusedEvent !== null && focusedEvent.observations.filter(function (obs) {
322
+ return obs.point_id === point.id;
323
+ })[0];
324
+ };
325
+
326
+ var pointBelongsToEvent = function pointBelongsToEvent() {
327
+ return true;
328
+ };
329
+
330
+ var bindPopupToPoint = function bindPopupToPoint() {
331
+ var obs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
332
+ var layers = map._layers;
333
+
334
+ var _loop = function _loop(property) {
335
+ if (["Point", "Observation"].includes(layers[property].kando_object) && layers[property].kando_object_id === point.id) {
336
+ layers[property].bindPopup(popupContent(obs), {
337
+ minWidth: 200
338
+ });
339
+ layers[property].on('popupopen', function (e) {
340
+ if (focusedEvent !== null) {
341
+ var damages = document.createElement('div');
342
+ var firstSeen = document.createElement('div');
343
+ var lastSeen = document.createElement('div');
344
+ var sector = document.createElement('div');
345
+
346
+ if (obs !== null) {
347
+ _reactDom.default.render( /*#__PURE__*/_react.default.createElement(_TimeFormat.default, {
348
+ timestamp: obs.start_time,
349
+ time_zone: obs.time_zone
350
+ }), firstSeen);
351
+
352
+ _reactDom.default.render( /*#__PURE__*/_react.default.createElement(_TimeFormat.default, {
353
+ timestamp: obs.last_seen_time,
354
+ time_zone: obs.time_zone
355
+ }), lastSeen);
356
+
357
+ _reactDom.default.render( /*#__PURE__*/_react.default.createElement(_DamageType.default, {
358
+ event: focusedEvent,
359
+ forEvent: false,
360
+ observation: obs
361
+ }), damages);
362
+ } else {
363
+ _reactDom.default.render( /*#__PURE__*/_react.default.createElement(_Sector.default, {
364
+ sectorName: point.group.sector_name,
365
+ sectorIconName: point.group.sector_icon_name,
366
+ width: "37"
367
+ }), sector);
368
+ }
369
+
370
+ setTimeout(function () {
371
+ (0, _jquery.default)("#damage-type-popup").append(damages);
372
+ (0, _jquery.default)("#first-seen-popup").append(firstSeen);
373
+ (0, _jquery.default)("#last-seen-popup").append(lastSeen);
374
+ (0, _jquery.default)("#sector").append(sector);
375
+ }, 200);
376
+ }
377
+
378
+ var attachClickEvent = function attachClickEvent(selector, observation) {
379
+ (0, _jquery.default)(document.body).on('click', selector, function () {
380
+ dispatch((0, _actions.openFloatingGraph)(true, observation, point));
381
+ });
382
+ };
383
+
384
+ if (obs !== null) {
385
+ attachClickEvent(".popup-graph-icon-" + obs.id, obs);
386
+ } else {
387
+ attachClickEvent(".popup-graph-icon-" + point.id, null);
388
+ }
389
+ });
390
+ layers[property].on("click", function () {
391
+ layers[property].openPopup();
392
+ });
393
+ }
394
+ };
395
+
396
+ for (var property in layers) {
397
+ _loop(property);
398
+ }
399
+ };
400
+
401
+ (0, _react.useEffect)(function () {
402
+ var markerLocation = [point['latitude'], point['longitude']];
403
+
404
+ if (markerLocation[0] !== null) {
405
+ createManholePoint(markerLocation);
406
+
407
+ if (matchIconToPoint(point) !== null && (focusedEvent === null || focusedEvent !== null && pointIsObservation() || point.group.type === 'Groups::WastewaterTreatmentPlant')) {
408
+ createCustomIconPoint(markerLocation);
409
+ }
410
+
411
+ if (focusedEvent !== null && pointIsObservation()) {
412
+ var hasPrimaryIcon = matchIconToPoint(point) !== null;
413
+ createObservationIconPoint(markerLocation, hasPrimaryIcon); // @ts-ignore
414
+
415
+ if (focusedEvent !== null && focusedEvent.samplings.length !== 0 && focusedEvent.samplings[0].point_id === point.id) {
416
+ createSamplingIconPoint(markerLocation, hasPrimaryIcon);
417
+ }
418
+ }
419
+
420
+ if (focusedEvent !== null && pointBelongsToEvent()) {
421
+ var obs = focusedEvent.observations.filter(function (obs) {
422
+ return obs.point_id === point.id;
423
+ })[0];
424
+ bindPopupToPoint(obs);
425
+ }
426
+ }
427
+
428
+ return function cleanup() {
429
+ // UNBIND POPUP
430
+ (0, _useRemoveExistingLayers.removeFromMap)(map, point, "Observation");
431
+ (0, _useRemoveExistingLayers.removeFromMap)(map, point, "Point");
432
+ (0, _useRemoveExistingLayers.removeFromMap)(map, point, "Sampling");
433
+ };
434
+ }, [focusedEvent]);
435
+ return /*#__PURE__*/_react.default.createElement("div", null);
436
+ };
437
+
438
+ var connector = (0, _reactRedux.connect)(mapStateToProps);
439
+
440
+ var _default = connector( /*#__PURE__*/_react.default.memo(PointMarker, function (prevProps, nextProps) {
441
+ var prev_focusedEventId = (((prevProps || {}).events_data || {}).focusedEvent || {}).id;
442
+ var next_focusedEventId = (((nextProps || {}).events_data || {}).focusedEvent || {}).id;
443
+ var prev_selectedSource = (((prevProps || {}).events_data || {}).focusedEvent || {}).selected_source;
444
+ var next_selectedSource = (((nextProps || {}).events_data || {}).focusedEvent || {}).selected_source;
445
+
446
+ if (prev_focusedEventId != next_focusedEventId || prev_selectedSource != next_selectedSource) {
447
+ return false;
448
+ } else {
449
+ return true;
450
+ }
451
+ }));
452
+
453
+ exports.default = _default;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.PointMarkers = void 0;
9
+
10
+ var _react = _interopRequireDefault(require("react"));
11
+
12
+ var _PointMarker = _interopRequireDefault(require("./PointMarker"));
13
+
14
+ var PointMarkers = function PointMarkers(props) {
15
+ var L = props.L,
16
+ points = props.points,
17
+ map = props.map;
18
+ return /*#__PURE__*/_react.default.createElement("div", null, points.length !== 0 && points.filter(function (point) {
19
+ return point.has_device;
20
+ }).map(function (point) {
21
+ return /*#__PURE__*/_react.default.createElement(_PointMarker.default, {
22
+ map: map,
23
+ L: L,
24
+ point: point,
25
+ key: point.id
26
+ });
27
+ }));
28
+ };
29
+
30
+ exports.PointMarkers = PointMarkers;
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
6
+
7
+ Object.defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+ exports.default = void 0;
11
+
12
+ var _react = _interopRequireWildcard(require("react"));
13
+
14
+ var _reactRedux = require("react-redux");
15
+
16
+ require("bootstrap/dist/css/bootstrap.min.css");
17
+
18
+ var _Body = _interopRequireDefault(require("./components/Body"));
19
+
20
+ var _actions = require("../../shared/redux/context/actions");
21
+
22
+ var _KandoNavbar = _interopRequireDefault(require("../../shared/components/KandoNavbar"));
23
+
24
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
25
+
26
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
27
+
28
+ var eventsView = function eventsView() {
29
+ var dispatch = (0, _reactRedux.useDispatch)();
30
+ var waterAuthorityId = (0, _reactRedux.useSelector)(function (state) {
31
+ return state.global_data.waterAuthorityId;
32
+ });
33
+ (0, _react.useEffect)(function () {
34
+ console.log("HEY");
35
+ dispatch((0, _actions.updateNavContext)({
36
+ name: 'events_view'
37
+ }));
38
+ }, [dispatch]);
39
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_KandoNavbar.default, {
40
+ waterAuthorityId: waterAuthorityId
41
+ }), /*#__PURE__*/_react.default.createElement("div", {
42
+ className: "app-wrapper"
43
+ }, /*#__PURE__*/_react.default.createElement(_Body.default, null)));
44
+ };
45
+
46
+ var _default = eventsView;
47
+ exports.default = _default;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getDataFromServer = getDataFromServer;
7
+ exports.getDetection = getDetection;
8
+
9
+ function getDataFromServer(period, waterAuthorityId) {
10
+ return fetch("/project_management/points_tree.json?period=" + period + "&water_authority_id=" + waterAuthorityId).then(function (res) {
11
+ return res.json();
12
+ });
13
+ }
14
+
15
+ function getDetection(period, waterAuthorityId) {
16
+ return fetch("/project_management/detection.json?period=" + period + "&water_authority_id=" + waterAuthorityId).then(function (res) {
17
+ return res.json();
18
+ });
19
+ }
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
+
12
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
13
+
14
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
15
+
16
+ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
17
+
18
+ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
19
+
20
+ var _react = _interopRequireDefault(require("react"));
21
+
22
+ var _linkToItem = _interopRequireDefault(require("./link-to-item"));
23
+
24
+ var _metrics = _interopRequireDefault(require("./metrics"));
25
+
26
+ var _reactContentLoader = require("react-content-loader");
27
+
28
+ var _ErrorBoundary = _interopRequireDefault(require("../../shared/components/ErrorBoundary"));
29
+
30
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
31
+
32
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
33
+
34
+ function ItemsList(props) {
35
+ var items = props.items;
36
+ var listItems = items.map(function (item) {
37
+ return /*#__PURE__*/_react.default.createElement("div", {
38
+ key: item.id,
39
+ className: "prj-mng-item"
40
+ }, /*#__PURE__*/_react.default.createElement("div", {
41
+ className: "item-details"
42
+ }, /*#__PURE__*/_react.default.createElement("div", {
43
+ className: "row"
44
+ }, /*#__PURE__*/_react.default.createElement("div", {
45
+ className: "col-lg-9"
46
+ }, /*#__PURE__*/_react.default.createElement(_linkToItem.default, {
47
+ item: item,
48
+ handleSetSelectedPoint: props.handleSetSelectedPoint
49
+ })), /*#__PURE__*/_react.default.createElement("div", {
50
+ className: "col-lg-3"
51
+ }, /*#__PURE__*/_react.default.createElement(_metrics.default, {
52
+ item: item
53
+ })))));
54
+ });
55
+ return /*#__PURE__*/_react.default.createElement("div", null, listItems);
56
+ }
57
+
58
+ var KpiListItem = /*#__PURE__*/function (_React$Component) {
59
+ (0, _inherits2.default)(KpiListItem, _React$Component);
60
+
61
+ var _super = _createSuper(KpiListItem);
62
+
63
+ function KpiListItem() {
64
+ (0, _classCallCheck2.default)(this, KpiListItem);
65
+ return _super.apply(this, arguments);
66
+ }
67
+
68
+ (0, _createClass2.default)(KpiListItem, [{
69
+ key: "render",
70
+ value: function render() {
71
+ return /*#__PURE__*/_react.default.createElement("div", {
72
+ className: "col col-lg-3 col-md-6"
73
+ }, /*#__PURE__*/_react.default.createElement("div", {
74
+ className: "ibox float-e-margins ibox-sm"
75
+ }, /*#__PURE__*/_react.default.createElement("div", {
76
+ className: "ibox-title"
77
+ }, /*#__PURE__*/_react.default.createElement("h5", null, this.props.title)), /*#__PURE__*/_react.default.createElement("div", {
78
+ className: "ibox-content"
79
+ }, /*#__PURE__*/_react.default.createElement(_ErrorBoundary.default, null, this.props.loading ? /*#__PURE__*/_react.default.createElement(_reactContentLoader.BulletList, null) : /*#__PURE__*/_react.default.createElement(ItemsList, {
80
+ items: this.props.items,
81
+ handleSetSelectedPoint: this.props.handleSetSelectedPoint
82
+ })))));
83
+ }
84
+ }]);
85
+ return KpiListItem;
86
+ }(_react.default.Component);
87
+
88
+ exports.default = KpiListItem;