@geops/rvf-mobility-web-component 0.1.127 → 0.1.129

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 (621) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/index.js +539 -56
  3. package/package.json +11 -4
  4. package/.fixpackrc +0 -21
  5. package/.github/CODEOWNERS +0 -37
  6. package/.github/workflows/conventional-pr-title.yml +0 -36
  7. package/.husky/commit-msg +0 -1
  8. package/.husky/post-checkout +0 -1
  9. package/.husky/post-merge +0 -1
  10. package/.husky/post-rebase +0 -1
  11. package/.husky/pre-commit +0 -1
  12. package/.lintstagedrc.js +0 -13
  13. package/.nvmrc +0 -1
  14. package/.prettierrc.js +0 -3
  15. package/.vscode/settings.json +0 -2
  16. package/Logo.svg +0 -10
  17. package/__mocks__/dataurl.js +0 -11
  18. package/__mocks__/mapbox-gl.js +0 -19
  19. package/commitlint.config.cjs +0 -1
  20. package/doc/.eslintrc.json +0 -3
  21. package/doc/.fixpackrc +0 -21
  22. package/doc/.prettierrc +0 -1
  23. package/doc/README.md +0 -14
  24. package/doc/next.config.mjs +0 -8
  25. package/doc/package.json +0 -44
  26. package/doc/postcss.config.mjs +0 -8
  27. package/doc/public/ExportMenu-HGGM7Z53.js +0 -229
  28. package/doc/public/README.md +0 -1
  29. package/doc/public/chunk-5TBO732O.js +0 -1
  30. package/doc/public/chunk-7SZT7G2L.js +0 -3
  31. package/doc/public/chunk-AOWOBR67.js +0 -37
  32. package/doc/public/chunk-CZ6RUAVW.js +0 -3
  33. package/doc/public/chunk-FK6H3RFT.js +0 -1
  34. package/doc/public/chunk-L5TSFF6Q.js +0 -6
  35. package/doc/public/chunk-W5KNTEOZ.js +0 -1
  36. package/doc/public/deflate-7Y7TJOU7.js +0 -1
  37. package/doc/public/html2canvas-HSPYX66M.js +0 -28
  38. package/doc/public/index.es-LIBYYWEU.js +0 -23
  39. package/doc/public/jpeg-IRWWL5ZF.js +0 -1
  40. package/doc/public/lerc-NVL4MKRG.js +0 -6
  41. package/doc/public/lzw-EHQHNZB6.js +0 -1
  42. package/doc/public/packbits-PQSBS4GQ.js +0 -1
  43. package/doc/public/purify.es-4R37HRTQ.js +0 -7
  44. package/doc/public/raw-OK63VTT6.js +0 -1
  45. package/doc/public/webimage-DLGKDXZD.js +0 -1
  46. package/doc/public/zstd-JFJYRN7P.js +0 -1
  47. package/doc/src/app/components/GeopsAPIKeyLink.tsx +0 -6
  48. package/doc/src/app/components/GeopsAPIsLink.tsx +0 -6
  49. package/doc/src/app/components/GeopsMapsAPILink.tsx +0 -8
  50. package/doc/src/app/components/GeopsMobility.tsx +0 -23
  51. package/doc/src/app/components/GeopsMobilityDoc.tsx +0 -39
  52. package/doc/src/app/components/GeopsMobilitySearch.tsx +0 -22
  53. package/doc/src/app/components/GeopsMobilitySearchDoc.tsx +0 -33
  54. package/doc/src/app/components/GeopsRealtimeAPILink.tsx +0 -10
  55. package/doc/src/app/components/GeopsStopsAPILink.tsx +0 -8
  56. package/doc/src/app/components/Link.tsx +0 -9
  57. package/doc/src/app/components/WebComponentDoc.tsx +0 -284
  58. package/doc/src/app/favicon.ico +0 -0
  59. package/doc/src/app/geops-mobility/page.tsx +0 -11
  60. package/doc/src/app/geops-mobility-search/page.tsx +0 -11
  61. package/doc/src/app/globals.css +0 -58
  62. package/doc/src/app/hooks/useAttrFromUrlParams.ts +0 -21
  63. package/doc/src/app/hooks/useIsFullScreen.ts +0 -14
  64. package/doc/src/app/hooks/usePublicKey.ts +0 -19
  65. package/doc/src/app/layout.tsx +0 -53
  66. package/doc/src/app/page.tsx +0 -86
  67. package/doc/src/geops-ui.ts +0 -3
  68. package/doc/tsconfig.json +0 -41
  69. package/docutils.js +0 -417
  70. package/eslint.config.mjs +0 -34
  71. package/favicon.ico +0 -0
  72. package/fonts/source-sans-3/source-sans-3-v15-latin-500.ttf +0 -0
  73. package/fonts/source-sans-3/source-sans-3-v15-latin-500.woff2 +0 -0
  74. package/fonts/source-sans-3/source-sans-3-v15-latin-600.ttf +0 -0
  75. package/fonts/source-sans-3/source-sans-3-v15-latin-600.woff2 +0 -0
  76. package/fonts/source-sans-3/source-sans-3-v15-latin-700.ttf +0 -0
  77. package/fonts/source-sans-3/source-sans-3-v15-latin-700.woff2 +0 -0
  78. package/fonts/source-sans-3/source-sans-3-v15-latin-regular.ttf +0 -0
  79. package/fonts/source-sans-3/source-sans-3-v15-latin-regular.woff2 +0 -0
  80. package/global.d.ts +0 -9
  81. package/iframe.html +0 -233
  82. package/index.html +0 -147
  83. package/index.js +0 -4343
  84. package/input.css +0 -59
  85. package/jest-setup.js +0 -13
  86. package/jest.config.js +0 -17
  87. package/notifications.html +0 -144
  88. package/scripts/build.mjs +0 -15
  89. package/scripts/dev.mjs +0 -27
  90. package/search.html +0 -122
  91. package/src/BaseLayer/BaseLayer.tsx +0 -61
  92. package/src/BaseLayer/index.tsx +0 -1
  93. package/src/Copyright/Copyright.tsx +0 -51
  94. package/src/Copyright/index.tsx +0 -1
  95. package/src/DebugDeparture/DebugDeparture.tsx +0 -120
  96. package/src/DebugDeparture/index.tsx +0 -1
  97. package/src/DebugStop/DebugStop.tsx +0 -47
  98. package/src/DebugStop/index.tsx +0 -1
  99. package/src/Departure/Departure.tsx +0 -57
  100. package/src/Departure/index.tsx +0 -1
  101. package/src/EmbedNavigation/DragPanWarning.ts +0 -133
  102. package/src/EmbedNavigation/EmbedNavigation.tsx +0 -89
  103. package/src/EmbedNavigation/index.js +0 -1
  104. package/src/EmbedNavigation/index.tsx +0 -1
  105. package/src/ExportMenu/ExportMenu.tsx +0 -114
  106. package/src/ExportMenu/index.tsx +0 -1
  107. package/src/ExportMenuButton/ExportMenuButton.tsx +0 -33
  108. package/src/ExportMenuButton/index.tsx +0 -1
  109. package/src/FeatureDetails/FeatureDetails.tsx +0 -62
  110. package/src/FeatureDetails/index.ts +0 -1
  111. package/src/FeaturesInfosListener/FeaturesInfosListener.tsx +0 -142
  112. package/src/FeaturesInfosListener/index.tsx +0 -1
  113. package/src/GeolocationButton/GeolocationButton.tsx +0 -78
  114. package/src/GeolocationButton/index.tsx +0 -1
  115. package/src/I18n/I18n.tsx +0 -38
  116. package/src/I18n/index.tsx +0 -1
  117. package/src/LayerTree/LayerTree.tsx +0 -58
  118. package/src/LayerTree/TreeItem/TreeItem.tsx +0 -153
  119. package/src/LayerTree/TreeItem/index.tsx +0 -1
  120. package/src/LayerTree/index.tsx +0 -1
  121. package/src/LayerTree/layersTreeContext.ts +0 -4
  122. package/src/LayerTree/layersTreeReducer.ts +0 -158
  123. package/src/LayerTreeButton/LayerTreeButton.tsx +0 -33
  124. package/src/LayerTreeButton/index.tsx +0 -1
  125. package/src/LayerTreeMenu/LayerTreeMenu.tsx +0 -147
  126. package/src/LayerTreeMenu/index.tsx +0 -1
  127. package/src/LayoutState/LayoutState.tsx +0 -380
  128. package/src/LayoutState/index.tsx +0 -1
  129. package/src/LinesNetworkPlanDetails/LinesNetworkPlanDetails.tsx +0 -274
  130. package/src/LinesNetworkPlanDetails/index.tsx +0 -1
  131. package/src/LinesNetworkPlanLayer/LinesNetworkPlanLayer.tsx +0 -51
  132. package/src/LinesNetworkPlanLayer/index.tsx +0 -1
  133. package/src/LinesNetworkPlanLayerHighlight/LinesNetworkPlanLayerHighlight.tsx +0 -59
  134. package/src/LinesNetworkPlanLayerHighlight/index.tsx +0 -1
  135. package/src/Map/Map.tsx +0 -166
  136. package/src/Map/index.tsx +0 -1
  137. package/src/MapDispatchEvents/MapDispatchEvents.tsx +0 -87
  138. package/src/MapDispatchEvents/index.tsx +0 -1
  139. package/src/MapLayout/MapLayout.tsx +0 -172
  140. package/src/MapLayout/index.tsx +0 -1
  141. package/src/MapsetLayer/MapsetLayer.tsx +0 -111
  142. package/src/MapsetLayer/index.tsx +0 -1
  143. package/src/MobilityMap/MobilityMap.tsx +0 -338
  144. package/src/MobilityMap/MobilityMapAttributes.test.ts +0 -59
  145. package/src/MobilityMap/MobilityMapAttributes.ts +0 -381
  146. package/src/MobilityMap/MobilityMapEvents.ts +0 -53
  147. package/src/MobilityMap/index.css +0 -0
  148. package/src/MobilityMap/index.tsx +0 -2
  149. package/src/MobilityNotifications/MobilityNotifications.tsx +0 -153
  150. package/src/MobilityNotifications/MobilityNotificationsAttributes.test.ts +0 -35
  151. package/src/MobilityNotifications/MobilityNotificationsAttributes.ts +0 -53
  152. package/src/MobilityNotifications/index.ts +0 -2
  153. package/src/MobilitySearch/MobilitySearch.tsx +0 -35
  154. package/src/MobilitySearch/MobilitySearchAttributes.test.ts +0 -21
  155. package/src/MobilitySearch/MobilitySearchAttributes.ts +0 -87
  156. package/src/MobilitySearch/MobilitySearchEvents.ts +0 -21
  157. package/src/MobilitySearch/index.ts +0 -2
  158. package/src/NotificationDetails/NotificationDetails.tsx +0 -309
  159. package/src/NotificationDetails/index.ts +0 -1
  160. package/src/NotificationsLayer/NotificationsLayer.tsx +0 -118
  161. package/src/NotificationsLayer/index.tsx +0 -1
  162. package/src/Overlay/Overlay.tsx +0 -61
  163. package/src/Overlay/index.tsx +0 -1
  164. package/src/OverlayContent/OverlayContent.tsx +0 -88
  165. package/src/OverlayContent/index.ts +0 -1
  166. package/src/OverlayDetails/OverlayDetails.tsx +0 -93
  167. package/src/OverlayDetails/index.ts +0 -1
  168. package/src/OverlayDetailsFooter/OverlayDetailsFooter.tsx +0 -50
  169. package/src/OverlayDetailsFooter/index.tsx +0 -1
  170. package/src/OverlayDetailsHeader/OverlayDetailsHeader.tsx +0 -30
  171. package/src/OverlayDetailsHeader/index.ts +0 -1
  172. package/src/OverlayFooter/OverlayFooter.tsx +0 -42
  173. package/src/OverlayFooter/index.tsx +0 -1
  174. package/src/OverlayHeader/OverlayHeader.tsx +0 -44
  175. package/src/OverlayHeader/index.tsx +0 -1
  176. package/src/Permalink/Permalink.tsx +0 -89
  177. package/src/Permalink/index.tsx +0 -1
  178. package/src/PermalinkInput/PermalinkInput.tsx +0 -33
  179. package/src/PermalinkInput/index.tsx +0 -1
  180. package/src/RealtimeLayer/RealtimeLayer.tsx +0 -299
  181. package/src/RealtimeLayer/index.tsx +0 -1
  182. package/src/RouteDestination/RouteDestination.test.tsx +0 -13
  183. package/src/RouteDestination/RouteDestination.tsx +0 -15
  184. package/src/RouteDestination/index.tsx +0 -1
  185. package/src/RouteFollowingButton/RouteFollowingButton.tsx +0 -30
  186. package/src/RouteFollowingButton/index.tsx +0 -1
  187. package/src/RouteIcon/RouteIcon.tsx +0 -99
  188. package/src/RouteIcon/index.tsx +0 -1
  189. package/src/RouteIdentifier/RouteIdentifer.tsx +0 -36
  190. package/src/RouteIdentifier/index.tsx +0 -1
  191. package/src/RouteInfos/RouteInfos.tsx +0 -26
  192. package/src/RouteInfos/index.tsx +0 -1
  193. package/src/RouteSchedule/RouteSchedule.tsx +0 -59
  194. package/src/RouteSchedule/firstStation.png +0 -0
  195. package/src/RouteSchedule/index.tsx +0 -1
  196. package/src/RouteSchedule/lastStation.png +0 -0
  197. package/src/RouteSchedule/line.png +0 -0
  198. package/src/RouteSchedule/station.png +0 -0
  199. package/src/RouteScheduleFooter/RouteScheduleFooter.tsx +0 -46
  200. package/src/RouteScheduleFooter/index.tsx +0 -1
  201. package/src/RouteScheduleHeader/RouteScheduleHeader.tsx +0 -23
  202. package/src/RouteScheduleHeader/index.tsx +0 -1
  203. package/src/RouteStop/RouteStop.tsx +0 -108
  204. package/src/RouteStop/index.tsx +0 -1
  205. package/src/RouteStopDelay/RouteStopDelay.tsx +0 -37
  206. package/src/RouteStopDelay/index.tsx +0 -1
  207. package/src/RouteStopName/RouteStopName.tsx +0 -24
  208. package/src/RouteStopName/index.tsx +0 -1
  209. package/src/RouteStopPlatform/RouteStopPlatform.tsx +0 -27
  210. package/src/RouteStopPlatform/index.tsx +0 -1
  211. package/src/RouteStopProgress/RouteStopProgress.tsx +0 -100
  212. package/src/RouteStopProgress/index.tsx +0 -1
  213. package/src/RouteStopServices/RouteStopServices.tsx +0 -26
  214. package/src/RouteStopServices/index.tsx +0 -1
  215. package/src/RouteStopStation/RouteStopStation.tsx +0 -38
  216. package/src/RouteStopStation/index.tsx +0 -1
  217. package/src/RouteStopTime/RouteStopTime.tsx +0 -35
  218. package/src/RouteStopTime/index.tsx +0 -1
  219. package/src/RvfButton/RvfButton.tsx +0 -57
  220. package/src/RvfButton/index.tsx +0 -1
  221. package/src/RvfCheckbox/RvfCheckbox.tsx +0 -31
  222. package/src/RvfCheckbox/index.tsx +0 -1
  223. package/src/RvfCopyright/RvfCopyright.tsx +0 -36
  224. package/src/RvfCopyright/index.tsx +0 -1
  225. package/src/RvfFeatureDetails/RvfFeatureDetails.tsx +0 -46
  226. package/src/RvfFeatureDetails/RvfLineNetworkDetails/RvfLineNetworkDetails.tsx +0 -292
  227. package/src/RvfFeatureDetails/RvfLineNetworkDetails/index.js +0 -1
  228. package/src/RvfFeatureDetails/RvfNotificationDetails/RvfNotificationDetails.tsx +0 -36
  229. package/src/RvfFeatureDetails/RvfNotificationDetails/index.ts +0 -1
  230. package/src/RvfFeatureDetails/RvfSellingPointDetails/RvfSellingPointDetails.tsx +0 -50
  231. package/src/RvfFeatureDetails/RvfSellingPointDetails/index.js +0 -1
  232. package/src/RvfFeatureDetails/RvfSharedMobilityDetail/FloatingVehiclesDetails/FloatingVehiclesDetails.tsx +0 -74
  233. package/src/RvfFeatureDetails/RvfSharedMobilityDetail/FloatingVehiclesDetails/index.tsx +0 -1
  234. package/src/RvfFeatureDetails/RvfSharedMobilityDetail/RvfSharedMobilityDetails.tsx +0 -134
  235. package/src/RvfFeatureDetails/RvfSharedMobilityDetail/StationDetails/StationDetails.tsx +0 -84
  236. package/src/RvfFeatureDetails/RvfSharedMobilityDetail/StationDetails/index.tsx +0 -1
  237. package/src/RvfFeatureDetails/RvfSharedMobilityDetail/index.tsx +0 -1
  238. package/src/RvfFeatureDetails/index.tsx +0 -1
  239. package/src/RvfIconButton/RvfIconButton.tsx +0 -49
  240. package/src/RvfIconButton/index.tsx +0 -1
  241. package/src/RvfInputCopy/RvfInputCopy.tsx +0 -67
  242. package/src/RvfInputCopy/index.tsx +0 -1
  243. package/src/RvfLink/RvfLink.tsx +0 -54
  244. package/src/RvfLink/index.tsx +0 -1
  245. package/src/RvfMainLinkButton/RvfMainLinkButton.tsx +0 -62
  246. package/src/RvfMainLinkButton/index.tsx +0 -1
  247. package/src/RvfMapLayout/RvfMapLayout.tsx +0 -202
  248. package/src/RvfMapLayout/index.tsx +0 -1
  249. package/src/RvfMobilityMap/RvfMobilityMap.tsx +0 -58
  250. package/src/RvfMobilityMap/index.css +0 -13
  251. package/src/RvfMobilityMap/index.tsx +0 -1
  252. package/src/RvfModal/RvfModal.tsx +0 -53
  253. package/src/RvfModal/index.tsx +0 -1
  254. package/src/RvfOpenStrikeNotification/RvfOpenStrikeNotification.tsx +0 -120
  255. package/src/RvfOpenStrikeNotification/index.tsx +0 -1
  256. package/src/RvfOverlayHeader/RvfOverlayHeader.tsx +0 -43
  257. package/src/RvfOverlayHeader/index.tsx +0 -1
  258. package/src/RvfPoisLayer/RvfPoisLayer.tsx +0 -48
  259. package/src/RvfPoisLayer/index.tsx +0 -1
  260. package/src/RvfRadioButton/RvfRadioButton.tsx +0 -16
  261. package/src/RvfRadioButton/index.tsx +0 -1
  262. package/src/RvfRealtimeLayer/RvfRealtimeLayer.tsx +0 -77
  263. package/src/RvfRealtimeLayer/index.tsx +0 -1
  264. package/src/RvfRouteIcon/RvfRouteIcon.tsx +0 -10
  265. package/src/RvfRouteIcon/index.tsx +0 -1
  266. package/src/RvfSearch/RvfSearch.tsx +0 -34
  267. package/src/RvfSearch/index.tsx +0 -1
  268. package/src/RvfSelect/RvfSelect.tsx +0 -24
  269. package/src/RvfSelect/index.tsx +0 -1
  270. package/src/RvfSelectedFeatureHighlightLayer/RvfSelectedFeatureHighlightLayer.tsx +0 -101
  271. package/src/RvfSelectedFeatureHighlightLayer/index.tsx +0 -1
  272. package/src/RvfSellingPointsLayer/RvfSellingPointsLayer.tsx +0 -67
  273. package/src/RvfSellingPointsLayer/index.tsx +0 -1
  274. package/src/RvfSharedMobilityLayerGroup/RvfSharedMobilityLayerGroup.tsx +0 -479
  275. package/src/RvfSharedMobilityLayerGroup/index.tsx +0 -1
  276. package/src/RvfStationsLayer/RvfStationsLayer.tsx +0 -19
  277. package/src/RvfStationsLayer/index.tsx +0 -1
  278. package/src/RvfTarifZonenLayer/RvfTarifZonenLayer.tsx +0 -48
  279. package/src/RvfTarifZonenLayer/index.tsx +0 -1
  280. package/src/ScaleLine/ScaleLine.tsx +0 -52
  281. package/src/ScaleLine/index.css +0 -6
  282. package/src/ScaleLine/index.tsx +0 -1
  283. package/src/ScrollableHandler/ScrollableHandler.tsx +0 -66
  284. package/src/ScrollableHandler/index.tsx +0 -1
  285. package/src/Search/Search.tsx +0 -50
  286. package/src/Search/SearchBase.tsx +0 -187
  287. package/src/Search/SearchHeadless.tsx +0 -79
  288. package/src/Search/index.tsx +0 -3
  289. package/src/SearchButton/SearchButton.tsx +0 -33
  290. package/src/SearchButton/index.tsx +0 -1
  291. package/src/SearchLinesResult/SearchLinesResult.tsx +0 -43
  292. package/src/SearchLinesResult/index.tsx +0 -1
  293. package/src/SearchLinesResults/SearchLinesResults.tsx +0 -106
  294. package/src/SearchLinesResults/index.tsx +0 -1
  295. package/src/SearchLnpStopsResult/SearchLnpStopsResult.tsx +0 -42
  296. package/src/SearchLnpStopsResult/index.tsx +0 -1
  297. package/src/SearchLnpStopsResults/SearchLnpStopsResults.tsx +0 -106
  298. package/src/SearchLnpStopsResults/index.tsx +0 -1
  299. package/src/SearchResult/SearchResult.tsx +0 -25
  300. package/src/SearchResult/index.tsx +0 -1
  301. package/src/SearchResults/SearchResults.tsx +0 -81
  302. package/src/SearchResults/index.tsx +0 -1
  303. package/src/SearchResultsHeader/SearchResultsHeader.tsx +0 -36
  304. package/src/SearchResultsHeader/index.tsx +0 -1
  305. package/src/SearchStopsResult/SearchStopsResult.tsx +0 -43
  306. package/src/SearchStopsResult/index.tsx +0 -1
  307. package/src/SearchStopsResults/SearchStopsResults.tsx +0 -101
  308. package/src/SearchStopsResults/index.tsx +0 -1
  309. package/src/SearchTrainsResult/SearchTrainsResult.tsx +0 -42
  310. package/src/SearchTrainsResult/index.tsx +0 -1
  311. package/src/SearchTrainsResults/SearchTrainsResults.tsx +0 -106
  312. package/src/SearchTrainsResults/index.tsx +0 -1
  313. package/src/ShadowOverflow/ShadowOverflow.tsx +0 -28
  314. package/src/ShadowOverflow/index.tsx +0 -1
  315. package/src/ShareMenu/ShareMenu.tsx +0 -43
  316. package/src/ShareMenu/index.tsx +0 -1
  317. package/src/ShareMenuButton/ShareMenuButton.tsx +0 -34
  318. package/src/ShareMenuButton/index.tsx +0 -1
  319. package/src/SingleClickListener/SingleClickListener.tsx +0 -164
  320. package/src/SingleClickListener/index.tsx +0 -1
  321. package/src/SituationDetails/SituationDetails.tsx +0 -370
  322. package/src/SituationDetails/index.ts +0 -1
  323. package/src/Station/Station.tsx +0 -50
  324. package/src/Station/index.tsx +0 -1
  325. package/src/StationHeader/StationHeader.tsx +0 -32
  326. package/src/StationHeader/index.tsx +0 -1
  327. package/src/StationName/StationName.tsx +0 -21
  328. package/src/StationName/index.tsx +0 -1
  329. package/src/StationServices/StationServices.tsx +0 -80
  330. package/src/StationServices/index.tsx +0 -1
  331. package/src/StationsLayer/StationsLayer.tsx +0 -53
  332. package/src/StationsLayer/index.tsx +0 -1
  333. package/src/StopsSearch/StopsSearch.tsx +0 -344
  334. package/src/StopsSearch/index.tsx +0 -1
  335. package/src/WindowMessageListener/WindowMessageListener.tsx +0 -74
  336. package/src/WindowMessageListener/index.tsx +0 -1
  337. package/src/ZoomButtons/ZoomButtons.tsx +0 -80
  338. package/src/ZoomButtons/index.tsx +0 -1
  339. package/src/icons/Airport/Airport.tsx +0 -17
  340. package/src/icons/Airport/airport-14-svgrepo-com.svg +0 -1
  341. package/src/icons/Airport/index.tsx +0 -1
  342. package/src/icons/ArrowDown/ArrowDown.tsx +0 -22
  343. package/src/icons/ArrowDown/down-open.svg +0 -1
  344. package/src/icons/ArrowDown/index.tsx +0 -1
  345. package/src/icons/ArrowRight/ArrowRight.tsx +0 -19
  346. package/src/icons/ArrowRight/arrow-right.svg +0 -1
  347. package/src/icons/ArrowRight/index.tsx +0 -1
  348. package/src/icons/ArrowUp/ArrowUp.tsx +0 -22
  349. package/src/icons/ArrowUp/index.tsx +0 -1
  350. package/src/icons/ArrowUp/up-open.svg +0 -1
  351. package/src/icons/ArrowUpRight/ArrowUpRight.tsx +0 -35
  352. package/src/icons/ArrowUpRight/index.tsx +0 -1
  353. package/src/icons/ArrowUpRight/up-open.svg +0 -1
  354. package/src/icons/Automat/Automat.tsx +0 -8
  355. package/src/icons/Automat/index.tsx +0 -1
  356. package/src/icons/Automat/rvf_automat.svg +0 -1
  357. package/src/icons/BarAndRestaurants/BarAndRestaurants.tsx +0 -17
  358. package/src/icons/BarAndRestaurants/food-restaurant-svgrepo-com.svg +0 -1
  359. package/src/icons/BarAndRestaurants/index.tsx +0 -1
  360. package/src/icons/Bathroom/Bathroom.tsx +0 -59
  361. package/src/icons/Bathroom/bathroom-restroom-svgrepo-com.svg +0 -1
  362. package/src/icons/Bathroom/index.tsx +0 -1
  363. package/src/icons/Bike/Bike.tsx +0 -8
  364. package/src/icons/Bike/index.tsx +0 -1
  365. package/src/icons/Bike/rvf_shared_bike.svg +0 -1
  366. package/src/icons/BikeStorage/BikeStorage.tsx +0 -17
  367. package/src/icons/BikeStorage/index.tsx +0 -1
  368. package/src/icons/BikeStorage/parking-bicycle-14-svgrepo-com.svg +0 -1
  369. package/src/icons/Cancel/Cancel.tsx +0 -21
  370. package/src/icons/Cancel/cancel.svg +0 -1
  371. package/src/icons/Cancel/index.tsx +0 -1
  372. package/src/icons/Car/Car.tsx +0 -8
  373. package/src/icons/Car/index.tsx +0 -1
  374. package/src/icons/Car/rvf_shared_car.svg +0 -1
  375. package/src/icons/CargoBike/CargoBike.tsx +0 -8
  376. package/src/icons/CargoBike/index.tsx +0 -1
  377. package/src/icons/CargoBike/rvf_shared_cargo_bike.svg +0 -1
  378. package/src/icons/Copy/Copy.tsx +0 -25
  379. package/src/icons/Copy/index.tsx +0 -1
  380. package/src/icons/Doc/Doc.tsx +0 -19
  381. package/src/icons/Doc/doc.svg +0 -1
  382. package/src/icons/Doc/index.tsx +0 -1
  383. package/src/icons/DownOpen/DownOpen.tsx +0 -24
  384. package/src/icons/DownOpen/down-open.svg +0 -1
  385. package/src/icons/DownOpen/index.tsx +0 -1
  386. package/src/icons/Download/Download.tsx +0 -20
  387. package/src/icons/Download/download.svg +0 -1
  388. package/src/icons/Download/index.tsx +0 -1
  389. package/src/icons/Ebike/Ebike.tsx +0 -8
  390. package/src/icons/Ebike/index.tsx +0 -1
  391. package/src/icons/Ebike/rvf_shared_e-bike.svg +0 -1
  392. package/src/icons/Elevator/Elevator.tsx +0 -16
  393. package/src/icons/Elevator/elevator-svgrepo-com.svg +0 -1
  394. package/src/icons/Elevator/index.tsx +0 -1
  395. package/src/icons/Email/Email.tsx +0 -19
  396. package/src/icons/Email/email.svg +0 -1
  397. package/src/icons/Email/index.tsx +0 -1
  398. package/src/icons/FilePdf/FilePdf.tsx +0 -19
  399. package/src/icons/FilePdf/file-pdf.svg +0 -1
  400. package/src/icons/FilePdf/index.tsx +0 -1
  401. package/src/icons/Geolocation/Geolocation.tsx +0 -19
  402. package/src/icons/Geolocation/index.tsx +0 -1
  403. package/src/icons/Geolocation/location.svg +0 -1
  404. package/src/icons/Image/Image.tsx +0 -24
  405. package/src/icons/Image/index.tsx +0 -1
  406. package/src/icons/InPerson/InPerson.tsx +0 -8
  407. package/src/icons/InPerson/index.tsx +0 -1
  408. package/src/icons/InPerson/rvf_persoenlich.svg +0 -1
  409. package/src/icons/Menu/Menu.tsx +0 -32
  410. package/src/icons/Menu/index.tsx +0 -1
  411. package/src/icons/Menu/menu.svg +0 -1
  412. package/src/icons/Minus/Minus.tsx +0 -19
  413. package/src/icons/Minus/index.tsx +0 -1
  414. package/src/icons/Minus/minus-grey.svg +0 -1
  415. package/src/icons/Minus/minus.svg +0 -1
  416. package/src/icons/NoRealtime/NoRealtime.tsx +0 -44
  417. package/src/icons/NoRealtime/index.tsx +0 -1
  418. package/src/icons/NoRealtime/norealtime.svg +0 -1
  419. package/src/icons/Ok/ok-grey.svg +0 -1
  420. package/src/icons/Ok/ok.svg +0 -1
  421. package/src/icons/Plus/Plus.tsx +0 -19
  422. package/src/icons/Plus/index.tsx +0 -1
  423. package/src/icons/Plus/plus.svg +0 -1
  424. package/src/icons/Police/Police.tsx +0 -20
  425. package/src/icons/Police/index.tsx +0 -1
  426. package/src/icons/Police/polizia.png +0 -0
  427. package/src/icons/README.md +0 -52
  428. package/src/icons/Ride/Ride.tsx +0 -8
  429. package/src/icons/Ride/index.tsx +0 -1
  430. package/src/icons/Ride/rvf_shared_ride.svg +0 -1
  431. package/src/icons/Scooter/Scooter.tsx +0 -8
  432. package/src/icons/Scooter/index.tsx +0 -1
  433. package/src/icons/Scooter/rvf_shared_scooter.svg +0 -1
  434. package/src/icons/Search/Search.tsx +0 -38
  435. package/src/icons/Search/index.tsx +0 -1
  436. package/src/icons/Search/search.svg +0 -1
  437. package/src/icons/Share/Share.tsx +0 -24
  438. package/src/icons/Share/index.tsx +0 -1
  439. package/src/icons/Stack/Stack.tsx +0 -24
  440. package/src/icons/Stack/index.tsx +0 -1
  441. package/src/icons/TouchFingers/TouchFingers.tsx +0 -20
  442. package/src/icons/TouchFingers/index.tsx +0 -1
  443. package/src/icons/Tracking/Tracking.tsx +0 -29
  444. package/src/icons/Tracking/airport-14-svgrepo-com.svg +0 -1
  445. package/src/icons/Tracking/index.tsx +0 -1
  446. package/src/icons/Video/Video.tsx +0 -8
  447. package/src/icons/Video/index.tsx +0 -1
  448. package/src/icons/Video/rvf_video.svg +0 -1
  449. package/src/icons/WaitingAreas/WaitingAreas.tsx +0 -16
  450. package/src/icons/WaitingAreas/highway-rest-area-svgrepo-com.svg +0 -1
  451. package/src/icons/WaitingAreas/index.tsx +0 -1
  452. package/src/icons/WaitingAreas/wheelchair-svgrepo-com.svg +0 -1
  453. package/src/icons/Warning/Warning.tsx +0 -56
  454. package/src/icons/Warning/exported_features_20251029101203.kml +0 -20
  455. package/src/icons/Warning/index.tsx +0 -1
  456. package/src/icons/Warning/info-achtung-kreisrot-rot.svg +0 -1
  457. package/src/icons/WheelChair/WheelChair.tsx +0 -16
  458. package/src/icons/WheelChair/disabili.png +0 -0
  459. package/src/icons/WheelChair/index.tsx +0 -1
  460. package/src/icons/WheelChair/wheelchair-svgrepo-com.svg +0 -1
  461. package/src/icons/disruption-type-banner.xcf +0 -0
  462. package/src/icons/rvf_shared_ride_2.svg +0 -1
  463. package/src/icons/sbb_add_stop.png +0 -0
  464. package/src/icons/sbb_add_stop.svg +0 -1
  465. package/src/icons/sbb_alternative.png +0 -0
  466. package/src/icons/sbb_alternative.svg +0 -1
  467. package/src/icons/sbb_cancellation.png +0 -0
  468. package/src/icons/sbb_cancellation.svg +0 -1
  469. package/src/icons/sbb_construction.png +0 -0
  470. package/src/icons/sbb_construction.svg +0 -1
  471. package/src/icons/sbb_construction_banner.png +0 -0
  472. package/src/icons/sbb_delay.png +0 -0
  473. package/src/icons/sbb_delay.svg +0 -1
  474. package/src/icons/sbb_disruption.png +0 -0
  475. package/src/icons/sbb_disruption.svg +0 -1
  476. package/src/icons/sbb_disruption_banner.png +0 -0
  477. package/src/icons/sbb_info.png +0 -0
  478. package/src/icons/sbb_info.svg +0 -1
  479. package/src/icons/sbb_missed_connection.png +0 -0
  480. package/src/icons/sbb_missed_connection.svg +0 -1
  481. package/src/icons/sbb_missed_connection_banner.png +0 -0
  482. package/src/icons/sbb_platform_change.png +0 -0
  483. package/src/icons/sbb_platform_change.svg +0 -1
  484. package/src/icons/sbb_replacementbus.png +0 -0
  485. package/src/icons/sbb_replacementbus.svg +0 -1
  486. package/src/icons/sbb_replacementbus_banner.png +0 -0
  487. package/src/icons/sbb_reroute.png +0 -0
  488. package/src/icons/sbb_reroute.svg +0 -1
  489. package/src/icons/warning-banner.png +0 -0
  490. package/src/icons/warning-banner.xcf +0 -0
  491. package/src/icons/warning.png +0 -0
  492. package/src/index.tsx +0 -44
  493. package/src/indexDoc.ts +0 -35
  494. package/src/logos/00_RegioRad_Stuttgart.svg +0 -1
  495. package/src/logos/01_Call_a_bike.svg +0 -1
  496. package/src/logos/03_KVV_nextbike.svg +0 -1
  497. package/src/logos/05_VrnNextbike.svg +0 -1
  498. package/src/logos/2em_carsharing.svg +0 -1
  499. package/src/logos/CarSharing-Renningen.png +0 -0
  500. package/src/logos/aubonne-basel-pickebike.svg +0 -1
  501. package/src/logos/br_logo.svg +0 -1
  502. package/src/logos/callabike_logo.png +0 -0
  503. package/src/logos/carsharing_stadtmobil_karlsruhe_rhein_neckar.svg +0 -1
  504. package/src/logos/compte-mobilite.png +0 -0
  505. package/src/logos/deer.svg +0 -1
  506. package/src/logos/donkey_republic.png +0 -0
  507. package/src/logos/edrive_carsharing.svg +0 -1
  508. package/src/logos/flinkster_logo.png +0 -0
  509. package/src/logos/gruene-flotte-logo-1.svg +0 -1
  510. package/src/logos/gruene_flotte_logo.png +0 -0
  511. package/src/logos/lasten_velo_freiburg.png +0 -0
  512. package/src/logos/lie_mobil.svg +0 -1
  513. package/src/logos/logo-einfach-mobil-ortenau.png +0 -0
  514. package/src/logos/logo-red.svg +0 -1
  515. package/src/logos/logo_frelo_web_rgb.png +0 -0
  516. package/src/logos/logo_teilauto.png +0 -0
  517. package/src/logos/mein_konrad.svg +0 -1
  518. package/src/logos/mit_fahr_punkt.png +0 -0
  519. package/src/logos/natur_energie_logo.png +0 -0
  520. package/src/logos/natur_energie_logo.xcf +0 -0
  521. package/src/logos/publibike_logo.svg +0 -1
  522. package/src/logos/share-birrer.svg +0 -1
  523. package/src/logos/stadtmobil_suedbaden.svg +0 -1
  524. package/src/logos/stadtwerke_tauberfranken.png +0 -0
  525. package/src/logos/teilauto_biberach.png +0 -0
  526. package/src/logos/velospot_fribourg.png +0 -0
  527. package/src/logos/yoio_logo.png +0 -0
  528. package/src/logos/zeag_carsharing.png +0 -0
  529. package/src/logos/zeo_carsharing.png +0 -0
  530. package/src/logos/zeus_logo.png +0 -0
  531. package/src/logos/zeus_logo.xcf +0 -0
  532. package/src/ui/Button/Button.tsx +0 -64
  533. package/src/ui/Button/index.tsx +0 -1
  534. package/src/ui/Checkbox/Checkbox.tsx +0 -32
  535. package/src/ui/Checkbox/index.tsx +0 -1
  536. package/src/ui/IconButton/IconButton.tsx +0 -64
  537. package/src/ui/IconButton/index.tsx +0 -1
  538. package/src/ui/Input/Input.tsx +0 -24
  539. package/src/ui/Input/index.tsx +0 -1
  540. package/src/ui/InputCopy/InputCopy.tsx +0 -97
  541. package/src/ui/InputCopy/index.tsx +0 -1
  542. package/src/ui/InputSearch/InputSearch.tsx +0 -106
  543. package/src/ui/InputSearch/index.tsx +0 -1
  544. package/src/ui/Link/Link.tsx +0 -49
  545. package/src/ui/Link/index.tsx +0 -1
  546. package/src/ui/Select/Select.tsx +0 -24
  547. package/src/ui/Select/index.tsx +0 -1
  548. package/src/utils/MobilityEvent.ts +0 -22
  549. package/src/utils/applyInitialLayerVisibility.ts +0 -48
  550. package/src/utils/centerOnVehicle.ts +0 -58
  551. package/src/utils/constants.ts +0 -242
  552. package/src/utils/exportPdf.ts +0 -671
  553. package/src/utils/fullTrajectoryStyle.ts +0 -53
  554. package/src/utils/getAllLayers.ts +0 -26
  555. package/src/utils/getBgColor.ts +0 -20
  556. package/src/utils/getDelayColor.test.ts +0 -23
  557. package/src/utils/getDelayColor.ts +0 -23
  558. package/src/utils/getDelayColorForVehicle.test.ts +0 -47
  559. package/src/utils/getDelayColorForVehicle.ts +0 -27
  560. package/src/utils/getDelayString.test.ts +0 -25
  561. package/src/utils/getDelayString.ts +0 -28
  562. package/src/utils/getDelayTextForVehicle.test.ts +0 -32
  563. package/src/utils/getDelayTextForVehicle.ts +0 -25
  564. package/src/utils/getFullTrajectoryAndFit.ts +0 -41
  565. package/src/utils/getHoursAndMinutes.test.ts +0 -15
  566. package/src/utils/getHoursAndMinutes.ts +0 -22
  567. package/src/utils/getLayersAsFlatArray.ts +0 -22
  568. package/src/utils/getLinkByDevice.ts +0 -23
  569. package/src/utils/getMainColorForVehicle.test.ts +0 -25
  570. package/src/utils/getMainColorForVehicle.ts +0 -54
  571. package/src/utils/getPermalinkParameters.ts +0 -35
  572. package/src/utils/getRadius.ts +0 -46
  573. package/src/utils/getStopStatus.test.ts +0 -105
  574. package/src/utils/getStopStatus.ts +0 -171
  575. package/src/utils/getTextColor.ts +0 -10
  576. package/src/utils/getTextColorForVehicle.ts +0 -31
  577. package/src/utils/getTextFontForVehicle.test.ts +0 -7
  578. package/src/utils/getTextFontForVehicle.tsx +0 -17
  579. package/src/utils/getTextForVehicle.test.ts +0 -17
  580. package/src/utils/getTextForVehicle.ts +0 -25
  581. package/src/utils/getUrlFromTemplate.test.ts +0 -23
  582. package/src/utils/getUrlFromTemplate.ts +0 -47
  583. package/src/utils/highlightLinesNetworkPlan.ts +0 -25
  584. package/src/utils/hooks/useDebug.tsx +0 -11
  585. package/src/utils/hooks/useDeparture.tsx +0 -24
  586. package/src/utils/hooks/useFit.tsx +0 -57
  587. package/src/utils/hooks/useFitOnFeatures.tsx +0 -77
  588. package/src/utils/hooks/useI18n.tsx +0 -23
  589. package/src/utils/hooks/useInitialLayersVisiblity.tsx +0 -58
  590. package/src/utils/hooks/useInitialPermalink.tsx +0 -93
  591. package/src/utils/hooks/useLayerConfig.tsx +0 -17
  592. package/src/utils/hooks/useLayersConfig.tsx +0 -49
  593. package/src/utils/hooks/useLnp.tsx +0 -146
  594. package/src/utils/hooks/useMapContext.tsx +0 -166
  595. package/src/utils/hooks/useMocoSituation.tsx +0 -62
  596. package/src/utils/hooks/useParams.ts +0 -5
  597. package/src/utils/hooks/usePermalink.tsx +0 -25
  598. package/src/utils/hooks/useRealtimeDepartures.tsx +0 -45
  599. package/src/utils/hooks/useRealtimeRenderedTrajectory.tsx +0 -42
  600. package/src/utils/hooks/useRealtimeStation.tsx +0 -39
  601. package/src/utils/hooks/useRealtimeStopSequences.tsx +0 -43
  602. package/src/utils/hooks/useRealtimeTrainsByRouteIdentifier.tsx +0 -72
  603. package/src/utils/hooks/useRouteStop.tsx +0 -40
  604. package/src/utils/hooks/useRvfContext.tsx +0 -46
  605. package/src/utils/hooks/useScrollTo.tsx +0 -36
  606. package/src/utils/hooks/useSearchLines.tsx +0 -34
  607. package/src/utils/hooks/useSearchLnpStops.tsx +0 -38
  608. package/src/utils/hooks/useSearchStops.tsx +0 -85
  609. package/src/utils/hooks/useSearchTrains.tsx +0 -83
  610. package/src/utils/hooks/useZoom.tsx +0 -44
  611. package/src/utils/mergePublications.test.ts +0 -91
  612. package/src/utils/mergePublications.ts +0 -52
  613. package/src/utils/realtimeRVFStyle.ts +0 -523
  614. package/src/utils/sharingGraphqlUtils.ts +0 -320
  615. package/src/utils/sharingStylesUtils.ts +0 -222
  616. package/src/utils/sharingWFSUtils.ts +0 -116
  617. package/src/utils/translations.ts +0 -252
  618. package/src/utils/translationsReasons.ts +0 -716
  619. package/tailwind.config.mjs +0 -95
  620. package/testNotification.json +0 -115
  621. package/tsconfig.json +0 -12
@@ -1,26 +0,0 @@
1
- import Group from "ol/layer/Group";
2
-
3
- import type { Collection } from "ol";
4
- import type BaseLayer from "ol/layer/Base";
5
-
6
- const getAllLayers = (
7
- layersOrLayerGroup: BaseLayer[] | Collection<BaseLayer> | Group,
8
- ) => {
9
- const allLayers = [];
10
- function addLayersFrom(layers: BaseLayer[] | Collection<BaseLayer>) {
11
- layers.forEach(function (layer) {
12
- if (layer instanceof Group) {
13
- addLayersFrom(layer.getLayers());
14
- } else {
15
- allLayers.push(layer);
16
- }
17
- });
18
- }
19
- addLayersFrom(
20
- (layersOrLayerGroup as Group)?.getLayers?.() ||
21
- (layersOrLayerGroup as BaseLayer[] | Collection<BaseLayer>),
22
- );
23
- return allLayers;
24
- };
25
-
26
- export default getAllLayers;
@@ -1,20 +0,0 @@
1
- import { realtimeConfig } from "mobility-toolbox-js/ol";
2
-
3
- import { LINE_COLOR_BY_NAME } from "./constants";
4
-
5
- import type { RealtimeLine, RealtimeMot } from "mobility-toolbox-js/types";
6
-
7
- const getBgColor = (type: RealtimeMot, line: Partial<RealtimeLine>) => {
8
- if (type === "bus") {
9
- return "#646363";
10
- }
11
- if (type === "tram") {
12
- const lineColor = LINE_COLOR_BY_NAME[line?.name];
13
- if (lineColor) {
14
- return lineColor;
15
- }
16
- }
17
- return realtimeConfig.getColorForType(type);
18
- };
19
-
20
- export default getBgColor;
@@ -1,23 +0,0 @@
1
- import getDelayColor from "./getDelayColor";
2
-
3
- describe("getDelayColor", () => {
4
- it("returns green", () => {
5
- expect(getDelayColor(0.5 * 60 * 1000)).toBe("transparent");
6
- expect(getDelayColor(2.49 * 60 * 1000)).toBe("transparent");
7
- expect(getDelayColor(0)).toBe("transparent");
8
- });
9
- // it("returns yellow", () => {
10
- // expect(getDelayColor(3 * 60 * 1000)).toBe("#ca8a04");
11
- // expect(getDelayColor(4.49 * 60 * 1000 - 1)).toBe("#ca8a04");
12
- // });
13
- it("returns orange", () => {
14
- expect(getDelayColor(3 * 60 * 1000)).toBe("#ea580c");
15
- expect(getDelayColor(5 * 60 * 1000)).toBe("#ea580c");
16
- });
17
-
18
- it("returns red", () => {
19
- expect(getDelayColor(9.49 * 60 * 1000 - 1)).toBe("#dc2626");
20
- expect(getDelayColor(10 * 60 * 1000)).toBe("#dc2626");
21
- expect(getDelayColor(180 * 60 * 1000)).toBe("#dc2626");
22
- });
23
- });
@@ -1,23 +0,0 @@
1
- /**
2
- * Returns a color class to display the delay.
3
- * @param {Number} time Delay time in milliseconds.
4
- */
5
- const getDelayColor = (timeInMs: number, isText = false) => {
6
- // we use rounded value to fit the getDelayString method.
7
- const minutes = Math.round(timeInMs / 1000 / 60);
8
- // if (minutes >= 60) {
9
- // }
10
- if (minutes > 5) {
11
- return "#dc2626"; // "text-red-600";
12
- }
13
- if (minutes >= 3) {
14
- return "#ea580c"; // "text-orange-600";
15
- // return "#d97706"; // "text-amber-600";
16
- }
17
- // if (minutes >= 3) {
18
- // return "#ca8a04"; // "text-yellow-600";
19
- // }
20
- return isText ? "#16a34a" : "transparent"; // "text-green-600";
21
- };
22
-
23
- export default getDelayColor;
@@ -1,47 +0,0 @@
1
- import getDelayColorForVehicle from "./getDelayColorForVehicle";
2
-
3
- describe("getDelayColorForVehicle", () => {
4
- it("returns cancelled color", () => {
5
- expect(getDelayColorForVehicle(null, null, 0, true, true)).toBe("#dc2626");
6
- expect(getDelayColorForVehicle(null, null, 0, true, false)).toBe("#a0a0a0");
7
- });
8
-
9
- it("returns null delay (no realtime train) color", () => {
10
- expect(getDelayColorForVehicle(null)).toBe("transparent");
11
- });
12
-
13
- it("returns transparent", () => {
14
- expect(getDelayColorForVehicle(null, null, 0)).toBe("transparent");
15
- expect(getDelayColorForVehicle(null, null, 1 * 60 * 1000)).toBe(
16
- "transparent",
17
- );
18
- expect(getDelayColorForVehicle(null, null, 0.4 * 60 * 1000)).toBe(
19
- "transparent",
20
- );
21
- });
22
- // it("returns green", () => {
23
- // expect(getDelayColorForVehicle(0)).toBe("#16a34a");
24
- // expect(getDelayColorForVehicle(2.49 * 60 * 1000)).toBe("#16a34a");
25
- // });
26
- // it("returns yellow", () => {
27
- // expect(getDelayColorForVehicle(3 * 60 * 1000)).toBe("#ca8a04");
28
- // expect(getDelayColorForVehicle(4.49 * 60 * 1000 - 1)).toBe("#ca8a04");
29
- // });
30
- it("returns orange", () => {
31
- expect(getDelayColorForVehicle(null, null, 3 * 60 * 1000)).toBe("#ea580c");
32
- expect(getDelayColorForVehicle(null, null, 4.49 * 60 * 1000 - 1)).toBe(
33
- "#ea580c",
34
- );
35
- expect(getDelayColorForVehicle(null, null, 5 * 60 * 1000)).toBe("#ea580c");
36
- });
37
-
38
- it("returns red", () => {
39
- expect(getDelayColorForVehicle(null, null, 9.49 * 60 * 1000 - 1)).toBe(
40
- "#dc2626",
41
- );
42
- expect(getDelayColorForVehicle(null, null, 10 * 60 * 1000)).toBe("#dc2626");
43
- expect(getDelayColorForVehicle(null, null, 180 * 60 * 1000)).toBe(
44
- "#dc2626",
45
- );
46
- });
47
- });
@@ -1,27 +0,0 @@
1
- import getDelayColor from "./getDelayColor";
2
-
3
- import type { ViewState } from "mobility-toolbox-js/types";
4
-
5
- /**
6
- * Return the delay color depending on an object representing a vehicle or a line.
7
- * This function is used to have the same color on the map and on other components.
8
- */
9
- const getDelayColorForVehicle = (
10
- object?: unknown,
11
- viewState?: ViewState,
12
- delayInMs?: number,
13
- cancelled?: boolean,
14
- isDelayText?: boolean,
15
- ): string => {
16
- if (cancelled) {
17
- return isDelayText
18
- ? "#dc2626" // "text-red-600";
19
- : "#a0a0a0"; // gray
20
- }
21
- if (delayInMs === null) {
22
- return "transparent";
23
- }
24
- return getDelayColor(delayInMs, isDelayText);
25
- };
26
-
27
- export default getDelayColorForVehicle;
@@ -1,25 +0,0 @@
1
- import getDelayString from "./getDelayString";
2
-
3
- describe("getDelayString", () => {
4
- it("returns hours (floor)", () => {
5
- expect(getDelayString(7200000)).toBe("2h");
6
- expect(getDelayString(7255555)).toBe("2h1m");
7
- });
8
-
9
- it("returns minutes (round)", () => {
10
- expect(getDelayString(120000)).toBe("2m");
11
- expect(getDelayString(151000)).toBe("3m");
12
- });
13
-
14
- it("doesn't display seconds", () => {
15
- expect(getDelayString(1000)).toBe("0");
16
- expect(getDelayString(30000)).toBe("1m");
17
- expect(getDelayString(7255555)).toBe("2h1m");
18
- });
19
-
20
- it("returns defsult 0 value", () => {
21
- expect(getDelayString(0)).toBe("0");
22
- expect(getDelayString(null)).toBe("0");
23
- expect(getDelayString(undefined)).toBe("0");
24
- });
25
- });
@@ -1,28 +0,0 @@
1
- /**
2
- * Returns a string representing a delay.
3
- * @param {Number} timeInMs Delay time in milliseconds.
4
- * @ignore
5
- */
6
- const getDelayString = (delayInMs: number) => {
7
- let timeInMs = delayInMs;
8
- if (timeInMs < 0) {
9
- timeInMs = 0;
10
- }
11
- const h = Math.floor(timeInMs / 3600000);
12
- const m = Math.round((timeInMs % 3600000) / 60000);
13
- // const s = Math.floor(((timeInMs % 3600000) % 60000) / 1000);
14
-
15
- let str = "";
16
- if (h > 0) {
17
- str += `${h}h`;
18
- }
19
- if (m > 0) {
20
- str += `${m}m`;
21
- }
22
- // if (s > 0) {
23
- // str += `${s}s`;
24
- // }
25
- return str || "0";
26
- };
27
-
28
- export default getDelayString;
@@ -1,32 +0,0 @@
1
- import getDelayTextForVehicle from "./getDelayTextForVehicle";
2
-
3
- describe("getDelayTextForVehicle", () => {
4
- it("returns cancelled character", () => {
5
- expect(getDelayTextForVehicle(null, null, 7200000, true)).toBe(
6
- String.fromCodePoint(0x00d7),
7
- );
8
- });
9
-
10
- it("returns hours (floor)", () => {
11
- expect(getDelayTextForVehicle(null, null, 7200000)).toBe("+2h");
12
- expect(getDelayTextForVehicle(null, null, 7255555)).toBe("+2h1m");
13
- });
14
-
15
- it("returns minutes (round)", () => {
16
- expect(getDelayTextForVehicle(null, null, 120000)).toBe("+2m");
17
- expect(getDelayTextForVehicle(null, null, 151000)).toBe("+3m");
18
- });
19
-
20
- it("doesn't display seconds", () => {
21
- expect(getDelayTextForVehicle(null, null, 1000)).toBe("");
22
- expect(getDelayTextForVehicle(null, null, 30000)).toBe("+1m");
23
- expect(getDelayTextForVehicle(null, null, 7255555)).toBe("+2h1m");
24
- });
25
-
26
- it("returns empty value", () => {
27
- expect(getDelayTextForVehicle(null, null, 1000)).toBe("");
28
- expect(getDelayTextForVehicle(null, null, null)).toBe("");
29
- expect(getDelayTextForVehicle(null, null, undefined)).toBe("");
30
- expect(getDelayTextForVehicle(null, null, 0)).toBe("");
31
- });
32
- });
@@ -1,25 +0,0 @@
1
- import getDelayString from "./getDelayString";
2
-
3
- import type { RealtimeTrajectory, ViewState } from "mobility-toolbox-js/types";
4
-
5
- /**
6
- * This function returns the text displays near the vehicle.
7
- * We use getDelayString inside it to make sure that RouteSchedule and
8
- * the map have the same values.
9
- */
10
- const getDelayTextForVehicle = (
11
- trajectory: RealtimeTrajectory,
12
- viewState: ViewState,
13
- delayInMs: number,
14
- cancelled = false,
15
- ): string => {
16
- if (cancelled) {
17
- return String.fromCodePoint(0x00d7);
18
- }
19
- const delayString = getDelayString(delayInMs);
20
- if (delayString === "0") {
21
- return "";
22
- }
23
- return `+${delayString}`;
24
- };
25
- export default getDelayTextForVehicle;
@@ -1,41 +0,0 @@
1
- import { GeoJSON } from "ol/format";
2
- import { Vector } from "ol/source";
3
-
4
- import type { RealtimeLayer } from "mobility-toolbox-js/ol";
5
- import type { RealtimeTrainId } from "mobility-toolbox-js/types";
6
- import type { Map } from "ol";
7
-
8
- const getFullTrajectoryAndFit = async (
9
- map: Map,
10
- realtimeLayer: RealtimeLayer,
11
- trainId: RealtimeTrainId,
12
- targetZoom = 0,
13
- ) => {
14
- // TO IMPROVE:
15
- // We should be able to get a trajectory directly but it does not work because the trajectory is outside the bbox
16
- // see /BAHNMW-805 and TGSRVI-1126
17
- // So we get the full trajectory then zoom on it.
18
-
19
- const fullTrajectory = await realtimeLayer.api.getFullTrajectory(
20
- trainId,
21
- realtimeLayer.mode,
22
- realtimeLayer.engine.generalizationLevelByZoom[targetZoom],
23
- );
24
- if (fullTrajectory?.content?.features?.length) {
25
- const extent = new Vector({
26
- features: new GeoJSON().readFeatures(fullTrajectory.content),
27
- }).getExtent();
28
-
29
- const promise = new Promise((resolve) => {
30
- map.getView().fit(extent, {
31
- callback: (success) => {
32
- resolve(success);
33
- },
34
- });
35
- });
36
- return promise;
37
- }
38
- return Promise.resolve(false);
39
- };
40
-
41
- export default getFullTrajectoryAndFit;
@@ -1,15 +0,0 @@
1
- import getHoursAndMinutes from "./getHoursAndMinutes";
2
-
3
- describe("getHoursAndMinutes", () => {
4
- it("returns hours and minutes", () => {
5
- expect(getHoursAndMinutes(7200000)).toBe("02:00");
6
- expect(getHoursAndMinutes(72999999)).toBe("20:16");
7
- });
8
-
9
- it("returns empty string", () => {
10
- expect(getHoursAndMinutes(null)).toBe("");
11
- expect(getHoursAndMinutes(undefined)).toBe("");
12
- expect(getHoursAndMinutes(0)).toBe("");
13
- expect(getHoursAndMinutes(-500000)).toBe("");
14
- });
15
- });
@@ -1,22 +0,0 @@
1
- /**
2
- * Returns a string representation of a number, with a zero if the number is lower than 10.
3
- * @ignore
4
- */
5
- const pad = (integer: number) => {
6
- return integer < 10 ? `0${integer}` : integer;
7
- };
8
-
9
- /**
10
- * Returns a 'hh:mm' string from a time in ms.
11
- * @param {Number} timeInMs Time in milliseconds.
12
- * @ignore
13
- */
14
- const getHoursAndMinutes = (timeInMs: number) => {
15
- if (!timeInMs || timeInMs <= 0) {
16
- return "";
17
- }
18
- const date = new Date(timeInMs);
19
- return `${pad(date.getHours())}:${pad(date.getMinutes())}`;
20
- };
21
-
22
- export default getHoursAndMinutes;
@@ -1,22 +0,0 @@
1
- import type { Group } from "ol/layer";
2
- import type BaseLayer from "ol/layer/Base";
3
-
4
- const getLayersAsFlatArray = (
5
- layersOrLayer: BaseLayer | BaseLayer[],
6
- ): BaseLayer[] => {
7
- let layers = layersOrLayer;
8
- if (!Array.isArray(layers)) {
9
- layers = [layersOrLayer as BaseLayer];
10
- }
11
- let flatLayers: BaseLayer[] = [];
12
- layers.forEach((layer: BaseLayer) => {
13
- flatLayers.push(layer);
14
- // Handle children property and ol.layer.Group
15
- const children =
16
- layer.get("children") || (layer as Group).getLayers?.()?.getArray();
17
- flatLayers = flatLayers.concat(getLayersAsFlatArray(children || []));
18
- });
19
- return flatLayers;
20
- };
21
-
22
- export default getLayersAsFlatArray;
@@ -1,23 +0,0 @@
1
- import type { Feature } from "ol";
2
-
3
- function getLinkByDevice(feature: Feature): string {
4
- const iosLink = feature?.get("rental_uris_ios");
5
- const androidLink = feature?.get("rental_uris_android");
6
- const webLink = feature?.get("rental_uris_web");
7
- if (
8
- iosLink &&
9
- (navigator.userAgent.includes("iPhone") ||
10
- navigator.userAgent.includes("iPad") ||
11
- navigator.userAgent.includes("iPod"))
12
- ) {
13
- return iosLink;
14
- }
15
-
16
- if (androidLink && navigator.userAgent.includes("Android")) {
17
- return androidLink;
18
- }
19
-
20
- return webLink;
21
- }
22
-
23
- export default getLinkByDevice;
@@ -1,25 +0,0 @@
1
- // import getMainColorForVehicle from "./getMainColorForVehicle";
2
-
3
- describe.skip("getTextForVehicle", () => {
4
- it("returns default rail color", () => {
5
- // expect(getMainColorForVehicle()).toBe("#ff8080");
6
- // expect(getMainColorForVehicle(null)).toBe("#ff8080");
7
- // expect(getMainColorForVehicle({ train_type: 178 })).toBe("#ff8080");
8
- // expect(getMainColorForVehicle({ vehicleType: 178 })).toBe("#ff8080");
9
- });
10
- // it("returns color", () => {
11
- // expect(getMainColorForVehicle({ color: "foo" })).toBe("#foo");
12
- // expect(getMainColorForVehicle({ line: { color: "#foo" } })).toBe("#foo");
13
- // expect(
14
- // getMainColorForVehicle({ properties: { line: { color: "foo" } } }),
15
- // ).toBe("#foo");
16
- // });
17
- // it("returns type color", () => {
18
- // expect(getMainColorForVehicle({ type: "tram" })).toBe("#ffb400");
19
- // expect(getMainColorForVehicle({ properties: { type: "tram" } })).toBe(
20
- // "#ffb400",
21
- // );
22
- // expect(getMainColorForVehicle({ vehicleType: 0 })).toBe("#ffb400");
23
- // expect(getMainColorForVehicle({ train_type: 0 })).toBe("#ffb400");
24
- // // });
25
- });
@@ -1,54 +0,0 @@
1
- import { realtimeStyleUtils } from "mobility-toolbox-js/ol";
2
-
3
- import getBgColor from "./getBgColor";
4
-
5
- import type {
6
- RealtimeDeparture,
7
- RealtimeLine,
8
- RealtimeMot,
9
- RealtimeStopSequence,
10
- RealtimeTrajectory,
11
- } from "mobility-toolbox-js/types";
12
-
13
- /**
14
- * Return the color depending on an object representing a vehicle or a line.
15
- * This function is used to have the same color on the map and on other components.
16
- */
17
- const getMainColorForVehicle = (object: unknown = null): string => {
18
- const line =
19
- (object as RealtimeTrajectory)?.properties?.line ||
20
- (object as RealtimeStopSequence)?.line ||
21
- (object as RealtimeLine);
22
-
23
- let color = line?.color;
24
- if (!color) {
25
- let type: RealtimeMot =
26
- (object as RealtimeTrajectory)?.properties?.type ||
27
- (object as RealtimeStopSequence)?.type;
28
-
29
- if (!type) {
30
- let typeNumber: number = (object as RealtimeStopSequence)?.vehicleType;
31
-
32
- if (!Number.isFinite(typeNumber)) {
33
- typeNumber = (object as RealtimeDeparture)?.train_type;
34
- }
35
-
36
- if (Number.isFinite(typeNumber)) {
37
- type = typeNumber as unknown as RealtimeMot;
38
- } else {
39
- type = "rail";
40
- }
41
- }
42
- color =
43
- getBgColor(type, line) ||
44
- realtimeStyleUtils.getColorForType(type) ||
45
- realtimeStyleUtils.getColorForType("rail");
46
- }
47
-
48
- if (color && !color.startsWith("#")) {
49
- color = `#${color}`;
50
- }
51
-
52
- return color;
53
- };
54
- export default getMainColorForVehicle;
@@ -1,35 +0,0 @@
1
- import { getLayersAsFlatArray } from "mobility-toolbox-js/ol";
2
-
3
- import type { Map } from "ol";
4
-
5
- // This function return URL parameters representing a map.
6
- const getPermalinkParameters = (
7
- map: Map,
8
- urlParams: URLSearchParams = new URLSearchParams(),
9
- ): URLSearchParams => {
10
- const z = map.getView().getZoom();
11
- const [x, y] = map.getView().getCenter() || [];
12
- const layers = getLayersAsFlatArray(map.getLayers().getArray())
13
- .filter((layer) => {
14
- return layer.get("name") && layer.getVisible();
15
- })
16
- .map((layer) => {
17
- return layer.get("name");
18
- });
19
-
20
- urlParams.set("layers", layers.join(","));
21
- if (x >= 0) {
22
- urlParams.set("x", x.toFixed(2));
23
- }
24
-
25
- if (y >= 0) {
26
- urlParams.set("y", y.toFixed(2));
27
- }
28
-
29
- if (z >= 0) {
30
- urlParams.set("z", z.toFixed(1));
31
- }
32
- return urlParams;
33
- };
34
-
35
- export default getPermalinkParameters;
@@ -1,46 +0,0 @@
1
- import { realtimeConfig } from "mobility-toolbox-js/ol";
2
-
3
- import type { RealtimeMot } from "mobility-toolbox-js/types";
4
-
5
- // mobility-portal config
6
- const trackerRadiusMapping = {
7
- 0: [0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 3, 3, 4, 4, 6, 7, 7], // Tram
8
- 1: [0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 3, 3, 4, 4, 6, 7, 7], // Subway
9
- 2: [0, 0, 0, 0, 0, 2, 2, 2, 2, 3, 3, 4, 4, 6, 7, 12, 15], // Train
10
- 3: [0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 3, 3, 4, 6, 6, 6], // Bus
11
- 4: [0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 3, 3, 6, 7, 12, 15], // Ferry
12
- 5: [0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 3, 3, 4, 6, 7, 7], // Cable car
13
- 6: [0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 3, 3, 4, 6, 7, 7], // Gondola
14
- 7: [0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 3, 3, 4, 6, 7, 7], // Funicular
15
- 8: [0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 3, 3, 4, 6, 6, 6], // Long distance bus
16
- 9: [0, 0, 0, 0, 0, 2, 2, 2, 2, 3, 3, 4, 4, 6, 7, 12, 15], // Rail
17
- };
18
-
19
- const radiusMapping: Record<number, number[]> = trackerRadiusMapping;
20
- // [
21
- // [0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7],
22
- // [0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7],
23
- // [0, 0, 0, 0, 0, 2, 2, 3, 7, 7, 7, 7, 7, 7, 12, 12, 15], // [0, 0, 0, 0, 0, 2, 2, 3, 7, 7, 7, 12, 15, 15, 15, 15, 15],
24
- // [0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7],
25
- // [0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7],
26
- // [0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7],
27
- // [0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7],
28
- // [0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7],
29
- // [0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7],
30
- // [0, 0, 0, 0, 0, 2, 2, 3, 7, 7, 7, 7, 7, 7, 12, 12, 15],
31
- // ];
32
-
33
- export const getRadius = (
34
- type: number | RealtimeMot = 0,
35
- zoom = 0,
36
- cancelled = false,
37
- ) => {
38
- const z = Math.min(Math.floor(zoom || 1), 16);
39
- try {
40
- const typeIdx = realtimeConfig.getTypeIndex(type);
41
- return radiusMapping[typeIdx][z] * (cancelled ? 2 : 1);
42
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
43
- } catch (e) {
44
- return 1;
45
- }
46
- };