@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
package/.DS_Store CHANGED
Binary file
Binary file
@@ -5,9 +5,9 @@ import 'react';
5
5
  import classNames from 'classnames';
6
6
  const ActionBarItemListItem = (props) => {
7
7
  const { hasLink, icon, onClick, className, children } = props, remainingProps = __rest(props, ["hasLink", "icon", "onClick", "className", "children"]);
8
- const classes = classNames('ActionBarItemListItem', className);
8
+ const classes = classNames('ActionBarItemListItem', hasLink && 'has-link', className);
9
9
  const iconClasses = classNames('ActionBarItemListItemIcon', 'rioglyph', icon);
10
10
  const btnClasses = classNames('ActionBarItemListItemButton');
11
- return (_jsxs("li", Object.assign({}, remainingProps, { className: classes }, { children: [icon && _jsx("span", { className: iconClasses }), hasLink && !onClick && _jsx("span", { children: children }), onClick && (_jsx("div", Object.assign({ className: btnClasses, onClick: onClick }, { children: children }))), !hasLink && !onClick && children] })));
11
+ return (_jsxs("li", Object.assign({}, remainingProps, { className: classes, onClick: onClick }, { children: [icon && _jsx("span", { className: iconClasses }), hasLink && !onClick && _jsx("span", { children: children }), onClick && _jsx("div", Object.assign({ className: btnClasses }, { children: children })), !hasLink && !onClick && children] })));
12
12
  };
13
13
  export default ActionBarItemListItem;
@@ -47,9 +47,10 @@ const AssetTree = memo(forwardRef((props, ref) => {
47
47
  if (previousWidth !== width) {
48
48
  setTreeWidth(width);
49
49
  }
50
- const previousMode = usePrevious(fly);
50
+ const [previousMode, setPreviousMode] = useState(fly);
51
51
  if (previousMode !== fly) {
52
52
  setSidebarMode(getSidebarMode(fly));
53
+ setPreviousMode(fly);
53
54
  }
54
55
  const childrenArray = React.Children.toArray(children);
55
56
  // check for children type of TreeCategory and throw error in case
@@ -181,6 +181,10 @@ export type TreeProps = {
181
181
  * Component to offer customization options for the tree.
182
182
  */
183
183
  treeOptions?: React.ReactNode[];
184
+ /**
185
+ * Tooltip content for the tree options dropdown.
186
+ */
187
+ treeOptionsTooltip?: React.ReactNode;
184
188
  /**
185
189
  * Disables animation when filtering or using search
186
190
  *
@@ -38,7 +38,7 @@ const filterProps = omit([
38
38
  ]);
39
39
  const customCompare = (prevProps, nextProps) => isEqual(filterProps(prevProps), filterProps(nextProps));
40
40
  const Tree = React.memo((props) => {
41
- const { groups = [], items = [], selectedGroups = [], selectedItems = [], onSelectionChange = noop, hasMultiselect = true, showRadioButtons = false, hideSearch = false, hideTreeHead, summary, hideSummary = false, search, searchPlaceholder = 'Type here to filter by name', onSearchChange = noop, className, scrollHeight, expandedGroups, onExpandGroupsChange = noop, showEmptyGroups = true, treeOptions = [], disableAnimation = false } = props, remainingProps = __rest(props, ["groups", "items", "selectedGroups", "selectedItems", "onSelectionChange", "hasMultiselect", "showRadioButtons", "hideSearch", "hideTreeHead", "summary", "hideSummary", "search", "searchPlaceholder", "onSearchChange", "className", "scrollHeight", "expandedGroups", "onExpandGroupsChange", "showEmptyGroups", "treeOptions", "disableAnimation"]);
41
+ const { groups = [], items = [], selectedGroups = [], selectedItems = [], onSelectionChange = noop, hasMultiselect = true, showRadioButtons = false, hideSearch = false, hideTreeHead, summary, hideSummary = false, search, searchPlaceholder = 'Type here to filter by name', onSearchChange = noop, className, scrollHeight, expandedGroups, onExpandGroupsChange = noop, showEmptyGroups = true, treeOptions = [], treeOptionsTooltip, disableAnimation = false } = props, remainingProps = __rest(props, ["groups", "items", "selectedGroups", "selectedItems", "onSelectionChange", "hasMultiselect", "showRadioButtons", "hideSearch", "hideTreeHead", "summary", "hideSummary", "search", "searchPlaceholder", "onSearchChange", "className", "scrollHeight", "expandedGroups", "onExpandGroupsChange", "showEmptyGroups", "treeOptions", "treeOptionsTooltip", "disableAnimation"]);
42
42
  const [state, dispatch] = useReducer(treeReducer, {
43
43
  groupedItems: [],
44
44
  flatItems: [],
@@ -275,6 +275,6 @@ const Tree = React.memo((props) => {
275
275
  const hasCustomSearch = !isNil(search);
276
276
  return (_jsxs("div", Object.assign({}, remainingProps, { className: treeClassNames, ref: treeRef }, { children: [_jsxs("div", Object.assign({ className: 'TreeHeader' }, { children: [showSearch && !hasCustomSearch && (_jsx(TreeSearch, { value: state.searchValue, onChange: handleSearchChange, placeholder: searchPlaceholder })), hasCustomSearch && search, showTreeHead && (_jsxs("div", Object.assign({ className: treeHeadClasses }, { children: [showSelectAll && (_jsx("div", Object.assign({ className: 'border border-right-only hidden-empty padding-right-10 margin-right-2' }, { children: _jsx(TreeSelectAll, { isChecked: state.allChecked, isEnabled: hasMultiselect, isIndeterminate: isIndeterminate, onSelect: handleSelectAll }) }))), _jsx("div", Object.assign({ className: 'display-flex justify-content-between align-items-start width-100pct' }, { children: showSummary
277
277
  ? summary || (_jsx(TreeSummary, { children: map((typeCounter) => (_jsx(TypeCounter, { type: typeCounter, icon: `${typeCounter}`, value: state.assetCounts[typeCounter], onClick: handleFilterByType, isActive: state.typeFilter.includes(typeCounter), hasFilter: isFilterActive, enableActivity: enableActivity }, typeCounter)))(state.visibleTypeCounters) }))
278
- : null })), _jsx(TreeOptions, { treeOptions: treeOptions })] })))] })), _jsx(TreeRoot, Object.assign({ maxHeight: scrollHeight, disableAnimation: disableAnimation }, { children: content }))] })));
278
+ : null })), _jsx(TreeOptions, { treeOptions: treeOptions, treeOptionsTooltip: treeOptionsTooltip })] })))] })), _jsx(TreeRoot, Object.assign({ maxHeight: scrollHeight, disableAnimation: disableAnimation }, { children: content }))] })));
279
279
  }, customCompare);
280
280
  export default Tree;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  export type TreeOptionsProps = {
3
3
  treeOptions?: React.ReactNode[];
4
+ treeOptionsTooltip?: React.ReactNode;
4
5
  className?: string;
5
6
  };
6
7
  declare const TreeOptions: (props: TreeOptionsProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -4,13 +4,27 @@ import 'react';
4
4
  import classNames from 'classnames';
5
5
  import { isEmpty } from 'lodash';
6
6
  import ButtonDropdown from '../dropdown/ButtonDropdown';
7
+ import SimpleTooltip from '../tooltip/SimpleTooltip';
7
8
  const TreeOptions = (props) => {
8
- const { treeOptions = [], className } = props;
9
+ const { treeOptions = [], treeOptionsTooltip, className } = props;
9
10
  if (isEmpty(treeOptions)) {
10
11
  return null;
11
12
  }
12
13
  const dropdownClasses = classNames('display-flex flex-column gap-10', 'width-250', 'padding-15', className);
13
14
  const customDropdown = _jsx("div", Object.assign({ className: dropdownClasses }, { children: treeOptions }));
14
- return (_jsx(ButtonDropdown, { title: _jsx("span", { className: 'rioglyph rioglyph-option-vertical', "aria-hidden": 'true' }), bsStyle: 'default', bsSize: 'sm', customDropdown: customDropdown, toggleClassName: 'hover-bg-white border-none text-color-gray hover-text-color-dark', className: 'TreeHeaderOptions', pullRight: true, iconOnly: true }));
15
+ const dropdown = (_jsx(ButtonDropdown, { title: _jsx("span", { className: 'rioglyph rioglyph-option-vertical', "aria-hidden": 'true' }), bsStyle: 'default', bsSize: 'sm', customDropdown: customDropdown, toggleClassName: 'hover-bg-white border-none text-color-gray hover-text-color-dark', className: 'TreeHeaderOptions', pullRight: true, iconOnly: true }));
16
+ if (treeOptionsTooltip) {
17
+ return (_jsx(SimpleTooltip, Object.assign({ content: treeOptionsTooltip, placement: 'bottom', delay: { show: 1000, hide: 0 }, popperConfig: {
18
+ modifiers: [
19
+ {
20
+ name: 'offset',
21
+ options: {
22
+ offset: [-20, 10],
23
+ },
24
+ },
25
+ ],
26
+ } }, { children: dropdown })));
27
+ }
28
+ return dropdown;
15
29
  };
16
30
  export default TreeOptions;
@@ -25,7 +25,7 @@ const TreeSidebarCategories = (props) => {
25
25
  const category = (_jsx("li", Object.assign({ onClick: handleSelectCategory, className: statusClassName }, { children: _jsx("div", Object.assign({ className: 'selection-bubble' }, { children: _jsx("span", { className: `rioglyph ${icon}` }) })) }), id));
26
26
  if (label) {
27
27
  const tooltip = _jsx("span", { children: label });
28
- return (_jsx(OverlayTrigger, Object.assign({ placement: Tooltip.RIGHT, delay: TOOLTIP_DELAY, overlay: _jsx(Tooltip, Object.assign({ id: 'tooltip', width: 'auto' }, { children: tooltip })) }, { children: category }), `category-tooltip-${id}`));
28
+ return (_jsx(OverlayTrigger, Object.assign({ placement: Tooltip.RIGHT, delay: { show: TOOLTIP_DELAY, hide: 0 }, overlay: _jsx(Tooltip, Object.assign({ id: 'tooltip', width: 'auto' }, { children: tooltip })) }, { children: category }), `category-tooltip-${id}`));
29
29
  }
30
30
  return category;
31
31
  }) }));
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React, { forwardRef, useLayoutEffect, useRef, useState } from 'react';
2
+ import React, { forwardRef, useEffect, useRef, useState } from 'react';
3
3
  import classNames from 'classnames';
4
4
  import { AnimatePresence, motion } from 'framer-motion';
5
5
  import noop from 'lodash/noop';
@@ -54,7 +54,7 @@ const CalendarStripe = forwardRef((props, ref) => {
54
54
  useAfterMount(() => {
55
55
  setEnableInitialAnimation(true);
56
56
  }, []);
57
- useLayoutEffect(() => {
57
+ useEffect(() => {
58
58
  if (!columnWrapperRef.current) {
59
59
  return;
60
60
  }
Binary file
Binary file
@@ -24,7 +24,7 @@ const setupMarker = (props, api) => {
24
24
  const { position, customData, icon, draggable, eventListenerMap } = props;
25
25
  const MarkerConstructor = isDomMakerNeeded(icon) ? H.map.DomMarker : H.map.Marker;
26
26
  const marker = new MarkerConstructor(position, {
27
- icon: getOrCreateIcon(icon),
27
+ icon: icon && getOrCreateIcon(icon),
28
28
  });
29
29
  marker.setData(customData);
30
30
  marker.draggable = !!draggable;
@@ -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>;
@@ -15,10 +15,18 @@ export const markerColorOptions = [
15
15
  'bg-map-marker-poi',
16
16
  'bg-map-marker-geofence',
17
17
  'bg-map-marker-route',
18
+ 'bg-map-marker-info',
19
+ 'bg-map-marker-success',
20
+ 'bg-map-marker-warning',
21
+ 'bg-map-marker-danger',
18
22
  ];
19
23
  export const markerColorMapping = {
20
- 'bg-map-marker-asset': 'map-marker-type-asset',
21
- 'bg-map-marker-poi': 'map-marker-type-poi',
22
- 'bg-map-marker-geofence': 'map-marker-type-geofence',
23
- 'bg-map-marker-route': 'map-marker-type-route',
24
+ 'bg-map-marker-asset': '--color-map-marker-asset',
25
+ 'bg-map-marker-poi': '--color-map-marker-poi',
26
+ 'bg-map-marker-geofence': '--color-map-marker-geofence',
27
+ 'bg-map-marker-route': '--color-map-marker-route',
28
+ 'bg-map-marker-info': '--color-map-marker-info',
29
+ 'bg-map-marker-success': '--color-map-marker-success',
30
+ 'bg-map-marker-warning': '--color-map-marker-warning',
31
+ 'bg-map-marker-danger': '--color-map-marker-danger',
24
32
  };
@@ -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
  */
@@ -4,8 +4,9 @@ import classNames from 'classnames';
4
4
  import { markerColorMapping } from '../map/utils/mapTypes';
5
5
  const ClusterMapMarker = (props) => {
6
6
  const { count, exceptionCount = 0, markerColor = 'bg-map-marker-asset', warningCount = 0, active = false, clickable = true, iconName, } = props;
7
- const classes = classNames(active && 'active', 'rio-map-marker', 'rio-map-marker-center-center', !clickable && 'pointer-events-none');
8
- const clusterClasses = classNames('rio-map-cluster-circle', active && 'active', markerColorMapping[markerColor]);
9
- return (_jsx("div", Object.assign({ className: classes }, { children: _jsx("div", Object.assign({ className: 'rio-map-marker-translate' }, { children: _jsxs("div", Object.assign({ className: 'rio-map-cluster' }, { children: [_jsx("div", Object.assign({ className: clusterClasses }, { children: _jsxs("div", Object.assign({ className: 'rio-map-cluster-content' }, { children: [iconName && _jsx("div", { className: `rio-map-icon rioglyph rioglyph-${iconName}` }), _jsx("div", Object.assign({ className: 'rio-map-count' }, { children: count }))] })) })), _jsx("div", Object.assign({ className: 'rio-map-bubble exception' }, { children: exceptionCount > 0 && exceptionCount })), _jsx("div", Object.assign({ className: 'rio-map-bubble warning' }, { children: warningCount > 0 && warningCount }))] })) })) })));
7
+ const clusterClasses = classNames('rio-map-cluster-circle', active && 'active');
8
+ const classes = classNames(active && 'active', 'rio-map-marker', 'rio-map-marker-center-center', !clickable && 'not-clickable');
9
+ const markerBackgroundColor = `var(${markerColorMapping[markerColor]})`;
10
+ return (_jsx("div", Object.assign({ className: classes, style: { color: markerBackgroundColor }, "data-marker-type": markerColor.replace('bg-', 'cluster-') }, { children: _jsx("div", Object.assign({ className: 'rio-map-marker-translate' }, { children: _jsxs("div", Object.assign({ className: 'rio-map-cluster' }, { children: [_jsx("div", Object.assign({ className: clusterClasses }, { children: _jsxs("div", Object.assign({ className: 'rio-map-cluster-content' }, { children: [iconName && _jsx("div", { className: `rio-map-icon rioglyph rioglyph-${iconName}` }), _jsx("div", Object.assign({ className: 'rio-map-count' }, { children: count }))] })) })), exceptionCount > 0 && _jsx("div", Object.assign({ className: 'rio-map-bubble exception' }, { children: exceptionCount })), warningCount > 0 && _jsx("div", Object.assign({ className: 'rio-map-bubble warning' }, { children: warningCount }))] })) })) })));
10
11
  };
11
12
  export 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,26 @@ 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;
86
117
  };
87
118
  declare const SingleMapMarker: (props: SingleMapMarkerProps) => import("react/jsx-runtime").JSX.Element;
88
119
  export default SingleMapMarker;
@@ -1,14 +1,27 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  // @ts-ignore-next-line importsNotUsedAsValues
3
3
  import 'react';
4
4
  import classNames from 'classnames';
5
5
  import { markerColorMapping } from '../map/utils/mapTypes';
6
- const MapDirection = ({ moving, bearing }) => (_jsx(_Fragment, { children: moving && _jsx("div", { className: 'rio-map-direction', style: { transform: `rotate(${bearing}deg)` } }) }));
6
+ const DEFAULT_BEARING = 60;
7
+ const MapStateIndicator = (props) => {
8
+ const { moving, bearing, stateIconName } = props;
9
+ if (!moving && !stateIconName) {
10
+ return null;
11
+ }
12
+ const stateClassName = classNames('rio-map-direction', // TODO: backwards-compatible - remove in future releases
13
+ 'rio-map-marker-state', 'rioglyph', `rioglyph-${stateIconName || 'direction'}`);
14
+ const style = stateIconName ? {} : { transform: `rotate(${bearing}deg)` };
15
+ return _jsx("div", { className: stateClassName, style: style });
16
+ };
7
17
  const getIcons = (iconNames = []) => iconNames.map((name, index) => (_jsx("div", { className: `rio-map-icon rioglyph rioglyph-${name}` }, `rio-map-icon-${name}-${index}`)));
8
18
  const SingleMapMarker = (props) => {
9
- 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;
10
- const classes = classNames(active && 'active', 'rio-map-marker', 'rio-map-marker-bottom-center');
11
- const singleClasses = classNames('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', markerColorMapping[markerColor]);
12
- return (_jsx("div", Object.assign({ className: classes }, { children: _jsxs("div", Object.assign({ className: 'rio-map-marker-translate' }, { children: [_jsxs("div", Object.assign({ className: singleClasses }, { children: [_jsx(MapDirection, { moving: moving, bearing: bearing }), getIcons(iconNames), name && _jsx("div", Object.assign({ className: 'rio-map-name' }, { children: name })), _jsx("div", Object.assign({ className: 'rio-map-bubble exception' }, { children: exceptionCount > 0 && exceptionCount })), _jsx("div", Object.assign({ className: 'rio-map-bubble warning' }, { children: warningCount > 0 && warningCount }))] })), _jsx("div", { className: 'rio-map-position-arrow' }), _jsx("div", { className: `rio-map-position ${size === 'lg' ? 'rio-map-position-lg' : ''} cursor-pointer` })] })) })));
19
+ 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, } = props;
20
+ const largeAnchor = anchorSize === 'lg';
21
+ const classes = classNames(active && 'active', 'rio-map-marker', 'rio-map-marker-bottom-center', !clickable && 'not-clickable');
22
+ const anchorClasses = classNames('rio-map-anchor', largeAnchor ? 'rio-map-anchor-lg' : '');
23
+ const singleClasses = classNames('rio-map-single', fixed && 'fixed', moving && 'moving', textColor, markerOnHover && 'visible-on-hover', active && 'active', pinging && 'pinging');
24
+ const markerBackgroundColor = `var(${markerColorMapping[markerColor]})`;
25
+ return (_jsx("div", Object.assign({ className: classes, style: { color: markerBackgroundColor }, "data-marker-type": markerColor.replace('bg-', 'single-') }, { children: _jsxs("div", Object.assign({ className: 'rio-map-marker-translate' }, { children: [!anchorOnly && (_jsxs(_Fragment, { children: [_jsxs("div", Object.assign({ className: singleClasses }, { children: [_jsx(MapStateIndicator, { moving: moving, bearing: bearing, stateIconName: stateIconName }), getIcons(iconNames), name && _jsx("div", Object.assign({ className: 'rio-map-name' }, { children: name })), exceptionCount > 0 && _jsx("div", Object.assign({ className: 'rio-map-bubble exception' }, { children: exceptionCount })), warningCount > 0 && _jsx("div", Object.assign({ className: 'rio-map-bubble warning' }, { children: warningCount }))] })), _jsx("div", { className: 'rio-map-anchor-arrow' })] })), _jsx("div", Object.assign({ className: anchorClasses }, { children: anchorIconName && largeAnchor && _jsx("span", { className: `rioglyph rioglyph-${anchorIconName}` }) }))] })) })));
13
26
  };
14
27
  export default SingleMapMarker;
@@ -1,5 +1,5 @@
1
1
  import { __rest } from "tslib";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  // @ts-ignore-next-line importsNotUsedAsValues
4
4
  import 'react';
5
5
  import classNames from 'classnames';
@@ -11,23 +11,36 @@ const justify = {
11
11
  center: 'justify-content-center',
12
12
  right: 'justify-content-end',
13
13
  };
14
+ const renderButtons = (buttons) => {
15
+ if (isEmpty(buttons)) {
16
+ return;
17
+ }
18
+ if (buttons.length === 1) {
19
+ return (_jsx("div", Object.assign({ className: 'btn-toolbar margin-top-20' }, { children: _jsx(StateButton, Object.assign({}, buttons[0])) })));
20
+ }
21
+ if (buttons.length === 2) {
22
+ return (_jsx("div", Object.assign({ className: 'btn-toolbar margin-top-20' }, { children: buttons.map((buttonProps, index) => (_jsx(StateButton, Object.assign({}, buttonProps), index))) })));
23
+ }
24
+ return (_jsxs(_Fragment, { children: [_jsxs("div", Object.assign({ className: 'btn-toolbar margin-top-20' }, { children: [_jsx(StateButton, Object.assign({}, buttons[0]), '1'), _jsx(StateButton, Object.assign({}, buttons[1]), '2')] })), _jsx("div", Object.assign({ className: 'btn-toolbar' }, { children: buttons.map((buttonProps, index) => {
25
+ return index > 1 && _jsx(StateButton, Object.assign({}, buttonProps), index);
26
+ }) }))] }));
27
+ };
14
28
  const CustomState = (props) => {
15
- const { icon = 'rioglyph-rio', icons = [], image, headline, message, buttons = [], alignment = 'center', fullWidth = false, condensed = false, outerClassName, innerClassName, children } = props, remainingProps = __rest(props, ["icon", "icons", "image", "headline", "message", "buttons", "alignment", "fullWidth", "condensed", "outerClassName", "innerClassName", "children"]);
16
- const hasCustomInnerPadding = innerClassName && innerClassName.includes('padding');
17
- const hasCustomOuterPadding = outerClassName && outerClassName.includes('padding');
29
+ const { icon, icons = [], image, headline, message, buttons = [], alignment = 'center', fullWidth = false, condensed = false, outerClassName, innerClassName, children } = props, remainingProps = __rest(props, ["icon", "icons", "image", "headline", "message", "buttons", "alignment", "fullWidth", "condensed", "outerClassName", "innerClassName", "children"]);
30
+ const hasCustomInnerPadding = innerClassName === null || innerClassName === void 0 ? void 0 : innerClassName.includes('padding');
31
+ const hasCustomOuterPadding = outerClassName === null || outerClassName === void 0 ? void 0 : outerClassName.includes('padding');
18
32
  const wrapperClasses = classNames('margin-0', 'width-100pct', !fullWidth && 'max-width-600', 'panel-default', 'panel', !hasCustomOuterPadding && condensed ? 'padding-10' : 'padding-15', outerClassName && outerClassName);
19
33
  const innerClassNames = classNames('display-flex', 'flex-column', 'align-items-center', 'text-center', !hasCustomInnerPadding && condensed ? 'padding-15' : 'padding-25', innerClassName && innerClassName);
20
34
  const iconClasses = classNames(condensed ? 'text-size-16 margin-bottom-10' : 'text-size-h2 margin-bottom-20');
21
35
  const iconsClasses = classNames(condensed ? 'text-size-16 margin-bottom-10' : 'text-size-h2 margin-bottom-20', 'display-flex', 'align-items-center', 'max-width-100pct');
22
- const headlineClassNames = classNames(condensed ? 'text-size-h4' : 'text-size-h3 text-size-h2-sm', 'line-height-125rel', 'text-color-dark', 'text-medium', 'width-500', 'max-width-100pct');
23
- const renderButtons = (_jsx("div", Object.assign({ className: 'btn-toolbar margin-top-20' }, { children: buttons.map((buttonProps, index) => (_jsx(StateButton, Object.assign({}, buttonProps), index))) })));
36
+ const headlineClassNames = classNames(condensed ? 'text-size-h4' : 'text-size-h3 text-size-h2-xl', 'line-height-125rel', 'text-color-dark', 'text-medium', 'width-500', 'max-width-100pct', 'text-wrap-balance');
24
37
  const renderIcon = (_jsx("div", Object.assign({ className: iconClasses }, { children: _jsx(StateIcon, { name: icon }) })));
25
38
  const renderIcons = (_jsx("div", Object.assign({ className: iconsClasses }, { children: icons.map((iconProps, index) => (_jsx(StateIcon, Object.assign({}, iconProps), index))) })));
26
39
  const renderChildren = _jsx("div", Object.assign({ className: 'width-500 max-width-100pct margin-top-25' }, { children: children }));
27
40
  const renderHeadline = _jsx("div", Object.assign({ className: headlineClassNames }, { children: headline }));
28
- const renderMessage = _jsx("div", Object.assign({ className: 'text-color-dark margin-top-15 width-500 max-width-100pct' }, { children: message }));
41
+ const renderMessage = (_jsx("div", Object.assign({ className: 'text-color-dark margin-top-15 width-500 max-width-100pct text-wrap-balance' }, { children: message })));
29
42
  const singleOrMultiIcon = isEmpty(icons) ? renderIcon : renderIcons;
30
43
  const imageOrIcon = image ? image : singleOrMultiIcon;
31
- return (_jsx("div", Object.assign({ className: `display-flex ${justify[alignment]} max-width-100pct` }, remainingProps, { children: _jsx("div", Object.assign({ className: wrapperClasses }, { children: _jsxs("div", Object.assign({ className: innerClassNames }, { children: [imageOrIcon, headline && renderHeadline, message && renderMessage, !isEmpty(buttons) && renderButtons, children && renderChildren] })) })) })));
44
+ return (_jsx("div", Object.assign({ className: `display-flex ${justify[alignment]} max-width-100pct` }, remainingProps, { children: _jsx("div", Object.assign({ className: wrapperClasses }, { children: _jsxs("div", Object.assign({ className: innerClassNames }, { children: [imageOrIcon, headline && renderHeadline, message && renderMessage, renderButtons(buttons), children && renderChildren] })) })) })));
32
45
  };
33
46
  export default CustomState;
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import type { BUTTON_STYLE } from '../../Button';
2
3
  export type StateButtonProps = {
3
4
  /**
4
5
  * The button text.
@@ -18,10 +19,16 @@ export type StateButtonProps = {
18
19
  * This way it will render a link button instead.
19
20
  */
20
21
  href?: string;
22
+ /**
23
+ * The style of the button.
24
+ *
25
+ * @default 'primary'
26
+ */
27
+ bsStyle?: BUTTON_STYLE;
21
28
  /**
22
29
  * Additional classes assigned to the button.
23
30
  */
24
31
  className?: string;
25
32
  };
26
- declare const StateButton: ({ text, className, onClick, href }: StateButtonProps) => import("react/jsx-runtime").JSX.Element;
33
+ declare const StateButton: (props: StateButtonProps) => import("react/jsx-runtime").JSX.Element;
27
34
  export default StateButton;
@@ -2,12 +2,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  // @ts-ignore-next-line importsNotUsedAsValues
3
3
  import 'react';
4
4
  import classNames from 'classnames';
5
- const StateButton = ({ text, className, onClick = () => { }, href }) => {
6
- const buttonClassNames = classNames('btn btn-primary', 'margin-top-10', className && className);
7
- // In case a href is given, render a link button instead
5
+ const StateButton = (props) => {
6
+ const { text, bsStyle = 'primary', className, onClick = () => { }, href } = props;
7
+ // In case a href is given, render a link instead
8
8
  if (href) {
9
- return (_jsx("a", Object.assign({ className: buttonClassNames, href: href, onClick: onClick }, { children: text })));
9
+ return (_jsx("a", Object.assign({ className: classNames('margin-top-15', className), href: href, onClick: onClick }, { children: text })));
10
10
  }
11
+ const buttonClassNames = classNames('btn', 'margin-top-10', `btn-${bsStyle}`, className);
11
12
  return (_jsx("button", Object.assign({ className: buttonClassNames, type: 'button', onClick: onClick }, { children: text })));
12
13
  };
13
14
  export default StateButton;
package/lib/.DS_Store CHANGED
Binary file
package/lib/es/.DS_Store CHANGED
Binary file
Binary file
@@ -7,9 +7,9 @@ require("react");
7
7
  const classnames_1 = tslib_1.__importDefault(require("classnames"));
8
8
  const ActionBarItemListItem = (props) => {
9
9
  const { hasLink, icon, onClick, className, children } = props, remainingProps = tslib_1.__rest(props, ["hasLink", "icon", "onClick", "className", "children"]);
10
- const classes = (0, classnames_1.default)('ActionBarItemListItem', className);
10
+ const classes = (0, classnames_1.default)('ActionBarItemListItem', hasLink && 'has-link', className);
11
11
  const iconClasses = (0, classnames_1.default)('ActionBarItemListItemIcon', 'rioglyph', icon);
12
12
  const btnClasses = (0, classnames_1.default)('ActionBarItemListItemButton');
13
- return ((0, jsx_runtime_1.jsxs)("li", Object.assign({}, remainingProps, { className: classes }, { children: [icon && (0, jsx_runtime_1.jsx)("span", { className: iconClasses }), hasLink && !onClick && (0, jsx_runtime_1.jsx)("span", { children: children }), onClick && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: btnClasses, onClick: onClick }, { children: children }))), !hasLink && !onClick && children] })));
13
+ return ((0, jsx_runtime_1.jsxs)("li", Object.assign({}, remainingProps, { className: classes, onClick: onClick }, { children: [icon && (0, jsx_runtime_1.jsx)("span", { className: iconClasses }), hasLink && !onClick && (0, jsx_runtime_1.jsx)("span", { children: children }), onClick && (0, jsx_runtime_1.jsx)("div", Object.assign({ className: btnClasses }, { children: children })), !hasLink && !onClick && children] })));
14
14
  };
15
15
  exports.default = ActionBarItemListItem;
@@ -49,9 +49,10 @@ const AssetTree = (0, react_1.memo)((0, react_1.forwardRef)((props, ref) => {
49
49
  if (previousWidth !== width) {
50
50
  setTreeWidth(width);
51
51
  }
52
- const previousMode = (0, usePrevious_1.default)(fly);
52
+ const [previousMode, setPreviousMode] = (0, react_1.useState)(fly);
53
53
  if (previousMode !== fly) {
54
54
  setSidebarMode(getSidebarMode(fly));
55
+ setPreviousMode(fly);
55
56
  }
56
57
  const childrenArray = react_1.default.Children.toArray(children);
57
58
  // check for children type of TreeCategory and throw error in case
@@ -181,6 +181,10 @@ export type TreeProps = {
181
181
  * Component to offer customization options for the tree.
182
182
  */
183
183
  treeOptions?: React.ReactNode[];
184
+ /**
185
+ * Tooltip content for the tree options dropdown.
186
+ */
187
+ treeOptionsTooltip?: React.ReactNode;
184
188
  /**
185
189
  * Disables animation when filtering or using search
186
190
  *
@@ -43,7 +43,7 @@ const filterProps = (0, omit_1.default)([
43
43
  ]);
44
44
  const customCompare = (prevProps, nextProps) => (0, isEqual_1.default)(filterProps(prevProps), filterProps(nextProps));
45
45
  const Tree = react_1.default.memo((props) => {
46
- const { groups = [], items = [], selectedGroups = [], selectedItems = [], onSelectionChange = noop_1.default, hasMultiselect = true, showRadioButtons = false, hideSearch = false, hideTreeHead, summary, hideSummary = false, search, searchPlaceholder = 'Type here to filter by name', onSearchChange = noop_1.default, className, scrollHeight, expandedGroups, onExpandGroupsChange = noop_1.default, showEmptyGroups = true, treeOptions = [], disableAnimation = false } = props, remainingProps = tslib_1.__rest(props, ["groups", "items", "selectedGroups", "selectedItems", "onSelectionChange", "hasMultiselect", "showRadioButtons", "hideSearch", "hideTreeHead", "summary", "hideSummary", "search", "searchPlaceholder", "onSearchChange", "className", "scrollHeight", "expandedGroups", "onExpandGroupsChange", "showEmptyGroups", "treeOptions", "disableAnimation"]);
46
+ const { groups = [], items = [], selectedGroups = [], selectedItems = [], onSelectionChange = noop_1.default, hasMultiselect = true, showRadioButtons = false, hideSearch = false, hideTreeHead, summary, hideSummary = false, search, searchPlaceholder = 'Type here to filter by name', onSearchChange = noop_1.default, className, scrollHeight, expandedGroups, onExpandGroupsChange = noop_1.default, showEmptyGroups = true, treeOptions = [], treeOptionsTooltip, disableAnimation = false } = props, remainingProps = tslib_1.__rest(props, ["groups", "items", "selectedGroups", "selectedItems", "onSelectionChange", "hasMultiselect", "showRadioButtons", "hideSearch", "hideTreeHead", "summary", "hideSummary", "search", "searchPlaceholder", "onSearchChange", "className", "scrollHeight", "expandedGroups", "onExpandGroupsChange", "showEmptyGroups", "treeOptions", "treeOptionsTooltip", "disableAnimation"]);
47
47
  const [state, dispatch] = (0, react_1.useReducer)(treeReducer_1.treeReducer, {
48
48
  groupedItems: [],
49
49
  flatItems: [],
@@ -280,6 +280,6 @@ const Tree = react_1.default.memo((props) => {
280
280
  const hasCustomSearch = !(0, isNil_1.default)(search);
281
281
  return ((0, jsx_runtime_1.jsxs)("div", Object.assign({}, remainingProps, { className: treeClassNames, ref: treeRef }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'TreeHeader' }, { children: [showSearch && !hasCustomSearch && ((0, jsx_runtime_1.jsx)(TreeSearch_1.default, { value: state.searchValue, onChange: handleSearchChange, placeholder: searchPlaceholder })), hasCustomSearch && search, showTreeHead && ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: treeHeadClasses }, { children: [showSelectAll && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'border border-right-only hidden-empty padding-right-10 margin-right-2' }, { children: (0, jsx_runtime_1.jsx)(TreeSelectAll_1.default, { isChecked: state.allChecked, isEnabled: hasMultiselect, isIndeterminate: isIndeterminate, onSelect: handleSelectAll }) }))), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'display-flex justify-content-between align-items-start width-100pct' }, { children: showSummary
282
282
  ? summary || ((0, jsx_runtime_1.jsx)(TreeSummary_1.default, { children: (0, map_1.default)((typeCounter) => ((0, jsx_runtime_1.jsx)(TypeCounter_1.default, { type: typeCounter, icon: `${typeCounter}`, value: state.assetCounts[typeCounter], onClick: handleFilterByType, isActive: state.typeFilter.includes(typeCounter), hasFilter: isFilterActive, enableActivity: enableActivity }, typeCounter)))(state.visibleTypeCounters) }))
283
- : null })), (0, jsx_runtime_1.jsx)(TreeOptions_1.default, { treeOptions: treeOptions })] })))] })), (0, jsx_runtime_1.jsx)(TreeRoot_1.default, Object.assign({ maxHeight: scrollHeight, disableAnimation: disableAnimation }, { children: content }))] })));
283
+ : null })), (0, jsx_runtime_1.jsx)(TreeOptions_1.default, { treeOptions: treeOptions, treeOptionsTooltip: treeOptionsTooltip })] })))] })), (0, jsx_runtime_1.jsx)(TreeRoot_1.default, Object.assign({ maxHeight: scrollHeight, disableAnimation: disableAnimation }, { children: content }))] })));
284
284
  }, customCompare);
285
285
  exports.default = Tree;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  export type TreeOptionsProps = {
3
3
  treeOptions?: React.ReactNode[];
4
+ treeOptionsTooltip?: React.ReactNode;
4
5
  className?: string;
5
6
  };
6
7
  declare const TreeOptions: (props: TreeOptionsProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -7,13 +7,27 @@ require("react");
7
7
  const classnames_1 = tslib_1.__importDefault(require("classnames"));
8
8
  const lodash_1 = require("lodash");
9
9
  const ButtonDropdown_1 = tslib_1.__importDefault(require("../dropdown/ButtonDropdown"));
10
+ const SimpleTooltip_1 = tslib_1.__importDefault(require("../tooltip/SimpleTooltip"));
10
11
  const TreeOptions = (props) => {
11
- const { treeOptions = [], className } = props;
12
+ const { treeOptions = [], treeOptionsTooltip, className } = props;
12
13
  if ((0, lodash_1.isEmpty)(treeOptions)) {
13
14
  return null;
14
15
  }
15
16
  const dropdownClasses = (0, classnames_1.default)('display-flex flex-column gap-10', 'width-250', 'padding-15', className);
16
17
  const customDropdown = (0, jsx_runtime_1.jsx)("div", Object.assign({ className: dropdownClasses }, { children: treeOptions }));
17
- return ((0, jsx_runtime_1.jsx)(ButtonDropdown_1.default, { title: (0, jsx_runtime_1.jsx)("span", { className: 'rioglyph rioglyph-option-vertical', "aria-hidden": 'true' }), bsStyle: 'default', bsSize: 'sm', customDropdown: customDropdown, toggleClassName: 'hover-bg-white border-none text-color-gray hover-text-color-dark', className: 'TreeHeaderOptions', pullRight: true, iconOnly: true }));
18
+ const dropdown = ((0, jsx_runtime_1.jsx)(ButtonDropdown_1.default, { title: (0, jsx_runtime_1.jsx)("span", { className: 'rioglyph rioglyph-option-vertical', "aria-hidden": 'true' }), bsStyle: 'default', bsSize: 'sm', customDropdown: customDropdown, toggleClassName: 'hover-bg-white border-none text-color-gray hover-text-color-dark', className: 'TreeHeaderOptions', pullRight: true, iconOnly: true }));
19
+ if (treeOptionsTooltip) {
20
+ return ((0, jsx_runtime_1.jsx)(SimpleTooltip_1.default, Object.assign({ content: treeOptionsTooltip, placement: 'bottom', delay: { show: 1000, hide: 0 }, popperConfig: {
21
+ modifiers: [
22
+ {
23
+ name: 'offset',
24
+ options: {
25
+ offset: [-20, 10],
26
+ },
27
+ },
28
+ ],
29
+ } }, { children: dropdown })));
30
+ }
31
+ return dropdown;
18
32
  };
19
33
  exports.default = TreeOptions;
@@ -28,7 +28,7 @@ const TreeSidebarCategories = (props) => {
28
28
  const category = ((0, jsx_runtime_1.jsx)("li", Object.assign({ onClick: handleSelectCategory, className: statusClassName }, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'selection-bubble' }, { children: (0, jsx_runtime_1.jsx)("span", { className: `rioglyph ${icon}` }) })) }), id));
29
29
  if (label) {
30
30
  const tooltip = (0, jsx_runtime_1.jsx)("span", { children: label });
31
- return ((0, jsx_runtime_1.jsx)(OverlayTrigger_1.default, Object.assign({ placement: Tooltip_1.default.RIGHT, delay: TOOLTIP_DELAY, overlay: (0, jsx_runtime_1.jsx)(Tooltip_1.default, Object.assign({ id: 'tooltip', width: 'auto' }, { children: tooltip })) }, { children: category }), `category-tooltip-${id}`));
31
+ return ((0, jsx_runtime_1.jsx)(OverlayTrigger_1.default, Object.assign({ placement: Tooltip_1.default.RIGHT, delay: { show: TOOLTIP_DELAY, hide: 0 }, overlay: (0, jsx_runtime_1.jsx)(Tooltip_1.default, Object.assign({ id: 'tooltip', width: 'auto' }, { children: tooltip })) }, { children: category }), `category-tooltip-${id}`));
32
32
  }
33
33
  return category;
34
34
  }) }));
@@ -57,7 +57,7 @@ const CalendarStripe = (0, react_1.forwardRef)((props, ref) => {
57
57
  (0, useAfterMount_1.default)(() => {
58
58
  setEnableInitialAnimation(true);
59
59
  }, []);
60
- (0, react_1.useLayoutEffect)(() => {
60
+ (0, react_1.useEffect)(() => {
61
61
  if (!columnWrapperRef.current) {
62
62
  return;
63
63
  }
@@ -31,7 +31,7 @@ const setupMarker = (props, api) => {
31
31
  const { position, customData, icon, draggable, eventListenerMap } = props;
32
32
  const MarkerConstructor = (0, exports.isDomMakerNeeded)(icon) ? H.map.DomMarker : H.map.Marker;
33
33
  const marker = new MarkerConstructor(position, {
34
- icon: (0, exports.getOrCreateIcon)(icon),
34
+ icon: icon && (0, exports.getOrCreateIcon)(icon),
35
35
  });
36
36
  marker.setData(customData);
37
37
  marker.draggable = !!draggable;
@@ -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>;