@rio-cloud/rio-uikit 1.0.0 → 1.1.0

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 (270) hide show
  1. package/.DS_Store +0 -0
  2. package/components/.DS_Store +0 -0
  3. package/components/actionBarItem/ActionBarItemListItem.js +2 -2
  4. package/components/assetTree/AssetTree.js +2 -1
  5. package/components/assetTree/Tree.d.ts +4 -0
  6. package/components/assetTree/Tree.js +2 -2
  7. package/components/assetTree/TreeOptions.d.ts +1 -0
  8. package/components/assetTree/TreeOptions.js +16 -2
  9. package/components/assetTree/TreeSidebarCategories.js +1 -1
  10. package/components/calendarStripe/CalendarStripe.js +2 -2
  11. package/components/map/.DS_Store +0 -0
  12. package/components/map/components/.DS_Store +0 -0
  13. package/components/map/components/features/basics/Marker.js +1 -1
  14. package/components/map/utils/mapTypes.d.ts +1 -1
  15. package/components/map/utils/mapTypes.js +12 -4
  16. package/components/mapMarker/ClusterMapMarker.d.ts +4 -0
  17. package/components/mapMarker/ClusterMapMarker.js +4 -3
  18. package/components/mapMarker/SingleMapMarker.d.ts +36 -5
  19. package/components/mapMarker/SingleMapMarker.js +19 -6
  20. package/components/states/CustomState.js +21 -8
  21. package/components/states/StateButton.d.ts +8 -1
  22. package/components/states/StateButton.js +5 -4
  23. package/lib/.DS_Store +0 -0
  24. package/lib/es/.DS_Store +0 -0
  25. package/lib/es/components/.DS_Store +0 -0
  26. package/lib/es/components/actionBarItem/ActionBarItemListItem.js +2 -2
  27. package/lib/es/components/assetTree/AssetTree.js +2 -1
  28. package/lib/es/components/assetTree/Tree.d.ts +4 -0
  29. package/lib/es/components/assetTree/Tree.js +2 -2
  30. package/lib/es/components/assetTree/TreeOptions.d.ts +1 -0
  31. package/lib/es/components/assetTree/TreeOptions.js +16 -2
  32. package/lib/es/components/assetTree/TreeSidebarCategories.js +1 -1
  33. package/lib/es/components/calendarStripe/CalendarStripe.js +1 -1
  34. package/lib/es/components/map/components/features/basics/Marker.js +1 -1
  35. package/lib/es/components/map/utils/mapTypes.d.ts +1 -1
  36. package/lib/es/components/map/utils/mapTypes.js +12 -4
  37. package/lib/es/components/mapMarker/ClusterMapMarker.d.ts +4 -0
  38. package/lib/es/components/mapMarker/ClusterMapMarker.js +4 -3
  39. package/lib/es/components/mapMarker/SingleMapMarker.d.ts +36 -5
  40. package/lib/es/components/mapMarker/SingleMapMarker.js +18 -5
  41. package/lib/es/components/states/CustomState.js +20 -7
  42. package/lib/es/components/states/StateButton.d.ts +8 -1
  43. package/lib/es/components/states/StateButton.js +5 -4
  44. package/lib/es/styles/variables/colors/colors.json +8 -10
  45. package/lib/es/version.json +1 -1
  46. package/package.json +30 -27
  47. package/styles/variables/colors/colors.json +8 -10
  48. package/version.json +1 -1
  49. package/BrowserWarning.d.ts +0 -5
  50. package/BrowserWarning.js +0 -2
  51. package/DomMarker.d.ts +0 -5
  52. package/DomMarker.js +0 -2
  53. package/EnhancedMapEvent.d.ts +0 -11
  54. package/GroupSelectionUtil.d.ts +0 -2
  55. package/GroupSelectionUtil.js +0 -2
  56. package/IncidentsLayer.d.ts +0 -4
  57. package/IncidentsLayer.js +0 -2
  58. package/TrafficLayer.d.ts +0 -4
  59. package/TrafficLayer.js +0 -2
  60. package/TruckLayer.d.ts +0 -4
  61. package/TruckLayer.js +0 -2
  62. package/components/assetTree/excludeFromList.d.ts +0 -1
  63. package/components/assetTree/excludeFromList.js +0 -1
  64. package/components/browserWarning/BrowserIcons.d.ts +0 -2
  65. package/components/browserWarning/BrowserIcons.js +0 -5
  66. package/components/browserWarning/BrowserWarning.d.ts +0 -15
  67. package/components/browserWarning/BrowserWarning.js +0 -46
  68. package/components/browserWarning/BrowserWarningMessageDE.d.ts +0 -4
  69. package/components/browserWarning/BrowserWarningMessageDE.js +0 -6
  70. package/components/browserWarning/BrowserWarningMessageEN.d.ts +0 -4
  71. package/components/browserWarning/BrowserWarningMessageEN.js +0 -6
  72. package/components/carousel/CarouselCaption.d.ts +0 -13
  73. package/components/carousel/CarouselCaption.js +0 -18
  74. package/components/carousel/CarouselItem.d.ts +0 -36
  75. package/components/carousel/CarouselItem.js +0 -85
  76. package/components/dialog/baseDialogPropTypes.d.ts +0 -14
  77. package/components/dialog/baseDialogPropTypes.js +0 -13
  78. package/components/driverName/DriverName.d.ts +0 -18
  79. package/components/driverName/DriverName.js +0 -18
  80. package/components/dropdown/menuItemsPropTypes.d.ts +0 -9
  81. package/components/dropdown/menuItemsPropTypes.js +0 -8
  82. package/components/map/components/MapSettingContext.d.ts +0 -15
  83. package/components/map/components/MapSettingContext.js +0 -5
  84. package/components/map/components/context.d.ts +0 -2
  85. package/components/map/components/context.js +0 -3
  86. package/components/map/components/features/basics/MapLayerGroup.d.ts +0 -23
  87. package/components/map/components/features/basics/MapLayerGroup.js +0 -45
  88. package/components/map/components/features/basics/marker/DomMarker.d.ts +0 -33
  89. package/components/map/components/features/basics/marker/DomMarker.js +0 -55
  90. package/components/map/components/features/basics/marker/Marker.d.ts +0 -21
  91. package/components/map/components/features/basics/marker/Marker.js +0 -116
  92. package/components/map/components/features/basics/marker/TextMarker.d.ts +0 -17
  93. package/components/map/components/features/basics/marker/TextMarker.js +0 -28
  94. package/components/map/components/features/layers/IncidentsLayer.d.ts +0 -2
  95. package/components/map/components/features/layers/IncidentsLayer.js +0 -25
  96. package/components/map/components/features/layers/Layer.d.ts +0 -15
  97. package/components/map/components/features/layers/Layer.js +0 -23
  98. package/components/map/components/features/layers/RoadRestrictionLayer.d.ts +0 -2
  99. package/components/map/components/features/layers/RoadRestrictionLayer.js +0 -26
  100. package/components/map/components/features/layers/TrafficLayer.d.ts +0 -2
  101. package/components/map/components/features/layers/TrafficLayer.js +0 -39
  102. package/components/map/components/features/layers/baselayers/DefaultRasterLayer.d.ts +0 -2
  103. package/components/map/components/features/layers/baselayers/DefaultRasterLayer.js +0 -17
  104. package/components/map/components/features/layers/baselayers/DefaultVectorLayer.d.ts +0 -2
  105. package/components/map/components/features/layers/baselayers/DefaultVectorLayer.js +0 -14
  106. package/components/map/components/features/layers/baselayers/FleetStyleLayer.d.ts +0 -2
  107. package/components/map/components/features/layers/baselayers/FleetStyleLayer.js +0 -15
  108. package/components/map/components/features/layers/baselayers/NightLayer.d.ts +0 -2
  109. package/components/map/components/features/layers/baselayers/NightLayer.js +0 -14
  110. package/components/map/components/features/layers/baselayers/SatelliteLayer.d.ts +0 -2
  111. package/components/map/components/features/layers/baselayers/SatelliteLayer.js +0 -15
  112. package/components/map/components/features/layers/baselayers/TerrainLayer.d.ts +0 -2
  113. package/components/map/components/features/layers/baselayers/TerrainLayer.js +0 -15
  114. package/components/map/components/features/layers/baselayers/useBaseLayer.d.ts +0 -2
  115. package/components/map/components/features/layers/baselayers/useBaseLayer.js +0 -47
  116. package/components/map/components/mapUtils.d.ts +0 -50
  117. package/components/map/components/mapUtils.js +0 -148
  118. package/components/map/herePolyfill.d.ts +0 -0
  119. package/components/map/herePolyfill.js +0 -7
  120. package/components/map/utils/proptypes.d.ts +0 -47
  121. package/components/map/utils/proptypes.js +0 -50
  122. package/components/map/utils/validation.d.ts +0 -2
  123. package/components/map/utils/validation.js +0 -8
  124. package/components/mapMarker/MarkerColor.d.ts +0 -3
  125. package/components/mapMarker/MarkerColor.js +0 -12
  126. package/components/menuItems/getMenuItems.d.ts +0 -2
  127. package/components/menuItems/getMenuItems.js +0 -7
  128. package/components/selects/BaseDropdownMenu.d.ts +0 -83
  129. package/components/selects/BaseDropdownMenu.js +0 -255
  130. package/components/selects/WithFeedback.d.ts +0 -27
  131. package/components/selects/WithFeedback.js +0 -12
  132. package/components/states/baseStatePropTypes.d.ts +0 -26
  133. package/components/states/baseStatePropTypes.js +0 -26
  134. package/components/table/tableSettingsPropTypes.d.ts +0 -8
  135. package/components/table/tableSettingsPropTypes.js +0 -6
  136. package/lib/es/BrowserWarning.d.ts +0 -5
  137. package/lib/es/BrowserWarning.js +0 -6
  138. package/lib/es/DomMarker.d.ts +0 -5
  139. package/lib/es/DomMarker.js +0 -6
  140. package/lib/es/EnhancedMapEvent.d.ts +0 -11
  141. package/lib/es/GroupSelectionUtil.d.ts +0 -2
  142. package/lib/es/GroupSelectionUtil.js +0 -5
  143. package/lib/es/IncidentsLayer.d.ts +0 -4
  144. package/lib/es/IncidentsLayer.js +0 -6
  145. package/lib/es/TrafficLayer.d.ts +0 -4
  146. package/lib/es/TrafficLayer.js +0 -6
  147. package/lib/es/TruckLayer.d.ts +0 -4
  148. package/lib/es/TruckLayer.js +0 -6
  149. package/lib/es/components/assetTree/autoAnimateFrames.d.ts +0 -1
  150. package/lib/es/components/assetTree/autoAnimateFrames.js +0 -55
  151. package/lib/es/components/assetTree/excludeFromList.d.ts +0 -1
  152. package/lib/es/components/assetTree/excludeFromList.js +0 -5
  153. package/lib/es/components/browserWarning/BrowserIcons.d.ts +0 -2
  154. package/lib/es/components/browserWarning/BrowserIcons.js +0 -11
  155. package/lib/es/components/browserWarning/BrowserWarning.d.ts +0 -15
  156. package/lib/es/components/browserWarning/BrowserWarning.js +0 -49
  157. package/lib/es/components/browserWarning/BrowserWarningMessageDE.d.ts +0 -4
  158. package/lib/es/components/browserWarning/BrowserWarningMessageDE.js +0 -9
  159. package/lib/es/components/browserWarning/BrowserWarningMessageEN.d.ts +0 -4
  160. package/lib/es/components/browserWarning/BrowserWarningMessageEN.js +0 -9
  161. package/lib/es/components/carousel/CarouselCaption.d.ts +0 -13
  162. package/lib/es/components/carousel/CarouselCaption.js +0 -20
  163. package/lib/es/components/carousel/CarouselItem.d.ts +0 -36
  164. package/lib/es/components/carousel/CarouselItem.js +0 -87
  165. package/lib/es/components/charts/Sector.d.ts +0 -0
  166. package/lib/es/components/charts/Sector.js +0 -1
  167. package/lib/es/components/dialog/baseDialogPropTypes.d.ts +0 -14
  168. package/lib/es/components/dialog/baseDialogPropTypes.js +0 -16
  169. package/lib/es/components/driverName/DriverName.d.ts +0 -18
  170. package/lib/es/components/driverName/DriverName.js +0 -23
  171. package/lib/es/components/dropdown/menuItemsPropTypes.d.ts +0 -9
  172. package/lib/es/components/dropdown/menuItemsPropTypes.js +0 -11
  173. package/lib/es/components/map/components/MapSettingContext.d.ts +0 -15
  174. package/lib/es/components/map/components/MapSettingContext.js +0 -8
  175. package/lib/es/components/map/components/context.d.ts +0 -2
  176. package/lib/es/components/map/components/context.js +0 -6
  177. package/lib/es/components/map/components/features/basics/MapLayerGroup.d.ts +0 -23
  178. package/lib/es/components/map/components/features/basics/MapLayerGroup.js +0 -48
  179. package/lib/es/components/map/components/features/basics/marker/DomMarker.d.ts +0 -33
  180. package/lib/es/components/map/components/features/basics/marker/DomMarker.js +0 -58
  181. package/lib/es/components/map/components/features/basics/marker/Marker.d.ts +0 -21
  182. package/lib/es/components/map/components/features/basics/marker/Marker.js +0 -123
  183. package/lib/es/components/map/components/features/basics/marker/TextMarker.d.ts +0 -17
  184. package/lib/es/components/map/components/features/basics/marker/TextMarker.js +0 -31
  185. package/lib/es/components/map/components/features/layers/IncidentsLayer.d.ts +0 -2
  186. package/lib/es/components/map/components/features/layers/IncidentsLayer.js +0 -27
  187. package/lib/es/components/map/components/features/layers/Layer.d.ts +0 -15
  188. package/lib/es/components/map/components/features/layers/Layer.js +0 -26
  189. package/lib/es/components/map/components/features/layers/MapBaseLayer.d.ts +0 -8
  190. package/lib/es/components/map/components/features/layers/MapBaseLayer.js +0 -35
  191. package/lib/es/components/map/components/features/layers/RoadRestrictionLayer.d.ts +0 -2
  192. package/lib/es/components/map/components/features/layers/RoadRestrictionLayer.js +0 -28
  193. package/lib/es/components/map/components/features/layers/TrafficLayer.d.ts +0 -2
  194. package/lib/es/components/map/components/features/layers/TrafficLayer.js +0 -41
  195. package/lib/es/components/map/components/features/layers/baselayers/DefaultRasterLayer.d.ts +0 -4
  196. package/lib/es/components/map/components/features/layers/baselayers/DefaultRasterLayer.js +0 -36
  197. package/lib/es/components/map/components/features/layers/baselayers/DefaultVectorLayer.d.ts +0 -4
  198. package/lib/es/components/map/components/features/layers/baselayers/DefaultVectorLayer.js +0 -16
  199. package/lib/es/components/map/components/features/layers/baselayers/FleetStyleLayer.d.ts +0 -4
  200. package/lib/es/components/map/components/features/layers/baselayers/FleetStyleLayer.js +0 -17
  201. package/lib/es/components/map/components/features/layers/baselayers/NightLayer.d.ts +0 -4
  202. package/lib/es/components/map/components/features/layers/baselayers/NightLayer.js +0 -16
  203. package/lib/es/components/map/components/features/layers/baselayers/SatelliteLayer.d.ts +0 -4
  204. package/lib/es/components/map/components/features/layers/baselayers/SatelliteLayer.js +0 -34
  205. package/lib/es/components/map/components/features/layers/baselayers/TerrainLayer.d.ts +0 -4
  206. package/lib/es/components/map/components/features/layers/baselayers/TerrainLayer.js +0 -17
  207. package/lib/es/components/map/components/features/layers/baselayers/useBaseLayer.d.ts +0 -11
  208. package/lib/es/components/map/components/features/layers/baselayers/useBaseLayer.js +0 -76
  209. package/lib/es/components/map/components/mapUtils.d.ts +0 -50
  210. package/lib/es/components/map/components/mapUtils.js +0 -154
  211. package/lib/es/components/map/herePolyfill.d.ts +0 -0
  212. package/lib/es/components/map/herePolyfill.js +0 -7
  213. package/lib/es/components/map/utils/proptypes.d.ts +0 -47
  214. package/lib/es/components/map/utils/proptypes.js +0 -53
  215. package/lib/es/components/map/utils/validation.d.ts +0 -2
  216. package/lib/es/components/map/utils/validation.js +0 -14
  217. package/lib/es/components/mapMarker/MarkerColor.d.ts +0 -3
  218. package/lib/es/components/mapMarker/MarkerColor.js +0 -15
  219. package/lib/es/components/menuItems/getMenuItems.d.ts +0 -2
  220. package/lib/es/components/menuItems/getMenuItems.js +0 -10
  221. package/lib/es/components/selects/BaseDropdownMenu.d.ts +0 -83
  222. package/lib/es/components/selects/BaseDropdownMenu.js +0 -260
  223. package/lib/es/components/selects/WithFeedback.d.ts +0 -27
  224. package/lib/es/components/selects/WithFeedback.js +0 -15
  225. package/lib/es/components/states/baseStatePropTypes.d.ts +0 -26
  226. package/lib/es/components/states/baseStatePropTypes.js +0 -30
  227. package/lib/es/components/table/tableSettingsPropTypes.d.ts +0 -8
  228. package/lib/es/components/table/tableSettingsPropTypes.js +0 -10
  229. package/lib/es/mapIndex.d.ts +0 -38
  230. package/lib/es/mapIndex.js +0 -77
  231. package/lib/es/styles/variables/colors.json +0 -74
  232. package/lib/es/themes/Volkswagen/components/applicationHeader/modulePropTypes.d.ts +0 -6
  233. package/lib/es/themes/Volkswagen/components/applicationHeader/modulePropTypes.js +0 -8
  234. package/lib/es/types.d.ts +0 -71
  235. package/lib/es/types.js +0 -2
  236. package/lib/es/utils/GroupSelectionUtil.d.ts +0 -1
  237. package/lib/es/utils/GroupSelectionUtil.js +0 -85
  238. package/lib/es/utils/addEventListener.d.ts +0 -3
  239. package/lib/es/utils/addEventListener.js +0 -17
  240. package/lib/es/utils/addFocusListener.d.ts +0 -3
  241. package/lib/es/utils/addFocusListener.js +0 -24
  242. package/lib/es/utils/getOffsetTopWholeScreen.d.ts +0 -1
  243. package/lib/es/utils/getOffsetTopWholeScreen.js +0 -9
  244. package/lib/es/utils/init.d.ts +0 -2
  245. package/lib/es/utils/init.js +0 -121
  246. package/lib/es/utils/logPropError.d.ts +0 -3
  247. package/lib/es/utils/logPropError.js +0 -28
  248. package/lib/es/utils/ownerDocument.d.ts +0 -1
  249. package/lib/es/utils/ownerDocument.js +0 -12
  250. package/mapIndex.d.ts +0 -38
  251. package/mapIndex.js +0 -42
  252. package/styles/variables/colors.json +0 -74
  253. package/themes/Volkswagen/components/applicationHeader/modulePropTypes.d.ts +0 -6
  254. package/themes/Volkswagen/components/applicationHeader/modulePropTypes.js +0 -5
  255. package/types.d.ts +0 -71
  256. package/types.js +0 -1
  257. package/utils/GroupSelectionUtil.d.ts +0 -1
  258. package/utils/GroupSelectionUtil.js +0 -80
  259. package/utils/addEventListener.d.ts +0 -3
  260. package/utils/addEventListener.js +0 -13
  261. package/utils/addFocusListener.d.ts +0 -3
  262. package/utils/addFocusListener.js +0 -21
  263. package/utils/getOffsetTopWholeScreen.d.ts +0 -1
  264. package/utils/getOffsetTopWholeScreen.js +0 -6
  265. package/utils/init.d.ts +0 -2
  266. package/utils/init.js +0 -117
  267. package/utils/logPropError.d.ts +0 -3
  268. package/utils/logPropError.js +0 -23
  269. package/utils/ownerDocument.d.ts +0 -1
  270. package/utils/ownerDocument.js +0 -8
@@ -1,76 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useBaseLayer = exports.getDefaultBaseLayer = void 0;
4
- const react_1 = require("react");
5
- require("../../../../utils/mapUtils");
6
- const constants_1 = require("../../../constants");
7
- // Obtain the default map types from the platform object:
8
- const getDefaultBaseLayer = (defaultLayers, mapType, useWebGL) => {
9
- if (mapType === constants_1.MAP_TYPE_SATELLITE) {
10
- return defaultLayers === null || defaultLayers === void 0 ? void 0 : defaultLayers.raster.satellite.map;
11
- }
12
- if (mapType === constants_1.MAP_TYPE_TERRAIN) {
13
- return defaultLayers === null || defaultLayers === void 0 ? void 0 : defaultLayers.raster.terrain.map;
14
- }
15
- if (mapType === constants_1.MAP_TYPE_FLEET_STYLE) {
16
- return defaultLayers === null || defaultLayers === void 0 ? void 0 : defaultLayers.raster.normal.map;
17
- }
18
- if (mapType === constants_1.MAP_TYPE_NIGHT) {
19
- return defaultLayers === null || defaultLayers === void 0 ? void 0 : defaultLayers.raster.normal.mapnight;
20
- }
21
- if (useWebGL) {
22
- return defaultLayers === null || defaultLayers === void 0 ? void 0 : defaultLayers.vector.normal.map;
23
- }
24
- return defaultLayers === null || defaultLayers === void 0 ? void 0 : defaultLayers.raster.normal.map;
25
- };
26
- exports.getDefaultBaseLayer = getDefaultBaseLayer;
27
- function getPpi() {
28
- return window.devicePixelRatio >= 1.7 ? 400 : 100;
29
- }
30
- const useBaseLayer = (props) => {
31
- const { api, additionalParameters = {}, language, isWebGL = false, mapType } = props;
32
- const [baseLayer, setBaseLayer] = (0, react_1.useState)(null);
33
- // When the language changes from the outside, re-create the base layer with the new locale
34
- (0, react_1.useEffect)(() => {
35
- setBaseLayer(null);
36
- }, [language]);
37
- (0, react_1.useEffect)(() => {
38
- var _a, _b;
39
- if (!baseLayer) {
40
- // Base raster
41
- // const rasterTileService = api.platform?.getRasterTileService({
42
- // format: 'png', // or jpg, png8
43
- // queryParams: {
44
- // lang: 'en',
45
- // ppi: getPpi(),
46
- // style: 'explore.day',
47
- // features:
48
- // 'pois:all,environmental_zones:all,congestion_zones:all,vehicle_restrictions:active_and_inactive',
49
- // },
50
- // });
51
- // const rasterTileProvider = new H.service.rasterTile.Provider(rasterTileService, {
52
- // engineType: H.Map.EngineType['P2D'],
53
- // tileSize: 512,
54
- // });
55
- // const rasterTileLayer = new H.map.layer.TileLayer(rasterTileProvider);
56
- // const defaultLayer = rasterTileLayer;
57
- // api.map?.setBaseLayer(defaultLayer);
58
- // setBaseLayer(defaultLayer);
59
- const additionalParametersWithLocale = Object.assign(Object.assign({}, additionalParameters), {
60
- // Define the overall map language here so that all counties use that locale
61
- // and don't show their native label names. For more details see:
62
- // https://developer.here.com/documentation/examples/maps-js/maps/map-multi-language-support
63
- // Note: it takes the short locale like "de", "en" etc.
64
- lg: language.includes('-') ? language.split('-')[0] : language,
65
- // ppi: getPPI(),
66
- engineType: isWebGL ? H.Map.EngineType['HARP'] : H.Map.EngineType['P2D'] });
67
- const defaultLayers = (_a = api.platform) === null || _a === void 0 ? void 0 : _a.createDefaultLayers(additionalParametersWithLocale);
68
- const newBaseLayer = (0, exports.getDefaultBaseLayer)(defaultLayers, mapType, isWebGL);
69
- if (newBaseLayer) {
70
- (_b = api.map) === null || _b === void 0 ? void 0 : _b.setBaseLayer(newBaseLayer);
71
- setBaseLayer(newBaseLayer);
72
- }
73
- }
74
- });
75
- };
76
- exports.useBaseLayer = useBaseLayer;
@@ -1,50 +0,0 @@
1
- export function getPPI(): undefined;
2
- export function createUtils(mapApi: any): {
3
- getCenter: () => {
4
- lat: any;
5
- lng: any;
6
- };
7
- setCenter: (position: any, animate: any) => void;
8
- getZoom: () => number;
9
- setZoom: (zoom: any, zoomAnimation?: boolean) => void;
10
- getViewPort: () => {
11
- width: any;
12
- height: any;
13
- margin: any;
14
- padding: {
15
- top: any;
16
- right: any;
17
- bottom: any;
18
- left: any;
19
- };
20
- center: {
21
- x: any;
22
- y: any;
23
- };
24
- };
25
- getBounds: () => {
26
- topLeft: {
27
- lng: any;
28
- lat: any;
29
- };
30
- bottomRight: {
31
- lng: any;
32
- lat: any;
33
- };
34
- };
35
- getObjects: () => any;
36
- getLayers: () => any;
37
- getBaseLayer: () => any;
38
- getGroups: () => any[];
39
- getMarkers: () => any[];
40
- findMarkerByLatLng: (lat: any, lng: any) => any;
41
- findMarkersByLatLng: (lat: any, lng: any) => any[];
42
- getRoutePolylines: () => any[];
43
- getObjectType: (hereObject: any) => "H.map.Group" | "H.map.DomMarker" | "H.map.Marker" | "H.map.AbstractMarker" | "H.map.Polyline" | "H.map.Rect" | "H.map.Circle" | "H.map.Polygon" | "H.map.Object";
44
- getObjectTypes: import("lodash/fp").LodashMap1x1<any, "H.map.Group" | "H.map.DomMarker" | "H.map.Marker" | "H.map.AbstractMarker" | "H.map.Polyline" | "H.map.Rect" | "H.map.Circle" | "H.map.Polygon" | "H.map.Object">;
45
- getLayerType: (hereLayer: any) => "H.map.layer.BaseTileLayer" | "H.map.layer.MarkerTileLayer" | "H.map.layer.TileLayer" | "H.map.layer.CanvasLayer" | "H.map.layer.DomLayer" | "H.map.layer.ObjectLayer" | "H.map.layer.Layer";
46
- getLayerTypes: import("lodash/fp").LodashMap1x1<any, "H.map.layer.BaseTileLayer" | "H.map.layer.MarkerTileLayer" | "H.map.layer.TileLayer" | "H.map.layer.CanvasLayer" | "H.map.layer.DomLayer" | "H.map.layer.ObjectLayer" | "H.map.layer.Layer">;
47
- getMarkerIconClassName: (domMarker: any) => any;
48
- getPosition: (marker: any) => any;
49
- getLatLngAltArray: (polyline: any) => any;
50
- };
@@ -1,154 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createUtils = exports.getPPI = void 0;
4
- const tslib_1 = require("tslib");
5
- const map_1 = tslib_1.__importDefault(require("lodash/fp/map"));
6
- const flatMap_1 = tslib_1.__importDefault(require("lodash/fp/flatMap"));
7
- const filter_1 = tslib_1.__importDefault(require("lodash/fp/filter"));
8
- const flow_1 = tslib_1.__importDefault(require("lodash/fp/flow"));
9
- const first_1 = tslib_1.__importDefault(require("lodash/fp/first"));
10
- const constants_1 = require("./constants");
11
- // Note: higher PPI image tiles result in larger label size and show more label on the map
12
- const getPPI = () => undefined; // window.devicePixelRatio > 1 ? HIGH_RES_PPI : undefined;
13
- exports.getPPI = getPPI;
14
- const latLngFilterFunction = (lat, lng) => obj => obj.getGeometry && obj.getGeometry().lat === lat && obj.getGeometry().lng === lng;
15
- const typeFilterFunction = hereType => obj => obj instanceof hereType;
16
- const markerFilterFunction = typeFilterFunction(H.map.AbstractMarker);
17
- const groupFilterFunction = typeFilterFunction(H.map.Group);
18
- const polylineFilterFunction = typeFilterFunction(H.map.Polyline);
19
- const getMarkerIconClassName = domMarker => domMarker.getIcon().c.className;
20
- const getPosition = marker => marker.getGeometry();
21
- const getLatLngAltArray = polyline => polyline.getGeometry().getLatLngAltArray();
22
- const getObjectType = hereObject => {
23
- if (hereObject instanceof H.map.Group) {
24
- return 'H.map.Group';
25
- }
26
- if (hereObject instanceof H.map.DomMarker) {
27
- return 'H.map.DomMarker';
28
- }
29
- if (hereObject instanceof H.map.Marker) {
30
- return 'H.map.Marker';
31
- }
32
- if (hereObject instanceof H.map.AbstractMarker) {
33
- return 'H.map.AbstractMarker';
34
- }
35
- if (hereObject instanceof H.map.Polyline) {
36
- return 'H.map.Polyline';
37
- }
38
- if (hereObject instanceof H.map.Rect) {
39
- return 'H.map.Rect';
40
- }
41
- if (hereObject instanceof H.map.Circle) {
42
- return 'H.map.Circle';
43
- }
44
- if (hereObject instanceof H.map.Polygon) {
45
- return 'H.map.Polygon';
46
- }
47
- return 'H.map.Object';
48
- };
49
- const getObjectTypes = (0, map_1.default)(getObjectType);
50
- const getLayerType = hereLayer => {
51
- if (hereLayer instanceof H.map.layer.BaseTileLayer) {
52
- return 'H.map.layer.BaseTileLayer';
53
- }
54
- if (hereLayer instanceof H.map.layer.MarkerTileLayer) {
55
- return 'H.map.layer.MarkerTileLayer';
56
- }
57
- if (hereLayer instanceof H.map.layer.TileLayer) {
58
- return 'H.map.layer.TileLayer';
59
- }
60
- if (hereLayer instanceof H.map.layer.CanvasLayer) {
61
- return 'H.map.layer.CanvasLayer';
62
- }
63
- if (hereLayer instanceof H.map.layer.DomLayer) {
64
- return 'H.map.layer.DomLayer';
65
- }
66
- if (hereLayer instanceof H.map.layer.ObjectLayer) {
67
- return 'H.map.layer.ObjectLayer';
68
- }
69
- return 'H.map.layer.Layer';
70
- };
71
- const getLayerTypes = (0, map_1.default)(getLayerType);
72
- const createUtils = mapApi => {
73
- return {
74
- getCenter: () => {
75
- const center = mapApi.getCenter();
76
- return {
77
- lat: center.lat,
78
- lng: center.lng,
79
- };
80
- },
81
- setCenter: (position, animate) => {
82
- mapApi.getViewModel().setLookAtData({ position }, animate);
83
- },
84
- getZoom: () => {
85
- const { zoom } = mapApi.getViewModel().getLookAtData();
86
- return Math.round(zoom);
87
- },
88
- setZoom: (zoom, zoomAnimation = false) => {
89
- mapApi.getViewModel().setLookAtData({ zoom }, zoomAnimation);
90
- },
91
- getViewPort: () => {
92
- const viewPort = mapApi.getViewPort();
93
- return {
94
- width: viewPort.width,
95
- height: viewPort.height,
96
- margin: viewPort.margin,
97
- padding: {
98
- top: viewPort.padding.top,
99
- right: viewPort.padding.right,
100
- bottom: viewPort.padding.bottom,
101
- left: viewPort.padding.left,
102
- },
103
- center: {
104
- x: viewPort.center.x,
105
- y: viewPort.center.y,
106
- },
107
- };
108
- },
109
- getBounds: () => {
110
- const { bounds } = mapApi.getViewModel().getLookAtData();
111
- // TODO: remove old 3.0 version after all Services use the latest Map
112
- if (bounds.getTopLeft) {
113
- return {
114
- topLeft: {
115
- lng: bounds.getTopLeft().lng,
116
- lat: bounds.getTopLeft().lat,
117
- },
118
- bottomRight: {
119
- lng: bounds.getBottomRight().lng,
120
- lat: bounds.getBottomRight().lat,
121
- },
122
- };
123
- }
124
- // HERE Maps API for JavaScript 3.1
125
- const boundingBox = bounds.getBoundingBox();
126
- return {
127
- topLeft: {
128
- lng: boundingBox.getTopLeft().lng,
129
- lat: boundingBox.getTopLeft().lat,
130
- },
131
- bottomRight: {
132
- lng: boundingBox.getBottomRight().lng,
133
- lat: boundingBox.getBottomRight().lat,
134
- },
135
- };
136
- },
137
- getObjects: () => mapApi.getObjects(),
138
- getLayers: () => mapApi.getLayers().asArray(),
139
- getBaseLayer: () => mapApi.getBaseLayer(),
140
- getGroups: () => (0, filter_1.default)(groupFilterFunction)(mapApi.getObjects()),
141
- getMarkers: () => (0, filter_1.default)(markerFilterFunction)(mapApi.getObjects()),
142
- findMarkerByLatLng: (lat, lng) => (0, flow_1.default)((0, filter_1.default)(markerFilterFunction && latLngFilterFunction(lat, lng)), first_1.default)(mapApi.getObjects()),
143
- findMarkersByLatLng: (lat, lng) => (0, filter_1.default)(markerFilterFunction && latLngFilterFunction(lat, lng))(mapApi.getObjects()),
144
- getRoutePolylines: () => (0, flow_1.default)((0, filter_1.default)(groupFilterFunction), (0, flatMap_1.default)(group => group.getObjects()), (0, filter_1.default)(polylineFilterFunction))(mapApi.getObjects()),
145
- getObjectType,
146
- getObjectTypes,
147
- getLayerType,
148
- getLayerTypes,
149
- getMarkerIconClassName,
150
- getPosition,
151
- getLatLngAltArray,
152
- };
153
- };
154
- exports.createUtils = createUtils;
File without changes
@@ -1,7 +0,0 @@
1
- "use strict";
2
- /* eslint-disable no-undef */
3
- if (H) {
4
- if (!H.geo.LineString) {
5
- H.geo.LineString = H.geo.Strip;
6
- }
7
- }
@@ -1,47 +0,0 @@
1
- export default mapProps;
2
- declare namespace mapProps {
3
- export { position };
4
- export { positions };
5
- export { icon };
6
- export { map };
7
- export { group };
8
- export { mapEvents };
9
- export { api };
10
- export { settings };
11
- export { rect };
12
- export { clusterTheme };
13
- }
14
- declare const position: PropTypes.Requireable<PropTypes.InferProps<{
15
- lat: PropTypes.Validator<number>;
16
- lng: PropTypes.Validator<number>;
17
- }>>;
18
- declare const positions: PropTypes.Requireable<(PropTypes.InferProps<{
19
- lat: PropTypes.Validator<number>;
20
- lng: PropTypes.Validator<number>;
21
- }> | null | undefined)[]>;
22
- declare const icon: PropTypes.Requireable<H.map.DomIcon>;
23
- declare const map: PropTypes.Requireable<H.Map>;
24
- declare const group: PropTypes.Requireable<H.map.Group>;
25
- declare const mapEvents: PropTypes.Requireable<H.mapevents.MapEvents>;
26
- declare const api: PropTypes.Requireable<PropTypes.InferProps<{
27
- map: PropTypes.Requireable<H.Map>;
28
- platform: PropTypes.Requireable<H.service.Platform>;
29
- defaultLayers: PropTypes.Requireable<object>;
30
- group: PropTypes.Requireable<NonNullable<H.Map | H.map.Group | null | undefined>>;
31
- }>>;
32
- declare const settings: PropTypes.Requireable<PropTypes.InferProps<{
33
- baseLayer: PropTypes.Requireable<string>;
34
- mapLayer: PropTypes.Requireable<(string | null | undefined)[]>;
35
- showCluster: PropTypes.Requireable<boolean>;
36
- }>>;
37
- declare const rect: PropTypes.Requireable<PropTypes.InferProps<{
38
- top: PropTypes.Validator<number>;
39
- bottom: PropTypes.Validator<number>;
40
- left: PropTypes.Validator<number>;
41
- right: PropTypes.Validator<number>;
42
- }>>;
43
- declare const clusterTheme: PropTypes.Requireable<PropTypes.InferProps<{
44
- getNoisePresentation: PropTypes.Validator<(...args: any[]) => any>;
45
- getClusterPresentation: PropTypes.Validator<(...args: any[]) => any>;
46
- }>>;
47
- import PropTypes from "prop-types";
@@ -1,53 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- /* eslint-disable no-undef */
5
- const prop_types_1 = tslib_1.__importDefault(require("prop-types"));
6
- const position = prop_types_1.default.shape({
7
- lat: prop_types_1.default.number.isRequired,
8
- lng: prop_types_1.default.number.isRequired,
9
- });
10
- const positions = prop_types_1.default.arrayOf(position);
11
- const hMapIcon = prop_types_1.default.instanceOf(H.map.Icon);
12
- const hMapDomIcon = prop_types_1.default.instanceOf(H.map.DomIcon);
13
- const rect = prop_types_1.default.shape({
14
- top: prop_types_1.default.number.isRequired,
15
- bottom: prop_types_1.default.number.isRequired,
16
- left: prop_types_1.default.number.isRequired,
17
- right: prop_types_1.default.number.isRequired,
18
- });
19
- const icon = prop_types_1.default.oneOfType([hMapIcon, hMapDomIcon, prop_types_1.default.string, prop_types_1.default.element]);
20
- const map = prop_types_1.default.instanceOf(H.Map);
21
- const group = prop_types_1.default.instanceOf(H.map.Group);
22
- const mapOrGroup = prop_types_1.default.oneOfType([map, group]);
23
- const platform = prop_types_1.default.instanceOf(H.service.Platform);
24
- const mapEvents = prop_types_1.default.instanceOf(H.mapevents.MapEvents);
25
- const defaultLayers = prop_types_1.default.object;
26
- const api = prop_types_1.default.shape({
27
- map,
28
- platform,
29
- defaultLayers,
30
- group: mapOrGroup,
31
- });
32
- const settings = prop_types_1.default.shape({
33
- baseLayer: prop_types_1.default.string,
34
- mapLayer: prop_types_1.default.arrayOf(prop_types_1.default.string),
35
- showCluster: prop_types_1.default.bool,
36
- });
37
- const clusterTheme = prop_types_1.default.shape({
38
- getNoisePresentation: prop_types_1.default.func.isRequired,
39
- getClusterPresentation: prop_types_1.default.func.isRequired,
40
- });
41
- const mapProps = {
42
- position,
43
- positions,
44
- icon,
45
- map,
46
- group,
47
- mapEvents,
48
- api,
49
- settings,
50
- rect,
51
- clusterTheme,
52
- };
53
- exports.default = mapProps;
@@ -1,2 +0,0 @@
1
- export function validateMinMaxZoomUnchanged(props: any, nextProps: any): void;
2
- export function getKeyOrDefault(defaultValue: any, object: any): any;
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getKeyOrDefault = exports.validateMinMaxZoomUnchanged = void 0;
4
- const tslib_1 = require("tslib");
5
- const getOr_1 = tslib_1.__importDefault(require("lodash/fp/getOr"));
6
- const MapException_1 = tslib_1.__importDefault(require("../exceptions/MapException"));
7
- const validateMinMaxZoomUnchanged = (props, nextProps) => {
8
- if (props.minZoom !== nextProps.minZoom || props.maxZoom !== nextProps.maxZoom) {
9
- throw new MapException_1.default('rio-map currently does not support changing of minZoom/maxZoom property.');
10
- }
11
- };
12
- exports.validateMinMaxZoomUnchanged = validateMinMaxZoomUnchanged;
13
- const getKeyOrDefault = (defaultValue, object) => (0, getOr_1.default)(defaultValue, 'props.key')(object);
14
- exports.getKeyOrDefault = getKeyOrDefault;
@@ -1,3 +0,0 @@
1
- export declare const markerColorOptions: readonly ["bg-map-marker-asset", "bg-map-marker-poi", "bg-map-marker-geofence", "bg-map-marker-route"];
2
- export type MarkerColor = (typeof markerColorOptions)[number];
3
- export declare const markerColorMapping: Record<MarkerColor, string>;
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.markerColorMapping = exports.markerColorOptions = void 0;
4
- exports.markerColorOptions = [
5
- 'bg-map-marker-asset',
6
- 'bg-map-marker-poi',
7
- 'bg-map-marker-geofence',
8
- 'bg-map-marker-route',
9
- ];
10
- exports.markerColorMapping = {
11
- 'bg-map-marker-asset': 'map-marker-type-asset',
12
- 'bg-map-marker-poi': 'map-marker-type-poi',
13
- 'bg-map-marker-geofence': 'map-marker-type-geofence',
14
- 'bg-map-marker-route': 'map-marker-type-route',
15
- };
@@ -1,2 +0,0 @@
1
- export default getMenuItems;
2
- declare function getMenuItems(items: any, closeMenu: any, onMouseEnter: any): any;
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = tslib_1.__importDefault(require("react"));
6
- const MenuItem_1 = tslib_1.__importDefault(require("./MenuItem"));
7
- const getMenuItems = (items, closeMenu, onMouseEnter) => {
8
- return items.map((item, index) => ((0, jsx_runtime_1.jsx)(MenuItem_1.default, Object.assign({}, item, { index: index, closeMenu: closeMenu, onMouseEnter: onMouseEnter }), index)));
9
- };
10
- exports.default = getMenuItems;
@@ -1,83 +0,0 @@
1
- export class BaseDropdownMenu extends React.Component<any, any, any> {
2
- constructor(props: any);
3
- state: {
4
- dropup: boolean;
5
- pullRight: any;
6
- focusedItemIndex: any;
7
- keyboardUsed: any;
8
- itemDOMValues: never[];
9
- };
10
- handleOptionChange(event: any): void;
11
- handleKeydown(event: any): void;
12
- componentDidMount(): void;
13
- UNSAFE_componentWillReceiveProps(nextProps: any): void;
14
- focusOption(direction: any): void;
15
- getDropdownDOMNode(): Element | Text | null;
16
- getOptionNodes(): any;
17
- setItemDOMValues(): {
18
- id: any;
19
- text: any;
20
- }[] | undefined;
21
- getFocusedOptionNode(): any;
22
- selectOptionOnEnter(event: any): void;
23
- render(): import("react/jsx-runtime").JSX.Element | null;
24
- refDropdownMenu: HTMLUListElement | null | undefined;
25
- renderMenuOption(option: any, index: any): import("react/jsx-runtime").JSX.Element;
26
- getSelectedFocusedItemIndex(): any;
27
- isAutoDropActive(): boolean;
28
- openMenu(nextProps: any): void;
29
- onDocumentKeydownListener: {
30
- remove(): void;
31
- } | undefined;
32
- closeMenu(): void;
33
- }
34
- export namespace BaseDropdownMenu {
35
- namespace defaultProps {
36
- export const isOpen: boolean;
37
- export function updateDOMValues(): void;
38
- export function onOpen(): void;
39
- export function onSelect(): void;
40
- export function onClose(): void;
41
- export const options: never[];
42
- export const autoDropDirection: boolean;
43
- export const pullRight: boolean;
44
- export const useActiveClass: boolean;
45
- export const keyboardUsed: boolean;
46
- export { DEFAULT_FOCUSED_ITEM_INDEX as focusedItemIndex };
47
- }
48
- namespace propTypes {
49
- const options_1: PropTypes.Requireable<(PropTypes.InferProps<{
50
- id: PropTypes.Validator<string>;
51
- label: PropTypes.Validator<any>;
52
- icon: PropTypes.Requireable<object>;
53
- selected: PropTypes.Requireable<boolean>;
54
- disabled: PropTypes.Requireable<boolean>;
55
- header: PropTypes.Requireable<boolean>;
56
- }> | null | undefined)[]>;
57
- export { options_1 as options };
58
- const isOpen_1: PropTypes.Requireable<boolean>;
59
- export { isOpen_1 as isOpen };
60
- const updateDOMValues_1: PropTypes.Requireable<(...args: any[]) => any>;
61
- export { updateDOMValues_1 as updateDOMValues };
62
- const onOpen_1: PropTypes.Requireable<(...args: any[]) => any>;
63
- export { onOpen_1 as onOpen };
64
- const onSelect_1: PropTypes.Requireable<(...args: any[]) => any>;
65
- export { onSelect_1 as onSelect };
66
- const onClose_1: PropTypes.Requireable<(...args: any[]) => any>;
67
- export { onClose_1 as onClose };
68
- export const placeholder: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
69
- export const dropup: PropTypes.Requireable<boolean>;
70
- const pullRight_1: PropTypes.Requireable<boolean>;
71
- export { pullRight_1 as pullRight };
72
- const autoDropDirection_1: PropTypes.Requireable<boolean>;
73
- export { autoDropDirection_1 as autoDropDirection };
74
- export const noItemMessage: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
75
- export const focusedItemIndex: PropTypes.Validator<number>;
76
- export const dropdownClassName: PropTypes.Requireable<string>;
77
- export const requestItemDOMValues: PropTypes.Requireable<boolean>;
78
- }
79
- }
80
- import React from "react";
81
- declare const DEFAULT_FOCUSED_ITEM_INDEX: -1;
82
- import PropTypes from "prop-types";
83
- export {};