@rio-cloud/rio-uikit 1.0.0 → 1.2.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 (370) hide show
  1. package/.DS_Store +0 -0
  2. package/DropdownHeader.d.ts +2 -0
  3. package/DropdownHeader.js +2 -0
  4. package/FeedbackInlineButtons.d.ts +2 -0
  5. package/FeedbackInlineButtons.js +2 -0
  6. package/FeedbackRating.d.ts +2 -0
  7. package/FeedbackRating.js +2 -0
  8. package/FeedbackReactions.d.ts +2 -0
  9. package/FeedbackReactions.js +2 -0
  10. package/MapAdditionalLayerSettings.d.ts +2 -0
  11. package/MapAdditionalLayerSettings.js +2 -0
  12. package/MapSettingsDropdownHeader.d.ts +2 -0
  13. package/MapSettingsDropdownHeader.js +2 -0
  14. package/SmoothScrollbars.d.ts +2 -0
  15. package/SmoothScrollbars.js +2 -0
  16. package/components/.DS_Store +0 -0
  17. package/components/actionBarItem/ActionBarItemListItem.js +2 -2
  18. package/components/assetTree/AssetTree.js +2 -1
  19. package/components/assetTree/Tree.d.ts +4 -0
  20. package/components/assetTree/Tree.js +2 -2
  21. package/components/assetTree/TreeOptions.d.ts +1 -0
  22. package/components/assetTree/TreeOptions.js +16 -2
  23. package/components/assetTree/TreeSidebarCategories.js +1 -1
  24. package/components/calendarStripe/CalendarStripe.js +2 -2
  25. package/components/feedback/FeedbackInlineButtons.d.ts +13 -0
  26. package/components/feedback/FeedbackInlineButtons.js +9 -0
  27. package/components/feedback/FeedbackRating.d.ts +65 -0
  28. package/components/feedback/FeedbackRating.js +23 -0
  29. package/components/feedback/FeedbackReactions.d.ts +71 -0
  30. package/components/feedback/FeedbackReactions.js +26 -0
  31. package/components/listMenu/ListMenu.d.ts +5 -1
  32. package/components/listMenu/ListMenu.js +2 -2
  33. package/components/map/.DS_Store +0 -0
  34. package/components/map/components/.DS_Store +0 -0
  35. package/components/map/components/features/basics/Marker.js +1 -1
  36. package/components/map/components/features/settings/MapSettingsItem.d.ts +1 -0
  37. package/components/map/components/features/settings/MapSettingsItem.js +14 -11
  38. package/components/map/components/features/settings/MapSettingsTile.d.ts +3 -2
  39. package/components/map/components/features/settings/MapSettingsTile.js +40 -5
  40. package/components/map/components/features/settings/builtinSettings/MapAdditionalLayerSettings.d.ts +9 -0
  41. package/components/map/components/features/settings/builtinSettings/MapAdditionalLayerSettings.js +15 -0
  42. package/components/map/components/features/settings/builtinSettings/MapClusterSettings.d.ts +3 -0
  43. package/components/map/components/features/settings/builtinSettings/MapClusterSettings.js +8 -2
  44. package/components/map/components/features/settings/builtinSettings/MapLayerSettings.js +15 -9
  45. package/components/map/components/features/settings/builtinSettings/MapTypeSettings.d.ts +6 -0
  46. package/components/map/components/features/settings/builtinSettings/MapTypeSettings.js +20 -2
  47. package/components/map/components/features/settings/buttons/MapCenterMarkerButton.js +2 -2
  48. package/components/map/components/features/settings/items/MapCustomerPoiSettingsItem.d.ts +2 -0
  49. package/components/map/components/features/settings/items/MapLayerIncidentsItem.d.ts +2 -0
  50. package/components/map/components/features/settings/items/MapLayerRoadRestrictionsItem.d.ts +2 -0
  51. package/components/map/components/features/settings/items/MapLayerTrafficItem.d.ts +2 -0
  52. package/components/map/components/features/settings/items/MapSettingsDropdownHeader.d.ts +4 -0
  53. package/components/map/components/features/settings/items/MapSettingsDropdownHeader.js +9 -0
  54. package/components/map/components/features/settings/items/MapWorkshopPoiSettingsItem.d.ts +2 -0
  55. package/components/map/icons/MapIcon.d.ts +1 -2
  56. package/components/map/icons/MapIcon.js +3 -1
  57. package/components/map/utils/mapTypes.d.ts +1 -1
  58. package/components/map/utils/mapTypes.js +12 -4
  59. package/components/mapMarker/ClusterMapMarker.d.ts +8 -0
  60. package/components/mapMarker/ClusterMapMarker.js +5 -4
  61. package/components/mapMarker/SingleMapMarker.d.ts +40 -5
  62. package/components/mapMarker/SingleMapMarker.js +19 -6
  63. package/components/selects/DropdownHeader.d.ts +1 -0
  64. package/components/selects/DropdownHeader.js +2 -2
  65. package/components/selects/Multiselect.js +2 -2
  66. package/components/selects/MultiselectToggleFilter.js +1 -1
  67. package/components/states/CustomState.js +21 -8
  68. package/components/states/StateButton.d.ts +8 -1
  69. package/components/states/StateButton.js +5 -4
  70. package/hooks/useAfterMount.js +8 -4
  71. package/lib/.DS_Store +0 -0
  72. package/lib/es/.DS_Store +0 -0
  73. package/lib/es/DropdownHeader.d.ts +2 -0
  74. package/lib/es/DropdownHeader.js +7 -0
  75. package/lib/es/FeedbackInlineButtons.d.ts +2 -0
  76. package/lib/es/FeedbackInlineButtons.js +7 -0
  77. package/lib/es/FeedbackRating.d.ts +2 -0
  78. package/lib/es/FeedbackRating.js +7 -0
  79. package/lib/es/FeedbackReactions.d.ts +2 -0
  80. package/lib/es/FeedbackReactions.js +7 -0
  81. package/lib/es/MapAdditionalLayerSettings.d.ts +2 -0
  82. package/lib/es/MapAdditionalLayerSettings.js +7 -0
  83. package/lib/es/MapSettingsDropdownHeader.d.ts +2 -0
  84. package/lib/es/MapSettingsDropdownHeader.js +7 -0
  85. package/lib/es/SmoothScrollbars.d.ts +2 -0
  86. package/lib/es/SmoothScrollbars.js +7 -0
  87. package/lib/es/components/.DS_Store +0 -0
  88. package/lib/es/components/actionBarItem/ActionBarItemListItem.js +2 -2
  89. package/lib/es/components/assetTree/AssetTree.js +2 -1
  90. package/lib/es/components/assetTree/Tree.d.ts +4 -0
  91. package/lib/es/components/assetTree/Tree.js +2 -2
  92. package/lib/es/components/assetTree/TreeOptions.d.ts +1 -0
  93. package/lib/es/components/assetTree/TreeOptions.js +16 -2
  94. package/lib/es/components/assetTree/TreeSidebarCategories.js +1 -1
  95. package/lib/es/components/calendarStripe/CalendarStripe.js +1 -1
  96. package/lib/es/components/feedback/FeedbackInlineButtons.d.ts +13 -0
  97. package/lib/es/components/feedback/FeedbackInlineButtons.js +11 -0
  98. package/lib/es/components/feedback/FeedbackRating.d.ts +65 -0
  99. package/lib/es/components/feedback/FeedbackRating.js +25 -0
  100. package/lib/es/components/feedback/FeedbackReactions.d.ts +71 -0
  101. package/lib/es/components/feedback/FeedbackReactions.js +28 -0
  102. package/lib/es/components/listMenu/ListMenu.d.ts +5 -1
  103. package/lib/es/components/listMenu/ListMenu.js +2 -2
  104. package/lib/es/components/map/components/features/basics/Marker.js +1 -1
  105. package/lib/es/components/map/components/features/settings/MapSettingsItem.d.ts +1 -0
  106. package/lib/es/components/map/components/features/settings/MapSettingsItem.js +13 -10
  107. package/lib/es/components/map/components/features/settings/MapSettingsTile.d.ts +3 -2
  108. package/lib/es/components/map/components/features/settings/MapSettingsTile.js +39 -4
  109. package/lib/es/components/map/components/features/settings/builtinSettings/MapAdditionalLayerSettings.d.ts +9 -0
  110. package/lib/es/components/map/components/features/settings/builtinSettings/MapAdditionalLayerSettings.js +17 -0
  111. package/lib/es/components/map/components/features/settings/builtinSettings/MapClusterSettings.d.ts +3 -0
  112. package/lib/es/components/map/components/features/settings/builtinSettings/MapClusterSettings.js +8 -2
  113. package/lib/es/components/map/components/features/settings/builtinSettings/MapLayerSettings.js +14 -8
  114. package/lib/es/components/map/components/features/settings/builtinSettings/MapTypeSettings.d.ts +6 -0
  115. package/lib/es/components/map/components/features/settings/builtinSettings/MapTypeSettings.js +20 -2
  116. package/lib/es/components/map/components/features/settings/buttons/MapCenterMarkerButton.js +1 -1
  117. package/lib/es/components/map/components/features/settings/items/MapCustomerPoiSettingsItem.d.ts +2 -0
  118. package/lib/es/components/map/components/features/settings/items/MapLayerIncidentsItem.d.ts +2 -0
  119. package/lib/es/components/map/components/features/settings/items/MapLayerRoadRestrictionsItem.d.ts +2 -0
  120. package/lib/es/components/map/components/features/settings/items/MapLayerTrafficItem.d.ts +2 -0
  121. package/lib/es/components/map/components/features/settings/items/MapSettingsDropdownHeader.d.ts +4 -0
  122. package/lib/es/components/map/components/features/settings/items/MapSettingsDropdownHeader.js +11 -0
  123. package/lib/es/components/map/components/features/settings/items/MapWorkshopPoiSettingsItem.d.ts +2 -0
  124. package/lib/es/components/map/icons/MapIcon.d.ts +1 -2
  125. package/lib/es/components/map/icons/MapIcon.js +3 -1
  126. package/lib/es/components/map/utils/mapTypes.d.ts +1 -1
  127. package/lib/es/components/map/utils/mapTypes.js +12 -4
  128. package/lib/es/components/mapMarker/ClusterMapMarker.d.ts +8 -0
  129. package/lib/es/components/mapMarker/ClusterMapMarker.js +5 -4
  130. package/lib/es/components/mapMarker/SingleMapMarker.d.ts +40 -5
  131. package/lib/es/components/mapMarker/SingleMapMarker.js +18 -5
  132. package/lib/es/components/selects/DropdownHeader.d.ts +1 -0
  133. package/lib/es/components/selects/DropdownHeader.js +2 -2
  134. package/lib/es/components/selects/Multiselect.js +1 -1
  135. package/lib/es/components/selects/MultiselectToggleFilter.js +1 -1
  136. package/lib/es/components/states/CustomState.js +20 -7
  137. package/lib/es/components/states/StateButton.d.ts +8 -1
  138. package/lib/es/components/states/StateButton.js +5 -4
  139. package/lib/es/hooks/useAfterMount.js +8 -4
  140. package/lib/es/styles/variables/colors/colors.json +8 -10
  141. package/lib/es/utils/deviceUtils.d.ts +1 -0
  142. package/lib/es/utils/deviceUtils.js +3 -1
  143. package/lib/es/version.json +1 -1
  144. package/package.json +30 -27
  145. package/styles/variables/colors/colors.json +8 -10
  146. package/utils/deviceUtils.d.ts +1 -0
  147. package/utils/deviceUtils.js +1 -0
  148. package/version.json +1 -1
  149. package/BrowserWarning.d.ts +0 -5
  150. package/BrowserWarning.js +0 -2
  151. package/DomMarker.d.ts +0 -5
  152. package/DomMarker.js +0 -2
  153. package/EnhancedMapEvent.d.ts +0 -11
  154. package/GroupSelectionUtil.d.ts +0 -2
  155. package/GroupSelectionUtil.js +0 -2
  156. package/IncidentsLayer.d.ts +0 -4
  157. package/IncidentsLayer.js +0 -2
  158. package/TrafficLayer.d.ts +0 -4
  159. package/TrafficLayer.js +0 -2
  160. package/TruckLayer.d.ts +0 -4
  161. package/TruckLayer.js +0 -2
  162. package/components/assetTree/excludeFromList.d.ts +0 -1
  163. package/components/assetTree/excludeFromList.js +0 -1
  164. package/components/browserWarning/BrowserIcons.d.ts +0 -2
  165. package/components/browserWarning/BrowserIcons.js +0 -5
  166. package/components/browserWarning/BrowserWarning.d.ts +0 -15
  167. package/components/browserWarning/BrowserWarning.js +0 -46
  168. package/components/browserWarning/BrowserWarningMessageDE.d.ts +0 -4
  169. package/components/browserWarning/BrowserWarningMessageDE.js +0 -6
  170. package/components/browserWarning/BrowserWarningMessageEN.d.ts +0 -4
  171. package/components/browserWarning/BrowserWarningMessageEN.js +0 -6
  172. package/components/carousel/CarouselCaption.d.ts +0 -13
  173. package/components/carousel/CarouselCaption.js +0 -18
  174. package/components/carousel/CarouselItem.d.ts +0 -36
  175. package/components/carousel/CarouselItem.js +0 -85
  176. package/components/dialog/baseDialogPropTypes.d.ts +0 -14
  177. package/components/dialog/baseDialogPropTypes.js +0 -13
  178. package/components/driverName/DriverName.d.ts +0 -18
  179. package/components/driverName/DriverName.js +0 -18
  180. package/components/dropdown/menuItemsPropTypes.d.ts +0 -9
  181. package/components/dropdown/menuItemsPropTypes.js +0 -8
  182. package/components/map/components/MapSettingContext.d.ts +0 -15
  183. package/components/map/components/MapSettingContext.js +0 -5
  184. package/components/map/components/context.d.ts +0 -2
  185. package/components/map/components/context.js +0 -3
  186. package/components/map/components/features/basics/MapLayerGroup.d.ts +0 -23
  187. package/components/map/components/features/basics/MapLayerGroup.js +0 -45
  188. package/components/map/components/features/basics/marker/DomMarker.d.ts +0 -33
  189. package/components/map/components/features/basics/marker/DomMarker.js +0 -55
  190. package/components/map/components/features/basics/marker/Marker.d.ts +0 -21
  191. package/components/map/components/features/basics/marker/Marker.js +0 -116
  192. package/components/map/components/features/basics/marker/TextMarker.d.ts +0 -17
  193. package/components/map/components/features/basics/marker/TextMarker.js +0 -28
  194. package/components/map/components/features/layers/IncidentsLayer.d.ts +0 -2
  195. package/components/map/components/features/layers/IncidentsLayer.js +0 -25
  196. package/components/map/components/features/layers/Layer.d.ts +0 -15
  197. package/components/map/components/features/layers/Layer.js +0 -23
  198. package/components/map/components/features/layers/RoadRestrictionLayer.d.ts +0 -2
  199. package/components/map/components/features/layers/RoadRestrictionLayer.js +0 -26
  200. package/components/map/components/features/layers/TrafficLayer.d.ts +0 -2
  201. package/components/map/components/features/layers/TrafficLayer.js +0 -39
  202. package/components/map/components/features/layers/baselayers/DefaultRasterLayer.d.ts +0 -2
  203. package/components/map/components/features/layers/baselayers/DefaultRasterLayer.js +0 -17
  204. package/components/map/components/features/layers/baselayers/DefaultVectorLayer.d.ts +0 -2
  205. package/components/map/components/features/layers/baselayers/DefaultVectorLayer.js +0 -14
  206. package/components/map/components/features/layers/baselayers/FleetStyleLayer.d.ts +0 -2
  207. package/components/map/components/features/layers/baselayers/FleetStyleLayer.js +0 -15
  208. package/components/map/components/features/layers/baselayers/NightLayer.d.ts +0 -2
  209. package/components/map/components/features/layers/baselayers/NightLayer.js +0 -14
  210. package/components/map/components/features/layers/baselayers/SatelliteLayer.d.ts +0 -2
  211. package/components/map/components/features/layers/baselayers/SatelliteLayer.js +0 -15
  212. package/components/map/components/features/layers/baselayers/TerrainLayer.d.ts +0 -2
  213. package/components/map/components/features/layers/baselayers/TerrainLayer.js +0 -15
  214. package/components/map/components/features/layers/baselayers/useBaseLayer.d.ts +0 -2
  215. package/components/map/components/features/layers/baselayers/useBaseLayer.js +0 -47
  216. package/components/map/components/mapUtils.d.ts +0 -50
  217. package/components/map/components/mapUtils.js +0 -148
  218. package/components/map/herePolyfill.d.ts +0 -0
  219. package/components/map/herePolyfill.js +0 -7
  220. package/components/map/utils/proptypes.d.ts +0 -47
  221. package/components/map/utils/proptypes.js +0 -50
  222. package/components/map/utils/validation.d.ts +0 -2
  223. package/components/map/utils/validation.js +0 -8
  224. package/components/mapMarker/MarkerColor.d.ts +0 -3
  225. package/components/mapMarker/MarkerColor.js +0 -12
  226. package/components/menuItems/getMenuItems.d.ts +0 -2
  227. package/components/menuItems/getMenuItems.js +0 -7
  228. package/components/selects/BaseDropdownMenu.d.ts +0 -83
  229. package/components/selects/BaseDropdownMenu.js +0 -255
  230. package/components/selects/WithFeedback.d.ts +0 -27
  231. package/components/selects/WithFeedback.js +0 -12
  232. package/components/states/baseStatePropTypes.d.ts +0 -26
  233. package/components/states/baseStatePropTypes.js +0 -26
  234. package/components/table/tableSettingsPropTypes.d.ts +0 -8
  235. package/components/table/tableSettingsPropTypes.js +0 -6
  236. package/lib/es/BrowserWarning.d.ts +0 -5
  237. package/lib/es/BrowserWarning.js +0 -6
  238. package/lib/es/DomMarker.d.ts +0 -5
  239. package/lib/es/DomMarker.js +0 -6
  240. package/lib/es/EnhancedMapEvent.d.ts +0 -11
  241. package/lib/es/GroupSelectionUtil.d.ts +0 -2
  242. package/lib/es/GroupSelectionUtil.js +0 -5
  243. package/lib/es/IncidentsLayer.d.ts +0 -4
  244. package/lib/es/IncidentsLayer.js +0 -6
  245. package/lib/es/TrafficLayer.d.ts +0 -4
  246. package/lib/es/TrafficLayer.js +0 -6
  247. package/lib/es/TruckLayer.d.ts +0 -4
  248. package/lib/es/TruckLayer.js +0 -6
  249. package/lib/es/components/assetTree/autoAnimateFrames.d.ts +0 -1
  250. package/lib/es/components/assetTree/autoAnimateFrames.js +0 -55
  251. package/lib/es/components/assetTree/excludeFromList.d.ts +0 -1
  252. package/lib/es/components/assetTree/excludeFromList.js +0 -5
  253. package/lib/es/components/browserWarning/BrowserIcons.d.ts +0 -2
  254. package/lib/es/components/browserWarning/BrowserIcons.js +0 -11
  255. package/lib/es/components/browserWarning/BrowserWarning.d.ts +0 -15
  256. package/lib/es/components/browserWarning/BrowserWarning.js +0 -49
  257. package/lib/es/components/browserWarning/BrowserWarningMessageDE.d.ts +0 -4
  258. package/lib/es/components/browserWarning/BrowserWarningMessageDE.js +0 -9
  259. package/lib/es/components/browserWarning/BrowserWarningMessageEN.d.ts +0 -4
  260. package/lib/es/components/browserWarning/BrowserWarningMessageEN.js +0 -9
  261. package/lib/es/components/carousel/CarouselCaption.d.ts +0 -13
  262. package/lib/es/components/carousel/CarouselCaption.js +0 -20
  263. package/lib/es/components/carousel/CarouselItem.d.ts +0 -36
  264. package/lib/es/components/carousel/CarouselItem.js +0 -87
  265. package/lib/es/components/charts/Sector.d.ts +0 -0
  266. package/lib/es/components/charts/Sector.js +0 -1
  267. package/lib/es/components/dialog/baseDialogPropTypes.d.ts +0 -14
  268. package/lib/es/components/dialog/baseDialogPropTypes.js +0 -16
  269. package/lib/es/components/driverName/DriverName.d.ts +0 -18
  270. package/lib/es/components/driverName/DriverName.js +0 -23
  271. package/lib/es/components/dropdown/menuItemsPropTypes.d.ts +0 -9
  272. package/lib/es/components/dropdown/menuItemsPropTypes.js +0 -11
  273. package/lib/es/components/map/components/MapSettingContext.d.ts +0 -15
  274. package/lib/es/components/map/components/MapSettingContext.js +0 -8
  275. package/lib/es/components/map/components/context.d.ts +0 -2
  276. package/lib/es/components/map/components/context.js +0 -6
  277. package/lib/es/components/map/components/features/basics/MapLayerGroup.d.ts +0 -23
  278. package/lib/es/components/map/components/features/basics/MapLayerGroup.js +0 -48
  279. package/lib/es/components/map/components/features/basics/marker/DomMarker.d.ts +0 -33
  280. package/lib/es/components/map/components/features/basics/marker/DomMarker.js +0 -58
  281. package/lib/es/components/map/components/features/basics/marker/Marker.d.ts +0 -21
  282. package/lib/es/components/map/components/features/basics/marker/Marker.js +0 -123
  283. package/lib/es/components/map/components/features/basics/marker/TextMarker.d.ts +0 -17
  284. package/lib/es/components/map/components/features/basics/marker/TextMarker.js +0 -31
  285. package/lib/es/components/map/components/features/layers/IncidentsLayer.d.ts +0 -2
  286. package/lib/es/components/map/components/features/layers/IncidentsLayer.js +0 -27
  287. package/lib/es/components/map/components/features/layers/Layer.d.ts +0 -15
  288. package/lib/es/components/map/components/features/layers/Layer.js +0 -26
  289. package/lib/es/components/map/components/features/layers/MapBaseLayer.d.ts +0 -8
  290. package/lib/es/components/map/components/features/layers/MapBaseLayer.js +0 -35
  291. package/lib/es/components/map/components/features/layers/RoadRestrictionLayer.d.ts +0 -2
  292. package/lib/es/components/map/components/features/layers/RoadRestrictionLayer.js +0 -28
  293. package/lib/es/components/map/components/features/layers/TrafficLayer.d.ts +0 -2
  294. package/lib/es/components/map/components/features/layers/TrafficLayer.js +0 -41
  295. package/lib/es/components/map/components/features/layers/baselayers/DefaultRasterLayer.d.ts +0 -4
  296. package/lib/es/components/map/components/features/layers/baselayers/DefaultRasterLayer.js +0 -36
  297. package/lib/es/components/map/components/features/layers/baselayers/DefaultVectorLayer.d.ts +0 -4
  298. package/lib/es/components/map/components/features/layers/baselayers/DefaultVectorLayer.js +0 -16
  299. package/lib/es/components/map/components/features/layers/baselayers/FleetStyleLayer.d.ts +0 -4
  300. package/lib/es/components/map/components/features/layers/baselayers/FleetStyleLayer.js +0 -17
  301. package/lib/es/components/map/components/features/layers/baselayers/NightLayer.d.ts +0 -4
  302. package/lib/es/components/map/components/features/layers/baselayers/NightLayer.js +0 -16
  303. package/lib/es/components/map/components/features/layers/baselayers/SatelliteLayer.d.ts +0 -4
  304. package/lib/es/components/map/components/features/layers/baselayers/SatelliteLayer.js +0 -34
  305. package/lib/es/components/map/components/features/layers/baselayers/TerrainLayer.d.ts +0 -4
  306. package/lib/es/components/map/components/features/layers/baselayers/TerrainLayer.js +0 -17
  307. package/lib/es/components/map/components/features/layers/baselayers/useBaseLayer.d.ts +0 -11
  308. package/lib/es/components/map/components/features/layers/baselayers/useBaseLayer.js +0 -76
  309. package/lib/es/components/map/components/mapUtils.d.ts +0 -50
  310. package/lib/es/components/map/components/mapUtils.js +0 -154
  311. package/lib/es/components/map/herePolyfill.d.ts +0 -0
  312. package/lib/es/components/map/herePolyfill.js +0 -7
  313. package/lib/es/components/map/utils/proptypes.d.ts +0 -47
  314. package/lib/es/components/map/utils/proptypes.js +0 -53
  315. package/lib/es/components/map/utils/validation.d.ts +0 -2
  316. package/lib/es/components/map/utils/validation.js +0 -14
  317. package/lib/es/components/mapMarker/MarkerColor.d.ts +0 -3
  318. package/lib/es/components/mapMarker/MarkerColor.js +0 -15
  319. package/lib/es/components/menuItems/getMenuItems.d.ts +0 -2
  320. package/lib/es/components/menuItems/getMenuItems.js +0 -10
  321. package/lib/es/components/selects/BaseDropdownMenu.d.ts +0 -83
  322. package/lib/es/components/selects/BaseDropdownMenu.js +0 -260
  323. package/lib/es/components/selects/WithFeedback.d.ts +0 -27
  324. package/lib/es/components/selects/WithFeedback.js +0 -15
  325. package/lib/es/components/states/baseStatePropTypes.d.ts +0 -26
  326. package/lib/es/components/states/baseStatePropTypes.js +0 -30
  327. package/lib/es/components/table/tableSettingsPropTypes.d.ts +0 -8
  328. package/lib/es/components/table/tableSettingsPropTypes.js +0 -10
  329. package/lib/es/mapIndex.d.ts +0 -38
  330. package/lib/es/mapIndex.js +0 -77
  331. package/lib/es/styles/variables/colors.json +0 -74
  332. package/lib/es/themes/Volkswagen/components/applicationHeader/modulePropTypes.d.ts +0 -6
  333. package/lib/es/themes/Volkswagen/components/applicationHeader/modulePropTypes.js +0 -8
  334. package/lib/es/types.d.ts +0 -71
  335. package/lib/es/types.js +0 -2
  336. package/lib/es/utils/GroupSelectionUtil.d.ts +0 -1
  337. package/lib/es/utils/GroupSelectionUtil.js +0 -85
  338. package/lib/es/utils/addEventListener.d.ts +0 -3
  339. package/lib/es/utils/addEventListener.js +0 -17
  340. package/lib/es/utils/addFocusListener.d.ts +0 -3
  341. package/lib/es/utils/addFocusListener.js +0 -24
  342. package/lib/es/utils/getOffsetTopWholeScreen.d.ts +0 -1
  343. package/lib/es/utils/getOffsetTopWholeScreen.js +0 -9
  344. package/lib/es/utils/init.d.ts +0 -2
  345. package/lib/es/utils/init.js +0 -121
  346. package/lib/es/utils/logPropError.d.ts +0 -3
  347. package/lib/es/utils/logPropError.js +0 -28
  348. package/lib/es/utils/ownerDocument.d.ts +0 -1
  349. package/lib/es/utils/ownerDocument.js +0 -12
  350. package/mapIndex.d.ts +0 -38
  351. package/mapIndex.js +0 -42
  352. package/styles/variables/colors.json +0 -74
  353. package/themes/Volkswagen/components/applicationHeader/modulePropTypes.d.ts +0 -6
  354. package/themes/Volkswagen/components/applicationHeader/modulePropTypes.js +0 -5
  355. package/types.d.ts +0 -71
  356. package/types.js +0 -1
  357. package/utils/GroupSelectionUtil.d.ts +0 -1
  358. package/utils/GroupSelectionUtil.js +0 -80
  359. package/utils/addEventListener.d.ts +0 -3
  360. package/utils/addEventListener.js +0 -13
  361. package/utils/addFocusListener.d.ts +0 -3
  362. package/utils/addFocusListener.js +0 -21
  363. package/utils/getOffsetTopWholeScreen.d.ts +0 -1
  364. package/utils/getOffsetTopWholeScreen.js +0 -6
  365. package/utils/init.d.ts +0 -2
  366. package/utils/init.js +0 -117
  367. package/utils/logPropError.d.ts +0 -3
  368. package/utils/logPropError.js +0 -23
  369. package/utils/ownerDocument.d.ts +0 -1
  370. package/utils/ownerDocument.js +0 -8
@@ -6,14 +6,20 @@ const react_1 = tslib_1.__importStar(require("react"));
6
6
  const framer_motion_1 = require("framer-motion");
7
7
  const classnames_1 = tslib_1.__importDefault(require("classnames"));
8
8
  const noop_1 = tslib_1.__importDefault(require("lodash/fp/noop"));
9
+ const react_popper_1 = require("react-popper");
9
10
  const OverlayTrigger_1 = tslib_1.__importDefault(require("../../../../overlay/OverlayTrigger"));
10
11
  const Tooltip_1 = tslib_1.__importDefault(require("../../../../tooltip/Tooltip"));
11
12
  const useClickOutside_1 = tslib_1.__importDefault(require("../../../../../hooks/useClickOutside"));
13
+ const MenuItemList_1 = tslib_1.__importDefault(require("../../../../menuItems/MenuItemList"));
14
+ const MenuItem_1 = tslib_1.__importDefault(require("../../../../menuItems/MenuItem"));
15
+ const deviceUtils_1 = require("../../../../../utils/deviceUtils");
16
+ const TOOLTIP_SHOW_TIMEOUT_IN_MS = 800;
17
+ const TOOLTIP_HIDE_TIMEOUT_IN_MS = 100;
12
18
  const getComponentWithTooltip = (component, tooltip) => {
13
- return ((0, jsx_runtime_1.jsx)(OverlayTrigger_1.default, Object.assign({ placement: Tooltip_1.default.TOP, delay: { show: 1200, hide: 100 }, overlay: (0, jsx_runtime_1.jsx)(Tooltip_1.default, Object.assign({ id: 'tooltip', width: 'auto' }, { children: tooltip })) }, { children: component })));
19
+ return ((0, jsx_runtime_1.jsx)(OverlayTrigger_1.default, Object.assign({ placement: Tooltip_1.default.TOP, delay: { show: TOOLTIP_SHOW_TIMEOUT_IN_MS, hide: TOOLTIP_HIDE_TIMEOUT_IN_MS }, overlay: (0, jsx_runtime_1.jsx)(Tooltip_1.default, Object.assign({ id: 'tooltip', width: 'auto' }, { children: tooltip })) }, { children: component })));
14
20
  };
15
21
  const MapSettingsTile = (props) => {
16
- const { onToggle = noop_1.default, activeIcon, inactiveIcon, isActive = false, panel, className, buttonClassName, tooltip } = props, remainingProps = tslib_1.__rest(props, ["onToggle", "activeIcon", "inactiveIcon", "isActive", "panel", "className", "buttonClassName", "tooltip"]);
22
+ const { onToggle = noop_1.default, activeIcon, inactiveIcon, isActive = false, panel, items, className, buttonClassName, tooltip } = props, remainingProps = tslib_1.__rest(props, ["onToggle", "activeIcon", "inactiveIcon", "isActive", "panel", "items", "className", "buttonClassName", "tooltip"]);
17
23
  const [isOpen, setIsOpen] = (0, react_1.useState)(false);
18
24
  const handleToggle = () => {
19
25
  const newState = !isOpen;
@@ -29,8 +35,32 @@ const MapSettingsTile = (props) => {
29
35
  }
30
36
  };
31
37
  const buttonRef = (0, useClickOutside_1.default)(handleClosePanel);
38
+ const [toggleRef, setToggleRef] = (0, react_1.useState)(null);
39
+ const [refDropdownMenu, setRefDropdownMenu] = (0, react_1.useState)(null);
40
+ const { styles, attributes } = (0, react_popper_1.usePopper)(toggleRef, refDropdownMenu, {
41
+ placement: 'top-end',
42
+ modifiers: (0, deviceUtils_1.isMobileScreen)()
43
+ ? [
44
+ {
45
+ name: 'offset',
46
+ options: {
47
+ offset: [-60, -60],
48
+ },
49
+ },
50
+ ]
51
+ : [],
52
+ });
53
+ const dropdownWrapperRef = (0, useClickOutside_1.default)((event) => {
54
+ if (toggleRef === null || toggleRef === void 0 ? void 0 : toggleRef.contains(event.target)) {
55
+ return;
56
+ }
57
+ if (isOpen) {
58
+ setIsOpen(false);
59
+ onToggle(false);
60
+ }
61
+ });
32
62
  const wrapperClasses = (0, classnames_1.default)('MapSettingsTile', className);
33
- const buttonClasses = (0, classnames_1.default)('MapSettingsButton', buttonClassName);
63
+ const buttonClasses = (0, classnames_1.default)('MapSettingsButton', isOpen && 'active', buttonClassName);
34
64
  const activeIconClassNames = (0, classnames_1.default)('MapSettingsTileIcon', 'hover-scale-110', isActive ? 'display-block' : 'display-none', (activeIcon === null || activeIcon === void 0 ? void 0 : activeIcon.props.className) || '');
35
65
  const inactiveIconClassNames = (0, classnames_1.default)('MapSettingsTileIcon', 'hover-scale-110', isActive ? 'display-none' : 'display-block', (inactiveIcon === null || inactiveIcon === void 0 ? void 0 : inactiveIcon.props.className) || '');
36
66
  const button = ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: buttonClasses, onClick: handleToggle }, { children: [activeIcon &&
@@ -40,6 +70,11 @@ const MapSettingsTile = (props) => {
40
70
  react_1.default.cloneElement(inactiveIcon, {
41
71
  className: inactiveIconClassNames,
42
72
  })] })));
43
- return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: wrapperClasses, ref: buttonRef }, remainingProps, { children: [tooltip ? getComponentWithTooltip(button, tooltip) : button, (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'overflow-hidden' }, { children: (0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { children: isOpen && panel && panel }) }))] })));
73
+ return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: wrapperClasses, ref: buttonRef }, remainingProps, { children: [!items && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [tooltip && !isOpen ? getComponentWithTooltip(button, tooltip) : button, (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'overflow-hidden' }, { children: (0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { children: isOpen && panel && panel }) }))] })), items && ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'MapSettingsTile-inner position-relative', ref: setToggleRef }, { children: [tooltip && !isOpen ? getComponentWithTooltip(button, tooltip) : button, (0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'dropdown', ref: dropdownWrapperRef }, { children: isOpen && items && ((0, jsx_runtime_1.jsx)(MenuItemList_1.default, Object.assign({ className: 'margin-bottom-10 shadow-smooth border-none', ref: setRefDropdownMenu, style: Object.assign(Object.assign({}, styles.popper), { minWidth: '180px' }) }, attributes.popper, { children: items === null || items === void 0 ? void 0 : items.map((item, index) => {
74
+ if (item.type.name === 'MapSettingsDropdownHeader') {
75
+ return item;
76
+ }
77
+ return (0, jsx_runtime_1.jsx)(MenuItem_1.default, { value: item }, index);
78
+ }) }))) })) })] })))] })));
44
79
  };
45
80
  exports.default = MapSettingsTile;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ export type MapAdditionalLayerSettingsProps = {
3
+ activeBuiltinLayers?: string[];
4
+ activeLayers?: string[];
5
+ layers?: JSX.Element[];
6
+ tooltip?: string | React.ReactNode;
7
+ };
8
+ declare const MapAdditionalLayerSettings: (props: MapAdditionalLayerSettingsProps) => import("react/jsx-runtime").JSX.Element;
9
+ export default MapAdditionalLayerSettings;
@@ -0,0 +1,17 @@
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
+ // @ts-ignore-next-line importsNotUsedAsValues
6
+ require("react");
7
+ const isEmpty_1 = tslib_1.__importDefault(require("lodash/fp/isEmpty"));
8
+ const union_1 = tslib_1.__importDefault(require("lodash/fp/union"));
9
+ const MapSettingsTile_1 = tslib_1.__importDefault(require("../MapSettingsTile"));
10
+ const MapIcon_1 = require("../../../../icons/MapIcon");
11
+ const MapAdditionalLayerSettings = (props) => {
12
+ const { activeBuiltinLayers = [], activeLayers = [], layers = [] } = props, remainingProps = tslib_1.__rest(props, ["activeBuiltinLayers", "activeLayers", "layers"]);
13
+ const allActiveLayer = (0, union_1.default)(activeBuiltinLayers, activeLayers);
14
+ const isActive = !(0, isEmpty_1.default)(allActiveLayer);
15
+ return ((0, jsx_runtime_1.jsx)(MapSettingsTile_1.default, Object.assign({ className: 'MapAdditionalLayerSettings', isActive: !(0, isEmpty_1.default)(allActiveLayer), activeIcon: isActive ? ((0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: 'rioglyph-layer-pois text-color-primary', className: 'MapAdditionalLayerIcon' })) : undefined, inactiveIcon: !isActive ? ((0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: 'rioglyph-layer-pois text-color-gray', className: 'MapAdditionalLayerIconInactive' })) : undefined, items: layers }, remainingProps)));
16
+ };
17
+ exports.default = MapAdditionalLayerSettings;
@@ -3,6 +3,9 @@ export type MapClusterSettingsProps = {
3
3
  onToggle?: (setShowCluster: boolean) => void;
4
4
  onShowClusterChange?: (setShowCluster: boolean) => boolean;
5
5
  showCluster?: boolean;
6
+ clusterEnabledLabel?: string | JSX.Element;
7
+ clusterDisabledLabel?: string | JSX.Element;
8
+ dropdownHeaderText?: string | JSX.Element;
6
9
  tooltip?: string | React.ReactNode;
7
10
  };
8
11
  declare const MapClusterSettings: (props: MapClusterSettingsProps) => import("react/jsx-runtime").JSX.Element;
@@ -5,16 +5,22 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  // @ts-ignore-next-line importsNotUsedAsValues
6
6
  require("react");
7
7
  const noop_1 = tslib_1.__importDefault(require("lodash/fp/noop"));
8
+ const compact_1 = tslib_1.__importDefault(require("lodash/fp/compact"));
8
9
  const MapSettingsPanel_1 = tslib_1.__importDefault(require("../MapSettingsPanel"));
9
10
  const MapSettingsItem_1 = tslib_1.__importDefault(require("../MapSettingsItem"));
10
11
  const MapSettingsTile_1 = tslib_1.__importDefault(require("../MapSettingsTile"));
11
12
  const MapIcon_1 = require("../../../../icons/MapIcon");
13
+ const MapSettingsDropdownHeader_1 = tslib_1.__importDefault(require("../items/MapSettingsDropdownHeader"));
12
14
  const MapClusterSettings = (props) => {
13
- const { showCluster = true, onShowClusterChange = noop_1.default, onToggle = noop_1.default } = props, remainingProps = tslib_1.__rest(props, ["showCluster", "onShowClusterChange", "onToggle"]);
15
+ const { showCluster = true, onShowClusterChange = noop_1.default, onToggle = noop_1.default, clusterEnabledLabel, clusterDisabledLabel, dropdownHeaderText } = props, remainingProps = tslib_1.__rest(props, ["showCluster", "onShowClusterChange", "onToggle", "clusterEnabledLabel", "clusterDisabledLabel", "dropdownHeaderText"]);
14
16
  const handleShowCluster = (setShowCluster) => {
15
17
  onShowClusterChange(setShowCluster);
16
18
  onToggle(setShowCluster);
17
19
  };
18
- return ((0, jsx_runtime_1.jsx)(MapSettingsTile_1.default, Object.assign({ className: 'MapClusterSettings', isActive: showCluster, activeIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.CLUSTER_INACTIVE }), inactiveIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.NO_CLUSTER_INACTIVE }), panel: (0, jsx_runtime_1.jsxs)(MapSettingsPanel_1.default, { children: [(0, jsx_runtime_1.jsx)(MapSettingsItem_1.default, { onClick: () => handleShowCluster(true), isActive: showCluster, activeIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.CLUSTER_ACTIVE, className: 'MapClusterIcon' }), inactiveIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.CLUSTER_INACTIVE, className: 'MapClusterIconInactive' }) }), (0, jsx_runtime_1.jsx)(MapSettingsItem_1.default, { onClick: () => handleShowCluster(false), isActive: !showCluster, activeIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.NO_CLUSTER_ACTIVE, className: 'MapNoClusterIcon' }), inactiveIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.NO_CLUSTER_INACTIVE, className: 'MapNoClusterIconInactive' }) })] }) }, remainingProps)));
20
+ const hasLabels = !!clusterEnabledLabel || !!clusterDisabledLabel;
21
+ const dropdownHeader = dropdownHeaderText && ((0, jsx_runtime_1.jsx)(MapSettingsDropdownHeader_1.default, { label: dropdownHeaderText }, 'mapClusterDropdownHeader'));
22
+ const enableClusterButtons = ((0, jsx_runtime_1.jsx)(MapSettingsItem_1.default, { onClick: () => handleShowCluster(true), isActive: showCluster, activeIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.CLUSTER_ACTIVE, className: 'MapClusterIcon' }), inactiveIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.CLUSTER_INACTIVE, className: 'MapClusterIconInactive' }), label: clusterEnabledLabel }, 'enableClusterButtons'));
23
+ const disableClusterButton = ((0, jsx_runtime_1.jsx)(MapSettingsItem_1.default, { onClick: () => handleShowCluster(false), isActive: !showCluster, activeIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.NO_CLUSTER_ACTIVE, className: 'MapNoClusterIcon' }), inactiveIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.NO_CLUSTER_INACTIVE, className: 'MapNoClusterIconInactive' }), label: clusterDisabledLabel }, 'disableClusterButton'));
24
+ return ((0, jsx_runtime_1.jsx)(MapSettingsTile_1.default, Object.assign({ className: 'MapClusterSettings', isActive: showCluster, activeIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.CLUSTER_INACTIVE }), inactiveIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.NO_CLUSTER_INACTIVE }), items: hasLabels ? (0, compact_1.default)([dropdownHeader, enableClusterButtons, disableClusterButton]) : undefined, panel: !hasLabels && ((0, jsx_runtime_1.jsxs)(MapSettingsPanel_1.default, { children: [enableClusterButtons, disableClusterButton] })) }, remainingProps)));
19
25
  };
20
26
  exports.default = MapClusterSettings;
@@ -11,15 +11,21 @@ const MapSettingsPanel_1 = tslib_1.__importDefault(require("../MapSettingsPanel"
11
11
  const MapSettingsTile_1 = tslib_1.__importDefault(require("../MapSettingsTile"));
12
12
  const MapIcon_1 = require("../../../../icons/MapIcon");
13
13
  const MapLayerSettings = (props) => {
14
+ var _a;
14
15
  const { activeBuiltinLayers = [], activeLayers = [], layers = [], onMapLayerChange = noop_1.default } = props, remainingProps = tslib_1.__rest(props, ["activeBuiltinLayers", "activeLayers", "layers", "onMapLayerChange"]);
15
16
  const allActiveLayer = (0, union_1.default)(activeBuiltinLayers, activeLayers);
16
- return ((0, jsx_runtime_1.jsx)(MapSettingsTile_1.default, Object.assign({ className: 'MapLayerSettings', isActive: !(0, isEmpty_1.default)(allActiveLayer), activeIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.LAYER_ACTIVE, className: 'MapLayerIcon' }), inactiveIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.LAYER_INACTIVE, className: 'MapLayerIconInactive' }), panel: (0, jsx_runtime_1.jsx)(MapSettingsPanel_1.default, { children: (0, map_1.default)(layer => {
17
- var _a;
18
- return react_1.default.cloneElement(layer, {
19
- key: (_a = layer === null || layer === void 0 ? void 0 : layer.key) !== null && _a !== void 0 ? _a : `MapLayerSettings_${crypto.randomUUID()}`,
20
- activeBuiltinLayers,
21
- onMapLayerChange,
22
- });
23
- }, layers) }) }, remainingProps)));
17
+ const hasLabels = !!((_a = layers.at(0)) === null || _a === void 0 ? void 0 : _a.props.label);
18
+ const isActive = !(0, isEmpty_1.default)(allActiveLayer);
19
+ // Inject onMapLayerChange from the MapContext which will be handled
20
+ // in the main Map component.
21
+ const enrichedLayers = (0, map_1.default)(layer => {
22
+ var _a;
23
+ return react_1.default.cloneElement(layer, {
24
+ key: (_a = layer === null || layer === void 0 ? void 0 : layer.key) !== null && _a !== void 0 ? _a : `MapLayerSettings_${crypto.randomUUID()}`,
25
+ activeBuiltinLayers,
26
+ onMapLayerChange,
27
+ });
28
+ }, layers);
29
+ return ((0, jsx_runtime_1.jsx)(MapSettingsTile_1.default, Object.assign({ className: 'MapLayerSettings', isActive: isActive, activeIcon: isActive ? ((0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: 'rioglyph-construction text-color-primary', className: 'MapLayerIcon' })) : undefined, inactiveIcon: !isActive ? ((0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: 'rioglyph-construction text-color-gray', className: 'MapLayerIconInactive' })) : undefined, items: hasLabels ? enrichedLayers : undefined, panel: !hasLabels && (0, jsx_runtime_1.jsx)(MapSettingsPanel_1.default, { children: enrichedLayers }) }, remainingProps)));
24
30
  };
25
31
  exports.default = MapLayerSettings;
@@ -4,7 +4,13 @@ export type MapTypeSettingsProps = {
4
4
  mapType?: string;
5
5
  enableNightMap?: boolean;
6
6
  onMapTypeChange?: () => MapType;
7
+ defaultTypeLabel?: string | JSX.Element;
8
+ truckTypeLabel?: string | JSX.Element;
9
+ terrainTypeLabel?: string | JSX.Element;
10
+ satelliteTypeLabel?: string | JSX.Element;
11
+ nightTypeLabel?: string | JSX.Element;
7
12
  tooltip?: string | React.ReactNode;
13
+ dropdownHeaderText?: string | JSX.Element;
8
14
  };
9
15
  declare const MapTypeSettings: (props: MapTypeSettingsProps) => import("react/jsx-runtime").JSX.Element;
10
16
  export default MapTypeSettings;
@@ -4,13 +4,15 @@ const tslib_1 = require("tslib");
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const noop_1 = tslib_1.__importDefault(require("lodash/fp/noop"));
7
+ const compact_1 = tslib_1.__importDefault(require("lodash/fp/compact"));
7
8
  const constants_1 = require("../../../constants");
8
9
  const MapSettingsPanel_1 = tslib_1.__importDefault(require("../MapSettingsPanel"));
9
10
  const MapSettingsItem_1 = tslib_1.__importDefault(require("../MapSettingsItem"));
10
11
  const MapSettingsTile_1 = tslib_1.__importDefault(require("../MapSettingsTile"));
11
12
  const MapIcon_1 = require("../../../../icons/MapIcon");
13
+ const MapSettingsDropdownHeader_1 = tslib_1.__importDefault(require("../items/MapSettingsDropdownHeader"));
12
14
  const MapTypeSettings = (props) => {
13
- const { mapType, onMapTypeChange = noop_1.default, enableNightMap = true } = props, remainingProps = tslib_1.__rest(props, ["mapType", "onMapTypeChange", "enableNightMap"]);
15
+ const { mapType, onMapTypeChange = noop_1.default, enableNightMap = true, defaultTypeLabel, truckTypeLabel, terrainTypeLabel, satelliteTypeLabel, nightTypeLabel, dropdownHeaderText } = props, remainingProps = tslib_1.__rest(props, ["mapType", "onMapTypeChange", "enableNightMap", "defaultTypeLabel", "truckTypeLabel", "terrainTypeLabel", "satelliteTypeLabel", "nightTypeLabel", "dropdownHeaderText"]);
14
16
  const type = (0, react_1.useMemo)(() => ({
15
17
  isDefault: mapType === constants_1.MAP_TYPE_DEFAULT,
16
18
  isFleetStyle: mapType === constants_1.MAP_TYPE_FLEET_STYLE,
@@ -35,6 +37,22 @@ const MapTypeSettings = (props) => {
35
37
  return (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.MAP_TYPE_NIGHT_INACTIVE });
36
38
  }
37
39
  };
38
- return ((0, jsx_runtime_1.jsx)(MapSettingsTile_1.default, Object.assign({ className: 'MapTypeSettings', inactiveIcon: getIcon(type), panel: (0, jsx_runtime_1.jsxs)(MapSettingsPanel_1.default, { children: [enableNightMap && ((0, jsx_runtime_1.jsx)(MapSettingsItem_1.default, { className: 'MapTypeNight', onClick: () => onMapTypeChange(constants_1.MAP_TYPE_NIGHT), isActive: type.isNight, activeIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.MAP_TYPE_NIGHT_ACTIVE }), inactiveIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.MAP_TYPE_NIGHT_INACTIVE }) })), (0, jsx_runtime_1.jsx)(MapSettingsItem_1.default, { className: 'MapTypeSatelite', onClick: () => onMapTypeChange(constants_1.MAP_TYPE_SATELLITE), isActive: type.isSatellite, activeIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.MAP_TYPE_SATELLITE_ACTIVE }), inactiveIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.MAP_TYPE_SATELLITE_INACTIVE }) }), (0, jsx_runtime_1.jsx)(MapSettingsItem_1.default, { className: 'MapTypeTerrain', onClick: () => onMapTypeChange(constants_1.MAP_TYPE_TERRAIN), isActive: type.isTerrain, activeIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.MAP_TYPE_TERRAIN_ACTIVE }), inactiveIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.MAP_TYPE_TERRAIN_INACTIVE }) }), (0, jsx_runtime_1.jsx)(MapSettingsItem_1.default, { className: 'MapTypeFlatTruck', onClick: () => onMapTypeChange(constants_1.MAP_TYPE_FLEET_STYLE), isActive: type.isFleetStyle, activeIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.MAP_TYPE_FLAT_TRUCK_ACTIVE }), inactiveIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.MAP_TYPE_FLAT_TRUCK_INACTIVE }) }), (0, jsx_runtime_1.jsx)(MapSettingsItem_1.default, { className: 'MapTypeFlat', onClick: () => onMapTypeChange(constants_1.MAP_TYPE_DEFAULT), isActive: type.isDefault, activeIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.MAP_TYPE_FLAT_ACTIVE }), inactiveIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.MAP_TYPE_FLAT_INACTIVE }) })] }) }, remainingProps)));
40
+ const dropdownHeader = dropdownHeaderText && ((0, jsx_runtime_1.jsx)(MapSettingsDropdownHeader_1.default, { label: dropdownHeaderText }, 'mapTypeDropdownHeader'));
41
+ const mapTypeNight = ((0, jsx_runtime_1.jsx)(MapSettingsItem_1.default, { className: 'MapTypeNight', onClick: () => onMapTypeChange(constants_1.MAP_TYPE_NIGHT), isActive: type.isNight, activeIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.MAP_TYPE_NIGHT_ACTIVE }), inactiveIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.MAP_TYPE_NIGHT_INACTIVE }), label: nightTypeLabel }, 'MapTypeNight'));
42
+ const mapTypeSatellite = ((0, jsx_runtime_1.jsx)(MapSettingsItem_1.default, { className: 'MapTypeSatellite', onClick: () => onMapTypeChange(constants_1.MAP_TYPE_SATELLITE), isActive: type.isSatellite, activeIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.MAP_TYPE_SATELLITE_ACTIVE }), inactiveIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.MAP_TYPE_SATELLITE_INACTIVE }), label: satelliteTypeLabel }, 'MapTypeSatellite'));
43
+ const mapTypeTerrain = ((0, jsx_runtime_1.jsx)(MapSettingsItem_1.default, { className: 'MapTypeTerrain', onClick: () => onMapTypeChange(constants_1.MAP_TYPE_TERRAIN), isActive: type.isTerrain, activeIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.MAP_TYPE_TERRAIN_ACTIVE }), inactiveIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.MAP_TYPE_TERRAIN_INACTIVE }), label: terrainTypeLabel }, 'MapTypeTerrain'));
44
+ const mapTypeTruck = ((0, jsx_runtime_1.jsx)(MapSettingsItem_1.default, { className: 'MapTypeFlatTruck', onClick: () => onMapTypeChange(constants_1.MAP_TYPE_FLEET_STYLE), isActive: type.isFleetStyle, activeIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.MAP_TYPE_FLAT_TRUCK_ACTIVE }), inactiveIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.MAP_TYPE_FLAT_TRUCK_INACTIVE }), label: truckTypeLabel }, 'MapTypeFlatTruck'));
45
+ const mapTypeDefault = ((0, jsx_runtime_1.jsx)(MapSettingsItem_1.default, { className: 'MapTypeFlat', onClick: () => onMapTypeChange(constants_1.MAP_TYPE_DEFAULT), isActive: type.isDefault, activeIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.MAP_TYPE_FLAT_ACTIVE }), inactiveIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.MAP_TYPE_FLAT_INACTIVE }), label: defaultTypeLabel }, 'MapTypeFlat'));
46
+ const hasLabels = !!defaultTypeLabel || !!truckTypeLabel || !!terrainTypeLabel || !!satelliteTypeLabel || !!nightTypeLabel;
47
+ return ((0, jsx_runtime_1.jsx)(MapSettingsTile_1.default, Object.assign({ className: 'MapTypeSettings', inactiveIcon: getIcon(type), items: hasLabels
48
+ ? (0, compact_1.default)([
49
+ dropdownHeader,
50
+ mapTypeNight,
51
+ mapTypeSatellite,
52
+ mapTypeTerrain,
53
+ mapTypeTruck,
54
+ mapTypeDefault,
55
+ ])
56
+ : undefined, panel: !hasLabels && ((0, jsx_runtime_1.jsxs)(MapSettingsPanel_1.default, { children: [enableNightMap && mapTypeNight, mapTypeSatellite, mapTypeTerrain, mapTypeTruck, mapTypeDefault] })) }, remainingProps)));
39
57
  };
40
58
  exports.default = MapTypeSettings;
@@ -8,6 +8,6 @@ const MapSettingsTile_1 = tslib_1.__importDefault(require("../MapSettingsTile"))
8
8
  const MapIcon_1 = require("../../../../icons/MapIcon");
9
9
  const MapCenterMarkerButton = (props) => {
10
10
  const { isActive = false, onToggle } = props, remainingProps = tslib_1.__rest(props, ["isActive", "onToggle"]);
11
- return ((0, jsx_runtime_1.jsx)(MapSettingsTile_1.default, Object.assign({ className: 'MapCenterMarkerButton', isActive: isActive, activeIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.CENTER_MARKER_ACTIVE, className: 'MapCenterMarkerButtonIcon' }), inactiveIcon: (0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: MapIcon_1.CENTER_MARKER_INACTIVE, className: 'MapCenterMarkerButtonIconInactive' }), onToggle: onToggle }, remainingProps)));
11
+ return ((0, jsx_runtime_1.jsx)(MapSettingsTile_1.default, Object.assign({ className: 'MapCenterMarkerButton', isActive: isActive, activeIcon: isActive ? ((0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: 'rioglyph-position text-color-primary', className: 'MapCenterMarkerButtonIcon' })) : undefined, inactiveIcon: !isActive ? ((0, jsx_runtime_1.jsx)(MapIcon_1.MapIcon, { name: 'rioglyph-position text-color-gray', className: 'MapCenterMarkerButtonIconInactive' })) : undefined, onToggle: onToggle }, remainingProps)));
12
12
  };
13
13
  exports.default = MapCenterMarkerButton;
@@ -1,6 +1,8 @@
1
+ /// <reference types="react" />
1
2
  export type MapCustomerPoiSettingsItemProps = {
2
3
  onToggle?: (setIsShown: boolean) => void;
3
4
  isActive?: boolean;
5
+ label?: string | JSX.Element;
4
6
  };
5
7
  declare const MapCustomerPoiSettingsItem: (props: MapCustomerPoiSettingsItemProps) => import("react/jsx-runtime").JSX.Element;
6
8
  export default MapCustomerPoiSettingsItem;
@@ -1,5 +1,7 @@
1
+ /// <reference types="react" />
1
2
  export type MapLayerIncidentsItemProps = {
2
3
  activeBuiltinLayers?: string[];
4
+ label?: string | JSX.Element;
3
5
  onToggle?: () => void;
4
6
  onMapLayerChange?: (layer: string) => string;
5
7
  };
@@ -1,5 +1,7 @@
1
+ /// <reference types="react" />
1
2
  export type MapLayerRoadRestrictionsItemProps = {
2
3
  activeBuiltinLayers?: string[];
4
+ label?: string | JSX.Element;
3
5
  onToggle?: () => void;
4
6
  onMapLayerChange?: (layer: string) => string;
5
7
  };
@@ -1,5 +1,7 @@
1
+ /// <reference types="react" />
1
2
  export type MapLayerTrafficItemProps = {
2
3
  activeBuiltinLayers?: string[];
4
+ label?: string | JSX.Element;
3
5
  onToggle?: () => void;
4
6
  onMapLayerChange?: (layer: string) => string;
5
7
  };
@@ -0,0 +1,4 @@
1
+ import { type DropdownHeaderProps } from '../../../../../selects/DropdownHeader';
2
+ export type MapSettingsDropdownHeaderProps = DropdownHeaderProps & {};
3
+ declare const MapSettingsDropdownHeader: (props: MapSettingsDropdownHeaderProps) => import("react/jsx-runtime").JSX.Element;
4
+ export default MapSettingsDropdownHeader;
@@ -0,0 +1,11 @@
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
+ require("react");
6
+ const DropdownHeader_1 = tslib_1.__importDefault(require("../../../../../selects/DropdownHeader"));
7
+ const MapSettingsDropdownHeader = (props) => {
8
+ const remainingProps = tslib_1.__rest(props, []);
9
+ return (0, jsx_runtime_1.jsx)(DropdownHeader_1.default, Object.assign({ className: 'MapSettingsDropdownHeader' }, remainingProps));
10
+ };
11
+ exports.default = MapSettingsDropdownHeader;
@@ -1,6 +1,8 @@
1
+ /// <reference types="react" />
1
2
  export type MapWorkshopPoiSettingsItemProps = {
2
3
  onToggle?: (setIsShown: boolean) => void;
3
4
  isActive?: boolean;
5
+ label?: string | JSX.Element;
4
6
  };
5
7
  declare const MapWorkshopPoiSettingsItem: (props: MapWorkshopPoiSettingsItemProps) => import("react/jsx-runtime").JSX.Element;
6
8
  export default MapWorkshopPoiSettingsItem;
@@ -1,11 +1,10 @@
1
- import React from 'react';
2
1
  export type MapIconProps = {
3
2
  name?: string;
4
3
  height?: number;
5
4
  width?: number;
6
5
  className?: string;
7
6
  };
8
- export declare const MapIcon: (props: MapIconProps) => React.FunctionComponentElement<any>;
7
+ export declare const MapIcon: (props: MapIconProps) => import("react/jsx-runtime").JSX.Element;
9
8
  export declare const ZOOM_IN = "zoomIn";
10
9
  export declare const ZOOM_OUT = "zoomOut";
11
10
  export declare const BOUNDING_BOX_ACTIVE = "boundingBoxActive";
@@ -7,7 +7,9 @@ const jsx_runtime_1 = require("react/jsx-runtime");
7
7
  const react_1 = tslib_1.__importDefault(require("react"));
8
8
  const MapIcon = (props) => {
9
9
  const { className = '', name = '', height = 40, width = 40 } = props;
10
- // const fillColor = active ? '#30B4C0' : '#A7AFBB';
10
+ if (name.includes('rioglyph')) {
11
+ return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'height-40 width-40 text-size-16 display-grid place-items-center hover-scale-110' }, { children: (0, jsx_runtime_1.jsx)("span", { className: `rioglyph ${name} text-size-200pct` }) })));
12
+ }
11
13
  return react_1.default.cloneElement(icons[name], {
12
14
  className,
13
15
  height,
@@ -161,6 +161,6 @@ export type IncidentDataPoint = {
161
161
  roadClosed: boolean;
162
162
  position: Position;
163
163
  };
164
- export declare const markerColorOptions: readonly ["bg-map-marker-asset", "bg-map-marker-poi", "bg-map-marker-geofence", "bg-map-marker-route"];
164
+ export declare const markerColorOptions: readonly ["bg-map-marker-asset", "bg-map-marker-poi", "bg-map-marker-geofence", "bg-map-marker-route", "bg-map-marker-info", "bg-map-marker-success", "bg-map-marker-warning", "bg-map-marker-danger"];
165
165
  export type MarkerColor = (typeof markerColorOptions)[number];
166
166
  export declare const markerColorMapping: Record<MarkerColor, string>;
@@ -18,10 +18,18 @@ exports.markerColorOptions = [
18
18
  'bg-map-marker-poi',
19
19
  'bg-map-marker-geofence',
20
20
  'bg-map-marker-route',
21
+ 'bg-map-marker-info',
22
+ 'bg-map-marker-success',
23
+ 'bg-map-marker-warning',
24
+ 'bg-map-marker-danger',
21
25
  ];
22
26
  exports.markerColorMapping = {
23
- 'bg-map-marker-asset': 'map-marker-type-asset',
24
- 'bg-map-marker-poi': 'map-marker-type-poi',
25
- 'bg-map-marker-geofence': 'map-marker-type-geofence',
26
- 'bg-map-marker-route': 'map-marker-type-route',
27
+ 'bg-map-marker-asset': '--color-map-marker-asset',
28
+ 'bg-map-marker-poi': '--color-map-marker-poi',
29
+ 'bg-map-marker-geofence': '--color-map-marker-geofence',
30
+ 'bg-map-marker-route': '--color-map-marker-route',
31
+ 'bg-map-marker-info': '--color-map-marker-info',
32
+ 'bg-map-marker-success': '--color-map-marker-success',
33
+ 'bg-map-marker-warning': '--color-map-marker-warning',
34
+ 'bg-map-marker-danger': '--color-map-marker-danger',
27
35
  };
@@ -36,6 +36,10 @@ export type ClusterMapMarkerProps = {
36
36
  * - `bg-map-marker-poi`
37
37
  * - `bg-map-marker-geofence`
38
38
  * - `bg-map-marker-route`
39
+ * - `bg-map-marker-info`
40
+ * - `bg-map-marker-success`
41
+ * - `bg-map-marker-warning`
42
+ * - `bg-map-marker-danger`
39
43
  *
40
44
  * @default 'bg-map-marker-asset'
41
45
  */
@@ -44,6 +48,10 @@ export type ClusterMapMarkerProps = {
44
48
  * Name of a rioglyph icon.
45
49
  */
46
50
  iconName?: string;
51
+ /**
52
+ * Marker cursor
53
+ */
54
+ cursor?: 'cursor-pointer' | 'cursor-grab' | 'cursor-not-allowed';
47
55
  };
48
56
  declare const ClusterMapMarker: (props: ClusterMapMarkerProps) => import("react/jsx-runtime").JSX.Element;
49
57
  export default ClusterMapMarker;
@@ -6,9 +6,10 @@ require("react");
6
6
  const classnames_1 = tslib_1.__importDefault(require("classnames"));
7
7
  const mapTypes_1 = require("../map/utils/mapTypes");
8
8
  const ClusterMapMarker = (props) => {
9
- const { count, exceptionCount = 0, markerColor = 'bg-map-marker-asset', warningCount = 0, active = false, clickable = true, iconName, } = props;
10
- const classes = (0, classnames_1.default)(active && 'active', 'rio-map-marker', 'rio-map-marker-center-center', !clickable && 'pointer-events-none');
11
- const clusterClasses = (0, classnames_1.default)('rio-map-cluster-circle', active && 'active', mapTypes_1.markerColorMapping[markerColor]);
12
- return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: classes }, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'rio-map-marker-translate' }, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'rio-map-cluster' }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: clusterClasses }, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'rio-map-cluster-content' }, { children: [iconName && (0, jsx_runtime_1.jsx)("div", { className: `rio-map-icon rioglyph rioglyph-${iconName}` }), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'rio-map-count' }, { children: count }))] })) })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'rio-map-bubble exception' }, { children: exceptionCount > 0 && exceptionCount })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'rio-map-bubble warning' }, { children: warningCount > 0 && warningCount }))] })) })) })));
9
+ const { count, exceptionCount = 0, markerColor = 'bg-map-marker-asset', warningCount = 0, active = false, clickable = true, iconName, cursor = 'cursor-pointer', } = props;
10
+ const clusterClasses = (0, classnames_1.default)('rio-map-cluster-circle', active && 'active', cursor);
11
+ const classes = (0, classnames_1.default)(active && 'active', 'rio-map-marker', 'rio-map-marker-center-center', !clickable && 'not-clickable');
12
+ const markerBackgroundColor = `var(${mapTypes_1.markerColorMapping[markerColor]})`;
13
+ return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: classes, style: { color: markerBackgroundColor }, "data-marker-type": markerColor.replace('bg-', 'cluster-') }, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'rio-map-marker-translate' }, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'rio-map-cluster' }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: clusterClasses }, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'rio-map-cluster-content' }, { children: [iconName && (0, jsx_runtime_1.jsx)("div", { className: `rio-map-icon rioglyph rioglyph-${iconName}` }), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'rio-map-count' }, { children: count }))] })) })), exceptionCount > 0 && (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'rio-map-bubble exception' }, { children: exceptionCount })), warningCount > 0 && (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'rio-map-bubble warning' }, { children: warningCount }))] })) })) })));
13
14
  };
14
15
  exports.default = ClusterMapMarker;
@@ -4,7 +4,7 @@ export type SingleMapMarkerProps = {
4
4
  /**
5
5
  * Defines the rotation of the arrow in deg.
6
6
  *
7
- * @default 0
7
+ * @default 60
8
8
  */
9
9
  bearing?: number;
10
10
  /**
@@ -42,11 +42,21 @@ export type SingleMapMarkerProps = {
42
42
  */
43
43
  fixed?: boolean;
44
44
  /**
45
- * Defines if marker is displayed with rounded corners.
45
+ * Defines whether the direction icon is displayed or not.
46
46
  *
47
47
  * @default false
48
48
  */
49
49
  moving?: boolean;
50
+ /**
51
+ * Optional icon that is shown in the state indicator and used instead of the moving direction arrow.
52
+ */
53
+ stateIconName?: string;
54
+ /**
55
+ * Defines if marker is displayed with pinging animation.
56
+ *
57
+ * @default false
58
+ */
59
+ pinging?: boolean;
50
60
  /**
51
61
  * List of rioglyph icon names.
52
62
  */
@@ -59,6 +69,10 @@ export type SingleMapMarkerProps = {
59
69
  * - `bg-map-marker-poi`
60
70
  * - `bg-map-marker-geofence`
61
71
  * - `bg-map-marker-route`
72
+ * - `bg-map-marker-info`
73
+ * - `bg-map-marker-success`
74
+ * - `bg-map-marker-warning`
75
+ * - `bg-map-marker-danger`
62
76
  *
63
77
  * @default 'bg-map-marker-asset'
64
78
  */
@@ -68,7 +82,11 @@ export type SingleMapMarkerProps = {
68
82
  */
69
83
  textColor?: string;
70
84
  /**
71
- * Used to control the marker's size.
85
+ * @deprecated please use `anchorSize`
86
+ */
87
+ size?: 'md' | 'lg';
88
+ /**
89
+ * Used to control the marker's anchor size.
72
90
  *
73
91
  * Possible values are:
74
92
  * - `md`
@@ -76,13 +94,30 @@ export type SingleMapMarkerProps = {
76
94
  *
77
95
  * @default 'md'
78
96
  */
79
- size?: 'md' | 'lg';
97
+ anchorSize?: 'md' | 'lg';
98
+ /**
99
+ * @deprecated please use `markerOnHover`
100
+ */
101
+ visibleOnHover?: boolean;
80
102
  /**
81
103
  * Whether the marker is only visible on hover.
82
104
  *
83
105
  * @default false
84
106
  */
85
- visibleOnHover?: boolean;
107
+ markerOnHover?: boolean;
108
+ /**
109
+ * Optional icon that is shown on the anchor of the DOM marker.
110
+ * Use this when no marker content is shown.
111
+ */
112
+ anchorIconName?: string;
113
+ /**
114
+ * Shows only the anchor without the rest of the marker.
115
+ */
116
+ anchorOnly?: boolean;
117
+ /**
118
+ * Marker cursor
119
+ */
120
+ cursor?: 'cursor-pointer' | 'cursor-grab' | 'cursor-not-allowed';
86
121
  };
87
122
  declare const SingleMapMarker: (props: SingleMapMarkerProps) => import("react/jsx-runtime").JSX.Element;
88
123
  export default SingleMapMarker;
@@ -6,12 +6,25 @@ const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  require("react");
7
7
  const classnames_1 = tslib_1.__importDefault(require("classnames"));
8
8
  const mapTypes_1 = require("../map/utils/mapTypes");
9
- const MapDirection = ({ moving, bearing }) => ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: moving && (0, jsx_runtime_1.jsx)("div", { className: 'rio-map-direction', style: { transform: `rotate(${bearing}deg)` } }) }));
9
+ const DEFAULT_BEARING = 60;
10
+ const MapStateIndicator = (props) => {
11
+ const { moving, bearing, stateIconName } = props;
12
+ if (!moving && !stateIconName) {
13
+ return null;
14
+ }
15
+ const stateClassName = (0, classnames_1.default)('rio-map-direction', // TODO: backwards-compatible - remove in future releases
16
+ 'rio-map-marker-state', 'rioglyph', `rioglyph-${stateIconName || 'direction'}`);
17
+ const style = stateIconName ? {} : { transform: `rotate(${bearing}deg)` };
18
+ return (0, jsx_runtime_1.jsx)("div", { className: stateClassName, style: style });
19
+ };
10
20
  const getIcons = (iconNames = []) => iconNames.map((name, index) => ((0, jsx_runtime_1.jsx)("div", { className: `rio-map-icon rioglyph rioglyph-${name}` }, `rio-map-icon-${name}-${index}`)));
11
21
  const SingleMapMarker = (props) => {
12
- const { bearing = 0, name, warningCount = 0, exceptionCount = 0, active = false, clickable = true, fixed = false, moving = false, iconNames, markerColor = 'bg-map-marker-asset', textColor, size = 'md', visibleOnHover = false, } = props;
13
- const classes = (0, classnames_1.default)(active && 'active', 'rio-map-marker', 'rio-map-marker-bottom-center');
14
- const singleClasses = (0, classnames_1.default)('rio-map-single', fixed && 'fixed', moving && 'moving', !clickable && 'pointer-events-none', textColor, size === 'lg' && 'rio-map-single-lg', visibleOnHover && 'rio-map-single-visible-on-hover', active && 'active', mapTypes_1.markerColorMapping[markerColor]);
15
- return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: classes }, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'rio-map-marker-translate' }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: singleClasses }, { children: [(0, jsx_runtime_1.jsx)(MapDirection, { moving: moving, bearing: bearing }), getIcons(iconNames), name && (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'rio-map-name' }, { children: name })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'rio-map-bubble exception' }, { children: exceptionCount > 0 && exceptionCount })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'rio-map-bubble warning' }, { children: warningCount > 0 && warningCount }))] })), (0, jsx_runtime_1.jsx)("div", { className: 'rio-map-position-arrow' }), (0, jsx_runtime_1.jsx)("div", { className: `rio-map-position ${size === 'lg' ? 'rio-map-position-lg' : ''} cursor-pointer` })] })) })));
22
+ const { bearing = DEFAULT_BEARING, name, warningCount = 0, exceptionCount = 0, active = false, clickable = true, fixed = false, moving = false, pinging = false, anchorIconName, stateIconName, iconNames, markerColor = 'bg-map-marker-asset', textColor, anchorSize, markerOnHover = false, anchorOnly = !name && !iconNames, cursor = 'cursor-pointer', } = props;
23
+ const largeAnchor = anchorSize === 'lg';
24
+ const classes = (0, classnames_1.default)(active && 'active', 'rio-map-marker', 'rio-map-marker-bottom-center', !clickable && 'not-clickable');
25
+ const anchorClasses = (0, classnames_1.default)('rio-map-anchor', largeAnchor ? 'rio-map-anchor-lg' : '', cursor);
26
+ const singleClasses = (0, classnames_1.default)('rio-map-single', fixed && 'fixed', moving && 'moving', textColor, markerOnHover && 'visible-on-hover', active && 'active', pinging && 'pinging', cursor);
27
+ const markerBackgroundColor = `var(${mapTypes_1.markerColorMapping[markerColor]})`;
28
+ return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: classes, style: { color: markerBackgroundColor }, "data-marker-type": markerColor.replace('bg-', 'single-') }, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'rio-map-marker-translate' }, { children: [!anchorOnly && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: singleClasses }, { children: [(0, jsx_runtime_1.jsx)(MapStateIndicator, { moving: moving, bearing: bearing, stateIconName: stateIconName }), getIcons(iconNames), name && (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'rio-map-name' }, { children: name })), exceptionCount > 0 && (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'rio-map-bubble exception' }, { children: exceptionCount })), warningCount > 0 && (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'rio-map-bubble warning' }, { children: warningCount }))] })), (0, jsx_runtime_1.jsx)("div", { className: 'rio-map-anchor-arrow' })] })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: anchorClasses }, { children: anchorIconName && largeAnchor && (0, jsx_runtime_1.jsx)("span", { className: `rioglyph rioglyph-${anchorIconName}` }) }))] })) })));
16
29
  };
17
30
  exports.default = SingleMapMarker;
@@ -3,6 +3,7 @@ export type DropdownHeaderProps = {
3
3
  icon?: React.ReactNode;
4
4
  center?: boolean;
5
5
  label: string | React.ReactNode;
6
+ className?: string;
6
7
  };
7
8
  declare const DropdownHeader: (props: DropdownHeaderProps) => import("react/jsx-runtime").JSX.Element;
8
9
  export default DropdownHeader;
@@ -4,7 +4,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
4
4
  // @ts-ignore-next-line importsNotUsedAsValues
5
5
  require("react");
6
6
  const DropdownHeader = (props) => {
7
- const { icon, label, center = true } = props;
8
- return ((0, jsx_runtime_1.jsx)("li", Object.assign({ className: `dropdown-header ${center ? 'center' : ''}` }, { children: (0, jsx_runtime_1.jsxs)("span", Object.assign({ className: 'dropdown-header-text' }, { children: [icon && (0, jsx_runtime_1.jsx)("span", Object.assign({ className: 'margin-right-5' }, { children: icon })), label] })) })));
7
+ const { icon, label, center = true, className = '' } = props;
8
+ return ((0, jsx_runtime_1.jsx)("li", Object.assign({ className: `dropdown-header ${center ? 'center' : ''} ${className}` }, { children: (0, jsx_runtime_1.jsxs)("span", Object.assign({ className: 'dropdown-header-text' }, { children: [icon && (0, jsx_runtime_1.jsx)("span", Object.assign({ className: 'margin-right-5' }, { children: icon })), label] })) })));
9
9
  };
10
10
  exports.default = DropdownHeader;
@@ -77,7 +77,7 @@ const Multiselect = (props) => {
77
77
  const wrapperClassNames = (0, classnames_1.default)('dropdown-toggle', 'form-control', 'text-left', bsSize === 'sm' && 'input-sm', bsSize === 'lg' && 'input-lg', multiline && 'height-auto', disabled && 'disabled');
78
78
  const showPlaceholder = (0, isEmpty_1.default)(selectedItemIds) && !showUnselectedItemIcons;
79
79
  const showFilter = useFilter && isOpen && !counterMessage && !renderCounterMessage;
80
- const toggleButton = ((0, jsx_runtime_1.jsxs)("button", Object.assign({ type: 'button', id: id, name: name, className: wrapperClassNames, "data-toggle": 'dropdown', tabIndex: tabIndex, "aria-haspopup": 'true', "aria-expanded": isOpen, onClick: onToggle, onKeyDown: handleToggleKeyDown, ref: refToggle }, { children: [showPlaceholder ? (0, jsx_runtime_1.jsx)(MultiselectTogglePlaceholder_1.default, { placeholder: placeholder }) : renderSelection(), showFilter && !multiline && renderFilter(), (0, jsx_runtime_1.jsx)("span", { className: 'caret' })] })));
80
+ const toggleButton = ((0, jsx_runtime_1.jsxs)("button", Object.assign({ type: 'button', id: id, name: name, className: wrapperClassNames, "data-toggle": 'dropdown', tabIndex: tabIndex, "aria-haspopup": 'true', "aria-expanded": isOpen, onClick: onToggle, onKeyDown: handleToggleKeyDown, ref: refToggle }, { children: [showPlaceholder ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(MultiselectTogglePlaceholder_1.default, { placeholder: placeholder }), showFilter && renderFilter()] })) : (renderSelection()), showFilter && !multiline && renderFilter(), (0, jsx_runtime_1.jsx)("span", { className: 'caret' })] })));
81
81
  if (!inputAddon && !errorMessage && !warningMessage) {
82
82
  return toggleButton;
83
83
  }
@@ -8,7 +8,7 @@ const classnames_1 = tslib_1.__importDefault(require("classnames"));
8
8
  const isEmpty_1 = tslib_1.__importDefault(require("lodash/fp/isEmpty"));
9
9
  const MultiselectToggleFilter = (props) => {
10
10
  const { isActive, selectedItemIds, filterValue, multiline, onFilterChange } = props;
11
- const inputClasses = (0, classnames_1.default)('multiselect-filter-input', (0, isEmpty_1.default)(selectedItemIds) && 'multiselect-filter-input-placeholder', isActive && 'multiselect-filter-input-active', multiline && 'padding-left-0');
11
+ const inputClasses = (0, classnames_1.default)('multiselect-filter-input', (0, isEmpty_1.default)(selectedItemIds) && 'multiselect-filter-input-placeholder', isActive && 'multiselect-filter-input-active');
12
12
  return ((0, jsx_runtime_1.jsx)("input", { type: 'text', role: 'searchbox', className: inputClasses,
13
13
  // biome-ignore lint/a11y/noAutofocus: autofocus is intentionally set to allow instant typing to filter
14
14
  autoFocus: true, onChange: onFilterChange, defaultValue: filterValue }));