@kando-env/kando-ui 1.0.1 → 1.0.2

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 (297) hide show
  1. package/package.json +1 -1
  2. package/src/bundles/Router.tsx +1 -0
  3. package/lib-build/CovidView/views/components/Body.js +0 -90
  4. package/lib-build/CovidView/views/components/Map.js +0 -142
  5. package/lib-build/CovidView/views/components/MapStyle.scss +0 -387
  6. package/lib-build/CovidView/views/components/Sidebar.js +0 -50
  7. package/lib-build/CovidView/views/components/SidebarStyle.scss +0 -11
  8. package/lib-build/CovidView/views/components/Summary.js +0 -145
  9. package/lib-build/CovidView/views/components/SummaryStyle.scss +0 -61
  10. package/lib-build/CovidView/views/components/areas/Area.js +0 -171
  11. package/lib-build/CovidView/views/components/areas/AreaPolygonWBE.js +0 -241
  12. package/lib-build/CovidView/views/components/areas/AreaPolygonsWBE.js +0 -81
  13. package/lib-build/CovidView/views/components/areas/AreasList.js +0 -123
  14. package/lib-build/CovidView/views/components/areas/AreasStyle.scss +0 -237
  15. package/lib-build/CovidView/views/components/areas/Sort.js +0 -59
  16. package/lib-build/CovidView/views/components/areas/TrendPopupContent/TrendPopupContent.js +0 -148
  17. package/lib-build/CovidView/views/components/areas/TrendPopupContent/index.js +0 -13
  18. package/lib-build/CovidView/views/components/areas/TrendPopupContent/styles.scss +0 -30
  19. package/lib-build/CovidView/views/covidView.js +0 -46
  20. package/lib-build/DashboardV2/AreaDashboard.js +0 -116
  21. package/lib-build/DashboardV2/SiteDashboard.js +0 -364
  22. package/lib-build/DashboardV2/WaterAuthorityDashboard.js +0 -45
  23. package/lib-build/DashboardV2/index.js +0 -31
  24. package/lib-build/DashboardV2/styles.scss +0 -126
  25. package/lib-build/DashboardV2/types/IDashboardData.js +0 -5
  26. package/lib-build/EventsView/views/_colors.scss +0 -1
  27. package/lib-build/EventsView/views/components/Body.js +0 -76
  28. package/lib-build/EventsView/views/components/areas/AreaPolygon.js +0 -53
  29. package/lib-build/EventsView/views/components/areas/AreaPolygons.js +0 -63
  30. package/lib-build/EventsView/views/components/edges/Edge.js +0 -75
  31. package/lib-build/EventsView/views/components/edges/Edges.js +0 -50
  32. package/lib-build/EventsView/views/components/events/EventIndicator.js +0 -274
  33. package/lib-build/EventsView/views/components/events/EventPath.js +0 -94
  34. package/lib-build/EventsView/views/components/events/EventsStyle.scss +0 -725
  35. package/lib-build/EventsView/views/components/events/MoreInfo.js +0 -72
  36. package/lib-build/EventsView/views/components/events/Sidebar.js +0 -62
  37. package/lib-build/EventsView/views/components/events/event_info/EarlyWarnings.js +0 -151
  38. package/lib-build/EventsView/views/components/events/event_info/EventDetails.js +0 -100
  39. package/lib-build/EventsView/views/components/events/event_info/EventInfo.js +0 -138
  40. package/lib-build/EventsView/views/components/events/event_info/EventInfoStyle.scss +0 -508
  41. package/lib-build/EventsView/views/components/events/event_info/EventTimeRange.js +0 -152
  42. package/lib-build/EventsView/views/components/events/event_info/HistoricalInformation.js +0 -44
  43. package/lib-build/EventsView/views/components/events/event_info/MiniEventTree.js +0 -116
  44. package/lib-build/EventsView/views/components/events/event_info/MobileEventPath.js +0 -39
  45. package/lib-build/EventsView/views/components/events/event_info/PollutionDischarge.js +0 -64
  46. package/lib-build/EventsView/views/components/events/event_info/charts/EventDetailsLineChart.js +0 -75
  47. package/lib-build/EventsView/views/components/events/event_info/charts/EventDetailsPieChart.js +0 -121
  48. package/lib-build/EventsView/views/components/events/event_info/damage_type/DamageType.js +0 -109
  49. package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/agriculture.svg +0 -29
  50. package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/bacteria-process.svg +0 -90
  51. package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/effluent.svg +0 -55
  52. package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/energy.svg +0 -42
  53. package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/equipment.svg +0 -82
  54. package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/extra-biological-sludge.svg +0 -40
  55. package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/overflow.svg +0 -26
  56. package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/pipes-bluckages.svg +0 -29
  57. package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/pipes-infrastructure.svg +0 -31
  58. package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/reuse.svg +0 -29
  59. package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/sea-rivers.svg +0 -54
  60. package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/sludge.svg +0 -37
  61. package/lib-build/EventsView/views/components/events/event_info/samplings/Sampling.js +0 -28
  62. package/lib-build/EventsView/views/components/events/event_info/samplings/Samplings.js +0 -36
  63. package/lib-build/EventsView/views/components/events/event_info/sources/Source.js +0 -118
  64. package/lib-build/EventsView/views/components/events/event_info/sources/Sources.js +0 -46
  65. package/lib-build/EventsView/views/components/events/events_list/EventItem.js +0 -139
  66. package/lib-build/EventsView/views/components/events/events_list/EventsList.js +0 -298
  67. package/lib-build/EventsView/views/components/events/events_list/Filter/Filter.js +0 -137
  68. package/lib-build/EventsView/views/components/events/events_list/Filter/FilterContainer.js +0 -382
  69. package/lib-build/EventsView/views/components/events/events_list/Filter/FilterItem.js +0 -218
  70. package/lib-build/EventsView/views/components/events/events_list/Filter/FiltersDropDown.js +0 -68
  71. package/lib-build/EventsView/views/components/events/events_list/Filter/OptionsDropDown.js +0 -139
  72. package/lib-build/EventsView/views/components/events/events_list/Sort.js +0 -92
  73. package/lib-build/EventsView/views/components/map/FloatingGraph.js +0 -83
  74. package/lib-build/EventsView/views/components/map/Map.js +0 -162
  75. package/lib-build/EventsView/views/components/map/mapStyle.scss +0 -387
  76. package/lib-build/EventsView/views/components/points/PointMarker.js +0 -453
  77. package/lib-build/EventsView/views/components/points/PointMarkers.js +0 -30
  78. package/lib-build/EventsView/views/eventsView.js +0 -47
  79. package/lib-build/ProjectManagement/api/index.js +0 -19
  80. package/lib-build/ProjectManagement/components/kpi-list-item.js +0 -88
  81. package/lib-build/ProjectManagement/components/kpi-percentage-item.js +0 -98
  82. package/lib-build/ProjectManagement/components/kpi.js +0 -71
  83. package/lib-build/ProjectManagement/components/legend-icon.js +0 -61
  84. package/lib-build/ProjectManagement/components/link-to-item.js +0 -67
  85. package/lib-build/ProjectManagement/components/list-of-points.js +0 -111
  86. package/lib-build/ProjectManagement/components/map-view.js +0 -128
  87. package/lib-build/ProjectManagement/components/metrics.js +0 -94
  88. package/lib-build/ProjectManagement/components/node-label.js +0 -66
  89. package/lib-build/ProjectManagement/components/period-selector-button.js +0 -68
  90. package/lib-build/ProjectManagement/components/period-selector.js +0 -79
  91. package/lib-build/ProjectManagement/components/point-preview.js +0 -298
  92. package/lib-build/ProjectManagement/components/project-management.js +0 -262
  93. package/lib-build/ProjectManagement/components/tree-legend.js +0 -100
  94. package/lib-build/ProjectManagement/components/tree-view.js +0 -281
  95. package/lib-build/ProjectManagement/stores/project-management-store.js +0 -32
  96. package/lib-build/ProjectManagement/util/constants.js +0 -10
  97. package/lib-build/ProjectManagement/util/treeUtil.js +0 -45
  98. package/lib-build/ProjectManagement/util/url.js +0 -24
  99. package/lib-build/Router.js +0 -64
  100. package/lib-build/assets/NVL_trends/down.png +0 -0
  101. package/lib-build/assets/NVL_trends/same.png +0 -0
  102. package/lib-build/assets/NVL_trends/up.png +0 -0
  103. package/lib-build/assets/area_statuses/invalid-sampling.png +0 -0
  104. package/lib-build/assets/area_statuses/missing-sampling.png +0 -0
  105. package/lib-build/assets/area_statuses/pending-sampling.png +0 -0
  106. package/lib-build/assets/area_statuses/valid-sampling.png +0 -0
  107. package/lib-build/assets/factory-icon.png +0 -0
  108. package/lib-build/assets/flask.svg +0 -7
  109. package/lib-build/assets/kando_logo.png +0 -0
  110. package/lib-build/assets/line-chart.svg +0 -56
  111. package/lib-build/assets/missing/authority.png +0 -0
  112. package/lib-build/assets/missing/group.png +0 -0
  113. package/lib-build/assets/missing/point.png +0 -0
  114. package/lib-build/assets/no_events.svg +0 -31
  115. package/lib-build/assets/no_results.svg +0 -327
  116. package/lib-build/assets/point_icons/WWTP-icon.svg +0 -26
  117. package/lib-build/assets/point_icons/blue-circle.svg +0 -3
  118. package/lib-build/assets/point_icons/bright-blue-circle.svg +0 -3
  119. package/lib-build/assets/point_icons/factory-icon.svg +0 -23
  120. package/lib-build/assets/point_icons/green-circle.png +0 -0
  121. package/lib-build/assets/point_icons/green-circle.svg +0 -3
  122. package/lib-build/assets/point_icons/observation-icon.svg +0 -12
  123. package/lib-build/assets/point_icons/pink-circle.svg +0 -3
  124. package/lib-build/assets/point_icons/pump-station-icon.svg +0 -15
  125. package/lib-build/assets/point_icons/red-pin-red-shadow.png +0 -0
  126. package/lib-build/assets/point_icons/sampling-icon.svg +0 -9
  127. package/lib-build/assets/point_icons/white-pin-black-shadow.png +0 -0
  128. package/lib-build/assets/point_icons/white-pin-red-shadow.png +0 -0
  129. package/lib-build/assets/point_icons/yellow-circle.svg +0 -3
  130. package/lib-build/assets/sewer.svg +0 -3
  131. package/lib-build/assets/user.svg +0 -44
  132. package/lib-build/assets/white-point.png +0 -0
  133. package/lib-build/index.js +0 -34
  134. package/lib-build/shared/TimeRangeSelector/TimeRangeSelector.js +0 -111
  135. package/lib-build/shared/TimeRangeSelector/constants.js +0 -8
  136. package/lib-build/shared/TimeRangeSelector/index.js +0 -13
  137. package/lib-build/shared/TimeRangeSelector/styles.scss +0 -65
  138. package/lib-build/shared/components/Breadcrumbs/Breadcrumbs.js +0 -42
  139. package/lib-build/shared/components/Breadcrumbs/index.js +0 -13
  140. package/lib-build/shared/components/Breadcrumbs/styles.scss +0 -8
  141. package/lib-build/shared/components/ContentLoader/ContentLoader.js +0 -71
  142. package/lib-build/shared/components/ContentLoader/index.js +0 -13
  143. package/lib-build/shared/components/DamageType/DamageType.js +0 -263
  144. package/lib-build/shared/components/DamageType/index.js +0 -13
  145. package/lib-build/shared/components/DamageType/styles.scss +0 -50
  146. package/lib-build/shared/components/DischargeHeatmap/DischargeHeatmap.js +0 -218
  147. package/lib-build/shared/components/DischargeHeatmap/index.js +0 -13
  148. package/lib-build/shared/components/DischargeHeatmap/styles.scss +0 -17
  149. package/lib-build/shared/components/ErrorBoundary.js +0 -72
  150. package/lib-build/shared/components/Events/Events.js +0 -240
  151. package/lib-build/shared/components/Events/index.js +0 -13
  152. package/lib-build/shared/components/Events/styles.scss +0 -131
  153. package/lib-build/shared/components/Graph/Graph.js +0 -213
  154. package/lib-build/shared/components/Graph/index.js +0 -13
  155. package/lib-build/shared/components/KandoModal/KandoModal.js +0 -118
  156. package/lib-build/shared/components/KandoModal/index.js +0 -13
  157. package/lib-build/shared/components/KandoModal/styles.scss +0 -19
  158. package/lib-build/shared/components/KandoNavbar/KandoNavbar.js +0 -290
  159. package/lib-build/shared/components/KandoNavbar/NavbarStyle.scss +0 -238
  160. package/lib-build/shared/components/KandoNavbar/index.js +0 -13
  161. package/lib-build/shared/components/LiveEvents/CarouselSlide.js +0 -62
  162. package/lib-build/shared/components/LiveEvents/LiveEvents.js +0 -58
  163. package/lib-build/shared/components/LiveEvents/index.js +0 -13
  164. package/lib-build/shared/components/LiveEvents/styles.scss +0 -80
  165. package/lib-build/shared/components/Map/Map.js +0 -90
  166. package/lib-build/shared/components/Map/index.js +0 -13
  167. package/lib-build/shared/components/Map/styles.scss +0 -7
  168. package/lib-build/shared/components/NarrowHeader.js +0 -57
  169. package/lib-build/shared/components/PointInfo/PointInfo.js +0 -83
  170. package/lib-build/shared/components/PointInfo/index.js +0 -13
  171. package/lib-build/shared/components/PointInfo/styles.scss +0 -48
  172. package/lib-build/shared/components/Search/Search.js +0 -159
  173. package/lib-build/shared/components/Search/index.js +0 -13
  174. package/lib-build/shared/components/Search/styles.scss +0 -27
  175. package/lib-build/shared/components/Sector/Sector.js +0 -176
  176. package/lib-build/shared/components/Sector/index.js +0 -13
  177. package/lib-build/shared/components/Sector/styles.scss +0 -14
  178. package/lib-build/shared/components/Sector/svgs/Brewing.svg +0 -93
  179. package/lib-build/shared/components/Sector/svgs/Cowshed.svg +0 -23
  180. package/lib-build/shared/components/Sector/svgs/Garage.svg +0 -24
  181. package/lib-build/shared/components/Sector/svgs/Missing.svg +0 -36
  182. package/lib-build/shared/components/Sector/svgs/barrel.svg +0 -93
  183. package/lib-build/shared/components/Sector/svgs/beer.svg +0 -13
  184. package/lib-build/shared/components/Sector/svgs/beverage.svg +0 -13
  185. package/lib-build/shared/components/Sector/svgs/car-repair.svg +0 -24
  186. package/lib-build/shared/components/Sector/svgs/car-wash.svg +0 -36
  187. package/lib-build/shared/components/Sector/svgs/chemistry.svg +0 -30
  188. package/lib-build/shared/components/Sector/svgs/conductor-manufacturer.svg +0 -17
  189. package/lib-build/shared/components/Sector/svgs/cosmetic-manufacturer.svg +0 -23
  190. package/lib-build/shared/components/Sector/svgs/cow.svg +0 -23
  191. package/lib-build/shared/components/Sector/svgs/cpu.svg +0 -17
  192. package/lib-build/shared/components/Sector/svgs/dairy.svg +0 -18
  193. package/lib-build/shared/components/Sector/svgs/dippel-oil.svg +0 -17
  194. package/lib-build/shared/components/Sector/svgs/food-donation.svg +0 -29
  195. package/lib-build/shared/components/Sector/svgs/food-factory.svg +0 -17
  196. package/lib-build/shared/components/Sector/svgs/garbage-truck-1.svg +0 -34
  197. package/lib-build/shared/components/Sector/svgs/gas-station.svg +0 -26
  198. package/lib-build/shared/components/Sector/svgs/glass-manufacturer.svg +0 -21
  199. package/lib-build/shared/components/Sector/svgs/glass.svg +0 -21
  200. package/lib-build/shared/components/Sector/svgs/hand-washing.svg +0 -17
  201. package/lib-build/shared/components/Sector/svgs/hospital.svg +0 -28
  202. package/lib-build/shared/components/Sector/svgs/hotel.svg +0 -24
  203. package/lib-build/shared/components/Sector/svgs/laundromat.svg +0 -26
  204. package/lib-build/shared/components/Sector/svgs/leather-factory.svg +0 -23
  205. package/lib-build/shared/components/Sector/svgs/leather.svg +0 -23
  206. package/lib-build/shared/components/Sector/svgs/lipstick.svg +0 -23
  207. package/lib-build/shared/components/Sector/svgs/meat.svg +0 -24
  208. package/lib-build/shared/components/Sector/svgs/metal-coating-plant.svg +0 -21
  209. package/lib-build/shared/components/Sector/svgs/metal-facbrication.svg +0 -20
  210. package/lib-build/shared/components/Sector/svgs/milk.svg +0 -18
  211. package/lib-build/shared/components/Sector/svgs/oil-rig.svg +0 -17
  212. package/lib-build/shared/components/Sector/svgs/petrochemical.svg +0 -13
  213. package/lib-build/shared/components/Sector/svgs/pie.svg +0 -17
  214. package/lib-build/shared/components/Sector/svgs/pills.svg +0 -22
  215. package/lib-build/shared/components/Sector/svgs/plant-unkown-3.svg +0 -36
  216. package/lib-build/shared/components/Sector/svgs/plastic-rubber.svg +0 -43
  217. package/lib-build/shared/components/Sector/svgs/printer.svg +0 -17
  218. package/lib-build/shared/components/Sector/svgs/recycling.svg +0 -17
  219. package/lib-build/shared/components/Sector/svgs/refinery.svg +0 -18
  220. package/lib-build/shared/components/Sector/svgs/repair.svg +0 -13
  221. package/lib-build/shared/components/Sector/svgs/sewing-machine.svg +0 -22
  222. package/lib-build/shared/components/Sector/svgs/shop.svg +0 -24
  223. package/lib-build/shared/components/Sector/svgs/soda.svg +0 -13
  224. package/lib-build/shared/components/Sector/svgs/spray-gun.svg +0 -21
  225. package/lib-build/shared/components/Sector/svgs/washing-machine.svg +0 -26
  226. package/lib-build/shared/components/Sector/svgs/waste.svg +0 -43
  227. package/lib-build/shared/components/Sector/svgs/welder-a.svg +0 -20
  228. package/lib-build/shared/components/Sector/svgs/wine-glass.svg +0 -15
  229. package/lib-build/shared/components/Toggle/Toggle.js +0 -62
  230. package/lib-build/shared/components/Toggle/index.js +0 -13
  231. package/lib-build/shared/components/Toggle/styles.scss +0 -44
  232. package/lib-build/shared/components/TrendGraph/TrendGraph.js +0 -217
  233. package/lib-build/shared/components/TrendGraph/index.js +0 -13
  234. package/lib-build/shared/components/TrendGraph/styles.scss +0 -2
  235. package/lib-build/shared/components/TrendGraphNVL/TrendGraphNVL.js +0 -167
  236. package/lib-build/shared/components/TrendGraphNVL/index.js +0 -13
  237. package/lib-build/shared/components/TrendGraphNVL/styles.scss +0 -16
  238. package/lib-build/shared/helpers/kql.js +0 -51
  239. package/lib-build/shared/helpers/time.js +0 -21
  240. package/lib-build/shared/models/IAction.js +0 -1
  241. package/lib-build/shared/models/IAppState.js +0 -5
  242. package/lib-build/shared/redux/WBE/actionTypes.js +0 -8
  243. package/lib-build/shared/redux/WBE/actions.js +0 -15
  244. package/lib-build/shared/redux/WBE/models/IAreaWBE.js +0 -5
  245. package/lib-build/shared/redux/WBE/models/IWBE.js +0 -5
  246. package/lib-build/shared/redux/WBE/models/IWBEState.js +0 -5
  247. package/lib-build/shared/redux/WBE/reducer.js +0 -40
  248. package/lib-build/shared/redux/areas/actionTypes.js +0 -12
  249. package/lib-build/shared/redux/areas/actions.js +0 -40
  250. package/lib-build/shared/redux/areas/models/IArea.js +0 -5
  251. package/lib-build/shared/redux/areas/models/IAreasState.js +0 -5
  252. package/lib-build/shared/redux/areas/reducer.js +0 -56
  253. package/lib-build/shared/redux/context/actionTypes.js +0 -8
  254. package/lib-build/shared/redux/context/actions.js +0 -15
  255. package/lib-build/shared/redux/context/models/INavContext.js +0 -5
  256. package/lib-build/shared/redux/context/models/INavContextState.js +0 -5
  257. package/lib-build/shared/redux/context/reducer.js +0 -40
  258. package/lib-build/shared/redux/edges/actionTypes.js +0 -14
  259. package/lib-build/shared/redux/edges/actions.js +0 -48
  260. package/lib-build/shared/redux/edges/models/IEdge.js +0 -5
  261. package/lib-build/shared/redux/edges/models/IEdgesState.js +0 -5
  262. package/lib-build/shared/redux/edges/reducer.js +0 -79
  263. package/lib-build/shared/redux/events/actionTypes.js +0 -28
  264. package/lib-build/shared/redux/events/actions.js +0 -112
  265. package/lib-build/shared/redux/events/models/IEvent.js +0 -5
  266. package/lib-build/shared/redux/events/models/IEventsState.js +0 -5
  267. package/lib-build/shared/redux/events/models/ISource.js +0 -5
  268. package/lib-build/shared/redux/events/reducer.js +0 -196
  269. package/lib-build/shared/redux/filters/IFilter.js +0 -5
  270. package/lib-build/shared/redux/filters/IFilterItem.js +0 -5
  271. package/lib-build/shared/redux/global/actionTypes.js +0 -24
  272. package/lib-build/shared/redux/global/actions.js +0 -91
  273. package/lib-build/shared/redux/global/models/IGlobalState.js +0 -5
  274. package/lib-build/shared/redux/global/reducer.js +0 -92
  275. package/lib-build/shared/redux/points/actionTypes.js +0 -10
  276. package/lib-build/shared/redux/points/actions.js +0 -32
  277. package/lib-build/shared/redux/points/models/IGroup.js +0 -5
  278. package/lib-build/shared/redux/points/models/IPoint.js +0 -5
  279. package/lib-build/shared/redux/points/models/IPointsState.js +0 -5
  280. package/lib-build/shared/redux/points/reducer.js +0 -37
  281. package/lib-build/shared/redux/rootActionTypes.js +0 -8
  282. package/lib-build/shared/redux/rootActions.js +0 -14
  283. package/lib-build/shared/redux/rootReducer.js +0 -55
  284. package/lib-build/shared/redux/rootStore.js +0 -40
  285. package/lib-build/shared/utilities/ActionUtility.js +0 -17
  286. package/lib-build/shared/utilities/ErrorBoundary.js +0 -76
  287. package/lib-build/shared/utilities/KandoDate.js +0 -29
  288. package/lib-build/shared/utilities/KandoModal.js +0 -65
  289. package/lib-build/shared/utilities/LocalStorage.js +0 -48
  290. package/lib-build/shared/utilities/TimeFormat.js +0 -70
  291. package/lib-build/shared/utilities/Truncate.js +0 -81
  292. package/lib-build/shared/utilities/custom_hooks/useClickOutside.js +0 -26
  293. package/lib-build/shared/utilities/custom_hooks/useKandoFetch.js +0 -82
  294. package/lib-build/shared/utilities/custom_hooks/useQueryURL.js +0 -15
  295. package/lib-build/shared/utilities/custom_hooks/useRemoveExistingLayers.js +0 -34
  296. package/lib-build/shared/utilities/custom_hooks/useUpdateEventBodyTail.js +0 -62
  297. package/lib-build/shared/utilities/i18n.js +0 -33
@@ -1,453 +0,0 @@
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;
@@ -1,30 +0,0 @@
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;
@@ -1,47 +0,0 @@
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;
@@ -1,19 +0,0 @@
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
- }
@@ -1,88 +0,0 @@
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;