react-spatial 1.5.3 → 1.5.5

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 (282) hide show
  1. package/components/BaseLayerSwitcher/BaseLayerSwitcher.js +262 -0
  2. package/components/BaseLayerSwitcher/BaseLayerSwitcher.js.map +7 -0
  3. package/components/BaseLayerSwitcher/index.js +1 -0
  4. package/components/BaseLayerSwitcher/index.js.map +7 -0
  5. package/{src/components → components}/BasicMap/BasicMap.js +80 -170
  6. package/components/BasicMap/BasicMap.js.map +7 -0
  7. package/components/BasicMap/index.js +1 -0
  8. package/components/BasicMap/index.js.map +7 -0
  9. package/{src/components → components}/CanvasSaveButton/CanvasSaveButton.js +133 -278
  10. package/components/CanvasSaveButton/CanvasSaveButton.js.map +7 -0
  11. package/components/CanvasSaveButton/index.js +1 -0
  12. package/components/CanvasSaveButton/index.js.map +7 -0
  13. package/{src/components → components}/Copyright/Copyright.js +21 -41
  14. package/components/Copyright/Copyright.js.map +7 -0
  15. package/components/Copyright/index.js +1 -0
  16. package/components/Copyright/index.js.map +7 -0
  17. package/components/FeatureExportButton/FeatureExportButton.js +80 -0
  18. package/components/FeatureExportButton/FeatureExportButton.js.map +7 -0
  19. package/components/FeatureExportButton/index.js +1 -0
  20. package/components/FeatureExportButton/index.js.map +7 -0
  21. package/{src/components → components}/FitExtent/FitExtent.js +16 -30
  22. package/components/FitExtent/FitExtent.js.map +7 -0
  23. package/components/FitExtent/index.js +1 -0
  24. package/components/FitExtent/index.js.map +7 -0
  25. package/{src/components → components}/Geolocation/Geolocation.js +60 -110
  26. package/components/Geolocation/Geolocation.js.map +7 -0
  27. package/components/Geolocation/index.js +1 -0
  28. package/components/Geolocation/index.js.map +7 -0
  29. package/{src/components → components}/LayerTree/LayerTree.js +113 -213
  30. package/components/LayerTree/LayerTree.js.map +7 -0
  31. package/components/LayerTree/index.js +1 -0
  32. package/components/LayerTree/index.js.map +7 -0
  33. package/{src/components → components}/MousePosition/MousePosition.js +37 -70
  34. package/components/MousePosition/MousePosition.js.map +7 -0
  35. package/components/MousePosition/index.js +1 -0
  36. package/components/MousePosition/index.js.map +7 -0
  37. package/{src/components → components}/NorthArrow/NorthArrow.js +18 -34
  38. package/components/NorthArrow/NorthArrow.js.map +7 -0
  39. package/components/NorthArrow/index.js +1 -0
  40. package/components/NorthArrow/index.js.map +7 -0
  41. package/{src/components → components}/Overlay/Overlay.js +59 -85
  42. package/components/Overlay/Overlay.js.map +7 -0
  43. package/components/Overlay/index.js +1 -0
  44. package/components/Overlay/index.js.map +7 -0
  45. package/{src/components → components}/Permalink/Permalink.js +64 -147
  46. package/components/Permalink/Permalink.js.map +7 -0
  47. package/components/Permalink/index.js +1 -0
  48. package/components/Permalink/index.js.map +7 -0
  49. package/{src/components → components}/Popup/Popup.js +57 -116
  50. package/components/Popup/Popup.js.map +7 -0
  51. package/components/Popup/index.js +1 -0
  52. package/components/Popup/index.js.map +7 -0
  53. package/{src/components → components}/ResizeHandler/ResizeHandler.js +15 -49
  54. package/components/ResizeHandler/ResizeHandler.js.map +7 -0
  55. package/components/ResizeHandler/index.js +1 -0
  56. package/components/ResizeHandler/index.js.map +7 -0
  57. package/components/RouteSchedule/RouteSchedule.js +268 -0
  58. package/components/RouteSchedule/RouteSchedule.js.map +7 -0
  59. package/components/RouteSchedule/index.js +1 -0
  60. package/components/RouteSchedule/index.js.map +7 -0
  61. package/{src/components → components}/ScaleLine/ScaleLine.js +8 -23
  62. package/components/ScaleLine/ScaleLine.js.map +7 -0
  63. package/components/ScaleLine/index.js +1 -0
  64. package/components/ScaleLine/index.js.map +7 -0
  65. package/{src/components → components}/StopsFinder/StopsFinder.js +74 -103
  66. package/components/StopsFinder/StopsFinder.js.map +7 -0
  67. package/components/StopsFinder/StopsFinderOption.js +44 -0
  68. package/components/StopsFinder/StopsFinderOption.js.map +7 -0
  69. package/components/StopsFinder/index.js +1 -0
  70. package/components/StopsFinder/index.js.map +7 -0
  71. package/{src/components → components}/Zoom/Zoom.js +46 -77
  72. package/components/Zoom/Zoom.js.map +7 -0
  73. package/components/Zoom/index.js +1 -0
  74. package/components/Zoom/index.js.map +7 -0
  75. package/package.json +32 -31
  76. package/{src/propTypes.js → propTypes.js} +30 -16
  77. package/propTypes.js.map +7 -0
  78. package/{src/setupTests.js → setupTests.js} +1 -1
  79. package/setupTests.js.map +7 -0
  80. package/utils/GlobalsForOle.js +94 -0
  81. package/utils/GlobalsForOle.js.map +7 -0
  82. package/utils/KML.js +420 -0
  83. package/utils/KML.js.map +7 -0
  84. package/{src/utils → utils}/KMLFormat.js +29 -32
  85. package/utils/KMLFormat.js.map +7 -0
  86. package/{src/utils → utils}/Styles.js +14 -20
  87. package/utils/Styles.js.map +7 -0
  88. package/{src/utils → utils}/getPolygonPattern.js +6 -34
  89. package/utils/getPolygonPattern.js.map +7 -0
  90. package/{src/utils → utils}/timeUtils.js +5 -22
  91. package/utils/timeUtils.js.map +7 -0
  92. package/.github/workflows/conventional-pr-title.yml +0 -21
  93. package/.github/workflows/main.yml +0 -28
  94. package/.husky/commit-msg +0 -4
  95. package/.husky/post-checkout +0 -4
  96. package/.husky/post-merge +0 -4
  97. package/.husky/post-rebase +0 -4
  98. package/.husky/pre-commit +0 -4
  99. package/.nvmrc +0 -1
  100. package/.whitesource +0 -8
  101. package/CHANGELOG.md +0 -65
  102. package/DEVELOP.md +0 -113
  103. package/__mocks__/mapbox-gl.js +0 -11
  104. package/__mocks__/resize-observer-polyfill.js +0 -9
  105. package/babel.config.js +0 -3
  106. package/commitlint.config.js +0 -1
  107. package/data/topic1.js +0 -119
  108. package/data/topic2.js +0 -28
  109. package/doc/README.md +0 -21
  110. package/doc/doc-config.json +0 -4
  111. package/pull_request_template.md +0 -16
  112. package/renovate.json +0 -4
  113. package/scripts/read-pkg-json.js +0 -17
  114. package/src/components/BaseLayerSwitcher/BaseLayerSwitcher.js +0 -322
  115. package/src/components/BaseLayerSwitcher/BaseLayerSwitcher.test.js +0 -69
  116. package/src/components/BaseLayerSwitcher/README.md +0 -61
  117. package/src/components/BaseLayerSwitcher/__snapshots__/BaseLayerSwitcher.test.js.snap +0 -88
  118. package/src/components/BaseLayerSwitcher/index.js +0 -1
  119. package/src/components/BasicMap/BasicMap.test.js +0 -281
  120. package/src/components/BasicMap/README.md +0 -18
  121. package/src/components/BasicMap/index.js +0 -1
  122. package/src/components/CanvasSaveButton/CanvasSaveButton.test.js +0 -148
  123. package/src/components/CanvasSaveButton/README.md +0 -76
  124. package/src/components/CanvasSaveButton/__snapshots__/CanvasSaveButton.test.js.snap +0 -76
  125. package/src/components/CanvasSaveButton/index.js +0 -1
  126. package/src/components/Copyright/Copyright.test.js +0 -134
  127. package/src/components/Copyright/README.md +0 -36
  128. package/src/components/Copyright/index.js +0 -1
  129. package/src/components/FeatureExportButton/FeatureExportButton.js +0 -118
  130. package/src/components/FeatureExportButton/FeatureExportButton.test.js +0 -417
  131. package/src/components/FeatureExportButton/README.md +0 -76
  132. package/src/components/FeatureExportButton/__snapshots__/FeatureExportButton.test.js.snap +0 -67
  133. package/src/components/FeatureExportButton/index.js +0 -1
  134. package/src/components/FitExtent/FitExtent.test.js +0 -48
  135. package/src/components/FitExtent/README.md +0 -34
  136. package/src/components/FitExtent/__snapshots__/FitExtent.test.js.snap +0 -13
  137. package/src/components/FitExtent/index.js +0 -1
  138. package/src/components/Geolocation/Geolocation.test.js +0 -267
  139. package/src/components/Geolocation/README.md +0 -25
  140. package/src/components/Geolocation/__snapshots__/Geolocation.test.js.snap +0 -92
  141. package/src/components/Geolocation/index.js +0 -1
  142. package/src/components/LayerTree/LayerTree.test.js +0 -337
  143. package/src/components/LayerTree/README.md +0 -92
  144. package/src/components/LayerTree/__snapshots__/LayerTree.test.js.snap +0 -1746
  145. package/src/components/LayerTree/index.js +0 -1
  146. package/src/components/MousePosition/MousePosition.test.js +0 -132
  147. package/src/components/MousePosition/README.md +0 -50
  148. package/src/components/MousePosition/__snapshots__/MousePosition.test.js.snap +0 -76
  149. package/src/components/MousePosition/index.js +0 -1
  150. package/src/components/NorthArrow/NorthArrow.test.js +0 -104
  151. package/src/components/NorthArrow/README.md +0 -59
  152. package/src/components/NorthArrow/__snapshots__/NorthArrow.test.js.snap +0 -117
  153. package/src/components/NorthArrow/index.js +0 -1
  154. package/src/components/Overlay/Overlay.test.js +0 -149
  155. package/src/components/Overlay/README.md +0 -59
  156. package/src/components/Overlay/__snapshots__/Overlay.test.js.snap +0 -9
  157. package/src/components/Overlay/index.js +0 -1
  158. package/src/components/Permalink/Permalink.test.js +0 -285
  159. package/src/components/Permalink/README.md +0 -105
  160. package/src/components/Permalink/index.js +0 -1
  161. package/src/components/Popup/Popup.test.js +0 -307
  162. package/src/components/Popup/README.md +0 -93
  163. package/src/components/Popup/__snapshots__/Popup.test.js.snap +0 -180
  164. package/src/components/Popup/index.js +0 -1
  165. package/src/components/README.md +0 -41
  166. package/src/components/ResizeHandler/ResizeHandler.test.js +0 -344
  167. package/src/components/ResizeHandler/index.js +0 -1
  168. package/src/components/RouteSchedule/README.md +0 -118
  169. package/src/components/RouteSchedule/RouteSchedule.js +0 -370
  170. package/src/components/RouteSchedule/RouteSchedule.test.js +0 -113
  171. package/src/components/RouteSchedule/__snapshots__/RouteSchedule.test.js.snap +0 -248
  172. package/src/components/RouteSchedule/index.js +0 -1
  173. package/src/components/ScaleLine/README.md +0 -29
  174. package/src/components/ScaleLine/ScaleLine.test.js +0 -30
  175. package/src/components/ScaleLine/__snapshots__/ScaleLine.test.js.snap +0 -7
  176. package/src/components/ScaleLine/index.js +0 -1
  177. package/src/components/StopsFinder/README.md +0 -50
  178. package/src/components/StopsFinder/StopsFinder.test.js +0 -17
  179. package/src/components/StopsFinder/StopsFinderOption.js +0 -61
  180. package/src/components/StopsFinder/__snapshots__/StopsFinder.test.js.snap +0 -133
  181. package/src/components/StopsFinder/index.js +0 -1
  182. package/src/components/Zoom/README.md +0 -25
  183. package/src/components/Zoom/Zoom.test.js +0 -141
  184. package/src/components/Zoom/__snapshots__/Zoom.test.js.snap +0 -201
  185. package/src/components/Zoom/index.js +0 -1
  186. package/src/styleguidist/ComponentsList.js +0 -52
  187. package/src/styleguidist/StyleGuide.js +0 -277
  188. package/src/styleguidist/styleguidist.css +0 -38
  189. package/src/utils/GlobalsForOle.js +0 -99
  190. package/src/utils/KML.js +0 -594
  191. package/src/utils/KML.test.js +0 -337
  192. package/src/utils/KMLFormat.test.js +0 -50
  193. package/src/utils/__snapshots__/KML.test.js.snap.KML-readFeatures()-and-writeFeatures()-should-read-and-write-lineDash-and-fillPattern-style-for-polygon.canvas-image.png +0 -0
  194. package/src/utils/__snapshots__/getPolygonPattern.test.js.snap.getPolygonPattern()-render-pattern-2-(cross)-color-and-(light-blue)-opacity.canvas-image.png +0 -0
  195. package/src/utils/__snapshots__/getPolygonPattern.test.js.snap.getPolygonPattern()-render-pattern-3-(diagonal-line-from-bottom-left-tot-top-right)-with-color-(light-blue)-and-opacity.canvas-image.png +0 -0
  196. package/src/utils/__snapshots__/getPolygonPattern.test.js.snap.getPolygonPattern()-render-pattern-4-(diagonal-line-from-top-left-to-bottom-right)-with-color-(light-blue)-and-opacity.canvas-image.png +0 -0
  197. package/src/utils/getPolygonPattern.test.js +0 -61
  198. package/src/utils/timeUtils.test.js +0 -30
  199. package/styleguide.config.js +0 -251
  200. /package/{src/components → components}/BaseLayerSwitcher/BaseLayerSwitcher.md.scss +0 -0
  201. /package/{src/components → components}/BaseLayerSwitcher/BaseLayerSwitcher.scss +0 -0
  202. /package/{src/components → components}/BasicMap/BasicMap.md.scss +0 -0
  203. /package/{src/components → components}/CanvasSaveButton/CanvasSaveButton.md.scss +0 -0
  204. /package/{src/components → components}/Copyright/Copyright.md.scss +0 -0
  205. /package/{src/components → components}/FeatureExportButton/FeatureExportButton.md.scss +0 -0
  206. /package/{src/components → components}/FitExtent/FitExtent.md.scss +0 -0
  207. /package/{src/components → components}/Geolocation/Geolocation.md.scss +0 -0
  208. /package/{src/components → components}/Geolocation/Geolocation.scss +0 -0
  209. /package/{src/components → components}/LayerTree/LayerTree.md.scss +0 -0
  210. /package/{src/components → components}/LayerTree/LayerTree.scss +0 -0
  211. /package/{src/components → components}/MousePosition/MousePosition.md.scss +0 -0
  212. /package/{src/components → components}/NorthArrow/NorthArrow.scss +0 -0
  213. /package/{src/components → components}/Overlay/Overlay.md.scss +0 -0
  214. /package/{src/components → components}/Overlay/Overlay.scss +0 -0
  215. /package/{src/components → components}/Permalink/Permalink.md.scss +0 -0
  216. /package/{src/components → components}/Popup/Popup.md.scss +0 -0
  217. /package/{src/components → components}/Popup/Popup.scss +0 -0
  218. /package/{src/components → components}/RouteSchedule/RouteSchedule.md.scss +0 -0
  219. /package/{src/components → components}/RouteSchedule/RouteSchedule.scss +0 -0
  220. /package/{src/components → components}/ScaleLine/ScaleLine.scss +0 -0
  221. /package/{src/components → components}/Zoom/Zoom.md.scss +0 -0
  222. /package/{src/components → components}/Zoom/Zoom.scss +0 -0
  223. /package/{src/images → images}/RouteSchedule/firstStation.png +0 -0
  224. /package/{src/images → images}/RouteSchedule/lastStation.png +0 -0
  225. /package/{src/images → images}/RouteSchedule/line.png +0 -0
  226. /package/{src/images → images}/RouteSchedule/station.png +0 -0
  227. /package/{src/images → images}/baselayer/baselayer.basebright.png +0 -0
  228. /package/{src/images → images}/baselayer/baselayer.osm.png +0 -0
  229. /package/{src/images → images}/baselayer/baselayer.travic.png +0 -0
  230. /package/{src/images → images}/baselayer/open.topo.map.png +0 -0
  231. /package/{src/images → images}/baselayer/osm.baselayer.hot.png +0 -0
  232. /package/{src/images → images}/baselayer/osm.baselayer.png +0 -0
  233. /package/{src/images → images}/favicon.png +0 -0
  234. /package/{src/images → images}/geops_logo.png +0 -0
  235. /package/{src/images → images}/geops_logo.svg +0 -0
  236. /package/{src/images → images}/geops_qr.png +0 -0
  237. /package/{src/images → images}/mots/bus_poi-blue-01.svg +0 -0
  238. /package/{src/images → images}/mots/bus_poi-grey-01.svg +0 -0
  239. /package/{src/images → images}/mots/bus_round-blue-01.svg +0 -0
  240. /package/{src/images → images}/mots/bus_round-grey-01.svg +0 -0
  241. /package/{src/images → images}/mots/bus_square-blue-01.svg +0 -0
  242. /package/{src/images → images}/mots/bus_square-grey-01.svg +0 -0
  243. /package/{src/images → images}/mots/cable_car_poi-blue-01.svg +0 -0
  244. /package/{src/images → images}/mots/cable_car_poi-grey-01.svg +0 -0
  245. /package/{src/images → images}/mots/cable_car_round-blue-01.svg +0 -0
  246. /package/{src/images → images}/mots/cable_car_round-grey-01.svg +0 -0
  247. /package/{src/images → images}/mots/cable_car_square-blue-01.svg +0 -0
  248. /package/{src/images → images}/mots/cable_car_square-grey-01.svg +0 -0
  249. /package/{src/images → images}/mots/ferry_poi-blue-01.svg +0 -0
  250. /package/{src/images → images}/mots/ferry_poi-grey-01.svg +0 -0
  251. /package/{src/images → images}/mots/ferry_round-blue-01.svg +0 -0
  252. /package/{src/images → images}/mots/ferry_round-grey-01.svg +0 -0
  253. /package/{src/images → images}/mots/ferry_square-blue-01.svg +0 -0
  254. /package/{src/images → images}/mots/ferry_square-grey-01.svg +0 -0
  255. /package/{src/images → images}/mots/funicular_round-blue-01.svg +0 -0
  256. /package/{src/images → images}/mots/funicular_round-grey-01.svg +0 -0
  257. /package/{src/images → images}/mots/funicular_square-blue-01.svg +0 -0
  258. /package/{src/images → images}/mots/gondola_round-blue-01.svg +0 -0
  259. /package/{src/images → images}/mots/rail_poi-blue-01.svg +0 -0
  260. /package/{src/images → images}/mots/rail_poi-grey-01.svg +0 -0
  261. /package/{src/images → images}/mots/rail_round-blue-01.svg +0 -0
  262. /package/{src/images → images}/mots/rail_round-grey-01.svg +0 -0
  263. /package/{src/images → images}/mots/rail_square-blue-01.svg +0 -0
  264. /package/{src/images → images}/mots/rail_square-grey-01.svg +0 -0
  265. /package/{src/images → images}/mots/subway_round blue-01.svg +0 -0
  266. /package/{src/images → images}/mots/subway_round-blue-01.svg +0 -0
  267. /package/{src/images → images}/mots/tram_poi-blue-01.svg +0 -0
  268. /package/{src/images → images}/mots/tram_poi-grey-01.svg +0 -0
  269. /package/{src/images → images}/mots/tram_round-blue-01.svg +0 -0
  270. /package/{src/images → images}/mots/tram_round-grey-01.svg +0 -0
  271. /package/{src/images → images}/mots/tram_square-blue-01.svg +0 -0
  272. /package/{src/images → images}/mots/tram_square-grey-01.svg +0 -0
  273. /package/{src/images → images}/northArrow.svg +0 -0
  274. /package/{src/images → images}/northArrow.url.svg +0 -0
  275. /package/{src/images → images}/northArrowCircle.svg +0 -0
  276. /package/{src/images → images}/northArrowCircle.url.svg +0 -0
  277. /package/{src/themes → themes}/README.md +0 -0
  278. /package/{src/themes → themes}/default/components.scss +0 -0
  279. /package/{src/themes → themes}/default/examples.scss +0 -0
  280. /package/{src/themes → themes}/default/index.scss +0 -0
  281. /package/{src/themes → themes}/default/mixins.scss +0 -0
  282. /package/{src/themes → themes}/default/variables.scss +0 -0
@@ -1,248 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`RouteSchedule matches snapshots. 1`] = `
4
- <div
5
- className="rt-route-schedule"
6
- >
7
- <div
8
- className="rt-route-header"
9
- >
10
- <span
11
- className="rt-route-icon"
12
- style={
13
- {
14
- "backgroundColor": "#ffb400",
15
- "color": "black",
16
- }
17
- }
18
- >
19
- 3
20
- </span>
21
- <div
22
- className="rt-route-title"
23
- >
24
- <span
25
- className="rt-route-name"
26
- >
27
- Station name
28
- </span>
29
- <span>
30
- T 3
31
- (3634)
32
- </span>
33
- </div>
34
- <div
35
- className="rt-route-buttons"
36
- >
37
- <div>
38
- Button
39
- </div>
40
- </div>
41
- </div>
42
- <div
43
- className="rt-route-body"
44
- >
45
- <div
46
- className="rt-route-station"
47
- onClick={[Function]}
48
- onKeyPress={[Function]}
49
- role="button"
50
- tabIndex={0}
51
- >
52
- <div
53
- className="rt-route-delay"
54
- >
55
- <span
56
- className="rt-route-delay-departure green"
57
- >
58
- +1m
59
- </span>
60
- </div>
61
- <div
62
- className="rt-route-times"
63
- >
64
- <span
65
- className="rt-route-time-arrival "
66
- >
67
- 09:01
68
- </span>
69
- <span
70
- className="rt-route-time-departure "
71
- >
72
- 09:01
73
- </span>
74
- </div>
75
- <img
76
- alt="routeScheduleLine"
77
- className="rt-route-icon"
78
- src="src"
79
- />
80
- <div
81
- className=""
82
- >
83
- first stop
84
- </div>
85
- </div>
86
- <div
87
- className="rt-route-station"
88
- onClick={[Function]}
89
- onKeyPress={[Function]}
90
- role="button"
91
- tabIndex={0}
92
- >
93
- <div
94
- className="rt-route-delay"
95
- >
96
- <span
97
- className="rt-route-delay-arrival green"
98
- >
99
- +0
100
- </span>
101
- <span
102
- className="rt-route-delay-departure green"
103
- >
104
- +2m
105
- </span>
106
- </div>
107
- <div
108
- className="rt-route-times"
109
- >
110
- <span
111
- className="rt-route-time-arrival "
112
- >
113
- 09:01
114
- </span>
115
- <span
116
- className="rt-route-time-departure "
117
- >
118
- 09:01
119
- </span>
120
- </div>
121
- <img
122
- alt="routeScheduleLine"
123
- className="rt-route-icon"
124
- src="src"
125
- />
126
- <div
127
- className=""
128
- >
129
- second stop
130
- </div>
131
- </div>
132
- <div
133
- className="rt-route-station rt-no-stop"
134
- onClick={[Function]}
135
- onKeyPress={[Function]}
136
- role="button"
137
- tabIndex={0}
138
- >
139
- <div
140
- className="rt-route-delay"
141
- >
142
- <span
143
- className="rt-route-delay-arrival green"
144
- >
145
- +0
146
- </span>
147
- <span
148
- className="rt-route-delay-departure green"
149
- >
150
- +0
151
- </span>
152
- </div>
153
- <div
154
- className="rt-route-times"
155
- >
156
- <span
157
- className="rt-route-time-arrival "
158
- />
159
- <span
160
- className="rt-route-time-departure "
161
- />
162
- </div>
163
- <img
164
- alt="routeScheduleLine"
165
- className="rt-route-icon"
166
- src="src"
167
- />
168
- <div
169
- className=""
170
- >
171
- no stop
172
- </div>
173
- </div>
174
- <div
175
- className="rt-route-station"
176
- onClick={[Function]}
177
- onKeyPress={[Function]}
178
- role="button"
179
- tabIndex={0}
180
- >
181
- <div
182
- className="rt-route-delay"
183
- >
184
- <span
185
- className="rt-route-delay-arrival orange"
186
- >
187
- +4m
188
- </span>
189
- </div>
190
- <div
191
- className="rt-route-times"
192
- >
193
- <span
194
- className="rt-route-time-arrival "
195
- >
196
- 09:01
197
- </span>
198
- <span
199
- className="rt-route-time-departure "
200
- />
201
- </div>
202
- <img
203
- alt="routeScheduleLine"
204
- className="rt-route-icon"
205
- src="src"
206
- />
207
- <div
208
- className=""
209
- >
210
- third stop
211
- </div>
212
- </div>
213
- </div>
214
- <div
215
- className="rt-route-footer"
216
- >
217
- <span
218
- className="rt-route-copyright"
219
- >
220
- <div
221
- className="rt-route-copyright-link"
222
- >
223
- <a
224
- href="foo.ch"
225
- rel="noreferrer"
226
- target="_blank"
227
- >
228
- foo
229
- </a>
230
- </div>
231
- <span>
232
-  - 
233
- </span>
234
- <div
235
- className="rt-route-copyright-link"
236
- >
237
- <a
238
- href="bar.ch"
239
- rel="noreferrer"
240
- target="_blank"
241
- >
242
- bar
243
- </a>
244
- </div>
245
- </span>
246
- </div>
247
- </div>
248
- `;
@@ -1 +0,0 @@
1
- export { default } from './RouteSchedule';
@@ -1,29 +0,0 @@
1
-
2
- The following example demonstrates the use of ScaleLine.
3
-
4
- ```js
5
- import React, { Component } from 'react';
6
- import { MapboxLayer } from 'mobility-toolbox-js/ol';
7
- import Tile from 'ol/layer/Tile';
8
- import OSM from 'ol/source/OSM';
9
- import Map from 'ol/Map';
10
- import BasicMap from 'react-spatial/components/BasicMap';
11
- import ScaleLine from 'react-spatial/components/ScaleLine';
12
-
13
- const map = new Map({ controls: [] });
14
-
15
- const layers = [
16
- new MapboxLayer({
17
- url: `https://maps.geops.io/styles/travic_v2/style.json?key=${apiKey}`,
18
- }),
19
- ];
20
-
21
- <div style={{position:'relative'}}>
22
- <BasicMap
23
- map={map}
24
- layers={layers}
25
- tabIndex={0}
26
- />
27
- <ScaleLine map={map} />
28
- </div>
29
- ```
@@ -1,30 +0,0 @@
1
- import 'jest-canvas-mock';
2
- import React from 'react';
3
- import { configure, mount } from 'enzyme';
4
- import OLMap from 'ol/Map';
5
- import OLView from 'ol/View';
6
- import Adapter from '@cfaester/enzyme-adapter-react-18';
7
- import renderer from 'react-test-renderer';
8
- import ScaleLine from './ScaleLine';
9
-
10
- configure({ adapter: new Adapter() });
11
-
12
- describe('ScaleLine', () => {
13
- test('matches snapshot', () => {
14
- const map = new OLMap({ view: new OLView({ zoom: 7, center: [0, 0] }) });
15
- const component = renderer.create(<ScaleLine map={map} />);
16
- const tree = component.toJSON();
17
- expect(tree).toMatchSnapshot();
18
- });
19
-
20
- test('remove control on unmount.', () => {
21
- const map = new OLMap({});
22
- const spy = jest.spyOn(map, 'removeControl');
23
- const spy2 = jest.spyOn(map, 'addControl');
24
- const wrapper = mount(<ScaleLine map={map} />);
25
- expect(spy).toHaveBeenCalledTimes(0);
26
- wrapper.unmount();
27
- expect(spy).toHaveBeenCalledTimes(1);
28
- expect(spy.mock.calls[0][0]).toBe(spy2.mock.calls[0][0]);
29
- });
30
- });
@@ -1,7 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`ScaleLine matches snapshot 1`] = `
4
- <div
5
- className="rs-scale-line"
6
- />
7
- `;
@@ -1 +0,0 @@
1
- export { default } from './ScaleLine';
@@ -1,50 +0,0 @@
1
-
2
- This demonstrates the use of the StopsFinder component.
3
-
4
- ```jsx
5
- import React from 'react';
6
- import { Layer } from 'mobility-toolbox-js/ol';
7
- import Map from 'ol/Map';
8
- import Tile from 'ol/layer/Tile';
9
- import { fromLonLat } from 'ol/proj';
10
- import OSM from 'ol/source/OSM';
11
- import BasicMap from 'react-spatial/components/BasicMap';
12
- import StopsFinder from 'react-spatial/components/StopsFinder';
13
-
14
- const map = new Map({ controls: [] });
15
-
16
- const layers = [
17
- new Layer({
18
- olLayer: new Tile({
19
- source: new OSM(),
20
- }),
21
- }),
22
- ];
23
-
24
- // The `apiKey` used here is for demonstration purposes only.
25
- // Please get your own api key at https://developer.geops.io/.
26
- const { apiKey } = window;
27
-
28
- <>
29
- <BasicMap
30
- map={map}
31
- center={[951560, 6002550]}
32
- zoom={14}
33
- layers={layers}
34
- tabIndex={0}
35
- />
36
-
37
- <StopsFinder
38
- map={map}
39
- apiKey={apiKey}
40
- onSelect={({ geometry }) => {
41
- map.getView().setCenter(fromLonLat(geometry.coordinates));
42
- }}
43
- autocompleteProps={{
44
- textFieldProps: {
45
- label: 'Search for stops',
46
- },
47
- }}
48
- />
49
- </>
50
- ```
@@ -1,17 +0,0 @@
1
- import React from 'react';
2
- import renderer from 'react-test-renderer';
3
- import { Map } from 'ol';
4
- import StopsFinder from '.';
5
-
6
- describe('StopsFinder', () => {
7
- let map;
8
-
9
- beforeEach(() => {
10
- map = new Map({});
11
- });
12
-
13
- test('matches snapshots.', () => {
14
- const component = renderer.create(<StopsFinder map={map} />);
15
- expect(component.toJSON()).toMatchSnapshot();
16
- });
17
- });
@@ -1,61 +0,0 @@
1
- import React, { lazy, Suspense } from 'react';
2
- import PropTypes from 'prop-types';
3
- import { makeStyles } from '@material-ui/core';
4
-
5
- const ext = '_round-blue-01.svg';
6
- const iconForMot = {};
7
- [
8
- 'bus',
9
- 'ferry',
10
- 'gondola',
11
- 'tram',
12
- 'rail',
13
- 'funicular',
14
- 'cable_car',
15
- 'subway',
16
- ].forEach((mot) => {
17
- iconForMot[mot] = lazy(() => {
18
- return import(`../../images/mots/${mot}${ext}`);
19
- });
20
- });
21
-
22
- const useStyles = makeStyles((theme) => {
23
- return {
24
- flex: {
25
- display: 'flex',
26
- alignItems: 'center',
27
- },
28
- icon: {
29
- marginRight: theme.spacing(2),
30
- },
31
- };
32
- });
33
-
34
- function StopsFinderOption({ option }) {
35
- const classes = useStyles();
36
-
37
- return (
38
- <Suspense fallback={<div />}>
39
- <div className={classes.flex}>
40
- {Object.entries(option.properties.mot).map(([key, value]) => {
41
- if (value) {
42
- const MotIcon = iconForMot[key];
43
- return (
44
- <span className={classes.icon} key={key}>
45
- <MotIcon />
46
- </span>
47
- );
48
- }
49
- return <></>;
50
- })}
51
- <span>{option.properties.name}</span>
52
- </div>
53
- </Suspense>
54
- );
55
- }
56
-
57
- StopsFinderOption.propTypes = {
58
- option: PropTypes.object.isRequired,
59
- };
60
-
61
- export default React.memo(StopsFinderOption);
@@ -1,133 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`StopsFinder matches snapshots. 1`] = `
4
- <div
5
- aria-expanded={false}
6
- aria-owns={null}
7
- className="MuiAutocomplete-root MuiAutocomplete-fullWidth MuiAutocomplete-hasClearIcon MuiAutocomplete-hasPopupIcon"
8
- onClick={[Function]}
9
- onKeyDown={[Function]}
10
- onMouseDown={[Function]}
11
- role="combobox"
12
- >
13
- <div
14
- className="MuiFormControl-root MuiTextField-root MuiFormControl-fullWidth"
15
- >
16
- <label
17
- className="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated"
18
- data-shrink={false}
19
- id="undefined-label"
20
- >
21
- Search stops
22
- </label>
23
- <div
24
- className="MuiInputBase-root MuiInput-root MuiInput-underline MuiAutocomplete-inputRoot MuiInputBase-fullWidth MuiInput-fullWidth MuiInputBase-formControl MuiInput-formControl MuiInputBase-adornedEnd"
25
- onClick={[Function]}
26
- >
27
- <input
28
- aria-activedescendant={null}
29
- aria-autocomplete="both"
30
- aria-controls={null}
31
- aria-invalid={false}
32
- autoCapitalize="none"
33
- autoComplete="off"
34
- autoFocus={false}
35
- className="MuiInputBase-input MuiInput-input MuiAutocomplete-input MuiAutocomplete-inputFocused MuiInputBase-inputAdornedEnd"
36
- disabled={false}
37
- onAnimationStart={[Function]}
38
- onBlur={[Function]}
39
- onChange={[Function]}
40
- onFocus={[Function]}
41
- onMouseDown={[Function]}
42
- required={false}
43
- spellCheck="false"
44
- type="text"
45
- value=""
46
- />
47
- <div
48
- className="MuiAutocomplete-endAdornment"
49
- >
50
- <button
51
- aria-label="Clear"
52
- className="MuiButtonBase-root MuiIconButton-root MuiAutocomplete-clearIndicator"
53
- disabled={false}
54
- onBlur={[Function]}
55
- onClick={[Function]}
56
- onDragLeave={[Function]}
57
- onFocus={[Function]}
58
- onKeyDown={[Function]}
59
- onKeyUp={[Function]}
60
- onMouseDown={[Function]}
61
- onMouseLeave={[Function]}
62
- onMouseUp={[Function]}
63
- onTouchEnd={[Function]}
64
- onTouchMove={[Function]}
65
- onTouchStart={[Function]}
66
- tabIndex={-1}
67
- title="Clear"
68
- type="button"
69
- >
70
- <span
71
- className="MuiIconButton-label"
72
- >
73
- <svg
74
- aria-hidden={true}
75
- className="MuiSvgIcon-root MuiSvgIcon-fontSizeSmall"
76
- focusable="false"
77
- viewBox="0 0 24 24"
78
- >
79
- <path
80
- d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
81
- />
82
- </svg>
83
- </span>
84
- </button>
85
- <button
86
- aria-label="Open"
87
- className="MuiButtonBase-root MuiIconButton-root MuiAutocomplete-popupIndicator"
88
- disabled={false}
89
- onBlur={[Function]}
90
- onClick={[Function]}
91
- onDragLeave={[Function]}
92
- onFocus={[Function]}
93
- onKeyDown={[Function]}
94
- onKeyUp={[Function]}
95
- onMouseDown={[Function]}
96
- onMouseLeave={[Function]}
97
- onMouseUp={[Function]}
98
- onTouchEnd={[Function]}
99
- onTouchMove={[Function]}
100
- onTouchStart={[Function]}
101
- tabIndex={-1}
102
- title="Open"
103
- type="button"
104
- >
105
- <span
106
- className="MuiIconButton-label"
107
- >
108
- <svg
109
- fill="currentColor"
110
- focusable={false}
111
- height={15}
112
- stroke="currentColor"
113
- strokeWidth="0"
114
- style={
115
- {
116
- "color": undefined,
117
- }
118
- }
119
- viewBox="0 0 512 512"
120
- width={15}
121
- xmlns="http://www.w3.org/2000/svg"
122
- >
123
- <path
124
- d="M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"
125
- />
126
- </svg>
127
- </span>
128
- </button>
129
- </div>
130
- </div>
131
- </div>
132
- </div>
133
- `;
@@ -1 +0,0 @@
1
- export { default } from './StopsFinder';
@@ -1,25 +0,0 @@
1
-
2
- The following example demonstrates the use of Zoom.
3
-
4
- ```jsx
5
- import React from 'react';
6
- import { MapboxLayer } from 'mobility-toolbox-js/ol';
7
- import Tile from 'ol/layer/Tile';
8
- import OSM from 'ol/source/OSM';
9
- import Map from 'ol/Map';
10
- import BasicMap from 'react-spatial/components/BasicMap';
11
- import Zoom from 'react-spatial/components/Zoom';
12
-
13
- const map = new Map({ controls: [] });
14
-
15
- const layers = [
16
- new MapboxLayer({
17
- url: `https://maps.geops.io/styles/travic_v2/style.json?key=${apiKey}`,
18
- })
19
- ];
20
-
21
- <div className="rs-zoom-example">
22
- <BasicMap map={map} layers={layers} tabIndex={0} />
23
- <Zoom map={map} zoomSlider />
24
- </div>
25
- ```