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,52 +1,46 @@
1
- import { Fill, Stroke, Circle, Style, Text } from 'ol/style';
2
-
3
- // Default style for Ol
1
+ import { Fill, Stroke, Circle, Style, Text } from "ol/style";
4
2
  const fill = new Fill({
5
- color: 'rgba(255,255,255,0.4)',
3
+ color: "rgba(255,255,255,0.4)"
6
4
  });
7
5
  const stroke = new Stroke({
8
- color: '#3399CC',
9
- width: 1.25,
6
+ color: "#3399CC",
7
+ width: 1.25
10
8
  });
11
9
  const dfltOlStyle = new Style({
12
10
  image: new Circle({
13
11
  fill,
14
12
  stroke,
15
- radius: 5,
13
+ radius: 5
16
14
  }),
17
15
  fill,
18
- stroke,
16
+ stroke
19
17
  });
20
-
21
- // Default style for KML layer
22
18
  const kmlFill = new Fill({
23
- color: [255, 0, 0, 0.7],
19
+ color: [255, 0, 0, 0.7]
24
20
  });
25
21
  const kmlStroke = new Stroke({
26
22
  color: [255, 0, 0, 1],
27
- width: 1.5,
23
+ width: 1.5
28
24
  });
29
25
  const kmlcircle = new Circle({
30
26
  radius: 7,
31
27
  fill: kmlFill,
32
- stroke: kmlStroke,
28
+ stroke: kmlStroke
33
29
  });
34
30
  const kmlStyle = new Style({
35
31
  fill: kmlFill,
36
32
  stroke: kmlStroke,
37
33
  image: kmlcircle,
38
34
  text: new Text({
39
- font: 'normal 16px Helvetica',
35
+ font: "normal 16px Helvetica",
40
36
  fill: kmlFill,
41
37
  stroke: new Stroke({
42
38
  color: [255, 255, 255, 1],
43
- width: 3,
44
- }),
45
- }),
39
+ width: 3
40
+ })
41
+ })
46
42
  });
47
-
48
43
  export { kmlStyle };
49
-
50
44
  export default {
51
- default: dfltOlStyle,
45
+ default: dfltOlStyle
52
46
  };
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/utils/Styles.js"],
4
+ "sourcesContent": ["import { Fill, Stroke, Circle, Style, Text } from 'ol/style';\n\n// Default style for Ol\nconst fill = new Fill({\n color: 'rgba(255,255,255,0.4)',\n});\nconst stroke = new Stroke({\n color: '#3399CC',\n width: 1.25,\n});\nconst dfltOlStyle = new Style({\n image: new Circle({\n fill,\n stroke,\n radius: 5,\n }),\n fill,\n stroke,\n});\n\n// Default style for KML layer\nconst kmlFill = new Fill({\n color: [255, 0, 0, 0.7],\n});\nconst kmlStroke = new Stroke({\n color: [255, 0, 0, 1],\n width: 1.5,\n});\nconst kmlcircle = new Circle({\n radius: 7,\n fill: kmlFill,\n stroke: kmlStroke,\n});\nconst kmlStyle = new Style({\n fill: kmlFill,\n stroke: kmlStroke,\n image: kmlcircle,\n text: new Text({\n font: 'normal 16px Helvetica',\n fill: kmlFill,\n stroke: new Stroke({\n color: [255, 255, 255, 1],\n width: 3,\n }),\n }),\n});\n\nexport { kmlStyle };\n\nexport default {\n default: dfltOlStyle,\n};\n"],
5
+ "mappings": "AAAA,SAAS,MAAM,QAAQ,QAAQ,OAAO,YAAY;AAGlD,MAAM,OAAO,IAAI,KAAK;AAAA,EACpB,OAAO;AACT,CAAC;AACD,MAAM,SAAS,IAAI,OAAO;AAAA,EACxB,OAAO;AAAA,EACP,OAAO;AACT,CAAC;AACD,MAAM,cAAc,IAAI,MAAM;AAAA,EAC5B,OAAO,IAAI,OAAO;AAAA,IAChB;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,EACV,CAAC;AAAA,EACD;AAAA,EACA;AACF,CAAC;AAGD,MAAM,UAAU,IAAI,KAAK;AAAA,EACvB,OAAO,CAAC,KAAK,GAAG,GAAG,GAAG;AACxB,CAAC;AACD,MAAM,YAAY,IAAI,OAAO;AAAA,EAC3B,OAAO,CAAC,KAAK,GAAG,GAAG,CAAC;AAAA,EACpB,OAAO;AACT,CAAC;AACD,MAAM,YAAY,IAAI,OAAO;AAAA,EAC3B,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,QAAQ;AACV,CAAC;AACD,MAAM,WAAW,IAAI,MAAM;AAAA,EACzB,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,MAAM,IAAI,KAAK;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ,IAAI,OAAO;AAAA,MACjB,OAAO,CAAC,KAAK,KAAK,KAAK,CAAC;AAAA,MACxB,OAAO;AAAA,IACT,CAAC;AAAA,EACH,CAAC;AACH,CAAC;AAED,SAAS;AAET,eAAe;AAAA,EACb,SAAS;AACX;",
6
+ "names": []
7
+ }
@@ -1,26 +1,19 @@
1
- import { DEVICE_PIXEL_RATIO } from 'ol/has';
2
-
1
+ import { DEVICE_PIXEL_RATIO } from "ol/has";
3
2
  const getPolygonPattern = (patternId = 1, color = [235, 0, 0, 1]) => {
4
3
  if (patternId === 1) {
5
4
  return color;
6
5
  }
7
-
8
- const canvasElement = document.createElement('canvas');
6
+ const canvasElement = document.createElement("canvas");
9
7
  const pixelRatio = DEVICE_PIXEL_RATIO;
10
-
11
8
  canvasElement.width = 20 * pixelRatio;
12
9
  canvasElement.height = 20 * pixelRatio;
13
-
14
10
  let pattern = {};
15
- const ctx = canvasElement.getContext('2d');
11
+ const ctx = canvasElement.getContext("2d");
16
12
  ctx.strokeStyle = `rgba(${color.toString()})`;
17
13
  ctx.fillStyle = `rgba(${color.toString()})`;
18
14
  ctx.lineWidth = 3;
19
-
20
15
  switch (patternId) {
21
16
  case 2:
22
- /* Hatched pattern */
23
- /* Ascending line */
24
17
  ctx.beginPath();
25
18
  ctx.moveTo(0, canvasElement.height);
26
19
  ctx.lineTo(0, canvasElement.height - ctx.lineWidth / 2);
@@ -31,8 +24,6 @@ const getPolygonPattern = (patternId = 1, color = [235, 0, 0, 1]) => {
31
24
  ctx.lineTo(ctx.lineWidth / 2, canvasElement.height);
32
25
  ctx.fill();
33
26
  ctx.closePath();
34
-
35
- /* Descending line */
36
27
  ctx.beginPath();
37
28
  ctx.moveTo(0, 0);
38
29
  ctx.lineTo(0, ctx.lineWidth / 2);
@@ -43,21 +34,16 @@ const getPolygonPattern = (patternId = 1, color = [235, 0, 0, 1]) => {
43
34
  ctx.lineTo(0, 0);
44
35
  ctx.fill();
45
36
  ctx.closePath();
46
-
47
- pattern = ctx.createPattern(canvasElement, 'repeat');
37
+ pattern = ctx.createPattern(canvasElement, "repeat");
48
38
  pattern.canvas = canvasElement;
49
39
  break;
50
40
  case 3:
51
- /* Shade ascending pattern */
52
- /* Corner triangle */
53
41
  ctx.beginPath();
54
42
  ctx.moveTo(0, 0);
55
43
  ctx.lineTo(0, ctx.lineWidth / 2);
56
44
  ctx.lineTo(ctx.lineWidth / 2, 0);
57
45
  ctx.fill();
58
46
  ctx.closePath();
59
-
60
- /* Ascending line */
61
47
  ctx.beginPath();
62
48
  ctx.moveTo(0, canvasElement.height);
63
49
  ctx.lineTo(0, canvasElement.height - ctx.lineWidth / 2);
@@ -68,29 +54,22 @@ const getPolygonPattern = (patternId = 1, color = [235, 0, 0, 1]) => {
68
54
  ctx.lineTo(ctx.lineWidth / 2, canvasElement.height);
69
55
  ctx.fill();
70
56
  ctx.closePath();
71
-
72
- /* Corner triangle */
73
57
  ctx.beginPath();
74
58
  ctx.moveTo(canvasElement.width, canvasElement.height);
75
59
  ctx.lineTo(canvasElement.width, canvasElement.height - ctx.lineWidth / 2);
76
60
  ctx.lineTo(canvasElement.width - ctx.lineWidth / 2, canvasElement.height);
77
61
  ctx.fill();
78
62
  ctx.closePath();
79
-
80
- pattern = ctx.createPattern(canvasElement, 'repeat');
63
+ pattern = ctx.createPattern(canvasElement, "repeat");
81
64
  pattern.canvas = canvasElement;
82
65
  break;
83
66
  case 4:
84
- /* Shade descending pattern */
85
- /* Corner triangle */
86
67
  ctx.beginPath();
87
68
  ctx.moveTo(canvasElement.width, 0);
88
69
  ctx.lineTo(canvasElement.width, ctx.lineWidth / 2);
89
70
  ctx.lineTo(canvasElement.width - ctx.lineWidth / 2, 0);
90
71
  ctx.fill();
91
72
  ctx.closePath();
92
-
93
- /* Descending line */
94
73
  ctx.beginPath();
95
74
  ctx.moveTo(0, 0);
96
75
  ctx.lineTo(0, ctx.lineWidth / 2);
@@ -101,29 +80,22 @@ const getPolygonPattern = (patternId = 1, color = [235, 0, 0, 1]) => {
101
80
  ctx.lineTo(0, 0);
102
81
  ctx.fill();
103
82
  ctx.closePath();
104
-
105
- /* Corner triangle */
106
83
  ctx.beginPath();
107
84
  ctx.moveTo(0, canvasElement.height);
108
85
  ctx.lineTo(0, canvasElement.height - ctx.lineWidth / 2);
109
86
  ctx.lineTo(ctx.lineWidth / 2, canvasElement.height);
110
87
  ctx.fill();
111
88
  ctx.closePath();
112
-
113
- pattern = ctx.createPattern(canvasElement, 'repeat');
89
+ pattern = ctx.createPattern(canvasElement, "repeat");
114
90
  pattern.canvas = canvasElement;
115
91
  break;
116
92
  default:
117
93
  }
118
-
119
94
  if (patternId === 0) {
120
95
  pattern.empty = true;
121
96
  }
122
-
123
97
  pattern.id = patternId;
124
98
  pattern.color = color;
125
-
126
99
  return pattern;
127
100
  };
128
-
129
101
  export default getPolygonPattern;
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/utils/getPolygonPattern.js"],
4
+ "sourcesContent": ["import { DEVICE_PIXEL_RATIO } from 'ol/has';\n\nconst getPolygonPattern = (patternId = 1, color = [235, 0, 0, 1]) => {\n if (patternId === 1) {\n return color;\n }\n\n const canvasElement = document.createElement('canvas');\n const pixelRatio = DEVICE_PIXEL_RATIO;\n\n canvasElement.width = 20 * pixelRatio;\n canvasElement.height = 20 * pixelRatio;\n\n let pattern = {};\n const ctx = canvasElement.getContext('2d');\n ctx.strokeStyle = `rgba(${color.toString()})`;\n ctx.fillStyle = `rgba(${color.toString()})`;\n ctx.lineWidth = 3;\n\n switch (patternId) {\n case 2:\n /* Hatched pattern */\n /* Ascending line */\n ctx.beginPath();\n ctx.moveTo(0, canvasElement.height);\n ctx.lineTo(0, canvasElement.height - ctx.lineWidth / 2);\n ctx.lineTo(canvasElement.width - ctx.lineWidth / 2, 0);\n ctx.lineTo(canvasElement.width, 0);\n ctx.lineTo(canvasElement.width, ctx.lineWidth / 2);\n ctx.lineTo(ctx.lineWidth / 2, canvasElement.height);\n ctx.lineTo(ctx.lineWidth / 2, canvasElement.height);\n ctx.fill();\n ctx.closePath();\n\n /* Descending line */\n ctx.beginPath();\n ctx.moveTo(0, 0);\n ctx.lineTo(0, ctx.lineWidth / 2);\n ctx.lineTo(canvasElement.width - ctx.lineWidth / 2, canvasElement.height);\n ctx.lineTo(canvasElement.width, canvasElement.height);\n ctx.lineTo(canvasElement.width, canvasElement.height - ctx.lineWidth / 2);\n ctx.lineTo(ctx.lineWidth / 2, 0);\n ctx.lineTo(0, 0);\n ctx.fill();\n ctx.closePath();\n\n pattern = ctx.createPattern(canvasElement, 'repeat');\n pattern.canvas = canvasElement;\n break;\n case 3:\n /* Shade ascending pattern */\n /* Corner triangle */\n ctx.beginPath();\n ctx.moveTo(0, 0);\n ctx.lineTo(0, ctx.lineWidth / 2);\n ctx.lineTo(ctx.lineWidth / 2, 0);\n ctx.fill();\n ctx.closePath();\n\n /* Ascending line */\n ctx.beginPath();\n ctx.moveTo(0, canvasElement.height);\n ctx.lineTo(0, canvasElement.height - ctx.lineWidth / 2);\n ctx.lineTo(canvasElement.width - ctx.lineWidth / 2, 0);\n ctx.lineTo(canvasElement.width, 0);\n ctx.lineTo(canvasElement.width, ctx.lineWidth / 2);\n ctx.lineTo(ctx.lineWidth / 2, canvasElement.height);\n ctx.lineTo(ctx.lineWidth / 2, canvasElement.height);\n ctx.fill();\n ctx.closePath();\n\n /* Corner triangle */\n ctx.beginPath();\n ctx.moveTo(canvasElement.width, canvasElement.height);\n ctx.lineTo(canvasElement.width, canvasElement.height - ctx.lineWidth / 2);\n ctx.lineTo(canvasElement.width - ctx.lineWidth / 2, canvasElement.height);\n ctx.fill();\n ctx.closePath();\n\n pattern = ctx.createPattern(canvasElement, 'repeat');\n pattern.canvas = canvasElement;\n break;\n case 4:\n /* Shade descending pattern */\n /* Corner triangle */\n ctx.beginPath();\n ctx.moveTo(canvasElement.width, 0);\n ctx.lineTo(canvasElement.width, ctx.lineWidth / 2);\n ctx.lineTo(canvasElement.width - ctx.lineWidth / 2, 0);\n ctx.fill();\n ctx.closePath();\n\n /* Descending line */\n ctx.beginPath();\n ctx.moveTo(0, 0);\n ctx.lineTo(0, ctx.lineWidth / 2);\n ctx.lineTo(canvasElement.width - ctx.lineWidth / 2, canvasElement.height);\n ctx.lineTo(canvasElement.width, canvasElement.height);\n ctx.lineTo(canvasElement.width, canvasElement.height - ctx.lineWidth / 2);\n ctx.lineTo(ctx.lineWidth / 2, 0);\n ctx.lineTo(0, 0);\n ctx.fill();\n ctx.closePath();\n\n /* Corner triangle */\n ctx.beginPath();\n ctx.moveTo(0, canvasElement.height);\n ctx.lineTo(0, canvasElement.height - ctx.lineWidth / 2);\n ctx.lineTo(ctx.lineWidth / 2, canvasElement.height);\n ctx.fill();\n ctx.closePath();\n\n pattern = ctx.createPattern(canvasElement, 'repeat');\n pattern.canvas = canvasElement;\n break;\n default:\n }\n\n if (patternId === 0) {\n pattern.empty = true;\n }\n\n pattern.id = patternId;\n pattern.color = color;\n\n return pattern;\n};\n\nexport default getPolygonPattern;\n"],
5
+ "mappings": "AAAA,SAAS,0BAA0B;AAEnC,MAAM,oBAAoB,CAAC,YAAY,GAAG,QAAQ,CAAC,KAAK,GAAG,GAAG,CAAC,MAAM;AACnE,MAAI,cAAc,GAAG;AACnB,WAAO;AAAA,EACT;AAEA,QAAM,gBAAgB,SAAS,cAAc,QAAQ;AACrD,QAAM,aAAa;AAEnB,gBAAc,QAAQ,KAAK;AAC3B,gBAAc,SAAS,KAAK;AAE5B,MAAI,UAAU,CAAC;AACf,QAAM,MAAM,cAAc,WAAW,IAAI;AACzC,MAAI,cAAc,QAAQ,MAAM,SAAS,CAAC;AAC1C,MAAI,YAAY,QAAQ,MAAM,SAAS,CAAC;AACxC,MAAI,YAAY;AAEhB,UAAQ,WAAW;AAAA,IACjB,KAAK;AAGH,UAAI,UAAU;AACd,UAAI,OAAO,GAAG,cAAc,MAAM;AAClC,UAAI,OAAO,GAAG,cAAc,SAAS,IAAI,YAAY,CAAC;AACtD,UAAI,OAAO,cAAc,QAAQ,IAAI,YAAY,GAAG,CAAC;AACrD,UAAI,OAAO,cAAc,OAAO,CAAC;AACjC,UAAI,OAAO,cAAc,OAAO,IAAI,YAAY,CAAC;AACjD,UAAI,OAAO,IAAI,YAAY,GAAG,cAAc,MAAM;AAClD,UAAI,OAAO,IAAI,YAAY,GAAG,cAAc,MAAM;AAClD,UAAI,KAAK;AACT,UAAI,UAAU;AAGd,UAAI,UAAU;AACd,UAAI,OAAO,GAAG,CAAC;AACf,UAAI,OAAO,GAAG,IAAI,YAAY,CAAC;AAC/B,UAAI,OAAO,cAAc,QAAQ,IAAI,YAAY,GAAG,cAAc,MAAM;AACxE,UAAI,OAAO,cAAc,OAAO,cAAc,MAAM;AACpD,UAAI,OAAO,cAAc,OAAO,cAAc,SAAS,IAAI,YAAY,CAAC;AACxE,UAAI,OAAO,IAAI,YAAY,GAAG,CAAC;AAC/B,UAAI,OAAO,GAAG,CAAC;AACf,UAAI,KAAK;AACT,UAAI,UAAU;AAEd,gBAAU,IAAI,cAAc,eAAe,QAAQ;AACnD,cAAQ,SAAS;AACjB;AAAA,IACF,KAAK;AAGH,UAAI,UAAU;AACd,UAAI,OAAO,GAAG,CAAC;AACf,UAAI,OAAO,GAAG,IAAI,YAAY,CAAC;AAC/B,UAAI,OAAO,IAAI,YAAY,GAAG,CAAC;AAC/B,UAAI,KAAK;AACT,UAAI,UAAU;AAGd,UAAI,UAAU;AACd,UAAI,OAAO,GAAG,cAAc,MAAM;AAClC,UAAI,OAAO,GAAG,cAAc,SAAS,IAAI,YAAY,CAAC;AACtD,UAAI,OAAO,cAAc,QAAQ,IAAI,YAAY,GAAG,CAAC;AACrD,UAAI,OAAO,cAAc,OAAO,CAAC;AACjC,UAAI,OAAO,cAAc,OAAO,IAAI,YAAY,CAAC;AACjD,UAAI,OAAO,IAAI,YAAY,GAAG,cAAc,MAAM;AAClD,UAAI,OAAO,IAAI,YAAY,GAAG,cAAc,MAAM;AAClD,UAAI,KAAK;AACT,UAAI,UAAU;AAGd,UAAI,UAAU;AACd,UAAI,OAAO,cAAc,OAAO,cAAc,MAAM;AACpD,UAAI,OAAO,cAAc,OAAO,cAAc,SAAS,IAAI,YAAY,CAAC;AACxE,UAAI,OAAO,cAAc,QAAQ,IAAI,YAAY,GAAG,cAAc,MAAM;AACxE,UAAI,KAAK;AACT,UAAI,UAAU;AAEd,gBAAU,IAAI,cAAc,eAAe,QAAQ;AACnD,cAAQ,SAAS;AACjB;AAAA,IACF,KAAK;AAGH,UAAI,UAAU;AACd,UAAI,OAAO,cAAc,OAAO,CAAC;AACjC,UAAI,OAAO,cAAc,OAAO,IAAI,YAAY,CAAC;AACjD,UAAI,OAAO,cAAc,QAAQ,IAAI,YAAY,GAAG,CAAC;AACrD,UAAI,KAAK;AACT,UAAI,UAAU;AAGd,UAAI,UAAU;AACd,UAAI,OAAO,GAAG,CAAC;AACf,UAAI,OAAO,GAAG,IAAI,YAAY,CAAC;AAC/B,UAAI,OAAO,cAAc,QAAQ,IAAI,YAAY,GAAG,cAAc,MAAM;AACxE,UAAI,OAAO,cAAc,OAAO,cAAc,MAAM;AACpD,UAAI,OAAO,cAAc,OAAO,cAAc,SAAS,IAAI,YAAY,CAAC;AACxE,UAAI,OAAO,IAAI,YAAY,GAAG,CAAC;AAC/B,UAAI,OAAO,GAAG,CAAC;AACf,UAAI,KAAK;AACT,UAAI,UAAU;AAGd,UAAI,UAAU;AACd,UAAI,OAAO,GAAG,cAAc,MAAM;AAClC,UAAI,OAAO,GAAG,cAAc,SAAS,IAAI,YAAY,CAAC;AACtD,UAAI,OAAO,IAAI,YAAY,GAAG,cAAc,MAAM;AAClD,UAAI,KAAK;AACT,UAAI,UAAU;AAEd,gBAAU,IAAI,cAAc,eAAe,QAAQ;AACnD,cAAQ,SAAS;AACjB;AAAA,IACF;AAAA,EACF;AAEA,MAAI,cAAc,GAAG;AACnB,YAAQ,QAAQ;AAAA,EAClB;AAEA,UAAQ,KAAK;AACb,UAAQ,QAAQ;AAEhB,SAAO;AACT;AAEA,eAAe;",
6
+ "names": []
7
+ }
@@ -1,40 +1,23 @@
1
- /**
2
- * Returns a string representation of a number, with a zero if the number is lower than 10.
3
- * @ignore
4
- */
5
1
  export const pad = (integer) => {
6
2
  return integer < 10 ? `0${integer}` : integer;
7
3
  };
8
-
9
- /**
10
- * Returns a 'hh:mm' string from a time in ms.
11
- * @param {Number} timeInMs Time in milliseconds.
12
- * @ignore
13
- */
14
4
  export const getHoursAndMinutes = (timeInMs) => {
15
5
  if (!timeInMs || timeInMs <= 0) {
16
- return '';
6
+ return "";
17
7
  }
18
8
  const date = new Date(timeInMs);
19
9
  return `${pad(date.getHours())}:${pad(date.getMinutes())}`;
20
10
  };
21
-
22
- /**
23
- * Returns a string representing a delay.
24
- * @param {Number} timeInMs Delay time in milliseconds.
25
- * @ignore
26
- */
27
11
  export const getDelayString = (delayInMs) => {
28
12
  let timeInMs = delayInMs;
29
13
  if (timeInMs < 0) {
30
14
  timeInMs = 0;
31
15
  }
32
- const h = Math.floor(timeInMs / 3600000);
33
- const m = Math.floor((timeInMs % 3600000) / 60000);
34
- const s = Math.floor(((timeInMs % 3600000) % 60000) / 1000);
35
-
16
+ const h = Math.floor(timeInMs / 36e5);
17
+ const m = Math.floor(timeInMs % 36e5 / 6e4);
18
+ const s = Math.floor(timeInMs % 36e5 % 6e4 / 1e3);
36
19
  if (s === 0 && h === 0 && m === 0) {
37
- return '0';
20
+ return "0";
38
21
  }
39
22
  if (s === 0 && h === 0) {
40
23
  return `${m}m`;
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/utils/timeUtils.js"],
4
+ "sourcesContent": ["/**\n * Returns a string representation of a number, with a zero if the number is lower than 10.\n * @ignore\n */\nexport const pad = (integer) => {\n return integer < 10 ? `0${integer}` : integer;\n};\n\n/**\n * Returns a 'hh:mm' string from a time in ms.\n * @param {Number} timeInMs Time in milliseconds.\n * @ignore\n */\nexport const getHoursAndMinutes = (timeInMs) => {\n if (!timeInMs || timeInMs <= 0) {\n return '';\n }\n const date = new Date(timeInMs);\n return `${pad(date.getHours())}:${pad(date.getMinutes())}`;\n};\n\n/**\n * Returns a string representing a delay.\n * @param {Number} timeInMs Delay time in milliseconds.\n * @ignore\n */\nexport const getDelayString = (delayInMs) => {\n let timeInMs = delayInMs;\n if (timeInMs < 0) {\n timeInMs = 0;\n }\n const h = Math.floor(timeInMs / 3600000);\n const m = Math.floor((timeInMs % 3600000) / 60000);\n const s = Math.floor(((timeInMs % 3600000) % 60000) / 1000);\n\n if (s === 0 && h === 0 && m === 0) {\n return '0';\n }\n if (s === 0 && h === 0) {\n return `${m}m`;\n }\n if (s === 0) {\n return `${h}h${m}m`;\n }\n if (m === 0 && h === 0) {\n return `${s}s`;\n }\n if (h === 0) {\n return `${m}m${s}s`;\n }\n return `${h}h${m}m${s}s`;\n};\n"],
5
+ "mappings": "AAIO,aAAM,MAAM,CAAC,YAAY;AAC9B,SAAO,UAAU,KAAK,IAAI,OAAO,KAAK;AACxC;AAOO,aAAM,qBAAqB,CAAC,aAAa;AAC9C,MAAI,CAAC,YAAY,YAAY,GAAG;AAC9B,WAAO;AAAA,EACT;AACA,QAAM,OAAO,IAAI,KAAK,QAAQ;AAC9B,SAAO,GAAG,IAAI,KAAK,SAAS,CAAC,CAAC,IAAI,IAAI,KAAK,WAAW,CAAC,CAAC;AAC1D;AAOO,aAAM,iBAAiB,CAAC,cAAc;AAC3C,MAAI,WAAW;AACf,MAAI,WAAW,GAAG;AAChB,eAAW;AAAA,EACb;AACA,QAAM,IAAI,KAAK,MAAM,WAAW,IAAO;AACvC,QAAM,IAAI,KAAK,MAAO,WAAW,OAAW,GAAK;AACjD,QAAM,IAAI,KAAK,MAAQ,WAAW,OAAW,MAAS,GAAI;AAE1D,MAAI,MAAM,KAAK,MAAM,KAAK,MAAM,GAAG;AACjC,WAAO;AAAA,EACT;AACA,MAAI,MAAM,KAAK,MAAM,GAAG;AACtB,WAAO,GAAG,CAAC;AAAA,EACb;AACA,MAAI,MAAM,GAAG;AACX,WAAO,GAAG,CAAC,IAAI,CAAC;AAAA,EAClB;AACA,MAAI,MAAM,KAAK,MAAM,GAAG;AACtB,WAAO,GAAG,CAAC;AAAA,EACb;AACA,MAAI,MAAM,GAAG;AACX,WAAO,GAAG,CAAC,IAAI,CAAC;AAAA,EAClB;AACA,SAAO,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;AACvB;",
6
+ "names": []
7
+ }
@@ -1,21 +0,0 @@
1
- name: Check PR title
2
- on:
3
- pull_request:
4
- types:
5
- - opened
6
- - reopened
7
- - edited
8
- - synchronize
9
-
10
- jobs:
11
- lint:
12
- runs-on: ubuntu-latest
13
- steps:
14
- - uses: aslafy-z/conventional-pr-title-action@v2.2.0
15
- with:
16
- success-state: Title follows the specification.
17
- failure-state: Title does not follow the specification.
18
- context-name: conventional-pr-title
19
- preset: conventional-changelog-angular@latest
20
- env:
21
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -1,28 +0,0 @@
1
- name: main
2
-
3
- on:
4
- pull_request:
5
- push:
6
- branches:
7
- - master
8
-
9
- jobs:
10
- build:
11
- runs-on: ubuntu-latest
12
-
13
- steps:
14
- - name: Checkout
15
- uses: actions/checkout@v3
16
-
17
- - name: Setup node
18
- uses: actions/setup-node@v3
19
- with:
20
- node-version-file: '.nvmrc'
21
-
22
- - name: Run linting and tests
23
- run: |
24
- yarn install --frozen-lockfile
25
- yarn lint
26
- yarn test
27
- env:
28
- CI: true
package/.husky/commit-msg DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env sh
2
- . "$(dirname -- "$0")/_/husky.sh"
3
-
4
- yarn commitlint --edit $1
@@ -1,4 +0,0 @@
1
- #!/bin/sh
2
- . "$(dirname "$0")/_/husky.sh"
3
-
4
- yarn install --frozen-lockfile
package/.husky/post-merge DELETED
@@ -1,4 +0,0 @@
1
- #!/bin/sh
2
- . "$(dirname "$0")/_/husky.sh"
3
-
4
- yarn install --frozen-lockfile
@@ -1,4 +0,0 @@
1
- #!/bin/sh
2
- . "$(dirname "$0")/_/husky.sh"
3
-
4
- yarn install --frozen-lockfile
package/.husky/pre-commit DELETED
@@ -1,4 +0,0 @@
1
- #!/bin/sh
2
- . "$(dirname "$0")/_/husky.sh"
3
-
4
- sort && CI=true npx lint-staged
package/.nvmrc DELETED
@@ -1 +0,0 @@
1
- 16
package/.whitesource DELETED
@@ -1,8 +0,0 @@
1
- ##########################################################
2
- #### WhiteSource Integration configuration file ####
3
- ##########################################################
4
-
5
- # Configuration #
6
- #---------------#
7
- ws.repo.scan=true
8
- vulnerable.check.run.conclusion.level=failure
package/CHANGELOG.md DELETED
@@ -1,65 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
-
5
- ### [1.5.2](https://github.com/geops/react-spatial/compare/v1.5.1...v1.5.2) (2023-06-28)
6
-
7
- ### [1.5.1](https://github.com/geops/react-spatial/compare/v1.5.0...v1.5.1) (2023-06-28)
8
-
9
- ## [1.5.0](https://github.com/geops/react-spatial/compare/v1.4.1...v1.5.0) (2023-04-28)
10
-
11
-
12
- ### Features
13
-
14
- * update react 18 and clean dependencies ([9064937](https://github.com/geops/react-spatial/commit/9064937aa975f072a84b0ad82e791e79ed129c8f))
15
-
16
- ### [1.4.1](https://github.com/geops/react-spatial/compare/v1.4.0...v1.4.1) (2023-04-28)
17
-
18
-
19
- ### Bug Fixes
20
-
21
- * use a more intuitive zooming behavior ([2d43f31](https://github.com/geops/react-spatial/commit/2d43f3189096b2195e0b550e8fb2d9d994746a8a))
22
-
23
- ## [1.4.0](https://github.com/geops/react-spatial/compare/v1.3.2...v1.4.0) (2023-01-09)
24
-
25
-
26
- ### Features
27
-
28
- * **CanvasSaveButton:** add extraData.qrCode option to insert QR code in canvas export ([#700](https://github.com/geops/react-spatial/issues/700)) ([16be889](https://github.com/geops/react-spatial/commit/16be889d97682c2a2d21c2fa17d55cae205e09da))
29
-
30
- ### [1.3.2](https://github.com/geops/react-spatial/compare/v1.3.1...v1.3.2) (2022-12-15)
31
-
32
-
33
- ### Bug Fixes
34
-
35
- * fix use of baselayers permalink and baselayerswitcher ([#699](https://github.com/geops/react-spatial/issues/699)) ([23af45f](https://github.com/geops/react-spatial/commit/23af45f5681cc50cfc4c60502b71c161a478fe71))
36
-
37
- ### [1.3.1](https://github.com/geops/react-spatial/compare/v1.3.1-beta.0...v1.3.1) (2022-12-15)
38
-
39
-
40
- ### Bug Fixes
41
-
42
- * fix detection of base layer in permalink ([9099ba7](https://github.com/geops/react-spatial/commit/9099ba704d15c670e87f8cb9245f06f159078f3e))
43
-
44
- ## [1.3.0](https://github.com/geops/react-spatial/compare/v1.3.0-beta.1...v1.3.0) (2022-11-14)
45
-
46
-
47
- ### Bug Fixes
48
-
49
- * **LayerTree:** add input and toggle props for layer tree renderItemContent ([#697](https://github.com/geops/react-spatial/issues/697)) ([8df5237](https://github.com/geops/react-spatial/commit/8df5237482373dc9c9de1ab9cfecefaf3472dcba))
50
-
51
- ### [1.2.2](https://github.com/geops/react-spatial/compare/v1.2.1...v1.2.2) (2022-07-22)
52
-
53
- ### [1.2.1](https://github.com/geops/react-spatial/compare/v1.2.0...v1.2.1) (2022-07-22)
54
-
55
-
56
- ### Bug Fixes
57
-
58
- * make component better work with nextjs image sand routing ([#694](https://github.com/geops/react-spatial/issues/694)) ([85871fe](https://github.com/geops/react-spatial/commit/85871fe2201ecad0de76442bc9d77815bfe6db27))
59
-
60
- ## [1.2.0](https://github.com/geops/react-spatial/compare/v1.0.35...v1.2.0) (2022-06-20)
61
-
62
-
63
- ### Features
64
-
65
- * use standard-version and commitlint for automatic versioning and changelog ([#690](https://github.com/geops/react-spatial/issues/690)) ([2c83f00](https://github.com/geops/react-spatial/commit/2c83f00c05f5b76b3f7e38978fb022d7cebfbcfc))
package/DEVELOP.md DELETED
@@ -1,113 +0,0 @@
1
- # Develop
2
-
3
- ## Create new component
4
-
5
- Follow the [guidelines](https://github.com/geops/react-spatial/tree/master/src/components).
6
-
7
- ## Create new theme
8
-
9
- Follow the [guidelines](https://github.com/geops/react-spatial/tree/master/src/themes).
10
-
11
- ## Documentation
12
-
13
- We are using [react-styleguidist](https://react-styleguidist.js.org/).
14
- Documentation and examples are available [here](https://react-spatial.geops.de/).
15
-
16
- Build the doc:
17
-
18
- ```bash
19
- yarn doc
20
- ```
21
-
22
- Run the doc on [`locahost:6060`](http://locahost:6060/):
23
-
24
- ```bash
25
- yarn start
26
- ```
27
-
28
- ## Tests
29
-
30
- We are using [jest]([https://react-styleguidist.js.org/](https://jestjs.io/docs/en/getting-started.html)) and [enzyme]([https://github.com/airbnb/enzyme](https://airbnb.io/enzyme/)).
31
-
32
- Run the tests in watch mode:
33
-
34
- ```bash
35
- yarn test --watch
36
- ```
37
-
38
- ## Coverage
39
-
40
- Run coverage:
41
-
42
- ```bash
43
- yarn coverage
44
- ```
45
-
46
- Then open the file `coverage/lcov-report/index.html` in your browser.
47
-
48
- ## Publish on [npmjs.com](https://www.npmjs.com/package/react-spatial)
49
-
50
- Run publish:
51
-
52
- ```bash
53
- publish:public
54
- ```
55
- You need to enter the new version number in the command line.
56
- Then the new version must be published on [npmjs.com](https://www.npmjs.com/package/react-spatial).
57
-
58
- ## Publish a development version on [npmjs.com](https://www.npmjs.com/package/react-spatial)
59
-
60
- This version WILL NOT be displayed to other in [npmjs.com](https://www.npmjs.com/package/react-spatial).
61
-
62
- Run publish:
63
-
64
- ```bash
65
- publish:beta
66
- ```
67
-
68
- You need to enter the new version number in the command line.
69
- Append `-beta.0` to the current version or increase the beta number.
70
- Then the new version must be published on [npmjs.com](https://www.npmjs.com/package/react-spatial) with the tag beta.
71
-
72
- ## How to use SVG
73
-
74
- Before adding an SVG file in this folder please clean it using [svgo](https://www.npmjs.com/package/svgo) or [svgomg](https://jakearchibald.github.io/svgomg/).
75
-
76
- After optimization, verify you can use it Openlayers using this [code sandbox](https://codesandbox.io/s/5w5o4mqwlk).
77
-
78
- By default the svg loader will load the svg file as a react component if you want to load svg file as a base64 data URI use the extension .url.svg :
79
-
80
- ```javascript
81
- // Import as a React component:
82
- import NorthArrow from 'northArrow.svg';
83
- // Use: <NorthArrow />
84
-
85
- // Import as a base64 data URI (or with an url the file is too big):
86
- import northArrow from 'northArrow.url.svg';
87
- // northArrow = "data:image/svg+xml;base64,PHN2ZyB4...."
88
- ```
89
-
90
- You could also use others loaders (ex: svg-inline-loader , svg-url-loader ...) .
91
- To use these loaders just adapt the extension of the svg file and add the loader config in styleguide.config.js, then you will be able to use it like this :
92
-
93
- ```javascript
94
- // Import as an inline svg:
95
- import northArrow from 'northArrow.svginline.svg';
96
- // northArrow = "<svg xmlns='http://www.w3.org/2000/svg' height='192' ...> ... </svg>"
97
-
98
- // Import as an encoded inline svg data URI (or with an url the file is too big):
99
- import northArrow from 'northArrow.svgurl.svg';
100
- // northArrow = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='192' ...%3E ... %3C/svg%3E"
101
- ```
102
-
103
- ## How to use SVG with a dynamic size
104
-
105
- In case you want your SVG fits perfectly his parent div you need to remove `width` and `height` attributes of `<svg>` and replace it by a `viewBox` property, like this:
106
-
107
- Replace
108
-
109
- `<svg width="192" height="192">`
110
-
111
- by
112
-
113
- `<svg viewBox="0 0 192 192">`
@@ -1,11 +0,0 @@
1
- /* eslint-disable class-methods-use-this */
2
- class Map {
3
- isStyleLoaded() {}
4
-
5
- getCanvas() {}
6
-
7
- once() {}
8
- }
9
- module.exports = {
10
- Map,
11
- };
@@ -1,9 +0,0 @@
1
- /* eslint-disable */
2
- export default class ResizeObserver {
3
- constructor(onResize) {
4
- ResizeObserver.onResize = onResize;
5
- }
6
- observe() {}
7
- unobserve() {}
8
- disconnect() {}
9
- }
package/babel.config.js DELETED
@@ -1,3 +0,0 @@
1
- module.exports = {
2
- presets: ['@babel/preset-env', '@babel/preset-react'],
3
- };
@@ -1 +0,0 @@
1
- module.exports = { extends: ['@commitlint/config-conventional'] };